(function(e){function t(t){for(var r,a,u=t[0],c=t[1],s=t[2],f=0,d=[];f<u.length;f++)a=u[f],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);l&&l(t);while(d.length)d.shift()();return i.push.apply(i,s||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,u=1;u<n.length;u++){var c=n[u];0!==o[c]&&(r=!1)}r&&(i.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},o={app:0},i=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/admin/";var u=window["webpackJsonp"]=window["webpackJsonp"]||[],c=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var l=c;i.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},3325:function(e,t,n){var r=n("7037").default;n("b64b"),n("b0c0"),n("d81d"),n("5319"),n("ac1f"),n("1276"),n("4de4"),n("2b3d"),n("d3b7"),n("3ca3"),n("ddb0"),function(){"use strict";var e,t,n,o,i,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=function(){},s=function(e){return function(){return e}},l=s(!1),f=s(!0),d=function(){return m},m=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:l,isSome:l,isNone:f,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(void 0),or:n,orThunk:t,map:d,each:c,bind:d,exists:l,forall:f,filter:d,equals:e,equals_:e,toArray:function(){return[]},toString:s("none()")}),g=function e(t){var n=s(t),r=function(){return i},o=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:f,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return e(n(t))},each:function(e){e(t)},bind:o,exists:o,forall:o,filter:function(e){return e(t)?i:m},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(l,(function(e){return n(t,e)}))}};return i},h={some:g,none:d,from:function(e){return null===e||void 0===e?m:g(e)}},p=Object.keys,v=Object.hasOwnProperty,b=function(e,t,n,r){return function(e,t){for(var n=p(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}(e,(function(e,o){(t(e,o)?n:r)(e,o)})),{}},y=function(e,t){var n,r={};return b(e,t,(n=r,function(e,t){n[t]=e}),c),r},x=function(e,t){return n=e,r=t,v.call(n,r)&&void 0!==e[t]&&null!==e[t];var n,r},w=function(e){return function(t){return o=r(n=t),(null===n?"null":"object"==o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}},C=function(e){return function(t){return r(t)===e}},k=w("string"),S=w("object"),_=w("array"),O=(o=null,function(e){return o===e}),E=C("boolean"),T=function(e){return!(null===(t=e)||void 0===t);var t},z=C("number"),D=Array.prototype.push,A=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!_(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);D.apply(t,e[n])}return t},M=function(e){return t=e,(n=0)<=n&&n<t.length?h.some(t[n]):h.none();var t,n},R=("undefined"!=typeof window||Function("return this;")(),function(e,t,n){!function(e,t,n){if(!(k(n)||E(n)||z(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)}),N=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},B={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return N(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return N(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return N(n)},fromDom:N,fromPoint:function(e,t,n){return h.from(e.dom.elementFromPoint(t,n)).map(N)}},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),H=tinymce.util.Tools.resolve("tinymce.util.Promise"),I=tinymce.util.Tools.resolve("tinymce.util.XHR"),L=function(e){return e.getParam("image_dimensions",!0,"boolean")},V=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},F=function(e){return e&&e.replace(/px$/,"")},j=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},U=function(e){if(e.margin){var t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},$=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},W=P.DOM,q=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):""},G=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):""},X=function(e){return e.style.borderWidth?F(e.style.borderWidth):""},K=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},Y=function(e,t){return e.style[t]?e.style[t]:""},J=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},Q=function(e,t,n){""===n?e.removeAttribute(t):e.setAttribute(t,n)},Z=function(e){var t,n,r,o;J(e)?(o=(r=e).parentNode,W.insertAfter(r,o),W.remove(o)):(t=e,n=W.create("figure",{class:"image"}),W.insertAfter(n,t),n.appendChild(t),n.appendChild(W.create("figcaption",{contentEditable:"true"},"Caption")),n.contentEditable="false")},ee=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},te=function(e,t){return function(e,n,r){e.style[n]?(e.style[n]=j(r),ee(e,t)):Q(e,n,r)}},ne=function(e,t){return e.style[t]?F(e.style[t]):K(e,t)},re=function(e,t){var n=j(t);e.style.marginLeft=n,e.style.marginRight=n},oe=function(e,t){var n=j(t);e.style.marginTop=n,e.style.marginBottom=n},ie=function(e,t){var n=j(t);e.style.borderWidth=n},ae=function(e,t){e.style.borderStyle=t},ue=function(e){return"FIGURE"===e.nodeName},ce=function(e){return 0===W.getAttrib(e,"alt").length&&"presentation"===W.getAttrib(e,"role")},se=function(){return{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},le=function(e,t){var n=document.createElement("img");return Q(n,"style",t.style),!q(n)&&""===t.hspace||re(n,t.hspace),!G(n)&&""===t.vspace||oe(n,t.vspace),!X(n)&&""===t.border||ie(n,t.border),!Y(n,"borderStyle")&&""===t.borderStyle||ae(n,t.borderStyle),e(n.getAttribute("style"))},fe=function(e,t){return{src:K(t,"src"),alt:ce(n=t)?"":K(n,"alt"),title:K(t,"title"),width:ne(t,"width"),height:ne(t,"height"),class:K(t,"class"),style:e(K(t,"style")),caption:J(t),hspace:q(t),vspace:G(t),border:X(t),borderStyle:Y(t,"borderStyle"),isDecorative:ce(t)};var n},de=function(e,t,n,r,o){n[r]!==t[r]&&o(e,r,n[r])},me=function(e,t,n){var r,o;n?(W.setAttrib(e,"role","presentation"),r=B.fromDom(e),R(r,"alt","")):(O(t)?(r=B.fromDom(e),o="alt",r.dom.removeAttribute(o)):(r=B.fromDom(e),R(r,"alt",t)),"presentation"===W.getAttrib(e,"role")&&W.setAttrib(e,"role",""))},ge=function(e,t){return function(n,r,o){e(n,o),ee(n,t)}},he=function(e,t,n){var r,o,i,a=fe(e,n);de(n,a,t,"caption",(function(e,t,n){return Z(e),0})),de(n,a,t,"src",Q),de(n,a,t,"title",Q),de(n,a,t,"width",te(0,e)),de(n,a,t,"height",te(0,e)),de(n,a,t,"class",Q),de(n,a,t,"style",ge((function(e,t){return Q(e,"style",t),0}),e)),de(n,a,t,"hspace",ge(re,e)),de(n,a,t,"vspace",ge(oe,e)),de(n,a,t,"border",ge(ie,e)),de(n,a,t,"borderStyle",ge(ae,e)),r=n,o=a,(i=t).alt===o.alt&&i.isDecorative===o.isDecorative||me(r,i.alt,i.isDecorative)},pe=function(e,t){var n=e.dom.styles.parse(t),r=U(n),o=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(o)},ve=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||$(t))?null:t},be=function(e,t){var n=e.dom,r=y(e.schema.getTextBlockElements(),(function(t,n){return!e.schema.isValidChild(n,"figure")})),o=n.getParent(t.parentNode,(function(e){return x(r,e.nodeName)}),e.getBody());return o?n.split(o,t):t},ye=function(e,t){var n=function(e,t){var n=document.createElement("img");if(he(e,u(u({},t),{caption:!1}),n),me(n,t.alt,t.isDecorative),t.caption){var r=W.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(W.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}((function(t){return pe(e,t)}),t);e.dom.setAttrib(n,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(n.outerHTML);var r,o=e.dom.select('*[data-mce-id="__mcenew"]')[0];e.dom.setAttrib(o,"data-mce-id",null),ue(o)?(r=be(e,o),e.selection.select(r)):e.selection.select(o)},xe=function(e,t){var n,r,o,i,a,u,c=ve(e);he((function(t){return pe(e,t)}),t,c),n=c,e.dom.setAttrib(n,"src",n.getAttribute("src")),ue(c.parentNode)?(r=c.parentNode,be(e,r),e.selection.select(c.parentNode)):(e.selection.select(c),o=e,i=t,u=function(){a.onload=a.onerror=null,o.selection&&(o.selection.select(a),o.nodeChanged())},(a=c).onload=function(){i.width||i.height||!L(o)||o.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),u()},a.onerror=u)},we=Object.prototype.hasOwnProperty,Ce=(i=function(e,t){return S(e)&&S(t)?Ce(e,t):t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var a in o)we.call(o,a)&&(n[a]=i(n[a],o[a]))}return n}),ke=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Se=tinymce.util.Tools.resolve("tinymce.util.Tools"),_e=function(e){return k(e.value)?e.value:""},Oe=function e(t,n){var r=[];return Se.each(t,(function(t){var o,i,a,u=k((o=t).text)?o.text:k(o.title)?o.title:"";void 0!==t.menu?(i=e(t.menu,n),r.push({text:u,items:i})):(a=n(t),r.push({text:u,value:a}))})),r},Ee=function(e){return void 0===e&&(e=_e),function(t){return t?h.from(t).map((function(t){return Oe(t,e)})):h.none()}},Te=function e(t,n){return function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return h.none()}(t,(function(t){return r=t,Object.prototype.hasOwnProperty.call(r,"items")?e(t.items,n):t.value===n?h.some(t):h.none();var r}))},ze=Ee,De=function(e){return Ee(_e)(e)},Ae=function(e,t){return e.bind((function(e){return Te(e,t)}))},Me=function(e){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},Re=function(e){var t,n,r=ze((function(t){return e.convertURL(t.value||t.url,"src")})),o=new H((function(t){var n,o;n=function(e){t(r(e).map((function(e){return A([[{text:"None",value:""}],e])})))},"string"==typeof(o=e.getParam("image_list",!1))?I.send({url:o,success:function(e){n(JSON.parse(e))}}):"function"==typeof o?o(n):n(o)})),i=De(e.getParam("image_class_list")),a=e.getParam("image_advtab",!1,"boolean"),u=e.getParam("image_uploadtab",!0,"boolean"),c=T(e.getParam("images_upload_url")),s=T(e.getParam("images_upload_handler")),l=(n=ve(t=e))?fe((function(e){return pe(t,e)}),n):se(),f=e.getParam("image_description",!0,"boolean"),d=e.getParam("image_title",!1,"boolean"),m=L(e),g=e.getParam("image_caption",!1,"boolean"),p=e.getParam("a11y_advanced_options",!1,"boolean"),v=e.getParam("automatic_uploads",!0,"boolean"),b=h.some(e.getParam("image_prepend_url","","string")).filter((function(e){return k(e)&&0<e.length}));return o.then((function(e){return{image:l,imageList:e,classList:i,hasAdvTab:a,hasUploadTab:u,hasUploadUrl:c,hasUploadHandler:s,hasDescription:f,hasImageTitle:d,hasDimensions:m,hasImageCaption:g,prependURL:b,hasAccessibilityOptions:p,automaticUploads:v}}))},Ne=function(e){var t=e.imageList.map((function(e){return{name:"images",type:"listbox",label:"Image list",items:e}})),n={name:"alt",type:"input",label:"Alternative description",disabled:e.hasAccessibilityOptions&&e.image.isDecorative},r=e.classList.map((function(e){return{name:"classes",type:"listbox",label:"Class",items:e}}));return A([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[n]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:A([r.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},Be=function(e){return{title:"General",name:"general",items:Ne(e)}},Pe=Ne,He=function(e){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},Ie=function(e){return{src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e["class"],caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}},Le=function(e,t){return{src:e.src.value,alt:0===e.alt.length&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}},Ve=function(e,t){var n,r,o=t.getData();n=e,r=o.src.value,(/^(?:[a-zA-Z]+:)?\/\//.test(r)?h.none():n.prependURL.bind((function(e){return r.substring(0,e.length)!==e?h.some(e+r):h.none()}))).each((function(e){t.setData({src:{value:e,meta:o.src.meta}})}))},Fe=function(e,t){var n,r,o,i,a=t.getData(),u=a.src.meta;void 0!==u&&(n=Ce({},a),o=n,i=u,(r=e).hasDescription&&k(i.alt)&&(o.alt=i.alt),r.hasAccessibilityOptions&&(o.isDecorative=i.isDecorative||o.isDecorative||!1),r.hasImageTitle&&k(i.title)&&(o.title=i.title),r.hasDimensions&&(k(i.width)&&(o.dimensions.width=i.width),k(i.height)&&(o.dimensions.height=i.height)),k(i["class"])&&Ae(r.classList,i["class"]).each((function(e){o.classes=e.value})),r.hasImageCaption&&E(i.caption)&&(o.caption=i.caption),r.hasAdvTab&&(k(i.style)&&(o.style=i.style),k(i.vspace)&&(o.vspace=i.vspace),k(i.border)&&(o.border=i.border),k(i.hspace)&&(o.hspace=i.hspace),k(i.borderstyle)&&(o.borderstyle=i.borderstyle)),t.setData(n))},je=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,g,h;Ve(t,r),Fe(t,r),o=e,i=t,a=n,c=(u=r).getData(),s=c.src.value,(l=c.src.meta||{}).width||l.height||!i.hasDimensions||(0<s.length?o.imageSize(s).then((function(e){a.open&&u.setData({dimensions:e})}))["catch"]((function(e){return console.error(e)})):u.setData({dimensions:{width:"",height:""}})),f=t,d=n,g=(m=r).getData(),h=Ae(f.imageList,g.src.value),d.prevImage=h,m.setData({images:h.map((function(e){return e.value})).getOr("")})},Ue=function(e,t,n){var r,o,i,a,u,c=U(e(n.style)),s=Ce({},n);return s.vspace=(r=c)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?F(String(r["margin-top"])):"",s.hspace=(o=c)["margin-right"]&&o["margin-left"]&&o["margin-right"]===o["margin-left"]?F(String(o["margin-right"])):"",s.border=(i=c)["border-width"]?F(String(i["border-width"])):"",s.borderstyle=(a=c)["border-style"]?String(a["border-style"]):"",s.style=(u=t)(e(u(c))),s},$e=function(e,t,n,r){var o=r.getData();r.block("Uploading image"),M(o.fileinput).fold((function(){r.unblock()}),(function(o){var i,a=URL.createObjectURL(o),u=function(){r.unblock(),URL.revokeObjectURL(a)},c=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),je(e,t,n,r)};i=o,new H((function(e,t){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(i)})).then((function(n){var i=e.createBlobCache(o,a,n);t.automaticUploads?e.uploadImage(i).then((function(e){c(e.url),u()}))["catch"]((function(t){u(),e.alertErr(t)})):(e.addToBlobCache(i),c(i.blobUri()),r.unblock())}))}))},We=function(e,t,n){return function(r,o){var i,a,u,c,s,l,f,d,m,g,h,p,v,b;"src"===o.name?je(e,t,n,r):"images"===o.name?(m=e,g=t,h=n,v=(p=r).getData(),(b=Ae(g.imageList,v.images)).each((function(e){""===v.alt||h.prevImage.map((function(e){return e.text===v.alt})).getOr(!1)?""===e.value?p.setData({src:e,alt:h.prevAlt}):p.setData({src:e,alt:e.text}):p.setData({src:e})})),h.prevImage=b,je(m,g,h,p)):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?(s=e,f=(l=r).getData(),d=Ue(s.parseStyle,s.serializeStyle,f),l.setData(d)):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?(i=e,a=r,u=Ce(Ie(t.image),a.getData()),c=le(i.normalizeCss,Le(u,!1)),a.setData({style:c})):"fileinput"===o.name?$e(e,t,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},qe=function(e){return function(t){var n,r,o,i={prevImage:Ae((n=t).imageList,n.image.src),prevAlt:n.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(o=t).hasAdvTab||o.hasUploadUrl||o.hasUploadHandler?{type:"tabpanel",tabs:A([[Be(o)],o.hasAdvTab?[Me(o)]:[],o.hasUploadTab&&(o.hasUploadUrl||o.hasUploadHandler)?[He(o)]:[]])}:{type:"panel",items:Pe(o)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ie(t.image),onSubmit:e.onSubmit(t),onChange:We(e,t,i),onClose:(r=i,function(){r.open=!1})}}},Ge=function(e){return function(t){return n=e.documentBaseURI.toAbsolute(t),new H((function(e){var t=document.createElement("img"),r=function(n){t.parentNode&&t.parentNode.removeChild(t),e(n)};t.onload=function(){var e={width:V(t.width,t.clientWidth),height:V(t.height,t.clientHeight)};r(H.resolve(e))},t.onerror=function(){r(H.reject("Failed to get image dimensions for: "+n))};var o=t.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(t),t.src=n})).then((function(e){return{width:String(e.width),height:String(e.height)}}));var n}},Xe=function(e){var t,n,r,o,i,a,u,c,s={onSubmit:function(e){return function(t){var n=Ce(Ie(e.image),t.getData());c.execCommand("mceUpdateImage",!1,Le(n,e.hasAccessibilityOptions)),c.editorUpload.uploadImagesAuto(),t.close()}},imageSize:Ge(c=e),addToBlobCache:function(e){u.editorUpload.blobCache.add(e)},createBlobCache:function(e,t,n){return a.editorUpload.blobCache.create({blob:e,blobUri:t,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:n.split(",")[1]})},alertErr:function(e){i.windowManager.alert(e)},normalizeCss:function(e){return pe(o,e)},parseStyle:function(e){return r.dom.parseStyle(e)},serializeStyle:function(e,t){return n.dom.serializeStyle(e,t)},uploadImage:(t=n=r=o=i=a=u=e,function(e){return ke(t).upload([e],!1).then((function(e){return 0===e.length?H.reject("Failed to upload image"):!1===e[0].status?H.reject(e[0].error.message):e[0]}))})};return{open:function(){Re(e).then(qe(s)).then(e.windowManager.open)}}},Ke=function(e){e.addCommand("mceImage",Xe(e).open),e.addCommand("mceUpdateImage",(function(t,n){e.undoManager.transact((function(){return r=n,void((l=ve(t=e))?(o=fe((function(e){return pe(t,e)}),l),(i=u(u({},o),r)).src?xe(t,i):(a=t,(c=l)&&(s=a.dom.is(c.parentNode,"figure.image")?c.parentNode:c,a.dom.remove(s),a.focus(),a.nodeChanged(),a.dom.isEmpty(a.getBody())&&(a.setContent(""),a.selection.setCursorLocation())))):r.src&&ye(t,u(u({},se()),r)));var t,r,o,i,a,c,s,l}))}))},Ye=function(e){return function(t){for(var n,r=t.length,o=function(t){t.attr("contenteditable",e?"true":null)};r--;){var i=t[r];(n=i.attr("class"))&&/\bimage\b/.test(n)&&(i.attr("contenteditable",e?"false":null),Se.each(i.getAll("figcaption"),o))}}};a.add("image",(function(e){var t,n;(t=e).on("PreInit",(function(){t.parser.addNodeFilter("figure",Ye(!0)),t.serializer.addNodeFilter("figure",Ye(!1))})),(n=e).ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Xe(n).open,onSetup:function(e){return n.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),n.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Xe(n).open}),n.ui.registry.addContextMenu("image",{update:function(e){return ue(e)||"IMG"===e.nodeName&&!$(e)?["image"]:[]}}),Ke(e)}))}()},"3cac":function(e,t,n){"use strict";n("724c")},"419a":function(e,t,n){n("4d63"),n("ac1f"),n("25f0"),n("a15b"),n("fb6a"),n("5319"),n("1276"),function(){"use strict";var e,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e},r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o="[-'\\.‘’․﹒＇．]",i="[:··״‧︓﹕：]",a="[±+*/,;;։،؍٬߸⁄︐︔﹐﹔，；]",u="[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",c="\\r",s="\\n",l="[\v\f\u2028\u2029]",f="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︦ﾞﾟ]",d="[­؀-؃۝܏឴឵‎‏‪-‮⁠-⁤⁪-⁯\ufeff￹-￻]",m="[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ｦ-ﾝ]",g="[=_‿⁀⁔︳︴﹍-﹏＿∀-⋿<>]",h="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫！-＃％-＊，-／：；？＠［-］＿｛｝｟-･]",p=0,v=1,b=2,y=3,x=4,w=5,C=6,k=7,S=8,_=9,O=10,E=11,T=12,z=13,D=[new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚﾠ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),new RegExp(o),new RegExp(i),new RegExp(a),new RegExp(u),new RegExp(c),new RegExp(s),new RegExp(l),new RegExp(f),new RegExp(d),new RegExp(m),new RegExp(g),new RegExp("@")],A=new RegExp("^"+h+"$"),M=D,R=z,N=function(e){for(var t=R,n=M.length,r=0;r<n;++r){var o=M[r];if(o&&o.test(e)){t=r;break}}return t},B=function(e){var t,n;return function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}(e,(t=N,n={},function(e){if(n[e])return n[e];var r=t(e);return n[e]=r}))},P=/^\s+$/,H=A,I=function(e,t){var n=function(e,t){for(var n=t;n<e.length&&!P.test(e[n]);n++);return n}(e,t+1);return"://"===e.slice(t+1,n).join("").substr(0,3)?n:t},L=function(e,t,n,r){for(var o,i,a,u,c,s,l,f=[],d=[],m=0;m<n.length;++m)d.push(e[m]),function(e,t){var n=e[t],r=e[t+1];if(t<0||t>e.length-1&&0!==t)return!1;if(n===p&&r===p)return!1;var o=e[t+2];if(n===p&&(r===b||r===v||r===T)&&o===p)return!1;var i=e[t-1];return(n!==b&&n!==v&&r!==T||r!==p||i!==p)&&(n!==x&&n!==p||r!==x&&r!==p)&&(n!==y&&n!==v||r!==x||i!==x)&&(n!==x||r!==y&&r!==v||o!==x)&&n!==S&&n!==_&&i!==S&&i!==_&&r!==S&&r!==_&&(n!==w||r!==C)&&(n===k||n===w||n===C||r===k||r===w||r===C||(n!==O||r!==O)&&(r!==E||n!==p&&n!==x&&n!==O&&n!==E)&&(n!==E||r!==p&&r!==x&&r!==O)&&n!==T)}(n,m)&&(o=t[m],!r.includeWhitespace&&P.test(o)||!r.includePunctuation&&H.test(o)||(i=m-d.length+1,a=m+1,u=t.slice(i,a).join(""),"http"!==(l=u)&&"https"!==l||(c=I(t,m),s=e.slice(a,c),Array.prototype.push.apply(d,s),m=c),f.push(d)),d=[]);return f},V=function(e,t,n){n=r(r({},{includeWhitespace:!1,includePunctuation:!1}),n);for(var o=[],i=[],a=0;a<e.length;a++){var u=t(e[a]);"\ufeff"!==u&&(o.push(e[a]),i.push(u))}var c=B(i);return L(o,i,c,n)},F=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),j=function(e,t){for(var n,r=t.getBlockElements(),o=t.getShortEndedElements(),i=[],a="",u=new F(e,e);e=u.next();)3===e.nodeType?a+=e.data.replace(/\uFEFF/g,""):(r[(n=e).nodeName]||o[n.nodeName])&&a.length&&(i.push(a),a="");return a.length&&i.push(a),i},U=function(e){return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},$=function(e,t){var r=j(e,t).join("\n");return V(r.split(""),n).length},W=function(e,t){var n=j(e,t).join("");return U(n)},q=function(e,t){var n=j(e,t).join("").replace(/\s/g,"");return U(n)},G=function(e,t){return function(){return t(e.getBody(),e.schema)}},X=function(e,t){return function(){return t(e.selection.getRng().cloneContents(),e.schema)}},K=function(e){return G(e,$)},Y=tinymce.util.Tools.resolve("tinymce.util.Delay"),J=function(e,t){var n;n=t,e.fire("wordCountUpdate",{wordCount:{words:n.body.getWordCount(),characters:n.body.getCharacterCount(),charactersWithoutSpaces:n.body.getCharacterCountWithoutSpaces()}})},Q=function(e,t){e.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(t.body.getWordCount()),String(t.selection.getWordCount())],["Characters (no spaces)",String(t.body.getCharacterCountWithoutSpaces()),String(t.selection.getCharacterCountWithoutSpaces())],["Characters",String(t.body.getCharacterCount()),String(t.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})};void 0===e&&(e=300),t.add("wordcount",(function(t){var n,r,o,i,a,u,c,s={body:{getWordCount:K(n=t),getCharacterCount:G(n,W),getCharacterCountWithoutSpaces:G(n,q)},selection:{getWordCount:X(n,$),getCharacterCount:X(n,W),getCharacterCountWithoutSpaces:X(n,q)},getCount:K(n)};return o=s,(r=t).ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return Q(r,o)}}),r.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return Q(r,o)}}),i=t,a=s,u=e,c=Y.debounce((function(){return J(i,a)}),u),i.on("init",(function(){J(i,a),Y.setEditorTimeout(i,(function(){i.on("SetContent BeforeAddUndo Undo Redo keyup",c)}),0)})),s}))}()},4678:function(e,t,n){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id="4678"},5317:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){var r=function(e){var r="",o=e.dom.encode,i=e.getParam("content_style","","string");r+='<base href="'+o(e.documentBaseURI.getURI())+'">';var a=e.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";n.each(e.contentCSS,(function(t){r+='<link type="text/css" rel="stylesheet" href="'+o(e.documentBaseURI.toAbsolute(t))+'"'+a+">"})),i&&(r+='<style type="text/css">'+i+"</style>");var u,c,s,l,f,d,m,g=-1===(l=(u=e).getParam("body_id","tinymce","string")).indexOf("=")?l:(s=(c=u).getParam("body_id","","hash"))[c.id]||s,h=-1===(m=(f=e).getParam("body_class","","string")).indexOf("=")?m:(d=f).getParam("body_class","","hash")[d.id]||"",p='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(t.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",v=e.getBody().dir,b=v?' dir="'+o(v)+'"':"";return"<!DOCTYPE html><html><head>"+r+'</head><body id="'+o(g)+'" class="mce-content-body '+o(h)+'"'+b+">"+e.getContent()+p+"</body></html>"}(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:r}}).focus("close")};e.add("preview",(function(e){var t,n;(t=e).addCommand("mcePreview",(function(){r(t)})),(n=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return n.execCommand("mcePreview")}}),n.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return n.execCommand("mcePreview")}})}))}()},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=n("2b0e"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-config-provider",{attrs:{locale:e.locale}},[n("div",{attrs:{id:"app"}},[n("router-view")],1)])},i=[],a=n("677e"),u=n.n(a),c={data:function(){return{locale:u.a}}},s=c,l=n("2877"),f=Object(l["a"])(s,o,i,!1,null,null,null),d=f.exports,m=n("8c4f"),g=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container"},[n("div",{staticClass:"loginBox"},[n("a-form-model",{ref:"loginFormRef",staticClass:"loginForm",attrs:{rules:e.rules,model:e.formdata}},[n("a-form-model-item",{attrs:{prop:"username"}},[n("a-input",{attrs:{placeholder:"请输入用户名"},model:{value:e.formdata.username,callback:function(t){e.$set(e.formdata,"username",t)},expression:"formdata.username"}},[n("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),n("a-form-model-item",{attrs:{prop:"password"}},[n("a-input",{attrs:{placeholder:"请输入密码",type:"password"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login(t)}},model:{value:e.formdata.password,callback:function(t){e.$set(e.formdata,"password",t)},expression:"formdata.password"}},[n("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),n("a-form-model-item",{staticClass:"loginBtn"},[n("a-button",{staticStyle:{margin:"10px"},attrs:{type:"primary"},on:{click:e.login}},[e._v("登录")]),n("a-button",{staticStyle:{margin:"10px"},attrs:{type:"info"},on:{click:e.resetForm}},[e._v("取消")])],1)],1)],1)])},h=[],p=n("1da1"),v=(n("96cf"),{data:function(){return{formdata:{username:"",password:""},rules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:4,max:12,message:"用户名必须在4到12个字符之间",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:20,message:"密码必须在6到20个字符之间",trigger:"blur"}]}}},methods:{resetForm:function(){this.$refs.loginFormRef.resetFields()},login:function(){var e=this;this.$refs.loginFormRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("输入非法数据，请重新输入"));case 2:return t.next=4,e.$http.post("login",e.formdata);case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:window.sessionStorage.setItem("token",o.token),e.$router.push("/index");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}}),b=v,y=(n("c085"),Object(l["a"])(b,g,h,!1,null,"47292248",null)),x=y.exports,w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout",{staticClass:"container"},[n("Nav"),n("a-layout",[n("a-layout-header",{staticClass:"headerBtn"},[n("Header")],1),n("a-layout-content",[n("router-view",{key:e.$route.fullPath})],1),n("a-layout-footer",[n("Footer")],1)],1)],1)},C=[],k=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout-sider",{attrs:{breakpoint:"lg"},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[n("div",{staticClass:"log"},[n("span",[e._v(e._s(e.collapsed?"Blog":"My Blog"))])]),n("a-menu",{attrs:{theme:"dark",mode:"inline"},on:{click:e.goToPage}},[n("a-menu-item",{key:"index"},[n("a-icon",{attrs:{type:"dashboard"}}),n("span",[e._v("仪表盘")])],1),n("a-sub-menu",[n("span",{attrs:{slot:"title"},slot:"title"},[n("a-icon",{attrs:{type:"file"}}),n("span",[e._v("文章管理")])],1),n("a-menu-item",{key:"addart"},[n("a-icon",{attrs:{type:"form"}}),n("span",[e._v("写文章")])],1),n("a-menu-item",{key:"artlist"},[n("a-icon",{attrs:{type:"snippets"}}),n("span",[e._v("文章列表")])],1)],1),n("a-menu-item",{key:"catelist"},[n("a-icon",{attrs:{type:"book"}}),n("span",[e._v("分类列表")])],1),n("a-menu-item",{key:"userlist"},[n("a-icon",{attrs:{type:"user"}}),n("span",[e._v("用户列表")])],1)],1)],1)},S=[],_={data:function(){return{collapsed:!1}},methods:{goToPage:function(e){this.$router.push("/"+e.key).catch((function(e){return e}))}}},O=_,E=(n("bbf9"),Object(l["a"])(O,k,S,!1,null,"16e2596d",null)),T=E.exports,z=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},D=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"footer"},[n("span",[e._v("---- TeweweBlog Admin ----")])])}],A=(n("bc8f"),{}),M=Object(l["a"])(A,z,D,!1,null,"221617e8",null),R=M.exports,N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-button",{attrs:{type:"danger"},on:{click:e.loginOut}},[e._v("退出")])},B=[],P={methods:{loginOut:function(){window.sessionStorage.clear("token"),this.$router.push("/login")}}},H=P,I=Object(l["a"])(H,N,B,!1,null,null,null),L=I.exports,V={components:{Nav:T,Footer:R,Header:L}},F=V,j=(n("6fa9"),Object(l["a"])(F,w,C,!1,null,"31016e4e",null)),U=j.exports,$=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},W=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",[e._v("欢迎来到TEWEWEBLOG后台管理页面")])])}],q={},G=Object(l["a"])(q,$,W,!1,null,null,null),X=G.exports,K=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a-card",[n("h3",[e._v(e._s(e.id?"编辑文章":"新增文章"))]),n("a-form-model",{ref:"artInfoRef",attrs:{model:e.artInfo,rules:e.artInfoRules,hideRequiredMark:!0}},[n("a-form-model-item",{attrs:{label:"文章标题",prop:"title"}},[n("a-input",{staticStyle:{width:"300px"},model:{value:e.artInfo.title,callback:function(t){e.$set(e.artInfo,"title",t)},expression:"artInfo.title"}})],1),n("a-form-model-item",{attrs:{label:"文章分类",prop:"cid"}},[n("a-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择分类"},on:{change:e.cateChange},model:{value:e.artInfo.cid,callback:function(t){e.$set(e.artInfo,"cid",t)},expression:"artInfo.cid"}},e._l(e.Catelist,(function(t){return n("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),n("a-form-model-item",{attrs:{label:"文章描述",prop:"desc"}},[n("a-input",{attrs:{type:"textarea"},model:{value:e.artInfo.desc,callback:function(t){e.$set(e.artInfo,"desc",t)},expression:"artInfo.desc"}})],1),n("a-form-model-item",{attrs:{label:"文章缩略图",prop:"img"}},[n("a-upload",{attrs:{defaultFileList:e.fileList,listType:"picture",name:"file",action:e.upUrl,headers:e.headers},on:{change:e.upChange}},[n("a-button",[n("a-icon",{attrs:{type:"upload"}}),e._v("点击上传 ")],1),n("br"),e.id?[n("img",{staticStyle:{width:"120px",height:"100px","margin-left":"15px"},attrs:{src:e.artInfo.img}})]:e._e()],2)],1),n("a-form-model-item",{attrs:{label:"文章内容",prop:"content"}},[n("Editor",{model:{value:e.artInfo.content,callback:function(t){e.$set(e.artInfo,"content",t)},expression:"artInfo.content"}})],1),n("a-form-model-item",[n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"danger"},on:{click:function(t){return e.artOk(e.artInfo.id)}}},[e._v(" "+e._s(e.artInfo.id?"更新":"提交"))]),n("a-button",{attrs:{type:"primary"},on:{click:e.addCancel}},[e._v("取消")])],1)],1)],1)],1)},Y=[],J=n("bc3a"),Q=n.n(J),Z="http://localhost:3000/api/v1";Q.a.defaults.baseURL=Z,Q.a.interceptors.request.use((function(e){return e.headers.Authorization="Bearer ".concat(window.sessionStorage.getItem("token")),e})),r["a"].prototype.$http=Q.a;var ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Editor",{attrs:{init:e.init},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}})],1)},te=[],ne=(n("b0c0"),n("ca72")),re=(n("d141"),n("6032"),n("b1be"),n("cb1b"),n("5317"),n("8e05"),n("419a"),n("cfe8"),n("3325"),{components:{Editor:ne["a"]},props:{value:{type:String,default:""}},data:function(){var e=this;return{init:{language:"zh_CN",height:"500px",margin:"0",padding:"0",plugins:"preview paste wordcount code image",branding:!1,toolbar:["undo redo | styleselect |fontsizeselect| bold italic underline strikethrough |alignleft aligncenter alignright alignjustify |blockquote removeformat |numlist bullist table","preview paste code |image"],images_upload_handler:function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n,r,o){var i,a,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=new FormData,i.append("file",n.blob(),n.name()),t.next=4,e.$http.post("upload",i);case 4:a=t.sent,u=a.data,r(u.url),o(e.$message.error("上传图片失败"));case 8:case"end":return t.stop()}}),t)})));function n(e,n,r){return t.apply(this,arguments)}return n}()},content:this.value}},watch:{value:function(e){this.content=e},content:function(e){this.$emit("input",e)}}}),oe=re,ie=(n("3cac"),Object(l["a"])(oe,ee,te,!1,null,null,null)),ae=ie.exports,ue={components:{Editor:ae},props:["id"],data:function(){return{artInfo:{id:0,title:"",cid:void 0,desc:"",content:"",img:""},Catelist:[],upUrl:Z+"/upload",headers:{},fileList:[],artInfoRules:{title:[{required:!0,message:"请输入文章标题",trigger:"blur"}],cid:[{required:!0,message:"请选择文章分类",trigger:"change"}],desc:[{required:!0,message:"请输入文章描述",trigger:"blur"},{max:120,message:"描述最多可写120个字符",trigger:"change"}],img:[{required:!0,message:"请选择文章缩略图",trigger:"blur"}],content:[{required:!0,message:"请输入文章内容",trigger:"blur"}]}}},created:function(){this.getCateList(),this.headers={Authorization:"Bearer ".concat(window.sessionStorage.getItem("token"))},this.id&&this.getArtInfo(this.id)},methods:{getArtInfo:function(e){var t=this;return Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$http.get("article/singleart/".concat(e));case 2:r=n.sent,o=r.data,200!==o.status&&t.$message.error(o.message),t.artInfo=o.data,t.artInfo.id=o.data.ID;case 7:case"end":return n.stop()}}),n)})))()},getCateList:function(){var e=this;return Object(p["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("category");case 2:if(n=t.sent,r=n.data,200===r.status){t.next=6;break}return t.abrupt("return",e.$message.error(r.message));case 6:e.Catelist=r.data;case 7:case"end":return t.stop()}}),t)})))()},cateChange:function(e){this.artInfo.cid=e},upChange:function(e){if(e.file.status,"done"===e.file.status){this.$message.success("图片上传成功");var t=e.file.response.url;this.artInfo.img=t}else"error"===e.file.status&&this.$message.error("图片上传失败")},artOk:function(e){var t=this;this.$refs.artInfoRef.validate(function(){var n=Object(p["a"])(regeneratorRuntime.mark((function n(r){var o,i,a,u;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(0!==e){n.next=11;break}return n.next=3,t.$http.post("article/add",t.artInfo);case 3:if(o=n.sent,i=o.data,200===i.status){n.next=7;break}return n.abrupt("return",t.$message.error(i.message));case 7:t.$router.push("/artlist"),t.$message.success("添加文章成功"),n.next=19;break;case 11:return n.next=13,t.$http.put("article/".concat(e),t.artInfo);case 13:if(a=n.sent,u=a.data,200===u.status){n.next=17;break}return n.abrupt("return",t.$message.error(u.message));case 17:t.$router.push("/artlist"),t.$message.success("更新文章成功");case 19:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},addCancel:function(){this.$refs.artInfoRef.resetFields()}}},ce=ue,se=Object(l["a"])(ce,K,Y,!1,null,null,null),le=se.exports,fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",[e._v("文章列表页面")]),n("a-card",[n("a-row",{attrs:{gutter:20}},[n("a-col",{attrs:{span:6}},[n("a-input-search",{attrs:{placeholder:"输入文章名查找","enter-button":"",allowClear:""},on:{search:e.getArtList},model:{value:e.queryParam.title,callback:function(t){e.$set(e.queryParam,"title",t)},expression:"queryParam.title"}})],1),n("a-col",{attrs:{span:4}},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.$router.push("/addart")}}},[e._v("新增")])],1),n("a-col",{attrs:{span:4,offset:4}},[n("a-select",{staticStyle:{width:"200px"},attrs:{defaultvalue:"请选择分类"},on:{change:e.CateChange}},e._l(e.Catelist,(function(t){return n("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1),n("a-col",{attrs:{span:1}},[n("a-button",{attrs:{type:"info"},on:{click:function(t){return e.getArtList()}}},[e._v("显示全部")])],1)],1),n("a-table",{attrs:{rowKey:"ID",columns:e.columns,pagination:e.paginationOption,dataSource:e.Artlist,bordered:""},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"img",fn:function(e){return n("span",{staticClass:"ArtImg"},[n("img",{attrs:{src:e}})])}},{key:"action",fn:function(t){return[n("div",{staticClass:"actionSlot"},[n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{size:"small",type:"primary",icon:"edit"},on:{click:function(n){return e.$router.push("/addart/"+t.ID)}}},[e._v("编辑")]),n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{size:"small",type:"danger",icon:"delete"},on:{click:function(n){return e.deleteArt(t.ID)}}},[e._v("删除")])],1)]}}])})],1)],1)},de=[],me=n("5530"),ge=[{title:"ID",dataIndex:"ID",width:"5%",key:"id",align:"center"},{title:"分类",dataIndex:"Category.name",width:"5%",key:"name",align:"center"},{title:"文章标题",dataIndex:"title",width:"15%",key:"title",align:"center"},{title:"文章描述",dataIndex:"desc",width:"20%",key:"desc",align:"center"},{title:"缩略图",dataIndex:"img",width:"20%",key:"img",align:"center",scopedSlots:{customRender:"img"}},{title:"操作",width:"15%",key:"action",align:"center",scopedSlots:{customRender:"action"}}],he={data:function(){return{paginationOption:{pageSizeOptions:["5","10","20"],pageSize:5,total:0,showSizeChanger:!0,showTotal:function(e){return"共".concat(e,"条")}},Artlist:[],Catelist:[],columns:ge,queryParam:{title:"",pagesize:5,pagenum:1}}},created:function(){this.getArtList(),this.getCateList()},methods:{getArtList:function(){var e=this;return Object(p["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("article");case 2:if(n=t.sent,r=n.data,200===r.status){t.next=6;break}return t.abrupt("return",e.$message.error(r.message));case 6:e.Artlist=r.data,e.paginationOption.total=r.total;case 8:case"end":return t.stop()}}),t)})))()},getCateList:function(){var e=this;return Object(p["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("category",{params:{pagesize:e.queryParam.pagesize,pagenum:e.queryParam.pagenum}});case 2:if(n=t.sent,r=n.data,200===r.status){t.next=6;break}return t.abrupt("return",e.$message.error(r.message));case 6:e.Catelist=r.data,e.paginationOption.total=r.total;case 8:case"end":return t.stop()}}),t)})))()},handleTableChange:function(e,t,n){var r=Object(me["a"])({},this.pagination);r.current=e.current,r.pageSize=e.pageSize,this.queryParam.pagesize=e.pageSize,this.queryParam.pagenum=e.current,e.pageSize!==this.pagination.pageSize&&(this.queryParam.pagenum=1,r.current=1),this.pagination=r,this.getArtList()},deleteArt:function(e){var t=this;this.$confirm({title:"确定要删除该文章吗？",content:"一旦删除，无法恢复",onOk:function(){var n=Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$http.delete("article/".concat(e));case 2:if(r=n.sent,o=r.data,200===o.status){n.next=6;break}return n.abrupt("return",t.$message.error(o.message));case 6:t.$message.success("删除成功"),t.getArtList();case 8:case"end":return n.stop()}}),n)})));function r(){return n.apply(this,arguments)}return r}(),onCancel:function(){t.$message.info("已取消删除")}})},CateChange:function(e){this.getCateArt(e)},getCateArt:function(e){var t=this;return Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$http.get("article/catartlist/".concat(e));case 2:if(r=n.sent,o=r.data,200===o.status){n.next=6;break}return n.abrupt("return",t.$message.error(o.message));case 6:t.Artlist=o.data,t.pagination.total=o.total;case 8:case"end":return n.stop()}}),n)})))()}}},pe=he,ve=(n("d78f"),Object(l["a"])(pe,fe,de,!1,null,"1fdaa77d",null)),be=ve.exports,ye=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",[e._v("分类列表页面")]),n("a-card",[n("a-row",{attrs:{gutter:20}},[n("a-col",{attrs:{span:4}},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){e.addCateVisible=!0}}},[e._v("新增分类")])],1)],1),n("a-table",{attrs:{rowKey:"id",columns:e.columns,pagination:e.paginationOption,dataSource:e.Catelist,bordered:""},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"action",fn:function(t){return[n("div",{staticClass:"actionSlot"},[n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary",icon:"edit"},on:{click:function(n){return e.editCate(t.id)}}},[e._v("编辑")]),n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"danger",icon:"delete"},on:{click:function(n){return e.deleteCate(t.id)}}},[e._v("删除")])],1)]}}])})],1),n("a-modal",{attrs:{closable:"",title:"新增分类",visible:e.addCateVisible,width:"60%",destroyOnClose:""},on:{ok:e.addCateOk,cancel:e.addCateCancel}},[n("a-form-model",{ref:"addCateRef",attrs:{model:e.newCate,rules:e.addCateRules}},[n("a-form-model-item",{attrs:{label:"分类名称",prop:"name"}},[n("a-input",{model:{value:e.newCate.name,callback:function(t){e.$set(e.newCate,"name",t)},expression:"newCate.name"}})],1)],1)],1),n("a-modal",{attrs:{closable:"",destroyOnClose:"",title:"编辑分类",visible:e.editCateVisible,width:"60%"},on:{ok:e.editCateOk,cancel:e.editCateCancel}},[n("a-form-model",{ref:"addCateRef",attrs:{model:e.CateInfo,rules:e.CateRules}},[n("a-form-model-item",{attrs:{label:"分类名称",prop:"name"}},[n("a-input",{model:{value:e.CateInfo.name,callback:function(t){e.$set(e.CateInfo,"name",t)},expression:"CateInfo.name"}})],1)],1)],1)],1)},xe=[],we=[{title:"ID",dataIndex:"id",width:"10%",key:"id",align:"center"},{title:"分类名",dataIndex:"name",width:"20%",key:"name",align:"center"},{title:"操作",width:"30%",key:"action",align:"center",scopedSlots:{customRender:"action"}}],Ce={data:function(){var e=this;return{paginationOption:{pageSizeOptions:["5","10","20"],pageSize:5,total:0,showSizeChanger:!0,showTotal:function(e){return"共".concat(e,"条")}},Catelist:[],columns:we,queryParam:{pagesize:5,pagenum:1},CateInfo:{name:"",id:0},newCate:{name:""},visible:!1,addCateVisible:!1,editCateVisible:!1,CateRules:{name:[{validator:function(t,n,r){""===e.CateInfo.name?r(new Error("请输入分类名")):r()},trigger:"blur"}]},addCateRules:{name:[{validator:function(t,n,r){""===e.newCate.name?r(new Error("请输入分类名")):r()},trigger:"blur"}]}}},created:function(){this.getCateList()},methods:{getCateList:function(){var e=this;return Object(p["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("category",{params:{pagesize:e.queryParam.pagesize,pagenum:e.queryParam.pagenum}});case 2:if(n=t.sent,r=n.data,200===r.status){t.next=6;break}return t.abrupt("return",e.$message.error(r.message));case 6:e.Catelist=r.data,e.paginationOption.total=r.total;case 8:case"end":return t.stop()}}),t)})))()},handleTableChange:function(e,t,n){var r=Object(me["a"])({},this.pagination);r.current=e.current,r.pageSize=e.pageSize,this.queryParam.pagesize=e.pageSize,this.queryParam.pagenum=e.current,e.pageSize!==this.pagination.pageSize&&(this.queryParam.pagenum=1,r.current=1),this.pagination=r,this.getCateList()},deleteCate:function(e){var t=this;this.$confirm({title:"确定要删除该分类吗？",content:"一旦删除，无法恢复",onOk:function(){var n=Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$http.delete("category/".concat(e));case 2:if(r=n.sent,o=r.data,200===o.status){n.next=6;break}return n.abrupt("return",t.$message.error(o.message));case 6:t.$message.success("删除成功"),t.getCateList();case 8:case"end":return n.stop()}}),n)})));function r(){return n.apply(this,arguments)}return r}(),onCancel:function(){t.$message.info("已取消删除")}})},addCateOk:function(){var e=this;this.$refs.addCateRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("参数不符合要求，请重新输入"));case 2:return t.next=4,e.$http.post("category/add",{name:e.newCate.name});case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:return e.addCateVisible=!1,e.$message.success("添加分类成功"),t.next=12,e.getCateList();case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},addCateCancel:function(){this.$refs.addCateRef.resetFields(),this.addCateVisible=!1,this.$message.info("新增分类已取消")},editCate:function(e){var t=this;return Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.editCateVisible=!0,n.next=3,t.$http.get("category/".concat(e));case 3:r=n.sent,o=r.data,t.CateInfo=o.data,t.CateInfo.id=e;case 7:case"end":return n.stop()}}),n)})))()},editCateOk:function(){var e=this;this.$refs.addCateRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("参数不符合要求，请重新输入"));case 2:return t.next=4,e.$http.put("category/".concat(e.CateInfo.id),{name:e.CateInfo.name});case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:e.editCateVisible=!1,e.$message.success("更新分类信息成功"),e.getCateList();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},editCateCancel:function(){this.$refs.addCateRef.resetFields(),this.editCateVisible=!1,this.$message.info("编辑已取消")}}},ke=Ce,Se=(n("9df4"),Object(l["a"])(ke,ye,xe,!1,null,"59bca0a7",null)),_e=Se.exports,Oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",[e._v("用户列表页面")]),n("a-card",[n("a-row",{attrs:{gutter:20}},[n("a-col",{attrs:{span:6}},[n("a-input-search",{attrs:{placeholder:"输入用户名查找","enter-button":"",allowClear:""},on:{search:e.getUserList},model:{value:e.queryParam.username,callback:function(t){e.$set(e.queryParam,"username",t)},expression:"queryParam.username"}})],1),n("a-col",{attrs:{span:4}},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){e.addUserVisible=!0}}},[e._v("新增")])],1)],1),n("a-table",{attrs:{rowKey:"ID",columns:e.columns,pagination:e.paginationOption,dataSource:e.userlist,bordered:""},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"role",fn:function(t){return n("span",{},[e._v(e._s(1==t?"管理员":"订阅者"))])}},{key:"action",fn:function(t){return[n("div",{staticClass:"actionSlot"},[n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary",icon:"edit"},on:{click:function(n){return e.editUser(t.ID)}}},[e._v("编辑")]),n("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"danger",icon:"delete"},on:{click:function(n){return e.deleteUser(t.ID)}}},[e._v("删除")]),n("a-button",{attrs:{type:"info",icon:"info"},on:{click:function(n){return e.ChangePassword(t.ID)}}},[e._v("修改密码")])],1)]}}])})],1),n("a-modal",{attrs:{closable:"",title:"新增用户",visible:e.addUserVisible,width:"60%",destroyOnClose:""},on:{ok:e.addUserOk,cancel:e.addUserCancel}},[n("a-form-model",{ref:"addUserRef",attrs:{model:e.newUser,rules:e.addUserRules}},[n("a-form-model-item",{attrs:{label:"用户名",prop:"username"}},[n("a-input",{model:{value:e.newUser.username,callback:function(t){e.$set(e.newUser,"username",t)},expression:"newUser.username"}})],1),n("a-form-model-item",{attrs:{"has-feedback":"",label:"密码",prop:"password"}},[n("a-input-password",{model:{value:e.newUser.password,callback:function(t){e.$set(e.newUser,"password",t)},expression:"newUser.password"}})],1),n("a-form-model-item",{attrs:{"has-feedback":"",label:"确认密码",prop:"checkpass"}},[n("a-input-password",{model:{value:e.newUser.checkpass,callback:function(t){e.$set(e.newUser,"checkpass",t)},expression:"newUser.checkpass"}})],1)],1)],1),n("a-modal",{attrs:{closable:"",destroyOnClose:"",title:"编辑用户",visible:e.editUserVisible,width:"60%"},on:{ok:e.editUserOk,cancel:e.editUserCancel}},[n("a-form-model",{ref:"addUserRef",attrs:{model:e.userInfo,rules:e.userRules}},[n("a-form-model-item",{attrs:{label:"用户名",prop:"username"}},[n("a-input",{model:{value:e.userInfo.username,callback:function(t){e.$set(e.userInfo,"username",t)},expression:"userInfo.username"}})],1),n("a-form-model-item",{attrs:{label:"是否为管理员",prop:"role"}},[n("a-switch",{attrs:{"checked-children":"是","un-checked-children":"否"},on:{change:e.adminChange}})],1)],1)],1),n("a-modal",{attrs:{closable:"",title:"修改密码",visible:e.changePasswordVisible,width:"60%",destroyOnClose:""},on:{ok:e.changePasswordOk,cancel:e.changePasswordCancel}},[n("a-form-model",{ref:"changePasswordRef",attrs:{model:e.changePassword,rules:e.changePasswordRules}},[n("a-form-model-item",{attrs:{"has-feedback":"",label:"密码",prop:"password"}},[n("a-input-password",{model:{value:e.changePassword.password,callback:function(t){e.$set(e.changePassword,"password",t)},expression:"changePassword.password"}})],1),n("a-form-model-item",{attrs:{"has-feedback":"",label:"确认密码",prop:"checkpass"}},[n("a-input-password",{model:{value:e.changePassword.checkpass,callback:function(t){e.$set(e.changePassword,"checkpass",t)},expression:"changePassword.checkpass"}})],1)],1)],1)],1)},Ee=[],Te=n("2909"),ze=[{title:"ID",dataIndex:"ID",width:"10%",key:"id",align:"center"},{title:"用户名",dataIndex:"username",width:"20%",key:"username",align:"center"},{title:"角色",dataIndex:"role",width:"20%",key:"role",align:"center",scopedSlots:{customRender:"role"}},{title:"操作",width:"30%",key:"action",align:"center",scopedSlots:{customRender:"action"}}],De={data:function(){var e=this;return{paginationOption:{pageSizeOptions:["5","10","20"],pageSize:5,total:0,showSizeChanger:!0,showTotal:function(e){return"共".concat(e,"条")}},userlist:[],columns:ze,queryParam:{username:"",pagesize:5,pagenum:1},userInfo:{username:"",password:"",checkPass:"",role:2},newUser:{username:"",password:"",checkPass:"",role:2},changePassword:{id:0,password:"",checkPass:""},visible:!1,addUserVisible:!1,editUserVisible:!1,userRules:{username:[{validator:function(t,n,r){""===e.userInfo.username&&r(new Error("请输入用户名")),Object(Te["a"])(e.userInfo.username).length<4||Object(Te["a"])(e.userInfo.username).length>12?r(new Error("用户名应当在4到12个字符之间")):r()},trigger:"blur"}],password:[{validator:function(t,n,r){""===e.userInfo.password&&r(new Error("请输入密码")),Object(Te["a"])(e.userInfo.password).length<6||Object(Te["a"])(e.userInfo.password).length>20?r(new Error("密码应当在6到20位之间")):r()},trigger:"blur"}],checkpass:[{validator:function(t,n,r){""===e.userInfo.checkpass&&r(new Error("请输入密码")),e.userInfo.password!==e.userInfo.checkpass?r(new Error("密码不一致，请重新输入")):r()},trigger:"blur"}]},addUserRules:{username:[{validator:function(t,n,r){""===e.newUser.username&&r(new Error("请输入用户名")),Object(Te["a"])(e.newUser.username).length<4||Object(Te["a"])(e.newUser.username).length>12?r(new Error("用户名应当在4到12个字符之间")):r()},trigger:"blur"}],password:[{validator:function(t,n,r){""===e.newUser.password&&r(new Error("请输入密码")),Object(Te["a"])(e.newUser.password).length<6||Object(Te["a"])(e.newUser.password).length>20?r(new Error("密码应当在6到20位之间")):r()},trigger:"blur"}],checkpass:[{validator:function(t,n,r){""===e.newUser.checkpass&&r(new Error("请输入密码")),e.newUser.password!==e.newUser.checkpass?r(new Error("密码不一致，请重新输入")):r()},trigger:"blur"}]},changePasswordRules:{password:[{validator:function(t,n,r){""===e.changePassword.password&&r(new Error("请输入密码")),Object(Te["a"])(e.changePassword.password).length<6||Object(Te["a"])(e.changePassword.password).length>20?r(new Error("密码应当在6到20位之间")):r()},trigger:"blur"}],checkpass:[{validator:function(t,n,r){""===e.changePassword.checkpass&&r(new Error("请输入密码")),e.changePassword.password!==e.changePassword.checkpass?r(new Error("密码不一致，请重新输入")):r()},trigger:"blur"}]},changePasswordVisible:!1}},created:function(){this.getUserList()},methods:{getUserList:function(){var e=this;return Object(p["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$http.get("users",{params:{username:e.queryParam.username,pagesize:e.queryParam.pagesize,pagenum:e.queryParam.pagenum}});case 2:if(n=t.sent,r=n.data,200===r.status){t.next=6;break}return t.abrupt("return",e.$message.error(r.message));case 6:e.userlist=r.data,e.paginationOption.total=r.total;case 8:case"end":return t.stop()}}),t)})))()},handleTableChange:function(e,t,n){var r=Object(me["a"])({},this.pagination);r.current=e.current,r.pageSize=e.pageSize,this.queryParam.pagesize=e.pageSize,this.queryParam.pagenum=e.current,e.pageSize!==this.pagination.pageSize&&(this.queryParam.pagenum=1,r.current=1),this.pagination=r,this.getUserList()},deleteUser:function(e){var t=this;this.$confirm({title:"确定要删除该用户吗？",content:"一旦删除，无法恢复",onOk:function(){var n=Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$http.delete("user/".concat(e));case 2:if(r=n.sent,o=r.data,200===o.status){n.next=6;break}return n.abrupt("return",t.$message.error(o.message));case 6:t.$message.success("删除成功"),t.getUserList();case 8:case"end":return n.stop()}}),n)})));function r(){return n.apply(this,arguments)}return r}(),onCancel:function(){t.$message.info("已取消删除")}})},addUserOk:function(){var e=this;this.$refs.addUserRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("参数不符合要求，请重新输入"));case 2:return t.next=4,e.$http.post("user/add",{username:e.newUser.username,password:e.newUser.password,role:e.newUser.role});case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:e.addUserVisible=!1,e.$message.success("添加用户成功"),e.getUserList();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},addUserCancel:function(){this.$refs.addUserRef.resetFields(),this.addUserVisible=!1,this.$message.info("新增已取消")},adminChange:function(e){this.userInfo.role=e?1:2},editUser:function(e){var t=this;return Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.editUserVisible=!0,n.next=3,t.$http.get("users/".concat(e));case 3:r=n.sent,o=r.data,t.userInfo=o.data,t.userInfo.id=e;case 7:case"end":return n.stop()}}),n)})))()},editUserOk:function(){var e=this;this.$refs.addUserRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("参数不符合要求，请重新输入"));case 2:return t.next=4,e.$http.put("user/".concat(e.userInfo.id),{username:e.userInfo.username,role:e.userInfo.role});case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:e.editUserVisible=!1,e.$message.success("更新用户信息成功"),e.getUserList();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},editUserCancel:function(){this.$refs.addUserRef.resetFields(),this.editUserVisible=!1,this.$message.info("编辑已取消")},ChangePassword:function(e){var t=this;return Object(p["a"])(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.changePasswordVisible=!0,n.next=3,t.$http.get("users/".concat(e));case 3:r=n.sent,o=r.data,t.changePassword=o.data,t.changePassword.id=e;case 7:case"end":return n.stop()}}),n)})))()},changePasswordOk:function(){var e=this;this.$refs.changePasswordRef.validate(function(){var t=Object(p["a"])(regeneratorRuntime.mark((function t(n){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",e.$message.error("参数不符合要求，请重新输入"));case 2:return t.next=4,e.$http.put("admin/changepw/".concat(e.changePassword.id),{password:e.changePassword.password});case 4:if(r=t.sent,o=r.data,200===o.status){t.next=8;break}return t.abrupt("return",e.$message.error(o.message));case 8:e.changePasswordVisible=!1,e.$message.success("修改密码成功"),e.getUserList();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},changePasswordCancel:function(){this.$refs.changePasswordRef.resetFields(),this.changePasswordVisible=!1,this.$message.info("已取消")}}},Ae=De,Me=(n("f95d"),Object(l["a"])(Ae,Oe,Ee,!1,null,"71a7f1c8",null)),Re=Me.exports;r["a"].use(m["a"]);var Ne=[{path:"/login",name:"login",component:x},{path:"/",name:"admin",component:U,children:[{path:"index",component:X},{path:"addart",component:le},{path:"addart/:id",component:le,props:!0},{path:"artlist",component:be},{path:"catelist",component:_e},{path:"userlist",component:Re}]}],Be=new m["a"]({routes:Ne});Be.beforeEach((function(e,t,n){var r=window.sessionStorage.getItem("token");if("/login"===e.path)return n();r||"/admin"!==e.path?n():n("/login")}));var Pe=Be,He=(n("7a59"),n("39ab")),Ie=(n("055b"),n("160c")),Le=(n("02cf"),n("9839")),Ve=(n("5b61"),n("4df5")),Fe=(n("1815"),n("e32c")),je=(n("50ac"),n("9a63")),Ue=(n("0723"),n("0020")),$e=(n("19ac"),n("cdeb")),We=(n("b6e5"),n("55f1")),qe=(n("d2a2"),n("98c5")),Ge=(n("805a"),n("0c63")),Xe=(n("a71a"),n("b558")),Ke=(n("b4bf"),n("ff57")),Ye=(n("e1f5"),n("5efb")),Je=(n("04f3"),n("ed3b")),Qe=(n("380f"),n("f64c"));Qe["a"].config({top:"100px",duration:2,maxCount:3}),r["a"].prototype.$message=Qe["a"],r["a"].prototype.$confirm=Je["a"].confirm,r["a"].use(Ye["a"]),r["a"].use(Ke["a"]),r["a"].use(Xe["a"]),r["a"].use(Ge["a"]),r["a"].use(qe["a"]),r["a"].use(We["a"]),r["a"].use($e["a"]),r["a"].use(Ue["a"]),r["a"].use(je["a"]),r["a"].use(Fe["a"]),r["a"].use(Ve["a"]),r["a"].use(Je["a"]),r["a"].use(Le["b"]),r["a"].use(Ie["a"]),r["a"].use(He["a"]);n("88f2");r["a"].config.productionTip=!1,new r["a"]({router:Pe,render:function(e){return e(d)}}).$mount("#app")},"58e6":function(e,t,n){},6032:function(e,t){tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 010 2H5a1 1 0 010-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 110-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 01-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})},"6f83":function(e,t,n){},"6fa9":function(e,t,n){"use strict";n("7443")},"724c":function(e,t,n){},7443:function(e,t,n){},"88f2":function(e,t,n){},"8e05":function(e,t,n){var r=n("7037").default;n("fb6a"),n("a630"),n("3ca3"),n("1276"),n("ac1f"),n("a15b"),n("d81d"),n("4d63"),n("25f0"),n("5319"),n("b0c0"),n("466d"),n("7db0"),function(){"use strict";var e,t,n,o,i,a,u=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},c=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(){},l=function(e){return function(){return e}},f=l(!1),d=l(!0),m=function(){return g},g=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:f,isSome:f,isNone:d,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:n,orThunk:t,map:m,each:s,bind:m,exists:f,forall:d,filter:m,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")}),h=function e(t){var n=l(t),r=function(){return i},o=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:d,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return e(n(t))},each:function(e){e(t)},bind:o,exists:o,forall:o,filter:function(e){return e(t)?i:g},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(f,(function(e){return n(t,e)}))}};return i},p={some:h,none:m,from:function(e){return null===e||void 0===e?g:h(e)}},v=function(e){return!(null===(t=e)||void 0===t);var t},b=(o="function",function(e){return r(e)===o}),y=Array.prototype.slice,x=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},w=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},C=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},k=b(Array.from)?Array.from:function(e){return y.call(e)},S=function(){var e=u(p.none());return{clear:function(){return e.set(p.none())},set:function(t){return e.set(p.some(t))},isSet:function(){return e.get().isSome()},on:function(t){return e.get().each(t)}}},_=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},O=tinymce.util.Tools.resolve("tinymce.Env"),E=tinymce.util.Tools.resolve("tinymce.util.Delay"),T=tinymce.util.Tools.resolve("tinymce.util.Promise"),z=tinymce.util.Tools.resolve("tinymce.util.VK"),D=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),M=function(e){return e.getParam("paste_data_images",!1)},R=function(e){return e.getParam("paste_retain_style_properties")},N=function(e){return e.getParam("validate")},B=function(e){return e.getParam("paste_data_images",!1,"boolean")},P=function(e){return A.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},H="x-tinymce/html",I="\x3c!-- "+H+" --\x3e",L=function(e){return-1!==e.indexOf(I)},V=tinymce.util.Tools.resolve("tinymce.html.Entities"),F=function(e,t,n){var o=e.split(/\n\n/),i=function(e,t){var n,o=[],i="<"+e;if("object"==r(t)){for(n in t)t.hasOwnProperty(n)&&o.push(n+'="'+V.encodeAllRaw(t[n])+'"');o.length&&(i+=" "+o.join(" "))}return i+">"}(t,n),a="</"+t+">",u=A.map(o,(function(e){return e.split(/\n/).join("<br />")}));return 1===u.length?u[0]:A.map(u,(function(e){return i+e+a})).join("")},j=tinymce.util.Tools.resolve("tinymce.html.DomParser"),U=tinymce.util.Tools.resolve("tinymce.html.Serializer"),$=tinymce.util.Tools.resolve("tinymce.html.Node"),W=tinymce.util.Tools.resolve("tinymce.html.Schema"),q=function(e,t){return A.each(t,(function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])})),e},G=function(e){return q(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},X=function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)},K=function(e){for(var t,n,r=1,o=function e(t){var n="";if(3===t.type)return t.value;if(t=t.firstChild)for(;n+=e(t),t=t.next;);return n},i=function e(t,n){if(3===t.type&&n.test(t.value))return t.value=t.value.replace(n,""),!1;if(t=t.firstChild)do{if(!e(t,n))return!1}while(t=t.next);return!0},a=function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;e(t),t=t.next;);},u=function(e,o,u){var c=e._listLevel||r;c!==r&&(t=c<r?t&&t.parent.parent:(n=t,null)),t&&t.name===o?t.append(e):(n=n||t,t=new $(o,1),1<u&&t.attr("start",""+u),e.wrap(t)),e.name="li",r<c&&n&&n.lastChild.append(t),r=c,a(e),i(e,/^\u00a0+/),i(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(e,/^\u00a0+/)},c=[],s=e.firstChild;null!=s;)if(c.push(s),null!==(s=s.walk()))for(;void 0!==s&&s.parent!==e;)s=s.walk();for(var l=0;l<c.length;l++)if("p"===(e=c[l]).name&&e.firstChild){var f=o(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(f)){u(e,"ul");continue}if(function(e){var t;return e=e.replace(/^[\u00a0 ]+/,""),A.each([/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],(function(n){if(n.test(e))return!(t=!0)})),t}(f)){var d=/([0-9]+)\./.exec(f),m=1;d&&(m=parseInt(d[1],10)),u(e,"ol",m);continue}if(e._listLevel){u(e,"ul",1);continue}t=null}else n=t,t=null},Y=function(e,t){var n,r=R(e);r&&(n=A.makeMap(r.split(/[, ]/))),t=q(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var o=e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),i=W({valid_elements:o,valid_children:"-li[p]"});A.each(i.elements,(function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))}));var a=j({},i);a.addAttributeFilter("style",(function(t){for(var r,o=t.length;o--;)(r=t[o]).attr("style",function(e,t,n,r){var o,i={},a=e.dom.parseStyle(r);return A.each(a,(function(a,u){switch(u){case"mso-list":(o=/\w+ \w+([0-9]+)/i.exec(r))&&(n._listLevel=parseInt(o[1],10)),/Ignore/i.test(a)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":u="text-align";break;case"vert-align":u="vertical-align";break;case"font-color":case"mso-foreground":u="color";break;case"mso-background":case"mso-highlight":u="background";break;case"font-weight":case"font-style":return void("normal"!==a&&(i[u]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void n.remove()}0!==u.indexOf("mso-comment")?0!==u.indexOf("mso-")&&("all"===R(e)||t&&t[u])&&(i[u]=a):n.remove()})),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new $("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new $("i",1))),(i=e.dom.serializeStyle(i,n.name))||null}(e,n,r,r.attr("style"))),"span"===r.name&&r.parent&&!r.attributes.length&&r.unwrap()})),a.addAttributeFilter("class",(function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)})),a.addNodeFilter("del",(function(e){for(var t=e.length;t--;)e[t].remove()})),a.addNodeFilter("a",(function(e){for(var t,n,r,o=e.length;o--;)if(n=(t=e[o]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()}));var u=a.parse(t);return e.getParam("paste_convert_word_fake_lists",!0)&&K(u),U({validate:N(e)},i).serialize(u)},J=function(e,t){return{content:e,cancelled:t}},Q=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,g,h,p=(o=t,i=n,a=r,e.fire("PastePreProcess",{content:o,internal:i,wordContent:a})),v=function(e,t){var n=j({},e.schema);n.addNodeFilter("meta",(function(e){A.each(e,(function(e){e.remove()}))}));var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return U({validate:N(e)},e.schema).serialize(r)}(e,p.content);return e.hasEventListeners("PastePostProcess")&&!p.isDefaultPrevented()?(c=v,s=n,l=r,g=(u=e).dom.create("div",{style:"display:none"},c),f=g,d=s,m=l,h=u.fire("PastePostProcess",{node:f,internal:d,wordContent:m}),J(h.node.innerHTML,h.isDefaultPrevented())):J(v,p.isDefaultPrevented())},Z=function(e,t,n){var r,o,i=X(t),a=i?(o=t,(r=e).getParam("paste_enable_default_filters",!0)?Y(r,o):o):t;return Q(e,a,n,i)},ee=function(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0},te=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},ne=function(e,t){return te(t)&&x(P(e),(function(e){return n=t.toLowerCase(),r="."+e.toLowerCase(),_(n,r,n.length-r.length);var n,r}))},re=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!te(t))&&(o=t,i=n,(r=e).undoManager.extra((function(){i(r,o)}),(function(){r.execCommand("mceInsertLink",!1,o)})),!0);var r,o,i},oe=function(e,t,n){return!!ne(e,t)&&(o=t,i=n,(r=e).undoManager.extra((function(){i(r,o)}),(function(){r.insertContent('<img src="'+o+'">')})),!0);var r,o,i},ie=function(e,t,n){var r,o;n||!1===e.getParam("smart_paste",!0)?ee(e,t):(r=e,o=t,A.each([re,oe,ee],(function(e){return!0!==e(r,o,ee)})))},ae=function(e){return"\n"===e||"\r"===e},ue=function(e,t){var n,r,o,i,a=(n=" ",(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(n)),u=t.replace(/\t/g,a);return(i={pcIsSpace:!(o=function(e,t){return-1!==" \f\t\v".indexOf(t)||" "===t?e.pcIsSpace||""===e.str||e.str.length===u.length-1||(n=u,(r=e.str.length+1)<n.length&&0<=r&&ae(n[r]))?{pcIsSpace:!1,str:e.str+" "}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:ae(t),str:e.str+t};var n,r}),str:""},C(u,(function(e){i=o(i,e)})),i).str},ce=function(e,t,n,r){var o=Z(e,t,n);!1===o.cancelled&&ie(e,o.content,r)},se=function(e,t,n){var r=n||L(t);ce(e,t.replace(I,""),r,!1)},le=function(e,t){var n,r,o,i=e.dom.encode(t).replace(/\r\n/g,"\n"),a=ue(e,i),u=(n=a,r=e.getParam("forced_root_block"),o=e.getParam("forced_root_block_attrs"),r?F(n,!0===r?"p":r,o):n.replace(/\r?\n/g,"<br>"));ce(e,u,!1,!0)},fe=function(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var o=e.types[r];try{n[o]=e.getData(o)}catch(a){n[o]=""}}return n},de=function(e,t){return t in e&&0<e[t].length},me=function(e){return de(e,"text/html")||de(e,"text/plain")},ge=(i="mceclip",a=0,function(){return i+a++}),he=function(e,t){var n,r,o,i,a,u,c,s,l,f,d,m,g,h=(n=t.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),p=h.data,b=h.type,y=ge(),x=t.blob,w=new Image;w.src=t.uri,m=w,!(g=e.getParam("images_dataimg_filter"))||g(m)?(s=void 0,(i=(o=e.editorUpload.blobCache).getByData(p,b))?s=i:(u=(a=e.getParam("images_reuse_filename")&&v(x.name))?(l=e,f=x.name,d=f.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i),v(d)?l.dom.encode(d[1]):null):y,c=a?x.name:void 0,s=o.create(y,x,p,u,c),o.add(s)),se(e,'<img src="'+s.blobUri()+'">',!1)):se(e,'<img src="'+t.uri+'">',!1)},pe=function(e){return T.all(w(e,(function(e){return new T((function(t){var n=v(e.getAsFile)?e.getAsFile():e,r=new window.FileReader;r.onload=function(){t({blob:n,uri:r.result})},r.readAsDataURL(n)}))})))},ve=function(e){var t=P(e);return function(e){return n=e.type,_(n,"image/",0)&&x(t,(function(t){return n=t.toLowerCase(),r={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(A.hasOwn(r,n)?"image/"+r[n]:"image/"+n)===e.type;var n,r}));var n}},be=function(e,t,n){var r,o,i,a,u="paste"===t.type?t.clipboardData:t.dataTransfer;if(B(e)&&u){var c=(r=e,i=(o=u).items?w(k(o.items),(function(e){return e.getAsFile()})):[],a=o.files?k(o.files):[],function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}(0<i.length?i:a,ve(r)));if(0<c.length)return t.preventDefault(),pe(c).then((function(t){n&&e.selection.setRng(n),C(t,(function(t){he(e,t)}))})),!0}return!1},ye=function(e){return z.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},xe=function(e,t,n){var r,o=S(),i=S();e.on("keyup",i.clear),e.on("keydown",(function(n){var a,u=function(e){ye(e)&&!e.isDefaultPrevented()&&t.remove()};if(ye(n)&&!n.isDefaultPrevented()){if((r=n.shiftKey&&86===n.keyCode)&&O.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),o.set(n),i.set(!0),O.ie&&r)return n.preventDefault(),a=!0,void e.fire("paste",{ieFake:a});t.remove(),t.create(),e.once("keyup",u),e.once("paste",(function(){e.off("keyup",u)}))}}));var a=function(e,n,r,o,i){var a;de(n,"text/html")?a=n["text/html"]:(a=t.getHtml(),i=i||L(a),t.isDefaultContent(a)&&(o=!0)),a=G(a),t.remove();var u,c,s,l,f,d,m,g,h=!1===i&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(a),p=ne(e,a);a.length&&(!h||p)||(o=!0),(o||p)&&(a=de(n,"text/plain")&&h?n["text/plain"]:(u=a,c=W(),s=j({},c),l="",f=c.getShortEndedElements(),d=A.makeMap("script noscript style textarea video audio iframe object"," "),m=c.getBlockElements(),g=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(f[t]&&(l+=" "),d[t])l+=" ";else{if(3===e.type&&(l+=e.value),!e.shortEnded&&(e=e.firstChild))for(;g(e),e=e.next;);m[t]&&n.next&&(l+="\n","p"===t&&(l+="\n"))}}else l+="\n"},u=q(u,[/<!\[[^\]]+\]>/g]),g(s.parse(u)),l)),t.isDefaultContent(a)?r||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?le(e,a):se(e,a,i)};e.on("paste",(function(u){var c=o.isSet()||i.isSet();c&&o.clear();var s,l,f=(s=e,fe(u.clipboardData||s.getDoc().dataTransfer)),d="text"===n.get()||r,m=de(f,H);r=!1,u.isDefaultPrevented()||(l=u.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&l&&l.items&&0===l.items.length)||!me(f)&&be(e,u,t.getLastRng()||e.selection.getRng())?t.remove():(c||u.preventDefault(),!O.ie||c&&!u.ieFake||de(f,"text/html")||(t.create(),e.dom.bind(t.getEl(),"paste",(function(e){e.stopPropagation()})),e.getDoc().execCommand("Paste",!1,null),f["text/html"]=t.getHtml()),de(f,"text/html")?(u.preventDefault(),m=m||L(f["text/html"]),a(e,f,c,d,m)):E.setEditorTimeout(e,(function(){a(e,f,c,d,m)}),0))}))},we=function(e,t,n){var r;xe(e,t,n),e.parser.addNodeFilter("img",(function(t,n,o){var i,a=function(e){e.attr("data-mce-object")||r===O.transparentSrc||e.remove()};if(!B(e)&&(i=o).data&&!0===i.data.paste)for(var u=t.length;u--;)(r=t[u].attr("src"))&&(0!==r.indexOf("webkit-fake-url")&&(e.getParam("allow_html_data_urls",!1,"boolean")||0!==r.indexOf("data:"))||a(t[u]))}))},Ce=function(e){return O.ie&&e.inline?document.body:e.getBody()},ke=function(e,t,n){var r;Ce(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",(function(t){Oe(e,n)||e.fire("paste")}))},Se=function(e){return e.dom.get("mcepastebin")},_e=function(e,t){return t===e},Oe=function(e,t){var n,r=Se(e);return(n=r)&&"mcepastebin"===n.id&&_e(t,r.innerHTML)},Ee=function(e){var t=u(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,o=e.getBody();t.set(e.selection.getRng());var i=e.dom.add(Ce(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(O.ie||O.gecko)&&r.setStyle(i,"left","rtl"===r.getStyle(o,"direction",!0)?65535:-65535),r.bind(i,"beforedeactivate focusin focusout",(function(e){e.stopPropagation()})),ke(e,i,n),i.focus(),e.selection.select(i,!0)}(e,t,n)},remove:function(){return function(e,t){if(Se(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return Se(e)},getHtml:function(){return function(e){var t=function(t,n){t.appendChild(n),e.dom.remove(n,!0)},n=A.grep(Ce(e).childNodes,(function(e){return"mcepastebin"===e.id})),r=n.shift();A.each(n,(function(e){t(r,e)}));for(var o=e.dom.select("div[id=mcepastebin]",r),i=o.length-1;0<=i;i--){var a=e.dom.create("div");r.insertBefore(a,o[i]),t(a,o[i])}return r?r.innerHTML:""}(e)},getLastRng:function(){return t.get()},isDefault:function(){return Oe(e,n)},isDefaultContent:function(e){return e===n}}},Te=function(e,t){e.addCommand("mceTogglePlainTextPaste",(function(){var n,r;n=e,"text"===(r=t).pasteFormat.get()?(r.pasteFormat.set("html"),D(n,!1)):(r.pasteFormat.set("text"),D(n,!0)),n.focus()})),e.addCommand("mceInsertClipboardContent",(function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)}))},ze=function(e,t,n){if(r=e,!1!==O.iOS||"function"!=typeof(null==r?void 0:r.setData))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(H,t),!0}catch(i){return!1}var r},De=function(e,t,n,r){ze(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},Ae=function(e){return function(t,n){var r=I+t,o=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=e.dom.create("div",{contenteditable:"true"},r);e.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),e.dom.add(e.getBody(),o);var a=e.selection.getRng();i.focus();var u=e.dom.createRng();u.selectNodeContents(i),e.selection.setRng(u),E.setTimeout((function(){e.selection.setRng(a),o.parentNode.removeChild(o),n()}),0)}},Me=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Re=function(e){return!e.selection.isCollapsed()||!!(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},Ne=function(e){var t,n;e.on("cut",(t=e,function(e){Re(t)&&De(e,Me(t),Ae(t),(function(){var e;O.browser.isChrome()||O.browser.isFirefox()?(e=t.selection.getRng(),E.setEditorTimeout(t,(function(){t.selection.setRng(e),t.execCommand("Delete")}),0)):t.execCommand("Delete")}))})),e.on("copy",(n=e,function(e){Re(n)&&De(e,Me(n),Ae(n),s)}))},Be=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Pe=function(e,t){return Be.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},He=function(e,t){e.focus(),e.selection.setRng(t)},Ie=function(e,t,n){e.getParam("paste_block_drop",!1)&&e.on("dragend dragover draggesture dragdrop drop drag",(function(e){e.preventDefault(),e.stopPropagation()})),M(e)||e.on("drop",(function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()})),e.on("drop",(function(r){var o,i,a,u,c=Pe(e,r);r.isDefaultPrevented()||n.get()||(o=t.getDataTransferItems(r.dataTransfer),i=t.hasContentType(o,H),(!t.hasHtmlOrText(o)||(a=o["text/plain"])&&0===a.indexOf("file://"))&&t.pasteImageData(r,c)||!c||!e.getParam("paste_filter_drop",!0)||(u=o["mce-internal"]||o["text/html"]||o["text/plain"])&&(r.preventDefault(),E.setEditorTimeout(e,(function(){e.undoManager.transact((function(){o["mce-internal"]&&e.execCommand("Delete"),He(e,c),u=G(u),o["text/html"]?t.pasteHtml(u,i):t.pasteText(u)}))}))))})),e.on("dragstart",(function(e){n.set(!0)})),e.on("dragover dragend",(function(t){M(e)&&!1===n.get()&&(t.preventDefault(),He(e,Pe(e,t))),"dragend"===t.type&&n.set(!1)}))},Le=function(e,t){e.on("PastePreProcess",(function(n){n.content=t(e,n.content,n.internal,n.wordContent)}))},Ve=function(e,t){if(!X(t))return t;var n=[];A.each(e.schema.getBlockElements(),(function(e,t){n.push(t)}));var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return t=q(t,[[r,"$1"]]),q(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},Fe=function(e,t,n,r){if(r||n)return t;var o,i,a,u=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===u?t:(u&&(o=u.split(/[, ]/)),t=(t=o?(i=e.dom,a=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(function(e,t,n,r){var u=i.parseStyle(i.decode(n)),c={};if("none"===o)return t+r;for(var s=0;s<o.length;s++){var l=u[o[s]],f=i.getStyle(a,o[s],!0);/color/.test(o[s])&&(l=i.toHex(l),f=i.toHex(f)),f!==l&&(c[o[s]]=l)}return(c=i.serializeStyle(c,"span"))?t+' style="'+c+'"'+r:t+r}))):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(function(e,t,n,r){return t+' style="'+n+'"'+r})))},je=function(e,t){e.$("a",t).find("font,u").each((function(t,n){e.dom.remove(n,!0)}))},Ue=function(e,t){return function(n){n.setActive("text"===t.pasteFormat.get());var r=function(e){return n.setActive(e.state)};return e.on("PastePlainTextToggle",r),function(){return e.off("PastePlainTextToggle",r)}}};c.add("paste",(function(e){if(0==(!!e.hasPlugin("powerpaste",!0)&&("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=u(!1),n=u(e.getParam("paste_as_text",!1)?"text":"html"),r=(f=n,d=Ee(l=e),l.on("PreInit",(function(){return we(l,d,f)})),{pasteFormat:f,pasteHtml:function(e,t){return se(l,e,t)},pasteText:function(e){return le(l,e)},pasteImageData:function(e,t){return be(l,e,t)},getDataTransferItems:fe,hasHtmlOrText:me,hasContentType:de});return a=e,O.webkit&&Le(a,Fe),O.ie&&(Le(a,Ve),s=je,(c=a).on("PastePostProcess",(function(e){s(c,e.node)}))),i=r,(o=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ue(o,i)}),o.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ue(o,i)}),Te(e,r),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",(function(e){n.call(t,t,e)}));var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",(function(e){r.call(t,t,e)}))}(e),Ne(e),Ie(e,r,t),{clipboard:r,quirks:void 0}}var o,i,a,c,s,l,f,d}))}()},"999b":function(e,t,n){},"9df4":function(e,t,n){"use strict";n("db0e")},b1be:function(e,t,n){(function(e){var t=n("7037").default;n("99af"),n("a4d3"),n("b0c0"),n("fb6a"),n("a630"),n("3ca3"),n("b64b"),n("a15b"),n("d3b7"),n("ddb0"),n("d81d"),n("25f0"),n("a9e3"),n("5319"),n("ac1f"),n("841c"),n("dca8"),n("1276"),n("4de4"),n("466d"),n("c7cd"),n("498a"),n("7db0"),n("18a5"),n("4d63"),n("a434"),n("9911"),n("e01a"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("2b3d"),n("b680"),n("4ec9"),function(){"use strict";var n=function(){},r=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},o=function(e){return function(){return e}},i=function(e){return e};function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var u=function(e){return function(t){return!e(t)}},c=function(e){return function(){throw new Error(e)}},s=o(!1),l=o(!0),f=tinymce.util.Tools.resolve("tinymce.ThemeManager"),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var h,p,v,b,y,x,w=function(){return C},C=(h=function(e){return e.isNone()},{fold:function(e,t){return e()},is:s,isSome:s,isNone:l,getOr:v=function(e){return e},getOrThunk:p=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:v,orThunk:p,map:w,each:n,bind:w,exists:s,forall:l,filter:w,equals:h,equals_:h,toArray:function(){return[]},toString:o("none()")}),k=function e(t){var n=o(t),r=function(){return a},i=function(e){return e(t)},a={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:l,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return e(n(t))},each:function(e){e(t)},bind:i,exists:i,forall:i,filter:function(e){return e(t)?a:C},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,(function(e){return n(t,e)}))}};return a},S={some:k,none:w,from:function(e){return null===e||void 0===e?C:k(e)}},_=function(e){return function(n){return o=t(r=n),(null===r?"null":"object"==o&&(Array.prototype.isPrototypeOf(r)||r.constructor&&"Array"===r.constructor.name)?"array":"object"==o&&(String.prototype.isPrototypeOf(r)||r.constructor&&"String"===r.constructor.name)?"string":o)===e;var r,o}},O=function(e){return function(n){return t(n)===e}},E=_("string"),T=_("object"),z=_("array"),D=O("boolean"),A=(b=void 0,function(e){return b===e}),M=function(e){return!(null===(t=e)||void 0===t);var t},R=O("function"),N=O("number"),B=function(e,t){if(z(e)){for(var n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0}return!1},P=Array.prototype.slice,H=Array.prototype.indexOf,I=Array.prototype.push,L=function(e,t){return H.call(e,t)},V=function(e,t){return-1<L(e,t)},F=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},j=function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n},U=function(e,t){for(var n=[],r=0;r<e.length;r+=t){var o=P.call(e,r,r+t);n.push(o)}return n},$=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},W=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},q=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},G=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},X=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}(e,(function(e){n=t(n,e)})),n},K=function(e,t,n){return W(e,(function(e){n=t(n,e)})),n},Y=function(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return S.some(i);if(n(i,r))break}return S.none()}(e,t,s)},J=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return S.some(n);return S.none()},Q=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!z(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);I.apply(t,e[n])}return t},Z=function(e,t){return Q($(e,t))},ee=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},te=function(e){var t=P.call(e,0);return t.reverse(),t},ne=function(e,t){return G(e,(function(e){return!V(t,e)}))},re=function(e,t){var n=P.call(e,0);return n.sort(t),n},oe=function(e,t){return 0<=t&&t<e.length?S.some(e[t]):S.none()},ie=function(e){return oe(e,0)},ae=function(e){return oe(e,e.length-1)},ue=R(Array.from)?Array.from:function(e){return P.call(e)},ce=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return S.none()},se=function e(t){return{is:function(e){return t===e},isValue:l,isError:s,getOr:o(t),getOrThunk:o(t),getOrDie:o(t),or:function(n){return e(t)},orThunk:function(n){return e(t)},fold:function(e,n){return n(t)},map:function(n){return e(n(t))},mapError:function(n){return e(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return S.some(t)}}},le=function e(t){return{is:s,isValue:s,isError:l,getOr:i,getOrThunk:function(e){return e()},getOrDie:function(){return c(String(t))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(n){return e(t)},mapError:function(n){return e(n(t))},each:n,bind:function(n){return e(t)},exists:s,forall:l,toOptional:S.none}},fe={value:se,error:le,fromOption:function(e,t){return e.fold((function(){return le(t)}),se)}};(x=y=y||{})[x.Error=0]="Error",x[x.Value=1]="Value";var de,me,ge=function(e,t,n){return e.stype===y.Error?t(e.serror):n(e.svalue)},he=function(e){return{stype:y.Value,svalue:e}},pe=function(e){return{stype:y.Error,serror:e}},ve=function(e){return e.fold(pe,he)},be=function(e){return ge(e,fe.error,fe.value)},ye=he,xe=function(e){var t=[],n=[];return W(e,(function(e){ge(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},we=pe,Ce=function(e,t){return e.stype===y.Value?t(e.svalue):e},ke=function(e,t){return e.stype===y.Error?t(e.serror):e},Se=function(e,t){return e.stype===y.Value?{stype:y.Value,svalue:t(e.svalue)}:e},_e=function(e,t){return e.stype===y.Error?{stype:y.Error,serror:t(e.serror)}:e},Oe=Object.keys,Ee=Object.hasOwnProperty,Te=function(e,t){for(var n=Oe(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},ze=function(e,t){return De(e,(function(e,n){return{k:n,v:t(e,n)}}))},De=function(e,t){var n={};return Te(e,(function(e,r){var o=t(e,r);n[o.k]=o.v})),n},Ae=function(e,t){var r,o,i,a,u={};return r=t,a=u,o=function(e,t){a[t]=e},i=n,Te(e,(function(e,t){(r(e,t)?o:i)(e,t)})),u},Me=function(e,t){var n=[];return Te(e,(function(e,r){n.push(t(e,r))})),n},Re=function(e,t){for(var n=Oe(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];if(t(a,i,e))return S.some(a)}return S.none()},Ne=function(e){return Me(e,(function(e){return e}))},Be=function(e,t){return Pe(e,t)?S.from(e[t]):S.none()},Pe=function(e,t){return Ee.call(e,t)},He=function(e,t){return Pe(e,t)&&void 0!==e[t]&&null!==e[t]},Ie=function(e){if(!z(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return W(e,(function(r,o){var i=Oe(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!z(u))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,n)},match:function(e){var r=Oe(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!ee(t,(function(e){return V(r,e)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}})),n},Le=Object.prototype.hasOwnProperty,Ve=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var a in i)Le.call(i,a)&&(r[a]=e(r[a],i[a]))}return r}},Fe=Ve((function(e,t){return T(e)&&T(t)?Fe(e,t):t})),je=Ve((function(e,t){return t})),Ue=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},$e=Ie([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),We=function(e){return $e.defaultedThunk(o(e))},qe=$e.strict,Ge=$e.asOption,Xe=$e.defaultedThunk,Ke=($e.asDefaultedOptionThunk,$e.mergeWithThunk),Ye=(Ie([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(e,t){var n={};return n[e]=t,n}),Je=function(e,t){return n=t,r={},Te(e,(function(e,t){V(n,t)||(r[t]=e)})),r;var n,r},Qe=Ye,Ze=function(e){return t={},W(e,(function(e){t[e.key]=e.value})),t;var t},et=function(e,t){var n,r,o,i,a,u=(n=[],r=[],W(e,(function(e){e.fold((function(e){n.push(e)}),(function(e){r.push(e)}))})),{errors:n,values:r});return 0<u.errors.length?(a=u.errors,fe.error(Q(a))):(i=t,0===(o=u.values).length?fe.value(i):fe.value(Fe(i,je.apply(void 0,o))))},tt=function(e){return r(we,Q)(e)},nt=function(e,t){var n,r,o=xe(e);return 0<o.errors.length?tt(o.errors):(n=o.values,r=t,0<n.length?ye(Fe(r,je.apply(void 0,n))):ye(r))},rt=function(e){var t=xe(e);return 0<t.errors.length?tt(t.errors):ye(t.values)},ot=function(e){return T(e)&&100<Oe(e).length?" removed due to size":JSON.stringify(e,null,2)},it=function(e,t){return we([{path:e,getErrorInfo:t}])},at=Ie([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),ut=function(e,t,n){return Be(t,n).fold((function(){return r=n,o=t,it(e,(function(){return'Could not find valid *strict* value for "'+r+'" in '+ot(o)}));var r,o}),ye)},ct=function(e,t,n){var r=Be(e,t).fold((function(){return n(e)}),i);return ye(r)},st=function(e,t,n,r){return n.fold((function(n,i,a,u){var c=function(t){var o=u.extract(e.concat([n]),r,t);return Se(o,(function(e){return Ye(i,r(e))}))},s=function(t){return t.fold((function(){var e=Ye(i,r(S.none()));return ye(e)}),(function(t){var o=u.extract(e.concat([n]),r,t);return Se(o,(function(e){return Ye(i,r(S.some(e)))}))}))};return a.fold((function(){return Ce(ut(e,t,n),c)}),(function(e){return Ce(ct(t,n,e),c)}),(function(){return Ce(ye(Be(t,n)),s)}),(function(e){return Ce((o=e,i=Be(r=t,n).map((function(e){return!0===e?o(r):e})),ye(i)),s);var r,o,i}),(function(e){var r=e(t),i=Se(ct(t,n,o({})),(function(e){return Fe(r,e)}));return Ce(i,c)}))}),(function(e,n){var o=n(t);return ye(Ye(e,r(o)))}))},lt=function(e){return{extract:function(t,n,r){return ke(e(r,n),(function(e){return n=e,it(t,(function(){return n}));var n}))},toString:function(){return"val"}}},ft=function(e){var t=dt(e),n=X(e,(function(e,t){return t.fold((function(t){return Fe(e,Qe(t,!0))}),o(e))}),{});return{extract:function(e,r,o){var i,a=D(o)?[]:Oe(Ae(o,(function(e){return void 0!==e&&null!==e}))),u=G(a,(function(e){return!He(n,e)}));return 0===u.length?t.extract(e,r,o):(i=u,it(e,(function(){return"There are unsupported fields: ["+i.join(", ")+"] specified"})))},toString:t.toString}},dt=function(e){return{extract:function(t,n,r){return o=t,i=r,a=n,u=$(e,(function(e){return st(o,i,e,a)})),nt(u,{});var o,i,a,u},toString:function(){return"obj{\n"+$(e,(function(e){return e.fold((function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))})).join("\n")+"}"}}},mt=function(e){return{extract:function(t,n,r){var o=$(r,(function(r,o){return e.extract(t.concat(["["+o+"]"]),n,r)}));return rt(o)},toString:function(){return"array("+e.toString()+")"}}},gt=function(e){return{extract:function(t,n,r){for(var o=[],i=0,a=e;i<a.length;i++){var u=a[i].extract(t,n,r);if(u.stype===y.Value)return u;o.push(u)}return rt(o)},toString:function(){return"oneOf("+$(e,(function(e){return e.toString()})).join(", ")+")"}}},ht=function(e,t){return{extract:function(n,r,o){var a,u,c=Oe(o),s=(a=n,u=c,mt(lt(e)).extract(a,i,u));return Ce(s,(function(e){var i=$(e,(function(e){return at.field(e,e,qe(),t)}));return dt(i).extract(n,r,o)}))},toString:function(){return"setOf("+t.toString()+")"}}},pt=o(lt(ye)),vt=r(mt,dt),bt=at.state,yt=at.field,xt=function(e,t,n,r,o){return Be(r,o).fold((function(){return t=r,n=o,it(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+ot(t)}));var t,n}),(function(r){return r.extract(e.concat(["branch: "+o]),t,n)}))},wt=function(e,t){return{extract:function(n,r,o){return Be(o,e).fold((function(){return t=e,it(n,(function(){return'Choice schema did not contain choice key: "'+t+'"'}));var t}),(function(e){return xt(n,r,o,t,e)}))},toString:function(){return"chooseOn("+e+"). Possible values: "+Oe(t)}}},Ct=lt(ye),kt=function(e){return vt(e)},St=function(e){return{extract:function(t,n,r){return e().extract(t,n,r)},toString:function(){return e().toString()}}},_t=function(e){return lt((function(t){return e(t).fold(we,ye)}))},Ot=function(e,t){return ht((function(t){return ve(e(t))}),t)},Et=function(e,t,n){return be((r=e,o=i,a=n,u=t.extract([r],o,a),_e(u,(function(e){return{input:a,errors:e}}))));var r,o,a,u},Tt=function(e){return e.fold((function(e){throw new Error(Dt(e))}),i)},zt=function(e,t,n){return Tt(Et(e,t,n))},Dt=function(e){return"Errors: \n"+(t=e.errors,n=10<t.length?t.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):t,$(n,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()})).join("\n")+"\n\nInput object: ")+ot(e.input);var t,n},At=wt,Mt=function(e,t){return wt(e,ze(t,dt))},Rt=o(Ct),Nt=function(e,n){return lt((function(r){var o=t(r);return e(r)?ye(r):we("Expected type: "+n+" but got: "+o)}))},Bt=Nt(N,"number"),Pt=Nt(E,"string"),Ht=Nt(D,"boolean"),It=Nt(R,"function"),Lt=function e(t){var n=function(e,t){for(var n=e.next();!n.done;){if(!t(n.value))return!1;n=e.next()}return!0};if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(n){return e(t[n])}));case"Map":return n(t.keys(),e)&&n(t.values(),e);case"Set":return n(t.keys(),e);default:return!1}},Vt=lt((function(e){return Lt(e)?ye(e):we("Expected value to be acceptable for sending via postMessage")})),Ft=function(e){return _t((function(t){return V(e,t)?fe.value(t):fe.error('Unsupported value: "'+t+'", choose one of "'+e.join(", ")+'".')}))},jt=function(e){return yt(e,e,qe(),pt())},Ut=function(e,t){return yt(e,e,qe(),t)},$t=function(e){return Ut(e,Pt)},Wt=function(e,t){return yt(e,e,qe(),Ft(t))},qt=function(e){return Ut(e,It)},Gt=function(e,t){return yt(e,e,qe(),dt(t))},Xt=function(e,t){return yt(e,e,qe(),vt(t))},Kt=function(e,t){return yt(e,e,qe(),mt(t))},Yt=function(e){return yt(e,e,Ge(),pt())},Jt=function(e,t){return yt(e,e,Ge(),t)},Qt=function(e){return Jt(e,Bt)},Zt=function(e){return Jt(e,Pt)},en=function(e){return Jt(e,It)},tn=function(e,t){return Jt(e,dt(t))},nn=function(e,t){return yt(e,e,We(t),pt())},rn=function(e,t,n){return yt(e,e,We(t),n)},on=function(e,t){return rn(e,t,Bt)},an=function(e,t){return rn(e,t,Pt)},un=function(e,t,n){return rn(e,t,Ft(n))},cn=function(e,t){return rn(e,t,Ht)},sn=function(e,t){return rn(e,t,It)},ln=function(e,t,n){return rn(e,t,mt(n))},fn=function(e,t,n){return rn(e,t,dt(n))},dn=function(e,t){return bt(e,t)},mn=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},gn=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},hn={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return gn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return gn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return gn(n)},fromDom:gn,fromPoint:function(e,t,n){return S.from(e.dom.elementFromPoint(t,n)).map(gn)}},pn=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return bn(r(1),r(2))},vn=function(){return bn(0,0)},bn=function(e,t){return{major:e,minor:t}},yn={nu:bn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?vn():pn(e,n)},unknown:vn},xn=function(e,t){var n=String(t).toLowerCase();return Y(e,(function(e){return e.search(n)}))},wn=function(e,t){return xn(e,t).map((function(e){var n=yn.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},Cn=function(e,t){return xn(e,t).map((function(e){var n=yn.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},kn=function(e,t){return-1!==e.indexOf(t)},Sn=function(e,t){return r=t,o=(n=e).length-t.length,""===r||n.length>=r.length&&n.substr(o,o+r.length)===r;var n,r,o},_n=(de=/^\s+|\s+$/g,function(e){return e.replace(de,"")}),On=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,En=function(e){return function(t){return kn(t,e)}},Tn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return kn(e,"edge/")&&kn(e,"chrome")&&kn(e,"safari")&&kn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,On],search:function(e){return kn(e,"chrome")&&!kn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return kn(e,"msie")||kn(e,"trident")}},{name:"Opera",versionRegexes:[On,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:En("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:En("firefox")},{name:"Safari",versionRegexes:[On,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(kn(e,"safari")||kn(e,"mobile/"))&&kn(e,"applewebkit")}}],zn=[{name:"Windows",search:En("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return kn(e,"iphone")||kn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:En("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:En("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:En("linux"),versionRegexes:[]},{name:"Solaris",search:En("sunos"),versionRegexes:[]},{name:"FreeBSD",search:En("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:En("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Dn={browsers:o(Tn),oses:o(zn)},An="Firefox",Mn=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(An),isSafari:r("Safari")}},Rn={unknown:function(){return Mn({current:void 0,version:yn.unknown()})},nu:Mn,edge:o("Edge"),chrome:o("Chrome"),ie:o("IE"),opera:o("Opera"),firefox:o(An),safari:o("Safari")},Nn="Windows",Bn="Android",Pn="Solaris",Hn="FreeBSD",In="ChromeOS",Ln=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(Nn),isiOS:r("iOS"),isAndroid:r(Bn),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(Pn),isFreeBSD:r(Hn),isChromeOS:r(In)}},Vn={unknown:function(){return Ln({current:void 0,version:yn.unknown()})},nu:Ln,windows:o(Nn),ios:o("iOS"),android:o(Bn),linux:o("Linux"),osx:o("OSX"),solaris:o(Pn),freebsd:o(Hn),chromeos:o(In)},Fn=function(e,t){var n,r,i,a,u,c,s,l,f,d,m,g,h=Dn.browsers(),p=Dn.oses(),v=wn(h,e).fold(Rn.unknown,Rn.nu),b=Cn(p,e).fold(Vn.unknown,Vn.nu);return{browser:v,os:b,deviceType:(r=v,i=e,a=t,u=(n=b).isiOS()&&!0===/ipad/i.test(i),c=n.isiOS()&&!u,s=n.isiOS()||n.isAndroid(),l=s||a("(pointer:coarse)"),f=u||!c&&s&&a("(min-device-width:768px)"),d=c||s&&!f,m=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(i),g=!d&&!f&&!m,{isiPad:o(u),isiPhone:o(c),isTablet:o(f),isPhone:o(d),isTouch:o(l),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:o(m),isDesktop:o(g)})}},jn=function(e){return window.matchMedia(e).matches},Un=Ue((function(){return Fn(navigator.userAgent,jn)})),$n=function(){return Un()},Wn=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},qn=function(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount},Gn=function(e,t){return e.dom===t.dom},Xn=function(e,t){return n=e.dom,r=t.dom,o=n,i=r,a=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&a);var n,r,o,i,a},Kn=function(e,t){return $n().browser.isIE()?Xn(e,t):(n=t,r=e.dom,o=n.dom,r!==o&&r.contains(o));var n,r,o},Yn=function(e){return R(e)?e:s},Jn=function(e,t,n){for(var r=e.dom,o=Yn(n);r.parentNode;){r=r.parentNode;var i=hn.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return S.none()},Qn=function(e,t,n){var r=t(e),o=Yn(n);return r.orThunk((function(){return o(e)?S.none():Jn(e,t,o)}))},Zn=function(e,t){return Gn(e.element,t.event.target)},er=function(e){if(!He(e,"can")&&!He(e,"abort")&&!He(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return zt("Extracting event.handler",ft([nn("can",l),nn("abort",s),nn("run",n)]),e)},tr=function(e){var t,n,r,o,i=(n=function(e){return e.can},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return K(t,(function(t,r){return t&&n(r).apply(void 0,e)}),!0)}),a=(r=t=e,o=function(e){return e.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return K(r,(function(t,n){return t||o(n).apply(void 0,e)}),!1)});return er({can:i,abort:a,run:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];W(e,(function(e){e.run.apply(void 0,t)}))}})},nr=o,rr=nr("touchstart"),or=nr("touchmove"),ir=nr("touchend"),ar=nr("touchcancel"),ur=nr("mousedown"),cr=nr("mousemove"),sr=nr("mouseout"),lr=nr("mouseup"),fr=nr("mouseover"),dr=nr("focusin"),mr=nr("focusout"),gr=nr("keydown"),hr=nr("keyup"),pr=nr("input"),vr=nr("change"),br=nr("click"),yr=nr("transitionend"),xr=nr("selectstart"),wr=function(e){return o("alloy."+e)},Cr={tap:wr("tap")},kr=wr("focus"),Sr=wr("blur.post"),_r=wr("paste.post"),Or=wr("receive"),Er=wr("execute"),Tr=wr("focus.item"),zr=Cr.tap,Dr=wr("longpress"),Ar=wr("sandbox.close"),Mr=wr("typeahead.cancel"),Rr=wr("system.init"),Nr=wr("system.touchmove"),Br=wr("system.touchend"),Pr=wr("system.scroll"),Hr=wr("system.resize"),Ir=wr("system.attached"),Lr=wr("system.detached"),Vr=wr("system.dismissRequested"),Fr=wr("system.repositionRequested"),jr=wr("focusmanager.shifted"),Ur=wr("slotcontainer.visibility"),$r=wr("change.tab"),Wr=wr("dismiss.tab"),qr=wr("highlight"),Gr=wr("dehighlight"),Xr=function(e,t){Qr(e,e.element,t,{})},Kr=function(e,t,n){Qr(e,e.element,t,n)},Yr=function(e){Xr(e,Er())},Jr=function(e,t,n){Qr(e,t,n,{})},Qr=function(e,t,n,r){var o=d({target:t},r);e.getSystem().triggerEvent(n,t,o)},Zr=function(e,t,n,r){e.getSystem().triggerEvent(n,t,r.event)},eo=Ze,to=function(e,t){return{key:e,value:er({abort:t})}},no=function(e){return{key:e,value:er({run:function(e,t){t.event.prevent()}})}},ro=function(e,t){return{key:e,value:er({run:t})}},oo=function(e,t,n){return{key:e,value:er({run:function(e,r){t.apply(void 0,[e,r].concat(n))}})}},io=function(e){return function(t){return{key:e,value:er({run:function(e,n){Zn(e,n)&&t(e,n)}})}}},ao=function(e,t,n){var r,o,i=t.partUids[n];return o=i,ro(r=e,(function(e,t){e.getSystem().getByUid(o).each((function(e){Zr(e,e.element,r,t)}))}))},uo=function(e,t){return ro(e,(function(e,n){var r=n.event,o=e.getSystem().getByDom(r.target).fold((function(){return Qn(r.target,(function(t){return e.getSystem().getByDom(t).toOptional()}),s).getOr(e)}),(function(e){return e}));t(e,o,n)}))},co=function(e){return ro(e,(function(e,t){t.cut()}))},so=function(e,t){return io(e)(t)},lo=io(Ir()),fo=io(Lr()),mo=io(Rr()),go=(me=Er(),function(e){return ro(me,e)}),ho=("undefined"!=typeof window||Function("return this;")(),function(e){return e.dom.nodeName.toLowerCase()}),po=function(e){return function(t){return t.dom.nodeType===e}},vo=po(1),bo=po(3),yo=po(9),xo=po(11),wo=function(e){return hn.fromDom(e.dom.ownerDocument)},Co=function(e){return yo(e)?e:wo(e)},ko=function(e){return hn.fromDom(Co(e).dom.documentElement)},So=function(e){return hn.fromDom(Co(e).dom.defaultView)},_o=function(e){return S.from(e.dom.parentNode).map(hn.fromDom)},Oo=_o,Eo=function(e){return S.from(e.dom.offsetParent).map(hn.fromDom)},To=function(e){return $(e.dom.childNodes,hn.fromDom)},zo=function(e,t){var n=e.dom.childNodes;return S.from(n[t]).map(hn.fromDom)},Do=function(e){return xo(e)&&M(e.dom.host)},Ao=R(Element.prototype.attachShadow)&&R(Node.prototype.getRootNode),Mo=o(Ao),Ro=Ao?function(e){return hn.fromDom(e.dom.getRootNode())}:Co,No=function(e){return Do(e)?e:hn.fromDom(Co(e).dom.body)},Bo=function(e){var t=Ro(e);return Do(t)?S.some(t):S.none()},Po=function(e){return hn.fromDom(e.dom.host)},Ho=function(e){return M(e.dom.shadowRoot)},Io=function(e,t){_o(e).each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Lo=function(e,t){var n;(n=e,S.from(n.dom.nextSibling).map(hn.fromDom)).fold((function(){_o(e).each((function(e){Fo(e,t)}))}),(function(e){Io(e,t)}))},Vo=function(e,t){zo(e,0).fold((function(){Fo(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Fo=function(e,t){e.dom.appendChild(t.dom)},jo=function(e,t){W(t,(function(t){Fo(e,t)}))},Uo=function(e){e.dom.textContent="",W(To(e),(function(e){$o(e)}))},$o=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Wo=function(e){var t,n=To(e);0<n.length&&(t=e,W(n,(function(e){Io(t,e)}))),$o(e)},qo=function(e){return e.dom.innerHTML},Go=function(e,t){var n,r,o=wo(e).dom,i=hn.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||document).createElement("div")).innerHTML=n,To(hn.fromDom(r)));jo(i,a),Uo(e),Fo(e,i)},Xo=function(e,t,n){if(!(E(n)||D(n)||N(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Ko=function(e,t,n){Xo(e.dom,t,n)},Yo=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},Jo=function(e,t){return S.from(Yo(e,t))},Qo=function(e,t){var n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},Zo=function(e,t){e.dom.removeAttribute(t)},ei=function(e){return t=e,n=!1,hn.fromDom(t.dom.cloneNode(n));var t,n},ti=function(e){if(Do(e))return"#shadow-root";var t,n,r,o=ei(e);return t=o,n=hn.fromTag("div"),r=hn.fromDom(t.dom.cloneNode(!0)),Fo(n,r),qo(n)},ni=eo([{key:kr(),value:er({can:function(e,t){var n,r,o=t.event,i=o.originator,a=o.target;return r=a,!(Gn(n=i,e.element)&&!Gn(n,r))||(console.warn(kr()+" did not get interpreted by the desired target. \nOriginator: "+ti(i)+"\nTarget: "+ti(a)+"\nCheck the "+kr()+" event handlers"),!1)}})}]),ri=Object.freeze({__proto__:null,events:ni}),oi=0,ii=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++oi+String(t)},ai=o("alloy-id-"),ui=o("data-alloy-id"),ci=ai(),si=ui(),li=function(e,t){Object.defineProperty(e.dom,si,{value:t,writable:!0})},fi=function(e){var t=vo(e)?e.dom[si]:null;return S.from(t)},di=ii,mi=i,gi=function(e){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+(e?"\n"+ti(e().element)+" is not in context.":""))}};return{debugInfo:o("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:s}},hi=gi(),pi=function(e){return $(e,(function(e){return Sn(e,"/*")?e.substring(0,e.length-"/*".length):e}))},vi=function(e,t){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:pi(i)}},e},bi=ii("alloy-premade"),yi=function(e){return Qe(bi,e)},xi=function(e){return t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(void 0,g([t.getApis(),t],n))},n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:pi(i.slice(1))}},t;var t,n,r,o,i},wi={init:function(){return Ci({readState:function(){return"No State required"}})}},Ci=function(e){return e},ki=function(e,t){var n={};return Te(e,(function(e,r){Te(e,(function(e,o){var i=Be(n,o).getOr([]);n[o]=i.concat([t(r,e)])}))})),n},Si=function(e){return{classes:void 0!==e.classes?e.classes:[],attributes:void 0!==e.attributes?e.attributes:{},styles:void 0!==e.styles?e.styles:{}}},_i=function(e){return e.cHandler},Oi=function(e,t){return{name:e,handler:t}},Ei=function(e,t,n){var r,o,i=d(d({},n),(r=e,o={},W(t,(function(e){o[e.name()]=e.handlers(r)})),o));return ki(i,Oi)},Ti=function(e){var t,n=R(t=e)?{can:l,abort:s,run:t}:t;return function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[e,t].concat(r);n.abort.apply(void 0,i)?t.stop():n.can.apply(void 0,i)&&n.run.apply(void 0,i)}},zi=function(e,t,n){var r,o,i=t[n];return i?function(e,t,r,o){try{var i=re(r,(function(n,r){var i=n[t],a=r[t],u=o.indexOf(i),c=o.indexOf(a);if(-1===u)throw new Error("The ordering for "+e+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(o,null,2));if(-1===c)throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(o,null,2));return u<c?-1:c<u?1:0}));return fe.value(i)}catch(n){return fe.error([n])}}("Event: "+n,"name",e,i).map((function(e){var t=$(e,(function(e){return e.handler}));return tr(t)})):(r=n,o=e,fe.error(["The event ("+r+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify($(o,(function(e){return e.name})),null,2)]))},Di=function(e,t){var n=Me(e,(function(e,n){return(1===e.length?fe.value(e[0].handler):zi(e,t,n)).map((function(r){var o=Ti(r),i=1<e.length?G(t[n],(function(t){return F(e,(function(e){return e.name===t}))})).join(" > "):e[0].name;return Qe(n,{handler:o,purpose:i})}))}));return et(n,{})},Ai="alloy.base.behaviour",Mi=function(e){var t,n;return Et("custom.definition",dt([yt("dom","dom",qe(),dt([jt("tag"),nn("styles",{}),nn("classes",[]),nn("attributes",{}),Yt("value"),Yt("innerHtml")])),jt("components"),jt("uid"),nn("events",{}),nn("apis",{}),yt("eventOrder","eventOrder",((t={})[Er()]=["disabling",Ai,"toggling","typeaheadevents"],t[kr()]=[Ai,"focusing","keying"],t[Rr()]=[Ai,"disabling","toggling","representing"],t[pr()]=[Ai,"representing","streaming","invalidating"],t[Lr()]=[Ai,"representing","item-events","tooltipping"],t[ur()]=["focusing",Ai,"item-type-events"],t[rr()]=["focusing",Ai,"item-type-events"],t[fr()]=["item-type-events","tooltipping"],t[Or()]=["receiving","reflecting","tooltipping"],n=t,$e.mergeWithThunk(o(n))),Rt()),Yt("domModification")]),e)},Ri=function(e,t){var n=Yo(e,t);return void 0===n||""===n?[]:n.split(" ")},Ni=function(e){return void 0!==e.dom.classList},Bi=function(e,t){return o=t,i=Ri(n=e,r="class").concat([o]),Ko(n,r,i.join(" ")),!0;var n,r,o,i},Pi=function(e,t){return o=t,0<(i=G(Ri(n=e,r="class"),(function(e){return e!==o}))).length?Ko(n,r,i.join(" ")):Zo(n,r),!1;var n,r,o,i},Hi=function(e,t){Ni(e)?e.dom.classList.add(t):Bi(e,t)},Ii=function(e){0===(Ni(e)?e.dom.classList:Ri(e,"class")).length&&Zo(e,"class")},Li=function(e,t){Ni(e)?e.dom.classList.remove(t):Pi(e,t),Ii(e)},Vi=function(e,t){return Ni(e)&&e.dom.classList.contains(t)},Fi=function(e,t){W(t,(function(t){Hi(e,t)}))},ji=function(e,t){W(t,(function(t){Li(e,t)}))},Ui=function(e){return void 0!==e.style&&R(e.style.getPropertyValue)},$i=function e(t){var n=bo(t)?t.dom.parentNode:t.dom;if(void 0===n||null===n||null===n.ownerDocument)return!1;var r,o,i=n.ownerDocument;return Bo(hn.fromDom(n)).fold((function(){return i.body.contains(n)}),(r=e,o=Po,function(e){return r(o(e))}))},Wi=function(){return qi(hn.fromDom(document))},qi=function(e){var t=e.dom.body;if(null===t||void 0===t)throw new Error("Body is not available yet");return hn.fromDom(t)},Gi=function(e,t,n){if(!E(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Ui(e)&&e.style.setProperty(t,n)},Xi=function(e,t){Ui(e)&&e.style.removeProperty(t)},Ki=function(e,t,n){var r=e.dom;Gi(r,t,n)},Yi=function(e,t){var n=e.dom;Te(t,(function(e,t){Gi(n,t,e)}))},Ji=function(e,t){var n=e.dom;Te(t,(function(e,t){e.fold((function(){Xi(n,t)}),(function(e){Gi(n,t,e)}))}))},Qi=function(e,t){var n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||$i(e)?r:Zi(n,t)},Zi=function(e,t){return Ui(e)?e.style.getPropertyValue(t):""},ea=function(e,t){var n=e.dom,r=Zi(n,t);return S.from(r).filter((function(e){return 0<e.length}))},ta=function(e,t,n){var r=hn.fromTag(e);return Ki(r,t,n),ea(r,t).isSome()},na=function(e,t){var n=e.dom;Xi(n,t),Jo(e,"style").map(_n).is("")&&Zo(e,"style")},ra=function(e){return e.dom.offsetWidth},oa=function(e){return e.dom.value},ia=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},aa=function(e){var t,n,r,o=hn.fromTag(e.tag);t=o,n=e.attributes,r=t.dom,Te(n,(function(e,t){Xo(r,t,e)})),Fi(o,e.classes),Yi(o,e.styles),e.innerHtml.each((function(e){return Go(o,e)}));var i=e.domChildren;return jo(o,i),e.value.each((function(e){ia(o,e)})),e.uid,li(o,e.uid),o},ua=function(e,t){return n=e,o=$(r=t,(function(e){return tn(e.name(),[jt("config"),nn("state",wi)])})),i=Et("component.behaviours",dt(o),n.behaviours).fold((function(e){throw new Error(Dt(e)+"\nComplete spec:\n"+JSON.stringify(n,null,2))}),(function(e){return e})),{list:r,data:ze(i,(function(e){var t=e.map((function(e){return{config:e.config,state:e.state.init(e.config)}}));return function(){return t}}))};var n,r,o,i},ca=function(e){var t,n,r=(t=Be(e,"behaviours").getOr({}),n=G(Oe(t),(function(e){return void 0!==t[e]})),$(n,(function(e){return t[e].me})));return ua(e,r)},sa=function(e,t,n){var r,o,i,a=d(d({},(r=e).dom),{uid:r.uid,domChildren:$(r.components,(function(e){return e.element}))}),u=e.domModification.fold((function(){return Si({})}),Si),c={"alloy.base.modification":u},s=0<t.length?function(e,t,n,r){var o=d({},t);W(n,(function(t){o[t.name()]=t.exhibit(e,r)}));var i=ki(o,(function(e,t){return{name:e,modification:t}})),a=function(e){return X(e,(function(e,t){return d(d({},t.modification),e)}),{})},u=X(i.classes,(function(e,t){return t.modification.concat(e)}),[]),c=a(i.attributes),s=a(i.styles);return Si({classes:u,attributes:c,styles:s})}(n,c,t,a):u;return i=s,d(d({},o=a),{attributes:d(d({},o.attributes),i.attributes),styles:d(d({},o.styles),i.styles),classes:o.classes.concat(i.classes)})},la=function(e,t,n){var r,o,i,a={"alloy.base.behaviour":e.events};return r=n,o=e.eventOrder,i=Ei(r,t,a),Di(i,o).getOrDie()},fa=function(e){var t,n,r,o,i,a,u,c,s,l,f,g,h,p=mi(e),v=p.events,b=m(p,["events"]),y=(t=Be(b,"components").getOr([]),$(t,ha)),x=d(d({},b),{events:d(d({},ri),v),components:y});return fe.value((r=function(){return h},o=mn(hi),i=Tt(Mi(n=x)),a=ca(n),u=a.list,c=a.data,s=sa(i,u,c),l=aa(s),f=la(i,u,c),g=mn(i.components),h={getSystem:o.get,config:function(e){var t=c;return(R(t[e.name()])?t[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(n,null,2))})()},hasConfigured:function(e){return R(c[e.name()])},spec:n,readState:function(e){return c[e]().map((function(e){return e.state.readState()})).getOr("not enabled")},getApis:function(){return i.apis},connect:function(e){o.set(e)},disconnect:function(){o.set(gi(r))},element:l,syncComponents:function(){var e=To(l),t=Z(e,(function(e){return o.get().getByDom(e).fold((function(){return[]}),(function(e){return[e]}))}));g.set(t)},components:g.get,events:f}))},da=function(e){var t=hn.fromText(e);return ma({element:t})},ma=function(e){var t=zt("external.component",ft([jt("element"),Yt("uid")]),e),r=mn(gi());t.uid.each((function(e){li(t.element,e)}));var i={getSystem:r.get,config:S.none,hasConfigured:s,connect:function(e){r.set(e)},disconnect:function(){r.set(gi((function(){return i})))},getApis:function(){return{}},element:t.element,spec:e,readState:o("No state"),syncComponents:n,components:o([]),events:{}};return yi(i)},ga=di,ha=function(e){return Be(e,bi).fold((function(){var t=e.hasOwnProperty("uid")?e:d({uid:ga("")},e);return fa(t).getOrDie()}),(function(e){return e}))},pa=yi,va=function(e,t){var n=function(n){var r=t(n);if(r<=0||null===r){var o=Qi(n,e);return parseFloat(o)||0}return r},r=function(e,t){return K(t,(function(t,n){var r=Qi(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o}),0)};return{set:function(t,n){if(!N(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var r=t.dom;Ui(r)&&(r.style[e]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(e,t,n){var o=r(e,n);return o<t?t-o:0}}},ba=va("height",(function(e){var t=e.dom;return $i(e)?t.getBoundingClientRect().height:t.offsetHeight})),ya=function(e){return ba.get(e)},xa=function(e){return ba.getOuter(e)},wa=function e(t,n){return{left:t,top:n,translate:function(r,o){return e(t+r,n+o)}}},Ca=wa,ka=function(e,t){return void 0!==e?e:void 0!==t?t:0},Sa=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return Ca(n.offsetLeft,n.offsetTop);var i=ka(null==r?void 0:r.pageYOffset,o.scrollTop),a=ka(null==r?void 0:r.pageXOffset,o.scrollLeft),u=ka(o.clientTop,n.clientTop),c=ka(o.clientLeft,n.clientLeft);return _a(e).translate(a-c,i-u)},_a=function(e){var t,n=e.dom,r=n.ownerDocument.body;return r===n?Ca(r.offsetLeft,r.offsetTop):$i(e)?(t=n.getBoundingClientRect(),Ca(t.left,t.top)):Ca(0,0)},Oa=va("width",(function(e){return e.dom.offsetWidth})),Ea=function(e){return Oa.get(e)},Ta=function(e){return Oa.getOuter(e)},za=function(e){var t=hn.fromDom(function(e){if(Mo()&&M(e.target)){var t=hn.fromDom(e.target);if(vo(t)&&Ho(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return ie(n)}}return S.from(e.target)}(e).getOr(e.target)),n=function(){return e.stopPropagation()},o=function(){return e.preventDefault()},i=r(o,n);return{target:t,x:e.clientX,y:e.clientY,stop:n,prevent:o,kill:i,raw:e}},Da=function(e,t,n,r,o){var i,u,c=(i=n,u=r,function(e){i(e)&&u(za(e))});return e.dom.addEventListener(t,c,o),{unbind:a(Aa,e,t,c,o)}},Aa=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Ma=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Ca(n,r)},Ra=function(e,t,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(e,t)},Na=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Ba=function(e){var t,n,r=void 0===e?window:e,o=r.document,i=Ma(hn.fromDom(o));return n=void 0===(t=r)?window:t,S.from(n.visualViewport).fold((function(){var e=r.document.documentElement,t=e.clientWidth,n=e.clientHeight;return Na(i.left,i.top,t,n)}),(function(e){return Na(Math.max(e.pageLeft,i.left),Math.max(e.pageTop,i.top),e.width,e.height)}))},Pa=function e(t,n){return t.view(n).fold(o([]),(function(n){var r=t.owner(n),o=e(t,r);return[n].concat(o)}))},Ha=Object.freeze({__proto__:null,view:function(e){var t;return(e.dom===document?S.none():S.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(hn.fromDom)},owner:wo}),Ia=function(e){var t,n,r,o,i=hn.fromDom(document),u=Ma(i);return(t=e,r=(n=Ha).owner(t),o=Pa(n,r),S.some(o)).fold(a(Sa,e),(function(t){var n=_a(e),r=X(t,(function(e,t){var n=_a(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return Ca(r.left+n.left+u.left,r.top+n.top+u.top)}))},La=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Va=function(e){var t=Sa(e),n=Ta(e),r=xa(e);return La(t.left,t.top,n,r)},Fa=function(e){var t=Ia(e),n=Ta(e),r=xa(e);return La(t.left,t.top,n,r)},ja=function(){return Ba(window)};function Ua(e,t,n,r,o){return e(n,r)?S.some(n):R(o)&&o(n)?S.none():t(n,r,o)}var $a,Wa,qa=function(e,t,n){for(var r=e.dom,o=R(n)?n:s;r.parentNode;){r=r.parentNode;var i=hn.fromDom(r);if(t(i))return S.some(i);if(o(i))break}return S.none()},Ga=function(e,t,n){return Ua((function(e,t){return t(e)}),qa,e,t,n)},Xa=function(e,t,n){return Ga(e,t,n).isSome()},Ka=function(e,t,n){return qa(e,(function(e){return Wn(e,t)}),n)},Ya=function(e,t){return n=t,o=void 0===(r=e)?document:r.dom,qn(o)?S.none():S.from(o.querySelector(n)).map(hn.fromDom);var n,r,o},Ja=function(e,t,n){return Ua(Wn,Ka,e,t,n)},Qa=function(){var e=ii("aria-owns");return{id:e,link:function(t){Ko(t,"aria-owns",e)},unlink:function(e){Zo(e,"aria-owns")}}},Za=function(e,t){return Ga(t,(function(e){if(!vo(e))return!1;var t=Yo(e,"id");return void 0!==t&&-1<t.indexOf("aria-owns")})).bind((function(e){var t=Yo(e,"id"),n=Ro(e);return Ya(n,'[aria-owns="'+t+'"]')})).exists((function(t){return eu(e,t)}))},eu=function(e,t){return Xa(t,(function(t){return Gn(t,e.element)}),s)||Za(e,t)},tu="unknown";(Wa=$a=$a||{})[Wa.STOP=0]="STOP",Wa[Wa.NORMAL=1]="NORMAL",Wa[Wa.LOGGING=2]="LOGGING";var nu,ru,ou=mn({}),iu=["alloy/data/Fields","alloy/debugging/Debugging"],au=function(e,t,n){var r,o,i,a;switch(Be(ou.get(),e).orThunk((function(){var t=Oe(ou.get());return ce(t,(function(t){return-1<e.indexOf(t)?S.some(ou.get()[t]):S.none()}))})).getOr($a.NORMAL)){case $a.NORMAL:return n(uu());case $a.LOGGING:var u=(r=e,o=t,i=[],a=(new Date).getTime(),{logEventCut:function(e,t,n){i.push({outcome:"cut",target:t,purpose:n})},logEventStopped:function(e,t,n){i.push({outcome:"stopped",target:t,purpose:n})},logNoParent:function(e,t,n){i.push({outcome:"no-parent",target:t,purpose:n})},logEventNoHandlers:function(e,t){i.push({outcome:"no-handlers-left",target:t})},logEventResponse:function(e,t,n){i.push({outcome:"response",purpose:n,target:t})},write:function(){var e=(new Date).getTime();V(["mousemove","mouseover","mouseout",Rr()],r)||console.log(r,{event:r,time:e-a,target:o.dom,sequence:$(i,(function(e){return V(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+ti(e.target)+")":e.outcome}))})}}),c=n(u);return u.write(),c;case $a.STOP:return!0}},uu=o({logEventCut:n,logEventStopped:n,logNoParent:n,logEventNoHandlers:n,logEventResponse:n,write:n}),cu=o([jt("menu"),jt("selectedMenu")]),su=o([jt("item"),jt("selectedItem")]),lu=(o(dt(su().concat(cu()))),o(dt(su()))),fu=Gt("initSize",[jt("numColumns"),jt("numRows")]),du=function(){return Gt("markers",[jt("backgroundMenu")].concat(cu()).concat(su()))},mu=function(e){return Gt("markers",$(e,jt))},gu=function(e,t,n){return function(){var e=new Error;if(void 0!==e.stack){var t=e.stack.split("\n");Y(t,(function(e){return 0<e.indexOf("alloy")&&!F(iu,(function(t){return-1<e.indexOf(t)}))})).getOr(tu)}}(),yt(t,t,n,_t((function(e){return fe.value((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(void 0,t)}))})))},hu=function(e){return gu(0,e,We(n))},pu=function(e){return gu(0,e,We(S.none))},vu=function(e){return gu(0,e,qe())},bu=function(e){return gu(0,e,qe())},yu=function(e,t){return dn(e,o(t))},xu=function(e){return dn(e,i)},wu=o(fu),Cu=function(e,t,n,r,o,i){return{x:e,y:t,bubble:n,direction:r,boundsRestriction:o,label:i}},ku=Ie([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Su=ku.southeast,_u=ku.southwest,Ou=ku.northeast,Eu=ku.northwest,Tu=ku.south,zu=ku.north,Du=ku.east,Au=ku.west,Mu=function(e,t){return function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(["left","right","top","bottom"],(function(n){return Be(t,n).map((function(t){return function(e,t){switch(t){case 1:return e.x;case 0:return e.x+e.width;case 2:return e.y;case 3:return e.y+e.height}}(e,t)}))}))},Ru=function(e){return e.x},Nu=function(e,t){return e.x+e.width/2-t.width/2},Bu=function(e,t){return e.x+e.width-t.width},Pu=function(e,t){return e.y-t.height},Hu=function(e){return e.y+e.height},Iu=function(e,t){return e.y+e.height/2-t.height/2},Lu=function(e,t,n){return Cu(Ru(e),Hu(e),n.southeast(),Su(),Mu(e,{left:1,top:3}),"layout-se")},Vu=function(e,t,n){return Cu(Bu(e,t),Hu(e),n.southwest(),_u(),Mu(e,{right:0,top:3}),"layout-sw")},Fu=function(e,t,n){return Cu(Ru(e),Pu(e,t),n.northeast(),Ou(),Mu(e,{left:1,bottom:2}),"layout-ne")},ju=function(e,t,n){return Cu(Bu(e,t),Pu(e,t),n.northwest(),Eu(),Mu(e,{right:0,bottom:2}),"layout-nw")},Uu=function(e,t,n){return Cu(Nu(e,t),Pu(e,t),n.north(),zu(),Mu(e,{bottom:2}),"layout-n")},$u=function(e,t,n){return Cu(Nu(e,t),Hu(e),n.south(),Tu(),Mu(e,{top:3}),"layout-s")},Wu=function(e,t,n){return Cu((r=e).x+r.width,Iu(e,t),n.east(),Du(),Mu(e,{left:0}),"layout-e");var r},qu=function(e,t,n){return Cu((r=t,e.x-r.width),Iu(e,t),n.west(),Au(),Mu(e,{right:1}),"layout-w");var r},Gu=function(){return[Lu,Vu,Fu,ju,$u,Uu,Wu,qu]},Xu=function(){return[Vu,Lu,ju,Fu,$u,Uu,Wu,qu]},Ku=function(){return[Fu,ju,Lu,Vu,Uu,$u]},Yu=function(){return[ju,Fu,Vu,Lu,Uu,$u]},Ju=function(){return[Lu,Vu,Fu,ju,$u,Uu]},Qu=function(){return[Vu,Lu,ju,Fu,$u,Uu]},Zu=Object.freeze({__proto__:null,events:function(e){return eo([ro(Or(),(function(t,n){var r,o,i=e.channels,a=Oe(i),u=n,c=(r=a,(o=u).universal?r:G(r,(function(e){return V(o.channels,e)})));W(c,(function(e){var n=i[e],r=n.schema,o=zt("channel["+e+"] data\nReceiver: "+ti(t.element),r,u.data);n.onReceive(t,o)}))}))])}}),ec=[Ut("channels",Ot(fe.value,ft([vu("onReceive"),nn("schema",Rt())])))],tc=function(e,t,n){return mo((function(r,o){n(r,e,t)}))},nc=function(e,t,n,r,o,i){var a=ft(e),u=tn(t,[Jt("config",ft(e))]);return ic(a,u,t,n,r,o,i)},rc=function(e,t,n){var r,i,a,u,c,s;return r=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var u=[r].concat(i);return r.config({name:o(e)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+n)}),(function(e){var n=Array.prototype.slice.call(u,1);return t.apply(void 0,[r,e.config,e.state].concat(n))}))},i=n,a=t.toString(),u=a.indexOf(")")+1,c=a.indexOf("("),s=a.substring(c+1,u-1).split(/,\s*/),r.toFunctionAnnotation=function(){return{name:i,parameters:pi(s.slice(0,1).concat(s.slice(3)))}},r},oc=function(e){return{key:e,value:void 0}},ic=function(e,t,n,r,i,u,c){var s=function(e){return He(e,n)?e[n]():S.none()},l=ze(i,(function(e,t){return rc(n,e,t)})),f=ze(u,vi),m=d(d(d({},f),l),{revoke:a(oc,n),config:function(t){var r=zt(n+"-config",e,t);return{key:n,value:{config:r,me:m,configAsRaw:Ue((function(){return zt(n+"-config",e,t)})),initialConfig:t,state:c}}},schema:o(t),exhibit:function(e,t){return s(e).bind((function(e){return Be(r,"exhibit").map((function(n){return n(t,e.config,e.state)}))})).getOr(Si({}))},name:o(n),handlers:function(e){return s(e).map((function(e){return Be(r,"events").getOr((function(){return{}}))(e.config,e.state)})).getOr({})}});return m},ac=Ze,uc=ft([jt("fields"),jt("name"),nn("active",{}),nn("apis",{}),nn("state",wi),nn("extra",{})]),cc=function(e){var t=zt("Creating behaviour: "+e.name,uc,e);return nc(t.fields,t.name,t.active,t.apis,t.extra,t.state)},sc=ft([jt("branchKey"),jt("branches"),jt("name"),nn("active",{}),nn("apis",{}),nn("state",wi),nn("extra",{})]),lc=function(e){var t,n,r,o,i,a,u,c,s=zt("Creating behaviour: "+e.name,sc,e);return t=Mt(s.branchKey,s.branches),n=s.name,r=s.active,o=s.apis,i=s.extra,a=s.state,c=tn(n,[Jt("config",u=t)]),ic(u,c,n,r,o,i,a)},fc=o(void 0),dc=cc({fields:ec,name:"receiving",active:Zu}),mc=Object.freeze({__proto__:null,exhibit:function(e,t){return Si({classes:[],styles:t.useFixed()?{}:{position:"relative"}})}}),gc=function(e){return e.dom.focus()},hc=function(e){return void 0===e&&(e=hn.fromDom(document)),S.from(e.dom.activeElement).map(hn.fromDom)},pc=function(e){return hc(Ro(e)).filter((function(t){return e.dom.contains(t.dom)}))},vc=function(e,t){var r=Ro(t),o=hc(r).bind((function(e){var n,r,o=function(t){return Gn(e,t)};return o(t)?S.some(t):(n=o,(r=function(e){for(var t=0;t<e.childNodes.length;t++){var o=hn.fromDom(e.childNodes[t]);if(n(o))return S.some(o);var i=r(e.childNodes[t]);if(i.isSome())return i}return S.none()})(t.dom))})),i=e(t);return o.each((function(e){hc(r).filter((function(t){return Gn(t,e)})).fold((function(){gc(e)}),n)})),i},bc=function(e,t,n,r,o){return{position:e,left:t,top:n,right:r,bottom:o}},yc=function(e,t){var n=function(e){return e+"px"};Ji(e,{position:S.some(t.position),left:t.left.map(n),top:t.top.map(n),right:t.right.map(n),bottom:t.bottom.map(n)})},xc=Ie([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),wc=function(e,t,n,r,o,i){var a,u,c,s,l,f,d,m,g,h=t.x-n,p=t.y-r,v=o-(h+t.width),b=i-(p+t.height),y=S.some(h),x=S.some(p),w=S.some(v),C=S.some(b),k=S.none();return a=t.direction,u=function(){return bc(e,y,x,k,k)},c=function(){return bc(e,k,x,w,k)},s=function(){return bc(e,y,k,k,C)},l=function(){return bc(e,k,k,w,C)},f=function(){return bc(e,y,x,k,k)},d=function(){return bc(e,y,k,k,C)},m=function(){return bc(e,y,x,k,k)},g=function(){return bc(e,k,x,w,k)},a.fold(u,c,s,l,f,d,m,g)},Cc=function(e,t){var n=a(Ia,t),r=e.fold(n,n,(function(){var e=Ma();return Ia(t).translate(-e.left,-e.top)})),o=Ta(t),i=xa(t);return La(r.left,r.top,o,i)},kc=function(e,t,n){var r=Ca(t,n);return e.fold(o(r),o(r),(function(){var e=Ma();return r.translate(-e.left,-e.top)}))},Sc=(xc.none,xc.relative),_c=xc.fixed,Oc=function(e,t,n,r){var o=e+t;return r<o?n:o<n?r:o},Ec=function(e,t,n){return Math.min(Math.max(e,t),n)},Tc=Ie([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),zc=function(e,t,n,r){var a,u,c,s,l,f,d,m,g,h,p,v,b,y,x,w,C,k,_,O,E,T,z,D,A,M,R,N,B,P,H,I,L,V=e.x,F=e.y,j=e.bubble.offset,U=j.left,$=j.top,W=(a=r,u=e.boundsRestriction,c=j,l=(s=function(e,t){var n="top"===e||"bottom"===e?c.top:c.left;return Be(u,e).bind(i).bind((function(n){return"left"===e||"top"===e?t<=n?S.some(n):S.none():n<=t?S.some(n):S.none()})).map((function(e){return e+n})).getOr(t)})("left",a.x),f=s("top",a.y),d=s("right",a.right),m=s("bottom",a.bottom),La(l,f,d-l,m-f)),q=W.y,G=W.bottom,X=W.x,K=W.right,Y=F+$,J=(g=V+U,h=Y,p=t,v=n,y=(b=W).x,x=b.y,w=b.width,C=b.height,_=x<=h,O=(k=y<=g)&&_,E=g+p<=y+w&&h+v<=x+C,T=Math.abs(Math.min(p,k?y+w-g:y-(g+p))),z=Math.abs(Math.min(v,_?x+C-h:x-(h+v))),D=Math.max(b.x,b.right-p),A=Math.max(b.y,b.bottom-v),{originInBounds:O,sizeInBounds:E,limitX:Ec(g,b.x,D),limitY:Ec(h,b.y,A),deltaW:T,deltaH:z}),Q=J.originInBounds,Z=J.sizeInBounds,ee=J.limitX,te=J.limitY,ne=J.deltaW,re=J.deltaH,oe=o(te+re-q),ie=o(G-te),ae=(M=e.direction,N=R=ie,B=oe,M.fold(R,R,B,B,R,B,N,N)),ue=o(ee+ne-X),ce=o(K-ee),se={x:ee,y:te,width:ne,height:re,maxHeight:ae,maxWidth:(P=e.direction,I=H=ce,L=ue,P.fold(H,L,H,L,I,I,H,L)),direction:e.direction,classes:{on:e.bubble.classesOn,off:e.bubble.classesOff},label:e.label,candidateYforTest:Y};return Q&&Z?Tc.fit(se):Tc.nofit(se,ne,re)},Dc=function(e,t,n,r){na(t,"max-height"),na(t,"max-width");var o,u,c,s,l,f,d,m,g,h={width:Ta(o=t),height:xa(o)};return u=r.preference,c=e,s=h,l=n,f=r.bounds,d=s.width,m=s.height,g=function(e,t,n,r){var o=e(c,s,l);return zc(o,d,m,f).fold(Tc.fit,(function(e,o,i){return r<i||n<o?Tc.nofit(e,o,i):Tc.nofit(t,n,r)}))},K(u,(function(e,t){var n=a(g,t);return e.fold(Tc.fit,n)}),Tc.nofit({x:c.x,y:c.y,width:s.width,height:s.height,maxHeight:s.height,maxWidth:s.width,direction:Su(),classes:{on:[],off:[]},label:"none",candidateYforTest:c.y},-1,-1)).fold(i,i)},Ac=function(e,t,n){var r,o;yc(e,(r=n.origin,o=t,r.fold((function(){return bc("absolute",S.some(o.x),S.some(o.y),S.none(),S.none())}),(function(e,t,n,r){return wc("absolute",o,e,t,n,r)}),(function(e,t,n,r){return wc("fixed",o,e,t,n,r)}))))},Mc=function(e,t){var n,r,o;n=e,r=Math.floor(t),o=ba.max(n,r,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]),Ki(n,"max-height",o+"px")},Rc=o((function(e,t){Mc(e,t),Yi(e,{"overflow-x":"hidden","overflow-y":"auto"})})),Nc=o((function(e,t){Mc(e,t)})),Bc=function(e,t,n){return void 0===e[t]?n:e[t]},Pc=function(e,t,r,o,i,a){var u,c=Bc(a,"maxHeightFunction",Rc()),s=Bc(a,"maxWidthFunction",n),l=e.anchorBox,f=e.origin,d={bounds:(u=f,i.fold((function(){return u.fold(ja,ja,La)}),(function(e){return u.fold(e,e,(function(){var t=e(),n=kc(u,t.x,t.y);return La(n.left,n.top,t.width,t.height)}))}))),origin:f,preference:o,maxHeightFunction:c,maxWidthFunction:s};Hc(l,t,r,d)},Hc=function(e,t,n,r){var o,i,a,u,c,s,l=Dc(e,t,n,r);Ac(t,l,r),o=t,i=l.classes,ji(o,i.off),Fi(o,i.on),a=t,u=l,(0,r.maxHeightFunction)(a,u.maxHeight),c=t,s=l,(0,r.maxWidthFunction)(c,s.maxWidth)},Ic=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],Lc=function(e,t,n){var r=function(e){return Be(n,e).getOr([])},o=function(e,t,n){var o=ne(Ic,n);return{offset:Ca(e,t),classesOn:Z(n,r),classesOff:Z(o,r)}};return{southeast:function(){return o(-e,t,["top","alignLeft"])},southwest:function(){return o(e,t,["top","alignRight"])},south:function(){return o(-e/2,t,["top","alignCentre"])},northeast:function(){return o(-e,-t,["bottom","alignLeft"])},northwest:function(){return o(e,-t,["bottom","alignRight"])},north:function(){return o(-e/2,-t,["bottom","alignCentre"])},east:function(){return o(e,-t/2,["valignCentre","left"])},west:function(){return o(-e,-t/2,["valignCentre","right"])},innerNorthwest:function(){return o(-e,t,["top","alignRight"])},innerNortheast:function(){return o(e,t,["top","alignLeft"])},innerNorth:function(){return o(-e/2,t,["top","alignCentre"])},innerSouthwest:function(){return o(-e,-t,["bottom","alignRight"])},innerSoutheast:function(){return o(e,-t,["bottom","alignLeft"])},innerSouth:function(){return o(-e/2,-t,["bottom","alignCentre"])},innerWest:function(){return o(e,-t/2,["valignCentre","right"])},innerEast:function(){return o(-e,-t/2,["valignCentre","left"])}}},Vc=function(){return Lc(0,0,{})},Fc=function(e,t){return function(n){return"rtl"===jc(n)?t:e}},jc=function(e){return"rtl"===Qi(e,"direction")?"rtl":"ltr"};(ru=nu=nu||{}).TopToBottom="toptobottom",ru.BottomToTop="bottomtotop";var Uc,$c,Wc,qc,Gc,Xc="data-alloy-vertical-dir",Kc=function(e){return Xa(e,(function(e){return vo(e)&&Yo(e,"data-alloy-vertical-dir")===nu.BottomToTop}))},Yc=function(){return tn("layouts",[jt("onLtr"),jt("onRtl"),Yt("onBottomLtr"),Yt("onBottomRtl")])},Jc=function(e,t,n,r,o,i,a){var u=a.map(Kc).getOr(!1),c=t.layouts.map((function(t){return t.onLtr(e)})),s=t.layouts.map((function(t){return t.onRtl(e)})),l=u?t.layouts.bind((function(t){return t.onBottomLtr.map((function(t){return t(e)}))})).or(c).getOr(o):c.getOr(n),f=u?t.layouts.bind((function(t){return t.onBottomRtl.map((function(t){return t(e)}))})).or(s).getOr(i):s.getOr(r);return Fc(l,f)(e)},Qc=[jt("hotspot"),Yt("bubble"),nn("overrides",{}),Yc(),yu("placement",(function(e,t,n){var r=t.hotspot,o=Cc(n,r.element),i=Jc(e.element,t,Ju(),Qu(),Ku(),Yu(),S.some(t.hotspot.element));return S.some({anchorBox:o,bubble:t.bubble.getOr(Vc()),overrides:t.overrides,layouts:i,placer:S.none()})}))],Zc=[jt("x"),jt("y"),nn("height",0),nn("width",0),nn("bubble",Vc()),nn("overrides",{}),Yc(),yu("placement",(function(e,t,n){var r=kc(n,t.x,t.y),o=La(r.left,r.top,t.width,t.height),i=Jc(e.element,t,Gu(),Xu(),Gu(),Xu(),S.none());return S.some({anchorBox:o,bubble:t.bubble,overrides:t.overrides,layouts:i,placer:S.none()})}))],es=Ie([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),ts=function(e){return e.fold(i,(function(e,t,n){return e.translate(-t,-n)}))},ns=function(e){return e.fold(i,i)},rs=function(e){return K(e,(function(e,t){return e.translate(t.left,t.top)}),Ca(0,0))},os=function(e){var t=$(e,ns);return rs(t)},is=es.screen,as=es.absolute,us=function(e,t,n){var r,o,i=wo(e.element),a=Ma(i),u=(r=e,o=So(n.root).dom,S.from(o.frameElement).map(hn.fromDom).filter((function(e){var t=wo(e),n=wo(r.element);return Gn(t,n)})).map(Sa).getOr(a));return as(u,a.left,a.top)},cs=function(e,t,n,r){var o=e,i=t,a=n,u=r;e<0&&(o=0,a=n+e),t<0&&(i=0,u=r+t);var c=is(Ca(o,i));return S.some({point:c,width:a,height:u})},ss=function(e,t,n,r,o){return e.map((function(e){var i,a,u,c=[t,e.point],s=(i=function(){return os(c)},a=function(){return os(c)},u=function(){return e=$(c,ts),rs(e);var e},r.fold(i,a,u)),l={x:s.left,y:s.top,width:e.width,height:e.height},f=(n.showAbove?Ku:Ju)(),d=(n.showAbove?Yu:Qu)(),m=Jc(o,n,f,d,f,d,S.none());return{anchorBox:l,bubble:n.bubble.getOr(Vc()),overrides:n.overrides,layouts:m,placer:S.none()}}))},ls=[jt("node"),jt("root"),Yt("bubble"),Yc(),nn("overrides",{}),nn("showAbove",!1),yu("placement",(function(e,t,n){var r=us(e,0,t);return t.node.filter($i).bind((function(o){var i=o.dom.getBoundingClientRect(),a=cs(i.left,i.top,i.width,i.height),u=t.node.getOr(e.element);return ss(a,r,t,n,u)}))}))],fs=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},ds=Ie([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ms=(ds.before,ds.on,ds.after,function(e){return e.fold(i,i,i)}),gs=Ie([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),hs={domRange:gs.domRange,relative:gs.relative,exact:gs.exact,exactFromRange:function(e){return gs.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){var t=e.match({domRange:function(e){return hn.fromDom(e.startContainer)},relative:function(e,t){return ms(e)},exact:function(e,t,n,r){return e}});return So(t)},range:fs},ps=function(e,t,n){var r,o,i=e.document.createRange();return r=i,t.fold((function(e){r.setStartBefore(e.dom)}),(function(e,t){r.setStart(e.dom,t)}),(function(e){r.setStartAfter(e.dom)})),o=i,n.fold((function(e){o.setEndBefore(e.dom)}),(function(e,t){o.setEnd(e.dom,t)}),(function(e){o.setEndAfter(e.dom)})),i},vs=function(e,t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(r.dom,o),i},bs=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},ys=Ie([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),xs=function(e,t,n){return t(hn.fromDom(n.startContainer),n.startOffset,hn.fromDom(n.endContainer),n.endOffset)},ws=function(e,t){var n,r,i,a=(n=e,t.match({domRange:function(e){return{ltr:o(e),rtl:S.none}},relative:function(e,t){return{ltr:Ue((function(){return ps(n,e,t)})),rtl:Ue((function(){return S.some(ps(n,t,e))}))}},exact:function(e,t,r,o){return{ltr:Ue((function(){return vs(n,e,t,r,o)})),rtl:Ue((function(){return S.some(vs(n,r,o,e,t))}))}}}));return(i=(r=a).ltr()).collapsed?r.rtl().filter((function(e){return!1===e.collapsed})).map((function(e){return ys.rtl(hn.fromDom(e.endContainer),e.endOffset,hn.fromDom(e.startContainer),e.startOffset)})).getOrThunk((function(){return xs(0,ys.ltr,i)})):xs(0,ys.ltr,i)},Cs=(ys.ltr,ys.rtl,Uc=bo,$c="text",{get:function(e){if(!Uc(e))throw new Error("Can only get "+$c+" value of a "+$c+" node");return Wc(e).getOr("")},getOption:Wc=function(e){return Uc(e)?S.from(e.dom.nodeValue):S.none()},set:function(e,t){if(!Uc(e))throw new Error("Can only set raw "+$c+" value of a "+$c+" node");e.dom.nodeValue=t}}),ks=function(e){return Cs.getOption(e)},Ss=["img","br"],_s=function(e){return ks(e).filter((function(e){return 0!==e.trim().length||-1<e.indexOf(" ")})).isSome()||V(Ss,ho(e))},Os=function(e,t){var n=function e(n){for(var r=To(n),o=r.length-1;0<=o;o--){var i=r[o];if(t(i))return S.some(i);var a=e(i);if(a.isSome())return a}return S.none()};return n(e)},Es=function(e,t){return n=t,o=void 0===(r=e)?document:r.dom,qn(o)?[]:$(o.querySelectorAll(n),hn.fromDom);var n,r,o},Ts=function(e,t,n,r){var o,i,a,u,c,s=(i=t,a=n,u=r,(c=wo(o=e).dom.createRange()).setStart(o.dom,i),c.setEnd(a.dom,u),c),l=Gn(e,n)&&t===r;return s.collapsed&&!l},zs=function(e){if(0<e.rangeCount){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return S.some(fs(hn.fromDom(t.startContainer),t.startOffset,hn.fromDom(n.endContainer),n.endOffset))}return S.none()},Ds=function(e){if(null===e.anchorNode||null===e.focusNode)return zs(e);var t=hn.fromDom(e.anchorNode),n=hn.fromDom(e.focusNode);return Ts(t,e.anchorOffset,n,e.focusOffset)?S.some(fs(t,e.anchorOffset,n,e.focusOffset)):zs(e)},As=function(e){return t=e,S.from(t.getSelection()).filter((function(e){return 0<e.rangeCount})).bind(Ds);var t},Ms=function(e,t){var n,r,o,i,a=ws(n=e,t).match({ltr:function(e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom,t),i.setEnd(r.dom,o),i},rtl:function(e,t,r,o){var i=n.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,t),i}});return o=(r=a).getClientRects(),0<(i=0<o.length?o[0]:r.getBoundingClientRect()).width||0<i.height?S.some(i).map(bs):S.none()},Rs=function(e,t){return{element:e,offset:t}},Ns=function(e,t){var n=To(e);if(0===n.length)return Rs(e,t);if(t<n.length)return Rs(n[t],0);var r,o=n[n.length-1],i=bo(o)?(r=o,Cs.get(r).length):To(o).length;return Rs(o,i)},Bs=function(e,t){return(bo(e)?Rs:Ns)(e,t)},Ps=function(e,t){return t.getSelection.getOrThunk((function(){return function(){return As(e)}}))().map((function(e){var t=Bs(e.start,e.soffset),n=Bs(e.finish,e.foffset);return hs.range(t.element,t.offset,n.element,n.offset)}))},Hs=[Yt("getSelection"),jt("root"),Yt("bubble"),Yc(),nn("overrides",{}),nn("showAbove",!1),yu("placement",(function(e,t,n){var r=So(t.root).dom,o=us(e,0,t),i=Ps(r,t).bind((function(e){return Ms(r,hs.exactFromRange(e)).orThunk((function(){var t=hn.fromText("\ufeff");return Io(e.start,t),Ms(r,hs.exact(t,0,t,1)).map((function(e){return $o(t),e}))})).bind((function(e){return cs(e.left,e.top,e.width,e.height)}))})),a=Ps(r,t).bind((function(e){return vo(e.start)?S.some(e.start):Oo(e.start)})).getOr(e.element);return ss(i,o,t,n,a)}))],Is=function(e){return e.x+e.width},Ls=function(e,t){return e.x-t.width},Vs=function(e,t){return e.y-t.height+e.height},Fs=function(e){return e.y},js=function(e,t,n){return Cu(Is(e),Fs(e),n.southeast(),Su(),Mu(e,{left:0,top:2}),"link-layout-se")},Us=function(e,t,n){return Cu(Ls(e,t),Fs(e),n.southwest(),_u(),Mu(e,{right:1,top:2}),"link-layout-sw")},$s=function(e,t,n){return Cu(Is(e),Vs(e,t),n.northeast(),Ou(),Mu(e,{left:0,bottom:3}),"link-layout-ne")},Ws=function(e,t,n){return Cu(Ls(e,t),Vs(e,t),n.northwest(),Eu(),Mu(e,{right:1,bottom:3}),"link-layout-nw")},qs=function(){return[js,Us,$s,Ws]},Gs=function(){return[Us,js,Ws,$s]},Xs=[jt("item"),Yc(),nn("overrides",{}),yu("placement",(function(e,t,n){var r=Cc(n,t.item.element),o=Jc(e.element,t,qs(),Gs(),qs(),Gs(),S.none());return S.some({anchorBox:r,bubble:Vc(),overrides:t.overrides,layouts:o,placer:S.none()})}))],Ks=Mt("anchor",{selection:Hs,node:ls,hotspot:Qc,submenu:Xs,makeshift:Zc}),Ys=function(e,t,n,r,o){var i={anchorBox:n.anchorBox,origin:t};Pc(i,o.element,n.bubble,n.layouts,r,n.overrides)},Js=function(e,t,n,r,o,i){var a=i.map(Va);return Qs(e,t,n,r,o,a)},Qs=function(e,t,n,r,i,a){var u=zt("positioning anchor.info",Ks,r);vc((function(){Ki(i.element,"position","fixed");var n=ea(i.element,"visibility");Ki(i.element,"visibility","hidden");var r,c,s,l,f=t.useFixed()?(l=document.documentElement,_c(0,0,l.clientWidth,l.clientHeight)):(c=Sa((r=e).element),s=r.element.dom.getBoundingClientRect(),Sc(c.left,c.top,s.width,s.height)),d=u.placement,m=a.map(o).or(t.getBounds);d(e,u,f).each((function(t){t.placer.getOr(Ys)(e,f,t,m,i)})),n.fold((function(){na(i.element,"visibility")}),(function(e){Ki(i.element,"visibility",e)})),ea(i.element,"left").isNone()&&ea(i.element,"top").isNone()&&ea(i.element,"right").isNone()&&ea(i.element,"bottom").isNone()&&ea(i.element,"position").is("fixed")&&na(i.element,"position")}),i.element)},Zs=Object.freeze({__proto__:null,position:function(e,t,n,r,o){Js(e,t,n,r,o,S.none())},positionWithin:Js,positionWithinBounds:Qs,getMode:function(e,t,n){return t.useFixed()?"fixed":"absolute"}}),el=[nn("useFixed",s),Yt("getBounds")],tl=cc({fields:el,name:"positioning",active:mc,apis:Zs}),nl=function e(t){Xr(t,Lr());var n=t.components();W(n,e)},rl=function e(t){var n=t.components();W(n,e),Xr(t,Ir())},ol=function(e,t){Fo(e.element,t.element)},il=function(e,t){var n,r=e.components();W((n=e).components(),(function(e){return $o(e.element)})),Uo(n.element),n.syncComponents();var o=ne(r,t);W(o,(function(t){nl(t),e.getSystem().removeFromWorld(t)})),W(t,(function(t){t.getSystem().isConnected()?ol(e,t):(e.getSystem().addToWorld(t),ol(e,t),$i(e.element)&&rl(t)),e.syncComponents()}))},al=function(e,t){ul(e,t,Fo)},ul=function(e,t,n){e.getSystem().addToWorld(t),n(e.element,t.element),$i(e.element)&&rl(t),e.syncComponents()},cl=function(e){nl(e),$o(e.element),e.getSystem().removeFromWorld(e)},sl=function(e){var t=_o(e.element).bind((function(t){return e.getSystem().getByDom(t).toOptional()}));cl(e),t.each((function(e){e.syncComponents()}))},ll=function(e){var t=e.components();W(t,cl),Uo(e.element),e.syncComponents()},fl=function(e,t){dl(e,t,Fo)},dl=function(e,t,n){n(e,t.element);var r=To(t.element);W(r,(function(e){t.getByDom(e).each(rl)}))},ml=function(e){var t=To(e.element);W(t,(function(t){e.getByDom(t).each(nl)})),$o(e.element)},gl=function(e,t,n,r){n.get().each((function(t){ll(e)}));var o=t.getAttachPoint(e);al(o,e);var i=e.getSystem().build(r);return al(e,i),n.set(i),i},hl=function(e,t,n,r){var o=gl(e,t,n,r);return t.onOpen(e,o),o},pl=function(e,t,n){n.get().each((function(r){ll(e),sl(e),t.onClose(e,r),n.clear()}))},vl=function(e,t,n){return n.isOpen()},bl=function(e,t,n){var r,o,i,a,u=t.getAttachPoint(e);Ki(e.element,"position",tl.getMode(u)),r=e,o="visibility",i=t.cloakVisibilityAttr,a="hidden",ea(r.element,o).fold((function(){Zo(r.element,i)}),(function(e){Ko(r.element,i,e)})),Ki(r.element,o,a)},yl=function(e,t,n){var r,o,i,a;r=e.element,F(["top","left","right","bottom"],(function(e){return ea(r,e).isSome()}))||na(e.element,"position"),o=e,i="visibility",a=t.cloakVisibilityAttr,Jo(o.element,a).fold((function(){return na(o.element,i)}),(function(e){return Ki(o.element,i,e)}))},xl=Object.freeze({__proto__:null,cloak:bl,decloak:yl,open:hl,openWhileCloaked:function(e,t,n,r,o){bl(e,t),hl(e,t,n,r),o(),yl(e,t)},close:pl,isOpen:vl,isPartOf:function(e,t,n,r){return vl(0,0,n)&&n.get().exists((function(n){return t.isPartOf(e,n,r)}))},getState:function(e,t,n){return n.get()},setContent:function(e,t,n,r){return n.get().map((function(){return gl(e,t,n,r)}))}}),wl=Object.freeze({__proto__:null,events:function(e,t){return eo([ro(Ar(),(function(n,r){pl(n,e,t)}))])}}),Cl=[hu("onOpen"),hu("onClose"),jt("isPartOf"),jt("getAttachPoint"),nn("cloakVisibilityAttr","data-precloak-visibility")],kl=cc({fields:Cl,name:"sandboxing",active:wl,apis:xl,state:Object.freeze({__proto__:null,init:function(){var e=mn(S.none()),t=o("not-implemented");return Ci({readState:t,isOpen:function(){return e.get().isSome()},clear:function(){e.set(S.none())},set:function(t){e.set(S.some(t))},get:function(){return e.get()}})}})}),Sl=o("dismiss.popups"),_l=o("reposition.popups"),Ol=o("mouse.released"),El=ft([nn("isExtraPart",s),tn("fireEventInstead",[nn("event",Vr())])]),Tl=function(e){var t=zt("Dismissal",El,e),n={};return n[Sl()]={schema:ft([jt("target")]),onReceive:function(e,n){kl.isOpen(e)&&(kl.isPartOf(e,n.target)||t.isExtraPart(e,n.target)||t.fireEventInstead.fold((function(){return kl.close(e)}),(function(t){return Xr(e,t.event)})))}},n},zl=ft([tn("fireEventInstead",[nn("event",Fr())]),qt("doReposition")]),Dl=function(e){var t=zt("Reposition",zl,e),n={};return n[_l()]={onReceive:function(e){kl.isOpen(e)&&t.fireEventInstead.fold((function(){return t.doReposition(e)}),(function(t){return Xr(e,t.event)}))}},n},Al=function(e,t,n){t.store.manager.onLoad(e,t,n)},Ml=function(e,t,n){t.store.manager.onUnload(e,t,n)},Rl=Object.freeze({__proto__:null,onLoad:Al,onUnload:Ml,setValue:function(e,t,n,r){t.store.manager.setValue(e,t,n,r)},getValue:function(e,t,n){return t.store.manager.getValue(e,t,n)},getState:function(e,t,n){return n}}),Nl=Object.freeze({__proto__:null,events:function(e,t){var n=e.resetOnDom?[lo((function(n,r){Al(n,e,t)})),fo((function(n,r){Ml(n,e,t)}))]:[tc(e,t,Al)];return eo(n)}}),Bl=function(){var e=mn(null);return Ci({set:e.set,get:e.get,isNotSet:function(){return null===e.get()},clear:function(){e.set(null)},readState:function(){return{mode:"memory",value:e.get()}}})},Pl=function(){var e=mn({}),t=mn({});return Ci({readState:function(){return{mode:"dataset",dataByValue:e.get(),dataByText:t.get()}},lookup:function(n){return Be(e.get(),n).orThunk((function(){return Be(t.get(),n)}))},update:function(n){var r=e.get(),o=t.get(),i={},a={};W(n,(function(e){i[e.value]=e,Be(e,"meta").each((function(t){Be(t,"text").each((function(t){a[t]=e}))}))})),e.set(d(d({},r),i)),t.set(d(d({},o),a))},clear:function(){e.set({}),t.set({})}})},Hl=Object.freeze({__proto__:null,memory:Bl,dataset:Pl,manual:function(){return Ci({readState:n})},init:function(e){return e.store.manager.state(e)}}),Il=function(e,t,n,r){var o=t.store;n.update([r]),o.setValue(e,r),t.onSetValue(e,r)},Ll=[Yt("initialValue"),jt("getFallbackEntry"),jt("getDataKey"),jt("setValue"),yu("manager",{setValue:Il,getValue:function(e,t,n){var r=t.store,o=r.getDataKey(e);return n.lookup(o).fold((function(){return r.getFallbackEntry(o)}),(function(e){return e}))},onLoad:function(e,t,n){t.store.initialValue.each((function(r){Il(e,t,n,r)}))},onUnload:function(e,t,n){n.clear()},state:Pl})],Vl=[jt("getValue"),nn("setValue",n),Yt("initialValue"),yu("manager",{setValue:function(e,t,n,r){t.store.setValue(e,r),t.onSetValue(e,r)},getValue:function(e,t,n){return t.store.getValue(e)},onLoad:function(e,t,n){t.store.initialValue.each((function(n){t.store.setValue(e,n)}))},onUnload:n,state:wi.init})],Fl=[Yt("initialValue"),yu("manager",{setValue:function(e,t,n,r){n.set(r),t.onSetValue(e,r)},getValue:function(e,t,n){return n.get()},onLoad:function(e,t,n){t.store.initialValue.each((function(e){n.isNotSet()&&n.set(e)}))},onUnload:function(e,t,n){n.clear()},state:Bl})],jl=[rn("store",{mode:"memory"},Mt("mode",{memory:Fl,manual:Vl,dataset:Ll})),hu("onSetValue"),nn("resetOnDom",!1)],Ul=cc({fields:jl,name:"representing",active:Nl,apis:Rl,extra:{setValueFrom:function(e,t){var n=Ul.getValue(t);Ul.setValue(e,n)}},state:Hl}),$l=function(e,t){return fn(e,{},$(t,(function(t){return n=t.name(),r="Cannot configure "+t.name()+" for "+e,yt(n,n,Ge(),lt((function(e){return we("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([dn("dump",i)]))},Wl=function(e){return e.dump},ql=function(e,t){return d(d({},e.dump),ac(t))},Gl=$l,Xl=ql,Kl="placeholder",Yl=Ie([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Jl=function(e){return Pe(e,"uiType")},Ql=function(e,t,n,r){return Jl(n)&&n.uiType===Kl?(a=n,u=r,(i=e).exists((function(e){return e!==a.owner}))?Yl.single(!0,o(a)):Be(u,a.name).fold((function(){throw new Error("Unknown placeholder component: "+a.name+"\nKnown: ["+Oe(u)+"]\nNamespace: "+i.getOr("none")+"\nSpec: "+JSON.stringify(a,null,2))}),(function(e){return e.replace()}))):Yl.single(!1,o(n));var i,a,u},Zl=function e(t,n,r,o){return Ql(t,0,r,o).fold((function(i,a){var u=Jl(r)?a(n,r.config,r.validated):a(n),c=Be(u,"components").getOr([]),s=Z(c,(function(r){return e(t,n,r,o)}));return[d(d({},u),{components:s})]}),(function(e,t){if(Jl(r)){var o=t(n,r.config,r.validated);return r.validated.preprocess.getOr(i)(o)}return t(n)}))},ef=function(e,t,n,r){var i,a,u,c=ze(r,(function(e,t){return r=e,i=!1,{name:o(n=t),required:function(){return r.fold((function(e,t){return e}),(function(e,t){return e}))},used:function(){return i},replace:function(){if(i)throw new Error("Trying to use the same placeholder more than once: "+n);return i=!0,r}};var n,r,i})),s=(i=e,a=t,u=c,Z(n,(function(e){return Zl(i,a,e,u)})));return Te(c,(function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))})),s},tf=Yl.single,nf=Yl.multiple,rf=o(Kl),of=Ie([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),af=nn("factory",{sketch:i}),uf=nn("schema",[]),cf=jt("name"),sf=yt("pname","pname",Xe((function(e){return"<alloy."+ii(e.name)+">"})),Rt()),lf=dn("schema",(function(){return[Yt("preprocess")]})),ff=nn("defaults",o({})),df=nn("overrides",o({})),mf=dt([af,uf,cf,sf,ff,df]),gf=dt([af,uf,cf,ff,df]),hf=dt([af,uf,cf,sf,ff,df]),pf=dt([af,lf,cf,jt("unit"),sf,ff,df]),vf=function(e){return e.fold(S.some,S.none,S.some,S.some)},bf=function(e){var t=function(e){return e.name};return e.fold(t,t,t,t)},yf=function(e,t){return function(n){var r=zt("Converting part type",t,n);return e(r)}},xf=yf(of.required,mf),wf=yf(of.external,gf),Cf=yf(of.optional,hf),kf=yf(of.group,pf),Sf=o("entirety"),_f=Object.freeze({__proto__:null,required:xf,external:wf,optional:Cf,group:kf,asNamedPart:vf,name:bf,asCommon:function(e){return e.fold(i,i,i,i)},original:Sf}),Of=function(e,t,n,r){return Fe(t.defaults(e,n,r),n,{uid:e.partUids[t.name]},t.overrides(e,n,r))},Ef=function(e,t){var n={};return W(t,(function(t){vf(t).each((function(t){var r=Tf(e,t.pname);n[t.name]=function(n){var o=zt("Part: "+t.name+" in "+e,dt(t.schema),n);return d(d({},r),{config:n,validated:o})}}))})),n},Tf=function(e,t){return{uiType:rf(),owner:e,name:t}},zf=function(e,t,n){return{uiType:rf(),owner:e,name:t,config:n,validated:{}}},Df=function(e){return Z(e,(function(e){return e.fold(S.none,S.some,S.none,S.none).map((function(e){return Gt(e.name,e.schema.concat([xu(Sf())]))})).toArray()}))},Af=function(e){return $(e,bf)},Mf=function(e,t,n){return r=t,i={},a={},W(n,(function(e){e.fold((function(e){i[e.pname]=tf(!0,(function(t,n,r){return e.factory.sketch(Of(t,e,n,r))}))}),(function(e){var t=r.parts[e.name];a[e.name]=o(e.factory.sketch(Of(r,e,t[Sf()]),t))}),(function(e){i[e.pname]=tf(!1,(function(t,n,r){return e.factory.sketch(Of(t,e,n,r))}))}),(function(e){i[e.pname]=nf(!0,(function(t,n,r){var o=t[e.name];return $(o,(function(n){return e.factory.sketch(Fe(e.defaults(t,n,r),n,e.overrides(t,n)))}))}))}))})),{internals:o(i),externals:o(a)};var r,i,a},Rf=function(e,t,n){return ef(S.some(e),t,t.components,n)},Nf=function(e,t,n){var r=t.partUids[n];return e.getSystem().getByUid(r).toOptional()},Bf=function(e,t,n){return Nf(e,t,n).getOrDie("Could not find part: "+n)},Pf=function(e,t,n){var r={},i=t.partUids,a=e.getSystem();return W(n,(function(e){r[e]=o(a.getByUid(i[e]))})),r},Hf=function(e,t){var n=e.getSystem();return ze(t.partUids,(function(e,t){return o(n.getByUid(e))}))},If=function(e){return Oe(e.partUids)},Lf=function(e,t,n){var r={},i=t.partUids,a=e.getSystem();return W(n,(function(e){r[e]=o(a.getByUid(i[e]).getOrDie())})),r},Vf=function(e,t){var n=Af(t);return Ze($(n,(function(t){return{key:t,value:e+"-"+t}})))},Ff=function(e){return yt("partUids","partUids",Ke((function(t){return Vf(t.uid,e)})),Rt())},jf=Object.freeze({__proto__:null,generate:Ef,generateOne:zf,schemas:Df,names:Af,substitutes:Mf,components:Rf,defaultUids:Vf,defaultUidsSchema:Ff,getAllParts:Hf,getAllPartNames:If,getPart:Nf,getPartOrDie:Bf,getParts:Pf,getPartsOrDie:Lf}),Uf=function(e,t,n,r,o){var i,a,u=(a=o,(0<(i=r).length?[Gt("parts",i)]:[]).concat([jt("uid"),nn("dom",{}),nn("components",[]),xu("originalSpec"),nn("debug.sketcher",{})]).concat(a));return zt(e+" [SpecSchema]",ft(u.concat(t)),n)},$f=function(e,t,n,r,o){var i=Wf(o),a=Df(n),u=Ff(n),c=Uf(e,t,i,a,[u]),s=Mf(0,c,n);return r(c,Rf(e,c,s.internals()),i,s.externals())},Wf=function(e){return Pe(e,"uid")?e:d(d({},e),{uid:di("uid")})},qf=ft([jt("name"),jt("factory"),jt("configFields"),nn("apis",{}),nn("extraApis",{})]),Gf=ft([jt("name"),jt("factory"),jt("configFields"),jt("partFields"),nn("apis",{}),nn("extraApis",{})]),Xf=function(e){var t=zt("Sketcher for "+e.name,qf,e),n=ze(t.apis,xi),r=ze(t.extraApis,vi);return d(d({name:t.name,configFields:t.configFields,sketch:function(e){return n=t.name,r=t.configFields,o=t.factory,i=Wf(e),o(Uf(n,r,i,[],[]),i);var n,r,o,i}},n),r)},Kf=function(e){var t=zt("Sketcher for "+e.name,Gf,e),n=Ef(t.name,t.partFields),r=ze(t.apis,xi),o=ze(t.extraApis,vi);return d(d({name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:function(e){return $f(t.name,t.configFields,t.partFields,t.factory,e)},parts:n},r),o)},Yf=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},Jf=function(e,t){return e?S.some(t):S.none()},Qf=function(e){return"input"===ho(e)&&"radio"!==Yo(e,"type")||"textarea"===ho(e)},Zf=Object.freeze({__proto__:null,getCurrent:function(e,t,n){return t.find(e)}}),ed=[jt("find")],td=cc({fields:ed,name:"composing",apis:Zf}),nd=function(e,t,n,r){var o=Es(e.element,"."+t.highlightClass);W(o,(function(n){F(r,(function(e){return e.element===n}))||(Li(n,t.highlightClass),e.getSystem().getByDom(n).each((function(n){t.onDehighlight(e,n),Xr(n,Gr())})))}))},rd=function(e,t,n,r){nd(e,t,0,[r]),od(e,t,n,r)||(Hi(r.element,t.highlightClass),t.onHighlight(e,r),Xr(r,qr()))},od=function(e,t,n,r){return Vi(r.element,t.highlightClass)},id=function(e,t,n,r){var o=Es(e.element,"."+t.itemClass);return S.from(o[r]).fold((function(){return fe.error(new Error("No element found with index "+r))}),e.getSystem().getByDom)},ad=function(e,t,n){return Ya(e.element,"."+t.itemClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},ud=function(e,t,n){var r=Es(e.element,"."+t.itemClass);return(0<r.length?S.some(r[r.length-1]):S.none()).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},cd=function(e,t,n,r){var o=Es(e.element,"."+t.itemClass);return J(o,(function(e){return Vi(e,t.highlightClass)})).bind((function(t){var n=Oc(t,r,0,o.length-1);return e.getSystem().getByDom(o[n]).toOptional()}))},sd=function(e,t,n){var r=Es(e.element,"."+t.itemClass);return Yf($(r,(function(t){return e.getSystem().getByDom(t).toOptional()})))},ld=Object.freeze({__proto__:null,dehighlightAll:function(e,t,n){return nd(e,t,0,[])},dehighlight:function(e,t,n,r){od(e,t,n,r)&&(Li(r.element,t.highlightClass),t.onDehighlight(e,r),Xr(r,Gr()))},highlight:rd,highlightFirst:function(e,t,n){ad(e,t).each((function(r){rd(e,t,n,r)}))},highlightLast:function(e,t,n){ud(e,t).each((function(r){rd(e,t,n,r)}))},highlightAt:function(e,t,n,r){id(e,t,n,r).fold((function(e){throw e}),(function(r){rd(e,t,n,r)}))},highlightBy:function(e,t,n,r){var o=sd(e,t);Y(o,r).each((function(r){rd(e,t,n,r)}))},isHighlighted:od,getHighlighted:function(e,t,n){return Ya(e.element,"."+t.highlightClass).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))},getFirst:ad,getLast:ud,getPrevious:function(e,t,n){return cd(e,t,0,-1)},getNext:function(e,t,n){return cd(e,t,0,1)},getCandidates:sd}),fd=[jt("highlightClass"),jt("itemClass"),hu("onHighlight"),hu("onDehighlight")],dd=cc({fields:fd,name:"highlighting",apis:ld}),md=[8],gd=[9],hd=[13],pd=[27],vd=[32],bd=[37],yd=[38],xd=[39],wd=[40],Cd=function(e,t,n){var r=te(e.slice(0,t)),o=te(e.slice(t+1));return Y(r.concat(o),n)},kd=function(e,t,n){var r=te(e.slice(0,t));return Y(r,n)},Sd=function(e,t,n){var r=e.slice(0,t),o=e.slice(t+1);return Y(o.concat(r),n)},_d=function(e,t,n){var r=e.slice(t+1);return Y(r,n)},Od=function(e){return function(t){var n=t.raw;return V(e,n.which)}},Ed=function(e){return function(t){return ee(e,(function(e){return e(t)}))}},Td=function(e){return!0===e.raw.shiftKey},zd=function(e){return!0===e.raw.ctrlKey},Dd=u(Td),Ad=function(e,t){return{matches:e,classification:t}},Md=function(e,t,n){t.exists((function(e){return n.exists((function(t){return Gn(t,e)}))}))||Kr(e,jr(),{prevFocus:t,newFocus:n})},Rd=function(){var e=function(e){return pc(e.element)};return{get:e,set:function(t,n){var r=e(t);t.getSystem().triggerFocus(n,t.element);var o=e(t);Md(t,r,o)}}},Nd=function(){var e=function(e){return dd.getHighlighted(e).map((function(e){return e.element}))};return{get:e,set:function(t,r){var o=e(t);t.getSystem().getByDom(r).fold(n,(function(e){dd.highlight(t,e)}));var i=e(t);Md(t,o,i)}}};(Gc=qc=qc||{}).OnFocusMode="onFocus",Gc.OnEnterOrSpaceMode="onEnterOrSpace",Gc.OnApiMode="onApi";var Bd,Pd=function(e,t,n,r,o){var i=function(e,t,n,r,o){var i,a,u=n(e,t,r,o);return i=u,a=t.event,Y(i,(function(e){return e.matches(a)})).map((function(e){return e.classification})).bind((function(n){return n(e,t,r,o)}))},a={schema:function(){return e.concat([nn("focusManager",Rd()),rn("focusInside","onFocus",_t((function(e){return V(["onFocus","onEnterOrSpace","onApi"],e)?fe.value(e):fe.error("Invalid value for focusInside")}))),yu("handler",a),yu("state",t),yu("sendFocusIn",o)])},processKey:i,toEvents:function(e,t){var a=e.focusInside!==qc.OnFocusMode?S.none():o(e).map((function(n){return ro(kr(),(function(r,o){n(r,e,t),o.stop()}))})),u=[ro(gr(),(function(r,a){i(r,a,n,e,t).fold((function(){var n,i,u;n=r,i=a,u=Od(vd.concat(hd))(i.event),e.focusInside===qc.OnEnterOrSpaceMode&&u&&Zn(n,i)&&o(e).each((function(r){r(n,e,t),i.stop()}))}),(function(e){a.stop()}))})),ro(hr(),(function(n,o){i(n,o,r,e,t).each((function(e){o.stop()}))}))];return eo(a.toArray().concat(u))}};return a},Hd=function(e){var t=[Yt("onEscape"),Yt("onEnter"),nn("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),nn("firstTabstop",0),nn("useTabstopAt",l),Yt("visibilitySelector")].concat([e]),n=function(e,t){var n=e.visibilitySelector.bind((function(e){return Ja(t,e)})).getOr(t);return 0<ya(n)},r=function(e,t,r){var o,i,a;o=t,i=Es(e.element,o.selector),a=G(i,(function(e){return n(o,e)})),S.from(a[o.firstTabstop]).each((function(n){t.focusManager.set(e,n)}))},i=function(e,t,r,o,i){return i(t,r,(function(e){return n(t=o,r=e)&&t.useTabstopAt(r);var t,r})).fold((function(){return o.cyclic?S.some(!0):S.none()}),(function(t){return o.focusManager.set(e,t),S.some(!0)}))},u=function(e,t,n,r){var o,u,c=Es(e.element,n.selector);return o=e,(u=n).focusManager.get(o).bind((function(e){return Ja(e,u.selector)})).bind((function(t){return J(c,a(Gn,t)).bind((function(t){return i(e,c,t,n,r)}))}))},c=o([Ad(Ed([Td,Od(gd)]),(function(e,t,n){var r=n.cyclic?Cd:kd;return u(e,0,n,r)})),Ad(Od(gd),(function(e,t,n){var r=n.cyclic?Sd:_d;return u(e,0,n,r)})),Ad(Od(pd),(function(e,t,n){return n.onEscape.bind((function(n){return n(e,t)}))})),Ad(Ed([Dd,Od(hd)]),(function(e,t,n){return n.onEnter.bind((function(n){return n(e,t)}))}))]),s=o([]);return Pd(t,wi.init,c,s,(function(){return S.some(r)}))},Id=Hd(dn("cyclic",s)),Ld=Hd(dn("cyclic",l)),Vd=function(e,t,n){return Qf(n)&&Od(vd)(t.event)?S.none():(Jr(e,n,Er()),S.some(!0))},Fd=function(e,t){return S.some(!0)},jd=[nn("execute",Vd),nn("useSpace",!1),nn("useEnter",!0),nn("useControlEnter",!1),nn("useDown",!1)],Ud=function(e,t,n){return n.execute(e,t,e.element)},$d=Pd(jd,wi.init,(function(e,t,n,r){var o=n.useSpace&&!Qf(e.element)?vd:[],i=n.useEnter?hd:[],a=n.useDown?wd:[],u=o.concat(i).concat(a);return[Ad(Od(u),Ud)].concat(n.useControlEnter?[Ad(Ed([zd,Od(hd)]),Ud)]:[])}),(function(e,t,n,r){return n.useSpace&&!Qf(e.element)?[Ad(Od(vd),Fd)]:[]}),(function(){return S.none()})),Wd=function(){var e=mn(S.none());return Ci({readState:function(){return e.get().map((function(e){return{numRows:String(e.numRows),numColumns:String(e.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(t,n){e.set(S.some({numRows:t,numColumns:n}))},getNumRows:function(){return e.get().map((function(e){return e.numRows}))},getNumColumns:function(){return e.get().map((function(e){return e.numColumns}))}})},qd=Object.freeze({__proto__:null,flatgrid:Wd,init:function(e){return e.state(e)}}),Gd=function(e){return function(t,n,r,o){var i=e(t.element);return Jd(i,t,n,r,o)}},Xd=function(e,t){var n=Fc(e,t);return Gd(n)},Kd=function(e,t){var n=Fc(t,e);return Gd(n)},Yd=function(e){return function(t,n,r,o){return Jd(e,t,n,r,o)}},Jd=function(e,t,n,r,o){return r.focusManager.get(t).bind((function(n){return e(t.element,n,r,o)})).map((function(e){return r.focusManager.set(t,e),!0}))},Qd=Yd,Zd=Yd,em=Yd,tm=function(e){return!((t=e.dom).offsetWidth<=0&&t.offsetHeight<=0);var t},nm=function(e,t,n){var r,o=Es(e,n),i=G(o,tm);return J(r=i,(function(e){return Gn(e,t)})).map((function(e){return{index:e,candidates:r}}))},rm=function(e,t){return J(e,(function(e){return Gn(t,e)}))},om=function(e,t,n,r){return r(Math.floor(t/n),t%n).bind((function(t){var r=t.row*n+t.column;return 0<=r&&r<e.length?S.some(e[r]):S.none()}))},im=function(e,t,n,r,o){return om(e,t,r,(function(t,i){var a=t===n-1?e.length-t*r:r,u=Oc(i,o,0,a-1);return S.some({row:t,column:u})}))},am=function(e,t,n,r,o){return om(e,t,r,(function(t,i){var a=Oc(t,o,0,n-1),u=a===n-1?e.length-a*r:r,c=Ec(i,0,u-1);return S.some({row:a,column:c})}))},um=[jt("selector"),nn("execute",Vd),pu("onEscape"),nn("captureTab",!1),wu()],cm=function(e,t,n){Ya(e.element,t.selector).each((function(n){t.focusManager.set(e,n)}))},sm=function(e){return function(t,n,r,o){return nm(t,n,r.selector).bind((function(t){return e(t.candidates,t.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}},lm=function(e,t,n){return n.captureTab?S.some(!0):S.none()},fm=sm((function(e,t,n,r){return im(e,t,n,r,-1)})),dm=sm((function(e,t,n,r){return im(e,t,n,r,1)})),mm=sm((function(e,t,n,r){return am(e,t,n,r,-1)})),gm=sm((function(e,t,n,r){return am(e,t,n,r,1)})),hm=o([Ad(Od(bd),Xd(fm,dm)),Ad(Od(xd),Kd(fm,dm)),Ad(Od(yd),Qd(mm)),Ad(Od(wd),Zd(gm)),Ad(Ed([Td,Od(gd)]),lm),Ad(Ed([Dd,Od(gd)]),lm),Ad(Od(pd),(function(e,t,n){return n.onEscape(e,t)})),Ad(Od(vd.concat(hd)),(function(e,t,n,r){return o=e,(i=n).focusManager.get(o).bind((function(e){return Ja(e,i.selector)})).bind((function(r){return n.execute(e,t,r)}));var o,i}))]),pm=o([Ad(Od(vd),Fd)]),vm=Pd(um,Wd,hm,pm,(function(){return S.some(cm)})),bm=function(e,t,n,r){var o=function e(t,n,o){var i,a=Oc(n,r,0,o.length-1);return a===t?S.none():(i=o[a],"button"===ho(i)&&"disabled"===Yo(i,"disabled")?e(t,a,o):S.from(o[a]))};return nm(e,n,t).bind((function(e){var t=e.index,n=e.candidates;return o(t,t,n)}))},ym=[jt("selector"),nn("getInitial",S.none),nn("execute",Vd),pu("onEscape"),nn("executeOnMove",!1),nn("allowVertical",!0)],xm=function(e,t,n){return r=e,(o=n).focusManager.get(r).bind((function(e){return Ja(e,o.selector)})).bind((function(r){return n.execute(e,t,r)}));var r,o},wm=function(e,t,n){t.getInitial(e).orThunk((function(){return Ya(e.element,t.selector)})).each((function(n){t.focusManager.set(e,n)}))},Cm=function(e,t,n){return bm(e,n.selector,t,-1)},km=function(e,t,n){return bm(e,n.selector,t,1)},Sm=function(e){return function(t,n,r,o){return e(t,n,r,o).bind((function(){return r.executeOnMove?xm(t,n,r):S.some(!0)}))}},_m=function(e,t,n){return n.onEscape(e,t)},Om=o([Ad(Od(vd),Fd)]),Em=Pd(ym,wi.init,(function(e,t,n,r){var o=bd.concat(n.allowVertical?yd:[]),i=xd.concat(n.allowVertical?wd:[]);return[Ad(Od(o),Sm(Xd(Cm,km))),Ad(Od(i),Sm(Kd(Cm,km))),Ad(Od(hd),xm),Ad(Od(vd),xm),Ad(Od(pd),_m)]}),Om,(function(){return S.some(wm)})),Tm=function(e,t,n){return S.from(e[t]).bind((function(e){return S.from(e[n]).map((function(e){return{rowIndex:t,columnIndex:n,cell:e}}))}))},zm=function(e,t,n,r){var o=e[t].length,i=Oc(n,r,0,o-1);return Tm(e,t,i)},Dm=function(e,t,n,r){var o=Oc(n,r,0,e.length-1),i=e[o].length,a=Ec(t,0,i-1);return Tm(e,o,a)},Am=function(e,t,n,r){var o=e[t].length,i=Ec(n+r,0,o-1);return Tm(e,t,i)},Mm=function(e,t,n,r){var o=Ec(n+r,0,e.length-1),i=e[o].length,a=Ec(t,0,i-1);return Tm(e,o,a)},Rm=[Gt("selectors",[jt("row"),jt("cell")]),nn("cycles",!0),nn("previousSelector",S.none),nn("execute",Vd)],Nm=function(e,t,n){t.previousSelector(e).orThunk((function(){var n=t.selectors;return Ya(e.element,n.cell)})).each((function(n){t.focusManager.set(e,n)}))},Bm=function(e,t){return function(n,r,o){var i=o.cycles?e:t;return Ja(r,o.selectors.row).bind((function(e){var t=Es(e,o.selectors.cell);return rm(t,r).bind((function(t){var r=Es(n,o.selectors.row);return rm(r,e).bind((function(e){var n,a=(n=o,$(r,(function(e){return Es(e,n.selectors.cell)})));return i(a,e,t).map((function(e){return e.cell}))}))}))}))}},Pm=Bm((function(e,t,n){return zm(e,t,n,-1)}),(function(e,t,n){return Am(e,t,n,-1)})),Hm=Bm((function(e,t,n){return zm(e,t,n,1)}),(function(e,t,n){return Am(e,t,n,1)})),Im=Bm((function(e,t,n){return Dm(e,n,t,-1)}),(function(e,t,n){return Mm(e,n,t,-1)})),Lm=Bm((function(e,t,n){return Dm(e,n,t,1)}),(function(e,t,n){return Mm(e,n,t,1)})),Vm=o([Ad(Od(bd),Xd(Pm,Hm)),Ad(Od(xd),Kd(Pm,Hm)),Ad(Od(yd),Qd(Im)),Ad(Od(wd),Zd(Lm)),Ad(Od(vd.concat(hd)),(function(e,t,n){return pc(e.element).bind((function(r){return n.execute(e,t,r)}))}))]),Fm=o([Ad(Od(vd),Fd)]),jm=Pd(Rm,wi.init,Vm,Fm,(function(){return S.some(Nm)})),Um=[jt("selector"),nn("execute",Vd),nn("moveOnTab",!1)],$m=function(e,t,n){return n.focusManager.get(e).bind((function(r){return n.execute(e,t,r)}))},Wm=function(e,t,n){Ya(e.element,t.selector).each((function(n){t.focusManager.set(e,n)}))},qm=function(e,t,n){return bm(e,n.selector,t,-1)},Gm=function(e,t,n){return bm(e,n.selector,t,1)},Xm=o([Ad(Od(yd),em(qm)),Ad(Od(wd),em(Gm)),Ad(Ed([Td,Od(gd)]),(function(e,t,n,r){return n.moveOnTab?em(qm)(e,t,n,r):S.none()})),Ad(Ed([Dd,Od(gd)]),(function(e,t,n,r){return n.moveOnTab?em(Gm)(e,t,n,r):S.none()})),Ad(Od(hd),$m),Ad(Od(vd),$m)]),Km=o([Ad(Od(vd),Fd)]),Ym=Pd(Um,wi.init,Xm,Km,(function(){return S.some(Wm)})),Jm=[pu("onSpace"),pu("onEnter"),pu("onShiftEnter"),pu("onLeft"),pu("onRight"),pu("onTab"),pu("onShiftTab"),pu("onUp"),pu("onDown"),pu("onEscape"),nn("stopSpaceKeyup",!1),Yt("focusIn")],Qm=Pd(Jm,wi.init,(function(e,t,n){return[Ad(Od(vd),n.onSpace),Ad(Ed([Dd,Od(hd)]),n.onEnter),Ad(Ed([Td,Od(hd)]),n.onShiftEnter),Ad(Ed([Td,Od(gd)]),n.onShiftTab),Ad(Ed([Dd,Od(gd)]),n.onTab),Ad(Od(yd),n.onUp),Ad(Od(wd),n.onDown),Ad(Od(bd),n.onLeft),Ad(Od(xd),n.onRight),Ad(Od(vd),n.onSpace),Ad(Od(pd),n.onEscape)]}),(function(e,t,n){return n.stopSpaceKeyup?[Ad(Od(vd),Fd)]:[]}),(function(e){return e.focusIn})),Zm=Id.schema(),eg=Ld.schema(),tg=Em.schema(),ng=vm.schema(),rg=jm.schema(),og=$d.schema(),ig=Ym.schema(),ag=Qm.schema(),ug=lc({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Zm,cyclic:eg,flow:tg,flatgrid:ng,matrix:rg,execution:og,menu:ig,special:ag}),name:"keying",active:{events:function(e,t){return e.handler.toEvents(e,t)}},apis:{focusIn:function(e,t,n){t.sendFocusIn(t).fold((function(){e.getSystem().triggerFocus(e.element,e.element)}),(function(r){r(e,t,n)}))},setGridSize:function(e,t,n,r,o){He(n,"setGridSize")?n.setGridSize(r,o):console.error("Layout does not support setGridSize")}},state:qd}),cg=function(e,t,n,r){var o=e.getSystem().build(r);ul(e,o,n)},sg=function(e,t,n,r){var o=lg(e);Y(o,(function(e){return Gn(r.element,e.element)})).each(sl)},lg=function(e,t){return e.components()},fg=function(e,t,n,r,o){var i=lg(e);return S.from(i[r]).map((function(t){return sg(e,0,0,t),o.each((function(t){cg(e,0,(function(e,t){var n,o;o=t,zo(n=e,r).fold((function(){Fo(n,o)}),(function(e){Io(e,o)}))}),t)})),t}))},dg=cc({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(e,t,n,r){cg(e,0,Fo,r)},prepend:function(e,t,n,r){cg(e,0,Vo,r)},remove:sg,replaceAt:fg,replaceBy:function(e,t,n,r,o){var i=lg(e);return J(i,r).bind((function(t){return fg(e,0,0,t,o)}))},set:function(e,t,n,r){vc((function(){var t=$(r,e.getSystem().build);il(e,t)}),e.element)},contents:lg})}),mg=function(e,t){var n,r;return{key:e,value:{config:{},me:(n=e,r=eo(t),cc({fields:[jt("enabled")],name:n,active:{events:o(r)}})),configAsRaw:o({}),initialConfig:{},state:wi}}},gg=function(e,t){t.ignore||(gc(e.element),t.onFocus(e))},hg=Object.freeze({__proto__:null,focus:gg,blur:function(e,t){t.ignore||e.element.dom.blur()},isFocused:function(e){return t=e.element,n=Ro(t).dom,t.dom===n.activeElement;var t,n}}),pg=Object.freeze({__proto__:null,exhibit:function(e,t){var n=t.ignore?{}:{attributes:{tabindex:"-1"}};return Si(n)},events:function(e){return eo([ro(kr(),(function(t,n){gg(t,e),n.stop()}))].concat(e.stopMousedown?[ro(ur(),(function(e,t){t.event.prevent()}))]:[]))}}),vg=[hu("onFocus"),nn("stopMousedown",!1),nn("ignore",!1)],bg=cc({fields:vg,name:"focusing",active:pg,apis:hg}),yg=function(e,t,n){var r=t.aria;r.update(e,r,n.get())},xg=function(e,t,n){t.toggleClass.each((function(t){(n.get()?Hi:Li)(e.element,t)}))},wg=function(e,t,n){Sg(e,t,n,!n.get())},Cg=function(e,t,n){n.set(!0),xg(e,t,n),yg(e,t,n)},kg=function(e,t,n){n.set(!1),xg(e,t,n),yg(e,t,n)},Sg=function(e,t,n,r){(r?Cg:kg)(e,t,n)},_g=function(e,t,n){Sg(e,t,n,t.selected)},Og=Object.freeze({__proto__:null,onLoad:_g,toggle:wg,isOn:function(e,t,n){return n.get()},on:Cg,off:kg,set:Sg}),Eg=Object.freeze({__proto__:null,exhibit:function(){return Si({})},events:function(e,t){var n,r,o,i=(n=e,r=t,o=wg,go((function(e){o(e,n,r)}))),a=tc(e,t,_g);return eo(Q([e.toggleOnExecute?[i]:[],[a]]))}}),Tg=function(e,t,n){Ko(e.element,"aria-expanded",n)},zg=[nn("selected",!1),Yt("toggleClass"),nn("toggleOnExecute",!0),rn("aria",{mode:"none"},Mt("mode",{pressed:[nn("syncWithExpanded",!1),yu("update",(function(e,t,n){Ko(e.element,"aria-pressed",n),t.syncWithExpanded&&Tg(e,t,n)}))],checked:[yu("update",(function(e,t,n){Ko(e.element,"aria-checked",n)}))],expanded:[yu("update",Tg)],selected:[yu("update",(function(e,t,n){Ko(e.element,"aria-selected",n)}))],none:[yu("update",n)]}))],Dg=cc({fields:zg,name:"toggling",active:Eg,apis:Og,state:(Bd=!1,{init:function(){var e=mn(Bd);return{get:function(){return e.get()},set:function(t){return e.set(t)},clear:function(){return e.set(Bd)},readState:function(){return e.get()}}}})}),Ag=function(){var e=function(e,t){t.stop(),Yr(e)};return[ro(br(),e),ro(zr(),e),co(rr()),co(ur())]},Mg=function(e){return eo(Q([e.map((function(e){return go((function(t,n){e(t),n.stop()}))})).toArray(),Ag()]))},Rg="alloy.item-hover",Ng="alloy.item-focus",Bg=function(e){(pc(e.element).isNone()||bg.isFocused(e))&&(bg.isFocused(e)||bg.focus(e),Kr(e,Rg,{item:e}))},Pg=function(e){Kr(e,Ng,{item:e})},Hg=o(Rg),Ig=o(Ng),Lg=[jt("data"),jt("components"),jt("dom"),nn("hasSubmenu",!1),Yt("toggling"),Gl("itemBehaviours",[Dg,bg,ug,Ul]),nn("ignoreFocus",!1),nn("domModification",{}),yu("builder",(function(e){return{dom:e.dom,domModification:d(d({},e.domModification),{attributes:d(d(d({role:e.toggling.isSome()?"menuitemcheckbox":"menuitem"},e.domModification.attributes),{"aria-haspopup":e.hasSubmenu}),e.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Xl(e.itemBehaviours,[e.toggling.fold(Dg.revoke,(function(e){return Dg.config(d({aria:{mode:"checked"}},e))})),bg.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:function(e){Pg(e)}}),ug.config({mode:"execution"}),Ul.config({store:{mode:"memory",initialValue:e.data}}),mg("item-type-events",g(Ag(),[ro(fr(),Bg),ro(Tr(),bg.focus)]))]),components:e.components,eventOrder:e.eventOrder}})),nn("eventOrder",{})],Vg=[jt("dom"),jt("components"),yu("builder",(function(e){return{dom:e.dom,components:e.components,events:eo([(t=Tr(),ro(t,(function(e,t){t.stop()})))])};var t}))],Fg=o("item-widget"),jg=o([xf({name:"widget",overrides:function(e){return{behaviours:ac([Ul.config({store:{mode:"manual",getValue:function(t){return e.data},setValue:n}})])}}})]),Ug=[jt("uid"),jt("data"),jt("components"),jt("dom"),nn("autofocus",!1),nn("ignoreFocus",!1),Gl("widgetBehaviours",[Ul,bg,ug]),nn("domModification",{}),Ff(jg()),yu("builder",(function(e){var t=Mf(Fg(),e,jg()),n=Rf(Fg(),e,t.internals()),r=function(t){return Nf(t,e,"widget").map((function(e){return ug.focusIn(e),e}))},o=function(t,n){return Qf(n.event.target)||e.autofocus&&n.setSource(t.element),S.none()};return{dom:e.dom,components:n,domModification:e.domModification,events:eo([go((function(e,t){r(e).each((function(e){t.stop()}))})),ro(fr(),Bg),ro(Tr(),(function(t,n){e.autofocus?r(t):bg.focus(t)}))]),behaviours:Xl(e.widgetBehaviours,[Ul.config({store:{mode:"memory",initialValue:e.data}}),bg.config({ignore:e.ignoreFocus,onFocus:function(e){Pg(e)}}),ug.config({mode:"special",focusIn:e.autofocus?function(e){r(e)}:fc(),onLeft:o,onRight:o,onEscape:function(t,n){return bg.isFocused(t)||e.autofocus?(e.autofocus&&n.setSource(t.element),S.none()):(bg.focus(t),S.some(!0))}})])}}))],$g=Mt("type",{widget:Ug,item:Lg,separator:Vg}),Wg=o([kf({factory:{sketch:function(e){var t=zt("menu.spec item",$g,e);return t.builder(t)}},name:"items",unit:"item",defaults:function(e,t){return t.hasOwnProperty("uid")?t:d(d({},t),{uid:di("item")})},overrides:function(e,t){return{type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}}}})]),qg=o([jt("value"),jt("items"),jt("dom"),jt("components"),nn("eventOrder",{}),$l("menuBehaviours",[dd,Ul,td,ug]),rn("movement",{mode:"menu",moveOnTab:!0},Mt("mode",{grid:[wu(),yu("config",(function(e,t){return{mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager}}))],matrix:[yu("config",(function(e,t){return{mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},focusManager:e.focusManager}})),jt("rowSelector")],menu:[nn("moveOnTab",!0),yu("config",(function(e,t){return{mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager}}))]})),Ut("markers",lu()),nn("fakeFocus",!1),nn("focusManager",Rd()),hu("onHighlight")]),Gg=o("alloy.menu-focus"),Xg=Kf({name:"Menu",configFields:qg(),partFields:Wg(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:ql(e.menuBehaviours,[dd.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight}),Ul.config({store:{mode:"memory",initialValue:e.value}}),td.config({find:S.some}),ug.config(e.movement.config(e,e.movement))]),events:eo([ro(Ig(),(function(e,t){var n=t.event;e.getSystem().getByDom(n.target).each((function(n){dd.highlight(e,n),t.stop(),Kr(e,Gg(),{menu:e,item:n})}))})),ro(Hg(),(function(e,t){var n=t.event.item;dd.highlight(e,n)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Kg=function e(t,n,r,o){return Be(r,o).bind((function(o){return Be(t,o).bind((function(o){var i=e(t,n,r,o);return S.some([o].concat(i))}))})).getOr([])},Yg=function(e,t){var n={};Te(e,(function(e,t){W(e,(function(e){n[e]=t}))}));var r=t,o=De(t,(function(e,t){return{k:e,v:t}})),i=ze(o,(function(e,t){return[t].concat(Kg(n,r,o,t))}));return ze(n,(function(e){return Be(i,e).getOr([e])}))},Jg=function(e){return"prepared"===e.type?S.some(e.menu):S.none()},Qg={init:function(){var e=mn({}),t=mn({}),n=mn({}),r=mn(S.none()),o=mn({}),i=function(t,n,r){return a(t).bind((function(o){return i=t,Re(e.get(),(function(e,t){return e===i})).bind((function(e){return n(e).map((function(e){return{triggeredMenu:o,triggeringItem:e,triggeringPath:r}}))}));var i}))},a=function(e){return u(e).bind(Jg)},u=function(e){return Be(t.get(),e)},c=function(t){return Be(e.get(),t)};return{setMenuBuilt:function(e,n){var r;t.set(d(d({},t.get()),((r={})[e]={type:"prepared",menu:n},r)))},setContents:function(i,a,u,c){r.set(S.some(i)),e.set(u),t.set(a),o.set(c);var s=Yg(c,u);n.set(s)},expand:function(t){return Be(e.get(),t).map((function(e){var r=Be(n.get(),t).getOr([]);return[e].concat(r)}))},refresh:function(e){return Be(n.get(),e)},collapse:function(e){return Be(n.get(),e).bind((function(e){return 1<e.length?S.some(e.slice(1)):S.none()}))},lookupMenu:u,lookupItem:c,otherMenus:function(e){var t=o.get();return ne(Oe(t),e)},getPrimary:function(){return r.get().bind(a)},getMenus:function(){return t.get()},clear:function(){e.set({}),t.set({}),n.set({}),r.set(S.none())},isClear:function(){return r.get().isNone()},getTriggeringPath:function(e,t){var o=G(c(e).toArray(),(function(e){return a(e).isSome()}));return Be(n.get(),e).bind((function(e){var n=te(o.concat(e));return function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.isSome())return S.none();t.push(r.getOrDie())}return S.some(t)}(Z(n,(function(e,o){return i(e,t,n.slice(0,o+1)).fold((function(){return r.get().is(e)?[]:[S.none()]}),(function(e){return[S.some(e)]}))})))}))}}},extractPreparedMenu:Jg},Zg=o("collapse-item"),eh=Xf({name:"TieredMenu",configFields:[bu("onExecute"),bu("onEscape"),vu("onOpenMenu"),vu("onOpenSubmenu"),hu("onRepositionMenu"),hu("onCollapseMenu"),nn("highlightImmediately",!0),Gt("data",[jt("primary"),jt("menus"),jt("expansions")]),nn("fakeFocus",!1),hu("onHighlight"),hu("onHover"),du(),jt("dom"),nn("navigateOnHover",!0),nn("stayInDom",!1),$l("tmenuBehaviours",[ug,dd,td,dg]),nn("eventOrder",{})],apis:{collapseMenu:function(e,t){e.collapseMenu(t)},highlightPrimary:function(e,t){e.highlightPrimary(t)},repositionMenus:function(e,t){e.repositionMenus(t)}},factory:function(e,t){var r,o,i=mn(S.none()),a=Qg.init(),u=function(t){var n,r,o,i=(n=t,r=e.data.primary,o=e.data.menus,ze(o,(function(t,o){var i=function(){return Xg.sketch(d(d({},t),{value:o,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:e.onHighlight,focusManager:(e.fakeFocus?Nd:Rd)()}))};return o===r?{type:"prepared",menu:n.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))),u=s();return a.setContents(e.data.primary,i,e.data.expansions,u),a.getPrimary()},c=function(e){return Ul.getValue(e).value},s=function(t){return ze(e.data.menus,(function(e,t){return Z(e.items,(function(e){return"separator"===e.type?[]:[e.data.value]}))}))},f=function(e,t){dd.highlight(e,t),dd.getHighlighted(t).orThunk((function(){return dd.getFirst(t)})).each((function(t){Jr(e,t.element,Tr())}))},m=function(e,t){return Yf($(t,(function(t){return e.lookupMenu(t).bind((function(e){return"prepared"===e.type?S.some(e.menu):S.none()}))})))},g=function(t,n,r){var o=m(n,n.otherMenus(r));W(o,(function(n){ji(n.element,[e.markers.backgroundMenu]),e.stayInDom||dg.remove(t,n)}))},h=function(t,n){var r,o=(r=t,i.get().getOrThunk((function(){var t={},n=Es(r.element,"."+e.markers.item),o=G(n,(function(e){return"true"===Yo(e,"aria-haspopup")}));return W(o,(function(e){r.getSystem().getByDom(e).each((function(e){var n=c(e);t[n]=e}))})),i.set(S.some(t)),t})));Te(o,(function(e,t){var r=V(n,t);Ko(e.element,"aria-expanded",r)}))},p=function(t,n,r){return S.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return S.none();var i=o.menu,a=m(n,r.slice(1));return W(a,(function(t){Hi(t.element,e.markers.backgroundMenu)})),$i(i.element)||dg.append(t,pa(i)),ji(i.element,[e.markers.backgroundMenu]),f(t,i),g(t,n,r),S.some(i)}))}))};(o=r=r||{})[o.HighlightSubmenu=0]="HighlightSubmenu",o[o.HighlightParent=1]="HighlightParent";var v=function(t,n,o){void 0===o&&(o=r.HighlightSubmenu);var i=c(n);return a.expand(i).bind((function(i){return h(t,i),S.from(i[0]).bind((function(u){return a.lookupMenu(u).bind((function(c){var s=function(e,t,n){if("notbuilt"!==n.type)return n.menu;var r=e.getSystem().build(n.nbMenu());return a.setMenuBuilt(t,r),r}(t,u,c);return $i(s.element)||dg.append(t,pa(s)),e.onOpenSubmenu(t,n,s,te(i)),o===r.HighlightSubmenu?(dd.highlightFirst(s),p(t,a,i)):(dd.dehighlightAll(s),S.some(n))}))}))}))},b=function(t,n){var r=c(n);return a.collapse(r).bind((function(r){return h(t,r),p(t,a,r).map((function(r){return e.onCollapseMenu(t,n,r),r}))}))},y=function(t){return function(n,r){return Ja(r.getSource(),"."+e.markers.item).bind((function(e){return n.getSystem().getByDom(e).toOptional().bind((function(e){return t(n,e).map(l)}))}))}},x=eo([ro(Gg(),(function(e,t){var n=t.event.item;a.lookupItem(c(n)).each((function(){var n=t.event.menu;dd.highlight(e,n);var r=c(t.event.item);a.refresh(r).each((function(t){return g(e,a,t)}))}))})),go((function(t,o){var i=o.event.target;t.getSystem().getByDom(i).each((function(o){0===c(o).indexOf("collapse-item")&&b(t,o),v(t,o,r.HighlightSubmenu).fold((function(){e.onExecute(t,o)}),n)}))})),lo((function(t,n){u(t).each((function(n){dg.append(t,pa(n)),e.onOpenMenu(t,n),e.highlightImmediately&&f(t,n)}))}))].concat(e.navigateOnHover?[ro(Hg(),(function(t,n){var o,i,u=n.event.item;o=t,i=c(u),a.refresh(i).bind((function(e){return h(o,e),p(o,a,e)})),v(t,u,r.HighlightParent),e.onHover(t,u)}))]:[])),w=function(e){return dd.getHighlighted(e).bind(dd.getHighlighted)},C={collapseMenu:function(e){w(e).each((function(t){b(e,t)}))},highlightPrimary:function(e){a.getPrimary().each((function(t){f(e,t)}))},repositionMenus:function(t){a.getPrimary().bind((function(e){return w(t).bind((function(e){var t=c(e),n=Ne(a.getMenus()),r=Yf($(n,Qg.extractPreparedMenu));return a.getTriggeringPath(t,(function(e){return t=e,ce(r,(function(e){if(!e.getSystem().isConnected())return S.none();var n=dd.getCandidates(e);return Y(n,(function(e){return c(e)===t}))}));var t}))})).map((function(t){return{primary:e,triggeringPath:t}}))})).fold((function(){var n;n=t,S.from(n.components()[0]).filter((function(e){return"menu"===Yo(e.element,"role")})).each((function(n){e.onRepositionMenu(t,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;e.onRepositionMenu(t,r,o)}))}};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:ql(e.tmenuBehaviours,[ug.config({mode:"special",onRight:y((function(e,t){return Qf(t.element)?S.none():v(e,t,r.HighlightSubmenu)})),onLeft:y((function(e,t){return Qf(t.element)?S.none():b(e,t)})),onEscape:y((function(t,n){return b(t,n).orThunk((function(){return e.onEscape(t,n).map((function(){return t}))}))})),focusIn:function(e,t){a.getPrimary().each((function(t){Jr(e,t.element,Tr())}))}}),dd.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),td.config({find:function(e){return dd.getHighlighted(e)}}),dg.config({})]),eventOrder:e.eventOrder,apis:C,events:x}},extraApis:{tieredData:function(e,t,n){return{primary:e,menus:t,expansions:n}},singleData:function(e,t){return{primary:e,menus:Qe(e,t),expansions:{}}},collapseItem:function(e){return{value:ii(Zg()),meta:{text:e}}}}}),th=Xf({name:"InlineView",configFields:[jt("lazySink"),hu("onShow"),hu("onHide"),en("onEscape"),$l("inlineBehaviours",[kl,Ul,dc]),tn("fireDismissalEventInstead",[nn("event",Vr())]),tn("fireRepositionEventInstead",[nn("event",Fr())]),nn("getRelated",S.none),nn("isExtraPart",s),nn("eventOrder",S.none)],factory:function(e,t){var n=function(e,t,n,o){r(e,t,n,(function(){return o.map(Va)}))},r=function(t,n,r,o){var i=e.lazySink(t).getOrDie();kl.openWhileCloaked(t,r,(function(){return tl.positionWithinBounds(i,n,t,o())})),Ul.setValue(t,S.some({mode:"position",anchor:n,getBounds:o}))},o=function(t,n,r,o){var i,a,u,c,s,l,f,m,g=(i=e,a=t,u=n,s=o,l=function(){return i.lazySink(a)},f="horizontal"===(c=r).type?{layouts:{onLtr:Ju,onRtl:Qu}}:{},m=function(e){return 2===e.length?f:{}},eh.sketch({dom:{tag:"div"},data:c.data,markers:c.menu.markers,highlightImmediately:c.menu.highlightImmediately,onEscape:function(){return kl.close(a),i.onEscape.map((function(e){return e(a)})),S.some(!0)},onExecute:function(){return S.some(!0)},onOpenMenu:function(e,t){tl.positionWithinBounds(l().getOrDie(),u,t,s())},onOpenSubmenu:function(e,t,n,r){var o=l().getOrDie();tl.position(o,d({anchor:"submenu",item:t},m(r)),n)},onRepositionMenu:function(e,t,n){var r=l().getOrDie();tl.positionWithinBounds(r,u,t,s()),W(n,(function(e){var t=m(e.triggeringPath);tl.position(r,d({anchor:"submenu",item:e.triggeringItem},t),e.triggeredMenu)}))}}));kl.open(t,g),Ul.setValue(t,S.some({mode:"menu",menu:g}))},i=function(t){kl.isOpen(t)&&Ul.getValue(t).each((function(n){switch(n.mode){case"menu":kl.getState(t).each((function(e){eh.repositionMenus(e)}));break;case"position":var r=e.lazySink(t).getOrDie();tl.positionWithinBounds(r,n.anchor,t,n.getBounds())}}))},a={setContent:function(e,t){kl.setContent(e,t)},showAt:function(e,t,r){n(e,t,r,S.none())},showWithin:n,showWithinBounds:r,showMenuAt:function(e,t,n){o(e,t,n,(function(){return S.none()}))},showMenuWithinBounds:o,hide:function(e){kl.isOpen(e)&&(Ul.setValue(e,S.none()),kl.close(e))},getContent:function(e){return kl.getState(e)},reposition:i,isOpen:kl.isOpen};return{uid:e.uid,dom:e.dom,behaviours:ql(e.inlineBehaviours,[kl.config({isPartOf:function(t,n,r){return eu(n,r)||(o=t,i=r,e.getRelated(o).exists((function(e){return eu(e,i)})));var o,i},getAttachPoint:function(t){return e.lazySink(t).getOrDie()},onOpen:function(t){e.onShow(t)},onClose:function(t){e.onHide(t)}}),Ul.config({store:{mode:"memory",initialValue:S.none()}}),dc.config({channels:d(d({},Tl(d({isExtraPart:t.isExtraPart},e.fireDismissalEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})))),Dl(d(d({},e.fireRepositionEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})),{doReposition:i})))})]),eventOrder:e.eventOrder,apis:a}},apis:{showAt:function(e,t,n,r){e.showAt(t,n,r)},showWithin:function(e,t,n,r,o){e.showWithin(t,n,r,o)},showWithinBounds:function(e,t,n,r,o){e.showWithinBounds(t,n,r,o)},showMenuAt:function(e,t,n,r){e.showMenuAt(t,n,r)},showMenuWithinBounds:function(e,t,n,r,o){e.showMenuWithinBounds(t,n,r,o)},hide:function(e,t){e.hide(t)},isOpen:function(e,t){return e.isOpen(t)},getContent:function(e,t){return e.getContent(t)},setContent:function(e,t,n){e.setContent(t,n)},reposition:function(e,t){e.reposition(t)}}}),nh=function(e){return e.x},rh=function(e,t){return e.x+e.width/2-t.width/2},oh=function(e,t){return e.x+e.width-t.width},ih=function(e){return e.y},ah=function(e,t){return e.y+e.height-t.height},uh=function(e,t,n){return Cu(oh(e,t),ah(e,t),n.innerSoutheast(),Eu(),Mu(e,{right:0,bottom:3}),"layout-inner-se")},ch=function(e,t,n){return Cu(nh(e),ah(e,t),n.innerSouthwest(),Ou(),Mu(e,{left:1,bottom:3}),"layout-inner-sw")},sh=function(e,t,n){return Cu(oh(e,t),ih(e),n.innerNortheast(),_u(),Mu(e,{right:0,top:2}),"layout-inner-ne")},lh=function(e,t,n){return Cu(nh(e),ih(e),n.innerNorthwest(),Su(),Mu(e,{left:1,top:2}),"layout-inner-nw")},fh=function(e,t,n){return Cu(rh(e,t),ih(e),n.innerNorth(),Tu(),Mu(e,{top:2}),"layout-inner-n")},dh=function(e,t,n){return Cu(rh(e,t),ah(e,t),n.innerSouth(),zu(),Mu(e,{bottom:3}),"layout-inner-s")},mh=tinymce.util.Tools.resolve("tinymce.util.Delay"),gh=Xf({name:"Button",factory:function(e){var t=Mg(e.action),n=e.dom.tag,r=function(t){return Be(e.dom,"attributes").bind((function(e){return Be(e,t)}))};return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:Xl(e.buttonBehaviours,[bg.config({}),ug.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==n)return{role:r("role").getOr("button")};var e=r("type").getOr("button"),t=r("role").map((function(e){return{role:e}})).getOr({});return d({type:e},t)}()},eventOrder:e.eventOrder}},configFields:[nn("uid",void 0),jt("dom"),nn("components",[]),Gl("buttonBehaviours",[bg,ug]),Yt("action"),Yt("role"),nn("eventOrder",{})]}),hh=function(e){var t=void 0!==e.uid&&He(e,"uid")?e.uid:di("memento");return{get:function(e){return e.getSystem().getByUid(t).getOrDie()},getOpt:function(e){return e.getSystem().getByUid(t).toOptional()},asSpec:function(){return d(d({},e),{uid:t})}}},ph=function(e){return S.from(e()["temporary-placeholder"]).getOr("!not found!")},vh=function(e,t){return S.from(t()[e.toLowerCase()]).getOrThunk((function(){return ph(t)}))},bh={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},yh=Xf({name:"Notification",factory:function(e){var t,n,r=hh({dom:{tag:"p",innerHtml:e.translationProvider(e.text)},behaviours:ac([dg.config({})])}),o=function(e){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+e+"%"}}}},i=function(e){return{dom:{tag:"div",classes:["tox-text"],innerHtml:e+"%"}}},a=hh({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(0)]},i(0)],behaviours:ac([dg.config({})])}),u={updateProgress:function(e,t){e.getSystem().isConnected()&&a.getOpt(e).each((function(e){dg.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(t)]},i(t)])}))},updateText:function(e,t){var n;e.getSystem().isConnected()&&(n=r.get(e),dg.set(n,[da(t)]))}},c=Q([e.icon.toArray(),e.level.toArray(),e.level.bind((function(e){return S.from(bh[e])})).toArray()]),s=hh(gh.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:vh("close",e.iconProvider),attributes:{"aria-label":e.translationProvider("Close")}}}],action:function(t){e.onAction(t)}})),l=[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:(t=c,n=e.iconProvider,ce(t,(function(e){return S.from(n()[e.toLowerCase()])})).getOrThunk((function(){return ph(n)})))}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[r.asSpec()],behaviours:ac([dg.config({})])}];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert"},classes:e.level.map((function(e){return["tox-notification","tox-notification--in","tox-notification--"+e]})).getOr(["tox-notification","tox-notification--in"])},behaviours:ac([bg.config({}),mg("notification-events",[ro(dr(),(function(e){s.getOpt(e).each(bg.focus)}))])]),components:l.concat(e.progress?[a.asSpec()]:[]).concat(e.closeButton?[s.asSpec()]:[]),apis:u}},configFields:[Yt("level"),jt("progress"),jt("icon"),jt("onAction"),jt("text"),jt("iconProvider"),jt("translationProvider"),cn("closeButton",!0)],apis:{updateProgress:function(e,t,n){e.updateProgress(t,n)},updateText:function(e,t,n){e.updateText(t,n)}}});function xh(e,t,n){var r=t.backstage;return{open:function(e,o){var i=!e.closeButton&&e.timeout&&(0<e.timeout||e.timeout<0),a=function(){o(),th.hide(c)},u=ha(yh.sketch({text:e.text,level:V(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:S.from(e.icon),closeButton:!i,onAction:a,iconProvider:r.shared.providers.icons,translationProvider:r.shared.providers.translate})),c=ha(th.sketch(d({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:t.backstage.shared.getSink,fireDismissalEventInstead:{}},r.shared.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));return n.add(c),0<e.timeout&&mh.setTimeout((function(){a()}),e.timeout),{close:a,moveTo:function(e,t){th.showAt(c,{anchor:"makeshift",x:e,y:t},pa(u))},moveRel:function(e,n){var r,o;"banner"!==n?(r=function(e){switch(e){case"bc-bc":return dh;case"tc-tc":return fh;case"tc-bc":return Uu;case"bc-tc":default:return $u}}(n),o={anchor:"node",root:Wi(),node:S.some(hn.fromDom(e)),layouts:{onRtl:function(){return[r]},onLtr:function(){return[r]}}},th.showAt(c,o,pa(u))):th.showAt(c,t.backstage.shared.anchors.banner(),pa(u))},text:function(e){yh.updateText(u,e)},settings:e,getEl:function(){return u.element.dom},progressBar:{value:function(e){yh.updateProgress(u,e)}}}},close:function(e){e.close()},reposition:function(e){var t;W(e,(function(e){return e.moveTo(0,0)})),0<(t=e).length&&(ie(t).each((function(e){return e.moveRel(null,"banner")})),W(t,(function(e,n){0<n&&e.moveRel(t[n-1].getEl(),"bc-tc")})))},getArgs:function(e){return e.settings}}}var wh,Ch,kh=function(e,t){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((function(){e.apply(null,r),n=null}),t)}}},Sh=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),_h=function(e,t,n,r,o){var i=Sh(e,(function(t){return r=t,(n=e).isBlock(r)||V(["BR","IMG","HR","INPUT"],r.nodeName)||"false"===n.getContentEditable(r);var n,r}));return S.from(i.backwards(t,n,r,o))},Oh=function(e,t){return Eh(hn.fromDom(e.selection.getNode())).getOrThunk((function(){var n=hn.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());return Fo(n,hn.fromDom(t.extractContents())),t.insertNode(n.dom),_o(n).each((function(e){return e.dom.normalize()})),Os(n,_s).map((function(t){var n;e.selection.setCursorLocation(t.dom,"img"===ho(n=t)?1:ks(n).fold((function(){return To(n).length}),(function(e){return e.length})))})),n}))},Eh=function(e){return Ja(e,"[data-mce-autocompleter]")},Th=function(e){return e.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},zh=function(e){return""!==e&&-1!=="  \f\n\r\t\v".indexOf(e)},Dh=function(e,t){return e.substring(t.length)},Ah=function(e,t,n,r){if(void 0===r&&(r=0),!(o=t).collapsed||3!==o.startContainer.nodeType)return S.none();var o,i=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return _h(e,t.startContainer,t.startOffset,(function(e,t,r){return function(e,t,n){for(var r=t-1;0<=r;r--){var o=e.charAt(r);if(zh(o))return S.none();if(o===n)break}return S.some(r)}(r,t,n).getOr(t)}),i).bind((function(e){var o=t.cloneRange();if(o.setStart(e.container,e.offset),o.setEnd(t.endContainer,t.endOffset),o.collapsed)return S.none();var i=Th(o);return 0!==i.lastIndexOf(n)||Dh(i,n).length<r?S.none():S.some({text:Dh(i,n),range:o,triggerChar:n})}))},Mh=function(e,t,n,r){return void 0===r&&(r=0),Eh(hn.fromDom(t.startContainer)).fold((function(){return Ah(e,t,n,r)}),(function(t){var r=e.createRng();r.selectNode(t.dom);var o=Th(r);return S.some({range:r,text:Dh(o,n),triggerChar:n})}))},Rh=function(e,t){t.on("keypress compositionend",e.onKeypress.throttle),t.on("remove",e.onKeypress.cancel);var n=function(e,t){Kr(e,gr(),{raw:t})};t.on("keydown",(function(t){var r=function(){return e.getView().bind(dd.getHighlighted)};8===t.which&&e.onKeypress.throttle(t),e.isActive()&&(27===t.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===t.which?(r().each(Yr),t.preventDefault()):40===t.which?(r().fold((function(){e.getView().each(dd.highlightFirst)}),(function(e){n(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||r().each((function(e){n(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==t.which&&38!==t.which&&40!==t.which||e.cancelIfNecessary())})),t.on("NodeChange",(function(t){e.isActive()&&!e.isProcessingAction()&&Eh(hn.fromDom(t.element)).isNone()&&e.cancelIfNecessary()}))},Nh=tinymce.util.Tools.resolve("tinymce.util.Promise"),Bh=function(e,t){return{container:e,offset:t}},Ph=function e(t){if(3===t.nodeType)return Bh(t,t.data.length);var n=t.childNodes;return 0<n.length?e(n[n.length-1]):Bh(t,n.length)},Hh=function e(t,n){var r=t.childNodes;return 0<r.length&&n<r.length?e(r[n],0):0<r.length&&1===t.nodeType&&r.length===n?Ph(r[r.length-1]):Bh(t,n)},Ih=function(e){return function(t){var n,r,o=Hh(t.startContainer,t.startOffset);return!_h(n=e,(r=o).container,r.offset,(function(e,t){return 0===t?-1:t}),n.getRoot()).filter((function(e){var t=e.container.data.charAt(e.offset-1);return!zh(t)})).isSome()}},Lh=function(e,t){var n,r,o=t(),i=e.selection.getRng();return n=e.dom,r=i,ce(o.triggerChars,(function(e){return Mh(n,r,e)})).bind((function(n){return Vh(e,t,n)}))},Vh=function(e,t,n,r){void 0===r&&(r={});var o=t(),i=e.selection.getRng().startContainer.nodeValue,a=G(o.lookupByChar(n.triggerChar),(function(t){return n.text.length>=t.minChars&&t.matches.getOrThunk((function(){return Ih(e.dom)}))(n.range,i,n.text)}));if(0===a.length)return S.none();var u=Nh.all($(a,(function(e){return e.fetch(n.text,e.maxResults,r).then((function(t){return{matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}}))})));return S.some({lookupData:u,context:n})},Fh=dt([$t("type"),Zt("text")]),jh=dt([nn("type","autocompleteitem"),nn("active",!1),nn("disabled",!1),nn("meta",{}),$t("value"),Zt("text"),Zt("icon")]),Uh=dt([$t("type"),$t("ch"),on("minChars",1),nn("columns",1),on("maxResults",10),en("matches"),qt("fetch"),qt("onAction"),ln("highlightOn",[],Pt)]),$h=[cn("disabled",!1),Zt("tooltip"),Zt("icon"),Zt("text"),sn("onSetup",(function(){return n}))],Wh=dt([$t("type"),qt("onAction")].concat($h)),qh=function(e){return Et("toolbarbutton",Wh,e)},Gh=[cn("active",!1)].concat($h),Xh=dt(Gh.concat([$t("type"),qt("onAction")])),Kh=function(e){return Et("ToggleButton",Xh,e)},Yh=[sn("predicate",s),un("scope","node",["node","editor"]),un("position","selection",["node","selection","line"])],Jh=$h.concat([nn("type","contextformbutton"),nn("primary",!1),qt("onAction"),dn("original",i)]),Qh=Gh.concat([nn("type","contextformbutton"),nn("primary",!1),qt("onAction"),dn("original",i)]),Zh=$h.concat([nn("type","contextformbutton")]),ep=Gh.concat([nn("type","contextformtogglebutton")]),tp=Mt("type",{contextformbutton:Jh,contextformtogglebutton:Qh}),np=dt([nn("type","contextform"),sn("initValue",(function(){return""})),Zt("label"),Kt("commands",tp),Jt("launch",Mt("type",{contextformbutton:Zh,contextformtogglebutton:ep}))].concat(Yh)),rp=dt([nn("type","contexttoolbar"),$t("items")].concat(Yh)),op=function(e){var t,n,r=e.ui.registry.getAll().popups,o=ze(r,(function(e){return Et("Autocompleter",Uh,e).fold((function(e){throw new Error(Dt(e))}),(function(e){return e}))})),i=(t=Me(o,(function(e){return e.ch})),n={},W(t,(function(e){n[e]={}})),Oe(n)),a=Ne(o);return{dataset:o,triggerChars:i,lookupByChar:function(e){return G(a,(function(t){return t.ch===e}))}}};(Ch=wh=wh||{})[Ch.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",Ch[Ch.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var ip,ap,up=wh,cp="tox-menu-nav__js",sp="tox-collection__item",lp="tox-swatch",fp={normal:cp,color:lp},dp="tox-collection__item--enabled",mp="tox-collection__item-label",gp="tox-collection__item-caret",hp="tox-collection__item--active",pp="tox-collection__item-container",vp="tox-collection__item-container--row",bp=function(e){return Be(fp,e).getOr(cp)},yp=function(e){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===e?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}},xp=function(e){var t=yp(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:bp(e)}},wp=[Xg.parts.items({})],Cp=function(e,t,n){var r=yp(n);return{dom:{tag:"div",classes:Q([[r.tieredMenu]])},markers:xp(n)}},kp=function(e,t){return function(n){var r=U(n,t);return $(r,(function(t){return{dom:e,components:t}}))}},Sp=function(e,t){var n=[],r=[];return W(e,(function(e,o){t(e,o)?(0<r.length&&n.push(r),r=[],Pe(e.dom,"innerHtml")&&r.push(e)):r.push(e)})),0<r.length&&n.push(r),$(n,(function(e){return{dom:{tag:"div",classes:["tox-collection__group"]},components:e}}))},_p=function(e,t,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Xg.parts.items({preprocess:function(n){return"auto"!==e&&1<e?kp({tag:"div",classes:["tox-collection__group"]},e)(n):Sp(n,(function(e,n){return"separator"===t[n].type}))}})]}},Op=function(e){return F(e,(function(e){return"icon"in e&&void 0!==e.icon}))},Ep=function(e){return console.error(Dt(e)),console.log(e),S.none()},Tp=function(e,t,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Xg.parts.items({preprocess:function(e){return Sp(e,(function(e,t){return"separator"===i[t].type}))}})]});return{value:e,dom:a.dom,components:a.components,items:n}},zp=function(e,t,n,r,o){var a,u,c,s,l,f;return"color"===o?{value:e,dom:(a=r,c={dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Xg.parts.items({preprocess:"auto"!==a?kp({tag:"div",classes:["tox-swatches__row"]},a):i})]}]}).dom,components:c.components,items:n}:"normal"===o&&"auto"===r?{value:e,dom:(c=_p(r,n)).dom,components:c.components,items:n}:"normal"===o&&1===r?{value:e,dom:(c=_p(1,n)).dom,components:c.components,items:n}:"normal"===o?{value:e,dom:(c=_p(r,n)).dom,components:c.components,items:n}:"listpreview"!==o||"auto"===r?{value:e,dom:(s=t,l=r,f=yp(o),{tag:"div",classes:Q([[f.menu,"tox-menu-"+l+"-column"],s?[f.hasIcons]:[]])}),components:wp,items:n}:{value:e,dom:(u=r,c={dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Xg.parts.items({preprocess:kp({tag:"div",classes:["tox-collection__group"]},u)})]}).dom,components:c.components,items:n}},Dp=[$t("type"),$t("src"),Zt("alt"),ln("classes",[],Pt)],Ap=dt(Dp),Mp=[$t("type"),$t("text"),Zt("name"),ln("classes",["tox-collection__item-label"],Pt)],Rp=dt(Mp),Np=St((function(){return At("type",{cardimage:Ap,cardtext:Rp,cardcontainer:Bp})})),Bp=dt([$t("type"),an("direction","horizontal"),an("align","left"),an("valign","middle"),Kt("items",Np)]),Pp=[cn("disabled",!1),Zt("text"),Zt("shortcut"),yt("value","value",Xe((function(){return ii("menuitem-value")})),Rt()),nn("meta",{})],Hp=dt([$t("type"),Zt("label"),Kt("items",Np),sn("onSetup",(function(){return n})),sn("onAction",n)].concat(Pp)),Ip=dt([$t("type"),cn("active",!1),Zt("icon")].concat(Pp)),Lp=dt([$t("type"),Wt("fancytype",["inserttable","colorswatch"]),sn("onAction",n)]),Vp=dt([$t("type"),sn("onSetup",(function(){return n})),sn("onAction",n),Zt("icon")].concat(Pp)),Fp=dt([$t("type"),qt("getSubmenuItems"),sn("onSetup",(function(){return n})),Zt("icon")].concat(Pp)),jp=dt([$t("type"),Zt("icon"),cn("active",!1),sn("onSetup",(function(){return n})),qt("onAction")].concat(Pp)),Up=function(e,t,n){var r=Es(e.element,"."+n);if(0<r.length){var o=J(r,(function(e){var n=e.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>t})).getOr(r.length);return S.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return S.none()},$p=function(e,t){return ac([mg(e,t)])},Wp=function(e){return $p(ii("unnamed-events"),e)},qp=ii("tooltip.exclusive"),Gp=ii("tooltip.show"),Xp=ii("tooltip.hide"),Kp=function(e,t,n){e.getSystem().broadcastOn([qp],{})},Yp=Object.freeze({__proto__:null,hideAllExclusive:Kp,setComponents:function(e,t,n,r){n.getTooltip().each((function(e){e.getSystem().isConnected()&&dg.set(e,r)}))}}),Jp=Object.freeze({__proto__:null,events:function(e,t){var n=function(n){t.getTooltip().each((function(r){sl(r),e.onHide(n,r),t.clearTooltip()})),t.clearTimer()};return eo(Q([[ro(Gp,(function(n){t.resetTimer((function(){var r,o,i;r=n,t.isShowing()||(Kp(r),o=e.lazySink(r).getOrDie(),i=r.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:eo("normal"===e.mode?[ro(fr(),(function(e){Xr(r,Gp)})),ro(sr(),(function(e){Xr(r,Xp)}))]:[]),behaviours:ac([dg.config({})])}),t.setTooltip(i),al(o,i),e.onShow(r,i),tl.position(o,e.anchor(r),i))}),e.delay)})),ro(Xp,(function(r){t.resetTimer((function(){n(r)}),e.delay)})),ro(Or(),(function(e,t){t.universal||V(t.channels,qp)&&n(e)})),fo((function(e){n(e)}))],"normal"===e.mode?[ro(dr(),(function(e){Xr(e,Gp)})),ro(Sr(),(function(e){Xr(e,Xp)})),ro(fr(),(function(e){Xr(e,Gp)})),ro(sr(),(function(e){Xr(e,Xp)}))]:[ro(qr(),(function(e,t){Xr(e,Gp)})),ro(Gr(),(function(e){Xr(e,Xp)}))]]))}}),Qp=[jt("lazySink"),jt("tooltipDom"),nn("exclusive",!0),nn("tooltipComponents",[]),nn("delay",300),un("mode","normal",["normal","follow-highlight"]),nn("anchor",(function(e){return{anchor:"hotspot",hotspot:e,layouts:{onLtr:o([$u,Uu,Lu,Fu,Vu,ju]),onRtl:o([$u,Uu,Lu,Fu,Vu,ju])}}})),hu("onHide"),hu("onShow")],Zp=cc({fields:Qp,name:"tooltipping",active:Jp,state:Object.freeze({__proto__:null,init:function(){var e=mn(S.none()),t=mn(S.none()),n=function(){e.get().each((function(e){clearTimeout(e)}))},r=o("not-implemented");return Ci({getTooltip:function(){return t.get()},isShowing:function(){return t.get().isSome()},setTooltip:function(e){t.set(S.some(e))},clearTooltip:function(){t.set(S.none())},clearTimer:n,resetTimer:function(t,r){n(),e.set(S.some(setTimeout((function(){t()}),r)))},readState:r})}}),apis:Yp}),ev=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tv=tinymce.util.Tools.resolve("tinymce.util.I18n"),nv=["input","button","textarea","select"],rv=function(e,t,n){(t.disabled()?sv:lv)(e,t)},ov=function(e,t){return!0===t.useNative&&V(nv,ho(e.element))},iv=function(e){Ko(e.element,"disabled","disabled")},av=function(e){Zo(e.element,"disabled")},uv=function(e){Ko(e.element,"aria-disabled","true")},cv=function(e){Ko(e.element,"aria-disabled","false")},sv=function(e,t,n){t.disableClass.each((function(t){Hi(e.element,t)})),(ov(e,t)?iv:uv)(e),t.onDisabled(e)},lv=function(e,t,n){t.disableClass.each((function(t){Li(e.element,t)})),(ov(e,t)?av:cv)(e),t.onEnabled(e)},fv=function(e,t){return ov(e,t)?Qo(e.element,"disabled"):"true"===Yo(e.element,"aria-disabled")},dv=Object.freeze({__proto__:null,enable:lv,disable:sv,isDisabled:fv,onLoad:rv,set:function(e,t,n,r){(r?sv:lv)(e,t)}}),mv=Object.freeze({__proto__:null,exhibit:function(e,t){return Si({classes:t.disabled()?t.disableClass.toArray():[]})},events:function(e,t){return eo([to(Er(),(function(t,n){return fv(t,e)})),tc(e,t,rv)])}}),gv=[sn("disabled",s),nn("useNative",!0),Yt("disableClass"),hu("onDisabled"),hu("onEnabled")],hv=cc({fields:gv,name:"disabling",active:mv,apis:dv}),pv=tinymce.util.Tools.resolve("tinymce.EditorManager"),vv=function(e){return e.getParam("height",Math.max(e.getElement().offsetHeight,200))},bv=function(e){return e.getParam("width",ev.DOM.getStyle(e.getElement(),"width"))},yv=function(e){return S.from(e.getParam("min_width")).filter(N)},xv=function(e){return S.from(e.getParam("min_height")).filter(N)},wv=function(e){return S.from(e.getParam("max_width")).filter(N)},Cv=function(e){return S.from(e.getParam("max_height")).filter(N)},kv=function(e){return!1!==e.getParam("menubar",!0,"boolean")},Sv=function(e){var t=e.getParam("toolbar",!0),n=!0===t,r=E(t),o=z(t)&&0<t.length;return!Ov(e)&&(o||r||n)},_v=function(e){var t=j(9,(function(t){return e.getParam("toolbar"+(t+1),!1,"string")})),n=G(t,(function(e){return"string"==typeof e}));return 0<n.length?S.some(n):S.none()},Ov=function(e){return _v(e).fold((function(){return 0<e.getParam("toolbar",[],"string[]").length}),l)};(ap=ip=ip||{})["default"]="wrap",ap.floating="floating",ap.sliding="sliding",ap.scrolling="scrolling";var Ev,Tv,zv=function(e){return e.getParam("toolbar_mode","","string")};(Tv=Ev=Ev||{}).auto="auto",Tv.top="top",Tv.bottom="bottom";var Dv,Av,Mv,Rv=function(e){return e.getParam("toolbar_location",Ev.auto,"string")},Nv=function(e){return Rv(e)===Ev.bottom},Bv=function(e){var t=e.getParam("fixed_toolbar_container","","string");return 0<t.length&&e.inline?Ya(Wi(),t):S.none()},Pv=function(e){return e.inline&&Bv(e).isSome()},Hv=function(e){return Bv(e).getOrThunk((function(){return No(Ro(hn.fromDom(e.getElement())))}))},Iv=function(e){return e.inline&&!kv(e)&&!Sv(e)&&!Ov(e)},Lv=function(e){return(e.getParam("toolbar_sticky",!1,"boolean")||e.inline)&&!Pv(e)&&!Iv(e)},Vv="silver.readonly",Fv=dt([Ut("readonly",Ht)]),jv=function(e,t){var n=e.outerContainer.element;t&&(e.mothership.broadcastOn([Sl()],{target:n}),e.uiMothership.broadcastOn([Sl()],{target:n})),e.mothership.broadcastOn([Vv],{readonly:t}),e.uiMothership.broadcastOn([Vv],{readonly:t})},Uv=function(e,t){e.on("init",(function(){e.mode.isReadOnly()&&jv(t,!0)})),e.on("SwitchMode",(function(){return jv(t,e.mode.isReadOnly())})),e.getParam("readonly",!1,"boolean")&&e.setMode("readonly")},$v=function(){var e;return dc.config({channels:((e={})[Vv]={schema:Fv,onReceive:function(e,t){hv.set(e,t.readonly)}},e)})},Wv=function(e){return hv.config({disabled:e,disableClass:"tox-collection__item--state-disabled"})},qv=function(e){return hv.config({disabled:e})},Gv=function(e){return hv.config({disabled:e,disableClass:"tox-tbtn--disabled"})},Xv=function(e){return hv.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1})},Kv=function(e,t){var n=e.getApi(t);return function(e){e(n)}},Yv=function(e,t){return lo((function(n){Kv(e,n)((function(n){var r=e.onSetup(n);R(r)&&t.set(r)}))}))},Jv=function(e,t){return fo((function(n){return Kv(e,n)(t.get())}))},Qv=((Dv={})[Er()]=["disabling","alloy.base.behaviour","toggling","item-events"],Dv),Zv=function(e){return Z(e,(function(e){return e.toArray()}))},eb=function(e,t,r,o){var i,a,u=mn(n);return{type:"item",dom:t.dom,components:Zv(t.optComponents),data:e.data,eventOrder:Qv,hasSubmenu:e.triggersSubmenu,itemBehaviours:ac([mg("item-events",[(i=e,a=r,go((function(e,t){Kv(i,e)(i.onAction),i.triggersSubmenu||a!==up.CLOSE_ON_EXECUTE||(e.getSystem().isConnected()&&Xr(e,Ar()),t.stop())}))),Yv(e,u),Jv(e,u)]),Wv((function(){return e.disabled||o.isDisabled()})),$v(),dg.config({})].concat(e.itemBehaviours))}},tb=function(e){return{value:e.value,meta:d({text:e.text.getOr("")},e.meta)}},nb=tinymce.util.Tools.resolve("tinymce.Env"),rb=function(e){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:e}}},ob=function(e){return{dom:{tag:"div",classes:[mp]},components:[da(tv.translate(e))]}},ib=function(e,t){return{dom:{tag:"div",classes:t,innerHtml:e}}},ab=function(e,t){return{dom:{tag:"div",classes:[mp]},components:[{dom:{tag:e.tag,styles:e.styles},components:[da(tv.translate(t))]}]}},ub=function(e){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(t=e,n=nb.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},r=t.split("+"),o=$(r,(function(e){var t=e.toLowerCase().trim();return Pe(n,t)?n[t]:e})),nb.mac?o.join(""):o.join("+"))}};var t,n,r,o},cb=function(e){return{dom:{tag:"div",classes:["tox-collection__item-checkmark"],innerHtml:vh("checkmark",e)}}},sb=function(e,t){var n=t.map((function(e){return{attributes:{title:tv.translate(e)}}})).getOr({});return d({tag:"div",classes:[cp,sp].concat(e?["tox-collection__item-icon-rtl"]:[])},n)},lb=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],fb=["list-bull-circle","list-bull-default","list-bull-square"],db=function(e,t,n,r){void 0===r&&(r=S.none());var o,i,u,c,s,l,f,m,h,p,v,b,y=tv.isRtl()&&e.iconContent.exists((function(e){return V(fb,e)})),x=e.iconContent.map((function(e){return tv.isRtl()&&V(lb,e)?e+"-rtl":e})).map((function(e){return n=e,o=t.icons,i=r,S.from(o()[n.toLowerCase()]).or(i).getOrThunk((function(){return ph(o)}));var n,o,i})),w=S.from(e.meta).fold((function(){return ob}),(function(e){return Pe(e,"style")?a(ab,e.style):ob}));return"color"===e.presets?(m=e.ariaLabel,h=e.value,p=t,{dom:(v=x.getOr(""),b={tag:"div",attributes:m.map((function(e){return{title:p.translate(e)}})).getOr({}),classes:["tox-swatch"]},d(d({},b),"custom"===h?{tag:"button",classes:g(b.classes,["tox-swatches__picker-btn"]),innerHtml:v}:"remove"===h?{classes:g(b.classes,["tox-swatch--remove"]),innerHtml:v}:{attributes:d(d({},b.attributes),{"data-mce-color":h}),styles:{"background-color":h}})),optComponents:[]}):(o=e,i=x,u=w,c=y,s=n?i.or(S.some("")).map(rb):S.none(),l=o.checkMark,f=o.htmlContent.fold((function(){return o.textContent.map(u)}),(function(e){return S.some(ib(e,[mp]))})),{dom:sb(c,o.ariaLabel),optComponents:[s,f,o.shortcutContent.map(ub),l,o.caret]})},mb=function(e,t){return Be(e,"tooltipWorker").map((function(e){return[Zp.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(e){return{anchor:"submenu",item:e,overrides:{maxHeightFunction:Nc}}},mode:"follow-highlight",onShow:function(t,n){e((function(e){Zp.setComponents(t,[ma({element:hn.fromDom(e)})])}))}})]})).getOr([])},gb=function(e,t){var n,r=tv.translate(e),o=(n=r,ev.DOM.encode(n));if(0<t.length){var i=new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return o.replace(i,(function(e){return'<span class="tox-autocompleter-highlight">'+e+"</span>"}))}return o},hb=function e(t,n){return $(t,(function(t){switch(t.type){case"cardcontainer":return c=e((u=t).items,n),s="vertical"===u.direction?"tox-collection__item-container--column":vp,l="left"===u.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[pp,s,l,function(){switch(u.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:c};case"cardimage":return o=t.src,i=t.classes,a=t.alt,{dom:{tag:"img",classes:i,attributes:{src:o,alt:a.getOr("")}}};case"cardtext":var r=t.name.exists((function(e){return V(n.cardText.highlightOn,e)}))?S.from(n.cardText.matchText).getOr(""):"";return ib(gb(t.text,r),t.classes)}var o,i,a,u,c,s,l}))},pb=Ef(Fg(),jg()),vb=function(e){return{value:e}},bb=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,yb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,xb=function(e){return bb.test(e)||yb.test(e)},wb=function(e){var t={value:e.value.replace(bb,(function(e,t,n,r){return t+t+n+n+r+r}))},n=yb.exec(t.value);return null===n?["FFFFFF","FF","FF","FF"]:n},Cb=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},kb=function(e){var t=Cb(e.red)+Cb(e.green)+Cb(e.blue);return vb(t)},Sb=Math.min,_b=Math.max,Ob=Math.round,Eb=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Tb=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,zb=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},Db=function(e){var t=parseInt(e,10);return t.toString()===e&&0<=t&&t<=255},Ab=function(e){var t,n,r,o=(e.hue||0)%360,i=e.saturation/100,a=e.value/100;i=_b(0,Sb(i,1)),a=_b(0,Sb(a,1));if(0===i)return t=n=r=Ob(255*a),zb(t,n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:t=c,n=s,r=0;break;case 1:t=s,n=c,r=0;break;case 2:t=0,n=c,r=s;break;case 3:t=0,n=s,r=c;break;case 4:t=s,n=0,r=c;break;case 5:t=c,n=0,r=s;break;default:t=n=r=0}return t=Ob(255*(t+l)),n=Ob(255*(n+l)),r=Ob(255*(r+l)),zb(t,n,r,1)},Mb=function(e){var t=wb(e),n=parseInt(t[1],16),r=parseInt(t[2],16),o=parseInt(t[3],16);return zb(n,r,o,1)},Rb=function(e,t,n,r){var o=parseInt(e,10),i=parseInt(t,10),a=parseInt(n,10),u=parseFloat(r);return zb(o,i,a,u)},Nb=function(e){return"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"},Bb=zb(255,0,0,1),Pb=function(e,t){return e.fire("ResizeContent",t)},Hb=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Ib="tinymce-custom-colors",Lb="choiceitem",Vb=[{type:Lb,text:"Light Green",value:"#BFEDD2"},{type:Lb,text:"Light Yellow",value:"#FBEEB8"},{type:Lb,text:"Light Red",value:"#F8CAC6"},{type:Lb,text:"Light Purple",value:"#ECCAFA"},{type:Lb,text:"Light Blue",value:"#C2E0F4"},{type:Lb,text:"Green",value:"#2DC26B"},{type:Lb,text:"Yellow",value:"#F1C40F"},{type:Lb,text:"Red",value:"#E03E2D"},{type:Lb,text:"Purple",value:"#B96AD9"},{type:Lb,text:"Blue",value:"#3598DB"},{type:Lb,text:"Dark Turquoise",value:"#169179"},{type:Lb,text:"Orange",value:"#E67E23"},{type:Lb,text:"Dark Red",value:"#BA372A"},{type:Lb,text:"Dark Purple",value:"#843FA1"},{type:Lb,text:"Dark Blue",value:"#236FA1"},{type:Lb,text:"Light Gray",value:"#ECF0F1"},{type:Lb,text:"Medium Gray",value:"#CED4D9"},{type:Lb,text:"Gray",value:"#95A5A6"},{type:Lb,text:"Dark Gray",value:"#7E8C8D"},{type:Lb,text:"Navy Blue",value:"#34495E"},{type:Lb,text:"Black",value:"#000000"},{type:Lb,text:"White",value:"#ffffff"}],Fb=function(e){void 0===e&&(e=10);var t,n=Hb.getItem(Ib),r=E(n)?JSON.parse(n):[],o=e-(t=r).length<0?t.slice(0,e):t,i=function(e){o.splice(e,1)};return{add:function(t){var n;(-1===(n=L(o,t))?S.none():S.some(n)).each(i),o.unshift(t),o.length>e&&o.pop(),Hb.setItem(Ib,JSON.stringify(o))},state:function(){return o.slice(0)}}}(10),jb=function(e){return!1!==e.getParam("custom_colors")},Ub=function(e){var t=e.getParam("color_map");return void 0!==t?function(e){var t=[],n=document.createElement("canvas");n.height=1,n.width=1;for(var r=n.getContext("2d"),o=function(e,t){var n=t/255;return("0"+Math.round(e*n+255*(1-n)).toString(16)).slice(-2).toUpperCase()},i=0;i<e.length;i+=2)t.push({text:e[i+1],value:function(e){if(/^[0-9A-Fa-f]{6}$/.test(e))return"#"+e.toUpperCase();r.clearRect(0,0,n.width,n.height),r.fillStyle="#FFFFFF",r.fillStyle=e,r.fillRect(0,0,1,1);var t=r.getImageData(0,0,1,1).data,i=t[0],a=t[1],u=t[2],c=t[3];return"#"+o(i,c)+o(a,c)+o(u,c)}(e[i]),type:"choiceitem"});return t}(t):Vb},$b=function(e){Fb.add(e)},Wb=function(e){e.addCommand("mceApplyTextcolor",(function(t,n){var r,o,i;o=t,i=n,(r=e).undoManager.transact((function(){r.focus(),r.formatter.apply(o,{value:i}),r.nodeChanged()}))})),e.addCommand("mceRemoveTextcolor",(function(t){var n,r;r=t,(n=e).undoManager.transact((function(){n.focus(),n.formatter.remove(r,{value:null},null,!0),n.nodeChanged()}))}))},qb=function(e){var t,n,r=Ub(e),o=(t=r.length,Math.max(5,Math.ceil(Math.sqrt(t))));return n=o,e.getParam("color_cols",n,"number")},Gb=function(e,t,n,r){"custom"===n?Zb(e)((function(n){n.each((function(n){$b(n),e.execCommand("mceApplyTextcolor",t,n),r(n)}))}),"#000000"):"remove"===n?(r(""),e.execCommand("mceRemoveTextcolor",t)):(r(n),e.execCommand("mceApplyTextcolor",t,n))},Xb=function(e,t){return e.concat($(Fb.state(),(function(e){return{type:Lb,text:e,value:e}})).concat((r={type:n="choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},t?[r,{type:n,text:"Custom color",icon:"color-picker",value:"custom"}]:[r])));var n,r},Kb=function(e,t){return function(n){n(Xb(e,t))}},Yb=function(e,t,n){var r,o;r="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",o=n,e.setIconFill(r,o),e.setIconStroke(r,o)},Jb=function(e,t,r,o,i){e.ui.registry.addSplitButton(t,{tooltip:o,presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:function(t){var n,o,i;return S.from((o=r,(n=e).dom.getParents(n.selection.getStart(),(function(e){var t;(t=e.style["forecolor"===o?"color":"background-color"])&&(i=i||t)})),i)).bind((function(e){return function(e){if("transparent"===e)return S.some(zb(0,0,0,0));var t=Eb.exec(e);if(null!==t)return S.some(Rb(t[1],t[2],t[3],"1"));var n=Tb.exec(e);return null!==n?S.some(Rb(n[1],n[2],n[3],n[4])):S.none()}(e).map((function(e){var n=kb(e).value;return kn(t.toLowerCase(),n)}))})).getOr(!1)},columns:qb(e),fetch:Kb(Ub(e),jb(e)),onAction:function(t){null!==i.get()&&Gb(e,r,i.get(),n)},onItemAction:function(n,o){Gb(e,r,o,(function(n){var r;i.set(n),r={name:t,color:n},e.fire("TextColorChange",r)}))},onSetup:function(n){null!==i.get()&&Yb(n,t,i.get());var r=function(e){e.name===t&&Yb(n,e.name,e.color)};return e.on("TextColorChange",r),function(){e.off("TextColorChange",r)}}})},Qb=function(e,t,r,o){e.ui.registry.addNestedMenuItem(t,{text:o,icon:"forecolor"===t?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(t){Gb(e,r,t.value,n)}}]}})},Zb=function(e){return function(t,r){var o,i={colorpicker:r},a=(o=t,function(e){var t=e.getData();o(S.from(t.colorpicker)),e.close()});e.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:i,onAction:function(e,t){"hex-valid"===t.name&&(t.value?e.enable("ok"):e.disable("ok"))},onSubmit:a,onClose:n,onCancel:function(){t(S.none())}})}},ey=function(e,t,n,r,o,i,a,u){var c=Op(t),s=ty(t,n,r,"color"!==o?"normal":"color",i,a,u);return zp(e,c,s,r,o)},ty=function(e,t,r,o,i,a,u){return Yf($(e,(function(c){return"choiceitem"===c.type?Et("choicemenuitem",Ip,c).fold(Ep,(function(s){return S.some(function(e,t,r,o,i,a,u,c){void 0===c&&(c=!0);var s=db({presets:r,textContent:t?e.text:S.none(),htmlContent:S.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:S.none(),checkMark:t?S.some(cb(u.icons)):S.none(),caret:S.none(),value:e.value},u,c);return Fe(eb({data:tb(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){Dg.set(e,t)},isActive:function(){return Dg.isOn(e)},isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},onAction:function(t){return o(e.value)},onSetup:function(e){return e.setActive(i),n},triggersSubmenu:!1,itemBehaviours:[]},s,a,u),{toggling:{toggleClass:dp,toggleOnExecute:!1,selected:e.active}})}(s,1===r,o,t,a(c.value),i,u,Op(e)))})):S.none()})))},ny=function(e,t){var n=xp(t);return 1===e?{mode:"menu",moveOnTab:!0}:"auto"===e?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group")}},ry=ii("cell-over"),oy=ii("cell-execute"),iy=function(e,t,n){for(var r=[],o=0;o<t;o++){for(var i=[],a=0;a<n;a++)i.push(function(e,t,n){var r,o=function(n){return Kr(n,oy,{row:e,col:t})},i=function(e,t){t.stop(),o(e)};return ha({dom:{tag:"div",attributes:((r={role:"button"})["aria-labelledby"]=n,r)},behaviours:ac([mg("insert-table-picker-cell",[ro(fr(),bg.focus),ro(Er(),o),ro(br(),i),ro(zr(),i)]),Dg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),bg.config({onFocus:function(n){return Kr(n,ry,{row:e,col:t})}})])})}(o,a,e));r.push(i)}return r},ay={inserttable:function(e){var t=ii("size-label"),n=iy(t,10,10),r=hh({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[da("0x0")],behaviours:ac([dg.config({})])});return{type:"widget",data:{value:ii("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[pb.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Z(n,(function(e){return $(e,pa)})).concat(r.asSpec()),behaviours:ac([mg("insert-table-picker",[uo(ry,(function(e,t,o){var i=o.event.row,a=o.event.col;!function(e,t,n,r,o){for(var i=0;i<r;i++)for(var a=0;a<o;a++)Dg.set(e[i][a],i<=t&&a<=n)}(n,i,a,10,10),dg.set(r.get(e),[da(a+1+"x"+(i+1))])})),uo(oy,(function(t,n,r){e.onAction({numRows:r.event.row+1,numColumns:r.event.col+1}),Xr(t,Ar())}))]),ug.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(e,t){var n=Xb(t.colorinput.getColors(),t.colorinput.hasCustomColors()),r=t.colorinput.getColorCols(),o=ey(ii("menu-value"),n,(function(t){e.onAction({value:t})}),r,"color",up.CLOSE_ON_EXECUTE,s,t.shared.providers),i=d(d({},o),{markers:xp("color"),movement:ny(r,"color")});return{type:"widget",data:{value:ii("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[pb.widget(Xg.sketch(i))]}}},uy=function(e,t,r,i,a,u,c,s){void 0===s&&(s=!0);var l=db({presets:i,textContent:S.none(),htmlContent:r?e.text.map((function(e){return gb(e,t)})):S.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:S.none(),checkMark:S.none(),caret:S.none(),value:e.value},c.providers,s,e.icon);return eb({data:tb(e),disabled:e.disabled,getApi:o({}),onAction:function(t){return a(e.value,e.meta)},onSetup:o(n),triggersSubmenu:!1,itemBehaviours:mb(e.meta,c)},l,u,c.providers)},cy=function(e){var t=e.text.fold((function(){return{}}),(function(e){return{innerHtml:e}}));return{type:"separator",dom:d({tag:"div",classes:[sp,"tox-collection__group-heading"]},t),components:[]}},sy=function(e,t,n,r){void 0===r&&(r=!0);var o=db({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:S.none(),ariaLabel:e.text,caret:S.none(),checkMark:S.none(),shortcutContent:e.shortcut},n,r);return eb({data:tb(e),getApi:function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},disabled:e.disabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,t,n)},ly=function(e,t,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!1);var a,u,c=i?(u=r.icons,{dom:{tag:"div",classes:[gp],innerHtml:vh("chevron-down",u)}}):(a=r.icons,{dom:{tag:"div",classes:[gp],innerHtml:vh("chevron-right",a)}}),s=db({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:S.none(),ariaLabel:e.text,caret:S.some(c),checkMark:S.none(),shortcutContent:e.shortcut},r,o);return eb({data:tb(e),getApi:function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},disabled:e.disabled,onAction:n,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},s,t,r)},fy=function(e,t,n,r){void 0===r&&(r=!0);var o=db({iconContent:e.icon,textContent:e.text,htmlContent:S.none(),ariaLabel:e.text,checkMark:S.some(cb(n.icons)),caret:S.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},n,r);return Fe(eb({data:tb(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){Dg.set(e,t)},isActive:function(){return Dg.isOn(e)},isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,t,n),{toggling:{toggleClass:dp,toggleOnExecute:!1,selected:e.active}})},dy=function(e,t){return n=ay,r=e.fancytype,(Object.prototype.hasOwnProperty.call(n,r)?S.some(n[r]):S.none()).map((function(n){return n(e,t)}));var n,r},my=function(e,t,n,r){var o={dom:sb(!1,e.label),optComponents:[S.some({dom:{tag:"div",classes:[pp,vp]},components:hb(e.items,r)})]};return eb({data:tb(d({text:S.none()},e)),disabled:e.disabled,getApi:function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){hv.set(e,t),W(Es(e.element,"*"),(function(n){e.getSystem().getByDom(n).each((function(e){e.hasConfigured(hv)&&hv.set(e,t)}))}))}}},onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:S.from(r.itemBehaviours).getOr([])},o,t,n.providers)};(Mv=Av=Av||{})[Mv.ContentFocus=0]="ContentFocus",Mv[Mv.UiFocus=1]="UiFocus";var gy,hy,py,vy,by=function(e,t,n,r,o){var i=n.shared.providers,a=function(e){return o?d(d({},e),{shortcut:S.none(),icon:e.text.isSome()?S.none():e.icon}):e};switch(e.type){case"menuitem":return Et("menuitem",Vp,e).fold(Ep,(function(e){return S.some(sy(a(e),t,i,r))}));case"nestedmenuitem":return Et("nestedmenuitem",Fp,e).fold(Ep,(function(e){return S.some(ly(a(e),t,i,r,o))}));case"togglemenuitem":return Et("togglemenuitem",jp,e).fold(Ep,(function(e){return S.some(fy(a(e),t,i,r))}));case"separator":return Et("separatormenuitem",Fh,e).fold(Ep,(function(e){return S.some(cy(e))}));case"fancymenuitem":return Et("fancymenuitem",Lp,e).fold(Ep,(function(e){return dy(a(e),n)}));default:return console.error("Unknown item in general menu",e),S.none()}},yy=function(e,t,n,r,o,i,a){var u=1===r,c=!u||Op(e);return Yf($(e,(function(e){switch(e.type){case"separator":return Et("Autocompleter.Separator",Fh,e).fold(Ep,(function(e){return S.some(cy(e))}));case"cardmenuitem":return Et("cardmenuitem",Hp,e).fold(Ep,(function(e){return S.some(my(d(d({},e),{onAction:function(t){e.onAction(t),n(e.value,e.meta)}}),o,i,{itemBehaviours:mb(e.meta,i),cardText:{matchText:t,highlightOn:a}}))}));case"autocompleteitem":default:return Et("Autocompleter.Item",jh,e).fold(Ep,(function(e){return S.some(uy(e,t,u,"normal",n,o,i,c))}))}})))},xy=function(e,t,n,r,o){var i=Op(t),a=Yf($(t,(function(e){var t=function(e){return by(e,n,r,(t=e,o?!t.hasOwnProperty("text"):i),o);var t};return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t(d(d({},e),{disabled:!0})):t(e)})));return(o?Tp:zp)(e,i,a,1,"normal")},wy=function(e){return eh.singleData(e.value,e)},Cy=function(e,t){var n=mn(S.none()),r=mn(!1),o=ha(th.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ac([mg("dismissAutocompleter",[ro(Vr(),(function(){return u()}))])]),lazySink:t.getSink})),i=function(){return n.get().isSome()},a=function(){i()&&th.hide(o)},u=function(){var t;i()&&(t=n.get().map((function(e){return e.element})),Eh(t.getOr(hn.fromDom(e.selection.getNode()))).each(Wo),a(),n.set(S.none()),r.set(!1))},c=Ue((function(){return op(e)})),s=function(t,n,r,i){t.matchLength=n.text.length;var a,u,c,s,l,f,d,m=ce(r,(function(e){return S.from(e.columns)})).getOr(1);th.showAt(o,{anchor:"node",root:hn.fromDom(e.getBody()),node:S.from(t.element)},Xg.sketch((a=zp("autocompleter-value",!0,i,m,"normal"),u=m,c=Av.ContentFocus,s="normal",l=(c===Av.ContentFocus?Nd:Rd)(),f=ny(u,s),d=xp(s),{dom:a.dom,components:a.components,items:a.items,value:a.value,markers:{selectedItem:d.selectedItem,item:d.item},movement:f,fakeFocus:c===Av.ContentFocus,focusManager:l,menuBehaviours:Wp("auto"!==u?[]:[lo((function(e,t){Up(e,4,d.item).each((function(t){var n=t.numColumns,r=t.numRows;ug.setGridSize(e,r,n)}))}))])}))),th.getContent(o).each(dd.highlightFirst)},l=function o(l){var f;f=l,n.get().map((function(t){return Mh(e.dom,e.selection.getRng(),t.triggerChar).bind((function(t){return Vh(e,c,t,f)}))})).getOrThunk((function(){return Lh(e,c)})).fold(u,(function(c){var l,f;l=c.context,i()||(f=Oh(e,l.range),n.set(S.some({triggerChar:l.triggerChar,element:f,matchLength:l.text.length})),r.set(!1)),c.lookupData.then((function(i){n.get().map((function(n){var l,f,d,m,g=c.context;n.triggerChar===g.triggerChar&&(f=g.triggerChar,m=ce(d=i,(function(e){return S.from(e.columns)})).getOr(1),0<(l=Z(d,(function(n){var i=n.items;return yy(i,n.matchText,(function(t,i){var c=e.selection.getRng();Mh(e.dom,c,f).fold((function(){return console.error("Lost context. Cursor probably moved")}),(function(e){var c=e.range,s={hide:function(){u()},reload:function(e){a(),o(e)}};r.set(!0),n.onAction(s,c,t,i),r.set(!1)}))}),m,up.BUBBLE_TO_SANDBOX,t,n.highlightOn)}))).length?s(n,g,i,l):(10<=g.text.length-n.matchLength?u:a)())}))}))}))},f={onKeypress:kh((function(e){27!==e.which&&l()}),50),cancelIfNecessary:u,isMenuOpen:function(){return th.isOpen(o)},isActive:i,isProcessingAction:r.get,getView:function(){return th.getContent(o)}};!1===e.hasPlugin("rtc")&&Rh(f,e)},ky=l,Sy=function(e,t,n){return Da(e,t,ky,n,!1)},_y=function(e,t,n){return Da(e,t,ky,n,!0)},Oy=za,Ey=function(e,t,n){return Ja(e,t,n).isSome()},Ty=function(e,t){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},schedule:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){e.apply(null,r),n=null}),t)}}},zy=function(e){var t=e.raw;return void 0===t.touches||1!==t.touches.length?S.none():S.some(t.touches[0])},Dy=function(e){var t=mn(S.none()),n=mn(!1),r=Ty((function(t){e.triggerEvent(Dr(),t),n.set(!0)}),400),o=Ze([{key:rr(),value:function(e){return zy(e).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:e.target};r.schedule(e),n.set(!1),t.set(S.some(i))})),S.none()}},{key:or(),value:function(e){return r.cancel(),zy(e).each((function(e){t.get().each((function(n){var r,o,i,a;r=e,o=n,i=Math.abs(r.clientX-o.x),a=Math.abs(r.clientY-o.y),(5<i||5<a)&&t.set(S.none())}))})),S.none()}},{key:ir(),value:function(o){return r.cancel(),t.get().filter((function(e){return Gn(e.target,o.target)})).map((function(t){return n.get()?(o.prevent(),!1):e.triggerEvent(zr(),o)}))}}]);return{fireIfReady:function(e,t){return Be(o,t).bind((function(t){return t(e)}))}}},Ay=function(){return $n().browser.isFirefox()},My=ft([qt("triggerEvent"),nn("stopBackspace",!0)]),Ry=function(e,t){var n,r,o,i,a=zt("Getting GUI events settings",My,t),u=Dy(a),c=$(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(t){return Sy(e,t,(function(e){u.fireIfReady(e,t).each((function(t){t&&e.kill()})),a.triggerEvent(t,e)&&e.kill()}))})),s=mn(S.none()),l=Sy(e,"paste",(function(e){u.fireIfReady(e,"paste").each((function(t){t&&e.kill()})),a.triggerEvent("paste",e)&&e.kill(),s.set(S.some(setTimeout((function(){a.triggerEvent(_r(),e)}),0)))})),f=Sy(e,"keydown",(function(e){var t;a.triggerEvent("keydown",e)?e.kill():!0!==a.stopBackspace||(t=e).raw.which!==md[0]||V(["input","textarea"],ho(t.target))||Ey(t.target,'[contenteditable="true"]')||e.prevent()})),d=(n=e,r=function(e){a.triggerEvent("focusin",e)&&e.kill()},Ay()?_y(n,"focus",r):Sy(n,"focusin",r)),m=mn(S.none()),g=(o=e,i=function(e){a.triggerEvent("focusout",e)&&e.kill(),m.set(S.some(setTimeout((function(){a.triggerEvent(Sr(),e)}),0)))},Ay()?_y(o,"blur",i):Sy(o,"focusout",i));return{unbind:function(){W(c,(function(e){e.unbind()})),f.unbind(),d.unbind(),g.unbind(),l.unbind(),s.get().each(clearTimeout),m.get().each(clearTimeout)}}},Ny=function(e,t){var n=Be(e,"target").getOr(t);return mn(n)},By=Ie([{stopped:[]},{resume:["element"]},{complete:[]}]),Py=function(e,t,n,r,o,i){var a,u,c,s,l=e(t,r),f=(a=n,u=o,c=mn(!1),s=mn(!1),{stop:function(){c.set(!0)},cut:function(){s.set(!0)},isStopped:c.get,isCut:s.get,event:a,setSource:u.set,getSource:u.get});return l.fold((function(){return i.logEventNoHandlers(t,r),By.complete()}),(function(e){var n=e.descHandler;return _i(n)(f),f.isStopped()?(i.logEventStopped(t,e.element,n.purpose),By.stopped()):f.isCut()?(i.logEventCut(t,e.element,n.purpose),By.complete()):_o(e.element).fold((function(){return i.logNoParent(t,e.element,n.purpose),By.complete()}),(function(r){return i.logEventResponse(t,e.element,n.purpose),By.resume(r)}))}))},Hy=function e(t,n,r,o,i,a){return Py(t,n,r,o,i,a).fold(l,(function(o){return e(t,n,r,o,i,a)}),s)},Iy=function(e,t,r){var o,i,a=(o=t,i=mn(!1),{stop:function(){i.set(!0)},cut:n,isStopped:i.get,isCut:s,event:o,setSource:c("Cannot set source of a broadcasted event"),getSource:c("Cannot get source of a broadcasted event")});return W(e,(function(e){var t=e.descHandler;_i(t)(a)})),a.isStopped()},Ly=function(e,t,n,r,o){var i=Ny(n,r);return Hy(e,t,n,r,i,o)},Vy=function(){var e={};return{registerId:function(t,n,r){Te(r,(function(r,o){var i,u,c=void 0!==e[o]?e[o]:{};c[n]=(i=r,u=t,{cHandler:a.apply(void 0,[i.handler].concat(u)),purpose:i.purpose}),e[o]=c}))},unregisterId:function(t){Te(e,(function(e,n){e.hasOwnProperty(t)&&delete e[t]}))},filterByType:function(t){return Be(e,t).map((function(e){return Me(e,(function(e,t){return{id:t,descHandler:e}}))})).getOr([])},find:function(t,n,r){var o=Be(e,n);return Qn(r,(function(e){return t=o,fi(n=e).fold((function(){return S.none()}),(function(e){return t.bind((function(t){return Be(t,e)})).map((function(e){return{element:n,descHandler:e}}))}));var t,n}),t)}}},Fy=function(){var e=Vy(),t={},n=function(e){var t=e.element;return fi(t).fold((function(){return t="uid-",n=e.element,r=ii(ci+t),li(n,r),r;var t,n,r}),(function(e){return e}))},r=function(n){fi(n.element).each((function(n){delete t[n],e.unregisterId(n)}))};return{find:function(t,n,r){return e.find(t,n,r)},filter:function(t){return e.filterByType(t)},register:function(o){var i=n(o);He(t,i)&&function(e,n){var o=t[n];if(o!==e)throw new Error('The tagId "'+n+'" is already used by: '+ti(o.element)+"\nCannot use it for: "+ti(e.element)+"\nThe conflicting element is"+($i(o.element)?" ":" not ")+"already in the DOM");r(e)}(o,i);var a=[o];e.registerId(a,i,o.events),t[i]=o},unregister:r,getById:function(e){return Be(t,e)}}},jy=Xf({name:"Container",factory:function(e){var t=e.dom,n=t.attributes,r=m(t,["attributes"]);return{uid:e.uid,dom:d({tag:"div",attributes:d({role:"presentation"},n)},r),components:e.components,behaviours:Wl(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[nn("components",[]),$l("containerBehaviours",[]),nn("events",{}),nn("domModification",{}),nn("eventOrder",{})]}),Uy=function(e){var t=function(t){return _o(e.element).fold(l,(function(e){return Gn(t,e)}))},r=Fy(),i=function(e,n){return r.find(t,e,n)},a=Ry(e.element,{triggerEvent:function(e,t){return au(e,t.target,(function(n){return o=n,Ly(i,e,r=t,r.target,o);var r,o}))}}),u={debugInfo:o("real"),triggerEvent:function(e,t,n){au(e,t,(function(r){return Ly(i,e,n,t,r)}))},triggerFocus:function(e,t){fi(e).fold((function(){gc(e)}),(function(r){au(kr(),e,(function(r){var o,a,u,c,s,l;return o=i,a=kr(),s=r,l=Ny(u={originator:t,kill:n,prevent:n,target:e},c=e),Py(o,a,u,c,l,s),!1}))}))},triggerEscape:function(e,t){u.triggerEvent("keydown",e.element,t.event)},getByUid:function(e){return v(e)},getByDom:function(e){return b(e)},build:ha,addToGui:function(e){f(e)},removeFromGui:function(e){d(e)},addToWorld:function(e){c(e)},removeFromWorld:function(e){s(e)},broadcast:function(e){g(e)},broadcastOn:function(e,t){h(e,t)},broadcastEvent:function(e,t){p(e,t)},isConnected:l},c=function e(t){t.connect(u),bo(t.element)||(r.register(t),W(t.components(),e),u.triggerEvent(Rr(),t.element,{target:t.element}))},s=function e(t){bo(t.element)||(W(t.components(),e),r.unregister(t)),t.disconnect()},f=function(t){al(e,t)},d=function(e){sl(e)},m=function(e){var t=r.filter(Or());W(t,(function(t){var n=t.descHandler;_i(n)(e)}))},g=function(e){m({universal:!0,data:e})},h=function(e,t){m({universal:!1,channels:e,data:t})},p=function(e,t){var n=r.filter(e);return Iy(n,t)},v=function(e){return r.getById(e).fold((function(){return fe.error(new Error('Could not find component with uid: "'+e+'" in system.'))}),fe.value)},b=function(e){var t=fi(e).getOr("not found");return v(t)};return c(e),{root:e,element:e.element,destroy:function(){a.unbind(),$o(e.element)},add:f,remove:d,getByUid:v,getByDom:b,addToWorld:c,removeFromWorld:s,broadcast:g,broadcastOn:h,broadcastEvent:p}},$y=o([nn("prefix","form-field"),$l("fieldBehaviours",[td,Ul])]),Wy=o([Cf({schema:[jt("dom")],name:"label"}),Cf({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}}}},schema:[jt("text")],name:"aria-descriptor"}),xf({factory:{sketch:function(e){var t=Je(e,["factory"]);return e.factory.sketch(t)}},schema:[jt("factory")],name:"field"})]),qy=Kf({name:"FormField",configFields:$y(),partFields:Wy(),factory:function(e,t,n,r){var o=ql(e.fieldBehaviours,[td.config({find:function(t){return Nf(t,e,"field")}}),Ul.config({store:{mode:"manual",getValue:function(e){return td.getCurrent(e).bind(Ul.getValue)},setValue:function(e,t){td.getCurrent(e).each((function(e){Ul.setValue(e,t)}))}}})]),i=eo([lo((function(t,n){var r=Pf(t,e,["label","field","aria-descriptor"]);r.field().each((function(t){var n=ii(e.prefix);r.label().each((function(e){Ko(e.element,"for",n),Ko(t.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=ii(e.prefix);Ko(n.element,"id",r),Ko(t.element,"aria-describedby",r)}))}))}))]),a={getField:function(t){return Nf(t,e,"field")},getLabel:function(t){return Nf(t,e,"label")}};return{uid:e.uid,dom:e.dom,components:t,behaviours:o,events:i,apis:a}},apis:{getField:function(e,t){return e.getField(t)},getLabel:function(e,t){return e.getLabel(t)}}}),Gy=Object.freeze({__proto__:null,exhibit:function(e,t){return Si({attributes:Ze([{key:t.tabAttr,value:"true"}])})}}),Xy=[nn("tabAttr","data-alloy-tabstop")],Ky=cc({fields:Xy,name:"tabstopping",active:Gy}),Yy=tinymce.util.Tools.resolve("tinymce.html.Entities"),Jy=function(e,t,n,r){var o=Qy(e,t,n,r);return qy.sketch(o)},Qy=function(e,t,n,r){return{dom:Zy(n),components:e.toArray().concat([t]),fieldBehaviours:ac(r)}},Zy=function(e){return{tag:"div",classes:["tox-form__group"].concat(e)}},ex=function(e,t){return qy.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}})},tx=ii("form-component-change"),nx=ii("form-close"),rx=ii("form-cancel"),ox=ii("form-action"),ix=ii("form-submit"),ax=ii("form-block"),ux=ii("form-unblock"),cx=ii("form-tabchange"),sx=ii("form-resize"),lx=function(e,t){var n,r,o,a=e.label.map((function(e){return ex(e,t)})),u=function(e){return function(t,n){Ja(n.event.target,"[data-collection-item-value]").each((function(r){e(t,n,r,Yo(r,"data-collection-item-value"))}))}},c=u((function(n,r,o,i){r.stop(),t.isDisabled()||Kr(n,ox,{name:e.name,value:i})})),s=[ro(fr(),u((function(e,t,n){gc(n)}))),ro(br(),c),ro(zr(),c),ro(dr(),u((function(e,t,n){Ya(e.element,"."+hp).each((function(e){Li(e,hp)})),Hi(n,hp)}))),ro(mr(),u((function(e){Ya(e.element,"."+hp).each((function(e){Li(e,hp)}))}))),go(u((function(t,n,r,o){Kr(t,ox,{name:e.name,value:o})})))],l=function(e,t){return $(Es(e.element,".tox-collection__item"),t)},f=qy.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:i},behaviours:ac([hv.config({disabled:t.isDisabled,onDisabled:function(e){l(e,(function(e){Hi(e,"tox-collection__item--state-disabled"),Ko(e,"aria-disabled",!0)}))},onEnabled:function(e){l(e,(function(e){Li(e,"tox-collection__item--state-disabled"),Zo(e,"aria-disabled")}))}}),$v(),dg.config({}),Ul.config({store:{mode:"memory",initialValue:[]},onSetValue:function(n,r){var o,i,a,u;o=n,i=$(r,(function(n){var r=tv.translate(n.text),o=1===e.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+n.icon+"</div>",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(e){return a[e]}));return'<div class="tox-collection__item'+(t.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+Yy.encodeAllRaw(n.value)+'" title="'+u+'" aria-label="'+u+'">'+i+o+"</div>"})),a="auto"!==e.columns&&1<e.columns?U(i,e.columns):[i],u=$(a,(function(e){return'<div class="tox-collection__group">'+e.join("")+"</div>"})),Go(o.element,u.join("")),"auto"===e.columns&&Up(n,5,"tox-collection__item").each((function(e){var t=e.numRows,r=e.numColumns;ug.setGridSize(n,t,r)})),Xr(n,sx)}}),Ky.config({}),ug.config((r=e.columns,o="normal",1===r?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===r?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===o?".tox-swatches__row":".tox-collection__group",cell:"color"===o?"."+lp:"."+sp}})),mg("collection-events",s)]),eventOrder:((n={})[Er()]=["disabling","alloy.base.behaviour","collection-events"],n)});return Jy(a,f,["tox-form__group--collection"],[])},fx=o([Yt("data"),nn("inputAttributes",{}),nn("inputStyles",{}),nn("tag","input"),nn("inputClasses",[]),hu("onSetValue"),nn("styles",{}),nn("eventOrder",{}),$l("inputBehaviours",[Ul,bg]),nn("selectOnFocus",!0)]),dx=function(e){return ac([bg.config({onFocus:e.selectOnFocus?function(e){var t=e.element,n=oa(t);t.dom.setSelectionRange(0,n.length)}:n})])},mx=function(e){return{tag:e.tag,attributes:d({type:"text"},e.inputAttributes),styles:e.inputStyles,classes:e.inputClasses}},gx=Xf({name:"Input",configFields:fx(),factory:function(e,t){return{uid:e.uid,dom:mx(e),components:[],behaviours:d(d({},dx(n=e)),ql(n.inputBehaviours,[Ul.config({store:d(d({mode:"manual"},n.data.map((function(e){return{initialValue:e}})).getOr({})),{getValue:function(e){return oa(e.element)},setValue:function(e,t){oa(e.element)!==t&&ia(e.element,t)}}),onSetValue:n.onSetValue})])),eventOrder:e.eventOrder};var n}}),hx={},px={exports:hx};gy=void 0,hy=hx,py=px,vy=void 0,function(n){"object"==t(hy)&&void 0!==py?py.exports=n():"function"==typeof gy&&gy.amd?gy([],n):("undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof vy&&vy;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return o(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof vy&&vy,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&g())}function g(){if(!f){var e=c(m);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||f||c(g)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,n,r){(function(e){function r(){}function o(e){if("object"!=t(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){try{n=r(e._value)}catch(d){return void u(t.promise,d)}a(t.promise,n)}else(1===e._state?a:u)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==t(n)||"function"==typeof n)){var r=n.then;if(n instanceof o)return e._state=3,e._value=n,void c(e);if("function"==typeof r)return void l((i=r,s=n,function(){i.apply(s,arguments)}),e)}e._state=1,e._value=n,c(e)}catch(a){u(e,a)}var i,s}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn((function(){e._handled||o._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function s(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e((function(e){n||(n=!0,a(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(r){if(n)return;n=!0,u(t,r)}}var f,d;f=this,d=setTimeout,o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r);return i(this,new s(e,t,n)),n},o.all=function(e){var n=Array.prototype.slice.call(e);return new o((function(e,o){if(0===n.length)return e([]);for(var i=n.length,a=0;a<n.length;a++)!function a(u,c){try{if(c&&("object"==t(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,(function(e){a(u,e)}),o)}n[u]=c,0==--i&&e(n)}catch(r){o(r)}}(a,n[a])}))},o.resolve=function(e){return e&&"object"==t(e)&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},o._immediateFn="function"==typeof e?function(t){e(t)}:function(e){d(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},o._setImmediateFn=function(e){o._immediateFn=e},o._setUnhandledRejectionFn=function(e){o._unhandledRejectionFn=e},void 0!==n&&n.exports?n.exports=o:f.Promise||(f.Promise=o)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}));var vx,bx,yx=px.exports.boltExport,xx=function e(t){var n=S.none(),r=[],o=function(e){i()?u(e):r.push(e)},i=function(){return n.isSome()},a=function(e){W(e,u)},u=function(e){n.each((function(t){setTimeout((function(){e(t)}),0)}))};return t((function(e){i()||(n=S.some(e),a(r),r=[])})),{get:o,map:function(t){return e((function(e){o((function(n){e(t(n))}))}))},isReady:i}},wx={nu:xx,pure:function(e){return xx((function(t){t(e)}))}},Cx=function(e){setTimeout((function(){throw e}),0)},kx=function e(t){var n=function(e){t().then(e,Cx)};return{map:function(n){return e((function(){return t().then(n)}))},bind:function(n){return e((function(){return t().then((function(e){return n(e).toPromise()}))}))},anonBind:function(n){return e((function(){return t().then((function(){return n.toPromise()}))}))},toLazy:function(){return wx.nu(n)},toCached:function(){var n=null;return e((function(){return null===n&&(n=t()),n}))},toPromise:t,get:n}},Sx=function(e){return kx((function(){return new yx(e)}))},_x=function(e){return kx((function(){return yx.resolve(e)}))},Ox=["input","textarea"],Ex=function(e){var t=ho(e);return V(Ox,t)},Tx=function(e,t){var n=t.getRoot(e).getOr(e.element);Li(n,t.invalidClass),t.notify.each((function(t){Ex(e.element)&&Ko(e.element,"aria-invalid",!1),t.getContainer(e).each((function(e){Go(e,t.validHtml)})),t.onValid(e)}))},zx=function(e,t,n,r){var o=t.getRoot(e).getOr(e.element);Hi(o,t.invalidClass),t.notify.each((function(t){Ex(e.element)&&Ko(e.element,"aria-invalid",!0),t.getContainer(e).each((function(e){Go(e,r)})),t.onInvalid(e,r)}))},Dx=function(e,t,n){return t.validator.fold((function(){return _x(fe.value(!0))}),(function(t){return t.validate(e)}))},Ax=function(e,t,n){return t.notify.each((function(t){t.onValidate(e)})),Dx(e,t).map((function(n){return e.getSystem().isConnected()?n.fold((function(n){return zx(e,t,0,n),fe.error(n)}),(function(n){return Tx(e,t),fe.value(n)})):fe.error("No longer in system")}))},Mx=Object.freeze({__proto__:null,markValid:Tx,markInvalid:zx,query:Dx,run:Ax,isInvalid:function(e,t){var n=t.getRoot(e).getOr(e.element);return Vi(n,t.invalidClass)}}),Rx=Object.freeze({__proto__:null,events:function(e,t){return e.validator.map((function(t){return eo([ro(t.onEvent,(function(t){Ax(t,e).get(i)}))].concat(t.validateOnLoad?[lo((function(t){Ax(t,e).get(n)}))]:[]))})).getOr({})}}),Nx=[jt("invalidClass"),nn("getRoot",S.none),tn("notify",[nn("aria","alert"),nn("getContainer",S.none),nn("validHtml",""),hu("onValid"),hu("onInvalid"),hu("onValidate")]),tn("validator",[jt("validate"),nn("onEvent","input"),nn("validateOnLoad",!0)])],Bx=cc({fields:Nx,name:"invalidating",active:Rx,apis:Mx,extra:{validation:function(e){return function(t){var n=Ul.getValue(t);return _x(e(n))}}}}),Px=Object.freeze({__proto__:null,getCoupled:function(e,t,n,r){return n.getOrCreate(e,t,r)}}),Hx=[Ut("others",Ot(fe.value,Rt()))],Ix=cc({fields:Hx,name:"coupling",apis:Px,state:Object.freeze({__proto__:null,init:function(){var e={},t=o({});return Ci({readState:t,getOrCreate:function(t,n,r){var o=Oe(n.others);if(o)return Be(e,r).getOrThunk((function(){var o=Be(n.others,r).getOrDie("No information found for coupled component: "+r)(t),i=t.getSystem().build(o);return e[r]=i}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),Lx=o("sink"),Vx=o(Cf({name:Lx(),overrides:o({dom:{tag:"div"},behaviours:ac([tl.config({useFixed:l})]),events:eo([co(gr()),co(ur()),co(br())])})}));(bx=vx=vx||{})[bx.HighlightFirst=0]="HighlightFirst",bx[bx.HighlightNone=1]="HighlightNone";var Fx,jx,Ux,$x,Wx,qx,Gx=function(e,t){var n=e.getHotspot(t).getOr(t),r=e.getAnchorOverrides();return e.layouts.fold((function(){return{anchor:"hotspot",hotspot:n,overrides:r}}),(function(e){return{anchor:"hotspot",hotspot:n,overrides:r,layouts:e}}))},Xx=function(e,t,n,r,o,i,a){var u,c,s,l,f,m,g,h,p,v,b=Gx(e,n);return(c=b,l=r,f=o,m=a,g=t,h=s=n,p=(0,(u=e).fetch)(h).map(g),v=Qx(s,u),p.map((function(e){return e.bind((function(e){return S.from(eh.sketch(d(d({},f.menu()),{uid:di(""),data:e,highlightImmediately:m===vx.HighlightFirst,onOpenMenu:function(e,t){var n=v().getOrDie();tl.position(n,c,t),kl.decloak(l)},onOpenSubmenu:function(e,t,n){var r=v().getOrDie();tl.position(r,{anchor:"submenu",item:t},n),kl.decloak(l)},onRepositionMenu:function(e,t,n){var r=v().getOrDie();tl.position(r,c,t),W(n,(function(e){tl.position(r,{anchor:"submenu",item:e.triggeringItem},e.triggeredMenu)}))},onEscape:function(){return bg.focus(s),kl.close(l),S.some(!0)}})))}))}))).map((function(e){return e.fold((function(){kl.isOpen(r)&&kl.close(r)}),(function(e){kl.cloak(r),kl.open(r,e),i(r)})),r}))},Kx=function(e,t,n,r,o,i,a){return kl.close(r),_x(r)},Yx=function(e,t,n,r,o,i){var a=Ix.getCoupled(n,"sandbox");return(kl.isOpen(a)?Kx:Xx)(e,t,n,a,r,o,i)},Jx=function(e,t,n){var r,o,i=td.getCurrent(t).getOr(t),a=Ea(e.element);n?Ki(i.element,"min-width",a+"px"):(r=i.element,o=a,Oa.set(r,o))},Qx=function(e,t){return e.getSystem().getByUid(t.uid+"-"+Lx()).map((function(e){return function(){return fe.value(e)}})).getOrThunk((function(){return t.lazySink.fold((function(){return function(){return fe.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(t){return function(){return t(e)}}))}))},Zx=function(e){kl.getState(e).each((function(e){eh.repositionMenus(e)}))},ew=function(e,t,n){var r=Qa(),o=Qx(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:Xl(e.sandboxBehaviours,[Ul.config({store:{mode:"memory",initialValue:t}}),kl.config({onOpen:function(o,i){var a=Gx(e,t);r.link(t.element),e.matchWidth&&Jx(a.hotspot,i,e.useMinWidth),e.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(e,o){r.unlink(t.element),void 0!==n&&void 0!==n.onClose&&n.onClose(e,o)},isPartOf:function(e,n,r){return eu(n,r)||eu(t,r)},getAttachPoint:function(){return o().getOrDie()}}),td.config({find:function(e){return kl.getState(e).bind((function(e){return td.getCurrent(e)}))}}),dc.config({channels:d(d({},Tl({isExtraPart:s})),Dl({doReposition:Zx}))})])}},tw=function(e){var t=Ix.getCoupled(e,"sandbox");Zx(t)},nw=function(){return[nn("sandboxClasses",[]),Gl("sandboxBehaviours",[td,dc,kl,Ul])]},rw=o([jt("dom"),jt("fetch"),hu("onOpen"),pu("onExecute"),nn("getHotspot",S.some),nn("getAnchorOverrides",o({})),Yc(),$l("dropdownBehaviours",[Dg,Ix,ug,bg]),jt("toggleClass"),nn("eventOrder",{}),Yt("lazySink"),nn("matchWidth",!1),nn("useMinWidth",!1),Yt("role")].concat(nw())),ow=o([wf({schema:[du()],name:"menu",defaults:function(e){return{onExecute:e.onExecute}}}),Vx()]),iw=Kf({name:"Dropdown",configFields:rw(),partFields:ow(),factory:function(e,t,r,o){var i,a,u=function(e){kl.getState(e).each((function(e){eh.highlightPrimary(e)}))},c={expand:function(t){Dg.isOn(t)||Yx(e,(function(e){return e}),t,o,n,vx.HighlightNone).get(n)},open:function(t){Dg.isOn(t)||Yx(e,(function(e){return e}),t,o,n,vx.HighlightFirst).get(n)},isOpen:Dg.isOn,close:function(t){Dg.isOn(t)&&Yx(e,(function(e){return e}),t,o,n,vx.HighlightFirst).get(n)},repositionMenus:function(e){Dg.isOn(e)&&tw(e)}},s=function(e,t){return Yr(e),S.some(!0)};return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.dropdownBehaviours,[Dg.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),Ix.config({others:{sandbox:function(t){return ew(e,t,{onOpen:function(){return Dg.on(t)},onClose:function(){return Dg.off(t)}})}}}),ug.config({mode:"special",onSpace:s,onEnter:s,onDown:function(e,t){var n;return iw.isOpen(e)?(n=Ix.getCoupled(e,"sandbox"),u(n)):iw.open(e),S.some(!0)},onEscape:function(e,t){return iw.isOpen(e)?(iw.close(e),S.some(!0)):S.none()}}),bg.config({})]),events:Mg(S.some((function(t){Yx(e,(function(e){return e}),t,o,u,vx.HighlightFirst).get(n)}))),eventOrder:d(d({},e.eventOrder),((i={})[Er()]=["disabling","toggling","alloy.base.behaviour"],i)),apis:c,domModification:{attributes:d(d({"aria-haspopup":"true"},e.role.fold((function(){return{}}),(function(e){return{role:e}}))),"button"===e.dom.tag?{type:(a="type",Be(e.dom,"attributes").bind((function(e){return Be(e,a)})).getOr("button"))}:{})}}},apis:{open:function(e,t){return e.open(t)},expand:function(e,t){return e.expand(t)},close:function(e,t){return e.close(t)},isOpen:function(e,t){return e.isOpen(t)},repositionMenus:function(e,t){return e.repositionMenus(t)}}}),aw=cc({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:function(){return eo([to(xr(),l)])},exhibit:function(){return Si({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),uw=ii("color-input-change"),cw=ii("color-swatch-change"),sw=ii("color-picker-cancel"),lw=function(e,t,r){var o,i,a=qy.parts.field({factory:gx,inputClasses:["tox-textfield"],onSetValue:function(e){return Bx.run(e).get(n)},inputBehaviours:ac([hv.config({disabled:t.providers.isDisabled}),$v(),Ky.config({}),Bx.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(e){return _o(e.element)},notify:{onValid:function(e){var t=Ul.getValue(e);Kr(e,uw,{color:t})}},validator:{validateOnLoad:!1,validate:function(e){var t=Ul.getValue(e);if(0===t.length)return _x(fe.value(!0));var n=hn.fromTag("span");Ki(n,"background-color",t);var r=ea(n,"background-color").fold((function(){return fe.error("blah")}),(function(e){return fe.value(t)}));return _x(r)}}})]),selectOnFocus:!1}),u=e.label.map((function(e){return ex(e,t.providers)})),c=function(e,t){Kr(e,cw,{value:t})},l=hh((o={dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Vu,Lu,$u]},onLtr:function(){return[Lu,Vu,$u]}},components:[],fetch:Kb(r.getColors(),r.hasCustomColors()),columns:r.getColorCols(),presets:"color",onItemAction:function(e,t){l.getOpt(e).each((function(e){"custom"===t?r.colorPicker((function(t){t.fold((function(){return Xr(e,sw)}),(function(t){c(e,t),$b(t)}))}),"#ffffff"):c(e,"remove"===t?"":t)}))}},i=t,iw.sketch({dom:o.dom,components:o.components,toggleClass:"mce-active",dropdownBehaviours:ac([qv(i.providers.isDisabled),$v(),aw.config({}),Ky.config({})]),layouts:o.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:i.getSink,fetch:function(e){return Sx((function(e){return o.fetch(e)})).map((function(t){return S.from(wy(Fe(ey(ii("menu-value"),t,(function(t){o.onItemAction(e,t)}),o.columns,o.presets,up.CLOSE_ON_EXECUTE,s,i.providers),{movement:ny(o.columns,o.presets)})))}))},parts:{menu:Cp(0,0,o.presets)}})));return qy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:u.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[a,l.asSpec()]}]),fieldBehaviours:ac([mg("form-field-events",[ro(uw,(function(t,n){l.getOpt(t).each((function(e){Ki(e.element,"background-color",n.event.color)})),Kr(t,tx,{name:e.name})})),ro(cw,(function(e,t){qy.getField(e).each((function(n){Ul.setValue(n,t.event.value),td.getCurrent(e).each(bg.focus)}))})),ro(sw,(function(e,t){qy.getField(e).each((function(t){td.getCurrent(e).each(bg.focus)}))}))])])})},fw=function(e,t,n){return{hue:e,saturation:t,value:n}},dw=ii("rgb-hex-update"),mw=ii("slider-update"),gw=ii("palette-update"),hw=Cf({schema:[jt("dom")],name:"label"}),pw=function(e){return Cf({name:e+"-edge",overrides:function(t){return t.model.manager.edgeActions[e].fold((function(){return{}}),(function(e){return{events:eo([oo(rr(),(function(t,n,r){return e(t,r)}),[t]),oo(ur(),(function(t,n,r){return e(t,r)}),[t]),oo(cr(),(function(t,n,r){r.mouseIsDown.get()&&e(t,r)}),[t])])}}))}})},vw=pw("top-left"),bw=pw("top"),yw=pw("top-right"),xw=pw("right"),ww=pw("bottom-right"),Cw=pw("bottom"),kw=pw("bottom-left"),Sw=[hw,pw("left"),xw,bw,Cw,vw,yw,kw,ww,xf({name:"thumb",defaults:o({dom:{styles:{position:"absolute"}}}),overrides:function(e){return{events:eo([ao(rr(),e,"spectrum"),ao(or(),e,"spectrum"),ao(ir(),e,"spectrum"),ao(ur(),e,"spectrum"),ao(cr(),e,"spectrum"),ao(lr(),e,"spectrum")])}}}),xf({schema:[dn("mouseIsDown",(function(){return mn(!1)}))],name:"spectrum",overrides:function(e){var t=e.model.manager,n=function(n,r){return t.getValueFromEvent(r).map((function(r){return t.setValueFrom(n,e,r)}))};return{behaviours:ac([ug.config({mode:"special",onLeft:function(n){return t.onLeft(n,e)},onRight:function(n){return t.onRight(n,e)},onUp:function(n){return t.onUp(n,e)},onDown:function(n){return t.onDown(n,e)}}),bg.config({})]),events:eo([ro(rr(),n),ro(or(),n),ro(ur(),n),ro(cr(),(function(t,r){e.mouseIsDown.get()&&n(t,r)}))])}}})],_w=o("slider.change.value"),Ow=function(e){var t=e.event.raw;return-1===t.type.indexOf("touch")?void 0!==t.clientX?S.some(t).map((function(e){return Ca(e.clientX,e.clientY)})):S.none():void 0!==t.touches&&1===t.touches.length?S.some(t.touches[0]).map((function(e){return Ca(e.clientX,e.clientY)})):S.none()},Ew=function(e){return e.model.minX},Tw=function(e){return e.model.minY},zw=function(e){return e.model.minX-1},Dw=function(e){return e.model.minY-1},Aw=function(e){return e.model.maxX},Mw=function(e){return e.model.maxY},Rw=function(e){return e.model.maxX+1},Nw=function(e){return e.model.maxY+1},Bw=function(e,t,n){return t(e)-n(e)},Pw=function(e){return Bw(e,Aw,Ew)},Hw=function(e){return Bw(e,Mw,Tw)},Iw=function(e){return Pw(e)/2},Lw=function(e){return Hw(e)/2},Vw=function(e){return e.stepSize},Fw=function(e){return e.snapToGrid},jw=function(e){return e.snapStart},Uw=function(e){return e.rounded},$w=function(e,t){return void 0!==e[t+"-edge"]},Ww=function(e){return $w(e,"left")},qw=function(e){return $w(e,"right")},Gw=function(e){return $w(e,"top")},Xw=function(e){return $w(e,"bottom")},Kw=function(e){return e.model.value.get()},Yw=function(e){return{x:e}},Jw=function(e){return{y:e}},Qw=function(e,t){return{x:e,y:t}},Zw=function(e,t){Kr(e,_w(),{value:t})},eC=function(e,t,n,r){return e<t?e:n<e?n:e===t?t-1:Math.max(t,e-r)},tC=function(e,t,n,r){return n<e?e:e<t?t:e===n?n+1:Math.min(n,e+r)},nC=function(e,t,n){return Math.max(t,Math.min(n,e))},rC=function(e){var t=e.min,n=e.max,r=e.range,o=e.value,i=e.step,a=e.snap,u=e.snapStart,c=e.rounded,s=e.hasMinEdge,l=e.hasMaxEdge,f=e.minBound,d=e.maxBound,m=e.screenRange,g=s?t-1:t,h=l?n+1:n;if(o<f)return g;if(d<o)return h;var p,v,b,y,x,w,C,k=(x=o,w=f,C=d,Math.min(C,Math.max(x,w))-w),S=nC(k/m*r+t,g,h);return a&&t<=S&&S<=n?(p=S,v=t,b=n,y=i,u.fold((function(){var e=p-v,t=Math.round(e/y)*y;return nC(v+t,v-1,b+1)}),(function(e){var t=(p-e)%y,n=Math.round(t/y),r=Math.floor((p-e)/y),o=Math.floor((b-e)/y),i=e+Math.min(o,r+n)*y;return Math.max(e,i)}))):c?Math.round(S):S},oC=function(e){var t=e.min,n=e.max,r=e.range,o=e.value,i=e.hasMinEdge,a=e.hasMaxEdge,u=e.maxBound,c=e.maxOffset,s=e.centerMinEdge,l=e.centerMaxEdge;return o<t?i?0:s:n<o?a?u:l:(o-t)/r*c},iC="left",aC=function(e){return e.element.dom.getBoundingClientRect()},uC=function(e,t){return e[t]},cC=function(e){var t=aC(e);return uC(t,iC)},sC=function(e){var t=aC(e);return uC(t,"right")},lC=function(e){var t=aC(e);return uC(t,"top")},fC=function(e){var t=aC(e);return uC(t,"bottom")},dC=function(e){var t=aC(e);return uC(t,"width")},mC=function(e){var t=aC(e);return uC(t,"height")},gC=function(e,t,n){return(e+t)/2-n},hC=function(e,t){var n=aC(e),r=aC(t),o=uC(n,iC),i=uC(n,"right"),a=uC(r,iC);return gC(o,i,a)},pC=function(e,t){var n=aC(e),r=aC(t),o=uC(n,"top"),i=uC(n,"bottom"),a=uC(r,"top");return gC(o,i,a)},vC=function(e,t){Kr(e,_w(),{value:t})},bC=function(e){return{x:e}},yC=function(e,t,n){var r={min:Ew(t),max:Aw(t),range:Pw(t),value:n,step:Vw(t),snap:Fw(t),snapStart:jw(t),rounded:Uw(t),hasMinEdge:Ww(t),hasMaxEdge:qw(t),minBound:cC(e),maxBound:sC(e),screenRange:dC(e)};return rC(r)},xC=function(e){return function(t,n){return r=t,i=(0<e?tC:eC)(Kw(o=n).x,Ew(o),Aw(o),Vw(o)),vC(r,bC(i)),S.some(i).map(l);var r,o,i}},wC=function(e,t,n,r,o,i){var a,u,c,s,l,f,d,m,g,h=(u=i,c=n,s=r,l=o,f=dC(a=t),d=s.bind((function(e){return S.some(hC(e,a))})).getOr(0),m=l.bind((function(e){return S.some(hC(e,a))})).getOr(f),g={min:Ew(u),max:Aw(u),range:Pw(u),value:c,hasMinEdge:Ww(u),hasMaxEdge:qw(u),minBound:cC(a),minOffset:0,maxBound:sC(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m},oC(g));return cC(t)-cC(e)+h},CC=xC(-1),kC=xC(1),SC=S.none,_C=S.none,OC={"top-left":S.none(),top:S.none(),"top-right":S.none(),right:S.some((function(e,t){Zw(e,Yw(Rw(t)))})),"bottom-right":S.none(),bottom:S.none(),"bottom-left":S.none(),left:S.some((function(e,t){Zw(e,Yw(zw(t)))}))},EC=Object.freeze({__proto__:null,setValueFrom:function(e,t,n){var r=yC(e,t,n),o=bC(r);return vC(e,o),r},setToMin:function(e,t){var n=Ew(t);vC(e,bC(n))},setToMax:function(e,t){var n=Aw(t);vC(e,bC(n))},findValueOfOffset:yC,getValueFromEvent:function(e){return Ow(e).map((function(e){return e.left}))},findPositionOfValue:wC,setPositionFromValue:function(e,t,n,r){var o=Kw(n),i=wC(e,r.getSpectrum(e),o.x,r.getLeftEdge(e),r.getRightEdge(e),n),a=Ea(t.element)/2;Ki(t.element,"left",i-a+"px")},onLeft:CC,onRight:kC,onUp:SC,onDown:_C,edgeActions:OC}),TC=function(e,t){Kr(e,_w(),{value:t})},zC=function(e){return{y:e}},DC=function(e,t,n){var r={min:Tw(t),max:Mw(t),range:Hw(t),value:n,step:Vw(t),snap:Fw(t),snapStart:jw(t),rounded:Uw(t),hasMinEdge:Gw(t),hasMaxEdge:Xw(t),minBound:lC(e),maxBound:fC(e),screenRange:mC(e)};return rC(r)},AC=function(e){return function(t,n){return r=t,i=(0<e?tC:eC)(Kw(o=n).y,Tw(o),Mw(o),Vw(o)),TC(r,zC(i)),S.some(i).map(l);var r,o,i}},MC=function(e,t,n,r,o,i){var a,u,c,s,l,f,d,m,g,h=(u=i,c=n,s=r,l=o,f=mC(a=t),d=s.bind((function(e){return S.some(pC(e,a))})).getOr(0),m=l.bind((function(e){return S.some(pC(e,a))})).getOr(f),g={min:Tw(u),max:Mw(u),range:Hw(u),value:c,hasMinEdge:Gw(u),hasMaxEdge:Xw(u),minBound:lC(a),minOffset:0,maxBound:fC(a),maxOffset:f,centerMinEdge:d,centerMaxEdge:m},oC(g));return lC(t)-lC(e)+h},RC=S.none,NC=S.none,BC=AC(-1),PC=AC(1),HC={"top-left":S.none(),top:S.some((function(e,t){Zw(e,Jw(Dw(t)))})),"top-right":S.none(),right:S.none(),"bottom-right":S.none(),bottom:S.some((function(e,t){Zw(e,Jw(Nw(t)))})),"bottom-left":S.none(),left:S.none()},IC=Object.freeze({__proto__:null,setValueFrom:function(e,t,n){var r=DC(e,t,n),o=zC(r);return TC(e,o),r},setToMin:function(e,t){var n=Tw(t);TC(e,zC(n))},setToMax:function(e,t){var n=Mw(t);TC(e,zC(n))},findValueOfOffset:DC,getValueFromEvent:function(e){return Ow(e).map((function(e){return e.top}))},findPositionOfValue:MC,setPositionFromValue:function(e,t,n,r){var o=Kw(n),i=MC(e,r.getSpectrum(e),o.y,r.getTopEdge(e),r.getBottomEdge(e),n),a=ya(t.element)/2;Ki(t.element,"top",i-a+"px")},onLeft:RC,onRight:NC,onUp:BC,onDown:PC,edgeActions:HC}),LC=function(e,t){Kr(e,_w(),{value:t})},VC=function(e,t){return{x:e,y:t}},FC=function(e,t){return function(n,r){return i=n,a=r,u=0<e?tC:eC,c=(o=t)?Kw(a).x:u(Kw(a).x,Ew(a),Aw(a),Vw(a)),s=o?u(Kw(a).y,Tw(a),Mw(a),Vw(a)):Kw(a).y,LC(i,VC(c,s)),S.some(c).map(l);var o,i,a,u,c,s}},jC=Ow,UC=FC(-1,!1),$C=FC(1,!1),WC=FC(-1,!0),qC=FC(1,!0),GC={"top-left":S.some((function(e,t){Zw(e,Qw(zw(t),Dw(t)))})),top:S.some((function(e,t){Zw(e,Qw(Iw(t),Dw(t)))})),"top-right":S.some((function(e,t){Zw(e,Qw(Rw(t),Dw(t)))})),right:S.some((function(e,t){Zw(e,Qw(Rw(t),Lw(t)))})),"bottom-right":S.some((function(e,t){Zw(e,Qw(Rw(t),Nw(t)))})),bottom:S.some((function(e,t){Zw(e,Qw(Iw(t),Nw(t)))})),"bottom-left":S.some((function(e,t){Zw(e,Qw(zw(t),Nw(t)))})),left:S.some((function(e,t){Zw(e,Qw(zw(t),Lw(t)))}))},XC=Object.freeze({__proto__:null,setValueFrom:function(e,t,n){var r=yC(e,t,n.left),o=DC(e,t,n.top),i=VC(r,o);return LC(e,i),i},setToMin:function(e,t){var n=Ew(t),r=Tw(t);LC(e,VC(n,r))},setToMax:function(e,t){var n=Aw(t),r=Mw(t);LC(e,VC(n,r))},getValueFromEvent:jC,setPositionFromValue:function(e,t,n,r){var o=Kw(n),i=wC(e,r.getSpectrum(e),o.x,r.getLeftEdge(e),r.getRightEdge(e),n),a=MC(e,r.getSpectrum(e),o.y,r.getTopEdge(e),r.getBottomEdge(e),n),u=Ea(t.element)/2,c=ya(t.element)/2;Ki(t.element,"left",i-u+"px"),Ki(t.element,"top",a-c+"px")},onLeft:UC,onRight:$C,onUp:WC,onDown:qC,edgeActions:GC}),KC=Kf({name:"Slider",configFields:[nn("stepSize",1),nn("onChange",n),nn("onChoose",n),nn("onInit",n),nn("onDragStart",n),nn("onDragEnd",n),nn("snapToGrid",!1),nn("rounded",!0),Yt("snapStart"),Ut("model",Mt("mode",{x:[nn("minX",0),nn("maxX",100),dn("value",(function(e){return mn(e.mode.minX)})),jt("getInitialValue"),yu("manager",EC)],y:[nn("minY",0),nn("maxY",100),dn("value",(function(e){return mn(e.mode.minY)})),jt("getInitialValue"),yu("manager",IC)],xy:[nn("minX",0),nn("maxX",100),nn("minY",0),nn("maxY",100),dn("value",(function(e){return mn({x:e.mode.minX,y:e.mode.minY})})),jt("getInitialValue"),yu("manager",XC)]})),$l("sliderBehaviours",[ug,Ul]),dn("mouseIsDown",(function(){return mn(!1)}))],partFields:Sw,factory:function(e,t,n,r){var o,i=function(t){return Bf(t,e,"thumb")},a=function(t){return Bf(t,e,"spectrum")},u=function(t){return Nf(t,e,"left-edge")},c=function(t){return Nf(t,e,"right-edge")},s=function(t){return Nf(t,e,"top-edge")},f=function(t){return Nf(t,e,"bottom-edge")},d=e.model,m=d.manager,g=function(t,n){m.setPositionFromValue(t,n,e,{getLeftEdge:u,getRightEdge:c,getTopEdge:s,getBottomEdge:f,getSpectrum:a})},h=function(t,n){d.value.set(n);var r=i(t);return g(t,r),e.onChange(t,r,n),S.some(!0)},p=function(t){var n=e.mouseIsDown.get();e.mouseIsDown.set(!1),n&&Nf(t,e,"thumb").each((function(n){var r=d.value.get();e.onChoose(t,n,r)}))},v=function(t,n){n.stop(),e.mouseIsDown.set(!0),e.onDragStart(t,i(t))},b=function(t,n){n.stop(),e.onDragEnd(t,i(t)),p(t)};return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.sliderBehaviours,[ug.config({mode:"special",focusIn:function(t){return Nf(t,e,"spectrum").map(ug.focusIn).map(l)}}),Ul.config({store:{mode:"manual",getValue:function(e){return d.value.get()}}}),dc.config({channels:((o={})[Ol()]={onReceive:p},o)})]),events:eo([ro(_w(),(function(e,t){h(e,t.event.value)})),lo((function(t,n){var r=d.getInitialValue();d.value.set(r);var o=i(t);g(t,o);var u=a(t);e.onInit(t,o,u,d.value.get())})),ro(rr(),v),ro(ir(),b),ro(ur(),v),ro(lr(),b)]),apis:{resetToMin:function(t){m.setToMin(t,e)},resetToMax:function(t){m.setToMax(t,e)},changeValue:h,refresh:g},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(e,t){e.resetToMin(t)},resetToMax:function(e,t){e.resetToMax(t)},refresh:function(e,t){e.refresh(t)}}}),YC=[$l("formBehaviours",[Ul])],JC=function(e){return"<alloy.field."+e+">"},QC=function(e,t){return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.formBehaviours,[Ul.config({store:{mode:"manual",getValue:function(t){var n=Hf(t,e);return ze(n,(function(e,t){return e().bind((function(e){var n,r,o=td.getCurrent(e);return n=o,r=new Error("Cannot find a current component to extract the value from for form part '"+t+"': "+ti(e.element)),n.fold((function(){return fe.error(r)}),fe.value)})).map(Ul.getValue)}))},setValue:function(t,n){Te(n,(function(n,r){Nf(t,e,r).each((function(e){td.getCurrent(e).each((function(e){Ul.setValue(e,n)}))}))}))}}})]),apis:{getField:function(t,n){return Nf(t,e,n).bind(td.getCurrent)}}}},ZC={getField:xi((function(e,t,n){return e.getField(t,n)})),sketch:function(e){var t,n=(t=[],{field:function(e,n){return t.push(e),zf("form",JC(e),n)},record:function(){return t}}),r=e(n),o=n.record(),i=$(o,(function(e){return xf({name:e,pname:JC(e)})}));return $f("form",YC,i,QC,r)}},ek=ii("valid-input"),tk=ii("invalid-input"),nk=ii("validating-input"),rk="colorcustom.rgb.",ok=function(e,t,r,o){var i=function(r,o,i,a,u){var c,s,l=e(rk+"range"),f=[qy.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),qy.parts.field({data:u,factory:gx,inputAttributes:d({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[t("textfield")],inputBehaviours:ac([(c=o,s=r,Bx.config({invalidClass:t("invalid"),notify:{onValidate:function(e){Kr(e,nk,{type:c})},onValid:function(e){Kr(e,ek,{type:c,value:Ul.getValue(e)})},onInvalid:function(e){Kr(e,tk,{type:c,value:Ul.getValue(e)})}},validator:{validate:function(t){var n=Ul.getValue(t),r=s(n)?fe.value(!0):fe.error(e("aria.input.invalid"));return _x(r)},validateOnLoad:!1}})),Ky.config({})]),onSetValue:function(e){Bx.isInvalid(e)&&Bx.run(e).get(n)}})],m="hex"!==o?[qy.parts["aria-descriptor"]({text:l})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:f.concat(m)}},a=function(e,t){var n=t.red,r=t.green,o=t.blue;Ul.setValue(e,{red:n,green:r,blue:o})},u=hh({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),c=function(e,t){u.getOpt(e).each((function(e){Ki(e.element,"background-color","#"+t.value)}))};return Xf({factory:function(){var n={red:mn(S.some(255)),green:mn(S.some(255)),blue:mn(S.some(255)),hex:mn(S.some("ffffff"))},s=function(e){return n[e].get()},l=function(e,t){n[e].set(t)},f=function(e){var t=e.red,n=e.green,r=e.blue;l("red",S.some(t)),l("green",S.some(n)),l("blue",S.some(r))},d=function(e,t){var n=t.event;"hex"!==n.type?l(n.type,S.none()):o(e)},m=function(e,t,n){var r=parseInt(n,10);l(t,S.some(r)),s("red").bind((function(e){return s("green").bind((function(t){return s("blue").map((function(n){return zb(e,t,n,1)}))}))})).each((function(t){var n,r,o=(n=e,r=kb(t),ZC.getField(n,"hex").each((function(e){bg.isFocused(e)||Ul.setValue(n,{hex:r.value})})),r);c(e,o)}))},g=function(e,t){var n=t.event;"hex"===n.type?function(e,t){r(e);var n=vb(t);l("hex",S.some(t));var o=Mb(n);a(e,o),f(o),Kr(e,dw,{hex:n}),c(e,n)}(e,n.value):m(e,n.type,n.value)},h=function(t){return{label:e(rk+t+".label"),description:e(rk+t+".description")}},p=h("red"),v=h("green"),b=h("blue"),y=h("hex");return Fe(ZC.sketch((function(n){return{dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[n.field("red",qy.sketch(i(Db,"red",p.label,p.description,255))),n.field("green",qy.sketch(i(Db,"green",v.label,v.description,255))),n.field("blue",qy.sketch(i(Db,"blue",b.label,b.description,255))),n.field("hex",qy.sketch(i(xb,"hex",y.label,y.description,"ffffff"))),u.asSpec()],formBehaviours:ac([Bx.config({invalidClass:t("form-invalid")}),mg("rgb-form-events",[ro(ek,g),ro(tk,d),ro(nk,d)])])}})),{apis:{updateHex:function(e,t){var n,r;Ul.setValue(e,{hex:t.value}),n=e,r=Mb(t),a(n,r),f(r),c(e,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(e,t,n){e.updateHex(t,n)}},extraApis:{}})},ik=function(e,t){var n=KC.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),r=KC.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:"<div class="+t("sv-palette-inner-thumb")+' role="presentation"></div>'}}),i=function(e,t){var n,r,o=e.width,i=e.height,a=e.getContext("2d");null!==a&&(a.fillStyle=t,a.fillRect(0,0,o,i),(n=a.createLinearGradient(0,0,o,0)).addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),a.fillStyle=n,a.fillRect(0,0,o,i),(r=a.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),r.addColorStop(1,"rgba(0,0,0,1)"),a.fillStyle=r,a.fillRect(0,0,o,i))};return Xf({factory:function(e){var a=o({x:0,y:0}),u=ac([td.config({find:S.some}),bg.config({})]);return KC.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[n,r],onChange:function(e,t,n){Kr(e,gw,{value:n})},onInit:function(e,t,n,r){i(n.element.dom,Nb(Bb))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(e,t,n){var r,o;r=n,o=t.components()[0].element.dom,i(o,Nb(r))}},extraApis:{}})},ak=function(e,t){return Xf({name:"ColourPicker",configFields:[jt("dom"),nn("onValidHex",n),nn("onInvalidHex",n)],factory:function(n){var r,i,a,u,c,s=ok(e,t,n.onValidHex,n.onInvalidHex),l=ik(0,t),f={paletteRgba:mn(Bb)},d=hh(l.sketch({})),m=hh(s.sketch({})),g=function(e,t){d.getOpt(e).each((function(e){var n=Mb(t);f.paletteRgba.set(n),l.setRgba(e,n)}))},h=function(e,t){m.getOpt(e).each((function(e){s.updateHex(e,t)}))},p=function(e,t,n){W(n,(function(n){n(e,t)}))};return{uid:n.uid,dom:n.dom,components:[d.asSpec(),(a=t,u=KC.parts.spectrum({dom:{tag:"div",classes:[a("hue-slider-spectrum")],attributes:{role:"presentation"}}}),c=KC.parts.thumb({dom:{tag:"div",classes:[a("hue-slider-thumb")],attributes:{role:"presentation"}}}),KC.sketch({dom:{tag:"div",classes:[a("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:o({y:0})},components:[u,c],sliderBehaviours:ac([bg.config({})]),onChange:function(e,t,n){Kr(e,mw,{value:n})}})),m.asSpec()],behaviours:ac([mg("colour-picker-events",[ro(gw,(i=[h],function(e,t){var n,r,o,a,u,c,s,l,d,m=t.event.value,g=f.paletteRgba.get(),h=(a=o=0,u=(n=g).red/255,c=n.green/255,s=n.blue/255,l=Math.min(u,Math.min(c,s)),d=Math.max(u,Math.max(c,s)),l===d?fw(0,0,100*(a=l)):(o=60*((o=u===l?3:s===l?1:5)-(u===l?c-s:s===l?u-c:s-u)/(d-l)),r=(d-l)/d,a=d,fw(Math.round(o),Math.round(100*r),Math.round(100*a)))),v=fw(h.hue,m.x,100-m.y),b=Ab(v),y=kb(b);p(e,y,i)})),ro(mw,(r=[g,h],function(e,t){var n,o,i,a=t.event.value,u=(n=a.y,o=fw((100-n)/100*360,100,100),i=Ab(o),kb(i));p(e,u,r)}))]),td.config({find:function(e){return m.getOpt(e)}}),ug.config({mode:"acyclic"})])}}})},uk=function(){return td.config({find:S.some})},ck=function(e){return td.config({find:e.getOpt})},sk=function(e){return td.config({find:function(t){return zo(t.element,e).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}})},lk={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},fk=function(e){return lk[e]},dk=tinymce.util.Tools.resolve("tinymce.Resource"),mk=tinymce.util.Tools.resolve("tinymce.util.Tools"),gk=dt([nn("preprocess",i),nn("postprocess",i)]),hk=function(e,t,n){return Ul.config(Fe({store:{mode:"manual",getValue:t,setValue:n}},e.map((function(e){return{store:{initialValue:e}}})).getOr({})))},pk=function(e,t,n){return hk(e,(function(e){return t(e.element)}),(function(e,t){return n(e.element,t)}))},vk=function(e,t){var n=zt("RepresentingConfigs.memento processors",gk,t);return Ul.config({store:{mode:"manual",getValue:function(t){var r=e.get(t),o=Ul.getValue(r);return n.postprocess(o)},setValue:function(t,r){var o=n.preprocess(r),i=e.get(t);Ul.setValue(i,o)}}})},bk=hk,yk=function(e){return pk(e,qo,Go)},xk=function(e){return Ul.config({store:{mode:"memory",initialValue:e}})},wk=function(e,t){var n=function(e,t){t.stop()},r=function(e){return function(t,n){W(e,(function(e){e(t,n)}))}},o=function(e,t){var n;hv.isDisabled(e)||(n=t.event.raw,a(e,n.dataTransfer.files))},i=function(e,t){var n=t.event.raw.target;a(e,n.files)},a=function(n,r){var o,i,a;Ul.setValue(n,(o=r,i=t,a=mk.explode(i.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),G(ue(o),(function(e){return F(a,(function(t){return Sn(e.name.toLowerCase(),"."+t.toLowerCase())}))})))),Kr(n,tx,{name:e.name})},u=hh({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ac([mg("input-file-events",[co(br()),co(zr())])])}),c=e.label.map((function(e){return ex(e,t)})),s=qy.parts.field({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ac([xk([]),uk(),hv.config({}),Dg.config({toggleClass:"dragenter",toggleOnExecute:!1}),mg("dropzone-events",[ro("dragenter",r([n,Dg.toggle])),ro("dragleave",r([n,Dg.toggle])),ro("dragover",n),ro("drop",r([n,o])),ro(vr(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},gh.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(e){u.get(e).element.dom.click()},buttonBehaviours:ac([Ky.config({}),qv(t.isDisabled),$v()])})]}]}}}});return Jy(c,s,["tox-form__group--stretched"],[])},Ck=ii("alloy-fake-before-tabstop"),kk=ii("alloy-fake-after-tabstop"),Sk=function(e){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:ac([bg.config({ignore:!0}),Ky.config({})])}},_k=function(e){return{dom:{tag:"div",classes:["tox-navobj"]},components:[Sk([Ck]),e,Sk([kk])],behaviours:ac([sk(1)])}},Ok=function(e,t){Kr(e,gr(),{raw:{which:9,shiftKey:t}})},Ek=function(e,t){var n=t.element;Vi(n,Ck)?Ok(e,!0):Vi(n,kk)&&Ok(e,!1)},Tk=function(e){return Ey(e,["."+Ck,"."+kk].join(","),s)},zk=!($n().browser.isIE()||$n().browser.isEdge()),Dk=function(e,t){var n,r,o=zk&&e.sandboxed,i=d(d({},e.label.map((function(e){return{title:e}})).getOr({})),o?{sandbox:"allow-scripts allow-same-origin"}:{}),a=(n=o,r=mn(""),{getValue:function(e){return r.get()},setValue:function(e,t){var o;n?Ko(e.element,"srcdoc",t):(Ko(e.element,"src","javascript:''"),(o=e.element.dom.contentWindow.document).open(),o.write(t),o.close()),r.set(t)}}),u=e.label.map((function(e){return ex(e,t)})),c=qy.parts.field({factory:{sketch:function(e){return _k({uid:e.uid,dom:{tag:"iframe",attributes:i},behaviours:ac([Ky.config({}),bg.config({}),bk(S.none(),a.getValue,a.setValue)])})}}});return Jy(u,c,["tox-form__group--stretched"],[])},Ak=function(e,t){return Nk(document.createElement("canvas"),e,t)},Mk=function(e){var t=Ak(e.width,e.height);return Rk(t).drawImage(e,0,0),t},Rk=function(e){return e.getContext("2d")},Nk=function(e,t,n){return e.width=t,e.height=n,e},Bk=function(e){return e.naturalWidth||e.width},Pk=function(e){return e.naturalHeight||e.height},Hk=window.Promise?window.Promise:(Fx=function(e){if("object"!=t(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],qx(e,$x(Lk,this),$x(Vk,this))},jx=window,Ux=Fx.immediateFn||"function"==typeof jx.setImmediate&&jx.setImmediate||function(e){return setTimeout(e,1)},$x=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.apply(t,n)}},Wx=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},qx=function(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(b){if(r)return;r=!0,n(b)}},Fx.prototype["catch"]=function(e){return this.then(null,e)},Fx.prototype.then=function(e,t){var n=this;return new Fx((function(r,o){Ik.call(n,new jk(e,t,r,o))}))},Fx.all=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Array.prototype.slice.call(1===e.length&&Wx(e[0])?e[0]:e);return new Fx((function(e,n){if(0===r.length)return e([]);for(var o=r.length,i=function i(a,u){try{if(u&&("object"==t(u)||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,(function(e){i(a,e)}),n)}r[a]=u,0==--o&&e(r)}catch(v){n(v)}},a=0;a<r.length;a++)i(a,r[a])}))},Fx.resolve=function(e){return e&&"object"==t(e)&&e.constructor===Fx?e:new Fx((function(t){t(e)}))},Fx.reject=function(e){return new Fx((function(t,n){n(e)}))},Fx.race=function(e){return new Fx((function(t,n){for(var r=0,o=e;r<o.length;r++)o[r].then(t,n)}))},Fx);function Ik(e){var t=this;null!==this._state?Ux((function(){var n,r=t._state?e.onFulfilled:e.onRejected;if(null!==r){try{n=r(t._value)}catch(p){return void e.reject(p)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function Lk(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==t(e)||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void qx($x(n,e),$x(Lk,this),$x(Vk,this))}this._state=!0,this._value=e,Fk.call(this)}catch(p){Vk.call(this,p)}}function Vk(e){this._state=!1,this._value=e,Fk.call(this)}function Fk(){for(var e=0,t=this._deferreds;e<t.length;e++){var n=t[e];Ik.call(this,n)}this._deferreds=[]}function jk(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}var Uk,$k,Wk,qk,Gk=function(e){return new Hk((function(t,n){(function(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return S.none();for(var r=n[1],o=t[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(1024+l,a),d=new Array(f-l),m=l,g=0;m<f;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return S.some(new Blob(c,{type:r}))})(e).fold((function(){n("uri is not base64: "+e)}),t)}))},Xk=function(e,t,n){return t=t||"image/png",R(HTMLCanvasElement.prototype.toBlob)?new Hk((function(r,o){e.toBlob((function(e){e?r(e):o()}),t,n)})):Gk(e.toDataURL(t,n))},Kk=function(e){return t=e,new Hk((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)})).then((function(e){Yk(e);var t=Ak(Bk(e),Pk(e));return Rk(t).drawImage(e,0,0),t}));var t},Yk=function(e){URL.revokeObjectURL(e.src)},Jk=function(e,t,n){var r=t.type,i=o(r),a=o(n),u=function(t,n){return e.then((function(e){return o=n,r=(r=t)||"image/png",e.toDataURL(r,o);var r,o}))};return{getType:i,toBlob:function(){return Hk.resolve(t)},toDataURL:a,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then((function(e){return Xk(e,t,n)}))},toAdjustedDataURL:u,toAdjustedBase64:function(e,t){return u(e,t).then((function(e){return e.split(",")[1]}))},toCanvas:function(){return e.then(Mk)}}},Qk=function(e,t){return Xk(e,t).then((function(t){return Jk(Hk.resolve(e),t,e.toDataURL())}))},Zk=function(e){return t=e,new Hk((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})).then((function(t){return Jk(Kk(e),e,t)}));var t},eS=function(e,t,n){var r="string"==typeof e?parseFloat(e):e;return n<r?r=n:r<t&&(r=t),r},tS=function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},nS=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],rS=function(e,t){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var a=0;a<5;a++)r[a]=t[a+5*i];for(a=0;a<5;a++){for(var u=n=0;u<5;u++)n+=e[a+5*u]*r[u];o[a+5*i]=n}}return o},oS=function(e,t){return e.toCanvas().then((function(n){return iS(n,e.getType(),t)}))},iS=function(e,t,n){var r=Rk(e),o=function(e,t){for(var n,r,o,i,a=e.data,u=t[0],c=t[1],s=t[2],l=t[3],f=t[4],d=t[5],m=t[6],g=t[7],h=t[8],p=t[9],v=t[10],b=t[11],y=t[12],x=t[13],w=t[14],C=t[15],k=t[16],S=t[17],_=t[18],O=t[19],E=0;E<a.length;E+=4)n=a[E],r=a[E+1],o=a[E+2],i=a[E+3],a[E]=n*u+r*c+o*s+i*l+f,a[E+1]=n*d+r*m+o*g+i*h+p,a[E+2]=n*v+r*b+o*y+i*x+w,a[E+3]=n*C+r*k+o*S+i*_+O;return e}(r.getImageData(0,0,e.width,e.height),n);return r.putImageData(o,0,0),Qk(e,t)},aS=function(e,t,n){var r=Rk(e),o=function(e,t,n){for(var r=function(e,t,n){return n<e?e=n:e<t&&(e=t),e},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=e.data,u=t.data,c=e.width,s=e.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=4*(r(l+h-i,0,s-1)*c+v),y=n[h*o+p];d+=a[b]*y,m+=a[1+b]*y,g+=a[2+b]*y}var x=4*(l*c+f);u[x]=r(d,0,255),u[1+x]=r(m,0,255),u[2+x]=r(g,0,255)}return t}(r.getImageData(0,0,e.width,e.height),o=r.getImageData(0,0,e.width,e.height),n);return r.putImageData(o,0,0),Qk(e,t)},uS=function(e){return function(t,n){return oS(t,e(tS(),n))}},cS=(Uk=[-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1],function(e){return oS(e,Uk)}),sS=uS((function(e,t){return t=eS(255*t,-255,255),rS(e,[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])})),lS=uS((function(e,t){var n;return t=eS(t,-1,1),n=(t*=100)<0?127+t/100*127:127*(n=0===(n=t%1)?nS[t]:nS[Math.floor(t)]*(1-n)+nS[Math.floor(t)+1]*n)+127,rS(e,[n/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),fS=($k=[0,-1,0,-1,5,-1,0,-1,0],function(e){return n=$k,(t=e).toCanvas().then((function(e){return aS(e,t.getType(),n)}));var t,n}),dS=(Wk=function(e,t){return 255*Math.pow(e/255,1-t)},function(e,t){return e.toCanvas().then((function(n){return function(e,t,n){for(var r=Rk(e),o=new Array(256),i=0;i<o.length;i++)o[i]=Wk(i,n);var a=function(e,t){for(var n=e.data,r=0;r<n.length;r+=4)n[r]=t[n[r]],n[r+1]=t[n[r+1]],n[r+2]=t[n[r+2]];return e}(r.getImageData(0,0,e.width,e.height),o);return r.putImageData(a,0,0),Qk(e,t)}(n,e.getType(),t)}))}),mS=function e(t,n,r){var o=Bk(t),i=Pk(t),a=n/o,u=r/i,c=!1;(a<.5||2<a)&&(a=a<.5?.5:2,c=!0),(u<.5||2<u)&&(u=u<.5?.5:2,c=!0);var s=gS(t,a,u);return c?s.then((function(t){return e(t,n,r)})):s},gS=function(e,t,n){return new Hk((function(r){var o=Bk(e),i=Pk(e),a=Math.floor(o*t),u=Math.floor(i*n),c=Ak(a,u);Rk(c).drawImage(e,0,0,o,i,0,0,a,u),r(c)}))},hS=function(e,t,n){var r=Ak(e.width,e.height),o=Rk(r),i=0,a=0;return 90!==(n=n<0?360+n:n)&&270!==n||Nk(r,r.height,r.width),90!==n&&180!==n||(i=r.width),270!==n&&180!==n||(a=r.height),o.translate(i,a),o.rotate(n*Math.PI/180),o.drawImage(e,0,0),Qk(r,t)},pS=function(e,t,n){var r=Ak(e.width,e.height),o=Rk(r);return"v"===n?(o.scale(1,-1),o.drawImage(e,0,-r.height)):(o.scale(-1,1),o.drawImage(e,-r.width,0)),Qk(r,t)},vS=function(e,t,n,r,o,i){var a=Ak(o,i);return Rk(a).drawImage(e,-n,-r),Qk(a,t)},bS=function(e){return cS(e)},yS=function(e){return fS(e)},xS=function(e,t){return dS(e,t)},wS=function(e,t,n,r){return oS(e,(o=tS(),a=n,u=r,i=eS(i=t,0,2),a=eS(a,0,2),u=eS(u,0,2),rS(o,[i,0,0,0,0,0,a,0,0,0,0,0,u,0,0,0,0,0,1,0,0,0,0,0,1])));var o,i,a,u},CS=function(e,t){return sS(e,t)},kS=function(e,t){return lS(e,t)},SS=function(e,t){return r=t,(n=e).toCanvas().then((function(e){return pS(e,n.getType(),r)}));var n,r},_S=function(e,t,n,r,o){return a=t,u=n,c=r,s=o,(i=e).toCanvas().then((function(e){return vS(e,i.getType(),a,u,c,s)}));var i,a,u,c,s},OS=function(e,t,n){return o=t,i=n,(r=e).toCanvas().then((function(e){return mS(e,o,i).then((function(e){return Qk(e,r.getType())}))}));var r,o,i},ES=function(e,t){return r=t,(n=e).toCanvas().then((function(e){return hS(e,n.getType(),r)}));var n,r},TS=function(e,t){return d({dom:{tag:"span",innerHtml:e,classes:["tox-icon","tox-tbtn__icon-wrap"]}},t)},zS=function(e,t){return TS(vh(e,t),{})},DS=function(e,t){return TS(vh(e,t),{behaviours:ac([dg.config({})])})},AS=function(e,t,n){return{dom:{tag:"span",innerHtml:n.translate(e),classes:[t+"__select-label"]},behaviours:ac([dg.config({})])}},MS=ii("toolbar.button.execute"),RS=((qk={})[Er()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],qk),NS=ii("update-menu-text"),BS=ii("update-menu-icon"),PS=function(e,t,r){var o=mn(n),i=e.text.map((function(e){return hh(AS(e,t,r.providers))})),u=e.icon.map((function(e){return hh(DS(e,r.providers.icons))})),c=function(e,t){var n=Ul.getValue(e);return bg.focus(n),Kr(n,"keydown",{raw:t.event.raw}),iw.close(n),S.some(!0)},s=e.role.fold((function(){return{}}),(function(e){return{role:e}})),l=e.tooltip.fold((function(){return{}}),(function(e){var t=r.providers.translate(e);return{title:t,"aria-label":t}}));return hh(iw.sketch(d(d(d({},e.uid?{uid:e.uid}:{}),s),{dom:{tag:"button",classes:[t,t+"--select"].concat($(e.classes,(function(e){return t+"--"+e}))),attributes:d({},l)},components:Zv([u.map((function(e){return e.asSpec()})),i.map((function(e){return e.asSpec()})),S.some({dom:{tag:"div",classes:[t+"__select-chevron"],innerHtml:vh("chevron-down",r.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ac(g(e.dropdownBehaviours,[qv((function(){return e.disabled||r.providers.isDisabled()})),$v(),aw.config({}),dg.config({}),mg("dropdown-events",[Yv(e,o),Jv(e,o)]),mg("menubutton-update-display-text",[ro(NS,(function(e,t){i.bind((function(t){return t.getOpt(e)})).each((function(e){dg.set(e,[da(r.providers.translate(t.event.text))])}))})),ro(BS,(function(e,t){u.bind((function(t){return t.getOpt(e)})).each((function(e){dg.set(e,[DS(t.event.icon,r.providers.icons)])}))}))])])),eventOrder:Fe(RS,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ac([ug.config({mode:"special",onLeft:c,onRight:c})]),lazySink:r.getSink,toggleClass:t+"--active",parts:{menu:Cp(0,e.columns,e.presets)},fetch:function(t){return Sx(a(e.fetch,t))}}))).asSpec()},HS=function(e){return"separator"===e.type},IS={type:"separator"},LS=function(e,t){var n=K(e,(function(e,n){return E(n)?""===n?e:"|"===n?0<e.length&&!HS(e[e.length-1])?e.concat([IS]):e:Pe(t,n.toLowerCase())?e.concat([t[n.toLowerCase()]]):e:e.concat([n])}),[]);return 0<n.length&&HS(n[n.length-1])&&n.pop(),n},VS=function(e,t){return Pe(e,"getSubmenuItems")?(r=t,o=(n=e).getSubmenuItems(),i=FS(o,r),{item:n,menus:Fe(i.menus,Qe(n.value,i.items)),expansions:Fe(i.expansions,Qe(n.value,n.value))}):{item:e,menus:{},expansions:{}};var n,r,o,i},FS=function(e,t){var n=LS(E(e)?e.split(" "):e,t);return X(n,(function(e,n){var r=function(e){if(HS(e))return e;var t=Be(e,"value").getOrThunk((function(){return ii("generated-menu-item")}));return Fe({value:t},e)}(n),o=VS(r,t);return{menus:Fe(e.menus,o.menus),items:[o.item].concat(e.items),expansions:Fe(e.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},jS=function(e,t,n,r){var o=ii("primary-menu"),i=FS(e,n.shared.providers.menuItems());if(0===i.items.length)return S.none();var a=xy(o,i.items,t,n,r),u=ze(i.menus,(function(e,r){return xy(r,e,t,n,!1)})),c=Fe(u,Qe(o,a));return S.from(eh.tieredData(o,c,i.expansions))},US=function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)},setActive:function(t){var n=e.element;t?(Hi(n,"tox-tbtn--enabled"),Ko(n,"aria-pressed",!0)):(Li(n,"tox-tbtn--enabled"),Zo(n,"aria-pressed"))},isActive:function(){return Vi(e.element,"tox-tbtn--enabled")}}},$S=function(e,t,n,r){return PS({text:e.text,icon:e.icon,tooltip:e.tooltip,role:r,fetch:function(t,r){e.fetch((function(e){r(jS(e,up.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:e.onSetup,getApi:US,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Ky.config({})]},t,n.shared)},WS=function(e,t,n){return function(r){r($(e,(function(e){var r,o,i=e.text.fold((function(){return{}}),(function(e){return{text:e}}));return d(d({type:e.type,active:!1},i),{onAction:function(e){var r=!e.isActive();e.setActive(r),o.storage.set(r),n.shared.getSink().each((function(e){t().getOpt(e).each((function(e){gc(e.element),Kr(e,ox,{name:o.name,value:o.storage.get()})}))}))},onSetup:(r=o=e,function(e){e.setActive(r.storage.get())})})})))}},qS=function(e,t,n,r,o,i){void 0===n&&(n=[]);var a=t.fold((function(){return{}}),(function(e){return{action:e}})),u=d({buttonBehaviours:ac([qv((function(){return e.disabled||i.isDisabled()})),$v(),Ky.config({}),mg("button press",[no("click"),no("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=Fe(u,{dom:r});return Fe(c,{components:o})},GS=function(e,t,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:e.tooltip.map((function(e){return{"aria-label":n.translate(e),title:n.translate(e)}})).getOr({})},i=e.icon.map((function(e){return zS(e,n.icons)})),a=Zv([i]);return qS(e,t,r,o,a,n)},XS=function(e,t,n,r){void 0===r&&(r=[]);var o=GS(e,S.some(t),n,r);return gh.sketch(o)},KS=function(e,t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(e.text),a=e.icon?e.icon.map((function(e){return zS(e,n.icons)})):S.none(),u=a.isSome()?Zv([a]):[],c=a.isSome()?{}:{innerHtml:i},s=g(e.primary||e.borderless?["tox-button"]:["tox-button","tox-button--secondary"],a.isSome()?["tox-button--icon"]:[],e.borderless?["tox-button--naked"]:[],o),l=d(d({tag:"button",classes:s},c),{attributes:{title:i}});return qS(e,t,r,l,u,n)},YS=function(e,t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=KS(e,S.some(t),n,r,o);return gh.sketch(i)},JS=function(e,t){return function(n){"custom"===t?Kr(n,ox,{name:e,value:{}}):"submit"===t?Xr(n,ix):"cancel"===t?Xr(n,rx):console.error("Unknown button type: ",t)}},QS=function(e,t,r){if("menu"===t){var o=e,i=d(d({},e),{onSetup:function(t){return t.setDisabled(e.disabled),n},fetch:WS(o.items,(function(){return a}),r)}),a=hh($S(i,"tox-tbtn",r,S.none()));return a.asSpec()}if("custom"===(s=t)||"cancel"===s||"submit"===s){var u=JS(e.name,t),c=d(d({},e),{borderless:!1});return YS(c,u,r.shared.providers,[])}var s;console.error("Unknown footer button type: ",t)},ZS=function(e,t){var n,r,o=JS(e.name,"custom");return n=S.none(),r=qy.parts.field(d({factory:gh},KS(e,S.some(o),t,[xk(""),uk()]))),Jy(n,r,[],[])},e_=o([nn("field1Name","field1"),nn("field2Name","field2"),vu("onLockedChange"),mu(["lockClass"]),nn("locked",!1),Gl("coupledFieldBehaviours",[td,Ul])]),t_=function(e,t){return xf({factory:qy,name:e,overrides:function(e){return{fieldBehaviours:ac([mg("coupled-input-behaviour",[ro(pr(),(function(n){Nf(n,e,t).bind(td.getCurrent).each((function(t){Nf(n,e,"lock").each((function(r){Dg.isOn(r)&&e.onLockedChange(n,t,r)}))}))}))])])}}})},n_=o([t_("field1","field2"),t_("field2","field1"),xf({factory:gh,schema:[jt("dom")],name:"lock",overrides:function(e){return{buttonBehaviours:ac([Dg.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])}}})]),r_=Kf({name:"FormCoupledInputs",configFields:e_(),partFields:n_(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,behaviours:Xl(e.coupledFieldBehaviours,[td.config({find:S.some}),Ul.config({store:{mode:"manual",getValue:function(t){var n=Lf(t,e,["field1","field2"]),r={};return r[e.field1Name]=Ul.getValue(n.field1()),r[e.field2Name]=Ul.getValue(n.field2()),r},setValue:function(t,n){var r=Lf(t,e,["field1","field2"]);He(n,e.field1Name)&&Ul.setValue(r.field1(),n[e.field1Name]),He(n,e.field2Name)&&Ul.setValue(r.field2(),n[e.field2Name])}}})]),apis:{getField1:function(t){return Nf(t,e,"field1")},getField2:function(t){return Nf(t,e,"field2")},getLock:function(t){return Nf(t,e,"lock")}}}},apis:{getField1:function(e,t){return e.getField1(t)},getField2:function(e,t){return e.getField2(t)},getLock:function(e,t){return e.getLock(t)}}}),o_=function(e){var t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(e);if(null===t)return fe.error(e);var n=parseFloat(t[1]),r=t[2];return fe.value({value:n,unit:r})},i_=function(e,t){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(e){return Object.prototype.hasOwnProperty.call(n,e)};return e.unit===t?S.some(e.value):r(e.unit)&&r(t)?n[e.unit]===n[t]?S.some(e.value):S.some(e.value/n[e.unit]*n[t]):S.none()},a_=function(e){return S.none()},u_=function(e,t){var n,r,o,i=o_(e).toOptional(),a=o_(t).toOptional();return r=a,o=function(e,t){return i_(e,t.unit).map((function(e){return t.value/e})).map((function(e){return n=e,r=t.unit,function(e){return i_(e,r).map((function(e){return{value:e*n,unit:r}}))};var n,r})).getOr(a_)},((n=i).isSome()&&r.isSome()?S.some(o(n.getOrDie(),r.getOrDie())):S.none()).getOr(a_)},c_=function(e,t){var n=a_,r=ii("ratio-event"),o=r_.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(e.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:vh("lock",t.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:vh("unlock",t.icons)}}],buttonBehaviours:ac([hv.config({disabled:function(){return e.disabled||t.isDisabled()}}),$v(),Ky.config({})])}),i=function(e){return{dom:{tag:"div",classes:["tox-form__group"]},components:e}},a=function(n){return qy.parts.field({factory:gx,inputClasses:["tox-textfield"],inputBehaviours:ac([hv.config({disabled:function(){return e.disabled||t.isDisabled()}}),$v(),Ky.config({}),mg("size-input-events",[ro(dr(),(function(e,t){Kr(e,r,{isField1:n})})),ro(vr(),(function(t,n){Kr(t,tx,{name:e.name})}))])]),selectOnFocus:!1})},u=function(e){return{dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}}},c=r_.parts.field1(i([qy.parts.label(u("Width")),a(!0)])),s=r_.parts.field2(i([qy.parts.label(u("Height")),a(!1)]));return r_.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,i([u("&nbsp;"),o])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(e,t,r){o_(Ul.getValue(e)).each((function(e){n(e).each((function(e){var n,r,o,i;Ul.setValue(t,(o={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},-1!==(i=(n=e).value.toFixed((r=n.unit)in o?o[r]:1)).indexOf(".")&&(i=i.replace(/\.?0*$/,"")),i+n.unit))}))}))},coupledFieldBehaviours:ac([hv.config({disabled:function(){return e.disabled||t.isDisabled()},onDisabled:function(e){r_.getField1(e).bind(qy.getField).each(hv.disable),r_.getField2(e).bind(qy.getField).each(hv.disable),r_.getLock(e).each(hv.disable)},onEnabled:function(e){r_.getField1(e).bind(qy.getField).each(hv.enable),r_.getField2(e).bind(qy.getField).each(hv.enable),r_.getLock(e).each(hv.enable)}}),$v(),mg("size-input-events2",[ro(r,(function(e,t){var r=t.event.isField1,o=r?r_.getField1(e):r_.getField2(e),i=r?r_.getField2(e):r_.getField1(e),a=o.map(Ul.getValue).getOr(""),u=i.map(Ul.getValue).getOr("");n=u_(a,u)}))])])})},s_={undo:o(ii("undo")),redo:o(ii("redo")),zoom:o(ii("zoom")),back:o(ii("back")),apply:o(ii("apply")),swap:o(ii("swap")),transform:o(ii("transform")),tempTransform:o(ii("temp-transform")),transformApply:o(ii("transform-apply"))},l_=o("save-state"),f_=o("disable"),d_=o("enable"),m_={formActionEvent:ox,saveState:l_,disable:f_,enable:d_},g_=function(e,t){var r=function(e,n,r,o){return hh(YS({name:e,text:e,disabled:r,primary:o,icon:S.none(),borderless:!1},n,t))},i=function(e,n,r,o){return hh(XS({name:e,icon:S.some(e),tooltip:S.some(n),disabled:o,primary:!1,borderless:!1},r,t))},a=function(e,t){e.map((function(e){var n=e.get(t);n.hasConfigured(hv)&&hv.disable(n)}))},u=function(e,t){e.map((function(e){var n=e.get(t);n.hasConfigured(hv)&&hv.enable(n)}))},c={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},s=n,l=function(e,t,n){Kr(e,t,n)},f=function(e){return Xr(e,m_.disable())},d=function(e){return Xr(e,m_.enable())},m=function(e,t){f(e),l(e,s_.transform(),{transform:t}),d(e)},g=function(e){return function(){Z.getOpt(e).each((function(e){dg.set(e,[J])}))}},h=function(e,t){f(e),l(e,s_.transformApply(),{transform:t,swap:g(e)}),d(e)},p=function(){return r("Back",(function(e){return l(e,s_.back(),{swap:g(e)})}),!1,!1)},v=function(){return hh({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ac([hv.config({})])})},b=function(){return r("Apply",(function(e){return l(e,s_.apply(),{swap:g(e)})}),!0,!0)},y=[p(),v(),r("Apply",(function(t){h(t,(function(t){var n=e.getRect();return _S(t,n.x,n.y,n.w,n.h)})),e.hideCrop()}),!1,!0)],x=jy.sketch({dom:c,components:y.map((function(e){return e.asSpec()})),containerBehaviours:ac([mg("image-tools-crop-buttons-events",[ro(m_.disable(),(function(e,t){a(y,e)})),ro(m_.enable(),(function(e,t){u(y,e)}))])])}),w=hh(c_({name:"size",label:S.none(),constrain:!0,disabled:!1},t)),C=[p(),v(),w,v(),r("Apply",(function(e){w.getOpt(e).each((function(t){var n,r,o=Ul.getValue(t),i=parseInt(o.width,10),a=parseInt(o.height,10),u=(n=i,r=a,function(e){return OS(e,n,r)});h(e,u)}))}),!1,!0)],k=jy.sketch({dom:c,components:C.map((function(e){return e.asSpec()})),containerBehaviours:ac([mg("image-tools-resize-buttons-events",[ro(m_.disable(),(function(e,t){a(C,e)})),ro(m_.enable(),(function(e,t){u(C,e)}))])])}),_=function(e,t){return function(n){return e(n,t)}},O=_(SS,"h"),E=_(SS,"v"),T=_(ES,-90),z=_(ES,90),D=function(e,t){var n,r;r=t,f(n=e),l(n,s_.tempTransform(),{transform:r}),d(n)},A=[p(),v(),i("flip-horizontally","Flip horizontally",(function(e){D(e,O)}),!1),i("flip-vertically","Flip vertically",(function(e){D(e,E)}),!1),i("rotate-left","Rotate counterclockwise",(function(e){D(e,T)}),!1),i("rotate-right","Rotate clockwise",(function(e){D(e,z)}),!1),v(),b()],M=jy.sketch({dom:c,components:A.map((function(e){return e.asSpec()})),containerBehaviours:ac([mg("image-tools-fliprotate-buttons-events",[ro(m_.disable(),(function(e,t){a(A,e)})),ro(m_.enable(),(function(e,t){u(A,e)}))])])}),R=function(e,n,r,i,a){var u=KC.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:t.translate(e)}}),c=KC.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=KC.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return hh(KC.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:a,getInitialValue:o({x:i})},components:[u,c,s],sliderBehaviours:ac([bg.config({})]),onChoose:n}))},N=function(e,t,n,r,o){return[p(),(i=t,R(e,(function(e,t,n){var r=_(i,n.x/100);m(e,r)}),n,r,o)),b()];var i},B=function(e,t,n,r,o){var i=N(e,t,n,r,o);return jy.sketch({dom:c,components:i.map((function(e){return e.asSpec()})),containerBehaviours:ac([mg("image-tools-filter-panel-buttons-events",[ro(m_.disable(),(function(e,t){a(i,e)})),ro(m_.enable(),(function(e,t){u(i,e)}))])])})},P=[p(),v(),b()],H=jy.sketch({dom:c,components:P.map((function(e){return e.asSpec()}))}),I=B("Brightness",CS,-100,0,100),L=B("Contrast",kS,-100,0,100),V=B("Gamma",xS,-100,0,100),F=function(e){return R(e,(function(e,t,n){var r=j.getOpt(e),o=$.getOpt(e),i=U.getOpt(e);r.each((function(t){o.each((function(n){i.each((function(r){var o,i,a,u=Ul.getValue(t).x/100,c=Ul.getValue(r).x/100,s=Ul.getValue(n).x/100,l=(o=u,i=c,a=s,function(e){return wS(e,o,i,a)});m(e,l)}))}))}))}),0,100,200)},j=F("R"),U=F("G"),$=F("B"),W=[p(),j,U,$,b()],q=jy.sketch({dom:c,components:W.map((function(e){return e.asSpec()}))}),G=function(e,t,n){return function(r){l(r,s_.swap(),{transform:t,swap:function(){Z.getOpt(r).each((function(t){dg.set(t,[e]),n(t)}))}})}},X=S.some(yS),K=S.some(bS),Y=[i("crop","Crop",G(x,S.none(),(function(t){e.showCrop()})),!1),i("resize","Resize",G(k,S.none(),(function(t){w.getOpt(t).each((function(t){var n=e.getMeasurements(),r=n.width,o=n.height;Ul.setValue(t,{width:r,height:o})}))})),!1),i("orientation","Orientation",G(M,S.none(),s),!1),i("brightness","Brightness",G(I,S.none(),s),!1),i("sharpen","Sharpen",G(H,X,s),!1),i("contrast","Contrast",G(L,S.none(),s),!1),i("color-levels","Color levels",G(q,S.none(),s),!1),i("gamma","Gamma",G(V,S.none(),s),!1),i("invert","Invert",G(H,K,s),!1)],J=jy.sketch({dom:c,components:Y.map((function(e){return e.asSpec()}))}),Q=jy.sketch({dom:{tag:"div"},components:[J],containerBehaviours:ac([dg.config({})])}),Z=hh(Q);return{memContainer:Z,getApplyButton:function(e){return Z.getOpt(e).map((function(e){var t=e.components()[0];return t.components()[t.components().length-1]}))}}},h_=tinymce.util.Tools.resolve("tinymce.geom.Rect"),p_=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),v_=tinymce.util.Tools.resolve("tinymce.util.Observable"),b_=tinymce.util.Tools.resolve("tinymce.util.VK"),y_=function(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]};function x_(e,t){var n,r,o,i,a=t.document||document,u=a.getElementById(t.handle||e),c=function(e){if(y_(e),e.button!==r)return s(e);e.deltaX=e.screenX-o,e.deltaY=e.screenY-i,e.preventDefault(),t.drag(e)},s=function e(r){y_(r),p_(a).off("mousemove touchmove",c).off("mouseup touchend",e),n.remove(),t.stop&&t.stop(r)};return p_(u).on("mousedown touchstart",(function(e){var l,f,d,m,g,h,p,v,b,y,x=(l=a,f=Math.max,d=l.documentElement,m=l.body,g=f(d.scrollWidth,m.scrollWidth),h=f(d.clientWidth,m.clientWidth),p=f(d.offsetWidth,m.offsetWidth),v=f(d.scrollHeight,m.scrollHeight),b=f(d.clientHeight,m.clientHeight),{width:g<p?h:g,height:v<f(d.offsetHeight,m.offsetHeight)?b:v});y_(e),e.preventDefault(),r=e.button;var w=u;o=e.screenX,i=e.screenY,y=window.getComputedStyle?window.getComputedStyle(w,null).getPropertyValue("cursor"):w.runtimeStyle.cursor,n=p_("<div></div>").css({position:"absolute",top:0,left:0,width:x.width,height:x.height,zIndex:2147483647,opacity:1e-4,cursor:y}).appendTo(a.body),p_(a).on("mousemove touchmove",c).on("mouseup touchend",s),t.start(e)})),{destroy:function(){p_(u).off()}}}var w_,C_,k_,S_=0,__=function(e,t,n,r,o){var i,a="tox-",u="tox-crid-"+S_++,c=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],s=["top","right","bottom","left"],l=function(e,t){return{x:t.x-e.x,y:t.y-e.y,w:t.w,h:t.h}},f=function(t,r,o,i){var a,u=r.x,c=r.y,s=r.w,f=r.h;u+=o*t.deltaX,c+=i*t.deltaY,(s+=o*t.deltaW)<20&&(s=20),(f+=i*t.deltaH)<20&&(f=20),a=e=h_.clamp({x:u,y:c,w:s,h:f},n,"move"===t.name),a=l(n,a),h.fire("updateRect",{rect:a}),g(a)},d=function(e){var n=function(e,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),p_("#"+u+"-"+e,r).css({left:t.x,top:t.y,width:t.w,height:t.h})};mk.each(c,(function(t){p_("#"+u+"-"+t.name,r).css({left:e.w*t.xMul+e.x,top:e.h*t.yMul+e.y})})),n("top",{x:t.x,y:t.y,w:t.w,h:e.y-t.y}),n("right",{x:e.x+e.w,y:e.y,w:t.w-e.x-e.w+t.x,h:e.h}),n("bottom",{x:t.x,y:e.y+e.h,w:t.w,h:t.h-e.y-e.h+t.y}),n("left",{x:t.x,y:e.y,w:e.x-t.x,h:e.h}),n("move",e)},m=function(t){d(e=t)},g=function(e){var t,r;m((t=n,{x:(r=e).x+t.x,y:r.y+t.y,w:r.w,h:r.h}))};p_('<div id="'+u+'" class="'+a+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(r),mk.each(s,(function(e){p_("#"+u,r).append('<div id="'+u+"-"+e+'"class="'+a+'croprect-block" style="display: none" data-mce-bogus="all">')})),mk.each(c,(function(e){p_("#"+u,r).append('<div id="'+u+"-"+e.name+'" class="'+a+"croprect-handle "+a+"croprect-handle-"+e.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+e.label+'" aria-grabbed="false" title="'+e.label+'">')})),i=mk.map(c,(function(t){var n;return x_(u,{document:r.ownerDocument,handle:u+"-"+t.name,start:function(){n=e},drag:function(e){f(t,n,e.deltaX,e.deltaY)}})})),d(e),p_(r).on("focusin focusout",(function(e){p_(e.target).attr("aria-grabbed","focus"===e.type?"true":"false")})),p_(r).on("keydown",(function(t){var n;mk.each(c,(function(e){if(t.target.id===u+"-"+e.name)return n=e,!1}));var r=function(e,t,r,o,i){e.stopPropagation(),e.preventDefault(),f(n,r,o,i)};switch(t.keyCode){case b_.LEFT:r(t,0,e,-10,0);break;case b_.RIGHT:r(t,0,e,10,0);break;case b_.UP:r(t,0,e,0,-10);break;case b_.DOWN:r(t,0,e,0,10);break;case b_.ENTER:case b_.SPACEBAR:t.preventDefault(),o()}}));var h=mk.extend({toggleVisibility:function(e){var t=mk.map(c,(function(e){return"#"+u+"-"+e.name})).concat(mk.map(s,(function(e){return"#"+u+"-"+e}))).join(",");e?p_(t,r).show():p_(t,r).hide()},setClampRect:function(t){n=t,d(e)},setRect:m,getInnerRect:function(){return l(n,e)},setInnerRect:g,setViewPortRect:function(n){t=n,d(e)},destroy:function(){mk.each(i,(function(e){e.destroy()})),i=[]}},v_);return h},O_=function(e){var t=hh({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),r=mn(1),o=mn(S.none()),i=mn({x:0,y:0,w:1,h:1}),a=mn({x:0,y:0,w:1,h:1}),u=function(e,n){l.getOpt(e).each((function(e){var a=r.get(),u=Ea(e.element),c=ya(e.element),s=n.dom.naturalWidth*a,l=n.dom.naturalHeight*a,f=Math.max(0,u/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};Yi(n,m),t.getOpt(e).each((function(e){Yi(e.element,m)})),o.get().each((function(e){var t=i.get();e.setRect({x:t.x*a+f,y:t.y*a+d,w:t.w*a,h:t.h*a}),e.setClampRect({x:f,y:d,w:s,h:l}),e.setViewPortRect({x:0,y:0,w:u,h:c})}))}))},c=function(e,t){var n,o=hn.fromTag("img");return Ko(o,"src",t),n=o.dom,new Nh((function(e){var t=function t(){n.removeEventListener("load",t),e(n)};n.complete?e(n):n.addEventListener("load",t)})).then((function(){return l.getOpt(e).map((function(e){var t=ma({element:o});dg.replaceAt(e,1,S.some(t));var n=a.get(),c={x:0,y:0,w:o.dom.naturalWidth,h:o.dom.naturalHeight};a.set(c);var s,f,d=h_.inflate(c,-20,-20);return i.set(d),n.w===c.w&&n.h===c.h||(s=e,f=o,l.getOpt(s).each((function(e){var t=Ea(e.element),n=ya(e.element),o=f.dom.naturalWidth,i=f.dom.naturalHeight,a=Math.min(t/o,n/i);1<=a?r.set(1):r.set(a)}))),u(e,o),o}))}))},s=jy.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[t.asSpec(),{dom:{tag:"img",attributes:{src:e}}},{dom:{tag:"div"},behaviours:ac([mg("image-panel-crop-events",[lo((function(e){l.getOpt(e).each((function(e){var t=e.element.dom,a=__({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t,n);a.toggleVisibility(!1),a.on("updateRect",(function(e){var t=e.rect,n=r.get(),o={x:Math.round(t.x/n),y:Math.round(t.y/n),w:Math.round(t.w/n),h:Math.round(t.h/n)};i.set(o)})),o.set(S.some(a))}))}))])])}],containerBehaviours:ac([dg.config({}),mg("image-panel-events",[lo((function(t){c(t,e)}))])])}),l=hh(s);return{memContainer:l,updateSrc:c,zoom:function(e,t){var n=r.get(),o=0<t?Math.min(2,n+.1):Math.max(.1,n-.1);r.set(o),l.getOpt(e).each((function(e){var t=e.components()[1].element;u(e,t)}))},showCrop:function(){o.get().each((function(e){e.toggleVisibility(!0)}))},hideCrop:function(){o.get().each((function(e){e.toggleVisibility(!1)}))},getRect:function(){return i.get()},getMeasurements:function(){var e=a.get();return{width:e.w,height:e.h}}}},E_=function(e,t,n,r,o){return XS({name:e,icon:S.some(t),disabled:n,tooltip:S.some(e),primary:!1,borderless:!1},r,o)},T_=function(e,t){t?hv.enable(e):hv.disable(e)},z_=function(e){var t,r,o,i,a=mn(e),u=mn(S.none()),c=(r=-1,{data:t=[],add:function(e){var n=t.splice(++r);return t.push(e),{state:e,removed:n}},undo:function(){if(o())return t[--r]},redo:function(){if(i())return t[++r]},canUndo:o=function(){return 0<r},canRedo:i=function(){return-1!==r&&r<t.length-1}});c.add(e);var s=function(e){a.set(e)},l=function(e){return{blob:e,url:URL.createObjectURL(e)}},f=function(e){URL.revokeObjectURL(e.url)},d=function(){u.get().each(f),u.set(S.none())},m=function(e){var t=l(e);s(t);var n,r=c.add(t).removed;return n=r,mk.each(n,f),t.url};return{getBlobState:function(){return a.get()},setBlobState:s,addBlobState:m,getTempState:function(){return u.get().fold((function(){return a.get()}),(function(e){return e}))},updateTempState:function(e){var t=l(e);return d(),u.set(S.some(t)),t.url},addTempState:function(e){var t=l(e);return u.set(S.some(t)),t.url},applyTempState:function(e){return u.get().fold(n,(function(t){m(t.blob),e()}))},destroyTempState:d,undo:function(){var e=c.undo();return s(e),e.url},redo:function(){var e=c.redo();return s(e),e.url},getHistoryStates:function(){return{undoEnabled:c.canUndo(),redoEnabled:c.canRedo()}}}},D_=function(e,t){var r,o,i,a=z_(e.currentState),u=function(e){var t=a.getHistoryStates();p.updateButtonUndoStates(e,t.undoEnabled,t.redoEnabled),Kr(e,m_.formActionEvent,{name:m_.saveState(),value:t.undoEnabled})},c=function(e){return e.toBlob()},s=function(e){Kr(e,m_.formActionEvent,{name:m_.disable(),value:{}})},l=function(e){v.getApplyButton(e).each((function(e){hv.enable(e)})),Kr(e,m_.formActionEvent,{name:m_.enable(),value:{}})},f=function(e,t){return s(e),h.updateSrc(e,t)},d=function(e,t,n,r,o){return s(e),Zk(t).then(n).then(c).then(r).then((function(t){return f(e,t).then((function(t){return u(e),o(),l(e),t}))}))["catch"]((function(t){return console.log(t),l(e),t}))},m=function(e,t,n){var r=a.getBlobState().blob;d(e,r,t,(function(e){return a.updateTempState(e)}),n)},g=function(e){var t=a.getBlobState().url;return a.destroyTempState(),u(e),t},h=O_(e.currentState.url),p=(o=hh(E_("Undo","undo",!0,(function(e){Kr(e,s_.undo(),{direction:1})}),r=t)),i=hh(E_("Redo","redo",!0,(function(e){Kr(e,s_.redo(),{direction:1})}),r)),{container:jy.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[o.asSpec(),i.asSpec(),E_("Zoom in","zoom-in",!1,(function(e){Kr(e,s_.zoom(),{direction:1})}),r),E_("Zoom out","zoom-out",!1,(function(e){Kr(e,s_.zoom(),{direction:-1})}),r)]}),updateButtonUndoStates:function(e,t,n){o.getOpt(e).each((function(e){T_(e,t)})),i.getOpt(e).each((function(e){T_(e,n)}))}}),v=g_(h,t);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[v.memContainer.asSpec(),h.memContainer.asSpec(),p.container],behaviours:ac([Ul.config({store:{mode:"manual",getValue:function(){return a.getBlobState()}}}),mg("image-tools-events",[ro(s_.undo(),(function(e,t){var n=a.undo();f(e,n).then((function(t){l(e),u(e)}))})),ro(s_.redo(),(function(e,t){var n=a.redo();f(e,n).then((function(t){l(e),u(e)}))})),ro(s_.zoom(),(function(e,t){var n=t.event.direction;h.zoom(e,n)})),ro(s_.back(),(function(e,t){var n,r;r=g(n=e),f(n,r).then((function(e){l(n)})),(0,t.event.swap)(),h.hideCrop()})),ro(s_.apply(),(function(e,t){a.applyTempState((function(){g(e),(0,t.event.swap)()}))})),ro(s_.transform(),(function(e,t){return m(e,t.event.transform,n)})),ro(s_.tempTransform(),(function(e,t){return r=e,o=t.event.transform,i=a.getTempState().blob,void d(r,i,o,(function(e){return a.addTempState(e)}),n);var r,o,i})),ro(s_.transformApply(),(function(e,t){return n=e,r=t.event.transform,o=t.event.swap,i=a.getBlobState().blob,void d(n,i,r,(function(e){var t=a.addBlobState(e);return g(n),t}),o);var n,r,o,i})),ro(s_.swap(),(function(e,t){var n;n=e,p.updateButtonUndoStates(n,!1,!1);var r=t.event.transform,o=t.event.swap;r.fold((function(){o()}),(function(t){m(e,t,o)}))}))]),uk()])}},A_=function(e){return!Pe(e,"items")},M_="data-value",R_=function e(t,n,r,o){return $(r,(function(r){return A_(r)?{type:"togglemenuitem",text:r.text,value:r.value,active:r.value===o,onAction:function(){Ul.setValue(t,r.value),Kr(t,tx,{name:n}),bg.focus(t)}}:{type:"nestedmenuitem",text:r.text,getSubmenuItems:function(){return e(t,n,r.items,o)}}}))},N_=function e(t,n){return ce(t,(function(t){return A_(t)?Jf(t.value===n,t):e(t.items,n)}))},B_=Xf({name:"HtmlSelect",configFields:[jt("options"),$l("selectBehaviours",[bg,Ul]),nn("selectClasses",[]),nn("selectAttributes",{}),Yt("data")],factory:function(e,t){var n=$(e.options,(function(e){return{dom:{tag:"option",value:e.value,innerHtml:e.text}}})),r=e.data.map((function(e){return Qe("initialValue",e)})).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:n,behaviours:ql(e.selectBehaviours,[bg.config({}),Ul.config({store:d({mode:"manual",getValue:function(e){return oa(e.element)},setValue:function(t,n){Y(e.options,(function(e){return e.value===n})).isSome()&&ia(t.element,n)}},r)})])}}}),P_=function(e,t){var n=e.label.map((function(e){return ex(e,t)})),r=[hv.config({disabled:function(){return e.disabled||t.isDisabled()}}),$v(),ug.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(e){return Xr(e,ix),S.some(!0)}}),mg("textfield-change",[ro(pr(),(function(t,n){Kr(t,tx,{name:e.name})})),ro(_r(),(function(t,n){Kr(t,tx,{name:e.name})}))]),Ky.config({})],i=e.validation.map((function(e){return Bx.config({getRoot:function(e){return _o(e.element)},invalidClass:"tox-invalid",validator:{validate:function(t){var n=Ul.getValue(t),r=e.validator(n);return _x(!0===r?fe.value(n):fe.error(r))},validateOnLoad:e.validateOnLoad}})})).toArray(),a=e.placeholder.fold(o({}),(function(e){return{placeholder:t.translate(e)}})),u=e.inputMode.fold(o({}),(function(e){return{inputmode:e}})),c=d(d({},a),u),s=qy.parts.field({tag:!0===e.multiline?"textarea":"input",inputAttributes:c,inputClasses:[e.classname],inputBehaviours:ac(Q([r,i])),selectOnFocus:!1,factory:gx}),l=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),f=[hv.config({disabled:function(){return e.disabled||t.isDisabled()},onDisabled:function(e){qy.getField(e).each(hv.disable)},onEnabled:function(e){qy.getField(e).each(hv.enable)}}),$v()];return Jy(n,s,l,f)},H_=Object.freeze({__proto__:null,events:function(e,t){var n=e.stream.streams.setup(e,t);return eo([ro(e.event,n),fo((function(){return t.cancel()}))].concat(e.cancelEvent.map((function(e){return[ro(e,(function(){return t.cancel()}))]})).getOr([])))}}),I_=function(e){var t=mn(null);return Ci({readState:function(){return{timer:null!==t.get()?"set":"unset"}},setTimer:function(e){t.set(e)},cancel:function(){var e=t.get();null!==e&&e.cancel()}})},L_=Object.freeze({__proto__:null,throttle:I_,init:function(e){return e.stream.streams.state(e)}}),V_=[Ut("stream",Mt("mode",{throttle:[jt("delay"),nn("stopEvent",!0),yu("streams",{setup:function(e,t){var n=e.stream,r=kh(e.onStream,n.delay);return t.setTimer(r),function(e,t){r.throttle(e,t),n.stopEvent&&t.stop()}},state:I_})]})),nn("event","input"),Yt("cancelEvent"),vu("onStream")],F_=cc({fields:V_,name:"streaming",active:H_,state:L_}),j_=function(e,t,n){var r=Ul.getValue(n);Ul.setValue(t,r),$_(t)},U_=function(e,t){var n=e.element,r=oa(n),o=n.dom;"number"!==Yo(n,"type")&&t(o,r)},$_=function(e){U_(e,(function(e,t){return e.setSelectionRange(t.length,t.length)}))},W_=function(e,t,n){if(e.selectsOver){var r=Ul.getValue(t),o=e.getDisplayText(r),i=Ul.getValue(n);return 0===e.getDisplayText(i).indexOf(o)?S.some((function(){var e,r;j_(0,t,n),e=t,r=o.length,U_(e,(function(e,t){return e.setSelectionRange(r,t.length)}))})):S.none()}return S.none()},q_=o("alloy.typeahead.itemexecute"),G_=o([Yt("lazySink"),jt("fetch"),nn("minChars",5),nn("responseTime",1e3),hu("onOpen"),nn("getHotspot",S.some),nn("getAnchorOverrides",o({})),nn("layouts",S.none()),nn("eventOrder",{}),fn("model",{},[nn("getDisplayText",(function(e){return void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value})),nn("selectsOver",!0),nn("populateFromBrowse",!0)]),hu("onSetValue"),pu("onExecute"),hu("onItemExecute"),nn("inputClasses",[]),nn("inputAttributes",{}),nn("inputStyles",{}),nn("matchWidth",!0),nn("useMinWidth",!1),nn("dismissOnBlur",!0),mu(["openClass"]),Yt("initialData"),$l("typeaheadBehaviours",[bg,Ul,F_,ug,Dg,Ix]),dn("previewing",(function(){return mn(!0)}))].concat(fx()).concat(nw())),X_=o([wf({schema:[du()],name:"menu",overrides:function(e){return{fakeFocus:!0,onHighlight:function(t,n){e.previewing.get()?t.getSystem().getByUid(e.uid).each((function(r){W_(e.model,r,n).fold((function(){return dd.dehighlight(t,n)}),(function(e){return e()}))})):t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&j_(e.model,t,n)})),e.previewing.set(!1)},onExecute:function(t,n){return t.getSystem().getByUid(e.uid).toOptional().map((function(e){return Kr(e,q_(),{item:n}),!0}))},onHover:function(t,n){e.previewing.set(!1),t.getSystem().getByUid(e.uid).each((function(t){e.model.populateFromBrowse&&j_(e.model,t,n)}))}}}})]),K_=Kf({name:"Typeahead",configFields:G_(),partFields:X_(),factory:function(e,t,r,o){var i=function(t,r,i){e.previewing.set(!1);var a=Ix.getCoupled(t,"sandbox");kl.isOpen(a)?td.getCurrent(a).each((function(e){dd.getHighlighted(e).fold((function(){i(e)}),(function(){Zr(a,e.element,"keydown",r)}))})):Xx(e,u(t),t,a,o,(function(e){td.getCurrent(e).each(i)}),vx.HighlightFirst).get(n)},a=dx(e),u=function(e){return function(t){return t.map((function(t){var n=Ne(t.menus),r=Z(n,(function(e){return G(e.items,(function(e){return"item"===e.type}))}));return Ul.getState(e).update($(r,(function(e){return e.data}))),t}))}},c=[bg.config({}),Ul.config({onSetValue:e.onSetValue,store:d({mode:"dataset",getDataKey:function(e){return oa(e.element)},getFallbackEntry:function(e){return{value:e,meta:{}}},setValue:function(t,n){ia(t.element,e.model.getDisplayText(n))}},e.initialData.map((function(e){return Qe("initialValue",e)})).getOr({}))}),F_.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:function(t,r){var i,a=Ix.getCoupled(t,"sandbox");bg.isFocused(t)&&oa(t.element).length>=e.minChars&&(i=td.getCurrent(a).bind((function(e){return dd.getHighlighted(e).map(Ul.getValue)})),e.previewing.set(!0),Xx(e,u(t),t,a,o,(function(t){td.getCurrent(a).each((function(t){i.fold((function(){e.model.selectsOver&&dd.highlightFirst(t)}),(function(e){dd.highlightBy(t,(function(t){return Ul.getValue(t).value===e.value})),dd.getHighlighted(t).orThunk((function(){return dd.highlightFirst(t),S.none()}))}))}))}),vx.HighlightFirst).get(n))},cancelEvent:Mr()}),ug.config({mode:"special",onDown:function(e,t){return i(e,t,dd.highlightFirst),S.some(!0)},onEscape:function(e){var t=Ix.getCoupled(e,"sandbox");return kl.isOpen(t)?(kl.close(t),S.some(!0)):S.none()},onUp:function(e,t){return i(e,t,dd.highlightLast),S.some(!0)},onEnter:function(t){var n=Ix.getCoupled(t,"sandbox"),r=kl.isOpen(n);if(r&&!e.previewing.get())return td.getCurrent(n).bind((function(e){return dd.getHighlighted(e)})).map((function(e){return Kr(t,q_(),{item:e}),!0}));var o=Ul.getValue(t);return Xr(t,Mr()),e.onExecute(n,t,o),r&&kl.close(n),S.some(!0)}}),Dg.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),Ix.config({others:{sandbox:function(t){return ew(e,t,{onOpen:function(){return Dg.on(t)},onClose:function(){return Dg.off(t)}})}}}),mg("typeaheadevents",[go((function(t){var r=n;Yx(e,u(t),t,o,r,vx.HighlightFirst).get(n)})),ro(q_(),(function(t,n){var r=Ix.getCoupled(t,"sandbox");j_(e.model,t,n.event.item),Xr(t,Mr()),e.onItemExecute(t,r,n.event.item,Ul.getValue(t)),kl.close(r),$_(t)}))].concat(e.dismissOnBlur?[ro(Sr(),(function(e){var t=Ix.getCoupled(e,"sandbox");pc(t.element).isNone()&&kl.close(t)}))]:[]))];return{uid:e.uid,dom:mx(Fe(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:d(d({},a),ql(e.typeaheadBehaviours,c)),eventOrder:e.eventOrder}}}),Y_=function e(t){return d(d({},t),{toCached:function(){return e(t.toCached())},bindFuture:function(n){return e(t.bind((function(e){return e.fold((function(e){return _x(fe.error(e))}),(function(e){return n(e)}))})))},bindResult:function(n){return e(t.map((function(e){return e.bind(n)})))},mapResult:function(n){return e(t.map((function(e){return e.map(n)})))},mapError:function(n){return e(t.map((function(e){return e.mapError(n)})))},foldResult:function(e,n){return t.map((function(t){return t.fold(e,n)}))},withTimeout:function(n,r){return e(Sx((function(e){var o=!1,i=setTimeout((function(){o=!0,e(fe.error(r()))}),n);t.get((function(t){o||(clearTimeout(i),e(t))}))})))}})},J_=function(e){return Y_(Sx(e))},Q_=J_,Z_={type:"separator"},eO=function(e){return{type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:n}},tO=function(e,t){return{type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:n}},nO=function(e,t){return r=e,n=G(t,(function(e){return e.type===r})),$(n,eO);var n,r},rO=function(e,t){var n=e.toLowerCase();return G(t,(function(e){var t=void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.text;return kn(t.toLowerCase(),n)||kn(e.value.toLowerCase(),n)}))},oO=function(e,t,n){var r=Ul.getValue(t),o=void 0!==r.meta.text?r.meta.text:r.value;return n.getLinkInformation().fold((function(){return[]}),(function(t){var r,i,a,u,c=rO(o,(r=n.getHistory(e),$(r,(function(e){return tO(e,e)}))));return"file"===e?(i=[c,rO(o,nO("header",t.targets)),rO(o,Q([(u=t,S.from(u.anchorTop).map((function(e){return tO("<top>",e)})).toArray()),nO("anchor",t.targets),(a=t,S.from(a.anchorBottom).map((function(e){return tO("<bottom>",e)})).toArray())]))],K(i,(function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(Z_,t)}),[])):c}))},iO=ii("aria-invalid"),aO=function(e,t,r){var o,i,a,u,c,s=t.shared.providers,l=function(t){var n=Ul.getValue(t);r.addToHistory(n.value,e.filetype)},f=qy.parts.field({factory:K_,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":iO,type:"url"},minChars:0,responseTime:0,fetch:function(n){var o=oO(e.filetype,n,r),i=jS(o,up.BUBBLE_TO_SANDBOX,t,!1);return _x(i)},getHotspot:function(e){return b.getOpt(e)},onSetValue:function(e,t){e.hasConfigured(Bx)&&Bx.run(e).get(n)},typeaheadBehaviours:ac(Q([r.getValidationHandler().map((function(t){return Bx.config({getRoot:function(e){return _o(e.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(e,t){g.getOpt(e).each((function(e){Ko(e.element,"title",s.translate(t))}))}},validator:{validate:function(n){var r=Ul.getValue(n);return Q_((function(n){t({type:e.filetype,url:r.value},(function(e){var t,r;"invalid"===e.status?(t=fe.error(e.message),n(t)):(r=fe.value(e.message),n(r))}))}))},validateOnLoad:!1}})})).toArray(),[hv.config({disabled:function(){return e.disabled||s.isDisabled()}}),Ky.config({}),mg("urlinput-events",Q(["file"===e.filetype?[ro(pr(),(function(t){Kr(t,tx,{name:e.name})}))]:[],[ro(vr(),(function(t){Kr(t,tx,{name:e.name}),l(t)})),ro(_r(),(function(t){Kr(t,tx,{name:e.name}),l(t)}))]]))]])),eventOrder:((o={})[pr()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(e){return e.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:Cp(0,0,"normal")},onExecute:function(e,t,n){Kr(t,ix,{})},onItemExecute:function(t,n,r,o){l(t),Kr(t,tx,{name:e.name})}}),m=e.label.map((function(e){return ex(e,s)})),g=hh((i="invalid",a=S.some(iO),void 0===(u="warning")&&(u=i),void 0===c&&(c=i),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+i],innerHtml:vh(u,s.icons),attributes:d({title:s.translate(c),"aria-live":"polite"},a.fold((function(){return{}}),(function(e){return{id:e}})))}})),h=hh({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[g.asSpec()]}),p=r.getUrlPicker(e.filetype),v=ii("browser.url.event"),b=hh({dom:{tag:"div",classes:["tox-control-wrap"]},components:[f,h.asSpec()],behaviours:ac([hv.config({disabled:function(){return e.disabled||s.isDisabled()}})])}),y=hh(YS({name:e.name,icon:S.some("browse"),text:e.label.getOr(""),disabled:e.disabled,primary:!1,borderless:!0},(function(e){return Xr(e,v)}),s,[],["tox-browse-url"]));return qy.sketch({dom:Zy([]),components:m.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Q([[b.asSpec()],p.map((function(){return y.asSpec()})).toArray()])}]),fieldBehaviours:ac([hv.config({disabled:function(){return e.disabled||s.isDisabled()},onDisabled:function(e){qy.getField(e).each(hv.disable),y.getOpt(e).each(hv.disable)},onEnabled:function(e){qy.getField(e).each(hv.enable),y.getOpt(e).each(hv.enable)}}),$v(),mg("url-input-events",[ro(v,(function(t){td.getCurrent(t).each((function(n){var r=Ul.getValue(n),o=d({fieldname:e.name},r);p.each((function(r){r(o).get((function(r){Ul.setValue(n,r),Kr(t,tx,{name:e.name})}))}))}))}))])])})},uO=function(e){return function(t,n,r){return Be(n,"name").fold((function(){return e(n,r)}),(function(o){return t.field(o,e(n,r))}))}},cO={bar:uO((function(e,t){return n=e,r=t.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:$(n.items,r.interpreter)};var n,r})),collection:uO((function(e,t){return lx(e,t.shared.providers)})),alertbanner:uO((function(e,t){return n=e,r=t.shared.providers,jy.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+n.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[gh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:vh(n.icon,r.icons),attributes:{title:r.translate(n.iconTooltip)}},action:function(e){Kr(e,ox,{name:"alert-banner",value:n.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:r.translate(n.text)}}]});var n,r})),input:uO((function(e,t){return n=e,r=t.shared.providers,P_({name:n.name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:S.none(),maximized:n.maximized},r);var n,r})),textarea:uO((function(e,t){return n=e,r=t.shared.providers,P_({name:n.name,multiline:!0,label:n.label,inputMode:S.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:S.none(),maximized:n.maximized},r);var n,r})),label:uO((function(e,t){return n=e,r=t.shared,o={dom:{tag:"label",innerHtml:r.providers.translate(n.label),classes:["tox-label"]}},i=$(n.items,r.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[o].concat(i),behaviours:ac([uk(),dg.config({}),yk(S.none()),ug.config({mode:"acyclic"})])};var n,r,o,i})),iframe:(w_=function(e,t){return Dk(e,t.shared.providers)},function(e,t,n){var r=Fe(t,{source:"dynamic"});return uO(w_)(e,r,n)}),button:uO((function(e,t){return ZS(e,t.shared.providers)})),checkbox:uO((function(e,t){return n=e,r=t.shared.providers,o=Ul.config({store:{mode:"manual",getValue:function(e){return e.element.dom.checked},setValue:function(e,t){e.element.dom.checked=t}}}),a=function(e){return e.element.dom.click(),S.some(!0)},u=qy.parts.field({factory:{sketch:i},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ac([uk(),hv.config({disabled:function(){return n.disabled||r.isDisabled()}}),Ky.config({}),bg.config({}),o,ug.config({mode:"special",onEnter:a,onSpace:a,stopSpaceKeyup:!0}),mg("checkbox-events",[ro(vr(),(function(e,t){Kr(e,tx,{name:n.name})}))])])}),c=qy.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:r.translate(n.label)},behaviours:ac([aw.config({})])}),l=hh({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[(s=function(e){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e],innerHtml:vh("checked"===e?"selected":"unselected",r.icons)}}})("checked"),s("unchecked")]}),qy.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,l.asSpec(),c],fieldBehaviours:ac([hv.config({disabled:function(){return n.disabled||r.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(e){qy.getField(e).each(hv.disable)},onEnabled:function(e){qy.getField(e).each(hv.enable)}}),$v()])});var n,r,o,a,u,c,s,l})),colorinput:uO((function(e,t){return lw(e,t.shared,t.colorinput)})),colorpicker:uO((function(e){var t=function(e){return"tox-"+e},n=ak(fk,t),r=hh(n.sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(e){Kr(e,ox,{name:"hex-valid",value:!0})},onInvalidHex:function(e){Kr(e,ox,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:ac([Ul.config({store:{mode:"manual",getValue:function(e){var t=r.get(e);return td.getCurrent(t).bind((function(e){return Ul.getValue(e).hex})).map((function(e){return"#"+e})).getOr("")},setValue:function(e,t){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t),o=r.get(e);td.getCurrent(o).fold((function(){console.log("Can not find form")}),(function(e){Ul.setValue(e,{hex:S.from(n[1]).getOr("")}),ZC.getField(e,"hex").each((function(e){Xr(e,pr())}))}))}}}),uk()])}})),dropzone:uO((function(e,t){return wk(e,t.shared.providers)})),grid:uO((function(e,t){return n=e,r=t.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+n.columns+"col"]},components:$(n.items,r.interpreter)};var n,r})),listbox:uO((function(e,t){return r=e,a=(i=t).shared.providers,u=ie(r.items).filter(A_),c=r.label.map((function(e){return ex(e,a)})),s={dom:{tag:"div",classes:["tox-listboxfield"]},components:[qy.parts.field({dom:{},factory:{sketch:function(e){return PS({uid:e.uid,text:u.map((function(e){return e.text})),icon:S.none(),tooltip:r.label,role:S.none(),fetch:function(e,t){var n=R_(e,r.name,r.items,Ul.getValue(e));t(jS(n,up.CLOSE_ON_EXECUTE,i,!1))},onSetup:o(n),getApi:o({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Ky.config({}),Ul.config({store:{mode:"manual",initialValue:u.map((function(e){return e.value})).getOr(""),getValue:function(e){return Yo(e.element,M_)},setValue:function(e,t){N_(r.items,t).each((function(t){Ko(e.element,M_,t.value),Kr(e,NS,{text:t.text})}))}}})]},"tox-listbox",i.shared)}}})]},qy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Q([c.toArray(),[s]]),fieldBehaviours:ac([hv.config({disabled:o(r.disabled),onDisabled:function(e){qy.getField(e).each(hv.disable)},onEnabled:function(e){qy.getField(e).each(hv.enable)}})])});var r,i,a,u,c,s})),selectbox:uO((function(e,t){return n=e,r=t.shared.providers,o=$(n.items,(function(e){return{text:r.translate(e.text),value:e.value}})),i=n.label.map((function(e){return ex(e,r)})),a=qy.parts.field({dom:{},selectAttributes:{size:n.size},options:o,factory:B_,selectBehaviours:ac([hv.config({disabled:function(){return n.disabled||r.isDisabled()}}),Ky.config({}),mg("selectbox-change",[ro(vr(),(function(e,t){Kr(e,tx,{name:n.name})}))])])}),u=1<n.size?S.none():S.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:vh("chevron-down",r.icons)}}),c={dom:{tag:"div",classes:["tox-selectfield"]},components:Q([[a],u.toArray()])},qy.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Q([i.toArray(),[c]]),fieldBehaviours:ac([hv.config({disabled:function(){return n.disabled||r.isDisabled()},onDisabled:function(e){qy.getField(e).each(hv.disable)},onEnabled:function(e){qy.getField(e).each(hv.enable)}}),$v()])});var n,r,o,i,a,u,c})),sizeinput:uO((function(e,t){return c_(e,t.shared.providers)})),urlinput:uO((function(e,t){return aO(e,t,t.urlinput)})),customeditor:uO((function(e){var t=mn(S.none()),n=hh({dom:{tag:e.tag}}),r=mn(S.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ac([mg("custom-editor-events",[lo((function(o){n.getOpt(o).each((function(n){var o;o=e,(Object.prototype.hasOwnProperty.call(o,"init")?e.init(n.element.dom):dk.load(e.scriptId,e.scriptUrl).then((function(t){return t(n.element.dom,e.settings)}))).then((function(e){r.get().each((function(t){e.setValue(t)})),r.set(S.none()),t.set(S.some(e))}))}))}))]),Ul.config({store:{mode:"manual",getValue:function(){return t.get().fold((function(){return r.get().getOr("")}),(function(e){return e.getValue()}))},setValue:function(e,n){t.get().fold((function(){r.set(S.some(n))}),(function(e){return e.setValue(n)}))}}}),uk()]),components:[n.asSpec()]}})),htmlpanel:uO((function(e){return"presentation"===e.presets?jy.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}}):jy.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:ac([Ky.config({}),bg.config({})])})})),imagetools:uO((function(e,t){return D_(e,t.shared.providers)})),table:uO((function(e,t){return n=e,r=t.shared.providers,a=function(e){return{dom:{tag:"th",innerHtml:r.translate(e)}}},u=function(e){return{dom:{tag:"td",innerHtml:r.translate(e)}}},c=function(e){return{dom:{tag:"tr"},components:$(e,u)}},{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(i=n.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:$(i,a)}]}),(o=n.cells,{dom:{tag:"tbody"},components:$(o,c)})],behaviours:ac([Ky.config({}),bg.config({})])};var n,r,o,i,a,u,c})),panel:uO((function(e,t){return r=t,{dom:{tag:"div",classes:(n=e).classes},components:$(n.items,r.shared.interpreter)};var n,r}))},sO={field:function(e,t){return t}},lO=function(e,t,n){var r=Fe(n,{shared:{interpreter:function(t){return fO(e,t,r)}}});return fO(e,t,r)},fO=function(e,t,n){return Be(cO,t.type).fold((function(){return console.error('Unknown factory type "'+t.type+'", defaulting to container: ',t),t}),(function(r){return r(e,t,n)}))},dO={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},mO=function(e,t,n){var r=Lc(-12,12,dO),o={maxHeightFunction:Nc()};return function(){return n()?{anchor:"node",root:No(e()),node:S.from(e()),bubble:r,layouts:{onRtl:function(){return[lh]},onLtr:function(){return[sh]}},overrides:o}:{anchor:"hotspot",hotspot:t(),bubble:r,layouts:{onRtl:function(){return[Lu]},onLtr:function(){return[Vu]}},overrides:o}}},gO=function(e,t,n){return function(){return n()?{anchor:"node",root:No(e()),node:S.from(e()),layouts:{onRtl:function(){return[fh]},onLtr:function(){return[fh]}}}:{anchor:"hotspot",hotspot:t(),layouts:{onRtl:function(){return[$u]},onLtr:function(){return[$u]}}}}},hO=function(e,t,n){var r,o,i,a=Pv(e),u=function(){return hn.fromDom(e.getBody())},c=function(){return hn.fromDom(e.getContentAreaContainer())},s=function(){return a||!n()};return{inlineDialog:mO(c,t,s),banner:gO(c,t,s),cursor:(o=e,function(){return{anchor:"selection",root:i(),getSelection:function(){var e=o.selection.getRng();return S.some(hs.range(hn.fromDom(e.startContainer),e.startOffset,hn.fromDom(e.endContainer),e.endOffset))}}}),node:(r=i=u,function(e){return{anchor:"node",root:r(),node:e}})}},pO=function(e){return{colorPicker:function(e,t){Zb(o)(e,t)},hasCustomColors:function(){return jb(r)},getColors:function(){return Ub(n)},getColorCols:(t=n=r=o=e,function(){return qb(t)})};var t,n,r,o},vO=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],bO=function e(t){return K(t,(function(t,n){if(Pe(n,"items")){var r=e(n.items);return{customFormats:t.customFormats.concat(r.customFormats),formats:t.formats.concat([{title:n.title,items:r.formats}])}}if(Pe(n,"inline")||Pe(n,"block")||Pe(n,"selector")){var o="custom-"+(E(n.name)?n.name:n.title.toLowerCase());return{customFormats:t.customFormats.concat([{name:o,format:n}]),formats:t.formats.concat([{title:n.title,format:o,icon:n.icon}])}}return d(d({},t),{formats:t.formats.concat(n)})}),{customFormats:[],formats:[]})},yO=function(e){return t=e,S.from(t.getParam("style_formats")).filter(z).map((function(t){var n,r,o,i=(n=e,r=bO(t),o=function(e){W(e,(function(e){n.formatter.has(e.name)||n.formatter.register(e.name,e.format)}))},n.formatter?o(r.customFormats):n.on("init",(function(){o(r.customFormats)})),r.formats);return e.getParam("style_formats_merge",!1,"boolean")?vO.concat(i):i})).getOr(vO);var t},xO=function(e,t,n){var r={type:"formatter",isSelected:t(e.format),getStylePreview:n(e.format)};return Fe(e,r)},wO=function(e,t,n,r){var o=function t(o){return $(o,(function(o){var i,a,u,c,s,l=Oe(o);if(He(o,"items")){var f=t(o.items);return Fe(Fe(o,{type:"submenu"}),{getStyleItems:function(){return f}})}return He(o,"format")?xO(o,n,r):1===l.length&&V(l,"title")?Fe(o,{type:"separator"}):(a=E((i=o).name)?i.name:ii(i.title),c={type:"formatter",format:u="custom-"+a,isSelected:n(u),getStylePreview:r(u)},s=Fe(i,c),e.formatter.register(a,s),s)}))};return o(t)},CO=mk.trim,kO=function(e){return function(t){if(M(n=t)&&1===n.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}var n;return!1}},SO=kO("true"),_O=kO("false"),OO=function(e,t,n,r,o){return{type:e,title:t,url:n,level:r,attach:o}},EO=function(e){return e.innerText||e.textContent},TO=function(e){return(t=e)&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&DO(e);var t},zO=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},DO=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return SO(e)}return!1}(e)&&!_O(e)},AO=function(e){return zO(e)&&DO(e)},MO=function(e){var t,n,r=(t=e).id?t.id:ii("h");return OO("header",EO(e),"#"+r,zO(n=e)?parseInt(n.nodeName.substr(1),10):0,(function(){e.id=r}))},RO=function(e){var t=e.id||e.name,r=EO(e);return OO("anchor",r||"#"+t,"#"+t,0,n)},NO=function(e){var t,n;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,$(Es(hn.fromDom(n),t),(function(e){return e.dom}))},BO=function(e){return 0<CO(e.title).length},PO=function(e){var t=NO(e);return G($(G(t,AO),MO).concat($(G(t,TO),RO)),BO)},HO="tinymce-url-history",IO=function(e){return E(e)&&/^https?/.test(e)},LO=function(e){return T(e)&&Re(e,(function(e){return!(z(t=e)&&t.length<=5&&ee(t,IO));var t})).isNone()},VO=function(){var e,t=Hb.getItem(HO);if(null===t)return{};try{e=JSON.parse(t)}catch(p){if(p instanceof SyntaxError)return console.log("Local storage "+HO+" was not valid JSON",p),{};throw p}return LO(e)?e:(console.log("Local storage "+HO+" was not valid format",e),{})},FO=function(e){var t=VO();return Object.prototype.hasOwnProperty.call(t,e)?t[e]:[]},jO=function(e,t){var n,r,o;IO(e)&&(n=VO(),r=Object.prototype.hasOwnProperty.call(n,t)?n[t]:[],o=G(r,(function(t){return t!==e})),n[t]=[e].concat(o).slice(0,5),function(e){if(!LO(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));Hb.setItem(HO,JSON.stringify(e))}(n))},UO=function(e){return!!e},$O=function(e){return ze(mk.makeMap(e,/[, ]/),UO)},WO=function(e){return S.from(e.getParam("file_picker_callback")).filter(R)},qO=function(e,t){var n,r,o,i,a=(n=e,r=S.some(n.getParam("file_picker_types")).filter(UO),o=S.some(n.getParam("file_browser_callback_types")).filter(UO),i=r.or(o).map($O),WO(n).fold(s,(function(e){return i.fold(l,(function(e){return 0<Oe(e).length&&e}))})));return D(a)?a?WO(e):S.none():a[t]?WO(e):S.none()},GO=function(e){return S.from(e).filter(E).getOrUndefined()},XO=function(e){return S.from(void 0===(n=(t=e).getParam("file_picker_validator_handler",void 0,"function"))?t.getParam("filepicker_validator_handler",void 0,"function"):n);var t,n},KO=function(e){return{getHistory:FO,addToHistory:jO,getLinkInformation:function(){return!1===(t=e).getParam("typeahead_urls")?S.none():S.some({targets:PO(t.getBody()),anchorTop:GO(t.getParam("anchor_top","#top")),anchorBottom:GO(t.getParam("anchor_bottom","#bottom"))});var t},getValidationHandler:function(){return XO(e)},getUrlPicker:function(t){return qO(n=e,r=t).map((function(e){return function(t){return Sx((function(o){var i=d({filetype:r,fieldname:t.fieldname},S.from(t.meta).getOr({}));e.call(n,(function(e,t){if(!E(e))throw new Error("Expected value to be string");if(void 0!==t&&!T(t))throw new Error("Expected meta to be a object");o({value:e,meta:t})}),t.value,i)}))}}));var n,r}}},YO=function(e,t,n){var r,o,i=mn(!1),a={isPositionedAtTop:function(){return"top"===r.get()},getDockingMode:(r=mn(Nv(t)?"bottom":"top")).get,setDockingMode:r.set},u={shared:{providers:{icons:function(){return t.ui.registry.getAll().icons},menuItems:function(){return t.ui.registry.getAll().menuItems},translate:tv.translate,isDisabled:function(){return t.mode.isReadOnly()||t.ui.isDisabled()},getSetting:t.getParam.bind(t)},interpreter:function(e){return fO(sO,e,u)},anchors:hO(t,n,a.isPositionedAtTop),header:a,getSink:function(){return fe.value(e)}},urlinput:KO(t),styleselect:function(e){var t=function(t){return function(){return e.formatter.match(t)}},n=function(t){return function(){var n=e.formatter.get(t);return void 0!==n?S.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):S.none()}},r=function e(t){var n=t.items;return void 0!==n&&0<n.length?Z(n,e):[t.format]},o=mn([]),i=mn([]),a=mn([]),u=mn([]),c=mn(!1);return e.on("PreInit",(function(a){var u=yO(e),c=wO(e,u,t,n);o.set(c),i.set(Z(c,r))})),e.on("addStyleModifications",(function(o){var i=wO(e,o.items,t,n);a.set(i),c.set(o.replace),u.set(Z(i,r))})),{getData:function(){var e=c.get()?[]:o.get(),t=a.get();return e.concat(t)},getFlattenedKeys:function(){var e=c.get()?[]:i.get(),t=u.get();return e.concat(t)}}}(t),colorinput:pO(t),dialog:{isDraggableModal:(o=t,function(){return o.getParam("draggable_modal",!1,"boolean")})},isContextMenuOpen:function(){return i.get()},setContextMenuState:function(e){return i.set(e)}};return u},JO=o((function(e,t){var n,r,o;n=e,r=Math.floor(t),o=Oa.max(n,r,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]),Ki(n,"max-width",o+"px")})),QO="contexttoolbar-hide",ZO=o([jt("dom"),nn("shell",!0),$l("toolbarBehaviours",[dg])]),eE=o([Cf({name:"groups",overrides:function(){return{behaviours:ac([dg.config({})])}}})]),tE=Kf({name:"Toolbar",configFields:ZO(),partFields:eE(),factory:function(e,t,n,r){var o=function(t){return e.shell?S.some(t):Nf(t,e,"groups")},i=e.shell?{behaviours:[dg.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:ql(e.toolbarBehaviours,i.behaviours),apis:{setGroups:function(e,t){o(e).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(e){dg.set(e,t)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(e,t,n){e.setGroups(t,n)}}}),nE=function(e,t,n){return{within:e,extra:t,withinWidth:n}},rE=function(e,t,n){var r,i=(r=function(e,t){var r=n(e);return S.some({element:e,start:t,finish:t+r,width:r})},K(e,(function(e,t){return r(t,e.len).fold(o(e),(function(t){return{len:t.finish,list:e.list.concat([t])}}))}),{len:0,list:[]}).list),a=G(i,(function(e){return e.finish<=t})),u=X(a,(function(e,t){return e+t.width}),0);return{within:a,extra:i.slice(a.length),withinWidth:u}},oE=function(e){return $(e,(function(e){return e.element}))},iE=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m=(0===(o=rE(t,e,n)).extra.length?S.some(o):S.none()).getOrThunk((function(){return rE(t,e-n(r),n)})),g=m.within,h=m.extra,p=m.withinWidth;return 1===h.length&&h[0].width<=n(r)?(l=h,f=p,d=oE(g.concat(l)),nE(d,[],f)):1<=h.length?(a=h,u=r,c=p,s=oE(g).concat([u]),nE(s,oE(a),c)):(i=p,nE(oE(g),[],i))},aE=function(e,t){var n=$(t,(function(e){return pa(e)}));tE.setGroups(e,n)},uE=function(e,t,n){var r=Bf(e,t,"primary"),o=Ix.getCoupled(e,"overflowGroup");Ki(r.element,"visibility","hidden");var i=t.builtGroups.get().concat([o]),a=ce(i,(function(e){return pc(e.element).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}));n([]),aE(r,i);var u=Ea(r.element),c=iE(u,t.builtGroups.get(),(function(e){return Ea(e.element)}),o);0===c.extra.length?(dg.remove(r,o),n([])):(aE(r,c.within),n(c.extra)),na(r.element,"visibility"),ra(r.element),a.each(bg.focus)},cE=o([$l("splitToolbarBehaviours",[Ix]),dn("builtGroups",(function(){return mn([])}))]),sE=o([mu(["overflowToggledClass"]),en("getOverflowBounds"),jt("lazySink"),dn("overflowGroups",(function(){return mn([])}))].concat(cE())),lE=o([xf({factory:tE,schema:ZO(),name:"primary"}),wf({schema:ZO(),name:"overflow"}),wf({name:"overflow-button"}),wf({name:"overflow-group"})]),fE=o([mu(["toggledClass"]),jt("lazySink"),qt("fetch"),en("getBounds"),tn("fireDismissalEventInstead",[nn("event",Vr())]),Yc()]),dE=o([wf({name:"button",overrides:function(e){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ac([Dg.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),wf({factory:tE,schema:ZO(),name:"toolbar",overrides:function(e){return{toolbarBehaviours:ac([ug.config({mode:"cyclic",onEscape:function(t){return Nf(t,e,"button").each(bg.focus),S.none()}})])}}})]),mE=function(e,t){var n=Ix.getCoupled(e,"toolbarSandbox");kl.isOpen(n)?kl.close(n):kl.open(n,t.toolbar())},gE=function(e,t,n,r){var o=n.getBounds.map((function(e){return e()})),i=n.lazySink(e).getOrDie();tl.positionWithinBounds(i,{anchor:"hotspot",hotspot:e,layouts:r,overrides:{maxWidthFunction:JO()}},t,o)},hE=function(e,t,n,r,o){tE.setGroups(t,o),gE(e,t,n,r),Dg.on(e)},pE=Kf({name:"FloatingToolbarButton",factory:function(e,t,n,r){return d(d({},gh.sketch(d(d({},r.button()),{action:function(e){mE(e,r)},buttonBehaviours:Xl({dump:r.button().buttonBehaviours},[Ix.config({others:{toolbarSandbox:function(t){return r=t,o=n,i=e,{dom:{tag:"div",attributes:{id:(a=Qa()).id}},behaviours:ac([ug.config({mode:"special",onEscape:function(e){return kl.close(e),S.some(!0)}}),kl.config({onOpen:function(e,t){i.fetch().get((function(e){hE(r,t,i,o.layouts,e),a.link(r.element),ug.focusIn(t)}))},onClose:function(){Dg.off(r),bg.focus(r),a.unlink(r.element)},isPartOf:function(e,t,n){return eu(t,n)||eu(r,n)},getAttachPoint:function(){return i.lazySink(r).getOrDie()}}),dc.config({channels:d(d({},Tl(d({isExtraPart:s},i.fireDismissalEventInstead.map((function(e){return{fireEventInstead:{event:e.event}}})).getOr({})))),Dl({doReposition:function(){kl.getState(Ix.getCoupled(r,"toolbarSandbox")).each((function(e){gE(r,e,i,o.layouts)}))}}))})])};var r,o,i,a}}})])}))),{apis:{setGroups:function(t,r){kl.getState(Ix.getCoupled(t,"toolbarSandbox")).each((function(o){hE(t,o,e,n.layouts,r)}))},reposition:function(t){kl.getState(Ix.getCoupled(t,"toolbarSandbox")).each((function(r){gE(t,r,e,n.layouts)}))},toggle:function(e){mE(e,r)},getToolbar:function(e){return kl.getState(Ix.getCoupled(e,"toolbarSandbox"))},isOpen:function(e){return kl.isOpen(Ix.getCoupled(e,"toolbarSandbox"))}}})},configFields:fE(),partFields:dE(),apis:{setGroups:function(e,t,n){e.setGroups(t,n)},reposition:function(e,t){e.reposition(t)},toggle:function(e,t){e.toggle(t)},getToolbar:function(e,t){return e.getToolbar(t)},isOpen:function(e,t){return e.isOpen(t)}}}),vE=o([jt("items"),mu(["itemSelector"]),$l("tgroupBehaviours",[ug])]),bE=o([kf({name:"items",unit:"item"})]),yE=Kf({name:"ToolbarGroup",configFields:vE(),partFields:bE(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.tgroupBehaviours,[ug.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),xE=function(e){return $(e,(function(e){return pa(e)}))},wE=function(e,t,n){uE(e,n,(function(r){n.overflowGroups.set(r),t.getOpt(e).each((function(e){pE.setGroups(e,xE(r))}))}))},CE=Kf({name:"SplitFloatingToolbar",configFields:sE(),partFields:lE(),factory:function(e,t,n,r){var o=hh(pE.sketch({fetch:function(){return Sx((function(t){t(xE(e.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Vu,Lu]},onRtl:function(){return[Lu,Vu]},onBottomLtr:function(){return[ju,Fu]},onBottomRtl:function(){return[Fu,ju]}},getBounds:n.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.splitToolbarBehaviours,[Ix.config({others:{overflowGroup:function(){return yE.sketch(d(d({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(t,n){e.builtGroups.set($(n,t.getSystem().build)),wE(t,o,e)},refresh:function(t){return wE(t,o,e)},toggle:function(e){o.getOpt(e).each((function(e){pE.toggle(e)}))},isOpen:function(e){return o.getOpt(e).map(pE.isOpen).getOr(!1)},reposition:function(e){o.getOpt(e).each((function(e){pE.reposition(e)}))},getOverflow:function(e){return o.getOpt(e).bind(pE.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(e,t,n){e.setGroups(t,n)},refresh:function(e,t){e.refresh(t)},reposition:function(e,t){e.reposition(t)},toggle:function(e,t){e.toggle(t)},isOpen:function(e,t){return e.isOpen(t)},getOverflow:function(e,t){return e.getOverflow(t)}}}),kE=function(e,t){return t.getAnimationRoot.fold((function(){return e.element}),(function(t){return t(e)}))},SE=function(e){return e.dimension.property},_E=function(e,t){return e.dimension.getDimension(t)},OE=function(e,t){var n=kE(e,t);ji(n,[t.shrinkingClass,t.growingClass])},EE=function(e,t){Li(e.element,t.openClass),Hi(e.element,t.closedClass),Ki(e.element,SE(t),"0px"),ra(e.element)},TE=function(e,t){Li(e.element,t.closedClass),Hi(e.element,t.openClass),na(e.element,SE(t))},zE=function(e,t,n,r){n.setCollapsed(),Ki(e.element,SE(t),_E(t,e.element)),ra(e.element),OE(e,t),EE(e,t),t.onStartShrink(e),t.onShrunk(e)},DE=function(e,t,n,r){var o=r.getOrThunk((function(){return _E(t,e.element)}));n.setCollapsed(),Ki(e.element,SE(t),o),ra(e.element);var i=kE(e,t);Li(i,t.growingClass),Hi(i,t.shrinkingClass),EE(e,t),t.onStartShrink(e)},AE=function(e,t,n){var r=_E(t,e.element);("0px"===r?zE:DE)(e,t,n,S.some(r))},ME=function(e,t,n){var r=kE(e,t),o=Vi(r,t.shrinkingClass),i=_E(t,e.element);TE(e,t);var a=_E(t,e.element);(o?function(){Ki(e.element,SE(t),i),ra(e.element)}:function(){EE(e,t)})(),Li(r,t.shrinkingClass),Hi(r,t.growingClass),TE(e,t),Ki(e.element,SE(t),a),n.setExpanded(),t.onStartGrow(e)},RE=function(e,t,n){var r=kE(e,t);return!0===Vi(r,t.growingClass)},NE=function(e,t,n){var r=kE(e,t);return!0===Vi(r,t.shrinkingClass)},BE=Object.freeze({__proto__:null,refresh:function(e,t,n){var r;n.isExpanded()&&(na(e.element,SE(t)),r=_E(t,e.element),Ki(e.element,SE(t),r))},grow:function(e,t,n){n.isExpanded()||ME(e,t,n)},shrink:function(e,t,n){n.isExpanded()&&AE(e,t,n)},immediateShrink:function(e,t,n){n.isExpanded()&&zE(e,t,n,S.none())},hasGrown:function(e,t,n){return n.isExpanded()},hasShrunk:function(e,t,n){return n.isCollapsed()},isGrowing:RE,isShrinking:NE,isTransitioning:function(e,t,n){return RE(e,t)||NE(e,t)},toggleGrow:function(e,t,n){(n.isExpanded()?AE:ME)(e,t,n)},disableTransitions:OE}),PE=Object.freeze({__proto__:null,exhibit:function(e,t,n){var r=t.expanded;return Si(r?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:Qe(t.dimension.property,"0px")})},events:function(e,t){return eo([so(yr(),(function(n,r){r.event.raw.propertyName===e.dimension.property&&(OE(n,e),t.isExpanded()&&na(n.element,e.dimension.property),(t.isExpanded()?e.onGrown:e.onShrunk)(n))}))])}}),HE=[jt("closedClass"),jt("openClass"),jt("shrinkingClass"),jt("growingClass"),Yt("getAnimationRoot"),hu("onShrunk"),hu("onStartShrink"),hu("onGrown"),hu("onStartGrow"),nn("expanded",!1),Ut("dimension",Mt("property",{width:[yu("property","width"),yu("getDimension",(function(e){return Ea(e)+"px"}))],height:[yu("property","height"),yu("getDimension",(function(e){return ya(e)+"px"}))]}))],IE=cc({fields:HE,name:"sliding",active:PE,apis:BE,state:Object.freeze({__proto__:null,init:function(e){var t=mn(e.expanded);return Ci({isExpanded:function(){return!0===t.get()},isCollapsed:function(){return!1===t.get()},setCollapsed:a(t.set,!1),setExpanded:a(t.set,!0),readState:function(){return"expanded: "+t.get()}})}})}),LE=o([mu(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),hu("onOpened"),hu("onClosed")].concat(cE())),VE=o([xf({factory:tE,schema:ZO(),name:"primary"}),xf({factory:tE,schema:ZO(),name:"overflow",overrides:function(e){return{toolbarBehaviours:ac([IE.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:function(t){Nf(t,e,"overflow-button").each((function(e){Dg.off(e),bg.focus(e)})),e.onClosed(t)},onGrown:function(t){ug.focusIn(t),e.onOpened(t)},onStartGrow:function(t){Nf(t,e,"overflow-button").each(Dg.on)}}),ug.config({mode:"acyclic",onEscape:function(t){return Nf(t,e,"overflow-button").each(bg.focus),S.some(!0)}})])}}}),wf({name:"overflow-button",overrides:function(e){return{buttonBehaviours:ac([Dg.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),wf({name:"overflow-group"})]),FE=function(e,t){Nf(e,t,"overflow-button").bind((function(){return Nf(e,t,"overflow")})).each((function(n){jE(e,t),IE.toggleGrow(n)}))},jE=function(e,t){Nf(e,t,"overflow").each((function(n){uE(e,t,(function(e){var t=$(e,(function(e){return pa(e)}));tE.setGroups(n,t)})),Nf(e,t,"overflow-button").each((function(e){IE.hasGrown(n)&&Dg.on(e)})),IE.refresh(n)}))},UE=Kf({name:"SplitSlidingToolbar",configFields:LE(),partFields:VE(),factory:function(e,t,n,r){var o="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:ql(e.splitToolbarBehaviours,[Ix.config({others:{overflowGroup:function(e){return yE.sketch(d(d({},r["overflow-group"]()),{items:[gh.sketch(d(d({},r["overflow-button"]()),{action:function(t){Xr(e,o)}}))]}))}}}),mg("toolbar-toggle-events",[ro(o,(function(t){FE(t,e)}))])]),apis:{setGroups:function(t,n){var r;r=$(n,t.getSystem().build),e.builtGroups.set(r),jE(t,e)},refresh:function(t){return jE(t,e)},toggle:function(t){return FE(t,e)},isOpen:function(t){return Nf(t,e,"overflow").map(IE.hasGrown).getOr(!1)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(e,t,n){e.setGroups(t,n)},refresh:function(e,t){e.refresh(t)},toggle:function(e,t){e.toggle(t)},isOpen:function(e,t){return e.isOpen(t)}}}),$E=o(ii("toolbar-height-change")),WE=function(e){var t=e.title.fold((function(){return{}}),(function(e){return{attributes:{title:e}}}));return{dom:d({tag:"div",classes:["tox-toolbar__group"]},t),components:[yE.parts.items({})],items:e.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ac([Ky.config({}),bg.config({})])}},qE=function(e){return yE.sketch(WE(e))},GE=function(e,t){var n=lo((function(t){var n=$(e.initGroups,qE);tE.setGroups(t,n)}));return ac([Xv(e.providers.isDisabled),$v(),ug.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),mg("toolbar-events",[n])])},XE=function(e){var t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":WE({title:S.none(),items:[]}),"overflow-button":GS({name:"more",icon:S.some("more-drawer"),disabled:!1,tooltip:S.some("More..."),primary:!1,borderless:!1},S.none(),e.providers)},splitToolbarBehaviours:GE(e,t)}},KE=function(e){var t=XE(e),n=CE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return CE.sketch(d(d({},t),{lazySink:e.getSink,getOverflowBounds:function(){var t=e.moreDrawerData.lazyHeader().element,n=Fa(t),r=ko(t),o=Fa(r),i=Math.max(r.dom.scrollHeight,o.height);return La(n.x+4,o.y,n.width-8,i)},parts:d(d({},t.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:e.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},YE=function(e){var t=UE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=UE.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=XE(e);return UE.sketch(d(d({},r),{components:[t,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(e){e.getSystem().broadcastOn([$E()],{type:"opened"})},onClosed:function(e){e.getSystem().broadcastOn([$E()],{type:"closed"})}}))},JE=function(e){var t=e.cyclicKeying?"cyclic":"acyclic";return tE.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===ip.scrolling?["tox-toolbar--scrolling"]:[])},components:[tE.parts.groups({})],toolbarBehaviours:GE(e,t)})},QE=dt([$t("type"),Ut("items",gt([kt([$t("name"),Kt("items",Pt)]),Pt]))].concat($h)),ZE=[Zt("text"),Zt("tooltip"),Zt("icon"),qt("fetch"),sn("onSetup",(function(){return n}))],eT=dt(g([$t("type")],ZE)),tT=function(e){return Et("menubutton",eT,e)},nT=dt([$t("type"),Zt("tooltip"),Zt("icon"),Zt("text"),en("select"),qt("fetch"),sn("onSetup",(function(){return n})),un("presets","normal",["normal","color","listpreview"]),nn("columns",1),qt("onAction"),qt("onItemAction")]),rT=Object.freeze({__proto__:null,events:function(e,t){var n=function(n,r){e.updateState.each((function(e){var o=e(n,r);t.set(o)})),e.renderComponents.each((function(e){var o=e(r,t.get()),i=$(o,n.getSystem().build);il(n,i)}))};return eo([ro(Or(),(function(t,r){var o,i=r;i.universal||(o=e.channel,V(i.channels,o)&&n(t,i.data))})),lo((function(t,r){e.initialData.each((function(e){n(t,e)}))}))])}}),oT=Object.freeze({__proto__:null,getState:function(e,t,n){return n}}),iT=[jt("channel"),Yt("renderComponents"),Yt("updateState"),Yt("initialData")],aT=cc({fields:iT,name:"reflecting",active:rT,apis:oT,state:Object.freeze({__proto__:null,init:function(){var e=mn(S.none());return{readState:function(){return e.get().fold((function(){return"none"}),(function(e){return e}))},get:function(){return e.get()},set:function(t){return e.set(t)},clear:function(){return e.set(S.none())}}}})}),uT=o([jt("toggleClass"),jt("fetch"),vu("onExecute"),nn("getHotspot",S.some),nn("getAnchorOverrides",o({})),Yc(),vu("onItemExecute"),Yt("lazySink"),jt("dom"),hu("onOpen"),$l("splitDropdownBehaviours",[Ix,ug,bg]),nn("matchWidth",!1),nn("useMinWidth",!1),nn("eventOrder",{}),Yt("role")].concat(nw())),cT=xf({factory:gh,schema:[jt("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:ac([bg.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(e.uid).each(Yr)},buttonBehaviours:ac([Dg.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])}}}),sT=xf({factory:gh,schema:[jt("dom")],name:"button",defaults:function(){return{buttonBehaviours:ac([bg.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(e.uid).each((function(n){e.onExecute(n,t)}))}}}}),lT=o([cT,sT,Cf({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}}}},schema:[jt("text")],name:"aria-descriptor"}),wf({schema:[du()],name:"menu",defaults:function(e){return{onExecute:function(t,n){t.getSystem().getByUid(e.uid).each((function(r){e.onItemExecute(r,t,n)}))}}}}),Vx()]),fT=Kf({name:"SplitDropdown",configFields:uT(),partFields:lT(),factory:function(e,t,r,o){var i,a=function(e){td.getCurrent(e).each((function(e){dd.highlightFirst(e),ug.focusIn(e)}))},u=function(t){Yx(e,(function(e){return e}),t,o,a,vx.HighlightFirst).get(n)},c=function(t){var n=Bf(t,e,"button");return Yr(n),S.some(!0)},s=d(d({},eo([lo((function(t,n){Nf(t,e,"aria-descriptor").each((function(e){var n=ii("aria");Ko(e.element,"id",n),Ko(t.element,"aria-describedby",n)}))}))])),Mg(S.some(u))),l={repositionMenus:function(e){Dg.isOn(e)&&tw(e)}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:d(d({},e.eventOrder),((i={})[Er()]=["disabling","toggling","alloy.base.behaviour"],i)),events:s,behaviours:ql(e.splitDropdownBehaviours,[Ix.config({others:{sandbox:function(t){var n=Bf(t,e,"arrow");return ew(e,t,{onOpen:function(){Dg.on(n),Dg.on(t)},onClose:function(){Dg.off(n),Dg.off(t)}})}}}),ug.config({mode:"special",onSpace:c,onEnter:c,onDown:function(e){return u(e),S.some(!0)}}),bg.config({}),Dg.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(e,t){return e.repositionMenus(t)}}}),dT=function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},mT=function(e){return{setActive:function(t){Dg.set(e,t)},isActive:function(){return Dg.isOn(e)},isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)}}},gT=function(e,t){return e.map((function(e){return{"aria-label":t.translate(e),title:t.translate(e)}})).getOr({})},hT=ii("focus-button"),pT=["checklist","ordered-list"],vT=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],bT=function(e,t,n,r,o,i){var a,u=function(e){return tv.isRtl()&&V(pT,e)?e+"-rtl":e},c=tv.isRtl()&&e.exists((function(e){return V(vT,e)}));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:gT(n,i)},components:Zv([e.map((function(e){return zS(u(e),i.icons)})),t.map((function(e){return AS(e,"tox-tbtn",i)}))]),eventOrder:((a={})[ur()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:ac([Xv(i.isDisabled),$v(),mg("common-button-display-events",[ro(ur(),(function(e,t){t.event.prevent(),Xr(e,hT)}))])].concat(r.map((function(n){return aT.config({channel:n,initialData:{icon:e,text:t},renderComponents:function(e,t){return Zv([e.icon.map((function(e){return zS(u(e),i.icons)})),e.text.map((function(e){return AS(e,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},yT=function(e,t,r){var o,i=mn(n),a=bT(e.icon,e.text,e.tooltip,S.none(),S.none(),r);return gh.sketch({dom:a.dom,components:a.components,eventOrder:RS,buttonBehaviours:ac([mg("toolbar-button-events",[(o={onAction:e.onAction,getApi:t.getApi},go((function(e,t){Kv(o,e)((function(t){Kr(e,MS,{buttonApi:t}),o.onAction(t)}))}))),Yv(t,i),Jv(t,i)]),Xv((function(){return e.disabled||r.isDisabled()})),$v()].concat(t.toolbarButtonBehaviours))})},xT=function(e,t,n){return yT(e,{toolbarButtonBehaviours:[].concat(0<n.length?[mg("toolbarButtonWith",n)]:[]),getApi:dT,onSetup:e.onSetup},t)},wT=function(e,t,n){return Fe(yT(e,{toolbarButtonBehaviours:[dg.config({}),Dg.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<n.length?[mg("toolbarToggleButtonWith",n)]:[]),getApi:mT,onSetup:e.onSetup},t))},CT=function(e,t){var r,o,i,a,u=ii("channel-update-split-dropdown-display"),c=function(e){return{isDisabled:function(){return hv.isDisabled(e)},setDisabled:function(t){return hv.set(e,t)},setIconFill:function(t,n){Ya(e.element,'svg path[id="'+t+'"], rect[id="'+t+'"]').each((function(e){Ko(e,"fill",n)}))},setIconStroke:function(t,n){Ya(e.element,'svg path[id="'+t+'"], rect[id="'+t+'"]').each((function(e){Ko(e,"stroke",n)}))},setActive:function(t){Ko(e.element,"aria-pressed",t),Ya(e.element,"span").each((function(n){e.getSystem().getByDom(n).each((function(e){return Dg.set(e,t)}))}))},isActive:function(){return Ya(e.element,"span").exists((function(t){return e.getSystem().getByDom(t).exists(Dg.isOn)}))}}},l=mn(n),f={getApi:c,onSetup:e.onSetup};return fT.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:d({"aria-pressed":!1},gT(e.tooltip,t.providers))},onExecute:function(t){e.onAction(c(t))},onItemExecute:function(e,t,n){},splitDropdownBehaviours:ac([Gv(t.providers.isDisabled),$v(),mg("split-dropdown-events",[ro(hT,bg.focus),Yv(f,l),Jv(f,l)]),aw.config({})]),eventOrder:((r={})[Ir()]=["alloy.base.behaviour","split-dropdown-events"],r),toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:(o=c,i=e,a=t.providers,function(e){return Sx((function(e){return i.fetch(e)})).map((function(t){return S.from(wy(Fe(ey(ii("menu-value"),t,(function(t){i.onItemAction(o(e),t)}),i.columns,i.presets,up.CLOSE_ON_EXECUTE,i.select.getOr(s),a),{movement:ny(i.columns,i.presets),menuBehaviours:Wp("auto"!==i.columns?[]:[lo((function(e,t){Up(e,4,bp(i.presets)).each((function(t){var n=t.numRows,r=t.numColumns;ug.setGridSize(e,n,r)}))}))])})))}))}),parts:{menu:Cp(0,e.columns,e.presets)},components:[fT.parts.button(bT(e.icon,e.text,S.none(),S.some(u),S.some([Dg.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),fT.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:vh("chevron-down",t.providers.icons)},buttonBehaviours:ac([Gv(t.providers.isDisabled),$v()])}),fT.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})},kT=function(e,t){return ro(MS,(function(n,r){var o,i=e.get(n),a=(o=i,{hide:function(){return Xr(o,Ar())},getValue:function(){return Ul.getValue(o)}});t.onAction(a,r.event.buttonApi)}))},ST=function(e,t,r){var o,i,a,u,c,s,l,f,g,h,p,v,b={backstage:{shared:{providers:r}}};return"contextformtogglebutton"===t.type?(l=e,g=b,(h=(f=t).original).primary,p=m(h,["primary"]),v=Tt(Kh(d(d({},p),{type:"togglebutton",onAction:n}))),wT(v,g.backstage.shared.providers,[kT(l,f)])):(o=e,a=b,(u=(i=t).original).primary,c=m(u,["primary"]),s=Tt(qh(d(d({},c),{type:"button",onAction:n}))),xT(s,a.backstage.shared.providers,[kT(o,i)]))},_T=function(e,t){var n,r,o,i,a=e.label.fold((function(){return{}}),(function(e){return{"aria-label":e}})),c=hh(gx.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:a,selectOnFocus:!0,inputBehaviours:ac([ug.config({mode:"special",onEnter:function(e){return s.findPrimary(e).map((function(e){return Yr(e),!0}))},onLeft:function(e,t){return t.cut(),S.none()},onRight:function(e,t){return t.cut(),S.none()}})])})),s=(n=c,r=e.commands,o=t,i=$(r,(function(e){return hh(ST(n,e,o))})),{asSpecs:function(){return $(i,(function(e){return e.asSpec()}))},findPrimary:function(e){return ce(r,(function(t,n){return t.primary?S.from(i[n]).bind((function(t){return t.getOpt(e)})).filter(u(hv.isDisabled)):S.none()}))}});return[{title:S.none(),items:[c.asSpec()]},{title:S.none(),items:s.asSpecs()}]},OT=_T,ET=function(e,t){var n,r,o,i,a,u=Ba(window),c=Va(hn.fromDom(e.getContentAreaContainer())),s=kv(e)||Sv(e)||Ov(e),l=(n=c,r=u,o=Math.max(r.x,n.x),i=n.right-o,a=r.width-(o-r.x),{x:o,width:Math.min(i,a)}),f=l.x,d=l.width;if(e.inline&&!s)return La(f,u.y,d,u.height);var m=function(e,t,n,r){var o=hn.fromDom(e.getContainer()),i=Ya(o,".tox-editor-header").getOr(o),a=Va(i),u=a.y>=t.bottom,c=r&&!u;if(e.inline&&c)return{y:Math.max(a.bottom,n.y),bottom:n.bottom};if(e.inline&&!c)return{y:n.y,bottom:Math.min(a.y,n.bottom)};var s=Va(o);return c?{y:Math.max(a.bottom,n.y),bottom:Math.min(s.bottom,n.bottom)}:{y:Math.max(s.y,n.y),bottom:Math.min(a.y,n.bottom)}}(e,c,u,t.header.isPositionedAtTop()),g=m.y,h=m.bottom;return La(f,g,d,h-g)},TT=function(e,t){var n=G(t,(function(t){return t.predicate(e.dom)})),r=q(n,(function(e){return"contexttoolbar"===e.type}));return{contextToolbars:r.pass,contextForms:r.fail}},zT=function(e,t,n){var r=TT(e,t);if(0<r.contextForms.length)return S.some({elem:e,toolbars:[r.contextForms[0]]});var o=TT(e,n);if(0<o.contextForms.length)return S.some({elem:e,toolbars:[o.contextForms[0]]});if(0<r.contextToolbars.length||0<o.contextToolbars.length){var i=function(e){if(e.length<=1)return e;var t=function(t){return F(e,(function(e){return e.position===t}))},n=function(t){return G(e,(function(e){return e.position===t}))},r=t("selection"),o=t("node");if(r||o){if(o&&r){var i=n("node"),a=$(n("selection"),(function(e){return d(d({},e),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")}(r.contextToolbars.concat(o.contextToolbars));return S.some({elem:e,toolbars:i})}return S.none()},DT=function(e,t,n){return e(t)?S.none():Jn(t,(function(e){var t=TT(e,n.inNodeScope),r=t.contextToolbars,o=t.contextForms,i=0<o.length?o:function(e){if(e.length<=1)return e;var t=function(t){return Y(e,(function(e){return e.position===t}))};return t("selection").orThunk((function(){return t("node")})).orThunk((function(){return t("line")})).map((function(e){return e.position})).fold((function(){return[]}),(function(t){return G(e,(function(e){return e.position===t}))}))}(r);return 0<i.length?S.some({elem:e,toolbars:i}):S.none()}),e)},AT=function(e,t){var n={},r=[],o=[],i={},a={},u=function(e,u){var c=Tt(Et("ContextForm",np,u));(n[e]=c).launch.map((function(n){i["form:"+e]=d(d({},u.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){t(c)}})})),"editor"===c.scope?o.push(c):r.push(c),a[e]=c},c=function(e,t){Et("ContextToolbar",rp,t).each((function(n){"editor"===t.scope?o.push(n):r.push(n),a[e]=n}))},s=Oe(e);return W(s,(function(t){var n=e[t];"contextform"===n.type?u(t,n):"contexttoolbar"===n.type&&c(t,n)})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}},MT=ii("forward-slide"),RT=ii("backward-slide"),NT=ii("change-slide-event"),BT="tox-pop--resizing",PT=function(e,t,n){var r,o,i,a,u,c=n.dataset,s="basic"===c.type?function(){return $(c.data,(function(e){return xO(e,n.isSelectedFor,n.getPreviewFor)}))}:c.getData;return{items:(r=t,o=n,i=function(e,t,n,i){var u=r.shared.providers.translate(e.title);if("separator"===e.type)return S.some({type:"separator",text:u});if("submenu"!==e.type)return S.some(d({type:"togglemenuitem",text:u,icon:e.icon,active:e.isSelected(i),disabled:n,onAction:o.onAction(e)},e.getStylePreview().fold((function(){return{}}),(function(e){return{meta:{style:e}}}))));var c=Z(e.getStyleItems(),(function(e){return a(e,t,i)}));return 0===t&&c.length<=0?S.none():S.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return Z(e.getStyleItems(),(function(e){return a(e,t,i)}))}})},a=function(e,t,n){var r="formatter"===e.type&&o.isInvalid(e);return 0===t?r?[]:i(e,t,!1,n).toArray():i(e,t,r,n).toArray()},{validateItems:u=function(e){var t=o.getCurrentValue(),n=o.shouldHide?0:1;return Z(e,(function(e){return a(e,n,t)}))},getFetch:function(e,t){return function(n,r){var o=t(),i=u(o);r(jS(i,up.CLOSE_ON_EXECUTE,e,!1))}}}),getStyleItems:s}},HT=function(e,t,r){var o=PT(0,t,r),i=o.items,a=o.getStyleItems;return PS({text:r.icon.isSome()?S.none():S.some(""),icon:r.icon,tooltip:S.from(r.tooltip),role:S.none(),fetch:i.getFetch(t,a),onSetup:function(t){return r.setInitialValue.each((function(e){return e(t.getComponent())})),r.nodeChangeHandler.map((function(n){var r=n(t.getComponent());return e.on("NodeChange",r),function(){e.off("NodeChange",r)}})).getOr(n)},getApi:function(e){return{getComponent:function(){return e}}},columns:1,presets:"normal",classes:r.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};(k_=C_=C_||{})[k_.SemiColon=0]="SemiColon",k_[k_.Space=1]="Space";var IT,LT,VT,FT,jT,UT,$T=function(e,t,n,r){var o,i,a=e.getParam(t,n,"string");return{type:"basic",data:(i=a,o=r===C_.SemiColon?i.replace(/;$/,"").split(";"):i.split(" "),$(o,(function(e){var t=e,n=e,r=e.split("=");return 1<r.length&&(t=r[0],n=r[1]),{title:t,format:n}})))}},WT=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],qT=function(e){var t=function(t){var n=Y(WT,(function(t){return e.formatter.match(t.format)})).fold((function(){return"left"}),(function(e){return e.title.toLowerCase()}));Kr(t,BS,{icon:"align-"+n})},n=S.some((function(e){return function(){return t(e)}})),r=S.some(t),o={type:"basic",data:WT};return{tooltip:"Align",icon:S.some("align-left"),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:S.none,getPreviewFor:function(e){return function(){return S.none()}},onAction:function(t){return function(){return Y(WT,(function(e){return e.format===t.format})).each((function(t){return e.execCommand(t.command)}))}},setInitialValue:r,nodeChangeHandler:n,dataset:o,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},GT=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],XT=function(e){var t=e.split(/\s*,\s*/);return $(t,(function(e){return e.replace(/^['"]+|['"]+$/g,"")}))},KT=function(e){var t;return 0===e.indexOf("-apple-system")&&(t=XT(e.toLowerCase()),ee(GT,(function(e){return-1<t.indexOf(e.toLowerCase())})))},YT=function(e){var t=function(){var t=function(e){return e?XT(e)[0]:""},n=e.queryCommandValue("FontName"),r=i.data,o=n?n.toLowerCase():"";return{matchOpt:Y(r,(function(e){var n=e.format;return n.toLowerCase()===o||t(n).toLowerCase()===t(o).toLowerCase()})).orThunk((function(){return KT(o)?S.from({title:"System Font",format:o}):S.none()})),font:n}},n=function(e){var n=t(),r=n.matchOpt,o=n.font,i=r.fold((function(){return o}),(function(e){return e.title}));Kr(e,NS,{text:i})},r=S.some((function(e){return function(){return n(e)}})),o=S.some(n),i=$T(e,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",C_.SemiColon);return{tooltip:"Fonts",icon:S.none(),isSelectedFor:function(e){return function(t){return t.exists((function(t){return t.format===e}))}},getCurrentValue:function(){return t().matchOpt},getPreviewFor:function(e){return function(){return S.some({tag:"div",styles:-1===e.indexOf("dings")?{"font-family":e}:{}})}},onAction:function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("FontName",!1,t.format)}))}},setInitialValue:o,nodeChangeHandler:r,dataset:i,shouldHide:!1,isInvalid:s}},JT={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},QT={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},ZT=function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):Be(QT,e).getOr(e);var n,r,o},ez=function(e){var t=function(){var t=S.none(),n=u.data,r=e.queryCommandValue("FontSize");if(r)for(var o=function(e){var o=ZT(r,e),i=Be(JT,o).getOr("");t=Y(n,(function(e){return e.format===r||e.format===o||e.format===i}))},i=3;t.isNone()&&0<=i;i--)o(i);return{matchOpt:t,size:r}},n=o(S.none),r=function(e){var n=t(),r=n.matchOpt,o=n.size,i=r.fold((function(){return o}),(function(e){return e.title}));Kr(e,NS,{text:i})},i=S.some((function(e){return function(){return r(e)}})),a=S.some(r),u=$T(e,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",C_.Space);return{tooltip:"Font sizes",icon:S.none(),isSelectedFor:function(e){return function(t){return t.exists((function(t){return t.format===e}))}},getPreviewFor:n,getCurrentValue:function(){return t().matchOpt},onAction:function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("FontSize",!1,t.format)}))}},setInitialValue:a,nodeChangeHandler:i,dataset:u,shouldHide:!1,isInvalid:s}},tz=function(e,t){var n=t(),r=$(n,(function(e){return e.format}));return S.from(e.formatter.closest(r)).bind((function(e){return Y(n,(function(t){return t.format===e}))})).orThunk((function(){return Jf(e.formatter.match("p"),{title:"Paragraph",format:"p"})}))},nz=function(e){var t=mn(S.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(S.none())},isSet:function(){return t.get().isSome()},set:function(e){n(),t.set(S.some(e))}}},rz=function(){return nz((function(e){return e.destroy()}))},oz=function(){return nz((function(e){return e.unbind()}))},iz=function(e,t){return function(n){var r=oz(),o=function(){n.setActive(e.formatter.match(t));var o=e.formatter.formatChanged(t,n.setActive);r.set(o)};return e.initialized?o():e.on("init",o),r.clear}},az=function(e){return function(t){return function(){e.undoManager.transact((function(){e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))}}},uz=function(e){var t=function(t){var n=tz(e,(function(){return o.data})).fold((function(){return"Paragraph"}),(function(e){return e.title}));Kr(t,NS,{text:n})},n=S.some((function(e){return function(){return t(e)}})),r=S.some(t),o=$T(e,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",C_.SemiColon);return{tooltip:"Blocks",icon:S.none(),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:S.none,getPreviewFor:function(t){return function(){var n=e.formatter.get(t);return S.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))})}},onAction:az(e),setInitialValue:r,nodeChangeHandler:n,dataset:o,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},cz=function(e,t){var n=function(t){var n=function e(t){var n=t.items;return void 0!==n&&0<n.length?Z(n,e):[{title:t.title,format:t.format}]},r=Z(yO(e),n),o=tz(e,(function(){return r})).fold((function(){return"Paragraph"}),(function(e){return e.title}));Kr(t,NS,{text:o})},r=S.some((function(e){return function(){return n(e)}})),o=S.some(n);return{tooltip:"Formats",icon:S.none(),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:S.none,getPreviewFor:function(t){return function(){var n=e.formatter.get(t);return void 0!==n?S.some({tag:0<n.length&&(n[0].inline||n[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):S.none()}},onAction:az(e),setInitialValue:o,nodeChangeHandler:r,shouldHide:e.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(t){return!e.formatter.canApply(t.format)},dataset:t}},sz=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],lz=function(e,t){return function(n,r,o){var i=e(n).mapError((function(e){return Dt(e)})).getOrDie();return t(i,r,o)}},fz={button:lz(qh,(function(e,t){return n=e,r=t.backstage.shared.providers,xT(n,r,[]);var n,r})),togglebutton:lz(Kh,(function(e,t){return n=e,r=t.backstage.shared.providers,wT(n,r,[]);var n,r})),menubutton:lz(tT,(function(e,t){return $S(e,"tox-tbtn",t.backstage,S.none())})),splitbutton:lz((function(e){return Et("SplitButton",nT,e)}),(function(e,t){return CT(e,t.backstage.shared)})),grouptoolbarbutton:lz((function(e){return Et("GroupToolbarButton",QE,e)}),(function(e,t,n){var r,o,i,a,u,c,s=n.ui.registry.getAll().buttons,l=((r={})[Xc]=t.backstage.shared.header.isPositionedAtTop()?nu.TopToBottom:nu.BottomToTop,r);switch(zv(n)){case ip.floating:return o=e,i=t.backstage,a=function(e){return hz(n,{buttons:s,toolbar:e,allowToolbarGroups:!1},t,S.none())},u=l,c=i.shared,pE.sketch({lazySink:c.getSink,fetch:function(){return Sx((function(e){e($(a(o.items),qE))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:bT(o.icon,o.text,o.tooltip,S.none(),S.none(),c.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:u}}}});default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(e,t){return n=e,r=t.backstage,o=d({type:"advanced"},r.styleselect),HT(n,r,cz(n,o));var n,r,o},fontsizeSelectButton:function(e,t){return n=e,r=t.backstage,HT(n,r,ez(n));var n,r},fontSelectButton:function(e,t){return n=e,r=t.backstage,HT(n,r,YT(n));var n,r},formatButton:function(e,t){return n=e,r=t.backstage,HT(n,r,uz(n));var n,r},alignMenuButton:function(e,t){return n=e,r=t.backstage,HT(n,r,qT(n));var n,r}},dz={styleselect:fz.styleSelectButton,fontsizeselect:fz.fontsizeSelectButton,fontselect:fz.fontSelectButton,formatselect:fz.formatButton,align:fz.alignMenuButton},mz=function(e){var t,n,r,o=e.toolbar,i=e.buttons;return!1===o?[]:void 0===o||!0===o?(n=i,r=$(sz,(function(e){var t=G(e.items,(function(e){return Pe(n,e)||Pe(dz,e)}));return{name:e.name,items:t}})),G(r,(function(e){return 0<e.items.length}))):E(o)?(t=o.split("|"),$(t,(function(e){return{items:e.trim().split(" ")}}))):B(o,(function(e){return Pe(e,"name")&&Pe(e,"items")}))?o:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},gz=function(e,t,n,r,o,i){return Be(t,n.toLowerCase()).orThunk((function(){return i.bind((function(e){return ce(e,(function(e){return Be(t,e+n.toLowerCase())}))}))})).fold((function(){return Be(dz,n.toLowerCase()).map((function(t){return t(e,o)})).orThunk((function(){return S.none()}))}),(function(t){return"grouptoolbarbutton"!==t.type||r?(a=o,u=e,Be(fz,(i=t).type).fold((function(){return console.error("skipping button defined by",i),S.none()}),(function(e){return S.some(e(i,a,u))}))):(console.warn("Ignoring the '"+n+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),S.none());var i,a,u}))},hz=function(e,t,n,r){var o=mz(t),i=$(o,(function(o){var i=Z(o.items,(function(o){return 0===o.trim().length?[]:gz(e,t.buttons,o,t.allowToolbarGroups,n,r).toArray()}));return{title:S.from(e.translate(o.name)),items:i}}));return G(i,(function(e){return 0<e.items.length}))},pz={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},vz={maxHeightFunction:Nc(),maxWidthFunction:JO()},bz={onLtr:function(){return[Uu,$u,Fu,Lu,ju,Vu,fh,dh,sh,uh,lh,ch]},onRtl:function(){return[Uu,$u,ju,Vu,Fu,Lu,fh,dh,lh,ch,sh,uh]}},yz={onLtr:function(){return[$u,Lu,Vu,Fu,ju,Uu,fh,dh,sh,uh,lh,ch]},onRtl:function(){return[$u,Vu,Lu,ju,Fu,Uu,fh,dh,lh,ch,sh,uh]}},xz=function(e,t,r,o){var i,a,u=$n().deviceType.isTouch,c=ha((i={sink:r,onEscape:function(){return e.focus(),S.some(!0)}},a=mn([]),th.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(e){a.set([]),th.getContent(e).each((function(e){na(e.element,"visibility")})),Li(e.element,BT),na(e.element,"width")},inlineBehaviours:ac([mg("context-toolbar-events",[so(yr(),(function(e,t){Li(e.element,BT),na(e.element,"width")})),ro(NT,(function(e,t){var n=e.element;na(n,"width");var r=Ea(n);th.setContent(e,t.event.contents),Hi(n,BT);var o=Ea(n);Ki(n,"width",r+"px"),th.getContent(e).each((function(e){t.event.focus.bind((function(e){return gc(e),pc(n)})).orThunk((function(){return ug.focusIn(e),hc(Ro(n))}))})),mh.setTimeout((function(){Ki(e.element,"width",o+"px")}),0)})),ro(MT,(function(e,t){th.getContent(e).each((function(t){a.set(a.get().concat([{bar:t,focus:hc(Ro(e.element))}]))})),Kr(e,NT,{contents:t.event.forwardContents,focus:S.none()})})),ro(RT,(function(e,t){ae(a.get()).each((function(t){a.set(a.get().slice(0,a.get().length-1)),Kr(e,NT,{contents:pa(t.bar),focus:t.focus})}))}))]),ug.config({mode:"special",onEscape:function(e){return ae(a.get()).fold((function(){return i.onEscape()}),(function(t){return Xr(e,RT),S.some(!0)}))}})]),lazySink:function(){return fe.value(i.sink)}}))),s=function(){return ET(e,o.backstage.shared)},l=function(){if(u()&&o.backstage.isContextMenuOpen())return!0;var t,n,r,i,a,c,l=(t=p.get().filter((function(e){return $i(hn.fromDom(e))})).map((function(e){return e.getBoundingClientRect()})).getOrThunk((function(){return e.selection.getRng().getBoundingClientRect()})),n=e.inline?Ma().top:Fa(hn.fromDom(e.getBody())).y,{y:t.top+n,bottom:t.bottom+n}),f=s();return r=l.y,i=l.bottom,a=f.y,c=f.bottom,!(Math.max(r,a)<=Math.min(i,c))},f=function(){h.set(S.none()),th.hide(c)},m=function(){th.hide(c)},g=function(){h.get().each((function(e){var t=c.element;na(t,"display"),l()?Ki(t,"display","none"):tl.positionWithinBounds(r,e,c,S.some(s()))}))},h=mn(S.none()),p=mn(S.none()),v=mn(null),b=function(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:ac([ug.config({mode:"acyclic"}),mg("pop-dialog-wrap-events",[lo((function(t){e.shortcuts.add("ctrl+F9","focus statusbar",(function(){return ug.focusIn(t)}))})),fo((function(t){e.shortcuts.remove("ctrl+F9")}))])])}},y=Ue((function(){return AT(t,(function(e){var t=x([e]);Kr(c,MT,{forwardContents:b(t)})}))})),x=function(t){var n=e.ui.registry.getAll().buttons,r=y(),i=d(d({},n),r.formNavigators),a=zv(e)===ip.scrolling?ip.scrolling:ip["default"],u=Q($(t,(function(t){return"contexttoolbar"===t.type?hz(e,{buttons:i,toolbar:t.items,allowToolbarGroups:!1},o,S.some(["form:"])):(n=t,r=o.backstage.shared.providers,OT(n,r));var n,r})));return JE({type:a,uid:ii("context-toolbar"),initGroups:u,onEscape:S.none,cyclicKeying:!0,providers:o.backstage.shared.providers})};e.on("contexttoolbar-show",(function(t){var n=y();Be(n.lookupTable,t.toolbarKey).each((function(n){C([n],t.target===e?S.none():S.some(t)),th.getContent(c).each(ug.focusIn)}))}));var w=function(e,t){var n,r,i="node"===e?o.backstage.shared.anchors.node(t):o.backstage.shared.anchors.cursor();return Fe(i,(n=e,r=u(),"line"===n?{bubble:Lc(12,0,pz),layouts:{onLtr:function(){return[Wu]},onRtl:function(){return[qu]}},overrides:vz}:{bubble:Lc(0,12,pz),layouts:r?yz:bz,overrides:vz}))},C=function(e,t){var n,r,i,a;_(),u()&&o.backstage.isContextMenuOpen()||(n=x(e),r=t.map(hn.fromDom),i=w(e[0].position,r),h.set(S.some(i)),p.set(t),a=c.element,na(a,"display"),th.showWithinBounds(c,i,b(n),(function(){return S.some(s())})),l()&&Ki(a,"display","none"))},k=function(){var t,n,r,o,i,a,u;e.hasFocus()&&(t=y(),n=t,r=e,i=hn.fromDom(r.getBody()),a=function(e){return Gn(e,i)},u=hn.fromDom(r.selection.getNode()),(a(o=u)||Kn(i,o)?zT(u,n.inNodeScope,n.inEditorScope).orThunk((function(){return DT(a,u,n)})):S.none()).fold(f,(function(e){C(e.toolbars,S.some(e.elem.dom))})))},_=function(){var e=v.get();null!==e&&(mh.clearTimeout(e),v.set(null))},O=function(){_(),v.set(mh.setEditorTimeout(e,k,0))};e.on("init",(function(){e.on(QO,m),e.on("ScrollContent ScrollWindow longpress",g),e.on("click keyup focus SetContent ObjectResized ResizeEditor",(function(){O()})),e.on("focusout",(function(t){mh.setEditorTimeout(e,(function(){pc(r.element).isNone()&&pc(c.element).isNone()&&f()}),0)})),e.on("SwitchMode",(function(){e.mode.isReadOnly()&&f()})),e.on("AfterProgressState",(function(t){t.state?f():e.hasFocus()&&O()})),e.on("NodeChange",(function(e){pc(c.element).fold(O,n)}))}))},wz=jf,Cz=_f,kz=o([nn("shell",!1),jt("makeItem"),nn("setupItem",n),Gl("listBehaviours",[dg])]),Sz=Cf({name:"items",overrides:function(){return{behaviours:ac([dg.config({})])}}}),_z=o([Sz]),Oz=Kf({name:o("CustomList")(),configFields:kz(),partFields:_z(),factory:function(e,t,n,r){var o=e.shell?{behaviours:[dg.config({})],components:[]}:{behaviours:[],components:t},i=function(t){return e.shell?S.some(t):Nf(t,e,"items")};return{uid:e.uid,dom:e.dom,components:o.components,behaviours:ql(e.listBehaviours,o.behaviours),apis:{setItems:function(t,n){i(t).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=dg.contents(r),i=n.length,a=i-o.length,u=0<a?j(a,(function(){return e.makeItem()})):[],c=o.slice(i);W(c,(function(e){return dg.remove(r,e)})),W(u,(function(e){return dg.append(r,e)}));var s=dg.contents(r);W(s,(function(r,o){e.setupItem(t,r,n[o],o)}))}))}}}},apis:{setItems:function(e,t,n){e.setItems(t,n)}}}),Ez=o([]),Tz=Object.freeze({__proto__:null,setup:n,isDocked:s,getBehaviours:Ez}),zz=function(e){return(ea(e,"position").is("fixed")?S.none():Eo(e)).orThunk((function(){var t=hn.fromTag("span");return _o(e).bind((function(e){Fo(e,t);var n=Eo(t);return $o(t),n}))}))},Dz=function(e){return zz(e).map(Sa).getOrThunk((function(){return Ca(0,0)}))},Az=Ie([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),Mz=function(e,t){var n=e.element;Hi(n,t.transitionClass),Li(n,t.fadeOutClass),Hi(n,t.fadeInClass),t.onShow(e)},Rz=function(e,t){var n=e.element;Hi(n,t.transitionClass),Li(n,t.fadeInClass),Hi(n,t.fadeOutClass),t.onHide(e)},Nz=function(e,t,n){return ee(e,(function(e){switch(e){case"bottom":return o=n,t.bottom<=o.bottom;case"top":return r=n,t.y>=r.y}var r,o}))},Bz=function(e,t){return t.getInitialPosition().map((function(t){return La(t.bounds.x,t.bounds.y,Ea(e),ya(e))}))},Pz=function(e,t,n){n.setInitialPosition(S.some({style:function(e){var t={},n=e.dom;if(Ui(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}(e),position:Qi(e,"position")||"static",bounds:t}))},Hz=function(e,t,n){return n.getInitialPosition().bind((function(r){switch(n.setInitialPosition(S.none()),r.position){case"static":return S.some(Az["static"]());case"absolute":var o=zz(e).map(Va).getOrThunk((function(){return Va(Wi())}));return S.some(Az.absolute(bc("absolute",Be(r.style,"left").map((function(e){return t.x-o.x})),Be(r.style,"top").map((function(e){return t.y-o.y})),Be(r.style,"right").map((function(e){return o.right-t.right})),Be(r.style,"bottom").map((function(e){return o.bottom-t.bottom})))));default:return S.none()}}))},Iz=function(e,t,n){var r,o,i,a=e.element;return ea(a,"position").is("fixed")?(o=t,Bz(r=a,i=n).filter((function(e){return Nz(i.getModes(),e,o)})).bind((function(e){return Hz(r,e,i)}))):function(e,t,n){var r=Va(e);if(Nz(n.getModes(),r,t))return S.none();Pz(e,r,n);var o=ja(),i=r.x-o.x,a=t.y-o.y,u=o.bottom-t.bottom,c=r.y<=t.y;return S.some(Az.fixed(bc("fixed",S.some(i),c?S.some(a):S.none(),S.none(),c?S.none():S.some(u))))}(a,t,n)},Lz=function(e,t){W(["left","right","top","bottom","position"],(function(t){return na(e.element,t)})),t.onUndocked(e)},Vz=function(e,t,n){yc(e.element,n),("fixed"===n.position?t.onDocked:t.onUndocked)(e)},Fz=function(e,t,n,r,o){void 0===o&&(o=!1),t.contextual.each((function(t){t.lazyContext(e).each((function(i){var a,u,c=(u=r,(a=i).y<u.bottom&&a.bottom>u.y);c!==n.isVisible()&&(n.setVisible(c),o&&!c?(Fi(e.element,[t.fadeOutClass]),t.onHide(e)):(c?Mz:Rz)(e,t))}))}))},jz=function(e,t,r){var o,i,a=e.element;r.setDocked(!1),o=r,i=e.element,Bz(i,o).bind((function(e){return Hz(i,e,o)})).each((function(r){r.fold((function(){return Lz(e,t)}),(function(n){return Vz(e,t,n)}),n)})),r.setVisible(!0),t.contextual.each((function(t){ji(a,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(e)})),Uz(e,t,r)},Uz=function(e,t,n){var r,o,i,a,u;e.getSystem().isConnected()&&(r=e,i=n,a=(o=t).lazyViewport(r),(u=i.isDocked())&&Fz(r,o,i,a),Iz(r,a,i).each((function(e){i.setDocked(!u),e.fold((function(){return Lz(r,o)}),(function(e){return Vz(r,o,e)}),(function(e){Fz(r,o,i,a,!0),Vz(r,o,e)}))})))},$z=function(e,t,n){n.isDocked()&&jz(e,t,n)},Wz=Object.freeze({__proto__:null,refresh:Uz,reset:$z,isDocked:function(e,t,n){return n.isDocked()},getModes:function(e,t,n){return n.getModes()},setModes:function(e,t,n,r){return n.setModes(r)}}),qz=Object.freeze({__proto__:null,events:function(e,t){return eo([so(yr(),(function(n,r){e.contextual.each((function(e){Vi(n.element,e.transitionClass)&&(ji(n.element,[e.transitionClass,e.fadeInClass]),(t.isVisible()?e.onShown:e.onHidden)(n)),r.stop()}))})),ro(Pr(),(function(n,r){Uz(n,e,t)})),ro(Hr(),(function(n,r){$z(n,e,t)}))])}}),Gz=[tn("contextual",[$t("fadeInClass"),$t("fadeOutClass"),$t("transitionClass"),qt("lazyContext"),hu("onShow"),hu("onShown"),hu("onHide"),hu("onHidden")]),sn("lazyViewport",ja),ln("modes",["top","bottom"],Pt),hu("onDocked"),hu("onUndocked")],Xz=cc({fields:Gz,name:"docking",active:qz,apis:Wz,state:Object.freeze({__proto__:null,init:function(e){var t=mn(!1),n=mn(!0),r=mn(S.none()),o=mn(e.modes);return Ci({isDocked:t.get,setDocked:t.set,getInitialPosition:r.get,setInitialPosition:r.set,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:function(){return"docked:  "+t.get()+", visible: "+n.get()+", modes: "+o.get().join(",")}})}})}),Kz={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},Yz="tox-tinymce--toolbar-sticky-on",Jz="tox-tinymce--toolbar-sticky-off",Qz=function(e){var t=e.element;_o(t).each((function(n){var r,o,i="padding-"+Xz.getModes(e)[0];Xz.isDocked(e)?(r=Ea(n),Ki(t,"width",r+"px"),Ki(n,i,xa(o=t)+(parseInt(Qi(o,"margin-top"),10)||0)+(parseInt(Qi(o,"margin-bottom"),10)||0)+"px")):(na(t,"width"),na(n,i))}))},Zz=function(e,t){t?(Li(e,Kz.fadeOutClass),Fi(e,[Kz.transitionClass,Kz.fadeInClass])):(Li(e,Kz.fadeInClass),Fi(e,[Kz.fadeOutClass,Kz.transitionClass]))},eD=function(e,t){var n=hn.fromDom(e.getContainer());t?(Hi(n,Yz),Li(n,Jz)):(Hi(n,Jz),Li(n,Yz))},tD=function(e,t){var n,r=mn(S.none()),o=t.getSink,i=function(e){o().each((function(t){return e(t.element)}))},a=function(t){e.inline||Qz(t),eD(e,Xz.isDocked(t)),t.getSystem().broadcastOn([_l()],{}),o().each((function(e){return e.getSystem().broadcastOn([_l()],{})}))},u=e.inline?[]:[dc.config({channels:((n={})[$E()]={onReceive:Qz},n)})];return g([bg.config({}),Xz.config({contextual:d({lazyContext:function(t){var n,r,o=xa(t.element),i=e.inline?e.getContentAreaContainer():e.getContainer(),a=Va(hn.fromDom(i)),u=a.height-o,c=a.y+(n=t,r="top",V(Xz.getModes(n),r)?0:o);return S.some(La(a.x,c,a.width,u))},onShow:function(){i((function(e){return Zz(e,!0)}))},onShown:function(e){i((function(e){return ji(e,[Kz.transitionClass,Kz.fadeInClass])})),r.get().each((function(t){var n,o,i;n=e.element,i=wo(o=t),hc(i).filter((function(e){return!Gn(o,e)})).filter((function(e){return Gn(e,hn.fromDom(i.dom.body))||Kn(n,e)})).each((function(){return gc(o)})),r.set(S.none())}))},onHide:function(e){var t,n;r.set((t=e.element,n=o,pc(t).orThunk((function(){return n().toOptional().bind((function(e){return pc(e.element)}))})))),i((function(e){return Zz(e,!1)}))},onHidden:function(){i((function(e){return ji(e,[Kz.transitionClass])}))}},Kz),modes:[t.header.getDockingMode()],onDocked:a,onUndocked:a})],u)},nD=Object.freeze({__proto__:null,setup:function(e,t,n){e.inline||(t.header.isPositionedAtTop()||e.on("ResizeEditor",(function(){n().each(Xz.reset)})),e.on("ResizeWindow ResizeEditor",(function(){n().each(Qz)})),e.on("SkinLoaded",(function(){n().each((function(e){Xz.isDocked(e)?Xz.reset(e):Xz.refresh(e)}))})),e.on("FullscreenStateChanged",(function(){n().each(Xz.reset)}))),e.on("AfterScrollIntoView",(function(e){n().each((function(t){Xz.refresh(t);var n,r,o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y=t.element;tm(y)&&(n=e,i=wo(r=y),a=i.dom.defaultView.innerHeight,u=Ma(i),c=hn.fromDom(n.elm),s=Fa(c),l=ya(c),f=s.y,d=f+l,m=Sa(r),g=ya(r),h=m.top,p=h+g,v=Math.abs(h-u.top)<2,b=Math.abs(p-(u.top+a))<2,v&&f<p?Ra(u.left,f-g,i):b&&h<d&&(o=f-a+l+g,Ra(u.left,o,i)))}))})),e.on("PostRender",(function(){eD(e,!1)}))},isDocked:function(e){return e().map(Xz.isDocked).getOr(!1)},getBehaviours:tD}),rD=Xf({factory:function(e,t){var n={focus:ug.focusIn,setMenus:function(e,n){var r=$(n,(function(e){var n={type:"menubutton",text:e.text,fetch:function(t){t(e.getItems())}},r=tT(n).mapError((function(e){return Dt(e)})).getOrDie();return $S(r,"tox-mbtn",t.backstage,S.some("menuitem"))}));dg.set(e,r)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:ac([dg.config({}),mg("menubar-events",[lo((function(t){e.onSetup(t)})),ro(fr(),(function(e,t){Ya(e.element,".tox-mbtn--active").each((function(n){Ja(t.event.target,".tox-mbtn").each((function(t){Gn(n,t)||e.getSystem().getByDom(n).each((function(n){e.getSystem().getByDom(t).each((function(e){iw.expand(e),iw.close(n),bg.focus(e)}))}))}))}))})),ro(jr(),(function(e,t){t.event.prevFocus.bind((function(t){return e.getSystem().getByDom(t).toOptional()})).each((function(n){t.event.newFocus.bind((function(t){return e.getSystem().getByDom(t).toOptional()})).each((function(e){iw.isOpen(n)&&(iw.expand(e),iw.close(n))}))}))}))]),ug.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return e.onEscape(t),S.some(!0)}}),Ky.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[jt("dom"),jt("uid"),jt("onEscape"),jt("backstage"),nn("onSetup",n)],apis:{focus:function(e,t){e.focus(t)},setMenus:function(e,t,n){e.setMenus(t,n)}}}),oD="container",iD=[$l("slotBehaviours",[])],aD=function(e){return"<alloy.field."+e+">"},uD=function(e,t){var n,r=function(t){return If(e)},o=function(t,n){return function(r,o){return Nf(r,e,o).map((function(e){return t(e,o)})).getOr(n)}},i=function(e,t){return"true"!==Yo(e.element,"aria-hidden")},a=o(i,!1),u=o((function(e,t){var n;i(e)&&(n=e.element,Ki(n,"display","none"),Ko(n,"aria-hidden","true"),Kr(e,Ur(),{name:t,visible:!1}))})),c=function(e,t){W(t,(function(t){return n(e,t)}))},s=o((function(e,t){var n;i(e)||(n=e.element,na(n,"display"),Zo(n,"aria-hidden"),Kr(e,Ur(),{name:t,visible:!0}))})),l={getSlotNames:r,getSlot:function(t,n){return Nf(t,e,n)},isShowing:a,hideSlot:n=u,hideAllSlots:function(e){return c(e,r())},showSlot:s};return{uid:e.uid,dom:e.dom,components:t,behaviours:Wl(e.slotBehaviours),apis:l}},cD=ze({getSlotNames:function(e,t){return e.getSlotNames(t)},getSlot:function(e,t,n){return e.getSlot(t,n)},isShowing:function(e,t,n){return e.isShowing(t,n)},hideSlot:function(e,t,n){return e.hideSlot(t,n)},hideAllSlots:function(e,t){return e.hideAllSlots(t)},showSlot:function(e,t,n){return e.showSlot(t,n)}},xi),sD=d(d({},cD),{sketch:function(e){var t,n=(t=[],{slot:function(e,n){return t.push(e),zf(oD,aD(e),n)},record:function(){return t}}),r=e(n),o=n.record(),i=$(o,(function(e){return xf({name:e,pname:aD(e)})}));return $f(oD,iD,i,uD,r)}}),lD=dt([Zt("icon"),Zt("tooltip"),sn("onShow",n),sn("onHide",n),sn("onSetup",(function(){return n}))]),fD=function(e){return{element:function(){return e.element.dom}}},dD=function(e,t){var r=$(Oe(t),(function(e){var n=t[e],r=Tt(Et("sidebar",lD,n));return{name:e,getApi:fD,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}}));return $(r,(function(t){var o=mn(n);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Wp([Yv(t,o),Jv(t,o),ro(Ur(),(function(e,t){var n=t.event;Y(r,(function(e){return e.name===n.name})).each((function(t){(n.visible?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))},mD=function(e,t){td.getCurrent(e).each((function(e){return dg.set(e,[(n=t,sD.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:dD(e,n),slotBehaviours:Wp([lo((function(e){return sD.hideAllSlots(e)}))])}})))]);var n}))},gD=function(e){return td.getCurrent(e).bind((function(e){return IE.isGrowing(e)||IE.hasGrown(e)?td.getCurrent(e).bind((function(e){return Y(sD.getSlotNames(e),(function(t){return sD.isShowing(e,t)}))})):S.none()}))},hD=ii("FixSizeEvent"),pD=ii("AutoSizeEvent"),vD=function(e){var t,n,r,o=hn.fromHtml(e),i=To(o),a=(n=void 0!==(t=o).dom.attributes?t.dom.attributes:[],K(n,(function(e,t){var n;return"class"===t.name?e:d(d({},e),((n={})[t.name]=t.value,n))}),{})),u=(r=o,Array.prototype.slice.call(r.dom.classList,0)),c=0===i.length?{}:{innerHtml:qo(o)};return d({tag:ho(o),classes:u,attributes:a},c)},bD=function(e,t,n){var r=e.element;!0===t?(dg.set(e,[{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:vD('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:ac([ug.config({mode:"special",onTab:function(){return S.some(!0)},onShiftTab:function(){return S.some(!0)}}),bg.config({})])}]),na(r,"display"),Zo(r,"aria-hidden")):(dg.set(e,[]),Ki(r,"display","none"),Ko(r,"aria-hidden","true"))},yD=Cz.optional({factory:rD,name:"menubar",schema:[jt("backstage")]}),xD=Cz.optional({factory:{sketch:function(e){return Oz.sketch({uid:e.uid,dom:e.dom,listBehaviours:ac([ug.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return JE({type:e.type,uid:ii("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:e.providers,onEscape:function(){return e.onEscape(),S.some(!0)}})},setupItem:function(e,t,n,r){tE.setGroups(t,n)},shell:!0})}},name:"multiple-toolbar",schema:[jt("dom"),jt("onEscape")]}),wD=Cz.optional({factory:{sketch:function(e){var t;return((t=e).type===ip.sliding?YE:t.type===ip.floating?KE:JE)({type:e.type,uid:e.uid,onEscape:function(){return e.onEscape(),S.some(!0)},cyclicKeying:!1,initGroups:[],getSink:e.getSink,providers:e.providers,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader},attributes:e.attributes})}},name:"toolbar",schema:[jt("dom"),jt("onEscape"),jt("getSink")]}),CD=Cz.optional({factory:{sketch:function(e){var t=e.editor,n=e.sticky?tD:Ez;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:ac(n(t,e.sharedBackstage))}}},name:"header",schema:[jt("dom")]}),kD=Cz.optional({name:"socket",schema:[jt("dom")]}),SD=Cz.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ac([Ky.config({}),bg.config({}),IE.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(e){td.getCurrent(e).each(sD.hideAllSlots),Xr(e,pD)},onGrown:function(e){Xr(e,pD)},onStartGrow:function(e){Kr(e,hD,{width:ea(e.element,"width").getOr("")})},onStartShrink:function(e){Kr(e,hD,{width:Ea(e.element)+"px"})}}),dg.config({}),td.config({find:function(e){var t=dg.contents(e);return ie(t)}})])}],behaviours:ac([sk(0),mg("sidebar-sliding-events",[ro(hD,(function(e,t){Ki(e.element,"width",t.event.width)})),ro(pD,(function(e,t){na(e.element,"width")}))])])}}},name:"sidebar",schema:[jt("dom")]}),_D=Cz.optional({factory:{sketch:function(e){return{uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ac([dg.config({})]),components:[]}}},name:"throbber",schema:[jt("dom")]}),OD=Kf({name:"OuterContainer",factory:function(e,t,n){var r={getSocket:function(t){return wz.getPart(t,e,"socket")},setSidebar:function(t,n){wz.getPart(t,e,"sidebar").each((function(e){return mD(e,n)}))},toggleSidebar:function(t,n){wz.getPart(t,e,"sidebar").each((function(e){return t=e,r=n,void td.getCurrent(t).each((function(e){td.getCurrent(e).each((function(t){IE.hasGrown(e)?sD.isShowing(t,r)?IE.shrink(e):(sD.hideAllSlots(t),sD.showSlot(t,r)):(sD.hideAllSlots(t),sD.showSlot(t,r),IE.grow(e))}))}));var t,r}))},whichSidebar:function(t){return wz.getPart(t,e,"sidebar").bind(gD).getOrNull()},getHeader:function(t){return wz.getPart(t,e,"header")},getToolbar:function(t){return wz.getPart(t,e,"toolbar")},setToolbar:function(t,n){wz.getPart(t,e,"toolbar").each((function(e){e.getApis().setGroups(e,n)}))},setToolbars:function(t,n){wz.getPart(t,e,"multiple-toolbar").each((function(e){Oz.setItems(e,n)}))},refreshToolbar:function(t){wz.getPart(t,e,"toolbar").each((function(e){return e.getApis().refresh(e)}))},toggleToolbarDrawer:function(t){wz.getPart(t,e,"toolbar").each((function(e){var t,n;t=e.getApis().toggle,n=function(t){return t(e)},void 0!==t&&null!==t?S.some(n(t)):S.none()}))},isToolbarDrawerToggled:function(t){return wz.getPart(t,e,"toolbar").bind((function(e){return S.from(e.getApis().isOpen).map((function(t){return t(e)}))})).getOr(!1)},getThrobber:function(t){return wz.getPart(t,e,"throbber")},focusToolbar:function(t){wz.getPart(t,e,"toolbar").orThunk((function(){return wz.getPart(t,e,"multiple-toolbar")})).each((function(e){ug.focusIn(e)}))},setMenubar:function(t,n){wz.getPart(t,e,"menubar").each((function(e){rD.setMenus(e,n)}))},focusMenubar:function(t){wz.getPart(t,e,"menubar").each((function(e){rD.focus(e)}))}};return{uid:e.uid,dom:e.dom,components:t,apis:r,behaviours:e.behaviours}},configFields:[jt("dom"),jt("behaviours")],partFields:[CD,yD,wD,xD,kD,SD,_D],apis:{getSocket:function(e,t){return e.getSocket(t)},setSidebar:function(e,t,n){e.setSidebar(t,n)},toggleSidebar:function(e,t,n){e.toggleSidebar(t,n)},whichSidebar:function(e,t){return e.whichSidebar(t)},getHeader:function(e,t){return e.getHeader(t)},getToolbar:function(e,t){return e.getToolbar(t)},setToolbar:function(e,t,n){var r=$(n,qE);e.setToolbar(t,r)},setToolbars:function(e,t,n){var r=$(n,(function(e){return $(e,qE)}));e.setToolbars(t,r)},refreshToolbar:function(e,t){return e.refreshToolbar(t)},toggleToolbarDrawer:function(e,t){e.toggleToolbarDrawer(t)},isToolbarDrawerToggled:function(e,t){return e.isToolbarDrawerToggled(t)},getThrobber:function(e,t){return e.getThrobber(t)},setMenubar:function(e,t,n){e.setMenubar(t,n)},focusMenubar:function(e,t){e.focusMenubar(t)},focusToolbar:function(e,t){e.focusToolbar(t)}}}),ED={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},TD=function(e){return"string"==typeof e?e.split(" "):e},zD=function(e,t){var n=d(d({},ED),t.menus),r=0<Oe(t.menus).length,o=void 0===t.menubar||!0===t.menubar?TD("file edit view insert format tools table help"):TD(!1===t.menubar?"":t.menubar),i=G(o,(function(e){return r&&t.menus.hasOwnProperty(e)&&t.menus[e].hasOwnProperty("items")||ED.hasOwnProperty(e)})),a=$(i,(function(r){var o,i,a,u=n[r];return o={title:u.title,items:TD(u.items)},i=t,a=e.getParam("removed_menuitems","").split(/[ ,]/),{text:o.title,getItems:function(){return Z(o.items,(function(e){var t=e.toLowerCase();return 0===t.trim().length||F(a,(function(e){return e===t}))?[]:"separator"===t||"|"===t?[{type:"separator"}]:i.menuItems[t]?[i.menuItems[t]]:[]}))}}}));return G(a,(function(e){return 0<e.getItems().length&&F(e.getItems(),(function(e){return"separator"!==e.type}))}))},DD=function(e){var t=function(){e._skinLoaded=!0,e.fire("SkinLoaded")};return function(){e.initialized?t():e.on("init",t)}},AD=function(e,t){return function(){return n={message:t},e.fire("SkinLoadError",n);var n}},MD=function(e,t,n){return new Nh((function(r,o){n.load(t,r,o),e.on("remove",(function(){return n.unload(t)}))}))},RD=function(e,t){var n;return n=hn.fromDom(e.getElement()),Bo(n).isSome()?MD(e,t+"/skin.shadowdom.min.css",ev.DOM.styleSheetLoader):Nh.resolve()},ND=function(e,t){var n,r,o,i,a,u=(o=(n=t).getParam("skin"),i=n.getParam("skin_url"),!1!==o&&(r=o||"oxide",i=i?n.documentBaseURI.toAbsolute(i):pv.baseURL+"/skins/ui/"+r),i);u&&t.contentCSS.push(u+(e?"/content.inline":"/content")+".min.css"),0==(!1===t.getParam("skin"))&&E(u)?Nh.all([MD(a=t,u+"/skin.min.css",a.ui.styleSheetLoader),RD(t,u)]).then(DD(t),AD(t,"Skin could not be loaded")):DD(t)()},BD=a(ND,!1),PD=a(ND,!0),HD=function(e,t,n,r){var o,i=t.outerContainer,a=n.toolbar,u=n.buttons;B(a,E)?(o=a.map((function(t){var o={toolbar:t,buttons:u,allowToolbarGroups:n.allowToolbarGroups};return hz(e,o,{backstage:r},S.none())})),OD.setToolbars(i,o)):OD.setToolbar(i,hz(e,n,{backstage:r},S.none()))},ID=$n(),LD=ID.os.isiOS()&&ID.os.version.major<=12,VD=function(e,t){var n=e.dom,r=e.getWin(),o=e.getDoc().documentElement,i=mn(Ca(r.innerWidth,r.innerHeight)),a=mn(Ca(o.offsetWidth,o.offsetHeight)),u=function(){var t=i.get();t.left===r.innerWidth&&t.top===r.innerHeight||(i.set(Ca(r.innerWidth,r.innerHeight)),Pb(e))},c=function(){var t=e.getDoc().documentElement,n=a.get();n.left===t.offsetWidth&&n.top===t.offsetHeight||(a.set(Ca(t.offsetWidth,t.offsetHeight)),Pb(e))},s=function(t){return n=t,e.fire("ScrollContent",n);var n};n.bind(r,"resize",u),n.bind(r,"scroll",s);var l=_y(hn.fromDom(e.getBody()),"load",c),f=t.uiMothership.element;e.on("hide",(function(){Ki(f,"display","none")})),e.on("show",(function(){na(f,"display")})),e.on("NodeChange",c),e.on("remove",(function(){l.unbind(),n.unbind(r,"resize",u),n.unbind(r,"scroll",s),r=null}))},FD=Object.freeze({__proto__:null,render:function(e,t,n,r,o){var i=mn(0),a=t.outerContainer;BD(e);var u,c,s=hn.fromDom(o.targetNode),l=No(Ro(s));u=s,c=t.mothership,dl(u,c,Lo),fl(l,t.uiMothership),e.on("PostRender",(function(){HD(e,t,n,r),i.set(e.getWin().innerWidth),OD.setMenubar(a,zD(e,n)),OD.setSidebar(a,n.sidebar),VD(e,t)}));var f,d,m,g,h,p=OD.getSocket(a).getOrDie("Could not find expected socket element");LD&&(Yi(p.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"}),m=function(){e.fire("ScrollContent")},g=20,h=null,f={cancel:function(){null!==h&&(clearTimeout(h),h=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===h&&(h=setTimeout((function(){m.apply(null,e),h=null}),g))}},d=Sy(p.element,"scroll",f.throttle),e.on("remove",d.unbind)),Uv(e,t),e.addCommand("ToggleSidebar",(function(t,n){OD.toggleSidebar(a,n),e.fire("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(function(){return OD.whichSidebar(a)}));var v=zv(e);v!==ip.sliding&&v!==ip.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(function(){var n=e.getWin().innerWidth;n!==i.get()&&(OD.refreshToolbar(t.outerContainer),i.set(n))}));var b={enable:function(){jv(t,!1)},disable:function(){jv(t,!0)},isDisabled:function(){return hv.isDisabled(a)}};return{iframeContainer:p.element.dom,editorContainer:a.element.dom,api:b}}}),jD=function(e){return/^[0-9\.]+(|px)$/i.test(""+e)?S.some(parseInt(""+e,10)):S.none()},UD=function(e){return N(e)?e+"px":e},$D=function(e,t,n){var r=t.filter((function(t){return e<t})),o=n.filter((function(t){return t<e}));return r.or(o).getOr(e)},WD=function(e){var t,n,r,o;return(n=vv(t=e),r=xv(t),o=Cv(t),jD(n).map((function(e){return $D(e,r,o)}))).getOr(vv(e))},qD=function(e){var t=bv(e),n=yv(e),r=wv(e);return jD(t).map((function(e){return $D(e,n,r)}))},GD=function(e,t,n,r,o){var i=n.uiMothership,a=n.outerContainer,u=ev.DOM,c=Pv(e),s=Lv(e),l=wv(e).or(qD(e)),f=r.shared.header,d=f.isPositionedAtTop,m=zv(e),g=m===ip.sliding||m===ip.floating,h=mn(!1),p=function(){return h.get()&&!e.removed},v=function(e){return g?e.fold((function(){return 0}),(function(e){return 1<e.components().length?ya(e.components()[1].element):0})):0},b=function(){i.broadcastOn([_l()],{})},y=function(e){var n,r,i,u,f,m;void 0===e&&(e=!1),p()&&(c||(n=l.getOrThunk((function(){var e=jD(Qi(Wi(),"margin-left")).getOr(0);return Ea(Wi())-Sa(t).left+e})),Ki(o.get().element,"max-width",n+"px")),g&&OD.refreshToolbar(a),c||(r=OD.getToolbar(a),i=v(r),u=Va(t),f=d()?Math.max(u.y-ya(o.get().element)+i,0):u.bottom,Yi(a.element,{position:"absolute",top:Math.round(f)+"px",left:Math.round(u.x)+"px"})),s&&(m=o.get(),e?Xz.reset(m):Xz.refresh(m)),b())},x=function(n){var r,i;void 0===n&&(n=!0),!c&&s&&p()&&(r=f.getDockingMode(),(i=function(n){switch(Rv(e)){case Ev.auto:var r=OD.getToolbar(a),o=v(r),i=ya(n.element)-o,u=Va(t);if(u.y>i)return"top";var c=ko(t),s=Math.max(c.dom.scrollHeight,ya(c));return u.bottom<s-i||ja().bottom<u.bottom-i?"bottom":"top";case Ev.bottom:return"bottom";case Ev.top:default:return"top"}}(o.get()))!==r&&(function(e){var t=o.get();Xz.setModes(t,[e]),f.setDockingMode(e);var n=d()?nu.TopToBottom:nu.BottomToTop;Ko(t.element,Xc,n)}(i),n&&y(!0)))};return{isVisible:p,isPositionedAtTop:d,show:function(){h.set(!0),Ki(a.element,"display","flex"),u.addClass(e.getBody(),"mce-edit-focus"),na(i.element,"display"),x(!1),y()},hide:function(){h.set(!1),n.outerContainer&&(Ki(a.element,"display","none"),u.removeClass(e.getBody(),"mce-edit-focus")),Ki(i.element,"display","none")},update:y,updateMode:x,repositionPopups:b}},XD=function(e,t){var n=Va(e);return{pos:t?n.y:n.bottom,bounds:n}},KD=Object.freeze({__proto__:null,render:function(e,t,n,r,o){var i=t.mothership,a=t.uiMothership,u=t.outerContainer,c=mn(null),s=hn.fromDom(o.targetNode),l=GD(e,s,t,r,c),f=e.getParam("toolbar_persist",!1,"boolean");PD(e);var d=function(){var o;c.get()?l.show():(c.set(OD.getHeader(u).getOrDie()),o=Hv(e),fl(o,i),fl(o,a),HD(e,t,n,r),OD.setMenubar(u,zD(e,n)),l.show(),function(e,t,n,r){var o=mn(XD(t,n.isPositionedAtTop())),i=function(r){var i=XD(t,n.isPositionedAtTop()),a=i.pos,u=i.bounds,c=o.get(),s=c.pos,l=c.bounds,f=u.height!==l.height||u.width!==l.width;o.set({pos:a,bounds:u}),f&&Pb(e,r),n.isVisible()&&(s!==a?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))};r||(e.on("activate",n.show),e.on("deactivate",n.hide)),e.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),e.on("NodeChange keydown",(function(e){mh.requestAnimationFrame((function(){return i(e)}))})),e.on("ScrollWindow",(function(){return n.updateMode()}));var a=oz();a.set(_y(hn.fromDom(e.getBody()),"load",i)),e.on("remove",(function(){a.clear()}))}(e,s,l,f),e.nodeChanged())};e.on("show",d),e.on("hide",l.hide),f||(e.on("focus",d),e.on("blur",l.hide)),e.on("init",(function(){(e.hasFocus()||f)&&d()})),Uv(e,t);var m={show:function(){l.show()},hide:function(){l.hide()},enable:function(){jv(t,!1)},disable:function(){jv(t,!0)},isDisabled:function(){return hv.isDisabled(u)}};return{editorContainer:u.element.dom,api:m}}}),YD=function(e,t){var n,r,o,i,a,u,c,s,l,f,m,g,h,p;o=PT(0,r=t,qT(n=e)),n.ui.registry.addNestedMenuItem("align",{text:r.shared.providers.translate("Align"),getSubmenuItems:function(){return o.items.validateItems(o.getStyleItems())}}),u=PT(0,a=t,YT(i=e)),i.ui.registry.addNestedMenuItem("fontformats",{text:a.shared.providers.translate("Fonts"),getSubmenuItems:function(){return u.items.validateItems(u.getStyleItems())}}),c=e,l=d({type:"advanced"},(s=t).styleselect),f=PT(0,s,cz(c,l)),c.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return f.items.validateItems(f.getStyleItems())}}),g=PT(0,t,uz(m=e)),m.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return g.items.validateItems(g.getStyleItems())}}),p=PT(0,t,ez(h=e)),h.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return p.items.validateItems(p.getStyleItems())}})},JD={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},QD=(LT="[eE][+-]?[0-9]+",FT=["Infinity",(IT="[0-9]+")+"\\."+(VT=function(e){return"(?:"+e+")?"})(IT)+VT(LT),"\\."+IT+VT(LT),IT+VT(LT)].join("|"),new RegExp("^([+-]?(?:"+FT+"))(.*)$")),ZD=function(e,t){return S.from(QD.exec(e)).bind((function(e){var n,r=Number(e[1]),o=e[2];return n=o,F(t,(function(e){return F(JD[e],(function(e){return n===e}))}))?S.some({value:r,unit:o}):S.none()}))},eA=function(e){return ZD(e,["fixed","relative","empty"]).map((function(e){return e.value+e.unit})).getOr(e)},tA=function(e){var t=e.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" "),n=new Map,r=rz(),o=function(){var t=eA(e.queryCommandValue("LineHeight"));S.from(n.get(t)).fold((function(){return r.clear()}),(function(e){r.set({destroy:function(){e.setActive(!1)}}),e.setActive(!0)}))};return e.on("nodeChange",o),$(t,(function(i,a){return{type:"togglemenuitem",text:i,onSetup:function(u){return n.set(eA(i),u),a+1===t.length&&o(),function(){0===a&&(e.off("nodeChange",o),r.clear())}},onAction:function(){return e.execCommand("LineHeight",!1,i)}}}))},nA=function(e){var t,n;(t=e).ui.registry.addNestedMenuItem("lineheight",{type:"nestedmenuitem",text:"Line height",getSubmenuItems:function(){return tA(t)}}),(n=e).ui.registry.addMenuButton("lineheight",{tooltip:"Line height",icon:"line-height",fetch:function(e){return e(tA(n))}})},rA=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},oA=function(e){var t,n;!function(e){mk.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(t,n){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:iz(e,t.name),onAction:rA(e,t.name)})}));for(var t=1;t<=6;t++){var n="h"+t;e.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+t,onSetup:iz(e,n),onAction:rA(e,n)})}}(e),t=e,mk.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:function(){return t.execCommand(e.action)}})})),n=e,mk.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){n.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:function(){return n.execCommand(e.action)},onSetup:iz(n,e.name)})}))},iA=function(e){var t;oA(e),t=e,mk.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:function(){return t.execCommand(e.action)}})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:rA(t,"code")})},aA=function(e,t,n){var r=function(){return!!t.undoManager&&t.undoManager[n]()},o=function(){e.setDisabled(t.mode.isReadOnly()||!r())};return e.setDisabled(!r()),t.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o),function(){return t.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o)}},uA=function(e){var t,n;(t=e).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(e){return aA(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(e){return aA(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}}),(n=e).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(e){return aA(e,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(e){return aA(e,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}})},cA=function(e,t){var n,r,o,i;!function(e){mk.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(t){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,onAction:function(){return e.execCommand(t.cmd)},icon:t.icon,onSetup:iz(e,t.name)})}));var t="alignnone",n="No alignment",r="JustifyNone",o="align-none";e.ui.registry.addButton(t,{tooltip:n,onAction:function(){return e.execCommand(r)},icon:o})}(e),iA(e),YD(e,t),uA(e),function(e){Wb(e);var t=mn(null),n=mn(null);Jb(e,"forecolor","forecolor","Text color",t),Jb(e,"backcolor","hilitecolor","Background color",n),Qb(e,"forecolor","forecolor","Text color"),Qb(e,"backcolor","hilitecolor","Background color")}(e),(r=n=e).ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return r.execCommand("mceToggleVisualAid")}}),(o=n).ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(e){return function(e,t){e.setActive(t.hasVisual);var n=function(t){e.setActive(t.hasVisual)};return t.on("VisualAid",n),function(){return t.off("VisualAid",n)}}(e,o)},onAction:function(){o.execCommand("mceToggleVisualAid")}}),(i=e).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(e){return function(e,t){e.setDisabled(!t.queryCommandState("outdent"));var n=function(){e.setDisabled(!t.queryCommandState("outdent"))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}(e,i)},onAction:function(){return i.execCommand("outdent")}}),i.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return i.execCommand("indent")}}),nA(e)},sA=function(e,t){return{anchor:"makeshift",x:e,y:t}},lA=function(e){return"longpress"===e.type||0===e.type.indexOf("touch")},fA=function(e,t){var n,r,o,i=ev.DOM.getPos(e);return n=t,r=i.x,o=i.y,sA(n.x+r,n.y+o)},dA=function(e,t){return"contextmenu"===t.type||"longpress"===t.type?e.inline?function(e){if(lA(e)){var t=e.touches[0];return sA(t.pageX,t.pageY)}return sA(e.pageX,e.pageY)}(t):fA(e.getContentAreaContainer(),function(e){if(lA(e)){var t=e.touches[0];return sA(t.clientX,t.clientY)}return sA(e.clientX,e.clientY)}(t)):mA(e)},mA=function(e){return{anchor:"selection",root:hn.fromDom(e.selection.getNode())}},gA=function(e){return{anchor:"node",node:S.some(hn.fromDom(e.selection.getNode())),root:hn.fromDom(e.getBody())}},hA=function(e,t,n,r,o,i){var a=n(),u=i?gA(e):dA(e,t);jS(a,up.CLOSE_ON_EXECUTE,r,!1).map((function(e){t.preventDefault(),th.showMenuAt(o,u,{menu:{markers:xp("normal")},data:e})}))},pA={onLtr:function(){return[$u,Lu,Vu,Fu,ju,Uu,fh,dh,sh,uh,lh,ch]},onRtl:function(){return[$u,Vu,Lu,ju,Fu,Uu,fh,dh,lh,ch,sh,uh]}},vA={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},bA=function(e,t,n,r,o,i,a){var u,c,s=i?gA(e):(u=e,c=t,d({bubble:Lc(0,12,vA),layouts:pA,overrides:{maxWidthFunction:JO(),maxHeightFunction:Nc()}},dA(u,c)));jS(n,up.CLOSE_ON_EXECUTE,r,!0).map((function(n){t.preventDefault(),th.showMenuWithinBounds(o,s,{menu:{markers:xp("normal"),highlightImmediately:a},data:n,type:"horizontal"},(function(){return S.some(ET(e,r.shared))})),e.fire(QO)}))},yA=function(e,t,n,r,o,i){var a,u=$n(),c=u.os.isiOS(),s=u.os.isOSX(),l=u.os.isAndroid(),f=u.deviceType.isTouch(),d=function(){var a=n();bA(e,t,a,r,o,i,!(l||c||s&&f))};!s&&!c||i?(l&&!i&&e.selection.setCursorLocation(t.target,0),d()):(a=function(){!function(e){var t=e.selection.getRng(),n=function(){mh.setEditorTimeout(e,(function(){e.selection.setRng(t)}),10),i()};e.once("touchend",n);var r=function(e){e.preventDefault(),e.stopImmediatePropagation()};e.on("mousedown",r,!0);var o=function(){return i()};e.once("longpresscancel",o);var i=function(){e.off("touchend",n),e.off("longpresscancel",o),e.off("mousedown",r)}}(e),d()},function(e,t){var n=e.selection;if(n.isCollapsed()||t.touches.length<1)return!1;var r=t.touches[0],o=n.getRng();return Ms(e.getWin(),hs.domRange(o)).exists((function(e){return e.left<=r.clientX&&e.right>=r.clientX&&e.top<=r.clientY&&e.bottom>=r.clientY}))}(e,t)?a():(e.once("selectionchange",a),e.once("touchend",(function(){return e.off("selectionchange",a)}))))},xA=function(e){return"string"==typeof e?e.split(/[ ,]/):e},wA=function(e){return e.getParam("contextmenu_never_use_native",!1,"boolean")},CA=function(e){return n="contextmenu",r="link linkchecker image imagetools table spellchecker configurepermanentpen",o=(t=e).ui.registry.getAll().contextMenus,S.from(t.getParam(n)).map(xA).getOrThunk((function(){return G(xA(r),(function(e){return Pe(o,e)}))}));var t,n,r,o},kA=function(e){return E(e)?"|"===e:"separator"===e.type},SA={type:"separator"},_A=function e(t){var n,r=function(e){return{text:e.text,icon:e.icon,disabled:e.disabled,shortcut:e.shortcut}};if(E(t))return t;switch(t.type){case"separator":return SA;case"submenu":return d(d({type:"nestedmenuitem"},r(t)),{getSubmenuItems:function(){var n=t.getSubmenuItems();return E(n)?n:$(n,e)}});default:return d(d({type:"menuitem"},r(t)),{onAction:(n=t.onAction,function(){return n()})})}},OA=function(e,t){if(0===t.length)return e;var n=ae(e).filter((function(e){return!kA(e)})).fold((function(){return[]}),(function(e){return[SA]}));return e.concat(n).concat(t).concat([SA])},EA=function(e,t){return"longpress"!==t.type&&(2!==t.button||t.target===e.getBody()&&""===t.pointerType)},TA=function(e,t){return EA(e,t)?e.selection.getStart(!0):t.target},zA=function(e,t,n){var r=$n().deviceType.isTouch,o=ha(th.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return e.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ac([mg("dismissContextMenu",[ro(Vr(),(function(t,n){kl.close(t),e.focus()}))])])})),i=function(e){return th.hide(o)},a=function(t){var i,a;wA(e)&&t.preventDefault(),i=e,t.ctrlKey&&!wA(i)||!1===e.getParam("contextmenu")||(a=function(e,t){var n=e.getParam("contextmenu_avoid_overlap","","string");if(EA(e,t))return!0;if(n){var r=TA(e,t);return Ey(hn.fromDom(r),n)}return!1}(e,t),(r()?yA:hA)(e,t,(function(){var n,r,o,i=TA(e,t),a=e.ui.registry.getAll(),u=CA(e);return n=a.contextMenus,r=i,0<(o=K(u,(function(e,t){return Be(n,t.toLowerCase()).map((function(t){var n=t.update(r);if(E(n))return OA(e,n.split(" "));if(0<n.length){var o=$(n,_A);return OA(e,o)}return e})).getOrThunk((function(){return e.concat([t])}))}),[])).length&&kA(o[o.length-1])&&o.pop(),o}),n,o,a))};e.on("init",(function(){var t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");e.on(t,i),e.on("longpress contextmenu",a)}))},DA=Ie([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),AA=function(e){return function(t){return t.translate(-e.left,-e.top)}},MA=function(e){return function(t){return t.translate(e.left,e.top)}},RA=function(e){return function(t,n){return K(e,(function(e,t){return t(e)}),Ca(t,n))}},NA=function(e,t,n){return e.fold(RA([MA(n),AA(t)]),RA([AA(t)]),RA([]))},BA=function(e,t,n){return e.fold(RA([MA(n)]),RA([]),RA([MA(t)]))},PA=function(e,t,n){return e.fold(RA([]),RA([AA(n)]),RA([MA(t),AA(n)]))},HA=function(e,t,n){var r=e.fold((function(e,t){return{position:S.some("absolute"),left:S.some(e+"px"),top:S.some(t+"px")}}),(function(e,t){return{position:S.some("absolute"),left:S.some(e-n.left+"px"),top:S.some(t-n.top+"px")}}),(function(e,t){return{position:S.some("fixed"),left:S.some(e+"px"),top:S.some(t+"px")}}));return d({right:S.none(),bottom:S.none()},r)},IA=function(e,t,n,r){var o=function(e,o){return function(i,a){var u=e(t,n,r);return o(i.getOr(u.left),a.getOr(u.top))}};return e.fold(o(PA,LA),o(BA,VA),o(NA,FA))},LA=DA.offset,VA=DA.absolute,FA=DA.fixed,jA=function(e,t){var n=Yo(e,t);return A(n)?NaN:parseInt(n,10)},UA=function(e,t,n,r){return o=t,i=e.element,a=jA(i,o.leftAttr),u=jA(i,o.topAttr),(isNaN(a)||isNaN(u)?S.none():S.some(Ca(a,u))).fold((function(){return n}),(function(e){return FA(e.left+r.left,e.top+r.top)}));var o,i,a,u},$A=function(e,t,n,r,o,i){var a,u,c,s=UA(e,t,n,r),l=(t.mustSnap?GA:XA)(e,t,s,o,i),f=NA(s,o,i);return a=t,u=f,c=e.element,Ko(c,a.leftAttr,u.left+"px"),Ko(c,a.topAttr,u.top+"px"),l.fold((function(){return{coord:FA(f.left,f.top),extra:S.none()}}),(function(e){return{coord:e.output,extra:e.extra}}))},WA=function(e,t){var n,r;n=t,r=e.element,Zo(r,n.leftAttr),Zo(r,n.topAttr)},qA=function(e,t,n,r){return ce(e,(function(e){var o,i,a,u,c,s,l,f,d=e.sensor;return o=t,i=d,a=e.range.left,u=e.range.top,l=BA(o,c=n,s=r),f=BA(i,c,s),Math.abs(l.left-f.left)<=a&&Math.abs(l.top-f.top)<=u?S.some({output:IA(e.output,t,n,r),extra:e.extra}):S.none()}))},GA=function(e,t,n,r,o){var i=t.getSnapPoints(e);return qA(i,n,r,o).orThunk((function(){return K(i,(function(e,t){var i,a,u,c,s,l,f,d,m=t.sensor,g=(i=n,a=m,t.range.left,t.range.top,s=BA(i,u=r,c=o),l=BA(a,u,c),f=Math.abs(s.left-l.left),d=Math.abs(s.top-l.top),Ca(f,d));return e.deltas.fold((function(){return{deltas:S.some(g),snap:S.some(t)}}),(function(n){return(g.left+g.top)/2<=(n.left+n.top)/2?{deltas:S.some(g),snap:S.some(t)}:e}))}),{deltas:S.none(),snap:S.none()}).snap.map((function(e){return{output:IA(e.output,n,r,o),extra:e.extra}}))}))},XA=function(e,t,n,r,o){var i=t.getSnapPoints(e);return qA(i,n,r,o)},KA=Object.freeze({__proto__:null,snapTo:function(e,t,n,r){var o,i,a,u,c,s,l,f,d=t.getTarget(e.element);t.repositionTarget&&(o=wo(e.element),i=Ma(o),a=Dz(d),l=i,f=a,u={coord:IA((s=r).output,s.output,l,f),extra:s.extra},c=HA(u.coord,0,a),Ji(d,c))}}),YA="data-initial-z-index",JA=function(e,t){var n;e.getSystem().addToGui(t),_o((n=t).element).filter(vo).each((function(e){ea(e,"z-index").each((function(t){Ko(e,YA,t)})),Ki(e,"z-index",Qi(n.element,"z-index"))}))},QA=function(e){_o(e.element).filter(vo).each((function(e){Jo(e,YA).fold((function(){return na(e,"z-index")}),(function(t){return Ki(e,"z-index",t)})),Zo(e,YA)})),e.getSystem().removeFromGui(e)},ZA=function(e,t,n){return e.getSystem().build(jy.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:n}))},eM=tn("snaps",[jt("getSnapPoints"),hu("onSensor"),jt("leftAttr"),jt("topAttr"),nn("lazyViewport",ja),nn("mustSnap",!1)]),tM=[nn("useFixed",s),jt("blockerClass"),nn("getTarget",i),nn("onDrag",n),nn("repositionTarget",!0),nn("onDrop",n),sn("getBounds",ja),eM],nM=function(e){return t=ea(e,"left"),n=ea(e,"top"),r=ea(e,"position"),o=function(e,t,n){return("fixed"===n?FA:LA)(parseInt(e,10),parseInt(t,10))},(t.isSome()&&n.isSome()&&r.isSome()?S.some(o(t.getOrDie(),n.getOrDie(),r.getOrDie())):S.none()).getOrThunk((function(){var t=Sa(e);return VA(t.left,t.top)}));var t,n,r,o},rM=function(e,t,n,r,o,i,a){var u,c,s,l,f,d,m,g,h,p=t.fold((function(){var e,t,a,u=(e=n,t=i.left,a=i.top,e.fold((function(e,n){return LA(e+t,n+a)}),(function(e,n){return VA(e+t,n+a)}),(function(e,n){return FA(e+t,n+a)}))),c=NA(u,r,o);return FA(c.left,c.top)}),(function(t){var a=$A(e,t,n,i,r,o);return a.extra.each((function(n){t.onSensor(e,n)})),a.coord}));return u=p,c=r,s=o,f=(l=a).bounds,d=BA(u,c,s),m=Ec(d.left,f.x,f.x+f.width-l.width),g=Ec(d.top,f.y,f.y+f.height-l.height),h=VA(m,g),u.fold((function(){var e=PA(h,c,s);return LA(e.left,e.top)}),(function(){return h}),(function(){var e=NA(h,c,s);return FA(e.left,e.top)}))},oM=function(e,t){return{bounds:e.getBounds(),height:xa(t.element),width:Ta(t.element)}},iM=function(e,t,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return oM(t,e)}));i.each((function(n){var r,o,i,u,c,s,l,f,d,m,g;r=e,i=a,u=n,g=(o=t).getTarget(r.element),o.repositionTarget&&(c=wo(r.element),s=Ma(c),l=Dz(g),f=nM(g),d=rM(r,o.snaps,f,s,l,u,i),m=HA(d,0,l),Ji(g,m)),o.onDrag(r,g,u)}))},aM=function(e,t,n,r){t.each(QA),n.snaps.each((function(t){WA(e,t)}));var o=n.getTarget(e.element);r.reset(),n.onDrop(e,o)},uM=function(e){return function(t,n){var r=function(e){n.setStartData(oM(t,e))};return eo(g([ro(Pr(),(function(e){n.getStartData().each((function(){return r(e)}))}))],e(t,n,r)))}},cM=Object.freeze({__proto__:null,getData:function(e){return S.from(Ca(e.x,e.y))},getDelta:function(e,t){return Ca(t.left-e.left,t.top-e.top)}}),sM=function(e,t,n){return[ro(ur(),(function(r,o){var i,a,u,c,s;0===o.event.raw.button&&(o.stop(),u={drop:i=function(){return aM(r,S.some(c),e,t)},delayDrop:(a=Ty(i,200)).schedule,forceDrop:i,move:function(n){a.cancel(),iM(r,e,t,cM,n)}},c=ZA(r,e.blockerClass,(s=u,eo([ro(ur(),s.forceDrop),ro(lr(),s.drop),ro(cr(),(function(e,t){s.move(t.event)})),ro(sr(),s.delayDrop)]))),n(r),JA(r,c))}))]},lM=g(tM,[yu("dragger",{handlers:uM(sM)})]),fM=Object.freeze({__proto__:null,getData:function(e){var t,n=e.raw.touches;return 1===n.length?(t=n[0],S.some(Ca(t.clientX,t.clientY))):S.none()},getDelta:function(e,t){return Ca(t.left-e.left,t.top-e.top)}}),dM=function(e,t,r){var o=mn(S.none());return[ro(rr(),(function(i,a){a.stop();var u,c=function(){aM(i,o.get(),e,t),o.set(S.none())},s={drop:c,delayDrop:n,forceDrop:c,move:function(n){iM(i,e,t,fM,n)}},l=ZA(i,e.blockerClass,(u=s,eo([ro(rr(),u.forceDrop),ro(ir(),u.drop),ro(ar(),u.drop),ro(or(),(function(e,t){u.move(t.event)}))])));o.set(S.some(l)),r(i),JA(i,l)})),ro(or(),(function(n,r){r.stop(),iM(n,e,t,fM,r.event)})),ro(ir(),(function(n,r){r.stop(),aM(n,o.get(),e,t),o.set(S.none())})),ro(ar(),(function(n){aM(n,o.get(),e,t),o.set(S.none())}))]},mM=g(tM,[yu("dragger",{handlers:uM(dM)})]),gM=g(tM,[yu("dragger",{handlers:uM((function(e,t,n){return g(sM(e,t,n),dM(e,t,n))}))})]),hM=lc({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:lM,touch:mM,mouseOrTouch:gM}),name:"dragging",active:{events:function(e,t){return e.dragger.handlers(e,t)}},extra:{snap:function(e){return{sensor:e.sensor,range:e.range,output:e.output,extra:S.from(e.extra)}}},state:Object.freeze({__proto__:null,init:function(){var e=S.none(),t=S.none(),n=o({});return Ci({readState:n,reset:function(){e=S.none(),t=S.none()},update:function(t,n){return t.getData(n).bind((function(n){return r=t,o=n,i=e.map((function(e){return r.getDelta(e,o)})),e=S.some(o),i;var r,o,i}))},getStartData:function(){return t},setStartData:function(e){t=S.some(e)}})}}),apis:KA}),pM=function(e,t,n,r,o,i){return e.fold((function(){return hM.snap({sensor:VA(n-20,r-20),range:Ca(o,i),output:VA(S.some(n),S.some(r)),extra:{td:t}})}),(function(e){var o=n-20,i=r-20,a=e.element.dom.getBoundingClientRect();return hM.snap({sensor:VA(o,i),range:Ca(40,40),output:VA(S.some(n-a.width/2),S.some(r-a.height/2)),extra:{td:t}})}))},vM=function(e,t,n){return{getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(e,r){var o,i,a=r.td;o=t.get(),i=a,o.exists((function(e){return Gn(e,i)}))||(t.set(S.some(a)),n(a))},mustSnap:!0}},bM=function(e){return hh(gh.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([hM.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),aw.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},yM=function(e,t){var n=mn([]),r=mn([]),o=mn(!1),i=mn(S.none()),a=mn(S.none()),u=function(e){var n=Fa(e);return pM(f.getOpt(t),e,n.x,n.y,n.width,n.height)},c=function(e){var n=Fa(e);return pM(d.getOpt(t),e,n.right,n.bottom,n.width,n.height)},s=vM((function(){return $(n.get(),u)}),i,(function(t){a.get().each((function(n){e.fire("TableSelectorChange",{start:t,finish:n})}))})),l=vM((function(){return $(r.get(),c)}),a,(function(t){i.get().each((function(n){e.fire("TableSelectorChange",{start:n,finish:t})}))})),f=bM(s),d=bM(l),m=ha(f.asSpec()),g=ha(d.asSpec()),h=function(t,n,r,o){var i=r(n);hM.snapTo(t,i),function(t,n,r,o){var i=n.dom.getBoundingClientRect();na(t.element,"display");var a=So(hn.fromDom(e.getBody())).dom.innerHeight,u=r(i),c=o(i,a);(u||c)&&Ki(t.element,"display","none")}(t,n,(function(e){return e[o]<0}),(function(e,t){return e[o]>t}))},p=function(e){return h(m,e,u,"top")},v=function(e){return h(g,e,c,"bottom")};$n().deviceType.isTouch()&&(e.on("TableSelectionChange",(function(e){o.get()||(al(t,m),al(t,g),o.set(!0)),i.set(S.some(e.start)),a.set(S.some(e.finish)),e.otherCells.each((function(t){n.set(t.upOrLeftCells),r.set(t.downOrRightCells),p(e.start),v(e.finish)}))})),e.on("ResizeEditor ResizeWindow ScrollContent",(function(){i.get().each(p),a.get().each(v)})),e.on("TableSelectionClear",(function(){o.get()&&(sl(m),sl(g),o.set(!1)),i.set(S.none()),a.set(S.none())})))};(UT=jT=jT||{})[UT.None=0]="None",UT[UT.Both=1]="Both",UT[UT.Vertical=2]="Vertical";var xM,wM,CM,kM=function(e,t,n){var r,o,i,a,u,c,s=hn.fromDom(e.getContainer()),l=(r=e,o=t,i=n,a=ya(s),u=Ea(s),(c={}).height=$D(a+o.top,xv(r),Cv(r)),i===jT.Both&&(c.width=$D(u+o.left,yv(r),wv(r))),c);Te(l,(function(e,t){return Ki(s,t,UD(e)),0})),e.fire("ResizeEditor")},SM=function(e,t,n){return t.delimiter||(t.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ac([ug.config({mode:"flow",selector:"div[role=button]"}),hv.config({disabled:n.isDisabled}),$v(),Ky.config({}),dg.config({}),mg("elementPathEvents",[lo((function(r,o){e.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return ug.focusIn(r)})),e.on("NodeChange",(function(o){var i,a,u=function(t){for(var n=[],r=t.length;0<r--;){var o=t[r];if(1===o.nodeType&&!function(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}(o)){var i=e.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n}(o.parents);0<u.length?dg.set(r,(i=$(u||[],(function(t,r){return gh.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":r,"tab-index":-1,"aria-level":r+1},innerHtml:t.name},action:function(n){e.focus(),e.selection.select(t.element),e.nodeChanged()},buttonBehaviours:ac([qv(n.isDisabled),$v()])})})),a={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+t.delimiter+" "}},K(i.slice(1),(function(e,t){var n=e;return n.push(a),n.push(t),n}),[i[0]]))):dg.set(r,[])}))}))])]),components:[]}},_M=function(e,t){var n,r,o,i,a,u;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(a=function(){var n,r,o,i,a,u=[];return e.getParam("elementpath",!0,"boolean")&&u.push(SM(e,{},t)),e.hasPlugin("wordcount")&&u.push((n=e,r=t,i=function(e,t,n){return dg.set(e,[da(r.translate(["{0} "+n,t[n]]))])},gh.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ac([qv(r.isDisabled),$v(),Ky.config({}),dg.config({}),Ul.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),mg("wordcount-events",[go((function(e){var t=Ul.getValue(e),n="words"===t.mode?"characters":"words";Ul.setValue(e,{mode:n,count:t.count}),i(e,t.count,n)})),lo((function(e){n.on("wordCountUpdate",(function(t){var n=Ul.getValue(e).mode;Ul.setValue(e,{mode:n,count:t.wordCount}),i(e,t.wordCount,n)}))}))])]),eventOrder:((o={})[Er()]=["disabling","alloy.base.behaviour","wordcount-events"],o)}))),e.getParam("branding",!0,"boolean")&&u.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(a=tv.translate(["Powered by {0}","Tiny"]))+'">'+a+"</a>"}}),0<u.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:u}]:[]}(),r=!(n=e).hasPlugin("autoresize"),(u=!1===(o=n.getParam("resize",r))?jT.None:"both"===o?jT.Both:jT.Vertical)!==jT.None&&a.push((i=u,{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize"),"aria-hidden":"true"},innerHtml:vh("resize-handle",t.icons)},behaviours:ac([hM.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,n,r){kM(e,r,i)},blockerClass:"tox-blocker"})])})),a)}},OM=function(e){var t,r,o,i,a=e.inline,u=a?KD:FD,c=Lv(e)?nD:Tz,s=S.none(),l=$n(),f=l.browser.isIE()?["tox-platform-ie"]:[],m=l.deviceType.isTouch()?["tox-platform-touch"]:[],g=Nv(e),h=Hv(e),p=tv.isRtl()?{attributes:{dir:"rtl"}}:{},v={attributes:((t={})[Xc]=g?nu.BottomToTop:nu.TopToBottom,t)},b=function(){return s.bind(OD.getHeader)},y=function(){Ki(de.element,"width",document.body.clientWidth+"px")},x=ha((r=Gn(Wi(),h)&&"grid"===Qi(h,"display"),o={dom:d({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(f).concat(m)},p),behaviours:ac([tl.config({useFixed:function(){return c.isDocked(b)}})])},i={dom:{styles:{width:document.body.clientWidth+"px"}},events:eo([ro(Hr(),y)])},Fe(o,r?i:{}))),w=function(){return fe.value(x)},C=hh({dom:{tag:"div",classes:["tox-anchorbar"]}}),k=function(){return s.bind((function(e){return OD.getThrobber(e)})).getOrDie("Could not find throbber element")},_=YO(x,e,(function(){return s.bind((function(e){return C.getOpt(e)})).getOrDie("Could not find a anchor bar element")})),O=OD.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:_,onEscape:function(){e.focus()}}),E=zv(e),T=OD.parts.toolbar(d({dom:{tag:"div",classes:["tox-toolbar"]},getSink:w,providers:_.shared.providers,onEscape:function(){e.focus()},type:E,lazyToolbar:function(){return s.bind((function(e){return OD.getToolbar(e)})).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return b().getOrDie("Could not find header element")}},v)),z=OD.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:_.shared.providers,onEscape:function(){e.focus()},type:E}),D=OD.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),A=OD.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),M=OD.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:_}),R=e.getParam("statusbar",!0,"boolean")&&!a?S.some(_M(e,_.shared.providers)):S.none(),B={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[D,A]},P=Ov(e),H=Sv(e),I=kv(e),L=OD.parts.header({dom:d({tag:"div",classes:["tox-editor-header"]},v),components:Q([I?[O]:[],P?[z]:H?[T]:[],Pv(e)?[]:[C.asSpec()]]),sticky:Lv(e),editor:e,sharedBackstage:_.shared}),V=Q([g?[]:[L],a?[]:[B],g?[L]:[]]),F=Q([[{dom:{tag:"div",classes:["tox-editor-container"]},components:V}],a?[]:R.toArray(),[M]]),j=Iv(e),U=d(d({role:"application"},tv.isRtl()?{dir:"rtl"}:{}),j?{"aria-hidden":"true"}:{}),$=ha(OD.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(a?["tox-tinymce-inline"]:[]).concat(g?["tox-tinymce--toolbar-bottom"]:[]).concat(m).concat(f),styles:d({visibility:"hidden"},j?{opacity:"0",border:"0"}:{}),attributes:U},components:F,behaviours:ac([$v(),hv.config({disableClass:"tox-tinymce--disabled"}),ug.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a"})])}));s=S.some($);e.shortcuts.add("alt+F9","focus menubar",(function(){OD.focusMenubar($)})),e.shortcuts.add("alt+F10","focus toolbar",(function(){OD.focusToolbar($)})),e.addCommand("ToggleToolbarDrawer",(function(){OD.toggleToolbarDrawer($)})),e.addQueryStateHandler("ToggleToolbarDrawer",(function(){return OD.isToolbarDrawerToggled($)}));var q,G,X,K,Y,J,Z,ee,te,ne,re,oe,ie,ae,ue,ce,se,le=Uy($),de=Uy(x);q=e,G=le,X=de,K=function(e,t){W([G,X],(function(n){n.broadcastEvent(e,t)}))},Y=function(e,t){W([G,X],(function(n){n.broadcastOn([e],t)}))},J=function(e){return Y(Sl(),{target:e.target})},Z=Sy(hn.fromDom(document),"touchstart",J),ee=Sy(hn.fromDom(document),"touchmove",(function(e){return K(Nr(),e)})),te=Sy(hn.fromDom(document),"touchend",(function(e){return K(Br(),e)})),ne=Sy(hn.fromDom(document),"mousedown",J),re=Sy(hn.fromDom(document),"mouseup",(function(e){0===e.raw.button&&Y(Ol(),{target:e.target})})),oe=function(e){return Y(Sl(),{target:hn.fromDom(e.target)})},ie=function(e){0===e.button&&Y(Ol(),{target:hn.fromDom(e.target)})},ae=function(e){return K(Pr(),Oy(e))},ue=function(e){Y(_l(),{}),K(Hr(),Oy(e))},ce=function(){return Y(_l(),{})},se=function(e){e.state&&Y(Sl(),{target:hn.fromDom(q.getContainer())})},q.on("PostRender",(function(){q.on("click",oe),q.on("tap",oe),q.on("mouseup",ie),q.on("ScrollWindow",ae),q.on("ResizeWindow",ue),q.on("ResizeEditor",ce),q.on("AfterProgressState",se)})),q.on("remove",(function(){q.off("click",oe),q.off("tap",oe),q.off("mouseup",ie),q.off("ScrollWindow",ae),q.off("ResizeWindow",ue),q.off("ResizeEditor",ce),q.off("AfterProgressState",se),ne.unbind(),Z.unbind(),ee.unbind(),te.unbind(),re.unbind()})),q.on("detach",(function(){ml(G),ml(X),G.destroy(),X.destroy()}));var me=function(){var t,n=UD(WD(e)),r=UD(qD(t=e).getOr(bv(t)));return e.inline||(ta("div","width",r)&&Ki($.element,"width",r),ta("div","height",n)?Ki($.element,"height",n):Ki($.element,"height","200px")),n};return{mothership:le,uiMothership:de,backstage:_,renderUI:function(){var t,n,r,o,i,a,s,l;c.setup(e,_.shared,b),cA(e,_),zA(e,w,_),n=(t=e).ui.registry.getAll().sidebars,W(Oe(n),(function(e){var r=n[e],o=function(){return S.from(t.queryCommandValue("ToggleSidebar")).is(e)};t.ui.registry.addToggleButton(e,{icon:r.icon,tooltip:r.tooltip,onAction:function(n){t.execCommand("ToggleSidebar",!1,e),n.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})})),r=e,o=k,i=_.shared,a=mn(!1),s=mn(S.none()),l=function(e){e!==a.get()&&(bD(o(),e,i.providers),a.set(e),r.fire("AfterProgressState",{state:e}))},r.on("ProgressState",(function(e){var t;s.get().each(mh.clearTimeout),N(e.time)?(t=mh.setEditorTimeout(r,(function(){return l(e.state)}),e.time),s.set(S.some(t))):(l(e.state),s.set(S.none()))})),ze(e.getParam("toolbar_groups",{},"object"),(function(t,n){e.ui.registry.addGroupToolbarButton(n,t)}));var f,m=e.ui.registry.getAll(),g=m.buttons,h=m.menuItems,p=m.contextToolbars,v=m.sidebars,y=_v(e),C={menuItems:h,menus:(f=e.getParam("menu"))?ze(f,(function(e){return d(d({},e),{items:e.items})})):{},menubar:e.getParam("menubar"),toolbar:y.getOrThunk((function(){return e.getParam("toolbar",!0)})),allowToolbarGroups:E===ip.floating,buttons:g,sidebar:v};xz(e,p,x,{backstage:_}),yM(e,x);var O=e.getElement(),T=me(),z={mothership:le,uiMothership:de,outerContainer:$},D={targetNode:O,height:T};return u.render(e,z,C,_,D)},getUi:function(){return{channels:{broadcastAll:de.broadcast,broadcastOn:de.broadcastOn,register:n}}}}},EM=o([jt("lazySink"),Yt("dragBlockClass"),sn("getBounds",ja),nn("useTabstopAt",l),nn("eventOrder",{}),$l("modalBehaviours",[ug]),pu("onExecute"),bu("onEscape")]),TM={sketch:i},zM=o([Cf({name:"draghandle",overrides:function(e,t){return{behaviours:ac([hM.config({mode:"mouse",getTarget:function(e){return Ka(e,'[role="dialog"]').getOr(e)},blockerClass:e.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:e.getDragBounds})])}}}),xf({schema:[jt("dom")],name:"title"}),xf({factory:TM,schema:[jt("dom")],name:"close"}),xf({factory:TM,schema:[jt("dom")],name:"body"}),Cf({factory:TM,schema:[jt("dom")],name:"footer"}),wf({factory:{sketch:function(e,t){return d(d({},e),{dom:t.dom,components:t.components})}},schema:[nn("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),nn("components",[])],name:"blocker"})]),DM=Object.freeze({__proto__:null,block:function(e,t,n,r){Ko(e.element,"aria-busy",!0);var o=t.getRoot(e).getOr(e),i=ac([ug.config({mode:"special",onTab:function(){return S.some(!0)},onShiftTab:function(){return S.some(!0)}}),bg.config({})]),a=r(o,i),u=o.getSystem().build(a);dg.append(o,pa(u)),u.hasConfigured(ug)&&ug.focusIn(u),n.isBlocked()||t.onBlock(e),n.blockWith((function(){return dg.remove(o,u)}))},unblock:function(e,t,n){Zo(e.element,"aria-busy"),n.isBlocked()&&t.onUnblock(e),n.clear()}}),AM=[sn("getRoot",S.none),hu("onBlock"),hu("onUnblock")],MM=cc({fields:AM,name:"blocking",apis:DM,state:Object.freeze({__proto__:null,init:function(){var e=rz();return Ci({readState:e.isSet,blockWith:function(t){e.set({destroy:t})},clear:e.clear,isBlocked:e.isSet})}})}),RM=Kf({name:"ModalDialog",configFields:EM(),partFields:zM(),factory:function(e,t,n,r){var o,a=mn(S.none()),u=ii("modal-events"),c=d(d({},e.eventOrder),((o={})[Ir()]=[u].concat(e.eventOrder["alloy.system.attached"]||[]),o));return{uid:e.uid,dom:e.dom,components:t,apis:{show:function(t){a.set(S.some(t));var n=e.lazySink(t).getOrDie(),o=r.blocker(),i=n.getSystem().build(d(d({},o),{components:o.components.concat([pa(t)]),behaviours:ac([bg.config({}),mg("dialog-blocker-events",[so(dr(),(function(){ug.focusIn(t)}))])])}));al(n,i),ug.focusIn(t)},hide:function(e){a.set(S.none()),_o(e.element).each((function(t){e.getSystem().getByDom(t).each((function(e){sl(e)}))}))},getBody:function(t){return Bf(t,e,"body")},getFooter:function(t){return Bf(t,e,"footer")},setIdle:function(e){MM.unblock(e)},setBusy:function(e,t){MM.block(e,t)}},eventOrder:c,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:ql(e.modalBehaviours,[dg.config({}),ug.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt}),MM.config({getRoot:a.get}),mg(u,[lo((function(t){var n,r,o,a,u,c;n=t.element,r=Bf(t,e,"title").element,o=Jo(n,"id").fold((function(){var e=ii("dialog-label");return Ko(r,"id",e),e}),i),Ko(n,"aria-labelledby",o),a=t.element,u=Bf(t,e,"body").element,c=S.from(Yo(a,"id")).fold((function(){var e=ii("dialog-describe");return Ko(u,"id",e),e}),i),Ko(a,"aria-describedby",c)}))])])}},apis:{show:function(e,t){e.show(t)},hide:function(e,t){e.hide(t)},getBody:function(e,t){return e.getBody(t)},getFooter:function(e,t){return e.getFooter(t)},setBusy:function(e,t,n){e.setBusy(t,n)},setIdle:function(e,t){e.setIdle(t)}}}),NM=dt([$t("type"),$t("name")].concat(Pp)),BM=Ht,PM=[yt("name","name",Xe((function(){return ii("button-name")})),Pt),Zt("icon"),un("align","end",["start","end"]),cn("primary",!1),cn("disabled",!1)],HM=g(PM,[$t("text")]),IM=g([Wt("type",["submit","cancel","custom"])],HM),LM=g([Wt("type",["menu"]),Zt("text"),Zt("tooltip"),Zt("icon"),Kt("items",NM)],PM),VM=Mt("type",{submit:IM,cancel:IM,custom:IM,menu:LM}),FM=[$t("type"),$t("text"),Wt("level",["info","warn","error","success"]),$t("icon"),nn("url","")],jM=dt(FM),UM=[$t("type"),$t("text"),cn("disabled",!1),cn("primary",!1),yt("name","name",Xe((function(){return ii("button-name")})),Pt),Zt("icon"),cn("borderless",!1)],$M=dt(UM),WM=[$t("type"),$t("name"),$t("label"),cn("disabled",!1)],qM=dt(WM),GM=Ht,XM=[$t("type"),$t("name")],KM=XM.concat([Zt("label")]),YM=KM.concat([nn("columns","auto")]),JM=dt(YM),QM=kt([$t("value"),$t("text"),$t("icon")]),ZM=dt(KM),eR=Pt,tR=dt(KM),nR=Pt,rR=XM.concat([an("tag","textarea"),$t("scriptId"),$t("scriptUrl"),(xM=void 0,rn("settings",xM,Vt))]),oR=XM.concat([an("tag","textarea"),qt("init")]),iR=_t((function(e){return Et("customeditor.old",ft(oR),e).orThunk((function(){return Et("customeditor.new",ft(rR),e)}))})),aR=Pt,uR=dt(KM),cR=mt(Ct),sR=function(e){return[$t("type"),Ut("columns",Bt),e]},lR=[$t("type"),$t("html"),un("presets","presentation",["presentation","document"])],fR=dt(lR),dR=KM.concat([cn("sandboxed",!0)]),mR=dt(dR),gR=Pt,hR=KM.concat([Ut("currentState",dt([jt("blob"),$t("url")]))]),pR=dt(hR),vR=KM.concat([Zt("inputMode"),Zt("placeholder"),cn("maximized",!1),cn("disabled",!1)]),bR=dt(vR),yR=Pt,xR=[$t("text"),$t("value")],wR=[$t("text"),Kt("items",(wM=function(){return CR},CM=Ue((function(){return wM()})),{extract:function(e,t,n){return CM().extract(e,t,n)},toString:function(){return CM().toString()}}))],CR=gt([dt(xR),dt(wR)]),kR=KM.concat([Kt("items",CR),cn("disabled",!1)]),SR=dt(kR),_R=Pt,OR=KM.concat([Xt("items",[$t("text"),$t("value")]),on("size",1),cn("disabled",!1)]),ER=dt(OR),TR=Pt,zR=KM.concat([cn("constrain",!0),cn("disabled",!1)]),DR=dt(zR),AR=dt([$t("width"),$t("height")]),MR=[$t("type"),Kt("header",Pt),Kt("cells",mt(Pt))],RR=dt(MR),NR=KM.concat([Zt("placeholder"),cn("maximized",!1),cn("disabled",!1)]),BR=dt(NR),PR=Pt,HR=KM.concat([un("filetype","file",["image","media","file"]),nn("disabled",!1)]),IR=dt(HR),LR=dt([$t("value"),nn("meta",{})]),VR=function(e){return yt("items","items",qe(),mt(_t((function(t){return Et("Checking item of "+e,FR,t).fold((function(e){return fe.error(Dt(e))}),(function(e){return fe.value(e)}))}))))},FR=St((function(){return At("type",{alertbanner:jM,bar:dt((t=VR("bar"),[$t("type"),t])),button:$M,checkbox:qM,colorinput:ZM,colorpicker:tR,dropzone:uR,grid:dt(sR(VR("grid"))),iframe:mR,input:bR,listbox:SR,selectbox:ER,sizeinput:DR,textarea:BR,urlinput:IR,customeditor:iR,htmlpanel:fR,imagetools:pR,collection:JM,label:dt((e=VR("label"),[$t("type"),$t("label"),e])),table:RR,panel:UR});var e,t})),jR=[$t("type"),nn("classes",[]),Kt("items",FR)],UR=dt(jR),$R=[yt("name","name",Xe((function(){return ii("tab-name")})),Pt),$t("title"),Kt("items",FR)],WR=[$t("type"),Xt("tabs",$R)],qR=dt(WR),GR=HM,XR=VM,KR=dt([$t("title"),Ut("body",At("type",{panel:UR,tabpanel:qR})),an("size","normal"),Kt("buttons",XR),nn("initialData",{}),sn("onAction",n),sn("onChange",n),sn("onSubmit",n),sn("onClose",n),sn("onCancel",n),nn("onTabChange",n)]),YR=dt(g([Wt("type",["cancel","custom"])],GR)),JR=dt([$t("title"),$t("url"),Qt("height"),Qt("width"),Jt("buttons",mt(YR)),sn("onAction",n),sn("onCancel",n),sn("onClose",n),sn("onMessage",n)]),QR=function e(t){return T(t)?[t].concat(Z(Ne(t),e)):z(t)?Z(t,e):[]},ZR=function(e){return E(e.type)&&E(e.name)},eN={checkbox:GM,colorinput:eR,colorpicker:nR,dropzone:cR,input:yR,iframe:gR,sizeinput:AR,selectbox:TR,listbox:_R,size:AR,textarea:PR,urlinput:LR,customeditor:aR,collection:QM,togglemenuitem:BM},tN=function(e){var t=G(QR(e),ZR),n=Z(t,(function(e){return t=e,S.from(eN[t.type]).fold((function(){return[]}),(function(t){return[Ut(e.name,t)]}));var t}));return dt(n)},nN=function(e){return{internalDialog:Tt(Et("dialog",KR,e)),dataValidator:tN(e),initialData:e.initialData}},rN={open:function(e,t){var n=nN(t);return e(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(e,t){return e(Tt(Et("dialog",JR,t)))},redial:nN},oN=function(e){var t=[],n={};return Te(e,(function(e,r){e.fold((function(){t.push(r)}),(function(e){n[r]=e}))})),0<t.length?fe.error(t):fe.value(n)},iN=Xf({name:"TabButton",configFields:[nn("uid",void 0),jt("value"),yt("dom","dom",Ke((function(){return{attributes:{role:"tab",id:ii("aria"),"aria-selected":"false"}}})),Rt()),Yt("action"),nn("domModification",{}),$l("tabButtonBehaviours",[bg,ug,Ul]),jt("view")],factory:function(e,t){return{uid:e.uid,dom:e.dom,components:e.components,events:Mg(e.action),behaviours:ql(e.tabButtonBehaviours,[bg.config({}),ug.config({mode:"execution",useSpace:!0,useEnter:!0}),Ul.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification}}}),aN=o([jt("tabs"),jt("dom"),nn("clickToDismiss",!1),$l("tabbarBehaviours",[dd,ug]),mu(["tabClass","selectedClass"])]),uN=kf({factory:iN,name:"tabs",unit:"tab",overrides:function(e){var t=function(e,t){dd.dehighlight(e,t),Kr(e,Wr(),{tabbar:e,button:t})},r=function(e,t){dd.highlight(e,t),Kr(e,$r(),{tabbar:e,button:t})};return{action:function(o){var i=o.getSystem().getByUid(e.uid).getOrDie(),a=dd.isHighlighted(i,o);(a&&e.clickToDismiss?t:a?n:r)(i,o)},domModification:{classes:[e.markers.tabClass]}}}}),cN=o([uN]),sN=Kf({name:"Tabbar",configFields:aN(),partFields:cN(),factory:function(e,t,n,r){return{uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:ql(e.tabbarBehaviours,[dd.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:function(e,t){Ko(t.element,"aria-selected","true")},onDehighlight:function(e,t){Ko(t.element,"aria-selected","false")}}),ug.config({mode:"flow",getInitial:function(e){return dd.getHighlighted(e).map((function(e){return e.element}))},selector:"."+e.markers.tabClass,executeOnMove:!0})])}}}),lN=Xf({name:"Tabview",configFields:[$l("tabviewBehaviours",[dg])],factory:function(e,t){return{uid:e.uid,dom:e.dom,behaviours:ql(e.tabviewBehaviours,[dg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),fN=o([nn("selectFirst",!0),hu("onChangeTab"),hu("onDismissTab"),nn("tabs",[]),$l("tabSectionBehaviours",[])]),dN=xf({factory:sN,schema:[jt("dom"),Gt("markers",[jt("tabClass"),jt("selectedClass")])],name:"tabbar",defaults:function(e){return{tabs:e.tabs}}}),mN=xf({factory:lN,name:"tabview"}),gN=o([dN,mN]),hN=Kf({name:"TabSection",configFields:fN(),partFields:gN(),factory:function(e,t,n,r){var o=function(t,n){Nf(t,e,"tabbar").each((function(e){n(e).each(Yr)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:Wl(e.tabSectionBehaviours),events:eo(Q([e.selectFirst?[lo((function(e,t){o(e,dd.getFirst)}))]:[],[ro($r(),(function(t,n){var r,o,i=n.event.button;r=i,o=Ul.getValue(r),Nf(r,e,"tabview").each((function(t){Y(e.tabs,(function(e){return e.value===o})).each((function(n){var o=n.view();Jo(r.element,"id").each((function(e){Ko(t.element,"aria-labelledby",e)})),dg.set(t,o),e.onChangeTab(t,r,o)}))}))})),ro(Wr(),(function(t,n){var r=n.event.button;e.onDismissTab(t,r)}))]])),apis:{getViewItems:function(t){return Nf(t,e,"tabview").map((function(e){return dg.contents(e)})).getOr([])},showTab:function(e,t){o(e,(function(e){var n=dd.getCandidates(e);return Y(n,(function(e){return Ul.getValue(e)===t})).filter((function(t){return!dd.isHighlighted(e,t)}))}))}}}},apis:{getViewItems:function(e,t){return e.getViewItems(t)},showTab:function(e,t,n){e.showTab(t,n)}}}),pN=function(e,t){Ki(e,"height",t+"px"),$n().browser.isIE()?na(e,"flex-basis"):Ki(e,"flex-basis",t+"px")},vN=function(e,t,n){Ka(e,'[role="dialog"]').each((function(e){Ya(e,'[role="tablist"]').each((function(r){n.get().map((function(n){return Ki(t,"height","0"),Ki(t,"flex-basis","0"),Math.min(n,(i=t,a=r,u=ko(o=e).dom,c=Ka(o,".tox-dialog-wrap").getOr(o),s="fixed"===Qi(c,"position")?Math.max(u.clientHeight,window.innerHeight):Math.max(u.offsetHeight,u.scrollHeight),l=ya(i),f=i.dom.offsetLeft>=a.dom.offsetLeft+Ea(a)?Math.max(ya(a),l):l,d=parseInt(Qi(o,"margin-top"),10)||0,m=parseInt(Qi(o,"margin-bottom"),10)||0,s-(ya(o)+d+m-f)));var o,i,a,u,c,s,l,f,d,m})).each((function(e){pN(t,e)}))}))}))},bN=function(e){return Ya(e,'[role="tabpanel"]')},yN=function(e){var t;return{smartTabHeight:(t=mn(S.none()),{extraEvents:[lo((function(n){var r=n.element;bN(r).each((function(o){var i;Ki(o,"visibility","hidden"),n.getSystem().getByDom(o).toOptional().each((function(n){var r,i,a,u=(i=o,a=n,$(r=e,(function(e,t){dg.set(a,r[t].view());var n=i.dom.getBoundingClientRect();return dg.set(a,[]),n.height}))),c=ie(re(u,(function(e,t){return t<e?-1:e<t?1:0})));t.set(c)})),vN(r,o,t),na(o,"visibility"),i=n,ie(e).each((function(e){return hN.showTab(i,e.value)})),mh.requestAnimationFrame((function(){vN(r,o,t)}))}))})),ro(Hr(),(function(e){var n=e.element;bN(n).each((function(e){vN(n,e,t)}))})),ro(sx,(function(e,n){var r=e.element;bN(r).each((function(e){var n=hc(Ro(e));Ki(e,"visibility","hidden");var o=ea(e,"height").map((function(e){return parseInt(e,10)}));na(e,"height"),na(e,"flex-basis");var i=e.dom.getBoundingClientRect().height;o.forall((function(e){return e<i}))?(t.set(S.from(i)),vN(r,e,t)):o.each((function(t){pN(e,t)})),na(e,"visibility"),n.each(gc)}))}))],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}},xN="send-data-to-section",wN="send-data-to-view",CN=ii("update-dialog"),kN=ii("update-title"),SN=ii("update-body"),_N=ii("update-footer"),ON=ii("body-send-message"),EN=function(e,t,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:d(d({},t.map((function(e){return{id:e}})).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:ac([sk(0),aT.config({channel:SN,updateState:function(e,t){return S.some({isTabPanel:function(){return"tabpanel"===t.body.type}})},renderComponents:function(e){switch(e.body.type){case"tabpanel":return[(i=e.body,a=n,c=mn({}),s=function(e){var t=Ul.getValue(e),n=oN(t).getOr({}),r=c.get(),o=Fe(r,n);c.set(o)},l=function(e){var t=c.get();Ul.setValue(e,t)},f=mn(null),d=$(i.tabs,(function(e){return{value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:a.shared.providers.translate(e.title)},view:function(){return[ZC.sketch((function(t){return{dom:{tag:"div",classes:["tox-form"]},components:$(e.items,(function(e){return lO(t,e,a)})),formBehaviours:ac([ug.config({mode:"acyclic",useTabstopAt:u(Tk)}),mg("TabView.form.events",[lo(l),fo(s)]),dc.config({channels:Ze([{key:xN,value:{onReceive:s}},{key:wN,value:{onReceive:l}}])})])}}))]}}})),m=yN(d).smartTabHeight,hN.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(e,t,n){var r=Ul.getValue(t);Kr(e,cx,{name:r,oldName:f.get()}),f.set(r)},tabs:d,components:[hN.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[sN.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ac([Ky.config({})])}),hN.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:m.selectFirst,tabSectionBehaviours:ac([mg("tabpanel",m.extraEvents),ug.config({mode:"acyclic"}),td.config({find:function(e){return ie(hN.getViewItems(e))}}),Ul.config({store:{mode:"manual",getValue:function(e){return e.getSystem().broadcastOn([xN],{}),c.get()},setValue:function(e,t){c.set(t),e.getSystem().broadcastOn([wN],{})}}})])}))];default:return[(t=e.body,r=n,{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[(o=hh(ZC.sketch((function(e){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:$(t.items,(function(t){return lO(e,t,r)}))}})))).asSpec()]}],behaviours:ac([ug.config({mode:"acyclic",useTabstopAt:u(Tk)}),ck(o),vk(o,{postprocess:function(e){return oN(e).fold((function(e){return console.error(e),{}}),(function(e){return e}))}})])})]}var t,r,o,i,a,c,s,l,f,d,m},initialData:e})])}},TN=nb.deviceType.isTouch(),zN=function(e,t){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]}},DN=function(e,t){return RM.parts.close(gh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:ac([Ky.config({})])}))},AN=function(){return RM.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},MN=function(e,t){return RM.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:vD("<p>"+t.translate(e)+"</p>")}]}]})},RN=function(e){return RM.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e})},NN=function(e,t){return[jy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),jy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]},BN=function(e){var t,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return RM.sketch({lazySink:e.lazySink,onEscape:function(t){return e.onEscape(t),S.some(!0)},useTabstopAt:function(e){return!Tk(e)},dom:{tag:"div",classes:[n].concat(e.extraClasses),styles:d({position:"relative"},e.extraStyles)},components:g([e.header,e.body],e.footer.toArray()),parts:{blocker:{dom:vD('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:TN?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:ac(g([bg.config({}),mg("dialog-events",e.dialogEvents.concat([so(dr(),(function(e,t){ug.focusIn(e)}))])),mg("scroll-lock",[lo((function(){Hi(Wi(),i)})),fo((function(){Li(Wi(),i)}))])],e.extraBehaviours)),eventOrder:d(((t={})[Er()]=["dialog-events"],t[Ir()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[Lr()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),e.eventOrder)})},PN=function(e){return gh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),title:e.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:vh("close",e.icons)}}],action:function(e){Xr(e,rx)}})},HN=function(e,t,n){var r=function(e){return[da(n.translate(e.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:d({},t.map((function(e){return{id:e}})).getOr({}))},components:r(e),behaviours:ac([aT.config({channel:kN,renderComponents:r})])}},IN=function(){return{dom:vD('<div class="tox-dialog__draghandle"></div>')}},LN=function(e,t){return n={title:t.shared.providers.translate(e),draggable:t.dialog.isDraggableModal()},r=t.shared.providers,o=RM.parts.title(HN(n,S.none(),r)),i=RM.parts.draghandle(IN()),a=RM.parts.close(PN(r)),u=[o].concat(n.draggable?[i]:[]).concat([a]),jy.sketch({dom:vD('<div class="tox-dialog__header"></div>'),components:u});var n,r,o,i,a,u},VN=function(e,t,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:vD('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},FN=function(e,t,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){RM.setBusy(e(),(function(e,r){return VN(n.message,r,t)}))},onUnblock:function(){RM.setIdle(e())}}},jN=function(e,t,n,r){var o;return ha(BN(d(d({},e),{lazySink:r.shared.getSink,extraBehaviours:g([aT.config({channel:CN,updateState:function(e,t){return S.some(t)},initialData:t}),xk({})],e.extraBehaviours),onEscape:function(e){Xr(e,rx)},dialogEvents:n,eventOrder:((o={})[Or()]=[aT.name(),dc.name()],o[Ir()]=["scroll-lock",aT.name(),"messages","dialog-events","alloy.base.behaviour"],o[Lr()]=["alloy.base.behaviour","dialog-events","messages",aT.name(),"scroll-lock"],o)})))},UN=function(e){return $(e,(function(e){return"menu"===e.type?(n=$((t=e).items,(function(e){var t=mn(!1);return d(d({},e),{storage:t})})),d(d({},t),{items:n})):e;var t,n}))},$N=function(e){return K(e,(function(e,t){return"menu"!==t.type?e:K(t.items,(function(e,t){return e[t.name]=t.storage,e}),e)}),{})},WN=function(e,t){return[uo(dr(),Ek),e(nx,(function(e,n){t.onClose(),n.onClose()})),e(rx,(function(e,t,n,r){t.onCancel(e),Xr(r,nx)})),ro(ux,(function(e,n){return t.onUnblock()})),ro(ax,(function(e,n){return t.onBlock(n.event)}))]},qN=function(e,t){var n=function(t,n){return ro(t,(function(t,o){r(t,(function(r,i){n(e(),r,o.event,t)}))}))},r=function(e,t){aT.getState(e).get().each((function(n){t(n,e)}))};return g(WN(n,t),[n(ox,(function(e,t,n){t.onAction(e,{name:n.name})}))])},GN=function(e,t,n){var r=function(t,n){return ro(t,(function(t,r){o(t,(function(o,i){n(e(),o,r.event,t)}))}))},o=function(e,t){aT.getState(e).get().each((function(n){t(n.internalDialog,e)}))};return g(WN(r,t),[r(ix,(function(e,t){return t.onSubmit(e)})),r(tx,(function(e,t,n){t.onChange(e,{name:n.name})})),r(ox,(function(e,t,r,o){var i=function(){return ug.focusIn(o)},a=function(e){return Qo(e,"disabled")||Jo(e,"aria-disabled").exists((function(e){return"true"===e}))},u=Ro(o.element),c=hc(u);t.onAction(e,{name:r.name,value:r.value}),hc(u).fold(i,(function(e){a(e)||c.exists((function(t){return Kn(e,t)&&a(t)}))?i():n().toOptional().filter((function(t){return!Kn(t.element,e)})).each(i)}))})),r(cx,(function(e,t,n){t.onTabChange(e,{newTabName:n.name,oldTabName:n.oldName})})),fo((function(t){var n=e();Ul.setValue(t,n.getData())}))])},XN=function(e,t){var n=t.map((function(e){return e.footerButtons})).getOr([]),r=q(n,(function(e){return"start"===e.align})),o=function(e,t){return jy.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+e]},components:$(t,(function(e){return e.memento.asSpec()}))})};return[o("start",r.pass),o("end",r.fail)]},KN=function(e,t){return{dom:vD('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ac([aT.config({channel:_N,initialData:e,updateState:function(e,n){var r=$(n.buttons,(function(e){var n,r,o=hh((r=t,QS(n=e,n.type,r)));return{name:e.name,align:e.align,memento:o}}));return S.some({lookupByName:function(e,t){return n=e,o=t,Y(r,(function(e){return e.name===o})).bind((function(e){return e.memento.getOpt(n)}));var n,o},footerButtons:r})},renderComponents:XN})])}},YN=KN,JN=function(e,t){return RM.parts.footer(KN(e,t))},QN=function(e,t){if(e.getRoot().getSystem().isConnected()){var n=td.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return ZC.getField(n,t).fold((function(){var r=e.getFooter();return aT.getState(r).get().bind((function(e){return e.lookupByName(n,t)}))}),(function(e){return S.some(e)}))}return S.none()},ZN=function(e,t,n){var r=function(t){var n=e.getRoot();n.getSystem().isConnected()&&t(n)},o={getData:function(){var t=e.getRoot(),r=t.getSystem().isConnected()?e.getFormWrapper():t,o=Ul.getValue(r),i=ze(n,(function(e){return e.get()}));return d(d({},o),i)},setData:function(t){r((function(r){var i,a,u=o.getData(),c=d(d({},u),t),s=(i=c,a=e.getRoot(),aT.getState(a).get().map((function(e){return Tt(Et("data",e.dataValidator,i))})).getOr(i)),l=e.getFormWrapper();Ul.setValue(l,s),Te(n,(function(e,t){Pe(c,t)&&e.set(c[t])}))}))},disable:function(t){QN(e,t).each(hv.disable)},enable:function(t){QN(e,t).each(hv.enable)},focus:function(t){QN(e,t).each(bg.focus)},block:function(e){if(!E(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(t){Kr(t,ax,{message:e})}))},unblock:function(){r((function(e){Xr(e,ux)}))},showTab:function(t){r((function(n){var r=e.getBody();aT.getState(r).get().exists((function(e){return e.isTabPanel()}))&&td.getCurrent(r).each((function(e){hN.showTab(e,t)}))}))},redial:function(e){r((function(n){var r=t(e);n.getSystem().broadcastOn([CN],r),n.getSystem().broadcastOn([kN],r.internalDialog),n.getSystem().broadcastOn([SN],r.internalDialog),n.getSystem().broadcastOn([_N],r.internalDialog),o.setData(r.initialData)}))},close:function(){r((function(e){Xr(e,nx)}))}};return o},eB=function(e,t,n){var r,o,i,a=LN(e.internalDialog.title,n),u=(r={body:e.internalDialog.body},o=n,i=EN(r,S.none(),o,!1),RM.parts.body(i)),c=UN(e.internalDialog.buttons),s=$N(c),l=JN({buttons:c},n),f=GN((function(){return h}),FN((function(){return g}),n.shared.providers,t),n.shared.getSink),d=function(e){switch(e){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(e.internalDialog.size),m={header:a,body:u,footer:S.some(l),extraClasses:d,extraBehaviours:[],extraStyles:{}},g=jN(m,e,f,n),h=ZN({getRoot:function(){return g},getBody:function(){return RM.getBody(g)},getFooter:function(){return RM.getFooter(g)},getFormWrapper:function(){var e=RM.getBody(g);return td.getCurrent(e).getOr(e)}},t.redial,s);return{dialog:g,instanceApi:h}},tB=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m=ii("dialog-label"),g=ii("dialog-content"),h=hh((a={title:e.internalDialog.title,draggable:!0},u=m,c=n.shared.providers,jy.sketch({dom:vD('<div class="tox-dialog__header"></div>'),components:[HN(a,S.some(u),c),IN(),PN(c)],containerBehaviours:ac([hM.config({mode:"mouse",blockerClass:"blocker",getTarget:function(e){return Ja(e,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),p=hh((s={body:e.internalDialog.body},l=g,f=n,d=r,EN(s,S.some(l),f,d))),v=UN(e.internalDialog.buttons),b=$N(v),y=hh(YN({buttons:v},n)),x=GN((function(){return C}),{onBlock:function(e){MM.block(w,(function(t,r){return VN(e.message,r,n.shared.providers)}))},onUnblock:function(){MM.unblock(w)},onClose:function(){return t.closeWindow()}},n.shared.getSink),w=ha({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((o={role:"dialog"})["aria-labelledby"]=m,o["aria-describedby"]=""+g,o)},eventOrder:((i={})[Or()]=[aT.name(),dc.name()],i[Er()]=["execute-on-form"],i[Ir()]=["reflecting","execute-on-form"],i),behaviours:ac([ug.config({mode:"cyclic",onEscape:function(e){return Xr(e,nx),S.some(!0)},useTabstopAt:function(e){return!Tk(e)&&("button"!==ho(e)||"disabled"!==Yo(e,"disabled"))}}),aT.config({channel:CN,updateState:function(e,t){return S.some(t)},initialData:e}),bg.config({}),mg("execute-on-form",x.concat([so(dr(),(function(e,t){ug.focusIn(e)}))])),MM.config({getRoot:function(){return S.some(w)}}),dg.config({}),xk({})]),components:[h.asSpec(),p.asSpec(),y.asSpec()]}),C=ZN({getRoot:function(){return w},getFooter:function(){return y.get(w)},getBody:function(){return p.get(w)},getFormWrapper:function(){var e=p.get(w);return td.getCurrent(e).getOr(e)}},t.redial,b);return{dialog:w,instanceApi:C}},nB=tinymce.util.Tools.resolve("tinymce.util.URI"),rB=["insertContent","setContent","execCommand","close","block","unblock"],oB=function(e){return T(e)&&-1!==rB.indexOf(e.mceAction)},iB=function(e,t,n,r){var o,i,a,c,s=LN(e.title,r),l=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[_k({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:ac([Ky.config({}),bg.config({})])})]}],behaviours:ac([ug.config({mode:"acyclic",useTabstopAt:u(Tk)})])},RM.parts.body(i)),f=e.buttons.bind((function(e){return 0===e.length?S.none():S.some(JN({buttons:e},r))})),m=qN((function(){return w}),FN((function(){return x}),r.shared.providers,t)),g=d(d({},e.height.fold((function(){return{}}),(function(e){return{height:e+"px","max-height":e+"px"}}))),e.width.fold((function(){return{}}),(function(e){return{width:e+"px","max-width":e+"px"}}))),h=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],p=new nB(e.url,{base_uri:new nB(window.location.href)}),v=p.protocol+"://"+p.host+(p.port?":"+p.port:""),b=mn(S.none()),y=[mg("messages",[lo((function(){var t=Sy(hn.fromDom(window),"message",(function(t){var r,o;p.isSameOrigin(new nB(t.raw.origin))&&(r=t.raw.data,oB(r)?function(e,t,n){switch(n.mceAction){case"insertContent":e.insertContent(n.content);break;case"setContent":e.setContent(n.content);break;case"execCommand":var r=!!D(n.ui)&&n.ui;e.execCommand(n.cmd,r,n.value);break;case"close":t.close();break;case"block":t.block(n.message);break;case"unblock":t.unblock()}}(n,w,r):!oB(o=r)&&T(o)&&Pe(o,"mceAction")&&e.onMessage(w,r))}));b.set(S.some(t))})),fo((function(){b.get().each((function(e){return e.unbind()}))}))]),dc.config({channels:((o={})[ON]={onReceive:function(e,t){Ya(e.element,"iframe").each((function(e){e.dom.contentWindow.postMessage(t,v)}))}},o)})],x=jN({header:s,body:l,footer:f,extraClasses:h,extraBehaviours:y,extraStyles:g},e,m,r),w=(c=function(e){a.getSystem().isConnected()&&e(a)},{block:function(e){if(!E(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");c((function(t){Kr(t,ax,{message:e})}))},unblock:function(){c((function(e){Xr(e,ux)}))},close:function(){c((function(e){Xr(e,nx)}))},sendMessage:function(e){c((function(t){t.getSystem().broadcastOn([ON],e)}))}});return{dialog:a=x,instanceApi:w}},aB=function(e){var t,n,r,o,i=e.backstage,a=e.editor,u=Lv(a),c=(n=(t=e).backstage.shared,{open:function(e,r){var o=function(){RM.hide(c),r()},i=hh(QS({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:S.none()},"cancel",t.backstage)),a=AN(),u=DN(o,n.providers),c=ha(BN({lazySink:function(){return n.getSink()},header:zN(a,u),body:MN(e,n.providers),footer:S.some(RN(NN([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[ro(rx,o)],eventOrder:{}}));RM.show(c);var s=i.get(c);bg.focus(s)}}),s=(o=(r=e).backstage.shared,{open:function(e,t){var n=function(e){RM.hide(s),t(e)},i=hh(QS({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:S.none()},"submit",r.backstage)),a=QS({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:S.none()},"cancel",r.backstage),u=AN(),c=DN((function(){return n(!1)}),o.providers),s=ha(BN({lazySink:function(){return o.getSink()},header:zN(u,c),body:MN(e,o.providers),footer:S.some(RN(NN([],[a,i.asSpec()]))),onEscape:function(){return n(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[ro(rx,(function(){return n(!1)})),ro(ix,(function(){return n(!0)}))],eventOrder:{}}));RM.show(s);var l=i.get(s);bg.focus(l)}}),l=function(e,t){return rN.openUrl((function(e){var n=iB(e,{closeWindow:function(){RM.hide(n.dialog),t(n.instanceApi)}},a,i);return RM.show(n.dialog),n.instanceApi}),e)},f=function(e,t){return rN.open((function(e,n,r){var o=n,a=eB({dataValidator:r,initialData:o,internalDialog:e},{redial:rN.redial,closeWindow:function(){RM.hide(a.dialog),t(a.instanceApi)}},i);return RM.show(a.dialog),a.instanceApi.setData(o),a.instanceApi}),e)},m=function(e,t,n,r){return rN.open((function(e,o,c){var s,l,f,m=Tt(Et("data",c,o)),h=(s=mn(S.none()),{clear:function(){return s.set(S.none())},set:function(e){return s.set(S.some(e))},isSet:function(){return s.get().isSome()},on:function(e){return s.get().each(e)}}),p=i.shared.header.isPositionedAtTop(),v=function(){return h.on((function(e){th.reposition(e),Xz.refresh(e)}))},b=tB({dataValidator:c,initialData:m,internalDialog:e},{redial:rN.redial,closeWindow:function(){h.on(th.hide),a.off("ResizeEditor",v),h.clear(),n(b.instanceApi)}},i,r),y=ha(th.sketch(d(d({lazySink:i.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},p?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:ac(g([mg("window-manager-inline-events",[ro(Vr(),(function(e,t){Xr(b.dialog,rx)}))])],(l=a,f=p,u&&f?[]:[Xz.config({contextual:{lazyContext:function(){return S.some(Va(hn.fromDom(l.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]))),isExtraPart:function(e,t){return Ey(n=t,".tox-alert-dialog")||Ey(n,".tox-confirm-dialog");var n}})));return h.set(y),th.showWithin(y,t,pa(b.dialog),S.some(Wi())),u&&p||(Xz.refresh(y),a.on("ResizeEditor",v)),b.instanceApi.setData(m),ug.focusIn(b.dialog),b.instanceApi}),e)};return{open:function(e,t,n){return void 0!==t&&"toolbar"===t.inline?m(e,i.shared.anchors.inlineDialog(),n,t.ariaAttrs):void 0!==t&&"cursor"===t.inline?m(e,i.shared.anchors.cursor(),n,t.ariaAttrs):f(e,n)},openUrl:function(e,t){return l(e,t)},alert:function(e,t){c.open(e,(function(){t()}))},close:function(e){e.close()},confirm:function(e,t){s.open(e,(function(e){t(e)}))}}};f.add("silver",(function(e){var t=OM(e),n=t.uiMothership,r=t.backstage,i=t.renderUI,a=t.getUi;Cy(e,r.shared);var u=aB({editor:e,backstage:r});return{renderUI:i,getWindowManagerImpl:o(u),getNotificationManagerImpl:function(){return xh(0,{backstage:r},n)},ui:a()}}))}()}).call(this,n("c8ba"))},bbf9:function(e,t,n){"use strict";n("f653")},bc8f:function(e,t,n){"use strict";n("999b")},c085:function(e,t,n){"use strict";n("58e6")},cb1b:function(e,t){tinymce.addI18n("zh_CN",{Redo:"重做",Undo:"撤销",Cut:"剪切",Copy:"复制",Paste:"粘贴","Select all":"全选","New document":"新文件",Ok:"确定",Cancel:"取消","Visual aids":"网格线",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Superscript:"上标",Subscript:"下标","Clear formatting":"清除格式","Align left":"左边对齐","Align center":"中间对齐","Align right":"右边对齐",Justify:"两端对齐","Bullet list":"项目符号","Numbered list":"编号列表","Decrease indent":"减少缩进","Increase indent":"增加缩进",Close:"关闭",Formats:"格式","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板，请使用Ctrl+X/C/V等快捷键。",Headers:"标题","Header 1":"标题1","Header 2":"标题2","Header 3":"标题3","Header 4":"标题4","Header 5":"标题5","Header 6":"标题6",Headings:"标题","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Heading 5":"标题5","Heading 6":"标题6",Preformatted:"预先格式化的",Div:"Div",Pre:"Pre",Code:"代码",Paragraph:"段落",Blockquote:"引文区块",Inline:"文本",Blocks:"基块","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式，再次点击可以回到普通粘贴模式。",Fonts:"字体","Font Sizes":"字号",Class:"类型","Browse for an image":"浏览图像",OR:"或","Drop an image here":"拖放一张图像至此",Upload:"上传",Block:"块",Align:"对齐",Default:"默认",Circle:"空心圆",Disc:"实心圆",Square:"方块","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马字母","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Anchor...":"锚点...",Name:"名称",Id:"标识符","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头，后跟字母、数字、破折号、点、冒号或下划线。","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存，确定要离开？","Restore last draft":"恢复上次的草稿","Special character...":"特殊字符...","Source code":"源代码","Insert/Edit code sample":"插入/编辑代码示例",Language:"语言","Code sample...":"示例代码...","Color Picker":"选色器",R:"R",G:"G",B:"B","Left to right":"从左到右","Right to left":"从右到左","Emoticons...":"表情符号...","Metadata and Document Properties":"元数据和文档属性",Title:"标题",Keywords:"关键词",Description:"描述",Robots:"机器人",Author:"作者",Encoding:"编码",Fullscreen:"全屏",Action:"操作",Shortcut:"快捷键",Help:"帮助",Address:"地址","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏","Focus to element path":"移动焦点到元素路径","Focus to contextual toolbar":"移动焦点到上下文菜单","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Save (if save plugin activated)":"保存(如果保存插件已激活)","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Plugins installed ({0}):":"已安装插件 ({0}):","Premium plugins:":"优秀插件：","Learn more...":"了解更多...","You are using {0}":"你正在使用 {0}",Plugins:"插件","Handy Shortcuts":"快捷键","Horizontal line":"水平分割线","Insert/edit image":"插入/编辑图片","Image description":"图片描述",Source:"地址",Dimensions:"大小","Constrain proportions":"保持纵横比",General:"普通",Advanced:"高级",Style:"样式","Vertical space":"垂直边距","Horizontal space":"水平边距",Border:"边框","Insert image":"插入图片","Image...":"图片...","Image list":"图片列表","Rotate counterclockwise":"逆时针旋转","Rotate clockwise":"顺时针旋转","Flip vertically":"垂直翻转","Flip horizontally":"水平翻转","Edit image":"编辑图片","Image options":"图片选项","Zoom in":"放大","Zoom out":"缩小",Crop:"裁剪",Resize:"调整大小",Orientation:"方向",Brightness:"亮度",Sharpen:"锐化",Contrast:"对比度","Color levels":"颜色层次",Gamma:"伽马值",Invert:"反转",Apply:"应用",Back:"后退","Insert date/time":"插入日期/时间","Date/time":"日期/时间","Insert/Edit Link":"插入/编辑链接","Insert/edit link":"插入/编辑链接","Text to display":"显示文字",Url:"地址","Open link in...":"链接打开位置...","Current window":"当前窗口",None:"无","New window":"在新窗口打开","Remove link":"删除链接",Anchors:"锚点","Link...":"链接...","Paste or type a link":"粘贴或输入链接","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址，需要加上mailto:前缀吗？","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接，需要加上http://:前缀吗？","Link list":"链接列表","Insert video":"插入视频","Insert/edit video":"插入/编辑视频","Insert/edit media":"插入/编辑媒体","Alternative source":"镜像","Alternative source URL":"替代来源网址","Media poster (Image URL)":"封面(图片地址)","Paste your embed code below:":"将内嵌代码粘贴在下面:",Embed:"内嵌","Media...":"多媒体...","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览","Print...":"打印...",Save:"保存",Find:"查找","Replace with":"替换为",Replace:"替换","Replace all":"全部替换",Previous:"上一个",Next:"下一个","Find and replace...":"查找并替换...","Could not find the specified string.":"未找到搜索内容.","Match case":"区分大小写","Find whole words only":"全字匹配","Spell check":"拼写检查",Ignore:"忽略","Ignore all":"全部忽略",Finish:"完成","Add to Dictionary":"添加到字典","Insert table":"插入表格","Table properties":"表格属性","Delete table":"删除表格",Cell:"单元格",Row:"行",Column:"列","Cell properties":"单元格属性","Merge cells":"合并单元格","Split cell":"拆分单元格","Insert row before":"在上方插入","Insert row after":"在下方插入","Delete row":"删除行","Row properties":"行属性","Cut row":"剪切行","Copy row":"复制行","Paste row before":"粘贴到上方","Paste row after":"粘贴到下方","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cols:"列",Rows:"行",Width:"宽",Height:"高","Cell spacing":"单元格外间距","Cell padding":"单元格内边距","Show caption":"显示标题",Left:"左对齐",Center:"居中",Right:"右对齐","Cell type":"单元格类型",Scope:"范围",Alignment:"对齐方式","H Align":"水平对齐","V Align":"垂直对齐",Top:"顶部对齐",Middle:"垂直居中",Bottom:"底部对齐","Header cell":"表头单元格","Row group":"行组","Column group":"列组","Row type":"行类型",Header:"表头",Body:"表体",Footer:"表尾","Border color":"边框颜色","Insert template...":"插入模板...",Templates:"模板",Template:"模板","Text color":"文字颜色","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Remove color":"移除颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Word count":"字数",Count:"计数",Document:"文档",Selection:"选择",Words:"单词","Words: {0}":"字数：{0}","{0} words":"{0} 字",File:"文件",Edit:"编辑",Insert:"插入",View:"视图",Format:"格式",Table:"表格",Tools:"工具","Powered by {0}":"由{0}驱动","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单，按ALT-F10打开工具栏，按ALT-0查看帮助","Image title":"图片标题","Border width":"边框宽度","Border style":"边框样式",Error:"错误",Warn:"警告",Valid:"有效","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","System Font":"系统字体","Failed to upload image: {0}":"图片上传失败: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to initialize plugin: {0}":"插件初始化失败: {0}",example:"示例",Search:"搜索",All:"全部",Currency:"货币",Text:"文字",Quotations:"引用",Mathematical:"数学","Extended Latin":"拉丁语扩充",Symbols:"符号",Arrows:"箭头","User Defined":"自定义","dollar sign":"美元符号","currency sign":"货币符号","euro-currency sign":"欧元符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","french franc sign":"法郎符号","lira sign":"里拉符号","mill sign":"密尔符号","naira sign":"奈拉符号","peseta sign":"比塞塔符号","rupee sign":"卢比符号","won sign":"韩元符号","new sheqel sign":"新谢克尔符号","dong sign":"越南盾符号","kip sign":"老挝基普符号","tugrik sign":"图格里克符号","drachma sign":"德拉克马符号","german penny symbol":"德国便士符号","peso sign":"比索符号","guarani sign":"瓜拉尼符号","austral sign":"澳元符号","hryvnia sign":"格里夫尼亚符号","cedi sign":"塞地符号","livre tournois sign":"里弗弗尔符号","spesmilo sign":"spesmilo符号","tenge sign":"坚戈符号","indian rupee sign":"印度卢比","turkish lira sign":"土耳其里拉","nordic mark sign":"北欧马克","manat sign":"马纳特符号","ruble sign":"卢布符号","yen character":"日元字样","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样（港台地区）","yen/yuan character variant one":"元字样（大写）","Loading emoticons...":"加载表情符号...","Could not load emoticons":"不能加载表情符号",People:"人类","Animals and Nature":"动物和自然","Food and Drink":"食物和饮品",Activity:"活动","Travel and Places":"旅游和地点",Objects:"物件",Flags:"旗帜",Characters:"字符","Characters (no spaces)":"字符(无空格)","{0} characters":"{0} 个字符","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。",Update:"更新","Color swatch":"颜色样本",Turquoise:"青绿色",Green:"绿色",Blue:"蓝色",Purple:"紫色","Navy Blue":"海军蓝","Dark Turquoise":"深蓝绿色","Dark Green":"深绿色","Medium Blue":"中蓝色","Medium Purple":"中紫色","Midnight Blue":"深蓝色",Yellow:"黄色",Orange:"橙色",Red:"红色","Light Gray":"浅灰色",Gray:"灰色","Dark Yellow":"暗黄色","Dark Orange":"深橙色","Dark Red":"深红色","Medium Gray":"中灰色","Dark Gray":"深灰色","Light Green":"浅绿色","Light Yellow":"浅黄色","Light Red":"浅红色","Light Purple":"浅紫色","Light Blue":"浅蓝色","Dark Purple":"深紫色","Dark Blue":"深蓝色",Black:"黑色",White:"白色","Switch to or from fullscreen mode":"切换全屏模式","Open help dialog":"打开帮助对话框",history:"历史",styles:"样式",formatting:"格式化",alignment:"对齐",indentation:"缩进","permanent pen":"记号笔",comments:"备注","Format Painter":"格式刷","Insert/edit iframe":"插入/编辑框架",Capitalization:"大写",lowercase:"小写",UPPERCASE:"大写","Title Case":"首字母大写","Permanent Pen Properties":"永久笔属性","Permanent pen properties...":"永久笔属性...",Font:"字体",Size:"字号","More...":"更多...","Spellcheck Language":"拼写检查语言","Select...":"选择...",Preferences:"首选项",Yes:"是",No:"否","Keyboard Navigation":"键盘指引",Version:"版本",Anchor:"锚点","Special character":"特殊符号","Code sample":"代码示例",Color:"颜色",Emoticons:"表情","Document properties":"文档属性",Image:"图片","Insert link":"插入链接",Target:"打开方式",Link:"链接",Poster:"封面",Media:"媒体",Print:"打印",Prev:"上一个","Find and replace":"查找和替换","Whole words":"全字匹配",Spellcheck:"拼写检查",Caption:"标题","Insert template":"插入模板"})},cc82:function(e,t,n){},cfe8:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){var t=e.getContent({source_view:!0});e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:t},onSubmit:function(t){var n,r;n=e,r=t.getData().code,n.focus(),n.undoManager.transact((function(){n.setContent(r)})),n.selection.setCursorLocation(),n.nodeChanged(),t.close()}})};e.add("code",(function(e){var n,r;return(n=e).addCommand("mceCodeEditor",(function(){t(n)})),(r=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return t(r)}}),r.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return t(r)}}),{}}))}()},d141:function(e,t,n){(function(e,t){var r=n("7037").default;n("b0c0"),n("fb6a"),n("b64b"),n("99af"),n("a630"),n("3ca3"),n("a9e3"),n("5319"),n("ac1f"),n("841c"),n("d81d"),n("2b3d"),n("d3b7"),n("ddb0"),n("1276"),n("466d"),n("3410"),n("4de4"),n("a15b"),n("130f"),n("25f0"),n("10d1"),n("498a"),n("4d63"),n("a434"),n("7db0"),n("a4d3"),n("dca8"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("c7cd"),n("a1f0"),n("18a5"),function(){"use strict";var n=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=r(e);return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},o=function(e){return{eq:e}},i=o((function(e,t){return e===t})),a=function(e){return o((function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e.eq(t[o],n[o]))return!1;return!0}))},u=function(e,t){return n=a(e),r=function(e){return n=e,r=t,Array.prototype.slice.call(n).sort(r);var n,r},o((function(e,t){return n.eq(r(e),r(t))}));var n,r},c=function(e){return o((function(t,n){var r=Object.keys(t),o=Object.keys(n);if(!u(i).eq(r,o))return!1;for(var a=r.length,c=0;c<a;c++){var s=r[c];if(!e.eq(t[s],n[s]))return!1}return!0}))},s=o((function(e,t){if(e===t)return!0;var r=n(e);return r===n(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(r)?e===t:"array"===r?a(s).eq(e,t):"object"===r&&c(s).eq(e,t))})),l=function(){},f=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},d=function(e){return function(){return e}},m=function(e){return e};function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var h,p,v,b=function(e){return function(t){return!e(t)}},y=function(e){return function(){throw new Error(e)}},x=function(e){return e()},w=function(e){e()},C=d(!1),k=d(!0),S=function(){return _},_=(h=function(e){return e.isNone()},{fold:function(e,t){return e()},is:C,isSome:C,isNone:k,getOr:v=function(e){return e},getOrThunk:p=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:v,orThunk:p,map:S,each:l,bind:S,exists:C,forall:k,filter:S,equals:h,equals_:h,toArray:function(){return[]},toString:d("none()")}),O=function e(t){var n=d(t),r=function(){return i},o=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:k,isNone:C,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return e(n(t))},each:function(e){e(t)},bind:o,exists:o,forall:o,filter:function(e){return e(t)?i:_},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(C,(function(e){return n(t,e)}))}};return i},E={some:O,none:S,from:function(e){return null===e||void 0===e?_:O(e)}},T=function(e){return function(t){return o=r(n=t),(null===n?"null":"object"==o&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==o&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":o)===e;var n,o}},z=function(e){return function(t){return r(t)===e}},D=function(e){return function(t){return e===t}},A=T("string"),M=T("object"),R=T("array"),N=D(null),B=z("boolean"),P=D(void 0),H=function(e){return null===e||void 0===e},I=function(e){return!H(e)},L=z("function"),V=z("number"),F=Array.prototype.slice,j=Array.prototype.indexOf,U=Array.prototype.push,$=function(e,t){return j.call(e,t)},W=function(e,t){return-1<$(e,t)},q=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},G=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},X=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},K=function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)},Y=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},J=function(e,t,n){return K(e,(function(e){n=t(n,e)})),n},Q=function(e,t,n){return X(e,(function(e){n=t(n,e)})),n},Z=function(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return E.some(i);if(n(i,r))break}return E.none()}(e,t,C)},ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return E.some(n);return E.none()},te=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!R(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);U.apply(t,e[n])}return t}(G(e,t))},ne=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},re=function(e){var t=F.call(e,0);return t.reverse(),t},oe=function(e,t){return Y(e,(function(e){return!W(t,e)}))},ie=function(e,t){return 0<=t&&t<e.length?E.some(e[t]):E.none()},ae=function(e){return ie(e,0)},ue=function(e){return ie(e,e.length-1)},ce=L(Array.from)?Array.from:function(e){return F.call(e)},se=Object.keys,le=Object.hasOwnProperty,fe=function(e,t){for(var n=se(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},de=function(e,t){return me(e,(function(e,n){return{k:n,v:t(e,n)}}))},me=function(e,t){var n={};return fe(e,(function(e,r){var o=t(e,r);n[o.k]=o.v})),n},ge=function(e){return function(t,n){e[n]=t}},he=function(e,t,n,r){return fe(e,(function(e,o){(t(e,o)?n:r)(e,o)})),{}},pe=function(e,t){var n={},r={};return he(e,t,ge(n),ge(r)),{t:n,f:r}},ve=function(e,t){var n={};return he(e,t,ge(n),l),n},be=function(e){return t=function(e){return e},n=[],fe(e,(function(e,r){n.push(t(e,r))})),n;var t,n},ye=function(e,t){return xe(e,t)?E.from(e[t]):E.none()},xe=function(e,t){return le.call(e,t)},we=function(e,t){return xe(e,t)&&void 0!==e[t]&&null!==e[t]},Ce=Array.isArray,ke=function(e,t,n){var r,o;if(!e)return!1;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return!1}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return!1;return!0},Se=function(e,t){var n=[];return ke(e,(function(r,o){n.push(t(r,o,e))})),n},_e=function(e,t){var n=[];return ke(e,(function(r,o){t&&!t(r,o,e)||n.push(r)})),n},Oe=function(e,t){if(e)for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Ee=function(e,t,n,r){for(var o=P(n)?e[0]:n,i=0;i<e.length;i++)o=t.call(r,o,e[i],i);return o},Te=function(e,t,n){for(var r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},ze=function(e){return e[e.length-1]},De=function(){return(De=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Ae(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var Me,Re,Ne,Be,Pe,He,Ie,Le=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Fe(r(1),r(2))},Ve=function(){return Fe(0,0)},Fe=function(e,t){return{major:e,minor:t}},je={nu:Fe,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Ve():Le(e,n)},unknown:Ve},Ue=function(e,t){var n=String(t).toLowerCase();return Z(e,(function(e){return e.search(n)}))},$e=function(e,t){return Ue(e,t).map((function(e){var n=je.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},We=function(e,t){return Ue(e,t).map((function(e){var n=je.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},qe=function(e,t){return-1!==e.indexOf(t)},Ge=function(e,t){return n=e,o=0,""===(r=t)||n.length>=r.length&&n.substr(o,o+r.length)===r;var n,r,o},Xe=function(e){return function(t){return t.replace(e,"")}},Ke=Xe(/^\s+|\s+$/g),Ye=Xe(/^\s+/g),Je=Xe(/\s+$/g),Qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ze=function(e){return function(t){return qe(t,e)}},et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return qe(e,"edge/")&&qe(e,"chrome")&&qe(e,"safari")&&qe(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qe],search:function(e){return qe(e,"chrome")&&!qe(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return qe(e,"msie")||qe(e,"trident")}},{name:"Opera",versionRegexes:[Qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ze("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ze("firefox")},{name:"Safari",versionRegexes:[Qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(qe(e,"safari")||qe(e,"mobile/"))&&qe(e,"applewebkit")}}],tt=[{name:"Windows",search:Ze("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return qe(e,"iphone")||qe(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ze("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ze("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ze("linux"),versionRegexes:[]},{name:"Solaris",search:Ze("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ze("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ze("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],nt={browsers:d(et),oses:d(tt)},rt="Firefox",ot=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(rt),isSafari:r("Safari")}},it={unknown:function(){return ot({current:void 0,version:je.unknown()})},nu:ot,edge:d("Edge"),chrome:d("Chrome"),ie:d("IE"),opera:d("Opera"),firefox:d(rt),safari:d("Safari")},at="Windows",ut="Android",ct="Solaris",st="FreeBSD",lt="ChromeOS",ft=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(at),isiOS:r("iOS"),isAndroid:r(ut),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(ct),isFreeBSD:r(st),isChromeOS:r(lt)}},dt={unknown:function(){return ft({current:void 0,version:je.unknown()})},nu:ft,windows:d(at),ios:d("iOS"),android:d(ut),linux:d("Linux"),osx:d("OSX"),solaris:d(ct),freebsd:d(st),chromeos:d(lt)},mt=function(e,t){var n,r,o,i,a,u,c,s,l,f,m,g,h=nt.browsers(),p=nt.oses(),v=$e(h,e).fold(it.unknown,it.nu),b=We(p,e).fold(dt.unknown,dt.nu);return{browser:v,os:b,deviceType:(r=v,o=e,i=t,a=(n=b).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,c=n.isiOS()||n.isAndroid(),s=c||i("(pointer:coarse)"),l=a||!u&&c&&i("(min-device-width:768px)"),f=u||c&&!l,m=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),g=!f&&!l&&!m,{isiPad:d(a),isiPhone:d(u),isTablet:d(l),isPhone:d(f),isTouch:d(s),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:d(m),isDesktop:d(g)})}},gt=function(e){return window.matchMedia(e).matches},ht=(Ne=!(Me=function(){return mt(navigator.userAgent,gt)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ne||(Ne=!0,Re=Me.apply(null,e)),Re}),pt=function(){return ht()},vt=navigator.userAgent,bt=pt(),yt=bt.browser,xt=bt.os,wt=bt.deviceType,Ct=/WebKit/.test(vt)&&!yt.isEdge(),kt="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,St=-1!==vt.indexOf("Windows Phone"),_t={opera:yt.isOpera(),webkit:Ct,ie:!(!yt.isIE()&&!yt.isEdge())&&yt.version.major,gecko:yt.isFirefox(),mac:xt.isOSX()||xt.isiOS(),iOS:wt.isiPad()||wt.isiPhone(),android:xt.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:yt.isIE()?document.documentMode||7:10,fileApi:kt,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!yt.isIE(),desktop:wt.isDesktop(),windowsPhone:St,browser:{current:yt.current,version:yt.version,isChrome:yt.isChrome,isEdge:yt.isEdge,isFirefox:yt.isFirefox,isIE:yt.isIE,isOpera:yt.isOpera,isSafari:yt.isSafari},os:{current:xt.current,version:xt.version,isAndroid:xt.isAndroid,isChromeOS:xt.isChromeOS,isFreeBSD:xt.isFreeBSD,isiOS:xt.isiOS,isLinux:xt.isLinux,isOSX:xt.isOSX,isSolaris:xt.isSolaris,isWindows:xt.isWindows},deviceType:{isDesktop:wt.isDesktop,isiPad:wt.isiPad,isiPhone:wt.isiPhone,isPhone:wt.isPhone,isTablet:wt.isTablet,isTouch:wt.isTouch,isWebView:wt.isWebView}},Ot=/^\s*|\s*$/g,Et=function(e){return null===e||void 0===e?"":(""+e).replace(Ot,"")},Tt=function(e,t){return t?!("array"!==t||!Ce(e))||r(e)===t:void 0!==e},zt=function e(t,n,r,o){o=o||this,t&&(r&&(t=t[r]),ke(t,(function(t,i){return!1!==n.call(o,t,i,r)&&void e(t,n,r,o)})))},Dt={trim:Et,isArray:Ce,is:Tt,toArray:function(e){if(Ce(e))return e;for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n];return t},makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:ke,map:Se,grep:_e,inArray:Oe,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o,i=t[r];for(var a in i)!i.hasOwnProperty(a)||void 0!==(o=i[a])&&(e[a]=o)}return e},create:function(e,t,n){var r,o,i,a=this,u=0,c=(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e))[3].match(/(^|\.)(\w+)$/i)[2],s=a.createNS(e[3].replace(/\.\w+$/,""),n);if(!s[c]){if("static"===e[2])return s[c]=t,void(this.onCreate&&this.onCreate(e[2],e[3],s[c]));t[c]||(t[c]=l,u=1),s[c]=t[c],a.extend(s[c].prototype,t),e[5]&&(r=a.resolve(e[5]).prototype,o=e[5].match(/\.(\w+)$/i)[1],i=s[c],s[c]=u?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},s[c].prototype[c]=s[c],a.each(r,(function(e,t){s[c].prototype[t]=r[t]})),a.each(t,(function(e,t){r[t]?s[c].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==c&&(s[c].prototype[t]=e)}))),a.each(t["static"],(function(e,t){s[c][t]=e}))}},walk:zt,createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Tt(e,"array")?e:Se(e.split(t||","),Et)},_addCacheSuffix:function(e){var t=_t.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},At=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},Mt={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return At(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return At(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return At(n)},fromDom:At,fromPoint:function(e,t,n){return E.from(e.dom.elementFromPoint(t,n)).map(At)}},Rt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Nt=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Bt=function(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount},Pt=function(e,t){return e.dom===t.dom},Ht=function(e,t){return n=e.dom,r=t.dom,o=n,i=r,a=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&a);var n,r,o,i,a},It=function(e,t){return pt().browser.isIE()?Ht(e,t):(n=t,r=e.dom,o=n.dom,r!==o&&r.contains(o));var n,r,o},Lt=("undefined"!=typeof window||Function("return this;")(),function(e){return e.dom.nodeName.toLowerCase()}),Vt=function(e){return e.dom.nodeType},Ft=function(e){return function(t){return Vt(t)===e}},jt=Ft(1),Ut=Ft(3),$t=Ft(9),Wt=Ft(11),qt=function(e){return Mt.fromDom(e.dom.ownerDocument)},Gt=function(e){return $t(e)?e:qt(e)},Xt=function(e){return Mt.fromDom(Gt(e).dom.defaultView)},Kt=function(e){return E.from(e.dom.parentNode).map(Mt.fromDom)},Yt=function(e){return E.from(e.dom.previousSibling).map(Mt.fromDom)},Jt=function(e){return E.from(e.dom.nextSibling).map(Mt.fromDom)},Qt=function(e){return re(Rt(e,Yt))},Zt=function(e){return Rt(e,Jt)},en=function(e){return G(e.dom.childNodes,Mt.fromDom)},tn=function(e,t){var n=e.dom.childNodes;return E.from(n[t]).map(Mt.fromDom)},nn=function(e){return tn(e,0)},rn=function(e){return tn(e,e.dom.childNodes.length-1)},on=function(e){return Wt(e)&&I(e.dom.host)},an=L(Element.prototype.attachShadow)&&L(Node.prototype.getRootNode),un=d(an),cn=an?function(e){return Mt.fromDom(e.dom.getRootNode())}:Gt,sn=function(e){return on(e)?e:function(e){var t=e.dom.head;if(null===t||void 0===t)throw new Error("Head is not available yet");return Mt.fromDom(t)}(Gt(e))},ln=function(e){return Mt.fromDom(e.dom.host)},fn=function(e){return I(e.dom.shadowRoot)},dn=function(e,t){Kt(e).each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},mn=function(e,t){Jt(e).fold((function(){Kt(e).each((function(e){hn(e,t)}))}),(function(e){dn(e,t)}))},gn=function(e,t){nn(e).fold((function(){hn(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},hn=function(e,t){e.dom.appendChild(t.dom)},pn=function(e,t){X(t,(function(t){hn(e,t)}))},vn=function(e){e.dom.textContent="",X(en(e),(function(e){bn(e)}))},bn=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},yn=function(e){var t,n=en(e);0<n.length&&(t=e,X(n,(function(e){dn(t,e)}))),bn(e)},xn=function e(t){var n=Ut(t)?t.dom.parentNode:t.dom;if(void 0===n||null===n||null===n.ownerDocument)return!1;var r,o,i,a,u=n.ownerDocument;return i=Mt.fromDom(n),a=cn(i),(on(a)?E.some(a):E.none()).fold((function(){return u.body.contains(n)}),(r=e,o=ln,function(e){return r(o(e))}))},wn=function e(t,n){return{left:t,top:n,translate:function(r,o){return e(t+r,n+o)}}},Cn=wn,kn=function(e,t){return void 0!==e?e:void 0!==t?t:0},Sn=function(e){var t,n=e.dom,r=n.ownerDocument.body;return r===n?Cn(r.offsetLeft,r.offsetTop):xn(e)?(t=n.getBoundingClientRect(),Cn(t.left,t.top)):Cn(0,0)},_n=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Cn(n,r)},On=function(e,t,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(e,t)},En=function(e,t){pt().browser.isSafari()&&L(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Tn=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},zn=function(e){var t,n,r=void 0===e?window:e,o=r.document,i=_n(Mt.fromDom(o));return n=void 0===(t=r)?window:t,E.from(n.visualViewport).fold((function(){var e=r.document.documentElement,t=e.clientWidth,n=e.clientHeight;return Tn(i.left,i.top,t,n)}),(function(e){return Tn(Math.max(e.pageLeft,i.left),Math.max(e.pageTop,i.top),e.width,e.height)}))},Dn=function(e){return function(t){return!!t&&t.nodeType===e}},An=function(e){return!!e&&!Object.getPrototypeOf(e)},Mn=Dn(1),Rn=function(e){var t=e.map((function(e){return e.toLowerCase()}));return function(e){if(e&&e.nodeName){var n=e.nodeName.toLowerCase();return W(t,n)}return!1}},Nn=function(e,t){var n=t.toLowerCase().split(" ");return function(t){var r;if(Mn(t))for(r=0;r<n.length;r++){var o=t.ownerDocument.defaultView.getComputedStyle(t,null);if((o?o.getPropertyValue(e):null)===n[r])return!0}return!1}},Bn=function(e){return function(t){return Mn(t)&&t.hasAttribute(e)}},Pn=function(e){return Mn(e)&&e.hasAttribute("data-mce-bogus")},Hn=function(e){return Mn(e)&&"TABLE"===e.tagName},In=function(e){return function(t){if(Mn(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},Ln=Rn(["textarea","input"]),Vn=Dn(3),Fn=Dn(8),jn=Dn(9),Un=Dn(11),$n=Rn(["br"]),Wn=Rn(["img"]),qn=In("true"),Gn=In("false"),Xn=Rn(["td","th"]),Kn=Rn(["video","audio","object","embed"]),Yn=function(e){return void 0!==e.style&&L(e.style.getPropertyValue)},Jn=function(e,t,n){if(!(A(n)||B(n)||V(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Qn=function(e,t,n){Jn(e.dom,t,n)},Zn=function(e,t){var n=e.dom;fe(t,(function(e,t){Jn(n,t,e)}))},er=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},tr=function(e,t){return E.from(er(e,t))},nr=function(e,t){e.dom.removeAttribute(t)},rr=function(e,t){var n=e.dom;fe(t,(function(e,t){!function(e,t,n){if(!A(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Yn(e)&&e.style.setProperty(t,n)}(n,t,e)}))},or=function(e,t){var n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||xn(e)?r:ir(n,t)},ir=function(e,t){return Yn(e)?e.style.getPropertyValue(t):""},ar=function(e,t){var n=e.dom,r=ir(n,t);return E.from(r).filter((function(e){return 0<e.length}))},ur=function(e){var t={},n=e.dom;if(Yn(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},cr=pt().browser,sr=function(e){return Z(e,jt)},lr=function(e,t){return e.children&&W(e.children,t)},fr=function(e,t,n){var r,o,i,a=0,u=0,c=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===or(Mt.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(c.documentElement.scrollLeft||e.scrollLeft)-c.documentElement.clientLeft,y:u=o.top+(c.documentElement.scrollTop||e.scrollTop)-c.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!lr(r,n);)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!lr(r,n);)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=Mt.fromDom(t),cr.isFirefox()&&"table"===Lt(i)?sr(en(i)).filter((function(e){return"caption"===Lt(e)})).bind((function(e){return sr(Zt(e)).map((function(t){var n=t.dom.offsetTop,r=e.dom.offsetTop,o=e.dom.offsetHeight;return n<=r?-o:0}))})).getOr(0):0)}return{x:a,y:u}},dr={},mr={exports:dr};Be=void 0,Pe=dr,He=mr,Ie=void 0,function(t){"object"==r(Pe)&&void 0!==He?He.exports=t():"function"==typeof Be&&Be.amd?Be([],t):("undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof Ie&&Ie;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return o(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof Ie&&Ie,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&g())}function g(){if(!f){var e=c(m);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||f||c(g)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,t,n){(function(e){function n(){}function o(e){if("object"!=r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn((function(){var n,r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){try{n=r(e._value)}catch(d){return void u(t.promise,d)}a(t.promise,n)}else(1===e._state?a:u)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==r(t)||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void l((i=n,s=t,function(){i.apply(s,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(a){u(e,a)}var i,s}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn((function(){e._handled||o._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function s(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var r=!1;try{e((function(e){r||(r=!0,a(t,e))}),(function(e){r||(r=!0,u(t,e))}))}catch(n){if(r)return;r=!0,u(t,n)}}var f,d;f=this,d=setTimeout,o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var r=new this.constructor(n);return i(this,new s(e,t,r)),r},o.all=function(e){var t=Array.prototype.slice.call(e);return new o((function(e,o){if(0===t.length)return e([]);for(var i=t.length,a=0;a<t.length;a++)!function a(u,c){try{if(c&&("object"==r(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,(function(e){a(u,e)}),o)}t[u]=c,0==--i&&e(t)}catch(n){o(n)}}(a,t[a])}))},o.resolve=function(e){return e&&"object"==r(e)&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},o._immediateFn="function"==typeof e?function(t){e(t)}:function(e){d(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},o._setImmediateFn=function(e){o._immediateFn=e},o._setUnhandledRejectionFn=function(e){o._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=o:f.Promise||(f.Promise=o)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(e,t,n){(function(t,r){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}));var gr=mr.exports.boltExport,hr=function e(t){var n=E.none(),r=[],o=function(e){i()?u(e):r.push(e)},i=function(){return n.isSome()},a=function(e){X(e,u)},u=function(e){n.each((function(t){setTimeout((function(){e(t)}),0)}))};return t((function(e){i()||(n=E.some(e),a(r),r=[])})),{get:o,map:function(t){return e((function(e){o((function(n){e(t(n))}))}))},isReady:i}},pr={nu:hr,pure:function(e){return hr((function(t){t(e)}))}},vr=function(e){setTimeout((function(){throw e}),0)},br=function e(t){var n=function(e){t().then(e,vr)};return{map:function(n){return e((function(){return t().then(n)}))},bind:function(n){return e((function(){return t().then((function(e){return n(e).toPromise()}))}))},anonBind:function(n){return e((function(){return t().then((function(){return n.toPromise()}))}))},toLazy:function(){return pr.nu(n)},toCached:function(){var n=null;return e((function(){return null===n&&(n=t()),n}))},toPromise:t,get:n}},yr=function(e){return br((function(){return new gr(e)}))},xr=function(e,t){return t((function(t){var n=[],r=0;0===e.length?t([]):X(e,(function(o,i){var a;o.get((a=i,function(o){n[a]=o,++r>=e.length&&t(n)}))}))}))},wr=function e(t){return{is:function(e){return t===e},isValue:k,isError:C,getOr:d(t),getOrThunk:d(t),getOrDie:d(t),or:function(n){return e(t)},orThunk:function(n){return e(t)},fold:function(e,n){return n(t)},map:function(n){return e(n(t))},mapError:function(n){return e(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return E.some(t)}}},Cr=function e(t){return{is:C,isValue:C,isError:k,getOr:m,getOrThunk:function(e){return e()},getOrDie:function(){return y(String(t))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(n){return e(t)},mapError:function(n){return e(n(t))},each:l,bind:function(n){return e(t)},exists:C,forall:k,toOptional:E.none}},kr={value:wr,error:Cr,fromOption:function(e,t){return e.fold((function(){return Cr(t)}),wr)}},Sr=function(e){if(!R(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return X(e,(function(r,o){var i=se(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!R(u))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,n)},match:function(e){var r=se(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!ne(t,(function(e){return W(r,e)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}})),n},_r=(Sr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(e){return e.fold(m,m)});function Or(e,t,n,r,o){return e(n,r)?E.some(n):L(o)&&o(n)?E.none():t(n,r,o)}var Er,Tr,zr,Dr,Ar,Mr,Rr=function(e,t,n){for(var r=e.dom,o=L(n)?n:C;r.parentNode;){r=r.parentNode;var i=Mt.fromDom(r);if(t(i))return E.some(i);if(o(i))break}return E.none()},Nr=function(e,t,n){return Or((function(e,t){return t(e)}),Rr,e,t,n)},Br=function(e,t){return Z(e.dom.childNodes,(function(e){return t(Mt.fromDom(e))})).map(Mt.fromDom)},Pr=function(e,t,n){return Rr(e,(function(e){return Nt(e,t)}),n)},Hr=function(e,t){return n=t,o=void 0===(r=e)?document:r.dom,Bt(o)?E.none():E.from(o.querySelector(n)).map(Mt.fromDom);var n,r,o},Ir=function(e,t,n){return Or(Nt,Pr,e,t,n)},Lr=window.Promise?window.Promise:(Er=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];e.apply(t,n)}},Tr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Dr=(zr=function(e){if("object"!=r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Ar(e,Er(Fr,this),Er(jr,this))}).immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){return setTimeout(e,1)},Ar=function(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(m){if(r)return;r=!0,n(m)}},zr.prototype["catch"]=function(e){return this.then(null,e)},zr.prototype.then=function(e,t){var n=this;return new zr((function(r,o){Vr.call(n,new $r(e,t,r,o))}))},zr.all=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=Array.prototype.slice.call(1===e.length&&Tr(e[0])?e[0]:e);return new zr((function(e,t){if(0===o.length)return e([]);for(var i=o.length,a=function a(u,c){try{if(c&&("object"==r(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,(function(e){a(u,e)}),t)}o[u]=c,0==--i&&e(o)}catch(n){t(n)}},u=0;u<o.length;u++)a(u,o[u])}))},zr.resolve=function(e){return e&&"object"==r(e)&&e.constructor===zr?e:new zr((function(t){t(e)}))},zr.reject=function(e){return new zr((function(t,n){n(e)}))},zr.race=function(e){return new zr((function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)}))},zr);function Vr(e){var t=this;null!==this._state?Dr((function(){var n,r=t._state?e.onFulfilled:e.onRejected;if(null!==r){try{n=r(t._value)}catch(p){return void e.reject(p)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function Fr(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==r(e)||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void Ar(Er(t,e),Er(Fr,this),Er(jr,this))}this._state=!0,this._value=e,Ur.call(this)}catch(p){jr.call(this,p)}}function jr(e){this._state=!1,this._value=e,Ur.call(this)}function Ur(){for(var e=0,t=this._deferreds.length;e<t;e++)Vr.call(this,this._deferreds[e]);this._deferreds=null}function $r(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}var Wr,qr=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},Gr=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},Xr=function(e,t){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=qr((function(){e.apply(this,r)}),t)};return r.stop=function(){clearTimeout(n)},r},Kr={requestAnimationFrame:function(e,t){Mr?Mr.then(e):Mr=new Lr((function(e){!function(e,t){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=0;o<r.length&&!n;o++)n=window[r[o]+"RequestAnimationFrame"];(n=n||function(e){window.setTimeout(e,0)})(e,t)}(e,t=t||document.body)})).then(e)},setTimeout:qr,setInterval:Gr,setEditorTimeout:function(e,t,n){return qr((function(){e.removed||t()}),n)},setEditorInterval:function(e,t,n){var r=Gr((function(){e.removed?clearInterval(r):t()}),n);return r},debounce:Xr,throttle:Xr,clearInterval:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return clearInterval(e)})),clearTimeout:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return clearTimeout(e)}))},Yr=function(e,t){void 0===t&&(t={});var n=0,r={},o=Mt.fromDom(e),i=Gt(o),a=t.maxLoadTime||5e3,u=function(u,c,s){var l,f=Dt._addCacheSuffix(u),d=ye(r,f).getOrThunk((function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}}));(r[f]=d).count++;var m,g,h,p=function(e,t){for(var n=e.length;n--;)e[n]();d.status=t,d.passed=[],d.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},v=function(){return p(d.passed,2)},b=function(){return p(d.failed,3)},y=function t(){var n;n=t,function(){for(var t=e.styleSheets,n=t.length;n--;){var r=t[n].ownerNode;if(r&&r.id===l.id)return v(),1}}()||(Date.now()-g<a?Kr.setTimeout(n):b())};c&&d.passed.push(c),s&&d.failed.push(s),1!==d.status&&(2!==d.status?3!==d.status?(d.status=1,m=Mt.fromTag("link",i.dom),Zn(m,{rel:"stylesheet",type:"text/css",id:d.id}),g=Date.now(),t.contentCssCors&&Qn(m,"crossOrigin","anonymous"),t.referrerPolicy&&Qn(m,"referrerpolicy",t.referrerPolicy),(l=m.dom).onload=y,l.onerror=b,h=m,hn(sn(o),h),Qn(m,"href",f)):b():v())},c=function(e){return yr((function(t){u(e,f(t,d(kr.value(e))),f(t,d(kr.error(e))))}))},s=function(e){var t=Dt._addCacheSuffix(e);ye(r,t).each((function(e){var n,i;0==--e.count&&(delete r[t],n=e.id,i=sn(o),Hr(i,"#"+n).each(bn))}))};return{load:u,loadAll:function(e,t,n){var r;r=G(e,c),xr(r,yr).get((function(e){var r=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}}(e,(function(e){return e.isValue()}));0<r.fail.length?n(r.fail.map(_r)):t(r.pass.map(_r))}))},unload:s,unloadAll:function(e){X(e,(function(e){s(e)}))},_setReferrerPolicy:function(e){t.referrerPolicy=e}}},Jr=(Wr=new WeakMap,{forElement:function(e,t){var n=cn(e).dom;return E.from(Wr.get(n)).getOrThunk((function(){var e=Yr(n,t);return Wr.set(n,e),e}))}}),Qr=(Zr.prototype.current=function(){return this.node},Zr.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},Zr.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},Zr.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},Zr.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},Zr.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},Zr);function Zr(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}var eo,to,no=function(e){var t;return function(n){return(t=t||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(e,k)).hasOwnProperty(Lt(n))}},ro=no(["h1","h2","h3","h4","h5","h6"]),oo=no(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),io=function(e){return jt(e)&&!oo(e)},ao=function(e){return jt(e)&&"br"===Lt(e)},uo=no(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),co=no(["ul","ol","dl"]),so=no(["li","dd","dt"]),lo=no(["thead","tbody","tfoot"]),fo=no(["td","th"]),mo=no(["pre","script","textarea","style"]),go="\ufeff",ho=" ",po=go,vo=function(e){return e===go},bo=function(e){return e.replace(/\uFEFF/g,"")},yo=Mn,xo=Vn,wo=function(e){return xo(e)&&(e=e.parentNode),yo(e)&&e.hasAttribute("data-mce-caret")},Co=function(e){return xo(e)&&vo(e.data)},ko=function(e){return wo(e)||Co(e)},So=function(e){return e.firstChild!==e.lastChild||!$n(e.firstChild)},_o=function(e){var t=e.container();return!!Vn(t)&&(t.data.charAt(e.offset())===po||e.isAtStart()&&Co(t.previousSibling))},Oo=function(e){var t=e.container();return!!Vn(t)&&(t.data.charAt(e.offset()-1)===po||e.isAtEnd()&&Co(t.nextSibling))},Eo=function(e,t,n){var r,o=t.ownerDocument.createElement(e);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((r=document.createElement("br")).setAttribute("data-mce-bogus","1"),r));var i=t.parentNode;return n?i.insertBefore(o,t):t.nextSibling?i.insertBefore(o,t.nextSibling):i.appendChild(o),o},To=function(e){return xo(e)&&e.data[0]===po},zo=function(e){return xo(e)&&e.data[e.data.length-1]===po},Do=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],Pn(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Ao=qn,Mo=Gn,Ro=$n,No=Vn,Bo=Rn(["script","style","textarea"]),Po=Rn(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Ho=Rn(["table"]),Io=ko,Lo=function(e){return!Io(e)&&(No(e)?!Bo(e.parentNode):Po(e)||Ro(e)||Ho(e)||Vo(e))},Vo=function(e){return!1===(Mn(t=e)&&"true"===t.getAttribute("unselectable"))&&Mo(e);var t},Fo=function(e,t){return Lo(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Vo(e))return!1;if(Ao(e))return!0}return!0}(e,t)},jo=/^[ \t\r\n]*$/,Uo=function(e){return jo.test(e)},$o=function(e,t){var n,r,o,i=Mt.fromDom(t),a=Mt.fromDom(e);return n=a,r="pre,code",o=g(Pt,i),Pr(n,r,o).isSome()},Wo=function(e,t){return Lo(e)&&!1===(o=t,Vn(r=e)&&Uo(r.data)&&!1===$o(r,o))||Mn(n=e)&&"A"===n.nodeName&&!n.hasAttribute("href")&&(n.hasAttribute("name")||n.hasAttribute("id"))||qo(e);var n,r,o},qo=Bn("data-mce-bookmark"),Go=Bn("data-mce-bogus"),Xo=(eo="data-mce-bogus",to="all",function(e){return Mn(e)&&e.getAttribute(eo)===to}),Ko=function(e,t){return void 0===t&&(t=!0),function(e,t){var n,r=0;if(Wo(e,e))return!1;if(!(n=e.firstChild))return!0;var o=new Qr(n,e);do{if(t){if(Xo(n)){n=o.next(!0);continue}if(Go(n)){n=o.next();continue}}if($n(n))r++,n=o.next();else{if(Wo(n,e))return!1;n=o.next()}}while(n);return r<=1}(e.dom,t)},Yo=function(e,t){return I(e)&&(Wo(e,t)||io(Mt.fromDom(e)))},Jo=function(e){return"span"===e.nodeName.toLowerCase()&&"bookmark"===e.getAttribute("data-mce-type")},Qo=function(e,t){return Vn(e)&&0<e.data.length&&(o=new Qr(n=e,r=t).prev(!1),i=new Qr(n,r).next(!1),a=P(o)||Yo(o,r),u=P(i)||Yo(i,r),a&&u);var n,r,o,i,a,u},Zo=function e(t,n,r){var o=r||n;if(Mn(n)&&Jo(n))return n;for(var i,a,u,c=n.childNodes,s=c.length-1;0<=s;s--)e(t,c[s],o);return!Mn(n)||1===(i=n.childNodes).length&&Jo(i[0])&&n.parentNode.insertBefore(i[0],n),Un(u=n)||jn(u)||Wo(n,o)||Mn(a=n)&&0<a.childNodes.length||Qo(n,o)||t.remove(n),n},ei=Dt.makeMap,ti=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ni=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ri=/[<>&\"\']/g,oi=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,ii={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ai={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ui={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},ci=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),ai[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}},si=ci("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),li=function(e,t){return e.replace(t?ti:ni,(function(e){return ai[e]||e}))},fi=function(e,t){return e.replace(t?ti:ni,(function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ai[e]||"&#"+e.charCodeAt(0)+";"}))},di=function(e,t,n){return n=n||si,e.replace(t?ti:ni,(function(e){return ai[e]||n[e]||e}))},mi={encodeRaw:li,encodeAllRaw:function(e){return(""+e).replace(ri,(function(e){return ai[e]||e}))},encodeNumeric:fi,encodeNamed:di,getEncodeFunc:function(e,t){var n=ci(t)||si,r=ei(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?ti:ni,(function(e){return void 0!==ai[e]?ai[e]:void 0!==n[e]?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"}))}:r.named?t?function(e,t){return di(e,t,n)}:di:r.numeric?fi:li},decode:function(e){return e.replace(oi,(function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):ii[t]||String.fromCharCode(t):ui[e]||si[e]||(n=e,(r=Mt.fromTag("div").dom).innerHTML=n,r.textContent||r.innerText||n);var n,r}))}},gi={},hi={},pi=Dt.makeMap,vi=Dt.each,bi=Dt.extend,yi=Dt.explode,xi=Dt.inArray,wi=function(e,t){return(e=Dt.trim(e))?e.split(t||" "):[]},Ci=function(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),vi(e,(function(e,r){n[r]=n[r.toUpperCase()]=("map"===t?pi:yi)(e,/[, ]/)}))),n},ki=function(e){var t,n,r,o,i,a,u,c,s,l,f={},d={},m=[],g={},h={},p=function(t,n,r){var o=e[t];return o?o=pi(o,/[, ]/,pi(o.toUpperCase(),/[, ]/)):(o=gi[t])||(o=pi(n," ",pi(n.toUpperCase()," ")),o=bi(o,r),gi[t]=o),o},v=(t=(e=e||{}).schema,c={},s=function(e,t,r){var o,i,a=function(e,t){for(var n={},r=0,o=e.length;r<o;r++)n[e[r]]=t||{};return n};t=t||"","string"==typeof(r=r||[])&&(r=wi(r));for(var u=wi(e),s=u.length;s--;)i={attributes:a(o=wi([n,t].join(" "))),attributesOrder:o,children:a(r,hi)},c[u[s]]=i},l=function(e,t){for(var n,r,o,i=wi(e),a=i.length,u=wi(t);a--;)for(n=c[i[a]],r=0,o=u.length;r<o;r++)n.attributes[u[r]]={},n.attributesOrder.push(u[r])},gi[t]?gi[t]:(n="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(n+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(n+=" xml:lang",o=[o,u="acronym applet basefont big font strike tt"].join(" "),vi(wi(u),(function(e){s(e,"",o)})),r=[r,a="center dir isindex noframes"].join(" "),i=[r,o].join(" "),vi(wi(a),(function(e){s(e,"",i)}))),i=i||[r,o].join(" "),s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),s("address dt dd div caption","",i),s("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),s("blockquote","cite",i),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",i),s("dl","","dt dd"),s("a","href target rel media hreflang type",o),s("q","cite",o),s("ins del","cite datetime",i),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",i),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),s("param","name value"),s("map","name",[i,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",i),s("th","colspan rowspan headers scope abbr",i),s("form","accept-charset action autocomplete enctype method name novalidate target",i),s("fieldset","disabled form name",[i,"legend"].join(" ")),s("label","form for",o),s("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?i:o),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[i,"li"].join(" ")),s("noscript","",i),"html4"!==t&&(s("wbr"),s("ruby","",[o,"rt rp"].join(" ")),s("figcaption","",i),s("mark rt rp summary bdi","",o),s("canvas","width height",i),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[o,"option"].join(" ")),s("article section nav aside main header footer","",i),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[i,"figcaption"].join(" ")),s("time","datetime",o),s("dialog","open",i),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",o),s("progress","value max",o),s("meter","value min max low high optimum",o),s("details","open",[i,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(l("script","language xml:space"),l("style","xml:space"),l("object","declare classid code codebase codetype archive standby align border hspace vspace"),l("embed","align name hspace vspace"),l("param","valuetype type"),l("a","charset name rev shape coords"),l("br","clear"),l("applet","codebase archive code object alt name width height align hspace vspace"),l("img","name longdesc align border hspace vspace"),l("iframe","longdesc frameborder marginwidth marginheight scrolling align"),l("font basefont","size color face"),l("input","usemap align"),l("select"),l("textarea"),l("h1 h2 h3 h4 h5 h6 div p legend caption","align"),l("ul","type compact"),l("li","type"),l("ol dl menu dir","compact"),l("pre","width xml:space"),l("hr","align noshade size width"),l("isindex","prompt"),l("table","summary width frame rules cellspacing cellpadding align bgcolor"),l("col","width align char charoff valign"),l("colgroup","width align char charoff valign"),l("thead","align char charoff valign"),l("tr","align char charoff valign bgcolor"),l("th","axis align char charoff valign nowrap bgcolor width height"),l("form","accept"),l("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),l("tfoot","align char charoff valign"),l("tbody","align char charoff valign"),l("area","nohref"),l("body","background bgcolor text link vlink alink")),"html4"!==t&&(l("input button select textarea","autofocus"),l("input textarea","placeholder"),l("a","download"),l("link script img","crossorigin"),l("img","loading"),l("iframe","sandbox seamless allowfullscreen loading")),vi(wi("a form meter progress dfn"),(function(e){c[e]&&delete c[e].children[e]})),delete c.caption.children.table,delete c.script,gi[t]=c));!1===e.verify_html&&(e.valid_elements="*[*]");var b=Ci(e.valid_styles),y=Ci(e.invalid_styles,"map"),x=Ci(e.valid_classes,"map"),w=p("whitespace_elements","pre script noscript style textarea video audio iframe object code"),C=p("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),k=p("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),S=p("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),_="td th iframe video audio object script code",O=p("non_empty_elements",_+" pre",k),E=p("move_caret_before_on_enter_elements",_+" table",k),T=p("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),z=p("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",T),D=p("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");vi((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),(function(e){h[e]=new RegExp("</"+e+"[^>]*>","gi")}));var A=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},M=function(e){var t,n,r,o,i,a,u,c,s,l,d,g,h,p,v,b,y,x,w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,C=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,k=/[*?+]/;if(e){var S=wi(e,",");for(f["@"]&&(b=f["@"].attributes,y=f["@"].attributesOrder),t=0,n=S.length;t<n;t++)if(i=w.exec(S[t])){if(p=i[1],s=i[2],v=i[3],c=i[5],a={attributes:g={},attributesOrder:h=[]},"#"===p&&(a.paddEmpty=!0),"-"===p&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),b&&(fe(b,(function(e,t){g[t]=e})),h.push.apply(h,y)),c)for(r=0,o=(c=wi(c,"|")).length;r<o;r++)if(i=C.exec(c[r])){if(u={},d=i[1],l=i[2].replace(/[\\:]:/g,":"),p=i[3],x=i[4],"!"===d&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===d){delete g[l],h.splice(xi(h,l),1);continue}p&&("="===p&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:x}),u.defaultValue=x),":"===p&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:x}),u.forcedValue=x),"<"===p&&(u.validValues=pi(x,"?"))),k.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=A(l),a.attributePatterns.push(u)):(g[l]||h.push(l),g[l]=u)}b||"@"!==s||(b=g,y=h),v&&(a.outputName=s,f[v]=a),k.test(s)?(a.pattern=A(s),m.push(a)):f[s]=a}}},R=function(e){f={},m=[],M(e),vi(v,(function(e,t){d[t]=e.children}))},N=function(e){var t=/^(~)?(.+)$/;e&&(gi.text_block_elements=gi.block_elements=null,vi(wi(e,","),(function(e){var n,r=t.exec(e),o="~"===r[1],i=o?"span":"div",a=r[2];d[a]=d[i],g[a]=i,o||(z[a.toUpperCase()]={},z[a]={}),f[a]||(n=f[i],delete(n=bi({},n)).removeEmptyAttrs,delete n.removeEmpty,f[a]=n),vi(d,(function(e,t){e[i]&&(d[t]=e=bi({},d[t]),e[a]=e[i])}))})))},B=function(t){var n=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;gi[e.schema]=null,t&&vi(wi(t,","),(function(e){var t,r,o=n.exec(e);o&&(r=o[1],t=r?d[o[2]]:d[o[2]]={"#comment":{}},t=d[o[2]],vi(wi(o[3],"|"),(function(e){"-"===r?delete t[e]:t[e]={}})))}))},P=function(e){var t,n=f[e];if(n)return n;for(t=m.length;t--;)if((n=m[t]).pattern.test(e))return n};return e.valid_elements?R(e.valid_elements):(vi(v,(function(e,t){f[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},d[t]=e.children})),"html5"!==e.schema&&vi(wi("strong/b em/i"),(function(e){var t=wi(e,"/");f[t[1]].outputName=t[0]})),vi(wi("ol ul sub sup blockquote span font a table tbody strong em b i"),(function(e){f[e]&&(f[e].removeEmpty=!0)})),vi(wi("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(e){f[e].paddEmpty=!0})),vi(wi("span"),(function(e){f[e].removeEmptyAttrs=!0}))),N(e.custom_elements),B(e.valid_children),M(e.extended_valid_elements),B("+ol[ul|ol],+ul[ul|ol]"),vi({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(function(e,t){f[t]&&(f[t].parentsRequired=wi(e))})),e.invalid_elements&&vi(yi(e.invalid_elements),(function(e){f[e]&&delete f[e]})),P("span")||M("span[!data-mce-type|*]"),{children:d,elements:f,getValidStyles:function(){return b},getValidClasses:function(){return x},getBlockElements:function(){return z},getInvalidStyles:function(){return y},getShortEndedElements:function(){return k},getTextBlockElements:function(){return T},getTextInlineElements:function(){return D},getBoolAttrs:function(){return S},getElementRule:P,getSelfClosingElements:function(){return C},getNonEmptyElements:function(){return O},getMoveCaretBeforeOnEnterElements:function(){return E},getWhiteSpaceElements:function(){return w},getSpecialElements:function(){return h},isValidChild:function(e,t){var n=d[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=P(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return g},addValidElements:M,setValidElements:R,addCustomElements:N,addValidChildren:B}},Si=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)},_i=function(e,t){var n,r,o=this,i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,u=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,s={},l=go;e=e||{},t&&(n=t.getValidStyles(),r=t.getInvalidStyles());for(var f=("\\\" \\' \\; \\: ; : "+l).split(" "),d=0;d<f.length;d++)s[f[d]]=l+d,s[l+d]=f[d];return{toHex:function(e){return e.replace(i,Si)},parse:function(t){var n,r,f,m,g,h,p,v,b={},y=e.url_converter,x=e.url_converter_scope||o,w=function(e,t,n){var r=b[e+"-top"+t];if(r){var o=b[e+"-right"+t];if(o){var i=b[e+"-bottom"+t];if(i){var a=b[e+"-left"+t];if(a){var u=[r,o,i,a];for(d=u.length-1;d--&&u[d]===u[d+1];);-1<d&&n||(b[e+t]=-1===d?u[0]:u.join(" "),delete b[e+"-top"+t],delete b[e+"-right"+t],delete b[e+"-bottom"+t],delete b[e+"-left"+t])}}}}},C=function(e){var t,n=b[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return b[e]=n[0],!0}},k=function(e){return m=!0,s[e]},S=function(e,t){return m&&(e=e.replace(/\uFEFF[0-9]/g,(function(e){return s[e]}))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},_=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},O=function(e){return e.replace(/\\[0-9a-f]+/gi,_)},E=function(t,n,r,o,i,a){if(i=i||a)return"'"+(i=S(i)).replace(/\'/g,"\\'")+"'";if(n=S(n||r||o),!e.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return y&&(n=y.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,k).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(e){return e.replace(/[;:]/g,k)}));n=u.exec(t);)if(u.lastIndex=n.index+n[0].length,r=n[1].replace(c,"").toLowerCase(),f=n[2].replace(c,""),r&&f){if(r=O(r),f=O(f),-1!==r.indexOf(l)||-1!==r.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===r||/expression\s*\(|\/\*|\*\//.test(f)))continue;"font-weight"===r&&"700"===f?f="bold":"color"!==r&&"background-color"!==r||(f=f.toLowerCase()),f=(f=f.replace(i,Si)).replace(a,E),b[r]=m?S(f,!0):f}w("border","",!0),w("border","-width"),w("border","-color"),w("border","-style"),w("padding",""),w("margin",""),g="border",p="border-style",v="border-color",C(h="border-width")&&C(p)&&C(v)&&(b[g]=b[h]+" "+b[p]+" "+b[v],delete b[h],delete b[p],delete b[v]),"medium none"===b.border&&delete b.border,"none"===b["border-image"]&&delete b["border-image"]}return b},serialize:function(e,t){var o="",i=function(t){var r,i=n[t];if(i)for(var a=0,u=i.length;a<u;a++)t=i[a],(r=e[t])&&(o+=(0<o.length?" ":"")+t+": "+r+";")};return t&&n?(i("*"),i(t)):fe(e,(function(e,n){var i,a,u;!e||r&&(i=n,a=t,(u=r["*"])&&u[i]||(u=r[a])&&u[i])||(o+=(0<o.length?" ":"")+n+": "+e+";")})),o}}},Oi=/^(?:mouse|contextmenu)|click/,Ei={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Ti=C,zi=k,Di=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},Ai=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},Mi=function(e,t){var n,r,o,i,a,u,c=t||{};for(n in e)Ei[n]||(c[n]=e[n]);return c.target||(c.target=c.srcElement||document),c.composedPath&&(c.composedPath=function(){return e.composedPath()}),e&&(a=e,Oi.test(a.type))&&void 0===e.pageX&&void 0!==e.clientX&&(o=(r=c.target.ownerDocument||document).documentElement,i=r.body,c.pageX=e.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),c.pageY=e.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),c.preventDefault=function(){c.defaultPrevented=!0,c.isDefaultPrevented=zi,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},c.stopPropagation=function(){c.cancelBubble=!0,c.isPropagationStopped=zi,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(c.stopImmediatePropagation=function(){c.isImmediatePropagationStopped=zi,c.stopPropagation()})==((u=c).isDefaultPrevented===zi||u.isDefaultPrevented===Ti)&&(c.isDefaultPrevented=!0===c.defaultPrevented?zi:Ti,c.isPropagationStopped=!0===c.cancelBubble?zi:Ti,c.isImmediatePropagationStopped=Ti),"undefined"==typeof c.metaKey&&(c.metaKey=!1),c},Ri=(Ni.prototype.bind=function(e,t,n,r){var o,i,a,u,c,s,l=this,f=window,d=function(e){l.executeHandlers(Mi(e||f.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){e[l.expando]?o=e[l.expando]:(o=l.count++,e[l.expando]=o,l.events[o]={}),r=r||e;for(var m=t.split(" "),g=m.length;g--;)c=d,u=s=!1,"DOMContentLoaded"===(a=m[g])&&(a="ready"),l.domLoaded&&"ready"===a&&"complete"===e.readyState?n.call(r,Mi({type:a})):(l.hasMouseEnterLeave||(u=l.mouseEnterLeave[a])&&(c=function(e){var t=e.currentTarget,n=e.relatedTarget;if(n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Mi(e||f.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,l.executeHandlers(e,o))}),l.hasFocusIn||"focusin"!==a&&"focusout"!==a||(s=!0,u="focusin"===a?"focus":"blur",c=function(e){(e=Mi(e||f.event)).type="focus"===e.type?"focusin":"focusout",l.executeHandlers(e,o)}),(i=l.events[o][a])?"ready"===a&&l.domLoaded?n(Mi({type:a})):i.push({func:n,scope:r}):(l.events[o][a]=i=[{func:n,scope:r}],i.fakeName=u,i.capture=s,i.nativeHandler=c,"ready"===a?function(e,t,n){var r,o=e.document,i={type:"ready"};n.domLoaded?t(i):(r=function(){Ai(e,"DOMContentLoaded",r),Ai(e,"load",r),n.domLoaded||(n.domLoaded=!0,t(i)),e=null},"complete"===o.readyState||"interactive"===o.readyState&&o.body?r():Di(e,"DOMContentLoaded",r),n.domLoaded||Di(e,"load",r))}(e,c,l):Di(e,u||a,c,s)));return e=i=null,n}},Ni.prototype.unbind=function(e,t,n){var r,o,i;if(!e||3===e.nodeType||8===e.nodeType)return this;var a=e[this.expando];if(a){if(i=this.events[a],t){for(var u,c,s,l,f=t.split(" "),d=f.length;d--;)if(l=i[o=f[d]]){if(n)for(r=l.length;r--;)l[r].func===n&&(u=l.nativeHandler,c=l.fakeName,s=l.capture,(l=l.slice(0,r).concat(l.slice(r+1))).nativeHandler=u,l.fakeName=c,l.capture=s,i[o]=l);n&&0!==l.length||(delete i[o],Ai(e,l.fakeName||o,l.nativeHandler,l.capture))}}else fe(i,(function(t,n){Ai(e,t.fakeName||n,t.nativeHandler,t.capture)})),i={};for(o in i)if(xe(i,o))return this;delete this.events[a];try{delete e[this.expando]}catch(y){e[this.expando]=null}}return this},Ni.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Mi(null,n);for(o.type=t,o.target=e;(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},Ni.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},Ni.prototype.destroy=function(){this.events={}},Ni.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},Ni.prototype.executeHandlers=function(e,t){var n=this.events[t],r=n&&n[e.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}},Ni.Event=new Ni,Ni);function Ni(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}var Bi,Pi,Hi,Ii,Li,Vi,Fi,ji,Ui,$i,Wi,qi,Gi,Xi,Ki,Yi,Ji,Qi="sizzle"+-new Date,Zi=window.document,ea=0,ta=0,na=Na(),ra=Na(),oa=Na(),ia=function(e,t){return e===t&&($i=!0),0},aa="undefined",ua={}.hasOwnProperty,ca=[],sa=ca.pop,la=ca.push,fa=ca.push,da=ca.slice,ma=ca.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ga="[\\x20\\t\\r\\n\\f]",ha="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",pa="\\["+ga+"*("+ha+")(?:"+ga+"*([*^$|!~]?=)"+ga+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ha+"))|)"+ga+"*\\]",va=":("+ha+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pa+")*)|.*)\\)|)",ba=new RegExp("^"+ga+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ga+"+$","g"),ya=new RegExp("^"+ga+"*,"+ga+"*"),xa=new RegExp("^"+ga+"*([>+~]|"+ga+")"+ga+"*"),wa=new RegExp("="+ga+"*([^\\]'\"]*?)"+ga+"*\\]","g"),Ca=new RegExp(va),ka=new RegExp("^"+ha+"$"),Sa={ID:new RegExp("^#("+ha+")"),CLASS:new RegExp("^\\.("+ha+")"),TAG:new RegExp("^("+ha+"|[*])"),ATTR:new RegExp("^"+pa),PSEUDO:new RegExp("^"+va),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ga+"*(even|odd|(([+-]|)(\\d*)n|)"+ga+"*(?:([+-]|)"+ga+"*(\\d+)|))"+ga+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ga+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ga+"*((?:-\\d)?\\d*)"+ga+"*\\)|)(?=[^-]|$)","i")},_a=/^(?:input|select|textarea|button)$/i,Oa=/^h\d$/i,Ea=/^[^{]+\{\s*\[native \w/,Ta=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,za=/[+~]/,Da=/'|\\/g,Aa=new RegExp("\\\\([\\da-f]{1,6}"+ga+"?|("+ga+")|.)","ig"),Ma=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)};try{fa.apply(ca=da.call(Zi.childNodes),Zi.childNodes),ca[Zi.childNodes.length].nodeType}catch(DO){fa={apply:ca.length?function(e,t){la.apply(e,da.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Ra=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m;if((t?t.ownerDocument||t:Zi)!==qi&&Wi(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||qi).nodeType)&&9!==u)return[];if(Xi&&!r){if(o=Ta.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Ji(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return fa.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Bi.getElementsByClassName)return fa.apply(n,t.getElementsByClassName(a)),n}if(Bi.qsa&&(!Ki||!Ki.test(e))){if(f=l=Qi,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(s=Li(e),(l=t.getAttribute("id"))?f=l.replace(Da,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;c--;)s[c]=f+Va(s[c]);d=za.test(e)&&Ia(t.parentNode)||t,m=s.join(",")}if(m)try{return fa.apply(n,d.querySelectorAll(m)),n}catch(x){}finally{l||t.removeAttribute("id")}}}return Fi(e.replace(ba,"$1"),t,n,r)};function Na(){var e=[];function t(n,r){return e.push(n+" ")>Pi.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function Ba(e){return e[Qi]=!0,e}function Pa(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Ha(e){return Ba((function(t){return t=+t,Ba((function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function Ia(e){return e&&r(e.getElementsByTagName)!=aa&&e}function La(){}function Va(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Fa(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=ta++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,c,s=[ea,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if((u=(c=t[Qi]||(t[Qi]={}))[r])&&u[0]===ea&&u[1]===i)return s[2]=u[2];if((c[r]=s)[2]=e(t,n,a))return!0}}}function ja(e){return 1<e.length?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Ua(e,t,n,r,o){for(var i,a=[],u=0,c=e.length,s=null!=t;u<c;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),s&&t.push(u)));return a}function $a(e,t,n,r,o,i){return r&&!r[Qi]&&(r=$a(r)),o&&!o[Qi]&&(o=$a(o,i)),Ba((function(i,a,u,c){var s,l,f,d=[],m=[],g=a.length,h=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Ra(e,t[r],n);return n}(t||"*",u.nodeType?[u]:u,[]),p=!e||!i&&t?h:Ua(h,d,e,u,c),v=n?o||(i?e:g||r)?[]:a:p;if(n&&n(p,v,u,c),r)for(s=Ua(v,m),r(s,[],u,c),l=s.length;l--;)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f));if(i){if(o||e){if(o){for(s=[],l=v.length;l--;)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}for(l=v.length;l--;)(f=v[l])&&-1<(s=o?ma.call(i,f):d[l])&&(i[s]=!(a[s]=f))}}else v=Ua(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):fa.apply(a,v)}))}Bi=Ra.support={},Ii=Ra.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Wi=Ra.setDocument=function(e){var t,n=e?e.ownerDocument||e:Zi,o=n.defaultView;return n!==qi&&9===n.nodeType&&n.documentElement?(Gi=(qi=n).documentElement,Xi=!Ii(n),o&&o!==function(e){try{return e.top}catch(t){}return null}(o)&&(o.addEventListener?o.addEventListener("unload",(function(){Wi()}),!1):o.attachEvent&&o.attachEvent("onunload",(function(){Wi()}))),Bi.attributes=!0,Bi.getElementsByTagName=!0,Bi.getElementsByClassName=Ea.test(n.getElementsByClassName),Bi.getById=!0,Pi.find.ID=function(e,t){if(r(t.getElementById)!=aa&&Xi){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},Pi.filter.ID=function(e){var t=e.replace(Aa,Ma);return function(e){return e.getAttribute("id")===t}},Pi.find.TAG=Bi.getElementsByTagName?function(e,t){if(r(t.getElementsByTagName)!=aa)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},Pi.find.CLASS=Bi.getElementsByClassName&&function(e,t){if(Xi)return t.getElementsByClassName(e)},Yi=[],Ki=[],Bi.disconnectedMatch=!0,Ki=Ki.length&&new RegExp(Ki.join("|")),Yi=Yi.length&&new RegExp(Yi.join("|")),t=Ea.test(Gi.compareDocumentPosition),Ji=t||Ea.test(Gi.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},ia=t?function(e,t){if(e===t)return $i=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Bi.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===Zi&&Ji(Zi,e)?-1:t===n||t.ownerDocument===Zi&&Ji(Zi,t)?1:Ui?ma.call(Ui,e)-ma.call(Ui,t):0:4&r?-1:1)}:function(e,t){if(e===t)return $i=!0,0;var r,o=0,i=e.parentNode,a=t.parentNode,u=[e],c=[t];if(!i||!a)return e===n?-1:t===n?1:i?-1:a?1:Ui?ma.call(Ui,e)-ma.call(Ui,t):0;if(i===a)return Pa(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;u[o]===c[o];)o++;return o?Pa(u[o],c[o]):u[o]===Zi?-1:c[o]===Zi?1:0},n):qi},Ra.matches=function(e,t){return Ra(e,null,null,t)},Ra.matchesSelector=function(e,t){if((e.ownerDocument||e)!==qi&&Wi(e),t=t.replace(wa,"='$1']"),Bi.matchesSelector&&Xi&&(!Yi||!Yi.test(t))&&(!Ki||!Ki.test(t)))try{var n=(void 0).call(e,t);if(n||Bi.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(DO){}return 0<Ra(t,qi,null,[e]).length},Ra.contains=function(e,t){return(e.ownerDocument||e)!==qi&&Wi(e),Ji(e,t)},Ra.attr=function(e,t){(e.ownerDocument||e)!==qi&&Wi(e);var n=Pi.attrHandle[t.toLowerCase()],r=n&&ua.call(Pi.attrHandle,t.toLowerCase())?n(e,t,!Xi):void 0;return void 0!==r?r:Bi.attributes||!Xi?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Ra.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Ra.uniqueSort=function(e){var t,n=[],r=0,o=0;if($i=!Bi.detectDuplicates,Ui=!Bi.sortStable&&e.slice(0),e.sort(ia),$i){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Ui=null,e},Hi=Ra.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Hi(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Hi(t);return n},(Pi=Ra.selectors={cacheLength:50,createPseudo:Ba,match:Sa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Aa,Ma),e[3]=(e[3]||e[4]||e[5]||"").replace(Aa,Ma),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Ra.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Ra.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Sa.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Ca.test(n)&&(t=Li(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Aa,Ma).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=na[e+" "];return t||(t=new RegExp("(^|"+ga+")"+e+"("+ga+"|$)"))&&na(e,(function(e){return t.test("string"==typeof e.className&&e.className||r(e.getAttribute)!=aa&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=Ra.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&-1<o.indexOf(n):"$="===t?n&&o.slice(-n.length)===n:"~="===t?-1<(" "+o+" ").indexOf(n):"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var s,l,f,d,m,g,h=i!=a?"nextSibling":"previousSibling",p=t.parentNode,v=u&&t.nodeName.toLowerCase(),b=!c&&!u;if(p){if(i){for(;h;){for(f=t;f=f[h];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?p.firstChild:p.lastChild],a&&b){for(m=(s=(l=p[Qi]||(p[Qi]={}))[e]||[])[0]===ea&&s[1],d=s[0]===ea&&s[2],f=m&&p.childNodes[m];f=++m&&f&&f[h]||(d=m=0)||g.pop();)if(1===f.nodeType&&++d&&f===t){l[e]=[ea,m,d];break}}else if(b&&(s=(t[Qi]||(t[Qi]={}))[e])&&s[0]===ea)d=s[1];else for(;(f=++m&&f&&f[h]||(d=m=0)||g.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[Qi]||(f[Qi]={}))[e]=[ea,d]),f!==t)););return(d-=o)===r||d%r==0&&0<=d/r}}},PSEUDO:function(e,t){var n,r=Pi.pseudos[e]||Pi.setFilters[e.toLowerCase()]||Ra.error("unsupported pseudo: "+e);return r[Qi]?r(t):1<r.length?(n=[e,e,"",t],Pi.setFilters.hasOwnProperty(e.toLowerCase())?Ba((function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=ma.call(e,i[a])]=!(n[o]=i[a])})):function(e){return r(e,0,n)}):r}},pseudos:{not:Ba((function(e){var t=[],n=[],r=Vi(e.replace(ba,"$1"));return r[Qi]?Ba((function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:Ba((function(e){return function(t){return 0<Ra(e,t).length}})),contains:Ba((function(e){return e=e.replace(Aa,Ma),function(t){return-1<(t.textContent||t.innerText||Hi(t)).indexOf(e)}})),lang:Ba((function(e){return ka.test(e||"")||Ra.error("unsupported lang: "+e),e=e.replace(Aa,Ma).toLowerCase(),function(t){var n;do{if(n=Xi?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Gi},focus:function(e){return e===qi.activeElement&&(!qi.hasFocus||qi.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!Pi.pseudos.empty(e)},header:function(e){return Oa.test(e.nodeName)},input:function(e){return _a.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Ha((function(){return[0]})),last:Ha((function(e,t){return[t-1]})),eq:Ha((function(e,t,n){return[n<0?n+t:n]})),even:Ha((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:Ha((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:Ha((function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e})),gt:Ha((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=Pi.pseudos.eq,X(["radio","checkbox","file","password","image"],(function(e){var t;Pi.pseudos[e]=(t=e,function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t})})),X(["submit","reset"],(function(e){var t;Pi.pseudos[e]=(t=e,function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t})})),La.prototype=Pi.filters=Pi.pseudos,Pi.setFilters=new La,Li=Ra.tokenize=function(e,t){var n,r,o,i,a,u,c,s=ra[e+" "];if(s)return t?0:s.slice(0);for(a=e,u=[],c=Pi.preFilter;a;){for(i in n&&!(r=ya.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=xa.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ba," ")}),a=a.slice(n.length)),Pi.filter)Pi.filter.hasOwnProperty(i)&&(!(r=Sa[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?Ra.error(e):ra(e,u).slice(0)},Vi=Ra.compile=function(e,t){var n,r,o,i,a,u,c=[],s=[],l=oa[e+" "];if(!l){for(n=(t=t||Li(e)).length;n--;)(l=function e(t){for(var n,r,o,i=t.length,a=Pi.relative[t[0].type],u=a||Pi.relative[" "],c=a?1:0,s=Fa((function(e){return e===n}),u,!0),l=Fa((function(e){return-1<ma.call(n,e)}),u,!0),f=[function(e,t,r){var o=!a&&(r||t!==ji)||((n=t).nodeType?s:l)(e,t,r);return n=null,o}];c<i;c++)if(r=Pi.relative[t[c].type])f=[Fa(ja(f),r)];else{if((r=Pi.filter[t[c].type].apply(null,t[c].matches))[Qi]){for(o=++c;o<i&&!Pi.relative[t[o].type];o++);return $a(1<c&&ja(f),1<c&&Va(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(ba,"$1"),r,c<o&&e(t.slice(c,o)),o<i&&e(t=t.slice(o)),o<i&&Va(t))}f.push(r)}return ja(f)}(t[n]))[Qi]?c.push(l):s.push(l);(l=oa(e,(r=s,i=0<(o=c).length,a=0<r.length,u=function(e,t,n,u,c){var s,l,f,d=0,m="0",g=e&&[],h=[],p=ji,v=e||a&&Pi.find.TAG("*",c),b=ea+=null==p?1:Math.random()||.1,y=v.length;for(c&&(ji=t!==qi&&t);m!==y&&null!=(s=v[m]);m++){if(a&&s){for(l=0;f=r[l++];)if(f(s,t,n)){u.push(s);break}c&&(ea=b)}i&&((s=!f&&s)&&d--,e&&g.push(s))}if(d+=m,i&&m!==d){for(l=0;f=o[l++];)f(g,h,t,n);if(e){if(0<d)for(;m--;)g[m]||h[m]||(h[m]=sa.call(u));h=Ua(h)}fa.apply(u,h),c&&!e&&0<h.length&&1<d+o.length&&Ra.uniqueSort(u)}return c&&(ea=b,ji=p),g},i?Ba(u):u))).selector=e}return l},Fi=Ra.select=function(e,t,n,r){var o,i,a,u,c,s="function"==typeof e&&e,l=!r&&Li(e=s.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&Bi.getById&&9===t.nodeType&&Xi&&Pi.relative[i[1].type]){if(!(t=(Pi.find.ID(a.matches[0].replace(Aa,Ma),t)||[])[0]))return n;s&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=Sa.needsContext.test(e)?0:i.length;o--&&(a=i[o],!Pi.relative[u=a.type]);)if((c=Pi.find[u])&&(r=c(a.matches[0].replace(Aa,Ma),za.test(i[0].type)&&Ia(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Va(i)))return fa.apply(n,r),n;break}}return(s||Vi(e,l))(r,t,!Xi,n,za.test(e)&&Ia(t.parentNode)||t),n},Bi.sortStable=Qi.split("").sort(ia).join("")===Qi,Bi.detectDuplicates=!!$i,Wi(),Bi.sortDetached=!0;var Wa=document,qa=Array.prototype.push,Ga=Array.prototype.slice,Xa=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ka=Ri.Event,Ya=Dt.makeMap("children,contents,next,prev"),Ja=function(e){return void 0!==e},Qa=function(e){return"string"==typeof e},Za=function(e,t){var n,r=(t=t||Wa).createElement("div"),o=t.createDocumentFragment();for(r.innerHTML=e;n=r.firstChild;)o.appendChild(n);return o},eu=function e(t,n,r,o){var i;if(Qa(n))n=Za(n,gu(t[0]));else if(n.length&&!n.nodeType){if(n=bu.makeArray(n),o)for(i=n.length-1;0<=i;i--)e(t,n[i],r,o);else for(i=0;i<n.length;i++)e(t,n[i],r,o);return t}if(n.nodeType)for(i=t.length;i--;)r.call(t[i],n);return t},tu=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},nu=function(e,t,n){var r,o;return t=bu(t)[0],e.each((function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)})),e},ru=Dt.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),ou=Dt.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),iu={for:"htmlFor",class:"className",readonly:"readOnly"},au={float:"cssFloat"},uu={},cu={},su=function(e,t){return new bu.fn.init(e,t)},lu=/^\s*|\s*$/g,fu=function(e){return null===e||void 0===e?"":(""+e).replace(lu,"")},du=function(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},mu=function(e,t){var n=[];return du(e,(function(e,r){t(r,e)&&n.push(r)})),n},gu=function(e){return e?9===e.nodeType?e:e.ownerDocument:Wa};su.fn=su.prototype={constructor:su,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return bu(e).attr(t);o.context=t=document}if(Qa(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Xa.exec(e)))return bu(t).find(e);if(n[1])for(r=Za(e,gu(t)).firstChild;r;)qa.call(o,r),r=r.nextSibling;else{if(!(r=gu(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Dt.toArray(this)},add:function(e,t){var n,r;if(Qa(e))return this.add(bu(e));if(!1!==t)for(n=bu.unique(this.toArray().concat(bu.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else qa.apply(this,bu.makeArray(e));return this},attr:function(e,t){var n,o=this;if("object"==r(e))du(e,(function(e,t){o.attr(e,t)}));else{if(!Ja(t)){if(o[0]&&1===o[0].nodeType){if((n=uu[e])&&n.get)return n.get(o[0],e);if(ou[e])return o.prop(e)?e:void 0;null===(t=o[0].getAttribute(e,2))&&(t=void 0)}return t}this.each((function(){var n;if(1===this.nodeType){if((n=uu[e])&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}}))}return o},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==r(e=iu[e]||e))du(e,(function(e,t){n.prop(e,t)}));else{if(!Ja(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each((function(){1===this.nodeType&&(this[e]=t)}))}return n},css:function(e,t){var n,o,i=this,a=function(e){return e.replace(/-(\D)/g,(function(e,t){return t.toUpperCase()}))},u=function(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e}))};if("object"==r(e))du(e,(function(e,t){i.css(e,t)}));else if(Ja(t))e=a(e),"number"!=typeof t||ru[e]||(t=t.toString()+"px"),i.each((function(){var n=this.style;if((o=cu[e])&&o.set)o.set(this,t);else{try{this.style[au[e]||e]=t}catch(a){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(u(e)):n.removeAttribute(e))}}));else{if(n=i[0],(o=cu[e])&&o.get)return o.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[a(e)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(u(e))}catch(c){return}}return i},remove:function(){for(var e,t=this.length;t--;)e=this[t],Ka.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t;if(Ja(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(p){bu(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(Ja(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return eu(this,arguments,(function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)}))},prepend:function(){return eu(this,arguments,(function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)}),!0)},before:function(){return this[0]&&this[0].parentNode?eu(this,arguments,(function(e){this.parentNode.insertBefore(e,this)})):this},after:function(){return this[0]&&this[0].parentNode?eu(this,arguments,(function(e){this.parentNode.insertBefore(e,this.nextSibling)}),!0):this},appendTo:function(e){return bu(e).append(this),this},prependTo:function(e){return bu(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return nu(this,e)},wrapAll:function(e){return nu(this,e,!0)},wrapInner:function(e){return this.each((function(){bu(this).contents().wrapAll(e)})),this},unwrap:function(){return this.parent().each((function(){bu(this).replaceWith(this.childNodes)}))},clone:function(){var e=[];return this.each((function(){e.push(this.cloneNode(!0))})),bu(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e||(-1!==e.indexOf(" ")?du(e.split(" "),(function(){n.toggleClass(this,t)})):n.each((function(n,r){var o,i=tu(r,e);i!==t&&(o=r.className,i?r.className=fu((" "+o+" ").replace(" "+e+" "," ")):r.className+=o?" "+e:e)}))),n},hasClass:function(e){return tu(this[0],e)},each:function(e){return du(this,e)},on:function(e,t){return this.each((function(){Ka.bind(this,e,t)}))},off:function(e,t){return this.each((function(){Ka.unbind(this,e,t)}))},trigger:function(e){return this.each((function(){"object"==r(e)?Ka.fire(this,e.type,e):Ka.fire(this,e)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return bu(Ga.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){for(var t=[],n=0,r=this.length;n<r;n++)bu.find(e,this[n],t);return bu(t)},filter:function(e){return bu("function"==typeof e?mu(this.toArray(),(function(t,n){return e(n,t)})):bu.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof bu&&(e=e[0]),this.each((function(n,r){for(;r;){if("string"==typeof e&&bu(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}})),bu(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:qa,sort:Array.prototype.sort,splice:Array.prototype.splice},Dt.extend(su,{extend:Dt.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:Dt.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Dt.isArray,each:du,trim:fu,grep:mu,find:Ra,expr:Ra.selectors,unique:Ra.uniqueSort,text:Ra.getText,contains:Ra.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return 1===t.length?bu.find.matchesSelector(t[0],e)?[t[0]]:[]:bu.find.matches(e,t)}});var hu=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof bu&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&bu(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},pu=function(e,t,n,r){var o=[];for(r instanceof bu&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&bu(e).is(r))break}o.push(e)}return o},vu=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};du({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return hu(e,"parentNode")},next:function(e){return vu(e,"nextSibling",1)},prev:function(e){return vu(e,"previousSibling",1)},children:function(e){return pu(e.firstChild,"nextSibling",1)},contents:function(e){return Dt.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},(function(e,t){su.fn[e]=function(n){var r=[];this.each((function(){var e=t.call(r,this,n,r);e&&(bu.isArray(e)?r.push.apply(r,e):r.push(e))})),1<this.length&&(Ya[e]||(r=bu.unique(r)),0===e.indexOf("parents")&&(r=r.reverse()));var o=bu(r);return n?o.filter(n):o}})),du({parentsUntil:function(e,t){return hu(e,"parentNode",t)},nextUntil:function(e,t){return pu(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return pu(e,"previousSibling",1,t).slice(1)}},(function(e,t){su.fn[e]=function(n,r){var o=[];this.each((function(){var e=t.call(o,this,n,o);e&&(bu.isArray(e)?o.push.apply(o,e):o.push(e))})),1<this.length&&(o=bu.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse()));var i=bu(o);return r?i.filter(r):i}})),su.fn.is=function(e){return!!e&&0<this.filter(e).length},su.fn.init.prototype=su.fn,su.overrideDefaults=function(e){var t,n=function n(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o=o||t.context,new n.fn.init(r,o)};return bu.extend(n,this),n},su.attrHooks=uu,su.cssHooks=cu;var bu=su,yu=Dt.each,xu=Dt.grep,wu=_t.ie,Cu=/^([a-z0-9],?)+$/i,ku=function(e,t){var n=t.attr("style"),r=(r=e.serialize(e.parse(n),t[0].nodeName))||null;t.attr("data-mce-style",r)},Su=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o},_u=function e(t,n){void 0===n&&(n={});var o,i,a,u,c,s,f={},d=window,m={},g=0,h=Jr.forElement(Mt.fromDom(t),{contentCssCors:n.contentCssCors,referrerPolicy:n.referrerPolicy}),p=[],v=n.schema?n.schema:ki({}),b=_i({url_converter:n.url_converter,url_converter_scope:n.url_converter_scope},n.schema),y=n.ownEvents?new Ri:Ri.Event,x=v.getBlockElements(),w=bu.overrideDefaults((function(){return{context:t,element:J.getRoot()}})),C=function(e){return e&&t&&A(e)?t.getElementById(e):e},k=function(e){return w("string"==typeof e?C(e):e)},S=function(e,t,n){var r,o,i=k(e);return i.length&&(o=(r=Q[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},_=function(e){var t=C(e);return t?t.attributes:[]},O=function(e,t,r){""===r&&(r=null);var o,i=k(e),a=i.attr(t);i.length&&((o=Q[t])&&o.set?o.set(i,r,t):i.attr(t,r),a!==r&&n.onSetAttrib&&n.onSetAttrib({attrElm:i,attrName:t,attrValue:r}))},E=function(){return n.root_element||t.body},T=function(e,n){return fr(t.body,C(e),n)},z=function(e,t,n){var r=k(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,(function(e,t){return t.toUpperCase()})))&&(t=_t.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)},D=function(e){var t,n;return e=C(e),t=z(e,"width"),n=z(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},M=function(e,t){if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Cu.test(t)){for(var n=t.toLowerCase().split(/,/),r=e.nodeName.toLowerCase(),o=n.length-1;0<=o;o--)if(n[o]===r)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Ra(t,i[0].ownerDocument||i[0],null,i).length},R=function(e,t,n,r){var o,i=[],a=C(e);for(r=void 0===r,n=n||("BODY"!==E().nodeName?E().parentNode:null),Dt.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return M(e,o)});a&&!(a===n||H(a.nodeType)||jn(a)||Un(a));){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},N=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return M(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},B=function(e,t,n){var r,o="string"==typeof e?C(e):e;if(!o)return!1;if(Dt.isArray(o)&&(o.length||0===o.length))return r=[],yu(o,(function(e,o){e&&r.push(t.call(n,"string"==typeof e?C(e):e,o))})),r;var i=n||this;return t.call(i,o)},P=function(e,t){k(e).each((function(e,n){yu(t,(function(e,t){O(n,t,e)}))}))},I=function(e,t){var n=k(e);wu?n.each((function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(o){bu("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}})):n.html(t)},L=function(e,n,r,o,i){return B(e,(function(e){var a="string"==typeof n?t.createElement(n):n;return P(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&I(a,o)),i?a:e.appendChild(a)}))},V=function(e,n,r){return L(t.createElement(e),e,n,r,!0)},F=mi.encodeAllRaw,j=function(e,t){var n=k(e);return t?n.each((function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)})).remove():n.remove(),1<n.length?n.toArray():n[0]},U=function(e,t,n){k(e).toggleClass(t,n).each((function(){""===this.className&&bu(this).attr("class",null)}))},$=function(e,t,n){return B(t,(function(t){return Dt.is(t,"array")&&(e=e.cloneNode(!0)),n&&yu(xu(t.childNodes),(function(t){e.appendChild(t)})),t.parentNode.replaceChild(e,t)}))},W=function(e){if(Mn(e)){var t="a"===e.nodeName.toLowerCase()&&!S(e,"href")&&S(e,"id");if(S(e,"name")||S(e,"data-mce-bookmark")||t)return!0}return!1},q=function(){return t.createRange()},G=function e(r,o,i,a){if(Dt.isArray(r)){for(var u=r.length,c=[];u--;)c[u]=e(r[u],o,i,a);return c}return!n.collect||r!==t&&r!==d||p.push([r,o,i,a]),y.bind(r,o,i,a||J)},K=function e(n,r,o){if(Dt.isArray(n)){for(var i=n.length,a=[];i--;)a[i]=e(n[i],r,o);return a}if(0<p.length&&(n===t||n===d))for(i=p.length;i--;){var u=p[i];n!==u[0]||r&&r!==u[1]||o&&o!==u[2]||y.unbind(u[0],u[1],u[2])}return y.unbind(n,r,o)},Y=function(e){if(e&&Mn(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},J={doc:t,settings:n,win:d,files:m,stdMode:!0,boxModel:!0,styleSheetLoader:h,boundEvents:p,styles:b,schema:v,events:y,isBlock:function(e){if("string"==typeof e)return!!x[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!x[e.nodeName])}return!1},$:w,$$:k,root:null,clone:function(e,n){if(!wu||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return yu(_(e),(function(t){O(r,t.nodeName,S(e,t.nodeName))})),r},getRoot:E,getViewPort:function(e){var t=zn(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:function(e){e=C(e);var t=T(e),n=D(e);return{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:D,getParent:function(e,t,n){var r=R(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:R,get:C,getNext:function(e,t){return N(e,t,"nextSibling")},getPrev:function(e,t){return N(e,t,"previousSibling")},select:function(e,r){return Ra(e,C(r)||n.root_element||t,[])},is:M,add:L,create:V,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+F(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();for(o.appendChild(r),e&&(r.innerHTML=e);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},remove:j,setStyle:function(e,t,r){var o=A(t)?k(e).css(t,r):k(e).css(t);n.update_styles&&ku(b,o)},getStyle:z,setStyles:function(e,t){var r=k(e).css(t);n.update_styles&&ku(b,r)},removeAllAttribs:function(e){return B(e,(function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--)e.removeAttributeNode(t.item(n))}))},setAttrib:O,setAttribs:P,getAttrib:S,getPos:T,parseStyle:function(e){return b.parse(e)},serializeStyle:function(e,t){return b.serialize(e,t)},addStyle:function(n){var r,o;if(J!==e.DOM&&t===document){if(f[n])return;f[n]=!0}(o=t.getElementById("mceDefaultStyles"))||((o=t.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=t.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=n:o.appendChild(t.createTextNode(n))},loadCSS:function(e){X((e=e||"").split(","),(function(e){m[e]=!0,h.load(e,l)}))},addClass:function(e,t){k(e).addClass(t)},removeClass:function(e,t){U(e,t,!1)},hasClass:function(e,t){return k(e).hasClass(t)},toggleClass:U,show:function(e){k(e).show()},hide:function(e){k(e).hide()},isHidden:function(e){return"none"===k(e).css("display")},uniqueId:function(e){return(e||"mce_")+g++},setHTML:I,getOuterHTML:function(e){var t="string"==typeof e?C(e):e;return Mn(t)?t.outerHTML:bu("<div></div>").append(bu(t).clone()).html()},setOuterHTML:function(e,t){k(e).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}j(bu(this).html(t),!0)}))},decode:mi.decode,encode:F,insertAfter:function(e,t){var n=C(t);return B(e,(function(e){var t=n.parentNode,r=n.nextSibling;return r?t.insertBefore(e,r):t.appendChild(e),e}))},replace:$,rename:function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=V(t),yu(_(e),(function(t){O(n,t.nodeName,S(e,t.nodeName))})),$(n,e,!0)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return b.toHex(Dt.trim(e))},run:B,getAttribs:_,isEmpty:function(e,t){var n,r,o=0;if(W(e))return!1;if(e=e.firstChild){var i=new Qr(e,e.parentNode),a=v?v.getWhiteSpaceElements():{};t=t||(v?v.getNonEmptyElements():null);do{if(n=e.nodeType,Mn(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=i.next("all"===u);continue}if(r=e.nodeName.toLowerCase(),t&&t[r]){if("br"!==r)return!1;o++,e=i.next();continue}if(W(e))return!1}if(8===n)return!1;if(3===n&&!Uo(e.nodeValue))return!1;if(3===n&&e.parentNode&&a[e.parentNode.nodeName]&&Uo(e.nodeValue))return!1;e=i.next()}while(e)}return o<=1},createRng:q,nodeIndex:Su,split:function(e,t,n){var r,o,i,a=q();if(e&&t)return a.setStart(e.parentNode,Su(e)),a.setEnd(t.parentNode,Su(t)),r=a.extractContents(),(a=q()).setStart(t.parentNode,Su(t)+1),a.setEnd(e.parentNode,Su(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Zo(J,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Zo(J,o),e),j(e),n||t},bind:G,unbind:K,fire:function(e,t,n){return y.fire(e,t,n)},getContentEditable:Y,getContentEditableParent:function(e){for(var t=E(),n=null;e&&e!==t&&null===(n=Y(e));e=e.parentNode);return n},destroy:function(){if(0<p.length)for(var e=p.length;e--;){var t=p[e];y.unbind(t[0],t[1],t[2])}fe(m,(function(e,t){h.unload(t),delete m[t]})),Ra.setDocument&&Ra.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}},Q=(o=b,a=function(){return J},u=(i=n).keep_values,c={set:function(e,t,n){i.url_converter&&(t=i.url_converter.call(i.url_converter_scope||a(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},s={style:{set:function(e,t){null===t||"object"!=r(t)?(u&&e.attr("data-mce-style",t),null!==t&&"string"==typeof t?(e.removeAttr("style"),e.css(o.parse(t))):e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return o.serialize(o.parse(t),e[0].nodeName)}}},u&&(s.href=s.src=c),s);return J};_u.DOM=_u(document),_u.nodeIndex=Su;var Ou=_u.DOM,Eu=Dt.each,Tu=Dt.grep,zu=(Du.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},Du.prototype.loadScript=function(e,t,n){var r=Ou,o=function(){r.remove(i),a&&(a.onerror=a.onload=a=null)},i=r.uniqueId(),a=document.createElement("script");a.id=i,a.type="text/javascript",a.src=Dt._addCacheSuffix(e),this.settings.referrerPolicy&&r.setAttrib(a,"referrerpolicy",this.settings.referrerPolicy),a.onload=function(){o(),t()},a.onerror=function(){o(),L(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(a)},Du.prototype.isDone=function(e){return 2===this.states[e]},Du.prototype.markDone=function(e){this.states[e]=2},Du.prototype.add=function(e,t,n,r){var o=this.states[e];this.queue.push(e),void 0===o&&(this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},Du.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},Du.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},Du.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},Du.prototype.loadScripts=function(e,t,n,r){var o=this,i=[],a=function(e,t){Eu(o.scriptLoadedCallbacks[t],(function(t){L(t[e])&&t[e].call(t.scope)})),o.scriptLoadedCallbacks[t]=void 0};o.queueLoadedCallbacks.push({success:t,failure:r,scope:n||this});var u=function t(){var n,r=Tu(e);e.length=0,Eu(r,(function(e){2!==o.states[e]?3!==o.states[e]?1!==o.states[e]&&(o.states[e]=1,o.loading++,o.loadScript(e,(function(){o.states[e]=2,o.loading--,a("success",e),t()}),(function(){o.states[e]=3,o.loading--,i.push(e),a("failure",e),t()}))):a("failure",e):a("success",e)})),o.loading||(n=o.queueLoadedCallbacks.slice(0),o.queueLoadedCallbacks.length=0,Eu(n,(function(e){0===i.length?L(e.success)&&e.success.call(e.scope):L(e.failure)&&e.failure.call(e.scope,i)})))};u()},Du.ScriptLoader=new Du,Du);function Du(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}var Au=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},Mu={},Ru=Au("en"),Nu=function(){return ye(Mu,Ru.get())},Bu={getData:function(){return de(Mu,(function(e){return De({},e)}))},setCode:function(e){e&&Ru.set(e)},getCode:function(){return Ru.get()},add:function(e,t){var n=Mu[e];n||(Mu[e]=n={}),fe(t,(function(e,t){n[t.toLowerCase()]=e}))},translate:function(e){var t,n,r=Nu().getOr({}),o=function(e){return L(e)?Object.prototype.toString.call(e):i(e)?"":""+e},i=function(e){return""===e||null===e||void 0===e},a=function(e){var t=o(e);return ye(r,t.toLowerCase()).map(o).getOr(t)},u=function(e){return e.replace(/{context:\w+}$/,"")};if(i(e))return"";if(M(t=e)&&xe(t,"raw"))return o(e.raw);if(R(n=e)&&1<n.length){var c=e.slice(1);return u(a(e[0]).replace(/\{([0-9]+)\}/g,(function(e,t){return xe(c,t)?o(c[t]):e})))}return u(a(e))},isRtl:function(){return Nu().bind((function(e){return ye(e,"_dir")})).exists((function(e){return"rtl"===e}))},hasCode:function(e){return xe(Mu,e)}},Pu=function e(){var t=[],n={},o={},i=[],a=function(e,t){var n=Y(i,(function(n){return n.name===e&&n.state===t}));X(n,(function(e){return e.callback()}))},u=function(e){var t;return o[e]&&(t=o[e].dependencies),t||[]},c=function(e,t){return"object"==r(t)?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},s=function t(r,i,s,l,f){var d,m;n[r]||(0!==(d="string"==typeof i?i:i.prefix+i.resource+i.suffix).indexOf("/")&&-1===d.indexOf("://")&&(d=e.baseURL+"/"+d),n[r]=d.substring(0,d.lastIndexOf("/")),m=function(){var e,n,o,f;a(r,"loaded"),e=i,n=s,o=l,f=u(r),X(f,(function(n){var r=c(e,n);t(r.resource,r,void 0,void 0)})),n&&(o?n.call(o):n.call(zu))},o[r]?m():zu.ScriptLoader.add(d,m,l,f))},l=function(e,t,r){void 0===r&&(r="added"),xe(o,e)&&"added"===r||xe(n,e)&&"loaded"===r?t():i.push({name:e,state:r,callback:t})};return{items:t,urls:n,lookup:o,_listeners:i,get:function(e){return o[e]?o[e].instance:void 0},dependencies:u,requireLangPack:function(t,r){!1!==e.languageLoad&&l(t,(function(){var e=Bu.getCode();!e||r&&-1===(","+(r||"")+",").indexOf(","+e+",")||zu.ScriptLoader.add(n[t]+"/langs/"+e+".js")}),"loaded")},add:function(e,n,r){var i=n;return t.push(i),o[e]={instance:i,dependencies:r},a(e,"added"),i},remove:function(e){delete n[e],delete o[e]},createUrl:c,addComponents:function(e,t){var r=n[e];X(t,(function(e){zu.ScriptLoader.add(r+"/"+e)}))},load:s,waitFor:l}};Pu.languageLoad=!0,Pu.baseURL="",Pu.PluginManager=Pu(),Pu.ThemeManager=Pu();var Hu=function(e,t){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];null===n&&(n=setTimeout((function(){e.apply(null,r),n=null}),t))}}},Iu=function(e,t){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((function(){e.apply(null,r),n=null}),t)}}},Lu=function(e,t){var n=er(e,t);return void 0===n||""===n?[]:n.split(" ")},Vu=function(e){return void 0!==e.dom.classList},Fu=function(e,t){return o=t,i=Lu(n=e,r="class").concat([o]),Qn(n,r,i.join(" ")),!0;var n,r,o,i},ju=function(e,t){return o=t,0<(i=Y(Lu(n=e,r="class"),(function(e){return e!==o}))).length?Qn(n,r,i.join(" ")):nr(n,r),!1;var n,r,o,i},Uu=function(e,t){Vu(e)?e.dom.classList.add(t):Fu(e,t)},$u=function(e){0===(Vu(e)?e.dom.classList:Lu(e,"class")).length&&nr(e,"class")},Wu=function(e,t){return Vu(e)&&e.dom.classList.contains(t)},qu=function e(t,n){var r=[];return X(en(t),(function(t){n(t)&&(r=r.concat([t])),r=r.concat(e(t,n))})),r},Gu=function(e,t){return n=t,o=void 0===(r=e)?document:r.dom,Bt(o)?[]:G(o.querySelectorAll(n),Mt.fromDom);var n,r,o},Xu=d("mce-annotation"),Ku=d("data-mce-annotation"),Yu=d("data-mce-annotation-uid"),Ju=function(e,t){var n=e.selection.getRng(),r=Mt.fromDom(n.startContainer),o=Mt.fromDom(e.getBody()),i=t.fold((function(){return"."+Xu()}),(function(e){return"["+Ku()+'="'+e+'"]'})),a=tn(r,n.startOffset).getOr(r),u=Ir(a,i,(function(e){return Pt(e,o)})),c=function(e,t){return n=t,(r=e.dom)&&r.hasAttribute&&r.hasAttribute(n)?E.some(er(e,t)):E.none();var n,r};return u.bind((function(t){return c(t,""+Yu()).bind((function(n){return c(t,""+Ku()).map((function(t){var r=Qu(e,n);return{uid:n,name:t,elements:r}}))}))}))},Qu=function(e,t){var n=Mt.fromDom(e.getBody());return Gu(n,"["+Yu()+'="'+t+'"]')},Zu=function(e,t){var n=Au({}),r=function(e,t){o(e,(function(e){return t(e),e}))},o=function(e,t){var r=n.get(),o=t(r.hasOwnProperty(e)?r[e]:{listeners:[],previous:Au(E.none())});r[e]=o,n.set(r)},i=Iu((function(){var t,i,a,u=n.get(),c=(t=se(u),(a=F.call(t,0)).sort(i),a);X(c,(function(t){o(t,(function(n){var o=n.previous.get();return Ju(e,E.some(t)).fold((function(){var e;o.isSome()&&(r(e=t,(function(t){X(t.listeners,(function(t){return t(!1,e)}))})),n.previous.set(E.none()))}),(function(e){var t,i,a,u=e.uid,c=e.name,s=e.elements;o.is(u)||(i=u,a=s,r(t=c,(function(e){X(e.listeners,(function(e){return e(!0,t,{uid:i,nodes:G(a,(function(e){return e.dom}))})}))})),n.previous.set(E.some(u)))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);return e.on("remove",(function(){i.cancel()})),e.on("NodeChange",(function(){i.throttle()})),{addListener:function(e,t){o(e,(function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}}))}}},ec=function(e,t){e.on("init",(function(){e.serializer.addNodeFilter("span",(function(e){X(e,(function(e){var n;n=e,E.from(n.attr(Ku())).bind(t.lookup).each((function(t){!1===t.persistent&&e.unwrap()}))}))}))}))},tc=0,nc=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++tc+String(t)},rc=function(e,t){var n,r,o=qt(e).dom,i=Mt.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||document).createElement("div")).innerHTML=n,en(Mt.fromDom(r)));pn(i,a),vn(e),hn(e,i)},oc=function(e,t){return Mt.fromDom(e.dom.cloneNode(t))},ic=function(e){return oc(e,!1)},ac=function(e){return oc(e,!0)},uc=function(e,t,n){void 0===n&&(n=C);var r=new Qr(e,t),o=function(e){for(var t;(t=r[e]())&&!Vn(t)&&!n(t););return E.from(t).filter(Vn)};return{current:function(){return E.from(r.current()).filter(Vn)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},cc=function(e,t){var n=t||function(t){return e.isBlock(t)||$n(t)||Gn(t)},r=function e(t,n,r,o){if(Vn(t)){var i=o(t,n,t.data);if(-1!==i)return E.some({container:t,offset:i})}return r().bind((function(t){return e(t.container,t.offset,r,o)}))};return{backwards:function(e,t,o,i){var a=uc(e,i,n);return r(e,t,(function(){return a.prev().map((function(e){return{container:e,offset:e.length}}))}),o).getOrNull()},forwards:function(e,t,o,i){var a=uc(e,i,n);return r(e,t,(function(){return a.next().map((function(e){return{container:e,offset:0}}))}),o).getOrNull()}}},sc=function(e,t,n){return e.isSome()&&t.isSome()?E.some(n(e.getOrDie(),t.getOrDie())):E.none()},lc=Math.round,fc=function(e){return e?{left:lc(e.left),top:lc(e.top),bottom:lc(e.bottom),right:lc(e.right),width:lc(e.width),height:lc(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},dc=function(e,t){return e=fc(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},mc=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},gc=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&mc(t.top-e.bottom,e,t)},hc=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&mc(t.bottom-e.top,e,t)},pc=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},vc=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},bc=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},yc=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]"),xc=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&yc.test(e)},wc=Mn,Cc=Lo,kc=Nn("display","block table"),Sc=Nn("float","left right"),_c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}(wc,Cc,b(Sc)),Oc=b(Nn("white-space","pre pre-line pre-wrap")),Ec=Vn,Tc=$n,zc=_u.nodeIndex,Dc=bc,Ac=function(e){return"createRange"in e?e.createRange():_u.DOM.createRng()},Mc=function(e){return e&&/[\r\n\t ]/.test(e)},Rc=function(e){return!!e.setStart&&!!e.setEnd},Nc=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(Mc(e.toString())&&Oc(n.parentNode)&&Vn(n)&&(t=n.data,Mc(t[r-1])||Mc(t[r+1])))},Bc=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},Pc=function e(t){var n=t.getClientRects(),r=0<n.length?fc(n[0]):fc(t.getBoundingClientRect());return!Rc(t)&&Tc(t)&&Bc(r)?function(e){var t=e.ownerDocument,n=Ac(t),r=t.createTextNode(ho),o=e.parentNode;o.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=fc(n.getBoundingClientRect());return o.removeChild(r),i}(t):Bc(r)&&Rc(t)?function(t){var n=t.startContainer,r=t.endContainer,o=t.startOffset,i=t.endOffset;if(n===r&&Vn(r)&&0===o&&1===i){var a=t.cloneRange();return a.setEndAfter(r),e(a)}return null}(t):r},Hc=function(e,t){var n=dc(e,t);return n.width=1,n.right=n.left+1,n},Ic=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=Ac(e.ownerDocument);if(t<e.data.length){if(xc(e.data[t]))return r;if(xc(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Nc(n)))return o(Hc(Pc(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Nc(n)||o(Hc(Pc(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Nc(n)||o(Hc(Pc(n),!0)))};if(Ec(e.container()))return i(e.container(),e.offset()),r;if(wc(e.container()))if(e.isAtEnd())n=Dc(e.container(),e.offset()),Ec(n)&&i(n,n.data.length),_c(n)&&!Tc(n)&&o(Hc(Pc(n),!1));else{if(n=Dc(e.container(),e.offset()),Ec(n)&&i(n,0),_c(n)&&e.isAtEnd())return o(Hc(Pc(n),!1)),r;t=Dc(e.container(),e.offset()-1),_c(t)&&!Tc(t)&&(!kc(t)&&!kc(n)&&_c(n)||o(Hc(Pc(t),!1))),_c(n)&&o(Hc(Pc(n),!0))}return r},Lc=function e(t,n,r){var o=function(){return r=r||Ic(e(t,n))};return{container:d(t),offset:d(n),toRange:function(){var e=Ac(t.ownerDocument);return e.setStart(t,n),e.setEnd(t,n),e},getClientRects:o,isVisible:function(){return 0<o().length},isAtStart:function(){return Ec(t),0===n},isAtEnd:function(){return Ec(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return Dc(t,e?n-1:n)}}};Lc.fromRangeStart=function(e){return Lc(e.startContainer,e.startOffset)},Lc.fromRangeEnd=function(e){return Lc(e.endContainer,e.endOffset)},Lc.after=function(e){return Lc(e.parentNode,zc(e)+1)},Lc.before=function(e){return Lc(e.parentNode,zc(e))},Lc.isAbove=function(e,t){return sc(ae(t.getClientRects()),ue(e.getClientRects()),gc).getOr(!1)},Lc.isBelow=function(e,t){return sc(ue(t.getClientRects()),ae(e.getClientRects()),hc).getOr(!1)},Lc.isAtStart=function(e){return!!e&&e.isAtStart()},Lc.isAtEnd=function(e){return!!e&&e.isAtEnd()},Lc.isTextPosition=function(e){return!!e&&Vn(e.container())},Lc.isElementPosition=function(e){return!1===Lc.isTextPosition(e)};var Vc,Fc,jc=function(e,t){Vn(t)&&0===t.data.length&&e.remove(t)},Uc=function(e,t,n){var r,o,i,a,u,c,s;Un(n)?(i=e,a=t,u=n,c=E.from(u.firstChild),s=E.from(u.lastChild),a.insertNode(u),c.each((function(e){return jc(i,e.previousSibling)})),s.each((function(e){return jc(i,e.nextSibling)}))):(r=e,o=n,t.insertNode(o),jc(r,o.previousSibling),jc(r,o.nextSibling))},$c=Vn,Wc=Pn,qc=_u.nodeIndex,Gc=function e(t){var n=t.parentNode;return Wc(n)?e(n):n},Xc=function e(t){return t?Ee(t.childNodes,(function(t,n){return Wc(n)&&"BR"!==n.nodeName?t=t.concat(e(n)):t.push(n),t}),[]):[]},Kc=function(e){return function(t){return e===t}},Yc=function(e){var t=$c(e)?"text()":e.nodeName.toLowerCase();return t+"["+function(e){var t=Xc(Gc(e)),n=Te(t,Kc(e),e);t=t.slice(0,n+1);var r=Ee(t,(function(e,n,r){return $c(n)&&$c(t[r-1])&&e++,e}),0);return t=_e(t,Rn([e.nodeName])),(n=Te(t,Kc(e),e))-r}(e)+"]"},Jc=function(e,t){var n,r,o,i=[],a=t.container(),u=t.offset();return $c(a)?n=function(e,t){for(;(e=e.previousSibling)&&$c(e);)t+=e.data.length;return t}(a,u):(u>=(r=a.childNodes).length?(n="after",u=r.length-1):n="before",a=r[u]),i.push(Yc(a)),o=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}(e,a),o=_e(o,b(Pn)),(i=i.concat(Se(o,Yc))).reverse().join("/")+","+n},Qc=function(e,t){if(!t)return null;var n=t.split(","),r=n[0].split("/"),o=1<n.length?n[1]:"before",i=Ee(r,(function(e,t){var n,r,o,i,a=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return a?("text()"===a[1]&&(a[1]="#text"),n=e,r=a[1],o=parseInt(a[2],10),i=Xc(n),i=_e(i,(function(e,t){return!$c(e)||!$c(i[t-1])})),(i=_e(i,Rn([r])))[o]):null}),e);return i?$c(i)?function(e,t){for(var n,r=e,o=0;$c(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!$c(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return $c(e)&&t>e.data.length&&(t=e.data.length),Lc(e,t)}(i,parseInt(o,10)):(o="after"===o?qc(i)+1:qc(i),Lc(i.parentNode,o)):null},Zc=Gn,es=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,l=e.getRoot();for(Vn(a)?c.push(n?function(e,t,n){for(var r=e(t.data.slice(0,n)).length,o=t.previousSibling;o&&Vn(o);o=o.previousSibling)r+=e(o.data).length;return r}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(e.nodeIndex(i[u],n)+s));a&&a!==l;a=a.parentNode)c.push(e.nodeIndex(a,n));return c},ts=function(e,t,n){var r=0;return Dt.each(e.select(t),(function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++})),r},ns=function(e,t){var n,r=t?"start":"end",o=e[r+"Container"],i=e[r+"Offset"];Mn(o)&&"TR"===o.nodeName&&(o=(n=o.childNodes)[Math.min(t?i:i-1,n.length-1)])&&(i=t?0:o.childNodes.length,e["set"+(t?"Start":"End")](o,i))},rs=function(e){return ns(e,!0),ns(e,!1),e},os=function(e,t){var n;if(Mn(e)&&(e=bc(e,t),Zc(e)))return e;if(ko(e)){if(Vn(e)&&wo(e)&&(e=e.parentNode),n=e.previousSibling,Zc(n))return n;if(n=e.nextSibling,Zc(n))return n}},is=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Zc(r)||"IMG"===o)return{name:o,index:ts(n.dom,o,r)};var a,u,c,s,l,f,d,m=os((a=i).startContainer,a.startOffset)||os(a.endContainer,a.endOffset);return m?{name:o=m.tagName,index:ts(n.dom,o,m)}:(u=e,s=t,l=i,f=(c=n).dom,(d={}).start=es(f,u,s,l,!0),c.isCollapsed()||(d.end=es(f,u,s,l,!1)),d)},as=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},us=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:ts(n,u,a)};var c,s=rs(r.cloneRange());i||(s.collapse(!1),c=as(n,o+"_end",t),Uc(n,s,c)),(r=rs(r)).collapse(!0);var l=as(n,o+"_start",t);return Uc(n,r,l),e.moveToBookmark({id:o,keep:!0}),{id:o}},cs=function(e,t,n){return 2===t?is(bo,n,e):3===t?(o=(r=e).getRng(),{start:Jc(r.dom.getRoot(),Lc.fromRangeStart(o)),end:Jc(r.dom.getRoot(),Lc.fromRangeEnd(o))}):t?{rng:e.getRng()}:us(e,!1);var r,o},ss=g(is,m,!0),ls=_u.DOM,fs=function(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n},ds=function(e){return e.getParam("content_security_policy","")},ms=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},gs=function(e){return e.getParam("forced_root_block_attrs",{})},hs=function(e){return e.getParam("automatic_uploads",!0,"boolean")},ps=function(e){return e.getParam("icons","","string")},vs=function(e){return e.getParam("referrer_policy","","string")},bs=function(e){return e.getParam("language","en","string")},ys=function(e){return e.getParam("indent_use_margin",!1)},xs=function(e){var t=e.getParam("font_css",[]);return R(t)?t:G(t.split(","),Ke)},ws=function(e){var t=e.getParam("object_resizing");return!1!==t&&!_t.iOS&&(A(t)?t:"table,img,figure.image,div,video,iframe")},Cs=function(e){return e.getParam("event_root")},ks=function(e){return e.getParam("theme")},Ss=function(e){return!1!==e.getParam("inline_boundaries")},_s=function(e){return e.getParam("plugins","","string")},Os=Mn,Es=Vn,Ts=function(e){var t=e.parentNode;t&&t.removeChild(e)},zs=function(e){var t=bo(e);return{count:e.length-t.length,text:t}},Ds=function(e){for(var t;-1!==(t=e.data.lastIndexOf(po));)e.deleteData(t,1)},As=function(e,t){return Bs(e),t},Ms=function(e,t){var n,r,o=t.container(),i=(n=ce(o.childNodes),(-1===(r=$(n,e))?E.none():E.some(r)).map((function(e){return e<t.offset()?Lc(o,t.offset()-1):t})).getOr(t));return Bs(e),i},Rs=function(e,t){return Es(e)&&t.container()===e?(r=t,o=zs((n=e).data.substr(0,r.offset())),i=zs(n.data.substr(r.offset())),0<(o.text+i.text).length?(Ds(n),Lc(n,r.offset()-o.count)):r):As(e,t);var n,r,o,i},Ns=function(e,t){return Lc.isTextPosition(t)?Rs(e,t):(n=e,((r=t).container()===n.parentNode?Ms:As)(n,r));var n,r},Bs=function(e){Os(e)&&ko(e)&&(So(e)?e.removeAttribute("data-mce-caret"):Ts(e)),Es(e)&&(Ds(e),0===e.data.length&&Ts(e))},Ps=pt().browser,Hs=Gn,Is=Kn,Ls=Xn,Vs=function(e,t,n){var r,o,i,a,u=dc(t.getBoundingClientRect(),n),c="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(a=e.getBoundingClientRect(),o=e.scrollLeft-a.left,e.scrollTop-a.top);return u.left+=o,u.right+=o,u.top+=c,u.bottom+=c,u.width=1,0<(i=t.offsetWidth-t.clientWidth)&&(n&&(i*=-1),u.left+=i,u.right+=i),u},Fs=function(e,t,n,r){var o,i,a=Au(E.none()),u=ms(e),c=0<u.length?u:"p",s=function(){!function(e){for(var t=Gu(Mt.fromDom(e),"*[contentEditable=false],video,audio,embed,object"),n=0;n<t.length;n++){var r,o=t[n].dom,i=o.previousSibling;zo(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(r.length-1,1)),i=o.nextSibling,To(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(0,1))}}(t),i&&(Bs(i),i=null),a.get().each((function(e){bu(e.caret).remove(),a.set(E.none())})),o&&(Kr.clearInterval(o),o=null)},l=function(){o=Kr.setInterval((function(){r()?bu("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):bu("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")}),500)};return{show:function(e,r){var o,u;if(s(),Ls(r))return null;if(!n(r))return i=function(e,t){var n,r=e.ownerDocument.createTextNode(po),o=e.parentNode;if(t){if(n=e.previousSibling,xo(n)){if(ko(n))return n;if(zo(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,xo(n)){if(ko(n))return n;if(To(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(r,e),u=r.ownerDocument.createRange(),Us(i.nextSibling)?(u.setStart(i,0),u.setEnd(i,0)):(u.setStart(i,1),u.setEnd(i,1)),u;i=Eo(c,r,e),o=Vs(t,r,e),bu(i).css("top",o.top);var f=bu('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(o).appendTo(t)[0];return a.set(E.some({caret:f,element:r,before:e})),a.get().each((function(t){e&&bu(t.caret).addClass("mce-visual-caret-before")})),l(),(u=r.ownerDocument.createRange()).setStart(i,0),u.setEnd(i,0),u},hide:s,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){a.get().each((function(e){var n=Vs(t,e.element,e.before);bu(e.caret).css(De({},n))}))},destroy:function(){return Kr.clearInterval(o)}}},js=function(){return Ps.isIE()||Ps.isEdge()||Ps.isFirefox()},Us=function(e){return Hs(e)||Is(e)},$s=function(e){return Us(e)||Hn(e)&&js()},Ws=Gn,qs=Kn,Gs=Nn("display","block table table-cell table-caption list-item"),Xs=ko,Ks=wo,Ys=Mn,Js=Lo,Qs=function(e,t){for(var n;n=e(t);)if(!Ks(n))return n;return null},Zs=function(e,t,n,r,o){var i=new Qr(e,r),a=Ws(e)||Ks(e);if(t<0){if(a&&n(e=Qs(i.prev.bind(i),!0)))return e;for(;e=Qs(i.prev.bind(i),o);)if(n(e))return e}if(0<t){if(a&&n(e=Qs(i.next.bind(i),!0)))return e;for(;e=Qs(i.next.bind(i),o);)if(n(e))return e}return null},el=function(e,t){for(;e&&e!==t;){if(Gs(e))return e;e=e.parentNode}return null},tl=function(e,t,n){return el(e.container(),n)===el(t.container(),n)},nl=function(e,t){if(!t)return null;var n=t.container(),r=t.offset();return Ys(n)?n.childNodes[r+e]:null},rl=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},ol=function(e,t,n){for(var r,o,i,a=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[a],Xs(r)&&(r=r[a]),Ws(r)||qs(r)){if(i=n,el(r,o=t)===el(i,o))return r;break}if(Js(r))break;n=n.parentNode}return null},il=g(rl,!0),al=g(rl,!1),ul=function(e,t,n){var r,o,i=g(ol,!0,t),a=g(ol,!1,t),u=n.startContainer,c=n.startOffset;if(wo(u)){if(Ys(u)||(u=u.parentNode),"before"===(o=u.getAttribute("data-mce-caret"))&&(r=u.nextSibling,$s(r)))return il(r);if("after"===o&&(r=u.previousSibling,$s(r)))return al(r)}if(!n.collapsed)return n;if(Vn(u)){if(Xs(u)){if(1===e){if(r=a(u))return il(r);if(r=i(u))return al(r)}if(-1===e){if(r=i(u))return al(r);if(r=a(u))return il(r)}return n}if(zo(u)&&c>=u.data.length-1)return 1===e&&(r=a(u))?il(r):n;if(To(u)&&c<=1)return-1===e&&(r=i(u))?al(r):n;if(c===u.data.length)return(r=a(u))?il(r):n;if(0===c)return(r=i(u))?al(r):n}return n},cl=function(e,t){return E.from(nl(e?0:-1,t)).filter(Ws)},sl=function(e,t,n){var r=ul(e,t,n);return-1===e?Lc.fromRangeStart(r):Lc.fromRangeEnd(r)},ll=function(e){return E.from(e.getNode()).map(Mt.fromDom)},fl=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},dl=function(e,t){var n=tl(e,t);return!(n||!$n(e.getNode()))||n};(Fc=Vc=Vc||{})[Fc.Backwards=-1]="Backwards",Fc[Fc.Forwards=1]="Forwards";var ml,gl,hl,pl,vl=Gn,bl=Vn,yl=Mn,xl=$n,wl=Lo,Cl=function(e){return Po(e)||!!Vo(t=e)&&!0!==Q(ce(t.getElementsByTagName("*")),(function(e,t){return e||Ao(t)}),!1);var t},kl=Fo,Sl=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},_l=function(e,t){if(0<e){if(wl(t.previousSibling)&&!bl(t.previousSibling))return Lc.before(t);if(bl(t))return Lc(t,0)}if(e<0){if(wl(t.nextSibling)&&!bl(t.nextSibling))return Lc.after(t);if(bl(t))return Lc(t,t.data.length)}return e<0&&!xl(t)?Lc.after(t):Lc.before(t)},Ol=function e(t,n,r){var o,i,a,u;if(!yl(r)||!n)return null;if(n.isEqual(Lc.after(r))&&r.lastChild){if(u=Lc.after(r.lastChild),t<0&&wl(r.lastChild)&&yl(r.lastChild))return xl(r.lastChild)?Lc.before(r.lastChild):u}else u=n;var c,s,l,f=u.container(),d=u.offset();if(bl(f)){if(t<0&&0<d)return Lc(f,--d);if(0<t&&d<f.length)return Lc(f,++d);o=f}else{if(t<0&&0<d&&(i=Sl(f,d-1),wl(i)))return!Cl(i)&&(a=Zs(i,t,kl,i))?bl(a)?Lc(a,a.data.length):Lc.after(a):bl(i)?Lc(i,i.data.length):Lc.before(i);if(0<t&&d<f.childNodes.length&&(i=Sl(f,d),wl(i)))return xl(i)?(c=r,(l=(s=i).nextSibling)&&wl(l)?bl(l)?Lc(l,0):Lc.before(l):e(Vc.Forwards,Lc.after(s),c)):!Cl(i)&&(a=Zs(i,t,kl,i))?bl(a)?Lc(a,0):Lc.before(a):bl(i)?Lc(i,0):Lc.after(i);o=i||u.getNode()}if((0<t&&u.isAtEnd()||t<0&&u.isAtStart())&&(o=Zs(o,t,k,r,!0),kl(o,r)))return _l(t,o);i=Zs(o,t,kl,r);var m=ze(Y(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,r),vl));return!m||i&&m.contains(i)?i?_l(t,i):null:u=0<t?Lc.after(m):Lc.before(m)},El=function(e){return{next:function(t){return Ol(Vc.Forwards,t,e)},prev:function(t){return Ol(Vc.Backwards,t,e)}}},Tl=function(e){return Lc.isTextPosition(e)?0===e.offset():Lo(e.getNode())},zl=function(e){if(Lc.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Lo(e.getNode(!0))},Dl=function(e,t){return!Lc.isTextPosition(e)&&!Lc.isTextPosition(t)&&e.getNode()===t.getNode(!0)},Al=function(e,t,n){return e?!Dl(t,n)&&(r=t,!(!Lc.isTextPosition(r)&&$n(r.getNode())))&&zl(t)&&Tl(n):!Dl(n,t)&&Tl(t)&&zl(n);var r},Ml=function(e,t,n){var r=El(t);return E.from(e?r.next(n):r.prev(n))},Rl=function(e,t,n){return Ml(e,t,n).bind((function(r){return tl(n,r,t)&&Al(e,n,r)?Ml(e,t,r):E.some(r)}))},Nl=function e(t,n,r,o){return Rl(t,n,r).bind((function(r){return o(r)?e(t,n,r,o):E.some(r)}))},Bl=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return Vn(u)?E.some(Lc(u,e?0:u.data.length)):u?Lo(u)?E.some(e?Lc.before(u):$n(a=u)?Lc.before(a):Lc.after(a)):(r=t,o=u,i=(n=e)?Lc.before(o):Lc.after(o),Ml(n,r,i)):E.none()},Pl=g(Ml,!0),Hl=g(Ml,!1),Il=g(Bl,!0),Ll=g(Bl,!1),Vl="_mce_caret",Fl=function(e){return Mn(e)&&e.id===Vl},jl=function(e,t){for(;t&&t!==e;){if(t.id===Vl)return t;t=t.parentNode}return null},Ul=function(e,t){return Mn(t)&&e.isBlock(t)&&!t.innerHTML&&!_t.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},$l=function(e,t,n){return!(!1!==t.hasChildNodes()||!jl(e,t))&&(o=n,i=(r=t).ownerDocument.createTextNode(po),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),!0);var r,o,i},Wl=function(e,t,n,r){var o,i,a,u,c=n[t?"start":"end"],s=e.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;1<=o;o--){if(u=i.childNodes,$l(s,i,r))return!0;if(c[o]>u.length-1)return!!$l(s,i,r)||function(e,t){return Ll(e).fold(C,(function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0}))}(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},ql=function(e){return Vn(e)&&0<e.data.length},Gl=function(e,t,n){var r,o,i,a,u,c,s=e.get(n.id+"_"+t),l=n.keep;if(s){if(r=s.parentNode,o="start"===t?l?s.hasChildNodes()?(r=s.firstChild,1):ql(s.nextSibling)?(r=s.nextSibling,0):ql(s.previousSibling)?(r=s.previousSibling,s.previousSibling.data.length):(r=s.parentNode,e.nodeIndex(s)+1):e.nodeIndex(s):l?s.hasChildNodes()?(r=s.firstChild,1):ql(s.previousSibling)?(r=s.previousSibling,s.previousSibling.data.length):(r=s.parentNode,e.nodeIndex(s)):e.nodeIndex(s),u=r,c=o,!l){for(a=s.previousSibling,i=s.nextSibling,Dt.each(Dt.grep(s.childNodes),(function(e){Vn(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))}));s=e.get(n.id+"_"+t);)e.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&Vn(a)&&!_t.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),u=a,c=o)}return E.some(Lc(u,c))}return E.none()},Xl=function(e,t){var n,r,o,i,a,u,c,s,l,f,d,m,g,h,p=e.dom;if(t){if(h=t,Dt.isArray(h.start))return m=t,g=(d=p).createRng(),Wl(d,!0,m,g)&&Wl(d,!1,m,g)?E.some(g):E.none();if(A(t.start))return E.some((s=t,l=(c=p).createRng(),f=Qc(c.getRoot(),s.start),l.setStart(f.container(),f.offset()),f=Qc(c.getRoot(),s.end),l.setEnd(f.container(),f.offset()),l));if(t.hasOwnProperty("id"))return a=Gl(o=p,"start",i=t),u=Gl(o,"end",i),sc(a,u.or(a),(function(e,t){var n=o.createRng();return n.setStart(Ul(o,e.container()),e.offset()),n.setEnd(Ul(o,t.container()),t.offset()),n}));if(t.hasOwnProperty("name"))return n=p,r=t,E.from(n.select(r.name)[r.index]).map((function(e){var t=n.createRng();return t.selectNode(e),t}));if(t.hasOwnProperty("rng"))return E.some(t.rng)}return E.none()},Kl=cs,Yl=function(e,t){Xl(e,t).each((function(t){e.setRng(t)}))},Jl=function(e){return Mn(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Ql=(ml=ho,function(e){return ml===e}),Zl=function(e){return""!==e&&-1!==" \f\n\r\t\v".indexOf(e)},ef=function(e){return!Zl(e)&&!Ql(e)},tf=function(e){return!!e.nodeType},nf=function(e,t,n){var r,o,i,a,u=n.startOffset,c=n.startContainer;if((n.startContainer!==n.endContainer||!(a=n.startContainer.childNodes[n.startOffset])||!/^(IMG)$/.test(a.nodeName))&&1===c.nodeType)for(u<(i=c.childNodes).length?(c=i[u],r=new Qr(c,e.getParent(c,e.isBlock))):(c=i[i.length-1],(r=new Qr(c,e.getParent(c,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!uf(o))return n.setStart(o,0),void t.setRng(n)},rf=function(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(1===e.nodeType||!uf(e))return e}},of=function(e,t){return tf(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},af=function(e,t,n){return e.schema.isValidChild(t,n)},uf=function(e,t){if(void 0===t&&(t=!1),I(e)&&Vn(e)){var n=t?e.data.replace(/ /g," "):e.data;return Uo(n)}return!1},cf=function(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,(function(e,n){return t[n]||e}))),e},sf=function(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()===t.toLowerCase()},lf=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},ff=function(e,t,n){return lf(e,e.getStyle(t,n),n)},df=function(e,t){var n;return e.getParent(t,(function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n})),n},mf=function(e,t,n){return e.getParents(t,n,e.getRoot())},gf=function(e,t,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(e){return ve(e,(function(e,t){return q(r,(function(e){return e===t}))}))};return q(e.formatter.get(t),(function(t){var r=o(t);return q(e.formatter.get(n),(function(e){var t,n,i,a=o(e);return t=r,n=a,void 0===i&&(i=s),c(i).eq(t,n)}))}))},hf=function(e){return we(e,"block")},pf=function(e){return we(e,"selector")},vf=function(e){return we(e,"inline")},bf=Jl,yf=mf,xf=uf,wf=of,Cf=function(e,t){for(var n=t;n;){if(Mn(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},kf=function(e,t,n,r){for(var o=t.data,i=n;e?0<=i:i<o.length;e?i--:i++)if(r(o.charAt(i)))return e?i+1:i;return-1},Sf=function(e,t,n){return kf(e,t,n,(function(e){return Ql(e)||Zl(e)}))},_f=function(e,t,n){return kf(e,t,n,ef)},Of=function(e,t,n,r,o,i){var a,u=e.getParent(n,e.isBlock)||t,c=function(t,n,r){var i=cc(e),c=o?i.backwards:i.forwards;return E.from(c(t,n,(function(e,t){return bf(e.parentNode)?-1:r(o,a=e,t)}),u))};return c(n,r,Sf).bind((function(e){return i?c(e.container,e.offset+(o?-1:0),_f):E.some(e)})).orThunk((function(){return a?E.some({container:a,offset:o?0:a.length}):E.none()}))},Ef=function(e,t,n,r,o){Vn(r)&&0===r.nodeValue.length&&r[o]&&(r=r[o]);for(var i=yf(e,r),a=0;a<i.length;a++)for(var u=0;u<t.length;u++){var c=t[u];if((!("collapsed"in c)||c.collapsed===n.collapsed)&&e.is(i[a],c.selector))return i[a]}return r},Tf=function(e,t,n,r){var o,i,a=e.dom,u=a.getRoot();if(t[0].wrapper||(i=a.getParent(n,t[0].block,u)),i||(o=a.getParent(n,"LI,TD,TH"),i=a.getParent(Vn(n)?n.parentNode:n,(function(t){return t!==u&&wf(e,t)}),o)),i&&t[0].wrapper&&(i=yf(a,i,"ul,ol").reverse()[0]||i),!i)for(i=n;i[r]&&!a.isBlock(i[r])&&(i=i[r],!sf(i,"br")););return i||n},zf=function e(t,n,r,o){var i=r.parentNode;return!I(r[o])&&(!(i!==n&&!H(i)&&!t.isBlock(i))||e(t,n,i,o))},Df=function(e,t,n,r,o){var i,a,u=n,c=o?"previousSibling":"nextSibling",s=e.getRoot();if(Vn(n)&&!xf(n)&&(o?0<r:r<n.data.length))return n;for(;;){if(!t[0].block_expand&&e.isBlock(u))return u;for(i=u[c];i;i=i[c]){var l=Vn(i)&&!zf(e,s,i,c);if(!bf(i)&&(!$n(a=i)||!a.getAttribute("data-mce-bogus")||a.nextSibling)&&!xf(i,l))return u}if(u===s||u.parentNode===s){n=u;break}u=u.parentNode}return n},Af=function(e){return bf(e.parentNode)||bf(e)},Mf=function(e,t,n,r){void 0===r&&(r=!1);var o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset,c=e.dom;return Mn(o)&&o.hasChildNodes()&&(o=bc(o,i),Vn(o)&&(i=0)),Mn(a)&&a.hasChildNodes()&&(a=bc(a,t.collapsed?u:u-1),Vn(a)&&(u=a.nodeValue.length)),o=Cf(c,o),a=Cf(c,a),Af(o)&&(o=bf(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,Vn(o)&&(i=t.collapsed?o.length:0)),Af(a)&&(a=bf(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,Vn(a)&&(u=t.collapsed?0:a.length)),t.collapsed&&(Of(c,e.getBody(),o,i,!0,r).each((function(e){var t=e.container,n=e.offset;o=t,i=n})),Of(c,e.getBody(),a,u,!1,r).each((function(e){var t=e.container,n=e.offset;a=t,u=n}))),(n[0].inline||n[0].block_expand)&&(n[0].inline&&Vn(o)&&0!==i||(o=Df(c,n,o,i,!0)),n[0].inline&&Vn(a)&&u!==a.nodeValue.length||(a=Df(c,n,a,u,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(o=Ef(c,n,t,o,"previousSibling"),a=Ef(c,n,t,a,"nextSibling")),(n[0].block||n[0].selector)&&(o=Tf(e,n,o,"previousSibling"),a=Tf(e,n,a,"nextSibling"),n[0].block&&(c.isBlock(o)||(o=Df(c,n,o,i,!0)),c.isBlock(a)||(a=Df(c,n,a,u,!1)))),Mn(o)&&(i=c.nodeIndex(o),o=o.parentNode),Mn(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},Rf=function(e,t){var n=e.childNodes;return t>=n.length?t=n.length-1:t<0&&(t=0),n[t]||e},Nf=function(e,t,n){var r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,u=function(e){var t=e[0];return 3===t.nodeType&&t===r&&o>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===a&&0<e.length&&t===i&&3===t.nodeType&&e.splice(e.length-1,1),e},c=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},s=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},l=function(e,t,r){for(var o=r?"nextSibling":"previousSibling",i=e,a=i.parentNode;i&&i!==t;i=a){a=i.parentNode;var s=c(i===e?i:i[o],o);s.length&&(r||s.reverse(),n(u(s)))}};if(1===r.nodeType&&r.hasChildNodes()&&(r=Rf(r,o)),1===i.nodeType&&i.hasChildNodes()&&(i=Rf(i,a-1)),r===i)return n(u([r]));for(var f=e.findCommonAncestor(r,i),d=r;d;d=d.parentNode){if(d===i)return l(r,f,!0);if(d===f)break}for(d=i;d;d=d.parentNode){if(d===r)return l(i,f);if(d===f)break}var m=s(r,f)||r,g=s(i,f)||i;l(r,m,!0);var h=c(m===r?m:m.nextSibling,"nextSibling",g===i?g.nextSibling:g);h.length&&n(u(h)),l(i,g)},Bf=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Pf=function(e){return Y(te(e,(function(e){var t=vc(e);return t?[Mt.fromDom(t)]:[]})),fo)},Hf=function(e,t){var n=Gu(t,"td[data-mce-selected],th[data-mce-selected]");return 0<n.length?n:Pf(e)},If=function(e){return Hf(Bf(e.selection.getSel()),Mt.fromDom(e.getBody()))},Lf=function e(t){return nn(t).fold(d([t]),(function(n){return[t].concat(e(n))}))},Vf=function e(t){return rn(t).fold(d([t]),(function(n){return"br"===Lt(n)?Yt(n).map((function(n){return[t].concat(e(n))})).getOr([]):[t].concat(e(n))}))},Ff=function(e,t){return sc((a=(i=t).startContainer,u=i.startOffset,Vn(a)?0===u?E.some(Mt.fromDom(a)):E.none():E.from(a.childNodes[u]).map(Mt.fromDom)),(r=(n=t).endContainer,o=n.endOffset,Vn(r)?o===r.data.length?E.some(Mt.fromDom(r)):E.none():E.from(r.childNodes[o-1]).map(Mt.fromDom)),(function(t,n){var r=Z(Lf(e),g(Pt,t)),o=Z(Vf(e),g(Pt,n));return r.isSome()&&o.isSome()})).getOr(!1);var n,r,o,i,a,u},jf=function(e,t,n,r){var o=n,i=new Qr(n,o),a=ve(e.schema.getMoveCaretBeforeOnEnterElements(),(function(e,t){return!W(["td","th","table"],t.toLowerCase())}));do{if(Vn(n)&&0!==Dt.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName])return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Uf=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount},$f=function(e,t){var n=If(e);0<n.length?X(n,(function(n){var r=n.dom,o=e.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),t(o,!0)})):t(e.selection.getRng(),!1)},Wf=function(e,t,n){var r=us(e,t);n(r),e.moveToBookmark(r)},qf=(gl=Ut,hl="text",{get:function(e){if(!gl(e))throw new Error("Can only get "+hl+" value of a "+hl+" node");return pl(e).getOr("")},getOption:pl=function(e){return gl(e)?E.from(e.dom.nodeValue):E.none()},set:function(e,t){if(!gl(e))throw new Error("Can only set raw "+hl+" value of a "+hl+" node");e.dom.nodeValue=t}}),Gf=function(e){return qf.get(e)},Xf=function(e,t,n,r){return Kt(t).fold((function(){return"skipping"}),(function(o){return"br"===r||Ut(a=t)&&Gf(a)===po?"valid":jt(i=t)&&Wu(i,Xu())?"existing":Fl(t.dom)?"caret":af(e,n,r)&&af(e,Lt(o),n)?"valid":"invalid-child";var i,a}))},Kf=function(e,t,n,r){var o=t.uid,i=void 0===o?nc("mce-annotation"):o,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),u=Mt.fromTag("span",e);Uu(u,Xu()),Qn(u,""+Yu(),i),Qn(u,""+Ku(),n);var c,s=r(i,a),l=s.attributes,f=void 0===l?{}:l,d=s.classes,m=void 0===d?[]:d;return Zn(u,f),c=u,X(m,(function(e){Uu(c,e)})),u},Yf=function(e,t,n,r,o){var i=[],a=Kf(e.getDoc(),o,n,r),u=Au(E.none()),c=function(){u.set(E.none())},s=function(e){X(e,l)},l=function(t){var n,r;switch(Xf(e,t,"span",Lt(t))){case"invalid-child":c();var o=en(t);s(o),c();break;case"valid":var l=u.get().getOrThunk((function(){var e=ic(a);return i.push(e),u.set(E.some(e)),e}));dn(n=t,r=l),hn(r,n)}};return Nf(e.dom,t,(function(e){var t;c(),t=G(e,Mt.fromDom),s(t)})),i},Jf=function(e,t,n,r){e.undoManager.transact((function(){var o,i,a,u,c=e.selection,s=c.getRng(),l=0<If(e).length;s.collapsed&&!l&&(a=Mf(o=e,i=s,[{inline:!0}]),i.setStart(a.startContainer,a.startOffset),i.setEnd(a.endContainer,a.endOffset),o.selection.setRng(i)),c.getRng().collapsed&&!l?(u=Kf(e.getDoc(),r,t,n.decorate),rc(u,ho),c.getRng().insertNode(u.dom),c.select(u.dom)):Wf(c,!1,(function(){$f(e,(function(o){Yf(e,o,t,n.decorate,r)}))}))}))},Qf=function(e){var t,n=(t={},{register:function(e,n){t[e]={name:e,settings:n}},lookup:function(e){return t.hasOwnProperty(e)?E.from(t[e]).map((function(e){return e.settings})):E.none()}});ec(e,n);var r=Zu(e);return{register:function(e,t){n.register(e,t)},annotate:function(t,r){n.lookup(t).each((function(n){Jf(e,t,n,r)}))},annotationChanged:function(e,t){r.addListener(e,t)},remove:function(t){Ju(e,E.some(t)).each((function(e){var t=e.elements;X(t,yn)}))},getAll:function(t){var n,r,o,i,a,u=(n=e,r=t,o=Mt.fromDom(n.getBody()),i=Gu(o,"["+Ku()+'="'+r+'"]'),a={},X(i,(function(e){var t=er(e,Yu()),n=a.hasOwnProperty(t)?a[t]:[];a[t]=n.concat([e])})),a);return de(u,(function(e){return G(e,(function(e){return e.dom}))}))}}},Zf=function(e){return{getBookmark:g(Kl,e),moveToBookmark:g(Yl,e)}};Zf.isBookmarkNode=Jl;var ed=function(e,t){for(;t&&t!==e;){if(qn(t)||Gn(t))return t;t=t.parentNode}return null},td=function(e,t,n){if(n.collapsed)return!1;if(_t.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Mn(r))return q(r.getClientRects(),(function(n){return pc(n,e,t)}))}return q(n.getClientRects(),(function(n){return pc(n,e,t)}))},nd=function(e,t,n){return e.fire(t,n)},rd={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||rd.metaKeyPressed(e)},metaKeyPressed:function(e){return _t.mac?e.metaKey:e.ctrlKey&&!e.altKey}},od=Gn,id=function(e,t){var n,r,o,i,a,u,c,s,l,f,d,m,g,p,v,b="data-mce-selected",y=t.dom,x=Dt.each,w=t.getDoc(),C=document,k=Math.abs,S=Math.round,_=t.getBody(),O={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},E=function(e){return e&&("IMG"===e.nodeName||t.dom.is(e,"figure.image"))},T=function(e){return Kn(e)||y.hasClass(e,"mce-preview-object")},z=function(e){var n=e.target;!function(e,t){if("longpress"!==e.type&&0!==e.type.indexOf("touch"))return E(e.target)&&!td(e.clientX,e.clientY,t);var n=e.touches[0];return E(e.target)&&!td(n.clientX,n.clientY,t)}(e,t.selection.getRng())||e.isDefaultPrevented()||t.selection.select(n)},D=function(e){return y.is(e,"figure.image")?[e.querySelector("img")]:y.hasClass(e,"mce-preview-object")&&I(e.firstElementChild)?[e,e.firstElementChild]:[e]},A=function(e){var n=ws(t);return!!n&&"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&(y.hasClass(e,"mce-preview-object")?Nt(Mt.fromDom(e.firstElementChild),n):Nt(Mt.fromDom(e),n))},M=function(e,n,r){var o;I(r)&&(o=D(e),X(o,(function(e){e.style[n]||!t.schema.isValid(e.nodeName.toLowerCase(),n)?y.setStyle(e,n,r):y.setAttrib(e,n,""+r)})))},R=function(e,t,n){M(e,"width",t),M(e,"height",n)},N=function(e){var a,h,b,x,w,C,O,z=e.screenX-u,D=e.screenY-c;m=z*i[2]+s,g=D*i[3]+l,m=m<5?5:m,g=g<5?5:g,((E(n)||T(n))&&!1!==t.getParam("resize_img_proportional",!0,"boolean")?!rd.modifierPressed(e):rd.modifierPressed(e))&&(k(z)>k(D)?(g=S(m*f),m=S(g/f)):(m=S(g/f),g=S(m*f))),R(r,m,g),a=0<(a=i.startPos.x+z)?a:0,h=0<(h=i.startPos.y+D)?h:0,y.setStyles(o,{left:a,top:h,display:"block"}),o.innerHTML=m+" &times; "+g,i[2]<0&&r.clientWidth<=m&&y.setStyle(r,"left",void 0+(s-m)),i[3]<0&&r.clientHeight<=g&&y.setStyle(r,"top",void 0+(l-g)),(z=_.scrollWidth-p)+(D=_.scrollHeight-v)!==0&&y.setStyles(o,{left:a-z,top:h-D}),d||(b=t,x=n,w=s,C=l,O="corner-"+i.name,b.fire("ObjectResizeStart",{target:x,width:w,height:C,origin:O}),d=!0)},B=function e(){var u,c,s,l,f,h=d;d=!1,h&&(M(n,"width",m),M(n,"height",g)),y.unbind(w,"mousemove",N),y.unbind(w,"mouseup",e),C!==w&&(y.unbind(C,"mousemove",N),y.unbind(C,"mouseup",e)),y.remove(r),y.remove(o),y.remove(a),P(n),h&&(u=t,c=n,s=m,l=g,f="corner-"+i.name,u.fire("ObjectResized",{target:c,width:s,height:l,origin:f}),y.setAttrib(n,"style",y.getAttrib(n,"style"))),t.nodeChanged()},P=function(e){F();var d=y.getPos(e,_),h=d.x,k=d.y,S=e.getBoundingClientRect(),E=S.width||S.right-S.left,z=S.height||S.bottom-S.top;n!==e&&(H(),n=e,m=g=0);var M=t.fire("ObjectSelected",{target:e}),P=y.getAttrib(n,b,"1");A(e)&&!M.isDefaultPrevented()?x(O,(function(e,t){var d=function(d){var m,g=D(n)[0];u=d.screenX,c=d.screenY,s=g.clientWidth,l=g.clientHeight,f=l/s,(i=e).name=t,i.startPos={x:E*e[0]+h,y:z*e[1]+k},p=_.scrollWidth,v=_.scrollHeight,a=y.add(_,"div",{class:"mce-resize-backdrop"}),y.setStyles(a,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=T(m=n)?y.create("img",{src:_t.transparentSrc}):m.cloneNode(!0),y.addClass(r,"mce-clonedresizable"),y.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",y.setStyles(r,{left:h,top:k,margin:0}),R(r,E,z),r.removeAttribute(b),_.appendChild(r),y.bind(w,"mousemove",N),y.bind(w,"mouseup",B),C!==w&&(y.bind(C,"mousemove",N),y.bind(C,"mouseup",B)),o=y.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},s+" &times; "+l)},m=y.get("mceResizeHandle"+t);m&&y.remove(m),m=y.add(_,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===_t.ie&&(m.contentEditable=!1),y.bind(m,"mousedown",(function(e){e.stopImmediatePropagation(),e.preventDefault(),d(e)})),e.elm=m,y.setStyles(m,{left:E*e[0]+h-m.offsetWidth/2,top:z*e[1]+k-m.offsetHeight/2})})):H(),y.getAttrib(n,b)||n.setAttribute(b,P)},H=function(){F(),n&&n.removeAttribute(b),fe(O,(function(e,t){var n=y.get("mceResizeHandle"+t);n&&(y.unbind(n),y.remove(n))}))},L=function(n){var r,o=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};d||t.removed||(x(y.select("img[data-mce-selected],hr[data-mce-selected]"),(function(e){e.removeAttribute(b)})),r="mousedown"===n.type?n.target:e.getNode(),o(r=y.$(r).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],_)&&(j(),o(e.getStart(!0),r)&&o(e.getEnd(!0),r))?P(r):H())},V=function(e){return od(ed(t.getBody(),e))},F=function(){fe(O,(function(e){e.elm&&(y.unbind(e.elm),delete e.elm)}))},j=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(h){}};return t.on("init",(function(){var e;j(),(_t.browser.isIE()||_t.browser.isEdge())&&(t.on("mousedown click",(function(e){var n=e.target,r=n.nodeName;d||!/^(TABLE|IMG|HR)$/.test(r)||V(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())})),e=function(e){var n=function(e){Kr.setEditorTimeout(t,(function(){return t.selection.select(e)}))};if(V(e.target)||Kn(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))},y.bind(_,"mscontrolselect",e),t.on("remove",(function(){return y.unbind(_,"mscontrolselect",e)})));var r=Kr.throttle((function(e){t.composing||L(e)}));t.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",r),t.on("keyup compositionend",(function(e){n&&"TABLE"===n.nodeName&&r(e)})),t.on("hide blur",H),t.on("contextmenu longpress",z,!0)})),t.on("remove",F),{isResizable:A,showResizeRect:P,hideResizeRect:H,updateResizeRect:L,destroy:function(){n=r=a=null}}},ad=function(e){return qn(e)||Gn(e)},ud=function(e,t,n){var r,o,i,a,c,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(u){r=function(e,t,n){var r,o=n.elementFromPoint(e,t),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),0<(r=(r=Dt.toArray(i.getClientRects())).sort((function(e,n){return(e=Math.abs(Math.max(e.top-t,e.bottom-t)))-Math.abs(Math.max(n.top-t,n.bottom-t))}))).length){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,c=i&&i.parentElement?i.parentElement():null,Gn(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(c,a,ad))?null:i}return r},cd=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},sd=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},ld=function(e){return e&&"TABLE"===e.nodeName},fd=function(e,t,n){for(var r=new Qr(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if($n(t))return!0},dd=function(e,t,n,r,o){var i,a,u=e.getRoot(),c=e.schema.getNonEmptyElements(),s=e.getParent(o.parentNode,e.isBlock)||u;if(r&&$n(o)&&t&&e.isEmpty(s))return E.some(Lc(o.parentNode,e.nodeIndex(o)));for(var l,f,d=new Qr(o,s);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,ko(l=a)&&!1===sd(l,f,Fl)))return E.none();if(Vn(a)&&0<a.nodeValue.length)return!1===function(e,t,n){return sd(e,t,(function(e){return e.nodeName===n}))}(a,u,"A")?E.some(Lc(a,r?a.nodeValue.length:0)):E.none();if(e.isBlock(a)||c[a.nodeName.toLowerCase()])return E.none();i=a}return n&&i?E.some(Lc(i,0)):E.none()},md=function(e,t,n,r){var o,i,a,u,c=e.getRoot(),s=!1,l=r[(n?"start":"end")+"Container"],f=r[(n?"start":"end")+"Offset"],d=Mn(l)&&f===l.childNodes.length,m=e.schema.getNonEmptyElements(),g=n;if(ko(l))return E.none();if(Mn(l)&&f>l.childNodes.length-1&&(g=!1),jn(l)&&(l=c,f=0),l===c){if(g&&(o=l.childNodes[0<f?f-1:0])){if(ko(o))return E.none();if(m[o.nodeName]||ld(o))return E.none()}if(l.hasChildNodes()){if(f=Math.min(!g&&0<f?f-1:f,l.childNodes.length-1),l=l.childNodes[f],f=Vn(l)&&d?l.data.length:0,!t&&l===c.lastChild&&ld(l))return E.none();if(function(e,t){for(;t&&t!==e;){if(Gn(t))return!0;t=t.parentNode}return!1}(c,l)||ko(l))return E.none();if(l.hasChildNodes()&&!1===ld(l)){var h=new Qr(o=l,c);do{if(Gn(o)||ko(o)){s=!1;break}if(Vn(o)&&0<o.nodeValue.length){f=g?0:o.nodeValue.length,l=o,s=!0;break}if(m[o.nodeName.toLowerCase()]&&(!(i=o)||!/^(TD|TH|CAPTION)$/.test(i.nodeName))){f=e.nodeIndex(o),l=o.parentNode,g||f++,s=!0;break}}while(o=g?h.next():h.prev())}}}return t&&(Vn(l)&&0===f&&dd(e,d,t,!0,l).each((function(e){l=e.container(),f=e.offset(),s=!0})),Mn(l)&&(!(o=(o=l.childNodes[f])||l.childNodes[f-1])||!$n(o)||(u="A",(a=o).previousSibling&&a.previousSibling.nodeName===u)||fd(e,o,!1)||fd(e,o,!0)||dd(e,d,t,!0,o).each((function(e){l=e.container(),f=e.offset(),s=!0})))),g&&!t&&Vn(l)&&f===l.nodeValue.length&&dd(e,d,t,!1,l).each((function(e){l=e.container(),f=e.offset(),s=!0})),s?E.some(Lc(l,f)):E.none()},gd=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Lc.fromRangeStart(t);return md(e,n,!0,r).each((function(e){n&&Lc.isAbove(o,e)||r.setStart(e.container(),e.offset())})),n||md(e,n,!1,r).each((function(e){r.setEnd(e.container(),e.offset())})),n&&r.collapse(!0),cd(t,r)?E.none():E.some(r)},hd=function(e,t){return e.splitText(t)},pd=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Vn(t)?0<n&&n<t.nodeValue.length&&(t=(r=hd(t,n)).previousSibling,n<o?(t=r=hd(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Vn(t)&&0<n&&n<t.nodeValue.length&&(t=hd(t,n),n=0),Vn(r)&&0<o&&o<r.nodeValue.length&&(o=(r=hd(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},vd=function(e){return{walk:function(t,n){return Nf(e,t,n)},split:pd,normalize:function(t){return gd(e,t).fold(C,(function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0}))}}};vd.compareRanges=cd,vd.getCaretRangeFromPoint=ud,vd.getSelectedNode=vc,vd.getNode=bc;var bd,yd,xd,wd,Cd,kd=(bd="height",yd=function(e){var t=e.dom;return xn(e)?t.getBoundingClientRect().height:t.offsetHeight},{set:function(e,t){if(!V(t)&&!t.match(/^[0-9]+$/))throw new Error(bd+".set accepts only positive integer values. Value was "+t);var n=e.dom;Yn(n)&&(n.style[bd]=t+"px")},get:xd=function(e){var t=yd(e);if(t<=0||null===t){var n=or(e,bd);return parseFloat(n)||0}return t},getOuter:xd,aggregate:wd=function(e,t){return Q(t,(function(t,n){var r=or(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o}),0)},max:function(e,t,n){var r=wd(e,n);return r<t?t-r:0}}),Sd=function e(t,n){return t.view(n).fold(d([]),(function(n){var r=t.owner(n),o=e(t,r);return[n].concat(o)}))},_d=Object.freeze({__proto__:null,view:function(e){var t;return(e.dom===document?E.none():E.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(Mt.fromDom)},owner:Gt}),Od=function(e){var t,n,r,o=Mt.fromDom(document),i=_n(o),a=(t=e,r=(n=_d).owner(t),Sd(n,r)),u=Sn(e),c=J(a,(function(e,t){var n=Sn(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return Cn(c.left+u.left+i.left,c.top+u.top+i.top)},Ed=function(e){return"textarea"===Lt(e)},Td=function(e,t){var n,r=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return Cn(n.offsetLeft,n.offsetTop);var i=kn(null==r?void 0:r.pageYOffset,o.scrollTop),a=kn(null==r?void 0:r.pageXOffset,o.scrollLeft),u=kn(o.clientTop,n.clientTop),c=kn(o.clientLeft,n.clientLeft);return Sn(e).translate(a-c,i-u)}(e),o=(n=e,kd.get(n));return{element:e,bottom:r.top+o,height:o,pos:r,cleanup:t}},zd=function(e,t){var n=function(e,t){var n=en(e);if(0===n.length||Ed(e))return{element:e,offset:t};if(t<n.length&&!Ed(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Ed(r)?{element:e,offset:t}:"img"===Lt(r)?{element:r,offset:1}:Ut(r)?{element:r,offset:Gf(r).length}:{element:r,offset:en(r).length}}(e,t),r=Mt.fromHtml('<span data-mce-bogus="all">\ufeff</span>');return dn(n.element,r),Td(r,(function(){return bn(r)}))},Dd=function(e,t,n,r){Nd(e,(function(o,i){return Md(e,t,n,r)}),n)},Ad=function(e,t,n,r,o){var i,a,u={elm:r.element.dom,alignToTop:o};i=u,e.fire("ScrollIntoView",i).isDefaultPrevented()||(n(t,_n(t).top,r,o),a=u,e.fire("AfterScrollIntoView",a))},Md=function(e,t,n,r){var o=Mt.fromDom(e.getBody()),i=Mt.fromDom(e.getDoc());o.dom.offsetWidth;var a=zd(Mt.fromDom(n.startContainer),n.startOffset);Ad(e,i,t,a,r),a.cleanup()},Rd=function(e,t,n,r){var o,i=Mt.fromDom(e.getDoc());Ad(e,i,n,(o=t,Td(Mt.fromDom(o),l)),r)},Nd=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(Mt.fromDom(r),Mt.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},Bd=function(e,t,n,r){var o,i=e.pos;n?On(i.left,i.top,r):(o=i.top-t+e.height,On(i.left,o,r))},Pd=function(e,t,n,r,o){var i=n+t,a=r.pos.top,u=r.bottom,c=n<=u-a;a<t?Bd(r,n,!1!==o,e):i<a?Bd(r,n,c?!1!==o:!0===o,e):i<u&&!c&&Bd(r,n,!0===o,e)},Hd=function(e,t,n,r){var o=e.dom.defaultView.innerHeight;Pd(e,t,o,n,r)},Id=function(e,t,n,r){var o=e.dom.defaultView.innerHeight;Pd(e,t,o,n,r);var i=Od(n.element),a=zn(window);i.top<a.y?En(n.element,!1!==r):i.top>a.bottom&&En(n.element,!0===r)},Ld=function(e,t,n){return Dd(e,Hd,t,n)},Vd=function(e,t,n){return Rd(e,t,Hd,n)},Fd=function(e,t,n){return Dd(e,Id,t,n)},jd=function(e,t,n){return Rd(e,t,Id,n)},Ud=function(e,t,n){(e.inline?Ld:Fd)(e,t,n)},$d=function(e){var t=cn(e).dom;return e.dom===t.activeElement},Wd=function(e){return void 0===e&&(e=Mt.fromDom(document)),E.from(e.dom.activeElement).map(Mt.fromDom)},qd=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},Gd=Sr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xd=(Gd.before,Gd.on,Gd.after,function(e){return e.fold(m,m,m)}),Kd=Sr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Yd={domRange:Kd.domRange,relative:Kd.relative,exact:Kd.exact,exactFromRange:function(e){return Kd.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){var t=e.match({domRange:function(e){return Mt.fromDom(e.startContainer)},relative:function(e,t){return Xd(e)},exact:function(e,t,n,r){return e}});return Xt(t)},range:qd},Jd=pt().browser,Qd=function(e,t){var n=Ut(t)?Gf(t).length:en(t).length+1;return n<e?n:e<0?0:e},Zd=function(e){return Yd.range(e.start,Qd(e.soffset,e.start),e.finish,Qd(e.foffset,e.finish))},em=function(e,t){return!An(t.dom)&&(It(e,t)||Pt(e,t))},tm=function(e){return function(t){return em(e,t.start)&&em(e,t.finish)}},nm=function(e){return!0===e.inline||Jd.isIE()},rm=function(e){return Yd.range(Mt.fromDom(e.startContainer),e.startOffset,Mt.fromDom(e.endContainer),e.endOffset)},om=function(e){var t,n,r=Xt(e);return t=r.dom,((n=t.getSelection())&&0!==n.rangeCount?E.from(n.getRangeAt(0)):E.none()).map(rm).filter(tm(e))},im=function(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),E.some(t)}catch(p){return E.none()}},am=function(e){var t=nm(e)?om(Mt.fromDom(e.getBody())):E.none();e.bookmark=t.isSome()?t:e.bookmark},um=function(e){return(e.bookmark?e.bookmark:E.none()).bind((function(t){return n=Mt.fromDom(e.getBody()),r=t,E.from(r).filter(tm(n)).map(Zd);var n,r})).bind(im)},cm={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},sm=function(e,t){var n,r;pt().browser.isIE()?(r=e).on("focusout",(function(){am(r)})):(n=t,e.on("mouseup touchend",(function(e){n.throttle()}))),e.on("keyup NodeChange",(function(t){var n;"nodechange"===(n=t).type&&n.selectionChange||am(e)}))},lm=function(e){var t=Hu((function(){am(e)}),0);e.on("init",(function(){var n,r,o;e.inline&&(n=e,r=t,o=function(){r.throttle()},_u.DOM.bind(document,"mouseup",o),n.on("remove",(function(){_u.DOM.unbind(document,"mouseup",o)}))),sm(e,t)})),e.on("remove",(function(){t.cancel()}))},fm=_u.DOM,dm=function(e,t){var n=e.getParam("custom_ui_selector","","string");return null!==fm.getParent(t,(function(t){return cm.isEditorUIElement(t)||!!n&&e.dom.is(t,n)}))},mm=function(e,t){var n=t.editor;lm(n),n.on("focusin",(function(){var t=e.focusedEditor;t!==n&&(t&&t.fire("blur",{focusedEditor:n}),e.setActive(n),(e.focusedEditor=n).fire("focus",{blurredEditor:t}),n.focus(!0))})),n.on("focusout",(function(){Kr.setEditorTimeout(n,(function(){var t=e.focusedEditor;dm(n,function(t){try{var n=cn(Mt.fromDom(t.getElement()));return Wd(n).fold((function(){return document.body}),(function(e){return e.dom}))}catch(e){return document.body}}(n))||t!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),Cd||(Cd=function(t){var n=e.activeEditor;n&&function(e){if(un()&&I(e.target)){var t=Mt.fromDom(e.target);if(jt(t)&&fn(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return ae(n)}}return E.from(e.target)}(t).each((function(t){t.ownerDocument===document&&(t===document.body||dm(n,t)||e.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))}))},fm.bind(document,"focusin",Cd))},gm=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(fm.unbind(document,"focusin",Cd),Cd=null)},hm=function(e,t){return((n=t).collapsed?E.from(bc(n.startContainer,n.startOffset)).map(Mt.fromDom):E.none()).bind((function(t){return lo(t)?E.some(t):!1===It(e,t)?E.some(e):E.none()}));var n},pm=function(e,t){hm(Mt.fromDom(e.getBody()),t).bind((function(e){return Il(e.dom)})).fold((function(){e.selection.normalize()}),(function(t){return e.selection.setRng(t.toRange())}))},vm=function(e){if(e.setActive)try{e.setActive()}catch(o){e.focus()}else e.focus()},bm=function(e){return $d(e)||Wd(cn(t=e)).filter((function(e){return t.dom.contains(e.dom)})).isSome();var t},ym=function(e){var t=cn(Mt.fromDom(e.getElement()));return Wd(t).filter((function(t){return n=t.dom,!(void 0!==(r=n.classList)&&(r.contains("tox-edit-area")||r.contains("tox-edit-area__iframe")||r.contains("mce-content-body")))&&dm(e,t.dom);var n,r})).isSome()},xm=function(e){return e.inline?(n=e.getBody())&&bm(Mt.fromDom(n)):(t=e).iframeElement&&$d(Mt.fromDom(t.iframeElement));var t,n},wm=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&!1===xm(e)&&um(e).each((function(t){e.selection.setRng(t),r=t}));var o,i,a=(o=e,i=t.getNode(),o.dom.getParent(i,(function(e){return"true"===o.dom.getContentEditable(e)})));if(e.$.contains(n,a))return vm(a),pm(e,r),void Cm(e);e.inline||(_t.opera||vm(n),e.getWin().focus()),(_t.gecko||e.inline)&&(vm(n),pm(e,r)),Cm(e)},Cm=function(e){return e.editorManager.setActive(e)},km=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return E.from(i).map(Mt.fromDom).map((function(e){return r&&t.collapsed?e:tn(e,o(e,a)).getOr(e)})).bind((function(e){return jt(e)?E.some(e):Kt(e).filter(jt)})).map((function(e){return e.dom})).getOr(e)},Sm=function(e,t,n){return km(e,t,!0,n,(function(e,t){return Math.min(e.dom.childNodes.length,t)}))},_m=function(e,t,n){return km(e,t,!1,n,(function(e,t){return 0<t?t-1:t}))},Om=function(e,t){for(var n=e;e&&Vn(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Em=function(e,t){return G(t,(function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t}))},Tm={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},zm=function(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}},Dm=function(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Am=(Mm.create=function(e,t){var n=new Mm(e,Tm[e]||1);return t&&fe(t,(function(e,t){n.attr(t,e)})),n},Mm.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},Mm.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return void 0!==e&&null!==e&&fe(e,(function(e,t){r.attr(t,e)})),r;if(n=r.attributes){if(void 0===t)return n.map[e];if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),r}return r}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}},Mm.prototype.clone=function(){var e,t=new Mm(this.name,this.type);if(e=this.attributes){var n=[];n.map={};for(var r=0,o=e.length;r<o;r++){var i=e[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}t.attributes=n}return t.value=this.value,t.shortEnded=this.shortEnded,t},Mm.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},Mm.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},Mm.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},Mm.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},Mm.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},Mm.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=zm(n,this))n.name===e&&t.push(n);return t},Mm.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=zm(t,this))e.push(t);for(var n=e.length;n--;)(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}return this.firstChild=this.lastChild=null,this},Mm.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(Dm(this))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;if(Dm(r))return!1}if(8===r.type)return!1;if(3===r.type&&!function(e){if(Uo(e.value)){var t=e.parent;return!t||"span"===t.name&&!t.attr("style")||!/^[ ]+$/.test(e.value)}}(r))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&Uo(r.value))return!1;if(n&&n(r))return!1}while(r=zm(r,this));return!0},Mm.prototype.walk=function(e){return zm(this,null,e)},Mm);function Mm(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}var Rm=function(e,t){return e.replace(t.re,(function(e){return ye(t.uris,e).getOr(e)}))},Nm=["img","video"],Bm=function(e,t,n){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?(r=e.allow_svg_data_urls,o=n,!(H(r)?W(Nm,o):r)&&/^data:image\/svg\+xml/i.test(t)):/^data:/i.test(t));var r,o},Pm=function(e,t,n){var r,o,i=1,a=e.getShortEndedElements(),u=/<([!?\/])?([A-Za-z0-9\-_:.]+)(\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g;for(u.lastIndex=r=n;o=u.exec(t);){if(r=u.lastIndex,"/"===o[1])i--;else if(!o[1]){if(o[2]in a)continue;i++}if(0===i)break}return r},Hm=function(e,t){void 0===t&&(t=ki()),!1!==(e=e||{}).fix_self_closing&&(e.fix_self_closing=!0);var n=e.comment?e.comment:l,r=e.cdata?e.cdata:l,o=e.text?e.text:l,i=e.start?e.start:l,a=e.end?e.end:l,u=e.pi?e.pi:l,c=e.doctype?e.doctype:l,s=function(s,l){void 0===l&&(l="html");for(var f,d,m,g,h,p,v,b,y,x,w,C,k,S,_,O,E,T,z,D=s.html,A=0,M=[],R=0,N=mi.decode,B=Dt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),P=/((java|vb)script|mhtml):/i,H="html"===l?0:1,I=function(e){for(var t,n=M.length;n--&&M[n].name!==e;);if(0<=n){for(t=M.length-1;n<=t;t--)(e=M[t]).valid&&a(e.name);M.length=n}},L=function(e,t){return o(Rm(e,s),t)},V=function(t){""!==t&&(">"===t.charAt(0)&&(t=" "+t),e.allow_conditional_comments||"[if"!==t.substr(0,3).toLowerCase()||(t=" "+t),n(Rm(t,s)))},F=function(e,t){var n=e||"",r=!Ge(n,"--"),o=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&(u=n,/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(r.substr(u)))){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var u,c=a.exec(e);return c?c.index+c[0].length:r.length}(D,r,t);return e=D.substr(t,o-t),V(r?n+e:e),o+1},j=function(t,n,r,o,i){var a,u,c,l;if(n=n.toLowerCase(),c=n in G?n:N(r||o||i||""),r=Rm(c,s),X&&!b&&0==(0===(l=n).indexOf("data-")||0===l.indexOf("aria-"))){if(!(a=S[n])&&_){for(u=_.length;u--&&!(a=_[u]).pattern.test(n););-1===u&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(B[n]&&!e.allow_script_urls){var f=r.replace(/[\s\u0000-\u001F]+/g,"");try{f=decodeURIComponent(f)}catch(C){f=unescape(f)}if(P.test(f))return;if(Bm(e,f,t))return}b&&(n in B||0===n.indexOf("on"))||(g.map[n]=r,g.push({name:n,value:r}))},U=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),$=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,W=t.getShortEndedElements(),q=e.self_closing_elements||t.getSelfClosingElements(),G=t.getBoolAttrs(),X=e.validate,K=e.remove_internals,Y=e.fix_self_closing,J=t.getSpecialElements(),Q=D+">";f=U.exec(Q);){var Z=f[0];if(A<f.index&&L(N(D.substr(A,f.index-A))),d=f[7])":"===(d=d.toLowerCase()).charAt(0)&&(d=d.substr(1)),I(d);else if(d=f[8]){if(f.index+Z.length>D.length){L(N(D.substr(f.index))),A=f.index+Z.length;continue}":"===(d=d.toLowerCase()).charAt(0)&&(d=d.substr(1)),y=d in W,Y&&q[d]&&0<M.length&&M[M.length-1].name===d&&I(d);var ee=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null}($,f[9]);if(null!==ee){if("all"===ee){A=Pm(t,D,U.lastIndex),U.lastIndex=A;continue}w=!1}if(!X||(x=t.getElementRule(d))){if(w=!0,X&&(S=x.attributes,_=x.attributePatterns),(k=f[9])?((b=-1!==k.indexOf("data-mce-type"))&&K&&(w=!1),(g=[]).map={},k.replace($,(function(e,t,n,r,o){return j(d,t,n,r,o),""}))):(g=[]).map={},X&&!b){if(O=x.attributesRequired,E=x.attributesDefault,T=x.attributesForced,x.removeEmptyAttrs&&!g.length&&(w=!1),T)for(h=T.length;h--;)v=(C=T[h]).name,"{$uid}"===(z=C.value)&&(z="mce_"+R++),g.map[v]=z,g.push({name:v,value:z});if(E)for(h=E.length;h--;)(v=(C=E[h]).name)in g.map||("{$uid}"===(z=C.value)&&(z="mce_"+R++),g.map[v]=z,g.push({name:v,value:z}));if(O){for(h=O.length;h--&&!(O[h]in g.map););-1===h&&(w=!1)}if(C=g.map["data-mce-bogus"]){if("all"===C){A=Pm(t,D,U.lastIndex),U.lastIndex=A;continue}w=!1}}w&&i(d,g,y)}else w=!1;if(m=J[d]){m.lastIndex=A=f.index+Z.length,A=(f=m.exec(D))?(w&&(p=D.substr(A,f.index-A)),f.index+f[0].length):(p=D.substr(A),D.length),w&&(0<p.length&&L(p,!0),a(d)),U.lastIndex=A;continue}y||(k&&k.indexOf("/")===k.length-1?w&&a(d):M.push({name:d,valid:w}))}else if(d=f[1])V(d);else if(d=f[2]){if(!(1==H||e.preserve_cdata||0<M.length&&t.isValidChild(M[M.length-1].name,"#cdata"))){A=F("",f.index+2),U.lastIndex=A;continue}r(d)}else if(d=f[3])c(d);else{if((d=f[4])||"<!"===Z){A=F(d,f.index+Z.length),U.lastIndex=A;continue}if(d=f[5]){if(1!=H){A=F("?",f.index+2),U.lastIndex=A;continue}u(d,f[6])}}A=f.index+Z.length}for(A<D.length&&L(N(D.substr(A))),h=M.length-1;0<=h;h--)(d=M[h]).valid&&a(d.name)};return{parse:function(e,t){void 0===t&&(t="html"),s(function(e){for(var t,n=/data:[^;]+;base64,([a-z0-9\+\/=]+)/gi,r=[],o={},i=nc("img"),a=0,u=0;t=n.exec(e);){var c=t[0],s=i+"_"+u++;o[s]=c,a<t.index&&r.push(e.substr(a,t.index-a)),r.push(s),a=t.index+c.length}var l=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:e,re:l}:(a<e.length&&r.push(e.substr(a)),{prefix:i,uris:o,html:r.join(""),re:l})}(e),t)}}};Hm.findEndTag=Pm;var Im,Lm,Vm=function(e,t){var n,r,o,i,a,u,c,s=t,l=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,f=e.schema;a=e.getTempAttrs(),u=s,c=new RegExp(["\\s?("+a.join("|")+')="[^"]+"'].join("|"),"gi"),s=u.replace(c,"");for(var d=f.getShortEndedElements();i=l.exec(s);)r=l.lastIndex,o=i[0].length,n=d[i[1]]?r:Hm.findEndTag(f,s,r),s=s.substring(0,r-o)+s.substring(n),l.lastIndex=r-o;return bo(s)},Fm=Vm,jm=function(e,t,n,r){var o,i,a,u,c;return t.format=n,t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),o="raw"===t.format?Dt.trim(Fm(e.serializer,r.innerHTML)):"text"===t.format?e.dom.isEmpty(r)?"":bo(r.innerText||r.textContent):"tree"===t.format?e.serializer.serialize(r,t):(a=(i=e).serializer.serialize(r,t),u=ms(i),c=new RegExp("^(<"+u+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+u+">[\r\n]*|<br \\/>[\r\n]*)$"),a.replace(c,"")),W(["text","tree"],t.format)||mo(Mt.fromDom(r))?t.content=o:t.content=Dt.trim(o),t.no_events||e.fire("GetContent",t),t.content},Um=Dt.each,$m=function(e){return{compare:function(t,n){if(t.nodeName!==n.nodeName)return!1;var r=function(t){var n={};return Um(e.getAttribs(t),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))})),n},o=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!!o(r(t),r(n))&&!!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))&&!Jl(t)&&!Jl(n)}}},Wm=Dt.makeMap,qm=function(e){var t=[],n=(e=e||{}).indent,r=Wm(e.indent_before||""),o=Wm(e.indent_after||""),i=mi.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="html"===e.element_format;return{start:function(e,u,c){var s,l,f,d;if(n&&r[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n"),t.push("<",e),u)for(s=0,l=u.length;s<l;s++)f=u[s],t.push(" ",f.name,'="',i(f.value,!0),'"');t[t.length]=!c||a?">":" />",c&&n&&o[e]&&0<t.length&&0<(d=t[t.length-1]).length&&"\n"!==d&&t.push("\n")},end:function(e){var r;t.push("</",e,">"),n&&o[e]&&0<t.length&&0<(r=t[t.length-1]).length&&"\n"!==r&&t.push("\n")},text:function(e,n){0<e.length&&(t[t.length]=n?e:i(e))},cdata:function(e){t.push("<![CDATA[",e,"]]>")},comment:function(e){t.push("\x3c!--",e,"--\x3e")},pi:function(e,r){r?t.push("<?",e," ",i(r),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:function(e){t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}},Gm=function(e,t){void 0===t&&(t=ki());var n=qm(e);return(e=e||{}).validate=!("validate"in e)||e.validate,{serialize:function(r){var o=e.validate,i={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;a(e),e=e.next;);}};n.reset();var a=function e(r){var a,u,c,s,l,f,d,m,g,h=i[r.type];if(h)h(r);else{if(a=r.name,u=r.shortEnded,c=r.attributes,o&&c&&1<c.length&&((f=[]).map={},g=t.getElementRule(r.name))){for(d=0,m=g.attributesOrder.length;d<m;d++)(s=g.attributesOrder[d])in c.map&&(l=c.map[s],f.map[s]=l,f.push({name:s,value:l}));for(d=0,m=c.length;d<m;d++)(s=c[d].name)in f.map||(l=c.map[s],f.map[s]=l,f.push({name:s,value:l}));c=f}if(n.start(r.name,c,u),!u){if(r=r.firstChild)for(;e(r),r=r.next;);n.end(a)}}};return 1!==r.type||e.inner?i[11](r):a(r),n.getContent()}}},Xm=function(e,t,n){return E.from(n.container()).filter(Vn).exists((function(r){var o=e?0:-1;return t(r.data.charAt(n.offset()+o))}))},Km=g(Xm,!0,Zl),Ym=g(Xm,!1,Zl),Jm=function(e){var t=e.container();return Vn(t)&&(0===t.data.length||vo(t.data)&&Zf.isBookmarkNode(t.parentNode))},Qm=function(e,t){return function(n){return E.from(nl(e?0:-1,n)).filter(t).isSome()}},Zm=function(e){return Wn(e)&&"block"===or(Mt.fromDom(e),"display")},eg=function(e){return Gn(e)&&!(Mn(t=e)&&"all"===t.getAttribute("data-mce-bogus"));var t},tg=Qm(!0,Zm),ng=Qm(!1,Zm),rg=Qm(!0,Kn),og=Qm(!1,Kn),ig=Qm(!0,Hn),ag=Qm(!1,Hn),ug=Qm(!0,eg),cg=Qm(!1,eg),sg=function(e){var t=Gu(e,"br"),n=Y(function(e){for(var t=[],n=e.dom;n;)t.push(Mt.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),ao);t.length===n.length&&X(n,bn)},lg=function(e){vn(e),hn(e,Mt.fromHtml('<br data-mce-bogus="1">'))},fg=function(e){rn(e).each((function(t){Yt(t).each((function(n){oo(e)&&ao(t)&&oo(n)&&bn(t)}))}))},dg=function(e,t,n){return It(t,e)?function(e,t){for(var n=L(t)?t:C,r=e.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Mt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,(function(e){return n(e)||Pt(e,t)})).slice(0,-1):[]},mg=function(e,t){return dg(e,t,C)},gg=function(e,t){return[e].concat(mg(e,t))},hg=function(e,t,n){return Nl(e,t,n,Jm)},pg=function(e,t){return Z(gg(Mt.fromDom(t.container()),e),oo)},vg=function(e,t,n){return hg(e,t.dom,n).forall((function(e){return pg(t,n).fold((function(){return!1===tl(e,n,t.dom)}),(function(r){return!1===tl(e,n,t.dom)&&It(r,Mt.fromDom(e.container()))}))}))},bg=function(e,t,n){return pg(t,n).fold((function(){return hg(e,t.dom,n).forall((function(e){return!1===tl(e,n,t.dom)}))}),(function(t){return hg(e,t.dom,n).isNone()}))},yg=g(bg,!1),xg=g(bg,!0),wg=g(vg,!1),Cg=g(vg,!0),kg=function(e){return ll(e).exists(ao)},Sg=function(e,t,n){var r=Y(gg(Mt.fromDom(n.container()),t),oo),o=ae(r).getOr(t);return Ml(e,o.dom,n).filter(kg)},_g=function(e,t){return ll(t).exists(ao)||Sg(!0,e,t).isSome()},Og=function(e,t){return n=t,E.from(n.getNode(!0)).map(Mt.fromDom).exists(ao)||Sg(!1,e,t).isSome();var n},Eg=g(Sg,!1),Tg=g(Sg,!0),zg=function(e){return Lc.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},Dg=function(e,t){var n=Y(gg(Mt.fromDom(t.container()),e),oo);return ae(n).getOr(e)},Ag=function(e,t){return zg(t)?Ym(t):Ym(t)||Hl(Dg(e,t).dom,t).exists(Ym)},Mg=function(e,t){return zg(t)?Km(t):Km(t)||Pl(Dg(e,t).dom,t).exists(Km)},Rg=function(e){return ll(e).bind((function(e){return Nr(e,jt)})).exists((function(e){return t=or(e,"white-space"),W(["pre","pre-wrap"],t);var t}))},Ng=function(e,t){return r=t,Hl(e.dom,r).isNone()||(n=t,Pl(e.dom,n).isNone())||yg(e,t)||xg(e,t)||Og(e,t)||_g(e,t);var n,r},Bg=function(e,t){return!Rg(t)&&(yg(e,t)||wg(e,t)||Og(e,t)||Ag(e,t))},Pg=function(e,t){return!Rg(t)&&(xg(e,t)||Cg(e,t)||_g(e,t)||Mg(e,t))},Hg=function(e,t){return Bg(e,t)||Pg(e,(r=(n=t).container(),o=n.offset(),Vn(r)&&o<r.data.length?Lc(r,o+1):n));var n,r,o},Ig=function(e,t){return Ql(e.charAt(t))},Lg=function(e){var t=e.container();return Vn(t)&&qe(t.data,ho)},Vg=function(e){var t,n=e.data,r=(t=n.split(""),G(t,(function(e,n){return Ql(e)&&0<n&&n<t.length-1&&ef(t[n-1])&&ef(t[n+1])?" ":e})).join(""));return r!==n&&(e.data=r,!0)},Fg=function(e,t){return E.some(t).filter(Lg).bind((function(t){var n,r,o,i,a,u,c,s,l=t.container();return a=e,c=(u=l).data,s=Lc(u,0),Ig(c,0)&&!Hg(a,s)&&(u.data=" "+c.slice(1),1)||Vg(l)||(n=e,o=(r=l).data,i=Lc(r,o.length-1),Ig(o,o.length-1)&&!Hg(n,i)&&(r.data=o.slice(0,-1)+" ",1))?E.some(t):E.none()}))},jg=function(e){var t=Mt.fromDom(e.getBody());e.selection.isCollapsed()&&Fg(t,Lc.fromRangeStart(e.selection.getRng())).each((function(t){e.selection.setRng(t.toRange())}))},Ug=function(e,t,n){var r,o,i,a,u,c,s,l;0!==n&&(r=Mt.fromDom(e),o=Rr(r,oo).getOr(r),i=e.data.slice(t,t+n),a=t+n>=e.data.length&&Pg(o,Lc(e,e.data.length)),u=0===t&&Bg(o,Lc(e,0)),e.replaceData(t,n,(s=u,l=a,Q(c=i,(function(e,t){return Zl(t)||Ql(t)?e.previousCharIsSpace||""===e.str&&s||e.str.length===c.length-1&&l?{previousCharIsSpace:!1,str:e.str+ho}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}}),{previousCharIsSpace:!1,str:""}).str)))},$g=function(e,t){var n=e.data.slice(t),r=n.length-Ye(n).length;return Ug(e,t,r)},Wg=function(e,t){var n=e.data.slice(0,t),r=n.length-Je(n).length;return Ug(e,t-r,r)},qg=function(e,t,n,r){void 0===r&&(r=!0);var o=Je(e.data).length,i=r?e:t,a=r?t:e;return r?i.appendData(a.data):i.insertData(0,a.data),bn(Mt.fromDom(a)),n&&$g(i,o),i},Gg=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===Lc.isTextPosition(n)&&o===r.parentNode&&i>Lc.before(r).offset()?Lc(t.container(),t.offset()-1):t;var n,r,o,i},Xg=function(e){return Lo(e.previousSibling)?E.some((t=e.previousSibling,Vn(t)?Lc(t,t.data.length):Lc.after(t))):e.previousSibling?Ll(e.previousSibling):E.none();var t},Kg=function(e){return Lo(e.nextSibling)?E.some((t=e.nextSibling,Vn(t)?Lc(t,0):Lc.before(t))):e.nextSibling?Il(e.nextSibling):E.none();var t},Yg=function(e,t){return Xg(t).orThunk((function(){return Kg(t)})).orThunk((function(){return n=e,r=t,o=Lc.before(r.previousSibling?r.previousSibling:r.parentNode),Hl(n,o).fold((function(){return Pl(n,Lc.after(r))}),E.some);var n,r,o}))},Jg=function(e,t){return Kg(t).orThunk((function(){return Xg(t)})).orThunk((function(){return r=t,Pl(n=e,Lc.after(r)).fold((function(){return Hl(n,Lc.before(r))}),E.some);var n,r}))},Qg=function(e,t,n){return(e?Jg:Yg)(t,n).map(g(Gg,n))},Zg=function(e,t,n){n.fold((function(){e.focus()}),(function(n){e.selection.setRng(n.toRange(),t)}))},eh=function(e,t){return t&&xe(e.schema.getBlockElements(),Lt(t))},th=function(e){if(Ko(e)){var t=Mt.fromHtml('<br data-mce-bogus="1">');return vn(e),hn(e,t),E.some(Lc.before(t.dom))}return E.none()},nh=function(e,t,n){var r,o,i,a,u=Yt(e).filter(Ut),c=Jt(e).filter(Ut);return bn(e),o=c,i=t,a=function(e,t,r){var o=e.dom,i=t.dom,a=o.data.length;return qg(o,i,n),r.container()===i?Lc(o,a):r},((r=u).isSome()&&o.isSome()&&i.isSome()?E.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):E.none()).orThunk((function(){return n&&(u.each((function(e){return Wg(e.dom,e.dom.length)})),c.each((function(e){return $g(e.dom,0)}))),t}))},rh=function(e,t,n,r){void 0===r&&(r=!0);var o,i,a=Qg(t,e.getBody(),n.dom),u=Rr(n,g(eh,e),(o=e.getBody(),function(e){return e.dom===o})),c=nh(n,a,(i=n,xe(e.schema.getTextInlineElements(),Lt(i))));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):u.bind(th).fold((function(){r&&Zg(e,t,c)}),(function(n){r&&Zg(e,t,E.some(n))}))},oh=function(e,t){return{start:e,end:t}},ih=Sr([{removeTable:["element"]},{emptyCells:["cells"]},{deleteCellSelection:["rng","cell"]}]),ah=function(e,t){return Ir(Mt.fromDom(e),"td,th",t)},uh=function(e,t){return Pr(e,"table",t)},ch=function(e){return!Pt(e.start,e.end)},sh=function(e,t){return uh(e.start,t).bind((function(n){return uh(e.end,t).bind((function(e){return t=Pt(n,e),r=n,t?E.some(r):E.none();var t,r}))}))},lh=function(e){return Gu(e,"td,th")},fh=function(e,t){var n=ah(t.startContainer,e),r=ah(t.endContainer,e);return t.collapsed?E.none():sc(n,r,oh).fold((function(){return n.fold((function(){return r.bind((function(t){return uh(t,e).bind((function(e){return ae(lh(e)).map((function(e){return oh(e,t)}))}))}))}),(function(t){return uh(t,e).bind((function(e){return ue(lh(e)).map((function(e){return oh(t,e)}))}))}))}),(function(t){return dh(e,t)?E.none():(r=e,uh((n=t).start,r).bind((function(e){return ue(lh(e)).map((function(e){return oh(n.start,e)}))})));var n,r}))},dh=function(e,t){return sh(t,e).isSome()},mh=function(e,t,n){return e.filter((function(e){return ch(e)&&dh(n,e)})).orThunk((function(){return fh(n,t)})).bind((function(e){return sh(t=e,n).map((function(e){return{rng:t,table:e,cells:lh(e)}}));var t}))},gh=function(e,t){return ee(e,(function(e){return Pt(e,t)}))},hh=function(e,t,n){return e.filter((function(e){return o=n,!ch(r=e)&&sh(r,o).exists((function(e){var t=e.dom.rows;return 1===t.length&&1===t[0].cells.length}))&&Ff(e.start,t);var r,o})).map((function(e){return e.start}))},ph=function(e){return sc(gh((t=e).cells,t.rng.start),gh(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)})).map((function(t){var n=e.cells;return t.length===n.length?ih.removeTable(e.table):ih.emptyCells(t)}));var t},vh=function(e,t){var n,r,o,i,a,u=(n=e,function(e){return Pt(n,e)}),c=(o=u,i=ah((r=t).startContainer,o),a=ah(r.endContainer,o),sc(i,a,oh));return hh(c,t,u).map((function(e){return ih.deleteCellSelection(t,e)})).orThunk((function(){return mh(c,t,u).bind(ph)}))},bh=function e(t){var n;return(8===Vt(n=t)||"#comment"===Lt(n)?Yt:rn)(t).bind(e).orThunk((function(){return E.some(t)}))},yh=function(e,t){return X(t,lg),e.selection.setCursorLocation(t[0].dom,0),!0},xh=function(e,t,n){t.deleteContents();var r,o,i=bh(n).getOr(n),a=Mt.fromDom(e.dom.getParent(i.dom,e.dom.isBlock));return Ko(a)&&(lg(a),e.selection.setCursorLocation(a.dom,0)),Pt(n,a)||(r=Kt(a).is(n)?[]:Kt(o=a).map(en).map((function(e){return Y(e,(function(e){return!Pt(o,e)}))})).getOr([]),X(r.concat(en(n)),(function(e){Pt(e,a)||It(e,a)||bn(e)}))),!0},wh=function(e,t){return rh(e,!1,t),!0},Ch=function(e,t,n,r){return Sh(t,r).fold((function(){return r=e,vh(t,n).map((function(e){return e.fold(g(wh,r),g(yh,r),g(xh,r))}));var r}),(function(t){return _h(e,t)})).getOr(!1)},kh=function(e,t){return Z(gg(t,e),fo)},Sh=function(e,t){return Z(gg(t,e),(function(e){return"caption"===Lt(e)}))},_h=function(e,t){return lg(t),e.selection.setCursorLocation(t.dom,0),E.some(!0)},Oh=function(e,t,n,r,o){return Rl(n,e.getBody(),o).bind((function(i){return s=n,l=o,f=i,Il((c=r).dom).bind((function(e){return Ll(c.dom).map((function(t){return s?l.isEqual(e)&&f.isEqual(t):l.isEqual(t)&&f.isEqual(e)}))})).getOr(!0)?_h(e,r):(a=r,u=i,Sh(t,Mt.fromDom(u.getNode())).map((function(e){return!1===Pt(e,a)})));var a,u,c,s,l,f})).or(E.some(!0))},Eh=function(e,t,n,r){var o=Lc.fromRangeStart(e.selection.getRng());return kh(n,r).bind((function(r){return Ko(r)?_h(e,r):(i=n,a=r,u=o,Rl(t,e.getBody(),u).bind((function(e){return kh(i,Mt.fromDom(e.getNode())).map((function(e){return!1===Pt(e,a)}))})));var i,a,u})).getOr(!1)},Th=function(e,t){return(e?ig:ag)(t)},zh=function(e,t,n){var r=Mt.fromDom(e.getBody());return Sh(r,n).fold((function(){return Eh(e,t,r,n)||(o=e,i=t,a=Lc.fromRangeStart(o.selection.getRng()),Th(i,a)||Ml(i,o.getBody(),a).exists((function(e){return Th(i,e)})));var o,i,a}),(function(n){return o=e,i=t,a=r,u=n,c=Lc.fromRangeStart(o.selection.getRng()),(Ko(u)?_h(o,u):Oh(o,a,i,u,c)).getOr(!1);var o,i,a,u,c}))},Dh=function(e,t){var n,r,o,i,a,u=Mt.fromDom(e.selection.getStart(!0)),c=If(e);return e.selection.isCollapsed()&&0===c.length?zh(e,t,u):(n=e,r=u,o=Mt.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=If(n)).length?yh(n,a):Ch(n,o,i,r))},Ah=function(e){var t=Lc.fromRangeStart(e),n=Lc.fromRangeEnd(e),r=e.commonAncestorContainer;return Ml(!1,r,n).map((function(o){return!tl(t,n,r)&&tl(t,o,r)?(i=t.container(),a=t.offset(),u=o.container(),c=o.offset(),(s=document.createRange()).setStart(i,a),s.setEnd(u,c),s):e;var i,a,u,c,s})).getOr(e)},Mh=function(e){return e.collapsed?e:Ah(e)},Rh=function(e,t){var n,r;return e.getBlockElements()[t.name]&&(r=t).firstChild&&r.firstChild===r.lastChild&&("br"===(n=t.firstChild).name||n.value===ho)},Nh=function(e,t){var n,r,o,i=t.firstChild,a=t.lastChild;return i&&"meta"===i.name&&(i=i.next),a&&"mce_marker"===a.attr("id")&&(a=a.prev),r=a,o=(n=e).getNonEmptyElements(),r&&(r.isEmpty(o)||Rh(n,r))&&(a=a.prev),!(!i||i!==a)&&("ul"===i.name||"ol"===i.name)},Bh=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&((t=e.firstChild).data===ho||$n(t));var t},Ph=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||Bh(t))?e.slice(0,-1):e;var t},Hh=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Ih=function(e,t){var n=Lc.after(e),r=El(t).prev(n);return r?r.toRange():null},Lh=function(e,t,n){var r,o,i,a,u=e.parentNode;return Dt.each(t,(function(t){u.insertBefore(t,e)})),r=e,o=n,i=Lc.before(r),(a=El(o).next(i))?a.toRange():null},Vh=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y,x,w,C,k,S=(o=t,i=r,s=e.serialize(i),l=o.createFragment(s),u=(a=l).firstChild,c=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),c&&"mce_marker"===c.id&&c.parentNode.removeChild(c),a),_=Hh(t,n.startContainer),O=Ph((f=S.firstChild,Dt.grep(f.childNodes,(function(e){return"LI"===e.nodeName})))),E=t.getRoot(),T=function(e){var r=Lc.fromRangeStart(n),o=El(t.getRoot()),i=1===e?o.prev(r):o.next(r);return!i||Hh(t,i.getNode())!==_};return T(1)?Lh(_,O,E):T(2)?(d=_,m=O,g=E,t.insertAfter(m.reverse(),d),Ih(m[0],g)):(p=O,v=E,b=h=_,x=(y=n).cloneRange(),w=y.cloneRange(),x.setStartBefore(b),w.setEndAfter(b),C=[x.cloneContents(),w.cloneContents()],(k=h.parentNode).insertBefore(C[0],h),Dt.each(p,(function(e){k.insertBefore(e,h)})),k.insertBefore(C[1],h),k.removeChild(h),Ih(p[p.length-1],v))},Fh=Xn,jh=function(e){var t=e.dom,n=Mh(e.selection.getRng());e.selection.setRng(n);var r,o,i,a=t.getParent(n.startContainer,Fh);r=t,o=n,null!==(i=a)&&i===r.getParent(o.endContainer,Fh)&&Ff(Mt.fromDom(i),o)?xh(e,n,Mt.fromDom(a)):e.getDoc().execCommand("Delete",!1,null)},Uh=function(e,t,n){var r,o,i,a,u,c,s,l,f,d=e.selection,m=e.dom;/^ | $/.test(t)&&(c=m,s=d.getRng(),l=t,f=Mt.fromDom(c.getRoot()),l=Bg(f,Lc.fromRangeStart(s))?l.replace(/^ /,"&nbsp;"):l.replace(/^&nbsp;/," "),t=l=Pg(f,Lc.fromRangeEnd(s))?l.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):l.replace(/&nbsp;(<br( \/)?>)?$/," "));var g=e.parser,h=n.merge,p=Gm({validate:e.getParam("validate")},e.schema),v='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',b={content:t,format:"html",selection:!0,paste:n.paste};if((b=e.fire("BeforeSetContent",b)).isDefaultPrevented())e.fire("SetContent",{content:b.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=b.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,v);var y,x,w=(a=d.getRng()).startContainer||(a.parentElement?a.parentElement():null),C=e.getBody();w===C&&d.isCollapsed()&&m.isBlock(C.firstChild)&&(y=e,(x=C.firstChild)&&!y.schema.getShortEndedElements()[x.nodeName])&&m.isEmpty(C.firstChild)&&((a=m.createRng()).setStart(C.firstChild,0),a.setEnd(C.firstChild,0),d.setRng(a)),d.isCollapsed()||jh(e);var k,S,_,O,T,z,D,A,M,R,N,B,P,H,I={context:(r=d.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},L=g.parse(t,I);if(!0===n.paste&&Nh(e.schema,L)&&Hh(m,r))return a=Vh(p,m,d.getRng(),L),d.setRng(a),void e.fire("SetContent",b);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(L),"mce_marker"===(u=L.lastChild).attr("id"))for(u=(i=u).prev;u;u=u.walk(!0))if(3===u.type||!m.isBlock(u.name)){e.schema.isValidChild(u.parent.name,"span")&&u.parent.insert(i,u,"br"===u.name);break}if(e._selectionOverrides.showBlockCaretContainer(r),I.invalid){for(e.selection.setContent(v),r=d.getNode(),o=e.getBody(),9===r.nodeType?r=u=o:u=r;u!==o;)u=(r=u).parentNode;t=r===o?o.innerHTML:m.getOuterHTML(r),t=p.serialize(g.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return p.serialize(L)})))),r===o?m.setHTML(o,t):m.setOuterHTML(r,t)}else t=p.serialize(L),k=e,S=t,"all"===(_=r).getAttribute("data-mce-bogus")?_.parentNode.insertBefore(k.dom.createFragment(S),_):(O=_.firstChild,T=_.lastChild,!O||O===T&&"BR"===O.nodeName?k.dom.setHTML(_,S):k.selection.setContent(S));D=h,R=(z=e).schema.getTextInlineElements(),N=z.dom,D&&(A=z.getBody(),M=$m(N),Dt.each(N.select("*[data-mce-fragment]"),(function(e){for(var t=e.parentNode;t&&t!==A;t=t.parentNode)R[e.nodeName.toLowerCase()]&&M.compare(t,e)&&N.remove(e,!0)}))),function(e,t){var n,r,o=e.dom,i=e.selection;if(t){i.scrollIntoView(t);var a=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===o.getContentEditable(t))return t;return null}(t);if(a)return o.remove(t),i.select(a);var u=o.createRng(),c=t.previousSibling;c&&3===c.nodeType?(u.setStart(c,c.nodeValue.length),_t.ie||(r=t.nextSibling)&&3===r.nodeType&&(c.appendData(r.data),r.parentNode.removeChild(r))):(u.setStartBefore(t),u.setEndBefore(t));var s=o.getParent(t,o.isBlock);o.remove(t),s&&o.isEmpty(s)&&(e.$(s).empty(),u.setStart(s,0),u.setEnd(s,0),Fh(s)||s.getAttribute("data-mce-fragment")||!(n=function(t){var n=Lc.fromRangeStart(t);if(n=El(e.getBody()).next(n))return n.toRange()}(u))?o.add(s,o.create("br",{"data-mce-bogus":"1"})):(u=n,o.remove(s))),i.setRng(u)}}(e,m.get("mce_marker")),B=e.getBody(),Dt.each(B.getElementsByTagName("*"),(function(e){e.removeAttribute("data-mce-fragment")})),P=m,H=d.getStart(),E.from(P.getParent(H,"td,th")).map(Mt.fromDom).each(fg),e.fire("SetContent",b),e.addVisual()}},$h=function e(t,n){n(t),t.firstChild&&e(t.firstChild,n),t.next&&e(t.next,n)},Wh=function(e,t,n){var r=function(e,t,n){var r={},o={},i=[];for(var a in n.firstChild&&$h(n.firstChild,(function(n){X(e,(function(e){e.name===n.name&&(r[e.name]?r[e.name].nodes.push(n):r[e.name]={filter:e,nodes:[n]})})),X(t,(function(e){"string"==typeof n.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})}))})),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i}(e,t,n);X(r,(function(e){X(e.filter.callbacks,(function(t){t(e.nodes,e.filter.name,{})}))}))},qh=function(e){return e instanceof Am},Gh=function(e,t){var n;e.dom.setHTML(e.getBody(),t),xm(n=e)&&Il(n.getBody()).each((function(e){var t=e.getNode(),r=Hn(t)?Il(t).getOr(e):e;n.selection.setRng(r.toRange())}))},Xh=function(e,t,n){return n.format=n.format?n.format:"html",n.set=!0,n.content=qh(t)?"":t,n.no_events||e.fire("BeforeSetContent",n),qh(t)||(t=n.content),E.from(e.getBody()).fold(d(t),(function(r){return qh(t)?function(e,t,n,r){Wh(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=Gm({validate:e.validate},e.schema).serialize(n);return r.content=mo(Mt.fromDom(t))?o:Dt.trim(o),Gh(e,r.content),r.no_events||e.fire("SetContent",r),n}(e,r,t,n):(o=e,i=r,u=n,0===(a=t).length||/^\s+$/.test(a)?(s='<br data-mce-bogus="1">',"TABLE"===i.nodeName?a="<tr><td>"+s+"</td></tr>":/^(UL|OL)$/.test(i.nodeName)&&(a="<li>"+s+"</li>"),a=(c=ms(o))&&o.schema.isValidChild(i.nodeName.toLowerCase(),c.toLowerCase())?(a=s,o.dom.createHTML(c,gs(o),a)):a||'<br data-mce-bogus="1">',Gh(o,a),o.fire("SetContent",u)):("raw"!==u.format&&(a=Gm({validate:o.validate},o.schema).serialize(o.parser.parse(a,{isRootContent:!0,insert:!0}))),u.content=mo(Mt.fromDom(i))?a:Dt.trim(a),Gh(o,u.content),u.no_events||o.fire("SetContent",u)),u.content);var o,i,a,u,c,s}))},Kh=function(e,t){return r=t,((o=(n=e).dom).parentNode?Br(Mt.fromDom(o.parentNode),(function(e){return!Pt(n,e)&&r(e)})):E.none()).isSome();var n,r,o},Yh=function(e){return L(e)?e:C},Jh=function(e,t,n){var r=t(e),o=Yh(n);return r.orThunk((function(){return o(e)?E.none():function(e,t,n){for(var r=e.dom,o=Yh(n);r.parentNode;){r=r.parentNode;var i=Mt.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return E.none()}(e,t,o)}))},Qh=sf,Zh=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},ep=function(e,t,n,r){var o=e.dom.getRoot();return t!==o&&(t=e.dom.getParent(t,(function(t){return!!Zh(e,t,n)||t.parentNode===o||!!rp(e,t,n,r,!0)})),rp(e,t,n,r))},tp=function(e,t,n){return!!Qh(t,n.inline)||!!Qh(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)},np=function(e,t,n,r,o,i){var a,u,c,s=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(s)if("undefined"==typeof s.length){for(a in s)if(s.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):ff(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!Qh(u,lf(e,cf(s[a],i),a)))return}}else for(c=0;c<s.length;c++)if("attributes"===r?e.getAttrib(t,s[c]):ff(e,t,s[c]))return n;return n},rp=function(e,t,n,r,o){var i,a,u,c,s=e.formatter.get(n),l=e.dom;if(s&&t)for(a=0;a<s.length;a++)if(i=s[a],tp(e.dom,t,i)&&np(l,t,i,"attributes",o,r)&&np(l,t,i,"styles",o,r)){if(c=i.classes)for(u=0;u<c.length;u++)if(!e.dom.hasClass(t,c[u]))return;return i}},op=function(e,t,n,r){if(r)return ep(e,r,t,n);if(r=e.selection.getNode(),ep(e,r,t,n))return!0;var o=e.selection.getStart();return!(o===r||!ep(e,o,t,n))},ip=function(e,t){var n=function(t){return Pt(t,Mt.fromDom(e.getBody()))};return E.from(e.selection.getStart(!0)).bind((function(r){return Jh(Mt.fromDom(r),(function(n){return function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return E.none()}(t,(function(t){return r=t,rp(e,n.dom,r)?E.some(r):E.none();var r}))}),n)})).getOrNull()},ap=function(e,t,n){return Q(n,(function(n,r){var o,i=(o=r,q(e.formatter.get(o),(function(e){var t=function(e){return 1<e.length&&"%"===e.charAt(0)};return q(["styles","attributes"],(function(n){return ye(e,n).exists((function(e){var n=R(e)?e:be(e);return q(n,t)}))}))})));return e.formatter.matchNode(t,r,{},i)?n.concat([r]):n}),[])},up=po,cp="_mce_caret",sp=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==up||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},lp=function(e){if(e){var t=new Qr(e,e);for(e=t.current();e;e=t.next())if(Vn(e))return e}return null},fp=function(e){var t=Mt.fromTag("span");return Zn(t,{id:cp,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&hn(t,Mt.fromText(up)),t},dp=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,u,c,s,l,f=e.dom,d=e.selection;sp(t)?rh(e,!1,Mt.fromDom(t),n):(r=d.getRng(),o=f.getParent(t,f.isBlock),i=r.startContainer,a=r.startOffset,u=r.endContainer,c=r.endOffset,(l=lp(t))&&l.nodeValue.charAt(0)===up&&l.deleteData(0,1),s=l,f.remove(t,!0),i===s&&0<a&&r.setStart(s,a-1),u===s&&0<c&&r.setEnd(s,c-1),o&&f.isEmpty(o)&&lg(Mt.fromDom(o)),d.setRng(r))},mp=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)dp(e,t,n);else if(!(t=jl(e.getBody(),o.getStart())))for(;t=r.get(cp);)dp(e,t,!1)},gp=function(e,t){return e.appendChild(t),t},hp=function(e,t){var n=J(e,(function(e,t){return gp(e,t.cloneNode(!1))}),t);return gp(n,n.ownerDocument.createTextNode(up))},pp=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,h,p,v,b=e.dom,y=e.selection,x=[],w=y.getRng(),C=w.startContainer,k=w.startOffset,S=C;for(3===C.nodeType&&(k!==C.nodeValue.length&&(o=!0),S=S.parentNode);S;){if(rp(e,S,t,n,r)){i=S;break}S.nextSibling&&(o=!0),x.push(S),S=S.parentNode}i&&(o?(a=y.getBookmark(),w.collapse(!0),u=Mf(e,w,e.formatter.get(t),!0),u=pd(u),e.formatter.remove(t,n,u,r),y.moveToBookmark(a)):(c=jl(e.getBody(),i),s=fp(!1).dom,m=s,h=null!==c?c:i,p=(d=e).dom,(v=p.getParent(h,g(of,d)))&&p.isEmpty(v)?h.parentNode.replaceChild(m,h):(sg(Mt.fromDom(h)),p.isEmpty(h)?h.parentNode.replaceChild(m,h):p.insertAfter(m,h)),l=function(e,t,n,r,o,i){var a=e.formatter,u=e.dom,c=Y(se(a.get()),(function(e){return e!==r&&!qe(e,"removeformat")})),s=ap(e,n,c);if(0<Y(s,(function(t){return!gf(e,t,r)})).length){var l=n.cloneNode(!1);return u.add(t,l),a.remove(r,o,l,i),u.remove(l),E.some(l)}return E.none()}(e,s,i,t,n,r),f=hp(x.concat(l.toArray()),s),dp(e,c,!1),y.setCursorLocation(f,1),b.isEmpty(i)&&b.remove(i)))},vp=function(e){e.on("mouseup keydown",(function(t){var n,r,o,i;n=e,r=t.keyCode,o=n.selection,i=n.getBody(),mp(n,null,!1),8!==r&&46!==r||!o.isCollapsed()||o.getStart().innerHTML!==up||mp(n,jl(i,o.getStart())),37!==r&&39!==r||mp(n,jl(i,o.getStart()))}))},bp=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(Lt(t))&&!Fl(t.dom)&&!Pn(t.dom)},yp={},xp=_e,wp=ke;Lm=function(e){var t,n=e.selection.getRng(),r=Rn(["pre"]);n.collapsed||(t=e.selection.getSelectedBlocks(),wp(xp(xp(t,r),(function(e){return r(e.previousSibling)&&-1!==Oe(t,e.previousSibling)})),(function(e){var t,n;t=e.previousSibling,bu(n=e).remove(),bu(t).append("<br><br>").append(n.childNodes)})))},yp[Im="pre"]||(yp[Im]=[]),yp[Im].push(Lm);var Cp,kp,Sp,_p,Op=Dt.each,Ep=function(e){return Mn(e)&&!Jl(e)&&!Fl(e)&&!Pn(e)},Tp=function(e,t){for(var n=e;n;n=n[t]){if(Vn(n)&&0!==n.nodeValue.length)return e;if(Mn(n)&&!Jl(n))return n}return e},zp=function(e,t,n){var r,o,i=$m(e);if(t&&n&&(t=Tp(t,"previousSibling"),n=Tp(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Dt.each(Dt.grep(n.childNodes),(function(e){t.appendChild(e)})),t}return n},Dp=function(e,t,n,r){var o;r&&!1!==t.merge_siblings&&(o=zp(e,rf(r),r),zp(e,o,rf(o,!0)))},Ap=function e(t,n,r){Op(t.childNodes,(function(t){Ep(t)&&(n(t)&&r(t),t.hasChildNodes()&&e(t,n,r))}))},Mp=function(e,t){return function(n){return!(!n||!ff(e,n,t))}},Rp=function(e,t,n){return function(r){var o,i;e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),o=e,"SPAN"===(i=r).nodeName&&0===o.getAttribs(i).length&&o.remove(i,!0)}},Np=Sr([{keep:[]},{rename:["name"]},{removed:[]}]),Bp=/^(src|href|style)$/,Pp=Dt.each,Hp=sf,Ip=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},Lp=function(e,t,n){var r,o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"];return Mn(o)&&(r=o.childNodes.length-1,!n&&i&&i--,o=o.childNodes[r<i?r:i]),Vn(o)&&n&&i>=o.nodeValue.length&&(o=new Qr(o,e.getBody()).next()||o),Vn(o)&&!n&&0===i&&(o=new Qr(o,e.getBody()).prev()||o),o},Vp=function(e,t){var n=t?"firstChild":"lastChild";if(/^(TR|TH|TD)$/.test(e.nodeName)&&e[n]){var r=e[n];return"TR"===e.nodeName&&r[n]||r}return e},Fp=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},jp=function(e,t,n,r,o){var i=Mt.fromDom(t),a=Mt.fromDom(e.create(r,o)),u=(n?Zt:Qt)(i);return pn(a,u),n?(dn(i,a),gn(a,i)):(mn(i,a),hn(a,i)),a.dom},Up=function(e,t,n,r){return!(t=rf(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},$p=function(e,t,n,r,o){var i,a,u,c,s,l=e.dom;if(u=l,!(Hp(c=r,(s=t).inline)||Hp(c,s.block)||s.selector&&Mn(c)&&u.is(c,s.selector)||(a=r,t.links&&"A"===a.nodeName)))return Np.keep();var f,d,m,g,h,p,v,b=r;if(t.inline&&"all"===t.remove&&R(t.preserve_attributes)){var y=Y(l.getAttribs(b),(function(e){return W(t.preserve_attributes,e.name.toLowerCase())}));if(l.removeAllAttribs(b),X(y,(function(e){return l.setAttrib(b,e.name,e.value)})),0<y.length)return Np.rename("span")}if("all"!==t.remove){Pp(t.styles,(function(e,r){e=lf(l,cf(e,n),r+""),V(r)&&(r=e,o=null),!t.remove_similar&&o&&!Hp(ff(l,o,r),e)||l.setStyle(b,r,""),i=!0})),i&&""===l.getAttrib(b,"style")&&(b.removeAttribute("style"),b.removeAttribute("data-mce-style")),Pp(t.attributes,(function(e,r){var i;if(e=cf(e,n),V(r)&&(r=e,o=null),t.remove_similar||!o||Hp(l.getAttrib(o,r),e)){if("class"===r&&(e=l.getAttrib(b,r))&&(i="",X(e.split(/\s+/),(function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)})),i))return void l.setAttrib(b,r,i);"class"===r&&b.removeAttribute("className"),Bp.test(r)&&b.removeAttribute("data-mce-"+r),b.removeAttribute(r)}})),Pp(t.classes,(function(e){e=cf(e,n),o&&!l.hasClass(o,e)||l.removeClass(b,e)}));for(var x=l.getAttribs(b),w=0;w<x.length;w++){var C=x[w].nodeName;if(0!==C.indexOf("_")&&0!==C.indexOf("data-"))return Np.keep()}}return"none"!==t.remove?(f=e,m=t,h=(d=b).parentNode,p=f.dom,v=ms(f),m.block&&(v?h===p.getRoot()&&(m.list_block&&Hp(d,m.list_block)||X(ce(d.childNodes),(function(e){af(f,v,e.nodeName.toLowerCase())?g?g.appendChild(e):(g=Fp(p,e,v),p.setAttribs(g,f.settings.forced_root_block_attrs)):g=0}))):p.isBlock(d)&&!p.isBlock(h)&&(Up(p,d,!1)||Up(p,d.firstChild,!0,!0)||d.insertBefore(p.create("br"),d.firstChild),Up(p,d,!0)||Up(p,d.lastChild,!1,!0)||d.appendChild(p.create("br")))),m.selector&&m.inline&&!Hp(m.inline,d)||p.remove(d,!0),Np.removed()):Np.keep()},Wp=function(e,t,n,r,o){return $p(e,t,n,r,o).fold(C,(function(t){return e.dom.rename(r,t),!0}),k)},qp=function(e,t,n,r,o,i,a,u){var c,s,l,f=e.dom;if(n){for(var m=n.parentNode,g=r.parentNode;g&&g!==m;g=g.parentNode){c=f.clone(g,!1);for(var h=0;h<t.length&&null!==(c=function(e,t,n,r){return $p(e,t,n,r,r).fold(d(r),(function(t){return e.dom.createFragment().appendChild(r),e.dom.rename(r,t)}),d(null))}(e,t[h],u,c));h++);c&&(s&&c.appendChild(s),l=l||c,s=c)}!i||a.mixed&&f.isBlock(n)||(r=f.split(n,r)),s&&(o.parentNode.insertBefore(s,o),l.appendChild(o),a.inline&&Dp(f,a,0,s))}return r},Gp=function(e,t,n,r,o){var i,a=e.formatter.get(t),u=a[0],c=!0,s=e.dom,l=e.selection,f=function(r){var i,c,s,l,f,d,m=(c=r,s=t,l=n,f=o,X(mf((i=e).dom,c.parentNode).reverse(),(function(e){var t;d||"_start"===e.id||"_end"===e.id||(t=rp(i,e,s,l,f))&&!1!==t.split&&(d=e)})),d);return qp(e,a,m,r,r,!0,u,n)},d=function t(r){var o,i;Mn(r)&&s.getContentEditable(r)&&(o=c,c="true"===s.getContentEditable(r),i=!0);var l=ce(r.childNodes);if(c&&!i)for(var f=0;f<a.length&&!Wp(e,a[f],n,r,r);f++);if(u.deep&&l.length){for(f=0;f<l.length;f++)t(l[f]);i&&(c=o)}},m=function(e){var t,n=s.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return Jl(t=r)&&Mn(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),Vn(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),s.remove(n,!0),r},g=function(t){var n,r,o=Mf(e,t,a,t.collapsed);if(u.split){if(o=pd(o),(n=Lp(e,o,!0))!==(r=Lp(e,o))){if(n=Vp(n,!0),r=Vp(r,!1),Ip(s,n,r)){var i=E.from(n.firstChild).getOr(n);return f(jp(s,i,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(Ip(s,r,n))return i=E.from(r.lastChild).getOr(r),f(jp(s,i,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1);n=Fp(s,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Fp(s,r,"span",{id:"_end","data-mce-type":"bookmark"});var c=s.createRng();c.setStartAfter(n),c.setEndBefore(r),Nf(s,c,(function(e){X(e,(function(e){Jl(e)||Jl(e.parentNode)||f(e)}))})),f(n),f(r),n=m(!0),r=m()}else n=r=f(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=s.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=s.nodeIndex(r)+1}Nf(s,o,(function(t){X(t,(function(t){d(t),X(["underline","line-through","overline"],(function(n){Mn(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&df(s,t.parentNode)===n&&Wp(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,t)}))}))}))};if(r)tf(r)?((i=s.createRng()).setStartBefore(r),i.setEndAfter(r),g(i)):g(r);else if("false"!==s.getContentEditable(l.getNode()))l.isCollapsed()&&u.inline&&!If(e).length?pp(e,t,n,o):(Wf(l,!0,(function(){$f(e,g)})),u.inline&&op(e,t,n,l.getStart())&&nf(s,l,l.getRng()),e.nodeChanged());else{r=l.getNode();for(var h=0;h<a.length&&(!a[h].ceFalseOverride||!Wp(e,a[h],n,r,r));h++);}},Xp=Dt.each,Kp=function(e,t,n,r){Xp(t,(function(t){var o,i,a,u;Xp(e.dom.select(t.inline,r),(function(r){Ep(r)&&Wp(e,t,n,r,t.exact?r:null)})),o=e.dom,a=r,(i=t).clear_child_styles&&(u=i.links?"*:not(a)":"*",Op(o.select(u,a),(function(e){Ep(e)&&Op(i.styles,(function(t,n){o.setStyle(e,n,"")}))})))}))},Yp=Dt.each,Jp=we,Qp=function e(t,n,r,o){var i,a,u,c,s=t.formatter.get(n),l=s[0],f=!o&&t.selection.isCollapsed(),d=t.dom,m=t.selection,g=function(e,t){var n;t=t||l,e&&(t.onformat&&t.onformat(e,t,r,o),Yp(t.styles,(function(t,n){d.setStyle(e,n,cf(t,r))})),!t.styles||(n=d.getAttrib(e,"style"))&&d.setAttrib(e,"data-mce-style",n),Yp(t.attributes,(function(t,n){d.setAttrib(e,n,cf(t,r))})),Yp(t.classes,(function(t){t=cf(t,r),d.hasClass(e,t)||d.addClass(e,t)})))},h=function(e,t){var n=!1;return!!pf(l)&&(Yp(e,(function(e){if(!("collapsed"in e)||e.collapsed===f)return d.is(t,e.selector)&&!Fl(t)?(g(t,e),!(n=!0)):void 0})),n)},p=function(e,o,i,a){var u=[],c=!0,f=l.inline||l.block,d=e.create(f);g(d),Nf(e,o,(function(o){var i,m=function o(m){var p=!1,v=c,b=m.nodeName.toLowerCase(),y=m.parentNode.nodeName.toLowerCase();if(Mn(m)&&e.getContentEditable(m)&&(v=c,c="true"===e.getContentEditable(m),p=!0),$n(m)&&!function(e,t,n,r){if(e.getParam("format_empty_lines",!1,"boolean")&&vf(t)){var o=De(De({},e.schema.getTextBlockElements()),{td:{},th:{},li:{},dt:{},dd:{},figcaption:{},caption:{},details:{},summary:{}}),i=Kh(Mt.fromDom(n),(function(e){return Fl(e.dom)}));return we(o,r)&&Ko(Mt.fromDom(n.parentNode),!1)&&!i}return!1}(t,l,m,y))return i=null,void(hf(l)&&e.remove(m));if(l.wrapper&&rp(t,m,n,r))i=null;else{if(c&&!p&&hf(l)&&!l.wrapper&&of(t,b)&&af(t,y,f)){var x=e.rename(m,f);return g(x),u.push(x),void(i=null)}if(pf(l)){var w=h(s,m);if(!Jp(l,"inline")||w)return void(i=null)}!c||p||!af(t,f,b)||!af(t,y,f)||!a&&3===m.nodeType&&1===m.nodeValue.length&&65279===m.nodeValue.charCodeAt(0)||Fl(m)||Jp(l,"inline")&&e.isBlock(m)?(i=null,Yp(Dt.grep(m.childNodes),o),p&&(c=v),i=null):(i||(i=e.clone(d,!1),m.parentNode.insertBefore(i,m),u.push(i)),i.appendChild(m))}};Yp(o,m)})),!0===l.links&&Yp(u,(function(e){var t=function e(t){"A"===t.nodeName&&g(t,l),Yp(Dt.grep(t.childNodes),e)};t(e)})),Yp(u,(function(o){var i,a,c,f,d,m,h,p,v,b,y,x,w,C,k,S,_,O,E,T,z=function(e){var t=!1;return Yp(e.childNodes,(function(e){if((n=e)&&1===n.nodeType&&!Jl(n)&&!Fl(n)&&!Pn(n))return t=e,!1;var n})),t},D=(i=0,Yp(o.childNodes,(function(e){var t;I(t=e)&&Vn(t)&&0===t.length||Jl(e)||i++})),i);!(1<u.length)&&e.isBlock(o)||0!==D?(vf(l)||l.wrapper)&&(l.exact||1!==D||((T=z(O=o))&&!Jl(T)&&tp(e,T,l)&&(E=e.clone(T,!1),g(E),e.replace(E,O,!0),e.remove(T,!0)),o=E||O),Kp(t,s,r,o),C=l,k=n,S=r,rp(w=t,(_=o).parentNode,k,S)&&Wp(w,C,S,_)||C.merge_with_parents&&w.dom.getParent(_.parentNode,(function(e){if(rp(w,e,k,S))return Wp(w,C,S,_),!0})),v=e,y=r,x=o,(b=l).styles&&b.styles.backgroundColor&&Ap(x,Mp(v,"fontSize"),Rp(v,"backgroundColor",cf(b.styles.backgroundColor,y))),d=e,h=o,p=function(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=df(d,e.parentNode),d.getStyle(e,"color")&&t?d.setStyle(e,"text-decoration",t):d.getStyle(e,"text-decoration")===t&&d.setStyle(e,"text-decoration",null))},(m=l).styles&&(m.styles.color||m.styles.textDecoration)&&(Dt.walk(h,p,"childNodes"),p(h)),a=e,f=o,"sub"!==(c=l).inline&&"sup"!==c.inline||(Ap(f,Mp(a,"fontSize"),Rp(a,"fontSize","")),a.remove(a.select("sup"===c.inline?"sub":"sup",f),!0)),Dp(e,l,0,o)):e.remove(o,!0)}))};if("false"!==d.getContentEditable(m.getNode()))l&&(o?tf(o)?h(s,o)||((i=d.createRng()).setStartBefore(o),i.setEndAfter(o),p(d,Mf(t,i,s),0,!0)):p(d,o,0,!0):f&&vf(l)&&!If(t).length?function(e,t,n){var r,o=e.selection,i=o.getRng(),a=i.startOffset,u=i.startContainer.nodeValue,c=jl(e.getBody(),o.getStart());c&&(r=lp(c));var s,l,f,d,m=/[^\s\u00a0\u00ad\u200b\ufeff]/;u&&0<a&&a<u.length&&m.test(u.charAt(a))&&m.test(u.charAt(a-1))?(s=o.getBookmark(),i.collapse(!0),l=Mf(e,i,e.formatter.get(t)),l=pd(l),e.formatter.apply(t,n,l),o.moveToBookmark(s)):(c&&r.nodeValue===up||(f=e.getDoc(),d=fp(!0).dom,r=(c=f.importNode(d,!0)).firstChild,i.insertNode(c),a=1),e.formatter.apply(t,n,c),o.setCursorLocation(r,a))}(t,n,r):(a=m.getNode(),u=s[0],t.settings.forced_root_block||!u.defaultBlock||d.getParent(a,d.isBlock)||e(t,u.defaultBlock),m.setRng(Mh(m.getRng())),Wf(m,!0,(function(e){$f(t,(function(e,n){var r=n?e:Mf(t,e,s);p(d,r)}))})),nf(d,m,m.getRng()),t.nodeChanged()),c=t,wp(yp[n],(function(e){e(c)})));else{o=m.getNode();for(var v=0,b=s.length;v<b;v++){var y=s[v];if(y.ceFalseOverride&&pf(y)&&d.is(o,y.selector))return void g(o,y)}}},Zp=function(e,t,n,r){var o=se(n.get()),i={},a={},u=Y(mf(e.dom,t),(function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")}));fe(r,(function(t,n){Dt.each(u,(function(r){return e.formatter.matchNode(r,n,{},t.similar)?(-1===o.indexOf(n)&&(X(t.callbacks,(function(e){e(!0,{node:r,format:n,parents:u})})),i[n]=t.callbacks),a[n]=t.callbacks,!1):!Zh(e,r,n)&&void 0}))}));var c=ev(n.get(),a,t,u);n.set(De(De({},i),c))},ev=function(e,t,n,r){return pe(e,(function(e,o){return!!xe(t,o)||(X(e,(function(e){e(!1,{node:n,format:o,parents:r})})),!1)})).t},tv=function(e,t,n,r,o){var i,a,u,c,s,l,f,d;return null===t.get()&&(a=e,u=Au({}),(i=t).set({}),a.on("NodeChange",(function(e){Zp(a,e.element,u,i.get())}))),s=n,l=r,f=o,d=(c=t).get(),X(s.split(","),(function(e){d[e]||(d[e]={similar:f,callbacks:[]}),d[e].callbacks.push(l)})),c.set(d),{unbind:function(){return o=n,i=r,a=(e=t).get(),X(o.split(","),(function(e){a[e].callbacks=Y(a[e].callbacks,(function(e){return e!==i})),0===a[e].callbacks.length&&delete a[e]})),void e.set(a);var e,o,i,a}}},nv=function(e,t){var n=(t||document).createDocumentFragment();return X(e,(function(e){n.appendChild(e.dom)})),Mt.fromDom(n)},rv=function(e,t,n){return{element:e,width:t,rows:n}},ov=function(e,t){return{element:e,cells:t}},iv=function(e,t){var n=parseInt(er(e,t),10);return isNaN(n)?1:n},av=function(e){return Q(e,(function(e,t){return t.cells.length>e?t.cells.length:e}),0)},uv=function(e,t){for(var n=e.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(Pt(o[i],t))return E.some({x:i,y:r});return E.none()},cv=function(e,t,n,r,o){for(var i=[],a=e.rows,u=n;u<=o;u++){var c=a[u].cells,s=t<r?c.slice(t,r+1):c.slice(r,t+1);i.push(ov(a[u].element,s))}return i},sv=function(e){var t=rv(ic(e),0,[]);return X(Gu(e,"tr"),(function(e,n){X(Gu(e,"td,th"),(function(r,o){!function(e,t,n,r,o){for(var i=iv(o,"rowspan"),a=iv(o,"colspan"),u=e.rows,c=n;c<n+i;c++){u[c]||(u[c]=ov(ac(r),[]));for(var s=t;s<t+a;s++)u[c].cells[s]=c===n&&s===t?o:ic(o)}}(t,function(e,t,n){for(;r=t,o=n,((i=e.rows)[o]?i[o].cells:[])[r];)t++;var r,o,i;return t}(t,o,n),n,e,r)}))})),rv(t.element,av(t.rows),t.rows)},lv=function(e){return n=G((t=e).rows,(function(e){var t=G(e.cells,(function(e){var t=ac(e);return nr(t,"colspan"),nr(t,"rowspan"),t})),n=ic(e.element);return pn(n,t),n})),r=ic(t.element),o=Mt.fromTag("tbody"),pn(o,n),hn(r,o),r;var t,n,r,o},fv=function(e,t,n){return uv(e,t).bind((function(t){return uv(e,n).map((function(n){return r=e,i=n,a=(o=t).x,u=o.y,c=i.x,s=i.y,l=u<s?cv(r,a,u,c,s):cv(r,a,s,c,u),rv(r.element,av(l),l);var r,o,i,a,u,c,s,l}))}))},dv=function(e,t){return Z(e,(function(e){return"li"===Lt(e)&&Ff(e,t)})).fold(d([]),(function(t){return Z(e,(function(e){return"ul"===Lt(e)||"ol"===Lt(e)})).map((function(e){var t=Mt.fromTag(Lt(e)),n=ve(ur(e),(function(e,t){return Ge(t,"list-style")}));return rr(t,n),[Mt.fromTag("li"),t]})).getOr([])}))},mv=function(e,t){var n,r=Mt.fromDom(t.commonAncestorContainer),o=gg(r,e),i=Y(o,(function(e){return io(e)||ro(e)})),a=dv(o,t),u=i.concat(a.length?a:so(n=r)?Kt(n).filter(co).fold(d([]),(function(e){return[n,e]})):co(n)?[n]:[]);return G(u,ic)},gv=function(){return nv([])},hv=function(e,t){return n=Mt.fromDom(t.cloneContents()),r=mv(e,t),o=Q(r,(function(e,t){return hn(t,e),t}),n),0<r.length?nv([o]):o;var n,r,o},pv=function(e,t){return n=e,r=t[0],Pr(r,"table",g(Pt,n)).bind((function(e){var n=t[0],r=t[t.length-1],o=sv(e);return fv(o,n,r).map((function(e){return nv([lv(e)])}))})).getOrThunk(gv);var n,r},vv=function(e,t){var n,r,o=Hf(t,e);return 0<o.length?pv(e,o):(n=e,0<(r=t).length&&r[0].collapsed?gv():hv(n,r[0]))},bv=function(e,t){return 0<=t&&t<e.length&&Zl(e.charAt(t))},yv=function(e,t){var n=bo(e.innerText);return t?n.replace(/^[ \f\n\r\t\v]+/,""):n},xv=function(e){return E.from(e.selection.getRng()).map((function(t){var n=E.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),o=n.map((function(e){return e.nodeName})).getOr("div").toLowerCase(),i=_t.browser.isIE()&&"pre"!==o,a=e.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),u=yv(a,i),c=bo(a.textContent);if(e.dom.remove(a),bv(c,0)||bv(c,c.length-1)){var s=n.getOr(r),l=yv(s,i),f=l.indexOf(u);return-1===f?u:(bv(l,f-1)?" ":"")+u+(bv(l,f+u.length)?" ":"")}return u})).getOr("")},wv=function(e,t,n){if(void 0===n&&(n={}),n.get=!0,n.format=t,n.selection=!0,(n=e.fire("BeforeGetContent",n)).isDefaultPrevented())return e.fire("GetContent",n),n.content;if("text"===n.format)return xv(e);n.getInner=!0;var r,o,i,a,u,c,s,l=(o=n,i=(r=e).selection.getRng(),a=r.dom.create("body"),u=r.selection.getSel(),c=Em(r,Bf(u)),(s=o.contextual?vv(Mt.fromDom(r.getBody()),c).dom:i.cloneContents())&&a.appendChild(s),r.selection.serializer.serialize(a,o));return"tree"===n.format?l:(n.content=e.selection.isCollapsed()?"":l,e.fire("GetContent",n),n.content)},Cv=function(e){return Mn(e)?e.outerHTML:Vn(e)?mi.encodeRaw(e.data,!1):Fn(e)?"\x3c!--"+e.data+"--\x3e":""},kv=function(e,t,n){var r,o=function(e){var t,n=document.createElement("div"),r=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r}(t);e.hasChildNodes()&&n<e.childNodes.length?(r=e.childNodes[n]).parentNode.insertBefore(o,r):e.appendChild(o)},Sv=function(e,t){var n=0;X(e,(function(e){var r,o,i;0===e[0]?n++:1===e[0]?(kv(t,e[1],n),n++):2===e[0]&&(o=n,(r=t).hasChildNodes()&&o<r.childNodes.length&&(i=r.childNodes[o]).parentNode.removeChild(i))}))},_v=function(e,t){var n,r,o,i,a,u,c,s,l,f=G(ce(t.childNodes),Cv);return Sv((r=e,o=(n=f).length+r.length+2,i=new Array(o),a=new Array(o),u=function(e,t,o,i,a){var c=s(e,t,o,i);if(null===c||c.start===t&&c.diag===t-i||c.end===e&&c.diag===e-o)for(var l=e,f=o;l<t||f<i;)l<t&&f<i&&n[l]===r[f]?(a.push([0,n[l]]),++l,++f):i-o<t-e?(a.push([2,n[l]]),++l):(a.push([1,r[f]]),++f);else{u(e,c.start,o,c.start-c.diag,a);for(var d=c.start;d<c.end;++d)a.push([0,n[d]]);u(c.end,t,c.end-c.diag,i,a)}},c=function(e,t,o,i){for(var a=e;a-t<i&&a<o&&n[a]===r[a-t];)++a;return{start:e,end:a,diag:t}},s=function(e,t,o,u){var s=t-e,l=u-o;if(0==s||0==l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2==0?v:1+v)/2;for(i[1+b]=e,a[1+b]=t+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){for(m=d+b,d===-f||d!==f&&i[m-1]<i[m+1]?i[m]=i[m+1]:i[m]=i[m-1]+1,h=(g=i[m])-e+o-d;g<t&&h<u&&n[g]===r[h];)i[m]=++g,++h;if(p%2!=0&&p-f<=d&&d<=p+f&&a[m-p]<=i[m])return c(a[m-p],d+e-o,t,u)}for(d=p-f;d<=p+f;d+=2){for(m=d+b-p,d===p-f||d!==p+f&&a[m+1]<=a[m-1]?a[m]=a[m+1]-1:a[m]=a[m-1],h=(g=a[m]-1)-e+o-d;e<=g&&o<=h&&n[g]===r[h];)a[m]=g--,h--;if(p%2==0&&-f<=d&&d<=f&&a[m]<=i[m+p])return c(a[m],d+e-o,t,u)}}},l=[],u(0,n.length,0,r.length,l),l),t),t},Ov=Au(E.none()),Ev=function(e){var t,n=(t=e.getBody(),Y(G(ce(t.childNodes),Cv),(function(e){return 0<e.length}))),r=te(n,(function(t){var n=Vm(e.serializer,t);return 0<n.length?[n]:[]})),o=r.join("");return-1!==o.indexOf("</iframe>")?{type:"fragmented",fragments:r,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:o,bookmark:null,beforeBookmark:null}},Tv=function(e,t,n){"fragmented"===t.type?_v(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},zv=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},Dv=function(e){var t=Mt.fromTag("body",Ov.get().getOrThunk((function(){var e=document.implementation.createHTMLDocument("undo");return Ov.set(E.some(e)),e})));return rc(t,zv(e)),X(Gu(t,"*[data-mce-bogus]"),yn),t.dom.innerHTML},Av=function(e,t){return!(!e||!t)&&(r=t,zv(e)===zv(r)||(n=t,Dv(e)===Dv(n)));var n,r},Mv=function(e){return 0===e.get()},Rv=function(e,t,n){Mv(n)&&(e.typing=t)},Nv=function(e,t){e.typing&&(Rv(e,!1,t),e.add())},Bv=function(e){return{undoManager:{beforeChange:function(t,n){return r=e,o=n,void(Mv(t)&&o.set(E.some(ss(r.selection))));var r,o},addUndoLevel:function(t,n,r,o,i,a){return function(e,t,n,r,o,i,a){var u=Ev(e);if(i=i||{},i=Dt.extend(i,u),!1===Mv(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&Av(c,i))return null;t.data[n.get()]&&o.get().each((function(e){t.data[n.get()].beforeBookmark=e}));var s=e.getParam("custom_undo_redo_levels",0,"number");if(s&&t.data.length>s){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=ss(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return 0<n.get()?(e.setDirty(!0),e.fire("AddUndo",f),e.fire("change",f)):e.fire("AddUndo",f),i}(e,t,n,r,o,i,a)},undo:function(t,n,r){return o=e,a=n,u=r,(i=t).typing&&(i.add(),i.typing=!1,Rv(i,!1,a)),0<u.get()&&(u.set(u.get()-1),c=i.data[u.get()],Tv(o,c,!0),o.setDirty(!0),o.fire("Undo",{level:c})),c;var o,i,a,u,c},redo:function(t,n){return r=e,i=n,(o=t).get()<i.length-1&&(o.set(o.get()+1),a=i[o.get()],Tv(r,a,!1),r.setDirty(!0),r.fire("Redo",{level:a})),a;var r,o,i,a},clear:function(t,n){return r=e,i=n,(o=t).data=[],i.set(0),o.typing=!1,void r.fire("ClearUndos");var r,o,i},reset:function(e){return(t=e).clear(),void t.add();var t},hasUndo:function(t,n){return r=e,o=t,0<n.get()||o.typing&&o.data[0]&&!Av(Ev(r),o.data[0]);var r,o},hasRedo:function(e,t){return n=e,t.get()<n.data.length-1&&!n.typing;var n},transact:function(e,t,n){return o=n,Nv(r=e,t),r.beforeChange(),r.ignore(o),r.add();var r,o},ignore:function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},extra:function(t,n,r,o){return i=e,u=n,c=r,s=o,void((a=t).transact(c)&&(l=a.data[u.get()].bookmark,f=a.data[u.get()-1],Tv(i,f,!0),a.transact(s)&&(a.data[u.get()-1].beforeBookmark=l)));var i,a,u,c,s,l,f}},formatter:{match:function(t,n,r){return op(e,t,n,r)},matchAll:function(t,n){return o=t,i=n,a=[],u={},c=(r=e).selection.getStart(),r.dom.getParent(c,(function(e){for(var t=0;t<o.length;t++){var n=o[t];!u[n]&&rp(r,e,n,i)&&(u[n]=!0,a.push(n))}}),r.dom.getRoot()),a;var r,o,i,a,u,c},matchNode:function(t,n,r,o){return rp(e,t,n,r,o)},canApply:function(t){return function(e,t){var n,r,o,i,a,u=e.formatter.get(t),c=e.dom;if(u)for(n=e.selection.getStart(),r=mf(c,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(c.is(r[o],a))return!0}return!1}(e,t)},closest:function(t){return ip(e,t)},apply:function(t,n,r){return Qp(e,t,n,r)},remove:function(t,n,r,o){return Gp(e,t,n,r,o)},toggle:function(t,n,r){return i=t,a=n,u=r,c=(o=e).formatter.get(i),void(!op(o,i,a,u)||"toggle"in c[0]&&!c[0].toggle?Qp:Gp)(o,i,a,u);var o,i,a,u,c},formatChanged:function(t,n,r,o){return tv(e,t,n,r,o)}},editor:{getContent:function(t,n){return r=e,o=t,i=n,E.from(r.getBody()).fold(d("tree"===o.format?new Am("body",11):""),(function(e){return jm(r,o,i,e)}));var r,o,i},setContent:function(t,n){return Xh(e,t,n)},insertContent:function(t,n){return Uh(e,t,n)},addVisual:function(t){return r=t,o=(n=e).dom,i=I(r)?r:n.getBody(),P(n.hasVisual)&&(n.hasVisual=n.getParam("visual",!0,"boolean")),X(o.select("table,a",i),(function(e){switch(e.nodeName){case"TABLE":var t=n.getParam("visual_table_class","mce-item-table","string"),r=o.getAttrib(e,"border");r&&"0"!==r||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t);break;case"A":var i,a;o.getAttrib(e,"href")||(i=o.getAttrib(e,"name")||e.id,a=n.getParam("visual_anchor_class","mce-item-anchor","string"),i&&n.hasVisual?o.addClass(e,a):o.removeClass(e,a))}})),void n.fire("VisualAid",{element:r,hasVisual:n.hasVisual});var n,r,o,i}},selection:{getContent:function(t,n){return wv(e,t,n)}},raw:{getModel:function(){return E.none()}}}},Pv=function(e){return xe(e.plugins,"rtc")},Hv=function(e){var t=e;return ye(e.plugins,"rtc").fold((function(){return t.rtcInstance=Bv(e),E.none()}),(function(e){return E.some(e.setup().then((function(e){var n,r,o,i,a,u,c,s;return t.rtcInstance=(r=function(e){return M(e)?e:{}},o=y("Unimplemented feature for rtc"),i=(n=e).undoManager,a=n.formatter,u=n.editor,c=n.selection,s=n.raw,{undoManager:{beforeChange:l,addUndoLevel:o,undo:function(){return i.undo()},redo:function(){return i.redo()},clear:function(){return i.clear()},reset:function(){return i.reset()},hasUndo:function(){return i.hasUndo()},hasRedo:function(){return i.hasRedo()},transact:function(e,t,n){return i.transact(n)},ignore:function(e,t){return i.ignore(t)},extra:function(e,t,n,r){return i.extra(n,r)}},formatter:{match:function(e,t,n){return a.match(e,r(t))},matchAll:o,matchNode:o,canApply:function(e){return a.canApply(e)},closest:function(e){return a.closest(e)},apply:function(e,t,n){return a.apply(e,r(t))},remove:function(e,t,n,o){return a.remove(e,r(t))},toggle:function(e,t,n){return a.toggle(e,r(t))},formatChanged:function(e,t,n,r){return a.formatChanged(t,n,r)}},editor:{getContent:function(e,t){return u.getContent(e)},setContent:function(e,t){return u.setContent(e,t)},insertContent:function(e,t){return u.insertContent(e)},addVisual:l},selection:{getContent:function(e,t){return c.getContent(t)}},raw:{getModel:function(){return E.some(s.getRawModel())}}}),e.rtc.isRemote}),(function(e){var n,r;return t.rtcInstance=(n=d(null),r=d(""),{undoManager:{beforeChange:l,addUndoLevel:n,undo:n,redo:n,clear:l,reset:l,hasUndo:C,hasRedo:C,transact:n,ignore:l,extra:l},formatter:{match:C,matchAll:d([]),matchNode:C,canApply:C,closest:r,apply:l,remove:l,toggle:l,formatChanged:d({unbind:l})},editor:{getContent:r,setContent:r,insertContent:l,addVisual:l},selection:{getContent:r},raw:{getModel:d(E.none())}}),Lr.reject(e)})))}))},Iv=function(e){return e.rtcInstance?e.rtcInstance:Bv(e)},Lv=function(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},Vv=function(e,t){void 0===t&&(t={});var n,r,o=t.format?t.format:"html";return n=o,r=t,Lv(e).selection.getContent(n,r)},Fv=function(e){return 0===e.dom.length?(bn(e),E.none()):E.some(e)},jv=function(e,t,n,r){e.bind((function(e){return(r?Wg:$g)(e.dom,r?e.dom.length:0),t.filter(Ut).map((function(t){return o=t,i=n,a=r,u=e.dom,c=o.dom,s=a?u.length:c.length,void(a?(qg(u,c,!1,!a),i.setStart(c,s)):(qg(c,u,!1,!a),i.setEnd(c,s)));var o,i,a,u,c,s}))})).orThunk((function(){var e;return(e=r,t.filter((function(e){return Zf.isBookmarkNode(e.dom)})).bind(e?Jt:Yt).or(t).filter(Ut)).map((function(e){return n=r,void Kt(t=e).each((function(e){var r=t.dom;n&&Bg(e,Lc(r,0))?$g(r,0):!n&&Pg(e,Lc(r,r.length))&&Wg(r,r.length)}));var t,n}))}))},Uv=function(e,t,n){void 0===n&&(n={});var r,o,i=(r=t,De(De({format:"html"},n),{set:!0,selection:!0,content:r}));i.no_events||!(i=e.fire("BeforeSetContent",i)).isDefaultPrevented()?(n.content=function(e,t){if("raw"===t.format)return t.content;var n=e.selection.getRng(),r=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=e.parser.parse(t.content,De(De({isRootContent:!0,forced_root_block:!1},o),t));return Gm({validate:e.validate},e.schema).serialize(i)}(e,i),function(e,t){var n=E.from(t.firstChild).map(Mt.fromDom),r=E.from(t.lastChild).map(Mt.fromDom);e.deleteContents(),e.insertNode(t);var o=n.bind(Yt).filter(Ut).bind(Fv),i=r.bind(Jt).filter(Ut).bind(Fv);jv(o,n,e,!0),jv(i,r,e,!1),e.collapse(!1)}(o=e.selection.getRng(),o.createContextualFragment(n.content)),e.selection.setRng(o),Ud(e,o),i.no_events||e.fire("SetContent",i)):e.fire("SetContent",i)},$v=function(e,t,n){var r;e&&e.hasOwnProperty(t)&&(0===(r=Y(e[t],(function(e){return e!==n}))).length?delete e[t]:e[t]=r)},Wv=function(e){return!!e.select},qv=function(e){return!(!e||!e.ownerDocument)&&It(Mt.fromDom(e.ownerDocument),Mt.fromDom(e))},Gv=function(e,t,n,r){var o,i,a,u,c,s,l=function(e,t){return c||(c={},s={},u.on("NodeChange",(function(e){var t=e.element,n=a.getParents(t,null,a.getRoot()),r={};Dt.each(c,(function(e,t){Dt.each(n,(function(o){if(a.is(o,t))return s[t]||(Dt.each(e,(function(e){e(!0,{node:o,selector:t,parents:n})})),s[t]=e),r[t]=e,!1}))})),Dt.each(s,(function(e,o){r[o]||(delete s[o],Dt.each(e,(function(e){e(!1,{node:t,selector:o,parents:n})})))}))}))),c[e]||(c[e]=[]),c[e].push(t),{unbind:function(){$v(c,e,t),$v(s,e,t)}}},f=function(e,t){return Uv(r,e,t)},d=function(e){var t=g();t.collapse(!!e),h(t)},m=function(){return t.getSelection?t.getSelection():t.document.selection},g=function(){var n,a,u,s=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(s){return-1}},l=t.document;if(void 0!==r.bookmark&&!1===xm(r)){var f=um(r);if(f.isSome())return f.map((function(e){return Em(r,[e])[0]})).getOr(l.createRange())}try{(n=m())&&!An(n.anchorNode)&&(a=0<n.rangeCount?n.getRangeAt(0):n.createRange?n.createRange():l.createRange(),a=Em(r,[a])[0])}catch(c){}return(a=a||(l.createRange?l.createRange():l.body.createTextRange())).setStart&&9===a.startContainer.nodeType&&a.collapsed&&(u=e.getRoot(),a.setStart(u,0),a.setEnd(u,0)),o&&i&&(0===s(a.START_TO_START,a,o)&&0===s(a.END_TO_END,a,o)?a=i:i=o=null),a},h=function(e,t){var n;if((a=e)&&(Wv(a)||qv(a.startContainer)&&qv(a.endContainer))){var a,u=Wv(e)?e:null;if(u){i=null;try{u.select()}catch(c){}}else{var s=m();if(e=r.fire("SetSelectionRange",{range:e,forward:t}).range,s){i=e;try{s.removeAllRanges(),s.addRange(e)}catch(c){}!1===t&&s.extend&&(s.collapse(e.endContainer,e.endOffset),s.extend(e.startContainer,e.startOffset)),o=0<s.rangeCount?s.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!s.setBaseAndExtent||_t.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(n=e.startContainer.childNodes[e.startOffset])&&"IMG"===n.tagName&&(s.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),s.anchorNode===e.startContainer&&s.focusNode===e.endContainer||s.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},p=function(){var t=m(),n=null==t?void 0:t.anchorNode,r=null==t?void 0:t.focusNode;if(!t||!n||!r||An(n)||An(r))return!0;var o=e.createRng();o.setStart(n,t.anchorOffset),o.collapse(!0);var i=e.createRng();return i.setStart(r,t.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},v={bookmarkManager:null,controlSelection:null,dom:a=e,win:t,serializer:n,editor:u=r,collapse:d,setCursorLocation:function(t,n){var o=e.createRng();I(t)&&I(n)?(o.setStart(t,n),o.setEnd(t,n),h(o),d(!1)):(jf(e,o,r.getBody(),!0),h(o))},getContent:function(e){return Vv(r,e)},setContent:f,getBookmark:function(e,t){return b.getBookmark(e,t)},moveToBookmark:function(e){return b.moveToBookmark(e)},select:function(t,n){var r,o,i;return r=e,o=t,i=n,E.from(o).map((function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),i&&(jf(r,n,e,!0),jf(r,n,e,!1)),n})).each(h),t},isCollapsed:function(){var e=g(),t=m();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:p,setNode:function(t){return f(e.getOuterHTML(t)),t},getNode:function(){return function(e,t){var n,r;if(!t)return e;n=t.startContainer,r=t.endContainer;var o=t.startOffset,i=t.endOffset,a=t.commonAncestorContainer;return!t.collapsed&&(n===r&&i-o<2&&n.hasChildNodes()&&(a=n.childNodes[o]),3===n.nodeType&&3===r.nodeType&&(n=n.length===o?Om(n.nextSibling,!0):n.parentNode,r=0===i?Om(r.previousSibling,!1):r.parentNode,n&&n===r))?n:a&&3===a.nodeType?a.parentNode:a}(r.getBody(),g())},getSel:m,setRng:h,getRng:g,getStart:function(e){return Sm(r.getBody(),g(),e)},getEnd:function(e){return _m(r.getBody(),g(),e)},getSelectedBlocks:function(t,n){return function(e,t,n,r){var o,i=[],a=e.getRoot();if(n=e.getParent(n||Sm(a,t,t.collapsed),e.isBlock),r=e.getParent(r||_m(a,t,t.collapsed),e.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r)for(var u=new Qr(o=n,a);(o=u.next())&&o!==r;)e.isBlock(o)&&i.push(o);return r&&n!==r&&r!==a&&i.push(r),i}(e,g(),t,n)},normalize:function(){var t=g(),n=m();if(1<Bf(n).length||!Uf(r))return t;var o=gd(e,t);return o.each((function(e){h(e,p())})),o.getOr(t)},selectorChanged:function(e,t){return l(e,t),v},selectorChangedWithUnbind:l,getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){return o=e,i=t,void((n=r).inline?Vd:jd)(n,o,i);var n,o,i},placeCaretAt:function(e,t){return h(ud(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=g();return e.collapsed?Lc.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=o=i=null,y.destroy()}},b=Zf(v),y=id(v,r);return v.bookmarkManager=b,v.controlSelection=y,v},Xv=function(e,t,n){e.addNodeFilter("font",(function(e){X(e,(function(e){var r,o=t.parse(e.attr("style")),i=e.attr("color"),a=e.attr("face"),u=e.attr("size");i&&(o.color=i),a&&(o["font-family"]=a),u&&(o["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(o)),r=e,X(["color","face","size"],(function(e){r.attr(e,null)}))}))}))},Kv=function(e,t){var n,r=_i();t.convert_fonts_to_spans&&Xv(e,r,Dt.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",(function(e){X(e,(function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))}))}))},Yv=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},Jv=function(e,t){var n;try{n=atob(t)}catch(DO){return E.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return E.some(new Blob([r],{type:e}))},Qv=function(e){return 0===e.indexOf("blob:")?(t=e,new Lr((function(e,r){var o=function(){r("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(){200===i.status?e(i.response):o()},i.onerror=o,i.send()}catch(n){o()}}))):0===e.indexOf("data:")?(n=e,new Lr((function(e){var t=Yv(n),r=t.type,o=t.data;Jv(r,o).fold((function(){return e(new Blob([]))}),e)}))):null;var t,n},Zv=0,eb=function(e){return(e||"blobid")+Zv++},tb=function(e,t,n,r){var o,i,a,u,c;0!==t.src.indexOf("blob:")?(i=(o=Yv(t.src)).data,a=o.type,u=i,(c=e.getByData(u,a))?n({image:t,blobInfo:c}):Qv(t.src).then((function(r){c=e.create(eb(),r,u),e.add(c),n({image:t,blobInfo:c})}),(function(e){r(e)}))):(c=e.getByUri(t.src))?n({image:t,blobInfo:c}):Qv(t.src).then((function(r){var o;o=r,new Lr((function(e){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(o)})).then((function(o){u=Yv(o).data,c=e.create(eb(),r,u),e.add(c),n({image:t,blobInfo:c})}))}),(function(e){r(e)}))},nb=function(e,t){var n={};return{findAll:function(r,o){o=o||k;var i,a=Y((i=r)?ce(i.getElementsByTagName("img")):[],(function(t){var n=t.src;return _t.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&n&&n!==_t.transparentSrc&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&o(t):0===n.indexOf("data:")&&o(t))})),u=G(a,(function(e){if(void 0!==n[e.src])return new Lr((function(t){n[e.src].then((function(n){return"string"==typeof n?n:void t({image:e,blobInfo:n.blobInfo})}))}));var r=new Lr((function(n,r){tb(t,e,n,r)})).then((function(e){return delete n[e.image.src],e}))["catch"]((function(t){return delete n[e.src],t}));return n[e.src]=r}));return Lr.all(u)}}},rb=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new Am("br",1)).shortEnded=!0:r.empty().append(new Am("#text",3)).value=ho},ob=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},ib=function(e,t,n,r){return r.isEmpty(t,n,(function(t){return n=t,(r=e.getElementRule(n.name))&&r.paddEmpty;var n,r}))},ab=function(e,t){var n=t.blob_cache,r=function(e){var r,o,i=e.attr("src");(r=e).attr("src")===_t.transparentSrc||r.attr("data-mce-placeholder")||e.attr("data-mce-bogus")||((o=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(i))?E.some({type:o[1],data:decodeURIComponent(o[2])}):E.none()).filter((function(){return function(e,t){if(t.images_dataimg_filter){var n=new Image;return n.src=e.attr("src"),fe(e.attributes.map,(function(e,t){n.setAttribute(t,e)})),t.images_dataimg_filter(n)}return!0}(e,t)})).bind((function(e){var t=e.type,r=e.data;return E.from(n.getByData(r,t)).orThunk((function(){return Jv(t,r).map((function(e){var t=n.create(eb(),e,r);return n.add(t),t}))}))})).each((function(t){e.attr("src",t.blobUri())}))};n&&e.addAttributeFilter("src",(function(e){return X(e,r)}))},ub=function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",(function(e,r,o){var i,a,u,c,s,l,f,d,m=e.length,g=Dt.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),p=n.getWhiteSpaceElements();for(g.body=1,i=0;i<m;i++)if(u=(a=e[i]).parent,g[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if("span"!==(l=s.name)||"bookmark"!==s.attr("data-mce-type")){"br"===l&&(a=null);break}s=s.prev}a&&(a.remove(),ib(n,h,p,u)&&(f=n.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&rb(t,o,g,u)))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&!g[(c=u).name];)u=u.parent;c===u&&!0!==t.padd_empty_with_br&&((d=new Am("#text",3)).value=ho,a.replace(d))}})),e.addAttributeFilter("href",(function(e){var n,r,o=e.length;if(!t.allow_unsafe_link_target)for(;o--;){var i=e[o];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",(n=i.attr("rel"),r=n?Dt.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter((function(e){return 0<e.length})).concat(["noopener"]).sort().join(" ")))}})),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",(function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(function(e){for(var t,n,r,o=e.length;o--;)"ul"!==(r=(n=e[o]).parent).name&&"ol"!==r.name||(n.prev&&"li"===n.prev.name?n.prev.append(n):((t=new Am("li",1)).attr("style","list-style-type: none"),n.wrap(t)))})),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",(function(e){for(var t,r,o,i,a,u,c,s=e.length,l=n.getValidClasses();s--;){for(r=(t=e[s]).attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,(u=l["*"])&&u[i]&&(c=!0),u=l[t.name],!c&&u&&u[i]&&(c=!0),c&&(a&&(a+=" "),a+=i);a.length||(a=null),t.attr("class",a)}})),ab(e,t)},cb=Dt.makeMap,sb=Dt.each,lb=Dt.explode,fb=Dt.extend,db=function(e,t){void 0===t&&(t=ki());var n={},r=[],o={},i={};(e=e||{}).validate=!("validate"in e)||e.validate,e.root_name=e.root_name||"body";var a,u,c=function(e){var t,a,u=e.name;u in n&&((a=o[u])?a.push(e):o[u]=[e]),t=r.length;for(;t--;)(u=r[t].name)in e.attributes.map&&((a=i[u])?a.push(e):i[u]=[e]);return e},s={schema:t,addAttributeFilter:function(e,t){sb(lb(e),(function(e){for(var n=0;n<r.length;n++)if(r[n].name===e)return void r[n].callbacks.push(t);r.push({name:e,callbacks:[t]})}))},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(e,t){sb(lb(e),(function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)}))},getNodeFilters:function(){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push({name:t,callbacks:n[t]});return e},filterNode:c,parse:function(a,u){var s,l,f,d,m,g,h,p,v=[];u=u||{},o={},i={};var b,y=fb(cb("script,style,head,html,body,title,meta,param"),t.getBlockElements()),x=t.getNonEmptyElements(),w=t.children,C=e.validate,k="forced_root_block"in u?u.forced_root_block:e.forced_root_block,S=!1===(b=k)?"":!0===b?"p":b,_=t.getWhiteSpaceElements(),O=/^[ \t\r\n]+/,E=/[ \t\r\n]+$/,T=/[ \t\r\n]+/g,z=/^[ \t\r\n]+$/,D=_.hasOwnProperty(u.context)||_.hasOwnProperty(e.root_name),A=function(e,t){var r,i=new Am(e,t);return e in n&&((r=o[e])?r.push(i):o[e]=[i]),i},M=function(e){for(var n,r,o,i=t.getBlockElements(),a=e.prev;a&&3===a.type;){if(0<(r=a.value.replace(E,"")).length)return void(a.value=r);if(n=a.next){if(3===n.type&&n.value.length){a=a.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){a=a.prev;continue}}o=a.prev,a.remove(),a=o}},R=Hm({validate:C,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(t.getSelfClosingElements()),cdata:function(e){p.append(A("#cdata",4)).value=e},text:function(e,t){var n,r,o;D||(e=e.replace(T," "),r=p.lastChild,o=y,r&&(o[r.name]||"br"===r.name)&&(e=e.replace(O,""))),0!==e.length&&((n=A("#text",3)).raw=!!t,p.append(n).value=e)},comment:function(e){p.append(A("#comment",8)).value=e},pi:function(e,t){p.append(A(e,7)).value=t,M(p)},doctype:function(e){p.append(A("#doctype",10)).value=e,M(p)},start:function(e,n,o){var a,u,c,s,l=C?t.getElementRule(e):{};if(l){for((a=A(l.outputName||e,1)).attributes=n,a.shortEnded=o,p.append(a),(s=w[p.name])&&w[a.name]&&!s[a.name]&&v.push(a),u=r.length;u--;)(c=r[u].name)in n.map&&((g=i[c])?g.push(a):i[c]=[a]);y[e]&&M(a),o||(p=a),!D&&_[e]&&(D=!0)}},end:function(n){var r,o,i,a,c,s=C?t.getElementRule(n):{};if(s){if(y[n]&&!D){if((r=p.firstChild)&&3===r.type)if(0<(o=r.value.replace(O,"")).length)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,0!==o.length&&!z.test(o)||(r.remove(),r=i),r=i;if((r=p.lastChild)&&3===r.type)if(0<(o=r.value.replace(E,"")).length)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,0!==o.length&&!z.test(o)||(r.remove(),r=i),r=i}if(D&&_[n]&&(D=!1),s.removeEmpty&&ib(t,x,_,p))return a=p.parent,y[p.name]?p.empty().remove():p.unwrap(),void(p=a);s.paddEmpty&&(ob(c=p,"#text")&&c.firstChild.value===ho||ib(t,x,_,p))&&rb(e,u,y,p),p=p.parent}}},t),N=p=new Am(u.context||e.root_name,11);if(R.parse(a,u.format),C&&v.length&&(u.context?u.invalid=!0:function(e){for(var n,r,o,i,a,u,s,l,f,d,m=cb("tr,td,th,tbody,thead,tfoot,table"),g=t.getNonEmptyElements(),h=t.getWhiteSpaceElements(),p=t.getTextBlockElements(),v=t.getSpecialElements(),b=0;b<e.length;b++)if((n=e[b]).parent&&!n.fixed)if(p[n.name]&&"li"===n.parent.name){for(f=n.next;f&&p[f.name];)f.name="li",f.fixed=!0,n.parent.insert(f,n.parent),f=f.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!t.isValidChild(r.name,n.name)&&!m[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=c(o[0].clone()),l=0;l<o.length-1;l++){for(t.isValidChild(a.name,o[l].name)?(u=c(o[l].clone()),a.append(u)):u=a,s=o[l].firstChild;s&&s!==o[l+1];)d=s.next,u.append(s),s=d;a=u}ib(t,g,h,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(ib(t,g,h,r)||ob(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((f=n.prev)&&("ul"===f.name||"ol"===f.name)){f.append(n);continue}if((f=n.next)&&("ul"===f.name||"ol"===f.name)){f.insert(n,f.firstChild,!0);continue}n.wrap(c(new Am("ul",1)));continue}t.isValidChild(n.parent.name,"div")&&t.isValidChild("div",n.name)?n.wrap(c(new Am("div",1))):v[n.name]?n.empty().remove():n.unwrap()}}}(v)),S&&("body"===N.name||u.isRootContent)&&function(){var n,r,o=N.firstChild,i=function(e){e&&((o=e.firstChild)&&3===o.type&&(o.value=o.value.replace(O,"")),(o=e.lastChild)&&3===o.type&&(o.value=o.value.replace(E,"")))};if(t.isValidChild(N.name,S.toLowerCase())){for(;o;)n=o.next,3===o.type||1===o.type&&"p"!==o.name&&!y[o.name]&&!o.attr("data-mce-type")?(r||((r=A(S,1)).attr(e.forced_root_block_attrs),N.insert(r,o)),r.append(o)):(i(r),r=null),o=n;i(r)}}(),!u.invalid){for(h in o)if(o.hasOwnProperty(h)){for(g=n[h],d=(s=o[h]).length;d--;)s[d].parent||s.splice(d,1);for(l=0,f=g.length;l<f;l++)g[l](s,h,u)}for(l=0,f=r.length;l<f;l++)if((g=r[l]).name in i){for(d=(s=i[g.name]).length;d--;)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;d<m;d++)g.callbacks[d](s,g.name,u)}}return N}};return ub(s,e),a=s,(u=e).inline_styles&&Kv(a,u),s},mb=function(e,t,n){return o=n,(r=e)&&r.hasEventListeners("PreProcess")&&!o.no_events?function(e,t,n){var r,o,i=e.dom;t=t.cloneNode(!0);var a,u,c=document.implementation;return c.createHTMLDocument&&(r=c.createHTMLDocument(""),Dt.each("BODY"===t.nodeName?t.childNodes:[t],(function(e){r.body.appendChild(r.importNode(e,!0))})),t="BODY"!==t.nodeName?r.body.firstChild:r.body,o=i.doc,i.doc=r),a=e,u=De(De({},n),{node:t}),a.fire("PreProcess",u),o&&(i.doc=o),t}(e,t,n):t;var r,o},gb=function(e,t,n){-1===Dt.inArray(t,n)&&(e.addAttributeFilter(n,(function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})),t.push(n))},hb=function(e,t,n,r,o){var i,a,u,c,s,l,f=(i=r,Gm(t,n).serialize(i));return a=e,c=f,(u=o).no_events||!a?c:(s=a,l=De(De({},u),{content:c}),s.fire("PostProcess",l).content)},pb=function(e,t){var n=["data-mce-selected"],r=t&&t.dom?t.dom:_u.DOM,o=t&&t.schema?t.schema:ki(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs;var i,a,u,c=db(e,o);return a=e,u=r,(i=c).addAttributeFilter("data-mce-tabindex",(function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)})),i.addAttributeFilter("src,href,style",(function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,c=a.url_converter,s=a.url_converter_scope;o--;)void 0!==(r=(n=e[o]).attr(i))?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attr(t),"style"===t?r=u.serializeStyle(u.parseStyle(r),n.name):c&&(r=c.call(s,r,t,n.name)),n.attr(t,0<r.length?r:null))})),i.addAttributeFilter("class",(function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))})),i.addAttributeFilter("data-mce-type",(function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attr("data-mce-type")||n.cleanup||(E.from(r.firstChild).exists((function(e){return!vo(e.value)}))?r.unwrap():r.remove())})),i.addNodeFilter("noscript",(function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=mi.decode(t.value))})),i.addNodeFilter("script,style",(function(e,t){for(var n,r,o,i=e.length,u=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===a.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+u(r)+"\n// ]]>")):"xhtml"===a.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+u(r)+"\n--\x3e")})),i.addNodeFilter("#comment",(function(e){for(var t,n=e.length;n--;)t=e[n],a.preserve_cdata&&0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=u.decode(t.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))})),i.addNodeFilter("xml:namespace,input",(function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))})),i.addAttributeFilter("data-mce-type",(function(e){X(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(i.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),i.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",(function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})),{schema:o,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,serialize:function(n,i){void 0===i&&(i={});var a,u,s,l,f,d,m,g,h,p,v,b,y=De({format:"html"},i),x=mb(t,n,y),w=(a=r,u=x,l=bo((s=y).getInner?u.innerHTML:a.getOuterHTML(u)),s.selection||mo(Mt.fromDom(u))?l:Dt.trim(l)),C=(f=c,d=w,v=(m=y).selection?De({forced_root_block:!1},m):m,b=f.parse(d,v),h=function(e){return e&&"br"===e.name},p=b.lastChild,!h(p)||h(g=p.prev)&&(p.remove(),g.remove()),b);return"tree"===y.format?C:hb(t,e,o,C,y)},addRules:function(e){o.addValidElements(e)},setRules:function(e){o.setValidElements(e)},addTempAttr:g(gb,c,n),getTempAttrs:d(n),getNodeFilters:c.getNodeFilters,getAttributeFilters:c.getAttributeFilters}},vb=function(e,t){var n=pb(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},bb=function(e,t){void 0===t&&(t={});var n,r,o=t.format?t.format:"html";return n=t,r=o,Iv(e).editor.getContent(n,r)},yb=function(e,t,n){return void 0===n&&(n={}),r=t,o=n,Iv(e).editor.setContent(r,o);var r,o},xb=_u.DOM,wb=function(e){return E.from(e).each((function(e){return e.destroy()}))},Cb=function(e){var t,n,r,o,i;e.removed||(t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement(),r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&xb.remove(o.nextSibling),e.fire("remove"),e.editorManager.remove(e),!e.inline&&r&&(i=e,xb.setStyle(i.id,"display",i.orgDisplay)),e.fire("detach"),xb.remove(e.getContainer()),wb(t),wb(n),e.destroy())},kb=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),wb(i),wb(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),xb.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Sb=Object.prototype.hasOwnProperty,_b=(Cp=function(e,t){return M(e)&&M(t)?_b(e,t):t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Sb.call(o,i)&&(n[i]=Cp(n[i],o[i]))}return n}),Ob=pt().deviceType,Eb=Ob.isTouch(),Tb=Ob.isPhone(),zb=Ob.isTablet(),Db=["lists","autolink","autosave"],Ab={table_grid:!1,object_resizing:!1,resize:!1},Mb=function(e){var t=R(e)?e.join(" "):e,n=G(A(t)?t.split(" "):[],Ke);return Y(n,(function(e){return 0<e.length}))},Rb=function(e,t){var n,r,o=pe(t,(function(t,n){return W(e,n)}));return n=o.t,r=o.f,{sections:d(n),settings:d(r)}},Nb=function(e,t){return e.sections().hasOwnProperty(t)},Bb=function(e,t){return ye(e,"toolbar_mode").orThunk((function(){return ye(e,"toolbar_drawer").map((function(e){return!1===e?"wrap":e}))})).getOr(t)},Pb=function(e,t,n,r){return e&&(a=i="mobile",u=(o=t).sections(),Nb(o,i)&&u[i].theme===a)?Y(r,g(W,Db)):e&&Nb(t,"mobile")?r:n;var o,i,a,u},Hb=function(e,t,n,r){var o,i,a,u=Mb(n.forced_plugins),c=Mb(r.plugins),s=Nb(o=t,i="mobile")?o.sections()[i]:{},l=s.plugins?Mb(s.plugins):c,f=Pb(e,t,c,l),d=(a=f,[].concat(Mb(u)).concat(Mb(a)));if(_t.browser.isIE()&&W(d,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return Dt.extend(r,{plugins:d.join(" ")})},Ib=function(e,t,n,r,o){var i,a,u,c,s,l,f,d=e?{mobile:(i=o.mobile||{},a=t,u={resize:!1,toolbar_mode:Bb(i,"scrolling"),toolbar_sticky:!1},De(De(De({},Ab),u),a?{menubar:!1}:{}))}:{},m=Rb(["mobile"],_b(d,o)),g=Dt.extend(n,r,m.settings(),(f=m,e&&Nb(f,"mobile")?function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return Dt.extend({},n,o)}(m,"mobile"):{}),{validate:!0,external_plugins:(c=r,s=m.settings(),l=s.external_plugins?s.external_plugins:{},c&&c.external_plugins?Dt.extend({},c.external_plugins,l):l)});return Hb(e,m,r,g)},Lb=function(e,t,n,r,o){var i,a,u,c,s=(i=n,a=Eb,u=e,c={id:t,theme:"silver",toolbar_mode:Bb(o,"floating"),plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:u.convertURL,url_converter_scope:u},De(De({},c),a?Ab:{}));return Ib(Tb||zb,Tb,s,r,o)},Vb=function(e,t,n){return E.from(t.settings[n]).filter(e)},Fb=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?X(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),(function(e){var t=e.split("=");1<t.length?a[Dt.trim(t[0])]=Dt.trim(t[1]):a[Dt.trim(t[0])]=Dt.trim(t[0])})):a=i,a):"string"===r?Vb(A,e,t).getOr(n):"number"===r?Vb(V,e,t).getOr(n):"boolean"===r?Vb(B,e,t).getOr(n):"object"===r?Vb(M,e,t).getOr(n):"array"===r?Vb(R,e,t).getOr(n):"string[]"===r?Vb((o=A,function(e){return R(e)&&ne(e,o)}),e,t).getOr(n):"function"===r?Vb(L,e,t).getOr(n):u},jb=(kp={},{add:function(e,t){kp[e]=t},get:function(e){return kp[e]?kp[e]:{icons:{}}},has:function(e){return xe(kp,e)}}),Ub=function(e,t){return t.dom[e]},$b=function(e,t){return parseInt(or(t,e),10)},Wb=g(Ub,"clientWidth"),qb=g(Ub,"clientHeight"),Gb=g($b,"margin-top"),Xb=g($b,"margin-left"),Kb=function(e,t,n){var r,o,i,a,u,c,s,l,f,d,m,g=Mt.fromDom(e.getBody()),h=e.inline?g:(r=g,Mt.fromDom(Gt(r).dom.documentElement)),p=(o=e.inline,a=t,u=n,c=(i=h).dom.getBoundingClientRect(),{x:a-(o?c.left+i.dom.clientLeft+Xb(i):0),y:u-(o?c.top+i.dom.clientTop+Gb(i):0)});return l=p.x,f=p.y,d=Wb(s=h),m=qb(s),0<=l&&0<=f&&l<=d&&f<=m},Yb=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return t=n,E.from(t).map(Mt.fromDom).map(xn).getOr(!1)},Jb=function(e){var t,n=[],r=function(){var t,n=e.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:t,reposition:t,getArgs:t}},o=function(){return E.from(n[0])},i=function(){0<n.length&&r().reposition(n)},a=function(e){ee(n,(function(t){return t===e})).each((function(e){n.splice(e,1)}))},u=function(t,u){if(void 0===u&&(u=!0),!e.removed&&Yb(e))return u&&e.fire("BeforeOpenNotification",{notification:t}),Z(n,(function(e){return n=r().getArgs(e),o=t,!(n.type!==o.type||n.text!==o.text||n.progressBar||n.timeout||o.progressBar||o.timeout);var n,o})).getOrThunk((function(){e.editorManager.setActive(e);var u,c=r().open(t,(function(){a(c),i(),o().fold((function(){return e.focus()}),(function(e){return Mt.fromDom(e.getEl()).dom.focus()}))}));return u=c,n.push(u),i(),e.fire("OpenNotification",De({},c)),c}))};return(t=e).on("SkinLoaded",(function(){var e=t.getParam("service_message");e&&u({text:e,type:"warning",timeout:0},!1)})),t.on("ResizeEditor ResizeWindow NodeChange",(function(){Kr.requestAnimationFrame(i)})),t.on("remove",(function(){X(n.slice(),(function(e){r().close(e)}))})),{open:u,close:function(){o().each((function(e){r().close(e),a(e),i()}))},getNotifications:function(){return n}}},Qb=Pu.PluginManager,Zb=Pu.ThemeManager,ey=function(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:t=function(){throw new Error("Theme did not provide a WindowManager implementation.")},openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}},r=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t?t.apply(e,n):void 0}},o=function(n){var r;t.push(n),r=n,e.fire("OpenWindow",{dialog:r})},i=function(n){var r;r=n,e.fire("CloseWindow",{dialog:r}),0===(t=Y(t,(function(e){return e!==n}))).length&&e.focus()},a=function(t){e.editorManager.setActive(e),am(e);var n=t();return o(n),n};return e.on("remove",(function(){X(t,(function(e){n().close(e)}))})),{open:function(e,t){return a((function(){return n().open(e,t,i)}))},openUrl:function(e){return a((function(){return n().openUrl(e,i)}))},alert:function(e,t,o){var i=n();i.alert(e,r(o||i,t))},confirm:function(e,t,o){var i=n();i.confirm(e,r(o||i,t))},close:function(){E.from(t[t.length-1]).each((function(e){n().close(e),i(e)}))}}},ty=function(e,t){e.notificationManager.open({type:"error",text:t})},ny=function(e,t){e._skinLoaded?ty(e,t):e.on("SkinLoaded",(function(){ty(e,t)}))},ry=function(e,t,n){nd(e,t,{message:n}),console.error(n)},oy=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},iy=function(e,t,n){ry(e,"PluginLoadError",oy("plugin",t,n))},ay=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,Ae([e],t)):r.log.apply(r,Ae([e],t)))},uy=function(e){return cy(e,(n=(t=e).getParam("content_css"),A(n)?G(n.split(","),Ke):R(n)?n:!1===n||t.inline?[]:["default"]));var t,n},cy=function(e,t){var n=e.editorManager.baseURL+"/skins/content",r="content"+e.editorManager.suffix+".css",o=!0===e.inline;return G(t,(function(t){return/^[a-z0-9\-]+$/i.test(t)&&!o?n+"/"+t+"/"+r:e.documentBaseURI.toAbsolute(t)}))},sy=function(e){var t;e.contentCSS=e.contentCSS.concat(uy(e),cy(t=e,xs(t)))},ly=function(){var e={},t=function(e,t){return{status:e,resultUri:t}},n=function(t){return t in e};return{hasBlobUri:n,getResultUri:function(t){var n=e[t];return n?n.resultUri:null},isPending:function(t){return!!n(t)&&1===e[t].status},isUploaded:function(t){return!!n(t)&&2===e[t].status},markPending:function(n){e[n]=t(1,null)},markUploaded:function(n,r){e[n]=t(2,r)},removeFailed:function(t){delete e[t]},destroy:function(){e={}}}},fy=0,dy=function(e){return e+fy+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t},my=function(e,t){var n={},r=function(e,n,r,o){var i=new XMLHttpRequest;i.open("POST",t.url),i.withCredentials=t.credentials,i.upload.onprogress=function(e){o(e.loaded/e.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,o,a;i.status<200||300<=i.status?r("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?n((o=t.basePath,a=e.location,o?o.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+i.responseText)};var a=new FormData;a.append("file",e.blob(),e.filename()),i.send(a)},o=function(e,t){return{url:t,blobInfo:e,status:!0}},i=function(e,t,n){return{url:"",blobInfo:e,status:!1,error:{message:t,options:n}}},a=function(e,t){Dt.each(n[e],(function(e){e(t)})),delete n[e]},u=function(r,u){return r=Dt.grep(r,(function(t){return!e.isUploaded(t.blobUri())})),Lr.all(Dt.map(r,(function(r){return e.isPending(r.blobUri())?(f=r.blobUri(),new Lr((function(e){n[f]=n[f]||[],n[f].push(e)}))):(c=r,s=t.handler,l=u,e.markPending(c.blobUri()),new Lr((function(t){var n;try{var u=function(){n&&n.close()};s(c,(function(n){u(),e.markUploaded(c.blobUri(),n),a(c.blobUri(),o(c,n)),t(o(c,n))}),(function(n,r){var o=r||{};u(),e.removeFailed(c.blobUri()),a(c.blobUri(),i(c,n,o)),t(i(c,n,o))}),(function(e){e<0||100<e||E.from(n).orThunk((function(){return E.from(l).map(x)})).each((function(t){(n=t).progressBar.value(e)}))}))}catch(r){t(i(c,r.message,{}))}})));var c,s,l,f})))};return!1===L(t.handler)&&(t.handler=r),{upload:function(e,n){return t.url||t.handler!==r?u(e,n):new Lr((function(e){e([])}))}}},gy=function(e){return function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},hy=function(e,t){return my(t,{url:e.getParam("images_upload_url","","string"),basePath:e.getParam("images_upload_base_path","","string"),credentials:e.getParam("images_upload_credentials",!1,"boolean"),handler:e.getParam("images_upload_handler",null,"function")})},py=function(e){var t,n,r,o,i,a,u=(t=[],n=function(e){if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var t=e.id||dy("blobid"),n=e.name||t,r=e.blob;return{id:d(t),name:d(n),filename:d(e.filename||n+"."+({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[r.type.toLowerCase()]||"dat")),blob:d(r),base64:d(e.base64),blobUri:d(e.blobUri||URL.createObjectURL(r)),uri:d(e.uri)}},{create:function(e,t,r,o,i){if(A(e))return n({id:e,name:o,filename:i,blob:t,base64:r});if(M(e))return n(e);throw new Error("Unknown input type")},add:function(e){o(e.id())||t.push(e)},get:o=function(e){return r((function(t){return t.id()===e}))},getByUri:function(e){return r((function(t){return t.blobUri()===e}))},getByData:function(e,t){return r((function(n){return n.base64()===e&&n.blob().type===t}))},findFirst:r=function(e){return Z(t,e).getOrUndefined()},removeByUri:function(e){t=Y(t,(function(t){return t.blobUri()!==e||void URL.revokeObjectURL(t.blobUri())}))},destroy:function(){X(t,(function(e){URL.revokeObjectURL(e.blobUri())})),t=[]}}),c=ly(),s=[],l=function(e){var t=Au(null);return e.on("change AddUndo",(function(e){t.set(De({},e.level))})),{fireIfChanged:function(){var n=e.undoManager.data;ue(n).filter((function(e){return!Av(t.get(),e)})).each((function(t){e.setDirty(!0),e.fire("change",{level:t,lastLevel:ie(n,n.length-2).getOrNull()})}))}}}(e),f=function(t){return function(n){return e.selection?t(n):[]}},m=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},g=function(e,t,n){var r='src="'+n+'"'+(n===_t.transparentSrc?' data-mce-placeholder="1"':"");return e=m(e,'src="'+t+'"',r),m(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},h=function(t,n){X(e.undoManager.data,(function(e){"fragmented"===e.type?e.fragments=G(e.fragments,(function(e){return g(e,t,n)})):e.content=g(e.content,t,n)}))},p=function(t,n){var r,o=e.convertURL(n,"src");h(t.src,n),e.$(t).attr({src:e.getParam("images_reuse_filename",!1,"boolean")?(r=n)+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime():n,"data-mce-src":o})},v=function(t){return i=i||hy(e,c),x().then(f((function(n){var r=G(n,(function(e){return e.blobInfo}));return i.upload(r,gy(e)).then(f((function(r){var o=[],i=G(r,(function(t,r){var i,a,c=n[r].blobInfo,s=n[r].image;return t.status&&e.getParam("images_replace_blob_uris",!0,"boolean")?(u.removeByUri(s.src),p(s,t.url)):t.error&&(t.error.options.remove&&(h(s.getAttribute("src"),_t.transparentSrc),o.push(s)),i=e,a=t.error.message,ny(i,Bu.translate(["Failed to upload image: {0}",a]))),{element:s,status:t.status,uploadUri:t.url,blobInfo:c}}));return 0<i.length&&l.fireIfChanged(),0<o.length&&(Pv(e)?console.error("Removing images on failed uploads is currently unsupported for RTC"):e.undoManager.transact((function(){X(o,(function(t){e.dom.remove(t),u.removeByUri(t.src)}))}))),t&&t(i),i})))})))},b=function(t){if(hs(e))return v(t)},y=function(t){return!1!==ne(s,(function(e){return e(t)}))&&(0!==t.getAttribute("src").indexOf("data:")||e.getParam("images_dataimg_filter",k,"function")(t))},x=function(){return(a=a||nb(c,u)).findAll(e.getBody(),y).then(f((function(t){return t=Y(t,(function(t){return"string"!=typeof t||void ny(e,t)})),X(t,(function(e){h(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),t})))},w=function(t){return t.replace(/src="(blob:[^"]+)"/g,(function(t,n){var r=c.getResultUri(n);if(r)return'src="'+r+'"';var o=u.getByUri(n);return(o=o||Q(e.editorManager.get(),(function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)}),null))?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':t}))};return e.on("SetContent",(function(){(hs(e)?b:x)()})),e.on("RawSaveContent",(function(e){e.content=w(e.content)})),e.on("GetContent",(function(e){e.source_view||"raw"===e.format||"tree"===e.format||(e.content=w(e.content))})),e.on("PostRender",(function(){e.parser.addNodeFilter("img",(function(e){X(e,(function(e){var t,n=e.attr("src");u.getByUri(n)||(t=c.getResultUri(n))&&e.attr("src",t)}))}))})),{blobCache:u,addFilter:function(e){s.push(e)},uploadImages:v,uploadImagesAuto:b,scanForImages:x,destroy:function(){u.destroy(),c.destroy(),a=i=null}}},vy=function(e){var t,n,r={},o=function e(t,n){t&&("string"!=typeof t?Dt.each(t,(function(t,n){e(n,t)})):(R(n)||(n=[n]),Dt.each(n,(function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))})),r[t]=n))};return o((t=e.dom,n={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(e,t,n){return Mn(e)&&e.hasAttribute("href")},onformat:function(e,n,r){Dt.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]},Dt.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),(function(e){n[e]={block:e,remove:"all"}})),n)),o(e.getParam("formats")),{get:function(e){return e?r[e]:r},has:function(e){return xe(r,e)},register:o,unregister:function(e){return e&&r[e]&&delete r[e],r}}},by=Dt.each,yy=_u.DOM,xy=function(e,t){var n,r,o,i=t&&t.schema||ki({}),a=function(e){r="string"==typeof e?{name:e,classes:[],attrs:{}}:e;var t,n,o=yy.create(r.name);return t=o,(n=r).classes.length&&yy.addClass(t,n.classes.join(" ")),yy.setAttribs(t,n.attrs),o},u=function e(t,n,r){var o,u,c,s,l,f,d,m=0<n.length&&n[0],g=m&&m.name,h=(s=g,l="string"!=typeof(c=t)?c.nodeName.toLowerCase():c,f=i.getElementRule(l),!(!(d=f&&f.parentsRequired)||!d.length)&&(s&&-1!==Dt.inArray(d,s)?s:d[0]));if(h)g===h?(u=n[0],n=n.slice(1)):u=h;else if(m)u=n[0],n=n.slice(1);else if(!r)return t;return u&&(o=a(u)).appendChild(t),r&&(o||(o=yy.create("div")).appendChild(t),Dt.each(r,(function(e){var n=a(e);o.insertBefore(n,t)}))),e(o,n,u&&u.siblings)};return e&&e.length?(r=e[0],n=a(r),(o=yy.create("div")).appendChild(u(n,e.slice(1),r.siblings)),o):""},wy=function(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=Dt.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==Dt.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}var a;return"["!==o||(a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/))&&(n.attrs[a[1]]=a[2]),""}))),n.name=t||"div",n},Cy=function(e,t){var n,r,o,i="",a=(o=e.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),A(o)?o:"");if(""===a)return"";var u=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}if("preview"in t){var c=ye(t,"preview");if(c.is(!1))return"";a=c.getOr(a)}n=t.block||t.inline||"span";var s,l=(s=t.selector)&&"string"==typeof s?(s=(s=s.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Dt.map(s.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(e){var t=Dt.map(e.split(/(?:~\+|~|\+)/),wy),n=t.pop();return t.length&&(n.siblings=t),n})).reverse()):[],f=l.length?(l[0].name||(l[0].name=n),n=t.selector,xy(l,e)):xy([n],e),d=yy.select(n,f)[0]||f.firstChild;return by(t.styles,(function(e,t){var n=u(e);n&&yy.setStyle(d,t,n)})),by(t.attributes,(function(e,t){var n=u(e);n&&yy.setAttrib(d,t,n)})),by(t.classes,(function(e){var t=u(e);yy.hasClass(d,t)||yy.addClass(d,t)})),e.fire("PreviewFormats"),yy.setStyles(f,{position:"absolute",left:-65535}),e.getBody().appendChild(f),r=yy.getStyle(e.getBody(),"fontSize",!0),r=/px$/.test(r)?parseInt(r,10):0,by(a.split(" "),(function(t){var n=yy.getStyle(d,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=yy.getStyle(e.getBody(),t,!0),"#ffffff"===yy.toHex(n).toLowerCase())||"color"===t&&"#000000"===yy.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===r)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*r+"px"}"border"===t&&n&&(i+="padding:0 2px;"),i+=t+":"+n+";"}})),e.fire("AfterPreviewFormats"),yy.remove(f),i},ky=function(e){var t=vy(e),n=Au(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(e),vp(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:function(t,n,r){var o,i,a;o=t,i=n,a=r,Lv(e).formatter.apply(o,i,a)},remove:function(t,n,r,o){var i,a,u,c;i=t,a=n,u=r,c=o,Lv(e).formatter.remove(i,a,u,c)},toggle:function(t,n,r){var o,i,a;o=t,i=n,a=r,Lv(e).formatter.toggle(o,i,a)},match:function(t,n,r){return o=t,i=n,a=r,Lv(e).formatter.match(o,i,a);var o,i,a},closest:function(t){return n=t,Lv(e).formatter.closest(n);var n},matchAll:function(t,n){return r=t,o=n,Lv(e).formatter.matchAll(r,o);var r,o},matchNode:function(t,n,r,o){return i=t,a=n,u=r,c=o,Lv(e).formatter.matchNode(i,a,u,c);var i,a,u,c},canApply:function(t){return n=t,Lv(e).formatter.canApply(n);var n},formatChanged:function(t,r,o){return i=n,a=t,u=r,void 0===(c=o)&&(c=!1),Lv(e).formatter.formatChanged(i,a,u,c);var i,a,u,c},getCssText:g(Cy,e)}},Sy=function(e,t,n){var r=Au(!1),o=function(e){Rv(t,!1,n),t.add({},e)};e.on("init",(function(){t.add()})),e.on("BeforeExecCommand",(function(e){var r=e.command.toLowerCase();"undo"!==r&&"redo"!==r&&"mcerepaint"!==r&&(Nv(t,n),t.beforeChange())})),e.on("ExecCommand",(function(e){var t=e.command.toLowerCase();"undo"!==t&&"redo"!==t&&"mcerepaint"!==t&&o(e)})),e.on("ObjectResizeStart cut",(function(){t.beforeChange()})),e.on("SaveContent ObjectResized blur",o),e.on("dragend",o),e.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((33<=i&&i<=36||37<=i&&i<=40||45===i||n.ctrlKey)&&(o(),e.nodeChanged()),46!==i&&8!==i||e.nodeChanged(),r.get()&&t.typing&&!1===Av(Ev(e),t.data[0])&&(!1===e.isDirty()&&(e.setDirty(!0),e.fire("change",{level:t.data[0],lastLevel:null})),e.fire("TypingUndo"),r.set(!1),e.nodeChanged()))})),e.on("keydown",(function(e){var i,a=e.keyCode;e.isDefaultPrevented()||(33<=a&&a<=36||37<=a&&a<=40||45===a?t.typing&&o(e):(i=e.ctrlKey&&!e.altKey||e.metaKey,!(a<16||20<a)||224===a||91===a||t.typing||i||(t.beforeChange(),Rv(t,!0,n),t.add({},e),r.set(!0))))})),e.on("mousedown",(function(e){t.typing&&o(e)})),e.on("input",(function(e){var t,n;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(n=e).inputType&&null===n.data||"insertFromPaste"===(t=e).inputType||"insertFromDrop"===t.inputType)&&o(e)})),e.on("AddUndo Undo Redo ClearUndos",(function(t){t.isDefaultPrevented()||e.nodeChanged()}))},_y=function(e){var t,n=Au(E.none()),r=Au(0),o=Au(0),i={data:[],typing:!1,beforeChange:function(){var t,o;t=r,o=n,Lv(e).undoManager.beforeChange(t,o)},add:function(t,a){return u=i,c=o,s=r,l=n,f=t,d=a,Lv(e).undoManager.addUndoLevel(u,c,s,l,f,d);var u,c,s,l,f,d},undo:function(){return t=i,n=r,a=o,Lv(e).undoManager.undo(t,n,a);var t,n,a},redo:function(){return t=e,n=o,r=i.data,Lv(t).undoManager.redo(n,r);var t,n,r},clear:function(){var t,n;t=i,n=o,Lv(e).undoManager.clear(t,n)},reset:function(){var t;t=i,Lv(e).undoManager.reset(t)},hasUndo:function(){return t=i,n=o,Lv(e).undoManager.hasUndo(t,n);var t,n},hasRedo:function(){return t=i,n=o,Lv(e).undoManager.hasRedo(t,n);var t,n},transact:function(t){return n=i,o=r,a=t,Lv(e).undoManager.transact(n,o,a);var n,o,a},ignore:function(t){var n,o;n=r,o=t,Lv(e).undoManager.ignore(n,o)},extra:function(t,n){var r,a,u,c;r=i,a=o,u=t,c=n,Lv(e).undoManager.extra(r,a,u,c)}};return Pv(e)||Sy(e,i,r),(t=e).addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo"),i},Oy=[9,27,rd.HOME,rd.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,rd.DOWN,rd.UP,rd.LEFT,rd.RIGHT].concat(_t.browser.isFirefox()?[224]:[]),Ey="data-mce-placeholder",Ty=function(e){return"keydown"===e.type||"keyup"===e.type},zy=function(e){var t=e.keyCode;return t===rd.BACKSPACE||t===rd.DELETE},Dy=function(e){var t,n=e.dom,r=ms(e),o=(t=e).getParam("placeholder",ls.getAttrib(t.getElement(),"placeholder"),"string"),i=function t(i,a){var u,c,s,l;!function(e){if(Ty(e)){var t=e.keyCode;return!zy(e)&&(rd.metaKeyPressed(e)||e.altKey||112<=t&&t<=123||W(Oy,t))}return!1}(i)&&(u=e.getBody(),c=!(Ty(s=i)&&!(zy(s)||"keyup"===s.type&&229===s.keyCode))&&function(e,t,n){if(Ko(Mt.fromDom(t),!1)){var r=""===n,o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&(r?!e.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(n,u,r),""!==n.getAttrib(u,Ey)===c&&!a||(n.setAttrib(u,Ey,c?o:null),n.setAttrib(u,"aria-placeholder",c?o:null),l=c,e.fire("PlaceholderToggle",{state:l}),e.on(c?"keydown":"keyup",t),e.off(c?"keyup":"keydown",t)))};o&&e.on("init",(function(t){i(t,!0),e.on("change SetContent ExecCommand",i),e.on("paste",(function(t){return Kr.setEditorTimeout(e,(function(){return i(t)}))}))}))},Ay=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,My=function(e,t){return Nt(Mt.fromDom(t),e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string"))},Ry=function(e){return"rtl"===_u.DOM.getStyle(e,"direction",!0)||(t=e.textContent,Ay.test(t));var t},Ny=function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,Y(_u.DOM.getParents(i.container(),"*",o),r));return E.from(a[a.length-1])},By=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Co(n)?Vn(n.nextSibling)?Lc(n.nextSibling,0):Lc.after(n):_o(t)?Lc(n,r+1):t:Co(n)?Vn(n.previousSibling)?Lc(n.previousSibling,n.previousSibling.data.length):Lc.before(n):Oo(t)?Lc(n,r-1):t},Py=g(By,!0),Hy=g(By,!1),Iy=function(e,t){return It(e,t)?Nr(t,(function(e){return uo(e)||so(e)}),(n=e,function(e){return Pt(n,Mt.fromDom(e.dom.parentNode))})):E.none();var n},Ly=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},Vy=function(e,t){return{from:e,to:t}},Fy=function(e,t){var n=Mt.fromDom(e),r=Mt.fromDom(t.container());return Iy(n,r).map((function(e){return{block:e,position:t}}))},jy=function(e,t,n){var r=Fy(e,Lc.fromRangeStart(n)),o=r.bind((function(n){return Ml(t,e,n.position).bind((function(n){return Fy(e,n).map((function(n){return r=e,o=t,$n((i=n).position.getNode())&&!1===Ko(i.block)?Bl(!1,i.block.dom).bind((function(e){return e.isEqual(i.position)?Ml(o,r,e).bind((function(e){return Fy(r,e)})):E.some(i)})).getOr(i):i;var r,o,i}))}))}));return sc(r,o,Vy).filter((function(e){return!1===Pt((r=e).from.block,r.to.block)&&Kt((n=e).from.block).bind((function(e){return Kt(n.to.block).filter((function(t){return Pt(e,t)}))})).isSome()&&!1===Gn((t=e).from.block.dom)&&!1===Gn(t.to.block.dom);var t,n,r}))},Uy=function(e){var t,n=(t=en(e),ee(t,oo).fold((function(){return t}),(function(e){return t.slice(0,e)})));return X(n,bn),n},$y=function(e,t){var n=gg(t,e);return Z(n.reverse(),(function(e){return Ko(e)})).each(bn)},Wy=function(e,t,n,r){if(Ko(n))return lg(n),Il(n.dom);0===Y(Qt(r),(function(e){return!Ko(e)})).length&&Ko(t)&&dn(r,Mt.fromTag("br"));var o=Hl(n.dom,Lc.before(r.dom));return X(Uy(t),(function(e){dn(r,e)})),$y(e,t),o},qy=function(e,t,n){if(Ko(n))return bn(n),Ko(t)&&lg(t),Il(t.dom);var r=Ll(n.dom);return X(Uy(t),(function(e){hn(n,e)})),$y(e,t),r},Gy=function(e,t){return It(t,e)?(n=gg(e,t),E.from(n[n.length-1])):E.none();var n},Xy=function(e,t){Bl(e,t.dom).map((function(e){return e.getNode()})).map(Mt.fromDom).filter(ao).each(bn)},Ky=function(e,t,n){return Xy(!0,t),Xy(!1,n),Gy(t,n).fold(g(qy,e,t,n),g(Wy,e,t,n))},Yy=function(e,t,n,r){return t?Ky(e,r,n):Ky(e,n,r)},Jy=function(e,t){var n,r,o,i=Mt.fromDom(e.getBody()),a=(n=i.dom,r=t,((o=e.selection.getRng()).collapsed?jy(n,r,o):E.none()).bind((function(e){return Yy(i,t,e.from.block,e.to.block)})));return a.each((function(t){e.selection.setRng(t.toRange())})),a.isSome()},Qy=function(e,t){var n=Mt.fromDom(t),r=g(Pt,e);return Rr(n,fo,r).isSome()},Zy=function(e,t){var n,r,o=Hl(e.dom,Lc.fromRangeStart(t)).isNone(),i=Pl(e.dom,Lc.fromRangeEnd(t)).isNone();return!(Qy(n=e,(r=t).startContainer)||Qy(n,r.endContainer))&&o&&i},ex=function(e){var t,n,r,o,i=Mt.fromDom(e.getBody()),a=e.selection.getRng();return Zy(i,a)?((o=e).setContent(""),o.selection.setCursorLocation(),!0):(t=i,n=e.selection,r=n.getRng(),sc(Iy(t,Mt.fromDom(r.startContainer)),Iy(t,Mt.fromDom(r.endContainer)),(function(e,o){return!1===Pt(e,o)&&(r.deleteContents(),Yy(t,!0,e,o).each((function(e){n.setRng(e.toRange())})),!0)})).getOr(!1))},tx=function(e,t){return!e.selection.isCollapsed()&&ex(e)},nx=qn,rx=Gn,ox=function(e,t,n,r,o){return E.from(t._selectionOverrides.showCaret(e,n,r,o))},ix=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?E.none():E.some(((r=(n=t).ownerDocument.createRange()).selectNode(n),r))},ax=function(e,t,n){var r=ul(1,e.getBody(),t),o=Lc.fromRangeStart(r),i=o.getNode();if(Us(i))return ox(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Us(a))return ox(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),(function(e){return rx(e)||nx(e)}));return Us(u)?ox(1,e,u,!1,n):E.none()},ux=function(e,t,n){return t.collapsed?ax(e,t,n).getOr(t):t},cx=function(e){return ug(e)||rg(e)},sx=function(e){return cg(e)||og(e)},lx=function(e,t,n,r,o,i){var a,u;return ox(r,e,i.getNode(!o),o,!0).each((function(n){var r;t.collapsed?(r=t.cloneRange(),o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()):t.deleteContents(),e.selection.setRng(n)})),a=e.dom,Vn(u=n)&&0===u.data.length&&a.remove(u),!0},fx=function(e,t){var n=e.selection.getRng();if(!Vn(n.commonAncestorContainer))return!1;var r=t?Vc.Forwards:Vc.Backwards,o=El(e.getBody()),i=g(fl,t?o.next:o.prev),a=t?cx:sx,u=sl(r,e.getBody(),n),c=By(t,i(u));if(!c||!dl(u,c))return!1;if(a(c))return lx(e,n,u.getNode(),r,t,c);var s=i(c);return!!(s&&a(s)&&dl(c,s))&&lx(e,n,u.getNode(),r,t,s)},dx=Sr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),mx=function(e,t,n,r){var o=r.getNode(!1===t);return Iy(Mt.fromDom(e),Mt.fromDom(n.getNode())).map((function(e){return Ko(e)?dx.remove(e.dom):dx.moveToElement(o)})).orThunk((function(){return E.some(dx.moveToElement(o))}))},gx=function(e,t,n){return Ml(t,e,n).bind((function(r){return s=r.getNode(),fo(Mt.fromDom(s))||so(Mt.fromDom(s))?E.none():(o=e,u=r,c=function(e){return io(Mt.fromDom(e))&&!tl(a,u,o)},cl(!(i=t),a=n).fold((function(){return cl(i,u).fold(C,c)}),c)?E.none():t&&Gn(r.getNode())||!1===t&&Gn(r.getNode(!0))?mx(e,t,n,r):t&&cg(n)||!1===t&&ug(n)?E.some(dx.moveToPosition(r)):E.none());var o,i,a,u,c,s}))},hx=function(e,t,n){return i=t,a=n.getNode(!1===i),u=i?"after":"before",Mn(a)&&a.getAttribute("data-mce-caret")===u?(r=t,o=n.getNode(!1===t),(r&&Gn(o.nextSibling)?E.some(dx.moveToElement(o.nextSibling)):!1===r&&Gn(o.previousSibling)?E.some(dx.moveToElement(o.previousSibling)):E.none()).fold((function(){return gx(e,t,n)}),E.some)):gx(e,t,n).bind((function(t){return r=e,o=n,t.fold((function(e){return E.some(dx.remove(e))}),(function(e){return E.some(dx.moveToElement(e))}),(function(e){return tl(o,e,r)?E.none():E.some(dx.moveToPosition(e))}));var r,o}));var r,o,i,a,u},px=function(e,t){return E.from(ed(e.getBody(),t))},vx=function(e,t){var n=e.selection.getNode();return px(e,n).filter(Gn).fold((function(){return n=e.getBody(),r=t,o=e.selection.getRng(),i=ul(r?1:-1,n,o),a=Lc.fromRangeStart(i),u=Mt.fromDom(n),(!1===r&&cg(a)?E.some(dx.remove(a.getNode(!0))):r&&ug(a)?E.some(dx.remove(a.getNode())):!1===r&&ug(a)&&Og(u,a)?Eg(u,a).map((function(e){return dx.remove(e.getNode())})):r&&cg(a)&&_g(u,a)?Tg(u,a).map((function(e){return dx.remove(e.getNode())})):hx(n,r,a)).exists((function(n){return n.fold((function(e){return a._selectionOverrides.hideFakeCaret(),rh(a,u,Mt.fromDom(e)),!0}),(i=u=t,function(e){var t=i?Lc.before(e):Lc.after(e);return o.selection.setRng(t.toRange()),!0}),(r=o=a=e,function(e){return r.selection.setRng(e.toRange()),!0}));var r,o,i,a,u}));var n,r,o,i,a,u}),k)},bx=function(e,t){var n=e.selection.getNode();return!!Gn(n)&&px(e,n.parentNode).filter(Gn).fold((function(){var n;return n=Mt.fromDom(e.getBody()),X(Gu(n,".mce-offscreen-selection"),bn),rh(e,t,Mt.fromDom(e.selection.getNode())),Ly(e),!0}),k)},yx=function(e){var t,n=e.dom,r=e.selection,o=ed(e.getBody(),r.getNode());return qn(o)&&n.isBlock(o)&&n.isEmpty(o)&&(t=n.create("br",{"data-mce-bogus":"1"}),n.setHTML(o,""),o.appendChild(t),r.setRng(Lc.before(t).toRange())),!0},xx=function(e,t){return(e.selection.isCollapsed()?vx:bx)(e,t)},wx=function(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,o=Lc.fromRangeStart(n.selection.getRng()),Ml(r,n.getBody(),o).filter((function(e){return(r?tg:ng)(e)})).bind((function(e){return E.from(nl(r?0:-1,e))})).exists((function(e){return n.selection.select(e),!0})));var n,r,o},Cx=Vn,kx=function(e){return Cx(e)&&e.data[0]===po},Sx=function(e){return Cx(e)&&e.data[e.data.length-1]===po},_x=function(e){return e.ownerDocument.createTextNode(po)},Ox=function(e,t){return(e?function(e){if(Cx(e.previousSibling))return Sx(e.previousSibling)||e.previousSibling.appendData(po),e.previousSibling;if(Cx(e))return kx(e)||e.insertData(0,po),e;var t=_x(e);return e.parentNode.insertBefore(t,e),t}:function(e){if(Cx(e.nextSibling))return kx(e.nextSibling)||e.nextSibling.insertData(0,po),e.nextSibling;if(Cx(e))return Sx(e)||e.appendData(po),e;var t=_x(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t})(t)},Ex=g(Ox,!0),Tx=g(Ox,!1),zx=function(e,t){return Vn(e.container())?Ox(t,e.container()):Ox(t,e.getNode())},Dx=function(e,t){var n=t.get();return n&&e.container()===n&&Co(n)},Ax=function(e,t){return t.fold((function(t){Bs(e.get());var n=Ex(t);return e.set(n),E.some(Lc(n,n.length-1))}),(function(t){return Il(t).map((function(t){if(Dx(t,e))return Lc(e.get(),1);Bs(e.get());var n=zx(t,!0);return e.set(n),Lc(n,1)}))}),(function(t){return Ll(t).map((function(t){if(Dx(t,e))return Lc(e.get(),e.get().length-1);Bs(e.get());var n=zx(t,!1);return e.set(n),Lc(n,n.length-1)}))}),(function(t){Bs(e.get());var n=Tx(t);return e.set(n),E.some(Lc(n,1))}))},Mx=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return E.none()},Rx=Sr([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Nx=function(e,t){var n=el(t,e);return n||e},Bx=function(e,t,n){var r=Py(n),o=Nx(t,r.container());return Ny(e,o,r).fold((function(){return Pl(o,r).bind(g(Ny,e,o)).map((function(e){return Rx.before(e)}))}),E.none)},Px=function(e,t){return null===jl(e,t)},Hx=function(e,t,n){return Ny(e,t,n).filter(g(Px,t))},Ix=function(e,t,n){var r=Hy(n);return Hx(e,t,r).bind((function(e){return Hl(e,r).isNone()?E.some(Rx.start(e)):E.none()}))},Lx=function(e,t,n){var r=Py(n);return Hx(e,t,r).bind((function(e){return Pl(e,r).isNone()?E.some(Rx.end(e)):E.none()}))},Vx=function(e,t,n){var r=Hy(n),o=Nx(t,r.container());return Ny(e,o,r).fold((function(){return Hl(o,r).bind(g(Ny,e,o)).map((function(e){return Rx.after(e)}))}),E.none)},Fx=function(e){return!1===Ry(Ux(e))},jx=function(e,t,n){return Mx([Bx,Ix,Lx,Vx],[e,t,n]).filter(Fx)},Ux=function(e){return e.fold(m,m,m,m)},$x=function(e){return e.fold(d("before"),d("start"),d("end"),d("after"))},Wx=function(e){return e.fold(Rx.before,Rx.before,Rx.after,Rx.after)},qx=function(e){return e.fold(Rx.start,Rx.start,Rx.end,Rx.end)},Gx=function(e,t,n,r,o,i){return sc(Ny(t,n,r),Ny(t,n,o),(function(t,r){return t!==r&&(a=r,u=el(t,o=n),c=el(a,o),u&&u===c)?Rx.after(e?t:r):i;var o,a,u,c})).getOr(i)},Xx=function(e,t){return e.fold(k,(function(e){return r=t,!($x(n=e)===$x(r)&&Ux(n)===Ux(r));var n,r}))},Kx=function(e,t){return e?t.fold(f(E.some,Rx.start),E.none,f(E.some,Rx.after),E.none):t.fold(E.none,f(E.some,Rx.before),E.none,f(E.some,Rx.end))},Yx=function(e,t,n,r){var o=By(e,r),i=jx(t,n,o);return jx(t,n,o).bind(g(Kx,e)).orThunk((function(){return a=t,u=n,c=i,s=By(o=e,r),Ml(o,u,s).map(g(By,o)).fold((function(){return c.map(Wx)}),(function(e){return jx(a,u,e).map(g(Gx,o,a,u,s,e)).filter(g(Xx,c))})).filter(Fx);var o,a,u,c,s}))},Jx=(g(Yx,!1),g(Yx,!0),function(e,t,n){var r=e?1:-1;return t.setRng(Lc(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0}),Qx=function(e,t){var n=t.selection.getRng(),r=e?Lc.fromRangeEnd(n):Lc.fromRangeStart(n);return!!L(t.selection.getSel().modify)&&(e&&_o(r)?Jx(!0,t.selection,r):!(e||!Oo(r))&&Jx(!1,t.selection,r))},Zx=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},ew=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},tw=function(e,t,n){return Ax(t,n).map((function(t){return Zx(e,t),n}))},nw=function(e,t){var n,r;e.selection.isCollapsed()&&!0!==e.composing&&t.get()&&(n=Lc.fromRangeStart(e.selection.getRng()),Lc.isTextPosition(n)&&!1===(_o(r=n)||Oo(r))&&(Zx(e,Ns(t.get(),n)),t.set(null)))},rw=function(e,t,n){return!!Ss(e)&&(o=t,i=n,a=(r=e).getBody(),u=Lc.fromRangeStart(r.selection.getRng()),c=g(My,r),Yx(i,c,a,u).bind((function(e){return tw(r,o,e)})).isSome());var r,o,i,a,u,c},ow=function(e,t,n){return!!Ss(t)&&Qx(e,t)},iw=function(e){var t=Au(null),n=g(My,e);return e.on("NodeChange",(function(r){var o,i,a,u,c,s,l,f,d,m,h;!Ss(e)||_t.browser.isIE()&&r.initial||(s=n,l=e.dom,f=r.parents,d=G(Gu(Mt.fromDom(l.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(e){return e.dom})),m=Y(d,s),h=Y(f,s),X(oe(m,h),g(ew,!1)),X(oe(h,m),g(ew,!0)),nw(e,t),o=n,i=e,a=t,u=r.parents,i.selection.isCollapsed()&&(c=Y(u,o),X(c,(function(e){var t=Lc.fromRangeStart(i.selection.getRng());jx(o,i.getBody(),t).bind((function(e){return tw(i,a,e)}))}))))})),t},aw=g(ow,!0),uw=g(ow,!1),cw=function(e,t){return function(n){return Ax(t,n).exists((function(t){return Zx(e,t),!0}))}},sw=function(e,t,n,r){var o=e.getBody(),i=g(My,e);e.undoManager.ignore((function(){var a,u,c;e.selection.setRng((a=n,u=r,(c=document.createRange()).setStart(a.container(),a.offset()),c.setEnd(u.container(),u.offset()),c)),e.execCommand("Delete"),jx(i,o,Lc.fromRangeStart(e.selection.getRng())).map(qx).map(cw(e,t))})),e.nodeChanged()},lw=function(e,t,n,r){var o,i,a=(o=e.getBody(),i=r.container(),el(i,o)||o),u=g(My,e),c=jx(u,a,r);return c.bind((function(e){return n?e.fold(d(E.some(qx(e))),E.none,d(E.some(Wx(e))),E.none):e.fold(E.none,d(E.some(Wx(e))),E.none,d(E.some(qx(e))))})).map(cw(e,t)).getOrThunk((function(){var o=Rl(n,a,r),i=o.bind((function(e){return jx(u,a,e)}));return sc(c,i,(function(){return Ny(u,a,r).exists((function(t){return!!sc(Il(r=t),Ll(r),(function(e,t){var n=By(!0,e),o=By(!1,t);return Pl(r,n).forall((function(e){return e.isEqual(o)}))})).getOr(!0)&&(rh(e,n,Mt.fromDom(t)),!0);var r}))})).orThunk((function(){return i.bind((function(i){return o.map((function(o){return n?sw(e,t,r,o):sw(e,t,o,r),!0}))}))})).getOr(!1)}))},fw=function(e,t,n){if(e.selection.isCollapsed()&&Ss(e)){var r=Lc.fromRangeStart(e.selection.getRng());return lw(e,t,n,r)}return!1},dw=function(e){return 1===en(e).length},mw=function(e,t,n,r){var o,i,a,u,c,s=g(bp,t),l=G(Y(r,s),(function(e){return e.dom}));0===l.length?rh(t,e,n):(i=n.dom,a=l,u=fp(!1),c=hp(a,u.dom),dn(Mt.fromDom(i),u),bn(Mt.fromDom(i)),o=Lc(c,0),t.selection.setRng(o.toRange()))},gw=function(e,t){var n,r=Mt.fromDom(e.getBody()),o=Mt.fromDom(e.selection.getStart()),i=Y((n=gg(o,r),ee(n,oo).fold(d(n),(function(e){return n.slice(0,e)}))),dw);return ue(i).exists((function(n){var r,o,a,u,c=Lc.fromRangeStart(e.selection.getRng());return o=t,a=c,u=n.dom,!(!sc(Il(u),Ll(u),(function(e,t){var n=By(!0,e),r=By(!1,t),i=By(!1,a);return o?Pl(u,i).exists((function(e){return e.isEqual(r)&&a.isEqual(n)})):Hl(u,i).exists((function(e){return e.isEqual(n)&&a.isEqual(r)}))})).getOr(!0)||Fl((r=n).dom)&&sp(r.dom))&&(mw(t,e,n,i),!0)}))},hw=function(e,t){return!!e.selection.isCollapsed()&&gw(e,t)},pw=function(e,t,n){return e._selectionOverrides.hideFakeCaret(),rh(e,t,Mt.fromDom(n)),!0},vw=function(e,t){return e.selection.isCollapsed()?(i=e,u=(a=t)?rg:og,c=a?Vc.Forwards:Vc.Backwards,s=sl(c,i.getBody(),i.selection.getRng()),u(s)?pw(i,a,s.getNode(!a)):E.from(By(a,s)).filter((function(e){return u(e)&&dl(s,e)})).exists((function(e){return pw(i,a,e.getNode(!a))}))):(r=t,o=(n=e).selection.getNode(),!!Kn(o)&&pw(n,r,o));var n,r,o,i,a,u,c,s},bw=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},yw=function(e,t){return(e||"table"===Lt(t)?"margin":"padding")+("rtl"===or(t,"direction")?"-right":"-left")},xw=function(e){var t,n=Cw(e);return!e.mode.isReadOnly()&&(1<n.length||(t=e,ne(n,(function(e){var n=yw(ys(t),e),r=ar(e,n).map(bw).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&0<r}))))},ww=function(e){return co(e)||so(e)},Cw=function(e){return Y(G(e.selection.getSelectedBlocks(),Mt.fromDom),(function(e){return!ww(e)&&!Kt(e).map(ww).getOr(!1)&&Nr(e,(function(e){return qn(e.dom)||Gn(e.dom)})).exists((function(e){return qn(e.dom)}))}))},kw=function(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=e.getParam("indentation","40px","string"),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=ys(e),s=ms(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),X(Cw(e),(function(e){var r,o,i,s,l,f,d,m;r=n,o=t,i=c,s=u,l=a,f=e.dom,m=yw(i,Mt.fromDom(f)),"outdent"===o?(d=Math.max(0,bw(f.style[m])-s),r.setStyle(f,m,d?d+l:"")):(d=bw(f.style[m])+s+l,r.setStyle(f,m,d))}))},Sw=function(e,t){if(e.selection.isCollapsed()&&xw(e)){var n=e.dom,r=e.selection.getRng(),o=Lc.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&yg(Mt.fromDom(i),o))return kw(e,"outdent"),!0}return!1},_w=function(e,t){e.getDoc().execCommand(t,!1,null)},Ow=function(e,t){e.addCommand("delete",(function(){var n,r;r=t,Sw(n=e)||xx(n,!1)||fx(n,!1)||fw(n,r,!1)||Jy(n,!1)||Dh(n)||wx(n,!1)||vw(n,!1)||tx(n)||hw(n,!1)||(_w(n,"Delete"),Ly(n))})),e.addCommand("forwardDelete",(function(){var n,r;r=t,xx(n=e,!0)||fx(n,!0)||fw(n,r,!0)||Jy(n,!0)||Dh(n)||wx(n,!0)||vw(n,!0)||tx(n)||hw(n,!0)||_w(n,"ForwardDelete")}))},Ew=function(e){return void 0===e.touches||1!==e.touches.length?E.none():E.some(e.touches[0])},Tw=function(e){var t=Au(E.none()),n=Au(!1),r=Iu((function(t){e.fire("longpress",De(De({},t),{type:"longpress"})),n.set(!0)}),400);e.on("touchstart",(function(e){Ew(e).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:e.target};r.throttle(e),n.set(!1),t.set(E.some(i))}))}),!0),e.on("touchmove",(function(o){r.cancel(),Ew(o).each((function(r){t.get().each((function(o){var i,a,u,c;i=r,a=o,u=Math.abs(i.clientX-a.x),c=Math.abs(i.clientY-a.y),(5<u||5<c)&&(t.set(E.none()),n.set(!1),e.fire("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(function(o){r.cancel(),"touchcancel"!==o.type&&t.get().filter((function(e){return e.target.isEqualNode(o.target)})).each((function(){n.get()?o.preventDefault():e.fire("tap",De(De({},o),{type:"tap"}))}))}),!0)},zw=function(e,t){return e.hasOwnProperty(t.nodeName)},Dw=function(e){var t,n,r,o=e.dom,i=e.selection,a=e.schema,u=a.getBlockElements(),c=i.getStart(),s=e.getBody(),l=ms(e);if(c&&Mn(c)&&l){var f=s.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&(d=u,m=s,g=c,!q(mg(Mt.fromDom(g),Mt.fromDom(m)),(function(e){return zw(d,e.dom)})))){var d,m,g,h,p,v=i.getRng(),b=v.startContainer,y=v.startOffset,x=v.endContainer,w=v.endOffset,C=xm(e);for(c=s.firstChild;c;)if(h=u,Vn(p=c)||Mn(p)&&!zw(h,p)&&!Jl(p)){if(function(e,t){if(Vn(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||zw(e,t.nextSibling)))return!0}return!1}(u,c)){c=(n=c).nextSibling,o.remove(n);continue}t||(t=o.create(l,gs(e)),c.parentNode.insertBefore(t,c),r=!0),c=(n=c).nextSibling,t.appendChild(n)}else t=null,c=c.nextSibling;r&&C&&(v.setStart(b,y),v.setEnd(x,w),i.setRng(v),e.nodeChanged())}}},Aw=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(Do(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},Mw=function(e,t){var n,r=(n=e,Hr(Mt.fromDom(n.getBody()),"*[data-mce-caret]").fold(d(null),(function(e){return e.dom})));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Aw(e,r)):void(So(r)&&(Aw(e,r),e.undoManager.add()))};(_p=Sp=Sp||{})[_p.Br=0]="Br",_p[_p.Block=1]="Block",_p[_p.Wrap=2]="Wrap",_p[_p.Eol=3]="Eol";var Rw,Nw,Bw=function(e,t){return e===Vc.Backwards?re(t):t},Pw=function(e,t,n,r){for(var o,i,a,u,c,s,l=El(n),f=r,d=[];f&&(c=l,s=f,o=t===Vc.Forwards?c.next(s):c.prev(s));){if($n(o.getNode(!1)))return t===Vc.Forwards?{positions:Bw(t,d).concat([o]),breakType:Sp.Br,breakAt:E.some(o)}:{positions:Bw(t,d),breakType:Sp.Br,breakAt:E.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,$n((u=o).getNode(i===Vc.Forwards))?Sp.Br:!1===tl(a,u)?Sp.Block:Sp.Wrap);return{positions:Bw(t,d),breakType:m,breakAt:E.some(o)}}d.push(o),f=o}else f=o}return{positions:Bw(t,d),breakType:Sp.Eol,breakAt:E.none()}},Hw=function(e,t,n,r){return t(n,r).breakAt.map((function(r){var o=t(n,r).positions;return e===Vc.Backwards?o.concat(r):[r].concat(o)})).getOr([])},Iw=function(e,t){return Q(e,(function(e,n){return e.fold((function(){return E.some(n)}),(function(r){return sc(ae(r.getClientRects()),ae(n.getClientRects()),(function(e,o){var i=Math.abs(t-e.left);return Math.abs(t-o.left)<=i?n:r})).or(e)}))}),E.none())},Lw=function(e,t){return ae(t.getClientRects()).bind((function(t){return Iw(e,t.left)}))},Vw=g(Pw,Lc.isAbove,-1),Fw=g(Pw,Lc.isBelow,1),jw=g(Hw,-1,Vw),Uw=g(Hw,1,Fw),$w=function(e){var t=function(t){return G(t,(function(t){return(t=fc(t)).node=e,t}))};if(Mn(e))return t(e.getClientRects());if(Vn(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},Ww=function(e){return te(e,$w)};(Nw=Rw=Rw||{})[Nw.Up=-1]="Up",Nw[Nw.Down=1]="Down";var qw=function(e,t,n,r,o,i){var a=0,u=[],c=function(r){var i,c,l=Ww([r]);for(-1===e&&(l=l.reverse()),i=0;i<l.length;i++)if(c=l[i],!n(c,s)){if(0<u.length&&t(c,ze(u))&&a++,c.line=a,o(c))return!0;u.push(c)}},s=ze(i.getClientRects());if(!s)return u;var l=i.getNode();return c(l),function(e,t,n,r){for(;r=Zs(r,e,Fo,t);)if(n(r))return}(e,r,c,l),u},Gw=g(qw,Rw.Up,gc,hc),Xw=g(qw,Rw.Down,hc,gc),Kw=function(e){return function(t){return n=e,t.line>n;var n}},Yw=function(e){return function(t){return n=e,t.line===n;var n}},Jw=Gn,Qw=Zs,Zw=function(e,t){return Math.abs(e.left-t)},eC=function(e,t){return Math.abs(e.right-t)},tC=function(e,t){return e>=t.left&&e<=t.right},nC=function(e,t){return e>=t.top&&e<=t.bottom},rC=function(e,t){return Ee(e,(function(e,n){var r=Math.min(Zw(e,t),eC(e,t)),o=Math.min(Zw(n,t),eC(n,t));return tC(t,n)||!tC(t,e)&&(o===r&&Jw(n.node)||o<r)?n:e}))},oC=function(e,t,n,r,o){var i=Qw(r,e,Fo,t,!o);do{if(!i||n(i))return}while(i=Qw(i,e,Fo,t))},iC=function(e,t,n){var r,o,i=Ww(Y(ce(e.getElementsByTagName("*")),$s)),a=Y(i,g(nC,n));if(u=rC(a,t)){var u,c=!Hn(u.node)&&!Kn(u.node);if((u=rC(function(e,t,n){void 0===n&&(n=!0);var r=[],o=function(e,n){var o=Y(Ww([n]),(function(n){return!e(n,t)}));return r=r.concat(o),0===o.length};return r.push(t),oC(Rw.Up,e,g(o,gc),t.node,n),oC(Rw.Down,e,g(o,hc),t.node,n),r}(e,u,c),t))&&$s(u.node))return o=t,{node:(r=u).node,before:Zw(r,o)<eC(r,o)}}return null},aC=function(e,t){e.selection.setRng(t),Ud(e,e.selection.getRng())},uC=function(e,t,n){return E.some(ux(e,t,n))},cC=function(e,t,n,r,o,i){var a=t===Vc.Forwards,u=El(e.getBody()),c=g(fl,a?u.next:u.prev),s=a?r:o;if(!n.collapsed){var l=vc(n);if(i(l))return ox(t,e,l,t===Vc.Backwards,!1)}var f=sl(t,e.getBody(),n);if(s(f))return ix(e,f.getNode(!a));var d=By(a,c(f)),m=wo(n.startContainer);if(!d)return m?E.some(n):E.none();if(s(d))return ox(t,e,d.getNode(!a),a,!1);var h=c(d);return h&&s(h)&&dl(d,h)?ox(t,e,h.getNode(!a),a,!1):m?uC(e,d.toRange(),!1):E.none()},sC=function(e,t,n,r,o,i){var a=sl(t,e.getBody(),n),u=ze(a.getClientRects()),c=t===Rw.Down;if(!u)return E.none();var s,l=(c?Xw:Gw)(e.getBody(),Kw(1),a),f=Y(l,Yw(1)),d=u.left,m=rC(f,d);if(m&&i(m.node)){var g=Math.abs(d-m.left),h=Math.abs(d-m.right);return ox(t,e,m.node,g<h,!1)}if(s=r(a)?a.getNode():o(a)?a.getNode(!0):vc(n)){var p=function(e,t,n,r){var o,i,a,u,c=El(t),s=[],l=0,f=function(e){return ze(e.getClientRects())},d=1===e?(o=c.next,i=hc,a=gc,Lc.after(r)):(o=c.prev,i=gc,a=hc,Lc.before(r)),m=f(d);do{if(d.isVisible()&&!a(u=f(d),m)){if(0<s.length&&i(u,ze(s))&&l++,(u=fc(u)).position=d,u.line=l,n(u))return s;s.push(u)}}while(d=o(d));return s}(t,e.getBody(),Kw(1),s),v=rC(Y(p,Yw(1)),d);if(v)return uC(e,v.position.toRange(),!1);if(v=ze(Y(p,Yw(0))))return uC(e,v.position.toRange(),!1)}return 0===f.length?lC(e,c).filter(c?o:r).map((function(t){return ux(e,t.toRange(),!1)})):E.none()},lC=function(e,t){var n=e.selection.getRng(),r=e.getBody();if(t){var o=Lc.fromRangeEnd(n),i=Fw(r,o);return ue(i.positions)}return o=Lc.fromRangeStart(n),i=Vw(r,o),ae(i.positions)},fC=function(e,t,n){return lC(e,t).filter(n).exists((function(t){return e.selection.setRng(t.toRange()),!0}))},dC=Gn,mC=function(e,t,n){var r,o,i=El(e.getBody()),a=g(fl,1===t?i.next:i.prev);if(n.collapsed&&""!==ms(e)){var u,c=e.dom.getParent(n.startContainer,"PRE");if(!c)return;a(Lc.fromRangeStart(n))||(o=(r=e).dom.create(ms(r)),(!_t.ie||11<=_t.ie)&&(o.innerHTML='<br data-mce-bogus="1">'),u=o,1===t?e.$(c).after(u):e.$(c).before(u),e.selection.select(u,!0),e.selection.collapse())}},gC=function(e,t){var n=t?Vc.Forwards:Vc.Backwards,r=e.selection.getRng();return cC(e,n,r,ug,cg,dC).orThunk((function(){return mC(e,n,r),E.none()}))},hC=function(e,t){var n=t?1:-1,r=e.selection.getRng();return sC(e,n,r,(function(e){return ug(e)||ig(e)}),(function(e){return cg(e)||ag(e)}),dC).orThunk((function(){return mC(e,n,r),E.none()}))},pC=function(e,t){return gC(e,t).exists((function(t){return aC(e,t),!0}))},vC=function(e,t){return hC(e,t).exists((function(t){return aC(e,t),!0}))},bC=function(e,t){return fC(e,t,t?cg:ug)},yC=function(e){return W(["figcaption"],Lt(e))},xC=function(e){var t=document.createRange();return t.setStartBefore(e.dom),t.setEndBefore(e.dom),t},wC=function(e,t,n){(n?hn:gn)(e,t)},CC=function(e,t,n,r){return""===t?(l=e,f=r,d=Mt.fromTag("br"),wC(l,d,f),xC(d)):(o=e,i=r,a=t,u=n,c=Mt.fromTag(a),s=Mt.fromTag("br"),Zn(c,u),hn(c,s),wC(o,c,i),xC(s));var o,i,a,u,c,s,l,f,d},kC=function(e,t,n){return t?(o=e.dom,Fw(o,n).breakAt.isNone()):(r=e.dom,Vw(r,n).breakAt.isNone());var r,o},SC=function(e,t){var n,r,o=Mt.fromDom(e.getBody()),i=Lc.fromRangeStart(e.selection.getRng()),a=ms(e),u=gs(e);return n=i,r=g(Pt,o),Nr(Mt.fromDom(n.container()),oo,r).filter(yC).exists((function(){if(kC(o,t,i)){var n=CC(o,a,u,t);return e.selection.setRng(n),!0}return!1}))},_C=function(e,t){return!!e.selection.isCollapsed()&&SC(e,t)},OC=function(e,t){return te(G(e,(function(e){return De({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:l},e)})),(function(e){return n=e,(r=t).keyCode===n.keyCode&&r.shiftKey===n.shiftKey&&r.altKey===n.altKey&&r.ctrlKey===n.ctrlKey&&r.metaKey===n.metaKey?[e]:[];var n,r}))},EC=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}},TC=function(e,t){return Z(OC(e,t),(function(e){return e.action()}))},zC=function(e,t){var n=t?Vc.Forwards:Vc.Backwards,r=e.selection.getRng();return cC(e,n,r,rg,og,Kn).exists((function(t){return aC(e,t),!0}))},DC=function(e,t){var n=t?1:-1,r=e.selection.getRng();return sC(e,n,r,rg,og,Kn).exists((function(t){return aC(e,t),!0}))},AC=function(e,t){return fC(e,t,t?og:rg)},MC=function(e,t){return te(t,(function(t){var n,r,o=(n=fc(t.getBoundingClientRect()),r=-1,{left:n.left-r,top:n.top-r,right:n.right+2*r,bottom:n.bottom+2*r,width:n.width+r,height:n.height+r});return[{x:o.left,y:e(o),cell:t},{x:o.right,y:e(o),cell:t}]}))},RC=function(e,t,n,r,o){var i,a,u=Gu(Mt.fromDom(n),"td,th,caption").map((function(e){return e.dom})),c=Y(MC(e,u),(function(e){return t(e,o)}));return i=r,a=o,Q(c,(function(e,t){return e.fold((function(){return E.some(t)}),(function(e){var n=Math.sqrt(Math.abs(e.x-i)+Math.abs(e.y-a)),r=Math.sqrt(Math.abs(t.x-i)+Math.abs(t.y-a));return E.some(r<n?t:e)}))}),E.none()).map((function(e){return e.cell}))},NC=g(RC,(function(e){return e.bottom}),(function(e,t){return e.y<t})),BC=g(RC,(function(e){return e.top}),(function(e,t){return e.y>t})),PC=function(e,t){return ae(t.getClientRects()).bind((function(t){return NC(e,t.left,t.top)})).bind((function(e){return Lw(Ll(n=e).map((function(e){return Vw(n,e).positions.concat(e)})).getOr([]),t);var n}))},HC=function(e,t){return ue(t.getClientRects()).bind((function(t){return BC(e,t.left,t.top)})).bind((function(e){return Lw(Il(n=e).map((function(e){return[e].concat(Fw(n,e).positions)})).getOr([]),t);var n}))},IC=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===Sp.Wrap&&0===a.positions.length||!$n(n.getNode())&&(i=u).breakType===Sp.Br&&1===i.positions.length?(r=e,o=t,!u.breakAt.exists((function(e){return r(o,e).breakAt.isSome()}))):u.breakAt.isNone()},LC=g(IC,Vw),VC=g(IC,Fw),FC=function(e,t,n,r){var o,i,a,u,c=e.selection.getRng(),s=t?1:-1;return!(!js()||(o=t,i=c,a=n,u=Lc.fromRangeStart(i),!Bl(!o,a).exists((function(e){return e.isEqual(u)}))))&&(ox(s,e,n,!t,!1).each((function(t){aC(e,t)})),!0)},jC=function(e,t){var n=t.getNode(e);return Mn(n)&&"TABLE"===n.nodeName?E.some(n):E.none()},UC=function(e,t,n){var r=jC(!!t,n),o=!1===t;r.fold((function(){return aC(e,n.toRange())}),(function(r){return Bl(o,e.getBody()).filter((function(e){return e.isEqual(n)})).fold((function(){return aC(e,n.toRange())}),(function(o){return i=t,u=r,c=n,void((s=ms(a=e))?a.undoManager.transact((function(){var e=Mt.fromTag(s);Zn(e,gs(a)),hn(e,Mt.fromTag("br")),(i?mn:dn)(Mt.fromDom(u),e);var t=a.dom.createRng();t.setStart(e.dom,0),t.setEnd(e.dom,0),aC(a,t)})):aC(a,c.toRange()));var i,a,u,c,s}))}))},$C=function(e,t,n,r){var o,i,a,u,c,s,l=e.selection.getRng(),f=Lc.fromRangeStart(l),d=e.getBody();if(!t&&LC(r,f)){var m=(u=d,PC(c=n,s=f).orThunk((function(){return ae(s.getClientRects()).bind((function(e){return Iw(jw(u,Lc.before(c)),e.left)}))})).getOr(Lc.before(c)));return UC(e,t,m),!0}return!(!t||!VC(r,f))&&(o=d,m=HC(i=n,a=f).orThunk((function(){return ae(a.getClientRects()).bind((function(e){return Iw(Uw(o,Lc.after(i)),e.left)}))})).getOr(Lc.after(i)),UC(e,t,m),!0)},WC=function(e,t,n){return E.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((function(r){return E.from(e.dom.getParent(r,"table")).map((function(o){return n(e,t,o,r)}))})).getOr(!1)},qC=function(e,t){return WC(e,t,FC)},GC=function(e,t){return WC(e,t,$C)},XC=function(e,t){e.on("keydown",(function(n){var r,o,i,a;!1===n.isDefaultPrevented()&&(r=e,o=t,i=n,a=pt().os,TC([{keyCode:rd.RIGHT,action:EC(pC,r,!0)},{keyCode:rd.LEFT,action:EC(pC,r,!1)},{keyCode:rd.UP,action:EC(vC,r,!1)},{keyCode:rd.DOWN,action:EC(vC,r,!0)},{keyCode:rd.RIGHT,action:EC(qC,r,!0)},{keyCode:rd.LEFT,action:EC(qC,r,!1)},{keyCode:rd.UP,action:EC(GC,r,!1)},{keyCode:rd.DOWN,action:EC(GC,r,!0)},{keyCode:rd.RIGHT,action:EC(zC,r,!0)},{keyCode:rd.LEFT,action:EC(zC,r,!1)},{keyCode:rd.UP,action:EC(DC,r,!1)},{keyCode:rd.DOWN,action:EC(DC,r,!0)},{keyCode:rd.RIGHT,action:EC(rw,r,o,!0)},{keyCode:rd.LEFT,action:EC(rw,r,o,!1)},{keyCode:rd.RIGHT,ctrlKey:!a.isOSX(),altKey:a.isOSX(),action:EC(aw,r,o)},{keyCode:rd.LEFT,ctrlKey:!a.isOSX(),altKey:a.isOSX(),action:EC(uw,r,o)},{keyCode:rd.UP,action:EC(_C,r,!1)},{keyCode:rd.DOWN,action:EC(_C,r,!0)}],i).each((function(e){i.preventDefault()})))}))},KC=function(e,t){e.on("keydown",(function(n){var r,o,i;!1===n.isDefaultPrevented()&&(r=e,o=t,i=n,TC([{keyCode:rd.BACKSPACE,action:EC(Sw,r,!1)},{keyCode:rd.BACKSPACE,action:EC(xx,r,!1)},{keyCode:rd.DELETE,action:EC(xx,r,!0)},{keyCode:rd.BACKSPACE,action:EC(fx,r,!1)},{keyCode:rd.DELETE,action:EC(fx,r,!0)},{keyCode:rd.BACKSPACE,action:EC(fw,r,o,!1)},{keyCode:rd.DELETE,action:EC(fw,r,o,!0)},{keyCode:rd.BACKSPACE,action:EC(Dh,r,!1)},{keyCode:rd.DELETE,action:EC(Dh,r,!0)},{keyCode:rd.BACKSPACE,action:EC(wx,r,!1)},{keyCode:rd.DELETE,action:EC(wx,r,!0)},{keyCode:rd.BACKSPACE,action:EC(vw,r,!1)},{keyCode:rd.DELETE,action:EC(vw,r,!0)},{keyCode:rd.BACKSPACE,action:EC(tx,r,!1)},{keyCode:rd.DELETE,action:EC(tx,r,!0)},{keyCode:rd.BACKSPACE,action:EC(Jy,r,!1)},{keyCode:rd.DELETE,action:EC(Jy,r,!0)},{keyCode:rd.BACKSPACE,action:EC(hw,r,!1)},{keyCode:rd.DELETE,action:EC(hw,r,!0)}],i).each((function(e){i.preventDefault()})))})),e.on("keyup",(function(t){var n,r;!1===t.isDefaultPrevented()&&(n=e,r=t,TC([{keyCode:rd.BACKSPACE,action:EC(yx,n)},{keyCode:rd.DELETE,action:EC(yx,n)}],r))}))},YC=function(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){!/^(LI|DT|DD)$/.test(t.nodeName)||(r=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild))&&/^(UL|OL|DL)$/.test(r.nodeName)&&t.insertBefore(i.doc.createTextNode(ho),t.firstChild);var u=i.createRng();if(t.normalize(),t.hasChildNodes()){for(var c=new Qr(t,t);n=c.current();){if(Vn(n)){u.setStart(n,0),u.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}o=n,n=c.next()}n||(u.setStart(o,0),u.setEnd(o,0))}else $n(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(u.setStartBefore(t),u.setEndBefore(t)):(u.setStartAfter(t),u.setEndAfter(t)):(u.setStart(t,0),u.setEnd(t,0));e.selection.setRng(u),Ud(e,u)}},JC=function(e){return E.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},QC=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},ZC=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},ek=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},tk=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Mn(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},nk=function(e,t,n,r,o){var i,a,u,c,s,l,f,d,m,g=e.dom,h=e.selection.getRng();n!==e.getBody()&&(ZC(i=n)&&ZC(i.parentNode)&&(o="LI"),a=o?t(o):g.create("BR"),tk(n,r,!0)&&tk(n,r,!1)?QC(n,"LI")?(u=ek(n),g.insertAfter(a,u),(null===(m=(d=n).parentNode)||void 0===m?void 0:m.firstChild)===d?g.remove(u):g.remove(n)):g.replace(a,n):(tk(n,r,!0)?QC(n,"LI")?(g.insertAfter(a,ek(n)),a.appendChild(g.doc.createTextNode(" ")),a.appendChild(n)):n.parentNode.insertBefore(a,n):tk(n,r,!1)?g.insertAfter(a,ek(n)):(n=ek(n),(c=h.cloneRange()).setStartAfter(r),c.setEndAfter(n),s=c.extractContents(),"LI"===o&&(f="LI",(l=s).firstChild&&l.firstChild.nodeName===f)?(a=s.firstChild,g.insertAfter(s,n)):(g.insertAfter(s,n),g.insertAfter(a,n))),g.remove(r)),YC(e,a))},rk=function(e){e.innerHTML='<br data-mce-bogus="1">'},ok=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},ik=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},ak=function(e,t,n){return!1===Vn(t)?n:e?1===n&&t.data.charAt(n-1)===po?0:n:n===t.data.length-1&&t.data.charAt(n)===po?t.data.length:n},uk=function(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r},ck=function(e,t){var n=ms(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&function(e,t,n){var r=e.dom;E.from(n.style).map(r.parseStyle).each((function(e){var n=ur(Mt.fromDom(t)),o=De(De({},n),e);r.setStyles(t,o)}));var o=E.from(n["class"]).map((function(e){return e.split(/\s+/)})),i=E.from(t.className).map((function(e){return Y(e.split(/\s+/),(function(e){return""!==e}))}));sc(o,i,(function(e,n){var o=Y(n,(function(t){return!W(e,t)})),i=Ae(e,o);r.setAttrib(t,"class",i.join(" "))}));var a=["style","class"],u=ve(n,(function(e,t){return!W(a,t)}));r.setAttribs(t,u)}(e,t,gs(e))},sk=function(e,t){var n,r,o,i,a,u,c,s,l,f=e.dom,d=e.schema,m=d.getNonEmptyElements(),g=e.selection.getRng(),h=function(t){var n,o=r,a=d.getTextInlineElements(),u=t||"TABLE"===s||"HR"===s?f.create(t||S):i.cloneNode(!1),c=u;if(!1===e.getParam("keep_styles",!0))f.setAttrib(u,"style",null),f.setAttrib(u,"class",null);else do{if(a[o.nodeName]){if(Fl(o)||Jl(o))continue;n=o.cloneNode(!1),f.setAttrib(n,"id",""),u.hasChildNodes()?n.appendChild(u.firstChild):c=n,u.appendChild(n)}}while((o=o.parentNode)&&o!==_);return ck(e,u),rk(c),u},p=function(e){var t,n,a=ak(e,r,o);if(Vn(r)&&(e?0<a:a<r.nodeValue.length))return!1;if(r.parentNode===i&&l&&!e)return!0;if(e&&Mn(r)&&r===i.firstChild)return!0;if(ok(r,"TABLE")||ok(r,"HR"))return l&&!e||!l&&e;var u=new Qr(r,i);for(Vn(r)&&(e&&0===a?u.prev():e||a!==r.nodeValue.length||u.next());t=u.current();){if(Mn(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),m[n]&&"br"!==n))return!1}else if(Vn(t)&&!Uo(t.nodeValue))return!1;e?u.prev():u.next()}return!0},v=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==x?h(S):h(),e.getParam("end_container_on_empty_block",!1)&&ik(f,c)&&f.isEmpty(i)?a=f.split(c,i):f.insertAfter(a,i),YC(e,a)};gd(f,g).each((function(e){g.setStart(e.startContainer,e.startOffset),g.setEnd(e.endContainer,e.endOffset)})),r=g.startContainer,o=g.startOffset,S=ms(e);var b=!(!t||!t.shiftKey),y=!(!t||!t.ctrlKey);Mn(r)&&r.hasChildNodes()&&(l=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=l&&Vn(r)?r.nodeValue.length:0);var x,w,C,k,S,_=uk(f,r);_&&((S&&!b||!S&&b)&&(r=function(e,t,n,r,o){var i,a,u,c,s,l,f=t||"P",d=e.dom,m=uk(d,r),g=d.getParent(r,d.isBlock);if(!g||!ik(d,g)){if(s=(g=g||m)===e.getBody()||(l=g)&&/^(TD|TH|CAPTION)$/.test(l.nodeName)?g.nodeName.toLowerCase():g.parentNode.nodeName.toLowerCase(),!g.hasChildNodes())return i=d.create(f),ck(e,i),g.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(u=r;u.parentNode!==g;)u=u.parentNode;for(;u&&!d.isBlock(u);)u=(a=u).previousSibling;if(a&&e.schema.isValidChild(s,f.toLowerCase())){for(i=d.create(f),ck(e,i),a.parentNode.insertBefore(i,a),u=a;u&&!d.isBlock(u);)c=u.nextSibling,i.appendChild(u),u=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(e,S,g,r,o)),i=f.getParent(r,f.isBlock),c=i?f.getParent(i.parentNode,f.isBlock):null,s=i?i.nodeName.toUpperCase():"","LI"!==(x=c?c.nodeName.toUpperCase():"")||y||(c=(i=c).parentNode,s=x),/^(LI|DT|DD)$/.test(s)&&f.isEmpty(i)?nk(e,h,c,i,S):S&&i===e.getBody()||(S=S||"P",wo(i)?(a=Do(i),f.isEmpty(i)&&rk(i),ck(e,a),YC(e,a)):p()?v():p(!0)?(a=i.parentNode.insertBefore(h(),i),YC(e,ok(i,"HR")?a:i)):((k=(C=g).cloneRange()).setStart(C.startContainer,ak(!0,C.startContainer,C.startOffset)),k.setEnd(C.endContainer,ak(!1,C.endContainer,C.endOffset)),(n=k.cloneRange()).setEndAfter(i),u=n.extractContents(),w=u,X(qu(Mt.fromDom(w),Ut),(function(e){var t=e.dom;t.nodeValue=bo(t.nodeValue)})),function(e){for(;Vn(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(u),a=u.firstChild,f.insertAfter(u,i),function(e,t,n){var r,o,i,a=n,u=[];if(a){for(;a=a.firstChild;){if(e.isBlock(a))return;Mn(a)&&!t[a.nodeName.toLowerCase()]&&u.push(a)}for(r=u.length;r--;)!(a=u[r]).hasChildNodes()||a.firstChild===a.lastChild&&""===a.firstChild.nodeValue?e.remove(a):(o=e,(i=a)&&"A"===i.nodeName&&o.isEmpty(i)&&e.remove(a))}}(f,m,a),function(e,t){t.normalize();var n=t.lastChild;n&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(f,i),f.isEmpty(i)&&rk(i),a.normalize(),f.isEmpty(a)?(f.remove(a),v()):(ck(e,a),YC(e,a))),f.setAttrib(a,"id",""),e.fire("NewBlock",{newBlock:a})))},lk=function(e,t,n){var r=e.dom.createRng();n?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)),e.selection.setRng(r),Ud(e,r)},fk=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();gd(i,a).each((function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)}));var u,c=a.startOffset,s=a.startContainer;1===s.nodeType&&s.hasChildNodes()&&(u=c>s.childNodes.length-1,s=s.childNodes[Math.min(c,s.childNodes.length-1)]||s,c=u&&3===s.nodeType?s.nodeValue.length:0);var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(l=f),s&&3===s.nodeType&&c>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new Qr(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),Uc(i,a,n),lk(e,n,r),e.undoManager.add()},dk=function(e,t){var n=Mt.fromTag("br");dn(Mt.fromDom(t),n),e.undoManager.add()},mk=function(e,t){gk(e.getBody(),t)||mn(Mt.fromDom(t),Mt.fromTag("br"));var n=Mt.fromTag("br");mn(Mt.fromDom(t),n),lk(e,n.dom,!1),e.undoManager.add()},gk=function(e,t){return n=Lc.after(t),!!$n(n.getNode())||Pl(e,Lc.after(t)).map((function(e){return $n(e.getNode())})).getOr(!1);var n},hk=function(e){return e&&"A"===e.nodeName&&"href"in e},pk=function(e){return e.fold(C,hk,hk,C)},vk=function(e,t){t.fold(l,g(dk,e),g(mk,e),l)},bk=function(e,t){var n,r,o,i=(r=g(My,n=e),o=Lc.fromRangeStart(n.selection.getRng()),jx(r,n.getBody(),o).filter(pk));i.isSome()?i.each(g(vk,e)):fk(e,t)},yk=function(e,t){return JC(e).filter((function(e){return 0<t.length&&Nt(Mt.fromDom(e),t)})).isSome()},xk=Sr([{br:[]},{block:[]},{none:[]}]),wk=function(e,t){return yk(n=e,n.getParam("no_newline_selector",""));var n},Ck=function(e){return function(t,n){return""===ms(t)===e}},kk=function(e){return function(t,n){return JC(t).filter((function(e){return so(Mt.fromDom(e))})).isSome()===e}},Sk=function(e,t){return function(n,r){return JC(n).fold(d(""),(function(e){return e.nodeName.toUpperCase()}))===e.toUpperCase()===t}},_k=function(e){return Sk("pre",e)},Ok=function(e){return function(t,n){return t.getParam("br_in_pre",!0)===e}},Ek=function(e,t){return yk(n=e,n.getParam("br_newline_selector",".mce-toc h2,figcaption,caption"));var n},Tk=function(e,t){return t},zk=function(e){var t=ms(e),n=function(e,t){for(var n,r=e.getRoot(),o=t;o!==r&&"false"!==e.getContentEditable(o);)"true"===e.getContentEditable(o)&&(n=o),o=o.parentNode;return o!==r?n:r}(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},Dk=function(e,t){return function(n,r){return Q(e,(function(e,t){return e&&t(n,r)}),!0)?E.some(t):E.none()}},Ak=function(e,t){return Mx([Dk([wk],xk.none()),Dk([Sk("summary",!0)],xk.br()),Dk([_k(!0),Ok(!1),Tk],xk.br()),Dk([_k(!0),Ok(!1)],xk.block()),Dk([_k(!0),Ok(!0),Tk],xk.block()),Dk([_k(!0),Ok(!0)],xk.br()),Dk([kk(!0),Tk],xk.br()),Dk([kk(!0)],xk.block()),Dk([Ck(!0),Tk,zk],xk.block()),Dk([Ck(!0)],xk.br()),Dk([Ek],xk.br()),Dk([Ck(!1),Tk],xk.br()),Dk([zk],xk.block())],[e,!(!t||!t.shiftKey)]).getOr(xk.none())},Mk=function(e,t){Ak(e,t).fold((function(){bk(e,t)}),(function(){sk(e,t)}),l)},Rk=function(e){e.on("keydown",(function(t){var n,r,o;t.keyCode===rd.ENTER&&(n=e,(r=t).isDefaultPrevented()||(r.preventDefault(),(o=n.undoManager).typing&&(o.typing=!1,o.add()),n.undoManager.transact((function(){!1===n.selection.isCollapsed()&&n.execCommand("Delete"),Mk(n,r)}))))}))},Nk=function(e){e.on("keydown",(function(t){var n,r;!1===t.isDefaultPrevented()&&(n=e,r=t,TC([{keyCode:rd.END,action:EC(bC,n,!0)},{keyCode:rd.HOME,action:EC(bC,n,!1)},{keyCode:rd.END,action:EC(AC,n,!0)},{keyCode:rd.HOME,action:EC(AC,n,!1)}],r).each((function(e){r.preventDefault()})))}))},Bk=pt().browser,Pk=function(e){var t,n;t=e,n=Hu((function(){t.composing||jg(t)}),0),Bk.isIE()&&(t.on("keypress",(function(e){n.throttle()})),t.on("remove",(function(e){n.cancel()}))),e.on("input",(function(t){!1===t.isComposing&&jg(e)}))},Hk=function(e,t){var n=t.container(),r=t.offset();return Vn(n)?(n.insertData(r,e),E.some(Lc(n,r+e.length))):ll(t).map((function(n){var r=Mt.fromText(e);return(t.isAtEnd()?mn:dn)(n,r),Lc(r.dom,e.length)}))},Ik=g(Hk,ho),Lk=g(Hk," "),Vk=function(e,t){return function(n){return r=e,(!Rg(o=n)&&(Ng(r,o)||Ag(r,o)||Mg(r,o))?Ik:Lk)(t);var r,o}},Fk=function(e){var t,n,r=Lc.fromRangeStart(e.selection.getRng()),o=Mt.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=g(My,e),a=Lc.fromRangeStart(e.selection.getRng());return jx(i,e.getBody(),a).bind((n=o,function(e){return e.fold((function(e){return Hl(n.dom,Lc.before(e))}),(function(e){return Il(e)}),(function(e){return Ll(e)}),(function(e){return Pl(n.dom,Lc.after(e))}))})).bind(Vk(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1},jk=function(e){e.on("keydown",(function(t){var n,r;!1===t.isDefaultPrevented()&&(n=e,r=t,TC([{keyCode:rd.SPACEBAR,action:EC(Fk,n)}],r).each((function(e){r.preventDefault()})))}))},Uk=function(e){var t,n=iw(e);return(t=e).on("keyup compositionstart",g(Mw,t)),XC(e,n),KC(e,n),Rk(e),jk(e),Pk(e),Nk(e),n},$k=(Wk.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,(function(e){return e===r||void n.push(e)})),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},Wk.prototype.isSameElementPath=function(e){var t,n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e);if(n.length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},Wk);function Wk(e){var t;this.lastPath=[],this.editor=e;var n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(function(n){var r=e.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&cd(o,t)||e.fire("SelectionChange"),t=o})),e.on("contextmenu",(function(){e.fire("SelectionChange")})),e.on("SelectionChange",(function(){var t=e.selection.getStart(!0);!t||!_t.range&&e.selection.isCollapsed()||Uf(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(function(t){!t.isDefaultPrevented()&&Uf(e)&&("IMG"===e.selection.getNode().nodeName?Kr.setEditorTimeout(e,(function(){e.nodeChanged()})):e.nodeChanged())}))}var qk=function(e){var t,n;(t=e).on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()})),(n=e).parser.addNodeFilter("details",(function(e){X(e,(function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")}))})),n.serializer.addNodeFilter("details",(function(e){X(e,(function(e){var t=e.attr("data-mce-open");e.attr("open",A(t)?t:null),e.attr("data-mce-open",null)}))}))},Gk=function(e){return Mn(e)&&uo(Mt.fromDom(e))},Xk=function(e){e.on("click",(function(t){var n,r,o,i,a;3<=t.detail&&(o=(n=e).selection.getRng(),i=Lc.fromRangeStart(o),a=Lc.fromRangeEnd(o),Lc.isElementPosition(i)&&(r=i.container(),Gk(r)&&Il(r).each((function(e){return o.setStart(e.container(),e.offset())}))),Lc.isElementPosition(a)&&(r=i.container(),Gk(r)&&Ll(r).each((function(e){return o.setEnd(e.container(),e.offset())}))),n.selection.setRng(Mh(o)))}))},Kk=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+o.pageYOffset-r.clientTop,left:t.left+o.pageXOffset-r.clientLeft}},Yk=function(e,t){return n=(u=e).inline?Kk(u.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,r,o,i,a,u=Kk(e.getContentAreaContainer()),c=(r=(n=e).getBody(),o=n.getDoc().documentElement,i={left:r.scrollLeft,top:r.scrollTop},a={left:r.scrollLeft||o.scrollLeft,top:r.scrollTop||o.scrollTop},n.inline?i:a);return{left:t.pageX-u.left+c.left,top:t.pageY-u.top+c.top}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,u},Jk=Gn,Qk=qn,Zk=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},eS=function(e,t){return function(n){var r,o,i,a,u,c;0===n.button&&(r=Z(t.dom.getParents(n.target),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}(Jk,Qk)).getOr(null),u=t.getBody(),Jk(c=r)&&c!==u&&(o=t.dom.getPos(r),i=t.getBody(),a=t.getDoc().documentElement,e.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?i.scrollWidth:a.offsetWidth)-2,maxY:(t.inline?i.scrollHeight:a.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:function(e,t,n,r){var o=e.dom,i=t.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var a=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),a.appendChild(i),a}(t,r,r.offsetWidth,r.offsetHeight)})))}},tS=function(e,t){var n=Kr.throttle((function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)}),0);return t.on("remove",n.stop),function(r){return e.on((function(e){var o,i,a,u,c,s,l,f,d,m,g,h,p,v=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&10<v){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}e.dragging&&(h=e,o={pageX:(p=Yk(t,r)).pageX-h.relX,pageY:p.pageY+5},m=e.ghost,g=t.getBody(),m.parentNode!==g&&g.appendChild(m),i=e.ghost,a=o,u=e.width,c=e.height,s=e.maxX,l=e.maxY,d=f=0,i.style.left=a.pageX+"px",i.style.top=a.pageY+"px",a.pageX+u>s&&(f=a.pageX+u-s),a.pageY+c>l&&(d=a.pageY+c-l),i.style.width=u-f+"px",i.style.height=c-d+"px",n(r.clientX,r.clientY))}))}},nS=function(e,t){return function(n){e.on((function(e){var r,o,i,a,u,c,s,l;e.dragging&&(s=(a=t).selection,l=s.getSel().getRangeAt(0).startContainer,u=3===l.nodeType?l.parentNode:l,c=e.element,u===c||a.dom.isChildOf(u,c)||Jk(u)||(o=e.element,(i=o.cloneNode(!0)).removeAttribute("data-mce-selected"),r=i,t.fire("drop",{clientX:n.clientX,clientY:n.clientY}).isDefaultPrevented()||t.undoManager.transact((function(){Zk(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))))})),rS(e)}},rS=function(e){e.on((function(e){Zk(e.ghost)})),e.clear()},oS=function(e){var t,n,r,o=(t=Au(E.none()),{clear:function(){return t.set(E.none())},set:function(e){return t.set(E.some(e))},isSet:function(){return t.get().isSome()},on:function(e){return t.get().each(e)}}),i=_u.DOM,a=document,u=eS(o,e),c=tS(o,e),s=nS(o,e),l=(n=o,function(){n.on((function(e){e.dragging&&r.fire("dragend")})),rS(n)});(r=e).on("mousedown",u),e.on("mousemove",c),e.on("mouseup",s),i.bind(a,"mousemove",c),i.bind(a,"mouseup",l),e.on("remove",(function(){i.unbind(a,"mousemove",c),i.unbind(a,"mouseup",l)}))},iS=function(e){var t,n,r,o,i;oS(e),(t=e).on("drop",(function(e){var n="undefined"!=typeof e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;!Jk(n)&&"false"!==t.dom.getContentEditableParent(n)||e.preventDefault()})),e.getParam("block_unsupported_drop",!0,"boolean")&&(r=function(e){var t;e.isDefaultPrevented()||(t=e.dataTransfer)&&(W(t.types,"Files")||0<t.files.length)&&(e.preventDefault(),"drop"===e.type&&ny(n,"Dropped file type is not supported"))},o=function(e){dm(n,e.target)&&r(e)},i=function(){var e=_u.DOM,t=n.dom,i=document,a=n.inline?n.getBody():n.getDoc(),u=["drop","dragover"];X(u,(function(n){e.bind(i,n,o),t.bind(a,n,r)})),n.on("remove",(function(){X(u,(function(n){e.unbind(i,n,o),t.unbind(a,n,r)}))}))},(n=e).on("init",(function(){Kr.setEditorTimeout(n,i,0)})))},aS=qn,uS=Gn,cS=function(e,t){return ed(e.getBody(),t)},sS=function(e){var t,n=e.selection,r=e.dom,o=r.isBlock,i=e.getBody(),a=Fs(e,i,o,(function(){return xm(e)})),u="sel-"+r.uniqueId(),c="data-mce-selected",s=function(e){return e!==i&&(uS(e)||Kn(e))&&r.isChildOf(e,i)},l=function(e){e&&n.setRng(e)},f=n.getRng,d=function(t,r,o,i){return void 0===i&&(i=!0),e.fire("ShowCaret",{target:r,direction:t,before:o}).isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===t),a.show(o,r))},m=function(e){return ko(e)||To(e)||zo(e)},g=function(e){return m(e.startContainer)||m(e.endContainer)},h=function(t){var n=e.schema.getShortEndedElements(),o=r.createRng(),i=t.startContainer,a=t.startOffset,u=t.endContainer,c=t.endOffset;return xe(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),xe(n,u.nodeName.toLowerCase())?0===c?o.setEndBefore(u):o.setEndAfter(u):o.setEnd(u,c),o},p=function(o){var i=o.cloneNode(!0),a=e.fire("ObjectSelected",{target:o,targetClone:i});if(a.isDefaultPrevented())return null;var s=function(t,o,i){var a=e.$,c=Hr(Mt.fromDom(e.getBody()),"#"+u).fold((function(){return a([])}),(function(e){return a([e.dom])}));0===c.length&&(c=a('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",u)).appendTo(e.getBody());var s=r.createRng();o===i&&_t.ie?(c.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),s.setStartAfter(c[0].firstChild.firstChild),s.setEndAfter(o)):(c.empty().append(ho).append(o).append(ho),s.setStart(c[0].firstChild,1),s.setEnd(c[0].lastChild,0)),c.css({top:r.getPos(t,e.getBody()).y}),c[0].focus();var l=n.getSel();return l.removeAllRanges(),l.addRange(s),s}(o,a.targetClone,i),l=Mt.fromDom(o);return X(Gu(Mt.fromDom(e.getBody()),"*[data-mce-selected]"),(function(e){Pt(l,e)||nr(e,c)})),r.getAttrib(o,c)||o.setAttribute(c,"1"),t=o,y(),s},v=function(e,t){if(!e)return null;if(e.collapsed){if(!g(e)){var n=t?1:-1,o=sl(n,i,e),a=o.getNode(!t);if($s(a))return d(n,a,!!t&&!o.isAtEnd(),!1);var u=o.getNode(t);if($s(u))return d(n,u,!t&&!o.isAtEnd(),!1)}return null}var c=e.startContainer,l=e.startOffset,f=e.endOffset;if(3===c.nodeType&&0===l&&uS(c.parentNode)&&(c=c.parentNode,l=r.nodeIndex(c),c=c.parentNode),1!==c.nodeType)return null;if(f===l+1&&c===e.endContainer){var m=c.childNodes[l];if(s(m))return p(m)}return null},b=function(){t&&t.removeAttribute(c),Hr(Mt.fromDom(e.getBody()),"#"+u).each(bn),t=null},y=function(){a.hide()};return _t.ceFalse&&function(){e.on("mouseup",(function(t){var n=f();n.collapsed&&Kb(e,t.clientX,t.clientY)&&ax(e,n,!1).each(l)})),e.on("click",(function(t){var o=cS(e,t.target);o&&(uS(o)&&(t.preventDefault(),e.focus()),aS(o)&&r.isChildOf(o,n.getNode())&&b())})),e.on("blur NewBlock",b),e.on("ResizeWindow FullscreenStateChanged",a.reposition);var c,m,p,x=function(e){var t=El(e);if(!e.firstChild)return!1;var n,r=Lc.before(e.firstChild),o=t.next(r);return o&&!(ug(n=o)||cg(n)||rg(n)||og(n))},w=function(t,n){var i,a,u=r.getParent(t,o),c=r.getParent(n,o);return!(!u||t===c||!r.isChildOf(u,c)||!1!==uS(cS(e,u)))||u&&(i=u,a=c,!(r.getParent(i,o)===r.getParent(a,o)))&&x(u)};e.on("tap",(function(t){var n=t.target,r=cS(e,n);uS(r)?(t.preventDefault(),ix(e,r).each(v)):s(n)&&ix(e,n).each(v)}),!0),e.on("mousedown",(function(t){var o,a,u,c=t.target;c!==i&&"HTML"!==c.nodeName&&!r.isChildOf(c,i)||!1===Kb(e,t.clientX,t.clientY)||((o=cS(e,c))?uS(o)?(t.preventDefault(),ix(e,o).each(v)):(b(),aS(o)&&t.shiftKey||td(t.clientX,t.clientY,n.getRng())||(y(),n.placeCaretAt(t.clientX,t.clientY))):s(c)?ix(e,c).each(v):!1===$s(c)&&(b(),y(),(a=iC(i,t.clientX,t.clientY))&&(w(c,a.node)||(t.preventDefault(),u=d(1,a.node,a.before,!1),e.getBody().focus(),l(u)))))})),e.on("keypress",(function(e){rd.modifierPressed(e)||uS(n.getNode())&&e.preventDefault()})),e.on("GetSelectionRange",(function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);(n=n.cloneRange()).selectNode(t),e.range=n}})),e.on("SetSelectionRange",(function(e){e.range=h(e.range);var t=v(e.range,e.forward);t&&(e.range=t)})),e.on("AfterSetSelectionRange",(function(e){var t,n=e.range,o=n.startContainer.parentNode;g(n)||"mcepastebin"===o.id||y(),t=o,r.hasClass(t,"mce-offscreen-selection")||b()})),e.on("copy",(function(e){var t,n,o=e.clipboardData;e.isDefaultPrevented()||!e.clipboardData||_t.ie||(t=(n=r.get(u))?n.getElementsByTagName("*")[0]:n)&&(e.preventDefault(),o.clearData(),o.setData("text/html",t.outerHTML),o.setData("text/plain",t.outerText||t.innerText))})),iS(e),m=Hu((function(){var e,t;c.removed||!c.getBody().contains(document.activeElement)||(e=c.selection.getRng()).collapsed&&(t=ux(c,e,!1),c.selection.setRng(t))}),0),(c=e).on("focus",(function(){m.throttle()})),c.on("blur",(function(){m.cancel()})),(p=e).on("init",(function(){p.on("focusin",(function(e){var t,n,r=e.target;Kn(r)&&(t=ed(p.getBody(),r),n=Gn(t)?t:r,p.selection.getNode()!==n&&ix(p,n).each((function(e){return p.selection.setRng(e)})))}))}))}(),{showCaret:d,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Do(e),l(f()),n.scrollIntoView(e))},hideFakeCaret:y,destroy:function(){a.destroy(),t=null}}},lS=function(e){var t,n,r,o=Dt.each,i=rd.BACKSPACE,a=rd.DELETE,u=e.dom,c=e.selection,s=e.parser,f=_t.gecko,d=_t.ie,m=_t.webkit,g="data:text/mce-internal,",h=d?"Text":"URL",p=function(t,r){try{e.getDoc().execCommand(t,!1,r)}catch(n){}},v=function(e){return e.isDefaultPrevented()},b=function(){e.shortcuts.add("meta+a",null,"SelectAll")},y=function(){e.on("keydown",(function(e){if(!v(e)&&e.keyCode===i&&c.isCollapsed()&&0===c.getRng().startOffset){var t=c.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}}))},x=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(function(t){var n;if("HTML"===t.target.nodeName){if(11<_t.ie)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}})))},w=l;return e.on("keydown",(function(t){var n;if(!v(t)&&t.keyCode===rd.BACKSPACE){var r=(n=c.getRng()).startContainer,o=n.startOffset,i=u.getRoot(),a=r;if(n.collapsed&&0===o){for(;a&&a.parentNode&&a.parentNode.firstChild===a&&a.parentNode!==i;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(e.formatter.toggle("blockquote",null,a),(n=u.createRng()).setStart(r,0),n.setEnd(r,0),c.setRng(n))}}})),t=function(e){var t=u.create("body"),n=e.cloneContents();return t.appendChild(n),c.serializer.serialize(t,{format:"html"})},e.on("keydown",(function(n){var r,o,c,s,l,f=n.keyCode;if(!v(n)&&(f===a||f===i)){if(r=e.selection.isCollapsed(),o=e.getBody(),r&&!u.isEmpty(o))return;if(!r&&(c=e.selection.getRng(),s=t(c),(l=u.createRng()).selectNode(e.getBody()),s!==t(l)))return;n.preventDefault(),e.setContent(""),o.firstChild&&u.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}})),_t.windowsPhone||e.on("keyup focusin mouseup",(function(e){rd.modifierPressed(e)||c.normalize()}),!0),m&&(e.inline||u.bind(e.getDoc(),"mousedown mouseup",(function(t){var n;if(t.target===e.getDoc().documentElement)if(n=c.getRng(),e.getBody().focus(),"mousedown"===t.type){if(ko(n.startContainer))return;c.placeCaretAt(t.clientX,t.clientY)}else c.setRng(n)})),e.on("click",(function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==u.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&u.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),c.select(n))})),ms(e)&&e.on("init",(function(){p("DefaultParagraphSeparator",ms(e))})),e.on("init",(function(){e.dom.bind(e.getBody(),"submit",(function(e){e.preventDefault()}))})),y(),s.addNodeFilter("br",(function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),_t.iOS?(e.inline||e.on("keydown",(function(){document.activeElement===document.body&&e.getWin().focus()})),x(),e.on("click",(function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):b()),11<=_t.ie&&(x(),y()),_t.ie&&(b(),p("AutoUrlDetect",!1),e.on("dragstart",(function(t){var n,r,o;(n=t).dataTransfer&&(e.selection.isCollapsed()&&"IMG"===n.target.tagName&&c.select(n.target),0<(r=e.selection.getContent()).length&&(o=g+escape(e.id)+","+escape(r),n.dataTransfer.setData(h,o)))})),e.on("drop",(function(t){var n,r,o,i,a,u;v(t)||(n=(a=t).dataTransfer&&(u=a.dataTransfer.getData(h))&&0<=u.indexOf(g)?(u=u.substr(g.length).split(","),{id:unescape(u[0]),html:unescape(u[1])}):null)&&n.id!==e.id&&(t.preventDefault(),r=ud(t.x,t.y,e.getDoc()),c.setRng(r),o=n.html,i=!0,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):e.execCommand("mceInsertContent",!1,o))}))),f&&(e.on("keydown",(function(t){if(!v(t)&&t.keyCode===i){if(!e.getBody().getElementsByTagName("hr").length)return;if(c.isCollapsed()&&0===c.getRng().startOffset){var n=c.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return u.remove(n),void t.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(u.remove(r),t.preventDefault())}}})),Range.prototype.getClientRects||e.on("mousedown",(function(t){var n;v(t)||"HTML"!==t.target.nodeName||((n=e.getBody()).blur(),Kr.setEditorTimeout(e,(function(){n.focus()})))})),n=function(){var t=u.getAttribs(c.getStart().cloneNode(!1));return function(){var n=c.getStart();n!==e.getBody()&&(u.setAttrib(n,"style",null),o(t,(function(e){n.setAttributeNode(e.cloneNode(!0))})))}},r=function(){return!c.isCollapsed()&&u.getParent(c.getStart(),u.isBlock)!==u.getParent(c.getEnd(),u.isBlock)},e.on("keypress",(function(t){var o;if(!v(t)&&(8===t.keyCode||46===t.keyCode)&&r())return o=n(),e.getDoc().execCommand("delete",!1,null),o(),t.preventDefault(),!1})),u.bind(e.getDoc(),"cut",(function(t){var o;!v(t)&&r()&&(o=n(),Kr.setEditorTimeout(e,(function(){o()})))})),e.getParam("readonly")||e.on("BeforeExecCommand mousedown",(function(){p("StyleWithCSS",!1),p("enableInlineTableEditing",!1),ws(e)||p("enableObjectResizing",!1)})),e.on("SetContent ExecCommand",(function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(u.select("a"),(function(e){var t=e.parentNode,n=u.getRoot();if(t.lastChild===e){for(;t&&!u.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}u.add(t,"br",{"data-mce-bogus":1})}}))})),e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),_t.mac&&e.on("keydown",(function(t){!rd.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})),y()),{refreshContentEditable:w,isHidden:function(){if(!f||e.removed)return!1;var t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},fS=_u.DOM,dS=function(e){return ve(e,(function(e){return!1===P(e)}))},mS=function(e){var t,n=e.settings,r=e.editorUpload.blobCache;return dS({allow_conditional_comments:n.allow_conditional_comments,allow_html_data_urls:n.allow_html_data_urls,allow_svg_data_urls:n.allow_svg_data_urls,allow_html_in_named_anchor:n.allow_html_in_named_anchor,allow_script_urls:n.allow_script_urls,allow_unsafe_link_target:n.allow_unsafe_link_target,convert_fonts_to_spans:n.convert_fonts_to_spans,fix_list_elements:n.fix_list_elements,font_size_legacy_values:n.font_size_legacy_values,forced_root_block:n.forced_root_block,forced_root_block_attrs:n.forced_root_block_attrs,padd_empty_with_br:n.padd_empty_with_br,preserve_cdata:n.preserve_cdata,remove_trailing_brs:n.remove_trailing_brs,inline_styles:n.inline_styles,root_name:(t=e).inline?t.getElement().nodeName.toLowerCase():void 0,validate:!0,blob_cache:r,images_dataimg_filter:n.images_dataimg_filter})},gS=function(e){var t=e.dom.getRoot();e.inline||Uf(e)&&e.selection.getStart(!0)!==t||Il(t).each((function(t){var n,r,o,i,a=t.getNode(),u=Hn(a)?Il(a).getOr(t):t;_t.browser.isIE()?(n=e,r=u.toRange(),o=Mt.fromDom(n.getBody()),i=(nm(n)?E.from(r):E.none()).map(rm).filter(tm(o)),n.bookmark=i.isSome()?i:n.bookmark):e.selection.setRng(u.toRange())}))},hS=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("Init"),e.focus(!0),gS(e),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&Kr.setEditorTimeout(t,(function(){var e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus);e.destroyed||e.focus()}),100)},pS=function(e){return e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader},vS=function(e,t){var n,r,o,i,a=pS(e),u=xs(e),c=function(){a.unloadAll(t),e.inline||e.ui.styleSheetLoader.unloadAll(u)},s=function(){e.removed?c():(e.on("remove",c),hS(e))};Lr.all((n=e,r=t,o=u,i=[new Lr((function(e,t){return pS(n).loadAll(r,e,t)}))],n.inline?i:i.concat([new Lr((function(e,t){return n.ui.styleSheetLoader.loadAll(o,e,t)}))]))).then(s)["catch"](s)},bS=function(e,t){var n=e.settings,r=e.getDoc(),o=e.getBody();n.browser_spellcheck||n.gecko_spellcheck||(r.body.spellcheck=!1,fS.setAttrib(o,"spellcheck","false")),e.quirks=lS(e),e.fire("PostRender");var i,a,u,c,s,l,f=e.getParam("directionality",Bu.isRtl()?"rtl":void 0);void 0!==f&&(o.dir=f),n.protect&&e.on("BeforeSetContent",(function(e){Dt.each(n.protect,(function(t){e.content=e.content.replace(t,(function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"}))}))})),e.on("SetContent",(function(){e.addVisual(e.getBody())})),!1===t&&e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",(function(t){e.composing="compositionstart"===t.type})),0<e.contentStyles.length&&(i="",Dt.each(e.contentStyles,(function(e){i+=e+"\r\n"})),e.dom.addStyle(i)),vS(e,e.contentCSS),n.content_style&&(a=e,u=n.content_style,c=Mt.fromDom(a.getBody()),s=sn(cn(c)),l=Mt.fromTag("style"),Qn(l,"type","text/css"),hn(l,Mt.fromText(u)),hn(s,l),a.on("remove",(function(){bn(l)})))},yS=function(e,t){var n=e.settings,r=e.getElement(),o=e.getDoc();n.inline||(e.getElement().style.visibility=e.orgVisibility),t||e.inline||(o.open(),o.write(e.iframeHTML),o.close()),e.inline&&(fS.addClass(r,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=r,e.contentAreaContainer=r);var i,a,u,c,s=e.getBody();s.disabled=!0,e.readonly=!!n.readonly,e.readonly||(e.inline&&"static"===fS.getStyle(s,"position",!0)&&(s.style.position="relative"),s.contentEditable=e.getParam("content_editable_state",!0)),s.disabled=!1,e.editorUpload=py(e),e.schema=ki(n),e.dom=_u(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:e.getParam("content_css_cors",!1,"boolean"),referrerPolicy:vs(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=((a=db(mS(i=e),i.schema)).addAttributeFilter("src,href,style,tabindex",(function(e,t){for(var n,r,o=e.length,a=i.dom,u="data-mce-"+t;o--;)if((r=(n=e[o]).attr(t))&&!n.attr(u)){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(u,r),n.attr(t,r)):"tabindex"===t?(n.attr(u,r),n.attr(t,null)):n.attr(u,i.convertURL(r,t,n.name))}})),a.addNodeFilter("script",(function(e){for(var t=e.length;t--;){var n=e[t],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}})),i.settings.preserve_cdata&&a.addNodeFilter("#cdata",(function(e){for(var t=e.length;t--;){var n=e[t];n.type=8,n.name="#comment",n.value="[CDATA["+i.dom.encode(n.value)+"]]"}})),a.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){for(var t=e.length,n=i.schema.getNonEmptyElements();t--;){var r=e[t];r.isEmpty(n)&&0===r.getAll("br").length&&(r.append(new Am("br",1)).shortEnded=!0)}})),a),e.serializer=vb((c=(u=e).settings,De(De({},mS(u)),dS({url_converter:c.url_converter,url_converter_scope:c.url_converter_scope,element_format:c.element_format,entities:c.entities,entity_encoding:c.entity_encoding,indent:c.indent,indent_after:c.indent_after,indent_before:c.indent_before,block_elements:c.block_elements,boolean_attributes:c.boolean_attributes,custom_elements:c.custom_elements,extended_valid_elements:c.extended_valid_elements,invalid_elements:c.invalid_elements,invalid_styles:c.invalid_styles,move_caret_before_on_enter_elements:c.move_caret_before_on_enter_elements,non_empty_elements:c.non_empty_elements,schema:c.schema,self_closing_elements:c.self_closing_elements,short_ended_elements:c.short_ended_elements,special:c.special,text_block_elements:c.text_block_elements,text_inline_elements:c.text_inline_elements,valid_children:c.valid_children,valid_classes:c.valid_classes,valid_elements:c.valid_elements,valid_styles:c.valid_styles,verify_html:c.verify_html,whitespace_elements:c.whitespace_elements}))),e),e.selection=Gv(e.dom,e.getWin(),e.serializer,e),e.annotator=Qf(e),e.formatter=ky(e),e.undoManager=_y(e),e._nodeChangeDispatcher=new $k(e),e._selectionOverrides=sS(e),Tw(e),qk(e),Pv(e)||Xk(e);var l,f,d=Pv(l=e)?Au(null):Uk(l);Ow(e,d),ms(f=e)&&f.on("NodeChange",g(Dw,f)),Dy(e),e.fire("PreInit"),Hv(e).fold((function(){bS(e,!1)}),(function(t){e.setProgressState(!0),t.then((function(t){e.setProgressState(!1),bS(e,t)}),(function(t){e.notificationManager.open({type:"error",text:String(t)}),bS(e,!0)}))}))},xS=_u.DOM,wS=function(e){var t=e.getParam("doctype","<!DOCTYPE html>")+"<html><head>";e.getParam("document_base_url","")!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=fs(e,"body_id","tinymce"),r=fs(e,"body_class","");return ds(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+ds(e)+'" />'),t+'</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'"><br></body></html>'},CS=function(e,t){var n,r,o,i,a=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),u=(n=e.id,r=a,t.height,o=e.getParam("iframe_attrs",{}),i=Mt.fromTag("iframe"),Zn(i,o),Zn(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Uu(i,"tox-edit-area__iframe"),i.dom);u.onload=function(){u.onload=null,e.fire("load")};var c=function(e,t){if(document.domain!==window.location.hostname&&_t.browser.isIE()){var n=dy("mce");e[n]=function(){yS(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return xS.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=wS(e),xS.add(t.iframeContainer,u),c},kS=_u.DOM,SS=function e(t,n,r){var o=Qb.get(r),i=Qb.urls[r]||t.documentBaseUrl.replace(/\/$/,"");if(r=Dt.trim(r),o&&-1===Dt.inArray(n,r)){if(Dt.each(Qb.dependencies(r),(function(r){e(t,n,r)})),t.plugins[r])return;try{var a=new o(t,i,t.$);(t.plugins[r]=a).init&&(a.init(t,i),n.push(r))}catch(DO){!function(e,t,n){var r=Bu.translate(["Failed to initialize plugin: {0}",t]);nd(e,"PluginLoadError",{message:r}),ay(r,n),ny(e,r)}(t,r,DO)}}},_S=function(e){return e.replace(/^\-/,"")},OS=function(e){return{editorContainer:e,iframeContainer:e,api:{}}},ES=function(e){var t,n,r=e.getElement();return e.inline?OS(null):(t=r,n=kS.create("div"),kS.insertAfter(n,t),OS(n))},TS=function(e){var t,n,r,o=e.getElement();return e.orgDisplay=o.style.display,A(ks(e))?e.theme.renderUI():L(ks(e))?(n=(t=e).getElement(),(r=ks(t)(t,n)).editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||t.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||t.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:n.offsetHeight,r):ES(e)},zS=function(e){var t,n,r,o,i,a,u,c,s;e.fire("ScriptsLoaded"),t=e,n=Dt.trim(ps(t)),r=t.ui.registry.getAll().icons,o=De(De({},jb.get("default").icons),jb.get(n).icons),fe(o,(function(e,n){xe(r,n)||t.ui.registry.addIcon(n,e)})),u=ks(i=e),A(u)?(i.settings.theme=_S(u),a=Zb.get(u),i.theme=new a(i,Zb.urls[u]),i.theme.init&&i.theme.init(i,Zb.urls[u]||i.documentBaseUrl.replace(/\/$/,""),i.$)):i.theme={},c=e,s=[],Dt.each(_s(c).split(/[ ,]/),(function(e){SS(c,s,_S(e))}));var f,d,m,g=TS(e);f=e,d=E.from(g.api).getOr({}),m={show:E.from(d.show).getOr(l),hide:E.from(d.hide).getOr(l),disable:E.from(d.disable).getOr(l),isDisabled:E.from(d.isDisabled).getOr(C),enable:function(){f.mode.isReadOnly()||E.from(d.enable).map(w)}},f.ui=De(De({},f.ui),m);var h,p,v,b={editorContainer:g.editorContainer,iframeContainer:g.iframeContainer};return e.editorContainer=b.editorContainer?b.editorContainer:null,sy(e),e.inline?yS(e):(v=CS(h=e,p=b),p.editorContainer&&(xS.get(p.editorContainer).style.display=h.orgDisplay,h.hidden=xS.isHidden(p.editorContainer)),h.getElement().style.display="none",xS.setAttrib(h.id,"aria-hidden","true"),void(v||yS(h)))},DS=_u.DOM,AS=function(e){return"-"===e.charAt(0)},MS=function(e,t){var n,r=bs(t),o=t.getParam("language_url","","string");!1===Bu.hasCode(r)&&"en"!==r&&(n=""!==o?o:t.editorManager.baseURL+"/langs/"+r+".js",e.add(n,l,void 0,(function(){ry(t,"LanguageLoadError",oy("language",n,r))})))},RS=function(e,t,n){return E.from(t).filter((function(e){return 0<e.length&&!jb.has(e)})).map((function(t){return{url:e.editorManager.baseURL+"/icons/"+t+"/icons"+n+".js",name:E.some(t)}}))},NS=function(e,t,n){var r,o=RS(t,"default",n),i=(r=t,E.from(r.getParam("icons_url","","string")).filter((function(e){return 0<e.length})).map((function(e){return{url:e,name:E.none()}})).orThunk((function(){return RS(t,ps(t),"")})));X(function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t}([o,i]),(function(n){e.add(n.url,l,void 0,(function(){var e,r,o;e=t,r=n.url,o=n.name.getOrUndefined(),ry(e,"IconsLoadError",oy("icons",r,o))}))}))},BS=function(e,t){var n,r,o,i,a,u,c=zu.ScriptLoader;n=c,o=t,i=function(){var n,r;MS(c,e),NS(c,e,t),n=e,r=t,Dt.each(n.getParam("external_plugins"),(function(e,t){Qb.load(t,e,l,void 0,(function(){iy(n,e,t)})),n.settings.plugins+=" "+t})),Dt.each(_s(n).split(/[ ,]/),(function(e){var t,o;(e=Dt.trim(e))&&!Qb.urls[e]&&(AS(e)?(e=e.substr(1,e.length),t=Qb.dependencies(e),Dt.each(t,(function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"},o=Qb.createUrl(t,e);Qb.load(o.resource,o,l,void 0,(function(){iy(n,o.prefix+o.resource+o.suffix,o.resource)}))}))):(o={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"},Qb.load(e,o,l,void 0,(function(){iy(n,o.prefix+o.resource+o.suffix,e)}))))})),c.loadQueue((function(){e.removed||zS(e)}),e,(function(){e.removed||zS(e)}))},u=ks(r=e),A(u)?(AS(u)||Zb.urls.hasOwnProperty(u)||((a=r.getParam("theme_url"))?Zb.load(u,r.documentBaseURI.toAbsolute(a)):Zb.load(u,"themes/"+u+"/theme"+o+".js")),n.loadQueue((function(){Zb.waitFor(u,i)}))):i()},PS=function(e){var t=e.id;Bu.setCode(bs(e));var n,r,o,i,a,u=function t(){DS.unbind(window,"ready",t),e.render()};Ri.Event.domLoaded?e.getElement()&&_t.contentEditable&&(n=Mt.fromDom(e.getElement()),r=Q(n.dom.attributes,(function(e,t){return e[t.name]=t.value,e}),{}),e.on("remove",(function(){K(n.dom.attributes,(function(e){return nr(n,e.name),0})),Zn(n,r)})),e.ui.styleSheetLoader=(o=n,i=e,Jr.forElement(o,{contentCssCors:i.getParam("content_css_cors"),referrerPolicy:vs(i)})),e.getParam("inline")?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden"),(a=e.getElement().form||DS.getParent(t,"form"))&&(e.formElement=a,e.getParam("hidden_input")&&!Ln(e.getElement())&&(DS.insertAfter(DS.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},DS.bind(a,"submit reset",e.formEventDelegate),e.on("reset",(function(){e.resetContent()})),!e.getParam("submit_patch")||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),a._mceOldSubmit(a)})),e.windowManager=ey(e),e.notificationManager=Jb(e),"xml"===e.getParam("encoding")&&e.on("GetContent",(function(e){e.save&&(e.content=DS.encode(e.content))})),e.getParam("add_form_submit_trigger")&&e.on("submit",(function(){e.initialized&&e.save()})),e.getParam("add_unload_trigger")&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),BS(e,e.suffix)):DS.bind(window,"ready",u)},HS=function(e,t){return n=t,Lv(e).editor.addVisual(n);var n},IS={"font-size":"size","font-family":"face"},LS=function(e,t,n){return Jh(Mt.fromDom(n),(function(t){return ar(n=t,e).orThunk((function(){return"font"===Lt(n)?ye(IS,e).bind((function(e){return tr(n,e)})):E.none()}));var n}),(function(e){return Pt(Mt.fromDom(t),e)}))},VS=function(e){return function(t,n){return E.from(n).map(Mt.fromDom).filter(jt).bind((function(n){return LS(e,t,n.dom).or((r=e,o=n.dom,E.from(_u.DOM.getStyle(o,r,!0))));var r,o})).getOr("")}},FS=VS("font-size"),jS=f((function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")}),VS("font-family")),US=function(e){return Il(e.getBody()).map((function(e){var t=e.container();return Vn(t)?t.parentNode:t}))},$S=function(e,t){return n=e,E.from(n.selection.getRng()).bind((function(e){var t=n.getBody();return e.startContainer===t&&0===e.startOffset?E.none():E.from(n.selection.getStart(!0))})).orThunk(g(US,e)).map(Mt.fromDom).filter(jt).map(t);var n},WS=function(e,t){if(/^[0-9.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=(a=e,Dt.explode(a.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))),o=(i=e,Dt.explode(i.getParam("font_size_classes","")));return o?o[n-1]||t:r[n-1]||t}return t}return t;var i,a},qS=function(e,t){var n,r=WS(e,t);e.formatter.toggle("fontname",{value:(n=r.split(/\s*,\s*/),G(n,(function(e){return-1===e.indexOf(" ")||Ge(e,'"')||Ge(e,"'")?e:"'"+e+"'"})).join(","))}),e.nodeChanged()},GS=function(e,t){var n,r,o,i,a="string"!=typeof(n=t)?(r=Dt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};o=a.content,i=a.details,Iv(e).editor.insertContent(o,i)},XS=Dt.each,KS=Dt.map,YS=Dt.inArray,JS=(QS.prototype.execCommand=function(e,t,n,r){var o,i,a=!1,c=this;if(!c.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus?(i=c.editor,um(i).each((function(e){return i.selection.setRng(e)}))):c.editor.focus(),(r=c.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n})).isDefaultPrevented())return!1;var s=e.toLowerCase();if(o=c.commands.exec[s])return o(s,t,n),c.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(XS(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(e,t,n))return c.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!(a=!0)})),a)return a;if(c.editor.theme&&c.editor.theme.execCommand&&c.editor.theme.execCommand(e,t,n))return c.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{a=c.editor.getDoc().execCommand(e,t,n)}catch(u){}return!!a&&(c.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0)}},QS.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(p){}return!1}},QS.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(p){}}},QS.prototype.addCommands=function(e,t){void 0===t&&(t="exec");var n=this;XS(e,(function(e,r){XS(r.toLowerCase().split(","),(function(r){n.commands[t][r]=e}))}))},QS.prototype.addCommand=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,o,i,a){return t.call(n||r.editor,o,i,a)}},QS.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(o){}return!1},QS.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},QS.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},QS.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},QS.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},QS.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},QS.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:void 0),this.editor.nodeChanged()},QS.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},QS.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},QS.prototype.setupCommands=function(e){var t=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":l,"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(n){var r,o,i=e.getDoc();try{t.execNativeCommand(n)}catch(m){r=!0}"paste"!==n||i.queryCommandEnabled(n)||(r=!0),!r&&i.queryCommandSupported(n)||(o=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."),_t.mac&&(o=o.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:o,type:"error"}))},unlink:function(){var t;e.selection.isCollapsed()?(t=e.dom.getParent(e.selection.getStart(),"a"))&&e.dom.remove(t,!0):e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),XS("left,center,right,justify".split(","),(function(t){r!==t&&e.formatter.remove("align"+t)})),"none"!==r&&t.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;t.execNativeCommand(n);var o=e.dom.getParent(e.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(t.storeSelection(),e.dom.split(r,o),t.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){t.toggleFormat(e)},"ForeColor,HiliteColor":function(e,n,r){t.toggleFormat(e,r)},FontName:function(t,n,r){qS(e,r)},FontSize:function(t,n,r){var o,i;i=r,(o=e).formatter.toggle("fontsize",{value:WS(o,i)}),o.nodeChanged()},LineHeight:function(t,n,r){var o,i;i=r,(o=e).undoManager.transact((function(){o.formatter.toggle("lineheight",{value:String(i)}),o.nodeChanged()}))},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){t.toggleFormat("blockquote")},FormatBlock:function(e,n,r){return t.toggleFormat(r||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(n,r,o){var i=o||e.selection.getNode();i!==e.getBody()&&(t.storeSelection(),e.dom.remove(i,!0),t.restoreSelection())},mceSelectNodeDepth:function(t,n,r){var o=0;e.dom.getParent(e.selection.getNode(),(function(t){if(1===t.nodeType&&o++===r)return e.selection.select(t),!1}),e.getBody())},mceSelectNode:function(t,n,r){e.selection.select(r)},mceInsertContent:function(t,n,r){GS(e,r)},mceInsertRawHTML:function(t,n,r){e.selection.setContent("tiny_mce_marker");var o=e.getContent();e.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(t,n,r){Mk(e,r)},mceToggleFormat:function(e,n,r){t.toggleFormat(r)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){kw(e,t)},mceRepaint:l,InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,n,r){e.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceInsertLink:function(t,n,r){"string"==typeof r&&(r={href:r});var o=e.dom.getParent(e.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,o)},selectAll:function(){var t,n=e.dom.getParent(e.selection.getStart(),qn);n&&((t=e.dom.createRng()).selectNodeContents(n),e.selection.setRng(t))},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return bk(e,r),!0}});var n=function(t){return function(){var n=e.selection,r=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks(),o=KS(r,(function(n){return!!e.formatter.matchNode(n,t)}));return-1!==YS(o,!0)}};t.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return t.isFormatMatch(e)},mceBlockQuote:function(){return t.isFormatMatch("blockquote")},Outdent:function(){return xw(e)},"InsertUnorderedList,InsertOrderedList":function(t){var n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state"),t.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),t.addQueryValueHandler("FontName",(function(){return $S(t=e,(function(e){return jS(t.getBody(),e.dom)})).getOr("");var t}),this),t.addQueryValueHandler("FontSize",(function(){return $S(t=e,(function(e){return FS(t.getBody(),e.dom)})).getOr("");var t}),this),t.addQueryValueHandler("LineHeight",(function(){return $S(t=e,(function(e){var n=Mt.fromDom(t.getBody());return Jh(e,(function(e){return ar(e,"line-height")}),g(Pt,n)).getOrThunk((function(){var t=parseFloat(or(e,"line-height")),n=parseFloat(or(e,"font-size"));return String(t/n)}))})).getOr("");var t}),this)},QS);function QS(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var ZS="data-mce-contenteditable",e_=function(e,t,n){var r,o;Wu(e,t)&&!1===n?(o=t,Vu(r=e)?r.dom.classList.remove(o):ju(r,o),$u(r)):n&&Uu(e,t)},t_=function(e,t,r){try{e.getDoc().execCommand(t,!1,String(r))}catch(n){}},n_=function(e,t){e.dom.contentEditable=t?"true":"false"},r_=function(e,t){var n,r,o,i=Mt.fromDom(e.getBody());e_(i,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),o=e,E.from(o.selection.getNode()).each((function(e){e.removeAttribute("data-mce-selected")})),e.readonly=!0,n_(i,!1),X(Gu(i,'*[contenteditable="true"]'),(function(e){Qn(e,ZS,"true"),n_(e,!1)}))):(e.readonly=!1,n_(i,!0),X(Gu(i,"*["+ZS+'="true"]'),(function(e){nr(e,ZS),n_(e,!0)})),t_(e,"StyleWithCSS",!1),t_(e,"enableInlineTableEditing",!1),t_(e,"enableObjectResizing",!1),(xm(r=e)||ym(r))&&e.focus(),(n=e).selection.setRng(n.selection.getRng()),e.nodeChanged())},o_=function(e){return e.readonly},i_=function(e){e.parser.addAttributeFilter("contenteditable",(function(t){o_(e)&&X(t,(function(e){e.attr(ZS,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(ZS,(function(t){o_(e)&&X(t,(function(e){e.attr("contenteditable",e.attr(ZS))}))})),e.serializer.addTempAttr(ZS)},a_=function(e,t){var n,r;"click"!==t.type||rd.metaKeyPressed(t)||(n=Mt.fromDom(t.target),r=e,Ir(n,"a",(function(e){return Pt(e,Mt.fromDom(r.getBody()))})).bind((function(e){return tr(e,"href")})).each((function(n){var r,o,i,a,u;t.preventDefault(),/^#/.test(n)?(r=e.dom.select(n+',[name="'+(Ge(o=n,i="#")?(a=o,u=i.length,a.substring(u)):o)+'"]')).length&&e.selection.scrollIntoView(r[0],!0):window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})))},u_=Dt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),c_=(s_.isNative=function(e){return!!u_[e.toLowerCase()]},s_.prototype.fire=function(e,t){var n=e.toLowerCase(),r=t||{};r.type=n,r.target||(r.target=this.scope),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=k},r.stopPropagation=function(){r.isPropagationStopped=k},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=k},r.isDefaultPrevented=C,r.isPropagationStopped=C,r.isImmediatePropagationStopped=C),this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i<a;i++){var u=o[i];if(u.once&&this.off(n,u.func),r.isImmediatePropagationStopped())return r.stopPropagation(),r;if(!1===u.func.call(this.scope,r))return r.preventDefault(),r}return r},s_.prototype.on=function(e,t,n,r){if(!1===t&&(t=C),t){var o={func:t};r&&Dt.extend(o,r);for(var i=e.toLowerCase().split(" "),a=i.length;a--;){var u=i[a],c=this.bindings[u];c||(c=this.bindings[u]=[],this.toggleEvent(u,!0)),n?c.unshift(o):c.push(o)}}return this},s_.prototype.off=function(e,t){var n=this;if(e)for(var r=e.toLowerCase().split(" "),o=r.length;o--;){var i=r[o],a=this.bindings[i];if(!i)return fe(this.bindings,(function(e,t){n.toggleEvent(t,!1),delete n.bindings[t]})),this;if(a){if(t)for(var u=a.length;u--;)a[u].func===t&&(a=a.slice(0,u).concat(a.slice(u+1)),this.bindings[i]=a);else a.length=0;a.length||(this.toggleEvent(e,!1),delete this.bindings[i])}}else fe(this.bindings,(function(e,t){n.toggleEvent(t,!1)})),this.bindings={};return this},s_.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},s_.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},s_);function s_(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||C}var l_,f_=function(e){return e._eventDispatcher||(e._eventDispatcher=new c_({scope:e,toggleEvent:function(t,n){c_.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher},d_={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=f_(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return f_(this).on(e,t,n)},off:function(e,t){return f_(this).off(e,t)},once:function(e,t){return f_(this).once(e,t)},hasEventListeners:function(e){return f_(this).has(e)}},m_=_u.DOM,g_=function(e,t){if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return e.getDoc().documentElement;var n=Cs(e);return n?(e.eventRoot||(e.eventRoot=m_.select(n)[0]),e.eventRoot):e.getBody()},h_=function(e,t,n){var r;(r=e).hidden||o_(r)?o_(e)&&a_(e,n):e.fire(t,n)},p_=function(e,t){var n;if(e.delegates||(e.delegates={}),!e.delegates[t]&&!e.removed){var r=g_(e,t);if(Cs(e)){if(l_||(l_={},e.editorManager.on("removeEditor",(function(){e.editorManager.activeEditor||l_&&(fe(l_,(function(t,n){e.dom.unbind(g_(e,n))})),l_=null)}))),l_[t])return;n=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();a!==r&&!m_.isChildOf(r,a)||h_(o[i],t,n)}},l_[t]=n,m_.bind(r,t,n)}else n=function(n){h_(e,t,n)},m_.bind(r,t,n),e.delegates[t]=n}},v_=De(De({},d_),{bindPendingEventDelegates:function(){var e=this;Dt.each(e._pendingNativeEvents,(function(t){p_(e,t)}))},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?p_(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(g_(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t=e.getBody(),n=e.dom;e.delegates&&(fe(e.delegates,(function(t,n){e.dom.unbind(g_(e,n),n,t)})),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}}),b_=["design","readonly"],y_=function(e,t,n,r){var o,i=n[t.get()],a=n[r];try{a.activate()}catch(DO){return void console.error("problem while activating editor mode "+r+":",DO)}i.deactivate(),i.editorReadOnly!==a.editorReadOnly&&r_(e,a.editorReadOnly),t.set(r),o=r,e.fire("SwitchMode",{mode:o})},x_=function(e){var t,n,r=Au("design"),o=Au({design:{activate:l,deactivate:l,editorReadOnly:!1},readonly:{activate:l,deactivate:l,editorReadOnly:!0}});return(t=e).serializer?i_(t):t.on("PreInit",(function(){i_(t)})),(n=e).on("ShowCaret",(function(e){o_(n)&&e.preventDefault()})),n.on("ObjectSelected",(function(e){o_(n)&&e.preventDefault()})),{isReadOnly:function(){return o_(e)},set:function(t){return function(e,t,n,r){if(r!==n.get()){if(!xe(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?y_(e,n,t,r):e.on("init",(function(){return y_(e,n,t,r)}))}}(e,o.get(),r,t)},get:function(){return r.get()},register:function(e,t){o.set(function(e,t,n){var r;if(W(b_,t))throw new Error("Cannot override default mode "+t);return De(De({},e),((r={})[t]=De(De({},n),{deactivate:function(){try{n.deactivate()}catch(DO){console.error("problem while deactivating editor mode "+t+":",DO)}}}),r))}(o.get(),e,t))}}},w_=Dt.each,C_=Dt.explode,k_={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},S_=Dt.makeMap("alt,ctrl,shift,meta,access"),__=function(e){var t,n={};w_(C_(e.toLowerCase(),"+"),(function(e){e in S_?n[e]=!0:/^[0-9]{2,}$/.test(e)?n.keyCode=parseInt(e,10):(n.charCode=e.charCodeAt(0),n.keyCode=k_[e]||e.toUpperCase().charCodeAt(0))}));var r=[n.keyCode];for(t in S_)n[t]?r.push(t):n[t]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,_t.mac?n.ctrl=!0:n.shift=!0),n.meta&&(_t.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},O_=(E_.prototype.add=function(e,t,n,r){var o=this,i=o.normalizeCommandFunc(n);return w_(C_(Dt.trim(e)),(function(e){var n=o.createShortcut(e,t,i,r);o.shortcuts[n.id]=n})),!0},E_.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},E_.prototype.normalizeCommandFunc=function(e){var t=this,n=e;return"string"==typeof n?function(){t.editor.execCommand(n,!1,null)}:Dt.isArray(n)?function(){t.editor.execCommand(n[0],n[1],n[2])}:n},E_.prototype.createShortcut=function(e,t,n,r){var o=Dt.map(C_(e,">"),__);return o[o.length-1]=Dt.extend(o[o.length-1],{func:n,scope:r||this.editor}),Dt.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},E_.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},E_.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},E_.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},E_.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},E_);function E_(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var t=this;e.on("keyup keypress keydown",(function(e){!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(w_(t.shortcuts,(function(n){if(t.matchShortcut(e,n))return t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n),!0})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}var T_=function(){var e,t,n,r,o,i,a,u,c=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(e,t){return function(n,r){return e[n.toLowerCase()]=De(De({},r),{type:t})}})(e={},"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:c.addAutocompleter,addButton:c.addButton,addContextForm:c.addContextForm,addContextMenu:c.addContextMenu,addContextToolbar:c.addContextToolbar,addIcon:c.addIcon,addMenuButton:c.addMenuButton,addMenuItem:c.addMenuItem,addNestedMenuItem:c.addNestedMenuItem,addSidebar:c.addSidebar,addSplitButton:c.addSplitButton,addToggleButton:c.addToggleButton,addGroupToolbarButton:c.addGroupToolbarButton,addToggleMenuItem:c.addToggleMenuItem,getAll:c.getAll}},z_=Dt.each,D_=Dt.trim,A_="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),M_={ftp:21,http:80,https:443,mailto:25},R_=(N_.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},N_.getDocumentBaseUrl=function(e){var t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname;return/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},N_.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},N_.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new N_(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},N_.prototype.toAbsolute=function(e,t){var n=new N_(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},N_.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=M_[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},N_.prototype.toRelPath=function(e,t){var n,r,o=0,i="",a=e.substring(0,e.lastIndexOf("/")).split("/"),u=t.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return t;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},N_.prototype.toAbsPath=function(e,t){var n,r,o=0,i=[],a=/\/$/.test(t)?"/":"",u=e.split("/"),c=t.split("/");for(z_(u,(function(e){e&&i.push(e)})),u=i,n=c.length-1,i=[];0<=n;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?0<o?o--:i.push(c[n]):o++);return 0!==(r=(n=u.length-o)<=0?re(i).join("/"):u.slice(0,n).join("/")+"/"+re(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},N_.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},N_);function N_(e,t){e=D_(e),this.settings=t||{};var n,r,o,i,a=this.settings.base_uri,u=this;/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)?u.source=e:(n=0===e.indexOf("//"),0!==e.indexOf("/")||n||(e=(a&&a.protocol||"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(r=this.settings.base_uri?this.settings.base_uri.path:new N_(document.location.href).directory,e=this.settings.base_uri&&""==this.settings.base_uri.protocol?"//mce_host"+u.toAbsPath(r,e):(o=/([^#?]*)([#?]?.*)/.exec(e),(a&&a.protocol||"http")+"://mce_host"+u.toAbsPath(r,o[1])+o[2])),e=e.replace(/@@/g,"(mce_at)"),i=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),z_(A_,(function(e,t){var n=(n=i[t])&&n.replace(/\(mce_at\)/g,"@@");u[e]=n})),a&&(u.protocol||(u.protocol=a.protocol),u.userInfo||(u.userInfo=a.userInfo),u.port||"mce_host"!==u.host||(u.port=a.port),u.host&&"mce_host"!==u.host||(u.host=a.host),u.source=""),n&&(u.protocol=""))}var B_=_u.DOM,P_=Dt.extend,H_=Dt.each,I_=Dt.resolve,L_=_t.ie,V_=(F_.prototype.render=function(){PS(this)},F_.prototype.focus=function(e){var t,n;n=e,(t=this).removed||(n?Cm:wm)(t)},F_.prototype.hasFocus=function(){return xm(this)},F_.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?I_(r):0,o=I_(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,t)},F_.prototype.translate=function(e){return Bu.translate(e)},F_.prototype.getParam=function(e,t,n){return Fb(this,e,t,n)},F_.prototype.hasPlugin=function(e,t){return!(!W(_s(this).split(/[ ,]/),e)||t&&void 0===Qb.get(e))},F_.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},F_.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},F_.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},F_.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},F_.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},F_.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},F_.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},F_.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},F_.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},F_.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(B_.show(this.getContainer()),B_.hide(this.id)),this.load(),this.fire("show"))},F_.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(L_&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(B_.hide(e.getContainer()),B_.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},F_.prototype.isHidden=function(){return!!this.hidden},F_.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},F_.prototype.load=function(e){var t=this.getElement();if(this.removed)return"";if(t){(e=e||{}).load=!0;var n=Ln(t)?t.value:t.innerHTML,r=this.setContent(n,e);return e.element=t,e.no_events||this.fire("LoadContent",e),e.element=t=null,r}},F_.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Ln(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=B_.getParent(r.id,"form"))&&H_(n.elements,(function(e){if(e.name===r.id)return e.value=t,!1}))),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},F_.prototype.setContent=function(e,t){return yb(this,e,t)},F_.prototype.getContent=function(e){return bb(this,e)},F_.prototype.insertContent=function(e,t){t&&(e=P_({content:e},t)),this.execCommand("mceInsertContent",!1,e)},F_.prototype.resetContent=function(e){void 0===e?yb(this,this.startContent,{format:"raw"}):yb(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},F_.prototype.isDirty=function(){return!this.isNotDirty},F_.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},F_.prototype.getContainer=function(){return this.container||(this.container=B_.get(this.editorContainer||this.id+"_parent")),this.container},F_.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},F_.prototype.getElement=function(){return this.targetElm||(this.targetElm=B_.get(this.id)),this.targetElm},F_.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},F_.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},F_.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},F_.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},F_.prototype.addVisual=function(e){HS(this,e)},F_.prototype.remove=function(){Cb(this)},F_.prototype.destroy=function(e){kb(this,e)},F_.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},F_.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},F_.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},F_.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},F_.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},F_.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},F_);function F_(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,P_(this,v_),this.settings=Lb(this,e,this.documentBaseUrl,n.defaultSettings,t),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(zu.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),_u.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Pu.languageLoad=this.settings.language_load,Pu.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new R_(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new O_(this),this.editorCommands=new JS(this),this.settings.cache_suffix&&(_t.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:T_(),styleSheetLoader:void 0,show:l,hide:l,enable:l,disable:l,isDisabled:C};var o=x_(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=bu.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}var j_,U_=_u.DOM,$_=Dt.explode,W_=Dt.each,q_=Dt.extend,G_=0,X_=!1,K_=[],Y_=[],J_=function(e){var t=e.type;W_(tO.get(),(function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e)}}))},Q_=function(e){e!==X_&&(e?bu(window).on("resize scroll",J_):bu(window).off("resize scroll",J_),X_=e)},Z_=function(e){var t=Y_;delete K_[e.id];for(var n=0;n<K_.length;n++)if(K_[n]===e){K_.splice(n,1);break}return Y_=Y(Y_,(function(t){return e!==t})),tO.activeEditor===e&&(tO.activeEditor=0<Y_.length?Y_[0]:null),tO.focusedEditor===e&&(tO.focusedEditor=null),t.length!==Y_.length},eO="CSS1Compat"!==document.compatMode,tO=De(De({},d_),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:bu,majorVersion:"5",minorVersion:"7.1",releaseDate:"2021-03-17",editors:K_,i18n:Bu,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t="",n=R_.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));var r,o=window.tinymce||window.tinyMCEPreInit;if(o)e=o.base||o.baseURL,t=o.suffix;else{for(var i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++)if(""!==(i=a[u].src||"")){var c=i.substring(i.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(i)){-1!==c.indexOf(".min")&&(t=".min"),e=i.substring(0,i.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!==(i=document.currentScript.src).indexOf(".min")&&(t=".min"),e=i.substring(0,i.lastIndexOf("/")))}this.baseURL=new R_(n).toAbsolute(e),this.documentBaseURL=n,this.baseURI=new R_(this.baseURL),this.suffix=t,(r=this).on("AddEditor",g(mm,r)),r.on("RemoveEditor",g(gm,r))},overrideDefaults:function(e){var t=e.base_url;t&&this._setBaseUrl(t);var n=e.suffix;e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;void 0!==r&&fe(r,(function(e,t){Pu.PluginManager.urls[t]=e}))},init:function(e){var t,n=this,r=Dt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=function(e){var t=e.id;return t||(t=ye(e,"name").filter((function(e){return!U_.get(e)})).getOrThunk(U_.uniqueId),e.setAttribute("id",t)),t},i=function(e,t){return t.constructor===RegExp?t.test(e.className):U_.hasClass(e,t)},a=function(e){t=e},u=function t(){var u,c=0,s=[],l=function(e,t,r){var o=new V_(e,t,n);s.push(o),o.on("init",(function(){++c===u.length&&a(s)})),o.targetElm=o.targetElm||r,o.render()};U_.unbind(window,"ready",t),function(t){var r=e[t];r&&r.apply(n,[])}("onpageload"),u=bu.unique(function(e){var t=[];if(_t.browser.isIE()&&_t.browser.version.major<11)return ay("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(eO)return ay("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(e.types)return W_(e.types,(function(e){t=t.concat(U_.select(e.selector))})),t;if(e.selector)return U_.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":var n=e.elements||"";0<n.length&&W_($_(n),(function(e){var n=U_.get(e);n?t.push(n):W_(document.forms,(function(n){W_(n.elements,(function(n){n.name===e&&(e="mce_editor_"+G_++,U_.setAttrib(n,"id",e),t.push(n))}))}))}));break;case"textareas":case"specific_textareas":W_(U_.select("textarea"),(function(n){e.editor_deselector&&i(n,e.editor_deselector)||e.editor_selector&&!i(n,e.editor_selector)||t.push(n)}))}return t}(e)),e.types?W_(e.types,(function(t){Dt.each(u,(function(n){return!U_.is(n,t.selector)||(l(o(n),q_({},e,t),n),!1)}))})):(Dt.each(u,(function(e){var t;(t=n.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(Z_(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)})),0===(u=Dt.grep(u,(function(e){return!n.get(e.id)}))).length?a([]):W_(u,(function(t){var n;n=t,e.inline&&n.tagName.toLowerCase()in r?ay("Could not initialize inline editor on invalid inline target element",t):l(o(t),e,t)})))};return n.settings=e,U_.bind(window,"ready",u),new Lr((function(e){t?e(t):a=function(t){e(t)}}))},get:function(e){return 0===arguments.length?Y_.slice(0):A(e)?Z(Y_,(function(t){return t.id===e})).getOr(null):V(e)&&Y_[e]?Y_[e]:null},add:function(e){var t=this;return K_[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(K_[e.id]=e),K_.push(e),Y_.push(e)),Q_(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),j_||(j_=function(e){var n=t.fire("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",j_))),e},createEditor:function(e,t){return this.add(new V_(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!A(e))return n=e,N(r.get(n.id))?null:(Z_(n)&&r.fire("RemoveEditor",{editor:n}),0===Y_.length&&window.removeEventListener("beforeunload",j_),n.remove(),Q_(0<Y_.length),n);W_(U_.select(e),(function(e){(n=r.get(e.id))&&r.remove(n)}))}else for(t=Y_.length-1;0<=t;t--)r.remove(Y_[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new V_(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",!1,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){W_(Y_,(function(e){e.save()}))},addI18n:function(e,t){Bu.add(e,t)},translate:function(e){return Bu.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new R_(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new R_(this.baseURL)}});tO.setup();var nO,rO,oO,iO,aO=Math.min,uO=Math.max,cO=Math.round,sO=function(e,t,n){var r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,c=t.h,s=(n||"").split("");return"b"===s[0]&&(o+=c),"r"===s[1]&&(r+=u),"c"===s[0]&&(o+=cO(c/2)),"c"===s[1]&&(r+=cO(u/2)),"b"===s[3]&&(o-=a),"r"===s[4]&&(r-=i),"c"===s[3]&&(o-=cO(a/2)),"c"===s[4]&&(r-=cO(i/2)),lO(r,o,i,a)},lO=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},fO={inflate:function(e,t,n){return lO(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:sO,findBestRelativePosition:function(e,t,n,r){for(var o,i=0;i<r.length;i++)if((o=sO(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n=uO(e.x,t.x),r=uO(e.y,t.y),o=aO(e.x+e.w,t.x+t.w),i=aO(e.y+e.h,t.y+t.h);return o-n<0||i-r<0?null:lO(n,r,o-n,i-r)},clamp:function(e,t,n){var r=e.x,o=e.y,i=e.x+e.w,a=e.y+e.h,u=t.x+t.w,c=t.y+t.h,s=uO(0,t.x-r),l=uO(0,t.y-o),f=uO(0,i-u),d=uO(0,a-c);return r+=s,o+=l,n&&(i+=s,a+=l,r-=f,o-=d),lO(r,o,(i-=f)-r,(a-=d)-o)},create:lO,fromClientRect:function(e){return lO(e.left,e.top,e.width,e.height)}},dO=(nO={},rO={},{load:function(e,t){var n='Script at URL "'+t+'" failed to load',r='Script at URL "'+t+"\" did not call `tinymce.Resource.add('"+e+"', data)` within 1 second";if(void 0!==nO[e])return nO[e];var o=new Lr((function(o,i){var a=function(e,t,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),e.apply(null,t))}},a=i(e),u=i(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||null!==o||(o=setTimeout((function(){return u.apply(null,e)}),n))},resolve:a,reject:u}}(o,i);rO[e]=a.resolve,zu.ScriptLoader.loadScript(t,(function(){return a.start(r)}),(function(){return a.reject(n)}))}));return nO[e]=o},add:function(e,t){void 0!==rO[e]&&(rO[e](t),delete rO[e]),nO[e]=Lr.resolve(t)}}),mO=Dt.each,gO=Dt.extend,hO=function(){};hO.extend=oO=function(e){var t=this.prototype,n=function(){var e,t,n;if(!iO&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},r=function(){return this};iO=!0;var o=new this;return iO=!1,e.Mixins&&(mO(e.Mixins,(function(t){for(var n in t)"init"!==n&&(e[n]=t[n])})),t.Mixins&&(e.Mixins=t.Mixins.concat(e.Mixins))),e.Methods&&mO(e.Methods.split(","),(function(t){e[t]=r})),e.Properties&&mO(e.Properties.split(","),(function(t){var n="_"+t;e[t]=function(e){return void 0!==e?(this[n]=e,this):this[n]}})),e.Statics&&mO(e.Statics,(function(e,t){n[t]=e})),e.Defaults&&t.Defaults&&(e.Defaults=gO({},t.Defaults,e.Defaults)),fe(e,(function(e,n){var r,i;"function"==typeof e&&t[n]?o[n]=(r=n,i=e,function(){var e=this._super;this._super=t[r];var n=i.apply(this,arguments);return this._super=e,n}):o[n]=e})),n.prototype=o,(n.constructor=n).extend=oO,n};var pO=Math.min,vO=Math.max,bO=Math.round,yO={serialize:function(e){var t=JSON.stringify(e);return A(t)?t.replace(/[\u0080-\uFFFF]/g,(function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t})):t},parse:function(e){try{return JSON.parse(e)}catch(o){}}},xO={callbacks:{},count:0,send:function(e){var t=this,n=_u.DOM,r=void 0!==e.count?e.count:t.count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},wO=De(De({},d_),{send:function(e){var t,n=0,r=function r(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):Kr.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",wO.fire("beforeInitialize",{settings:e}),(t=new XMLHttpRequest).overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Dt.each(e.requestheaders,(function(e){t.setRequestHeader(e.key,e.value)})),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=wO.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();Kr.setTimeout(r,10)}}),CO=Dt.extend,kO=(SO.sendRPC=function(e){return(new SO).send(e)},SO.prototype.send=function(e){var t=e.error,n=e.success,r=CO(this.settings,e);r.success=function(e,o){void 0===(e=yO.parse(e))&&(e={error:"JSON Parse error."}),e.error?t.call(r.error_scope||r.scope,e.error,o):n.call(r.success_scope||r.scope,e.result)},r.error=function(e,n){t&&t.call(r.error_scope||r.scope,e,n)},r.data=yO.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),r.content_type="application/json",wO.send(r)},SO);function SO(e){this.settings=CO({},e),this.count=0}try{var _O,OO="__storage_test__";(_O=window.localStorage).setItem(OO,OO),_O.removeItem(OO)}catch(DO){_O=function(){return e={},t=[],n={getItem:function(t){var n=e[t];return n||null},setItem:function(n,r){t.push(n),e[n]=String(r)},key:function(e){return t[e]},removeItem:function(n){t=t.filter((function(e){return e===n})),delete e[n]},clear:function(){t=[],e={}},length:0},Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n;var e,t,n}()}var EO,TO={geom:{Rect:fO},util:{Promise:Lr,Delay:Kr,Tools:Dt,VK:rd,URI:R_,Class:hO,EventDispatcher:c_,Observable:d_,I18n:Bu,XHR:wO,JSON:yO,JSONRequest:kO,JSONP:xO,LocalStorage:_O,Color:function(e){var t={},n=0,o=0,i=0,a=function(e){var a;return"object"==r(e)?"r"in e?(n=e.r,o=e.g,i=e.b):"v"in e&&function(e,t,r){if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,r=parseInt(r,10)/100,t=vO(0,pO(t,1)),r=vO(0,pO(r,1)),0!==t){var a=e/60,u=r*t,c=u*(1-Math.abs(a%2-1)),s=r-u;switch(Math.floor(a)){case 0:n=u,o=c,i=0;break;case 1:n=c,o=u,i=0;break;case 2:n=0,o=u,i=c;break;case 3:n=0,o=c,i=u;break;case 4:n=c,o=0,i=u;break;case 5:n=u,o=0,i=c;break;default:n=o=i=0}n=bO(255*(n+s)),o=bO(255*(o+s)),i=bO(255*(i+s))}else n=o=i=bO(255*r)}(e.h,e.s,e.v):(a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(a[1],10),o=parseInt(a[2],10),i=parseInt(a[3],10)):(a=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(a[1],16),o=parseInt(a[2],16),i=parseInt(a[3],16)):(a=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(a[1]+a[1],16),o=parseInt(a[2]+a[2],16),i=parseInt(a[3]+a[3],16)),n=n<0?0:255<n?255:n,o=o<0?0:255<o?255:o,i=i<0?0:255<i?255:i,t};return e&&a(e),t.toRgb=function(){return{r:n,g:o,b:i}},t.toHsv=function(){return e=n,t=o,r=i,u=0,c=pO(e/=255,pO(t/=255,r/=255)),s=vO(e,vO(t,r)),c===s?{h:0,s:0,v:100*(u=c)}:(a=(s-c)/s,{h:bO(60*((e===c?3:r===c?1:5)-(e===c?t-r:r===c?e-t:r-e)/((u=s)-c))),s:bO(100*a),v:bO(100*u)});var e,t,r,a,u,c,s},t.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(n)+e(o)+e(i)},t.parse=a,t},ImageUploader:function(e){var t=ly(),n=hy(e,t);return{upload:function(t,r){return void 0===r&&(r=!0),n.upload(t,r?gy(e):void 0)}}}},dom:{EventUtils:Ri,Sizzle:Ra,DomQuery:bu,TreeWalker:Qr,TextSeeker:cc,DOMUtils:_u,ScriptLoader:zu,RangeUtils:vd,Serializer:vb,StyleSheetLoader:Yr,ControlSelection:id,BookmarkManager:Zf,Selection:Gv,Event:Ri.Event},html:{Styles:_i,Entities:mi,Node:Am,Schema:ki,SaxParser:Hm,DomParser:db,Writer:qm,Serializer:Gm},Env:_t,AddOnManager:Pu,Annotator:Qf,Formatter:ky,UndoManager:_y,EditorCommands:JS,WindowManager:ey,NotificationManager:Jb,EditorObservable:v_,Shortcuts:O_,Editor:V_,FocusManager:cm,EditorManager:tO,DOM:_u.DOM,ScriptLoader:zu.ScriptLoader,PluginManager:Qb,ThemeManager:Zb,IconManager:jb,Resource:dO,trim:Dt.trim,isArray:Dt.isArray,is:Dt.is,toArray:Dt.toArray,makeMap:Dt.makeMap,each:Dt.each,map:Dt.map,grep:Dt.grep,inArray:Dt.inArray,extend:Dt.extend,create:Dt.create,walk:Dt.walk,createNS:Dt.createNS,resolve:Dt.resolve,explode:Dt.explode,_addCacheSuffix:Dt._addCacheSuffix,isOpera:_t.opera,isWebKit:_t.webkit,isIE:_t.ie,isGecko:_t.gecko,isMac:_t.mac},zO=Dt.extend(tO,TO);EO=zO,window.tinymce=EO,window.tinyMCE=EO,function(e){if("object"==r(t))try{t.exports=e}catch(o){}}(zO)}()}).call(this,n("c8ba"),n("62e4")(e))},d78f:function(e,t,n){"use strict";n("cc82")},db0e:function(e,t,n){},f653:function(e,t,n){},f95d:function(e,t,n){"use strict";n("6f83")}});
//# sourceMappingURL=app.841a6677.js.map