/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.2.0 (2020-02-13) */ !function(v){"use strict";function Z(){}function i(e,o){return function(){for(var n=[],t=0;t "+o.toString()},function(n,t){return"state("+n+")"})}).join("\n")+"}"}}},Uo=nn(Pn(To)),Wo=i(Ln,jo),Go=Lo.state,Xo=Lo.field,Yo=Pn(To),qo=function(o){return{extract:function(n,t,e){return o().extract(n,t,e)},toString:function(){return o().toString()}}},Ko=function(n){return"Errors: \n"+function(n){var t=10 ")+")\n"+n.getErrorInfo()})}(n.errors).join("\n")+"\n\nInput object: "+In(n.input)},Jo=nn(Yo),$o=Zn(rn,"number"),Qo=Zn(J,"string"),Zo=Zn(en,"boolean"),nr=Zn(on,"function"),tr=function(t){function n(n,t){for(var e=n.next();!e.done;){if(!t(e.value))return!1;e=n.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 tr(t[n])});case"Map":return n(t.keys(),tr)&&n(t.values(),tr);case"Set":return n(t.keys(),tr);default:return!1}},er=Pn(function(n){return tr(n)?To(n):Bo("Expected value to be acceptable for sending via postMessage")}),or=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return or(t())}}},rr=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:nn(n)}},ir={fromHtml:function(n,t){var e=(t||v.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1 "):o[0].name();return Dn(r,function(n,t){return{handler:n,purpose:nn(t)}}(t,e))})});return Mn(t,{})},Ji=U(function(){return $i(ir.fromDom(v.document))}),$i=function(n){var t=n.dom().body;if(null===t||t===undefined)throw new Error("Body is not available yet");return ir.fromDom(t)},Qi=function(n,t){return no(n)?n.style.getPropertyValue(t):""},Zi=function(n){var t=Jn("external.component",zn([tt("element"),st("uid")]),n),e=or(Me());t.uid.each(function(n){zi(t.element,n)});var o={getSystem:e.get,config:tn.none,hasConfigured:nn(!1),connect:function(n){e.set(n)},disconnect:function(){e.set(Me(function(){return o}))},getApis:function(){return{}},element:nn(t.element),spec:nn(n),readState:nn("No state"),syncComponents:Z,components:nn([]),events:nn({})};return Ie(o)},nu=Ae,tu=function(t){return function(n){return bn(n,Gi)}(t).fold(function(){var n=t.hasOwnProperty("uid")?t:P({uid:nu("")},t);return xo(n).getOrDie()},function(n){return n})},eu=Ie;function ou(o,r){function n(n){var t=r(n);if(t<=0||null===t){var e=ao(n,o);return parseFloat(e)||0}return t}function i(r,n){return O(n,function(n,t){var e=ao(r,t),o=e===undefined?0:parseInt(e,10);return isNaN(o)?n:n+o},0)}return{set:function(n,t){if(!rn(t)&&!t.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+t);var e=n.dom();no(e)&&(e.style[o]=t+"px")},get:n,getOuter:n,aggregate:i,max:function(n,t,e){var o=i(n,e);return o"}),Jo()),pl=Ct("schema",function(){return[st("preprocess")]}),hl=pt("defaults",nn({})),vl=pt("overrides",nn({})),bl=jo([ll,dl,ml,gl,hl,vl]),yl=jo([ll,dl,ml,hl,vl]),xl=jo([ll,dl,ml,gl,hl,vl]),wl=jo([ll,pl,ml,tt("unit"),gl,hl,vl]),Sl=Ks(fl.required,bl),Cl=Ks(fl.external,yl),kl=Ks(fl.optional,xl),Ol=Ks(fl.group,wl),_l=nn("entirety"),Tl=/* */Object.freeze({__proto__:null,required:Sl,external:Cl,optional:kl,group:Ol,asNamedPart:Ys,name:qs,asCommon:function(n){return n.fold(l,l,l,l)},original:_l}),El=function(n,t){return{uiType:sl(),owner:n,name:t}},Bl=/* */Object.freeze({__proto__:null,generate:$s,generateOne:Qs,schemas:Zs,names:nf,substitutes:tf,components:ef,defaultUids:ff,defaultUidsSchema:lf,getAllParts:af,getAllPartNames:cf,getPart:of,getPartOrDie:rf,getParts:uf,getPartsOrDie:sf}),Dl=function(n){return function(n){return yn(n,"uid")}(n)?n:P(P({},n),{uid:Ae("uid")})};function Al(n){var t=Jn("Sketcher for "+n.name,Ql,n),e=L(t.apis,Re),o=L(t.extraApis,function(n,t){return Fe(n,t)});return P(P({name:nn(t.name),configFields:nn(t.configFields),sketch:function(n){return function(n,t,e,o){var r=Dl(o);return e(df(n,t,r,[],[]),r)}(t.name,t.configFields,t.factory,n)}},e),o)}function Ml(n){var t=Jn("Sketcher for "+n.name,Zl,n),e=$s(t.name,t.partFields),o=L(t.apis,Re),r=L(t.extraApis,function(n,t){return Fe(n,t)});return P(P({name:nn(t.name),partFields:nn(t.partFields),configFields:nn(t.configFields),sketch:function(n){return mf(t.name,t.configFields,t.partFields,t.factory,n)},parts:nn(e)},o),r)}function Fl(n){for(var t=[],e=function(n){t.push(n)},o=0;o',t.getDoc());return Bi(n,ir.fromDom(e.extractContents())),e.insertNode(n.dom()),ce(n).each(function(n){return n.dom().normalize()}),function(n){return hf(n,Qc)}(n).map(function(n){t.selection.setCursorLocation(n.dom(),function(n){return"img"===xe(n)?1:$c(n).fold(function(){return fe(n).length},function(n){return n.length})}(n))}),n})}function Cp(n){return n.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function kp(n){return""!==n&&-1!==" \xa0\f\n\r\t\x0B".indexOf(n)}function Op(n,t){return n.substring(t.length)}function _p(n,o,r,i){if(void 0===i&&(i=0),!function(n){return n.collapsed&&3===n.startContainer.nodeType}(o))return tn.none();var t=n.getParent(o.startContainer,n.isBlock)||n.getRoot();return wp(n,o.startContainer,o.startOffset,function(n,t,e){return function(n,t,e){var o;for(o=t-1;0<=o;o--){var r=n.charAt(o);if(kp(r))return tn.none();if(r===e)break}return tn.some(o)}(e,t,r).getOr(t)},t).bind(function(n){var t=o.cloneRange();if(t.setStart(n.container,n.offset),t.setEnd(o.endContainer,o.endOffset),t.collapsed)return tn.none();var e=Cp(t);return 0!==e.lastIndexOf(r)||Op(e,r).lengtho}).getOr(r.length);return tn.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return tn.none()}function Fp(n,t){return Sa([Qd(n,t)])}function Ip(n,t,e){n.getSystem().broadcastOn([wh],{})}function Rp(n){return bn(Dh,n).getOr(Th)}function Vp(n){return{dom:{tag:"div",classes:[Mh],innerHtml:n}}}function Hp(n){return{dom:{tag:"div",classes:[Fh]},components:[wo(_h.translate(n))]}}function Np(n,t){return{dom:{tag:"div",classes:[Fh]},components:[{dom:{tag:n.tag,styles:n.styles},components:[wo(_h.translate(t))]}]}}function Pp(n){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:Hh(n)}}}function zp(n){return{dom:{tag:"div",classes:[Mh,"tox-collection__item-checkmark"],innerHtml:gp("checkmark",n)}}}function Lp(n,t,e,o,r){var i=e?n.checkMark.orThunk(function(){return t.or(tn.some("")).map(Vp)}):tn.none(),u=n.ariaLabel.map(function(n){return{attributes:{title:_h.translate(n)}}}).getOr({});return{dom:P({tag:"div",classes:[Th,Eh].concat(r?["tox-collection__item-icon-rtl"]:[])},u),optComponents:[i,n.htmlContent.fold(function(){return n.textContent.map(o)},function(n){return tn.some(function(n){return{dom:{tag:"div",classes:[Fh],innerHtml:n}}}(n))}),n.shortcutContent.map(Pp),n.caret]}}function jp(n,t,e,o){void 0===o&&(o=tn.none());var r=_h.isRtl()&&n.iconContent.exists(function(n){return sn(Ph,n)}),i=n.iconContent.map(function(n){return _h.isRtl()&&sn(Nh,n)?n+"-rtl":n}).map(function(n){return function(n,t,e){return tn.from(t()[n]).or(e).getOrThunk(function(){return mp(t)})}(n,t.icons,o)}),u=tn.from(n.meta).fold(function(){return Hp},function(n){return yn(n,"style")?d(Np,n.style):Hp});return"color"===n.presets?function(n,t,e,o){var r,i;return{dom:(r=e.getOr(""),i={tag:"div",attributes:n.map(function(n){return{title:o.translate(n)}}).getOr({}),classes:["tox-swatch"]},P(P({},i),"custom"===t?{tag:"button",classes:p(i.classes,["tox-swatches__picker-btn"]),innerHtml:r}:"remove"===t?{classes:p(i.classes,["tox-swatch--remove"]),innerHtml:r}:{attributes:P(P({},i.attributes),{"data-mce-color":t}),styles:{"background-color":t}})),optComponents:[]}}(n.ariaLabel,n.value,i,t):Lp(n,i,e,u,r)}function Up(n,t,e){t.disabled&&Lh(n,t)}function Wp(n,t){return!0===t.useNative&&sn(zh,xe(n.element()))}function Gp(n){Ce(n.element(),"disabled","disabled")}function Xp(n){_e(n.element(),"disabled")}function Yp(n){Ce(n.element(),"aria-disabled","true")}function qp(n){Ce(n.element(),"aria-disabled","false")}function Kp(t,n,e){n.disableClass.each(function(n){Je(t.element(),n)}),(Wp(t,n)?Xp:qp)(t),n.onEnabled(t)}function Jp(n,t){return Wp(n,t)?function(n){return Oe(n.element(),"disabled")}(n):function(n){return"true"===ke(n.element(),"aria-disabled")}(n)}function $p(n,t){var e=n.getApi(t);return function(n){n(e)}}function Qp(e,o){return Oi(function(n){$p(e,n)(function(n){var t=e.onSetup(n);null!==t&&t!==undefined&&o.set(t)})})}function Zp(t,e){return _i(function(n){return $p(t,n)(e.get())})}var nh,th,eh=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),oh=function(n){return Hu(n,"[data-mce-autocompleter]")},rh=function(e,n){n.on("keypress compositionend",e.onKeypress.throttle),n.on("remove",e.onKeypress.cancel);function o(n,t){Lt(n,Gr(),{raw:t})}n.on("keydown",function(t){function n(){return e.getView().bind(fd.getHighlighted)}8===t.which&&e.onKeypress.throttle(t),e.isActive()&&(27===t.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===t.which?(n().each(jt),t.preventDefault()):40===t.which?(n().fold(function(){e.getView().each(fd.highlightFirst)},function(n){o(n,t)}),t.preventDefault(),t.stopImmediatePropagation()):37!==t.which&&38!==t.which&&39!==t.which||n().each(function(n){o(n,t),t.preventDefault(),t.stopImmediatePropagation()}):13!==t.which&&38!==t.which&&40!==t.which||e.cancelIfNecessary())}),n.on("NodeChange",function(n){e.isActive()&&!e.isProcessingAction()&&oh(ir.fromDom(n.element)).isNone()&&e.cancelIfNecessary()})},ih=tinymce.util.Tools.resolve("tinymce.util.Promise"),uh=function(n){if(function(n){return n.nodeType===v.Node.TEXT_NODE}(n))return Ep(n,n.data.length);var t=n.childNodes;return 0=n.minChars&&n.matches.getOrThunk(function(){return Bp(t.dom)})(e.range,i,e.text)});if(0===u.length)return tn.none();var a=ih.all(S(u,function(t){return t.fetch(e.text,t.maxResults,o).then(function(n){return{matchText:e.text,items:n,columns:t.columns,onAction:t.onAction}})}));return tn.some({lookupData:a,context:e})},sh=jo([ot("type"),dt("text")]),fh=jo([Ct("type",function(){return"autocompleteitem"}),Ct("active",function(){return!1}),Ct("disabled",function(){return!1}),pt("meta",{}),ot("value"),dt("text"),dt("icon")]),lh=jo([ot("type"),ot("ch"),vt("minChars",1),pt("columns",1),vt("maxResults",10),mt("matches"),it("fetch"),it("onAction")]),dh=[xt("disabled",!1),dt("text"),dt("shortcut"),Xo("value","value",Ho(function(){return De("menuitem-value")}),Jo()),pt("meta",{})],mh=jo([ot("type"),wt("onSetup",function(){return Z}),wt("onAction",Z),dt("icon")].concat(dh)),gh=jo([ot("type"),it("getSubmenuItems"),wt("onSetup",function(){return Z}),dt("icon")].concat(dh)),ph=jo([ot("type"),xt("active",!1),wt("onSetup",function(){return Z}),it("onAction")].concat(dh)),hh=jo([ot("type"),xt("active",!1),dt("icon")].concat(dh)),vh=jo([ot("type"),rt("fancytype",["inserttable","colorswatch"]),wt("onAction",Z)]),bh=function(n){return Fp(De("unnamed-events"),n)},yh=[tt("lazySink"),tt("tooltipDom"),pt("exclusive",!0),pt("tooltipComponents",[]),pt("delay",300),yt("mode","normal",["normal","follow-highlight"]),pt("anchor",function(n){return{anchor:"hotspot",hotspot:n,layouts:{onLtr:nn([lc,fc,aa,sa,ca,fa]),onRtl:nn([lc,fc,aa,sa,ca,fa])}}}),Ku("onHide"),Ku("onShow")],xh=/* */Object.freeze({__proto__:null,init:function(){function e(){o.get().each(function(n){v.clearTimeout(n)})}var o=or(tn.none()),t=or(tn.none()),n=nn("not-implemented");return Yi({getTooltip:function(){return t.get()},isShowing:function(){return t.get().isSome()},setTooltip:function(n){t.set(tn.some(n))},clearTooltip:function(){t.set(tn.none())},clearTimer:e,resetTimer:function(n,t){e(),o.set(tn.some(v.setTimeout(function(){n()},t)))},readState:n})}}),wh=De("tooltip.exclusive"),Sh=De("tooltip.show"),Ch=De("tooltip.hide"),kh=/* */Object.freeze({__proto__:null,hideAllExclusive:Ip,setComponents:function(n,t,e,o){e.getTooltip().each(function(n){n.getSystem().isConnected()&&Cg.set(n,o)})}}),Oh=Ca({fields:yh,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(o,r){function e(t){r.getTooltip().each(function(n){_s(n),o.onHide(t,n),r.clearTooltip()}),r.clearTimer()}return Gt(z([[qt(Sh,function(n){r.resetTimer(function(){!function(t){if(!r.isShowing()){Ip(t);var n=o.lazySink(t).getOrDie(),e=t.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:Gt("normal"===o.mode?[qt(jr(),function(n){zt(t,Sh)}),qt(zr(),function(n){zt(t,Ch)})]:[]),behaviours:Sa([Cg.config({})])});r.setTooltip(e),ks(n,e),o.onShow(t,e),Mf.position(n,o.anchor(t),e)}}(n)},o.delay)}),qt(Ch,function(n){r.resetTimer(function(){e(n)},o.delay)}),qt(ei(),function(n,t){sn(t.channels(),wh)&&e(n)}),_i(function(n){e(n)})],"normal"===o.mode?[qt(Ur(),function(n){zt(n,Sh)}),qt(ni(),function(n){zt(n,Ch)}),qt(jr(),function(n){zt(n,Sh)}),qt(zr(),function(n){zt(n,Ch)})]:[qt(Si(),function(n,t){zt(n,Sh)}),qt(Ci(),function(n){zt(n,Ch)})]]))}}),state:xh,apis:kh}),_h=tinymce.util.Tools.resolve("tinymce.util.I18n"),Th="tox-menu-nav__js",Eh="tox-collection__item",Bh="tox-swatch",Dh={normal:Th,color:Bh},Ah="tox-collection__item--enabled",Mh="tox-collection__item-icon",Fh="tox-collection__item-label",Ih="tox-collection__item-caret",Rh="tox-collection__item--active",Vh=tinymce.util.Tools.resolve("tinymce.Env"),Hh=function(n){var e=Vh.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},t=n.split("+"),o=S(t,function(n){var t=n.toLowerCase().trim();return yn(e,t)?e[t]:n});return Vh.mac?o.join(""):o.join("+")},Nh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],Ph=["list-bull-circle","list-bull-default","list-bull-square"],zh=["input","button","textarea","select"],Lh=function(t,n,e){n.disableClass.each(function(n){qe(t.element(),n)}),(Wp(t,n)?Gp:Yp)(t),n.onDisabled(t)},jh=/* */Object.freeze({__proto__:null,enable:Kp,disable:Lh,isDisabled:Jp,onLoad:Up,set:function(n,t,e,o){(o?Lh:Kp)(n,t,e)}}),Uh=/* */Object.freeze({__proto__:null,exhibit:function(n,t){return He({classes:t.disabled?t.disableClass.map(M).getOr([]):[]})},events:function(e,n){return Gt([Xt(oi(),function(n,t){return Jp(n,e)}),ba(e,n,Up)])}}),Wh=[pt("disabled",!1),pt("useNative",!0),st("disableClass"),Ku("onDisabled"),Ku("onEnabled")],Gh=Ca({fields:Wh,name:"disabling",active:Uh,apis:jh}),Xh=function(n){return Gh.config({disabled:n,disableClass:"tox-collection__item--state-disabled"})},Yh=function(n){return Gh.config({disabled:n})},qh=function(n){return Gh.config({disabled:n,disableClass:"tox-tbtn--disabled"})},Kh=function(n){return Gh.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1})};(th=nh=nh||{})[th.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",th[th.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";function Jh(n){return E(n,function(n){return n.toArray()})}function $h(n,t,e){var o=or(Z);return{type:"item",dom:t.dom,components:Jh(t.optComponents),data:n.data,eventOrder:ev,hasSubmenu:n.triggersSubmenu,itemBehaviours:Sa([Qd("item-events",[function(e,o){return Ei(function(n,t){$p(e,n)(e.onAction),e.triggersSubmenu||o!==tv.CLOSE_ON_EXECUTE||(zt(n,ai()),t.stop())})}(n,e),Qp(n,o),Zp(n,o)]),Xh(n.disabled),Cg.config({})].concat(n.itemBehaviours))}}function Qh(n){return{value:n.value,meta:P({text:n.text.getOr("")},n.meta)}}function Zh(n,t){var e=function(n){return ep.DOM.encode(n)}(_h.translate(n));if(0'+n+""})}return e}function nv(t,e,n){function o(n){return Lt(n,iv,{row:t,col:e})}function r(n,t){t.stop(),o(n)}var i;return tu({dom:{tag:"div",attributes:(i={role:"button"},i["aria-labelledby"]=n,i)},behaviours:Sa([Qd("insert-table-picker-cell",[qt(jr(),Tg.focus),qt(oi(),o),qt(Kr(),r),qt(ii(),r)]),Fg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Tg.config({onFocus:function(n){return Lt(n,rv,{row:t,col:e})}})])})}var tv=nh,ev={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},ov=nn($s("item-widget",zg())),rv=De("cell-over"),iv=De("cell-execute");function uv(n){return{value:nn(n)}}function av(n){return vv.test(n)||bv.test(n)}function cv(n){var t=function(n){var t=n.value().replace(vv,function(n,t,e,o){return t+t+e+e+o+o});return{value:nn(t)}}(n),e=bv.exec(t.value());return null===e?["FFFFFF","FF","FF","FF"]:e}function sv(n){var t=n.toString(16);return 1===t.length?"0"+t:t}function fv(n){var t=sv(n.red())+sv(n.green())+sv(n.blue());return uv(t)}function lv(n,t,e,o){return{red:nn(n),green:nn(t),blue:nn(e),alpha:nn(o)}}function dv(n){var t=parseInt(n,10);return t.toString()===n&&0<=t&&t<=255}function mv(n){var t,e,o,r=(n.hue()||0)%360,i=n.saturation()/100,u=n.value()/100;if(i=xv(0,yv(i,1)),u=xv(0,yv(u,1)),0===i)return t=e=o=wv(255*u),lv(t,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:t=c,e=s,o=0;break;case 1:t=s,e=c,o=0;break;case 2:t=0,e=c,o=s;break;case 3:t=0,e=s,o=c;break;case 4:t=s,e=0,o=c;break;case 5:t=c,e=0,o=s;break;default:t=e=o=0}return t=wv(255*(t+f)),e=wv(255*(e+f)),o=wv(255*(o+f)),lv(t,e,o,1)}function gv(n){var t=cv(n),e=parseInt(t[1],16),o=parseInt(t[2],16),r=parseInt(t[3],16);return lv(e,o,r,1)}function pv(n,t,e,o){var r=parseInt(n,10),i=parseInt(t,10),u=parseInt(e,10),a=parseFloat(o);return lv(r,i,u,a)}function hv(n){return"rgba("+n.red()+","+n.green()+","+n.blue()+","+n.alpha()+")"}var vv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,bv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,yv=Math.min,xv=Math.max,wv=Math.round,Sv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Cv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,kv=nn(lv(255,0,0,1)),Ov=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),_v="tinymce-custom-colors";function Tv(n){var t=[],u=v.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(n,t){var e=t/255;return("0"+Math.round(n*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(n){if(/^[0-9A-Fa-f]{6}$/.test(n))return"#"+n.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=n,a.fillRect(0,0,1,1);var t=a.getImageData(0,0,1,1).data,e=t[0],o=t[1],r=t[2],i=t[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;ot&&r.pop(),Ov.setItem(_v,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Zv=function(n,t){return n.getParam("color_cols",t,"number")},nb=function(n){return!1!==n.getParam("custom_colors")},tb=function(n){var t=Ev(n);return t!==undefined?Tv(t):$v},eb=function(){return S(Qv.state(),function(n){return{type:Jv,text:n,value:n}})},ob=function(n){Qv.add(n)},rb=function(n){return n.fire("SkinLoaded")},ib=function(n,t){return n.fire("SkinLoadError",t)},ub=function(n){return n.fire("ResizeEditor")},ab=function(n,t){return n.fire("ScrollContent",t)},cb=function(n,t){return n.fire("ResizeContent",t)},sb=function(n,t){return n.fire("TextColorChange",t)},fb=function(i){return function(n,t){var e,o={colorpicker:t},r=(e=n,function(n){var t=n.getData();e(tn.from(t.colorpicker)),n.close()});i.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:o,onAction:function(n,t){"hex-valid"===t.name&&(t.value?n.enable("ok"):n.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){n(tn.none())}})}},lb={register:function(n){!function(e){e.addCommand("mceApplyTextcolor",function(n,t){!function(n,t,e){n.undoManager.transact(function(){n.focus(),n.formatter.apply(t,{value:e}),n.nodeChanged()})}(e,n,t)}),e.addCommand("mceRemoveTextcolor",function(n){!function(n,t){n.undoManager.transact(function(){n.focus(),n.formatter.remove(t,{value:null},null,!0),n.nodeChanged()})}(e,n)})}(n);var t=or(null),e=or(null);Vv(n,"forecolor","forecolor","Text color",t),Vv(n,"backcolor","hilitecolor","Background color",e),Hv(n,"forecolor","forecolor","Text color"),Hv(n,"backcolor","hilitecolor","Background color")},getColors:Fv,getFetch:Iv,colorPickerDialog:fb,getCurrentColor:Bv,getColorCols:Av,calcCols:Dv},db=[Xg.parts().items({})],mb=function(n,e,o,r,i,u,a){return Fl(S(n,function(t){return"choiceitem"===t.type?function(n){return qn("choicemenuitem",hh,n)}(t).fold(Gv,function(n){return tn.some(function(t,n,e,o,r,i,u){var a=jp({presets:e,textContent:n?t.text:tn.none(),htmlContent:tn.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:n?t.shortcut:tn.none(),checkMark:n?tn.some(zp(u.icons)):tn.none(),caret:tn.none(),value:t.value},u,!0);return Sn($h({data:Qh(t),disabled:t.disabled,getApi:function(t){return{setActive:function(n){Fg.set(t,n)},isActive:function(){return Fg.isOn(t)},isDisabled:function(){return Gh.isDisabled(t)},setDisabled:function(n){return Gh.set(t,n)}}},onAction:function(n){return o(t.value)},onSetup:function(n){return n.setActive(r),function(){}},triggersSubmenu:!1,itemBehaviours:[]},a,i),{toggling:{toggleClass:Ah,toggleOnExecute:!1,selected:t.active}})}(n,1===o,r,e,u(t.value),i,a))}):tn.none()}))};var gb,pb,hb={inserttable:function cI(o){var n=De("size-label"),i=function(n,t,e){for(var o=[],r=0;r"}function gw(d,m,g,p){function h(n,t,e,o,r){var i=d(vS+"range"),u=[hy.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),hy.parts().field({data:r,factory:by,inputAttributes:P({type:"text"},"hex"===t?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:Sa([function(t,o){return Ly.config({invalidClass:m("invalid"),notify:{onValidate:function(n){Lt(n,hS,{type:t})},onValid:function(n){Lt(n,gS,{type:t,value:tl.getValue(n)})},onInvalid:function(n){Lt(n,pS,{type:t,value:tl.getValue(n)})}},validator:{validate:function(n){var t=tl.getValue(n),e=o(t)?K.value(!0):K.error(d("aria.input.invalid"));return Vy(e)},validateOnLoad:!1}})}(t,n),Wy.config({})]),onSetValue:function(n){Ly.isInvalid(n)&&Ly.run(n).get(Z)}})],a="hex"!==t?[hy.parts()["aria-descriptor"]({text:i})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:u.concat(a)}}function v(n,t){var e=t.red(),o=t.green(),r=t.blue();tl.setValue(n,{red:e,green:o,blue:r})}function b(n,t){y.getOpt(n).each(function(n){ro(n.element(),"background-color","#"+t.value())})}var y=dp({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return Al({factory:function(){function r(n){return u[n]().get()}function i(n,t){u[n]().set(t)}function t(n,t){var e=t.event();"hex"!==e.type()?i(e.type(),tn.none()):p(n)}function o(e,n,t){var o=parseInt(t,10);i(n,tn.some(o)),r("red").bind(function(e){return r("green").bind(function(t){return r("blue").map(function(n){return lv(e,t,n,1)})})}).each(function(n){var t=function(t,n){var e=fv(n);return mS.getField(t,"hex").each(function(n){Tg.isFocused(n)||tl.setValue(t,{hex:e.value()})}),e}(e,n);b(e,t)})}function e(n,t){var e=t.event();!function(n){return"hex"===n.type()}(e)?o(n,e.type(),e.value()):function(n,t){g(n);var e=uv(t);i("hex",tn.some(t));var o=gv(e);v(n,o),a(o),Lt(n,Mw(),{hex:e}),b(n,e)}(n,e.value())}function n(n){return{label:d(vS+n+".label"),description:d(vS+n+".description")}}var u={red:nn(or(tn.some(255))),green:nn(or(tn.some(255))),blue:nn(or(tn.some(255))),hex:nn(or(tn.some("ffffff")))},a=function(n){var t=n.red(),e=n.green(),o=n.blue();i("red",tn.some(t)),i("green",tn.some(e)),i("blue",tn.some(o))},c=n("red"),s=n("green"),f=n("blue"),l=n("hex");return Sn(mS.sketch(function(n){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[n.field("red",hy.sketch(h(dv,"red",c.label,c.description,255))),n.field("green",hy.sketch(h(dv,"green",s.label,s.description,255))),n.field("blue",hy.sketch(h(dv,"blue",f.label,f.description,255))),n.field("hex",hy.sketch(h(av,"hex",l.label,l.description,"ffffff"))),y.asSpec()],formBehaviours:Sa([Ly.config({invalidClass:m("form-invalid")}),Qd("rgb-form-events",[qt(gS,e),qt(pS,t),qt(hS,t)])])}}),{apis:{updateHex:function(n,t){tl.setValue(n,{hex:t.value()}),function(n,t){var e=gv(t);v(n,e),a(e)}(n,t),b(n,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(n,t,e){n.updateHex(t,e)}},extraApis:{}})}function pw(n,o){function r(n,t){var e=n.width,o=n.height,r=n.getContext("2d");if(null!==r){r.fillStyle=t,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}}var i=fS.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),u=fS.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}});return Al({factory:function(n){var t=nn({x:nn(0),y:nn(0)}),e=Sa([ed.config({find:tn.some}),Tg.config({})]);return fS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:t},rounded:!1,components:[i,u],onChange:function(n,t,e){Lt(n,Iw(),{value:e})},onInit:function(n,t,e,o){r(e.element().dom(),hv(kv()))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(n,t,e){!function(n,t){var e=n.components()[0].element().dom();r(e,hv(t))}(t,e)}},extraApis:{}})}function hw(l,d){return Al({name:"ColourPicker",configFields:[tt("dom"),pt("onValidHex",Z),pt("onInvalidHex",Z)],factory:function(n){function t(n,e){u.getOpt(n).each(function(n){var t=gv(e);s.paletteRgba().set(t),i.setRgba(n,t)})}function e(n,t){f.getOpt(n).each(function(n){r.updateHex(n,t)})}function a(t,e,n){fn(n,function(n){n(t,e)})}var o,c,r=gw(l,d,n.onValidHex,n.onInvalidHex),i=pw(0,d),s={paletteRgba:nn(or(kv()))},u=dp(i.sketch({})),f=dp(r.sketch({}));return{uid:n.uid,dom:n.dom,components:[u.asSpec(),function(n,t){var e=fS.parts().spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=fS.parts().thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return fS.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:nn({y:nn(0)})},components:[e,o],sliderBehaviours:Sa([Tg.config({})]),onChange:function(n,t,e){Lt(n,Fw(),{value:e})}})}(0,d),f.asSpec()],behaviours:Sa([Qd("colour-picker-events",[qt(Iw(),(c=[e],function(n,t){var e=t.event().value(),o=function(n){var t,e=0,o=0,r=n.red()/255,i=n.green()/255,u=n.blue()/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?cx(0,0,100*(o=a)):(e=60*((e=r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),t=(c-a)/c,o=c,cx(Math.round(e),Math.round(100*t),Math.round(100*o)))}(s.paletteRgba().get()),r=cx(o.hue(),e.x(),100-e.y()),i=mv(r),u=fv(i);a(n,u,c)})),qt(Fw(),(o=[t,e],function(n,t){var e=function(n){var t=cx((100-n)/100*360,100,100),e=mv(t);return fv(e)}(t.event().value().y());a(n,e,o)}))]),ed.config({find:function(n){return f.getOpt(n)}}),wg.config({mode:"acyclic"})])}}})}function vw(n){return function(n){return wS[n]}(n)}function bw(n,t,e){return tl.config(Sn({store:{mode:"manual",getValue:t,setValue:e}},n.map(function(n){return{store:{initialValue:n}}}).getOr({})))}function yw(n,t,e){return bw(n,function(n){return t(n.element())},function(n,t){return e(n.element(),t)})}function xw(e,t){function o(n,t){t.stop()}function r(n){return function(t,e){fn(n,function(n){n(t,e)})}}function i(n,t){if(!Gh.isDisabled(n)){var e=t.event().raw();a(n,e.dataTransfer.files)}}function u(n,t){var e=t.event().raw().target.files;a(n,e)}var a=function(n,t){tl.setValue(n,function(n){var t=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i");return C(dn(n),function(n){return t.test(n.name)})}(t)),Lt(n,iy,{name:e.name})},c=dp({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Sa([Qd("input-file-events",[Zt(Kr()),Zt(ii())])])}),n=e.label.map(function(n){return Ey(n,t)}),s=hy.parts().field({factory:{sketch:function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Sa([TS([]),bS(),Gh.config({}),Fg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Qd("dropzone-events",[qt("dragenter",r([o,Fg.toggle])),qt("dragleave",r([o,Fg.toggle])),qt("dragover",o),qt("drop",r([o,i])),qt(qr(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},hp.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(n){c.get(n).element().dom().click()},buttonBehaviours:Sa([Wy.config({})])})]}]}}}});return Ty(n,s,["tox-form__group--stretched"],[])}function ww(n){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:Sa([Tg.config({ignore:!0}),Wy.config({})])}}function Sw(n,t){Lt(n,Gr(),{raw:{which:9,shiftKey:t}})}function Cw(n,t){var e=FS&&n.sandboxed,o=P(P({},n.label.map(function(n){return{title:n}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),r=function(o){var r=or("");return{getValue:function(n){return r.get()},setValue:function(n,t){if(o)Ce(n.element(),"srcdoc",t);else{Ce(n.element(),"src","javascript:''");var e=n.element().dom().contentWindow.document;e.open(),e.write(t),e.close()}r.set(t)}}}(e),i=n.label.map(function(n){return Ey(n,t)}),u=hy.parts().field({factory:{sketch:function(n){return MS({uid:n.uid,dom:{tag:"iframe",attributes:o},behaviours:Sa([Wy.config({}),Tg.config({}),OS(tn.none(),r.getValue,r.setValue)])})}}});return Ty(i,u,["tox-form__group--stretched"],[])}var kw=function(t,n){return t.getSystem().getByUid(n.uid+"-"+Jy()).map(function(n){return function(){return K.value(n)}}).getOrThunk(function(){return n.lazySink.fold(function(){return function(){return K.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(n){return function(){return n(t)}})})},Ow=nn([tt("dom"),tt("fetch"),Ku("onOpen"),Ju("onExecute"),pt("getHotspot",tn.some),pt("getAnchorOverrides",nn({})),Rc(),Ls("dropdownBehaviours",[Fg,Ky,wg,Tg]),tt("toggleClass"),pt("eventOrder",{}),st("lazySink"),pt("matchWidth",!1),pt("useMinWidth",!1),st("role")].concat(ux())),_w=nn([Cl({schema:[Xu()],name:"menu",defaults:function(n){return{onExecute:n.onExecute}}}),$y()]),Tw=Ml({name:"Dropdown",configFields:Ow(),partFields:_w(),factory:function(t,n,e,o){function r(n){jf.getState(n).each(function(n){$g.highlightPrimary(n)})}function i(n,t){return jt(n),tn.some(!0)}var u,a,c={expand:function(n){Fg.isOn(n)||tx(t,function(n){return n},n,o,Z,By.HighlightNone).get(Z)},open:function(n){Fg.isOn(n)||tx(t,function(n){return n},n,o,Z,By.HighlightFirst).get(Z)},isOpen:Fg.isOn,close:function(n){Fg.isOn(n)&&tx(t,function(n){return n},n,o,Z,By.HighlightFirst).get(Z)},repositionMenus:function(n){Fg.isOn(n)&&ix(n)}};return{uid:t.uid,dom:t.dom,components:n,behaviours:Us(t.dropdownBehaviours,[Fg.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),Ky.config({others:{sandbox:function(n){return rx(t,n,{onOpen:function(){Fg.on(n)},onClose:function(){Fg.off(n)}})}}}),wg.config({mode:"special",onSpace:i,onEnter:i,onDown:function(n,t){if(Tw.isOpen(n)){var e=Ky.getCoupled(n,"sandbox");r(e)}else Tw.open(n);return tn.some(!0)},onEscape:function(n,t){return Tw.isOpen(n)?(Tw.close(n),tn.some(!0)):tn.none()}}),Tg.config({})]),events:am(tn.some(function(n){tx(t,function(n){return n},n,o,r,By.HighlightFirst).get(Z)})),eventOrder:P(P({},t.eventOrder),(u={},u[oi()]=["disabling","toggling","alloy.base.behaviour"],u)),apis:c,domModification:{attributes:P(P({"aria-haspopup":"true"},t.role.fold(function(){return{}},function(n){return{role:n}})),"button"===t.dom.tag?{type:(a="type",bn(t.dom,"attributes").bind(function(n){return bn(n,a)})).getOr("button")}:{})}}},apis:{open:function(n,t){return n.open(t)},expand:function(n,t){return n.expand(t)},close:function(n,t){return n.close(t)},isOpen:function(n,t){return n.isOpen(t)},repositionMenus:function(n,t){return n.repositionMenus(t)}}}),Ew=Ca({fields:[],name:"unselecting",active:/* */Object.freeze({__proto__:null,events:function(){return Gt([Xt($r(),nn(!0))])},exhibit:function(){return He({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Bw=De("color-input-change"),Dw=De("color-swatch-change"),Aw=De("color-picker-cancel"),Mw=nn(De("rgb-hex-update")),Fw=nn(De("slider-update")),Iw=nn(De("palette-update")),Rw=kl({schema:[tt("dom")],name:"label"}),Vw=sx("top-left"),Hw=sx("top"),Nw=sx("top-right"),Pw=sx("right"),zw=sx("bottom-right"),Lw=sx("bottom"),jw=sx("bottom-left"),Uw=[Rw,sx("left"),Pw,Hw,Lw,Vw,Nw,jw,zw,Sl({name:"thumb",defaults:nn({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:Gt([$t(Ir(),n,"spectrum"),$t(Rr(),n,"spectrum"),$t(Vr(),n,"spectrum"),$t(Nr(),n,"spectrum"),$t(Pr(),n,"spectrum"),$t(Lr(),n,"spectrum")])}}}),Sl({schema:[Ct("mouseIsDown",function(){return or(!1)})],name:"spectrum",overrides:function(e){function o(t,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(t,e,n)})}var r=e.model.manager;return{behaviours:Sa([wg.config({mode:"special",onLeft:function(n){return r.onLeft(n,e)},onRight:function(n){return r.onRight(n,e)},onUp:function(n){return r.onUp(n,e)},onDown:function(n){return r.onDown(n,e)}}),Tg.config({})]),events:Gt([qt(Ir(),o),qt(Rr(),o),qt(Nr(),o),qt(Pr(),function(n,t){e.mouseIsDown.get()&&o(n,t)})])}}})],Ww=nn("slider.change.value"),Gw="left",Xw=ow(-1),Yw=ow(1),qw=tn.none,Kw=tn.none,Jw={"top-left":tn.none(),top:tn.none(),"top-right":tn.none(),right:tn.some(function(n,t){Hx(n,Ix(vx(t)))}),"bottom-right":tn.none(),bottom:tn.none(),"bottom-left":tn.none(),left:tn.some(function(n,t){Hx(n,Ix(mx(t)))})},$w=/* */Object.freeze({__proto__:null,setValueFrom:function(n,t,e){var o=ew(n,t,e),r=tw(o);return nw(n,r),o},setToMin:function(n,t){var e=lx(t);nw(n,tw(e))},setToMax:function(n,t){var e=px(t);nw(n,tw(e))},findValueOfOffset:ew,getValueFromEvent:function(n){return fx(n).map(function(n){return n.left()})},findPositionOfValue:rw,setPositionFromValue:function(n,t,e,o){var r=Fx(e),i=rw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=cu(t.element())/2;ro(t.element(),"left",i-u+"px")},onLeft:Xw,onRight:Yw,onUp:qw,onDown:Kw,edgeActions:Jw}),Qw=tn.none,Zw=tn.none,nS=cw(-1),tS=cw(1),eS={"top-left":tn.none(),top:tn.some(function(n,t){Hx(n,Rx(gx(t)))}),"top-right":tn.none(),right:tn.none(),"bottom-right":tn.none(),bottom:tn.some(function(n,t){Hx(n,Rx(bx(t)))}),"bottom-left":tn.none(),left:tn.none()},oS=/* */Object.freeze({__proto__:null,setValueFrom:function(n,t,e){var o=aw(n,t,e),r=uw(o);return iw(n,r),o},setToMin:function(n,t){var e=dx(t);iw(n,uw(e))},setToMax:function(n,t){var e=hx(t);iw(n,uw(e))},findValueOfOffset:aw,getValueFromEvent:function(n){return fx(n).map(function(n){return n.top()})},findPositionOfValue:sw,setPositionFromValue:function(n,t,e,o){var r=Fx(e),i=sw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),u=ru(t.element())/2;ro(t.element(),"top",i-u+"px")},onLeft:Qw,onRight:Zw,onUp:nS,onDown:tS,edgeActions:eS}),rS=dw(-1,!1),iS=dw(1,!1),uS=dw(-1,!0),aS=dw(1,!0),cS={"top-left":tn.some(function(n,t){Hx(n,Vx(mx(t),gx(t)))}),top:tn.some(function(n,t){Hx(n,Vx(Sx(t),gx(t)))}),"top-right":tn.some(function(n,t){Hx(n,Vx(vx(t),gx(t)))}),right:tn.some(function(n,t){Hx(n,Vx(vx(t),Cx(t)))}),"bottom-right":tn.some(function(n,t){Hx(n,Vx(vx(t),bx(t)))}),bottom:tn.some(function(n,t){Hx(n,Vx(Sx(t),bx(t)))}),"bottom-left":tn.some(function(n,t){Hx(n,Vx(mx(t),bx(t)))}),left:tn.some(function(n,t){Hx(n,Vx(mx(t),Cx(t)))})},sS=/* */Object.freeze({__proto__:null,setValueFrom:function(n,t,e){var o=ew(n,t,e.left()),r=aw(n,t,e.top()),i=lw(o,r);return fw(n,i),i},setToMin:function(n,t){var e=lx(t),o=dx(t);fw(n,lw(e,o))},setToMax:function(n,t){var e=px(t),o=hx(t);fw(n,lw(e,o))},getValueFromEvent:function(n){return fx(n)},setPositionFromValue:function(n,t,e,o){var r=Fx(e),i=rw(n,o.getSpectrum(n),r.x(),o.getLeftEdge(n),o.getRightEdge(n),e),u=sw(n,o.getSpectrum(n),r.y(),o.getTopEdge(n),o.getBottomEdge(n),e),a=cu(t.element())/2,c=ru(t.element())/2;ro(t.element(),"left",i-a+"px"),ro(t.element(),"top",u-c+"px")},onLeft:rS,onRight:iS,onUp:uS,onDown:aS,edgeActions:cS}),fS=Ml({name:"Slider",configFields:[pt("stepSize",1),pt("onChange",Z),pt("onChoose",Z),pt("onInit",Z),pt("onDragStart",Z),pt("onDragEnd",Z),pt("snapToGrid",!1),pt("rounded",!0),st("snapStart"),et("model",Qn("mode",{x:[pt("minX",0),pt("maxX",100),Ct("value",function(n){return or(n.mode.minX)}),tt("getInitialValue"),Zu("manager",$w)],y:[pt("minY",0),pt("maxY",100),Ct("value",function(n){return or(n.mode.minY)}),tt("getInitialValue"),Zu("manager",oS)],xy:[pt("minX",0),pt("maxX",100),pt("minY",0),pt("maxY",100),Ct("value",function(n){return or({x:nn(n.mode.minX),y:nn(n.mode.minY)})}),tt("getInitialValue"),Zu("manager",sS)]})),Ls("sliderBehaviours",[wg,tl]),Ct("mouseIsDown",function(){return or(!1)})],partFields:Uw,factory:function(i,n,t,e){function u(n){return rf(n,i,"thumb")}function a(n){return rf(n,i,"spectrum")}function o(n){return of(n,i,"left-edge")}function r(n){return of(n,i,"right-edge")}function c(n){return of(n,i,"top-edge")}function s(n){return of(n,i,"bottom-edge")}function f(n,t){v.setPositionFromValue(n,t,i,{getLeftEdge:o,getRightEdge:r,getTopEdge:c,getBottomEdge:s,getSpectrum:a})}function l(n,t){h.value.set(t);var e=u(n);return f(n,e),i.onChange(n,e,t),tn.some(!0)}function d(e){var n=i.mouseIsDown.get();i.mouseIsDown.set(!1),n&&of(e,i,"thumb").each(function(n){var t=h.value.get();i.onChoose(e,n,t)})}function m(n,t){t.stop(),i.mouseIsDown.set(!0),i.onDragStart(n,u(n))}function g(n,t){t.stop(),i.onDragEnd(n,u(n)),d(n)}var p,h=i.model,v=h.manager;return{uid:i.uid,dom:i.dom,components:n,behaviours:Us(i.sliderBehaviours,[wg.config({mode:"special",focusIn:function(n){return of(n,i,"spectrum").map(wg.focusIn).map(nn(!0))}}),tl.config({store:{mode:"manual",getValue:function(n){return h.value.get()}}}),bc.config({channels:(p={},p[Gf()]={onReceive:d},p)})]),events:Gt([qt(Ww(),function(n,t){l(n,t.event().value())}),Oi(function(n,t){var e=h.getInitialValue();h.value.set(e);var o=u(n);f(n,o);var r=a(n);i.onInit(n,o,r,h.value.get())}),qt(Ir(),m),qt(Vr(),g),qt(Nr(),m),qt(Lr(),g)]),apis:{resetToMin:function(n){v.setToMin(n,i)},resetToMax:function(n){v.setToMax(n,i)},changeValue:l,refresh:f},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,t){n.resetToMin(t)},resetToMax:function(n,t){n.resetToMax(t)},refresh:function(n,t){n.refresh(t)}}}),lS=[Ls("formBehaviours",[tl])],dS=function(o,n){return{uid:o.uid,dom:o.dom,components:n,behaviours:Us(o.formBehaviours,[tl.config({store:{mode:"manual",getValue:function(n){var t=af(n,o);return L(t,function(n,t){return n().bind(function(n){return function(n,t){return n.fold(function(){return K.error(t)},K.value)}(ed.getCurrent(n),new Error("Cannot find a current component to extract the value from for form part '"+t+"': "+Be(n.element())))}).map(tl.getValue)})},setValue:function(e,n){pn(n,function(t,n){of(e,o,n).each(function(n){ed.getCurrent(n).each(function(n){tl.setValue(n,t)})})})}}})]),apis:{getField:function(n,t){return of(n,o,t).bind(ed.getCurrent)}}}},mS={getField:Re(function(n,t,e){return n.getField(t,e)}),sketch:function(n){var e,t=(e=[],{field:function(n,t){return e.push(n),Qs("form",mw(n),t)},record:function(){return e}}),o=n(t),r=t.record(),i=S(r,function(n){return Sl({name:n,pname:mw(n)})});return mf("form",lS,i,dS,o)}},gS=De("valid-input"),pS=De("invalid-input"),hS=De("validating-input"),vS="colorcustom.rgb.",bS=function(){return ed.config({find:tn.some})},yS=function(n){return ed.config({find:n.getOpt})},xS=function(n){return ed.config({find:function(t){return le(t.element(),n).bind(function(n){return t.getSystem().getByDom(n).toOption()})}})},wS={"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"},SS=tinymce.util.Tools.resolve("tinymce.Resource"),CS=jo([pt("preprocess",l),pt("postprocess",l)]),kS=function(r,n){var i=Jn("RepresentingConfigs.memento processors",CS,n);return tl.config({store:{mode:"manual",getValue:function(n){var t=r.get(n),e=tl.getValue(t);return i.postprocess(e)},setValue:function(n,t){var e=i.preprocess(t),o=r.get(n);tl.setValue(o,e)}}})},OS=bw,_S=function(n){return yw(n,be,ye)},TS=function(n){return tl.config({store:{mode:"memory",initialValue:n}})},ES=De("alloy-fake-before-tabstop"),BS=De("alloy-fake-after-tabstop"),DS=function(n){return Ab(n,["."+ES,"."+BS].join(","),nn(!1))},AS=function(n,t){var e=t.element();$e(e,ES)?Sw(n,!0):$e(e,BS)&&Sw(n,!1)},MS=function(n){return{dom:{tag:"div",classes:["tox-navobj"]},components:[ww([ES]),n,ww([BS])],behaviours:Sa([xS(1)])}},FS=!(At().browser.isIE()||At().browser.isEdge());function IS(n,t){return HS(v.document.createElement("canvas"),n,t)}function RS(n){var t=IS(n.width,n.height);return VS(t).drawImage(n,0,0),t}function VS(n){return n.getContext("2d")}function HS(n,t,e){return n.width=t,n.height=e,n}function NS(n){return n.naturalWidth||n.width}function PS(n){return n.naturalHeight||n.height}var zS,LS,jS=window.Promise?window.Promise:(zS=US.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},LS=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},US.prototype["catch"]=function(n){return this.then(null,n)},US.prototype.then=function(e,o){var r=this;return new US(function(n,t){GS.call(r,new KS(e,o,n,t))})},US.all=function(){for(var n=[],t=0;t").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),gk(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(n)},c=function(n){if(yk(n),n.button!==u)return a(n);n.deltaX=n.screenX-f,n.deltaY=n.screenY-l,n.preventDefault(),r.drag(n)},a=function(n){yk(n),gk(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(n)},this.destroy=function(){gk(m).off()},gk(m).on("mousedown touchstart",t)}function wk(t){function u(n,s){c.getOpt(n).each(function(n){var e=l.get(),o=cu(n.element()),r=ru(n.element()),i=s.dom().naturalWidth*e,u=s.dom().naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),t={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};io(s,t),f.getOpt(n).each(function(n){io(n.element(),t)}),d.get().each(function(n){var t=m.get();n.setRect({x:t.x*e+a,y:t.y*e+c,w:t.w*e,h:t.h*e}),n.setClampRect({x:a,y:c,w:i,h:u}),n.setViewPortRect({x:0,y:0,w:o,h:r})})})}function e(n,t){var i=ir.fromTag("img");return Ce(i,"src",t),function(e){return new ih(function(n){var t=function(){e.removeEventListener("load",t),n(e)};e.complete?n(e):e.addEventListener("load",t)})}(i.dom()).then(function(){return c.getOpt(n).map(function(n){var t=Zi({element:i});Cg.replaceAt(n,1,tn.some(t));var e=a.get(),o={x:0,y:0,w:i.dom().naturalWidth,h:i.dom().naturalHeight};a.set(o);var r=pk.inflate(o,-20,-20);return m.set(r),e.w===o.w&&e.h===o.h||function(n,u){c.getOpt(n).each(function(n){var t=cu(n.element()),e=ru(n.element()),o=u.dom().naturalWidth,r=u.dom().naturalHeight,i=Math.min(t/o,e/r);1<=i?l.set(1):l.set(i)})}(n,i),u(n,i),i})})}var f=dp({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),l=or(1),d=or(tn.none()),m=or({x:0,y:0,w:1,h:1}),a=or({x:0,y:0,w:1,h:1}),n=ry.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[f.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:Sa([Qd("image-panel-crop-events",[Oi(function(n){c.getOpt(n).each(function(n){var t=n.element().dom(),e=Ok({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,function(){});e.toggleVisibility(!1),e.on("updateRect",function(n){var t=n.rect,e=l.get(),o={x:Math.round(t.x/e),y:Math.round(t.y/e),w:Math.round(t.w/e),h:Math.round(t.h/e)};m.set(o)}),d.set(tn.some(e))})})])])}],containerBehaviours:Sa([Cg.config({}),Qd("image-panel-events",[Oi(function(n){e(n,t)})])])}),c=dp(n);return{memContainer:c,updateSrc:e,zoom:function(n,t){var e=l.get(),o=0').appendTo(o),vk.each(i,function(n){gk("#"+a,o).append(''),components:[],behaviours:Sa([VT.config({channel:QF,initialData:n,updateState:function(n,t){var e=S(t.buttons,function(n){var t=dp(function(n,t){return GC(n,n.type,t)}(n,o));return{name:n.name,align:n.align,memento:t}});return tn.some({lookupByName:function(n,t){return function(t,n,e){return _(n,function(n){return n.name===e}).bind(function(n){return n.memento.getOpt(t)})}(n,e,t)},footerButtons:e})},renderComponents:UA})])}}function GA(n,t){return CM.parts().footer(WA(n,t))}function XA(t,e){if(t.getRoot().getSystem().isConnected()){var o=ed.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return mS.getField(o,e).fold(function(){var n=t.getFooter();return VT.getState(n).get().bind(function(n){return n.lookupByName(o,e)})},function(n){return tn.some(n)})}return tn.none()}function YA(u,o,a){function n(n){var t=u.getRoot();t.getSystem().isConnected()&&n(t)}var c={getData:function(){var n=u.getRoot(),t=n.getSystem().isConnected()?u.getFormWrapper():n,e=tl.getValue(t),o=L(a,function(n){return n.get()});return P(P({},e),o)},setData:function(i){n(function(n){var t=c.getData(),e=P(P({},t),i),o=function(n,t){var e=n.getRoot();return VT.getState(e).get().map(function(n){return Kn(qn("data",n.dataValidator,t))}).getOr(t)}(u,e),r=u.getFormWrapper();tl.setValue(r,o),pn(a,function(n,t){yn(e,t)&&n.set(e[t])})})},disable:function(n){XA(u,n).each(Gh.disable)},enable:function(n){XA(u,n).each(Gh.enable)},focus:function(n){XA(u,n).each(Tg.focus)},block:function(t){if(!J(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){Lt(n,fy,{message:t})})},unblock:function(){n(function(n){zt(n,ly)})},showTab:function(e){n(function(n){var t=u.getBody();VT.getState(t).get().exists(function(n){return n.isTabPanel()})&&ed.getCurrent(t).each(function(n){XF.showTab(n,e)})})},redial:function(e){n(function(n){var t=o(e);n.getSystem().broadcastOn([KF],t),n.getSystem().broadcastOn([JF],t.internalDialog),n.getSystem().broadcastOn([$F],t.internalDialog),n.getSystem().broadcastOn([QF],t.internalDialog),c.setData(t.initialData)})},close:function(){n(function(n){zt(n,uy)})}};return c}function qA(n,t){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,t]}}function KA(n,t){return CM.parts().close(hp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:n,buttonBehaviours:Sa([Wy.config({})])}))}function JA(){return CM.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function $A(n,t){return CM.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:VE("

"+t.translate(n)+"

")}]}]})}function QA(n){return CM.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n})}function ZA(n,t){return[ry.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),ry.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})]}function nM(t){var n,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return CM.sketch({lazySink:t.lazySink,onEscape:function(n){return t.onEscape(n),tn.some(!0)},useTabstopAt:function(n){return!DS(n)},dom:{tag:"div",classes:[e].concat(t.extraClasses),styles:P({position:"relative"},t.extraStyles)},components:p([t.header,t.body],t.footer.toArray()),parts:{blocker:{dom:VE('
'),components:[{dom:{tag:"div",classes:eI?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:Sa(p([Tg.config({}),Qd("dialog-events",t.dialogEvents.concat([ne(Ur(),function(n,t){wg.focusIn(n)})])),Qd("scroll-lock",[Oi(function(){qe(Ji(),i)}),_i(function(){Je(Ji(),i)})])],t.extraBehaviours)),eventOrder:P((n={},n[oi()]=["dialog-events"],n[gi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],n[pi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],n),t.eventOrder)})}function tM(n){return hp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),title:n.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:''}}],action:function(n){zt(n,ay)}})}function eM(n,t,e){function o(n){return[wo(e.translate(n.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:P({},t.map(function(n){return{id:n}}).getOr({}))},components:o(n),behaviours:Sa([VT.config({channel:JF,renderComponents:o})])}}function oM(){return{dom:VE('
')}}function rM(n,t){return function(n,t){var e=CM.parts().title(eM(n,tn.none(),t)),o=CM.parts().draghandle(oM()),r=CM.parts().close(tM(t)),i=[e].concat(n.draggable?[o]:[]).concat([r]);return ry.sketch({dom:VE('
'),components:i})}({title:t.shared.providers.translate(n),draggable:t.dialog.isDraggableModal()},t.shared.providers)}function iM(n,t){return{onClose:function(){return t.closeWindow()},onBlock:function(e){CM.setBusy(n(),function(n,t){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:VE('
')}]}})},onUnblock:function(){CM.setIdle(n())}}}function uM(n,t,e,o){var r;return tu(nM(P(P({},n),{lazySink:o.shared.getSink,extraBehaviours:p([VT.config({channel:KF,updateState:function(n,t){return tn.some(t)},initialData:t}),TS({})],n.extraBehaviours),onEscape:function(n){zt(n,ay)},dialogEvents:e,eventOrder:(r={},r[ei()]=["reflecting","receiving"],r[gi()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],r[pi()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],r)})))}function aM(n){return S(n,function(n){return"menu"===n.type?function(n){var t=S(n.items,function(n){var t=or(!1);return P(P({},n),{storage:t})});return P(P({},n),{items:t})}(n):n})}function cM(n){return O(n,function(n,t){return"menu"!==t.type?n:O(t.items,function(n,t){return n[t.name]=t.storage,n},n)},{})}function sM(n,t,e){var o=rM(n.internalDialog.title,e),r=function(n,t){var e=LA(n,tn.none(),t,!1);return CM.parts().body(e)}({body:n.internalDialog.body},e),i=aM(n.internalDialog.buttons),u=cM(i),a=GA({buttons:i},e),c=tI(function(){return d},iM(function(){return l},t)),s="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],f={header:o,body:r,footer:tn.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=uM(f,n,c,e),d=YA({getRoot:function(){return l},getBody:function(){return CM.getBody(l)},getFooter:function(){return CM.getFooter(l)},getFormWrapper:function(){var n=CM.getBody(l);return ed.getCurrent(n).getOr(n)}},t.redial,u);return{dialog:l,instanceApi:d}}function fM(n,t,e,o){var r,i,u=De("dialog-label"),a=De("dialog-content"),c=dp(function(n,t,e){return ry.sketch({dom:VE('
'),components:[eM(n,tn.some(t),e),oM(),tM(e)],containerBehaviours:Sa([OA.config({mode:"mouse",blockerClass:"blocker",getTarget:function(n){return Hu(n,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})}({title:n.internalDialog.title,draggable:!0},u,e.shared.providers)),s=dp(function(n,t,e,o){return LA(n,tn.some(t),e,o)}({body:n.internalDialog.body},a,e,o)),f=aM(n.internalDialog.buttons),l=cM(f),d=dp(function(n,t){return WA(n,t)}({buttons:f},e)),m=tI(function(){return p},{onBlock:function(){},onUnblock:function(){},onClose:function(){return t.closeWindow()}}),g=tu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=u,r["aria-describedby"]=""+a,r)},eventOrder:(i={},i[ei()]=[VT.name(),bc.name()],i[oi()]=["execute-on-form"],i[gi()]=["reflecting","execute-on-form"],i),behaviours:Sa([wg.config({mode:"cyclic",onEscape:function(n){return zt(n,uy),tn.some(!0)},useTabstopAt:function(n){return!DS(n)&&("button"!==xe(n)||"disabled"!==ke(n,"disabled"))}}),VT.config({channel:KF,updateState:function(n,t){return tn.some(t)},initialData:n}),Tg.config({}),Qd("execute-on-form",m.concat([ne(Ur(),function(n,t){wg.focusIn(n)})])),TS({})]),components:[c.asSpec(),s.asSpec(),d.asSpec()]}),p=YA({getRoot:function(){return g},getFooter:function(){return d.get(g)},getBody:function(){return s.get(g)},getFormWrapper:function(){var n=s.get(g);return ed.getCurrent(n).getOr(n)}},t.redial,l);return{dialog:g,instanceApi:p}}function lM(n){return $(n)&&-1!==rI.indexOf(n.mceAction)}function dM(e,n,o,t){var r,i=rM(e.title,t),u=function(n){var t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[MS({dom:{tag:"iframe",attributes:{src:n.url}},behaviours:Sa([Wy.config({}),Tg.config({})])})]}],behaviours:Sa([wg.config({mode:"acyclic",useTabstopAt:b(DS)})])};return CM.parts().body(t)}(e),a=e.buttons.bind(function(n){return 0===n.length?tn.none():tn.some(GA({buttons:n},t))}),c=nI(function(){return h},iM(function(){return p},n)),s=P(P({},e.height.fold(function(){return{}},function(n){return{height:n+"px","max-height":n+"px"}})),e.width.fold(function(){return{}},function(n){return{width:n+"px","max-width":n+"px"}})),f=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],l=new oI(e.url,{base_uri:new oI(v.window.location.href)}),d=l.protocol+"://"+l.host+(l.port?":"+l.port:""),m=or(tn.none()),g=[Qd("messages",[Oi(function(){var n=Bb(ir.fromDom(v.window),"message",function(n){if(l.isSameOrigin(new oI(n.raw().origin))){var t=n.raw().data;lM(t)?function(n,t,e){switch(e.mceAction){case"insertContent":n.insertContent(e.content);break;case"setContent":n.setContent(e.content);break;case"execCommand":var o=!!en(e.ui)&&e.ui;n.execCommand(e.cmd,o,e.value);break;case"close":t.close();break;case"block":t.block(e.message);break;case"unblock":t.unblock()}}(o,h,t):function(n){return!lM(n)&&$(n)&&yn(n,"mceAction")}(t)&&e.onMessage(h,t)}});m.set(tn.some(n))}),_i(function(){m.get().each(function(n){return n.unbind()})})]),bc.config({channels:(r={},r[ZF]={onReceive:function(n,t){Vu(n.element(),"iframe").each(function(n){n.dom().contentWindow.postMessage(t,d)})}},r)})],p=uM({header:i,body:u,footer:a,extraClasses:f,extraBehaviours:g,extraStyles:s},e,c,t),h=function(t){function n(n){t.getSystem().isConnected()&&n(t)}return{block:function(t){if(!J(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n(function(n){Lt(n,fy,{message:t})})},unblock:function(){n(function(n){zt(n,ly)})},close:function(){n(function(n){zt(n,uy)})},sendMessage:function(t){n(function(n){n.getSystem().broadcastOn([ZF],t)})}}}(p);return{dialog:p,instanceApi:h}}var mM,gM,pM,hM,vM=function(i,r){r.delimiter||(r.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Sa([wg.config({mode:"flow",selector:"div[role=button]"}),Wy.config({}),Cg.config({}),Qd("elementPathEvents",[Oi(function(e,n){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return wg.focusIn(e)}),i.on("NodeChange",function(n){var t=function(n){for(var t=[],e=n.length;0