/** * 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.6.2 (2020-12-08) */ !function(){"use strict";var $=function(){},i=function(e,o){return function(){for(var t=[],n=0;n "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},dn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return nn(n)},toString:function(){return"array("+r.toString()+")"}}},mn=function(a){return{extract:function(t,n,e){for(var o=[],r=0,i=a;r ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+en(t.input);var n,e},Bn=xn,An=function(t,n){return xn(t,Tt(n,fn))},Mn=at(wn),Fn=function(e,o){return sn(function(t){var n=typeof t;return e(t)?vt(t):yt("Expected type: "+o+" but got: "+n)})},In=Fn(lt,"number"),Rn=Fn(k,"string"),Vn=Fn(O,"boolean"),Pn=Fn(_,"function"),Hn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).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(n).every(function(t){return Hn(n[t])});case"Map":return t(n.keys(),Hn)&&t(n.values(),Hn);case"Set":return t(n.keys(),Hn);default:return!1}},zn=sn(function(t){return Hn(t)?vt(t):yt("Expected value to be acceptable for sending via postMessage")}),Nn=function(n){return Cn(function(t){return M(n,t)?mt.value(t):mt.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Ln=function(t){return bn(t,t,Wt(),pn())},jn=function(t,n){return bn(t,t,Wt(),n)},Un=function(t){return jn(t,Rn)},Wn=function(t,n){return bn(t,t,Wt(),Nn(n))},Gn=function(t){return jn(t,Pn)},Xn=function(t,n){return bn(t,t,Wt(),fn(n))},Yn=function(t,n){return bn(t,t,Wt(),hn(n))},qn=function(t,n){return bn(t,t,Wt(),dn(n))},Kn=function(t){return bn(t,t,Gt(),pn())},Jn=function(t,n){return bn(t,t,Gt(),n)},$n=function(t){return Jn(t,In)},Qn=function(t){return Jn(t,Rn)},Zn=function(t){return Jn(t,Pn)},te=function(t,n){return Jn(t,fn(n))},ne=function(t,n){return bn(t,t,Ut(n),pn())},ee=function(t,n,e){return bn(t,t,Ut(n),e)},oe=function(t,n){return ee(t,n,In)},re=function(t,n){return ee(t,n,Rn)},ie=function(t,n,e){return ee(t,n,Nn(e))},ue=function(t,n){return ee(t,n,Vn)},ae=function(t,n){return ee(t,n,Pn)},ce=function(t,n,e){return ee(t,n,dn(e))},se=function(t,n,e){return ee(t,n,fn(e))},le=function(t,n){return vn(t,n)},fe=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},de=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:t}},me={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1=o.length&&e.substr(r,r+o.length)===o;var e,o,r},ke=(et=/^\s+|\s+$/g,function(t){return t.replace(et,"")}),Ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Oe=function(n){return function(t){return we(t,n)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return we(t,"edge/")&&we(t,"chrome")&&we(t,"safari")&&we(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ce],search:function(t){return we(t,"chrome")&&!we(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return we(t,"msie")||we(t,"trident")}},{name:"Opera",versionRegexes:[Ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Oe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Oe("firefox")},{name:"Safari",versionRegexes:[Ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(we(t,"safari")||we(t,"mobile/"))&&we(t,"applewebkit")}}],Te=[{name:"Windows",search:Oe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return we(t,"iphone")||we(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Oe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Oe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Oe("linux"),versionRegexes:[]},{name:"Solaris",search:Oe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Oe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Oe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ee={browsers:at(_e),oses:at(Te)},De="Firefox",Be=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o(De),isSafari:o("Safari")}},Ae={unknown:function(){return Be({current:undefined,version:ve.unknown()})},nu:Be,edge:at("Edge"),chrome:at("Chrome"),ie:at("IE"),opera:at("Opera"),firefox:at(De),safari:at("Safari")},Me="Windows",Fe="Android",Ie="Solaris",Re="FreeBSD",Ve="ChromeOS",Pe=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(Me),isiOS:o("iOS"),isAndroid:o(Fe),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o(Ie),isFreeBSD:o(Re),isChromeOS:o(Ve)}},He={unknown:function(){return Pe({current:undefined,version:ve.unknown()})},nu:Pe,windows:at(Me),ios:at("iOS"),android:at(Fe),linux:at("Linux"),osx:at("OSX"),solaris:at(Ie),freebsd:at(Re),chromeos:at(Ve)},ze=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g=Ee.browsers(),p=Ee.oses(),h=ye(g,t).fold(Ae.unknown,Ae.nu),v=xe(p,t).fold(He.unknown,He.nu);return{browser:h,os:v,deviceType:(o=h,r=t,i=n,u=(e=v).isiOS()&&!0===/ipad/i.test(r),a=e.isiOS()&&!u,c=e.isiOS()||e.isAndroid(),s=c||i("(pointer:coarse)"),l=u||!a&&c&&i("(min-device-width:768px)"),f=a||c&&!l,d=o.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!f&&!l&&!d,{isiPad:at(u),isiPhone:at(a),isTablet:at(l),isPhone:at(f),isTouch:at(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:at(d),isDesktop:at(m)})}},Ne=function(t){return window.matchMedia(t).matches},Le=Lt(function(){return ze(navigator.userAgent,Ne)}),je=function(){return Le()},Ue=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(o.matches!==undefined)return o.matches(n);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(n);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},We=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ge=function(t,n){return t.dom===n.dom},Xe=function(t,n){return e=t.dom,o=n.dom,r=e,i=o,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(r.compareDocumentPosition(i)&u);var e,o,r,i,u},Ye=function(t,n){return je().browser.isIE()?Xe(t,n):(e=n,o=t.dom,r=e.dom,o!==r&&o.contains(r));var e,o,r},qe=function(t){return _(t)?t:c},Ke=function(t,n,e){for(var o=t.dom,r=qe(e);o.parentNode;){o=o.parentNode;var i=me.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return st.none()},Je=function(t,n,e){var o=n(t),r=qe(e);return o.orThunk(function(){return r(t)?st.none():Ke(t,n,r)})},$e=function(t,n){return Ge(t.element,n.event.target)},Qe=function(t){if(!Rt(t,"can")&&!Rt(t,"abort")&&!Rt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return En("Extracting event.handler",ln([ne("can",b),ne("abort",c),ne("run",$)]),t)},Ze=function(e){var n,o,r,i,t=(o=function(t){return t.can},function(){for(var e=[],t=0;t "):o[0].name;return Jt(r,{handler:n,purpose:e})})});return Qt(n,{})},Si="alloy.base.behaviour",ki=function(t){var n,e;return _n("custom.definition",fn([bn("dom","dom",Wt(),fn([Ln("tag"),ne("styles",{}),ne("classes",[]),ne("attributes",{}),Kn("value"),Kn("innerHtml")])),Ln("components"),Ln("uid"),ne("events",{}),ne("apis",{}),bn("eventOrder","eventOrder",((n={})[_o()]=["disabling",Si,"toggling","typeaheadevents"],n[So()]=[Si,"focusing","keying"],n[Mo()]=[Si,"disabling","toggling","representing"],n[po()]=[Si,"representing","streaming","invalidating"],n[Ho()]=[Si,"representing","item-events","tooltipping"],n[io()]=["focusing",Si,"item-type-events"],n[no()]=["focusing",Si,"item-type-events"],n[so()]=["item-type-events","tooltipping"],n[Oo()]=["receiving","reflecting","tooltipping"],e=n,jt.mergeWithThunk(at(e))),Mn()),Kn("domModification")]),t)},Ci=function(t,n){var e=Nr(t,n);return e===undefined||""===e?[]:e.split(" ")},Oi=function(t){return t.dom.classList!==undefined},_i=function(t,n){return r=n,i=Ci(e=t,o="class").concat([r]),zr(e,o,i.join(" ")),!0;var e,o,r,i},Ti=function(t,n){return r=n,0<(i=H(Ci(e=t,o="class"),function(t){return t!==r})).length?zr(e,o,i.join(" ")):Ur(e,o),!1;var e,o,r,i},Ei=function(t,n){Oi(t)?t.dom.classList.add(n):_i(t,n)},Di=function(t){0===(Oi(t)?t.dom.classList:Ci(t,"class")).length&&Ur(t,"class")},Bi=function(t,n){Oi(t)?t.dom.classList.remove(n):Ti(t,n),Di(t)},Ai=function(t,n){return Oi(t)&&t.dom.classList.contains(n)},Mi=function(n,t){ft(t,function(t){Ei(n,t)})},Fi=function(n,t){ft(t,function(t){Bi(n,t)})},Ii=function(t){return t.style!==undefined&&_(t.style.getPropertyValue)},Ri=function(t){return br(t)},Vi=_(Element.prototype.attachShadow)&&_(Node.prototype.getRootNode),Pi=at(Vi),Hi=Vi?function(t){return me.fromDom(t.dom.getRootNode())}:xr,zi=function(t){return Ri(t)?t:me.fromDom(xr(t).dom.body)},Ni=function(t){var n=Hi(t);return Ri(n)?st.some(n):st.none()},Li=function(t){return me.fromDom(t.dom.host)},ji=function(t){return v(t.dom.shadowRoot)},Ui=function(t){var n=hr(t)?t.dom.parentNode:t.dom;if(n===undefined||null===n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return Ni(me.fromDom(n)).fold(function(){return r.body.contains(n)},(e=Ui,o=Li,function(t){return e(o(t))}))},Wi=function(){return Gi(me.fromDom(document))},Gi=function(t){var n=t.dom.body;if(null===n||n===undefined)throw new Error("Body is not available yet");return me.fromDom(n)},Xi=function(t,n,e){if(!k(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ii(t)&&t.style.setProperty(n,e)},Yi=function(t,n){Ii(t)&&t.style.removeProperty(n)},qi=function(t,n,e){var o=t.dom;Xi(o,n,e)},Ki=function(t,n){var e=t.dom;_t(n,function(t,n){Xi(e,n,t)})},Ji=function(t,n){var e=t.dom;_t(n,function(t,n){t.fold(function(){Yi(e,n)},function(t){Xi(e,n,t)})})},$i=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||Ui(t)?o:Qi(e,n)},Qi=function(t,n){return Ii(t)?t.style.getPropertyValue(n):""},Zi=function(t,n){var e=t.dom,o=Qi(e,n);return st.from(o).filter(function(t){return 0"}),Mn()),af=le("schema",function(){return[Kn("preprocess")]}),cf=ne("defaults",at({})),sf=ne("overrides",at({})),lf=fn([ef,of,rf,uf,cf,sf]),ff=fn([ef,of,rf,cf,sf]),df=fn([ef,of,rf,uf,cf,sf]),mf=fn([ef,af,rf,Ln("unit"),uf,cf,sf]),gf=function(t){return t.fold(st.some,st.none,st.some,st.some)},pf=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},hf=function(e,o){return function(t){var n=En("Converting part type",o,t);return e(n)}},vf=hf(nf.required,lf),bf=hf(nf.external,ff),yf=hf(nf.optional,df),xf=hf(nf.group,mf),wf=at("entirety"),Sf=/* */Object.freeze({__proto__:null,required:vf,external:bf,optional:yf,group:xf,asNamedPart:gf,name:pf,asCommon:function(t){return t.fold(ct,ct,ct,ct)},original:wf}),kf=function(t,n,e,o){return zt(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},Cf=function(r,t){var n={};return ft(t,function(t){gf(t).each(function(e){var o=Of(r,e.pname);n[e.name]=function(t){var n=En("Part: "+e.name+" in "+r,fn(e.schema),t);return ut(ut({},o),{config:t,validated:n})}})}),n},Of=function(t,n){return{uiType:tf(),owner:t,name:n}},_f=function(t,n,e){return{uiType:tf(),owner:t,name:n,config:e,validated:{}}},Tf=function(t){return U(t,function(t){return t.fold(st.none,st.some,st.none,st.none).map(function(t){return Xn(t.name,t.schema.concat([ya(wf())]))}).toArray()})},Ef=function(t){return V(t,pf)},Df=function(t,n,e){return o=n,i={},r={},ft(e,function(t){t.fold(function(o){i[o.pname]=Ql(!0,function(t,n,e){return o.factory.sketch(kf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=at(t.factory.sketch(kf(o,t,n[wf()]),n))},function(o){i[o.pname]=Ql(!1,function(t,n,e){return o.factory.sketch(kf(t,o,n,e))})},function(r){i[r.pname]=Zl(!0,function(n,t,e){var o=n[r.name];return V(o,function(t){return r.factory.sketch(zt(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:at(i),externals:at(r)};var o,i,r},Bf=function(t,n,e){return $l(st.some(t),n,n.components,e)},Af=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOptional()},Mf=function(t,n,e){return Af(t,n,e).getOrDie("Could not find part: "+e)},Ff=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return ft(e,function(t){o[t]=at(i.getByUid(r[t]))}),o},If=function(t,n){var e=t.getSystem();return Tt(n.partUids,function(t,n){return at(e.getByUid(t))})},Rf=function(t){return Ct(t.partUids)},Vf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return ft(e,function(t){o[t]=at(i.getByUid(r[t]).getOrDie())}),o},Pf=function(n,t){var e=Ef(t);return $t(V(e,function(t){return{key:t,value:n+"-"+t}}))},Hf=function(n){return bn("partUids","partUids",Yt(function(t){return Pf(t.uid,n)}),Mn())},zf=/* */Object.freeze({__proto__:null,generate:Cf,generateOne:_f,schemas:Tf,names:Ef,substitutes:Df,components:Bf,defaultUids:Pf,defaultUidsSchema:Hf,getAllParts:If,getAllPartNames:Rf,getPart:Af,getPartOrDie:Mf,getParts:Ff,getPartsOrDie:Vf}),Nf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Xn("parts",i)]:[]).concat([Ln("uid"),ne("dom",{}),ne("components",[]),ya("originalSpec"),ne("debug.sketcher",{})]).concat(u));return En(t+" [SpecSchema]",ln(a.concat(n)),e)},Lf=function(t,n,e,o,r){var i=jf(r),u=Tf(e),a=Hf(e),c=Nf(t,n,i,u,[a]),s=Df(0,c,e);return o(c,Bf(t,c,s.internals()),i,s.externals())},jf=function(t){return It(t,"uid")?t:ut(ut({},t),{uid:ei("uid")})};var Uf,Wf,Gf=ln([Ln("name"),Ln("factory"),Ln("configFields"),ne("apis",{}),ne("extraApis",{})]),Xf=ln([Ln("name"),Ln("factory"),Ln("configFields"),Ln("partFields"),ne("apis",{}),ne("extraApis",{})]),Yf=function(t){var i=En("Sketcher for "+t.name,Gf,t),n=Tt(i.apis,li),e=Tt(i.extraApis,ai);return ut(ut({name:i.name,configFields:i.configFields,sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=jf(t),o(Nf(n,e,r,[],[]),r);var n,e,o,r}},n),e)},qf=function(t){var n=En("Sketcher for "+t.name,Xf,t),e=Cf(n.name,n.partFields),o=Tt(n.apis,li),r=Tt(n.extraApis,ai);return ut(ut({name:n.name,partFields:n.partFields,configFields:n.configFields,sketch:function(t){return Lf(n.name,n.configFields,n.partFields,n.factory,t)},parts:e},o),r)},Kf=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o',e.getDoc());return Ar(t,me.fromDom(n.extractContents())),n.insertNode(t.dom),kr(t).each(function(t){return t.dom.normalize()}),ds(t,fs).map(function(t){var n;e.selection.setCursorLocation(t.dom,"img"===mr(n=t)?1:ss(n).fold(function(){return _r(n).length},function(t){return t.length}))}),t})},_p=function(t){return Ju(t,"[data-mce-autocompleter]")},Tp=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Ep=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},Dp=function(t,n){return t.substring(n.length)},Bp=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return st.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return Cp(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){for(var o=n-1;0<=o;o--){var r=t.charAt(o);if(Ep(r))return st.none();if(r===e)break}return st.some(o)}(e,n,r).getOr(n)},e).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return st.none();var e=Tp(n);return 0!==e.lastIndexOf(r)||Dp(e,r).length=t.minChars&&t.matches.getOrThunk(function(){return Pp(n.dom)})(e.range,i,e.text)});if(0===u.length)return st.none();var a=Fp.all(V(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction,highlightOn:n.highlightOn}})}));return st.some({lookupData:a,context:e})},Np=fn([Un("type"),Qn("text")]),Lp=fn([ne("type","autocompleteitem"),ne("active",!1),ne("disabled",!1),ne("meta",{}),Un("value"),Qn("text"),Qn("icon")]),jp=fn([Un("type"),Un("ch"),oe("minChars",1),ne("columns",1),oe("maxResults",10),Zn("matches"),Gn("fetch"),Gn("onAction"),ce("highlightOn",[],Rn)]),Up=[ue("disabled",!1),Qn("tooltip"),Qn("icon"),Qn("text"),ae("onSetup",function(){return $})],Wp=fn([Un("type"),Gn("onAction")].concat(Up)),Gp=function(t){return _n("toolbarbutton",Wp,t)},Xp=[ue("active",!1)].concat(Up),Yp=fn(Xp.concat([Un("type"),Gn("onAction")])),qp=function(t){return _n("ToggleButton",Yp,t)},Kp=[ae("predicate",function(){return!1}),ie("scope","node",["node","editor"]),ie("position","selection",["node","selection","line"])],Jp=Up.concat([ne("type","contextformbutton"),ne("primary",!1),Gn("onAction"),le("original",ct)]),$p=Xp.concat([ne("type","contextformbutton"),ne("primary",!1),Gn("onAction"),le("original",ct)]),Qp=Up.concat([ne("type","contextformbutton")]),Zp=Xp.concat([ne("type","contextformtogglebutton")]),th=An("type",{contextformbutton:Jp,contextformtogglebutton:$p}),nh=fn([ne("type","contextform"),ae("initValue",function(){return""}),Qn("label"),qn("commands",th),Jn("launch",An("type",{contextformbutton:Qp,contextformtogglebutton:Zp}))].concat(Kp)),eh=fn([ne("type","contexttoolbar"),Un("items")].concat(Kp)),oh=function(t){var n,e,o=t.ui.registry.getAll().popups,r=Tt(o,function(t){return _n("Autocompleter",jp,t).fold(function(t){throw new Error(Dn(t))},function(t){return t})}),i=(n=Bt(r,function(t){return t.ch}),e={},ft(n,function(t){e[t]={}}),Ct(e)),u=Mt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return H(u,function(t){return t.ch===n})}}};(wp=xp=xp||{})[wp.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",wp[wp.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var rh,ih,uh=xp,ah="tox-menu-nav__js",ch="tox-collection__item",sh="tox-swatch",lh={normal:ah,color:sh},fh="tox-collection__item--enabled",dh="tox-collection__item-label",mh="tox-collection__item-caret",gh="tox-collection__item--active",ph="tox-collection__item-container",hh="tox-collection__item-container--row",vh=function(t){return Ft(lh,t).getOr(ah)},bh=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===t?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}},yh=function(t){var n=bh(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:vh(t)}},xh=[Yg.parts.items({})],wh=function(t,n,e){var o=bh(e);return{dom:{tag:"div",classes:dt([[o.tieredMenu]])},markers:yh(e)}},Sh=function(e,o){return function(t){var n=R(t,o);return V(n,function(t){return{dom:e,components:t}})}},kh=function(t,e){var o=[],r=[];return ft(t,function(t,n){e(t,n)?(0o}).getOr(r.length);return st.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return st.none()},Uh=function(t,n){return ic([dg(t,n)])},Wh=function(t){return Uh(Kr("unnamed-events"),t)},Gh=[Ln("lazySink"),Ln("tooltipDom"),ne("exclusive",!0),ne("tooltipComponents",[]),ne("delay",300),ie("mode","normal",["normal","follow-highlight"]),ne("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:at([Ua,ja,Ha,Na,za,La]),onRtl:at([Ua,ja,Ha,Na,za,La])}}}),ga("onHide"),ga("onShow")],Xh=/* */Object.freeze({__proto__:null,init:function(){var e=fe(st.none()),n=fe(st.none()),o=function(){e.get().each(function(t){clearTimeout(t)})},t=at("not-implemented");return di({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(st.some(t))},clearTooltip:function(){n.set(st.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(st.some(setTimeout(function(){t()},n)))},readState:t})}}),Yh=Kr("tooltip.exclusive"),qh=Kr("tooltip.show"),Kh=Kr("tooltip.hide"),Jh=function(t,n,e){t.getSystem().broadcastOn([Yh],{})},$h=/* */Object.freeze({__proto__:null,hideAllExclusive:Jh,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&fg.set(t,o)})}}),Qh=ac({fields:Gh,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(r,i){var e=function(n){i.getTooltip().each(function(t){ul(t),r.onHide(n,t),i.clearTooltip()}),i.clearTimer()};return Zo(dt([[er(qh,function(o){i.resetTimer(function(){var n,t,e;n=o,i.isShowing()||(Jh(n),t=r.lazySink(n).getOrDie(),e=n.getSystem().build({dom:r.tooltipDom,components:r.tooltipComponents,events:Zo("normal"===r.mode?[er(so(),function(t){Yo(n,qh)}),er(ao(),function(t){Yo(n,Kh)})]:[]),behaviours:ic([fg.config({})])}),i.setTooltip(e),ol(t,e),r.onShow(n,e),Qs.position(t,r.anchor(n),e))},r.delay)}),er(Kh,function(t){i.resetTimer(function(){e(t)},r.delay)}),er(Oo(),function(t,n){n.universal||M(n.channels,Yh)&&e(t)}),lr(function(t){e(t)})],"normal"===r.mode?[er(lo(),function(t){Yo(t,qh)}),er(ko(),function(t){Yo(t,Kh)}),er(so(),function(t){Yo(t,qh)}),er(ao(),function(t){Yo(t,Kh)})]:[er(Go(),function(t,n){Yo(t,qh)}),er(Xo(),function(t){Yo(t,Kh)})]]))}}),state:Xh,apis:$h}),Zh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),tv=tinymce.util.Tools.resolve("tinymce.util.I18n"),nv=["input","button","textarea","select"],ev=function(t,n,e){(n.disabled()?cv:sv)(t,n)},ov=function(t,n){return!0===n.useNative&&M(nv,mr(t.element))},rv=function(t){zr(t.element,"disabled","disabled")},iv=function(t){Ur(t.element,"disabled")},uv=function(t){zr(t.element,"aria-disabled","true")},av=function(t){zr(t.element,"aria-disabled","false")},cv=function(n,t,e){t.disableClass.each(function(t){Ei(n.element,t)}),(ov(n,t)?rv:uv)(n),t.onDisabled(n)},sv=function(n,t,e){t.disableClass.each(function(t){Bi(n.element,t)}),(ov(n,t)?iv:av)(n),t.onEnabled(n)},lv=function(t,n){return ov(t,n)?jr(t.element,"disabled"):"true"===Nr(t.element,"aria-disabled")},fv=/* */Object.freeze({__proto__:null,enable:sv,disable:cv,isDisabled:lv,onLoad:ev,set:function(t,n,e,o){(o?cv:sv)(t,n)}}),dv=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return gi({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(e,t){return Zo([tr(_o(),function(t,n){return lv(t,e)}),tc(e,t,ev)])}}),mv=[ae("disabled",c),ne("useNative",!0),Kn("disableClass"),ga("onDisabled"),ga("onEnabled")],gv=ac({fields:mv,name:"disabling",active:dv,apis:fv}),pv=tinymce.util.Tools.resolve("tinymce.EditorManager"),hv=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},vv=function(t){return t.getParam("width",Zh.DOM.getStyle(t.getElement(),"width"))},bv=function(t){return st.from(t.getParam("min_width")).filter(lt)},yv=function(t){return st.from(t.getParam("min_height")).filter(lt)},xv=function(t){return st.from(t.getParam("max_width")).filter(lt)},wv=function(t){return st.from(t.getParam("max_height")).filter(lt)},Sv=function(t){return!1!==t.getParam("menubar",!0,"boolean")},kv=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=k(n),r=p(n)&&0'+t+""})}return r},db=Cf(Ng(),Lg()),mb=function(t){return{value:t}},gb=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,pb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,hb=function(t){return gb.test(t)||pb.test(t)},vb=function(t){var n={value:t.value.replace(gb,function(t,n,e,o){return n+n+e+e+o+o})},e=pb.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},bb=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},yb=function(t){var n=bb(t.red)+bb(t.green)+bb(t.blue);return mb(n)},xb=Math.min,wb=Math.max,Sb=Math.round,kb=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Cb=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Ob=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},_b=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},Tb=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100,i=wb(0,xb(i,1)),u=wb(0,xb(u,1));if(0===i)return n=e=o=Sb(255*u),Ob(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=Sb(255*(n+l)),e=Sb(255*(e+l)),o=Sb(255*(o+l)),Ob(n,e,o,1)},Eb=function(t){var n=vb(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return Ob(e,o,r,1)},Db=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return Ob(r,i,u,a)},Bb=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Ab=Ob(255,0,0,1),Mb=function(t,n){return t.fire("ResizeContent",n)},Fb=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Ib="tinymce-custom-colors";var Rb="choiceitem",Vb=[{type:Rb,text:"Light Green",value:"#BFEDD2"},{type:Rb,text:"Light Yellow",value:"#FBEEB8"},{type:Rb,text:"Light Red",value:"#F8CAC6"},{type:Rb,text:"Light Purple",value:"#ECCAFA"},{type:Rb,text:"Light Blue",value:"#C2E0F4"},{type:Rb,text:"Green",value:"#2DC26B"},{type:Rb,text:"Yellow",value:"#F1C40F"},{type:Rb,text:"Red",value:"#E03E2D"},{type:Rb,text:"Purple",value:"#B96AD9"},{type:Rb,text:"Blue",value:"#3598DB"},{type:Rb,text:"Dark Turquoise",value:"#169179"},{type:Rb,text:"Orange",value:"#E67E23"},{type:Rb,text:"Dark Red",value:"#BA372A"},{type:Rb,text:"Dark Purple",value:"#843FA1"},{type:Rb,text:"Dark Blue",value:"#236FA1"},{type:Rb,text:"Light Gray",value:"#ECF0F1"},{type:Rb,text:"Medium Gray",value:"#CED4D9"},{type:Rb,text:"Gray",value:"#95A5A6"},{type:Rb,text:"Dark Gray",value:"#7E8C8D"},{type:Rb,text:"Navy Blue",value:"#34495E"},{type:Rb,text:"Black",value:"#000000"},{type:Rb,text:"White",value:"#ffffff"}],Pb=function(e){void 0===e&&(e=10);var t,n=Fb.getItem(Ib),o=k(n)?JSON.parse(n):[],r=e-(t=o).length<0?t.slice(0,e):t,i=function(t){r.splice(t,1)};return{add:function(t){var n;(-1===(n=A(r,t))?st.none():st.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),Fb.setItem(Ib,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Hb=function(t){return!1!==t.getParam("custom_colors")},zb=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=0;e'+n+"":"",o='
'+t.icon+"
",r={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,function(t){return r[t]});return'
'+o+e+"
"}),r="auto"!==u.columns&&1'+t.join("")+""}),Pr(n.element,i.join("")),"auto"===u.columns&&jh(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;ug.setGridSize(o,n,e)}),Yo(o,lx)}}),Jy.config({}),ug.config((n=u.columns,e="normal",1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===e?".tox-swatches__row":".tox-collection__group",cell:"color"===e?"."+sh:"."+ch}})),dg("collection-events",c)]),eventOrder:((t={})[_o()]=["disabling","alloy.base.behaviour","collection-events"],t)});return Qy(o,l,["tox-form__group--collection"],[])},dx=at([Kn("data"),ne("inputAttributes",{}),ne("inputStyles",{}),ne("tag","input"),ne("inputClasses",[]),ga("onSetValue"),ne("styles",{}),ne("eventOrder",{}),Ll("inputBehaviours",[Nl,vg]),ne("selectOnFocus",!0)]),mx=function(t){return ic([vg.config({onFocus:t.selectOnFocus?function(t){var n=t.element,e=ou(n);n.dom.setSelectionRange(0,e.length)}:$})])},gx=function(t){return{tag:t.tag,attributes:ut({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},px=Yf({name:"Input",configFields:dx(),factory:function(t,n){return{uid:t.uid,dom:gx(t),components:[],behaviours:ut(ut({},mx(e=t)),Ul(e.inputBehaviours,[Nl.config({store:ut(ut({mode:"manual"},e.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return ou(t.element)},setValue:function(t,n){ou(t.element)!==n&&ru(t.element,n)}}),onSetValue:e.onSetValue})])),eventOrder:t.eventOrder};var e}}),hx={},vx={exports:hx};zy=undefined,Ny=hx,Ly=vx,jy=undefined,function(t){"object"==typeof Ny&&void 0!==Ly?Ly.exports=t():"function"==typeof zy&&zy.amd?zy([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function l(i,u,a){function c(n,t){if(!u[n]){if(!i[n]){var e="function"==typeof jy&&jy;if(!t&&e)return e(n,!0);if(s)return s(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var r=u[n]={exports:{}};i[n][0].call(r.exports,function(t){return c(i[n][1][t]||t)},r,r.exports,l,i,u,a)}return u[n].exports}for(var s="function"==typeof jy&&jy,t=0;t"},YS=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:Ul(o.formBehaviours,[Nl.config({store:{mode:"manual",getValue:function(t){var n=If(t,o);return Tt(n,function(t,r){return t().bind(function(t){var n,e,o=td.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Gr(t.element)),n.fold(function(){return mt.error(e)},mt.value)}).map(Nl.getValue)})},setValue:function(e,t){_t(t,function(n,t){Af(e,o,t).each(function(t){td.getCurrent(t).each(function(t){Nl.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return Af(t,o,n).bind(td.getCurrent)}}}},qS={getField:li(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),_f("form",XS(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return vf({name:t,pname:XS(t)})});return Lf("form",GS,i,YS,o)}},KS=Kr("valid-input"),JS=Kr("invalid-input"),$S=Kr("validating-input"),QS="colorcustom.rgb.",ZS=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(QS+"range"),c=[Yy.parts.label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),Yy.parts.field({data:r,factory:px,inputAttributes:ut({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:ic([(i=n,u=t,Vx.config({invalidClass:m("invalid"),notify:{onValidate:function(t){qo(t,$S,{type:i})},onValid:function(t){qo(t,KS,{type:i,value:Nl.getValue(t)})},onInvalid:function(t){qo(t,JS,{type:i,value:Nl.getValue(t)})}},validator:{validate:function(t){var n=Nl.getValue(t),e=u(n)?mt.value(!0):mt.error(d("aria.input.invalid"));return _x(e)},validateOnLoad:!1}})),Jy.config({})]),onSetValue:function(t){Vx.isInvalid(t)&&Vx.run(t).get($)}})],s="hex"!==n?[Yy.parts["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red,o=n.green,r=n.blue;Nl.setValue(t,{red:e,green:o,blue:r})},b=gp({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){qi(t.element,"background-color","#"+n.value)})};return Yf({factory:function(){var e={red:fe(st.some(255)),green:fe(st.some(255)),blue:fe(st.some(255)),hex:fe(st.some("ffffff"))},o=function(t){return e[t].get()},i=function(t,n){e[t].set(n)},r=function(t){var n=t.red,e=t.green,o=t.blue;i("red",st.some(n)),i("green",st.some(e)),i("blue",st.some(o))},n=function(t,n){var e=n.event;"hex"!==e.type?i(e.type,st.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,st.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return Ob(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=yb(t),qS.getField(n,"hex").each(function(t){vg.isFocused(t)||Nl.setValue(n,{hex:e.value})}),e);y(r,o)})},a=function(t,n){var e=n.event;"hex"===e.type?function(t,n){g(t);var e=mb(n);i("hex",st.some(n));var o=Eb(e);v(t,o),r(o),qo(t,aw,{hex:e}),y(t,e)}(t,e.value):u(t,e.type,e.value)},t=function(t){return{label:d(QS+t+".label"),description:d(QS+t+".description")}},c=t("red"),s=t("green"),l=t("blue"),f=t("hex");return zt(qS.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",Yy.sketch(h(_b,"red",c.label,c.description,255))),t.field("green",Yy.sketch(h(_b,"green",s.label,s.description,255))),t.field("blue",Yy.sketch(h(_b,"blue",l.label,l.description,255))),t.field("hex",Yy.sketch(h(hb,"hex",f.label,f.description,"ffffff"))),b.asSpec()],formBehaviours:ic([Vx.config({invalidClass:m("form-invalid")}),dg("rgb-form-events",[er(KS,a),er(JS,n),er($S,n)])])}}),{apis:{updateHex:function(t,n){var e,o;Nl.setValue(t,{hex:n.value}),e=t,o=Eb(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},tk=function(t,o){var r=WS.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=WS.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}}),u=function(t,n){var e,o,r=t.width,i=t.height,u=t.getContext("2d");null!==u&&(u.fillStyle=n,u.fillRect(0,0,r,i),(e=u.createLinearGradient(0,0,r,0)).addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(1,"rgba(255,255,255,0)"),u.fillStyle=e,u.fillRect(0,0,r,i),(o=u.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),u.fillStyle=o,u.fillRect(0,0,r,i))};return Yf({factory:function(t){var n=at({x:0,y:0}),e=ic([td.config({find:st.some}),vg.config({})]);return WS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){qo(t,sw,{value:e})},onInit:function(t,n,e,o){u(e.element.dom,Bb(Ab))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element.dom,u(r,Bb(o))}},extraApis:{}})},nk=function(f,d){return Yf({name:"ColourPicker",configFields:[Ln("dom"),ne("onValidHex",$),ne("onInvalidHex",$)],factory:function(t){var a,v,n,e,o,r=ZS(f,d,t.onValidHex,t.onInvalidHex),i=tk(0,d),b={paletteRgba:fe(Ab)},u=gp(i.sketch({})),c=gp(r.sketch({})),s=function(t,e){u.getOpt(t).each(function(t){var n=Eb(e);b.paletteRgba.set(n),i.setRgba(t,n)})},l=function(t,n){c.getOpt(t).each(function(t){r.updateHex(t,n)})},y=function(n,e,t){ft(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[u.asSpec(),(n=d,e=WS.parts.spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=WS.parts.thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),WS.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:at({y:0})},components:[e,o],sliderBehaviours:ic([vg.config({})]),onChange:function(t,n,e){qo(t,cw,{value:e})}})),c.asSpec()],behaviours:ic([dg("colour-picker-events",[er(sw,(v=[l],function(t,n){var e,o,r,i,u,a,c,s,l,f=n.event.value,d=b.paletteRgba.get(),m=(i=r=0,u=(e=d).red/255,a=e.green/255,c=e.blue/255,s=Math.min(u,Math.min(a,c)),l=Math.max(u,Math.max(a,c)),s===l?uw(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(l-s)),o=(l-s)/l,i=l,uw(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=uw(m.hue,f.x,100-f.y),p=Tb(g),h=yb(p);y(t,h,v)})),er(cw,(a=[s,l],function(t,n){var e,o,r,i=n.event.value,u=(e=i.y,o=uw((100-e)/100*360,100,100),r=Tb(o),yb(r));y(t,u,a)}))]),td.config({find:function(t){return c.getOpt(t)}}),ug.config({mode:"acyclic"})])}}})},ek=function(){return td.config({find:st.some})},ok=function(t){return td.config({find:t.getOpt})},rk=function(t){return td.config({find:function(n){return Tr(n.element,t).bind(function(t){return n.getSystem().getByDom(t).toOptional()})}})},ik={"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"},uk=function(t){return ik[t]},ak=tinymce.util.Tools.resolve("tinymce.Resource"),ck=tinymce.util.Tools.resolve("tinymce.util.Tools"),sk=fn([ne("preprocess",ct),ne("postprocess",ct)]),lk=function(t,n,e){return Nl.config(zt({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},fk=function(t,n,e){return lk(t,function(t){return n(t.element)},function(t,n){return e(t.element,n)})},dk=function(r,t){var i=En("RepresentingConfigs.memento processors",sk,t);return Nl.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=Nl.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);Nl.setValue(o,e)}}})},mk=lk,gk=function(t){return fk(t,Vr,Pr)},pk=function(t){return Nl.config({store:{mode:"memory",initialValue:t}})},hk=function(i,u){var n=function(t,n){n.stop()},e=function(t){return function(n,e){ft(t,function(t){t(n,e)})}},o=function(t,n){var e;gv.isDisabled(t)||(e=n.event.raw,a(t,e.dataTransfer.files))},r=function(t,n){var e=n.event.raw.target;a(t,e.files)},a=function(t,n){var e,o,r;Nl.setValue(t,(e=n,o=u,r=ck.explode(o.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),H(Q(e),function(n){return F(r,function(t){return Se(n.name,"."+t)})}))),qo(t,ex,{name:i.name})},c=gp({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ic([dg("input-file-events",[ar(vo()),ar(Eo())])])}),t=i.label.map(function(t){return nx(t,u)}),s=Yy.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ic([pk([]),ek(),gv.config({}),Dg.config({toggleClass:"dragenter",toggleOnExecute:!1}),dg("dropzone-events",[er("dragenter",e([n,Dg.toggle])),er("dragleave",e([n,Dg.toggle])),er("dragover",n),er("drop",e([n,o])),er(ho(),r)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:u.translate("Drop an image here")}},mp.sketch({dom:{tag:"button",innerHtml:u.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element.dom.click()},buttonBehaviours:ic([Jy.config({}),Uv(u.isDisabled),Lv()])})]}]}}}});return Qy(t,s,["tox-form__group--stretched"],[])},vk=Kr("alloy-fake-before-tabstop"),bk=Kr("alloy-fake-after-tabstop"),yk=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:ic([vg.config({ignore:!0}),Jy.config({})])}},xk=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[yk([vk]),t,yk([bk])],behaviours:ic([rk(1)])}},wk=function(t,n){qo(t,mo(),{raw:{which:9,shiftKey:n}})},Sk=function(t,n){var e=n.element;Ai(e,vk)?wk(t,!0):Ai(e,bk)&&wk(t,!1)},kk=function(t){return Sy(t,["."+vk,"."+bk].join(","),c)},Ck=!(je().browser.isIE()||je().browser.isEdge()),Ok=function(t,n){var o,r,e=Ck&&t.sandboxed,i=ut(ut({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=fe(""),{getValue:function(t){return r.get()},setValue:function(t,n){var e;o?zr(t.element,"srcdoc",n):(zr(t.element,"src","javascript:''"),(e=t.element.dom.contentWindow.document).open(),e.write(n),e.close()),r.set(n)}}),a=t.label.map(function(t){return nx(t,n)}),c=Yy.parts.field({factory:{sketch:function(t){return xk({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:ic([Jy.config({}),vg.config({}),mk(st.none(),u.getValue,u.setValue)])})}}});return Qy(a,c,["tox-form__group--stretched"],[])};function _k(t,n){return Dk(document.createElement("canvas"),t,n)}function Tk(t){var n=_k(t.width,t.height);return Ek(n).drawImage(t,0,0),n}function Ek(t){return t.getContext("2d")}function Dk(t,n,e){return t.width=n,t.height=e,t}function Bk(t){return t.naturalWidth||t.width}function Ak(t){return t.naturalHeight||t.height}var Mk,Fk,Ik,Rk,Vk=window.Promise?window.Promise:(Mk=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Uk(t,Pk(zk,this),Pk(Nk,this))},Fk=window,Ik=Mk.immediateFn||"function"==typeof Fk.setImmediate&&Fk.setImmediate||function(t){setTimeout(t,1)},Rk=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Mk.prototype["catch"]=function(t){return this.then(null,t)},Mk.prototype.then=function(e,o){var r=this;return new Mk(function(t,n){Hk.call(r,new jk(e,o,t,n))})},Mk.all=function(){for(var t=[],n=0;n").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:l}).appendTo(b.body),hO(b).on("mousemove touchmove",x).on("mouseup touchend",w),m.start(t)})}var wO=0,SO=function(s,e,l,o,r){var t,n="tox-",u="tox-crid-"+wO++,a=[{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"}],i=["top","right","bottom","left"],c=function(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}},f=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}};function d(t,n,e,o){var r,i=n.x,u=n.y,a=n.w,c=n.h;i+=e*t.deltaX,u+=o*t.deltaY,(a+=e*t.deltaW)<20&&(a=20),(c+=o*t.deltaH)<20&&(c=20),r=s=pO.clamp({x:i,y:u,w:a,h:c},l,"move"===t.name),r=f(l,r),h.fire("updateRect",{rect:r}),p(r)}function m(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),hO("#"+u+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}ck.each(a,function(t){hO("#"+u+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)}function g(t){m(s=t)}function p(t){g(c(l,t))}hO('
').appendTo(o),ck.each(i,function(t){hO("#"+u,o).append('