1var gJ=Object.defineProperty;var WX=on=>{throw TypeError(on)};var fJ=(on,pn,ae)=>pn in on?gJ(on,pn,{enumerable:!0,configurable:!0,writable:!0,value:ae}):on[pn]=ae;var Ft=(on,pn,ae)=>fJ(on,typeof pn!="symbol"?pn+"":pn,ae),IY=(on,pn,ae)=>pn.has(on)||WX("Cannot "+ae);var co=(on,pn,ae)=>(IY(on,pn,"read from private field"),ae?ae.call(on):pn.get(on)),Ui=(on,pn,ae)=>pn.has(on)?WX("Cannot add the same private member more than once"):pn instanceof WeakSet?pn.add(on):pn.set(on,ae),xg=(on,pn,ae,qe)=>(IY(on,pn,"write to private field"),qe?qe.call(on,ae):pn.set(on,ae),ae),fs=(on,pn,ae)=>(IY(on,pn,"access private method"),ae);import{_ as ox}from"./main-D9wlZ8hT.js";import{g as pJ}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as hJ}from"./async-request-CzYhcOSr.js";import{CustomForm as bJ}from"./custom-form-CeZT0qH8.js";import"./toast-bJkcpK-A.js";var jX={exports:{}};(function(on){(function(){var pn=function(t){if(t===null)return"null";if(t===void 0)return"undefined";var e=typeof t;return e==="object"&&(Array.prototype.isPrototypeOf(t)||t.constructor&&t.constructor.name==="Array")?"array":e==="object"&&(String.prototype.isPrototypeOf(t)||t.constructor&&t.constructor.name==="String")?"string":e},ae=function(t){return["undefined","boolean","number","string","function","xml","null"].indexOf(t)!==-1},qe=function(t,e){var n=Array.prototype.slice.call(t);return n.sort(e)},So=function(t,e){return xo(function(n,r){return t.eq(e(n),e(r))})},xo=function(t){return{eq:t}},un=xo(function(t,e){return t===e}),$e=un,hn=function(t){return xo(function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,i=0;i<r;i++)if(!t.eq(e[i],n[i]))return!1;return!0})},He=function(t,e){return So(hn(t),function(n){return qe(n,e)})},ca=function(t){return xo(function(e,n){var r=Object.keys(e),i=Object.keys(n);if(!He($e).eq(r,i))return!1;for(var u=r.length,g=0;g<u;g++){var b=r[g];if(!t.eq(e[b],n[b]))return!1}return!0})},Xa=xo(function(t,e){if(t===e)return!0;var n=pn(t),r=pn(e);return n!==r?!1:ae(n)?t===e:n==="array"?hn(Xa).eq(t,e):n==="object"?ca(Xa).eq(t,e):!1});const Ta=Object.getPrototypeOf,zs=(t,e,n)=>{var r;return n(t,e.prototype)?!0:((r=t.constructor)==null?void 0:r.name)===e.name},Da=t=>{const e=typeof t;return t===null?"null":e==="object"&&Array.isArray(t)?"array":e==="object"&&zs(t,String,(n,r)=>r.isPrototypeOf(n))?"string":e},$n=t=>e=>Da(e)===t,ke=t=>e=>typeof e===t,la=t=>e=>t===e,Oa=(t,e)=>mo(t)&&zs(t,e,(n,r)=>Ta(n)===r),q=$n("string"),mo=$n("object"),Ja=t=>Oa(t,Object),lo=$n("array"),nt=la(null),eo=ke("boolean"),Gn=la(void 0),so=t=>t==null,mt=t=>!so(t),X=ke("function"),sr=ke("number"),Fo=(t,e)=>{if(lo(t)){for(let n=0,r=t.length;n<r;++n)if(!e(t[n]))return!1;return!0}return!1},_e=()=>{},k=(t,e)=>(...n)=>t(e.apply(null,n)),Fn=(t,e)=>n=>t(e(n)),Ut=t=>()=>t,Sn=t=>t,Ne=(t,e)=>t===e;function Et(t,...e){return(...n)=>{const r=e.concat(n);return t.apply(null,r)}}const Go=t=>e=>!t(e),ps=t=>()=>{throw new Error(t)},te=t=>t(),Pe=t=>{t()},pt=Ut(!1),It=Ut(!0),ll=class ll{constructor(e,n){Ft(this,"tag");Ft(this,"value");this.tag=e,this.value=n}static some(e){return new ll(!0,e)}static none(){return ll.singletonNone}fold(e,n){return this.tag?n(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?ll.some(e(this.value)):ll.none()}bind(e){return this.tag?e(this.value):ll.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:ll.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return mt(e)?ll.some(e):ll.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}};Ft(ll,"singletonNone",new ll(!1));let F=ll;const Vr=Array.prototype.slice,Io=Array.prototype.indexOf,An=Array.prototype.push,Zo=(t,e)=>Io.call(t,e),ru=(t,e)=>{const n=Zo(t,e);return n===-1?F.none():F.some(n)},xt=(t,e)=>Zo(t,e)>
1-1,$t=(t,e)=>{for(let n=0,r=t.length;n<r;n++){const i=t[n];if(e(i,n))return!0}return!1},wt=(t,e)=>{const n=t.length,r=new Array(n);for(let i=0;i<n;i++){const u=t[i];r[i]=e(u,i)}return r},Y=(t,e)=>{for(let n=0,r=t.length;n<r;n++){const i=t[n];e(i,n)}},po=(t,e)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];e(r,n)}},Ct=(t,e)=>{const n=[],r=[];for(let i=0,u=t.length;i<u;i++){const g=t[i];(e(g,i)?n:r).push(g)}return{pass:n,fail:r}},st=(t,e)=>{const n=[];for(let r=0,i=t.length;r<i;r++){const u=t[r];e(u,r)&&n.push(u)}return n},de=(t,e)=>{if(t.length===0)return[];{let n=e(t[0]);const r=[];let i=[];for(let u=0,g=t.length;u<g;u++){const b=t[u],x=e(b);x!==n&&(r.push(i),i=[]),n=x,i.push(b)}return i.length!==0&&r.push(i),r}},Je=(t,e,n)=>(po(t,(r,i)=>{n=e(n,r,i)}),n),We=(t,e,n)=>(Y(t,(r,i)=>{n=e(n,r,i)}),n),Vn=(t,e,n)=>{for(let r=0,i=t.length;r<i;r++){const u=t[r];if(e(u,r))return F.some(u);if(n(u,r))break}return F.none()},Xo=(t,e)=>Vn(t,e,pt),gl=(t,e)=>{for(let n=0,r=t.length;n<r;n++){const i=t[n];if(e(i,n))return F.some(n)}return F.none()},sx=(t,e)=>{for(let n=t.length-1;n>=0;n--)if(e(t[n],n))return F.some(n);return F.none()},bi=t=>{const e=[];for(let n=0,r=t.length;n<r;++n){if(!lo(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);An.apply(e,t[n])}return e},qo=(t,e)=>bi(wt(t,e)),au=(t,e)=>{for(let n=0,r=t.length;n<r;++n){const i=t[n];if(e(i,n)!==!0)return!1}return!0},is=t=>{const e=Vr.call(t,0);return e.reverse(),e},hs=(t,e)=>st(t,n=>!xt(e,n)),Zf=(t,e)=>{const n={};for(let r=0,i=t.length;r<i;r++){const u=t[r];n[String(u)]=e(u,r)}return n},ad=(t,e)=>{const n=Vr.call(t,0);return n.sort(e),n},Wi=(t,e)=>e>=0&&e<t.length?F.some(t[e]):F.none(),Vs=t=>Wi(t,0),Ur=t=>Wi(t,t.length-1),Wr=X(Array.from)?Array.from:t=>Vr.call(t),iu=(t,e)=>{for(let n=0;n<t.length;n++){const r=e(t[n],n);if(r.isSome())return r}return F.none()},id=(t,e)=>{const n=[],r=X(e)?i=>$t(n,u=>e(u,i)):i=>xt(n,i);for(let i=0,u=t.length;i<u;i++){const g=t[i];r(g)||n.push(g)}return n},he=Object.keys,nn=Object.hasOwnProperty,Do=(t,e)=>{const n=he(t);for(let r=0,i=n.length;r<i;r++){const u=n[r],g=t[u];e(g,u)}},rx=(t,e)=>Zi(t,(n,r)=>({k:r,v:e(n,r)})),Zi=(t,e)=>{const n={};return Do(t,(r,i)=>{const u=e(r,i);n[u.k]=u.v}),n},fe=t=>
1(e,n)=>{t[n]=e},jf=(t,e,n,r)=>{Do(t,(i,u)=>{(e(i,u)?n:r)(i,u)})},X4=(t,e)=>{const n={},r={};return jf(t,e,fe(n),fe(r)),{t:n,f:r}},Gf=(t,e)=>{const n={};return jf(t,e,fe(n),_e),n},cd=(t,e)=>{const n=[];return Do(t,(r,i)=>{n.push(e(r,i))}),n},cu=t=>cd(t,Sn),Ln=(t,e)=>Xe(t,e)?F.from(t[e]):F.none(),Xe=(t,e)=>nn.call(t,e),cs=(t,e)=>Xe(t,e)&&t[e]!==void 0&&t[e]!==null,vC=(t,e,n=Xa)=>ca(n).eq(t,e),lu={generate:t=>{if(!lo(t))throw new Error("cases must be an array");if(t.length===0)throw new Error("there must be at least one case");const e=[],n={};return Y(t,(r,i)=>{const u=he(r);if(u.length!==1)throw new Error("one and only one name per case");const g=u[0],b=r[g];if(n[g]!==void 0)throw new Error("duplicate key detected:"+g);if(g==="cata")throw new Error("cannot have a case named cata (sorry)");if(!lo(b))throw new Error("case arguments must be an array");e.push(g),n[g]=(...x)=>{const w=x.length;if(w!==b.length)throw new Error("Wrong number of arguments to case "+g+". Expected "+b.length+" ("+b+"), got "+w);return{fold:(...D)=>{if(D.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+D.length);return D[i].apply(null,x)},match:D=>{const R=he(D);if(e.length!==R.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+` 2Actual: `+R.join(","));if(!au(e,H=>xt(R,H)))throw new Error("Not all branches were specified when using match. Specified: "+R.join(", ")+` 3Required: `+e.join(", "));return D[g].apply(null,x)},log:D=>{console.log(D,{constructors:e,constructor:g,params:x})}}}}),n}},Te=t=>{let e=t;return{get:()=>e,set:i=>{e=i}}},xi=t=>{const e=u=>u(t),n=Ut(t),r=()=>i,i={tag:!0,inner:t,fold:(u,g)=>g(t),isValue:It,isError:pt,map:u=>ua.value(u(t)),mapError:r,bind:e,exists:e,forall:e,getOr:n,or:r,getOrThunk:n,orThunk:r,getOrDie:n,each:u=>{u(t)},toOptional:()=>F.some(t)};return i},yg=t=>{const e=()=>n,n={tag:!1,inner:t,fold:(r,i)=>r(t),isValue:pt,isError:It,map:e,mapError:r=>ua.error(r(t)),bind:e,exists:pt,forall:It,getOr:Sn,or:Sn,getOrThunk:te,orThunk:te,getOrDie:ps(String(t)),each:_e,toOptional:F.none};return n},ua={value:xi,error:yg,fromOption:(t,e)=>t.fold(()=>yg(e),xi)},tR=typeof window<"u"?window:Function("return this;")(),vi=()=>{const t=window.crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,t},ix=()=>{const t=vi(),e=(n,r)=>{let i="";for(let u=n;u<=r;++u){const g=t[u].toString(16).padStart(2,"0");i+=g}return i};return`${e(0,3)}-${e(4,5)}-${e(6,7)}-${e(8,9)}-${e(10,15)}`},Qh=(t,e,n)=>Math.min(Math.max(t,e),n),Q4=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let lm=0;const da=t=>{const n=new Date().getTime(),r=Math.floor(Q4()*1e9);return lm++,t+"_"+r+lm+String(n)},yC=()=>window.isSecureContext?window.crypto.randomUUID():ix(),CC=(t,e)=>e,ee=(t,e)=>Ja(t)&&Ja(e)?t1(t,e):e,wC=t=>(...e)=>{if(e.length===0)throw new Error("Can't merge zero objects");const n={};for(let r=0;r<e.length;r++){const i=e[r];for(const u in i)Xe(i,u)&&(n[u]=t(n[u],i[u]))}return n},t1=wC(ee),cx=wC(CC),kn=(t,e,n=Ne)=>t.exists(r=>n(r,e)),e1=(t,e,n=Ne)=>Us(t,e,n).getOr(t.isNone()&&e.isNone()),ji=t=>{const e=[],n=r=>{e.push(r)};for(let r=0;r<t.length;r++)t[r].each(n);return e},Us=(t,e,n)=>t.isSome()&&e.isSome()?F.some(n(t.getOrDie(),e.getOrDie())):F.none(),um=(t,e,n,r)=>t.isSome()&&e.isSome()&&n.isSome()?F.some(r(t.getOrDie(),e.getOrDie(),n.getOrDie())):F.none(),lx=t=>t.bind(Sn),Ec=(t,e)=>t?F.some(e):F.none(),Ra=(t,e)=>{let n=e??tR;for(let r=0;r<t.length&&n!==void 0&&n!==null;++r)n=n[t[r]];return n},uu=(t,e)=>{const n=t.split(".");return Ra(n,e)};lu.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const yi=t=>{const e=[],n=[];return Y(t,r=>{r.fold(i=>{e.push(i)},i=>{n.push(i)})}),{errors:e,values:n}},tk=t=>{const e=Te(F.none()),n=()=>e.get().each(t);return{clear:()=>{n(),e.set(F.none())},isSet:()=>e.get().isSome(),get:()=>e.get(),set:b=>{n(),e.set(F.some(b))}}},ek=t=>{const e=Te(F.none()),n=()=>e.get().each(b=>clearInterval(b));return{clear:()=>{n(),e.set(F.none())},isSet:()=>e.get().isSome(),get:()=>e.get(),set:b=>{n(),e.set(F.some(setInterval(b,t)))}}},Gi=()=>{const t=tk(_e);return{...t,on:n=>t.get().each(n)}},_C=(t,e)=>t.substring(e),ld=(t,e,n)=>e===""||t.length>=e.length&&t.substr(n,n+e.length)===e,ux=(t,e)=>Ze(t,e)?_C(t,e.length):t,Rs=(t,e,n=0,r)=>{const i=t.indexOf(e,n);return i!==-1?Gn(r)?!0:i+e.length<=r:!1},Ze=(t,e)=>ld(t,e,0),ma=(t,e)=>ld(t,e,t.length-e.length),Qa=t=>e=>e.replace(t,""),ns=Qa(/^\s+|\s+$/g),dx=Qa(/^\s+/g),SC=Qa(/\s+$/g),ls=t=>t.length>0,qf=t=>!ls(t),du=(t,e)=>e<=0?"":new Array(e+1).join(t),kC=(t,e=10)=>{const n=parseInt(t,e);return isNaN(n)?F.none():F.some(n)},oe=(t,e)=>{let n=null;return{cancel:()=>{nt(n)||(clearTimeout(n),n=null)},throttle:(...u)=>{nt(n)&&(n=setTimeout(()=>{n=null,t.apply(null,u)},e))}}},Cg=(t,e)=>{let n=null;const r=()=>{nt(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:(...u)=>{r(),n=setTimeout(()=>{n=null,t.apply(null,u)},e)}}},Ci=t=>{let e=!1,n;return(...r)=>(e||(e=!0,n=t.apply(null,r)),n)},Kf="\uFEFF",Bs=" ",ok="â¦",mu=t=>t===Kf,fl=t=>t.replace(/\uFEFF/g,""),EC=t=>{const e={};return Y(t,n=>{e[n]={}}),he(e)},AC=t=>t.length!==void 0,dm=Array.isArray,TC=t=>{if(dm(t))return t;{const e=[];for(let n=0,r=t.length;n<r;n++)e[n]=t[n];return e}},o1=(t,e,n)=>{if(!t)return!1;if(n=n||t,AC(t)){for(let r=0,i=t.length;r<i;r++)if(e.call(n,t[r],r,t)===!1)return!1}else for(const r in t)if(Xe(t,r)&&e.call(n,t[r],r,t)===!1)return!1;return!0},mm=(t,e)=>{const n=[];return o1(t,(r,i)=>{n.push(e(r,i,t))}),n},Yf=(t,e)=>{const n=[];return o1(t,(r,i)=>{(!e||e(r,i,t))&&n.push(r)}),n},Zt=(t,e)=>{if(t){for(let n=0,r=t.length;n<r;n++)if(t[n]===e)return n}return-1},n1=(t,e,n,r)=>{let i=Gn(n)?t[0]:n;for(let u=0;u<t.length;u++)i=e.call(r,i,t[u],u);return i},mx=(t,e,n)=>{for(let r=0,i=t.length;r<i;r++)if(e.call(n,t[r],r,t))return r;return-1},gu=t=>t[t.length-1],s1=(t,e,n,r)=>{const i=t.isiOS()&&/ipad/i.test(n)===!0,u=t.isiOS()&&!i,g=t.isiOS()||t.isAndroid(),b=g||r("(pointer:coarse)"),x=i||!u&&g&&r("(min-device-width:768px)"),w=u||g&&!x,E=e.isSafari()&&t.isiOS()&&/safari/i.test(n)===!1,D=!w&&!x&&!E;return{isiPad:Ut(i),isiPhone:Ut(u),isTablet:Ut(x),isPhone:Ut(w),isTouch:Ut(b),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:Ut(E),isDesktop:Ut(D)}},DC=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n];if(r.test(e))return r}},wi=(t,e)=>{const n=DC(t,e);if(!n)return{major:0,minor:0};const r=i=>Number(e.replace(n,"$"+i));return Xf(r(1),r(2))},OC=(t,e)=>{const n=String(e).toLowerCase();return t.length===0?wg():wi(t,n)},wg=()=>Xf(0,0),Xf=(t,e)=>({major:t,minor:e}),bn={nu:Xf,detect:OC,unknown:wg},gx=(t,e)=>iu(e.brands,n=>{const r=n.brand.toLowerCase();return Xo(t,i=>{var u;return r===((u=i.brand)==null?void 0:u.toLowerCase())}).map(i=>({current:i.name,version:bn.nu(parseInt(n.version,10),0)}))}),RC=(t,e)=>{const n=String(e).toLowerCase();return Xo(t,r=>r.search(n))},BC=(t,e)=>RC(t,e).map(n=>{const r=bn.detect(n.versionRegexes,e);return{current:n.name,version:r}}),FC=(t,e)=>RC(t,e).map(n=>{const r=bn.detect(n.versionRegexes,e);return{current:n.name,version:r}}),r1=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ac=t=>e=>Rs(e,t),MC=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:t=>Rs(t,"edge/")&&Rs(t,"chrome")&&Rs(t,"safari")&&Rs(t,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,r1],search:t=>Rs(t,"chrome")&&!Rs(t,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:t=>Rs(t,"msie")||Rs(t,"trident")},{name:"Opera",versionRegexes:[r1,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ac("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ac("firefox")},{name:"Safari",versionRegexes:[r1,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:t=>(Rs(t,"safari")||Rs(t,"mobile/"))&&Rs(t,"applewebkit")}],ud=[{name:"Windows",search:Ac("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:t=>Rs(t,"iphone")||Rs(t,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ac("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Ac("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ac("linux"),versionRegexes:[]},{name:"Solaris",search:Ac("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ac("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ac("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],gm={browsers:Ut(MC),oses:Ut(ud)},nk="Edge",fx="Chromium",ln="IE",a1="Opera",px="Firefox",fu="Safari",sk=()=>NC({current:void 0,version:bn.unknown()}),NC=t=>{const e=t.current,n=t.version,r=i=>()=>e===i;return{current:e,version:n,isEdge:r(nk),isChromium:r(fx),isIE:r(ln),isOpera:r(a1),isFirefox:r(px),isSafari:r(fu)}},i1={unknown:sk,nu:NC},hx="Windows",Jf="iOS",rk="Android",PC="Linux",ak="macOS",ik="Solaris",bx="FreeBSD",pl="ChromeOS",IC=()=>$C({current:void 0,version:bn.unknown()}),$C=t=>{const e=t.current,n=t.version,r=i=>()=>e===i;return{current:e,version:n,isWindows:r(hx),isiOS:r(Jf),isAndroid:r(rk),isMacOS:r(ak),isLinux:r(PC),isSolaris:r(ik),isFreeBSD:r(bx),isChromeOS:r(pl)}},xx={unknown:IC,nu:$C},ck={detect:(t,e,n)=>{const r=gm.browsers(),i=gm.oses(),u=e.bind(x=>gx(r,x)).orThunk(()=>BC(r,t)).fold(i1.unknown,i1.nu),g=FC(i,t).fold(xx.unknown,xx.nu),b=s1(g,u,t,n);return{browser:u,os:g,deviceType:b}}},lk=t=>window.matchMedia(t).matches;let uk=Ci(()=>ck.detect(window.navigator.userAgent,F.from(window.navigator.userAgentData),lk));const hl=()=>uk(),dk=(t,e)=>
3uu(t,e),mk=(t,e)=>{const n=dk(t,e);if(n==null)throw new Error(t+" not available on this browser");return n},vx=Object.getPrototypeOf,yx=t=>mk("HTMLElement",t),oR=t=>{const e=uu("ownerDocument.defaultView",t);return mo(t)&&(yx(e).prototype.isPrototypeOf(t)||/^HTML\w*Element$/.test(vx(t).constructor.name))},gk=window.navigator.userAgent,Cx=hl(),bl=Cx.browser,Tc=Cx.os,fm=Cx.deviceType,fk=gk.indexOf("Windows Phone")!==-1,Oo={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:bl.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!bl.isIE(),windowsPhone:fk,browser:{current:bl.current,version:bl.version,isChromium:bl.isChromium,isEdge:bl.isEdge,isFirefox:bl.isFirefox,isIE:bl.isIE,isOpera:bl.isOpera,isSafari:bl.isSafari},os:{current:Tc.current,version:Tc.version,isAndroid:Tc.isAndroid,isChromeOS:Tc.isChromeOS,isFreeBSD:Tc.isFreeBSD,isiOS:Tc.isiOS,isLinux:Tc.isLinux,isMacOS:Tc.isMacOS,isSolaris:Tc.isSolaris,isWindows:Tc.isWindows},deviceType:{isDesktop:fm.isDesktop,isiPad:fm.isiPad,isiPhone:fm.isiPhone,isPhone:fm.isPhone,isTablet:fm.isTablet,isTouch:fm.isTouch,isWebView:fm.isWebView}},pk=/^\s*|\s*$/g,wx=t=>so(t)?"":(""+t).replace(pk,""),ss=(t,e)=>e?e==="array"&&dm(t)?!0:typeof t===e:t!==void 0,hk=(t,e,n={})=>{const r=q(t)?t.split(e||","):t||[];let i=r.length;for(;i--;)n[r[i]]={};return n},c1=Xe,bk=(t,...e)=>{for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(Xe(r,i)){const u=r[i];u!==void 0&&(t[i]=u)}}return t},_x=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),o1(t,(i,u)=>e.call(r,i,u,n)===!1?!1:(_x(i,e,n,r),!0)))},Mt={trim:wx,isArray:dm,is:ss,toArray:TC,makeMap:hk,each:o1,map:mm,grep:Yf,inArray:Zt,hasOwn:c1,extend:bk,walk:_x,resolve:(t,e=window)=>{const n=t.split(".");for(let r=0,i=n.length;r<i&&(e=e[n[r]],!!e);r++);return e},explode:(t,e)=>lo(t)?t:t===""?[]:mm(t.split(e||","),wx),_addCacheSuffix:t=>{const e=Oo.cacheSuffix;return e&&(t+=(t.indexOf("?")===-1?"?":"&")+e),t}},ti=(t,e)=>{const r=(e||document).createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1){const i="HTML does not have a single root node";throw console.error(i,t),new Error(i)}return Qf(r.childNodes[0])},l1=(t,e)=>{const r=(e||document).createElement(t);return Qf(r)},qi=(t,e)=>{const r=(e||document).createTextNode(t);return Qf(r)},Qf=t=>{if(t==null)throw new Error("Node cannot be null or undefined");return{dom:t}},Z={fromHtml:ti,fromTag:l1,fromText:qi,fromDom:Qf,fromPoint:(t,e,n)=>F.from(t.dom.elementFromPoint(e,n)).map(Qf)},Ba=(t,e)=>{e.fold(n=>{t.setStartBefore(n.dom)},(n,r)=>{t.setStart(n.dom,r)},n=>{t.setStartAfter(n.dom)})},dd=(t,e)=>{e.fold(n=>{t.setEndBefore(n.dom)},(n,r)=>{t.setEnd(n.dom,r)},n=>{t.setEndAfter(n.dom)})},kx=(t,e,n)=>{const r=t.document.createRange();return Ba(r,e),dd(r,n),r},Sg=(t,e,n,r,i)=>{const u=t.document.createRange();return u.setStart(e.dom,n),u.setEnd(r.dom,i),u},Mr=lu.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Fa=(t,e,n)=>e(Z.fromDom(n.startContainer),n.startOffset,Z.fromDom(n.endContainer),n.endOffset),Ex=(t,e)=>e.match({domRange:n=>({ltr:Ut(n),rtl:F.none}),relative:(n,r)=>({ltr:Ci(()=>kx(t,n,r)),rtl:Ci(()=>F.some(kx(t,r,n)))}),exact:(n,r,i,u)=>({ltr:Ci(()=>Sg(t,n,r,i,u)),rtl:Ci(()=>F.some(Sg(t,i,u,n,r)))})}),Ax=(t,e)=>{const n=e.ltr();return n.collapsed?e.rtl().filter(i=>i.collapsed===!1).map(i=>Mr.rtl(Z.fromDom(i.endContainer),i.endOffset,Z.fromDom(i.startContainer),i.startOffset)).getOrThunk(()=>Fa(t,Mr.ltr,n)):Fa(t,Mr.ltr,n)},tp=(t,e)=>{const n=Ex(t,e);return Ax(t,n)};Mr.ltr,Mr.rtl;const ga=8,Tx=9,xl=11,ep=1,Dx=3,ei=(t,e)=>{const n=t.dom;if(n.nodeType!==ep)return!1;{const r=n;if(r.matches!==void 0)return r.matches(e);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}},Ox=t=>t.nodeType!==ep&&t.nodeType!==Tx&&t.nodeType!==xl||t.childElementCount===0,Dc=(t,e)=>{const n=e===void 0?document:e.dom;return Ox(n)?[]:wt(n.querySelectorAll(t),Z.fromDom)},md=(t,e)=>{const n=e===void 0?document:e.dom;return Ox(n)?F.none():F.from(n.querySelector(t)).map(Z.fromDom)},ho=(t,e)=>t.dom===e.dom,_i=(t,e)=>{const n=t.dom,r=e.dom;return n===r?!1:n.contains(r)},u1=ei,LC=(t,e)=>{const n=[],r=u=>(n.push(u),e(u));let i=e(t);do i=i.bind(r);while(i.isSome());return n},oo=t=>t.dom.nodeName.toLowerCase(),pu=t=>t.dom.nodeType,ks=t=>e=>pu(e)===t,Oc=t=>pu(t)===ga||oo(t)==="#comment",Rc=t=>Jn(t)&&oR(t.dom),Jn=ks(ep),zo=ks(Dx),vk=ks(Tx),yk=ks(xl),vl=t=>e=>Jn(e)&&oo(e)===t,Ki=t=>Z.fromDom(t.dom.ownerDocument),Bc=t=>vk(t)?t:Ki(t),Fs=t=>Z.fromDom(Bc(t).dom.documentElement),hu=t=>Z.fromDom(Bc(t).dom.defaultView),oi=t=>F.from(t.dom.parentNode).map(Z.fromDom),Yi=t=>F.from(t.dom.parentElement).map(Z.fromDom),Si=(t,e)=>{const n=X(e)?e:pt;let r=t.dom;const i=[];for(;r.parentNode!==null&&r.parentNode!==void 0;){const u=r.parentNode,g=Z.fromDom(u);if(i.push(g),n(g)===!0)break;r=u}return i},Vo=t=>{const e=n=>st(n,r=>!ho(t,r));return oi(t).map(Qn).map(e).getOr([])},ki=t=>F.from(t.dom.previousSibling).map(Z.fromDom),yl=t=>F.from(t.dom.nextSibling).map(Z.fromDom),Nr=t=>is(LC(t,ki)),Js=t=>LC(t,yl),Qn=t=>wt(t.dom.childNodes,Z.fromDom),Xi=(t,e)=>{const n=t.dom.childNodes;return F.from(n[e]).map(Z.fromDom)},rr=t=>Xi(t,0),Es=t=>Xi(t,t.dom.childNodes.length-1),pm=t=>t.dom.childNodes.length,HC=t=>{const e=t.dom.head;if(e==null)throw new Error("Head is not available yet");return Z.fromDom(e)},Rx=t=>yk(t)&&mt(t.dom.host),ar=t=>Z.fromDom(t.dom.getRootNode()),Bx=t=>Rx(t)?t:HC(Bc(t)),zC=t=>Rx(t)?t:Z.fromDom(Bc(t).dom.body),hm=t=>{const e=ar(t);return Rx(e)?F.some(e):F.none()},Ee=t=>Z.fromDom(t.dom.host),Fx=t=>{if(mt(t.target)){const e=Z.fromDom(t.target);if(Jn(e)&&Ws(e)&&t.composed&&t.composedPath){const n=t.composedPath();if(n)return Vs(n)}}return F.from(t.target)},Ws=t=>mt(t.dom.shadowRoot),ir=(t,e,n,r,i,u,g)=>({target:t,x:e,y:n,stop:r,prevent:i,kill:u,raw:g}),cr=t=>{const e=Z.fromDom(Fx(t).getOr(t.target)),n=()=>t.stopPropagation(),r=()=>t.preventDefault(),i=k(r,n);return ir(e,t.clientX,t.clientY,n,r,i,t)},Tn=(t,e)=>n=>{t(n)&&e(cr(n))},bm=(t,e,n,r,i)=>{const u=Tn(n,r);return t.dom.addEventListener(e,u,i),{unbind:Et(Ji,t,e,u,i)}},d1=(t,e,n,r)=>bm(t,e,n,r,!1),Ji=(t,e,n,r)=>{t.dom.removeEventListener(e,n,r)},Fc=It,Mx=(t,e,n)=>d1(t,e,Fc,n),m1=()=>Z.fromDom(document),g1=(t,e=!1)=>t.dom.focus({preventScroll:e}),bu=t=>{const e=ar(t).dom;return t.dom===e.activeElement},Mc=(t=m1())=>F.from(t.dom.activeElement).map(Z.fromDom),Ck=t=>Mc(ar(t)).filter(e=>t.dom.contains(e.dom)),wr=(t,e)=>{oi(t).each(r=>{r.dom.insertBefore(e.dom,t.dom)})},Nc=(t,e)=>{yl(t).fold(()=>{oi(t).each(i=>{Ro(i,e)})},r=>{wr(r,e)})},Cl=(t,e)=>{rr(t).fold(()=>{Ro(t,e)},r=>{t.dom.insertBefore(e.dom,r.dom)})},Ro=(t,e)=>{t.dom.appendChild(e.dom)},ni=(t,e)=>{wr(t,e),Ro(e,t)},VC=(t,e)=>{Y(e,n=>{wr(t,n)})},f1=(t,e)=>{Y(e,(n,r)=>{const i=r===0?t:e[r-1];Nc(i,n)})},Ei=(t,e)=>{Y(e,n=>{Ro(t,n)})},Be=(t,e,n)=>{if(q(n)||eo(n)||sr(n))t.setAttribute(e,n+"");else throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,"::
3Element ",t),new Error("Attribute value was not simple")},qn=(t,e,n)=>{Be(t.dom,e,n)},lr=(t,e)=>{const n=t.dom;Do(e,(r,i)=>{Be(n,i,r)})},Dn=(t,e)=>{const n=t.dom.getAttribute(e);return n===null?void 0:n},Qi=(t,e)=>F.from(Dn(t,e)),Hn=(t,e)=>{const n=t.dom;return n&&n.hasAttribute?n.hasAttribute(e):!1},As=(t,e)=>{t.dom.removeAttribute(e)},kg=t=>{const e=t.dom.attributes;return e==null||e.length===0},uo=t=>We(t.dom.attributes,(e,n)=>(e[n.name]=n.value,e),{}),tc=t=>{t.dom.textContent="",Y(Qn(t),e=>{xn(e)})},xn=t=>{const e=t.dom;e.parentNode!==null&&e.parentNode.removeChild(e)},Ai=t=>{const e=Qn(t);e.length>0&&f1(t,e),xn(t)},Zs=(t,e)=>Z.fromDom(t.dom.cloneNode(e)),Pr=t=>Zs(t,!1),op=t=>Zs(t,!0),UC=(t,e)=>{const n=Z.fromTag(e),r=uo(t);return lr(n,r),n},np=(t,e)=>{const n=UC(t,e);Nc(t,n);const r=Qn(t);return Ei(n,r),xn(t),n},sp=(t,e)=>{const r=(e||document).createElement("div");return r.innerHTML=t,Qn(Z.fromDom(r))},xm=t=>wt(t,Z.fromDom),Ir=t=>t.dom.innerHTML,xu=(t,e)=>{const r=Ki(t).dom,i=Z.fromDom(r.createDocumentFragment()),u=sp(e,r);Ei(i,u),tc(t),Ro(t,i)},wk=t=>{const e=Z.fromTag("div"),n=Z.fromDom(t.dom.cloneNode(!0));return Ro(e,n),Ir(e)},vm=t=>t.style!==void 0&&X(t.style.getPropertyValue),Jo=t=>{const e=zo(t)?t.dom.parentNode:t.dom;if(e==null||e.ownerDocument===null)return!1;const n=e.ownerDocument;return hm(Z.fromDom(e)).fold(()=>n.body.contains(e),Fn(Jo,Ee))},p1=(t,e,n)=>{if(!q(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);vm(t)&&t.style.setProperty(e,n)},h1=(t,e)=>{vm(t)&&t.style.removeProperty(e)},Ma=(t,e,n)=>{const r=t.dom;p1(r,e,n)},Ti=(t,e)=>{const n=t.dom;Do(e,(r,i)=>{p1(n,i,r)})},rs=(t,e)=>{const n=t.dom,i=window.getComputedStyle(n).getPropertyValue(e);return i===""&&!Jo(t)?gd(n,e):i},gd=(t,e)=>vm(t)?t.style.getPropertyValue(e):"",Ms=(t,e)=>{const n=t.dom,r=gd(n,e);return F.from(r).filter(i=>i.length>0)},Eg=t=>{const e={},n=t.dom;if(vm(n))for(let r=0;r<n.style.length;r++){const i=n.style.item(r);e[i]=n.style[i]}return e},b1=(t,e)=>{const n=t.dom;h1(n,e),kn(Qi(t,"style").map(ns),"")&&As(t,"style")},Nx=t=>t.dom.offsetWidth,Pc=((t,e)=>{const n=(b,x)=>{if(!sr(x)&&!x.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+x);const w=b.dom;vm(w)&&(w.style[t]=x+"px")},r=b=>{const x=e(b);if(x<=0||x===null){const w=rs(b,t);return parseFloat(w)||0}return x},i=r,u=(b,x)=>We(x,(w,E)=>{const D=rs(b,E),R=D===void 0?0:parseInt(D,10);return isNaN(R)?w:w+R},0);return{set:n,get:r,getOuter:i,aggregate:u,max:(b,x,w)=>{const E=u(b,w);return x>E?x-E:0}}})("height",t=>{const e=t.dom;return Jo(t)?e.getBoundingClientRect().height:e.offsetHeight}),_k=t=>Pc.get(t),WC=(t,e)=>({left:t,top:e,translate:(r,i)=>WC(t+r,e+i)}),Ic=WC,ZC=t=>{const e=t.getBoundingClientRect();return Ic(e.left,e.top)},Ag=(t,e)=>t!==void 0?t:e!==void 0?e:0,rp=t=>{const e=t.dom.ownerDocument,n=e.body,r=e.defaultView,i=e.documentElement;if(n===t.dom)return Ic(n.offsetLeft,n.offsetTop);const u=Ag(r==null?void 0:r.pageYOffset,i.scrollTop),g=Ag(r==null?void 0:r.pageXOffset,i.scrollLeft),b=Ag(i.clientTop,n.clientTop),x=Ag(i.clientLeft,n.clientLeft);return ap(t).translate(g-x,u-b)},ap=t=>{const e=t.dom,r=e.ownerDocument.body;return r===e?Ic(r.offsetLeft,r.offsetTop):Jo(t)?ZC(e):Ic(0,0)},Px=t=>{const e=t!==void 0?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Ic(n,r)},jC=(t,e,n)=>{const i=(n!==void 0?n.dom:document).defaultView;i&&i.scrollTo(t,e)},ec=(t,e)=>{hl().browser.isSafari()&&X(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},Sk=(t,e)=>{const n=u=>{if(!t(u))throw new Error("Can only get "+e+" value of a "+e+" node");return r(u).getOr("")},r=u=>t(u)?F.from(u.dom.nodeValue):F.none();return{get:n,getOption:r,set:(u,g)=>{if(!t(u))throw new Error("Can only set raw "+e+" value of a "+e+" node");u.dom.nodeValue=g}}},fd=(t,e)=>{const r=document.createDocumentFragment();return Y(t,i=>{r.appendChild(i.dom)}),Z.fromDom(r)},Ko=Sk(zo,"text"),$r=t=>Ko.get(t),wl=t=>Ko.getOption(t),Ix=(t,e)=>Ko.set(t,e),pd=(t,e)=>{const n=Dn(t,e);return n===void 0||n===""?[]:n.split(" ")},$x=(t,e,n)=>{const i=pd(t,e).concat([n]);return qn(t,e,i.join(" ")),!0},GC=(t,e,n)=>{const r=st(pd(t,e),i=>i!==n);return r.length>0?qn(t,e,r.join(" ")):As(t,e),!1};var _l=(t,e,n,r,i)=>t(n,r)?F.some(n):X(i)&&i(n)?F.none():e(n,r,i);const Sl=(t,e,n)=>{let r=t.dom;const i=X(n)?n:pt;for(;r.parentNode;){r=r.parentNode;const u=Z.fromDom(r);if(e(u))return F.some(u);if(i(u))break}return F.none()},sn=(t,e,n)=>_l((i,u)=>u(i),Sl,t,e,n),qC=(t,e)=>{const n=t.dom;return n.parentNode?Un(Z.fromDom(n.parentNode),r=>!ho(t,r)&&e(r)):F.none()},Un=(t,e)=>{const n=i=>e(Z.fromDom(i));return Xo(t.dom.childNodes,n).map(Z.fromDom)},ip=(t,e)=>{const n=r=>{for(let i=0;i<r.childNodes.length;i++){const u=Z.fromDom(r.childNodes[i]);if(e(u))return F.some(u);const g=n(r.childNodes[i]);if(g.isSome())return g}return F.none()};return n(t.dom)},bs=(t,e,n)=>Sl(t,r=>ei(r,e),n),kl=(t,e)=>md(e,t),_r=(t,e,n)=>_l((i,u)=>ei(i,u),bs,t,e,n),vu=t=>t.dom.classList!==void 0,x1=t=>pd(t,"class"),KC=(t,e)=>$x(t,"class",e),Lx=(t,e)=>GC(t,"class",e),kk=(t,e)=>xt(x1(t),e)?Lx(t,e):KC(t,e),si=(t,e)=>{vu(t)?t.dom.classList.add(e):KC(t,e)},hd=t=>{(vu(t)?t.dom.classList:x1(t)).length===0&&As(t,"class")},js=(t,e)=>{vu(t)?t.dom.classList.remove(e):Lx(t,e),hd(t)},ur=(t,e)=>{const n=vu(t)?t.dom.classList.toggle(e):kk(t,e);return hd(t),n},v1=(t,e)=>vu(t)&&t.dom.classList.contains(e),cp=(t,e)=>{Y(e,n=>{si(t,n)})},YC=(t,e)=>{Y(e,n=>{js(t,n)})},XC=t=>_r(t,"[contenteditable]"),oc=(t,e=!1)=>Jo(t)?t.dom.isContentEditable:XC(t).fold(Ut(e),n=>sR(n)==="true"),sR=t=>t.dom.contentEditable,ym=(t,e)=>{t.dom.contentEditable=e?"true":"false"},yu=(t,e,n)=>st(Si(t,n),e),Ek=(t,e)=>st(Qn(t),e),y1=(t,e)=>{let n=[];return Y(Qn(t),r=>{e(r)&&(n=n.concat([r])),n=n.concat(y1(r,e))}),n},Ak=(t,e,n)=>yu(t,r=>ei(r,e),n),dr=(t,e)=>Dc(e,t),Tg=(t,e,n)=>Sl(t,e,n).isSome(),Tk=(t,e)=>qC(t,e).isSome(),Dg=(t,e)=>ip(t,e).isSome(),C1=(t,e)=>Tg(t,Et(ho,e)),JC=(t,e,n)=>bs(t,e,n).isSome(),Hx=(t,e,n)=>_r(t,e,n).isSome(),QC=t=>X(t)?t:pt,tw=(t,e,n)=>{let r=t.dom;const i=QC(n);for(;r.parentNode;){r=r.parentNode;const u=Z.fromDom(r),g=e(u);if(g.isSome())return g;if(i(u))break}return F.none()},w1=(t,e,n)=>{const r=e(t),i=QC(n);return r.orThunk(()=>i(t)?F.none():tw(t,e,i))},ew=t=>wl(t).filter(e=>e.trim().length!==0||e.indexOf(Bs)>-1).isSome(),Og=t=>Rc(t)&&Dn(t,"contenteditable")==="false",Dk=["img","br"],zx=t=>ew(t)||xt(Dk,oo(t))||Og(t),Ok=t=>ip(t,zx),Vx={create:(t,e,n,r)=>({start:t,soffset:e,finish:n,foffset:r})},Ux=lu.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Bk=(t,e,n,r)=>t.fold(e,n,r),Fk=t=>t.fold(Sn,Sn,Sn),Mk=Ux.before,_1=Ux.on,Nk=Ux.after,nc={before:Mk,on:_1,after:Nk,cata:Bk,getStart:Fk},Rg=lu.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),S1=t=>Rg.exact(t.start,t.soffset,t.finish,t.foffset),lp=t=>t.match({domRange:e=>Z.fromDom(e.startContainer),relative:(e,n)=>nc.getStart(e),exact:(e,n,r,i)=>e}),Pk=Rg.domRange,Ik=Rg.relative,ow=Rg.exact,Cu=t=>{const e=lp(t);return hu(e)},up=Vx.create,bd={domRange:Pk,relative:Ik,exact:ow,exactFromRange:S1,getWin:Cu,range:up},$k=(t,e,n)=>{var r;return F.from((r=t.caretPositionFromPoint)==null?void 0:r.call(t,e,n)).bind(i=>{if(i.offsetNode===null)return F.none();const u=t.createRange();return u.setStart(i.offsetNode,i.offset),u.collapse(),F.some(u)})},Ts=(t,e,n)=>{var r;return F.from((r=t.caretRangeFromPoint)==null?void 0:r.call(t,e,n))},xs=(t,e,n)=>t.caretPositionFromPoint?$k(t,e,n):t.caretRangeFromPoint?Ts(t,e,n):F.none(),xd=(t,e,n)=>{const r=t.document;return xs(r,e,n).map(i=>Vx.create(Z.fromDom(i.startContainer),i.startOffset,Z.fromDom(i.endContainer),i.endOffset))},wu=(t,e)=>{const n=oo(t);return n==="input"?nc.after(t):xt(["br","img"],n)?e===0?nc.before(t):nc.after(t):nc.on(t,e)},Wx=(t,e)=>{const n=t.fold(nc.before,wu,nc.after),r=e.fold(nc.before,wu,nc.after);return bd.relative(n,r)},Sr=(t,e,n,r)=>{const i=wu(t,e),u=wu(n,r);return bd.relative(i,u)},Zx=t=>t.match({domRange:e=>{const n=Z.fromDom(e.startContainer),r=Z.fromDom(e.endContainer);return Sr(n,e.startOffset,r,e.endOffset)},relative:Wx,exact:Sr}),vd=t=>{const e=bd.getWin(t).dom,n=(i,u,g,b)=>Sg(e,i,u,g,b),r=Zx(t);return tp(e,r).match({ltr:n,rtl:n})},k1=(t,e,n)=>xd(t,e,n),ri=t=>{const e=t===void 0?window:t;
3return hl().browser.isFirefox()?F.none():F.from(e.visualViewport)},jx=(t,e,n,r)=>({x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}),Na=t=>{const e=t===void 0?window:t,n=e.document,r=Px(Z.fromDom(n));return ri(e).fold(()=>{const i=e.document.documentElement,u=i.clientWidth,g=i.clientHeight;return jx(r.left,r.top,u,g)},i=>jx(Math.max(i.pageLeft,r.left),Math.max(i.pageTop,r.top),i.width,i.height))};class ts{constructor(e,n){Ft(this,"rootNode");Ft(this,"node");this.node=e,this.rootNode=n,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e,n,r,i){if(e){if(!i&&e[n])return e[n];if(e!==this.rootNode){let u=e[r];if(u)return u;for(let g=e.parentNode;g&&g!==this.rootNode;g=g.parentNode)if(u=g[r],u)return u}}}findPreviousNode(e,n){if(e){const r=e.previousSibling;if(this.rootNode&&r===this.rootNode)return;if(r){if(!n){for(let u=r.lastChild;u;u=u.lastChild)if(!u.lastChild)return u}return r}const i=e.parentNode;if(i&&i!==this.rootNode)return i}}}const E1=/^[ \t\r\n]*$/,Bg=t=>E1.test(t),nw=t=>{for(const e of t)if(!mu(e))return!1;return!0},Gx=t=>" \f \v".indexOf(t)!==-1,sw=t=>t===` 4`||t==="\r",rw=(t,e)=>e<t.length&&e>=0?sw(t[e]):!1,A1=(t,e=4,n=!0,r=!0)=>{const i=du(" ",e),u=t.replace(/\t/g,i);return We(u,(b,x)=>Gx(x)||x===Bs?b.pcIsSpace||b.str===""&&n||b.str.length===u.length-1&&r||rw(u,b.str.length+1)?{pcIsSpace:!1,str:b.str+Bs}:{pcIsSpace:!0,str:b.str+" "}:{pcIsSpace:sw(x),str:b.str+x},{pcIsSpace:!1,str:""}).str},Fg=t=>e=>!!e&&e.nodeType===t,T1=t=>!!t&&!Object.getPrototypeOf(t),jt=Fg(1),fa=t=>jt(t)&&Rc(Z.fromDom(t)),Lk=t=>jt(t)&&t.namespaceURI==="http://www.w3.org/2000/svg",Zr=t=>{const e=t.toLowerCase();return n=>mt(n)&&n.nodeName.toLowerCase()===e},Di=t=>{const e=t.map(n=>n.toLowerCase());return n=>{if(n&&n.nodeName){const r=n.nodeName.toLowerCase();return xt(e,r)}return!1}},D1=(t,e)=>{const n=e.toLowerCase().split(" ");return r=>{if(jt(r)){const i=r.ownerDocument.defaultView;if(i)for(let u=0;u<n.length;u++){const g=i.getComputedStyle(r,null);if((g?g.getPropertyValue(t):null)===n[u])return!0}}return!1}},Hk=t=>e=>jt(e)&&e.hasAttribute(t),yd=t=>jt(t)&&t.hasAttribute("data-mce-bogus"),zk=t=>jt(t)&&t.getAttribute("data-mce-bogus")==="all",pa=t=>jt(t)&&t.tagName==="TABLE",aw=t=>e=>!!(fa(e)&&(e.contentEditable===t||e.getAttribute("data-mce-contenteditable")===t)),Oi=Di(["textarea","input"]),Nt=Fg(3),qx=Fg(4),Ns=Fg(7),to=Fg(8),_u=Fg(9),Mg=Fg(11),Wn=Zr("br"),Ri=Zr("img"),dp=Zr("a"),Pa=aw("true"),On=aw("false"),Su=t=>fa(t)&&t.isContentEditable&&mt(t.parentElement)&&!t.parentElement.isContentEditable,Ng=Di(["td","th"]),Kx=Di(["td","th","caption"]),Yx=Zr("template"),Bi=Di(["video","audio","object","embed"]),mp=Zr("li"),gp=Zr("details"),Vk=Zr("summary"),Xx="uc-video",fp=t=>t.nodeName.toLowerCase()===Xx,Jx={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},O1=(t,e,n)=>{const r=Z.fromDom(e),i=Z.fromDom(t),u=n.getWhitespaceElements();return Tg(i,b=>Xe(u,oo(b)),Et(ho,r))},Uk=t=>jt(t)&&t.nodeName==="A"&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id")),Wk=(t,e)=>jt(t)&&Xe(e.getNonEmptyElements(),t.nodeName),Qx=Hk("data-mce-bookmark"),Zk=t=>Yi(Z.fromDom(t)).exists(e=>!oc(e)),pp=(t,e,n)=>Bg(t.data)&&!O1(t,e,n),rR=(t,e,n,r)=>Nt(t)&&!pp(t,e,n)&&(!r.includeZwsp||!nw(t.data)),Ia=(t,e,n,r)=>X(r.isContent)&&r.isContent(e)||Wk(e,t)||Qx(e)||Uk(e)||rR(e,n,t,r)||On(e)||Pa(e)&&Zk(e),ve=(t,e,n)=>{const r={...Jx,...n};if(r.checkRootAsContent&&Ia(t,e,e,r))return!1;let i=e.firstChild,u=0;if(!i)return!0;const g=new ts(i,e);do{if(r.skipBogus&&jt(i)){const b=i.getAttribute("data-mce-bogus");if(b){i=g.next(b==="all");continue}}if(to(i)){i=g.next(!0);continue}if(Wn(i)){u++,i=g.next();continue}if(Ia(t,i,e,r))return!1;i=g.next()}while(i);return u<=1},es=(t,e,n)=>ve(t,e.dom,{checkRootAsContent:!0,...n}),Pg=(t,e,n)=>Ia(t,e,e,{includeZwsp:Jx.includeZwsp,...n}),iw=t=>{const e=t.toLowerCase();return e==="svg"?"svg":e==="math"?"math":"html"},Cm=t=>iw(t)!=="html",Ig=t=>Cm(t.nodeName),t2=t=>iw(t.nodeName),wm=["svg","math"],cw=()=>{const t=Gi(),e=()=>t.get().map(t2).getOr("html");return{track:i=>(Ig(i)?t.set(i):t.get().exists(u=>!u.contains(i))&&t.clear(),e()),current:e,reset:()=>{t.clear()}}},El="data-mce-block",lw=t=>st(he(t),e=>!/[A-Z]/.test(e)),e2=t=>wt(lw(t),e=>{const n=CSS.escape(e);return`${n}:`+wt(wm,r=>`not(${r} ${n})`).join(":")}).join(","),zn=(t,e)=>mt(e.querySelector(t))?(e.setAttribute(El,"true"),e.getAttribute("data-mce-selected")==="inline-boundary"&&e.removeAttribute("data-mce-selected"),!0):(e.removeAttribute(El),!1),Fi=(t,e)=>{const n=e2(t.getTransparentElements()),r=e2(t.getBlockElements());return st(e.querySelectorAll(n),i=>zn(r,i))},jr=(t,e,n)=>{var i;const r=n?"lastChild":"firstChild";for(let u=e[r];u;u=u[r])if(ve(t,u,{checkRootAsContent:!0})){(i=u.parentNode)==null||i.removeChild(u);return}},$g=(t,e,n)=>{const r=document.createRange(),i=e.parentNode;if(i){r.setStartBefore(e),r.setEndBefore(n);const u=r.extractContents();jr(t,u,!0),r.setStartAfter(n),r.setEndAfter(e);const g=r.extractContents();jr(t,g,!1),ve(t,u,{checkRootAsContent:!0})||i.insertBefore(u,e),ve(t,n,{checkRootAsContent:!0})||i.insertBefore(n,e),ve(t,g,{checkRootAsContent:!0})||i.insertBefore(g,e),i.removeChild(e)}},Gr=(t,e,n)=>{const r=t.getBlockElements(),i=Z.fromDom(e),u=b=>oo(b)in r,g=b=>ho(b,i);Y(xm(n),b=>{Sl(b,u,g).each(x=>{const w=Ek(b,E=>u(E)&&!t.isValidChild(oo(x),oo(E)));if(w.length>0){const E=Yi(x);Y(w,D=>{Sl(D,u,g).each(R=>{$g(t,R.dom,D.dom)})}),E.each(D=>Fi(t,D.dom))}})})},_m=(t,e,n)=>{Y([...n,...Kn(t,e)?[e]:[]],r=>Y(dr(Z.fromDom(r),r.nodeName.toLowerCase()),i=>{sc(t,i.dom)&&Ai(i)}))},Gs=(t,e)=>{const n=Fi(t,e);Gr(t,e,n),_m(t,e,n)},qr=(t,e)=>{if(hp(t,e)){const n=e2(t.getBlockElements());zn(n,e)}},R1=(t,e,n)=>{const r=u=>ho(u,Z.fromDom(e)),i=Si(Z.fromDom(n),r);Wi(i,i.length-2).filter(Jn).fold(()=>Gs(t,e),u=>Gs(t,u.dom))},At=t=>t.hasAttribute(El),ha=(t,e)=>Xe(t.getTransparentElements(),e),hp=(t,e)=>jt(e)&&ha(t,e.nodeName),Kn=(t,e)=>hp(t,e)&&At(e),sc=(t,e)=>hp(t,e)&&!At(e),$a=(t,e)=>e.type===1&&ha(t,e.name)&&q(e.attr(El)),jk=hl().browser,Al=t=>Xo(t,Jn),uw=t=>jk.isFirefox()&&oo(t)==="table"?Al(Qn(t)).filter(e=>oo(e)==="caption").bind(e=>Al(Js(e)).map(n=>{const r=n.dom.offsetTop,i=e.dom.offsetTop,u=e.dom.offsetHeight;return r<=i?-u:0})).getOr(0):0,ba=(t,e)=>t.children&&xt(t.children,e),Uo=(t,e,n)=>{let r=0,i=0;const u=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&rs(Z.fromDom(t),"position")==="static"){const b=e.getBoundingClientRect();return r=b.left+(u.documentElement.scrollLeft||t.scrollLeft)-u.documentElement.clientLeft,i=b.top+(u.documentElement.scrollTop||t.scrollTop)-u.documentElement.clientTop,{x:r,y:i}}let g=e;for(;g&&g!==n&&g.nodeType&&!ba(g,n);){const b=g;r+=b.offsetLeft||0,i+=b.offsetTop||0,g=b.offsetParent}for(g=e.parentNode;g&&g!==n&&g.nodeType&&!ba(g,n);)r-=g.scrollLeft||0,i-=g.scrollTop||0,g=g.parentNode;i+=uw(Z.fromDom(e))}return{x:r,y:i}},$c=(t,e)=>{const n=e.crossOrigin;return e.contentCssCors?"anonymous":X(n)?n(t):void 0},Lg=(t,e={})=>{let n=0;const r={},i=Z.fromDom(t),u=Bc(i),g=Q=>{e.referrerPolicy=Q},b=Q=>{e.contentCssCors=Q},x=Q=>{e.crossOrigin=Q},w=Q=>{Ro(Bx(i),Q)},E=Q=>{const et=Bx(i);kl(et,"#"+Q).each(xn)},D=Q=>Ln(r,Q).getOrThunk(()=>({id:"mce-u"+n++,passed:[],failed:[],count:0})),R=Q=>new Promise((et,ft)=>{let St;const Gt=Mt._addCacheSuffix(Q),ge=D(Gt);r[Gt]=ge,ge.count++;const ht=(Oe,Co)=>{Y(Oe,Pe),ge.status=Co,ge.passed=[],ge.failed=[],St&&(St.onload=null,St.onerror=null,St=null)},it=()=>ht(ge.passed,2),bt=()=>ht(ge.failed,3);if(et&&ge.passed.push(et),ft&&ge.failed.push(ft),ge.status===1)return;if(ge.status===2){it();return}if(ge.status===3){bt();return}ge.status=1;const qt=Z.fromTag("link",u.dom);
4lr(qt,{rel:"stylesheet",type:"text/css",id:ge.id});const De=$c(Q,e);De!==void 0&&qn(qt,"crossOrigin",De),e.referrerPolicy&&qn(qt,"referrerpolicy",e.referrerPolicy),St=qt.dom,St.onload=it,St.onerror=bt,w(qt),qn(qt,"href",Gt)}),N=(Q,et)=>{const ft=D(Q);r[Q]=ft,ft.count++;const St=Z.fromTag("style",u.dom);lr(St,{rel:"stylesheet",type:"text/css",id:ft.id,"data-mce-key":Q}),St.dom.innerHTML=et,w(St)},H=Q=>Promise.allSettled(wt(Q,ft=>R(ft).then(Ut(ft)))).then(ft=>{const St=Ct(ft,Gt=>Gt.status==="fulfilled");return St.fail.length>0?Promise.reject(wt(St.fail,Gt=>Gt.reason)):wt(St.pass,Gt=>Gt.value)}),$=Q=>{const et=Mt._addCacheSuffix(Q);Ln(r,et).each(ft=>{--ft.count===0&&(delete r[et],E(ft.id))})};return{load:R,loadRawCss:N,loadAll:H,unload:$,unloadRawCss:Q=>{Ln(r,Q).each(et=>{--et.count===0&&(delete r[Q],E(et.id))})},unloadAll:Q=>{Y(Q,et=>{$(et)})},_setReferrerPolicy:g,_setContentCssCors:b,_setCrossOrigin:x}},o2=(()=>{const t=new WeakMap;return{forElement:(n,r)=>{const u=ar(n).dom;return F.from(t.get(u)).getOrThunk(()=>{const g=Lg(u,r);return t.set(u,g),g})}}})(),n2=t=>t.nodeName.toLowerCase()==="span",rc=(t,e)=>mt(t)&&(Pg(e,t)||e.isInline(t.nodeName.toLowerCase())),B1=(t,e,n)=>{const r=new ts(t,e).prev(!1),i=new ts(t,e).next(!1),u=Gn(r)||rc(r,n),g=Gn(i)||rc(i,n);return u&&g},xa=t=>n2(t)&&t.getAttribute("data-mce-type")==="bookmark",Gk=(t,e,n)=>Nt(t)&&t.data.length>0&&B1(t,e,n),at=t=>jt(t)?t.childNodes.length>0:!1,ai=t=>Mg(t)||_u(t),bp=(t,e,n,r)=>{var g;const i=r||e;if(jt(e)&&xa(e))return e;const u=e.childNodes;for(let b=u.length-1;b>=0;b--)bp(t,u[b],n,i);if(jt(e)){const b=e.childNodes;b.length===1&&xa(b[0])&&((g=e.parentNode)==null||g.insertBefore(b[0],e))}return!ai(e)&&!Pg(n,e)&&!at(e)&&!Gk(e,i,n)&&t.remove(e),e},Zn=Mt.makeMap,Kr=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ps=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,dn=/[<>&\"\']/g,dw=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Cd={128:"â¬",130:"â",131:"Æ",132:"â",133:"â¦",134:"â ",135:"â¡",136:"Ë",137:"â°",138:"Å ",139:"â¹",140:"Å",142:"Ž",145:"â",146:"â",147:"â",148:"â",149:"â¢",150:"â",151:"â",152:"Ë",153:"â¢",154:"Å¡",155:"âº",156:"Å",158:"ž",159:"Ÿ"},wd={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Hg={"<":"<",">":">","&":"&",""":'"',"'":"'"},xp=t=>{const e=Z.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t},s2=(t,e)=>{const n={};if(t){const r=t.split(",");e=e||10;for(let i=0;i<r.length;i+=2){const u=String.fromCharCode(parseInt(r[i],e));if(!wd[u]){const g="&"+r[i+1]+";";n[u]=g,n[g]=u}}return n}else return},r2=s2("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8
4k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),_d=(t,e)=>t.replace(e?Kr:Ps,n=>wd[n]||n),zg=t=>(""+t).replace(dn,e=>wd[e]||e),mw=(t,e)=>t.replace(e?Kr:Ps,n=>n.length>1?"&#"+((n.charCodeAt(0)-55296)*1024+(n.charCodeAt(1)-56320)+65536)+";":wd[n]||"&#"+n.charCodeAt(0)+";"),a2=(t,e,n)=>{const r=n||r2;return t.replace(e?Kr:Ps,i=>wd[i]||r[i]||i)},La={encodeRaw:_d,encodeAllRaw:zg,encodeNumeric:mw,encodeNamed:a2,getEncodeFunc:(t,e)=>{const n=s2(e)||r2,r=(g,b)=>g.replace(b?Kr:Ps,x=>wd[x]!==void 0?wd[x]:n[x]!==void 0?n[x]:x.length>1?"&#"+((x.charCodeAt(0)-55296)*1024+(x.charCodeAt(1)-56320)+65536)+";":"&#"+x.charCodeAt(0)+";"),i=(g,b)=>a2(g,b,n),u=Zn(t.replace(/\+/g,","));return u.named&&u.numeric?r:u.named?e?i:a2:u.numeric?mw:_d},decode:t=>t.replace(dw,(e,n)=>n?(n.charAt(0).toLowerCase()==="x"?n=parseInt(n.substr(1),16):n=parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(n&1023))):Cd[n]||String.fromCharCode(n)):Hg[e]||r2[e]||xp(e))},as=(t,e)=>(t=Mt.trim(t),t?t.split(e||" "):[]),Sd=t=>new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$"),vp=t=>mo(t)&&t.source&&Object.prototype.toString.call(t)==="[object RegExp]",va=t=>{const e=n=>lo(n)?wt(n,e):vp(n)?new RegExp(n.source,n.flags):mo(n)?rx(n,e):n;return e(t)},Vg=t=>{const e=/^(~)?(.+)$/;return qo(as(t,","),n=>{const r=e.exec(n);if(r){const u=r[1]==="~"?"span":"div",g=r[2];return[{cloneName:u,name:g}]}else return[]})},Ds=t=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",...t!=="html4"?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],...t!=="html5-strict"?["xml:lang"]:[]]),F1=t=>{let e,n;e="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment",t!=="html4"&&(e+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",n+=" audio canvas command data datalist mark meter output picture progress template time wbr video ruby bdi keygen svg"),t!=="html5-strict"&&(n=[n,"acronym applet basefont big font strike tt"].join(" "),e=[e,"center dir isindex noframes"].join(" "));const r=[e,n].join(" ");return{blockContent:e,phrasingContent:n,flowContent:r}},ii=t=>{const{blockContent:e,phrasingContent:n,flowContent:r}=F1(t),i=u=>Object.freeze(u.split(" "));return Object.freeze({blockContent:i(e),phrasingContent:i(n),flowContent:i(r)})},ac={html4:Ci(()=>ii("html4")),html5:Ci(()=>ii("html5")),"html5-strict":Ci(()=>ii("html5-strict"))},i2=(t,e)=>{const{blockContent:n,phrasingContent:r,flowContent:i}=ac[t]();return e==="blocks"?F.some(n):e==="phrasing"?F.some(r):e==="flow"?F.some(i):F.none()},qs=t=>{const e=Ds(t),{phrasingContent:n,flowContent:r}=F1(t),i={},u=(x,w,E)=>{i[x]={attributes:Zf(w,Ut({})),attributesOrder:w,children:Zf(E,Ut({}))}},g=(x,w="",E="")=>{const D=as(E),R=as(x);let N=R.length;const H=[...e,...as(w)];for(;N--;)u(R[N],H.slice(),D)},b=(x,w)=>{const E=as(x),D=as(w);let R=E.length;for(;R--;){const N=i[E[R]];for(let H=0,$=D.length;H<$;H++)N.attributes[D[H]]={},N.attributesOrder.push(D[H])}};return t!=="html5-strict"&&(Y(as("acronym applet basefont big font strike tt"),E=>{g(E,"",n)}),Y(as("center dir isindex noframes"),E=>{g(E,"",r)})),g("html","manifest","head body"),g("head","","base command link meta noscript script style title"),g("title hr noscript br"),g("base","href target"),g("link","href rel media hreflang type sizes hreflang"),g("meta","name http-equiv content charset property"),g("style","media type scoped"),g("script","src async defer type charset"),g("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),g("dd div","",r),g("address dt caption","",t==="html4"?n:r),g("h1 h2 h3 h4 h5 h6 pre p abbr co
4de var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),g("blockquote","cite",r),g("ol","reversed start type","li"),g("ul","","li"),g("li","value",r),g("dl","","dt dd"),g("a","href target rel media hreflang type",t==="html4"?n:r),g("q","cite",n),g("ins del","cite datetime",r),g("img","src sizes srcset alt usemap ismap width height"),g("iframe","src name width height",r),g("embed","src type width height"),g("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),g("param","name value"),g("map","name",[r,"area"].join(" ")),g("area","alt coords shape href target rel media hreflang type"),g("table","border","caption colgroup thead tfoot tbody tr"+(t==="html4"?" col":"")),g("colgroup","span","col"),g("col","span"),g("tbody thead tfoot","","tr"),g("tr","","td th"),g("td","colspan rowspan headers",r),g("th","colspan rowspan headers scope abbr",r),g("form","accept-charset action autocomplete enctype method name novalidate target",r),g("fieldset","disabled form name",[r,"legend"].join(" ")),g("label","form for",n),g("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),g("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",t==="html4"?r:n),g("select","disabled form multiple name required size","option optgroup"),g("optgroup","disabled label","option"),g("option","disabled label selected value"),g("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),g("menu","type label",[r,"li"].join(" ")),g("noscript","",r),t!=="html4"&&(g("wbr"),g("ruby","",[n,"rt rp"].join(" ")),g("figcaption","",r),g("mark rt rp bdi","",n),g("summary","",[n,"h1 h2 h3 h4 h5 h6"].join(" ")),g("canvas","width height",r),g("data","value",n),g("video","src crossorigin poster preload autoplay mediagroup loop controlslist disablepictureinpicture disableremoteplayback playsinline muted controls width height buffered",[r,"track source"].join(" ")),g("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),g("picture","","img source"),g("source","src srcset type media sizes"),g("track","kind src srclang label default"),g("datalist","",[n,"option"].join(" ")),g("article section nav aside main header footer","",r),g("hgroup","","h1 h2 h3 h4 h5 h6"),g("figure","",[r,"figcaption"].join(" ")),g("time","datetime",n),g("dialog","open",r),g("command","type label icon disabled checked radiogroup command"),g("output","for form name",n),g("progress","value max",n),g("meter","value min max low high optimum",n),g("details","open",[r,"summary"].join(" ")),g("keygen","autofocus challenge disabled form keytype name"),u("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),t!=="html5-strict"&&(b("script","language xml:space"),b("style","xml:space"),b("object","declare classid code codebase codetype archive standby align border hspace vspace"),b("embed","align name hspace vspace"),b("param","valuetype type"),b("a","charset name rev shape coords"),b("br","clear"),b("applet","codebase archive code object alt name width height align hspace vspace"),b("img","name longdesc align border hspace vspace"),b("iframe","longdesc frameborder marginwidth marginheight scrolling align"),b("font basefont","size color face"),b("input","usemap align"),b("select"),b("textarea"),b("h1 h2 h3 h4 h5 h6 div p legend caption","align"),b("ul","type compact"),b("li","type"),b("ol dl menu dir","compact"),b("pre","width xml:space"),b("hr","align noshade size width"),b("isindex","prompt"),b("table","summary width frame rules cellspacing cellpadding align bgcolor"),b("col","width align char charoff valign"),b("colgroup","width align char charoff valign"),b("thead","align char charoff valign"),b("tr","align char charoff valign bgcolor"),b("th","axis align char charoff valign nowrap bgcolor width height"),b("form","accept"),b("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),b("tfoot","align char charoff valign"),b("tbody","align char charoff valign"),b("area","nohref"),b("body","background bgcolor text link vlink alink")),t!=="html4"&&(b("input button select textarea","autofocus"),b("input textarea","placeholder"),b("a","download"),b("link script img","crossorigin"),b("img","loading"),b("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),t!=="html4"&&Y([i.video,i.audio],x=>{delete x.children.audio,delete x.children.video}),Y(as("a form meter progress dfn"),x=>{i[x]&&delete i[x].children[x]}),delete i.caption.children.table,delete i.script,i},Ug=t=>t==="-"?"remove":"add",Lc=t=>{const e=/^(@?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)$/;return F.from(e.exec(t)).map(n=>({preset:n[1]==="@",name:n[2]}))},Sm=t=>{const e=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return qo(as(t,","),n=>{const r=e.exec(n);if(r){const i=r[1],u=i?Ug(i):"replace",g=r[2],b=qo(as(r[3],"|"),x=>Lc(x).toArray());return[{operation:u,name:g,validChildren:b}]}else return[]})},km=(t,e)=>{const n=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,r=/[*?+]/,{attributes:i,attributesOrder:u}=e;return Y(as(t,"|"),g=>{const b=n.exec(g);if(b){const x={},w=b[1],E=b[2].replace(/[\\:]:/g,":"),D=b[3],R=b[4];if(w==="!"&&(e.attributesRequired=e.attributesRequired||[],e.attributesRequired.push(E),x.required=!0),w==="-"){delete i[E],u.splice(Mt.inArray(u,E),1);return}if(D&&(D==="="?(e.attributesDefault=e.attributesDefault||[],e.attributesDefault.push({name:E,value:R}),x.defaultValue=R):D==="~"?(e.attributesForced=e.attributesForced||[],e.attributesForced.push({name:E,value:R}),x.forcedValue=R):D==="<"&&(x.validValues=Mt.makeMap(R,"?"))),r.test(E)){const N=x;e.attributePatterns=e.attributePatterns||[],N.pattern=Sd(E),e.attributePatterns.push(N)}else i[E]||u.push(E),i[E]=x}})},Kk=(t,e)=>{Do(t.attributes,(n,r)=>{e.attributes[r]=n}),e.attributesOrder.push(...t.attributesOrder)},M1=(t,e)=>{const n=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return qo(as(e,","),r=>{const i=n.exec(r);if(i){const u=i[1],g=i[2],b=i[3],x=i[4],w=i[5],E={attributes:{},attributesOrder:[]};if(t.each(D=>Kk(D,E)),u==="#"?E.paddEmpty=!0:u==="-"&&(E.removeEmpty=!0),x==="!"&&(E.removeEmptyAttrs=!0),w&&km(w,E),b&&(E.outputName=g),g==="@")if(t.isNone())t=F.some(E);else return[];return[b?{name:g,element:E,aliasName:b}:{name:g,element:E}]}else return[]})},ku={},yp=Mt.makeMap,mn=Mt.each,gw=Mt.extend,Eu=Mt.explode,Wg=(t,e={})=>{const n=yp(t," ",yp(t.toUpperCase()," "));return gw(n,e)},N1=t=>Wg("td th li dt dd figcaption caption details summary",t.getTextBlockElements()),Au=(t,e)=>{if(t){const n={};return q(t)&&(t={"*":t}),mn(t,(r,i)=>{n[i]=n[i.toUpperCase()]=e==="map"?yp(r,/[, ]/):Eu(r,/[, ]/)}),n}else return},mr=(t={})=>{const e={},n={};let r=[];const i={},u={},g={},b=(Re,_o,_s)=>{const Bn=t[Re];if(Bn)return yp(Bn,/[, ]/,yp(Bn.toUpperCase(),/[, ]/));{let cn=ku[Re];return cn||(cn=Wg(_o,_s),ku[Re]=cn),cn}},x=t.schema??"html5",w=qs(x);t.verify_html===!1&&(t.valid_elements="*[*]");
4const E=Au(t.valid_styles),D=Au(t.invalid_styles,"map"),R=Au(t.valid_classes,"map"),N=b("whitespace_elements","pre script noscript style textarea video audio iframe object code"),H=b("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),$=b("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),U=b("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),J="td th iframe video audio object script code",Q=b("non_empty_elements",J+" pre svg textarea summary",$),et=b("move_caret_before_on_enter_elements",J+" table",$),ft="h1 h2 h3 h4 h5 h6",St=b("text_block_elements",ft+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),Gt=b("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing colgroup col",St),ge=b("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),ht=b("transparent_elements","a ins del canvas map"),it=b("wrap_block_elements","pre "+ft);mn("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),Re=>{u[Re]=new RegExp("</"+Re+"[^>]*>","gi")});const bt=Re=>{const _o=F.from(e["@"]),_s=/[*?+]/;Y(M1(_o,Re??""),({name:Bn,element:cn,aliasName:gs})=>{if(gs&&(e[gs]=cn),_s.test(Bn)){const Vi=cn;Vi.pattern=Sd(Bn),r.push(Vi)}else e[Bn]=cn})},qt=Re=>{r=[],Y(he(e),_o=>{delete e[_o]}),bt(Re)},De=(Re,_o)=>{delete ku.text_block_elements,delete ku.block_elements;const _s=_o.extends?!Aa(_o.extends):!1,Bn=_o.extends;if(n[Re]=Bn?n[Bn]:{},i[Re]=Bn??Re,Q[Re.toUpperCase()]={},Q[Re]={},_s||(Gt[Re.toUpperCase()]={},Gt[Re]={}),Bn&&!e[Re]&&e[Bn]){const cn=va(e[Bn]);delete cn.removeEmptyAttrs,delete cn.removeEmpty,e[Re]=cn}else e[Re]={attributesOrder:[],attributes:{}};if(lo(_o.attributes)){const cn=Vi=>{gs.attributesOrder.push(Vi),gs.attributes[Vi]={}},gs=e[Re]??{};delete gs.attributesDefault,delete gs.attributesForced,delete gs.attributePatterns,delete gs.attributesRequired,gs.attributesOrder=[],gs.attributes={},Y(_o.attributes,Vi=>{const Ka=Ds(x);Lc(Vi).each(({preset:ml,name:hg})=>{ml?hg==="global"&&Y(Ka,cn):cn(hg)})}),e[Re]=gs}if(eo(_o.padEmpty)){const cn=e[Re]??{};cn.paddEmpty=_o.padEmpty,e[Re]=cn}if(lo(_o.children)){const cn={},gs=Ka=>{cn[Ka]={}},Vi=Ka=>{i2(x,Ka).each(ml=>{Y(ml,gs)})};Y(_o.children,Ka=>{Lc(Ka).each(({preset:ml,name:hg})=>{ml?Vi(hg):gs(hg)})}),n[Re]=cn}Bn&&Do(n,(cn,gs)=>{cn[Bn]&&(n[gs]=cn=gw({},n[gs]),cn[Re]=cn[Bn])})},Oe=Re=>{Y(Vg(Re??""),({name:_o,cloneName:_s})=>{De(_o,{extends:_s})})},Co=(Re,_o)=>{g[Re]=_o},Yo=Re=>{mo(Re)?Do(Re,(_o,_s)=>{const Bn=_o.componentUrl;q(Bn)&&Co(_s,Bn),De(_s,_o)}):q(Re)&&Oe(Re)},_n=Re=>{Y(Sm(Re??""),({operation:_o,name:_s,validChildren:Bn})=>{const cn=_o==="replace"?{"#comment":{}}:n[_s],gs=Ka=>{_o==="remove"?delete cn[Ka]:cn[Ka]={}},Vi=Ka=>{i2(x,Ka).each(ml=>{Y(ml,gs)})};Y(Bn,({preset:Ka,name:ml})=>{Ka?Vi(ml):gs(ml)}),n[_s]=cn})},In=Re=>{const _o=e[Re];if(_o)return _o;let _s=r.length;for(;_s--;){const Bn=r[_s];if(Bn.pattern.test(Re))return Bn}},vr=()=>{t.valid_elements?(qt(t.valid_elements),mn(w,(Re,_o)=>{n[_o]=Re.children})):(mn(w,(Re,_o)=>{e[_o]={attributes:Re.attributes,attributesOrder:Re.attributesOrder},n[_o]=Re.children}),mn(as("strong/b em/i"),Re=>{const _o=as(Re,"/");e[_o[1]].outputName=_o[0]}),mn(ge,(Re,_o)=>{e[_o]&&(t.padd_empty_block_inline_children&&(e[_o].paddInEmptyBlock=!0),e[_o].removeEmpty=!0)}),mn(as("ol ul blockquote a table tbody"),Re=>{e[Re]&&(e[Re].removeEmpty=!0)}),mn(as("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),Re=>{e[Re]&&(e[Re].paddEmpty=!0)}),mn(as("span"),Re=>{e[Re].removeEmptyAttrs=!0})),delete e.svg,Yo(t.custom_elements),_n(t.valid_children),bt(t.extended_valid_elements),_n("+ol[ul|ol],+ul[ul|ol]"),mn({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(Re,_o)=>{e[_o]&&(e[_o].parentsRequired=as(Re))}
4),t.invalid_elements&&mn(Eu(t.invalid_elements),Re=>{e[Re]&&delete e[Re]}),In("span")||bt("span[!data-mce-type|*]")},zi=Ut(E),Yt=Ut(D),Ce=Ut(R),Ho=Ut(U),No=Ut(Gt),Fr=Ut(St),yt=Ut(ge),zt=Ut(Object.seal($)),re=Ut(H),fo=Ut(Q),Ye=Ut(et),en=Ut(N),ul=Ut(ht),qa=Ut(it),dl=Ut(Object.seal(u)),_c=(Re,_o)=>{const _s=n[Re.toLowerCase()];return!!(_s&&_s[_o.toLowerCase()])},Wf=(Re,_o)=>{const _s=In(Re);if(_s)if(_o){if(_s.attributes[_o])return!0;const Bn=_s.attributePatterns;if(Bn){let cn=Bn.length;for(;cn--;)if(Bn[cn].pattern.test(_o))return!0}}else return!0;return!1},Aa=Re=>Xe(No(),Re),hi=Re=>!Ze(Re,"#")&&Wf(Re)&&!Aa(Re),pg=Re=>Xe(qa(),Re)||hi(Re),Qb=Ut(i),Z4=Ut(g);return vr(),{type:x,children:n,elements:e,getValidStyles:zi,getValidClasses:Ce,getBlockElements:No,getInvalidStyles:Yt,getVoidElements:zt,getTextBlockElements:Fr,getTextInlineElements:yt,getBoolAttrs:Ho,getElementRule:In,getSelfClosingElements:re,getNonEmptyElements:fo,getMoveCaretBeforeOnEnterElements:Ye,getWhitespaceElements:en,getTransparentElements:ul,getSpecialElements:dl,getComponentUrls:Z4,isValidChild:_c,isValid:Wf,isBlock:Aa,isInline:hi,isWrapper:pg,getCustomElements:Qb,addValidElements:bt,setValidElements:qt,addCustomElements:Yo,addValidChildren:_n}},Em=t=>({value:Zg(t)}),Zg=t=>ux(t,"#").toUpperCase(),P1=t=>{const e=t.toString(16);return(e.length===1?"0"+e:e).toUpperCase()},I1=t=>{const e=P1(t.red)+P1(t.green)+P1(t.blue);return Em(e)},$1=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,Cp=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,fw=(t,e,n,r)=>({red:t,green:e,blue:n,alpha:r}),c2=(t,e,n,r)=>{const i=parseInt(t,10),u=parseInt(e,10),g=parseInt(n,10),b=parseFloat(r);return fw(i,u,g,b)},l2=t=>$1.test(t)?"rgb":Cp.test(t)?"rgba":"other",jg=t=>{const e=$1.exec(t);if(e!==null)return F.some(c2(e[1],e[2],e[3],"1"));const n=Cp.exec(t);return n!==null?F.some(c2(n[1],n[2],n[3],n[4])):F.none()},Hc=t=>`rgba(${t.red},${t.green},${t.blue},${t.alpha})`,Mi=t=>jg(t).map(I1).map(e=>"#"+e.value).getOr(t),Tu=(t={},e)=>{const n=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,r=/\s*([^:]+):\s*([^;]+);?/g,i=/\s+$/,u={};let g,b;const x=Kf;e&&(g=e.getValidStyles(),b=e.getInvalidStyles());const w=(`\\" \\' \\; \\: ; : `+x).split(" ");for(let D=0;D<w.length;D++)u[w[D]]=x+D,u[x+D]=w[D];const E={parse:D=>{const R={};let N=!1;const H=t.url_converter,$=t.url_converter_scope||E,U=(ht,it,bt)=>{const qt=R[ht+"-top"+it];if(!qt)return;const De=R[ht+"-right"+it];if(!De)return;const Oe=R[ht+"-bottom"+it];if(!Oe)return;const Co=R[ht+"-left"+it];if(!Co)return;const Yo=[qt,De,Oe,Co];let _n=Yo.length-1;for(;_n--&&Yo[_n]===Yo[_n+1];);_n>-1&&bt||(R[ht+it]=_n===-1?Yo[0]:Yo.join(" "),delete R[ht+"-top"+it],delete R[ht+"-right"+it],delete R[ht+"-bottom"+it],delete R[ht+"-left"+it])},J=ht=>{const it=R[ht];if(!it)return;const bt=it.indexOf(",")>-1?[it]:it.split(" ");let qt=bt.length;for(;qt--;)if(bt[qt]!==bt[0])return!1;return R[ht]=bt[0],!0},Q=(ht,it,bt,qt)=>{J(it)&&J(bt)&&J(qt)&&(R[ht]=R[it]+" "+R[bt]+" "+R[qt],delete R[it],delete R[bt],delete R[qt])},et=ht=>(N=!0,u[ht]),ft=(ht,it)=>(N&&(ht=ht.replace(/\uFEFF[0-9]/g,bt=>u[bt])),it||(ht=ht.replace(/\\([\'\";:])/g,"$1")),ht),St=ht=>
4String.fromCharCode(parseInt(ht.slice(1),16)),Gt=ht=>ht.replace(/\\[0-9a-f]+/gi,St),ge=(ht,it,bt,qt,De,Oe)=>{if(De=De||Oe,De)return De=ft(De),"'"+De.replace(/\'/g,"\\'")+"'";if(it=ft(it||bt||qt||""),!t.allow_script_urls){const Co=it.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(Co)||!t.allow_svg_data_urls&&/^data:image\/svg/i.test(Co))return""}return H&&(it=H.call($,it,"style")),"url('"+it.replace(/\'/g,"\\'")+"')"};if(D){D=D.replace(/[\u0000-\u001F]/g,""),D=D.replace(/\\[\"\';:\uFEFF]/g,et).replace(/\"[^\"]+\"|\'[^\']+\'/g,it=>it.replace(/[;:]/g,et));let ht;for(;ht=r.exec(D);){r.lastIndex=ht.index+ht[0].length;let it=ht[1].replace(i,"").toLowerCase(),bt=ht[2].replace(i,"");if(it&&bt){if(it=Gt(it),bt=Gt(bt),it.indexOf(x)!==-1||it.indexOf('"')!==-1||!t.allow_script_urls&&(it==="behavior"||/expression\s*\(|\/\*|\*\//.test(bt)))continue;it==="font-weight"&&bt==="700"?bt="bold":(it==="color"||it==="background-color")&&(bt=bt.toLowerCase()),l2(bt)==="rgb"&&jg(bt).each(qt=>{bt=Mi(Hc(qt)).toLowerCase()}),bt=bt.replace(n,ge),R[it]=N?ft(bt,!0):bt}}U("border","",!0),U("border","-width"),U("border","-color"),U("border","-style"),U("padding",""),U("margin",""),Q("border","border-width","border-style","border-color"),R.border==="medium none"&&delete R.border,R["border-image"]==="none"&&delete R["border-image"]}return R},serialize:(D,R)=>{let N="";const H=(U,J)=>{const Q=J[U];if(Q)for(let et=0,ft=Q.length;et<ft;et++){const St=Q[et],Gt=D[St];Gt&&(N+=(N.length>0?" ":"")+St+": "+Gt+";")}},$=(U,J)=>{if(!b||!J)return!0;let Q=b["*"];
4return Q&&Q[U]?!1:(Q=b[J],!(Q&&Q[U]))};return R&&g?(H("*",g),H(R,g)):Do(D,(U,J)=>{U&&$(J,R)&&(N+=(N.length>0?" ":"")+J+": "+U+";")}),N}};return E},pw={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},L1=t=>t instanceof Event||X(t.initEvent),u2=t=>t.isDefaultPrevented===It||t.isDefaultPrevented===pt,hw=t=>so(t.preventDefault)||L1(t),d2=(t,e)=>{const n=e??{};for(const r in t)Xe(pw,r)||(n[r]=t[r]);return mt(t.composedPath)&&(n.composedPath=()=>t.composedPath()),mt(t.getModifierState)&&(n.getModifierState=r=>t.getModifierState(r)),mt(t.getTargetRanges)&&(n.getTargetRanges=()=>t.getTargetRanges()),n},H1=(t,e,n,r)=>{const i=d2(e,r);return i.type=t,so(i.target)&&(i.target=i.srcElement??n),hw(e)&&(i.preventDefault=()=>{i.defaultPrevented=!0,i.isDefaultPrevented=It,X(e.preventDefault)&&e.preventDefault()},i.stopPropagation=()=>{i.cancelBubble=!0,i.isPropagationStopped=It,X(e.stopPropagation)&&e.stopPropagation()},i.stopImmediatePropagation=()=>{i.isImmediatePropagationStopped=It,i.stopPropagation()},u2(i)||(i.isDefaultPrevented=i.defaultPrevented===!0?It:pt,i.isPropagationStopped=i.cancelBubble===!0?It:pt,i.isImmediatePropagationStopped=pt)),i},z1="mce-data-",V1=/^(?:mouse|contextmenu)|click/,zc=(t,e,n,r)=>{t.addEventListener(e,n,r||!1)},wp=(t,e,n,r)=>{t.removeEventListener(e,n,r||!1)},Gg=t=>mt(t)&&V1.test(t.type),Am=(t,e)=>{const n=H1(t.type,t,document,e);if(Gg(t)&&Gn(t.pageX)&&!Gn(t.clientX)){const r=n.target.ownerDocument||document,i=r.documentElement,u=r.body,g=n;g.pageX=t.clientX+(i&&i.scrollLeft||u&&u.scrollLeft||0)-(i&&i.clientLeft||u&&u.clientLeft||0),g.pageY=t.clientY+(i&&i.scrollTop||u&&u.scrollTop||0)-(i&&i.clientTop||u&&u.clientTop||0)}return n},bw=(t,e,n)=>{const r=t.document,i={type:"ready"};if(n.domLoaded){e(i);return}const u=()=>r.readyState==="complete"||r.readyState==="interactive"&&r.body,g=()=>{wp(t,"DOMContentLoaded",g),wp(t,"load",g),n.domLoaded||(n.domLoaded=!0,e(i)),t=null};u()?g():zc(t,"DOMContentLoaded",g),n.domLoaded||zc(t,"load",g)},W4=class W4{constructor(){Ft(this,"domLoaded",!1);Ft(this,"events",{});Ft(this,"expando");Ft(this,"hasFocusIn");Ft(this,"count",1);this.expando=z1+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e,n,r,i){const u=this;let g;const b=window,x=R=>{u.executeHandlers(Am(R||b.event),w)};if(!e||Nt(e)||to(e))return r;let w;e[u.expando]?w=e[u.expando]:(w=u.count++,e[u.expando]=w,u.events[w]={}),i=i||e;const E=n.split(" ");let D=E.length;for(;D--;){let R=E[D],N=x,H=!1,$=!1;if(R==="DOMContentLoaded"&&(R="ready"),u.domLoaded&&R==="ready"&&e.readyState==="complete"){r.call(i,Am({type:R}));continue}!u.hasFocusIn&&(R==="focusin"||R==="focusout")&&(H=!0,$=R==="focusin"?"focus":"blur",N=U=>{const J=Am(U||b.event);J.type=J.type==="focus"?"focusin":"focusout",u.executeHandlers(J,w)}),g=u.events[w][R],g?R==="ready"&&u.domLoaded?r(Am({type:R})):g.push({func:r,scope:i}):(u.events[w][R]=g=[{func:r,scope:i}],g.fakeName=$,g.capture=H,g.nativeHandler=N,R==="ready"?bw(e,N,u):zc(e,$||R,N,H))}return e=g=null,r}unbind(e,n,r){if(!e||Nt(e)||to(e))return this;const i=e[this.expando];if(i){let u=this.events[i];if(n){const g=n.split(" ");let b=g.length;for(;b--;){const x=g[b],w=u[x];if(w){if(r){let E=w.length;for(;E--;)if(w[E].func===r){const D=w.nativeHandler,R=w.fakeName,N=w.capture,H=w.slice(0,E).concat(w.slice(E+1));H.nativeHandler=D,H.fakeName=R,H.capture=N,u[x]=H}}(!r||w.length===0)&&(delete u[x],wp(e,w.fakeName||x,w.nativeHandler,w.capture))}}}else Do(u,(g,b)=>{wp(e,g.fakeName||b,g.nativeHandler,g.capture)}),u={};for(const g in u)if(Xe(u,g))return this;delete this.events[i];try{delete e[this.expando]}catch{e[this.expando]=null}}return this}fire(e,n,r){return this.dispatch(e,n,r)}dispatch(e,n,r){if(!e||Nt(e)||to(e))return this;const i=Am({type:n,target:e},r);do{const u=e[this.expando];u&&this.executeHandlers(i,u),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!i.isPropagationStopped());return this}clean(e){if(!e||Nt(e)||to(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const n=e.getElementsByTagName("*");let r=n.length;for(;r--;)e=n[r],e[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e,n){const r=this.events[n],i=r&&r[e.type];if(i)for(let u=0,g=i.length;u<g;u++){const b=i[u];if(b&&b.func.call(b.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}}};Ft(W4,"Event",new W4);let qg=W4;const Yr=Mt.each,Yk=Mt.grep,m2="data-mce-style",g2=Mt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),U1=(t,e,n)=>{so(n)||n===""?As(t,e):qn(t,e,n)},xw=t=>t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),Tm=(t,e)=>{let n=0;if(t)for(let r=t.nodeType,i=t.previousSibling;i;i=i.previousSibling){const u=i.nodeType;e&&Nt(i)&&(u===r||!i.data.length)||(n++,r=u)}return n},vw=(t,e)=>{const n=Dn(e,"style"),r=t.serialize(t.parse(n),oo(e));U1(e,m2,r)},_p=(t,e)=>sr(t)?Xe(g2,e)?t+"":t+"px":t,f2=(t,e,n)=>{const r=xw(e);so(n)||n===""?b1(t,r):Ma(t,r,_p(n,r))},yw=(t,e,n)=>{const r=e.keep_values,i={set:(g,b,x)=>{const w=Z.fromDom(g);X(e.url_converter)&&mt(b)&&(b=e.url_converter.call(e.url_converter_scope||n(),String(b),x,g));const E="data-mce-"+x;U1(w,E,b),U1(w,x,b)},get:(g,b)=>{const x=Z.fromDom(g);return Dn(x,"data-mce-"+b)||Dn(x,b)}},u={style:{set:(g,b)=>{const x=Z.fromDom(g);
4r&&U1(x,m2,b),As(x,"style"),q(b)&&Ti(x,t.parse(b))},get:g=>{const b=Z.fromDom(g),x=Dn(b,m2)||Dn(b,"style");return t.serialize(t.parse(x),oo(b))}}};return r&&(u.href=u.src=i),u},vo=(t,e={})=>{const n={},r=window,i={};let u=0;const g=!0,b=!0,x=o2.forElement(Z.fromDom(t),{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy,crossOrigin:rt=>{const lt=e.crossOrigin;if(X(lt))return lt(rt,"stylesheet")}}),w=[],E=e.schema?e.schema:mr({}),D=Tu({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),R=e.ownEvents?new qg:qg.Event,N=E.getBlockElements(),H=rt=>q(rt)?Xe(N,rt):jt(rt)&&(Xe(N,rt.nodeName)||Kn(E,rt)),$=rt=>rt&&t&&q(rt)?t.getElementById(rt):rt,U=rt=>{const lt=$(rt);return mt(lt)?Z.fromDom(lt):null},J=(rt,lt,Xt="")=>{let Vt;const Le=U(rt);if(mt(Le)&&Jn(Le)){const Po=fL[lt];Po&&Po.get?Vt=Po.get(Le.dom,lt):Vt=Dn(Le,lt)}return mt(Vt)?Vt:Xt},Q=rt=>{const lt=$(rt);return so(lt)?[]:lt.attributes},et=(rt,lt,Xt)=>{Ce(rt,Vt=>{if(jt(Vt)){const Le=Z.fromDom(Vt),Po=Xt===""?null:Xt,Ss=Dn(Le,lt),bg=fL[lt];bg&&bg.set?bg.set(Le.dom,Po,lt):U1(Le,lt,Po),Ss!==Po&&e.onSetAttrib&&e.onSetAttrib({attrElm:Le.dom,attrName:lt,attrValue:Po})}})},ft=(rt,lt)=>rt.cloneNode(lt),St=()=>e.root_element||t.body,Gt=rt=>{const lt=Na(rt);return{x:lt.x,y:lt.y,w:lt.width,h:lt.height}},ge=(rt,lt)=>Uo(t.body,$(rt),lt),ht=(rt,lt,Xt)=>{Ce(rt,Vt=>{const Le=Z.fromDom(Vt);f2(Le,lt,Xt),e.update_styles&&vw(D,Le)})},it=(rt,lt)=>{Ce(rt,Xt=>{const Vt=Z.fromDom(Xt);Do(lt,(Le,Po)=>{f2(Vt,Po,Le)}),e.update_styles&&vw(D,Vt)})},bt=(rt,lt,Xt)=>{const Vt=$(rt);if(!(so(Vt)||!fa(Vt)&&!Lk(Vt)))return Xt?rs(Z.fromDom(Vt),xw(lt)):(lt=lt.replace(/-(\D)/g,(Le,Po)=>Po.toUpperCase()),lt==="float"&&(lt="cssFloat"),Vt.style?Vt.style[lt]:void 0)},qt=rt=>{const lt=$(rt);if(!lt)return{w:0,h:0};let Xt=bt(lt,"width"),Vt=bt(lt,"height");return(!Xt||Xt.indexOf("px")===-1)&&(Xt="0"),(!Vt||Vt.indexOf("px")===-1)&&(Vt="0"),{w:parseInt(Xt,10)||lt.offsetWidth||lt.clientWidth,h:parseInt(Vt,10)||lt.offsetHeight||lt.clientHeight}},De=rt=>{const lt=$(rt),Xt=ge(lt),Vt=qt(lt);return{x:Xt.x,y:Xt.y,w:Vt.w,h:Vt.h}},Oe=(rt,lt)=>{if(!rt)return!1;const Xt=lo(rt)?rt:[rt];return $t(Xt,Vt=>ei(Z.fromDom(Vt),lt))},Co=(rt,lt,Xt,Vt)=>{const Le=[];let Po=$(rt);Vt=Vt===void 0;const Ss=Xt||(St().nodeName!=="BODY"?St().parentNode:null);if(q(lt))if(lt==="*")lt=jt;else{const bg=lt;lt=im=>Oe(im,bg)}for(;Po&&!(Po===Ss||so(Po.nodeType)||_u(Po)||Mg(Po));){if(!lt||lt(Po))if(Vt)Le.push(Po);else return[Po];Po=Po.parentNode}return Vt?Le:null},Yo=(rt,lt,Xt)=>{const Vt=Co(rt,lt,Xt,!1);return Vt&&Vt.length>0?Vt[0]:null},_n=(rt,lt,Xt)=>{let Vt=lt;if(rt){q(lt)&&(Vt=Le=>Oe(Le,lt));for(let Le=rt[Xt];Le;Le=Le[Xt])if(X(Vt)&&Vt(Le))return Le}return null},In=(rt,lt)=>_n(rt,lt,"nextSibling"),vr=(rt,lt)=>_n(rt,lt,"previousSibling"),zi=rt=>X(rt.querySelectorAll),Yt=(rt,lt)=>{const Xt=$(lt)??e.root_element??t;return zi(Xt)?Wr(Xt.querySelectorAll(rt)):[]},Ce=function(rt,lt,Xt){const Vt=Xt??this;if(lo(rt)){const Le=[];return Yr(rt,(Po,Ss)=>{const bg=$(Po);bg&&Le.push(lt.call(Vt,bg,Ss))}),Le}else{const Le=$(rt);return Le?lt.call(Vt,Le):!1}},Ho=(rt,lt)=>{Ce(rt,Xt=>{Do(lt,(Vt,Le)=>{et(Xt,Le,Vt)})})},No=(rt,lt)=>{Ce(rt,Xt=>{const Vt=Z.fromDom(Xt);xu(Vt,lt)})},Fr=(rt,lt,Xt,Vt,Le)=>Ce(rt,Po=>{const Ss=q(lt)?t.createElement(lt):lt;return mt(Xt)&&Ho(Ss,Xt),Vt&&(!q(Vt)&&Vt.nodeType?Ss.appendChild(Vt):q(Vt)&&No(Ss,Vt)),Le?Ss:Po.appendChild(Ss)}),yt=(rt,lt,Xt)=>Fr(t.createElement(rt),rt,lt,Xt,!0),zt=La.decode,re=La.encodeAllRaw,fo=(rt,lt,Xt="")=>{let Vt="<"+rt;for(const Le in lt)cs(lt,Le)&&(Vt+=" "+Le+'="'+re(lt[Le])+'"');return qf(Xt)&&Xe(E.getVoidElements(),rt)?Vt+" />":Vt+">"+Xt+"</"+rt+">"},Ye=rt=>{const lt=t.createElement("div"),Xt=t.createDocumentFragment();Xt.appendChild(lt),rt&&(lt.innerHTML=rt);let Vt;for(;Vt=lt.firstChild;)Xt.appendChild(Vt);return Xt.removeChild(lt),Xt},en=(rt,lt)=>Ce(rt,Xt=>{const Vt=Z.fromDom(Xt);return lt&&Y(Qn(Vt),Le=>{zo(Le)&&Le.dom.length===0?xn(Le):wr(Vt,Le)}),xn(Vt),Vt.dom}),ul=rt=>Ce(rt,lt=>{const Xt=lt.attributes;for(let Vt=Xt.length-1;Vt>=0;Vt--)lt.removeAttributeNode(Xt.item(Vt))}),qa=rt=>D.parse(rt),dl=(rt,lt)=>D.serialize(rt,lt),_c=rt=>{if(ex!==vo.DOM&&t===document){if(n[rt])return;n[rt]=!0}let lt=t.getElementById("mceDefaultStyles");if(!lt){lt=t.createElement("style"),lt.id="mceDefaultStyles",lt.type="text/css";const Xt=t.head;Xt.firstChild?Xt.insertBefore(lt,Xt.firstChild):Xt.appendChild(lt)}lt.styleSheet?lt.styleSheet.cssText+=rt:lt.appendChild(t.createTextNode(rt))},Wf=rt=>{rt||(rt=""),Y(rt.split(","),lt=>{i[lt]=!0,x.load(lt).catch(_e)})},Aa=(rt,lt,Xt)=>{Ce(rt,Vt=>{if(jt(Vt)){const Le=Z.fromDom(Vt),Po=lt.split(" ");Y(Po,Ss=>{mt(Xt)?(Xt?si:js)(Le,Ss):ur(Le,Ss)})}})},hi=(rt,lt)=>{Aa(rt,lt,!0)},pg=(rt,lt)=>{Aa(rt,lt,!1)},Qb=(rt,lt)=>{const Xt=U(rt),Vt=lt.split(" ");return mt(Xt)&&au(Vt,Le=>v1(Xt,Le))},Z4=rt=>{Ce(rt,lt=>
4b1(Z.fromDom(lt),"display"))},Re=rt=>{Ce(rt,lt=>Ma(Z.fromDom(lt),"display","none"))},_o=rt=>{const lt=U(rt);return mt(lt)&&kn(Ms(lt,"display"),"none")},_s=rt=>(rt||"mce_")+u++,Bn=rt=>{const lt=U(rt);return mt(lt)?jt(lt.dom)?lt.dom.outerHTML:wk(lt):""},cn=(rt,lt)=>{Ce(rt,Xt=>{jt(Xt)&&(Xt.outerHTML=lt)})},gs=(rt,lt)=>{const Xt=$(lt);return Ce(rt,Vt=>{const Le=Xt==null?void 0:Xt.parentNode,Po=Xt==null?void 0:Xt.nextSibling;return Le&&(Po?Le.insertBefore(Vt,Po):Le.appendChild(Vt)),Vt})},Vi=(rt,lt,Xt)=>Ce(lt,Vt=>{var Po;const Le=lo(lt)?rt.cloneNode(!0):rt;return Xt&&Yr(Yk(Vt.childNodes),Ss=>{Le.appendChild(Ss)}),(Po=Vt.parentNode)==null||Po.replaceChild(Le,Vt),Vt}),Ka=(rt,lt)=>{if(rt.nodeName!==lt.toUpperCase()){const Xt=yt(lt);return Yr(Q(rt),Vt=>{et(Xt,Vt.nodeName,J(rt,Vt.nodeName))}),Vi(Xt,rt,!0),Xt}else return rt},ml=(rt,lt)=>{let Xt=rt;for(;Xt;){let Vt=lt;for(;Vt&&Xt!==Vt;)Vt=Vt.parentNode;if(Xt===Vt)break;Xt=Xt.parentNode}return!Xt&&rt.ownerDocument?rt.ownerDocument.documentElement:Xt},hg=(rt,lt,Xt)=>Ja(lt)?ve(E,rt,{...Xt,isContent:Le=>{const Po=Le.nodeName.toLowerCase();return!!lt[Po]}}):ve(E,rt,Xt),j4=()=>t.createRange(),G4=(rt,lt,Xt)=>{let Vt=j4(),Le,Po;if(rt&<&&rt.parentNode&<.parentNode){const Ss=rt.parentNode;return Vt.setStart(Ss,Tm(rt)),Vt.setEnd(lt.parentNode,Tm(lt)),Le=Vt.extractContents(),Vt=j4(),Vt.setStart(lt.parentNode,Tm(lt)+1),Vt.setEnd(Ss,Tm(rt)+1),Po=Vt.extractContents(),Ss.insertBefore(bp(ex,Le,E),rt),Xt?Ss.insertBefore(Xt,rt):Ss.insertBefore(lt,rt),Ss.insertBefore(bp(ex,Po,E),rt),en(rt),Xt||lt}else return},hC=(rt,lt,Xt,Vt)=>{if(lo(rt)){let Le=rt.length;const Po=[];for(;Le--;)Po[Le]=hC(rt[Le],lt,Xt,Vt);return Po}else return e.collect&&(rt===t||rt===r)&&w.push([rt,lt,Xt,Vt]),R.bind(rt,lt,Xt,Vt||ex)},am=(rt,lt,Xt)=>{if(lo(rt)){let Vt=rt.length;const Le=[];for(;Vt--;)Le[Vt]=am(rt[Vt],lt,Xt);return Le}else{if(w.length>0&&(rt===t||rt===r)){let Vt=w.length;for(;Vt--;){const[Le,Po,Ss]=w[Vt];rt===Le&&(!lt||lt===Po)&&(!Xt||Xt===Ss)&&R.unbind(Le,Po,Ss)}}return R.unbind(rt,lt,Xt)}},tx=(rt,lt,Xt)=>R.dispatch(rt,lt,Xt),jO=(rt,lt,Xt)=>R.dispatch(rt,lt,Xt),q4=rt=>{if(rt&&fa(rt)){const lt=rt.getAttribute("data-mce-contenteditable");return lt&<!=="inherit"?lt:rt.contentEditable!=="inherit"?rt.contentEditable:null}else return null},ex={doc:t,settings:e,win:r,files:i,stdMode:g,boxModel:b,styleSheetLoader:x,boundEvents:w,styles:D,schema:E,events:R,isBlock:H,root:null,clone:ft,getRoot:St,getViewPort:Gt,getRect:De,getSize:qt,getParent:Yo,getParents:Co,get:$,getNext:In,getPrev:vr,select:Yt,is:Oe,add:Fr,create:yt,createHTML:fo,createFragment:Ye,remove:en,setStyle:ht,getStyle:bt,setStyles:it,removeAllAttribs:ul,setAttrib:et,setAttribs:Ho,getAttrib:J,getPos:ge,parseStyle:qa,serializeStyle:dl,addStyle:_c,loadCSS:Wf,addClass:hi,removeClass:pg,hasClass:Qb,toggleClass:Aa,show:Z4,hide:Re,isHidden:_o,uniqueId:_s,setHTML:No,getOuterHTML:Bn,setOuterHTML:cn,decode:zt,encode:re,insertAfter:gs,replace:Vi,rename:Ka,findCommonAncestor:ml,run:Ce,getAttribs:Q,isEmpty:hg,createRng:j4,nodeIndex:Tm,split:G4,bind:hC,unbind:am,fire:jO,dispatch:tx,getContentEditable:q4,getContentEditableParent:rt=>{const lt=St();let Xt=null;for(let Vt=rt;Vt&&Vt!==lt&&(Xt=q4(Vt),Xt===null);Vt=Vt.parentNode);return Xt},isEditable:rt=>{if(mt(rt)){const lt=jt(rt)?rt:rt.parentElement;return mt(lt)&&fa(lt)&&oc(Z.fromDom(lt))}else return!1},destroy:()=>{if(w.length>0){let rt=w.length;for(;rt--;){const[lt,Xt,Vt]=w[rt];R.unbind(lt,Xt,Vt)}}Do(i,(rt,lt)=>{x.unload(lt),delete i[lt]})},isChildOf:(rt,lt)=>rt===lt||lt.contains(rt),dumpRng:rt=>"startContainer: "+rt.startContainer.nodeName+", startOffset: "+rt.startOffset+", endContainer: "+rt.endContainer.nodeName+", endOffset: "+rt.endOffset},fL=yw(D,e,Ut(ex));return ex};vo.DOM=vo(document),vo.nodeIndex=Tm;const W1=vo.DOM,ko=0,Ha=1,kd=2,Sp=3,ao=class ao{constructor(e={}){Ft(this,"settings");Ft(this,"states",{});Ft(this,"queue",[]);Ft(this,"scriptLoadedCallbacks",{});Ft(this,"queueLoadedCallbacks",[]);Ft(this,"loading",!1);this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}_setCrossOrigin(e){this.settings.crossOrigin=e}loadScript(e){return new Promise((n,r)=>{const i=W1,u=document;let g;const b=()=>{i.remove(E),g&&(g.onerror=g.onload=g=null)},x=()=>{b(),n()},w=()=>{b(),r("Failed to load script: "+e)},E=i.uniqueId();g=u.createElement("script"),g.id=E,g.type="text/javascript",g.src=Mt._addCacheSuffix(e),this.settings.referrerPolicy&&i.setAttrib(g,"referrerpolicy",this.settings.referrerPolicy);const D=this.settings.crossOrigin;if(X(D)){const R=D(e);R!==void 0&&i.setAttrib(g,"crossorigin",R)}g.onload=x,g.onerror=w,(u.head||u.body).appendChild(g)})}isDone(e){return this.states[e]===kd}markDone(e){this.states[e]=kd}add(e){const n=this;return n.queue.push(e),n.states[e]===void 0&&(n.states[e]=ko),new Promise((i,u)=>{n.scriptLoadedCallbacks[e]||(n.scriptLoadedCallbacks[e]=[]),n.scriptLoadedCallbacks[e].push({resolve:i,reject:u})})}load(e){return this.add(e)}remove(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;return this.queue=[],this.loadScripts(e)}loadScripts(e){const n=this,r=(x,w)=>{Ln(n.scriptLoadedCallbacks,w).each(E=>{Y(E,D=>D[x](w))}),delete n.scriptLoadedCallbacks[w]},i=x=>{const w=st(x,E=>E.status==="rejected");return w.length>0?Promise.reject(qo(w,({reason:E})=>lo(E)?E:[E])):Promise.resolve()},u=x=>Promise.allSettled(wt(x,w=>n.states[w]===kd?(r("resolve",w),Promise.resolve()):n.states[w]===Sp?(r("reject",w),Promise.reject(w)):(n.states[w]=Ha,n.loadScript(w).then(()=>{n.states[w]=kd,r("resolve",w);const E=n.queue;return E.length>0?(n.queue=[],u(E).then(i)):Promise.resolve()},()=>(n.states[w]=Sp,r("reject",w),Promise.reject(w)))))),g=x=>(n.loading=!0,u(x).then(w=>
4{n.loading=!1;const E=n.queueLoadedCallbacks.shift();return F.from(E).each(Pe),i(w)})),b=EC(e);return n.loading?new Promise((x,w)=>{n.queueLoadedCallbacks.push(()=>{g(b).then(x,w)})}):g(b)}getScriptAttributes(e){const n={};this.settings.referrerPolicy&&(n.referrerpolicy=this.settings.referrerPolicy);const r=this.settings.crossOrigin;if(X(r)){const i=r(e);q(i)&&(n.crossorigin=i)}return n}};Ft(ao,"ScriptLoader",new ao);let $o=ao;const Cw=(t,e)=>{const n=t.indexOf(e);return n!==-1&&t.indexOf(e,n+1)>n},ww=t=>mo(t)&&Xe(t,"raw"),Xk=t=>lo(t)&&t.length>1,Dm={},kp=Te("en"),_w=()=>Ln(Dm,kp.get()),za={getData:()=>rx(Dm,t=>({...t})),setCode:t=>{t&&kp.set(t)},getCode:()=>kp.get(),add:(t,e)=>{let n=Dm[t];n||(Dm[t]=n={});const r=wt(he(e),i=>i.toLowerCase());Do(e,(i,u)=>{const g=u.toLowerCase();g!==u&&Cw(r,g)?(Xe(e,g)||(n[g]=i),n[u]=i):n[g]=i})},translate:t=>{const e=_w().getOr({}),n=b=>X(b)?Object.prototype.toString.call(b):r(b)?"":""+b,r=b=>b===""||b===null||b===void 0,i=b=>{const x=n(b);return Xe(e,x)?n(e[x]):Ln(e,x.toLowerCase()).map(n).getOr(x)},u=b=>b.replace(/{context:\w+}$/,""),g=b=>b.replaceAll("...",ok);if(r(t))return"";if(ww(t))return g(n(t.raw));if(Xk(t)){const b=t.slice(1),x=i(t[0]).replace(/\{([0-9]+)\}/g,(w,E)=>Xe(b,E)?n(b[E]):w);return g(u(x))}return g(u(i(t)))},isRtl:()=>_w().bind(t=>Ln(t,"_dir")).exists(t=>t==="rtl"),hasCode:t=>Xe(Dm,t)},Is=()=>{const t=[],e={},n={},r=[],i=($,U)=>{const J=st(r,Q=>Q.name===$&&Q.state===U);Y(J,Q=>Q.resolve())},u=$=>Xe(e,$),g=$=>Xe(n,$),b=$=>{if(n[$])return n[$].instance},x=($,U)=>{const J=za.getCode(),Q=","+(U||"")+",";!J||U&&Q.indexOf(","+J+",")===-1||$o.ScriptLoader.add(e[$]+"/langs/"+J+".js")},w=($,U)=>{Is.languageLoad!==!1&&(u($)?x($,U):H($,"loaded").then(()=>x($,U)))},E=($,U)=>(t.push(U),n[$]={instance:U},i($,"added"),U),D=$=>{delete e[$],delete n[$]},R=($,U)=>q(U)?q($)?{prefix:"",resource:U,suffix:""}:{prefix:$.prefix,resource:U,suffix:$.suffix}:U,N=($,U)=>{if(e[$])return Promise.resolve();let J=q(U)?U:U.prefix+U.resource+U.suffix;J.indexOf("/")!==0&&J.indexOf("://")===-1&&(J=Is.baseURL+"/"+J),e[$]=J.substring(0,J.lastIndexOf("/"));const Q=()=>(i($,"loaded"),Promise.resolve());return n[$]?Q():$o.ScriptLoader.add(J).then(Q)},H=($,U="added")=>U==="added"&&g($)||U==="loaded"&&u($)?Promise.resolve():new Promise(J=>{r.push({name:$,state:U,resolve:J})});return{items:t,urls:e,lookup:n,get:b,requireLangPack:w,add:E,remove:D,createUrl:R,load:N,waitFor:H}};Is.languageLoad=!0,Is.baseURL="",Is.PluginManager=Is(),Is.ThemeManager=Is(),Is.ModelManager=Is();const Ed=Ut("mce-annotation"),ic=Ut("data-mce-annotation"),Tl=Ut("data-mce-annotation-uid"),Kg=Ut("data-mce-annotation-active"),Yg=Ut("data-mce-annotation-classes"),Z1=Ut("data-mce-annotation-attrs"),oE=t=>e=>ho(e,t),j1=(t,e)=>{const n=t.selection.getRng(),r=Z.fromDom(n.startContainer),i=Z.fromDom(t.getBody()),u=e.fold(()=>"."+Ed(),x=>`[${ic()}="${x}"]`),g=Xi(r,n.startOffset).getOr(r);return _r(g,u,oE(i)).bind(x=>Qi(x,`${Tl()}`).bind(w=>Qi(x,`${ic()}`).map(E=>{const D=Ep(t,w);return{uid:w,name:E,elements:D}})))},p2=t=>Jn(t)&&v1(t,Ed()),h2=(t,e)=>Hn(t,"data-mce-bogus")||JC(t,'[data-mce-bogus="all"]',oE(e)),Ep=(t,e)=>{const n=Z.fromDom(t.getBody()),r=dr(n,`[${Tl()}="${e}"]`);return st(r,i=>!h2(i,n))},Du=(t,e)=>{const n=Z.fromDom(t.getBody()),r=dr(n,`[${ic()}="${e}"]`),i={};return Y(r,u=>{if(!h2(u,n)){const g=Dn(u,Tl()),b=Ln(i,g).getOr([]);i[g]=b.concat([u])}}),i},G1=(t,e)=>{const n=Te({}),r=()=>({listeners:[],previous:Gi()}),i=(D,R)=>{u(D,N=>(R(N),N))},u=(D,R)=>{const N=n.get(),H=Ln(N,D).getOrThunk(r),$=R(H);N[D]=$,n.set(N)},g=(D,R,N)=>{i(D,H=>{Y(H.listeners,$=>$(!0,D,{uid:R,nodes:wt(N,U=>U.dom)}))})},b=D=>{i(D,R=>{Y(R.listeners,N=>N(!1,D))})},x=(D,R)=>{Y(Ep(t,D),N=>{R?qn(N,Kg(),"true"):As(N,Kg())})},w=Cg(()=>{const D=ad(e.getNames());Y(D,R=>{u(R,N=>{const H=N.previous.get();return j1(t,F.some(R)).fold(()=>{H.each($=>{b(R),N.previous.clear(),x($,!1)})},({uid:$,name:U,elements:J})=>{kn(H,$)||(H.each(Q=>x(Q,!1)),g(U,$,J),N.previous.set($),x($,!0))}),{previous:N.previous,listeners:N.listeners}})})},30);return t.on("remove",()=>{w.cancel()}),t.on("NodeChange",()=>{w.throttle()}),{addListener:(D,R)=>{u(D,N=>({previous:N.previous,listeners:N.listeners.concat([R])}))}}},Ap=(t,e)=>{const n=ic(),r=u=>F.from(u.attr(n)).bind(e.lookup),i=u=>{var E;u.attr(Tl(),null),u.attr(ic(),null),u.attr(Kg(),null);const g=F.from(u.attr(Z1())).map(D=>D.split(",")).getOr([]),b=F.from(u.attr(Yg())).map(D=>D.split(",")).getOr([]);Y(g,D=>u.attr(D,null));const x=((E=u.attr("class"))==null?void 0:E.split(" "))??[],w=hs(x,[Ed()].concat(b));u.attr("class",w.length>0?w.join(" "):null),u.attr(Yg(),null),u.attr(Z1(),null)};t.serializer.addTempAttr(Kg()),t.serializer.addAttributeFilter(n,u=>{for(const g of u)r(g).each(b=>{b.persistent===!1&&(g.name==="span"?g.unwrap():i(g))})})},q1=()=>{const t={};return{register:(i,u)=>{t[i]={name:i,settings:u}},lookup:i=>Ln(t,i).map(u=>u.settings),getNames:()=>he(t)}},Ew=(t,e,n=pt)=>{const r=new ts(t,e),i=u=>{let g;do g=r[u]();while(g&&!Nt(g)&&!n(g));return F.from(g).filter(Nt)};return{current:()=>F.from(r.current()).filter(Nt),next:()=>i("next"),prev:()=>i("prev"),prev2:()=>i("prev2")}},Dl=(t,e)=>{const n=e||(g=>t.isBlock(g)||Wn(g)||On(g)),r=(g,b,x,w)=>{if(Nt(g)){const E=w(g,b,g.data);if(E!==-1)return F.some({container:g,offset:E})}return x().bind(E=>r(E.container,E.offset,x,w))};return{backwards:(g,b,x,w)=>{const E=Ew(g,w??t.getRoot(),n);return r(g,b,()=>E.prev().map(D=>({container:D,offset:D.length})),x).getOrNull()},forwards:(g,b,x,w)=>{const E=Ew(g,w??t.getRoot(),n);return r(g,b,()=>E.next().map(D=>({container:D,offset:0})),x).getOrNull()}}},K1=["td","th"],Aw=["thead","tbody","tfoot"],nE=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],sE=["li","dd","dt"],Tw=["ul","ol","dl"],b2=["pre","script","textarea","style"],Ol=t=>{let e;return n=>(e=e||Zf(t,It),Xe(e,oo(n)))},Dw=t=>oo(t)==="table",cc=t=>Jn(t)&&oo(t)==="br",Lr=Ol(nE),Ni=Ol(Tw),Xr=Ol(sE),Y1=Ol(Aw),Rm=Ol(K1),X1=Ol(b2),x2=t=>{const e=[];let n=t.dom;for(;n;)e.push(Z.fromDom(n)),n=n.lastChild;return e},rE=t=>{const e=dr(t,"br"),n=st(x2(t).slice(-1),cc);e.length===n.length&&Y(n,xn)},Ad=()=>{const t=Z.fromTag("br");return qn(t,"data-mce-bogus","1"),t},Td=t=>{tc(t),Ro(t,Ad())},v2=(t,e)=>{Es(t).each(n=>{ki(n).each(r=>{e.isBlock(oo(t))&&cc(n)&&e.isBlock(oo(r))&&xn(n)})})},$s=Kf,Tp=mu,ya=fl,J1=t=>t.insertContent($s,{preserve_zwsp:!0}),rn=jt,Vc=Nt,Ou=t=>(Vc(t)&&(t=t.parentNode),rn(t)&&t.hasAttribute("data-mce-caret")),Uc=t=>Vc(t)&&Tp(t.data),ci=t=>Ou(t)||Uc(t),Q1=t=>t.firstChild!==t.lastChild||!Wn(t.firstChild),Ow=(t,e)=>{const r=(t.ownerDocument??document).createTextNode($s),i=t.parentNode;if(e){const u=t.previousSibling;if(Vc(u)){if(ci(u))return u;if(Dd(u))return u.splitText(u.data.length-1)}i==null||i.insertBefore(r,t)}
4else{const u=t.nextSibling;if(Vc(u)){if(ci(u))return u;if(Va(u))return u.splitText(1),u}t.nextSibling?i==null||i.insertBefore(r,t.nextSibling):i==null||i.appendChild(r)}return r},Ru=t=>{const e=t.container();return Nt(e)?e.data.charAt(t.offset())===$s||t.isAtStart()&&Uc(e.previousSibling):!1},Bm=t=>{const e=t.container();return Nt(e)?e.data.charAt(t.offset()-1)===$s||t.isAtEnd()&&Uc(e.nextSibling):!1},y2=(t,e,n)=>{const i=(e.ownerDocument??document).createElement(t);i.setAttribute("data-mce-caret",n?"before":"after"),i.setAttribute("data-mce-bogus","all"),i.appendChild(Ad().dom);const u=e.parentNode;return n?u==null||u.insertBefore(i,e):e.nextSibling?u==null||u.insertBefore(i,e.nextSibling):u==null||u.appendChild(i),i},Va=t=>Vc(t)&&t.data[0]===$s,Dd=t=>Vc(t)&&t.data[t.data.length-1]===$s,gr=t=>{var r;const e=t.getElementsByTagName("br"),n=e[e.length-1];yd(n)&&((r=n.parentNode)==null||r.removeChild(n))},lc=t=>t&&t.hasAttribute("data-mce-caret")?(gr(t),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("data-mce-style"),t.removeAttribute("_moz_abspos"),t):null,t0=t=>Ou(t.startContainer),Fm=Math.round,Od=t=>t?{left:Fm(t.left),top:Fm(t.top),bottom:Fm(t.bottom),right:Fm(t.right),width:Fm(t.width),height:Fm(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},Dp=(t,e)=>(t=Od(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t),C2=(t,e)=>t.left===e.left&&t.top===e.top&&t.bottom===e.bottom&&t.right===e.right,e0=(t,e,n)=>t>=0&&t<=Math.min(e.height,n.height)/2,Mm=(t,e)=>{const n=Math.min(e.height/2,t.height/2);return t.bottom-n<e.top?!0:t.top>e.bottom?!1:e0(e.top-t.bottom,t,e)},Rd=(t,e)=>t.top>e.bottom?!0:t.bottom<e.top?!1:e0(e.bottom-t.top,t,e),w2=(t,e,n)=>e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,Op=t=>We(t,(e,n)=>e.fold(()=>F.some(n),r=>{const i=Math.min(n.left,r.left),u=Math.min(n.top,r.top),g=Math.max(n.right,r.right),b=Math.max(n.bottom,r.bottom);return F.some({top:u,right:g,bottom:b,left:i,width:g-i,height:b-u})}),F.none()),_2=(t,e,n)=>{const r=Math.max(Math.min(e,t.left+t.width),t.left),i=Math.max(Math.min(n,t.top+t.height),t.top);return Math.sqrt((e-r)*(e-r)+(n-i)*(n-i))},Rw=(t,e)=>Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top)),Ls=t=>{const e=t.startContainer,n=t.startOffset;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},Bd=(t,e)=>{if(jt(t)&&t.hasChildNodes()){const n=t.childNodes,r=Qh(e,0,n.length-1);return n[r]}else return t},Fd=(t,e)=>{if(!(e<0&&jt(t)&&t.hasChildNodes()))return Bd(t,e)},Bw=new RegExp("[Ì-ͯÒ-ÒÒ-ÒÖ-Ö½Ö¿×-××-×
ר-ØÙ-ÙÙ°Û-ÛÛ-Û¤Û§-Û¨Ûª-ÛÜܰ-ÝÞ¦-Þ°ß«-ß³à -à à -à £à ¥-à §à ©-à à¡-à¡à££-à¤à¤ºà¤¼à¥-à¥à¥à¥-à¥à¥¢-ॣà¦à¦¼à¦¾à§-à§à§à§à§¢-à§£à¨-à¨à¨¼à©-à©à©-à©à©-à©à©à©°-ੱੵàª-àªàª¼à«-à«
à«-à«à«à«¢-à«£à¬à¬¼à¬¾à¬¿à-ààààà¢-à£à®à®¾à¯à¯à¯à°à°¾-à±à±-à±à±-à±à±-à±à±¢-à±£à²à²¼à²¿à³à³à³-à³à³-à³à³¢-à³£à´à´¾àµ-àµàµàµàµ¢-ൣà·à·à·-à·à·à·à¸±à¸´-ฺà¹-à¹àº±àº´-ູົ-ຼà»-à»à¼-à¼à¼µà¼·à¼¹à½±-ཾà¾-à¾à¾-à¾à¾-à¾à¾-ྼà¿á-á°á²-á·á¹-áºá½-á¾á-áá-á á±-á´áá
-áááá-áá-áá²-á´á-áá²-á³á´-áµá·-á½áá-ááá -á ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻á¨-á¨á¨á©á©-á©á© ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾á¬-á¬á¬´á¬¶-ᬺᬼáá«-á³á®-á®á®¢-ᮥᮨ-ᮩ᮫-á®á¯¦á¯¨-ᯩá¯á¯¯-ᯱᰬ-ᰳᰶ-á°·á³-á³á³-á³ á³¢-᳨á³á³´á³¸-á³¹á·-᷵᷼-á·¿â-ââ-ââ-â â¡â¢-â¤â¥-â°â³¯-⵿⳱ⷠ-â·¿ãª-ãã®-ã¯ã-ãê¯ê°-ê²ê´-ê½ê-êê°-ê±ê ê ê ê ¥-ê ¦ê£ê£ -꣱ꤦ-ê¤ê¥-ê¥ê¦-ê¦ê¦³ê¦¶-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶê©ê©ê©¼êª°êª²-ꪴꪷ-ꪸꪾ-꪿ê«ê«¬-ê«ê«¶ê¯¥ê¯¨ê¯ï¬ï¸-ï¸ï¸ -︯ï¾-ï¾]"),o0=t=>q(t)&&t.charCodeAt(0)>=768&&Bw.test(t),S2=(...t)=>e=>{for(let n=0;n<t.length;n++)if(t[n](e))return!0;return!1},Rp=(...t)=>e=>{for(let n=0;n<t.length;n++)if(!t[n](e))return!1;return!0},n0=Pa,Fw=On,aE=Wn,Bp=Nt,Os=Di(["script","style","textarea"]),vs=Di(["img","input","textarea","hr","iframe","video","audio","object","embed"]),fr=Di(["table"]),Qs=ci,Mn=t=>Qs(t)?!1:Bp(t)?!Os(t.parentNode):vs(t)||aE(t)||fr(t)||Xg(t),ys=t=>jt(t)&&t.getAttribute("unselectable")==="true",Xg=t=>!ys(t)&&Fw(t),k2=(t,e)=>{for(let n=t.parentNode;n&&n!==e;n=n.parentNode){if(Xg(n))return!1;if(n0(n))return!0}return!0},E2=t=>Xg(t)?!We(Wr(t.getElementsByTagName("*")),(e,n)=>e||n0(n),!1):!1,Mw=t=>vs(t)||E2(t),s0=(t,e)=>Mn(t)&&k2(t,e),A2=jt,T2=Mn,r0=D1("display","block table"),D2=D1("float","left right"),Jg=Rp(A2,T2,Go(D2)),Nw=Go(D1("white-space","pre pre-line pre-wrap")),Fp=Nt,Wc=Wn,a0=vo.nodeIndex,Mp=Fd,Qg=t=>t?t.createRange():vo.DOM.createRng(),Nm=t=>q(t)&&/[\r\n\t ]/.test(t),Np=t=>!!t.setStart&&!!t.setEnd,i0=t=>{const e=t.startContainer,n=t.startOffset;if(Nm(t.toString())&&Nw(e.parentNode)&&Nt(e)){const r=e.data;if(Nm(r[n-1])||Nm(r[n+1]))return!0}return!1},Pp=t=>{const e=t.ownerDocument,n=Qg(e),r=e.createTextNode(Bs),i=t.parentNode;i.insertBefore(r,t),n.setStart(r,0),n.setEnd(r,1);const u=Od(n.getBoundingClientRect());return i.removeChild(r),u},c0=t=>{const e=t.startContainer,n=t.endContainer,r=t.startOffset,i=t.endOffset;if(e===n&&Nt(n)&&r===0&&i===1){const u=t.cloneRange();return u.setEndAfter(n),Jr(u)}else return null},Pm=t=>t.left===0&&t.right===0&&t.top===0&&t.bottom===0,Jr=t=>{let e;const n=t.getClientRects();return n.length>0?e=Od(n[0]):e=Od(t.getBoundingClientRect()),!Np(t)&&Wc(t)&&Pm(e)?Pp(t):Pm(e)&&Np(t)?c0(t)??e:e},Er=(t,e)=>{const n=Dp(t,e);return n.width=1,n.right=n.left+1,n},tf=t=>{const e=[],n=g=>{g.height!==0&&(e.length>0&&C2(g,e[e.length-1])||e.push(g))},r=(g,b)=>{const x=Qg(g.ownerDocument);if(b<g.data.length){if(o0(g.data[b]))return;if(o0(g.data[b-1])&&(x.setStart(g,b),x.setEnd(g,b+1),!i0(x))){n(Er(Jr(x),!1));return}}b>0&&(x.setStart(g,b-1),x.setEnd(g,b),i0(x)||n(Er(Jr(x),!1))),b<g.data.length&&(x.setStart(g,b),x.setEnd(g,b+1),i0(x)||n(Er(Jr(x),!0)))},i=t.container(),u=t.offset();if(Fp(i))return r(i,u),e;if(A2(i))if(t.isAtEnd()){const g=Mp(i,u);Fp(g)&&r(g,g.data.length),Jg(g)&&!Wc(g)&&n(Er(Jr(g),!1))}else{const g=Mp(i,u);if(Fp(g)&&r(g,0),Jg(g)&&t.isAtEnd())return n(Er(Jr(g),!1)),e;const b=Mp(t.container(),t.offset()-1);Jg(b)&&!Wc(b)&&(r0(b)||r0(g)||!Jg(g))&&n(Er(Jr(b),!1)),Jg(g)&&n(Er(Jr(g),!0))}return e},gt=(t,e,n)=>{const r=()=>(Fp(t),e===0),i=()=>Fp(t)?e>=t.data.length:e>=t.childNodes.length,u=()=>{const E=Qg(t.ownerDocument);return E.setStart(t,e),E.setEnd(t,e),E},g=()=>(n||(n=tf(gt(t,e))),n),b=()=>g().length>0,x=E=>E&&t===E.container()&&e===E.offset(),w=E=>Mp(t,E?e-1:e);return{container:Ut(t),offset:Ut(e),toRange:u,getClientRects:g,isVisible:b,isAtStart:r,isAtEnd:i,isEqual:x,getNode:w}};gt.fromRangeStart=t=>gt(t.startContainer,t.startOffset),gt.fromRangeEnd=t=>gt(t.endContainer,t.endOffset),gt.after=t=>gt(t.parentNode,a0(t)+1),gt.before=t=>gt(t.parentNode,a0(t)),gt.isAbove=(t,e)=>Us(Vs(e.getClientRects()),Ur(t.getClientRects()),Mm).getOr(!1),gt.isBelow=(t,e)=>Us(Ur(e.getClientRects()),Vs(t.getClientRects()),Rd).getOr(!1),gt.isAtStart=t=>t?t.isAtStart():!1,gt.isAtEnd=t=>t?t.isAtEnd():!1,gt.isTextPosition=t=>t?Nt(t.container()):!1,gt.isElementPosition=t=>!gt.isTextPosition(t);const Ip=(t,e)=>{Nt(e)&&e.data.length===0&&t.remove(e)},iE=(t,e,n)=>
4{e.insertNode(n),Ip(t,n.previousSibling),Ip(t,n.nextSibling)},Qr=(t,e,n)=>{const r=F.from(n.firstChild),i=F.from(n.lastChild);e.insertNode(n),r.each(u=>Ip(t,u.previousSibling)),i.each(u=>Ip(t,u.nextSibling))},ef=(t,e,n)=>{Mg(n)?Qr(t,e,n):iE(t,e,n)},Zc=Nt,O2=yd,R2=vo.nodeIndex,Im=t=>{const e=t.parentNode;return O2(e)?Im(e):e},$p=t=>t?n1(t.childNodes,(e,n)=>(O2(n)&&n.nodeName!=="BR"?e=e.concat($p(n)):e.push(n),e),[]):[],Bu=(t,e)=>{let n=t;for(;(n=n.previousSibling)&&Zc(n);)e+=n.data.length;return e},l0=t=>e=>t===e,cE=t=>{let e,n;e=$p(Im(t)),n=mx(e,l0(t),t),e=e.slice(0,n+1);const r=n1(e,(i,u,g)=>(Zc(u)&&Zc(e[g-1])&&i++,i),0);return e=Yf(e,Di([t.nodeName])),n=mx(e,l0(t),t),n-r},Ar=t=>(Zc(t)?"text()":t.nodeName.toLowerCase())+"["+cE(t)+"]",jc=(t,e,n)=>{const r=[];for(let i=e.parentNode;i&&i!==t;i=i.parentNode)r.push(i);return r},Ua=(t,e)=>{let n=[],r=e.container(),i=e.offset(),u;if(Zc(r))u=Bu(r,i);else{const b=r.childNodes;i>=b.length?(u="after",i=b.length-1):u="before",r=b[i]}n.push(Ar(r));let g=jc(t,r);return g=Yf(g,Go(yd)),n=n.concat(mm(g,b=>Ar(b))),n.reverse().join("/")+","+u},lE=(t,e,n)=>{let r=$p(t);return r=Yf(r,(i,u)=>!Zc(i)||!Zc(r[u-1])),r=Yf(r,Di([e])),r[n]},of=(t,e)=>{let n=t,r=0;for(;Zc(n);){const i=n.data.length;if(e>=r&&e<=r+i){t=n,e=e-r;break}if(!Zc(n.nextSibling)){t=n,e=i;break}r+=i,n=n.nextSibling}return Zc(t)&&e>t.data.length&&(e=t.data.length),gt(t,e)},Pw=(t,e)=>{if(!e)return null;const n=e.split(","),r=n[0].split("/"),i=n.length>1?n[1]:"before",u=n1(r,(g,b)=>{const x=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(b);return x?(x[1]==="text()"&&(x[1]="#text"),lE(g,x[1],parseInt(x[2],10))):null},t);if(!u)return null;if(!Zc(u)&&u.parentNode){let g;return i==="after"?g=R2(u)+1:g=R2(u),gt(u.parentNode,g)}return of(u,parseInt(i,10))},u0=On,uE=(t,e,n)=>{let r=t(e.data.slice(0,n)).length;for(let i=e.previousSibling;i&&Nt(i);i=i.previousSibling)r+=t(i.data).length;return r},Iw=(t,e,n,r,i)=>{const u=i?r.startContainer:r.endContainer;let g=i?r.startOffset:r.endOffset;const b=[],x=t.getRoot();if(Nt(u))b.push(n?uE(e,u,g):g);else{let w=0;const E=u.childNodes;g>=E.length&&E.length&&(w=1,g=Math.max(0,E.length-1)),b.push(t.nodeIndex(E[g],n)+w)}for(let w=u;w&&w!==x;w=w.parentNode)b.push(t.nodeIndex(w,n));return b},no=(t,e,n,r)=>{const i=e.dom,u=Iw(i,t,n,r,!0),g=e.isForward(),b=t0(r)?{isFakeCaret:!0}:{};if(e.isCollapsed())return{start:u,forward:g,...b};{const x=Iw(i,t,n,r,!1);return{start:u,end:x,forward:g,...b}}},be=(t,e,n)=>{let r=0;return Mt.each(t.select(e),i=>{if(i.getAttribute("data-mce-bogus")!=="all"){if(i===n)return!1;r++;return}}),r},nf=(t,e)=>{let n=e?t.startContainer:t.endContainer,r=e?t.startOffset:t.endOffset;if(jt(n)&&n.nodeName==="TR"){const i=n.childNodes;n=i[Math.min(e?r:r-1,i.length-1)],n&&(r=e?0:n.childNodes.length,e?t.setStart(n,r):t.setEnd(n,r))}},d0=t=>(nf(t,!0),nf(t,!1),t),m0=(t,e)=>{if(jt(t)&&(t=Bd(t,e),u0(t)))return t;if(ci(t)){Nt(t)&&Ou(t)&&(t=t.parentNode);let n=t.previousSibling;if(u0(n)||(n=t.nextSibling,u0(n)))return n}},dE=t=>m0(t.startContainer,t.startOffset)||m0(t.endContainer,t.endOffset),B2=(t,e,n)=>{const r=n.getNode(),i=n.getRng();if(r.nodeName==="IMG"||u0(r)){const g=r.nodeName;return{name:g,index:be(n.dom,g,r)}}const u=dE(i);if(u){const g=u.tagName;return{name:g,index:be(n.dom,g,u)}}return no(t,n,e,i)},Rn=t=>{const e=t.getRng();return{start:Ua(t.dom.getRoot(),gt.fromRangeStart(e)),end:Ua(t.dom.getRoot(),gt.fromRangeEnd(e)),forward:t.isForward()}},g0=t=>({rng:t.getRng(),forward:t.isForward()}),f0=(t,e,n)=>{const r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,""):t.create("span",r)},F2=(t,e)=>{const n=t.dom;let r=t.getRng();const i=n.uniqueId(),u=t.isCollapsed(),g=t.getNode(),b=g.nodeName,x=t.isForward();if(b==="IMG")return{name:b,index:be(n,b,g)};const w=d0(r.cloneRange());if(!u){w.collapse(!1);const D=f0(n,i+"_end",e);ef(n,w,D)}r=d0(r),r.collapse(!0);const E=f0(n,i+"_start",e);return ef(n,r,E),t.moveToBookmark({id:i,keep:!0,forward:x}),{id:i,forward:x}},vt=(t,e,n=!1)=>e===2?B2(ya,n,t):e===3?Rn(t):e?g0(t):F2(t,!1),sf=Et(B2,Sn,!0),$m=t=>t===1,Rl=t=>t===-1;var uc;(function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"})(uc||(uc={}));const Bl=(t,e,n)=>t.stype===uc.Error?e(t.serror):n(t.svalue),rf=t=>{const e=[],n=[];return Y(t,r=>{Bl(r,i=>n.push(i),i=>e.push(i))}),{values:e,errors:n}},Lm=(t,e)=>t.stype===uc.Error?{stype:uc.Error,serror:e(t.serror)}:t,mE=(t,e)=>t.stype===uc.Value?{stype:uc.Value,svalue:e(t.svalue)}:t,af=(t,e)=>t.stype===uc.Value?e(t.svalue):t,vn=(t,e)=>t.stype===uc.Error?e(t.serror):t,dc=t=>({stype:uc.Value,svalue:t}),M2=t=>({stype:uc.Error,serror:t}),Tr={fromResult:t=>t.fold(M2,dc),toResult:t=>Bl(t,ua.error,ua.value),svalue:dc,partition:rf,serror:M2,bind:af,bindError:vn,map:mE,mapError:Lm,fold:Bl},$w=t=>mo(t)&&he(t).length>100?" removed due to size":JSON.stringify(t,null,2),N2=t=>{const e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:Ut("... (only showing first ten failures)")}]):t;return wt(e,n=>"Failed path: ("+n.path.join(" > ")+`) 5`+n.getErrorInfo())},Lw=(t,e)=>Tr.serror([{path:t,getErrorInfo:e}]),gE=(t,e,n)=>Lw(t,()=>'Could not find valid *required* value for "'+e+'" in '+$w(n)),fE=(t,e)=>Lw(t,Ut(e)),P2=t=>{const e=(r,i)=>Tr.bindError(t(i),u=>fE(r,u)),n=Ut("val");return{extract:e,toString:n}},Hw=P2(Tr.svalue),Pt=Ut(Hw),I2=(t,e)=>P2(n=>{const r=typeof n;return t(n)?Tr.svalue(n):Tr.serror(`Expected type: ${e} but got: ${r}`)}),tr=I2(sr,"number"),$2=I2(q,"string"),L2=I2(X,"function"),H2=()=>({tag:"required",process:{}}),pE=t=>({tag:"defaultedThunk",process:t}),Me=t=>pE(Ut(t)),zw=()=>({tag:"option",process:{}}),Vw=(t,e,n,r)=>({tag:"field",key:t,newKey:e,presence:n,prop:r}),hE=(t,e,n)=>{switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);
5case"custom":return n(t.newKey,t.instantiator)}},bE=(t,e)=>Tr.svalue(t1(e,cx.apply(void 0,t))),Uw=t=>k(Tr.serror,bi)(t),Ww={consolidateObj:(t,e)=>{const n=Tr.partition(t);return n.errors.length>0?Uw(n.errors):bE(n.values,e)},consolidateArr:t=>{const e=Tr.partition(t);return e.errors.length>0?Uw(e.errors):Tr.svalue(e.values)}},xE=(t,e,n,r)=>Ln(e,n).fold(()=>gE(t,n,e),r),Ie=(t,e,n,r)=>{const i=Ln(t,e).getOrThunk(()=>n(t));return r(i)},z2=(t,e,n)=>n(Ln(t,e)),Fu=(t,e,n,r)=>{const i=Ln(t,e).map(u=>u===!0?n(t):u);return r(i)},Pi=(t,e,n,r,i)=>{const u=b=>i.extract(e.concat([r]),b),g=b=>b.fold(()=>Tr.svalue(F.none()),x=>{const w=i.extract(e.concat([r]),x);return Tr.map(w,F.some)});switch(t.tag){case"required":return xE(e,n,r,u);case"defaultedThunk":return Ie(n,r,t.process,u);case"option":return z2(n,r,g);case"defaultedOptionThunk":return Fu(n,r,t.process,g);case"mergeWithThunk":return Ie(n,r,Ut({}),b=>{const x=t1(t.process(n),b);return u(x)})}},p0=(t,e,n)=>{const r={},i=[];for(const u of n)hE(u,(g,b,x,w)=>{const E=Pi(x,t,e,g,w);Tr.fold(E,D=>{i.push(...D)},D=>{r[b]=D})},(g,b)=>{r[g]=b(e)});return i.length>0?Tr.serror(i):Tr.svalue(r)},ta=t=>({extract:(r,i)=>p0(r,i,t),toString:()=>`obj{ 6`+wt(t,i=>hE(i,(u,g,b,x)=>u+" -> "+x.toString(),(u,g)=>"state("+u+")")).join(` 7`)+"}"}),cf=t=>({extract:(r,i)=>{const u=wt(i,(g,b)=>t.extract(r.concat(["["+b+"]"]),g));return Ww.consolidateArr(u)},toString:()=>"array("+t.toString()+")"}),Lp=k(cf,ta),h0=t=>P2(e=>t(e).fold(Tr.serror,Tr.svalue)),lf=(t,e,n)=>{const r=e.extract([t],n);return Tr.mapError(r,i=>({input:n,errors:i}))},uf=(t,e,n)=>Tr.toResult(lf(t,e,n)),Fl=t=>`Errors: 8`+N2(t.errors).join(` 9`)+` 10 11Input object: `+$w(t.input),Cs=Vw,Mu=t=>Cs(t,t,H2(),Pt()),Zw=(t,e)=>Cs(t,t,H2(),e),V2=t=>Zw(t,$2),jw=t=>Zw(t,L2),vE=(t,e)=>Cs(t,t,H2(),cf(e)),yo=t=>Cs(t,t,zw(),Pt()),mc=(t,e)=>Cs(t,t,zw(),e),Nd=t=>mc(t,$2),iR=t=>mc(t,L2),df=(t,e)=>Cs(t,t,Me(e),Pt()),wo=(t,e,n)=>Cs(t,t,Me(e),n),yE=(t,e)=>wo(t,e,tr),CE=(t,e,n)=>wo(t,e,cf(n)),cR=t=>t.type==="inline-command"||t.type==="inline-format",lR=t=>t.type==="block-command"||t.type==="block-format",Hp=(t,e)=>(t.type==="block-command"||t.type==="block-format")&&t.trigger===e,wE=t=>{const e=r=>ua.error({message:r,pattern:t}),n=(r,i,u)=>{if(t.format!==void 0){let g;if(lo(t.format)){if(!au(t.format,q))return e(r+" pattern has non-string items in the `format` array");g=t.format}else if(q(t.format))g=[t.format];else return e(r+" pattern has non-string `format` parameter");return ua.value(i(g))}else return t.cmd!==void 0?q(t.cmd)?ua.value(u(t.cmd,t.value)):e(r+" pattern has non-string `cmd` parameter"):e(r+" pattern is missing both `format` and `cmd` parameters")};if(!mo(t))return e("Raw pattern is not an object");if(!q(t.start))return e("Raw pattern is missing `start` parameter");if(t.end!==void 0){if(!q(t.end))return e("Inline pattern has non-string `end` parameter");if(t.start.length===0&&t.end.length===0)return e("Inline pattern has empty `start` and `end` parameters");let r=t.start,i=t.end;return i.length===0&&(i=r,r=""),n("Inline",u=>({type:"inline-format",start:r,end:i,format:u}),(u,g)=>({type:"inline-command",start:r,end:i,cmd:u,value:g}))}else{if(t.replacement!==void 0)return q(t.replacement)?t.start.length===0?e("Replacement pattern has empty `start` parameter"):ua.value({type:"inline-command",start:"",end:t.start,cmd:"mceInsertContent",value:t.replacement}):e("Replacement pattern has non-string `replacement` parameter");{const r=t.trigger??"space";return t.start.length===0?e("Block pattern has empty `start` parameter"):n("Block",i=>({type:"block-format",start:t.start,format:i[0],trigger:r}),(i,u)=>({type:"block-command",start:t.start,cmd:i,value:u,trigger:r}))}}},_E=t=>st(t,lR),zp=t=>st(t,cR),SE=(t,e)=>({inlinePatterns:zp(t),blockPatterns:_E(t),dynamicPatternsLookup:e}),Vp=(t,e)=>({...t,blockPatterns:st(t.blockPatterns,n=>Hp(n,e))}),Gw=t=>{const e=yi(wt(t,wE));return Y(e.errors,n=>console.error(n.message,n.pattern)),e.values},kE=t=>e=>{const n=t(e);return Gw(n)},b0=(t,e)=>t.dispatch("PreProcess",e),U2=(t,e)=>t.dispatch("PostProcess",e),W2=t=>{t.dispatch("remove")},qw=t=>{t.dispatch("detach")},EE=(t,e)=>{t.dispatch("SwitchMode",{mode:e})},Kw=(t,e,n,r,i)=>{t.dispatch("ObjectResizeStart",{target:e,width:n,height:r,origin:i})},Z2=(t,e,n,r,i)=>{t.dispatch("ObjectResized",{target:e,width:n,height:r,origin:i})},Yw=t=>{t.dispatch("PreInit")},Bo=t=>{t.dispatch("PostRender")},Xw=t=>{t.dispatch("Init")},j2=(t,e)=>{t.dispatch("PlaceholderToggle",{state:e})},x0=(t,e,n)=>{t.dispatch(e,n)},Nu=(t,e,n,r)=>{t.dispatch("FormatApply",{format:e,node:n,vars:r})},G2=(t,e,n,r)=>{t.dispatch("FormatRemove",{format:e,node:n,vars:r})},AE=(t,e)=>t.dispatch("BeforeSetContent",e),Jw=(t,e)=>t.dispatch("SetContent",e),mf=(t,e)=>t.dispatch("BeforeGetContent",e),Qw=(t,e)=>t.dispatch("GetContent",e),Up=(t,e)=>{t.dispatch("AutocompleterStart",e)},Wp=(t,e)=>{t.dispatch("AutocompleterUpdate",e)},q2=(t,e)=>{t.dispatch("AutocompleterUpdateActiveRange",e)},Pd=t=>{t.dispatch("AutocompleterEnd")},t_=(t,e,n)=>t.dispatch("PastePreProcess",{content:e,internal:n}),e_=(t,e,n)=>t.dispatch("PastePostProcess",{node:e,internal:n}),o_=(t,e)=>t.dispatch("PastePlainTextToggle",{state:e}),n_=(t,e)=>t.dispatch("EditableRootStateChange",{state:e}),uR=(t,e)=>t.dispatch("DisabledStateChange",{state:e}),s_=t=>t.dispatch("CloseActiveTooltips"),v0=hl().deviceType,y0=v0.isTouch(),Zp=vo.DOM,C0=t=>{const e=t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(",");return We(e,(n,r)=>{const i=r.split("="),u=i[0],g=i.length>1?i[1]:u;return n[ns(u)]=ns(g),n},{})},w0=t=>Oa(t,RegExp),se=t=>e=>e.options.get(t),Id=t=>q(t)||mo(t),Ml=(t,e="")=>n=>{const r=q(n);if(r)if(n.indexOf("=")!==-1){const i=C0(n);return{value:Ln(i,t.id).getOr(e),valid:r}}else return{value:n,valid:r};else return{valid:!1,message:"Must be a string."}},jp=t=>{const e=t.options.register;e("id",{processor:"string",default:t.id}),e("selector",{processor:"string"}),e("target",{processor:"object"}),e("suffix",{processor:"string"}),e("cache_suffix",{processor:"string"}),e("base_url",{processor:"string"}),e("referrer_policy",{processor:"string",default:""}),e("crossorigin",{processor:"function",default:Ut(void 0)}),e("language_load",{processor:"boolean",default:!0}),e("inline",{processor:"boolean",default:!1}),e("iframe_attrs",{processor:"object",default:{}}),e("doctype",{processor:"string",default:"<!DOCTYPE html>"}),e("document_base_url",{processor:"string",default:t.editorManager.documentBaseURL}),e("body_id",{processor:Ml(t,"tinymce"),default:"tinymce"}),e("body_class",{processor:Ml(t),default:""}),e("content_security_policy",{processor:"string",default:""}),e("br_in_pre",{processor:"boolean",default:!0}),e("forced_root_block",{processor:r=>{const i=q(r)&&ls(r);return i?{value:r,valid:i}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),e("forced_root_block_attrs",{processor:"object",default:{}}),e("newline_behavior",{processor:r=>{const i=xt(["block","linebreak","invert","default"],r);return i?{value:r,valid:i}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),e("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),e("no_newline_selector",{processor:"string",default:""}),e("keep_styles",{processor:"boolean",default:!0}),e("end_container_on_empty_block",{processor:r=>eo(r)?{valid:!0,value:r}:q(r)?{valid:!0,value:r}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),e("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),e("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),e("font_size_classes",{processor:"string",default:""}),e("automatic_uploads",{processor:"boolean",default:!0}),e("images_reuse_filename",{processor:"boolean",default:!1}),e("images_replace_blob_uris",{processor:"boolean",default:!0}),e("icons",{processor:"string",default:""}),e("icons_url",{processor:"string",default:""}),e("images_upload_url",{processor:"string",default:""}),e("images_upload_base_path",{processor:"string",default:""}),e("images_upload_credentials",{processor:"boolean",default:!1}),e("images_upload_handler",{processor:"function"}),e("language",{processor:"string",default:"en"}),e("language_url",{processor:"string",default:""}),e("entity_encoding",{processor:"string",default:"named"}),e("indent",{processor:"boolean",default:!0}),e("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,f
11igure,figcaption,option,optgroup,datalist"}),e("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),e("indent_use_margin",{processor:"boolean",default:!1}),e("indentation",{processor:"string",default:"40px"}),e("content_css",{processor:r=>{const i=r===!1||q(r)||Fo(r,q);return i?q(r)?{value:wt(r.split(","),ns),valid:i}:lo(r)?{value:r,valid:i}:r===!1?{value:[],valid:i}:{value:r,valid:i}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:qp(t)?[]:["default"]}),e("content_style",{processor:"string"}),e("content_css_cors",{processor:"boolean",default:!1}),e("font_css",{processor:r=>{const i=q(r)||Fo(r,q);return i?{value:lo(r)?r:wt(r.split(","),ns),valid:i}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),e("extended_mathml_attributes",{processor:"string[]"}),e("extended_mathml_elements",{processor:"string[]"}),e("inline_boundaries",{processor:"boolean",default:!0}),e("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),e("object_resizing",{processor:r=>{const i=eo(r)||q(r);return i?r===!1||v0.isiPhone()||v0.isiPad()?{value:"",valid:i}:{value:r===!0?"table,img,figure.image,div,video,iframe":r,valid:i}:{valid:!1,message:"Must be boolean or a string"}},default:!y0}),e("resize_img_proportional",{processor:"boolean",default:!0}),e("event_root",{processor:"string"}),e("service_message",{processor:"string"}),e("onboarding",{processor:"boolean",default:!0}),e("tiny_cloud_entry_url",{processor:"string"}),e("theme",{processor:r=>r===!1||q(r)||X(r),default:"silver"}),e("theme_url",{processor:"string"}),e("formats",{processor:"object"}),e("format_empty_lines",{processor:"boolean",default:!1}),e("format_noneditable_selector",{processor:"string",default:""}),e("preview_styles",{processor:r=>{const i=r===!1||q(r);return i?{value:r===!1?"":r,valid:i}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),e("custom_ui_selector",{processor:"string",default:""}),e("hidden_input",{processor:"boolean",default:!0}),e("submit_patch",{processor:"boolean",default:!0}),e("encoding",{processor:"string"}),e("add_form_submit_trigger",{processor:"boolean",default:!0}),e("add_unload_trigger",{processor:"boolean",default:!0}),e("custom_undo_redo_levels",{processor:"number",default:0}),e("disable_nodechange",{processor:"boolean",default:!1}),e("disabled",{processor:r=>eo(r)?(t.initialized&&fc(t)!==r&&Promise.resolve().then(()=>{uR(t,r)}),{valid:!0,value:r}):{valid:!1,message:"The value must be a boolean."},default:!1}),e("readonly",{processor:"boolean",default:!1}),e("editable_root",{processor:"boolean",default:!0}),e("plugins",{processor:"string[]",default:[]}),e("external_plugins",{processor:"object"}),e("forced_plugins",{processor:"string[]"}),e("model",{processor:"string",default:t.hasPlugin("rtc")?"plugin":"dom"}),e("model_url",{processor:"string"}),e("block_unsupported_drop",{processor:"boolean",default:!0}),e("visual",{processor:"boolean",default:!0}),e("visual_table_class",{processor:"string",default:"mce-item-table"}),e("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),e("iframe_aria_text",{processor:"string",default:"Rich Text Area".concat(t.hasPlugin("help")?". Press ALT-0 for help.":"")}),e("setup",{processor:"function"}),e("init_instance_callback",{processor:"function"}),e("url_converter",{processor:"function",default:t.convertURL}),e("url_converter_scope",{processor:"object",default:t}),e("urlconverter_callback",{processor:"function"}),e("allow_conditional_comments",{processor:"boolean",default:!1}),e("allow_html_data_urls",{processor:"boolean",default:!1}),e("allow_svg_data_urls",{processor:"boolean"}),e("allow_html_in_named_anchor",{processor:"boolean",default:!1}),e("allow_html_in_comments",{processor:"boolean",default:!1}),e("allow_script_urls",{processor:"boolean",default:!1}),e("allow_unsafe_link_target",{processor:"boolean",default:!1}),e("allow_mathml_annotation_encodings",{processor:r=>{const i=Fo(r,q);return i?{value:r,valid:i}
11:{valid:!1,message:"Must be an array of strings."}},default:[]}),e("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),e("fix_list_elements",{processor:"boolean",default:!1}),e("preserve_cdata",{processor:"boolean",default:!1}),e("remove_trailing_brs",{processor:"boolean",default:!0}),e("pad_empty_with_br",{processor:"boolean",default:!1}),e("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),e("element_format",{processor:"string",default:"html"}),e("entities",{processor:"string"}),e("schema",{processor:"string",default:"html5"}),e("convert_urls",{processor:"boolean",default:!0}),e("relative_urls",{processor:"boolean",default:!0}),e("remove_script_host",{processor:"boolean",default:!0}),e("custom_elements",{processor:Id}),e("extended_valid_elements",{processor:"string"}),e("invalid_elements",{processor:"string"}),e("invalid_styles",{processor:Id}),e("valid_children",{processor:"string"}),e("valid_classes",{processor:Id}),e("valid_elements",{processor:"string"}),e("valid_styles",{processor:Id}),e("verify_html",{processor:"boolean",default:!0}),e("auto_focus",{processor:r=>q(r)||r===!0}),e("browser_spellcheck",{processor:"boolean",default:!1}),e("protect",{processor:"array"}),e("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),e("deprecation_warnings",{processor:"boolean",default:!0}),e("a11y_advanced_options",{processor:"boolean",default:!1}),e("api_key",{processor:"string"}),e("license_key",{processor:"string"}),e("paste_block_drop",{processor:"boolean",default:!1}),e("paste_data_images",{processor:"boolean",default:!0}),e("paste_preprocess",{processor:"function"}),e("paste_postprocess",{processor:"function"}),e("paste_webkit_styles",{processor:"string",default:"none"}),e("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),e("paste_merge_formats",{processor:"boolean",default:!0}),e("smart_paste",{processor:"boolean",default:!0}),e("paste_as_text",{processor:"boolean",default:!1}),e("paste_tab_spaces",{processor:"number",default:4}),e("text_patterns",{processor:r=>Fo(r,mo)||r===!1?{value:Gw(r===!1?[]:r),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1",trigger:"space"},{start:"##",format:"h2",trigger:"space"},{start:"###",format:"h3",trigger:"space"},{start:"####",format:"h4",trigger:"space"},{start:"#####",format:"h5",trigger:"space"},{start:"######",format:"h6",trigger:"space"},{start:"1.",cmd:"InsertOrderedList",trigger:"space"},{start:"*",cmd:"InsertUnorderedList",trigger:"space"},{start:"-",cmd:"InsertUnorderedList",trigger:"space"},{start:">",cmd:"mceBlockQuote",trigger:"space"},{start:"---",cmd:"InsertHorizontalRule",trigger:"space"}]}),e("text_patterns_lookup",{processor:r=>X(r)?{value:kE(r),valid:!0}:{valid:!1,message:"Must be a single function"},default:r=>[]}),e("noneditable_class",{processor:"string",default:"mceNonEditable"}),e("editable_class",{processor:"string",default:"mceEditable"}),e("noneditable_regexp",{processor:r=>Fo(r,w0)?{value:r,valid:!0}:w0(r)?{value:[r],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),e("table_tab_navigation",{processor:"boolean",default:!0}),e("highlight_on_focus",{processor:"boolean",default:!0}),e("xss_sanitization",{processor:"boolean",default:!0}),e("details_initial_state",{processor:r=>{const i=xt(["inherited","collapsed","expanded"],r);return i?{value:r,valid:i}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),e("details_serialized_state",{processor:r=>{const i=xt(["inherited","collapsed","expanded"],r);return i?{value:r,valid:i}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),e("init_content_sync",{processor:"boolean",default:!1}),e("newdocument_content",{processor:"string",default:""}),e("sandbox_iframes",{processor:"boolean",default:!0}),e("sandbox_iframes_exclusions",{processor:"string[]",default:["youtube.com","youtu.be","vimeo.com","player.vimeo.com","dailymotion.com","embed.music.apple.com","open.spotify.com","giphy.com","dai.ly","codepen.io"]}),e("convert_unsafe_embeds",{processor:"boolean",default:!0}),e("user_id",{processor:"string",default:"Anonymous"}),e("fetch_users",{processor:r=>
11r===void 0?{valid:!0,value:void 0}:X(r)?{valid:!0,value:r}:{valid:!1,message:"fetch_users must be a function that returns a Promise<ExpectedUser[]>"}});const n=Lp([V2("mimeType"),vE("extensions",h0(r=>q(r)?ua.value(r):ua.error("Extensions must be an array of strings")))]);e("documents_file_types",{processor:r=>uf("documents_file_types",n,r).fold(i=>({valid:!1,message:"Must be a non-empty array of objects matching the configuration schema: https://www.tiny.cloud/docs/tinymce/latest/uploadcare-documents/#documents-file-types"}),i=>({valid:!0,value:i}))}),t.on("ScriptsLoaded",()=>{e("directionality",{processor:"string",default:za.isRtl()?"rtl":void 0}),e("placeholder",{processor:"string",default:Zp.getAttrib(t.getElement(),"placeholder")})}),e("lists_indent_on_tab",{processor:"boolean",default:!0}),e("list_max_depth",{processor:r=>{const i=sr(r);if(i){if(r<0)throw new Error("list_max_depth cannot be set to lower than 0");return{value:r,valid:i}}else return{valid:!1,message:"Must be a number"}}})},r_=se("iframe_attrs"),K2=se("doctype"),Y2=se("document_base_url"),a_=se("body_id"),i_=se("body_class"),c_=se("content_security_policy"),_0=se("br_in_pre"),ws=se("forced_root_block"),gc=se("forced_root_block_attrs"),S0=se("newline_behavior"),l_=se("br_newline_selector"),u_=se("no_newline_selector"),d_=se("keep_styles"),k0=se("end_container_on_empty_block"),X2=se("automatic_uploads"),m_=se("images_reuse_filename"),g_=se("images_replace_blob_uris"),Gp=se("icons"),J2=se("icons_url"),E0=se("images_upload_url"),Q2=se("images_upload_base_path"),TE=se("images_upload_credentials"),f_=se("images_upload_handler"),p_=se("content_css_cors"),A0=se("referrer_policy"),Hm=se("crossorigin"),h_=se("language"),b_=se("language_url"),T0=se("indent_use_margin"),DE=se("indentation"),OE=se("content_css"),zm=se("content_style"),tv=se("font_css"),RE=se("directionality"),BE=se("inline_boundaries_selector"),x_=se("object_resizing"),FE=se("resize_img_proportional"),ev=se("placeholder"),D0=se("event_root"),ov=se("service_message"),Nl=se("theme"),v_=se("theme_url"),O0=se("model"),ME=se("model_url"),$d=se("inline_boundaries"),NE=se("formats"),PE=se("preview_styles"),dR=se("format_empty_lines"),mR=se("format_noneditable_selector"),gf=se("custom_ui_selector"),qp=se("inline"),nv=se("hidden_input"),IE=se("submit_patch"),$E=se("add_form_submit_trigger"),R0=se("add_unload_trigger"),y_=se("custom_undo_redo_levels"),C_=se("disable_nodechange"),Kp=se("readonly"),B0=se("editable_root"),sv=se("content_css_cors"),Yp=se("plugins"),rv=se("external_plugins"),LE=se("block_unsupported_drop"),Xp=se("visual"),w_=se("visual_table_class"),F0=se("visual_anchor_class"),M0=se("iframe_aria_text"),Vm=se("setup"),HE=se("init_instance_callback"),Pl=se("urlconverter_callback"),zE=se("auto_focus"),__=se("browser_spellcheck"),VE=se("protect"),gR=se("paste_block_drop"),N0=se("paste_data_images"),UE=se("paste_preprocess"),WE=se("paste_postprocess"),ZE=se("newdocument_content"),av=se("paste_webkit_styles"),jE=se("paste_remove_styles_if_webkit"),S_=se("paste_merge_formats"),iv=se("smart_paste"),GE=se("paste_as_text"),qE=se("paste_tab_spaces"),cv=se("allow_html_data_urls"),k_=se("text_patterns"),pe=se("text_patterns_lookup"),Jp=se("noneditable_class"),E_=se("editable_class"),KE=se("noneditable_regexp"),lv=se("preserve_cdata"),Qp=se("highlight_on_focus"),P0=se("xss_sanitization"),th=se("init_content_sync"),ff=t=>t.options.isSet("text_patterns_lookup"),uv=t=>Mt.explode(t.options.get("font_size_style_values")),dv=t=>Mt.explode(t.options.get("font_size_classes")),A_=t=>t.options.get("encoding")==="xml",mv=t=>Mt.explode(t.options.get("images_file_types")),T_=se("table_tab_navigation"),pf=se("details_initial_state"),Pu=se("details_serialized_state"),hf=se("sandbox_iframes"),Iu=t=>t.options.get("sandbox_iframes_exclusions"),$u=se("convert_unsafe_embeds"),D_=se("license_key"),eh=se("api_key"),fc=se("disabled"),O_=se("user_id"),R_=se("fetch_users"),gv=se("lists_indent_on_tab"),fv=t=>F.from(t.options.get("list_max_depth")),B_=jt,F_=Nt,YE=t=>{const e=t.parentNode;e&&e.removeChild(t)},M_=t=>{const e=ya(t);return{count:t.length-e.length,text:e}},Um=t=>{let e;for(;(e=t.data.lastIndexOf($s))!==-1;)t.deleteData(e,1)},pv=(t,e)=>(Wm(t),e),N_=(t,e)=>{const n=M_(t.data.substr(0,e.offset())),r=M_(t.data.substr(e.offset()));return(n.text+r.text).length>0?(Um(t),gt(t,e.offset()-n.count)):e},hv=(t,e)=>{const n=e.container(),r=ru(Wr(n.childNodes),t).map(i=>i<e.offset()?gt(n,e.offset()-1):e).getOr(e);return Wm(t),r},bv=(t,e)=>F_(t)&&e.container()===t?N_(t,e):pv(t,e),xv=(t,e)=>e.container()===t.parentNode?hv(t,e):pv(t,e),XE=(t,e)=>gt.isTextPosition(e)?bv(t,e):xv(t,e),Wm=t=>{B_(t)&&ci(t)&&(Q1(t)?t.removeAttribute("data-mce-caret"):YE(t)),F_(t)&&(Um(t),t.data.length===0&&YE(t))},Zm=On,I0=Bi,$0=Ng,P_="*[contentEditable=false],video,audio,embed,object",JE=(t,e,n)=>{const r=Dp(e.getBoundingClientRect(),n);let i,u;if(t.tagName==="BODY"){const b=t.ownerDocument.documentElement;i=t.scrollLeft||b.scrollLeft,u=t.scrollTop||b.scrollTop}else{const b=t.getBoundingClientRect();i=t.scrollLeft-b.left,u=t.scrollTop-b.top}r.left+=i,r.right+=i,r.top+=u,r.bottom+=u,r.width=1;let g=e.offsetWidth-e.clientWidth;return g>0&&(n&&(g*=-1),r.left+=g,r.right+=g),r},I_=t=>{var n,r;const e=dr(Z.fromDom(t),P_);for(let i=0;i<e.length;i++){const u=e[i].dom;let g=u.previousSibling;if(Dd(g)){const b=g.data;b.length===1?(n=g.parentNode)==null||n.removeChild(g):g.deleteData(b.length-1,1)}g=u.nextSibling,Va(g)&&(g.data.length===1?(r=g.parentNode)==null||r.removeChild(g):g.deleteData(0,1))}},ze=(t,e,n,r)=>{const i=Gi();let u,g;const b=ws(t),x=t.dom,w=($,U)=>{let J;if(E(),$0(U))return null;if(n(U)){const Q=y2(b,U,$),et=JE(e,U,$);x.setStyle(Q,"top",et.top),x.setStyle(Q,"caret-color","transparent"),g=Q;
11const ft=x.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});x.setStyles(ft,{...et}),x.add(e,ft),i.set({caret:ft,element:U,before:$}),$&&x.addClass(ft,"mce-visual-caret-before"),D(),J=U.ownerDocument.createRange(),J.setStart(Q,0),J.setEnd(Q,0)}else return g=Ow(U,$),J=U.ownerDocument.createRange(),li(g.nextSibling)?(J.setStart(g,0),J.setEnd(g,0)):(J.setStart(g,1),J.setEnd(g,1)),J;return J},E=()=>{I_(e),g&&(Wm(g),g=null),i.on($=>{x.remove($.caret),i.clear()}),u&&(clearInterval(u),u=void 0)},D=()=>{u=window.setInterval(()=>{i.on($=>{r()?x.toggleClass($.caret,"mce-visual-caret-hidden"):x.addClass($.caret,"mce-visual-caret-hidden")})},500)},R=()=>{i.on($=>{const U=JE(e,$.element,$.before);x.setStyles($.caret,{...U})})},N=()=>clearInterval(u),H=()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}";return{isShowing:i.isSet,show:w,hide:E,getCss:H,reposition:R,destroy:N}},L0=()=>Oo.browser.isFirefox(),li=t=>Zm(t)||I0(t),oh=t=>(li(t)||pa(t)&&L0())&&Yi(Z.fromDom(t)).exists(oc),QE=Pa,H0=On,tA=Bi,vv=D1("display","block table table-cell table-row table-caption list-item"),yv=ci,nh=Ou,qc=jt,bf=Nt,eA=Mn,jm=(t,e)=>{let n;for(;n=t(e);)if(!nh(n))return n;return null},sh=(t,e,n,r,i)=>{const u=new ts(t,r),g=H0(t)||nh(t);let b;if(Rl(e)){if(g&&(b=jm(u.prev.bind(u),!0),n(b)))return b;for(;b=jm(u.prev.bind(u),i);)if(n(b))return b}if($m(e)){if(g&&(b=jm(u.next.bind(u),!0),n(b)))return b;for(;b=jm(u.next.bind(u),i);)if(n(b))return b}return null},z0=(t,e)=>{const n=i=>QE(i.dom),r=i=>i.dom===e;return Sl(Z.fromDom(t),n,r).map(i=>i.dom).getOr(e)},Hs=t=>jt(t)&&rs(Z.fromDom(t),"position")==="absolute",oA=(t,e)=>t.parentNode!==e,Cv=(t,e)=>H0(t)&&Hs(t)&&oA(t,e),Ld=(t,e)=>{for(;t&&t!==e;){if(vv(t)&&!Cv(t,e))return t;t=t.parentNode}return null},Il=(t,e,n)=>Ld(t.container(),n)===Ld(e.container(),n),wv=(t,e)=>{if(!e)return F.none();const n=e.container(),r=e.offset();return qc(n)?F.from(n.childNodes[r+t]):F.none()},$_=(t,e)=>{const r=(e.ownerDocument??document).createRange();return t?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),r},nA=(t,e,n)=>Ld(e,t)===Ld(n,t),V0=(t,e,n)=>{const r=t?"previousSibling":"nextSibling";let i=n;for(;i&&i!==e;){let u=i[r];if(u&&yv(u)&&(u=u[r]),H0(u)||tA(u)){if(nA(e,u,i))return u;break}if(eA(u))break;i=i.parentNode}return null},rh=Et($_,!0),Hd=Et($_,!1),U0=(t,e,n)=>{let r;const i=Et(V0,!0,e),u=Et(V0,!1,e),g=n.startContainer,b=n.startOffset;if(Ou(g)){const x=bf(g)?g.parentNode:g,w=x.getAttribute("data-mce-caret");if(w==="before"&&(r=x.nextSibling,oh(r)))return rh(r);if(w==="after"&&(r=x.previousSibling,oh(r)))return Hd(r)}if(!n.collapsed)return n;if(Nt(g)){if(yv(g)){if(t===1){if(r=u(g),r)return rh(r);if(r=i(g),r)return Hd(r)}if(t===-1){if(r=i(g),r)return Hd(r);if(r=u(g),r)return rh(r)}return n}if(Dd(g)&&b>=g.data.length-1)return t===1&&(r=u(g),r)?rh(r):n;if(Va(g)&&b<=1)return t===-1&&(r=i(g),r)?Hd(r):n;if(b===g.data.length)return r=u(g),r?rh(r):n;if(b===0)return r=i(g),r?Hd(r):n}return n},W0=(t,e)=>wv(t?0:-1,e).filter(H0),zd=(t,e,n)=>{const r=U0(t,e,n);return t===-1?gt.fromRangeStart(r):gt.fromRangeEnd(r)},ah=t=>F.from(t.getNode()).map(Z.fromDom),_v=t=>F.from(t.getNode(!0)).map(Z.fromDom),Z0=(t,e)=>{let n=e;for(;n=t(n);)if(n.isVisible())return n;return n},Kc=(t,e)=>{const n=Il(t,e);return!n&&Wn(t.getNode())?!0:n},L_=On,$l=Nt,Sv=jt,j0=Wn,xf=Mn,ih=Mw,G0=s0,sA=(t,e)=>{const n=[];let r=t;for(;r&&r!==e;)n.push(r),r=r.parentNode;return n},H_=(t,e)=>t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null,q0=(t,e)=>{if($m(t)){if(xf(e.previousSibling)&&!$l(e.previousSibling))return gt.before(e);if($l(e))return gt(e,0)}if(Rl(t)){if(xf(e.nextSibling)&&!$l(e.nextSibling))return gt.after(e);if($l(e))return gt(e,e.data.length)}return Rl(t)?j0(e)?gt.before(e):gt.after(e):gt.before(e)},rA=(t,e)=>{const n=e.nextSibling;return n&&xf(n)?$l(n)?gt(n,0):gt.before(n):kv(1,gt.after(e),t)},kv=(t,e,n)=>{let r,i,u,g;if(!Sv(n)||!e)return null;if(e.isEqual(gt.after(n))&&n.lastChild){if(g=gt.after(n.lastChild),Rl(t)&&xf(n.lastChild)&&Sv(n.lastChild))return j0(n.lastChild)?gt.before(n.lastChild):g}else g=e;const b=g.container();let x=g.offset();if($l(b)){if(Rl(t)&&x>0)return gt(b,--x);if($m(t)&&x<b.length)return gt(b,++x);r=b}else{if(Rl(t)&&x>0&&(i=H_(b,x-1),xf(i)))return!ih(i)&&(u=sh(i,t,G0,i),u)?$l(u)?gt(u,u.data.length):gt.after(u):$l(i)?gt(i,i.data.length):gt.before(i);if($m(t)&&x<b.childNodes.length&&(i=H_(b,x),xf(i)))return j0(i)?rA(n,i):!ih(i)&&(u=sh(i,t,G0,i),u)?$l(u)?gt(u,0):gt.before(u):$l(i)?gt(i,0):gt.after(i);r=i||g.getNode()}if(r&&($m(t)&&g.isAtEnd()||Rl(t)&&g.isAtStart())&&(r=sh(r,t,It,n,!0),G0(r,n)))return q0(t,r);i=r&&sh(r,t,G0,n);const w=gu(st(sA(b,n),L_));return w&&(!i||!w.contains(i))?($m(t)?g=gt.after(w):g=gt.before(w),g):i?q0(t,i):null},Yc=t=>({next:e=>kv(1,e,t),prev:e=>kv(-1,e,t)}),Ev=(t,e,n)=>{const r=t?gt.before(n):gt.after(n);return ui(t,e,r)},aA=t=>Wn(t)?gt.before(t):gt.after(t),z_=t=>gt.isTextPosition(t)?t.offset()===0:Mn(t.getNode()),V_=t=>
11{if(gt.isTextPosition(t)){const e=t.container();return t.offset()===e.data.length}else return Mn(t.getNode(!0))},U_=(t,e)=>!gt.isTextPosition(t)&&!gt.isTextPosition(e)&&t.getNode()===e.getNode(!0),iA=t=>!gt.isTextPosition(t)&&Wn(t.getNode()),En=(t,e,n)=>t?!U_(e,n)&&!iA(e)&&V_(e)&&z_(n):!U_(n,e)&&z_(e)&&V_(n),ui=(t,e,n)=>{const r=Yc(e);return F.from(t?r.next(n):r.prev(n))},vf=(t,e,n)=>ui(t,e,n).bind(r=>Il(n,r,e)&&En(t,n,r)?ui(t,e,r):F.some(r)),Ii=(t,e,n,r)=>vf(t,e,n).bind(i=>r(i)?Ii(t,e,i,r):F.some(i)),l=(t,e)=>{const n=t?e.firstChild:e.lastChild;return Nt(n)?F.some(gt(n,t?0:n.data.length)):n?Mn(n)?F.some(t?gt.before(n):aA(n)):Ev(t,e,n):F.none()},m=Et(ui,!0),h=Et(ui,!1),v=Et(l,!0),S=Et(l,!1),T="_mce_caret",B=t=>jt(t)&&t.id===T,P=(t,e)=>{let n=e;for(;n&&n!==t;){if(B(n))return n;n=n.parentNode}return null},z=t=>q(t.start),G=t=>Xe(t,"rng"),ot=t=>Xe(t,"id"),Bt=t=>Xe(t,"name"),Jt=t=>Mt.isArray(t.start),Kt=t=>!Bt(t)&&eo(t.forward)?t.forward:!0,Rt=(t,e)=>(jt(e)&&t.isBlock(e)&&!e.innerHTML&&(e.innerHTML='<br data-mce-bogus="1" />'),e),Ht=(t,e)=>{const n=F.from(Pw(t.getRoot(),e.start)),r=F.from(Pw(t.getRoot(),e.end));return Us(n,r,(i,u)=>{const g=t.createRng();return g.setStart(i.container(),i.offset()),g.setEnd(u.container(),u.offset()),{range:g,forward:Kt(e)}})},Dt=(t,e)=>{const r=(t.ownerDocument??document).createTextNode($s);t.appendChild(r),e.setStart(r,0),e.setEnd(r,0)},Se=t=>!t.hasChildNodes(),Ke=(t,e)=>S(t).fold(pt,n=>(e.setStart(n.container(),n.offset()),e.setEnd(n.container(),n.offset()),!0)),ie=(t,e,n)=>Se(e)&&P(t,e)?(Dt(e,n),!0):!1,Lo=(t,e,n,r)=>{const i=n[e?"start":"end"],u=t.getRoot();if(i){let g=u,b=i[0];for(let x=i.length-1;g&&x>=1;x--){const w=g.childNodes;if(ie(u,g,r))return!0;if(i[x]>w.length-1)return ie(u,g,r)?!0:Ke(g,r);g=w[i[x]]}Nt(g)&&(b=Math.min(i[0],g.data.length)),jt(g)&&(b=Math.min(i[0],g.childNodes.length)),e?r.setStart(g,b):r.setEnd(g,b)}return!0},Ve=t=>Nt(t)&&t.data.length>0,Wo=(t,e,n)=>{const r=t.get(n.id+"_"+e),i=r==null?void 0:r.parentNode,u=n.keep;if(r&&i){let g,b;if(e==="start"?u?r.hasChildNodes()?(g=r.firstChild,b=1):Ve(r.nextSibling)?(g=r.nextSibling,b=0):Ve(r.previousSibling)?(g=r.previousSibling,b=r.previousSibling.data.length):(g=i,b=t.nodeIndex(r)+1):(g=i,b=t.nodeIndex(r)):u?r.hasChildNodes()?(g=r.firstChild,b=1):Ve(r.previousSibling)?(g=r.previousSibling,b=r.previousSibling.data.length):(g=i,b=t.nodeIndex(r)):(g=i,b=t.nodeIndex(r)),!u){const x=r.previousSibling,w=r.nextSibling;Mt.each(Mt.grep(r.childNodes),D=>{Nt(D)&&(D.data=D.data.replace(/\uFEFF/g,""))});let E;for(;E=t.get(n.id+"_"+e);)t.remove(E,!0);if(Nt(w)&&Nt(x)&&!Oo.browser.isOpera()){const D=x.data.length;x.appendData(w.data),t.remove(w),g=x,b=D}}return F.some(gt(g,b))}else return F.none()},us=(t,e)=>{const n=t.createRng();return Lo(t,!0,e,n)&&Lo(t,!1,e,n)?F.some({range:n,forward:Kt(e)}):F.none()},di=(t,e)=>{const n=Wo(t,"start",e),r=Wo(t,"end",e);return Us(n,r.or(n),(i,u)=>{const g=t.createRng();return g.setStart(Rt(t,i.container()),i.offset()),g.setEnd(Rt(t,u.container()),u.offset()),{range:g,forward:Kt(e)}})},Gm=(t,e)=>F.from(t.select(e.name)[e.index]).map(n=>{const r=t.createRng();return r.selectNode(n),{range:r,forward:!0}}),Vd=(t,e)=>{const n=t.dom;if(e){if(Jt(e))return us(n,e);if(z(e))return Ht(n,e);if(ot(e))return di(n,e);if(Bt(e))return Gm(n,e);if(G(e))return F.some({range:e.rng,forward:Kt(e)})}return F.none()},qm=(t,e,n)=>vt(t,e,n),Qo=(t,e)=>{Vd(t,e).each(({range:n,forward:r})=>{t.setRng(n,r)})},Xn=t=>jt(t)&&t.tagName==="SPAN"&&t.getAttribute("data-mce-type")==="bookmark",ea=(t=>e=>t===e)(Bs),er=t=>t!==""&&` \f 12\r \v`.indexOf(t)!==-1,Lu=t=>!er(t)&&!ea(t)&&!mu(t),Hr=t=>{const e=[];if(t)for(let n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},Av=t=>qo(t,e=>{const n=Ls(e);return n?[Z.fromDom(n)]:[]}),K0=t=>Hr(t).length>1,Hu=t=>st(Av(t),Rm),Dr=t=>dr(t,"td[data-mce-selected],th[data-mce-selected]"),W_=(t,e)=>{const n=Dr(e);return n.length>0?n:Hu(t)},ce=t=>W_(Hr(t.selection.getSel()),Z.fromDom(t.getBody())),wa=(t,e)=>bs(t,"table",e),cA=t=>{const e=t.startContainer,n=t.startOffset;return Nt(e)?n===0?F.some(Z.fromDom(e)):F.none():F.from(e.childNodes[n]).map(Z.fromDom)},Z_=t=>{const e=t.endContainer,n=t.endOffset;return Nt(e)?n===e.data.length?F.some(Z.fromDom(e)):F.none():F.from(e.childNodes[n-1]).map(Z.fromDom)},Y0=t=>rr(t).fold(Ut([t]),e=>[t].concat(Y0(e))),Tv=t=>Es(t).fold(Ut([t]),e=>oo(e)==="br"?ki(e).map(n=>[t].concat(Tv(n))).getOr([]):[t].concat(Tv(e))),Km=(t,e)=>Us(cA(e),Z_(e),(n,r)=>{const i=Xo(Y0(t),Et(ho,n)),u=Xo(Tv(t),Et(ho,r));return i.isSome()&&u.isSome()}).getOr(!1),j_=(t,e,n,r)=>{const i=n,u=new ts(n,i),g=Gf(t.schema.getMoveCaretBeforeOnEnterElements(),(x,w)=>!xt(["td","th","table"],w.toLowerCase()));let b=n;do{if(Nt(b)&&Mt.trim(b.data).length!==0){r?e.setStart(b,0):e.setEnd(b,b.data.length);return}if(g[b.nodeName]){r?e.setStartBefore(b):b.nodeName==="BR"?e.setEndBefore(b):e.setEndAfter(b);return}}while(b=r?u.next():u.prev());i.nodeName==="BODY"&&(r?e.setStart(i,0):e.setEnd(i,i.childNodes.length))},Dv=t=>{const e=t.selection.getSel();return mt(e)&&e.rangeCount>0},Ov=(t,e)=>{const n=ce(t);n.length>0?Y(n,r=>{const i=r.dom,u=t.dom.createRng();u.setStartBefore(i),u.setEndAfter(i),e(u,!0)}):e(t.selection.getRng(),!1)},G_=(t,e,n)=>{const r=F2(t,e);n(r),t.moveToBookmark(r)},Rv=(t,e)=>t.startContainer===t.endContainer&&t.endOffset-t.startOffset===1&&e(t.startContainer.childNodes[t.startOffset]),wL=t=>Rv(t,fa),_L=t=>Rv(t,Nt),SL=t=>Rv(t,dp),Bv=t=>sr(t==null?void 0:t.nodeType),Fv=t=>jt(t)&&!Xn(t)&&!B(t)&&!yd(t),fR=(t,e)=>{if(Fv(e)&&!/^(TD|TH)$/.test(e.nodeName)){const n=t.getAttrib(e,"data-mce-selected"),r=parseInt(n,10);return!isNaN(r)&&r>0}else return!1},pR=(t,e,n)=>{const{selection:r,dom:i}=t,u=r.getNode(),g=On(u);G_(r,!0,()=>{e()}),g&&On(u)&&i.isChildOf(u,t.getBody())?t.selection.select(u):n(r.getStart())&&hR(i,r)},hR=(t,e)=>{const n=e.getRng(),{startContainer:r,startOffset:i}=n,u=e.getNode();if(!fR(t,u)&&jt(r)){const g=r.childNodes,b=t.getRoot();let x;if(i<g.length){const w=g[i];x=new ts(w,t.getParent(w,t.isBlock)??b)}else{const w=g[g.length-1];x=new ts(w,t.getParent(w,t.isBlock)??b),x.next(!0)}for(let w=x.current();w;w=x.next()){if(t.getContentEditable(w)==="false")return;if(Nt(w)&&!lA(w)){n.setStart(w,0),e.setRng(n);return}}}},bR=(t,e,n)=>{if(t){const r=e?"nextSibling":"previousSibling";for(t=t[r];t;t=t[r])if(jt(t)||!lA(t))return t}},Mv=(t,e)=>!!t.getTextBlockElements()[e.nodeName.toLowerCase()]||Kn(t,e),X0=(t,e,n)=>t.schema.isValidChild(e,n),lA=(t,e=!1)=>
12{if(mt(t)&&Nt(t)){const n=e?t.data.replace(/ /g,"Â "):t.data;return Bg(n)}else return!1},kL=t=>mt(t)&&Nt(t)&&t.length===0,EL=(t,e)=>{const n="[data-mce-cef-wrappable]",r=mR(t),i=qf(r)?n:`${n},${r}`;return ei(Z.fromDom(e),i)},xR=(t,e)=>{const n=t.dom;return Fv(e)&&n.getContentEditable(e)==="false"&&EL(t,e)&&n.select('[contenteditable="true"]',e).length===0},Ym=(t,e)=>X(t)?t(e):(mt(e)&&(t=t.replace(/%(\w+)/g,(n,r)=>e[r]||n)),t),Nv=(t,e)=>(t=t||"",e=e||"",t=""+(t.nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()),q_=(t,e)=>{if(so(t))return null;{let n=String(t);return(e==="color"||e==="backgroundColor")&&(n=Mi(n)),e==="fontWeight"&&t===700&&(n="bold"),e==="fontFamily"&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),n}},Pv=(t,e,n)=>{const r=t.getStyle(e,n);return q_(r,n)},vR=(t,e)=>{let n;return t.getParent(e,r=>jt(r)?(n=t.getStyle(r,"text-decoration"),!!n&&n!=="none"):!1),n},K_=(t,e,n)=>t.getParents(e,n,t.getRoot()),uA=(t,e,n)=>{const r=t.formatter.get(e);return mt(r)&&$t(r,n)},Y_=(t,e)=>uA(t,e,r=>{const i=u=>X(u)||u.length>1&&u.charAt(0)==="%";return $t(["styles","attributes"],u=>Ln(r,u).exists(g=>{const b=lo(g)?g:cu(g);return $t(b,i)}))}),yR=(t,e,n)=>{const r=["inline","block","selector","attributes","styles","classes"],i=u=>Gf(u,(g,b)=>$t(r,x=>x===b));return uA(t,e,u=>{const g=i(u);return uA(t,n,b=>{const x=i(b);return vC(g,x)})})},zu=t=>cs(t,"block"),AL=t=>zu(t)&&t.wrapper===!0,TL=t=>zu(t)&&t.wrapper!==!0,Ll=t=>cs(t,"selector"),Or=t=>cs(t,"inline"),HY=t=>Ll(t)&&Or(t)&&kn(Ln(t,"mixed"),!0),dA=t=>Ll(t)&&t.expand!==!1&&!Or(t),zY=t=>{const e=[];let n=t;for(;n;){if(Nt(n)&&n.data!==$s||n.childNodes.length>1)return[];jt(n)&&e.push(n),n=n.firstChild}return e},CR=t=>zY(t).length>0,mA=t=>B(t.dom)&&CR(t.dom),Iv=Xn,wR=K_,Nn=lA,gA=Mv,X_=t=>Wn(t)&&t.getAttribute("data-mce-bogus")&&!t.nextSibling,$v=(t,e)=>{let n=e;for(;n;){if(jt(n)&&t.getContentEditable(n))return t.getContentEditable(n)==="false"?n:e;n=n.parentNode}return e},Ud=(t,e,n,r)=>{const i=e.data;if(t){for(let u=n;u>0;u--)if(r(i.charAt(u-1)))return u}else for(let u=n;u<i.length;u++)if(r(i.charAt(u)))return u;return-1},J_=(t,e,n)=>Ud(t,e,n,r=>ea(r)||er(r)),J0=(t,e,n)=>Ud(t,e,n,Lu),fA=(t,e,n,r,i,u)=>{let g;const b=t.getParent(n,D=>Su(D)||t.isBlock(D)),x=mt(b)?b:e,w=(D,R,N)=>{const H=Dl(t),$=i?H.backwards:H.forwards;return F.from($(D,R,(U,J)=>Iv(U.parentNode)?-1:(g=U,N(i,U,J)),x))};return w(n,r,J_).bind(D=>u?w(D.container,D.offset+(i?-1:0),J0):F.some(D)).orThunk(()=>g?F.some({container:g,offset:i?0:g.length}):F.none())},_R=(t,e,n,r,i)=>{const u=r[i];Nt(r)&&qf(r.data)&&u&&(r=u);const g=wR(t,r);for(let b=0;b<g.length;b++)for(let x=0;x<e.length;x++){const w=e[x];if(!(mt(w.collapsed)&&w.collapsed!==n.collapsed)&&Ll(w)&&t.is(g[b],w.selector))return g[b]}return r},SR=(t,e,n,r)=>{let i=n;const u=t.getRoot(),g=e[0];if(zu(g)&&(i=g.wrapper?null:t.getParent(n,g.block,u)),!i){const b=t.getParent(n,"LI,TD,TH,SUMMARY")??u;i=t.getParent(Nt(n)?n.parentNode:n,x=>x!==u&&gA(t.schema,x),b)}if(i&&zu(g)&&g.wrapper&&(i=wR(t,i,"ul,ol").reverse()[0]||i),!i)for(i=n;i&&i[r]&&!t.isBlock(i[r])&&(i=i[r],!Nv(i,"br")););return i||n},pA=(t,e,n,r)=>{const i=n.parentNode;return mt(n[r])?!1:i===e||so(i)||t.isBlock(i)?!0:pA(t,e,i,r)},Q_=(t,e,n,r,i,u)=>{let g=n;const b=i?"previousSibling":"nextSibling",x=t.getRoot();if(Nt(n)&&!Nn(n)&&(i?r>0:r<n.data.length))return n;for(;g;){if(Su(g))return n;if(!e[0].block_expand&&t.isBlock(g))return u?g:n;for(let w=g[b];w;w=w[b]){const E=Nt(w)&&!pA(t,x,w,b);if(!Iv(w)&&!X_(w)&&!Nn(w,E))return g}if(g===x||g.parentNode===x){n=g;break}g=g.parentNode}return n},tS=t=>Iv(t.parentNode)||Iv(t),Wd=(t,e,n,r={})=>{const{includeTrailingSpace:i=!1,expandToBlock:u=!0}=r,g=t.getParent(e.commonAncestorContainer,N=>Su(N)),b=mt(g)?g:t.getRoot();let{startContainer:x,startOffset:w,endContainer:E,endOffset:D}=e;const R=n[0];return jt(x)&&x.hasChildNodes()&&(x=Bd(x,w),Nt(x)&&(w=0)),jt(E)&&E.hasChildNodes()&&(E=Bd(E,e.collapsed?D:D-1),Nt(E)&&(D=E.data.length)),x=$v(t,x),E=$v(t,E),tS(x)&&(x=Iv(x)?x:x.parentNode,e.collapsed?x=x.previousSibling||x:x=x.nextSibling||x,Nt(x)&&(w=e.collapsed?x.length:0)),tS(E)&&(E=Iv(E)?E:E.parentNode,e.collapsed?E=E.nextSibling||E:E=E.previousSibling||E,Nt(E)&&(D=e.collapsed?0:E.length)),e.collapsed&&(fA(t,b,x,w,!0,i).each(({container:$,offset:U})=>{x=$,w=U}
12),fA(t,b,E,D,!1,i).each(({container:$,offset:U})=>{E=$,D=U})),(Or(R)||R.block_expand)&&((!Or(R)||!Nt(x)||w===0)&&(x=Q_(t,n,x,w,!0,u)),(!Or(R)||!Nt(E)||D===E.data.length)&&(E=Q_(t,n,E,D,!1,u))),dA(R)&&(x=_R(t,n,e,x,"previousSibling"),E=_R(t,n,e,E,"nextSibling")),(zu(R)||Ll(R))&&(x=SR(t,n,x,"previousSibling"),E=SR(t,n,E,"nextSibling"),zu(R)&&(t.isBlock(x)||(x=Q_(t,n,x,w,!0,u),Nt(x)&&(w=0)),t.isBlock(E)||(E=Q_(t,n,E,D,!1,u),Nt(E)&&(D=E.data.length)))),jt(x)&&x.parentNode&&(w=t.nodeIndex(x),x=x.parentNode),jt(E)&&E.parentNode&&(D=t.nodeIndex(E)+1,E=E.parentNode),{startContainer:x,startOffset:w,endContainer:E,endOffset:D}},Hl=(t,e,n)=>{const r=e.startOffset,i=Bd(e.startContainer,r),u=e.endOffset,g=Bd(e.endContainer,u-1),b=$=>{const U=$[0];Nt(U)&&U===i&&r>=U.data.length&&$.splice(0,1);const J=$[$.length-1];return u===0&&$.length>0&&J===g&&Nt(J)&&$.splice($.length-1,1),$},x=($,U,J)=>{const Q=[];for(;$&&$!==J;$=$[U])Q.push($);return Q},w=($,U)=>t.getParent($,J=>J.parentNode===U,U),E=($,U,J)=>{const Q=J?"nextSibling":"previousSibling";for(let et=$,ft=et.parentNode;et&&et!==U;et=ft){ft=et.parentNode;const St=x(et===$?et:et[Q],Q);St.length&&(J||St.reverse(),n(b(St)))}};if(i===g)return n(b([i]));const D=t.findCommonAncestor(i,g)??t.getRoot();if(t.isChildOf(i,g))return E(i,D,!0);if(t.isChildOf(g,i))return E(g,D);const R=w(i,D)||i,N=w(g,D)||g;E(i,R,!0);const H=x(R===i?R:R.nextSibling,"nextSibling",N===g?N.nextSibling:N);H.length&&n(b(H)),E(g,N)},ch=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]","div.mce-footnotes"],kR=t=>zo(t)&&$r(t)===$s,DL=(t,e,n,r)=>Yi(e).fold(()=>"skipping",i=>r==="br"||kR(e)?"valid":p2(e)?"existing":B(e.dom)?"caret":$t(ch,u=>ei(e,u))?"valid-block":!X0(t,n,r)||!X0(t,oo(i),n)?"invalid-child":"valid"),OL=(t,e)=>{const n=Wd(t.dom,e,[{inline:"span"}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)},ER=(t,e,n,r,i,u)=>{const{uid:g=e,...b}=n;si(t,Ed()),qn(t,`${Tl()}`,g),qn(t,`${ic()}`,r);const{attributes:x={},classes:w=[]}=i(g,b);if(lr(t,x),cp(t,w),u){w.length>0&&qn(t,`${Yg()}`,w.join(","));const E=he(x);E.length>0&&qn(t,`${Z1()}`,E.join(","))}},RL=t=>{js(t,Ed()),As(t,`${Tl()}`),As(t,`${ic()}`),As(t,`${Kg()}`);const e=Qi(t,`${Z1()}`).map(r=>r.split(",")).getOr([]),n=Qi(t,`${Yg()}`).map(r=>r.split(",")).getOr([]);Y(e,r=>As(t,r)),YC(t,n),As(t,`${Yg()}`),As(t,`${Z1()}`)},AR=(t,e,n,r,i)=>{const u=Z.fromTag("span",t);return ER(u,e,n,r,i,!1),u},BL=(t,e,n,r,i,u)=>{const g=[],b=AR(t.getDoc(),n,u,r,i),x=Gi(),w=()=>{x.clear()},E=()=>x.get().getOrThunk(()=>{const H=Pr(b);return g.push(H),x.set(H),H}),D=H=>{Y(H,R)},R=H=>{switch(DL(t,H,"span",oo(H))){case"invalid-child":{w();const U=Qn(H);D(U),w();break}case"valid-block":{w(),ER(H,n,u,r,i,!0);break}case"valid":{const U=E();ni(H,U);break}}},N=H=>{const $=wt(H,Z.fromDom);D($)};return Hl(t.dom,e,H=>{w(),N(H)}),g},TR=(t,e,n,r)=>{t.undoManager.transact(()=>{const i=t.selection,u=i.getRng(),g=ce(t).length>0,b=da("mce-annotation");if(u.collapsed&&!g&&OL(t,u),i.getRng().collapsed&&!g){const x=AR(t.getDoc(),b,r,e,n.decorate);xu(x,Bs),i.getRng().insertNode(x.dom),i.select(x.dom)}else G_(i,!1,()=>{Ov(t,x=>{BL(t,x,b,e,n.decorate,r)})})})},DR=t=>{const e=q1();Ap(t,e);const n=G1(t,e),r=vl("span"),i=u=>{Y(u,g=>{r(g)?Ai(g):RL(g)})};return{register:(u,g)=>{e.register(u,g)},annotate:(u,g)=>{e.lookup(u).each(b=>{TR(t,u,b,g)})},annotationChanged:(u,g)=>{n.addListener(u,g)},remove:u=>{j1(t,F.some(u)).each(({elements:g})=>{const b=t.selection.getBookmark();i(g),t.selection.moveToBookmark(b)})},removeAll:u=>{const g=t.selection.getBookmark();Do(Du(t,u),(b,x)=>{i(b)}),t.selection.moveToBookmark(g)},getAll:u=>{const g=Du(t,u);return rx(g,b=>wt(b,x=>x.dom))}}},Q0=t=>({getBookmark:Et(qm,t),moveToBookmark:Et(Qo,t)});Q0.isBookmarkNode=Xn;const OR=(t,e,n)=>n.collapsed?!1:$t(n.getClientRects(),r=>w2(r,t,e)),FL=(t,e)=>{const n=zo(e)?$r(e).length:Qn(e).length+1;return t>n?n:t<0?0:t},ML=t=>bd.range(t.start,FL(t.soffset,t.start),t.finish,FL(t.foffset,t.finish)),pr=(t,e)=>!T1(e.dom)&&(_i(t,e)||ho(t,e)),Lv=t=>e=>pr(t,e.start)&&pr(t,e.finish),zr=t=>t.inline||Oo.browser.isFirefox(),zl=t=>bd.range(Z.fromDom(t.startContainer),t.startOffset,Z.fromDom(t.endContainer),t.endOffset),NL=t=>{const e=t.getSelection();return(!e||e.rangeCount===0?F.none():F.from(e.getRangeAt(0))).map(zl)},RR=t=>{const e=hu(t);return NL(e.dom).filter(Lv(t))},PL=(t,e)=>F.from(e).filter(Lv(t)).map(ML),hA=t=>{const e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),F.some(e)}catch{return F.none()}},eS=t=>{const e=zr(t)?RR(Z.fromDom(t.getBody())):F.none();t.bookmark=e.isSome()?e:t.bookmark},oS=t=>(t.bookmark?t.bookmark:F.none()).bind(n=>PL(Z.fromDom(t.getBody()),n)).bind(hA),IL=t=>{oS(t).each(e=>t.selection.setRng(e))},BR={isEditorUIElement:t=>{const e=t.className.toString();
12return e.indexOf("tox-")!==-1||e.indexOf("mce-")!==-1}},pc=(t,e)=>(sr(e)||(e=0),window.setTimeout(t,e)),Wa=(t,e)=>(sr(e)||(e=0),window.setInterval(t,e)),Vl={setEditorTimeout:(t,e,n)=>pc(()=>{t.removed||e()},n),setEditorInterval:(t,e,n)=>{const r=Wa(()=>{t.removed?window.clearInterval(r):e()},n);return r}},Vu=t=>t.type==="nodechange"&&t.selectionChange,bA=(t,e)=>{const n=()=>{e.throttle()};vo.DOM.bind(document,"mouseup",n),t.on("remove",()=>{vo.DOM.unbind(document,"mouseup",n)})},$L=(t,e)=>{t.on("mouseup touchend",n=>{e.throttle()})},LL=(t,e)=>{$L(t,e),t.on("keyup NodeChange AfterSetSelectionRange",n=>{Vu(n)||eS(t)})},FR=t=>{const e=oe(()=>{eS(t)},0);t.on("init",()=>{t.inline&&bA(t,e),LL(t,e)}),t.on("remove",()=>{e.cancel()})};let tb;const nS=vo.DOM,HL=t=>jt(t)&&BR.isEditorUIElement(t),Hv=t=>{const e=t.classList;return e!==void 0?e.contains("tox-edit-area")||e.contains("tox-edit-area__iframe")||e.contains("mce-content-body"):!1},sS=(t,e)=>{const n=gf(t);return nS.getParent(e,i=>HL(i)||(n?t.dom.is(i,n):!1))!==null},xA=t=>{try{const e=ar(Z.fromDom(t.getElement()));return Mc(e).fold(()=>document.body,n=>n.dom)}catch{return document.body}},zL=(t,e)=>{const n=e.editor;FR(n);const r=(i,u)=>{if(Qp(i)&&i.inline!==!0){const g=Z.fromDom(i.getContainer());u(g,"tox-edit-focus")}};n.on("focusin",()=>{const i=t.focusedEditor;Hv(xA(n))&&r(n,si),i!==n&&(i&&i.dispatch("blur",{focusedEditor:n}),t.setActive(n),t.focusedEditor=n,n.dispatch("focus",{blurredEditor:i}),n.focus(!0))}),n.on("focusout",()=>{Vl.setEditorTimeout(n,()=>{const i=t.focusedEditor;(!Hv(xA(n))||i!==n)&&r(n,js),!sS(n,xA(n))&&i===n&&(n.dispatch("blur",{focusedEditor:null}),t.focusedEditor=null)})}),tb||(tb=i=>{const u=t.activeEditor;u&&Fx(i).each(g=>{const b=g;b.ownerDocument===document&&b!==document.body&&!sS(u,b)&&t.focusedEditor===u&&(u.dispatch("blur",{focusedEditor:null}),t.focusedEditor=null)})},nS.bind(document,"focusin",tb))},VL=(t,e)=>{t.focusedEditor===e.editor&&(t.focusedEditor=null),!t.activeEditor&&tb&&(nS.unbind(document,"focusin",tb),tb=null)},MR=t=>{t.on("AddEditor",Et(zL,t)),t.on("RemoveEditor",Et(VL,t))},vA=(t,e)=>t.dom.getParent(e,n=>t.dom.getContentEditable(n)==="true"),NR=(t,e)=>t.dom.getParent(e,n=>t.dom.getContentEditable(n)==="false")!==null,yA=t=>t.collapsed?F.from(Bd(t.startContainer,t.startOffset)).map(Z.fromDom):F.none(),UL=(t,e)=>yA(e).bind(n=>Y1(n)?F.some(n):_i(t,n)?F.none():F.some(t)),WL=(t,e)=>{UL(Z.fromDom(t.getBody()),e).bind(n=>v(n.dom)).fold(()=>{t.selection.normalize()},n=>t.selection.setRng(n.toRange()))},CA=t=>{if(t.setActive)try{t.setActive()}catch{t.focus()}else t.focus()},ZL=t=>bu(t)||Ck(t).isSome(),PR=t=>mt(t.iframeElement)&&bu(Z.fromDom(t.iframeElement)),jL=t=>{const e=t.getBody();return e&&ZL(Z.fromDom(e))},GL=t=>{const e=ar(Z.fromDom(t.getElement()));return Mc(e).filter(n=>!Hv(n.dom)&&sS(t,n.dom)).isSome()},eb=t=>t.inline?jL(t):PR(t),IR=t=>eb(t)||GL(t),UY=t=>{const e=t.selection,n=t.getBody();let r=e.getRng();t.quirks.refreshContentEditable();const i=g=>{oS(g).each(b=>{g.selection.setRng(b),r=b})};!eb(t)&&t.hasEditableRoot()&&i(t);const u=vA(t,e.getNode());if(u&&t.dom.isChildOf(u,n)){NR(t,u)||CA(n),CA(u),t.hasEditableRoot()||i(t),WL(t,r),rS(t);return}t.inline||(Oo.browser.isOpera()||CA(n),t.getWin().focus()),(Oo.browser.isFirefox()||t.inline)&&(CA(n),WL(t,r)),rS(t)},rS=t=>t.editorManager.setActive(t),$R=(t,e)=>{t.removed||(e?rS(t):UY(t))},Qt={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:t=>t.shiftKey||t.ctrlKey||t.altKey||Qt.metaKeyPressed(t),metaKeyPressed:t=>Oo.os.isMacOS()||Oo.os.isiOS()?t.metaKey:t.ctrlKey&&!t.altKey},lh="data-mce-selected",qL=`table,img,figure.image,hr,video,span.mce-preview-object,details,${Xx}`,KL=Math.abs,wA=Math.round,LR={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},YL=t=>t.type==="longpress"||t.type.indexOf("touch")===0,XL=(t,e)=>{const n=e.dom,r=e.getDoc(),i=document,u=e.getBody();let g,b,x,w,E,D,R,N,H,$,U,J,Q,et,ft;const St=yt=>mt(yt)&&(Ri(yt)||n.is(yt,"figure.image")),Gt=yt=>Bi(yt)||n.hasClass(yt,"mce-preview-object"),ge=(yt,zt)=>{if(YL(yt)){const re=yt.touches[0];return St(yt.target)&&!OR(re.clientX,re.clientY,zt)}else return St(yt.target)&&!OR(yt.clientX,yt.clientY,zt)},ht=yt=>
12{const zt=yt.target;ge(yt,e.selection.getRng())&&!yt.isDefaultPrevented()&&e.selection.select(zt)},it=yt=>n.hasClass(yt,"mce-preview-object")&&mt(yt.firstElementChild)?[yt,yt.firstElementChild]:n.is(yt,"figure.image")?[yt.querySelector("img")]:[yt],bt=yt=>{const zt=x_(e);return!zt||e.mode.isReadOnly()||yt.getAttribute("data-mce-resize")==="false"||yt===e.getBody()?!1:n.hasClass(yt,"mce-preview-object")&&mt(yt.firstElementChild)?ei(Z.fromDom(yt.firstElementChild),zt):ei(Z.fromDom(yt),zt)},qt=(yt,zt)=>{if(Gt(zt))return yt.create("img",{src:Oo.transparentSrc});if(pa(zt)){const fo=Ze(w.name,"n")?Vs:Ur,Ye=zt.cloneNode(!0);return fo(yt.select("tr",Ye)).each(en=>{const ul=yt.select("td,th",en);yt.setStyle(en,"height",null),Y(ul,qa=>yt.setStyle(qa,"height",null))}),Ye}else return zt.cloneNode(!0)},De=(yt,zt,re)=>{yt[zt]=re;const fo=400;if(yt.width>fo&&!(zt==="width"&&re<fo))yt[zt]=re,n.setStyle(yt,zt,re);else{const Ye=zt==="height"?fo*($??1):fo;yt[zt]=Ye,n.setStyle(yt,zt,Ye)}},Oe=(yt,zt,re)=>{if(mt(re)){const fo=it(yt);Y(fo,Ye=>{fp(Ye)?De(Ye,zt,re):Ye.style[zt]||!e.schema.isValid(Ye.nodeName.toLowerCase(),zt)?n.setStyle(Ye,zt,re):n.setAttrib(Ye,zt,""+re)})}},Co=(yt,zt,re)=>{Oe(yt,"width",zt),Oe(yt,"height",re)},Yo=yt=>{let zt,re,fo,Ye,en;zt=yt.screenX-D,re=yt.screenY-R,J=zt*w[2]+N,Q=re*w[3]+H,J=J<5?5:J,Q=Q<5?5:Q,(St(g)||Gt(g)||fp(g))&&FE(e)!==!1?fo=!Qt.modifierPressed(yt):fo=Qt.modifierPressed(yt),fo&&(KL(zt)>KL(re)?(Q=wA(J*$),J=wA(Q/$)):(J=wA(Q/$),Q=wA(J*$))),Co(b,J,Q),Ye=w.startPos.x+zt,en=w.startPos.y+re,Ye=Ye>0?Ye:0,en=en>0?en:0,n.setStyles(x,{left:Ye,top:en,display:"block"}),x.innerHTML=J+" × "+Q,zt=u.scrollWidth-et,re=u.scrollHeight-ft,zt+re!==0&&n.setStyles(x,{left:Ye-zt,top:en-re}),U||(Kw(e,g,N,H,"corner-"+w.name),U=!0)},_n=()=>{const yt=U;U=!1,yt&&(Oe(g,"width",J),Oe(g,"height",Q)),n.unbind(r,"mousemove",Yo),n.unbind(r,"mouseup",_n),i!==r&&(n.unbind(i,"mousemove",Yo),n.unbind(i,"mouseup",_n)),n.remove(b),n.remove(x),n.remove(E),In(g),yt&&(Z2(e,g,J,Q,"corner-"+w.name),n.setAttrib(g,"style",n.getAttrib(g,"style"))),e.nodeChanged()},In=yt=>{Ho();const zt=n.getPos(yt,u),re=zt.x,fo=zt.y,Ye=yt.getBoundingClientRect(),en=Ye.width||Ye.right-Ye.left,ul=Ye.height||Ye.bottom-Ye.top;g!==yt&&(zi(),g=yt,J=Q=0);const qa=e.dispatch("ObjectSelected",{target:yt});bt(yt)&&!qa.isDefaultPrevented()?Do(LR,(dl,_c)=>{const Wf=hi=>{const pg=it(g)[0];D=hi.screenX,R=hi.screenY,N=pg.clientWidth,H=pg.clientHeight,$=H/N,w=dl,w.name=_c,w.startPos={x:en*dl[0]+re,y:ul*dl[1]+fo},et=u.scrollWidth,ft=u.scrollHeight,E=n.add(u,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),n.setStyles(E,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),b=qt(n,g),n.addClass(b,"mce-clonedresizable"),n.setAttrib(b,"data-mce-bogus","all"),b.contentEditable="false",n.setStyles(b,{left:re,top:fo,margin:0}),Co(b,en,ul),b.removeAttribute(lh),u.appendChild(b),n.bind(r,"mousemove",Yo),n.bind(r,"mouseup",_n),i!==r&&(n.bind(i,"mousemove",Yo),n.bind(i,"mouseup",_n)),x=n.add(u,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},N+" × "+H)};let Aa=n.get("mceResizeHandle"+_c);Aa&&n.remove(Aa),Aa=n.add(u,"div",{id:"mceResizeHandle"+_c,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+_c+"-resize; margin:0; padding:0"}),n.bind(Aa,"mousedown",hi=>{hi.stopImmediatePropagation(),hi.preventDefault(),Wf(hi)}),dl.elm=Aa,n.setStyles(Aa,{left:en*dl[0]+re-Aa.offsetWidth/2,top:ul*dl[1]+fo-Aa.offsetHeight/2})}):zi(!1)},vr=oe(In,0),zi=(yt=!0)=>{vr.cancel(),Ho(),g&&yt&&g.removeAttribute(lh),Do(LR,(zt,re)=>{const fo=n.get("mceResizeHandle"+re);fo&&(n.unbind(fo),n.remove(fo))})},Yt=(yt,zt)=>n.isChildOf(yt,zt),Ce=yt=>{if(U||e.removed||e.composing)return;const zt=yt.type==="mousedown"?yt.target:t.getNode(),re=_r(Z.fromDom(zt),qL).map(Ye=>Ye.dom).filter(Ye=>n.isEditable(Ye.parentElement)||Ye.nodeName==="IMG"&&n.isEditable(Ye)).getOrUndefined(),fo=mt(re)?n.getAttrib(re,lh,"1"):"1";if(Y(n.select(`img[${lh}],hr[${lh}]`),Ye=>{Ye.removeAttribute(lh)}),mt(re)&&Yt(re,u)&&IR(e)){No();const Ye=t.getStart(!0);if(Yt(Ye,re)&&Yt(t.getEnd(!0),re)){n.setAttrib(re,lh,fo),vr.throttle(re);return}}zi()},Ho=()=>{Do(LR,yt=>{yt.elm&&(n.unbind(yt.elm),delete yt.elm)})},No=()=>{try{e.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};return e.on("init",()=>
12{No(),e.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",Ce),e.on("keyup compositionend",yt=>{g&&g.nodeName==="TABLE"&&Ce(yt)}),e.on("hide blur",zi),e.on("contextmenu longpress",ht,!0)}),e.on("remove",Ho),{isResizable:bt,showResizeRect:In,hideResizeRect:zi,updateResizeRect:Ce,destroy:()=>{vr.cancel(),g=b=E=null}}},HR=(t,e,n)=>{const r=hu(Z.fromDom(n));return k1(r.dom,t,e).map(i=>{const u=n.createRange();return u.setStart(i.start.dom,i.soffset),u.setEnd(i.finish.dom,i.foffset),u}).getOrUndefined()},Xm=(t,e)=>mt(t)&&mt(e)&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset,JL=(t,e,n)=>{let r=t;for(;r&&r!==e;){if(n(r))return r;r=r.parentNode}return null},_A=(t,e,n)=>JL(t,e,n)!==null,zR=(t,e,n)=>_A(t,e,r=>r.nodeName===n),VR=(t,e)=>ci(t)&&!_A(t,e,B),SA=(t,e,n)=>{const r=e.parentNode;if(r){const i=new ts(e,t.getParent(r,t.isBlock)||t.getRoot());let u;for(;u=i[n?"prev":"next"]();)if(Wn(u))return!0}return!1},kA=(t,e)=>{var n;return((n=t.previousSibling)==null?void 0:n.nodeName)===e},WY=(t,e)=>{let n=e;for(;n&&n!==t;){if(On(n))return!0;n=n.parentNode}return!1},EA=(t,e,n,r,i)=>{const u=t.getRoot(),g=t.schema.getNonEmptyElements(),b=i.parentNode;let x,w;if(!b)return F.none();const E=t.getParent(b,t.isBlock)||u;if(r&&Wn(i)&&e&&t.isEmpty(E))return F.some(gt(b,t.nodeIndex(i)));const D=new ts(i,E);for(;w=D[r?"prev":"next"]();){if(t.getContentEditableParent(w)==="false"||VR(w,u))return F.none();if(Nt(w)&&w.data.length>0)return zR(w,u,"A")?F.none():F.some(gt(w,r?w.data.length:0));if(t.isBlock(w)||g[w.nodeName.toLowerCase()])return F.none();x=w}return to(x)?F.none():n&&x?F.some(gt(x,0)):F.none()},QL=(t,e,n,r)=>{const i=t.getRoot();let u,g=!1,b=n?r.startContainer:r.endContainer,x=n?r.startOffset:r.endOffset;const w=jt(b)&&x===b.childNodes.length,E=t.schema.getNonEmptyElements();let D=n;if(ci(b))return F.none();if(jt(b)&&x>b.childNodes.length-1&&(D=!1),_u(b)&&(b=i,x=0),b===i){if(D&&(u=b.childNodes[x>0?x-1:0],u&&(ci(u)||E[u.nodeName]||pa(u))))return F.none();if(b.hasChildNodes()){if(x=Math.min(!D&&x>0?x-1:x,b.childNodes.length-1),b=b.childNodes[x],x=Nt(b)&&w?b.data.length:0,!e&&b===i.lastChild&&pa(b)||WY(i,b)||ci(b)||gp(b))return F.none();if(b.hasChildNodes()&&!pa(b)){u=b;const R=new ts(b,i);do{if(On(u)||ci(u)){g=!1;break}if(Nt(u)&&u.data.length>0){x=D?0:u.data.length,b=u,g=!0;break}if(E[u.nodeName.toLowerCase()]&&!Kx(u)){x=t.nodeIndex(u),b=u.parentNode,D||x++,g=!0;break}}while(u=D?R.next():R.prev())}}}return e&&(Nt(b)&&x===0&&EA(t,w,e,!0,b).each(R=>{b=R.container(),x=R.offset(),g=!0}),jt(b)&&(u=b.childNodes[x],u||(u=b.childNodes[x-1]),u&&Wn(u)&&!kA(u,"A")&&!SA(t,u,!1)&&!SA(t,u,!0)&&EA(t,w,e,!0,u).each(R=>{b=R.container(),x=R.offset(),g=!0}))),D&&!e&&Nt(b)&&x===b.data.length&&EA(t,w,e,!1,b).each(R=>{b=R.container(),x=R.offset(),g=!0}),g&&b?F.some(gt(b,x)):F.none()},aS=(t,e)=>{const n=e.collapsed,r=e.cloneRange(),i=gt.fromRangeStart(e);return QL(t,n,!0,r).each(u=>{(!n||!gt.isAbove(i,u))&&r.setStart(u.container(),u.offset())}),n||QL(t,n,!1,r).each(u=>{r.setEnd(u.container(),u.offset())}),n&&r.collapse(!0),Xm(e,r)?F.none():F.some(r)},iS=(t,e)=>t.splitText(e),ob=t=>{let e=t.startContainer,n=t.startOffset,r=t.endContainer,i=t.endOffset;if(e===r&&Nt(e)){if(n>0&&n<e.data.length)if(r=iS(e,n),e=r.previousSibling,i>n){i=i-n;const u=iS(r,i).previousSibling;e=r=u,i=u.data.length,n=0}else i=0}else if(Nt(e)&&n>0&&n<e.data.length&&(e=iS(e,n),n=0),Nt(r)&&i>0&&i<r.data.length){const u=iS(r,i).previousSibling;r=u,i=u.data.length}return{startContainer:e,startOffset:n,endContainer:r,endOffset:i}},Uu=t=>({walk:(u,g)=>Hl(t,u,g),split:ob,expand:(u,g={type:"word"})=>{if(g.type==="word"){const b=Wd(t,u,[{inline:"span"}],{includeTrailingSpace:!1,expandToBlock:!1}),x=t.createRng();return x.setStart(b.startContainer,b.startOffset),x.setEnd(b.endContainer,b.endOffset),x}return u},normalize:u=>aS(t,u).fold(pt,g=>(u.setStart(g.startContainer,g.startOffset),u.setEnd(g.endContainer,g.endOffset),!0))});Uu.compareRanges=Xm,Uu.getCaretRangeFromPoint=HR,Uu.getSelectedNode=Ls,Uu.getNode=Bd;const t9=(t,e)=>t.view(e).fold(Ut([]),r=>{const i=t.owner(r),u=t9(t,i);return[r].concat(u)}),ZY=(t,e)=>{const n=e.owner(t);return t9(e,n)};var GY=Object.freeze({__proto__:null,view:t=>{var n;return(t.dom===document?F.none():F.from((n=t.dom.defaultView)==null?void 0:n.frameElement)).map(Z.fromDom)},owner:t=>Bc(t)});const e9=t=>{const e=m1(),n=Px(e),r=ZY(t,GY),i=ap(t),u=Je(r,(g,b)=>{const x=ap(b);return{left:g.left+x.left,top:g.top+x.top}},{left:0,top:0});return Ic(u.left+i.left+n.left,u.top+i.top+n.top)},cS=t=>oo(t)==="textarea",o9=(t,e)=>t.dispatch("ScrollIntoView",e).isDefaultPrevented(),UR=(t,e)=>{t.dispatch("AfterScrollIntoView",e)},qY=(t,e)=>{const n=Qn(t);if(n.length===0||cS(t))return{element:t,offset:e};if(e<n.length&&!cS(n[e]))return{element:n[e],offset:0};{const r=n[n.length-1];return cS(r)?{element:t,offset:e}:oo(r)==="img"?{element:r,offset:1}:zo(r)?{element:r,offset:$r(r).length}:{element:r,offset:Qn(r).length}}},WR=(t,e)=>{const n=rp(t),r=_k(t);return{element:t,bottom:n.top+r,height:r,pos:n,cleanup:e}},ZR=(t,e)=>{const n=qY(t,e),r=Z.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+$s+"</span>");return wr(n.element,r),WR(r,()=>xn(r))},n9=t=>WR(Z.fromDom(t),_e),jR=(t,e,n,r)=>{r9(t,(i,u)=>s9(t,e,n,r),n)},GR=(t,e,n,r,i)=>
12{const u={elm:r.element.dom,alignToTop:i};if(o9(t,u))return;const g=Px(e).top;n(t,e,g,r,i),UR(t,u)},s9=(t,e,n,r)=>{const i=Z.fromDom(t.getBody()),u=Z.fromDom(t.getDoc());Nx(i);const g=ZR(Z.fromDom(n.startContainer),n.startOffset);GR(t,u,e,g,r),g.cleanup()},qR=(t,e,n,r)=>{const i=Z.fromDom(t.getDoc());GR(t,i,n,n9(e),r)},r9=(t,e,n)=>{const r=n.startContainer,i=n.startOffset,u=n.endContainer,g=n.endOffset;e(Z.fromDom(r),Z.fromDom(u));const b=t.dom.createRng();b.setStart(r,i),b.setEnd(u,g),t.selection.setRng(n)},AA=(t,e,n,r,i)=>{const u=e.pos,g=30;if(r)jC(u.left,Math.max(0,u.top-g),i);else{const b=u.top-n+e.height+g;jC(-t.getBody().getBoundingClientRect().left,b,i)}},KR=(t,e,n,r,i,u)=>{const g=r+n,b=i.pos.top,x=i.bottom,w=x-b>=r;b<n?AA(t,i,r,u!==!1,e):b>g?AA(t,i,r,w?u!==!1:u===!0,e):x>g&&!w&&AA(t,i,r,u===!0,e)},YR=(t,e,n,r,i)=>{const u=hu(e).dom.innerHeight;KR(t,e,n,u,r,i)},XR=(t,e,n,r,i)=>{const u=hu(e).dom.innerHeight;KR(t,e,n,u,r,i);const g=e9(r.element),b=Na(window);g.top<b.y?ec(r.element,i!==!1):g.top>b.bottom&&ec(r.element,i===!0)},a9=(t,e,n)=>jR(t,YR,e,n),i9=(t,e,n)=>qR(t,e,YR,n),c9=(t,e,n)=>jR(t,XR,e,n),l9=(t,e,n)=>qR(t,e,XR,n),ne=(t,e,n)=>{(t.inline?i9:l9)(t,e,n)},hc=(t,e,n)=>{(t.inline?a9:c9)(t,e,n)},u9=(t,e)=>e.collapsed?t.isEditable(e.startContainer):t.isEditable(e.startContainer)&&t.isEditable(e.endContainer),JR=(t,e,n,r,i)=>{const u=n?e.startContainer:e.endContainer,g=n?e.startOffset:e.endOffset;return F.from(u).map(Z.fromDom).map(b=>!r||!e.collapsed?Xi(b,i(b,g)).getOr(b):b).bind(b=>Jn(b)?F.some(b):oi(b).filter(Jn)).map(b=>b.dom).getOr(t)},lS=(t,e,n=!1)=>JR(t,e,!0,n,(r,i)=>Math.min(pm(r),i)),TA=(t,e,n=!1)=>JR(t,e,!1,n,(r,i)=>i>0?i-1:i),DA=(t,e)=>{const n=t;for(;t&&Nt(t)&&t.length===0;)t=e?t.nextSibling:t.previousSibling;return t||n},OA=(t,e)=>{if(!e)return t;let n=e.startContainer,r=e.endContainer;const i=e.startOffset,u=e.endOffset;let g=e.commonAncestorContainer;e.collapsed||(n===r&&u-i<2&&n.hasChildNodes()&&(g=n.childNodes[i]),Nt(n)&&Nt(r)&&(n.length===i?n=DA(n.nextSibling,!0):n=n.parentNode,u===0?r=DA(r.previousSibling,!1):r=r.parentNode,n&&n===r&&(g=n)));const b=Nt(g)?g.parentNode:g;return fa(b)?b:t},d9=(t,e,n,r)=>{const i=[],u=t.getRoot(),g=t.getParent(n||lS(u,e,e.collapsed),t.isBlock),b=t.getParent(r||TA(u,e,e.collapsed),t.isBlock);if(g&&g!==u&&i.push(g),g&&b&&g!==b){let x;const w=new ts(g,u);for(;(x=w.next())&&x!==b;)t.isBlock(x)&&i.push(x)}return b&&g!==b&&b!==u&&i.push(b),i},QR=(t,e,n)=>F.from(e).bind(r=>F.from(r.parentNode).map(i=>{const u=t.nodeIndex(r),g=t.createRng();return g.setStart(i,u),g.setEnd(i,u+1),n&&(j_(t,g,r,!0),j_(t,g,r,!1)),g})),RA=(t,e)=>wt(e,n=>{const r=t.dispatch("GetSelectionRange",{range:n});return r.range!==n?r.range:n}),m9={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},uS=(t,e,n)=>{const r=n?"lastChild":"firstChild",i=n?"prev":"next";if(t[r])return t[r];if(t!==e){let u=t[i];if(u)return u;for(let g=t.parent;g&&g!==e;g=g.parent)if(u=g[i],u)return u}},g9=t=>{const e=t.value??"";if(!Bg(e))return!1;const n=t.parent;return!(n&&(n.name!=="span"||n.attr("style"))&&/^[ ]+$/.test(e))},t8=t=>{const e=t.name==="a"&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||e};class hr{constructor(e,n){Ft(this,"name");Ft(this,"type");Ft(this,"attributes");Ft(this,"value");Ft(this,"parent");Ft(this,"firstChild");Ft(this,"lastChild");Ft(this,"next");Ft(this,"prev");Ft(this,"raw");this.name=e,this.type=n,n===1&&(this.attributes=[],this.attributes.map={})}static create(e,n){const r=new hr(e,m9[e]||1);return n&&Do(n,(i,u)=>{r.attr(u,i)}),r}replace(e){const n=this;return e.parent&&e.remove(),n.insert(e,n),n.remove(),n}attr(e,n){const r=this;if(!q(e))return mt(e)&&Do(e,(u,g)=>{r.attr(g,u)}),r;const i=r.attributes;if(i){if(n!==void 0){if(n===null){if(e in i.map){delete i.map[e];let u=i.length;for(;u--;)if(i[u].name===e)return i.splice(u,1),r}return r}if(e in i.map){let u=i.length;for(;u--;)if(i[u].name===e){i[u].value=n;break}}else i.push({name:e,value:n});return i.map[e]=n,r}return i.map[e]}}clone(){const e=this,n=new hr(e.name,e.type),r=e.attributes;if(r){const i=[];i.map={};for(let u=0,g=r.length;u<g;u++){const b=r[u];b.name!=="id"&&(i[i.length]={name:b.name,value:b.value},i.map[b.name]=b.value)}n.attributes=i}return n.value=e.value,n}wrap(e){const n=this;return n.parent&&(n.parent.insert(e,n),e.append(n)),n}unwrap(){const e=this;for(let n=e.firstChild;n;){const r=n.next;e.insert(n,e,!0),n=r}e.remove()}remove(){const e=this,n=e.parent,r=e.next,i=e.prev;return n&&(n.firstChild===e?(n.firstChild=r,r&&(r.prev=null)):i&&(i.next=r),n.lastChild===e?(n.lastChild=i,i&&(i.next=null)):r&&(r.prev=i),e.parent=e.next=e.prev=null),e}append(e){const n=this;e.parent&&e.remove();const r=n.lastChild;return r?(r.next=e,e.prev=r,n.lastChild=e):n.lastChild=n.firstChild=e,e.parent=n,e}insert(e,n,r){e.parent&&e.remove();const i=n.parent||this;
12return r?(n===i.firstChild?i.firstChild=e:n.prev&&(n.prev.next=e),e.prev=n.prev,e.next=n,n.prev=e):(n===i.lastChild?i.lastChild=e:n.next&&(n.next.prev=e),e.next=n.next,e.prev=n,n.next=e),e.parent=i,e}getAll(e){const n=this,r=[];for(let i=n.firstChild;i;i=uS(i,n))i.name===e&&r.push(i);return r}children(){const e=this,n=[];for(let r=e.firstChild;r;r=r.next)n.push(r);return n}empty(){const e=this;if(e.firstChild){const n=[];for(let i=e.firstChild;i;i=uS(i,e))n.push(i);let r=n.length;for(;r--;){const i=n[r];i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}}return e.firstChild=e.lastChild=null,e}isEmpty(e,n={},r){const i=this;let u=i.firstChild;if(t8(i))return!1;if(u)do{if(u.type===1){if(u.attr("data-mce-bogus"))continue;if(e[u.name]||t8(u))return!1}if(u.type===8||u.type===3&&!g9(u)||u.type===3&&u.parent&&n[u.parent.name]&&Bg(u.value??"")||r&&r(u))return!1}while(u=uS(u,i));return!0}walk(e){return uS(this,null,e)}}const f9=Mt.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),e8=t=>q(t.nodeValue)&&t.nodeValue.includes($s),o8=t=>`${t.length===0?"":`${wt(t,e=>`[${e}]`).join(",")},`}[data-mce-bogus="all"]`,p9=(t,e)=>e.querySelectorAll(o8(t)),n8=t=>document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,e=>e8(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP),BA=t=>document.createTreeWalker(t,NodeFilter.SHOW_TEXT,e=>{if(e8(e)){const n=e.parentNode;return n&&Xe(f9,n.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}else return NodeFilter.FILTER_SKIP}),dS=t=>n8(t).nextNode()!==null,h9=t=>BA(t).nextNode()!==null,b9=(t,e)=>e.querySelector(o8(t))!==null,x9=(t,e)=>{Y(p9(t,e),n=>{const r=Z.fromDom(n);Dn(r,"data-mce-bogus")==="all"?xn(r):Y(t,i=>{Hn(r,i)&&As(r,i)})})},s8=t=>{let e=t.nextNode();for(;e!==null;)e.nodeValue=null,e=t.nextNode()},v9=k(s8,n8),y9=k(s8,BA),r8=(t,e)=>{const n=[{condition:Et(b9,e),action:Et(x9,e)},{condition:dS,action:v9},{condition:h9,action:y9}];let r=t,i=!1;return Y(n,({condition:u,action:g})=>{u(r)&&(i||(r=t.cloneNode(!0),i=!0),g(r))}),r},a8=t=>{const e=dr(t,"[data-mce-bogus]");Y(e,n=>{Dn(n,"data-mce-bogus")==="all"?xn(n):cc(n)?(wr(n,Z.fromText(Kf)),xn(n)):Ai(n)})},i8=t=>{const e=dr(t,"input");Y(e,n=>{As(n,"name")})},C9=(t,e)=>{const n=ws(t),r=new RegExp(`^(<${n}[^>]*>( | |\\s|Â |<br \\/>|)<\\/${n}>[\r 13]*|<br \\/>[\r 14]*)$`);return e.replace(r,"")},w9=(t,e)=>{const n=t.getDoc(),r=ar(Z.fromDom(t.getBody())),i=Z.fromTag("div",n);qn(i,"data-mce-bogus","all"),Ti(i,{position:"fixed",left:"-9999999px",top:"0"}),xu(i,e.innerHTML),a8(i),i8(i);const u=zC(r);Ro(u,i);const g=ya(i.dom.innerText);return xn(i),g},_9=(t,e,n)=>{let r;return e.format==="raw"?r=Mt.trim(ya(r8(n,t.serializer.getTempAttrs()).innerHTML)):e.format==="text"?r=w9(t,n):e.format==="tree"?r=t.serializer.serialize(n,e):r=C9(t,t.serializer.serialize(n,e)),e.format!=="text"&&!X1(Z.fromDom(n))&&q(r)?Mt.trim(r):r},S9=(t,e)=>F.from(t.getBody()).fold(Ut(e.format==="tree"?new hr("body",11):""),n=>_9(t,e,n)),c8=Mt.makeMap,FA=t=>{const e=[];t=t||{};const n=t.indent,r=c8(t.indent_before||""),i=c8(t.indent_after||""),u=La.getEncodeFunc(t.entity_encoding||"raw",t.entities),g=t.element_format!=="xhtml";return{start:(b,x,w)=>{if(n&&r[b]&&e.length>0){const E=e[e.length-1];E.length>0&&E!==` 15`&&e.push(` 16`)}if(e.push("<",b),x)for(let E=0,D=x.length;E<D;E++){const R=x[E];e.push(" ",R.name,'="',u(R.value,!0),'"')}if(!w||g?e[e.length]=">":e[e.length]=" />",w&&n&&i[b]&&e.length>0){const E=e[e.length-1];E.length>0&&E!==` 17`&&e.push(` 18`)}},end:b=>{let x;e.push("</",b,">"),n&&i[b]&&e.length>0&&(x=e[e.length-1],x.length>0&&x!==` 19`&&e.push(` 20`))},text:(b,x)=>{b.length>0&&(e[e.length]=x?b:u(b))},cdata:b=>{e.push("<![CDATA[",b,"]]>")},comment:b=>{e.push("<!--",b,"-->")},pi:(b,x)=>{x?e.push("<?",b," ",u(x),"?>"):e.push("<?",b,"?>"),n&&e.push(` 21`)},doctype:b=>{e.push("<!DOCTYPE",b,">",n?` 22`:"")},reset:()=>{e.length=0},getContent:()=>e.join("").replace(/\n$/,"")}},yf=(t={},e=mr())=>{const n=FA(t);return t.validate="validate"in t?t.validate:!0,{serialize:i=>{const u=t.validate,g={3:x=>{n.text(x.value??"",x.raw)},8:x=>{n.comment(x.value??"")},7:x=>{n.pi(x.name,x.value)},10:x=>{n.doctype(x.value??"")},4:x=>{n.cdata(x.value??"")},11:x=>{let w=x;if(w=w.firstChild)do b(w);while(w=w.next)}};n.reset();const b=x=>{var E;const w=g[x.type];if(w)w(x);else{const D=x.name,R=D in e.getVoidElements();let N=x.attributes;if(u&&N&&N.length>1){const H=[];H.map={};const $=e.getElementRule(x.name);if($){for(let U=0,J=$.attributesOrder.length;U<J;U++){const Q=$.attributesOrder[U];if(Q in N.map){const et=N.map[Q];H.map[Q]=et,H.push({name:Q,value:et})}}for(let U=0,J=N.length;U<J;U++){const Q=N[U].name;if(!(Q in H.map)){const et=N.map[Q];H.map[Q]=et,H.push({name:Q,value:et})}}N=H}}if(n.start(D,N,R),Cm(D))q(x.value)&&n.text(x.value,!0),n.end(D);else if(!R){let H=x.firstChild;if(H){(D==="pre"||D==="textarea")&&H.type===3&&((E=H.value)==null?void 0:E[0])===` 23`&&n.text(` 24`,!0);do b(H);while(H=H.next)}n.end(D)}}};return i.type===1&&!t.inner?b(i):i.type===3?g[3](i):g[11](i),n.getContent()}}},l8=new Set;Y(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],e=>{l8.add(e)});const zv=new Set;Y(["background-color"],e=>{zv.add(e)});const Cf=["font","text-decoration","text-emphasis"],mS=(t,e)=>t.parseStyle(t.getAttrib(e,"style")),nb=(t,e)=>he(mS(t,e)),k9=t=>l8.has(t),E9=t=>zv.has(t),u8=(t,e)=>$t(nb(t,e),n=>k9(n)),d8=(t,e)=>u8(t,e)&&$t(nb(t,e),n=>E9(n)),A9=t=>st(t,e=>$t(Cf,n=>Ze(e,n))),T9=(t,e,n)=>{const r=nb(t,e),i=nb(t,n),u=g=>{const b=t.getStyle(e,g)??"",x=t.getStyle(n,g)??"";return ls(b)&&ls(x)&&b!==x};return $t(r,g=>{const b=x=>$t(x,w=>w===g);if(!b(i)&&b(Cf)){const x=A9(i);return $t(x,u)}else return u(g)})},MA=(t,e,n)=>F.from(n.container()).filter(Nt).exists(r=>{const i=t?0:-1;return e(r.data.charAt(n.offset()+i))}),NA=Et(MA,!0,er),gS=Et(MA,!1,er),D9=t=>{const e=t.container();return Nt(e)&&(e.data.length===0||Tp(e.data)&&Q0.isBookmarkNode(e.parentNode))},wf=(t,e)=>n=>wv(t?0:-1,n).filter(e).isSome(),m8=t=>Ri(t)&&rs(Z.fromDom(t),"display")==="block",PA=t=>On(t)&&!zk(t),IA=wf(!0,m8),g8=wf(!1,m8),Vv=wf(!0,Bi),Uv=wf(!1,Bi),Wv=wf(!0,pa),$A=wf(!1,pa),Jm=wf(!0,PA),Zd=wf(!1,PA),f8=t=>t.slice(0,-1),O9=(t,e,n)=>_i(e,t)?f8(Si(t,r=>n(r)||ho(r,e))):[],p8=(t,e)=>O9(t,e,pt),Ul=(t,e)=>[t].concat(p8(t,e)),fS=(t,e,n)=>Ii(t,e,n,D9),h8=t=>e=>t.isBlock(oo(e)),LA=(t,e,n)=>Xo(Ul(Z.fromDom(e.container()),t),h8(n)),HA=(t,e,n,r)=>fS(t,e.dom,n).forall(i=>LA(e,n,r).fold(()=>!Il(i,n,e.dom),u=>!Il(i,n,e.dom)&&_i(u,Z.fromDom(i.container())))),zA=(t,e,n,r)=>LA(e,n,r).fold(()=>fS(t,e.dom,n).forall(i=>!Il(i,n,e.dom)),i=>fS(t,i.dom,n).isNone()),pS=Et(zA,!1),VA=Et(zA,!0),b8=Et(HA,!1),x8=Et(HA,!0),v8=t=>ah(t).exists(cc),hS=(t,e,n,r)=>{const i=st(Ul(Z.fromDom(n.container()),e),g=>r.isBlock(oo(g))),u=Vs(i).getOr(e);return ui(t,u.dom,n).filter(v8)},UA=(t,e,n)=>ah(e).exists(cc)||hS(!0,t,e,n).isSome(),bS=(t,e,n)=>_v(e).exists(cc)||hS(!1,t,e,n).isSome(),y8=Et(hS,!1),R9=Et(hS,!0),C8=t=>gt.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd(),w8=(t,e,n)=>{const r=st(Ul(Z.fromDom(e.container()),t),i=>n.isBlock(oo(i)));return Vs(r).getOr(t)},_8=(t,e,n)=>C8(e)?gS(e):gS(e)||h(w8(t,e,n).dom,e).exists(gS),S8=(t,e,n)=>C8(e)?NA(e):NA(e)||m(w8(t,e,n).dom,e).exists(NA),B9=t=>xt(["pre","pre-wrap"],t),xS=t=>ah(t).bind(e=>sn(e,Jn)).exists(e=>
24B9(rs(e,"white-space"))),KY=(t,e)=>h(t.dom,e).isNone(),YY=(t,e)=>m(t.dom,e).isNone(),F9=(t,e,n)=>KY(t,e)||YY(t,e)||pS(t,e,n)||VA(t,e,n)||bS(t,e,n)||UA(t,e,n),XY=t=>mt(t)&&On(t)&&vv(t),k8=(t,e)=>n=>XY(new ts(n,t)[e]()),oa=(t,e)=>{const n=m(t.dom,e).getOr(e),r=k8(t.dom,"next");return e.isAtEnd()&&(r(e.container())||r(n.container()))},M9=(t,e)=>{const n=h(t.dom,e).getOr(e),r=k8(t.dom,"prev");return e.isAtStart()&&(r(e.container())||r(n.container()))},N9=(t,e,n)=>xS(e)?!1:F9(t,e,n)||_8(t,e,n)||S8(t,e,n),Zv=(t,e,n)=>xS(e)?!1:pS(t,e,n)||b8(t,e,n)||bS(t,e,n)||_8(t,e,n)||M9(t,e),P9=t=>{const e=t.container(),n=t.offset();return Nt(e)&&n<e.data.length?gt(e,n+1):t},na=(t,e,n)=>xS(e)?!1:VA(t,e,n)||x8(t,e,n)||UA(t,e,n)||S8(t,e,n)||oa(t,e),E8=(t,e,n)=>Zv(t,e,n)||na(t,P9(e),n),A8=(t,e)=>ea(t.charAt(e)),I9=(t,e)=>er(t.charAt(e)),$9=t=>{const e=t.container();return Nt(e)&&Rs(e.data,Bs)},L9=t=>{const e=t.split("");return wt(e,(n,r)=>ea(n)&&r>0&&r<e.length-1&&Lu(e[r-1])&&Lu(e[r+1])?" ":n).join("")},H9=(t,e,n,r)=>{const i=e.data,u=gt(e,0);return!n&&A8(i,0)&&!E8(t,u,r)?(e.data=" "+i.slice(1),!0):n&&I9(i,0)&&Zv(t,u,r)?(e.data=Bs+i.slice(1),!0):!1},z9=t=>{const e=t.data,n=L9(e);return n!==e?(t.data=n,!0):!1},mi=(t,e,n,r)=>{const i=e.data,u=gt(e,i.length-1);return!n&&A8(i,i.length-1)&&!E8(t,u,r)?(e.data=i.slice(0,-1)+" ",!0):n&&I9(i,i.length-1)&&na(t,u,r)?(e.data=i.slice(0,-1)+Bs,!0):!1},T8=(t,e,n)=>{const r=e.container();if(!Nt(r))return F.none();if($9(e)){const i=H9(t,r,!1,n)||z9(r)||mi(t,r,!1,n);return Ec(i,e)}else if(E8(t,e,n)){const i=H9(t,r,!0,n)||mi(t,r,!0,n);return Ec(i,e)}else return F.none()},D8=t=>{const e=Z.fromDom(t.getBody());t.selection.isCollapsed()&&T8(e,gt.fromRangeStart(t.selection.getRng()),t.schema).each(n=>{t.selection.setRng(n.toRange())})},O8=(t,e,n,r)=>{if(n===0)return;const i=Z.fromDom(t),u=Sl(i,w=>r.isBlock(oo(w))).getOr(i),g=t.data.slice(e,e+n),b=e+n>=t.data.length&&na(u,gt(t,t.data.length),r),x=e===0&&Zv(u,gt(t,0),r);t.replaceData(e,n,A1(g,4,x,b))},vS=(t,e,n)=>{const r=t.data.slice(e),i=r.length-dx(r).length;O8(t,e,i,n)},yS=(t,e,n)=>{const r=t.data.slice(0,e),i=r.length-SC(r).length;O8(t,e-i,i,n)},CS=(t,e,n,r,i=!0)=>{const u=SC(t.data).length,g=i?t:e,b=i?e:t;return i?g.appendData(b.data):g.insertData(0,b.data),xn(Z.fromDom(b)),r&&vS(g,u,n),g},V9=(t,e)=>{const n=t.container(),r=t.offset();return!gt.isTextPosition(t)&&n===e.parentNode&&r>gt.before(e).offset()},U9=(t,e)=>V9(e,t)?gt(e.container(),e.offset()-1):e,W9=t=>Nt(t)?gt(t,0):gt.before(t),Z9=t=>Nt(t)?gt(t,t.data.length):gt.after(t),WA=t=>Mn(t.previousSibling)?F.some(Z9(t.previousSibling)):t.previousSibling?S(t.previousSibling):F.none(),R8=t=>Mn(t.nextSibling)?F.some(W9(t.nextSibling)):t.nextSibling?v(t.nextSibling):F.none(),B8=(t,e)=>F.from(e.previousSibling?e.previousSibling:e.parentNode).bind(n=>h(t,gt.before(n))).orThunk(()=>m(t,gt.after(e))),j9=(t,e)=>m(t,gt.after(e)).orThunk(()=>h(t,gt.before(e))),JY=(t,e)=>WA(e).orThunk(()=>R8(e)).orThunk(()=>B8(t,e)),G9=(t,e)=>R8(e).orThunk(()=>WA(e)).orThunk(()=>j9(t,e)),q9=(t,e,n)=>t?G9(e,n):JY(e,n),QY=(t,e,n)=>q9(t,e,n).map(Et(U9,n)),F8=(t,e,n)=>{n.fold(()=>{t.focus()},r=>{t.selection.setRng(r.toRange(),e)})},To=t=>e=>e.dom===t,jv=(t,e)=>e&&Xe(t.schema.getBlockElements(),oo(e)),Qm=(t,e,n)=>{if(es(t,e)){const r=Z.fromHtml('<br data-mce-bogus="1">');return n?Y(Qn(e),i=>{mA(i)||xn(i)}):tc(e),Ro(e,r),F.some(gt.before(r.dom))}else return F.none()},uh=(t,e,n,r)=>{const i=ki(t).filter(zo),u=yl(t).filter(zo);return xn(t),um(i,u,e,(g,b,x)=>{const w=g.dom,E=b.dom,D=w.data.length;return CS(w,E,n,r),x.container()===E?gt(w,D):x}).orThunk(()=>(r&&(i.each(g=>yS(g.dom,g.dom.length,n)),u.each(g=>vS(g.dom,0,n))),e))},wS=(t,e)=>Xe(t.schema.getTextInlineElements(),oo(e)),jd=(t,e,n,r=!0,i=!1)=>{const u=QY(e,t.getBody(),n.dom),g=Sl(n,Et(jv,t),To(t.getBody())),b=uh(n,u,t.schema,wS(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):g.bind(x=>Qm(t.schema,x,i)).fold(()=>{r&&F8(t,e,b)},x=>{r&&F8(t,e,F.some(x))})},ZA=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,M8=t=>ZA.test(t),dh=(t,e)=>ei(Z.fromDom(e),BE(t))&&!Kn(t.schema,e)&&t.dom.isEditable(e),jA=t=>vo.DOM.getStyle(t,"direction",!0)==="rtl"||M8(t.textContent??""),N8=(t,e,n)=>st(vo.DOM.getParents(n.container(),"*",e),t),_f=(t,e,n)=>{const r=N8(t,e,n);return F.from(r[r.length-1])},K9=(t,e,n)=>{const r=Ld(e,t),i=Ld(n,t);return mt(r)&&r===i},Y9=t=>Ru(t)||Bm(t),Xc=(t,e)=>{const n=e.container(),r=e.offset();return t?Uc(n)?Nt(n.nextSibling)?gt(n.nextSibling,0):gt.after(n):Ru(e)?gt(n,r+1):e:Uc(n)?Nt(n.previousSibling)?gt(n.previousSibling,n.previousSibling.data.length):gt.before(n):Bm(e)?gt(n,r-1):e},P8=Et(Xc,!0),I8=Et(Xc,!1),GA=(t,e)=>{const n=r=>r.stopImmediatePropagation();t.on("beforeinput input",n,!0),t.getDoc().execCommand(e),t.off("beforeinput input",n)},$8=t=>{t.execCommand("delete")},qA=t=>GA(t,"Delete"),X9=t=>GA(t,"ForwardDelete"),tX=t=>e=>kn(oi(e),t,ho),J9=t=>Lr(t)||Xr(t),KA=(t,e)=>_i(t,e)?sn(e,J9,tX(t)):F.none(),L8=(t,e=!0)=>{t.dom.isEmpty(t.getBody())&&t.setContent("",{no_selection:!e})},H8=(t,e,n)=>Us(v(n),S(n),(r,i)=>{const u=Xc(!0,r),g=Xc(!1,i),b=Xc(!1,e);return t?m(n,b).exists(x=>x.isEqual(g)&&e.isEqual(u)):h(n,b).exists(x=>x.isEqual(u)&&e.isEqual(g))}).getOr(!0),z8=t=>(Oc(t)?ki(t):Es(t)).bind(z8).orThunk(()=>F.some(t)),Q9=(t,e,n,r=!0)=>{e.deleteContents();const i=z8(n).getOr(n),u=Z.fromDom(t.dom.getParent(i.dom,t.dom.isBlock)??n.dom);
24if(u.dom===t.getBody()?L8(t,r):es(t.schema,u,{checkRootAsContent:!1})&&(Td(u),r&&t.selection.setCursorLocation(u.dom,0)),!ho(n,u)){const g=kn(oi(u),n)?[]:Vo(u);Y(g.concat(Qn(n)),b=>{!ho(b,u)&&!_i(b,u)&&es(t.schema,b)&&xn(b)})}},tH=t=>e=>ho(t,e),_a=t=>dr(t,"td,th"),eH=(t,e)=>wa(Z.fromDom(t),e),oH=t=>Us(t.startTable,t.endTable,(e,n)=>{const r=Dg(e,u=>ho(u,n)),i=Dg(n,u=>ho(u,e));return!r&&!i?t:{...t,startTable:r?F.none():t.startTable,endTable:i?F.none():t.endTable,isSameTable:!1,isMultiTable:!1}}).getOr(t),V8=t=>oH(t),eX=(t,e)=>{const n=eH(t.startContainer,e),r=eH(t.endContainer,e),i=n.isSome(),u=r.isSome(),g=Us(n,r,ho).getOr(!1);return V8({startTable:n,endTable:r,isStartInTable:i,isEndInTable:u,isSameTable:g,isMultiTable:!g&&i&&u})},YA=(t,e)=>({start:t,end:e}),nH=(t,e,n)=>({rng:t,table:e,cells:n}),Gv=lu.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),sb=(t,e)=>_r(Z.fromDom(t),"td,th",e),sH=t=>!ho(t.start,t.end),U8=(t,e)=>wa(t.start,e).bind(n=>wa(t.end,e).bind(r=>Ec(ho(n,r),n))),rH=(t,e)=>!sH(t)&&U8(t,e).exists(n=>{const r=n.dom.rows;return r.length===1&&r[0].cells.length===1}),gn=(t,e)=>{const n=sb(t.startContainer,e),r=sb(t.endContainer,e);return Us(n,r,YA)},aH=t=>e=>wa(e,t).bind(n=>Ur(_a(n)).map(r=>YA(e,r))),iH=t=>e=>wa(e,t).bind(n=>Vs(_a(n)).map(r=>YA(r,e))),mh=t=>e=>U8(e,t).map(n=>nH(e,n,_a(n))),XA=(t,e,n,r)=>{if(n.collapsed||!t.forall(sH))return F.none();if(e.isSameTable){const i=t.bind(mh(r));return F.some({start:i,end:i})}else{const i=sb(n.startContainer,r),u=sb(n.endContainer,r),g=i.bind(aH(r)).bind(mh(r)),b=u.bind(iH(r)).bind(mh(r));return F.some({start:g,end:b})}},W8=(t,e)=>gl(t,n=>ho(n,e)),JA=t=>Us(W8(t.cells,t.rng.start),W8(t.cells,t.rng.end),(e,n)=>t.cells.slice(e,n+1)),cH=(t,e,n)=>t.exists(r=>rH(r,n)&&Km(r.start,e)),QA=(t,e)=>{const{startTable:n,endTable:r}=e,i=t.cloneRange();return n.each(u=>i.setStartAfter(u.dom)),r.each(u=>i.setEndBefore(u.dom)),i},lH=(t,e,n,r)=>XA(t,e,n,r).bind(({start:i,end:u})=>i.or(u)).bind(i=>{const{isSameTable:u}=e,g=JA(i).getOr([]);if(u&&i.cells.length===g.length)return F.some(Gv.fullTable(i.table));if(g.length>0){if(u)return F.some(Gv.partialTable(g,F.none()));{const b=QA(n,e);return F.some(Gv.partialTable(g,F.some({...e,rng:b})))}}else return F.none()}),oX=(t,e,n,r)=>XA(t,e,n,r).bind(({start:i,end:u})=>{const g=i.bind(JA).getOr([]),b=u.bind(JA).getOr([]);if(g.length>0&&b.length>0){const x=QA(n,e);return F.some(Gv.multiTable(g,b,x))}else return F.none()}),nX=(t,e)=>{const n=tH(t),r=gn(e,n),i=eX(e,n);return cH(r,e,n)?r.map(u=>Gv.singleCellTable(e,u.start)):i.isMultiTable?oX(r,i,e,n):lH(r,i,e,n)},Z8=t=>Y(t,e=>{As(e,"contenteditable"),Td(e)}),uH=(t,e)=>F.from(t.dom.getParent(e,t.dom.isBlock)).map(Z.fromDom),dH=(t,e,n)=>{n.each(r=>{e?xn(r):(Td(r),t.selection.setCursorLocation(r.dom,0))})},tT=(t,e,n,r)=>{const i=n.cloneRange();r?(i.setStart(n.startContainer,n.startOffset),i.setEndAfter(e.dom.lastChild)):(i.setStartBefore(e.dom.firstChild),i.setEnd(n.endContainer,n.endOffset)),_S(t,i,e,!1).each(u=>u())},eT=t=>{const e=ce(t),n=Z.fromDom(t.selection.getNode());Ng(n.dom)&&es(t.schema,n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&$t(e,r=>ho(r,n))&&qn(n,"data-mce-selected","1")},j8=(t,e,n)=>F.some(()=>{const r=t.selection.getRng(),i=n.bind(({rng:u,isStartInTable:g})=>{const b=uH(t,g?u.endContainer:u.startContainer);u.deleteContents(),dH(t,g,b.filter(Et(es,t.schema)));const x=g?e[0]:e[e.length-1];return tT(t,x,r,g),es(t.schema,x)?F.none():F.some(g?e.slice(1):e.slice(0,-1))}).getOr(e);Z8(i),eT(t)}),go=(t,e,n,r)=>F.some(()=>{const i=t.selection.getRng(),u=e[0],g=n[n.length-1];tT(t,u,i,!0),tT(t,g,i,!1);const b=es(t.schema,u)?e:e.slice(1),x=es(t.schema,g)?n:n.slice(0,-1);Z8(b.concat(x)),r.deleteContents(),eT(t)}),_S=(t,e,n,r=!0)=>F.some(()=>{Q9(t,e,n,r)}),qv=(t,e)=>F.some(()=>jd(t,!1,e)),Kv=(t,e,n)=>nX(e,n).bind(r=>r.fold(Et(_S,t),Et(qv,t),Et(j8,t),Et(go,t))),Yv=(t,e)=>oT(t,e),Xv=(t,e,n,r)=>q8(e,r).fold(()=>Kv(t,e,n),i=>Yv(t,i)),G8=(t,e,n)=>{const r=Z.fromDom(t.getBody()),i=t.selection.getRng();return n.length!==0?j8(t,n,F.none()):Xv(t,r,i,e)},mH=(t,e)=>Xo(Ul(e,t),Rm),q8=(t,e)=>Xo(Ul(e,t),vl("caption")),sX=(t,e,n,r,i)=>vf(n,t.getBody(),i).bind(u=>mH(e,Z.fromDom(u.getNode())).bind(g=>ho(g,r)?F.none():F.some(_e))),oT=(t,e)=>F.some(()=>{Td(e),t.selection.setCursorLocation(e.dom,0)}),gH=(t,e,n,r)=>v(t.dom).bind(i=>S(t.dom).map(u=>e?n.isEqual(i)&&r.isEqual(u):n.isEqual(u)&&r.isEqual(i))).getOr(!0),rX=(t,e)=>oT(t,e),fH=(t,e,n)=>q8(t,Z.fromDom(n.getNode())).fold(()=>F.some(_e),r=>Ec(!ho(r,e),_e)),pH=(t,e,n,r,i)=>vf(n,t.getBody(),i).fold(()=>F.some(_e),u=>gH(r,n,i,u)?rX(t,r):fH(e,r,u)),aX=(t,e,n,r)=>{const i=gt.fromRangeStart(t.selection.getRng());return mH(n,r).bind(u=>es(t.schema,u,{checkRootAsContent:!1})?oT(t,u):sX(t,n,e,u,i))},hH=(t,e,n,r)=>{const i=gt.fromRangeStart(t.selection.getRng());return es(t.schema,r)?oT(t,r):pH(t,n,e,r,i)},yn=(t,e)=>t?Wv(e):$A(e),iX=(t,e)=>{const n=gt.fromRangeStart(t.selection.getRng());return yn(e,n)||ui(e,t.getBody(),n).exists(r=>yn(e,r))},cX=(t,e,n)=>{const r=Z.fromDom(t.getBody());return q8(r,n).fold(()=>aX(t,e,r,n).orThunk(()=>Ec(iX(t,e),_e)),i=>hH(t,e,r,i))},nT=(t,e)=>{const n=Z.fromDom(t.selection.getStart(!0)),r=ce(t);return t.selection.isCollapsed()&&r.length===0?cX(t,e,n):G8(t,n,r)},Wu=(t,e)=>{let n=e;for(;n&&n!==t;){if(Pa(n)||On(n))return n;n=n.parentNode}return null},bH=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],xH=Mt.each,Zu=t=>{const e=t.dom,n=new Set(t.serializer.getTempAttrs()),r=(u,g)=>{if(u.nodeName!==g.nodeName||u.nodeType!==g.nodeType)return!1;const b=w=>{const E={};return xH(e.getAttribs(w),D=>{const R=D.nodeName.toLowerCase();R!=="style"&&!i(R)&&(E[R]=e.getAttrib(w,R))}),E},x=(w,E)=>{for(const D in w)if(Xe(w,D)){const R=E[D];if(Gn(R)||w[D]!==R)return!1;delete E[D]}for(const D in E)if(Xe(E,D))return!1;return!0};return jt(u)&&jt(g)&&(!x(b(u),b(g))||!x(e.parseStyle(e.getAttrib(u,"style")),e.parseStyle(e.getAttrib(g,"style"))))?!1:!Xn(u)&&!Xn(g)},i=u=>$t(bH,g=>Ze(u,g))||n.has(u);return{compare:r,isAttributeInternal:i}},Mo=(t,e)=>{if(Nt(t))return{container:t,offset:e};const n=Uu.getNode(t,e);return Nt(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&Nt(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Nt(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},or=t=>{const e=t.cloneRange(),n=Mo(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);const r=Mo(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},bc=vo.DOM,vH=()=>bc.create("span",{"data-mce-type":"bookmark"}),K8=(t,e,n)=>{if(jt(t)){const r=n();return t.hasChildNodes()?e===t.childNodes.length?t.appendChild(r):t.insertBefore(r,t.childNodes[e]):t.appendChild(r),{container:r,offset:0}}else return{container:t,offset:e}},Y8=(t,e)=>{const n=r=>{var g;let i=(g=r.parentNode)==null?void 0:g.firstChild,u=0;for(;i;){if(i===r)return u;(!jt(i)||i.getAttribute("data-mce-type")!=="bookmark")&&u++,i=i.nextSibling}return-1};if(jt(t)&&mt(t.parentNode)){const r=t;e=n(t),t=t.parentNode,bc.remove(r),!t.hasChildNodes()&&bc.isBlock(t)&&t.appendChild(bc.create("br"))}return{container:t,offset:e}},X8=(t,e,n,r)=>{const i=bc.createRng();return i.setStart(t,e),i.setEnd(n,r),or(i)},Gd=(t,e=vH)=>{const{container:n,offset:r}=K8(t.startContainer,t.startOffset,e);if(t.collapsed)return{startContainer:n,startOffset:r};{const{container:i,offset:u}=K8(t.endContainer,t.endOffset,e);return{startContainer:n,startOffset:r,endContainer:i,endOffset:u}}},Jc=t=>{const{container:e,offset:n}=Y8(t.startContainer,t.startOffset);if(!Gn(t.endContainer)&&!Gn(t.endOffset)){const{container:r,offset:i}=Y8(t.endContainer,t.endOffset);return X8(e,n,r,i)}else return X8(e,n,e,n)},sT=(t,e,n,r)=>{if(Mt.each(n.styles,(i,u)=>{t.setStyle(e,u,Ym(i,r))}),n.styles){const i=t.getAttrib(e,"style");i&&t.setAttrib(e,"data-mce-style",i)}},gh=(t,e,n,r,i)=>{const u=t.dom;X(n.onformat)&&n.onformat(e,n,r,i),sT(u,e,n,r),Mt.each(n.attributes,(g,b)=>{u.setAttrib(e,b,Ym(g,r))}),Mt.each(n.classes,g=>{const b=Ym(g,r);u.hasClass(e,b)||u.addClass(e,b)})},yH=t=>!lo(t.attributes)&&!lo(t.styles),rT=Nv,J8=(t,e,n)=>{const r=t.formatter.get(n);if(r)for(let i=0;i<r.length;i++){const u=r[i];if(Ll(u)&&u.inherit===!1&&t.dom.is(e,u.selector))return!0}return!1},SS=(t,e,n,r,i)=>{const u=t.dom.getRoot();if(e===u)return!1;const g=t.dom.getParent(e,b=>
24J8(t,b,n)?!0:b.parentNode===u||!!Qc(t,b,n,r,!0));return!!Qc(t,g,n,r,i)},kS=(t,e,n)=>Or(n)&&rT(e,n.inline)||zu(n)&&rT(e,n.block)?!0:Ll(n)?jt(e)&&t.is(e,n.selector):!1,Q8=(t,e,n,r,i,u)=>{const g=n[r],b=r==="attributes";if(X(n.onmatch))return n.onmatch(e,n,r);if(g){if(AC(g)){for(let x=0;x<g.length;x++)if(b?t.getAttrib(e,g[x]):Pv(t,e,g[x]))return!0}else for(const x in g)if(Xe(g,x)){const w=b?t.getAttrib(e,x):Pv(t,e,x),E=Ym(g[x],u),D=so(w)||qf(w);if(D&&so(E))continue;if(i&&D&&!n.exact||(!i||n.exact)&&!rT(w,q_(E,x)))return!1}}return!0},Qc=(t,e,n,r,i)=>{const u=t.formatter.get(n),g=t.dom;if(u&&jt(e))for(let b=0;b<u.length;b++){const x=u[b];if(kS(t.dom,e,x)&&Q8(g,e,x,"attributes",i,r)&&Q8(g,e,x,"styles",i,r)){const w=x.classes;if(w){for(let E=0;E<w.length;E++)if(!t.dom.hasClass(e,Ym(w[E],r)))return}return x}}},aT=(t,e,n,r,i)=>{if(r)return SS(t,r,e,n,i);if(r=t.selection.getNode(),SS(t,r,e,n,i))return!0;const u=t.selection.getStart();return!!(u!==r&&SS(t,u,e,n,i))},iT=(t,e,n)=>{const r=[],i={},u=t.selection.getStart();return t.dom.getParent(u,g=>{for(let b=0;b<e.length;b++){const x=e[b];!i[x]&&Qc(t,g,x,n)&&(i[x]=!0,r.push(x))}},t.dom.getRoot()),r},t7=(t,e)=>{const n=i=>ho(i,Z.fromDom(t.getBody())),r=(i,u)=>Qc(t,i.dom,u)?F.some(u):F.none();return F.from(t.selection.getStart(!0)).bind(i=>w1(Z.fromDom(i),u=>iu(e,g=>r(u,g)),n)).getOrNull()},cT=(t,e)=>{const n=t.formatter.get(e),r=t.dom;if(n&&t.selection.isEditable()){const i=t.selection.getStart(),u=K_(r,i);for(let g=n.length-1;g>=0;g--){const b=n[g];if(!Ll(b))return!0;for(let x=u.length-1;x>=0;x--)if(r.is(u[x],b.selector))return!0}}return!1},lX=(t,e,n)=>We(n,(r,i)=>{const u=Y_(t,i);return t.formatter.matchNode(e,i,{},u)?r.concat([i]):r},[]),Ks=$s,CH=(t,e)=>t.importNode(e,!0),wH=t=>{if(t){const e=new ts(t,t);for(let n=e.current();n;n=e.next())if(Nt(n))return n}return null},lT=t=>{const e=Z.fromTag("span");return lr(e,{id:T,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&Ro(e,Z.fromText(Ks)),e},_H=t=>{const e=wH(t);return e&&e.data.charAt(0)===Ks&&e.deleteData(0,1),e},uT=(t,e,n)=>{const r=t.dom,i=t.selection;if(CR(e))jd(t,!1,Z.fromDom(e),n,!0);else{const u=i.getRng(),g=r.getParent(e,r.isBlock),b=u.startContainer,x=u.startOffset,w=u.endContainer,E=u.endOffset,D=_H(e);r.remove(e,!0),b===D&&x>0&&u.setStart(D,x-1),w===D&&E>0&&u.setEnd(D,E-1),g&&r.isEmpty(g)&&Td(Z.fromDom(g)),i.setRng(u)}},dT=(t,e,n)=>{const r=t.dom,i=t.selection;if(e)uT(t,e,n);else if(e=P(t.getBody(),i.getStart()),!e)for(;e=r.get(T);)uT(t,e,n)},e7=(t,e,n)=>{var u,g;const r=t.dom,i=r.getParent(n,Et(Mv,t.schema));i&&r.isEmpty(i)?(u=n.parentNode)==null||u.replaceChild(e,n):(rE(Z.fromDom(n)),r.isEmpty(n)?(g=n.parentNode)==null||g.replaceChild(e,n):r.insertAfter(e,n))},rb=(t,e)=>(t.appendChild(e),e),o7=(t,e)=>{const n=Je(t,(i,u)=>rb(i,u.cloneNode(!1)),e),r=n.ownerDocument??document;return rb(n,r.createTextNode(Ks))},n7=(t,e,n,r,i,u)=>{const g=t.formatter,b=t.dom,x=st(he(g.get()),D=>D!==r&&!Rs(D,"removeformat")),w=lX(t,n,x);if(st(w,D=>!yR(t,D,r)).length>0){const D=n.cloneNode(!1);return b.add(e,D),g.remove(r,i,D,u),b.remove(D),F.some(D)}else return F.none()},s7=t=>Ix(t,$r(t).replace(new RegExp(`${Bs}$`)," ")),Sf=(t,e)=>{const n=()=>{e!==null&&!t.dom.isEmpty(e)&&ki(Z.fromDom(e)).each(r=>{zo(r)?s7(r):ip(r,i=>zo(i)).each(i=>{zo(i)&&s7(i)})})};t.once("input",r=>{r.data&&!er(r.data)&&(r.isComposing?t.once("compositionend",()=>{n()}):n())})},r7=(t,e,n)=>{let r;const i=t.selection,u=t.formatter.get(e);if(!u)return;const g=i.getRng();let b=g.startOffset;const w=g.startContainer.nodeValue;r=P(t.getBody(),i.getStart());const E=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(w&&b>0&&b<w.length&&E.test(w.charAt(b))&&E.test(w.charAt(b-1))){const D=i.getBookmark();g.collapse(!0);let R=Wd(t.dom,g,u);R=ob(R),t.formatter.apply(e,n,R),i.moveToBookmark(D)}else{let D=r?wH(r):null;(!r||(D==null?void 0:D.data)!==Ks)&&(r=CH(t.getDoc(),lT(!0).dom),D=r.firstChild,g.insertN
24ode(r),b=1,Sf(t,r)),t.formatter.apply(e,n,r),i.setCursorLocation(D,b)}},a7=(t,e,n,r)=>{const i=t.dom,u=t.selection;let g=!1;const b=t.formatter.get(e);if(!b)return;const x=u.getRng(),w=x.startContainer,E=x.startOffset;let D=w;Nt(w)&&(E!==w.data.length&&(g=!0),D=D.parentNode);const R=[];let N;for(;D;){if(Qc(t,D,e,n,r)){N=D;break}D.nextSibling&&(g=!0),R.push(D),D=D.parentNode}if(N)if(g){const H=u.getBookmark();x.collapse(!0);let $=Wd(i,x,b,{includeTrailingSpace:!0});$=ob($),t.formatter.remove(e,n,$,r),u.moveToBookmark(H)}else{const H=P(t.getBody(),N),$=mt(H)?i.getParents(N.parentNode,It,H):[],U=lT(!1).dom;e7(t,U,H??N);const J=n7(t,U,N,e,n,r),Q=o7([...R,...J.toArray(),...$],U);H&&uT(t,H,mt(H)),u.setCursorLocation(Q,1),Sf(t,U),i.isEmpty(N)&&i.remove(N)}},i7=(t,e,n)=>{const r=t.selection,i=t.getBody();dT(t,null,n),(e===8||e===46)&&r.isCollapsed()&&r.getStart().innerHTML===Ks&&dT(t,P(i,r.getStart()),!0),(e===37||e===39)&&dT(t,P(i,r.getStart()),!0)},c7=t=>Nt(t)&&ma(t.data,Bs),l7=t=>{t.on("mouseup keydown",e=>{i7(t,e.keyCode,c7(t.selection.getRng().endContainer))})},u7=t=>{const e=lT(!1),n=o7(t,e.dom);return{caretContainer:e,caretPosition:gt(n,0)}},mT=(t,e)=>{const{caretContainer:n,caretPosition:r}=u7(e);return wr(Z.fromDom(t),n),xn(Z.fromDom(t)),r},SH=(t,e)=>{const{caretContainer:n,caretPosition:r}=u7(e);return t.insertNode(n.dom),r},d7=(t,e)=>{if(B(e.dom))return!1;const n=t.schema.getTextInlineElements();return Xe(n,oo(e))&&!B(e.dom)&&!yd(e.dom)},m7=["fontWeight","fontStyle","color","fontSize","fontFamily"],kH=t=>mo(t.styles)&&$t(he(t.styles),e=>xt(m7,e)),EH=t=>Xo(t,e=>Or(e)&&e.inline==="span"&&kH(e)),AH=(t,e)=>{const n=t.get(e);return lo(n)?EH(n):F.none()},gT=(t,e)=>h(e,gt.fromRangeStart(t)).isNone(),g7=(t,e)=>m(e,gt.fromRangeEnd(t)).exists(n=>!Wn(n.getNode())||m(e,n).isSome())===!1,TH=t=>e=>mp(e)&&t.isEditable(e),f7=(t,e)=>wt(t.getSelectedBlocks(),(n,r)=>r===0&&e(n)?t.dom.getParent(n,mp)??n:n),fT=t=>{if(t.isCollapsed())return[];const e=t.getRng(),n=f7(t,r=>gT(e,r)&&!mp(r));if(n.length===1)return gT(e,n[0])&&g7(e,n[0])?n:[];{const r=Vs(n).filter(g=>gT(e,g)).toArray(),i=Ur(n).filter(g=>g7(e,g)).toArray(),u=n.slice(1,-1);return r.concat(u).concat(i)}},pT=t=>st(fT(t),TH(t.dom)),p7=t=>st(f7(t,e=>!mp(e)),TH(t.dom)),h7=Mt.each,hT=t=>jt(t)&&!Xn(t)&&!B(t)&&!yd(t),b7=(t,e)=>{for(let n=t;n;n=n[e]){if(Nt(n)&&ls(n.data))return t;if(jt(n)&&!Xn(n))return n}return t},x7=(t,e,n)=>{const r=Zu(t),i=fa(e)&&t.dom.isEditable(e),u=fa(n)&&t.dom.isEditable(n);if(i&&u){const g=b7(e,"previousSibling"),b=b7(n,"nextSibling");if(r.compare(g,b)){for(let x=g.nextSibling;x&&x!==b;){const w=x;x=x.nextSibling,g.appendChild(w)}return t.dom.remove(b),Mt.each(Mt.grep(b.childNodes),x=>{g.appendChild(x)}),g}}return n},v7=(t,e,n,r)=>{if(r&&e.merge_siblings!==!1){const i=x7(t,bR(r),r)??r;x7(t,i,bR(i,!0))}},DH=(t,e,n)=>{if(e.clear_child_styles){const r=e.links?"*:not(a)":"*";h7(t.select(r,n),i=>{hT(i)&&t.isEditable(i)&&h7(e.styles,(u,g)=>{t.setStyle(i,g,"")})})}},bT=(t,e,n)=>{h7(t.childNodes,r=>{hT(r)&&(e(r)&&n(r),r.hasChildNodes()&&bT(r,e,n))})},OH=(t,e)=>{e.nodeName==="SPAN"&&t.getAttribs(e).length===0&&t.remove(e,!0)},xT=(t,e)=>n=>!!(n&&Pv(t,n,e)),y7=(t,e,n)=>r=>{t.setStyle(r,e,n),r.getAttribute("style")===""&&r.removeAttribute("style"),OH(t,r)},fh=lu.generate([{keep:[]},{rename:["name"]},{removed:[]}]),tg=/^(src|href|style)$/,vT=Mt.each,Jv=Nv,RH=t=>/^(TR|TH|TD)$/.test(t.nodeName),C7=(t,e,n)=>t.isChildOf(e,n)&&e!==n&&!t.isBlock(n),yT=(t,e,n)=>{let r=e[n?"startContainer":"endContainer"],i=e[n?"startOffset":"endOffset"];if(jt(r)){const u=r.childNodes.length-1;!n&&i&&i--,r=r.childNodes[i>u?u:i]}return Nt(r)&&n&&i>=r.data.length&&(r=new ts(r,t.getBody()).next()||r),Nt(r)&&!n&&i===0&&(r=new ts(r,t.getBody()).prev()||r),r},CT=(t,e)=>{const n=e?"firstChild":"lastChild",r=t[n];return RH(t)&&r?t.nodeName==="TR"&&r[n]||r:t},ES=(t,e,n,r)=>{var u;const i=t.create(n,r);return(u=e.parentNode)==null||u.insertBefore(i,e),i.appendChild(e),i},wT=(t,e,n,r,i)=>{const u=Z.fromDom(e),g=Z.fromDom(t.create(r,i)),b=n?Js(u):Nr(u);return Ei(g,b),n?(wr(u,g),Cl(g,u)):(Nc(u,g),Ro(g,u)),g.dom},BH=(t,e)=>e.links&&t.nodeName==="A",w7=(t,e,n)=>{const r=e.parentNode;let i;const u=t.dom,g=ws(t);zu(n)&&r===u.getRoot()&&(!n.list_block||!Jv(e,n.list_block))&&Y(Wr(e.childNodes),b=>{X0(t,g,b.nodeName.toLowerCase())?i?i.appendChild(b):(i=ES(u,b,g),u.setAttribs(i,gc(t))):i=null}),!(HY(n)&&!Jv(n.inline,e))&&u.remove(e,!0)},_7=(t,e,n)=>sr(t)?{name:e,value:null}:{name:t,value:Ym(e,n)},S7=(t,e)=>{t.getAttrib(e,"style")===""&&(e.removeAttribute("style"),e.removeAttribute("data-mce-style"))},k7=(t,e,n,r,i)=>{let u=!1;vT(n.styles,(g,b)=>{const{name:x,value:w}=_7(b,g,r),E=q_(w,x);(n.remove_similar||nt(w)||!jt(i)||Jv(Pv(t,i,x),E))&&t.setStyle(e,x,""),u=!0}),u&&S7(t,e)},ph=(t,e,n)=>{e==="removeformat"?Y(p7(t.selection),r=>{Y(m7,i=>t.dom.setStyle(r,i,"")),S7(t.dom,r)}):AH(t.formatter,e).each(r=>{Y(p7(t.selection),i=>k7(t.dom,i,r,n,null))})},AS=(t,e,n,r,i)=>{const u=t.dom,g=Zu(t),b=t.schema;if(Or(e)&&ha(b,e.inline)&&Kn(b,r)&&r.parentElement===t.getBody())return w7(t,r,e),fh.removed();if(!e.ceFalseOverride&&r&&u.getContentEditableParent(r)==="false"||r&&!kS(u,r,e)&&!BH(r,e))return fh.keep();const x=r,w=e.preserve_attributes;if(Or(e)&&e.remove==="all"&&lo(w)){const E=st(u.getAttribs(x),D=>xt(w,D.name.toLowerCase()));if(u.removeAllAttribs(x),Y(E,D=>u.setAttrib(x,D.name,D.value)),E.length>0)return fh.rename("span")}if(e.remove!=="all"){k7(u,x,e,n,i),vT(e.attributes,(D,R)=>{const{name:N,value:H}=_7(R,D,n);if(e.remove_similar||nt(H)||!jt(i)||Jv(u.getAttrib(i,N),H)){if(N==="class"){const $=u.getAttrib(x,N);if($){let U="";if(Y($.split(/\s+/),J=>{/mce\-\w+/.test(J)&&(U+=(U?" ":"")+J)}),U){u.setAttrib(x,N,U);return}}}if(tg.test(N)&&x.removeAttribute("data-mce-"+N),N==="style"&&Di(["li"])(x)&&u.getStyle(x,"list-style-type")==="none"){x.removeAttribute(N),u.setStyle(x,"list-style-type","none");return}N==="class"&&x.removeAttribute("className"),x.removeAttribute(N)}}),vT(e.classes,D=>{D=Ym(D,n),(!jt(i)||u.hasClass(i,D))&&u.removeClass(x,D)});const E=u.getAttribs(x);for(let D=0;D<E.length;D++){const R=E[D].nodeName;if(!g.isAttributeInternal(R))return fh.keep()}}return e.remove!=="none"?(w7(t,x,e),fh.removed()):fh.keep()},FH=(t,e,n,r,i)=>{let u;return e.parentNode&&Y(K_(t.dom,e.parentNode).reverse(),g=>{if(!u&&jt(g)&&g.id!=="_start"&&g.id!=="_end"){const b=Qc(t,g,n,r,i);b&&b.split!==!1&&(u=g)}}),u},MH=(t,e,n,r)=>AS(t,e,n,r,r).fold(Ut(r),i=>(t.dom.createFragment().appendChild(r),t.dom.rename(r,i)),Ut(null)),_T=(t,e,n,r,i,u,g,b)=>{var D;let x,w;const E=t.dom;if(n){const R=n.parentNode;for(let N=r.parentNode;N&&N!==R;N=N.parentNode){let H=E.clone(N,!1);for(let $=0;$<e.length&&(H=MH(t,e[$],b,H),H!==null);$++);
24H&&(x&&H.appendChild(x),w||(w=H),x=H)}(!g.mixed||!E.isBlock(n))&&(r=E.split(n,r)??r),x&&w&&((D=i.parentNode)==null||D.insertBefore(x,i),w.appendChild(i),Or(g)&&v7(t,g,b,x))}return r},NH=(t,e,n,r,i)=>{const u=t.formatter.get(e),g=u[0],b=t.dom,x=t.selection,w=$=>{const U=FH(t,$,e,n,i);return _T(t,u,U,$,$,!0,g,n)},E=$=>Xn($)&&jt($)&&($.id==="_start"||$.id==="_end"),D=$=>$t(u,U=>Qv(t,U,n,$,$)),R=$=>{const U=Wr($.childNodes),Q=D($)||$t(u,St=>kS(b,$,St)),et=$.parentNode;if(!Q&&mt(et)&&dA(g)&&D(et),g.deep&&U.length)for(let St=0;St<U.length;St++)R(U[St]);Y(["underline","line-through","overline"],St=>{jt($)&&t.dom.getStyle($,"text-decoration")===St&&$.parentNode&&vR(b,$.parentNode)===St&&Qv(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:St}},void 0,$)})},N=$=>{const U=b.get($?"_start":"_end");if(U){let J=U[$?"firstChild":"lastChild"];return E(J)&&(J=J[$?"firstChild":"lastChild"]),Nt(J)&&J.data.length===0&&(J=$?U.previousSibling||U.nextSibling:U.nextSibling||U.previousSibling),b.remove(U,!0),J}else return null},H=$=>{let U,J,Q=Wd(b,$,u,{includeTrailingSpace:$.collapsed});if(g.split){if(Q=ob(Q),U=yT(t,Q,!0),J=yT(t,Q),U!==J){if(U=CT(U,!0),J=CT(J,!1),C7(b,U,J)){const ft=F.from(U.firstChild).getOr(U);w(wT(b,ft,!0,"span",{id:"_start","data-mce-type":"bookmark"})),N(!0);return}if(C7(b,J,U)){const ft=F.from(J.lastChild).getOr(J);w(wT(b,ft,!1,"span",{id:"_end","data-mce-type":"bookmark"})),N(!1);return}U=ES(b,U,"span",{id:"_start","data-mce-type":"bookmark"}),J=ES(b,J,"span",{id:"_end","data-mce-type":"bookmark"});const et=b.createRng();et.setStartAfter(U),et.setEndBefore(J),Hl(b,et,ft=>{Y(ft,St=>{!Xn(St)&&!Xn(St.parentNode)&&w(St)})}),w(U),w(J),U=N(!0),J=N()}else U=J=w(U);Q.startContainer=U.parentNode?U.parentNode:U,Q.startOffset=b.nodeIndex(U),Q.endContainer=J.parentNode?J.parentNode:J,Q.endOffset=b.nodeIndex(J)+1}Hl(b,Q,et=>{Y(et,R)})};if(r){if(Bv(r)){const $=b.createRng();$.setStartBefore(r),$.setEndAfter(r),H($)}else H(r);G2(t,e,r,n);return}!x.isCollapsed()||!Or(g)||ce(t).length?(pR(t,()=>Ov(t,H),$=>Or(g)&&aT(t,e,n,$)),t.nodeChanged()):a7(t,e,n,i),ph(t,e,n),G2(t,e,r,n)},TS=(t,e,n,r,i)=>{(r||t.selection.isEditable())&&NH(t,e,n,r,i)},E7=(t,e,n,r)=>AS(t,e,n,r).fold(()=>F.some(r),i=>F.some(t.dom.rename(r,i)),F.none),Qv=(t,e,n,r,i)=>AS(t,e,n,r,i).fold(pt,u=>(t.dom.rename(r,u),!0),It),A7=["fontsize","subscript","superscript"],DS=["strikethrough",...A7],PH=(t,e,n)=>mt(t.matchNode(e.dom,n,{},n==="fontsize")),OS=(t,e)=>$t(A7,n=>PH(t,e,n)),IH=t=>xt(DS,t),T7=(t,e,n,r,i)=>{const u=Si(e,t).filter(Jn);return sx(u,n).map(g=>{const b=u[g],x=r(b),w=[...i(Pr(b)).toArray(),...qo(u.slice(0,g),E=>n(E)?i(E).toArray():[Pr(E)])];return{container:b,innerWrapper:x,outerWrappers:w}})},D7=(t,e,n,r)=>{Y(Qn(t),i=>{Jn(i)&&n(i)&&r(i).isNone()&&Ai(i)}),Y(Qn(t),i=>Ro(e,i)),Cl(t,e)},O7=(t,e)=>{if(e.length>0){const n=e[e.length-1];wr(t,n);const r=We(e.slice(0,e.length-1),(i,u)=>(Ro(i,u),u),n);Ro(r,t)}},$H=(t,e,n,r,i)=>{const u=g=>ho(Z.fromDom(t.getRoot()),g)||t.isBlock(g.dom);Y(e,g=>{T7(u,g,n,r,i).each(({container:b,innerWrapper:x,outerWrappers:w})=>{t.split(b.dom,g.dom),D7(g,x,n,i),O7(g,w)})})},ST=(t,e,n)=>{const r=b=>mt(Qc(t,b.dom,e)),i=b=>{const x=Z.fromTag(oo(b)),w=Qc(t,b.dom,e,{});return mt(w)&&yH(w)&&gh(t,x.dom,w),x},u=b=>{const x=Qc(t,b.dom,e,{});return mt(x)?E7(t,x,{},b.dom).map(Z.fromDom):F.some(b)},g=Gd(t.selection.getRng());$H(t.dom,n,r,i,u),t.selection.setRng(Jc(g))},LH=(t,e)=>qo(e,n=>{const r=y1(n,i=>OS(t,i));return OS(t,n)?[n,...r]:r}),HH=(t,e,n)=>{if(IH(e)){const r=LH(t.formatter,n);ST(t,"strikethrough",r)}},zH=(t,e)=>{const n=st(e,r=>OS(t.formatter,r));ST(t,"strikethrough",n)},gi=t=>["h1","h2","h3","h4","h5","h6"].includes(t.name),R7=t=>t.name==="summary",VH=(t,e)=>{let n=t;for(;n=n.walk();)e(n)},kT=(t,e,n,r)=>{const i=n.name;for(let u=0,g=t.length;u<g;u++){const b=t[u];if(b.name===i){const x=r.nodes[i];x?x.nodes.push(n):r.nodes[i]={filter:b,nodes:[n]}}}if(n.attributes)for(let u=0,g=e.length;u<g;u++){const b=e[u],x=b.name;if(x in n.attributes.map){const w=r.attributes[x];w?w.nodes.push(n):r.attributes[x]={filter:b,nodes:[n]}}}},UH=(t,e,n)=>{const r={nodes:{},attributes:{}};return n.firstChild&&VH(n,i=>{kT(t,e,i,r)}),r},B7=(t,e)=>{const n=(r,i)=>{Do(r,u=>{const g=Wr(u.nodes);Y(u.filter.callbacks,b=>{for(let x=g.length-1;x>=0;x--){const w=g[x];(!(i?w.attr(u.filter.name)!==void 0:w.name===u.filter.name)||so(w.parent))&&g.splice(x,1)}g.length>0&&b(g,u.filter.name,e)})})};n(t.nodes,!1),n(t.attributes,!0)},F7=(t,e,n,r={})=>{const i=UH(t,e,n);B7(i,r)},kf=(t,e,n,r)=>{if((t.pad_empty_with_br||e.insert)&&n(r)){const u=new hr("br",1);e.insert&&u.attr("data-mce-bogus","1"),r.empty().append(u)}
24else r.empty().append(new hr("#text",3)).value=Bs},ab=t=>{var e;return WH(t,"#text")&&((e=t==null?void 0:t.firstChild)==null?void 0:e.value)===Bs},WH=(t,e)=>{const n=t==null?void 0:t.firstChild;return mt(n)&&n===t.lastChild&&n.name===e},ZH=(t,e)=>{const n=t.getElementRule(e.name);return(n==null?void 0:n.paddEmpty)===!0},ty=(t,e,n,r)=>r.isEmpty(e,n,i=>ZH(t,i)),ju=(t,e)=>mt(t)&&(e(t)||t.name==="br"),jH=t=>{let e;for(let n=t;n;n=n.parent){const r=n.attr("contenteditable");if(r==="false")break;r==="true"&&(e=n)}return F.from(e)},GH=t=>{const e=[];for(let n=t.firstChild;mt(n);n=n.walk())e.push(n);return e},ib=(t,e,n=t.parent)=>{if(e.getSpecialElements()[t.name])t.empty().remove();else{const r=t.children();for(const i of r)n&&!e.isValidChild(n.name,i.name)&&ib(i,e,n);t.unwrap()}},M7=(t,e,n,r=_e)=>{const i=e.getTextBlockElements(),u=e.getNonEmptyElements(),g=e.getWhitespaceElements(),b=Mt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),x=new Set,w=E=>E!==n&&!b[E.name];for(let E=0;E<t.length;E++){const D=t[E];let R,N,H;if(!D.parent||x.has(D))continue;if(i[D.name]&&D.parent.name==="li"){let U=D.next;for(;U&&i[U.name];){U.name="li",x.add(U),D.parent.insert(U,D.parent);U=U.next}D.unwrap();continue}const $=[D];for(R=D.parent;R&&!e.isValidChild(R.name,D.name)&&w(R);R=R.parent)$.push(R);if(R&&$.length>1)if(ey(e,D,R))ib(D,e);else{$.reverse(),N=$[0].clone(),r(N);let U=N;for(let J=0;J<$.length-1;J++){e.isValidChild(U.name,$[J].name)&&J>0?(H=$[J].clone(),r(H),U.append(H)):H=U;for(let Q=$[J].firstChild;Q&&Q!==$[J+1];){const et=Q.next;H.append(Q),Q=et}U=H}ty(e,u,g,N)?R.insert(D,$[0],!0):(R.insert(N,$[0],!0),R.insert(D,N)),R=$[0],(ty(e,u,g,R)||WH(R,"br"))&&R.empty().remove()}else if(D.parent){if(D.name==="li"){let U=D.prev;if(U&&(U.name==="ul"||U.name==="ol")){U.append(D);continue}if(U=D.next,U&&(U.name==="ul"||U.name==="ol")&&U.firstChild){U.insert(D,U.firstChild,!0);continue}const J=new hr("ul",1);r(J),D.wrap(J);continue}if(e.isValidChild(D.parent.name,"div")&&e.isValidChild("div",D.name)){const U=new hr("div",1);r(U),D.wrap(U)}else ib(D,e)}}},ET=(t,e)=>{let n=t;for(;n;){if(n.name===e)return!0;n=n.parent}return!1},ey=(t,e,n=e.parent)=>n?t.children[e.name]&&!t.isValidChild(n.name,e.name)||e.name==="a"&&ET(n,"a")?!0:R7(n)&&gi(e)?!((n==null?void 0:n.firstChild)===e&&(n==null?void 0:n.lastChild)===e):!1:!1,N7=(t,e,n,r)=>{const i=document.createRange();return i.setStart(t,e),i.setEnd(n,r),i},qH=t=>{const e=gt.fromRangeStart(t),n=gt.fromRangeEnd(t),r=t.commonAncestorContainer;return ui(!1,r,n).map(i=>!Il(e,n,r)&&Il(e,i,r)?N7(e.container(),e.offset(),i.container(),i.offset()):t).getOr(t)},AT=t=>t.collapsed?t:qH(t),eg=Mt.explode,P7=()=>{const t={};return{addFilter:(i,u)=>{Y(eg(i),g=>{Xe(t,g)||(t[g]={name:g,callbacks:[]}),t[g].callbacks.push(u)})},getFilters:()=>cu(t),removeFilter:(i,u)=>{Y(eg(i),g=>{if(Xe(t,g))if(mt(u)){const b=t[g],x=st(b.callbacks,w=>w!==u);x.length>0?b.callbacks=x:delete t[g]}else delete t[g]})}}},KH=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),YH=t=>t.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),ro=(t,e)=>{Y(e,n=>{t.attr(n,null)})},XH=(t,e,n)=>{t.addNodeFilter("font",r=>{Y(r,i=>{const u=e.parse(i.attr("style")),g=i.attr("color"),b=i.attr("face"),x=i.attr("size");g&&(u.color=g),b&&(u["font-family"]=b),x&&kC(x).each(w=>{u["font-size"]=n[w-1]}),i.name="span",i.attr("style",e.serialize(u)),ro(i,["color","face","size"])})})},JH=(t,e,n)=>{t.addNodeFilter("strike",r=>{const i=e.type!=="html4";Y(r,u=>{if(i)u.name="s";else{const g=n.parse(u.attr("style"));g["text-decoration"]="line-through",u.name="span",u.attr("style",n.serialize(g))}})})},I7=(t,e,n)=>{const r=Tu();e.convert_fonts_to_spans&&XH(t,r,Mt.explode(e.font_size_legacy_values??"")),JH(t,n,r)},QH=(t,e,n)=>{e.inline_styles&&I7(t,e,n)},tz=t=>fetch(t).then(e=>e.ok?e.blob():Promise.reject()).catch(()=>Promise.reject({message:`Cannot convert ${t} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"})),ds=t=>{const e=/([a-z0-9+\/=\s]+)/i.exec(t);return e?e[1]:""},ez=t=>{try{return decodeURIComponent(t)}catch{return t}},TT=t=>{const[e,...n]=t.split(","),r=n.join(","),i=/data:([^/]+\/[^;]+)(;.+)?/.exec(e);if(i){const u=i[2]===";base64",g=ez(r),b=u?ds(g):g;return F.some({type:i[1],data:b,base64Encoded:u})}else return F.none()},$7=(t,e,n=!0)=>{let r=e;if(n)try{r=atob(e)}catch{return F.none()}const i=new Uint8Array(r.length);for(let u=0;u<i.length;u++)i[u]=r.charCodeAt(u);return F.some(new Blob([i],{type:t}))},oz=t=>
24new Promise((e,n)=>{TT(t).bind(({type:r,data:i,base64Encoded:u})=>$7(r,i,u)).fold(()=>n("Invalid data URI"),e)}),jn=t=>Ze(t,"blob:")?tz(t):Ze(t,"data:")?oz(t):Promise.reject("Unknown URI format"),DT=t=>new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=()=>{var i;n((i=r.error)==null?void 0:i.message)},r.readAsDataURL(t)});let L7=0;const nz=t=>"blobid"+L7++,OT=(t,e,n)=>TT(t).bind(({data:r,type:i,base64Encoded:u})=>{if(e&&!u)return F.none();{const g=u?r:btoa(r);return n(g,i)}}),H7=(t,e,n)=>{const r=t.create(nz(),e,n);return t.add(r),r},qd=(t,e,n=!1)=>OT(e,n,(r,i)=>F.from(t.getByData(r,i)).orThunk(()=>$7(i,r).map(u=>H7(t,u,r)))),RT=(t,e)=>{const n=()=>Promise.reject("Invalid data URI");if(Ze(e,"blob:")){const r=t.getByUri(e);return mt(r)?Promise.resolve(r):jn(e).then(i=>DT(i).then(u=>OT(u,!1,g=>F.some(H7(t,i,g))).getOrThunk(n)))}else return Ze(e,"data:")?qd(t,e).fold(n,r=>Promise.resolve(r)):Promise.reject("Unknown image data format")},sz=/^(?:(?:(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)([A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*))(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?)$/,rz=t=>F.from(t.match(sz)).bind(e=>Wi(e,1)).map(e=>Ze(e,"www.")?e.substring(4):e),RS=(t,e)=>{F.from(t.attr("src")).bind(rz).forall(n=>!xt(e,n))&&t.attr("sandbox","")},BT=(t,e)=>Ze(t,`${e}/`),az=t=>Gn(t)?"iframe":BT(t,"image")?"img":BT(t,"video")?"video":BT(t,"audio")?"audio":"iframe",Ys=({type:t,src:e,width:n,height:r}={},i,u)=>{const g=az(t),b=new hr(g,1);return b.attr(g==="audio"?{src:e}:{src:e,width:n,height:r}),(g==="audio"||g==="video")&&b.attr("controls",""),g==="iframe"&&i&&RS(b,u),b},iz=t=>mt(t.attr("data-mce-bogus")),Ef=t=>t.attr("src")===Oo.transparentSrc||mt(t.attr("data-mce-placeholder")),cz=(t,e)=>{const{blob_cache:n}=e;if(n){const r=i=>{const u=i.attr("src");Ef(i)||iz(i)||so(u)||qd(n,u,!0).each(g=>{i.attr("src",g.blobUri())})};t.addAttributeFilter("src",i=>Y(i,r))}},lz=(t,e)=>{const n=t.schema;t.addAttributeFilter("href",g=>{let b=g.length;const x=E=>E.split(" ").filter(R=>R.length>0).concat(["noopener"]).sort().join(" "),w=E=>{const D=E?Mt.trim(E):"";return/\b(noopener)\b/g.test(D)?D:x(D)};if(!e.allow_unsafe_link_target)for(;b--;){const E=g[b];E.name==="a"&&E.attr("target")==="_blank"&&E.attr("rel",w(E.attr("rel")))}}),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",g=>{let b=g.length,x,w,E,D;for(;b--;)if(D=g[b],D.name==="a"&&D.firstChild&&!D.attr("href"))for(E=D.parent,x=D.lastChild;x&&E;)w=x.prev,E.insert(x,D),x=w}),e.fix_list_elements&&t.addNodeFilter("ul,ol",g=>{let b=g.length,x,w;for(;b--;)if(x=g[b],w=x.parent,w&&(w.name==="ul"||w.name==="ol"))if(x.prev&&x.prev.name==="li")x.prev.append(x);else{const E=new hr("li",1);E.attr("style","list-style-type: none"),x.wrap(E)}});const r=n.getValidClasses();e.validate&&r&&t.addAttributeFilter("class",g=>{let b=g.length;for(;b--;){const x=g[b],w=x.attr("class")??"",E=Mt.explode(w," ");let D="";for(let R=0;R<E.length;R++){const N=E[R];let H=!1,$=r["*"];$&&$[N]&&(H=!0),$=r[x.name],!H&&$&&$[N]&&(H=!0),H&&(D&&(D+=" "),D+=N)}D.length||(D=null),x.attr("class",D)}}),cz(t,e);const i=e.sandbox_iframes??!1,u=id(e.sandbox_iframes_exclusions??[]);e.convert_unsafe_embeds&&t.addNodeFilter("object,embed",g=>Y(g,b=>{b.replace(Ys({type:b.attr("type"),src:b.name==="object"?b.attr("data"):b.attr("src"),width:b.attr("width"),height:b.attr("height")},i,u))})),i&&t.addNodeFilter("iframe",g=>Y(g,b=>RS(b,u)))};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:z7,setPrototypeOf:V7,isFrozen:uz,getPrototypeOf:dz,getOwnPropertyDescriptor:mz}=Object;let{freeze:$i,seal:Wl,create:oy}=Object,{apply:FT,construct:MT}=typeof Reflect<"u"&&Reflect;$i||($i=function(e){return e}),Wl||(Wl=function(e){return e}),FT||(FT=function(e,n,r){return e.apply(n,r)}),MT||(MT=function(e,n){return new e(...n)});const NT=Sa(Array.prototype.forEach),ny=Sa(Array.prototype.lastIndexOf),U7=Sa(Array.prototype.pop),hh=Sa(Array.prototype.push),gz=Sa(Array.prototype.splice),BS=Sa(String.prototype.toLowerCase),PT=Sa(String.prototype.toString),W7=Sa(String.prototype.match),Gu=Sa(String.prototype.replace),bh=Sa(String.prototype.indexOf),FS=Sa(String.prototype.trim),xc=Sa(Object.prototype.hasOwnProperty),Rr=Sa(RegExp.prototype.test),qu=MS(TypeError);function Sa(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return FT(t,e,r)}}function MS(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return MT(t,n)}}function fn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:BS;V7&&V7(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const u=n(i);u!==i&&(uz(e)||(e[r]=u),i=u)}t[i]=!0}return t}function IT(t){for(let e=0;e<t.length;e++)xc(t,e)||(t[e]=null);return t}function Ku(t){const e=oy(null);for(const[n,r]of z7(t))xc(t,n)&&(Array.isArray(r)?e[n]=IT(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=Ku(r):e[n]=r);return e}function cb(t,e){for(;t!==null;){const r=mz(t,e);if(r){if(r.get)return Sa(r.get);if(typeof r.value=="function")return Sa(r.value)}t=dz(t)}function n(){return null}return n}const $T=$i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Af=$i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),NS=$i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z7=$i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),PS=$i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),IS=$i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),LT=$i(["#text"]),HT=$i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
24spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$S=$i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zT=$i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zl=$i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Tf=Wl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jl=Wl(/<%[\w\W]*|[\w\W]*%>/gm),fz=Wl(/\$\{[\w\W]*/gm),pz=Wl(/^data-[\-\w.\u00B7-\uFFFF]+$/),hz=Wl(/^aria-[\-\w]+$/),j7=Wl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bz=Wl(/^(?:\w+script|data):/i),xz=Wl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G7=Wl(/^html$/i),vz=Wl(/^[a-z][.\w]*(-[.\w]+)+$/i);var q7=Object.freeze({__proto__:null,ARIA_ATTR:hz,ATTR_WHITESPACE:xz,CUSTOM_ELEMENT:vz,DATA_ATTR:pz,DOCTYPE_NAME:G7,ERB_EXPR:jl,IS_ALLOWED_URI:j7,IS_SCRIPT_OR_DATA:bz,MUSTACHE_EXPR:Tf,TMPLIT_EXPR:fz});const sy={element:1,text:3,progressingInstruction:7,comment:8,document:9},yz=function(){return typeof window>"u"?null:window},Cz=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;
vendor: 8,536 bytes, line 24
24const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const u="dompurify"+(r?"#"+r:"");try{return e.createPolicy(u,{createHTML(g){return g},createScriptURL(g){return g}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},LS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function HS(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yz();const e=bo=>HS(bo);if(e.version="3.2.6",e.removed=[],!t||!t.document||t.document.nodeType!==sy.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:u,HTMLTemplateElement:g,Node:b,Element:x,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:D,DOMParser:R,trustedTypes:N}=t,H=x.prototype,$=cb(H,"cloneNode"),U=cb(H,"remove"),J=cb(H,"nextSibling"),Q=cb(H,"childNodes"),et=cb(H,"parentNode");if(typeof g=="function"){const bo=n.createElement("template");bo.content&&bo.content.ownerDocument&&(n=bo.content.ownerDocument)}let ft,St="";const{implementation:Gt,createNodeIterator:ge,createDocumentFragment:ht,getElementsByTagName:it}=n,{importNode:bt}=r;let qt=LS();e.isSupported=typeof z7=="function"&&typeof et=="function"&&Gt&&Gt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:De,ERB_EXPR:Oe,TMPLIT_EXPR:Co,DATA_ATTR:Yo,ARIA_ATTR:_n,IS_SCRIPT_OR_DATA:In,ATTR_WHITESPACE:vr,CUSTOM_ELEMENT:zi}=q7;let{IS_ALLOWED_URI:Yt}=q7,Ce=null;const Ho=fn({},[...$T,...Af,...NS,...PS,...LT]);let No=null;const Fr=fn({},[...HT,...$S,...zT,...Zl]);let yt=Object.seal(oy(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),zt=null,re=null,fo=!0,Ye=!0,en=!1,ul=!0,qa=!1,dl=!0,_c=!1,Wf=!1,Aa=!1,hi=!1,pg=!1,Qb=!1,Z4=!0,Re=!1;const _o="user-content-";let _s=!0,Bn=!1,cn={},gs=null;const Vi=fn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ka=null;const ml=fn({},["audio","video","img","source","image","track"]);let hg=null;const j4=fn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),G4="http://www.w3.org/1998/Math/MathML",hC="http://www.w3.org/2000/svg",am="http://www.w3.org/1999/xhtml";let tx=am,jO=!1,q4=null;const FX=fn({},[G4,hC,am],PT);let GO=fn({},["mi","mo","mn","ms","mtext"]),qO=fn({},["annotation-xml"]);const MX=fn({},["title","style","font","a","script"]);let K4=null;const ex=["application/xhtml+xml","text/html"],fL="text/html";let rt=null,lt=null;const Xt=n.createElement("form"),Vt=function(ut){return ut instanceof RegExp||ut instanceof Function},Le=function(){let ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(lt&<===ut)){if((!ut||typeof ut!="object")&&(ut={}),ut=Ku(ut),K4=ex.indexOf(ut.PARSER_MEDIA_TYPE)===-1?fL:ut.PARSER_MEDIA_TYPE,rt=K4==="application/xhtml+xml"?PT:BS,Ce=xc(ut,"ALLOWED_TAGS")?fn({},ut.ALLOWED_TAGS,rt):Ho,No=xc(ut,"ALLOWED_ATTR")?fn({},ut.ALLOWED_ATTR,rt):Fr,q4=xc(ut,"ALLOWED_NAMESPACES")?fn({},ut.ALLOWED_NAMESPACES,PT):FX,hg=xc(ut,"ADD_URI_SAFE_ATTR")?fn(Ku(j4),ut.ADD_URI_SAFE_ATTR,rt):j4,Ka=xc(ut,"ADD_DATA_URI_TAGS")?fn(Ku(ml),ut.ADD_DATA_URI_TAGS,rt):ml,gs=xc(ut,"FORBID_CONTENTS")?fn({},ut.FORBID_CONTENTS,rt):Vi,zt=xc(ut,"FORBID_TAGS")?fn({},ut.FORBID_TAGS,rt):Ku({}),re=xc(ut,"FORBID_ATTR")?fn({},ut.FORBID_ATTR,rt):Ku({}),cn=xc(ut,"USE_PROFILES")?ut.USE_PROFILES:!1,fo=ut.ALLOW_ARIA_ATTR!==!1,Ye=ut.ALLOW_DATA_ATTR!==!1,en=ut.ALLOW_UNKNOWN_PROTOCOLS||!1,ul=ut.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qa=ut.SAFE_FOR_TEMPLATES||!1,dl=ut.SAFE_FOR_XML!==!1,_c=ut.WHOLE_DOCUMENT||!1,hi=ut.RETURN_DOM||!1,pg=ut.RETURN_DOM_FRAGMENT||!1,Qb=ut.RETURN_TRUSTED_TYPE||!1,Aa=ut.FORCE_BODY||!1,Z4=ut.SANITIZE_DOM!==!1,Re=ut.SANITIZE_NAMED_PROPS||!1,_s=ut.KEEP_CONTENT!==!1,Bn=ut.IN_PLACE||!1,Yt=ut.ALLOWED_URI_REGEXP||j7,tx=ut.NAMESPACE||am,GO=ut.MATHML_TEXT_INTEGRATION_POINTS||GO,qO=ut.HTML_INTEGRATION_POINTS||qO,yt=ut.CUSTOM_ELEMENT_HANDLING||{},ut.CUSTOM_ELEMENT_HANDLING&&Vt(ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(yt.tagNameCheck=ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&Vt(ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(yt.attributeNameCheck=ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&typeof ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(yt.allowCustomizedBuiltInElements=ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qa&&(Ye=!1),pg&&(hi=!0),cn&&(Ce=fn({},LT),No=[],cn.html===!0&&(fn(Ce,$T),fn(No,HT)),cn.svg===!0&&(fn(Ce,Af),fn(No,$S),fn(No,Zl)),cn.svgFilters===!0&&(fn(Ce,NS),fn(No,$S),fn(No,Zl)),cn.mathMl===!0&&(fn(Ce,PS),fn(No,zT),fn(No,Zl))),ut.ADD_TAGS&&(Ce===Ho&&(Ce=Ku(Ce)),fn(Ce,ut.ADD_TAGS,rt)),ut.ADD_ATTR&&(No===Fr&&(No=Ku(No)),fn(No,ut.ADD_ATTR,rt)),ut.ADD_URI_SAFE_ATTR&&fn(hg,ut.ADD_URI_SAFE_ATTR,rt),ut.FORBID_CONTENTS&&(gs===Vi&&(gs=Ku(gs)),fn(gs,ut.FORBID_CONTENTS,rt)),_s&&(Ce["#text"]=!0),_c&&fn(Ce,["html","head","body"]),Ce.table&&(fn(Ce,["tbody"]),delete zt.tbody),ut.TRUSTED_TYPES_POLICY){if(typeof ut.TRUSTED_TYPES_POLICY.createHTML!="function")throw qu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ut.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ft=ut.TRUSTED_TYPES_POLICY,St=ft.createHTML("")}else ft===void 0&&(ft=Cz(N,i)),ft!==null&&typeof St=="string"&&(St=ft.createHTML(""));$i&&$i(ut),lt=ut}},Po=fn({},[...Af,...NS,...Z7]),Ss=fn({},[...PS,...IS]),bg=function(ut){let we=et(ut);(!we||!we.tagName)&&(we={namespaceURI:tx,tagName:"template"});const io=BS(ut.tagName),yr=BS(we.tagName);return q4[ut.namespaceURI]?ut.namespaceURI===hC?we.namespaceURI===am?io==="svg":we.namespaceURI===G4?io==="svg"&&(yr==="annotation-xml"||GO[yr]):!!Po[io]:ut.namespaceURI===G4?we.namespaceURI===am?io==="math":we.namespaceURI===hC?io==="math"&&qO[yr]:!!Ss[io]:ut.namespaceURI===am?we.namespaceURI===hC&&!qO[yr]||we.namespaceURI===G4&&!GO[yr]?!1:!Ss[io]&&(MX[io]||!Po[io]):!!(K4==="application/xhtml+xml"&&q4[ut.namespaceURI]):!1},im=function(ut){hh(e.removed,{element:ut});try{et(ut).removeChild(ut)}catch{U(ut)}},Y4=function(ut,we){try{hh(e.removed,{attribute:we.getAttributeNode(ut),from:we})}catch{hh(e.removed,{attribute:null,from:we})}if(we.removeAttribute(ut),ut==="is")if(hi||pg)try{im(we)}catch{}else try{we.setAttribute(ut,"")}catch{}},NX=function(ut){let we=null,io=null;if(Aa)ut="<remove></remove>"+ut;else{const Ya=W7(ut,/^[\r\n\t ]+/);io=Ya&&Ya[0]}K4==="application/xhtml+xml"&&tx===am&&(ut='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ut+"</body></html>");const yr=ft?ft.createHTML(ut):ut;if(tx===am)try{we=new R().parseFromString(yr,K4)}catch{}if(!we||!we.documentElement){we=Gt.createDocument(tx,"template",null);try{we.documentElement.innerHTML=jO?St:yr}catch{}}const Sc=we.body||we.documentElement;return ut&&io&&Sc.insertBefore(n.createTextNode(io),Sc.childNodes[0]||null),tx===am?it.call(we,_c?"html":"body")[0]:_c?we.documentElement:Sc},PX=function(ut){return ge.call(ut.ownerDocument||ut,ut,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT|w.SHOW_PROCESSING_INSTRUCTION|w.SHOW_CDATA_SECTION,null)},NY=function(ut){return ut instanceof D&&(typeof ut.nodeName!="string"||typeof ut.textContent!="string"||typeof ut.removeChild!="function"||!(ut.attributes instanceof E)||typeof ut.removeAttribute!="function"||typeof ut.setAttribute!="function"||typeof ut.namespaceURI!="string"||typeof ut.insertBefore!="function"||typeof ut.hasChildNodes!="function")},IX=function(ut){return typeof b=="function"&&ut instanceof b};function Yh(bo,ut,we){NT(bo,io=>{io.call(e,ut,we,lt)})}const $X=function(ut){let we=null;if(Yh(qt.beforeSanitizeElements,ut,null),NY(ut))return im(ut),!0;const io=rt(ut.nodeName);if(Yh(qt.uponSanitizeElement,ut,{tagName:io,allowedTags:Ce}),dl&&ut.hasChildNodes()&&!IX(ut.firstElementChild)&&Rr(/<[/\w!]/g,ut.innerHTML)&&Rr(/<[/\w!]/g,ut.textContent)||ut.nodeType===sy.progressingInstruction||dl&&ut.nodeType===sy.comment&&Rr(/<[/\w]/g,ut.data))return im(ut),!0;
vendor: 4,427 bytes, lines 24-25
24if(!Ce[io]||zt[io]){if(!zt[io]&&HX(io)&&(yt.tagNameCheck instanceof RegExp&&Rr(yt.tagNameCheck,io)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(io)))return!1;if(_s&&!gs[io]){const yr=et(ut)||ut.parentNode,Sc=Q(ut)||ut.childNodes;if(Sc&&yr){const Ya=Sc.length;for(let nu=Ya-1;nu>=0;--nu){const Xh=$(Sc[nu],!0);Xh.__removalCount=(ut.__removalCount||0)+1,yr.insertBefore(Xh,J(ut))}}}return im(ut),!0}return ut instanceof x&&!bg(ut)||(io==="noscript"||io==="noembed"||io==="noframes")&&Rr(/<\/no(script|embed|frames)/i,ut.innerHTML)?(im(ut),!0):(qa&&ut.nodeType===sy.text&&(we=ut.textContent,NT([De,Oe,Co],yr=>{we=Gu(we,yr," ")}),ut.textContent!==we&&(hh(e.removed,{element:ut.cloneNode()}),ut.textContent=we)),Yh(qt.afterSanitizeElements,ut,null),!1)},LX=function(ut,we,io){if(Z4&&(we==="id"||we==="name")&&(io in n||io in Xt))return!1;if(!(Ye&&!re[we]&&Rr(Yo,we))){if(!(fo&&Rr(_n,we))){if(!No[we]||re[we]){if(!(HX(ut)&&(yt.tagNameCheck instanceof RegExp&&Rr(yt.tagNameCheck,ut)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(ut))&&(yt.attributeNameCheck instanceof RegExp&&Rr(yt.attributeNameCheck,we)||yt.attributeNameCheck instanceof Function&&yt.attributeNameCheck(we))||we==="is"&&yt.allowCustomizedBuiltInElements&&(yt.tagNameCheck instanceof RegExp&&Rr(yt.tagNameCheck,io)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(io))))return!1}else if(!hg[we]){if(!Rr(Yt,Gu(io,vr,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&ut!=="script"&&bh(io,"data:")===0&&Ka[ut])){if(!(en&&!Rr(In,Gu(io,vr,"")))){if(io)return!1}}}}}}return!0},HX=function(ut){return ut!=="annotation-xml"&&W7(ut,zi)},zX=function(ut){Yh(qt.beforeSanitizeAttributes,ut,null);const{attributes:we}=ut;if(!we||NY(ut))return;const io={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:No,forceKeepAttr:void 0};let yr=we.length;for(;yr--;){const Sc=we[yr],{name:Ya,namespaceURI:nu,value:Xh}=Sc,KO=rt(Ya),PY=Xh;let kc=Ya==="value"?PY:FS(PY);if(io.attrName=KO,io.attrValue=kc,io.keepAttr=!0,io.forceKeepAttr=void 0,Yh(qt.uponSanitizeAttribute,ut,io),kc=io.attrValue,Re&&(KO==="id"||KO==="name")&&(Y4(Ya,ut),kc=_o+kc),dl&&Rr(/((--!?|])>)|<\/(style|title)/i,kc)){Y4(Ya,ut);continue}if(io.forceKeepAttr)continue;if(!io.keepAttr){Y4(Ya,ut);continue}if(!ul&&Rr(/\/>/i,kc)){Y4(Ya,ut);continue}qa&&NT([De,Oe,Co],UX=>{kc=Gu(kc,UX," ")});const VX=rt(ut.nodeName);if(!LX(VX,KO,kc)){Y4(Ya,ut);continue}if(ft&&typeof N=="object"&&typeof N.getAttributeType=="function"&&!nu)switch(N.getAttributeType(VX,KO)){case"TrustedHTML":{kc=ft.createHTML(kc);break}case"TrustedScriptURL":{kc=ft.createScriptURL(kc);break}}if(kc!==PY)try{nu?ut.setAttributeNS(nu,Ya,kc):ut.setAttribute(Ya,kc),NY(ut)?im(ut):U7(e.removed)}catch{Y4(Ya,ut)}}Yh(qt.afterSanitizeAttributes,ut,null)},mJ=function bo(ut){let we=null;const io=PX(ut);for(Yh(qt.beforeSanitizeShadowDOM,ut,null);we=io.nextNode();)Yh(qt.uponSanitizeShadowNode,we,null),$X(we),zX(we),we.content instanceof u&&bo(we.content);Yh(qt.afterSanitizeShadowDOM,ut,null)};return e.sanitize=function(bo){let ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,io=null,yr=null,Sc=null;if(jO=!bo,jO&&(bo="<!-->"),typeof bo!="string"&&!IX(bo))if(typeof bo.toString=="function"){if(bo=bo.toString(),typeof bo!="string")throw qu("dirty is not a string, aborting")}else throw qu("toString is not a function");if(!e.isSupported)return bo;if(Wf||Le(ut),e.removed=[],typeof bo=="string"&&(Bn=!1),Bn){if(bo.nodeName){const Xh=rt(bo.nodeName);if(!Ce[Xh]||zt[Xh])throw qu("root node is forbidden and cannot be sanitized in-place")}}else if(bo instanceof b)we=NX("<!---->"),io=we.ownerDocument.importNode(bo,!0),io.nodeType===sy.element&&io.nodeName==="BODY"||io.nodeName==="HTML"?we=io:we.appendChild(io);else{if(!hi&&!qa&&!_c&&bo.indexOf("<")===-1)return ft&&Qb?ft.createHTML(bo):bo;if(we=NX(bo),!we)return hi?null:Qb?St:""}we&&Aa&&im(we.firstChild);const Ya=PX(Bn?bo:we);for(;yr=Ya.nextNode();)$X(yr),zX(yr),yr.content instanceof u&&mJ(yr.content);if(Bn)return bo;if(hi){if(pg)for(Sc=ht.call(we.ownerDocument);we.firstChild;)Sc.appendChild(we.firstChild);else Sc=we;return(No.shadowroot||No.shadowrootmode)&&(Sc=bt.call(r,Sc,!0)),Sc}let nu=_c?we.outerHTML:we.innerHTML;return _c&&Ce["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&Rr(G7,we.ownerDocument.doctype.name)&&(nu="<!DOCTYPE "+we.ownerDocument.doctype.name+`> 25`+nu),qa&&NT([De,Oe,Co],Xh=>{nu=Gu(nu,Xh," ")}
25),ft&&Qb?ft.createHTML(nu):nu},e.setConfig=function(){let bo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(bo),Wf=!0},e.clearConfig=function(){lt=null,Wf=!1},e.isValidAttribute=function(bo,ut,we){lt||Le({});const io=rt(bo),yr=rt(ut);return LX(io,yr,we)},e.addHook=function(bo,ut){typeof ut=="function"&&hh(qt[bo],ut)},e.removeHook=function(bo,ut){if(ut!==void 0){const we=ny(qt[bo],ut);return we===-1?void 0:gz(qt[bo],we,1)[0]}return U7(qt[bo])},e.removeHooks=function(bo){qt[bo]=[]},e.removeAllHooks=function(){qt=LS()},e}var zS=HS();const K7=Mt.each,wz=Mt.trim,Y7=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],X7={ftp:21,http:80,https:443,mailto:25},VT=["img","video"],J7=(t,e)=>mt(t)?!t:mt(e)?!xt(VT,e):!0,Q7=t=>{try{return decodeURIComponent(t)}catch{return unescape(t)}},VS=(t,e,n)=>{const r=Q7(e).replace(/\s/g,"");return t.allow_script_urls?!1:/((java|vb)script|mhtml):/i.test(r)?!0:t.allow_html_data_urls?!1:/^data:image\//i.test(r)?J7(t.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(r):/^data:/i.test(r)};class Gl{constructor(e,n={}){Ft(this,"source");Ft(this,"protocol");Ft(this,"authority");Ft(this,"userInfo");Ft(this,"user");Ft(this,"password");Ft(this,"host");Ft(this,"port");Ft(this,"relative");Ft(this,"path","");Ft(this,"directory","");Ft(this,"file");Ft(this,"query");Ft(this,"anchor");Ft(this,"settings");e=wz(e),this.settings=n;const r=n.base_uri,i=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){i.source=e;return}const u=e.indexOf("//")===0;if(e.indexOf("/")===0&&!u&&(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const b=r?r.path:new Gl(document.location.href).directory;if((r==null?void 0:r.protocol)==="")e="//mce_host"+i.toAbsPath(b,e);else{const x=/([^#?]*)([#?]?.*)/.exec(e);x&&(e=(r&&r.protocol||"http")+"://mce_host"+i.toAbsPath(b,x[1])+x[2])}}e=e.replace(/@@/g,"(mce_at)");const g=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);g&&K7(Y7,(b,x)=>{let w=g[x];w&&(w=w.replace(/\(mce_at\)/g,"@@")),i[b]=w}),r&&(i.protocol||(i.protocol=r.protocol),i.userInfo||(i.userInfo=r.userInfo),!i.port&&i.host==="mce_host"&&(i.port=r.port),(!i.host||i.host==="mce_host")&&(i.host=r.host),i.source=""),u&&(i.protocol="")}static parseDataUri(e){let n;const r=decodeURIComponent(e).split(","),i=/data:([^;]+)/.exec(r[0]);return i&&(n=i[1]),{type:n,data:r[1]}}static isDomSafe(e,n,r={}){if(r.allow_script_urls)return!0;{const i=La.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!VS(r,i,n)}}static getDocumentBaseUrl(e){let n;return e.protocol.indexOf("http")!==0&&e.protocol!=="file:"?n=e.href??"":n=e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),n}setPath(e){const n=/^(.*?)\/?(\w+)?$/.exec(e);n&&(this.path=n[0],this.directory=n[1],this.file=n[2]),this.source="",this.getURI()}toRelative(e){if(e==="./")return e;const n=new Gl(e,{base_uri:this});if(n.host!=="mce_host"&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&n.protocol!=="")return n.getURI();const r=this.getURI(),i=n.getURI();if(r===i||r.charAt(r.length-1)==="/"&&r.substr(0,r.length-1)===i)return r;let u=this.toRelPath(this.path,n.path);return n.query&&(u+="?"+n.query),n.anchor&&(u+="#"+n.anchor),u}toAbsolute(e,n){const r=new Gl(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;const n=this.protocol?X7[this.protocol]:null;if(n&&(this.port||n)==(e.port||n))return!0}return!1}toRelPath(e,n){let r=0,i="",u,g;const b=e.substring(0,e.lastIndexOf("/")).split("/"),x=n.split("/");if(b.length>=x.length){for(u=0,g=b.length;u<g;u++)if(u>=x.length||b[u]!==x[u]){r=u+1;break}}if(b.length<x.length){for(u=0,g=x.length;u<g;u++)if(u>=b.length||b[u]!==x[u]){r=u+1;break}}if(r===1)return n;for(u=0,g=b.length-(r-1);u<g;u++)i+="../";
25for(u=r-1,g=x.length;u<g;u++)u!==r-1?i+="/"+x[u]:i+=x[u];return i}toAbsPath(e,n){let r=0;const i=/\/$/.test(n)?"/":"",u=e.split("/"),g=n.split("/"),b=[];K7(u,D=>{D&&b.push(D)});const x=[];for(let D=g.length-1;D>=0;D--)if(!(g[D].length===0||g[D]===".")){if(g[D]===".."){r++;continue}if(r>0){r--;continue}x.push(g[D])}const w=b.length-r;let E;return w<=0?E=is(x).join("/"):E=b.slice(0,w).join("/")+"/"+is(x).join("/"),E.indexOf("/")!==0&&(E="/"+E),i&&E.lastIndexOf("/")!==E.length-1&&(E+=i),E}getURI(e=!1){let n;return(!this.source||e)&&(n="",e||(this.protocol?n+=this.protocol+"://":n+="//",this.userInfo&&(n+=this.userInfo+"@"),this.host&&(n+=this.host),this.port&&(n+=":"+this.port)),this.path&&(n+=this.path),this.query&&(n+="?"+this.query),this.anchor&&(n+="#"+this.anchor),this.source=n),this.source}}const _z=Mt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),ql="data-mce-type";let tl=0;const ry=(t,e,n,r,i)=>{const u=e.validate,g=n.getSpecialElements();t.nodeType===ga&&(!e.allow_conditional_comments&&/^\[if/i.test(t.nodeValue??"")&&(t.nodeValue=" "+t.nodeValue),e.sanitize&&e.allow_html_in_comments&&q(t.nodeValue)&&(t.nodeValue=KH(t.nodeValue)));const b=(i==null?void 0:i.tagName)??t.nodeName.toLowerCase();if(r!=="html"&&n.isValid(r)){mt(i)&&(i.allowedTags[b]=!0);return}if(t.nodeType!==ep||b==="body")return;const x=Z.fromDom(t),w=Hn(x,ql),E=Dn(x,"data-mce-bogus");if(!w&&q(E)){E==="all"?xn(x):Ai(x);return}const D=n.getElementRule(b);if(u&&!D){Xe(g,b)?xn(x):Ai(x);return}else mt(i)&&(i.allowedTags[b]=!0);if(u&&D&&!w){if(Y(D.attributesForced??[],R=>{qn(x,R.name,R.value==="{$uid}"?`mce_${tl++}`:R.value)}),Y(D.attributesDefault??[],R=>{Hn(x,R.name)||qn(x,R.name,R.value==="{$uid}"?`mce_${tl++}`:R.value)}),D.attributesRequired&&!$t(D.attributesRequired,R=>Hn(x,R))){Ai(x);return}if(D.removeEmptyAttrs&&kg(x)){Ai(x);return}D.outputName&&D.outputName!==b&&np(x,D.outputName)}},tB=(t,e,n,r,i)=>{const u=t.tagName.toLowerCase(),{attrName:g,attrValue:b}=i;i.keepAttr=ay(e,n,r,u,g,b),i.keepAttr?(i.allowedAttributes[g]=!0,WT(g,n,t.nodeName)&&(i.attrValue=g),e.allow_svg_data_urls&&Ze(b,"data:image/svg+xml")&&(i.forceKeepAttr=!0)):UT(t,g)&&(i.forceKeepAttr=!0)},ay=(t,e,n,r,i,u)=>n!=="html"&&!Cm(r)?!0:!(i in _z&&VS(t,u,r))&&(!t.validate||e.isValid(r,i)||Ze(i,"data-")||Ze(i,"aria-")),UT=(t,e)=>t.hasAttribute(ql)&&(e==="id"||e==="class"||e==="style"),WT=(t,e,n)=>t in e.getBoolAttrs()&&!Xe(e.getCustomElements(),n.toLowerCase()),eB=(t,e,n,r)=>{const{attributes:i}=t;for(let u=i.length-1;u>=0;u--){const g=i[u],b=g.name,x=g.value;!ay(e,n,r,t.tagName.toLowerCase(),b,x)&&!UT(t,b)?t.removeAttribute(b):WT(b,n,t.nodeName)&&t.setAttribute(b,b)}},oB=(t,e,n)=>{const r=zS();return r.addHook("uponSanitizeElement",(i,u)=>{ry(i,t,e,n.track(i),u)}),r.addHook("uponSanitizeAttribute",(i,u)=>{tB(i,t,e,n.current(),u)}),r},nB=(t,e)=>{const r={...{IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body","html"],ALLOWED_ATTR:[]}};return r.PARSER_MEDIA_TYPE=e,t.allow_script_urls?r.ALLOWED_URI_REGEXP=/.*/:t.allow_html_data_urls&&(r.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),r},sB=t=>{const e=["type","href","role","arcrole","title","show","actuate","label","from","to"].map(r=>`xlink:${r}`),n={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:e};zS().sanitize(t,n)},US=(t,e)=>{const n={IN_PLACE:!0,USE_PROFILES:{mathMl:!0}},r=zS(),i=e.allow_mathml_annotation_encodings,u=lo(i)&&i.length>0,g=x=>{const w=x.getAttribute("encoding");return u&&q(w)&&xt(i,w)},b=(x,w)=>u&&w==="semantics"?F.some(!0):w==="annotation"?F.some(jt(x)&&g(x)):lo(e.extended_mathml_elements)&&e.extended_mathml_elements.includes(w)?F.from(!0):F.none();r.addHook("uponSanitizeElement",(x,w)=>{const E=w.tagName??x.nodeName.toLowerCase();b(x,E).each(R=>{w.allowedTags[E]=R,!R&&e.sanitize&&jt(x)&&x.remove()})}),r.addHook("uponSanitizeAttribute",(x,w)=>{lo(e.extended_mathml_attributes)&&e.extended_mathml_attributes.includes(w.attrName)&&(w.forceKeepAttr=!0)}),r.sanitize(t,n)},ZT=t=>e=>{const n=t2(e);if(n==="svg")sB(e);else if(n==="math")US(e,t);else throw new Error("Not a namespace element")},Sz=(t,e)=>{const n=cw();if(t.sanitize){const r=oB(t,e,n);return{sanitizeHtmlElement:(u,g)=>{r.sanitize(u,nB(t,g)),r.removed=[],n.reset()},sanitizeNamespaceElement:ZT(t)}}else return{sanitizeHtmlElement:(u,g)=>{const b=document.createNodeIterator(u,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let x;for(;x=b.nextNode();){const w=n.track(x);ry(x,t,e,w),jt(x)&&eB(x,t,e,w)}n.reset()},sanitizeNamespaceElement:_e}},rB=["script","style","template","param","meta","title","link"],aB=Mt.makeMap,i
25B=Mt.extend,jT=(t,e,n,r,i)=>{const u=t.name,g=u in n&&u!=="title"&&u!=="textarea"&&u!=="noscript",b=e.childNodes;for(let x=0,w=b.length;x<w;x++){const E=b[x],D=new hr(E.nodeName.toLowerCase(),E.nodeType);if(jt(E)){const R=E.attributes;for(let N=0,H=R.length;N<H;N++){const $=R[N];D.attr($.name,$.value)}Cm(D.name)&&(r(E),D.value=E.innerHTML)}else Nt(E)?(D.value=E.data,g&&(D.raw=!0)):to(E)?D.value=i?YH(E.data):E.data:(qx(E)||Ns(E))&&(D.value=E.data);if(Yx(E)){const R=hr.create("#text");R.value=E.innerHTML,R.raw=!0,D.append(R)}else Cm(D.name)||jT(D,E,n,r,i);t.append(D)}},kz=(t,e,n)=>{const r=[];for(let i=t,u=i;i;u=i,i=i.walk()){const g=i;Y(e,b=>b(g)),so(g.parent)&&g!==t?i=u:r.push(g)}for(let i=r.length-1;i>=0;i--){const u=r[i];Y(n,g=>g(u))}},Ez=(t,e,n,r)=>{const i=n.validate,u=e.getNonEmptyElements(),g=e.getWhitespaceElements(),b=iB(aB(rB),e.getBlockElements()),x=N1(e),w=/[ \t\r\n]+/g,E=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,R=Q=>{let et=Q.parent;for(;mt(et);){if(et.name in g)return!0;et=et.parent}return!1},N=Q=>{let et=Q;for(;mt(et);){if(et.name in x)return ty(e,u,g,et);et=et.parent}return!1},H=Q=>Q.name in b||$a(e,Q)||Cm(Q.name)&&Q.parent===t,$=(Q,et)=>{const ft=et?Q.prev:Q.next;return mt(ft)||so(Q.parent)?!1:H(Q.parent)&&(Q.parent!==t||r.isRootContent===!0)};return[Q=>{if(Q.type===3&&!R(Q)){let et=Q.value??"";et=et.replace(w," "),(ju(Q.prev,H)||$(Q,!0))&&(et=et.replace(E,"")),et.length===0||et===" "&&Q.prev&&Q.prev.type===ga&&Q.next&&Q.next.type===ga?Q.remove():Q.value=et}},Q=>{if(Q.type===1){const et=e.getElementRule(Q.name);if(i&&et){const ft=ty(e,u,g,Q);et.paddInEmptyBlock&&ft&&N(Q)?kf(n,r,H,Q):et.removeEmpty&&ft?H(Q)?Q.remove():Q.unwrap():et.paddEmpty&&(ft||ab(Q))&&kf(n,r,H,Q)}}else if(Q.type===3&&!R(Q)){let et=Q.value??"";(Q.next&&H(Q.next)||$(Q,!1))&&(et=et.replace(D,"")),et.length===0?Q.remove():Q.value=et}}]},GT=(t,e)=>{const n=e.forced_root_block??t.forced_root_block;return n===!1?"":n===!0?"p":n},cB=' xmlns="http://www.w3.org/1999/xhtml"',lb=(t={},e=mr())=>{const n=P7(),r=P7(),i={validate:!0,root_name:"body",sanitize:!0,allow_html_in_comments:!1,...t},u=new DOMParser,g=Sz(i,e),b=(et,ft,St="html",Gt=!1)=>{const ge=St==="xhtml",ht=ge?"application/xhtml+xml":"text/html",it=Xe(e.getSpecialElements(),ft.toLowerCase()),bt=it?`<${ft}>${et}</${ft}>`:et,qt=()=>/^[\s]*<head/i.test(et)||/^[\s]*<html/i.test(et)||/^[\s]*<!DOCTYPE/i.test(et)?`<html${ge?cB:""}>${bt}</html>`:ge?`<html${cB}><head></head><body>${bt}</body></html>`:`<body>${bt}</body>`,De=u.parseFromString(qt(),ht),Oe=Gt?De.documentElement:De.body;return g.sanitizeHtmlElement(Oe,ht),it?Oe.firstChild:Oe},x=n.addFilter,w=n.getFilters,E=n.removeFilter,D=r.addFilter,R=r.getFilters,N=r.removeFilter,H=(et,ft)=>{ey(e,et)&&ft.push(et)},$=(et,ft)=>{const St=q(ft.attr(ql)),Gt=ft.type===1&&!Xe(et,ft.name)&&!$a(e,ft)&&!Cm(ft.name);return ft.type===3||Gt&&!St},U=(et,ft)=>{const St=iB(aB(rB),e.getBlockElements()),Gt=/^[ \t\r\n]+/,ge=/[ \t\r\n]+$/;let ht=et.firstChild,it=null;const bt=qt=>{var De,Oe;qt&&(ht=qt.firstChild,ht&&ht.type===3&&(ht.value=(De=ht.value)==null?void 0:De.replace(Gt,"")),ht=qt.lastChild,ht&&ht.type===3&&(ht.value=(Oe=ht.value)==null?void 0:Oe.replace(ge,"")))};if(e.isValidChild(et.name,ft.toLowerCase())){for(;ht;){const qt=ht.next;$(St,ht)?(it||(it=new hr(ft,1),it.attr(i.forced_root_block_attrs),et.insert(it,ht)),it.append(ht)):(bt(it),it=null),ht=qt}bt(it)}},Q={schema:e,addAttributeFilter:D,getAttributeFilters:R,removeAttributeFilter:N,addNodeFilter:x,getNodeFilters:w,removeNodeFilter:E,parse:(et,ft={})=>{const St=i.validate,Gt=(ft.context??i.root_name)==="#document",ge=ft.context??(Gt?"html":i.root_name),ht=b(et,ge,ft.format,Gt);Gs(e,ht);const it=new hr(ge,11);jT(it,ht,e.getSpecialElements(),g.sanitizeNamespaceElement,i.sanitize&&i.allow_html_in_comments),ht.innerHTML="";const[bt,qt]=Ez(it,e,i,ft),De=[],Oe=St?In=>H(In,De):_e,Co={nodes:{},attributes:{}},Yo=In=>kT(w(),R(),In,Co);kz(it,[bt,Yo],[qt,Oe]),De.reverse(),St&&De.length>0&&(ft.context?ft.invalid=!0:M7(De,e,it,Yo));const _n=GT(i,ft);return _n&&(it.name==="body"||ft.isRootContent)&&U(it,_n),ft.invalid||B7(Co,ft),it}};
25return lz(Q,i),QH(Q,i,e),Q},WS=t=>t instanceof hr,Az=t=>WS(t)?yf({validate:!1}).serialize(t):t,lB=(t,e,n)=>{const r=Az(t),i=e(r);if(i.isDefaultPrevented())return i;if(WS(t))if(i.content!==r){const u=lb({validate:!1,forced_root_block:!1,...n}).parse(i.content,{context:t.name});return{...i,content:u}}else return{...i,content:t};else return i},uB=t=>({sanitize:P0(t),sandbox_iframes:hf(t),sandbox_iframes_exclusions:Iu(t)}),dB=(t,e)=>{if(e.no_events)return ua.value(e);{const n=mf(t,e);return n.isDefaultPrevented()?ua.error(Qw(t,{content:"",...n}).content):ua.value(n)}},iy=(t,e,n)=>n.no_events?e:lB(e,i=>Qw(t,{...n,content:i}),uB(t)).content,cy=(t,e)=>{if(e.no_events)return ua.value(e);{const n=lB(e.content,r=>AE(t,{...e,content:r}),uB(t));return n.isDefaultPrevented()?(Jw(t,n),ua.error(void 0)):ua.value(n)}},qT=(t,e,n)=>{n.no_events||Jw(t,{...n,content:e})},Tz="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists,template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),Dz=["content_css_cors"],Oz="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc".split(","),KT=[{name:"export",replacedWith:"Export to PDF"}],mB=(t,e)=>{const n=st(e,r=>Xe(t,r));return ad(n)},Rz=t=>{const e=mB(t,Tz),n=t.forced_root_block;return(n===!1||n==="")&&e.push("forced_root_block (false only)"),ad(e)},YT=t=>mB(t,Dz),gB=(t,e)=>{const n=Mt.makeMap(t.plugins," "),i=st(e,u=>Xe(n,u));return ad(i)},Bz=t=>gB(t,Oz),Fz=t=>gB(t,KT.map(e=>e.name)),Mz=(t,e)=>{const n=Rz(t),r=Bz(e),i=r.length>0,u=n.length>0,g=e.theme==="mobile";if(i||u||g){const b=` 26- `,x=g?` 27 28Themes:${b}mobile`:"",w=i?` 29 30Plugins:${b}${r.join(b)}`:"",E=u?` 31 32Options:${b}${n.join(b)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 8.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/8/migration-from-7x/ for more information."+x+w+E)}},Nz=t=>Xo(KT,e=>e.name===t).fold(()=>t,e=>e.replacedWith?`${t}, replaced by ${e.replacedWith}`:t),Pz=(t,e)=>{const n=YT(t),r=Fz(e),i=r.length>0,u=n.length>0;if(i||u){const g=` 33- `,b=i?` 34 35Plugins:${g}${r.map(Nz).join(g)}`:"",x=u?` 36 37Options:${g}${n.join(g)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+b+x)}},Iz=(t,e)=>{Mz(t,e),Pz(t,e)},ZS={fire:'The "fire" event api has been deprecated and will be removed in TinyMCE 9. Use "dispatch" instead.',selectionSetContent:'The "editor.selection.setContent" method has been deprecated and will be removed in TinyMCE 9. Use "editor.insertContent" instead.'},ly=t=>{console.warn(ZS[t],new Error().stack)},fB=t=>t.dom.length===0?(xn(t),F.none()):F.some(t),$z=(t,e)=>t.filter(n=>Q0.isBookmarkNode(n.dom)).bind(e?yl:ki),jS=(t,e,n,r,i)=>{const u=t.dom,g=e.dom,b=r?u.length:g.length;r?(CS(u,g,i,!1,!r),n.setStart(g,b)):(CS(g,u,i,!1,!r),n.setEnd(g,b))},Lz=(t,e,n)=>{oi(t).each(r=>{const i=t.dom;e&&Zv(r,gt(i,0),n)?vS(i,0,n):!e&&na(r,gt(i,i.length),n)&&yS(i,i.length,n)})},pB=(t,e,n,r,i)=>{t.bind(u=>((r?yS:vS)(u.dom,r?u.dom.length:0,i),e.filter(zo).map(b=>jS(u,b,n,r,i)))).orThunk(()=>$z(e,r).or(e).filter(zo).map(g=>Lz(g,r,i)))},Hz=(t,e,n)=>{const r=F.from(e.firstChild).map(Z.fromDom),i=F.from(e.lastChild).map(Z.fromDom);
37t.deleteContents(),t.insertNode(e);const u=r.bind(ki).filter(zo).bind(fB),g=i.bind(yl).filter(zo).bind(fB);pB(u,r,t,!0,n),pB(g,i,t,!1,n),t.collapse(!1)},zz=(t,e)=>({format:"html",...t,set:!0,selection:!0,content:e}),Vz=(t,e)=>{if(e.format!=="raw"){const n=t.selection.getRng(),r=t.dom.getParent(n.commonAncestorContainer,t.dom.isBlock),i=r?{context:r.nodeName.toLowerCase()}:{},u=t.parser.parse(e.content,{forced_root_block:!1,...i,...e});return yf({validate:!1},t.schema).serialize(u)}else return e.content},GS=(t,e,n={})=>{const r=zz(n,e);cy(t,r).each(i=>{const u=Vz(t,i),g=t.selection.getRng();Hz(g,g.createContextualFragment(u),t.schema),t.selection.setRng(g),hc(t,g),qT(t,u,i)})},Uz=(t,e,n={})=>{ly("selectionSetContent"),GS(t,e,n)},Wz=t=>mt(t.firstChild)&&t.firstChild===t.lastChild,Zz=t=>t.name==="br"||t.value===Bs,jz=(t,e)=>t.getBlockElements()[e.name]&&Wz(e)&&Zz(e.firstChild),Gz=(t,e)=>{const n=t.getNonEmptyElements();return mt(e)&&(e.isEmpty(n)||jz(t,e))},uX=(t,e)=>{let n=e.firstChild,r=e.lastChild;return n&&n.name==="meta"&&(n=n.next),r&&r.attr("id")==="mce_marker"&&(r=r.prev),Gz(t,r)&&(r=r==null?void 0:r.prev),!n||n!==r?!1:n.name==="ul"||n.name==="ol"},Kl=t=>{var r,i;const e=t.firstChild,n=t.lastChild;return e&&e.nodeName==="META"&&((r=e.parentNode)==null||r.removeChild(e)),n&&n.id==="mce_marker"&&((i=n.parentNode)==null||i.removeChild(n)),t},hB=(t,e,n)=>{const r=e.serialize(n),i=t.createFragment(r);return Kl(i)},qz=t=>st((t==null?void 0:t.childNodes)??[],e=>e.nodeName==="LI"),bB=t=>t.data===Bs||Wn(t),Kz=t=>mt(t==null?void 0:t.firstChild)&&t.firstChild===t.lastChild&&bB(t.firstChild),Yz=t=>!t.firstChild||Kz(t),dX=t=>t.length>0&&Yz(t[t.length-1])?t.slice(0,-1):t,Br=(t,e)=>{const n=t.getParent(e,t.isBlock);return n&&n.nodeName==="LI"?n:null},Xz=(t,e)=>!!Br(t,e),XT=(t,e)=>{const n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]},xB=(t,e)=>{const n=gt.before(t),i=Yc(e).next(n);return i?i.toRange():null},uy=(t,e)=>{const n=gt.after(t),i=Yc(e).prev(n);return i?i.toRange():null},Jz=(t,e,n,r)=>{const i=XT(t,r),u=t.parentNode;return u&&(u.insertBefore(i[0],t),Mt.each(e,g=>{u.insertBefore(g,t)}),u.insertBefore(i[1],t),u.removeChild(t)),uy(e[e.length-1],n)},Qz=(t,e,n)=>{const r=t.parentNode;return r&&Mt.each(e,i=>{r.insertBefore(i,t)}),xB(t,n)},tV=(t,e,n,r)=>(r.insertAfter(e.reverse(),t),uy(e[0],n)),eV=(t,e,n,r)=>{const i=hB(e,t,r),u=Br(e,n.startContainer),g=dX(qz(i.firstChild)),b=1,x=2,w=e.getRoot(),E=D=>{const R=gt.fromRangeStart(n),N=Yc(e.getRoot()),H=D===b?N.prev(R):N.next(R),$=H==null?void 0:H.getNode();return $?Br(e,$)!==u:!0};return u?E(b)?Qz(u,g,w):E(x)?tV(u,g,w,e):Jz(u,g,w,n):null},oV=["pre"],vB=(t,e,n,r)=>{var w;const i=e.firstChild,u=e.lastChild,g=u.attr("data-mce-type")==="bookmark"?u.prev:u,b=i===g,x=xt(oV,i.name);if(b&&x){const E=i.attr("contenteditable")!=="false",D=((w=t.getParent(n,t.isBlock))==null?void 0:w.nodeName.toLowerCase())===i.name,R=F.from(Wu(r,n)).forall(Pa);return E&&D&&R}else return!1},JT=Ng,yB=(t,e,n)=>{if(mt(n)){const r=t.getParent(e.endContainer,JT);return n===r&&Km(Z.fromDom(n),e)}else return!1},CB=(t,e)=>{if(t.isBlock(e)&&t.isEditable(e)){const n=e.childNodes;return n.length===1&&Wn(n[0])||n.length===0}else return!1},nV=(t,e,n)=>{var r;n.getAttribute("data-mce-bogus")==="all"?(r=n.parentNode)==null||r.insertBefore(t.dom.createFragment(e),n):CB(t.dom,n)?t.dom.setHTML(n,e):GS(t,e,{no_events:!0})},sV=(t,e,n)=>{F.from(t.getParent(e,"td,th")).map(Z.fromDom).each(r=>v2(r,n))},rV=(t,e)=>{const n=t.schema.getTextInlineElements(),r=t.dom;if(e){const i=t.getBody(),u=Zu(t),g="*[data-mce-fragment]",b=r.select(g);Mt.each(b,x=>{const w=R=>mt(n[R.nodeName.toLowerCase()]),E=R=>R.childNodes.length===1;if((R=>!(u8(r,R)||d8(r,R)))(x)&&w(x)&&E(x)){const R=nb(r,x),N=(J,Q)=>au(J,et=>xt(Q,et)),H=J=>E(x)&&r.is(J,g)&&w(J)&&(J.nodeName===x.nodeName&&N(R,nb(r,J))||H(J.children[0])),$=J=>mt(J)&&J!==i&&(u.compare(x,J)||$(J.parentElement)),U=J=>mt(J)&&J!==i&&r.is(J,g)&&(T9(r,x,J)||U(J.parentElement));(H(x.children[0])||$(x.parentElement)&&!U(x.parentElement))&&r.remove(x,!0)}}),zH(t,xm(b))}},aV=t=>{let e=t;for(;e=e.walk();)e.type===1&&e.attr("data-mce-fragment","1")},iV=t=>{Mt.each(t.getElementsByTagName("*"),e=>{e.removeAttribute("data-mce-fragment")})},qS=t=>!!t.getAttribute("data-mce-fragment"),wB=(t,e)=>mt(e)&&!t.schema.getVoidElements()[e.nodeName],_B=(t,e)=>{var E,D;let n;const r=t.dom,i=t.selection;if(!e)return;i.scrollIntoView(e);const u=Wu(t.getBody(),e);if(u&&r.getContentEditable(u)==="false"){r.remove(e),i.select(u);return}let g=r.createRng();const b=e.previousSibling;if(Nt(b)){g.setStart(b,((E=b.nodeValue)==null?void 0:E.length)??0);const R=e.nextSibling;Nt(R)&&(b.appendData(R.data),(D=R.parentNode)==null||D.removeChild(R))}else g.setStartBefore(e),g.setEndBefore(e);const x=R=>{let N=gt.fromRangeStart(R);return N=Yc(t.getBody()).next(N),N==null?void 0:N.toRange()},w=r.getParent(e,r.isBlock);if(r.remove(e),w&&r.isEmpty(w)){const R=JT(w);tc(Z.fromDom(w)),g.setStart(w,0),g.setEnd(w,0),!R&&!qS(w)&&(n=x(g))?(g=n,r.remove(w)):r.add(w,r.create("br",R?{}:{"data-mce-bogus":"1"}))}i.setRng(g)},cV=t=>{const e=t.dom,n=AT(t.selection.getRng());t.selection.setRng(n);const r=e.getParent(n.startContainer,JT);yB(e,n,r)?_S(t,n,Z.fromDom(r)):SL(n)||_L(n)?n.deleteContents():t.getDoc().execCommand("Delete",!1)},SB=t=>{for(let e=t;e;e=e.walk())if(e.attr("id")==="mce_marker")return F.some(e);return F.none()},lV=(t,e,n)=>{var r;return $t(n.children(),gi)&&((r=t.getParent(e,t.isBlock))==null?void 0:r.no
37deName)==="SUMMARY"},uV=(t,e,n)=>{var U;const r=t.selection,i=t.dom,u=t.parser,g=n.merge,b=yf({validate:!0},t.schema),x='<span id="mce_marker" data-mce-type="bookmark"></span>';n.preserve_zwsp||(e=ya(e)),e.indexOf("{$caret}")===-1&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,x);let w=r.getRng();const E=w.startContainer,D=t.getBody();E===D&&r.isCollapsed()&&i.isBlock(D.firstChild)&&wB(t,D.firstChild)&&i.isEmpty(D.firstChild)&&(w=i.createRng(),w.setStart(D.firstChild,0),w.setEnd(D.firstChild,0),r.setRng(w)),r.isCollapsed()||cV(t);const R=r.getNode(),N={context:R.nodeName.toLowerCase(),data:n.data,insert:!0},H=u.parse(e,N);if(n.paste===!0&&uX(t.schema,H)&&Xz(i,R))return w=eV(b,i,r.getRng(),H),w&&r.setRng(w),e;n.paste===!0&&vB(i,H,R,t.getBody())&&((U=H.firstChild)==null||U.unwrap()),aV(H);let $=H.lastChild;if($&&$.attr("id")==="mce_marker"){const J=$;for($=$.prev;$&&$.name!=="table";$=$.walk(!0))if($.type===3||!i.isBlock($.name)){$.parent&&t.schema.isValidChild($.parent.name,"span")&&$.parent.insert(J,$,$.name==="br");break}}if(t._selectionOverrides.showBlockCaretContainer(R),!N.invalid&&!lV(i,R,H))e=b.serialize(H),nV(t,e,R);else{GS(t,x);let J=r.getNode(),Q;const et=t.getBody();for(_u(J)?J=Q=et:Q=J;Q&&Q!==et;)J=Q,Q=Q.parentNode;e=J===et?et.innerHTML:i.getOuterHTML(J);const ft=u.parse(e),St=SB(ft),Gt=St.bind(jH).getOr(ft);St.each(it=>it.replace(H));const ge=GH(H);H.unwrap();const ht=st(ge,it=>ey(t.schema,it));M7(ht,t.schema,Gt),F7(u.getNodeFilters(),u.getAttributeFilters(),ft),e=b.serialize(ft),J===et?i.setHTML(et,e):i.setOuterHTML(J,e)}return rV(t,g),_B(t,i.get("mce_marker")),iV(t.getBody()),sV(i,r.getStart(),t.schema),R1(t.schema,t.getBody(),r.getStart()),e},dV=t=>{eb(t)&&v(t.getBody()).each(e=>{const n=e.getNode(),r=pa(n)?v(n).getOr(e):e;t.selection.setRng(r.toRange())})},dy=(t,e,n)=>{t.dom.setHTML(t.getBody(),e),n!==!0&&dV(t)},QT=(t,e,n,r)=>{if(n=ya(n),n.length===0||/^\s+$/.test(n)){const i='<br data-mce-bogus="1">';e.nodeName==="TABLE"?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+i+"</li>");const u=ws(t);return t.schema.isValidChild(e.nodeName.toLowerCase(),u.toLowerCase())?(n=i,n=t.dom.createHTML(u,gc(t),n)):n||(n=i),dy(t,n,r.no_selection),{content:n,html:n}}else{r.format!=="raw"&&(n=yf({validate:!1},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0})));const i=X1(Z.fromDom(e))?n:Mt.trim(n);return dy(t,i,r.no_selection),{content:i,html:i}}},mV=(t,e,n,r)=>{F7(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);const i=yf({validate:!1},t.schema).serialize(n),u=ya(X1(Z.fromDom(e))?i:Mt.trim(i));return dy(t,u,r.no_selection),{content:n,html:u}},t5=(t,e,n)=>F.from(t.getBody()).map(r=>WS(e)?mV(t,r,e,n):QT(t,r,e,n)).getOr({content:e,html:WS(n.content)?"":n.content}),my={},kB=Di(["pre"]),gV=(t,e)=>{my[t]||(my[t]=[]),my[t].push(e)},fV=(t,e)=>{Xe(my,t)&&Y(my[t],n=>{n(e)})};gV("pre",t=>{const e=t.selection.getRng(),n=i=>u=>{const g=u.previousSibling;return kB(g)&&xt(i,g)},r=(i,u)=>{const g=Z.fromDom(u),b=Bc(g).dom;xn(g),Ei(Z.fromDom(i),[Z.fromTag("br",b),Z.fromTag("br",b),...Qn(g)])};if(!e.collapsed){const i=t.selection.getSelectedBlocks(),u=st(st(i,kB),n(i));Y(u,g=>{r(g.previousSibling,g)})}});const EB=Mt.each,pV=(t,e,n,r)=>{const i=u=>{if(fa(u)&&jt(u.parentNode)&&t.isEditable(u)){const g=vR(t,u.parentNode);t.getStyle(u,"color")&&g?t.setStyle(u,"text-decoration",g):t.getStyle(u,"text-decoration")===g&&t.setStyle(u,"text-decoration",null)}};e.styles&&(e.styles.color||e.styles.textDecoration)&&(Mt.walk(r,i,"childNodes"),i(r))},AB=(t,e,n,r)=>{if(e.styles&&e.styles.backgroundColor){const i=xT(t,"fontSize");bT(r,u=>i(u)&&t.isEditable(u),y7(t,"backgroundColor",Ym(e.styles.backgroundColor,n)))}},hV=(t,e,n,r)=>{if(Or(e)&&(e.inline==="sub"||e.inline==="sup")){const i=xT(t,"fontSize");bT(r,g=>i(g)&&t.isEditable(g),y7(t,"fontSize",""));const u=st(t.select(e.inline==="sup"?"sub":"sup",r),t.isEditable);t.remove(u,!0)}},bV=(t,e,n,r)=>{EB(e,i=>{Or(i)&&EB(t.dom.select(i.inline,r),u=>{hT(u)&&Qv(t,i,n,u,i.exact?u:null)}),DH(t.dom,i,r)})},xV=(t,e,n,r,i)=>{const u=i.parentNode;Qc(t,u,n,r)&&Qv(t,e,r,i)||e.merge_with_parents&&u&&t.dom.getParent(u,g=>Qc(t,g,n,r)?(Qv(t,e,r,i),!0):!1)},vV=Mt.each,yV=(t,e,n,r)=>{if(dR(t)&&Or(e)&&n.parentNode){const i=N1(t.schema),u=Tk(Z.fromDom(n),g=>B(g.dom));return cs(i,r)&&ve(t.schema,n.parentNode,{skipBogus:!1,includeZwsp:!0})&&!u}else return!1},CV=(t,e,n,r)=>{const i=t.formatter.get(e),u=i[0],g=!r&&t.selection.isCollapsed(),b=t.dom,x=t.selection,w=(N,H)=>{let $=!1;return vV(N,U=>Ll(U)?b.getContentEditable(H)==="false"&&!U.ceFalseOverride||mt(U.collapsed)&&U.collapsed!==g?!0:b.is(H,U.selector)&&!B(H)?(gh(t,H,U,n,H),$=!0,!1):!0:!1),$},E=N=>{if(q(N)){const H=b.create(N);return gh(t,H,u,n,r),H}else return null},D=(N,H,$)=>{const U=[];let J=!0;const Q=u.inline||u.block,et=E(Q),ft=ge=>AL(u)&&Qc(t,ge,e,n),St=(ge,ht,it)=>{const bt=TL(u)&&Mv(t.schema,ge)&&X0(t,ht,Q);return it&&bt},Gt=(ge,ht,it,bt)=>{const qt=ge.nodeName.toLowerCase(),De=X0(t,Q,qt)&&X0(t,ht,Q),Oe=!$&&Nt(ge)&&Tp(ge.data),Co=B(ge),Yo=!Or(u)||!N.isBlock(ge);return(it||bt)&&De&&!Oe&&!Co&&Yo};Hl(N,H,ge=>{let ht;const it=bt=>{let qt=!1,De=J,Oe=!1;const Co=bt.parentNode,Yo=Co.nodeName.toLowerCase(),_n=N.getContentEditable(bt);mt(_n)&&(De=J,J=_n==="true",qt=!0,Oe=xR(t,bt));const In=J&&!qt;if(Wn(bt)&&!yV(t,u,bt,Yo)){ht=null,zu(u)&&N.remove(bt);return}if(ft(bt)){ht=null;return}if(St(bt,Yo,In)){const vr=N.rename(bt,Q);gh(t,vr,u,n,bt),U.push(vr),ht=null;return}if(Ll(u)){let vr=w(i,bt);if(!vr&&mt(Co)&&dA(u)&&(vr=w(i,Co)),!Or(u)||vr){ht=null;return}}mt(et)&&Gt(bt,Yo,In,Oe)?(ht||(ht=N.clone(et,!1),Co.insertBefore(ht,bt),U.push(ht)),Oe&&qt&&(J=De),ht.appendChild(bt)):(ht=null,Y(Wr(bt.childNodes),it),qt&&(J=De),ht=null)};Y(ge,it)}),u.links===!0&&Y(U,ge=>{const ht=it=>
37{it.nodeName==="A"&&gh(t,it,u,n,r),Y(Wr(it.childNodes),ht)};ht(ge)}),HH(t,e,xm(U)),Y(U,ge=>{const ht=qt=>{let De=0;return Y(qt.childNodes,Oe=>{!kL(Oe)&&!Xn(Oe)&&De++}),De},it=qt=>Xo(qt.childNodes,Fv).filter(Oe=>N.getContentEditable(Oe)!=="false"&&kS(N,Oe,u)).map(Oe=>{const Co=N.clone(Oe,!1);return gh(t,Co,u,n,qt),N.replace(Co,qt,!0),N.remove(Oe,!0),Co}).getOr(qt),bt=ht(ge);if((U.length>1||!N.isBlock(ge))&&bt===0){N.remove(ge,!0);return}(Or(u)||zu(u)&&u.wrapper)&&(!u.exact&&bt===1&&(ge=it(ge)),bV(t,i,n,ge),xV(t,u,e,n,ge),AB(N,u,n,ge),pV(N,u,n,ge),hV(N,u,n,ge),v7(t,u,n,ge))})},R=Bv(r)?r:x.getNode();if(b.getContentEditable(R)==="false"&&!xR(t,R)){r=R,w(i,r),Nu(t,e,r,n);return}if(u){if(r)if(Bv(r)){if(!w(i,r)){const N=b.createRng();N.setStartBefore(r),N.setEndAfter(r),D(b,Wd(b,N,i),!0)}}else D(b,r,!0);else!g||!Or(u)||ce(t).length?(x.setRng(AT(x.getRng())),pR(t,()=>{Ov(t,(N,H)=>{const $=H?N:Wd(b,N,i);D(b,$,!1)})},It),t.nodeChanged()):r7(t,e,n),AH(t.formatter,e).each(N=>{const H=pT(t.selection);Y(H,$=>sT(b,$,N,n))});fV(e,t)}Nu(t,e,r,n)},TB=(t,e,n,r)=>{(r||t.selection.isEditable())&&CV(t,e,n,r)},xh=t=>Xe(t,"vars"),KS=(t,e)=>{t.set({}),e.on("NodeChange",n=>{OB(e,n.element,t.get())}),e.on("FormatApply FormatRemove",n=>{const r=F.from(n.node).map(i=>Bv(i)?i:i.startContainer).bind(i=>jt(i)?F.some(i):F.from(i.parentElement)).getOrThunk(()=>e5(e));OB(e,r,t.get())})},e5=t=>t.selection.getStart(),o5=(t,e,n,r,i)=>Vn(e,b=>{const x=t.formatter.matchNode(b,n,i??{},r);return!Gn(x)},b=>
37J8(t,b,n)?!0:r?!1:mt(t.formatter.matchNode(b,n,i,!0))),DB=(t,e)=>{const n=e??e5(t);return st(K_(t.dom,n),r=>jt(r)&&!yd(r))},OB=(t,e,n)=>{const r=DB(t,e);Do(n,(i,u)=>{const g=b=>{const x=o5(t,r,u,b.similar,xh(b)?b.vars:void 0),w=x.isSome();if(b.state.get()!==w){b.state.set(w);const E=x.getOr(e);xh(b)?b.callback(w,{node:E,format:u,parents:r}):Y(b.callbacks,D=>D(w,{node:E,format:u,parents:r}))}};Y([i.withSimilar,i.withoutSimilar],g),Y(i.withVars,g)})},n5=(t,e,n,r,i,u)=>{const g=e.get();Y(n.split(","),b=>{const x=Ln(g,b).getOrThunk(()=>{const E={withSimilar:{state:Te(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Te(!1),similar:!1,callbacks:[]},withVars:[]};return g[b]=E,E}),w=()=>{const E=DB(t);return o5(t,E,b,i,u).isSome()};if(Gn(u)){const E=i?x.withSimilar:x.withoutSimilar;E.callbacks.push(r),E.callbacks.length===1&&E.state.set(w())}else x.withVars.push({state:Te(w()),similar:i,vars:u,callback:r})}),e.set(g)},wV=(t,e,n)=>{const r=t.get();Y(e.split(","),i=>Ln(r,i).each(u=>{r[i]={withSimilar:{...u.withSimilar,callbacks:st(u.withSimilar.callbacks,g=>g!==n)},withoutSimilar:{...u.withoutSimilar,callbacks:st(u.withoutSimilar.callbacks,g=>g!==n)},withVars:st(u.withVars,g=>g.callback!==n)}})),t.set(r)},_V=(t,e,n,r,i,u)=>(n5(t,e,n,r,i,u),{unbind:()=>wV(e,n,r)}),SV=(t,e,n,r)=>{const i=t.formatter.get(e);i&&(aT(t,e,n,r)&&(!("toggle"in i[0])||i[0].toggle)?TS(t,e,n,r):TB(t,e,n,r))},s5=(t,e,n)=>({element:t,width:e,rows:n}),RB=(t,e)=>({element:t,cells:e}),YS=(t,e)=>({x:t,y:e}),ub=(t,e)=>Qi(t,e).bind(kC).getOr(1),kV=(t,e,n,r,i)=>{const u=ub(i,"rowspan"),g=ub(i,"colspan"),b=t.rows;for(let x=n;x<n+u;x++){b[x]||(b[x]=RB(op(r),[]));for(let w=e;w<e+g;w++){const E=b[x].cells;E[w]=x===n&&w===e?i:Pr(i)}}},db=(t,e,n)=>{const r=t.rows;return!!(r[n]?r[n].cells:[])[e]},vc=(t,e,n)=>{for(;db(t,e,n);)e++;return e},mb=t=>We(t,(e,n)=>n.cells.length>e?n.cells.length:e,0),tn=(t,e)=>{const n=t.rows;for(let r=0;r<n.length;r++){const i=n[r].cells;for(let u=0;u<i.length;u++)if(ho(i[u],e))return F.some(YS(u,r))}return F.none()},gb=(t,e,n,r,i)=>{const u=[],g=t.rows;for(let b=n;b<=i;b++){const x=g[b].cells,w=e<r?x.slice(e,r+1):x.slice(r,e+1);u.push(RB(g[b].element,w))}return u},BB=(t,e,n)=>{const r=e.x,i=e.y,u=n.x,g=n.y,b=i<g?gb(t,r,i,u,g):gb(t,r,g,u,i);return s5(t.element,mb(b),b)},FB=(t,e)=>{const n=Pr(t.element),r=Z.fromTag("tbody");return Ei(r,e),Ro(n,r),n},XS=t=>wt(t.rows,e=>{const n=wt(e.cells,i=>{const u=op(i);return As(u,"colspan"),As(u,"rowspan"),u}),r=Pr(e.element);return Ei(r,n),r}),r5=t=>{const e=s5(Pr(t),0,[]);return Y(dr(t,"tr"),(n,r)=>{Y(dr(n,"td,th"),(i,u)=>{kV(e,vc(e,u,r),r,n,i)})}),s5(e.element,mb(e.rows),e.rows)},a5=t=>FB(t,XS(t)),i5=(t,e,n)=>tn(t,e).bind(r=>tn(t,n).map(i=>BB(t,r,i))),c5=t=>Xo(t,e=>oo(e)==="ul"||oo(e)==="ol"),JS=(t,e)=>Xo(t,n=>oo(n)==="li"&&Km(n,e)).fold(Ut([]),n=>c5(t).map(r=>{const i=Z.fromTag(oo(r)),u=Gf(Eg(r),(g,b)=>Ze(b,"list-style"));return Ti(i,u),[Z.fromTag("li"),i]}).getOr([])),l5=(t,e)=>{const n=We(e,(r,i)=>(Ro(i,r),i),t);return e.length>0?fd([n]):n},MB=t=>Xr(t)?oi(t).filter(Ni).fold(Ut([]),e=>[t,e]):Ni(t)?[t]:[],NB=(t,e,n)=>{const r=Z.fromDom(e.commonAncestorContainer),i=Ul(r,t),u=st(i,x=>n.isWrapper(oo(x))),g=JS(i,e),b=u.concat(g.length?g:MB(r));return wt(b,Pr)},u5=()=>fd([]),PB=(t,e,n)=>l5(Z.fromDom(e.cloneContents()),NB(t,e,n)),IB=(t,e)=>bs(e,"table",Et(ho,t)),vh=(t,e)=>IB(t,e[0]).bind(n=>{const r=e[0],i=e[e.length-1],u=r5(n);return i5(u,r,i).map(g=>
37fd([a5(g)]))}).getOrThunk(u5),$B=(t,e,n)=>e.length>0&&e[0].collapsed?u5():PB(t,e[0],n),d5=(t,e,n)=>{const r=W_(e,t);return r.length>0?vh(t,r):$B(t,e,n)},QS=(t,e)=>e>=0&&e<t.length&&er(t.charAt(e)),LB=t=>ya(t.innerText),HB=t=>t.map(e=>e.nodeName).getOr("div").toLowerCase(),zB=t=>F.from(t.selection.getRng()).map(e=>{const n=F.from(t.dom.getParent(e.commonAncestorContainer,t.dom.isBlock)),r=t.getBody(),i=HB(n),u=Z.fromDom(e.cloneContents());a8(u),i8(u);const g=t.dom.add(r,i,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},u.dom),b=LB(g),x=ya(g.textContent??"");if(t.dom.remove(g),QS(x,0)||QS(x,x.length-1)){const w=n.getOr(r),E=LB(w),D=E.indexOf(b);if(D===-1)return b;{const R=QS(E,D-1),N=QS(E,D+b.length);return(R?" ":"")+b+(N?" ":"")}}else return b}).getOr(""),VB=(t,e)=>{const n=t.selection.getRng(),r=t.dom.create("body"),i=t.selection.getSel(),u=RA(t,Hr(i)),g=e.contextual?d5(Z.fromDom(t.getBody()),u,t.schema).dom:n.cloneContents();return g&&r.appendChild(g),t.selection.serializer.serialize(r,e)},t3=(t,e)=>{if(e.format==="text")return zB(t);{const n=VB(t,e);return e.format==="tree"?n:t.selection.isCollapsed()?"":n}},UB=(t,e)=>({...t,format:e,get:!0,selection:!0,getInner:!0}),WB=(t,e,n={})=>{const r=UB(n,e);return dB(t,r).fold(Sn,i=>{const u=t3(t,i);return iy(t,u,i)})},e3=0,m5=1,g5=2,ZB=(t,e)=>{const n=t.length+e.length+2,r=new Array(n),i=new Array(n),u=(E,D,R)=>({start:E,end:D,diag:R}),g=(E,D,R,N,H)=>{const $=x(E,D,R,N);if($===null||$.start===D&&$.diag===D-N||$.end===E&&$.diag===E-R){let U=E,J=R;for(;U<D||J<N;)U<D&&J<N&&t[U]===e[J]?(H.push([e3,t[U]]),++U,++J):D-E>N-R?(H.push([g5,t[U]]),++U):(H.push([m5,e[J]]),++J)}else{g(E,$.start,R,$.start-$.diag,H);for(let U=$.start;U<$.end;++U)H.push([e3,t[U]]);g($.end,D,$.end-$.diag,N,H)}},b=(E,D,R,N)=>{let H=E;for(;H-D<N&&H<R&&t[H]===e[H-D];)++H;return u(E,H,D)},x=(E,D,R,N)=>{const H=D-E,$=N-R;if(H===0||$===0)return null;const U=H-$,J=$+H,Q=(J%2===0?J:J+1)/2;r[1+Q]=E,i[1+Q]=D+1;let et,ft,St,Gt,ge;for(et=0;et<=Q;++et){for(ft=-et;ft<=et;ft+=2){for(St=ft+Q,ft===-et||ft!==et&&r[St-1]<r[St+1]?r[St]=r[St+1]:r[St]=r[St-1]+1,Gt=r[St],ge=Gt-E+R-ft;Gt<D&&ge<N&&t[Gt]===e[ge];)r[St]=++Gt,++ge;if(U%2!==0&&U-et<=ft&&ft<=U+et&&i[St-U]<=r[St])return b(i[St-U],ft+E-R,D,N)}for(ft=U-et;ft<=U+et;ft+=2){for(St=ft+Q-U,ft===U-et||ft!==U+et&&i[St+1]<=i[St-1]?i[St]=i[St+1]-1:i[St]=i[St-1],Gt=i[St]-1,ge=Gt-E+R-ft;Gt>=E&&ge>=R&&t[Gt]===e[ge];)i[St]=Gt--,ge--;if(U%2===0&&-et<=ft&&ft<=et&&i[St]<=r[St+U])return b(i[St],ft+E-R,D,N)}}return null},w=[];return g(0,t.length,0,e.length,w),w},f5=t=>jt(t)?t.outerHTML:Nt(t)?La.encodeRaw(t.data,!1):to(t)?"<!--"+t.data+"-->":"",jB=t=>{let e;const n=document.createElement("div"),r=document.createDocumentFragment();for(t&&(n.innerHTML=t);e=n.firstChild;)r.appendChild(e);return r},GB=(t,e,n)=>{const r=jB(e);if(t.hasChildNodes()&&n<t.childNodes.length){const i=t.childNodes[n];t.insertBefore(r,i)}else t.appendChild(r)},qB=(t,e)=>{if(t.hasChildNodes()&&e<t.childNodes.length){const n=t.childNodes[e];t.removeChild(n)}},p5=(t,e)=>{let n=0;Y(t,r=>{r[0]===e3?n++:r[0]===m5?(GB(e,r[1],n),n++):r[0]===g5&&qB(e,n)})},KB=(t,e)=>st(wt(Wr(t.childNodes),k(ya,f5)),n=>n.length>0),YB=(t,e)=>{const n=wt(Wr(e.childNodes),f5);return p5(ZB(n,t),e),e},XB=Ci(()=>document.implementation.createHTMLDocument("undo")),JB=t=>t.querySelector(`iframe, ${Xx}`)!==null,QB=t=>({type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}),tF=t=>({type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}),gy=t=>{const e=t.serializer.getTempAttrs(),n=r8(t.getBody(),e);return JB(n)?QB(KB(n)):tF(ya(n.innerHTML))},fy=(t,e,n)=>{const r=n?e.beforeBookmark:e.bookmark;e.type==="fragmented"?YB(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:mt(r)&&Jt(r)?!r.isFakeCaret:!0}),r&&(t.selection.moveToBookmark(r),t.selection.scrollIntoView())},fb=t=>t.type==="fragmented"?t.fragments.join(""):t.content,h5=(t,e)=>{const n=Z.fromTag("body",XB());return xu(n,fb(e)),Y(dr(n,"*[data-mce-bogus]"),Ai),t&&Y(dr(n,"details[open]"),r=>As(r,"open")),Ir(n)},EV=(t,e)=>fb(t)===fb(e),eF=(t,e,n)=>h5(t,e)===h5(t,n),pb=(t,e,n)=>!e||!n?!1:EV(e,n)?!0:eF(t,e,n),py=t=>t.get()===0,Df=(t,e,n)=>{py(n)&&(t.typing=e)},o3=(t,e)=>{t.typing&&(Df(t,!1,e),t.add())},oF=t=>{t.typing&&(t.typing=!1,t.add())},hb=(t,e,n)=>{py(e)&&n.set(sf(t.selection))},b5=(t,e,n,r,i,u,g)=>{const b=gy(t),x=Mt.extend(u||{},b);
37if(!py(r)||t.removed)return null;const w=e.data[n.get()];if(t.dispatch("BeforeAddUndo",{level:x,lastLevel:w,originalEvent:g}).isDefaultPrevented()||w&&pb(t.readonly,w,x))return null;e.data[n.get()]&&i.get().each(R=>{e.data[n.get()].beforeBookmark=R});const E=y_(t);if(E&&e.data.length>E){for(let R=0;R<e.data.length-1;R++)e.data[R]=e.data[R+1];e.data.length--,n.set(e.data.length)}x.bookmark=sf(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(x),n.set(e.data.length-1);const D={level:x,lastLevel:w,originalEvent:g};return n.get()>0?(t.setDirty(!0),t.dispatch("AddUndo",D),t.dispatch("change",D)):t.dispatch("AddUndo",D),x},x5=(t,e,n)=>{e.data=[],n.set(0),e.typing=!1,t.dispatch("ClearUndos")},bb=(t,e,n,r,i)=>{if(e.transact(r)){const u=e.data[n.get()].bookmark,g=e.data[n.get()-1];fy(t,g,!0),e.transact(i)&&(e.data[n.get()-1].beforeBookmark=u)}},Of=(t,e,n)=>{let r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],fy(t,r,!1),t.setDirty(!0),t.dispatch("Redo",{level:r})),r},nF=(t,e,n,r)=>{let i;return e.typing&&(e.add(),e.typing=!1,Df(e,!1,n)),r.get()>0&&(r.set(r.get()-1),i=e.data[r.get()],fy(t,i,!0),t.setDirty(!0),t.dispatch("Undo",{level:i})),i},AV=t=>{t.clear(),t.add()},TV=(t,e,n)=>n.get()>0||e.typing&&e.data[0]&&!pb(t.readonly,gy(t),e.data[0]),sF=(t,e)=>e.get()<t.data.length-1&&!t.typing,rF=(t,e,n)=>(o3(t,e),t.beforeChange(),t.ignore(n),t.add()),aF=(t,e)=>{try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}},DV=(t,e)=>{const n=t.dom,r=mt(e)?e:t.getBody();Y(n.select("table,a",r),i=>{switch(i.nodeName){case"TABLE":const u=w_(t),g=n.getAttrib(i,"border");(!g||g==="0")&&t.hasVisual?n.addClass(i,u):n.removeClass(i,u);break;case"A":if(!n.getAttrib(i,"href")){const b=n.getAttrib(i,"name")||i.id,x=F0(t);b&&t.hasVisual?n.addClass(i,x):n.removeClass(i,x)}break}}),t.dispatch("VisualAid",{element:e,hasVisual:t.hasVisual})},og=t=>({init:{bindEvents:_e},undoManager:{beforeChange:(e,n)=>hb(t,e,n),add:(e,n,r,i,u,g)=>b5(t,e,n,r,i,u,g),undo:(e,n,r)=>nF(t,e,n,r),redo:(e,n)=>Of(t,e,n),clear:(e,n)=>x5(t,e,n),reset:e=>AV(e),hasUndo:(e,n)=>TV(t,e,n),hasRedo:(e,n)=>sF(e,n),transact:(e,n,r)=>rF(e,n,r),ignore:(e,n)=>aF(e,n),extra:(e,n,r,i)=>bb(t,e,n,r,i)},formatter:{match:(e,n,r,i)=>aT(t,e,n,r,i),matchAll:(e,n)=>iT(t,e,n),matchNode:(e,n,r,i)=>Qc(t,e,n,r,i),canApply:e=>cT(t,e),closest:e=>t7(t,e),apply:(e,n,r)=>TB(t,e,n,r),remove:(e,n,r,i)=>TS(t,e,n,r,i),toggle:(e,n,r)=>SV(t,e,n,r),formatChanged:(e,n,r,i,u)=>_V(t,e,n,r,i,u)},editor:{getContent:e=>S9(t,e),setContent:(e,n)=>t5(t,e,n),insertContent:(e,n)=>uV(t,e,n),addVisual:e=>DV(t,e)},selection:{getContent:(e,n)=>WB(t,e,n)},autocompleter:{addDecoration:_e,removeDecoration:_e},raw:{getModel:()=>F.none()}}),yh=t=>{const e=w=>mo(w)?w:{},{init:n,undoManager:r,formatter:i,editor:u,selection:g,autocompleter:b,raw:x}=t;return{init:{bindEvents:n.bindEvents},undoManager:{beforeChange:r.beforeChange,add:r.add,undo:r.undo,redo:r.redo,clear:r.clear,reset:r.reset,hasUndo:r.hasUndo,hasRedo:r.hasRedo,transact:(w,E,D)=>r.transact(D),ignore:(w,E)=>r.ignore(E),extra:(w,E,D,R)=>r.extra(D,R)},formatter:{match:(w,E,D,R)=>i.match(w,e(E),R),matchAll:i.matchAll,matchNode:i.matchNode,canApply:w=>i.canApply(w),closest:w=>i.closest(w),apply:(w,E,D)=>i.apply(w,e(E)),remove:(w,E,D,R)=>i.remove(w,e(E)),toggle:(w,E,D)=>i.toggle(w,e(E)),formatChanged:(w,E,D,R,N)=>i.formatChanged(E,D,R,N)},editor:{getContent:w=>u.getContent(w),setContent:(w,E)=>({content:u.setContent(w,E),html:""}),insertContent:(w,E)=>(u.insertContent(w),""),addVisual:u.addVisual},selection:{getContent:(w,E)=>g.getContent(E)},autocompleter:{addDecoration:b.addDecoration,removeDecoration:b.removeDecoration},raw:{getModel:()=>F.some(x.getRawModel())}}},iF=()=>{const t=Ut(null),e=Ut("");return{init:{bindEvents:_e},undoManager:{beforeChange:_e,add:t,undo:t,redo:t,clear:_e,reset:_e,hasUndo:pt,hasRedo:pt,transact:t,ignore:_e,extra:_e},formatter:{match:pt,matchAll:Ut([]),matchNode:Ut(void 0),canApply:pt,closest:e,apply:_e,remove:_e,toggle:_e,formatChanged:Ut({unbind:_e})},editor:{getContent:e,setContent:Ut({content:"",html:""}),insertContent:Ut(""),addVisual:_e},selection:{getContent:e},autocompleter:{addDecoration:_e,removeDecoration:_e},raw:{getModel:Ut(F.none())}}},Yu=t=>Xe(t.plugins,"rtc"),OV=t=>Ln(t.plugins,"rtc").bind(e=>F.from(e.setup)),RV=t=>{const e=t;return OV(t).fold(()=>(e.rtcInstance=og(t),F.none()),n=>(e.rtcInstance=iF(),F.some(()=>n().then(r=>(e.rtcInstance=yh(r),r.rtc.isRemote)))))},v5=t=>t.rtcInstance?t.rtcInstance:og(t),Cn=t=>{const e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},Yl=(t,e,n)=>{Cn(t).undoManager.beforeChange(e,n)},cF=(t,e,n,r,i,u,g)=>Cn(t).undoManager.add(e,n,r,i,u,g),y5=(t,e,n,r)=>Cn(t).undoManager.undo(e,n,r),C5=(t,e,n)=>Cn(t).undoManager.redo(e,n),n3=(t,e,n)=>{Cn(t).undoManager.clear(e,n)},BV=(t,e)=>{Cn(t).undoManager.reset(e)},lF=(t,e,n)=>Cn(t).undoManager.hasUndo(e,n),hy=(t,e,n)=>Cn(t).undoManager.hasRedo(e,n),FV=(t,e,n,r)=>Cn(t).undoManager.transact(e,n,r),s3=(t,e,n)=>{Cn(t).undoManager.ignore(e,n)},w5=(t,e,n,r,i)=>{Cn(t).undoManager.extra(e,n,r,i)},uF=(t,e,n,r,i)=>Cn(t).formatter.match(e,n,r,i),by=(t,e,n)=>Cn(t).formatter.matchAll(e,n),MV=(t,e,n,r,i)=>Cn(t).formatter.matchNode(e,n,r,i),NV=(t,e)=>Cn(t).formatter.canApply(e),Xu=(t,e)=>Cn(t).formatter.closest(e),Li=(t,e,n,r)=>{Cn(t).formatter.apply(e,n,r)},xy=(t,e,n,r,i)=>{Cn(t).formatter.remove(e,n,r,i)},Hi=(t,e,n,r)=>{Cn(t).formatter.toggle(e,n,r)},PV=(t,e,n,r,i,u)=>Cn(t).formatter.formatChanged(e,n,r,i,u),wn=(t,e)=>v5(t).editor.getContent(e),IV=(t,e,n)=>v5(t).editor.setContent(e,n),ng=(t,e,n)=>v5(t).editor.insertContent(e,n),vy=(t,e,n)=>Cn(t).selection.getContent(e,n),dF=(t,e)=>Cn(t).editor.addVisual(e),r3=t=>Cn(t).init.bindEvents(),_5=(t,e={})=>{const n=e.format?e.format:"html";return vy(t,n,e)},mF=(t,e,n)=>{if(Xe(t,e)){const r=st(t[e],i=>i!==n);r.length===0?delete t[e]:t[e]=r}};var S5=(t,e)=>{let n,r;const i=(b,x)=>Xo(x,w=>t.is(w,b)),u=b=>t.getParents(b,void 0,t.getRoot()),g=()=>{n={},r={},e.on("NodeChange",b=>{const x=b.element,w=u(x),E={};Do(n,(D,R)=>{i(R,w).each(N=>{r[R]||(Y(D,H=>{H(!0,{node:N,selector:R,parents:w})}),r[R]=D),E[R]=D})}),Do(r,(D,R)=>{E[R]||(delete r[R],Y(D,N=>{N(!1,{node:x,selector:R,parents:w})}))})})};return{selectorChangedWithUnbind:(b,x)=>(n||g(),n[b]||(n[b]=[]),n[b].push(x),i(b,u(e.selection.getStart())).each(()=>{r[b]=n[b]}),{unbind:()=>{mF(n,b,x),mF(r,b,x)}})}};const gF=t=>!!(t&&t.ownerDocument)&&_i(Z.fromDom(t.ownerDocument),Z.fromDom(t)),fF=t=>t?gF(t.startContainer)&&gF(t.endContainer):!1,k5=(t,e,n,r)=>{let i,u;const{selectorChangedWithUnbind:g}=S5(t,r),b=(Yt,Ce)=>{const Ho=t.createRng();mt(Yt)&&mt(Ce)?(Ho.setStart(Yt,Ce),Ho.setEnd(Yt,Ce),ft(Ho),J(!1)):(j_(t,Ho,r.getBody(),!0),ft(Ho
37))},x=Yt=>_5(r,Yt),w=(Yt,Ce)=>Uz(r,Yt,Ce),E=Yt=>lS(r.getBody(),et(),Yt),D=Yt=>TA(r.getBody(),et(),Yt),R=(Yt,Ce)=>vr.getBookmark(Yt,Ce),N=Yt=>vr.moveToBookmark(Yt),H=(Yt,Ce)=>(QR(t,Yt,Ce).each(ft),Yt),$=()=>{const Yt=et(),Ce=Q();return!Yt||Yt.item?!1:Yt.compareEndPoints?Yt.compareEndPoints("StartToEnd",Yt)===0:!Ce||Yt.collapsed},U=()=>{if(r.mode.isReadOnly())return!1;const Yt=et(),Ce=r.getBody().querySelectorAll('[data-mce-selected="1"]');return Ce.length>0?au(Ce,Ho=>t.isEditable(Ho.parentElement)):u9(t,Yt)},J=Yt=>{const Ce=et();Ce.collapse(!!Yt),ft(Ce)},Q=()=>e.getSelection?e.getSelection():e.document.selection,et=()=>{let Yt;const Ce=(No,Fr,yt)=>{try{return Fr.compareBoundaryPoints(No,yt)}catch{return-1}},Ho=e.document;if(mt(r.bookmark)&&!eb(r)){const No=oS(r);if(No.isSome())return No.map(Fr=>RA(r,[Fr])[0]).getOr(Ho.createRange())}try{const No=Q();No&&!T1(No.anchorNode)&&(No.rangeCount>0?Yt=No.getRangeAt(0):Yt=Ho.createRange(),Yt=RA(r,[Yt])[0])}catch{}if(Yt||(Yt=Ho.createRange()),_u(Yt.startContainer)&&Yt.collapsed){const No=t.getRoot();Yt.setStart(No,0),Yt.setEnd(No,0)}return i&&u&&(Ce(Yt.START_TO_START,Yt,i)===0&&Ce(Yt.END_TO_END,Yt,i)===0?Yt=u:(i=null,u=null)),Yt},ft=(Yt,Ce)=>{if(!fF(Yt))return;const Ho=Q();if(Yt=r.dispatch("SetSelectionRange",{range:Yt,forward:Ce}).range,Ho){u=Yt;try{Ho.removeAllRanges(),Ho.addRange(Yt)}catch{}Ce===!1&&Ho.extend&&(Ho.collapse(Yt.endContainer,Yt.endOffset),Ho.extend(Yt.startContainer,Yt.startOffset)),i=Ho.rangeCount>0?Ho.getRangeAt(0):null}if(!Yt.collapsed&&Yt.startContainer===Yt.endContainer&&(Ho!=null&&Ho.setBaseAndExtent)&&Yt.endOffset-Yt.startOffset<2&&Yt.startContainer.hasChildNodes()){const Fr=Yt.startContainer.childNodes[Yt.startOffset];Fr&&Fr.nodeName==="IMG"&&(Ho.setBaseAndExtent(Yt.startContainer,Yt.startOffset,Yt.endContainer,Yt.endOffset),(Ho.anchorNode!==Yt.startContainer||Ho.focusNode!==Yt.endContainer)&&Ho.setBaseAndExtent(Fr,0,Fr,1))}r.dispatch("AfterSetSelectionRange",{range:Yt,forward:Ce})},St=Yt=>(GS(r,t.getOuterHTML(Yt)),Yt),Gt=()=>OA(r.getBody(),et()),ge=(Yt,Ce)=>d9(t,et(),Yt,Ce),ht=()=>{const Yt=Q(),Ce=Yt==null?void 0:Yt.anchorNode,Ho=Yt==null?void 0:Yt.focusNode;if(!Yt||!Ce||!Ho||T1(Ce)||T1(Ho))return!0;const No=t.createRng(),Fr=t.createRng();try{No.setStart(Ce,Yt.anchorOffset),No.collapse(!0),Fr.setStart(Ho,Yt.focusOffset),Fr.collapse(!0)}catch{return!0}return No.compareBoundaryPoints(No.START_TO_START,Fr)<=0},In={dom:t,win:e,serializer:n,editor:r,expand:(Yt={type:"word"})=>ft(Uu(t).expand(et(),Yt)),collapse:J,setCursorLocation:b,getContent:x,setContent:w,getBookmark:R,moveToBookmark:N,select:H,isCollapsed:$,isEditable:U,isForward:ht,setNode:St,getNode:Gt,getSel:Q,setRng:ft,getRng:et,getStart:E,getEnd:D,getSelectedBlocks:ge,normalize:()=>{const Yt=et(),Ce=Q();if(!K0(Ce)&&Dv(r)){const Ho=aS(t,Yt);return Ho.each(No=>{ft(No,ht())}),Ho.getOr(Yt)}return Yt},selectorChanged:(Yt,Ce)=>(g(Yt,Ce),In),selectorChangedWithUnbind:g,getScrollContainer:()=>{let Yt,Ce=t.getRoot();for(;Ce&&Ce.nodeName!=="BODY";){if(Ce.scrollHeight>Ce.clientHeight){Yt=Ce;break}Ce=Ce.parentNode}return Yt},scrollIntoView:(Yt,Ce)=>{mt(Yt)?ne(r,Yt,Ce):hc(r,et(),Ce)},placeCaretAt:(Yt,Ce)=>ft(HR(Yt,Ce,r.getDoc())),getBoundingClientRect:()=>{const Yt=et();return Yt.collapsed?gt.fromRangeStart(Yt).getClientRects()[0]:Yt.getBoundingClientRect()},destroy:()=>{e=i=u=null,zi.destroy()}},vr=Q0(In),zi=XL(In,r);return In.bookmarkManager=vr,In.controlSelection=zi,In},E5=(t,e,n)=>{e.addNodeFilter("br",(r,i,u)=>{const g=Mt.extend({},n.getBlockElements()),b=n.getNonEmptyElements(),x=n.getWhitespaceElements();g.body=1;const w=E=>E.name in g||$a(n,E);for(let E=0,D=r.length;E<D;E++){let R=r[E],N=R.parent;if(N&&w(N)&&R===N.lastChild){let H=R.prev;for(;H;){const $=H.name;if($!=="span"||H.attr("data-mce-type")!=="bookmark"){$==="br"&&(R=null);break}H=H.prev}if(R&&(R.remove(),ty(n,b,x,N))){const $=n.getElementRule(N.name);$&&($.removeEmpty?N.remove():$.paddEmpty&&kf(t,u,w,N))}}else{let H=R;for(;N&&N.firstChild===H&&N.lastChild===H&&(H=N,!g[N.name]);)N=N.parent;if(H===N){const $=new hr("#text",3);$.value=Bs,R.replace($)}}}})},pF=(t,e,n)=>{t.addAttributeFilter("data-mce-tabindex",(r,i)=>{let u=r.length;for(;u--;){const g=r[u];g.attr("tabindex",g.attr("data-mce-tabindex")),g.attr(i,null)}}),t.addAttributeFilter("src,href,style",(r,i)=>{const u="data-mce-"+i,g=e.url_converter,b=e.url_converter_scope;let x=r.length;for(;x--;){const w=r[x];let E=w.attr(u);E!==void 0?(w.attr(i,E.length>0?E:null),w.attr(u,null)):(E=w.attr(i),i==="style"?E=n.serializeStyle(n.parseStyle(E),w.name):g&&(E=g.call(b,E,i,w.name)),w.attr(i,E.length>0?E:null))}}),t.addAttributeFilter("class",r=>{let i=r.length;for(;i--;){const u=r[i];let g=u.attr("class");g&&(g=g.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),u.attr("class",g.length>
370?g:null))}}),t.addAttributeFilter("data-mce-type",(r,i,u)=>{let g=r.length;for(;g--;){const b=r[g];b.attr("data-mce-type")==="bookmark"&&!u.cleanup&&(F.from(b.firstChild).exists(w=>!Tp(w.value??""))?b.unwrap():b.remove())}}),t.addNodeFilter("script,style",(r,i)=>{const u=b=>b.replace(/(<!--\[CDATA\[|\]\]-->)/g,` 38`).replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let g=r.length;for(;g--;){const b=r[g],x=b.firstChild,w=(x==null?void 0:x.value)??"";if(i==="script"){const E=b.attr("type");E&&b.attr("type",E==="mce-no/type"?null:E.replace(/^mce\-/,"")),e.element_format==="xhtml"&&x&&w.length>0&&(x.value=`// <![CDATA[ 39`+u(w)+` 40// ]]>`)}else e.element_format==="xhtml"&&x&&w.length>0&&(x.value=`<!-- 41`+u(w)+` 42-->`)}}),t.addNodeFilter("#comment",r=>{let i=r.length;for(;i--;){const u=r[i],g=u.value;e.preserve_cdata&&(g==null?void 0:g.indexOf("[CDATA["))===0?(u.name="#cdata",u.type=4,u.value=n.decode(g.replace(/^\[CDATA\[|\]\]$/g,""))):(g==null?void 0:g.indexOf("mce:protected "))===0&&(u.name="#text",u.type=3,u.raw=!0,u.value=unescape(g).substr(14))}}),t.addNodeFilter("xml:namespace,input",(r,i)=>{let u=r.length;for(;u--;){const g=r[u];g.type===7?g.remove():g.type===1&&i==="input"&&!g.attr("type")&&g.attr("type","text")}}),t.addAttributeFilter("data-mce-type",r=>{Y(r,i=>{i.attr("data-mce-type")==="format-caret"&&(i.isEmpty(t.schema.getNonEmptyElements())?i.remove():i.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",(r,i)=>{let u=r.length;for(;u--;)r[u].attr(i,null)}),e.remove_trailing_brs&&E5(e,t,t.schema)},a3=t=>{const e=r=>(r==null?void 0:r.name)==="br",n=t.lastChild;if(e(n)){const r=n.prev;e(r)&&(n.remove(),r.remove())}},$V=(t,e,n)=>{let r;const i=t.dom;let u=e.cloneNode(!0);const g=document.implementation;if(g.createHTMLDocument){const b=g.createHTMLDocument("");Mt.each(u.nodeName==="BODY"?u.childNodes:[u],x=>{b.body.appendChild(b.importNode(x,!0))}),u.nodeName!=="BODY"?u=b.body.firstChild:u=b.body,r=i.doc,i.doc=b}return b0(t,{...n,node:u}),r&&(i.doc=r),u},LV=(t,e)=>mt(t)&&t.hasEventListeners("PreProcess")&&!e.no_events,HV=(t,e,n)=>LV(t,n)?$V(t,e,n):e,zV=(t,e,n)=>{Mt.inArray(e,n)===-1&&(t.addAttributeFilter(n,(r,i)=>{let u=r.length;for(;u--;)r[u].attr(i,null)}),e.push(n))},VV=(t,e,n)=>!e.no_events&&t?U2(t,{...e,content:n}).content:n,hF=(t,e,n)=>{const r=ya(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||X1(Z.fromDom(e))?r:Mt.trim(r)},UV=(t,e,n)=>{const r=n.selection?{forced_root_block:!1,...n}:n,i=t.parse(e,r);return a3(i),i},WV=(t,e,n)=>yf(t,e).serialize(n),bF=(t,e,n,r,i)=>{const u=WV(e,n,r);return VV(t,i,u)},ZV=(t,e)=>{const n=["data-mce-selected"],r={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...t},i=e&&e.dom?e.dom:vo.DOM,u=e&&e.schema?e.schema:mr(r),g=lb(r,u);pF(g,r,i);const b=(x,w={})=>{const{indent:E,entity_encoding:D,...R}=w,N={format:"html",...R},H=HV(e,x,N),$=hF(i,H,N),U=UV(g,$,N);if(N.format==="tree")return U;const J={...r,...mt(E)?{indent:E}:{},...mt(D)?{entity_encoding:D}:{}};return bF(e,J,u,U,N)};return{schema:u,addNodeFilter:g.addNodeFilter,addAttributeFilter:g.addAttributeFilter,serialize:b,addRules:u.addValidElements,setRules:u.setValidElements,addTempAttr:Et(zV,g,n),getTempAttrs:Ut(n),getNodeFilters:g.getNodeFilters,getAttributeFilters:g.getAttributeFilters,removeNodeFilter:g.removeNodeFilter,removeAttributeFilter:g.removeAttributeFilter}},A5=(t,e)=>{const n=ZV(t,e);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters,removeNodeFilter:n.removeNodeFilter,removeAttributeFilter:n.removeAttributeFilter}},yy="html",jV=(t,e)=>({...t,format:e,get:!0,getInner:!0}),GV=(t,e={})=>{const n=e.format?e.format:yy,r=jV(e,n);return dB(t,r).fold(Sn,i=>{const u=wn(t,i);return iy(t,u,i)})},xF="html",vF=(t,e)=>({format:xF,...t,set:!0,content:e}),T5=(t,e,n={})=>{const r=vF(n,e);cy(t,r).each(i=>{const u=IV(t,i.content,i);qT(t,u.html,i)})},Cy=vo.DOM,sa=t=>{Cy.setStyle(t.id,"display",t.orgDisplay)},i3=t=>F.from(t).each(e=>e.destroy()),yF=t=>{const e=t;e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null;const n=t.selection;if(n){const r=n.dom;e.selection=n.win=n.dom=r.doc=null}},D5=t=>{const e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,delete e._mceOldSubmit),Cy.unbind(e,"submit reset",t.formEventDelegate))},O5=t=>{if(!t.removed){const{_selectionOverrides:e,editorUpload:n}=t,r=t.getBody(),i=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&mt(i==null?void 0:i.nextSibling)&&Cy.remove(i.nextSibling),W2(t),t.editorManager.remove(t),!t.inline&&r&&sa(t),qw(t),Cy.remove(t.getContainer()),i3(e),i3(n),t.destroy()}},CF=(t,e)=>{const{selection:n,dom:r}=t;
42if(!t.destroyed){if(!e&&!t.removed){t.remove();return}e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),i3(n),i3(r)),D5(t),yF(t),t.destroyed=!0}},c3=(()=>{const t={};return{add:(i,u)=>{t[i]=u},get:i=>t[i]?t[i]:{icons:{}},has:i=>Xe(t,i)}})(),xb=Is.ModelManager,R5=(t,e)=>e.dom[t],B5=(t,e)=>parseInt(rs(e,t),10),yc=Et(R5,"clientWidth"),KV=Et(R5,"clientHeight"),YV=Et(B5,"margin-top"),mX=Et(B5,"margin-left"),F5=t=>t.dom.getBoundingClientRect(),XV=(t,e,n)=>{const r=yc(t),i=KV(t);return e>=0&&n>=0&&e<=r&&n<=i},gX=(t,e,n,r)=>{const i=F5(e),u=t?i.left+e.dom.clientLeft+mX(e):0,g=t?i.top+e.dom.clientTop+YV(e):0,b=n-u,x=r-g;return{x:b,y:x}},JV=(t,e,n)=>{const r=Z.fromDom(t.getBody()),i=t.inline?r:Fs(r),u=gX(t.inline,i,e,n);return XV(i,u.x,u.y)},M5=t=>F.from(t).map(Z.fromDom),Xl=t=>{const e=t.inline?t.getBody():t.getContentAreaContainer();return M5(e).map(Jo).getOr(!1)};var N5=()=>{const t=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:t,close:t,getArgs:t}};const wy=t=>{const e=[],n=()=>{const R=t.theme;return R&&R.getNotificationManagerImpl?R.getNotificationManagerImpl():N5()},r=()=>F.from(e[0]),i=(R,N)=>R.type===N.type&&R.text===N.text&&!R.progressBar&&!R.timeout&&!N.progressBar&&!N.timeout,u=()=>{r().each(R=>{R.reposition()})},g=R=>{e.push(R)},b=R=>{gl(e,N=>N===R).each(N=>{e.splice(N,1)})},x=(R,N=!0)=>t.removed||!Xl(t)?{}:(N&&t.dispatch("BeforeOpenNotification",{notification:R}),Xo(e,H=>i(n().getArgs(H),R)).getOrThunk(()=>{t.editorManager.setActive(t);const H=n().open(R,()=>{b(H)},()=>IR(t));return g(H),u(),t.dispatch("OpenNotification",{notification:{...H}}),H})),w=()=>{r().each(R=>{n().close(R),b(R),u()})},E=Ut(e);return(R=>{R.on("SkinLoaded",()=>{const N=ov(R);N&&x({text:N,type:"warning",timeout:0},!1),u()}),R.on("show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged",()=>{requestAnimationFrame(u)}),R.on("remove",()=>{Y(e.slice(),N=>{n().close(N)})}),R.on("keydown",N=>{var $;const H=(($=N.key)==null?void 0:$.toLowerCase())==="f12"||N.keyCode===123;N.altKey&&H&&(N.preventDefault(),r().map(U=>Z.fromDom(U.getEl())).each(U=>g1(U)))})})(t),{open:x,close:w,getNotifications:E}},Rf=Is.PluginManager,Ch=Is.ThemeManager;var P5=()=>{const t=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:t,openUrl:t,alert:t,confirm:t,close:t}};const wF=t=>{let e=[];const n=()=>{const U=t.theme;return U&&U.getWindowManagerImpl?U.getWindowManagerImpl():P5()},r=(U,J)=>(...Q)=>J?J.apply(U,Q):void 0,i=U=>{t.dispatch("OpenWindow",{dialog:U})},u=U=>{t.dispatch("CloseWindow",{dialog:U})},g=(U,J)=>{e.push({instanceApi:U,triggerElement:J}),i(U)},b=U=>{u(U);const J=iu(e,({instanceApi:Q,triggerElement:et})=>Q===U?et:F.none());e=st(e,({instanceApi:Q})=>Q!==U),e.length===0?t.focus():J.filter(Jo).each(g1)},x=()=>F.from(e[e.length-1]),w=U=>{t.editorManager.setActive(t),eS(t);const J=Mc();t.ui.show();const Q=U();return g(Q,J),Q},E=(U,J)=>w(()=>n().open(U,J,b)),D=U=>w(()=>n().openUrl(U,b)),R=U=>{e.length!==0&&U.each(J=>g1(J))},N=(U,J,Q)=>{const et=Mc(),ft=n();ft.alert(U,r(Q||ft,()=>{R(et),J==null||J()}))},H=(U,J,Q)=>{const et=Mc(),ft=n();ft.confirm(U,r(Q||ft,St=>{R(et),J==null||J(St)}))},$=()=>{x().each(({instanceApi:U})=>{n().close(U),b(U)})};return t.on("remove",()=>{Y(e,({instanceApi:U})=>{n().close(U)})}),{open:E,openUrl:D,alert:N,confirm:H,close:$}},I5=(t,e)=>{t.notificationManager.open({type:"error",text:e})},l3=(t,e)=>{t._skinLoaded?I5(t,e):t.on("SkinLoaded",()=>{I5(t,e)})},QV=(t,e)=>{l3(t,za.translate(["Failed to upload image: {0}",e]))},sg=(t,e,n)=>{x0(t,e,{message:n}),console.error(n)},wh=(t,e,n)=>n?`Failed to load ${t}: ${n} from url ${e}`:`Failed to load ${t} url: ${e}`,_F=(t,e,n)=>{sg(t,"PluginLoadError",wh("plugin",e,n))},tU=(t,e,n)=>{sg(t,"IconsLoadError",wh("icons",e,n))},_h=(t,e,n)=>{sg(t,"LanguageLoadError",wh("language",e,n))},SF=(t,e,n)=>{sg(t,"ThemeLoadError",wh("theme",e,n))},eU=(t,e,n)=>{sg(t,"ModelLoadError",wh("model",e,n))},kF=(t,e)=>{sg(t,"LicenseKeyManagerLoadError",wh("license key manager",e))},oU=(t,e)=>{sg(t,"ComponentLoadError",wh("component",e))},nU=(t,e,n)=>{const r=za.translate(["Failed to initialize plugin: {0}",e]);x0(t,"PluginLoadError",{message:r}),u3(r,n),l3(t,r)},u3=(t,...e)=>{const n=window.console;n&&(n.error?n.error(t,...e):n.log(t,...e))},EF=new WeakMap,sU=t=>{if(EF.has(t))return;EF.set(t,!0);const e=()=>{t.on("SwitchMode",r=>{const{mode:i}=r;i!=="readonly"&&t.mode.set("readonly")})},n=()=>{t.on("DisabledStateChange",r=>{const{state:i}=r;i||r.preventDefault()},!0)};t.initialized?(t.removed||t.mode.set("readonly"),t.options.set("disabled",!0)):t.on("init",()=>{t.removed||t.mode.set("readonly"),t.options.set("disabled",!0)}),n(),e()},$5=(t,e)=>{const{type:n,message:r}=e;t.notificationManager.open({type:n,text:r})},rU=t=>{switch(t){case"error":return console.error;case"info":return console.info;case"warn":return console.warn;case"log":default:return console.log}},L5=t=>
42{rU(t.type)(t.message)},Kd=(t,e)=>{const{console:n,editor:r}=e;mt(r)&&(t._skinLoaded?$5(t,r):t.on("SkinLoaded",()=>{$5(t,r)})),mt(n)&&L5(n)},H5="Read more: https://www.tiny.cloud/docs/tinymce/latest/license-key/",_y="Make sure to provide a valid license key or add license_key: 'gpl' to the init config to agree to the open source license terms.",AF=t=>{const e="The editor is disabled because a TinyMCE license key has not been provided.";Kd(t,{console:{type:"error",message:[`${e}`,_y,H5].join(" ")},editor:{type:"warning",message:`${e}`}})},TF=(t,e)=>{const n=`${e==="online"?"API":"license"} key`,r=`The editor is disabled because the TinyMCE ${n} could not be validated.`;Kd(t,{console:{type:"error",message:[`${r}`,`The TinyMCE Commercial License Key Manager plugin is required for the provided ${n} to be validated but could not be loaded.`,H5].join(" ")},editor:{type:"warning",message:`${r}`}})},DF=(t,e,n)=>{const r=`The "${e}" plugin requires a valid TinyMCE license key.`;Kd(t,{console:{type:"error",message:[`${r}`,H5].join(" ")},...n?{}:{editor:{type:"warning",message:"One or more premium plugins are disabled due to license key restrictions."}}})},Sy="licensekeymanager",OF=t=>q(eh(t))?"online":"offline",aU=t=>{var n;const e=(n=D_(t))==null?void 0:n.toLowerCase();return e==="gpl"?"gpl":so(e)?"no_key":"non_gpl"},z5=t=>{const e=OF(t),n=aU(t),r=new Set([...Yp(t),...he(rv(t))]).has(Sy);return n!=="gpl"||e==="online"||r?{type:"use_plugin",onlineStatus:e,licenseKeyType:n,forcePlugin:r}:{type:"use_gpl",onlineStatus:e,licenseKeyType:n,forcePlugin:r}},RF=t=>e=>{let n=!1;return{validate:r=>{const{plugin:i}=r,u=q(i);return u&&(DF(e,i,n),n=!0),Promise.resolve(t&&!u)}}},iU=RF(!1),d3=RF(!0),ky="manager",V5=Sy,W5=(()=>{const t=Is();return{load:(i,u)=>{if(z5(i).type==="use_plugin"){const x=Ln(rv(i),V5).map(ns).filter(ls).getOr(`plugins/${V5}/plugin${u}.js`);t.load(ky,x).catch(()=>{kF(i,x)})}},add:i=>{t.add(ky,i)},init:i=>{const u=x=>{Object.defineProperty(i,"licenseKeyManager",{value:x,writable:!1,configurable:!1,enumerable:!0})},g=z5(i),b=t.get(ky);if(mt(b)){const x=b(i,t.urls[ky]);u(x)}else switch(g.type){case"use_gpl":{u(d3(i));break}case"use_plugin":{sU(i),u(iU(i)),g.onlineStatus==="offline"&&g.licenseKeyType==="no_key"?AF(i):TF(i,g.onlineStatus);break}}i.licenseKeyManager.validate({})}}})(),cU=t=>{F.from(t.selection.getNode()).each(e=>{e.removeAttribute("data-mce-selected")})},Z5=(t,e,n)=>{try{t.getDoc().execCommand(e,!1,String(n))}catch{}},BF=(t,e)=>{Z5(t,"StyleWithCSS",e),Z5(t,"enableInlineTableEditing",e),Z5(t,"enableObjectResizing",e)},j5=t=>{t.selection.setRng(t.selection.getRng())},FF=(t,e,n)=>{v1(t,e)&&!n?js(t,e):n&&si(t,e)},G5=t=>{const e=Z.fromDom(t.getBody());FF(e,"mce-content-readonly",!0),t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),cU(t)},MF=t=>{const e=Z.fromDom(t.getBody());FF(e,"mce-content-readonly",!1),t.hasEditableRoot()&&ym(e,!0),BF(t,!1),IR(t)&&t.focus(),j5(t),t.nodeChanged()},rg=t=>fc(t),Sh="data-mce-contenteditable",Ey=t=>{Y(dr(t,'*[contenteditable="true"]'),e=>{qn(e,Sh,"true"),ym(e,!1)})},Ju=t=>{Y(dr(t,`*[${Sh}="true"]`),e=>{As(e,Sh),ym(e,!0)})},NF=(t,e)=>{const n=Z.fromDom(t.getBody());e?(G5(t),ym(n,!1),Ey(n)):(Ju(n),MF(t))},q5=t=>{t.serializer?os(t):t.on("PreInit",()=>{os(t)})},os=t=>{t.parser.addAttributeFilter("contenteditable",e=>{rg(t)&&Y(e,n=>{n.attr(Sh,n.attr("contenteditable")),n.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(Sh,e=>{rg(t)&&Y(e,n=>{n.attr("contenteditable",n.attr(Sh))})}),t.serializer.addTempAttr(Sh)},K5=t=>t.type==="click",m3=["copy"],ag=t=>xt(m3,t.type),PF=(t,e)=>_r(e,"a",r=>ho(r,Z.fromDom(t.getBody()))).bind(r=>Qi(r,"href")),Y5=(t,e)=>Hx(e,"details",r=>ho(r,Z.fromDom(t.getBody()))),lU=(t,e)=>{if(K5(e)&&!Qt.metaKeyPressed(e)){const n=Z.fromDom(e.target);PF(t,n).fold(()=>{Y5(t,n)&&e.preventDefault()},r=>{if(e.preventDefault(),/^#/.test(r)){const i=t.dom.select(`${r},[name="${ux(r,"#")}"]`);i.length&&t.selection.scrollIntoView(i[0],!0)}else window.open(r,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}else ag(e)&&t.dispatch(e.type,e)},vb=t=>{t.on("ShowCaret ObjectSelected",e=>{rg(t)&&e.preventDefault()}),t.on("DisabledStateChange",e=>{e.isDefaultPrevented()||NF(t,e.state)})},uU=t=>{q5(t),vb(t)},dU=t=>/^[a-z0-9\-]+$/i.test(t),Bf=t=>"content/"+t+"/content.css",mU=t=>tinymce.Resource.has(Bf(t)),kh=t=>ig(t,OE(t)),gU=t=>ig(t,tv(t)),ig=(t,e)=>{const n=t.editorManager.baseURL+"/skins/content",i=`content${t.editorManager.suffix}.css`;return wt(e,u=>mU(u)?u:dU(u)&&!t.inline?`${n}/${u}/${i}`:t.documentBaseURI.toAbsolute(u))},fU=t=>{t.contentCSS=t.contentCSS.concat(kh(t),gU(t))},el=t=>t?Wr(t.getElementsByTagName("img")):[],Eh=(t,e)=>{const n={};return{findAll:(i,u=It)=>{const g=st(el(i),x=>{const w=x.src;return x.hasAttribute("data-mce-bogus")||x.hasAttribute("data-mce-placeholder")||!w||w===Oo.transparentSrc?!1:Ze(w,"blob:")?!t.isUploaded(w)&&u(x):Ze(w,"data:")?u(x):!1}),b=wt(g,x=>{const w=x.src;if(Xe(n,w))return n[w].then(E=>q(E)?E:{image:x,blobInfo:E.blobInfo});
42{const E=RT(e,w).then(D=>(delete n[w],{image:x,blobInfo:D})).catch(D=>(delete n[w],D));return n[w]=E,E}});return Promise.all(b)}}},IF=()=>{let n={};const r=(R,N)=>({status:R,resultUri:N}),i=R=>R in n;return{hasBlobUri:i,getResultUri:R=>{const N=n[R];return N?N.resultUri:null},isPending:R=>i(R)?n[R].status===1:!1,isUploaded:R=>i(R)?n[R].status===2:!1,markPending:R=>{n[R]=r(1,null)},markUploaded:(R,N)=>{n[R]=r(2,N)},removeFailed:R=>{delete n[R]},destroy:()=>{n={}}}};let Ay=0;const X5=()=>{const t=()=>Math.round(Q4()*4294967295).toString(36);return"s"+new Date().getTime().toString(36)+t()+t()+t()},pU=t=>t+Ay+++X5(),yb=()=>{let t=[];const e=D=>({"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"})[D.toLowerCase()]||"dat",n=(D,R,N,H,$)=>{if(q(D))return r({id:D,name:H,filename:$,blob:R,base64:N});if(mo(D))return r(D);throw new Error("Unknown input type")},r=D=>{if(!D.blob||!D.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const R=D.id||pU("blobid"),N=D.name||R,H=D.blob;return{id:Ut(R),name:Ut(N),filename:Ut(D.filename||N+"."+e(H.type)),blob:Ut(H),base64:Ut(D.base64),blobUri:Ut(D.blobUri||URL.createObjectURL(H)),uri:Ut(D.uri)}},i=D=>{g(D.id())||t.push(D)},u=D=>Xo(t,D).getOrUndefined(),g=D=>u(R=>R.id()===D);return{create:n,add:i,get:g,getByUri:D=>u(R=>R.blobUri()===D),getByData:(D,R)=>u(N=>N.base64()===D&&N.blob().type===R),findFirst:u,removeByUri:D=>{t=st(t,R=>R.blobUri()===D?(URL.revokeObjectURL(R.blobUri()),!1):!0)},destroy:()=>{Y(t,D=>{URL.revokeObjectURL(D.blobUri())}),t=[]}}},hU=(t,e)=>{const n={},r=($,U)=>$?$.replace(/\/$/,"")+"/"+U.replace(/^\//,""):U,i=($,U)=>new Promise((J,Q)=>{const et=new XMLHttpRequest;et.open("POST",e.url),et.withCredentials=e.credentials,et.upload.onprogress=St=>{U(St.loaded/St.total*100)},et.onerror=()=>{Q("Image upload failed due to a XHR Transport error. Code: "+et.status)},et.onload=()=>{if(et.status<200||et.status>=300){Q("HTTP Error: "+et.status);return}const St=JSON.parse(et.responseText);if(!St||!q(St.location)){Q("Invalid JSON: "+et.responseText);return}J(r(e.basePath,St.location))};
42const ft=new FormData;ft.append("file",$.blob(),$.filename()),et.send(ft)}),u=X(e.handler)?e.handler:i,g=()=>new Promise($=>{$([])}),b=($,U)=>({url:U,blobInfo:$,status:!0}),x=($,U)=>({url:"",blobInfo:$,status:!1,error:U}),w=($,U)=>{Mt.each(n[$],J=>{J(U)}),delete n[$]},E=($,U,J)=>(t.markPending($.blobUri()),new Promise(Q=>{let et,ft;try{const St=()=>{et&&(et.close(),ft=_e)},Gt=ht=>{St();const it=q(ht)?ht:ht.url;t.markUploaded($.blobUri(),it),w($.blobUri(),b($,it)),Q(b($,it))},ge=ht=>{St(),t.removeFailed($.blobUri()),w($.blobUri(),x($,ht)),Q(x($,ht))};ft=ht=>{ht<0||ht>100||F.from(et).orThunk(()=>F.from(J).map(te)).each(it=>{et=it,it.progressBar.value(ht)})},U($,ft).then(Gt,ht=>{ge(q(ht)?{message:ht}:ht)})}catch(St){Q(x($,St))}})),D=$=>$===i,R=$=>{const U=$.blobUri();return new Promise(J=>{n[U]=n[U]||[],n[U].push(J)})},N=($,U)=>($=Mt.grep($,J=>!t.isUploaded(J.blobUri())),Promise.all(Mt.map($,J=>t.isPending(J.blobUri())?R(J):E(J,u,U))));return{upload:($,U)=>!e.url&&D(u)?g():N($,U)}},ol=t=>()=>t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),Ty=(t,e)=>hU(e,{url:E0(t),basePath:Q2(t),credentials:TE(t),handler:f_(t)}),$F=t=>{const e=IF(),n=Ty(t,e);return{upload:(r,i=!0)=>n.upload(r,i?ol(t):void 0)}},J5=(t,e)=>t.dom.isEmpty(e.dom)&&mt(t.schema.getTextBlockElements()[oo(e)]),Q5=t=>e=>{J5(t,e)&&Ro(e,Z.fromHtml('<br data-mce-bogus="1" />'))},Ah=t=>{const e=yb();let n,r;const i=IF(),u=[],g=et=>ft=>t.selection?et(ft):[],b=et=>et+(et.indexOf("?")===-1?"?":"&")+new Date().getTime(),x=(et,ft,St)=>{let Gt=0;do Gt=et.indexOf(ft,Gt),Gt!==-1&&(et=et.substring(0,Gt)+St+et.substr(Gt+ft.length),Gt+=St.length-ft.length+1);while(Gt!==-1);return et},w=(et,ft,St)=>{const Gt=`src="${St}"${St===Oo.transparentSrc?' data-mce-placeholder="1"':""}`;return et=x(et,`src="${ft}"`,Gt),et=x(et,'data-mce-src="'+ft+'"','data-mce-src="'+St+'"'),et},E=(et,ft)=>{Y(t.undoManager.data,St=>{St.type==="fragmented"?St.fragments=wt(St.fragments,Gt=>w(Gt,et,ft)):St.content=w(St.content,et,ft)})},D=(et,ft)=>{const St=t.convertURL(ft,"src");E(et.src,ft),lr(Z.fromDom(et),{src:m_(t)?b(ft):ft,"data-mce-src":St})},R=()=>(n||(n=Ty(t,i)),U().then(g(et=>{const ft=wt(et,St=>St.blobInfo);return n.upload(ft,ol(t)).then(g(St=>{const Gt=[];let ge=!1;const ht=wt(St,(it,bt)=>{const{blobInfo:qt,image:De}=et[bt];let Oe=!1;return it.status&&g_(t)?(it.url&&!Rs(De.src,it.url)&&(ge=!0),e.removeByUri(De.src),Yu(t)||D(De,it.url)):it.error&&(it.error.remove&&(E(De.src,Oo.transparentSrc),Gt.push(De),Oe=!0),QV(t,it.error.message)),{element:De,status:it.status,uploadUri:it.url,blobInfo:qt,removed:Oe}});return Gt.length>0&&!Yu(t)?t.undoManager.transact(()=>{Y(xm(Gt),it=>{const bt=oi(it);xn(it),bt.each(Q5(t)),e.removeByUri(it.dom.src)})}):ge&&t.undoManager.dispatchChange(),ht}))}))),N=()=>X2(t)?R():Promise.resolve([]),H=et=>au(u,ft=>ft(et)),$=et=>{u.push(et)},U=()=>(r||(r=Eh(i,e)),r.findAll(t.getBody(),H).then(g(et=>{const ft=st(et,St=>q(St)?(l3(t,St),!1):St.uriType!=="blob");return Yu(t)||Y(ft,St=>{E(St.image.src,St.blobInfo.blobUri()),St.image.src=St.blobInfo.blobUri(),St.image.removeAttribute("data-mce-src")}),ft}))),J=()=>{e.destroy(),i.destroy(),r=n=null},Q=et=>et.replace(/src="(blob:[^"]+)"/g,(ft,St)=>{const Gt=i.getResultUri(St);if(Gt)return'src="'+Gt+'"';let ge=e.getByUri(St);return ge||(ge=We(t.editorManager.get(),(ht,it)=>ht||it.editorUpload&&it.editorUpload.blobCache.getByUri(St),void 0)),ge?'src="data:'+ge.blob().type+";base64,"+ge.base64()+'"':ft});return t.on("SetContent",()=>{X2(t)?N():U()}),t.on("RawSaveContent",et=>{et.content=Q(et.content)}),t.on("GetContent",et=>{et.source_view||et.format==="raw"||et.format==="tree"||(et.content=Q(et.content))}),t.on("PostRender",()=>{t.parser.addNodeFilter("img",et=>{Y(et,ft=>{const St=ft.attr("src");if(!St||e.getByUri(St))return;const Gt=i.getResultUri(St);Gt&&ft.attr("src",Gt)})})}),{blobCache:e,addFilter:$,uploadImages:R,uploadImagesAuto:N,scanForImages:U,destroy:J}},t6=t=>{const e=t.dom,n=t.schema.type,r={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"left"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:i=>{e.setStyle(i,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:".mce-placeholder",styles:{display:"block",marginLeft:"auto",marginRight:"auto"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"right"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:i=>{e.setStyle(i,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}
42],strikethrough:(()=>{const i={inline:"span",styles:{textDecoration:"line-through"},exact:!0},u={inline:"strike",remove:"all",preserve_attributes:["class","style"]},g={inline:"s",remove:"all",preserve_attributes:["class","style"]};return n!=="html4"?[g,i,u]:[i,g,u]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"},remove_similar:!0},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},samp:{inline:"samp"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(i,u,g)=>jt(i)&&i.hasAttribute("href"),onformat:(i,u,g)=>{Mt.each(g,(b,x)=>{e.setAttrib(i,x,b)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":i=>(i==null?void 0:i.customValue)??null}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Mt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd".split(/\s/),i=>{r[i]={block:i,remove:"all"}}),r},LF={remove_similar:!0,inherit:!1},Cb={selector:"td,th",...LF},bU={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...Cb},tablecellverticalalign:{styles:{"vertical-align":"%value"},...Cb},tablecellbordercolor:{styles:{borderColor:"%value"},...Cb},tablecellclass:{classes:["%value"],...Cb},tableclass:{selector:"table",classes:["%value"],...LF},tablecellborderstyle:{styles:{borderStyle:"%value"},...Cb},tablecellborderwidth:{styles:{borderWidth:"%value"},...Cb}},xU=Ut(bU),vU=t=>{const e={},n=g=>mt(g)?e[g]:e,r=g=>Xe(e,g),i=(g,b)=>{g&&(q(g)?(lo(b)||(b=[b]),Y(b,x=>{Gn(x.deep)&&(x.deep=!Ll(x)),Gn(x.split)&&(x.split=!Ll(x)||Or(x)),Gn(x.remove)&&Ll(x)&&!Or(x)&&(x.remove="none"),Ll(x)&&Or(x)&&(x.mixed=!0,x.block_expand=!0),q(x.classes)&&(x.classes=x.classes.split(/\s+/))}),e[g]=b):Do(g,(x,w)=>{i(w,x)}))},u=g=>(g&&e[g]&&delete e[g],e);return i(t6(t)),i(xU()),i(NE(t)),{get:n,has:r,register:i,unregister:u}},g3=Mt.each,ka=vo.DOM,nl=t=>mt(t)&&mo(t),HF=(t,e)=>{const n=e&&e.schema||mr({}),r=(x,w)=>{w.classes.length>0&&ka.addClass(x,w.classes.join(" ")),ka.setAttribs(x,w.attrs)},i=x=>{const w=q(x)?{name:x,classes:[],attrs:{}}:x,E=ka.create(w.name);return r(E,w),E},u=(x,w)=>{const E=n.getElementRule(x.nodeName.toLowerCase()),D=E==null?void 0:E.parentsRequired;return D&&D.length?w&&xt(D,w)?w:D[0]:!1},g=(x,w,E)=>{let D;const R=w[0],N=nl(R)?R.name:void 0,H=u(x,N);if(H)N===H?(D=R,w=w.slice(1)):D=H;else if(R)D=R,w=w.slice(1);else if(!E)return x;const $=D?i(D):ka.create("div");$.appendChild(x),E&&Mt.each(E,J=>{const Q=i(J);$.insertBefore(Q,x)});const U=nl(D)?D.siblings:void 0;return g($,w,U)},b=ka.create("div");if(t.length>0){const x=t[0],w=i(x),E=nl(x)?x.siblings:void 0;b.appendChild(g(w,t.slice(1),E))}return b},yU=t=>{t=Mt.trim(t);let e="div";const n={name:e,classes:[],attrs:{},selector:t};return t!=="*"&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(r,i,u,g,b)=>{switch(i){case"#":n.attrs.id=u;break;case".":n.classes.push(u);break;case":":Mt.inArray("checked disabled enabled read-only required".split(" "),u)!==-1&&(n.attrs[u]=u);break}if(g==="["){const x=b.match(/([\w\-]+)(?:\=\"([^\"]+))?/);x&&(n.attrs[x[1]]=x[2])}return""})),n.name=e||"div",n},CU=t=>q(t)?(t=t.split(/\s*,\s*/)[0],t=t.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Mt.map(t.split(/(?:>|\s+(?![^\[\]]+\]))/),e=>{const n=Mt.map(e.split(/(?:~\+|~|\+)/),yU),r=n.pop();return n.length&&(r.siblings=n),r}).reverse()):[],wU=(t,e)=>{let n="",r=PE(t);if(r==="")return"";const i=R=>q(R)?R.replace(/%(\w+)/g,""):"",u=(R,N)=>ka.getStyle(N??t.getBody(),R,!0);if(q(e)){const R=t.formatter.get(e);if(!R)return"";e=R[0]}if("preview"in e){const R=e.preview;if(R===!1)return"";r=R||r}let g=e.block||e.inline||"span",b;const x=CU(e.selector);x.length>0?(x[0].name||(x[0].name=g),g=e.selector,b=HF(x,t)):b=HF([g],t);const w=ka.select(g,b)[0]||b.firstChild;g3(e.styles,(R,N)=>{const H=i(R);H&&ka.setStyle(w,N,H)}),g3(e.attributes,(R,N)=>{const H=i(R);H&&ka.setAttrib(w,N,H)}),g3(e.classes,R=>{const N=i(R);ka.hasClass(w,N)||ka.addClass(w,N)}
42),t.dispatch("PreviewFormats"),ka.setStyles(b,{position:"absolute",left:-65535}),t.getBody().appendChild(b);const E=u("fontSize"),D=/px$/.test(E)?parseInt(E,10):0;return g3(r.split(" "),R=>{let N=u(R,w);if(!(R==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(N)&&(N=u(R),Mi(N).toLowerCase()==="#ffffff"))&&!(R==="color"&&Mi(N).toLowerCase()==="#000000")){if(R==="font-size"&&/em|%$/.test(N)){if(D===0)return;N=parseFloat(N)/(/%$/.test(N)?100:1)*D+"px"}R==="border"&&N&&(n+="padding:0 2px;"),n+=R+":"+N+";"}}),t.dispatch("AfterPreviewFormats"),ka.remove(b),n},_U=t=>{t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(let e=1;e<=6;e++)t.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])},zF=t=>{const e=vU(t),n=Te({});return _U(t),l7(t),Yu(t)||KS(n,t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:(r,i,u)=>{Li(t,r,i,u)},remove:(r,i,u,g)=>{xy(t,r,i,u,g)},toggle:(r,i,u)=>{Hi(t,r,i,u)},match:(r,i,u,g)=>uF(t,r,i,u,g),closest:r=>Xu(t,r),matchAll:(r,i)=>by(t,r,i),matchNode:(r,i,u,g)=>MV(t,r,i,u,g),canApply:r=>NV(t,r),formatChanged:(r,i,u,g)=>PV(t,n,r,i,u,g),getCssText:Et(wU,t)}},VF=t=>{switch(t.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},SU=(t,e,n)=>{const r=Te(!1),i=x=>{Df(e,!1,n),e.add({},x)};t.on("init",()=>{e.add()}),t.on("BeforeExecCommand",x=>{const w=x.command;VF(w)||(o3(e,n),e.beforeChange())}),t.on("ExecCommand",x=>{const w=x.command;VF(w)||i(x)}),t.on("ObjectResizeStart cut",()=>{e.beforeChange()}),t.on("SaveContent ObjectResized blur",i),t.on("dragend",i),t.on("keyup",x=>{const w=x.keyCode;if(x.isDefaultPrevented())return;const E=Oo.os.isMacOS()&&x.key==="Meta";(w>=33&&w<=36||w>=37&&w<=40||w===45||x.ctrlKey||E)&&(i(),t.nodeChanged()),(w===46||w===8)&&t.nodeChanged(),r.get()&&e.typing&&!pb(t.readonly,gy(t),e.data[0])&&(t.isDirty()||t.setDirty(!0),t.dispatch("TypingUndo"),r.set(!1),t.nodeChanged())}),t.on("keydown",x=>{const w=x.keyCode;if(x.isDefaultPrevented())return;if(w>=33&&w<=36||w>=37&&w<=40||w===45){e.typing&&i(x);return}const E=x.ctrlKey&&!x.altKey||x.metaKey;if((w<16||w>20)&&w!==224&&w!==91&&!e.typing&&!E){e.beforeChange(),Df(e,!0,n),e.add({},x),r.set(!0);return}(Oo.os.isMacOS()?x.metaKey:x.ctrlKey&&!x.altKey)&&e.beforeChange()}),t.on("mousedown",x=>{e.typing&&i(x)});const u=x=>x.inputType==="insertReplacementText",g=x=>x.inputType==="insertText"&&x.data===null,b=x=>x.inputType==="insertFromPaste"||x.inputType==="insertFromDrop";t.on("input",x=>{x.inputType&&(u(x)||g(x)||b(x))&&i(x)}),t.on("AddUndo Undo Redo ClearUndos",x=>{x.isDefaultPrevented()||t.nodeChanged()})}
42,kU=t=>{t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")},EU=t=>{const e=Gi(),n=Te(0),r=Te(0),i={data:[],typing:!1,beforeChange:()=>{Yl(t,n,e)},add:(u,g)=>cF(t,i,r,n,e,u,g),dispatchChange:()=>{t.setDirty(!0);const u=gy(t);u.bookmark=sf(t.selection),t.dispatch("change",{level:u,lastLevel:Wi(i.data,r.get()).getOrUndefined()})},undo:()=>y5(t,i,n,r),redo:()=>C5(t,r,i.data),clear:()=>{n3(t,i,r)},reset:()=>{BV(t,i)},hasUndo:()=>lF(t,i,r),hasRedo:()=>hy(t,i,r),transact:u=>FV(t,i,n,u),ignore:u=>{s3(t,n,u)},extra:(u,g)=>{w5(t,i,r,u,g)}};return Yu(t)||SU(t,i,n),kU(t),i},AU=[9,27,Qt.HOME,Qt.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Qt.DOWN,Qt.UP,Qt.LEFT,Qt.RIGHT].concat(Oo.browser.isFirefox()?[224]:[]),UF="data-mce-placeholder",WF=t=>t.type==="keydown"||t.type==="keyup",ZF=t=>{const e=t.keyCode;return e===Qt.BACKSPACE||e===Qt.DELETE},TU=t=>{if(WF(t)){const e=t.keyCode;return!ZF(t)&&(Qt.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||xt(AU,e))}else return!1},DU=t=>WF(t)&&!(ZF(t)||t.type==="keyup"&&t.keyCode===229),Ff=(t,e,n)=>{if(t.isEmpty(e,void 0,{skipBogus:!1,includeZwsp:!0})){const r=e.firstElementChild;return r?t.getStyle(e.firstElementChild,"padding-left")||t.getStyle(e.firstElementChild,"padding-right")?!1:n===r.nodeName.toLowerCase():!0}else return!1},OU=t=>{const e=t.dom,n=ws(t),r=ev(t)??"",i=(u,g)=>{if(TU(u))return;const b=t.getBody(),x=DU(u)?!1:Ff(e,b,n);(e.getAttrib(b,UF)!==""!==x||g)&&(e.setAttrib(b,UF,x?r:null),j2(t,x),t.on(x?"keydown":"keyup",i),t.off(x?"keyup":"keydown",i))};ls(r)&&t.on("init",u=>{i(u,!0),t.on("change SetContent ExecCommand",i),t.on("paste",g=>Vl.setEditorTimeout(t,()=>i(g)))})},RU=t=>e=>mt(e)&&e.nodeName.toLowerCase()===t,wb=t=>e=>mt(e)&&t.test(e.nodeName),Qu=t=>mt(t)&&t.nodeType===3,f3=t=>mt(t)&&t.nodeType===1,sl=wb(/^(OL|UL|DL)$/),BU=wb(/^(OL|UL)$/),p3=wb(/^(LI|DT|DD)$/),FU=wb(/^(DT|DD)$/),Th=RU("br"),MU=t=>{var e;return((e=t.parentNode)==null?void 0:e.firstChild)===t},e6=(t,e)=>mt(e)&&e.nodeName in t.schema.getTextBlockElements(),o6=(t,e)=>mt(t)&&t.nodeName in e,NU=(t,e)=>mt(e)&&e.nodeName in t.schema.getVoidElements(),PU=(t,e)=>Th(e)?t.isBlock(e.nextSibling)&&!Th(e.previousSibling):!1,Dh=(t,e,n)=>{const r=t.isEmpty(e);return n&&t.select("span[data-mce-type=bookmark]",e).length>0?!1:r},jF=(t,e)=>t.isChildOf(e,t.getRoot()),GF=vo.DOM,IU=(t,e)=>{const n=e.parentElement;if(n&&n.nodeName==="LI"&&n.firstChild===e){const r=n.previousSibling;r&&r.nodeName==="LI"?(r.appendChild(e),Dh(t,n)&&GF.remove(n)):GF.setStyle(n,"listStyleType","none")}if(sl(n)){const r=n.previousSibling;r&&r.nodeName==="LI"&&r.appendChild(e)}},n6=(t,e)=>{const n=Mt.grep(t.select("ol,ul",e));Mt.each(n,r=>{IU(t,r)})},qF=(t,e)=>{if(Qu(t))return{container:t,offset:e};const n=Uu.getNode(t,e);return Qu(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&Qu(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Qu(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},s6=t=>{const e=t.cloneRange(),n=qF(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);const r=qF(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},KF=["OL","UL","DL"],YF=KF.join(","),Dy=(t,e)=>{const n=t.selection.getStart(!0);return t.dom.getParent(n,YF,Oy(t,n))},XF=(t,e)=>mt(t)&&e.length===1&&e[0]===t,$U=t=>st(t.querySelectorAll(YF),sl),LU=t=>{const e=Dy(t),n=t.selection.getSelectedBlocks();return XF(e,n)?$U(e):st(n,r=>sl(r)&&e!==r)},HU=(t,e)=>{const n=Mt.map(e,r=>{const i=t.dom.getParent(r,"li,dd,dt",Oy(t,r));return i||r});return id(n)},r6=t=>{const e=t.selection.getSelectedBlocks();return st(HU(t,e),p3)},zU=t=>st(r6(t),FU),a6=(t,e)=>{const n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},VU=(t,e)=>!sl(e)&&!p3(e)&&$t(KF,n=>t.isValidChild(e.nodeName,n)),Oy=(t,e)=>{const n=t.dom.getParents(e,t.dom.isBlock),r=u=>u.nodeName.toLowerCase()!==ws(t);return Xo(n,u=>r(u)&&VU(t.schema,u)).getOr(t.getBody())},JF=t=>oi(t).exists(e=>p3(e.dom)&&rr(e).exists(n=>!sl(n.dom))&&Es(e).exists(n=>!sl(n.dom))),QF=(t,e)=>{const n=t.dom.getParents(e,"ol,ul",Oy(t,e));return Ur(n)},UU=t=>{const e=QF(t,t.selection.getStart()),n=st(t.selection.getSelectedBlocks(),BU);return e.toArray().concat(n)},WU=t=>{const e=t.selection.getStart();return t.dom.getParents(e,"ol,ul",Oy(t,e))},ZU=t=>{const e=UU(t),n=WU(t);return Xo(n,r=>JF(Z.fromDom(r))).fold(()=>jU(t,e),r=>[r])},jU=(t,e)=>{const n=wt(e,r=>QF(t,r).getOr(r));return id(n)},h3=t=>/\btox\-/.test(t.className),tM=(t,e)=>e!==null&&!t.dom.isEditable(e),GU=t=>{const e=Dy(t);return tM(t,e)||!t.selection.isEditable()},i6=(t,e)=>{const n=t.dom.getParent(e,"ol,ul,dl");return tM(t,n)||!t.selection.isEditable()},Mf=(t,e,n)=>t.dispatch("ListMutation",{action:e,element:n}),c6=(t,e,n={})=>{const r=t.dom,i=t.schema.getBlockElements(),u=r.createFragment(),g=ws(t),b=gc(t);let x,w,E=!1;for(w=r.create(g,{...b,...n.style?{style:n.style}:{}}),o6(e.firstChild,i)||u.appendChild(w);x=e.firstChild;){const D=x.nodeName;!E&&(D!=="SPAN"||x.getAttribute("data-mce-type")!=="bookmark")&&(E=!0),o6(x,i)?(u.appendChild(x),w=null):(w||(w=r.create(g,b),u.appendChild(w)),w.appendChild(x))}return!E&&w&&w.appendChild(r.create("br",{"data-mce-bogus":"1"})),u},_b=t=>u1(t,"OL,UL"),pX=t=>u1(t,"LI"),l6=t=>rr(t).exists(_b),qU=t=>Es(t).exists(_b),eM=(t,e)=>fv(t).map(n=>n>=e).getOr(!0),Oh=t=>"listAttributes"in t,oM=t=>"isComment"in t,KU=t=>"isFragment"in t,nM=t=>t.depth>0,YU=t=>t.isSelected,XU=t=>{const e=Qn(t),n=qU(t)?e.slice(0,-1):e;return wt(n,op)},u6=(t,e,n)=>oi(t).filter(Jn).map(r=>({depth:e,dirty:!1,isSelected:n,content:XU(t),itemAttributes:uo(t),listAttributes:uo(r),listType:oo(r),isInPreviousLi:!1})),b3=(t,e)=>{Ro(t.item,e.list)},JU=t=>{for(let e=1;e<t.length;e++)b3(t[e-1],t[e])},sM=(t,e)=>{Us(Ur(t),Vs(e),b3)},QU=(t,e)=>{const n={list:Z.fromTag(e,t),item:Z.fromTag("li",t)};return Ro(n.list,n.item),n},tW=(t,e,n)=>{const r=[];for(let i=0;i<n;i++)r.push(QU(t,Oh(e)?e.listType:e.parentListType));return r},eW=(t,e)=>{for(let n=0;n<t.length-1;n++)Ma(t[n].item,"list-style-type","none");Ur(t).each(n=>{Oh(e)&&(lr(n.list,e.listAttributes),lr(n.item,e.itemAttributes)),Ei(n.item,e.content)})},oW=(t,e)=>{oo(t.list)!==e.listType&&(t.list=np(t.list,e.listType)),lr(t.list,e.listAttributes)},nW=(t,e,n)=>{const r=Z.fromTag("li",t);return lr(r,e),Ei(r,n),r},sW=(t,e)=>{Ro(t.list,e),t.item=e},rM=(t,e,n)=>{const r=e.slice(0,n.depth);return Ur(r).each(i=>{if(Oh(n)){const u=nW(t,n.itemAttributes,n.content);sW(i,u),oW(i,n)}else if(KU(n))Ei(i.item,n.content);
42else{const u=Z.fromHtml(`<!--${n.content}-->`);Ro(i.list,u)}}),r},rW=(t,e,n)=>{const r=tW(t,n,n.depth-e.length);return JU(r),eW(r,n),sM(e,r),e.concat(r)},aW=(t,e)=>{let n=F.none();const r=We(e,(i,u,g)=>oM(u)?g===0?(n=F.some(u),i):rM(t,i,u):u.depth>i.length?rW(t,i,u):rM(t,i,u),[]);return n.each(i=>{const u=Z.fromHtml(`<!--${i.content}-->`);Vs(r).each(g=>{Cl(g.list,u)})}),Vs(r).map(i=>i.list)},iW=(t,e,n)=>{switch(e){case"Indent":if(eM(t,n.depth))n.depth++;else return;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}n.dirty=!0},d6=(t,e)=>{Oh(t)&&Oh(e)&&(t.listType=e.listType,t.listAttributes={...e.listAttributes})},cW=t=>{t.listAttributes=Gf(t.listAttributes,(e,n)=>n!=="start")},lW=(t,e)=>{const n=t[e].depth,r=u=>u.depth===n&&!u.dirty,i=u=>u.depth<n;return Vn(is(t.slice(0,e)),r,i).orThunk(()=>Vn(t.slice(e+1),r,i))},aM=t=>(Y(t,(e,n)=>{lW(t,n).fold(()=>{e.dirty&&Oh(e)&&cW(e)},r=>d6(e,r))}),t),iM=(t,e,n,r)=>{if(Oc(r))return[{depth:t+1,content:r.dom.nodeValue??"",dirty:!1,isSelected:!1,isComment:!0}];e.each(g=>{ho(g.start,r)&&n.set(!0)});const i=u6(r,t,n.get());e.each(g=>{ho(g.end,r)&&n.set(!1)});const u=Es(r).filter(_b).map(g=>Ry(t,e,n,g)).getOr([]);return i.toArray().concat(u)},uW=(t,e,n,r)=>rr(r).filter(_b).fold(()=>iM(t,e,n,r),i=>{const u=We(Qn(r),(g,b,x)=>{if(x===0)return g;if(pX(b))return g.concat(iM(t,e,n,b));{const w={isFragment:!0,depth:t,content:[b],isSelected:!1,dirty:!1,parentListType:oo(i)};return g.concat(w)}},[]);return Ry(t,e,n,i).concat(u)}),Ry=(t,e,n,r)=>qo(Qn(r),i=>{const u=_b(i)?Ry:uW,g=t+1;return u(g,e,n,i)}),Rh=(t,e)=>{const n=Te(!1),r=0;return wt(t,i=>({sourceList:i,entries:Ry(r,e,n,i)}))},cM=(t,e)=>{const n=aM(e);return wt(n,r=>{const i=oM(r)?fd([Z.fromHtml(`<!--${r.content}-->`)]):fd(r.content),u=Oh(r)?r.itemAttributes:{};return Z.fromDom(c6(t,i.dom,u))})},dW=(t,e)=>{const n=aM(e);return aW(t.contentDocument,n).toArray()},mW=(t,e)=>qo(de(e,nM),n=>Vs(n).exists(nM)?dW(t,n):cM(t,n)),gW=(t,e,n)=>{Y(st(e,YU),r=>iW(t,n,r))},fW=t=>{const e=wt(r6(t),Z.fromDom);return Us(Xo(e,Go(l6)),Xo(is(e),Go(l6)),(n,r)=>({start:n,end:r}))},Sb=(t,e,n)=>{const r=Rh(e,fW(t));Y(r,i=>{gW(t,i.entries,n);const u=mW(t,i.entries);Y(u,g=>{Mf(t,n==="Indent"?"IndentList":"OutdentList",g.dom)}),VC(i.sourceList,u),xn(i.sourceList)})},pW=t=>fv(t).forall(e=>{const n=t.selection.getSelectedBlocks();return $t(n,r=>_r(Z.fromDom(r),"li").forall(i=>Ak(i,"ol,ul").length<=e))}),Yd=vo.DOM,m6=(t,e,n)=>{const r=w=>{const E=w.parentNode;E&&Mt.each(i,D=>{E.insertBefore(D,n.parentNode)}),Yd.remove(w)},i=Yd.select('span[data-mce-type="bookmark"]',e),u=c6(t,n),g=Yd.createRng();g.setStartAfter(n),g.setEndAfter(e);const b=g.extractContents();for(let w=b.firstChild;w;w=w.firstChild)if(w.nodeName==="LI"&&t.dom.isEmpty(w)){Yd.remove(w);break}t.dom.isEmpty(b)||Yd.insertAfter(b,e),Yd.insertAfter(u,e);const x=n.parentElement;x&&Dh(t.dom,x)&&r(x),Yd.remove(n),Dh(t.dom,e)&&Yd.remove(e)},hW=vl("dd"),g6=vl("dt"),x3=(t,e)=>{hW(e)?np(e,"dt"):g6(e)&&Yi(e).each(n=>m6(t,n.dom,e.dom))},bW=t=>{g6(t)&&np(t,"dd")},xW=(t,e,n)=>{e==="Indent"?Y(n,bW):Y(n,r=>x3(t,r))},vW=(t,e)=>{const n=xm(ZU(t)),r=xm(zU(t));let i=!1;if(n.length||r.length){const u=t.selection.getBookmark();Sb(t,n,e),xW(t,e,r),t.selection.moveToBookmark(u),t.selection.setRng(s6(t.selection.getRng())),t.nodeChanged(),i=!0}return i},f6=(t,e)=>!GU(t)&&vW(t,e),lM=t=>f6(t,"Indent"),By=t=>f6(t,"Outdent"),v3=t=>f6(t,"Flatten"),kb=t=>{switch(t){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},yW=(t,e,n)=>{const r=n["list-style-type"]?n["list-style-type"]:null;t.setStyle(e,"list-style-type",r)},uM=(t,e)=>{Mt.each(e,(n,r)=>{t.setAttribute(r,n)})},CW=(t,e,n)=>{uM(e,n["list-attributes"]),Mt.each(t.select("li",e),r=>{uM(r,n["list-item-attributes"])})},Eb=(t,e,n)=>{yW(t,e,n),CW(t,e,n)},wW=(t,e,n)=>{Mt.each(n,r=>t.setStyle(e,r,""))},y3=(t,e)=>mt(e)&&!o6(e,t.schema.getBlockElements()),p6=(t,e,n,r)=>{let i=e[n?"startContainer":"endContainer"];const u=e[n?"startOffset":"endOffset"];f3(i)&&(i=i.childNodes[Math.min(u,i.childNodes.length-1)]||i),!n&&Th(i.nextSibling)&&(i=i.nextSibling);const g=x=>{for(;!t.dom.isBlock(x)&&x.parentNode&&r!==x;)x=x.parentNode;return x},b=(x,w)=>{var N;const E=new ts(x,g(x)),D=w?"next":"prev";let R;for(;R=E[D]();)if(!(NU(t,R)||mu(R.textContent)||((N=R.textContent)==null?void 0:N.length)===0))return F.some(R);return F.none()};if(n&&Qu(i))if(mu(i.textContent))i=b(i,!1).getOr(i);else for(i.parentNode!==null&&y3(t,i.parentNode)&&(i=i.parentNode);i.previousSibling!==null&&(y3(t,i.previousSibling)||Qu(i.previousSibling));)i=i.previousSibling;if(!n&&Qu(i))if(mu(i.textContent))i=b(i,!0).getOr(i);else for(i.parentNode!==null&&y3(t,i.parentNode)&&(i=i.parentNode);i.nextSibling!==null&&(y3(t,i.nextSibling)||Qu(i.nextSibling));)i=i.nextSibling;for(;i.parentNode!==r;){const x=i.parentNode;if(e6(t,i)||/^(TD|TH)$/.test(x.nodeName))return i;i=x}return i},_W=(t,e,n)=>{const r=[],i=t.dom,u=p6(t,e,!0,n),g=p6(t,e,!1,n);let b;const x=[];for(let w=u;w&&(x.push(w),w!==g);w=w.nextSibling);return Mt.each(x,w=>{var D;if(e6(t,w)){r.push(w),b=null;return}if(i.isBlock(w)||Th(w)){Th(w)&&i.remove(w),b=null;return}const E=w.nextSibling;if(Q0.isBookmarkNode(w)&&(sl(E)||e6(t,E)||!E&&w.parentNode===n)){b=null;return}b||(b=i.create("p"),(D=w.parentNode)==null||D.insertBefore(b,w),r.push(b)),b.appendChild(w)}),r},SW=(t,e,n)=>{const r=t.getStyle(e,"list-style-type");let i=n?n["list-style-type"]:"";return i=i===null?"":i,r===i},kW=(t,e)=>{const n=t.selection.getStart(!0),r=p6(t,e,!0,t.getBody());return C1(Z.fromDom(r),Z.fromDom(e.commonAncestorContainer))?e.commonAncestorContainer:n},h6=(t,e,n)=>{const r=t.selection.getRng();let i="LI";const u=Oy(t,kW(t,r)),g=t.dom;if(g.getContentEditable(t.selection.getNode())==="false")return;e=e.toUpperCase(),e==="DL"&&(i="DT");const b=Gd(r),x=st(_W(t,r,u),t.dom.isEditable);Mt.each(x,w=>{let E;const D=w.previousSibling,R=w.parentNode;p3(R)||(D&&sl(D)&&D.nodeName===e&&SW(g,D,n)?(E=D,w=g.rename(w,i),D.appendChild(w)):(E=g.create(e),R.insertBefore(E,w),E.appendChild(w),w=g.rename(w,i)),wW(g,w,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),Eb(g,E,n),b6(t.dom,E))}),t.selection.setRng(Jc(b))},EW=(t,e)=>sl(t)&&t.nodeName===(e==null?void 0:e.nodeName),dM=(t,e,n)=>{const r=t.getStyle(e,"list-style-type",!0),i=t.getStyle(n,"list-style-type",!0);return r===i},AW=(t,e)=>t.className===e.className,mM=(t,e,n)=>EW(e,n)&&dM(t,e,n)&&AW(e,n),b6=(t,e)=>{let n,r=e.nextSibling;if(mM(t,e,r)){const i=r;for(;n=i.firstChild;)e.appendChild(n);t.remove(i)}if(r=e.previousSibling,mM(t,e,r)){const i=r;for(;n=i.lastChild;)e.insertBefore(n,e.firstChild);t.remove(i)}},TW=(t,e,n,r)=>{if(e.nodeName!==n){const i=t.dom.rename(e,n);Eb(t.dom,i,r),Mf(t,kb(n),i)}else Eb(t.dom,e,r),Mf(t,kb(n),e)},DW=(t,e,n,r)=>{if(e.classList.forEach((i,u,g)=>{i.startsWith("tox-")&&(g.remove(i),g.length===0&&e.removeAttribute("class"))}),e.nodeName!==n){const i=t.dom.rename(e,n);Eb(t.dom,i,r),Mf(t,kb(n),i)}else Eb(t.dom,e,r),Mf(t,kb(n),e)},x6=(t,e,n,r,i)=>{const u=sl(e);if(u&&e.nodeName===r&&!gM(i)&&!h3(e))v3(t);else{h6(t,r,i);const g=Gd(t.selection.getRng()),b=u?[e,...n]:n,x=u&&h3(e)?DW:TW;Mt.each(b,w=>{x(t,w,r,i)}),t.selection.setRng(Jc(g))}},gM=t=>"list-style-type"in t,OW=(t,e,n,r)=>{if(e!==t.getBody())if(e)if(e.nodeName===n&&!gM(r)&&!h3(e))v3(t);else{const i=Gd(t.selection.getRng());h3(e)&&e.classList.forEach((g,b,x)=>{g.startsWith("tox-")&&(x.remove(g),x.length===0&&e.removeAttribute("class"))}),Eb(t.dom,e,r);const u=t.dom.rename(e,n);b6(t.dom,u),t.selection.setRng(Jc(i)),h6(t,n,r),Mf(t,kb(n),u)}else h6(t,n,r),Mf(t,kb(n),e)},v6=(t,e,n)=>{const r=Dy(t);if(i6(t,r))return;const i=LU(t),u=mo(n)?n:{};i.length>0?x6(t,r,i,e,u):OW(t,r,e,u)},fM=(t,e,n,r)=>{let i=e.startContainer;const u=e.startOffset;if(Qu(i)&&(n?u<i.data.length:u>0))return i;const g=t.schema.getNonEmptyElements();f3(i)&&(i=Uu.getNode(i,u));const b=new ts(i,r);n&&PU(t.dom,i)&&b.next();const x=n?b.next.bind(b):b.prev2.bind(b);for(;i=x();)if(i.nodeName==="LI"&&!i.hasChildNodes()||g[i.nodeName]||Qu(i)&&i.data.length>0)return i;return null},pM=(t,e)=>{const n=e.childNodes;return n.length===1&&!sl(n[0])&&t.isBlock(n[0])},RW=t=>F.from(t).map(Z.fromDom).filter(Rc).exists(e=>oc(e)&&!xt(["details"],oo(e))),BW=(t,e)=>{pM(t,e)&&RW(e.firstChild)&&t.remove(e.firstChild,!0)},hM=(t,e,n)=>{let r;const i=pM(t,n)?n.firstChild:n;if(BW(t,e),!Dh(t,e,!0))for(;r=e.firstChild;)i.appendChild(r)},y6=(t,e,n)=>{let r;const i=e.parentNode;
42if(!jF(t,e)||!jF(t,n))return;sl(n.lastChild)&&(r=n.lastChild),i===n.lastChild&&Th(i.previousSibling)&&t.remove(i.previousSibling);const u=n.lastChild;u&&Th(u)&&e.hasChildNodes()&&t.remove(u),Dh(t,n,!0)&&tc(Z.fromDom(n)),hM(t,e,n),r&&n.appendChild(r);const b=_i(Z.fromDom(n),Z.fromDom(e))?t.getParents(e,sl,n):[];t.remove(e),Y(b,x=>{Dh(t,x)&&x!==t.getRoot()&&t.remove(x)})},FW=(t,e,n)=>{tc(Z.fromDom(n)),y6(t.dom,e,n),t.selection.setCursorLocation(n,0)},MW=(t,e,n,r)=>{const i=t.dom;if(i.isEmpty(r))FW(t,n,r);else{const u=Gd(e);y6(i,n,r),t.selection.setRng(Jc(u))}},NW=(t,e,n,r)=>{const i=Gd(e);y6(t.dom,n,r);const u=Jc(i);t.selection.setRng(u)},PW=(t,e)=>{const n=t.dom,r=t.selection,i=r.getStart(),u=a6(t,i),g=n.getParent(r.getStart(),"LI",u);if(g){const b=g.parentElement;if(b===t.getBody()&&Dh(n,b))return!0;const x=s6(r.getRng()),w=n.getParent(fM(t,x,e,u),"LI",u),E=w&&(e?n.isChildOf(g,w):n.isChildOf(w,g));if(w&&w!==g&&!E)return t.undoManager.transact(()=>{e?MW(t,x,w,g):MU(g)?By(t):NW(t,x,g,w)}),!0;if(E&&!e&&w!==g){const D=x.commonAncestorContainer.parentElement;return!D||n.isChildOf(w,D)?!1:(t.undoManager.transact(()=>{const R=Gd(x);hM(n,D,w),D.remove();const N=Jc(R);t.selection.setRng(N)}),!0)}else if(!w&&!e&&x.startOffset===0&&x.endOffset===0)return t.undoManager.transact(()=>{v3(t)}),!0}return!1},IW=(t,e,n)=>{const r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)},$W=(t,e)=>{const n=t.dom,r=t.selection.getStart(),i=a6(t,r),u=n.getParent(r,n.isBlock,i);if(u&&n.isEmpty(u,void 0,{checkRootAsContent:!0})){const g=s6(t.selection.getRng()),b=fM(t,g,e,i),x=n.getParent(b,"LI",i);if(b&&x){const w=N=>xt(["td","th","caption"],oo(N)),E=N=>N.dom===i,D=sn(Z.fromDom(x),w,E),R=sn(Z.fromDom(g.startContainer),w,E);return e1(D,R,ho)?(t.undoManager.transact(()=>{const N=x.parentNode;IW(n,u,i),b6(n,N),t.selection.select(b,!0),t.selection.collapse(e)}),!0):!1}}return!1},LW=(t,e)=>PW(t,e)||$W(t,e),C6=t=>{const e=t.selection.getStart(),n=a6(t,e),r=t.dom.getParent(e,"LI,DT,DD",n);return mt(r)||r6(t).length>0},HW=t=>C6(t)?(t.undoManager.transact(()=>{let e=!0;const n=()=>e=!1;t.on("input",n),t.execCommand("Delete"),t.off("input",n),e&&t.dispatch("input"),n6(t.dom,t.getBody())}),!0):!1,w6=(t,e)=>{const n=t.selection;return!i6(t,n.getNode())&&(n.isCollapsed()?LW(t,e):HW(t))},zW=(t,e)=>({block:t,position:e}),VW=(t,e)=>({from:t,to:e}),C3=(t,e)=>{const n=Z.fromDom(t),r=Z.fromDom(e.container());return KA(n,r).map(i=>zW(i,e))},UW=t=>!(_i(t.to.block,t.from.block)||_i(t.from.block,t.to.block)),WW=t=>!ho(t.from.block,t.to.block),_6=(t,e)=>sn(e,i=>Rm(i)||Pa(i.dom),i=>ho(i,t)).filter(Jn).getOr(t),ZW=(t,e)=>{const n=Z.fromDom(t);return ho(_6(n,e.from.block),_6(n,e.to.block))},jW=t=>On(t.from.block.dom)===!1&&On(t.to.block.dom)===!1,GW=t=>{const e=n=>Lr(n)||At(n.dom)||Xr(n);return e(t.from.block)&&e(t.to.block)},qW=(t,e,n,r)=>Wn(r.position.getNode())&&!es(t,r.block)?l(!1,r.block.dom).bind(i=>i.isEqual(r.position)?ui(n,e,i).bind(u=>C3(e,u)):F.some(r)).getOr(r):r,S6=(t,e,n,r)=>{const i=C3(e,gt.fromRangeStart(r)),u=i.bind(g=>ui(n,e,g.position).bind(b=>C3(e,b).map(x=>qW(t,e,n,x))));return Us(i,u,VW).filter(g=>WW(g)&&ZW(e,g)&&jW(g)&&GW(g)&&UW(g))},bM=(t,e,n,r)=>r.collapsed?S6(t,e,n,r):F.none(),hX=(t,e)=>{const n=Qn(t);return gl(n,r=>e.isBlock(oo(r))).fold(Ut(n),r=>n.slice(0,r))},Ab=(t,e)=>{const n=hX(t,e);return Y(n,xn),n},KW=(t,e,n)=>{const r=Ul(n,e);return Xo(r.reverse(),i=>es(t,i)).each(xn)},bX=(t,e)=>st(Nr(e),n=>!es(t,n)).length===0,xX=(t,e,n,r,i)=>{if(es(r,n))return Td(n),v(n.dom);bX(r,i)&&es(r,e)&&wr(i,Z.fromTag("br"));const u=h(n.dom,gt.before(i.dom));return Y(Ab(e,r),g=>{wr(i,g)}),KW(r,t,e),u},vX=(t,e)=>t.isInline(oo(e)),td=(t,e,n,r)=>{if(es(r,n)){if(es(r,e)){const g=Je((b=>{const x=(w,E)=>rr(w).fold(()=>E,D=>vX(r,D)?x(D,E.concat(Pr(D))):E);return x(b,[])})(n),(b,x)=>(ni(b,x),x),Ad());tc(e),Ro(e,g)}return xn(n),v(e.dom)}const i=S(n.dom);return Y(Ab(e,r),u=>{Ro(n,u)}),KW(r,t,e),i},Fy=(t,e)=>{const n=Ul(e,t);return F.from(n[n.length-1])},ed=(t,e)=>_i(e,t)?Fy(e,t):F.none(),Nf=(t,e)=>{l(t,e.dom).bind(n=>F.from(n.getNode())).map(Z.fromDom).filter(cc).each(xn)},w3=(t,e,n,r)=>(Nf(!0,e),Nf(!1,n),ed(e,n).fold(Et(td,t,e,n,r),Et(xX,t,e,n,r))),k6=(t,e,n,r,i)=>e?w3(t,r,n,i):w3(t,n,r,i),Bh=(t,e)=>{const n=Z.fromDom(t.getBody());return bM(t.schema,n.dom,e,t.selection.getRng()).map(i=>()=>{k6(n,e,i.from.block,i.to.block,t.schema).each(u=>{t.selection.setRng(u.toRange())})})},YW=(t,e,n)=>{const r=e.getRng();return Us(KA(t,Z.fromDom(r.startContainer)),KA(t,Z.fromDom(r.endContainer)),(i,u)=>ho(i,u)?F.none():F.some(()=>{r.deleteContents(),k6(t,!0,i,u,n).each(g=>
42{e.setRng(g.toRange())})})).getOr(F.none())},E6=(t,e)=>{const n=Z.fromDom(e),r=Et(ho,t);return Sl(n,Rm,r).isSome()},yX=(t,e)=>E6(t,e.startContainer)||E6(t,e.endContainer),XW=(t,e)=>{const n=h(t.dom,gt.fromRangeStart(e)).isNone(),r=m(t.dom,gt.fromRangeEnd(e)).isNone();return!yX(t,e)&&n&&r},My=t=>F.some(()=>{t.setContent(""),t.selection.setCursorLocation()}),xM=t=>{const e=Z.fromDom(t.getBody()),n=t.selection.getRng();return XW(e,n)?My(t):YW(e,t.selection,t.schema)},ms=(t,e)=>t.selection.isCollapsed()?F.none():xM(t),cg=(t,e,n,r,i)=>F.from(e._selectionOverrides.showCaret(t,n,r,i)),JW=t=>{const e=t.ownerDocument.createRange();return e.selectNode(t),e},Xd=(t,e)=>t.dispatch("BeforeObjectSelected",{target:e}).isDefaultPrevented()?F.none():F.some(JW(e)),Fh=(t,e,n)=>{const r=U0(1,t.getBody(),e),i=gt.fromRangeStart(r),u=i.getNode();if(li(u))return cg(1,t,u,!i.isAtEnd(),!1);const g=i.getNode(!0);if(li(g))return cg(1,t,g,!1,!1);const b=Wu(t.dom.getRoot(),i.getNode());return li(b)?cg(1,t,b,!1,n):F.none()},lg=(t,e,n)=>e.collapsed?Fh(t,e,n).getOr(e):e,QW=t=>Jm(t)||Vv(t),tZ=t=>Zd(t)||Uv(t),A6=(t,e)=>{Nt(e)&&e.data.length===0&&t.remove(e)},_3=(t,e,n,r,i,u)=>{cg(r,t,u.getNode(!i),i,!0).each(g=>{if(e.collapsed){const b=e.cloneRange();i?b.setEnd(g.startContainer,g.startOffset):b.setStart(g.endContainer,g.endOffset),b.deleteContents()}else e.deleteContents();t.selection.setRng(g)}),A6(t.dom,n)},vM=(t,e)=>{const n=t.selection.getRng();if(!Nt(n.commonAncestorContainer))return F.none();const r=e?1:-1,i=Yc(t.getBody()),u=Et(Z0,e?i.next:i.prev),g=e?QW:tZ,b=zd(r,t.getBody(),n),x=u(b),w=x&&Xc(e,x);if(!w||!Kc(b,w))return F.none();if(g(w))return F.some(()=>_3(t,n,b.getNode(),r,e,w));const E=u(w);return E&&g(E)&&Kc(w,E)?F.some(()=>_3(t,n,b.getNode(),r,e,E)):F.none()},S3=(t,e)=>vM(t,e),T6=(t,e)=>{const n=t.getBody();return e?v(n).filter(Jm):S(n).filter(Zd)},D6=t=>{const e=t.selection.getRng();return!e.collapsed&&(T6(t,!0).exists(n=>n.isEqual(gt.fromRangeStart(e)))||T6(t,!1).exists(n=>n.isEqual(gt.fromRangeEnd(e))))},O6=t=>mt(t)&&(Rm(Z.fromDom(t))||Xr(Z.fromDom(t))),Cc=lu.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),eZ=(t,e)=>{const n=e.getNode(!t),r=t?"after":"before";return jt(n)&&n.getAttribute("data-mce-caret")===r},oZ=(t,e,n,r,i)=>{const u=g=>i.isInline(g.nodeName.toLowerCase())&&!Il(n,r,t);return W0(!e,n).fold(()=>W0(e,r).fold(pt,u),u)},yM=(t,e,n,r,i)=>{const u=i.getNode(!n);return KA(Z.fromDom(e),Z.fromDom(r.getNode())).map(g=>es(t,g)?Cc.remove(g.dom):Cc.moveToElement(u)).orThunk(()=>F.some(Cc.moveToElement(u)))},CM=(t,e,n,r)=>ui(e,t,n).bind(i=>O6(i.getNode())||oZ(t,e,n,i,r)?F.none():e&&On(i.getNode())||!e&&On(i.getNode(!0))?yM(r,t,e,n,i):e&&Zd(n)||!e&&Jm(n)?F.some(Cc.moveToPosition(i)):F.none()),R6=(t,e)=>so(e)?F.none():t&&On(e.nextSibling)?F.some(Cc.moveToElement(e.nextSibling)):!t&&On(e.previousSibling)?F.some(Cc.moveToElement(e.previousSibling)):F.none(),wM=(t,e,n)=>n.fold(r=>F.some(Cc.remove(r)),r=>F.some(Cc.moveToElement(r)),r=>Il(e,r,t)?F.none():F.some(Cc.moveToPosition(r))),nZ=(t,e,n,r)=>eZ(e,n)?R6(e,n.getNode(!e)).orThunk(()=>CM(t,e,n,r)):CM(t,e,n,r).bind(i=>wM(t,n,i)),sZ=(t,e,n,r)=>{const i=U0(e?1:-1,t,n),u=gt.fromRangeStart(i),g=Z.fromDom(t);return!e&&Zd(u)?F.some(Cc.remove(u.getNode(!0))):e&&Jm(u)?F.some(Cc.remove(u.getNode())):!e&&Jm(u)&&bS(g,u,r)?y8(g,u,r).map(b=>Cc.remove(b.getNode())):e&&Zd(u)&&UA(g,u,r)?R9(g,u,r).map(b=>Cc.remove(b.getNode())):nZ(t,e,u,r)},Tb=(t,e)=>n=>(t._selectionOverrides.hideFakeCaret(),jd(t,e,Z.fromDom(n)),!0),_M=(t,e)=>n=>{const r=e?gt.before(n):gt.after(n);return t.selection.setRng(r.toRange()),!0},rZ=t=>e=>(t.selection.setRng(e.toRange()),!0),B6=(t,e)=>F.from(Wu(t.getBody(),e)),aZ=(t,e)=>{const n=t.selection.getNode();return B6(t,n).filter(On).fold(()=>sZ(t.getBody(),e,t.selection.getRng(),t.schema).map(r=>()=>r.fold(Tb(t,e),_M(t,e),rZ(t))),()=>F.some(_e))},SM=t=>{Y(dr(t,".mce-offscreen-selection"),xn)},iZ=(t,e)=>{const n=t.selection.getNode();return On(n)&&!Ng(n)?B6(t,n.parentNode).filter(On).fold(()=>F.some(()=>{SM(Z.fromDom(t.getBody())),jd(t,e,Z.fromDom(t.selection.getNode())),L8(t)}),()=>F.some(_e)):D6(t)?F.some(()=>{Q9(t,t.selection.getRng(),Z.fromDom(t.getBody()))}):F.none()},F6=t=>{const e=t.dom,n=t.selection,r=Wu(t.getBody(),n.getNode());if(Pa(r)&&e.isBlock(r)&&e.isEmpty(r)){const i=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(i),n.setRng(gt.before(i).toRange())}return!0},k3=(t,e)=>
42t.selection.isCollapsed()?aZ(t,e):iZ(t,e),E3=(t,e)=>{var b;const n=t.dom,r=n.getParent(t.selection.getStart(),n.isBlock),i=n.getParent(t.selection.getEnd(),n.isBlock),u=t.getBody();if(((b=r==null?void 0:r.nodeName)==null?void 0:b.toLowerCase())==="div"&&r&&i&&r===u.firstChild&&i===u.lastChild&&!n.isEmpty(u)){const x=r.cloneNode(!1),w=()=>{if(e?X9(t):qA(t),u.firstChild!==r){const E=Gd(t.selection.getRng(),()=>document.createElement("span"));Array.from(u.childNodes).forEach(D=>x.appendChild(D)),u.appendChild(x),t.selection.setRng(Jc(E))}};return F.some(w)}return F.none()},kM=(t,e)=>{const n=gt.fromRangeStart(t.selection.getRng());return ui(e,t.getBody(),n).filter(r=>e?IA(r):g8(r)).bind(r=>wv(e?0:-1,r)).map(r=>()=>t.selection.select(r))},A3=(t,e)=>t.selection.isCollapsed()?kM(t,e):F.none(),Mh=Nt,EM=t=>Mh(t)&&t.data[0]===$s,AM=t=>Mh(t)&&t.data[t.data.length-1]===$s,TM=t=>(t.ownerDocument??document).createTextNode($s),M6=t=>{var e;if(Mh(t.previousSibling))return AM(t.previousSibling)||t.previousSibling.appendData($s),t.previousSibling;if(Mh(t))return EM(t)||t.insertData(0,$s),t;{const n=TM(t);return(e=t.parentNode)==null||e.insertBefore(n,t),n}},Ny=t=>{var e,n;if(Mh(t.nextSibling))return EM(t.nextSibling)||t.nextSibling.insertData(0,$s),t.nextSibling;if(Mh(t))return AM(t)||t.appendData($s),t;{const r=TM(t);return t.nextSibling?(e=t.parentNode)==null||e.insertBefore(r,t.nextSibling):(n=t.parentNode)==null||n.appendChild(r),r}},Pf=(t,e)=>t?M6(e):Ny(e),N6=Et(Pf,!0),DM=Et(Pf,!1),P6=(t,e)=>Nt(t.container())?Pf(e,t.container()):Pf(e,t.getNode()),Py=(t,e)=>{const n=e.get();return n&&t.container()===n&&Uc(n)},I6=(t,e)=>e.fold(n=>{Wm(t.get());const r=N6(n);return t.set(r),F.some(gt(r,r.length-1))},n=>v(n).map(r=>{if(Py(r,t)){const i=t.get();return gt(i,1)}else{Wm(t.get());const i=P6(r,!0);return t.set(i),gt(i,1)}}),n=>S(n).map(r=>{if(Py(r,t)){const i=t.get();return gt(i,i.length-1)}else{Wm(t.get());const i=P6(r,!1);return t.set(i),gt(i,i.length-1)}}),n=>{Wm(t.get());const r=DM(n);return t.set(r),F.some(gt(r,1))}),OM=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n].apply(null,e);if(r.isSome())return r}return F.none()},nr=lu.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),T3=(t,e)=>{const n=Ld(e,t);return n||t},RM=(t,e,n)=>{const r=P8(n),i=T3(e,r.container());return _f(t,i,r).fold(()=>m(i,r).bind(Et(_f,t,i)).map(u=>nr.before(u)),F.none)},Iy=(t,e)=>P(t,e)===null,$6=(t,e,n)=>_f(t,e,n).filter(Et(Iy,e)),L6=(t,e,n)=>{const r=I8(n);return $6(t,e,r).bind(i=>h(i,r).isNone()?F.some(nr.start(i)):F.none())},BM=(t,e,n)=>{const r=P8(n);return $6(t,e,r).bind(i=>m(i,r).isNone()?F.some(nr.end(i)):F.none())},FM=(t,e,n)=>{const r=I8(n),i=T3(e,r.container());return _f(t,i,r).fold(()=>h(i,r).bind(Et(_f,t,i)).map(u=>nr.after(u)),F.none)},MM=t=>!jA(H6(t)),od=(t,e,n)=>OM([RM,L6,BM,FM],[t,e,n]).filter(MM),H6=t=>t.fold(Sn,Sn,Sn,Sn),NM=t=>t.fold(Ut("before"),Ut("start"),Ut("end"),Ut("after")),D3=t=>t.fold(nr.before,nr.before,nr.after,nr.after),z6=t=>t.fold(nr.start,nr.start,nr.end,nr.end),V6=(t,e)=>NM(t)===NM(e)&&H6(t)===H6(e),cZ=(t,e,n,r,i,u)=>Us(_f(e,n,r),_f(e,n,i),(g,b)=>g!==b&&K9(n,g,b)?nr.after(t?g:b):u).getOr(u),PM=(t,e)=>t.fold(It,n=>!V6(n,e)),lZ=(t,e,n,r,i)=>{const u=Xc(t,i);return ui(t,n,u).map(Et(Xc,t)).fold(()=>r.map(D3),x=>od(e,n,x).map(Et(cZ,t,e,n,u,x)).filter(Et(PM,r))).filter(MM)},uZ=(t,e)=>t?e.fold(k(F.some,nr.start),F.none,k(F.some,nr.after),F.none):e.fold(F.none,k(F.some,nr.before),F.none,k(F.some,nr.end)),dZ=(t,e,n,r)=>{const i=Xc(t,r),u=od(e,n,i);return od(e,n,i).bind(Et(uZ,t)).orThunk(()=>lZ(t,e,n,u,r))},mZ=t=>X(t.selection.getSel().modify),IM=(t,e,n)=>{const r=t?1:-1;return e.setRng(gt(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},gZ=(t,e)=>{const n=e.selection.getRng(),r=t?gt.fromRangeEnd(n):gt.fromRangeStart(n);return mZ(e)?t&&Ru(r)?IM(!0,e.selection,r):!t&&Bm(r)?IM(!1,e.selection,r):!1:!1};var Jd;(function(t){t[t.Br=0]="Br",t[t.Block=1]="Block",t[t.Wrap=2]="Wrap",t[t.Eol=3]="Eol"})(Jd||(Jd={}));const O3=(t,e)=>t===-1?is(e):e,fZ=(t,e,n)=>t===1?e.next(n):e.prev(n),pZ=(t,e,n,r)=>Wn(r.getNode(e===1))?Jd.Br:Il(n,r)===!1?Jd.Block:Jd.Wrap,$M=(t,e,n,r)=>{const i=Yc(n);let u=r;const g=[];for(;u;){const b=fZ(e,i,u);if(!b)break;
42if(Wn(b.getNode(!1)))return e===1?{positions:O3(e,g).concat([b]),breakType:Jd.Br,breakAt:F.some(b)}:{positions:O3(e,g),breakType:Jd.Br,breakAt:F.some(b)};if(!b.isVisible()){u=b;continue}if(t(u,b)){const x=pZ(n,e,u,b);return{positions:O3(e,g),breakType:x,breakAt:F.some(b)}}g.push(b),u=b}return{positions:O3(e,g),breakType:Jd.Eol,breakAt:F.none()}},U6=(t,e,n,r)=>e(n,r).breakAt.map(i=>{const u=e(n,i).positions;return t===-1?u.concat(i):[i].concat(u)}).getOr([]),W6=(t,e)=>We(t,(n,r)=>n.fold(()=>F.some(r),i=>Us(Vs(i.getClientRects()),Vs(r.getClientRects()),(u,g)=>{const b=Math.abs(e-u.left);return Math.abs(e-g.left)<=b?r:i}).or(n)),F.none()),Nh=(t,e)=>Vs(e.getClientRects()).bind(n=>W6(t,n.left)),br=Et($M,gt.isAbove,-1),$y=Et($M,gt.isBelow,1),Ly=Et(U6,-1,br),If=Et(U6,1,$y),R3=(t,e)=>br(t,e).breakAt.isNone(),Za=(t,e)=>$y(t,e).breakAt.isNone(),Ph=t=>v(t).map(e=>[e].concat($y(t,e).positions)).getOr([]),LM=t=>S(t).map(e=>br(t,e).positions.concat(e)).getOr([]),HM=(t,e)=>Nh(Ly(t,e),e),Z6=(t,e)=>Nh(If(t,e),e),hZ=On,j6=(t,e)=>Math.abs(t.left-e),B3=(t,e)=>Math.abs(t.right-e),G6=t=>cs(t,"node"),zM=(t,e)=>n1(t,(n,r)=>{const i=Math.min(j6(n,e),B3(n,e)),u=Math.min(j6(r,e),B3(r,e));return u===i&&G6(r)&&hZ(r.node)||u<i?r:n}),bZ=t=>{const e=n=>wt(n,r=>{const i=Od(r);return i.node=t,i});if(jt(t))return e(t.getClientRects());if(Nt(t)){const n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}else return[]},q6=t=>qo(t,bZ);var ja;(function(t){t[t.Up=-1]="Up",t[t.Down=1]="Down"})(ja||(ja={}));const K6=(t,e,n,r)=>{let i=r;for(;i=sh(i,t,s0,e);)if(n(i))return},VM=(t,e,n,r,i,u)=>{let g=0;const b=[],x=D=>{let R=q6([D]);t===ja.Up&&(R=R.reverse());for(let N=0;N<R.length;N++){const H=R[N];if(!n(H,w)){if(b.length>0&&e(H,gu(b))&&g++,H.line=g,i(H))return!0;b.push(H)}}return!1},w=gu(u.getClientRects());if(!w)return b;const E=u.getNode();return E&&(x(E),K6(t,r,x,E)),b},F3=(t,e)=>e.line>t,Y6=(t,e)=>e.line===t,UM=Et(VM,ja.Up,Mm,Rd),WM=Et(VM,ja.Down,Rd,Mm),X6=t=>gu(t.getClientRects()),xZ=(t,e,n,r)=>{const i=Yc(e);let u,g,b,x;const w=[];let E=0;t===ja.Down?(u=i.next,g=Rd,b=Mm,x=gt.after(r)):(u=i.prev,g=Mm,b=Rd,x=gt.before(r));const D=X6(x);do{if(!x.isVisible())continue;const R=X6(x);if(b(R,D))continue;w.length>0&&g(R,gu(w))&&E++;const N=Od(R);if(N.position=x,N.line=E,n(N))return w;w.push(N)}while(x=u(x));return w},ZM=t=>e=>F3(t,e),J6=t=>e=>Y6(t,e),Qd=(t,e)=>{t.selection.setRng(e),hc(t,t.selection.getRng())},Q6=(t,e,n)=>F.some(lg(t,e,n)),tD=(t,e)=>{const n=t.getNode(e===-1);return mt(n)&&Hs(n)?F.some(n):F.none()},jM=(t,e)=>{const n=t.dom.createRng();return n.selectNode(e),n},GM=(t,e,n,r,i,u)=>{const g=e===1,b=Yc(t.getBody()),x=Et(Z0,g?b.next:b.prev),w=g?r:i;if(!n.collapsed){const H=Ls(n);if(u(H))if(Hs(H)){const $=zd(e,t.getBody(),n);return F.from(x($)).map(U=>U.toRange())}else return cg(e,t,H,e===-1,!1);else if(D6(t)){const $=n.cloneRange();return $.collapse(e===-1),F.from($)}}const E=zd(e,t.getBody(),n);if(w(E))return Xd(t,E.getNode(!g));let D=x(E);const R=t0(n);if(D)D=Xc(g,D);else return R?F.some(n):F.none();if(w(D))return tD(D,e).fold(()=>cg(e,t,D==null?void 0:D.getNode(!g),g,!1),H=>F.some(jM(t,H)));const N=x(D);return N&&w(N)&&Kc(D,N)?tD(D,e).fold(()=>cg(e,t,N.getNode(!g),g,!1),H=>F.some(jM(t,H))):R?Q6(t,D.toRange(),!1):F.none()},qM=(t,e,n,r,i,u)=>{const g=zd(e,t.getBody(),n),b=gu(g.getClientRects()),x=e===ja.Down,w=t.getBody();if(!b)return F.none();if(D6(t)){const U=x?gt.fromRangeEnd(n):gt.fromRangeStart(n);return(x?Z6:HM)(w,U).orThunk(()=>F.from(U)).map(Q=>Q.toRange())}const D=(x?WM:UM)(w,ZM(1),g),R=st(D,J6(1)),N=b.left,H=zM(R,N);if(H&&u(H.node)){const U=Math.abs(N-H.left),J=Math.abs(N-H.right);return cg(e,t,H.node,U<J,!1)}let $;if(r(g)?$=g.getNode():i(g)?$=g.getNode(!0):$=Ls(n),$){const U=xZ(e,w,ZM(1),$);let J=zM(st(U,J6(1)),N);if(J||(J=gu(st(U,J6(0))),J))return Q6(t,J.position.toRange(),!1)}return R.length===0?M3(t,x).filter(x?i:r).map(U=>lg(t,U.toRange(),!1)):F.none()},M3=(t,e)=>{const n=t.selection.getRng(),r=e?gt.fromRangeEnd(n):gt.fromRangeStart(n),i=z0(r.container(),t.getBody());if(e){const u=$y(i,r);return Ur(u.positions)}else{const u=br(i,r);return Vs(u.positions)}},N3=(t,e,n)=>M3(t,e).filter(n).exists(r=>(t.selection.setRng(r.toRange()),!0)),Db=(t,e)=>{const n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},eD=(t,e)=>{t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},P3=(t,e,n)=>I6(e,n).map(r=>(Db(t,r),n)),KM=(t,e,n)=>{const r=gt.fromRangeStart(t);if(t.collapsed)return r;{const i=gt.fromRangeEnd(t);return n?h(e,i).getOr(i):m(e,r).getOr(r)}},YM=(t,e,n)=>{const r=t.getBody(),i=KM(t.selection.getRng(),r,n),u=Et(dh,t);return dZ(n,u,r,i).bind(b=>P3(t,e,b))},oD=(t,e,n)=>{const r=wt(dr(Z.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),g=>g.dom),i=st(r,t),u=st(n,t);Y(hs(i,u),Et(eD,!1)),Y(hs(u,i),Et(eD,!0))},XM=(t,e)=>{const n=e.get();if(t.selection.isCollapsed()&&!t.composing&&n){const r=gt.fromRangeStart(t.selection.getRng());gt.isTextPosition(r)&&!Y9(r)&&(Db(t,XE(n,r)),e.set(null))}},JM=(t,e,n,r)=>{if(e.selection.isCollapsed()){const i=st(r,t);Y(i,u=>{const g=gt.fromRangeStart(e.selection.getRng());od(t,e.getBody(),g).bind(b=>P3(e,n,b))})}},nD=(t,e,n)=>$d(t)?YM(t,e,n).isSome():!1,QM=(t,e,n)=>$d(e)?gZ(t,e):!1,vZ=t=>{const e=Te(null),n=Et(dh,t);return t.on("NodeChange",r=>{$d(t)&&(oD(n,t.dom,r.parents),XM(t,e),JM(n,t,e,r.parents))}),e},I3=Et(QM,!0),yZ=Et(QM,!1),$f=(t,e,n)=>{if($d(t)){const r=M3(t,e).getOrThunk(()=>{const i=t.selection.getRng();return e?gt.fromRangeEnd(i):gt.fromRangeStart(i)});return od(Et(dh,t),t.getBody(),r).exists(i=>{const u=D3(i);return I6(n,u).exists(g=>(Db(t,g),!0))})}else return!1},CZ=(t,e)=>{const n=document.createRange();return n.setStart(t.container(),t.offset()),n.setEnd(e.container(),e.offset()),n},wZ=t=>Us(v(t),S(t),(e,n)=>{const r=Xc(!0,e),i=Xc(!1,n);return m(t,r).forall(u=>u.isEqual(i))}).getOr(!0),tN=(t,e)=>n=>I6(e,n).map(r=>()=>Db(t,r)),eN=(t,e,n,r)=>{const i=t.getBody(),u=Et(dh,t);
42t.undoManager.ignore(()=>{t.selection.setRng(CZ(n,r)),qA(t),od(u,i,gt.fromRangeStart(t.selection.getRng())).map(z6).bind(tN(t,e)).each(Pe)}),t.nodeChanged()},oN=(t,e)=>{const n=Ld(e,t);return n||t},nN=(t,e,n,r)=>{const i=oN(t.getBody(),r.container()),u=Et(dh,t),g=od(u,i,r);return g.bind(x=>n?x.fold(Ut(F.some(z6(x))),F.none,Ut(F.some(D3(x))),F.none):x.fold(F.none,Ut(F.some(D3(x))),F.none,Ut(F.some(z6(x))))).map(tN(t,e)).getOrThunk(()=>{const x=vf(n,i,r),w=x.bind(E=>od(u,i,E));return Us(g,w,()=>_f(u,i,r).bind(E=>wZ(E)?F.some(()=>{jd(t,n,Z.fromDom(E))}):F.none())).getOrThunk(()=>w.bind(()=>x.map(E=>()=>{n?eN(t,e,r,E):eN(t,e,E,r)})))})},sD=(t,e,n)=>{if(t.selection.isCollapsed()&&$d(t)){const r=gt.fromRangeStart(t.selection.getRng());return nN(t,e,n,r)}return F.none()},_Z=t=>pm(t)>1,sN=(t,e)=>{const n=Z.fromDom(t.getBody()),r=Z.fromDom(t.selection.getStart()),i=Ul(r,n);return gl(i,e).fold(Ut(i),u=>i.slice(0,u))},SZ=t=>pm(t)===1,kZ=t=>sN(t,e=>t.schema.isBlock(oo(e))||_Z(e)),rN=t=>sN(t,e=>t.schema.isBlock(oo(e))),EZ=(t,e)=>{const n=Et(d7,t);return qo(e,r=>n(r)?[r.dom]:[])},rD=t=>{const e=rN(t);return EZ(t,e)},AZ=(t,e,n,r)=>{const i=EZ(e,r);if(i.length===0)jd(e,t,n);else{const u=mT(n.dom,i);e.selection.setRng(u.toRange())}},TZ=(t,e)=>{const n=st(kZ(t),SZ);return Ur(n).bind(r=>{const i=gt.fromRangeStart(t.selection.getRng());return H8(e,i,r.dom)&&!mA(r)?F.some(()=>AZ(e,t,r,n)):F.none()})},DZ=(t,e)=>{const n=e.parentElement;return Wn(e)&&!nt(n)&&t.dom.isEmpty(n)},OZ=t=>mA(Z.fromDom(t)),aN=(t,e)=>{const n=t.selection.getStart(),r=DZ(t,n)||OZ(n)?mT(n,e):SH(t.selection.getRng(),e);t.selection.setRng(r.toRange())},iN=(t,e)=>{const n=hs(e,rD(t));n.length>0&&aN(t,n)},aD=t=>Nt(t.startContainer),RZ=t=>t.startOffset===0&&aD(t),BZ=(t,e)=>{const n=e.startContainer.parentElement;return!nt(n)&&d7(t,Z.fromDom(n))},FZ=t=>{const e=t.startContainer.parentNode,n=t.endContainer.parentNode;return!nt(e)&&!nt(n)&&e.isEqualNode(n)},MZ=t=>{const e=t.endContainer;return t.endOffset===(Nt(e)?e.length:e.childNodes.length)},NZ=t=>FZ(t)&&MZ(t),PZ=t=>!t.endContainer.isEqualNode(t.commonAncestorContainer),IZ=t=>NZ(t)||PZ(t),$Z=t=>{const e=t.selection.getRng();return RZ(e)&&BZ(t,e)&&IZ(e)},LZ=t=>{if($Z(t)){const e=rD(t);return F.some(()=>{qA(t),iN(t,e)})}else return F.none()},iD=(t,e)=>t.selection.isCollapsed()?TZ(t,e):LZ(t),cN=(t,e)=>Tg(t,n=>B(n.dom),n=>e.isBlock(oo(n))),HZ=t=>cN(Z.fromDom(t.selection.getStart()),t.schema),zZ=t=>{const e=t.selection.getRng();return e.collapsed&&(aD(e)||t.dom.isEmpty(e.startContainer))&&!HZ(t)},Hy=t=>(zZ(t)&&aN(t,[]),!0),Ob=(t,e,n)=>mt(n)?F.some(()=>{t._selectionOverrides.hideFakeCaret(),jd(t,e,Z.fromDom(n))}):F.none(),VZ=(t,e)=>{const n=e?Vv:Uv,i=zd(e?1:-1,t.getBody(),t.selection.getRng());return n(i)?Ob(t,e,i.getNode(!e)):F.from(Xc(e,i)).filter(u=>n(u)&&Kc(i,u)).bind(u=>Ob(t,e,u.getNode(!e)))},UZ=(t,e)=>{const n=t.selection.getNode();return Bi(n)?Ob(t,e,n):F.none()},$3=(t,e)=>t.selection.isCollapsed()?VZ(t,e):UZ(t,e),cD=t=>sn(t,e=>Pa(e.dom)||On(e.dom)).exists(e=>Pa(e.dom)),lD=t=>kC(t??"").getOr(0),lN=(t,e)=>{const n=t||Dw(e)?"margin":"padding",r=rs(e,"direction")==="rtl"?"-right":"-left";return n+r},CX=(t,e,n,r,i,u)=>{const g=lN(n,Z.fromDom(u)),b=lD(t.getStyle(u,g));if(e==="outdent"){const x=Math.max(0,b-r);t.setStyle(u,g,x?x+i:"")}else{const x=b+r+i;t.setStyle(u,g,x)}},WZ=(t,e)=>au(e,n=>{const r=lN(T0(t),n),i=Ms(n,r).map(lD).getOr(0);return t.dom.getContentEditable(n.dom)!=="false"&&i>0}),uN=t=>{const e=dN(t);return!t.mode.isReadOnly()&&(e.length>1||WZ(t,e))},ZZ=t=>!t.mode.isReadOnly()&&pW(t),Rb=t=>Ni(t)||Xr(t),jZ=t=>oi(t).exists(Rb),dN=t=>st(xm(t.selection.getSelectedBlocks()),e=>!Rb(e)&&!jZ(e)&&cD(e)),mN=(t,e)=>{var b;if(t.mode.isReadOnly())return;const{dom:n}=t,r=DE(t),i=((b=/[a-z%]+$/i.exec(r))==null?void 0:b[0])??"px",u=lD(r),g=T0(t);Y(dN(t),x=>{CX(n,e,g,u,i,x.dom)}),e==="indent"?lM(t):By(t)},gN=t=>mN(t,"indent"),ug=t=>mN(t,"outdent"),Ga=t=>{if(t.selection.isCollapsed()&&uN(t)){const e=t.dom,n=t.selection.getRng(),r=gt.fromRangeStart(n),i=e.getParent(n.startContainer,e.isBlock);if(i!==null&&pS(Z.fromDom(i),r,t.schema))return F.some(()=>ug(t))}return F.none()},fN=(t,e)=>{const n=AT(t.selection.getRng());return wL(n)?F.some(()=>
42jd(t,e,Z.fromDom(t.selection.getNode()))):F.none()},Ih=(t,e)=>t.selection.isCollapsed()?F.none():fN(t,e),dg=(t,e,n)=>iu([Ga,k3,S3,(r,i)=>sD(r,e,i),Bh,nT,A3,$3,ms,iD,E3,Ih],r=>r(t,n)).filter(r=>t.selection.isEditable()),Jl=(t,e)=>{dg(t,e,!1).fold(()=>{t.selection.isEditable()&&(qA(t),L8(t))},Pe),C6(t)&&n6(t.dom,t.getBody())},zy=(t,e)=>{dg(t,e,!0).fold(()=>{t.selection.isEditable()&&X9(t)},Pe),C6(t)&&n6(t.dom,t.getBody())},uD=(t,e)=>{t.addCommand("delete",()=>{Jl(t,e)}),t.addCommand("forwardDelete",()=>{zy(t,e)})},L3=5,pN=400,dD=t=>t.touches===void 0||t.touches.length!==1?F.none():F.some(t.touches[0]),GZ=(t,e)=>{const n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>L3||r>L3},qZ=t=>{const e=Gi(),n=Te(!1),r=Cg(i=>{t.dispatch("longpress",{...i,type:"longpress"}),n.set(!0)},pN);t.on("touchstart",i=>{dD(i).each(u=>{r.cancel();const g={x:u.clientX,y:u.clientY,target:i.target};r.throttle(i),n.set(!1),e.set(g)})},!0),t.on("touchmove",i=>{r.cancel(),dD(i).each(u=>{e.on(g=>{GZ(u,g)&&(e.clear(),n.set(!1),t.dispatch("longpresscancel"))})})},!0),t.on("touchend touchcancel",i=>{r.cancel(),i.type!=="touchcancel"&&e.get().filter(u=>u.target.isEqualNode(i.target)).each(()=>{n.get()?i.preventDefault():t.dispatch("tap",{...i,type:"tap"})})},!0)},H3=(t,e)=>Xe(t,e.nodeName),hN=(t,e)=>Nt(e)?!0:jt(e)?!H3(t.getBlockElements(),e)&&!Xn(e)&&!Kn(t,e)&&!Ig(e)&&!Yx(e):!1,bN=(t,e,n)=>$t(p8(Z.fromDom(n),Z.fromDom(e)),r=>H3(t,r.dom)),KZ=(t,e)=>{if(Nt(e)){if(e.data.length===0)return!0;if(/^\s+$/.test(e.data))return!e.nextSibling||H3(t,e.nextSibling)||Ig(e.nextSibling)}return!1},xN=t=>t.dom.create(ws(t),gc(t)),wX=t=>{const e=t.dom,n=t.selection,r=t.schema,i=r.getBlockElements(),u=n.getStart(),g=t.getBody();let b,x,w=null;const E=ws(t);if(!u||!jt(u))return;const D=g.nodeName.toLowerCase();if(!r.isValidChild(D,E.toLowerCase())||bN(i,g,u))return;if(g.firstChild===g.lastChild&&Wn(g.firstChild)){b=xN(t),b.appendChild(Ad().dom),g.replaceChild(b,g.firstChild),t.selection.setCursorLocation(b,0),t.nodeChanged();return}let R=g.firstChild;for(;R;)if(jt(R)&&qr(r,R),hN(r,R)){if(KZ(i,R)){x=R,R=R.nextSibling,e.remove(x);continue}if(!b){if(!w&&t.hasFocus()&&(w=Gd(t.selection.getRng(),()=>document.createElement("span"))),!R.parentNode){R=null;break}b=xN(t),g.insertBefore(b,R)}x=R,R=R.nextSibling,b.appendChild(x)}else b=null,R=R.nextSibling;w&&(t.selection.setRng(Jc(w)),t.nodeChanged())},YZ=(t,e,n)=>{const r=Z.fromDom(xN(t)),i=Ad();Ro(r,i),n(e,r);const u=document.createRange();return u.setStartBefore(i.dom),u.setEndBefore(i.dom),u},Ql=t=>{t.on("NodeChange",()=>wX(t))},vN=t=>e=>(" "+e.attr("class")+" ").indexOf(t)!==-1,XZ=(t,e,n)=>function(r){const i=arguments,u=i[i.length-2],g=u>0?e.charAt(u-1):"";if(g==='"')return r;if(g===">"){const b=e.lastIndexOf("<",u);if(b!==-1&&e.substring(b,u).indexOf('contenteditable="false"')!==-1)return r}return'<span class="'+n+'" data-mce-content="'+t.dom.encode(i[0])+'">'+t.dom.encode(typeof i[1]=="string"?i[1]:i[0])+"</span>"},$h=(t,e,n)=>{let r=e.length,i=n.content;if(n.format!=="raw"){for(;r--;)i=i.replace(e[r],XZ(t,i,Jp(t)));n.content=i}},yN=(t,e)=>au(t,n=>{const r=e.match(n);return r!==null&&r[0].length===e.length}),JZ=t=>{const e="contenteditable",n=" "+Mt.trim(E_(t))+" ",r=" "+Mt.trim(Jp(t))+" ",i=vN(n),u=vN(r),g=KE(t);g.length>0&&t.on("BeforeSetContent",b=>{$h(t,g,b)}),t.parser.addAttributeFilter("class",b=>{let x=b.length;for(;x--;){const w=b[x];i(w)?w.attr(e,"true"):u(w)&&w.attr(e,"false")}}),t.serializer.addAttributeFilter(e,b=>{let x=b.length;for(;x--;){const w=b[x];if(!i(w)&&!u(w))continue;const E=w.attr("data-mce-content");g.length>0&&E?yN(g,E)?(w.name="#text",w.type=3,w.raw=!0,w.value=E):w.remove():w.attr(e,null)}})},z3=t=>kl(Z.fromDom(t.getBody()),"*[data-mce-caret]").map(e=>e.dom).getOrNull(),V3=(t,e)=>{e.hasAttribute("data-mce-caret")&&(lc(e),t.selection.setRng(t.selection.getRng()),t.selection.scrollIntoView(e))},CN=(t,e)=>{const n=z3(t);if(n){if(e.type==="compositionstart"){e.preventDefault(),e.stopPropagation(),V3(t,n);return}Q1(n)&&(V3(t,n),t.undoManager.add())}},wN=t=>{t.on("keyup compositionstart",Et(CN,t))},_N=On,SN=(t,e,n)=>GM(e,t,n,Jm,Zd,_N),kN=(t,e,n)=>qM(e,t,n,u=>
42Jm(u)||Wv(u),u=>Zd(u)||$A(u),_N),EN=t=>{const e=t.dom.create(ws(t));return e.innerHTML='<br data-mce-bogus="1">',e},U3=(t,e,n)=>{const r=Yc(t.getBody()),i=Et(Z0,e===1?r.next:r.prev);if(n.collapsed){const u=t.dom.getParent(n.startContainer,"PRE");if(!u)return;if(!i(gt.fromRangeStart(n))){const b=Z.fromDom(EN(t));e===1?Nc(Z.fromDom(u),b):wr(Z.fromDom(u),b),t.selection.select(b.dom,!0),t.selection.collapse()}}},QZ=(t,e)=>{const n=e?1:-1,r=t.selection.getRng();return SN(n,t,r).orThunk(()=>(U3(t,n,r),F.none()))},tj=(t,e)=>{const n=e?1:-1,r=t.selection.getRng();return kN(n,t,r).orThunk(()=>(U3(t,n,r),F.none()))},ej=(t,e)=>{const n=e?t.getEnd(!0):t.getStart(!0);return jA(n)?!e:e},AN=(t,e)=>QZ(t,ej(t.selection,e)).exists(n=>(Qd(t,n),!0)),TN=(t,e)=>tj(t,e).exists(n=>(Qd(t,n),!0)),DN=(t,e)=>N3(t,e,e?Zd:Jm),W3=(t,e)=>T6(t,!e).map(n=>{const r=n.toRange(),i=t.selection.getRng();return e?r.setStart(i.startContainer,i.startOffset):r.setEnd(i.endContainer,i.endOffset),r}).exists(n=>(Qd(t,n),!0)),ON=(t,e)=>{const n=g=>ho(g,e),r=g=>Pa(g.dom),i=Z.fromDom(t.container());return sn(i,r,n).filter(g=>!n(g))},RN=(t,e,n)=>(n?Z6:HM)(t.getBody(),e).map(i=>i.toRange()),oj=(t,e)=>{const n=gt.fromRangeStart(t.selection.getRng()),r=gt.fromRangeEnd(t.selection.getRng()),i=Z.fromDom(t.getBody());return lx(Us(ON(n,i),ON(r,i),(g,b)=>ho(g,b)?F.some(g):F.none())).fold(pt,g=>e&&Za(g.dom,r)||!e&&R3(g.dom,n)?RN(t,e?r:n,e).exists(b=>(Qd(t,b),!0)):!1)},tm=(t,e)=>oj(t,e),mD=t=>xt(["figcaption"],oo(t)),nj=(t,e,n)=>{const r=Et(ho,e);return sn(Z.fromDom(t.container()),i=>n.isBlock(oo(i)),r).filter(mD)},sj=(t,e,n)=>e?Za(t.dom,n):R3(t.dom,n),rj=(t,e)=>{const n=Z.fromDom(t.getBody()),r=gt.fromRangeStart(t.selection.getRng());return nj(r,n,t.schema).exists(()=>{if(sj(n,e,r)){const u=YZ(t,n,e?Ro:Cl);return t.selection.setRng(u),!0}else return!1})},Z3=(t,e)=>t.selection.isCollapsed()?rj(t,e):!1,gD=(t,e,n)=>{const r=t.selection.getRng(),i=gt.fromRangeStart(r);return t.getBody().firstChild===e&&R3(n,i)?(t.execCommand("InsertNewBlockBefore"),!0):!1},BN=(t,e)=>{const n=t.selection.getRng(),r=gt.fromRangeStart(n);return t.getBody().lastChild===e&&Za(e,r)?(t.execCommand("InsertNewBlockAfter"),!0):!1},FN=(t,e)=>e?F.from(t.dom.getParent(t.selection.getNode(),"details")).map(n=>BN(t,n)).getOr(!1):F.from(t.dom.getParent(t.selection.getNode(),"summary")).bind(n=>F.from(t.dom.getParent(n,"details")).map(r=>gD(t,r,n))).getOr(!1),fD=(t,e)=>FN(t,e),MN={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},Vy=t=>wt(t,e=>({...MN,...e})),j3=t=>wt(t,e=>({...MN,...e})),pD=(t,e)=>e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey,NN=(t,e)=>qo(Vy(t),n=>pD(n,e)?[n]:[]),PN=(t,e)=>qo(j3(t),n=>pD(n,e)?[n]:[]),Fe=(t,...e)=>()=>t.apply(null,e),Lf=(t,e)=>Xo(NN(t,e),n=>n.action()),G3=(t,e)=>iu(PN(t,e),n=>n.action()),Bb=(t,e)=>{const n=e?1:-1,r=t.selection.getRng();return GM(t,n,r,Vv,Uv,Bi).exists(i=>(Qd(t,i),!0))},IN=(t,e)=>{const n=e?1:-1,r=t.selection.getRng();return qM(t,n,r,Vv,Uv,Bi).exists(i=>(Qd(t,i),!0))},hD=(t,e)=>N3(t,e,e?Uv:Vv),aj=(t,e)=>$N(t,e,It),$N=(t,e,n)=>qo(Qn(t),r=>ei(r,e)?n(r)?[r]:[]:$N(r,e,n)),LN=(t,e,n=pt)=>{if(n(e))return F.none();if(xt(t,oo(e)))return F.some(e);const r=i=>ei(i,"table")||n(i);return bs(e,t.join(","),r)},ij=(t,e)=>LN(["td","th"],t,e),HN=t=>aj(t,"th,td"),cj=(t,e)=>_r(t,"table",e),zN=lu.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Uy={...zN,none:t=>zN.none(t)},bD=(t,e,n,r,i=It)=>{const u=r===1;if(!u&&n<=0)return Uy.first(t[0]);if(u&&n>=t.length-1)return Uy.last(t[t.length-1]);{const g=n+r,b=t[g];return i(b)?Uy.middle(e,b):bD(t,e,g,r,i)}},VN=(t,e)=>cj(t,e).bind(n=>{const r=HN(n);return gl(r,u=>ho(t,u)).map(u=>({index:u,all:r}))}),lj=(t,e,n)=>VN(t,n).fold(()=>Uy.none(t),i=>bD(i.all,t,i.index,1,e)),uj=(t,e,n)=>VN(t,n).fold(()=>Uy.none(),i=>bD(i.all,t,i.index,-1,e));var xD=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],dj=()=>{const t=w=>Z.fromDom(w.dom.cloneNode(!1)),e=w=>Bc(w).dom,n=w=>Jn(w)?oo(w)==="body"?!0:xt(xD,oo(w)):!1,r=w=>
42Jn(w)?xt(["br","img","hr","input"],oo(w)):!1,i=w=>Jn(w)&&Dn(w,"contenteditable")==="false",u=(w,E)=>w.dom.compareDocumentPosition(E.dom),g=(w,E)=>{const D=uo(w);lr(E,D)},b=w=>{const E=oo(w);return xt(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],E)},x=w=>Jn(w)?Qi(w,"lang"):F.none();return{up:Ut({selector:bs,closest:_r,predicate:Sl,all:Si}),down:Ut({selector:dr,predicate:y1}),styles:Ut({get:rs,getRaw:Ms,set:Ma,remove:b1}),attrs:Ut({get:Dn,set:qn,remove:As,copyTo:g}),insert:Ut({before:wr,after:Nc,afterAll:f1,append:Ro,appendAll:Ei,prepend:Cl,wrap:ni}),remove:Ut({unwrap:Ai,remove:xn}),create:Ut({nu:Z.fromTag,clone:t,text:Z.fromText}),query:Ut({comparePosition:u,prevSibling:ki,nextSibling:yl}),property:Ut({children:Qn,name:oo,parent:oi,document:e,isText:zo,isComment:Oc,isElement:Jn,isSpecial:b,getLanguage:x,getText:$r,setText:Ix,isBoundary:n,isEmptyTag:r,isNonEditable:i}),eq:ho,is:u1}};const em=(t,e)=>({element:t,offset:e}),vD=(t,e)=>{if(t.property().isText(e))return em(e,t.property().getText(e).length);{const n=t.property().children(e);return n.length>0?vD(t,n[n.length-1]):em(e,n.length)}},q3=(t,e,n)=>{const r=t.property().children(e);return r.length>0&&n<r.length?q3(t,r[n],0):r.length>0&&t.property().isElement(e)&&r.length===n?vD(t,r[r.length-1]):em(e,n)},UN=q3,yD=dj(),Hf=(t,e)=>UN(yD,t,e),CD=da("image"),rl=t=>{const e=t;return F.from(e[CD])},Lh=(t,e)=>{const n=t;n[CD]=e},K3=da("event"),wD=t=>{const e=t;return F.from(e[K3])},Y3=t=>e=>{const n=e;n[K3]=t},WN=(t,e)=>Y3(e)(t),ZN=Y3(0),mj=Y3(2),gj=Y3(1),fj=(t=>e=>{const n=e;return F.from(n[K3]).exists(r=>r===t)})(0),jN=()=>Object.freeze({length:0,item:t=>null}),_D=da("mode"),pj=t=>{const e=t;return F.from(e[_D])},mg=t=>e=>{const n=e;n[_D]=t},Wy=(t,e)=>mg(e)(t),SD=mg(0),X3=mg(2),kD=mg(1),GN=t=>e=>{const n=e;return F.from(n[_D]).exists(r=>r===t)},Fb=GN(0),qN=GN(1),KN=(t,e)=>({...e,get length(){return e.length},add:(n,r)=>{if(Fb(t))if(q(n)){if(!Gn(r))return e.add(n,r)}else return e.add(n);return null},remove:n=>{Fb(t)&&e.remove(n)},clear:()=>{Fb(t)&&e.clear()}}),J3=["none","copy","link","move"],YN=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],Mb=()=>{const t=new window.DataTransfer;let e="move",n="all";const r={get dropEffect(){return e},set dropEffect(i){xt(J3,i)&&(e=i)},get effectAllowed(){return n},set effectAllowed(i){fj(r)&&xt(YN,i)&&(n=i)},get items(){return KN(r,t.items)},get files(){return qN(r)?jN():t.files},get types(){return t.types},setDragImage:(i,u,g)=>{Fb(r)&&(Lh(r,{image:i,x:u,y:g}),t.setDragImage(i,u,g))},getData:i=>qN(r)?"":t.getData(i),setData:(i,u)=>{Fb(r)&&t.setData(i,u)},clearData:i=>{Fb(r)&&t.clearData(i)}};return SD(r),r},hj=t=>{const e=Mb(),n=pj(t);return X3(t),ZN(e),e.dropEffect=t.dropEffect,e.effectAllowed=t.effectAllowed,rl(t).each(r=>e.setDragImage(r.image,r.x,r.y)),Y(t.types,r=>{r!=="Files"&&e.setData(r,t.getData(r))}),Y(t.files,r=>e.items.add(r)),wD(t).each(r=>{WN(e,r)}),n.each(r=>{Wy(t,r),Wy(e,r)}),e},XN=t=>{const e=t.getData("text/html");return e===""?F.none():F.some(e)},JN=(t,e)=>t.setData("text/html",e),bj=(t,e)=>({left:t.left-e,top:t.top-e,right:t.right+e*2,bottom:t.bottom+e*2,width:t.width+e,height:t.height+e}),xj=(t,e)=>qo(e,n=>{const r=bj(Od(n.getBoundingClientRect()),-1);return[{x:r.left,y:t(r),cell:n},{x:r.right,y:t(r),cell:n}]}),QN=(t,e,n)=>We(t,(r,i)=>r.fold(()=>F.some(i),u=>{const g=Math.sqrt(Math.abs(u.x-e)+Math.abs(u.y-n)),b=Math.sqrt(Math.abs(i.x-e)+Math.abs(i.y-n));return F.some(b<g?i:u)}),F.none()),tP=(t,e,n,r,i)=>{const u=dr(Z.fromDom(n),"td,th,caption").map(b=>b.dom),g=st(xj(t,u),b=>e(b,i));return QN(g,r,i).map(b=>b.cell)},vj=t=>t.bottom,eP=t=>t.top,Zy=(t,e)=>t.y<e,yj=(t,e)=>t.y>e,oP=Et(tP,vj,Zy),nP=Et(tP,eP,yj),sP=(t,e)=>Vs(e.getClientRects()).bind(n=>oP(t,n.left,n.top)).bind(n=>Nh(LM(n),e)),ED=(t,e)=>Ur(e.getClientRects()).bind(n=>nP(t,n.left,n.top)).bind(n=>Nh(Ph(n),e)),rP=(t,e,n)=>n.breakAt.exists(r=>t(e,r).breakAt.isSome()),Cj=t=>t.breakType===Jd.Wrap&&t.positions.length===0,aP=t=>t.breakType===Jd.Br&&t.positions.length===1,iP=(t,e,n)=>{const r=t(e,n);return Cj(r)||!Wn(n.getNode())&&aP(r)?!rP(t,e,r):r.breakAt.isNone()},wj=Et(iP,br),_j=Et(iP,$y),AD=(t,e,n)=>{const r=gt.fromRangeStart(e);return l(!t,n).exists(i=>i.isEqual(r))},Sj=(t,e,n,r)=>{const i=t.selection.getRng(),u=e?1:-1;return L0()&&AD(e,i,n)?(cg(u,t,n,!e,!1).each(g=>{Qd(t,g)}),!0):!1},kj=(t,e,n)=>sP(e,n).orThunk(()=>Vs(n.getClientRects()).bind(r=>W6(Ly(t,gt.before(e)),r.left))).getOr(gt.before(e)),Q3=(t,e,n)=>ED(e,n).orThunk(()=>Vs(n.getClientRects()).bind(r=>W6(If(t,gt.after(e)),r.left))).getOr(gt.after(e)),cP=(t,e)=>{const n=e.getNode(t);return pa(n)?F.some(n):F.none()},TD=(t,e,n)=>{e.undoManager.transact(()=>{const r=t?Nc:wr,i=YZ(e,Z.fromDom(n),r);Qd(e,i)})},DD=(t,e,n)=>{const r=cP(!!e,n),i=e===!1;r.fold(()=>Qd(t,n.toRange()),u=>l(i,t.getBody()).filter(g=>g.isEqual(n)).fold(()=>Qd(t,n.toRange()),g=>TD(e,t,u)))},lP=(t,e,n,r)=>{const i=t.selection.getRng(),u=gt.fromRangeStart(i),g=t.getBody();if(!e&&wj(r,u)){const b=kj(g,n,u);return DD(t,e,b),!0}else if(e&&_j(r,u)){const b=Q3(g,n,u);return DD(t,e,b),!0}else return!1},OD=(t,e,n)=>F.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(r=>F.from(t.dom.getParent(r,"table")).map(i=>
42n(t,e,i,r))).getOr(!1),uP=(t,e)=>OD(t,e,Sj),RD=(t,e)=>OD(t,e,lP),Ej=t=>{const e=bd.exact(t,0,t,0);return vd(e)},Aj=t=>Nb(t)||Vo(t).some(e=>Rc(e)&&Nb(e)),jy=(t,e,n)=>n.fold(F.none,F.none,(r,i)=>Ok(i).map(u=>Ej(u)),r=>t.mode.isReadOnly()||!Tj(r)||!Aj(r)?F.none():(t.execCommand("mceTableInsertRowAfter"),dP(t,e,r))),Tj=t=>sn(t,vl("table")).exists(oc),dP=(t,e,n)=>jy(t,e,lj(n,Nb)),Dj=(t,e,n)=>jy(t,e,uj(n,Nb)),Nb=t=>oc(t)||Dg(t,Oj),Oj=t=>Rc(t)&&oc(t),mP=(t,e)=>{const n=["table","li","dl"],r=Z.fromDom(t.getBody()),i=b=>{const x=oo(b);return ho(b,r)||xt(n,x)},u=t.selection.getRng(),g=Z.fromDom(e?u.endContainer:u.startContainer);return ij(g,i).map(b=>(cj(b,i).each(E=>{t.model.table.clearSelectedCells(E.dom)}),t.selection.collapse(!e),(e?dP:Dj)(t,i,b).each(E=>{t.selection.setRng(E)}),!0)).getOr(!1)},gP=(t,e,n)=>{const r=Oo.os.isMacOS()||Oo.os.isiOS(),i=Oo.browser.isFirefox();Lf([{keyCode:Qt.RIGHT,action:Fe(AN,t,!0)},{keyCode:Qt.LEFT,action:Fe(AN,t,!1)},{keyCode:Qt.UP,action:Fe(TN,t,!1)},{keyCode:Qt.DOWN,action:Fe(TN,t,!0)},...r?[{keyCode:Qt.UP,action:Fe(W3,t,!1),metaKey:!0,shiftKey:!0},{keyCode:Qt.DOWN,action:Fe(W3,t,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Qt.RIGHT,action:Fe(uP,t,!0)},{keyCode:Qt.LEFT,action:Fe(uP,t,!1)},{keyCode:Qt.UP,action:Fe(RD,t,!1)},{keyCode:Qt.DOWN,action:Fe(RD,t,!0)},{keyCode:Qt.UP,action:Fe(RD,t,!1)},{keyCode:Qt.UP,action:Fe(fD,t,!1)},{keyCode:Qt.DOWN,action:Fe(fD,t,!0)},{keyCode:Qt.RIGHT,action:Fe(Bb,t,!0)},{keyCode:Qt.LEFT,action:Fe(Bb,t,!1)},{keyCode:Qt.UP,action:Fe(IN,t,!1)},{keyCode:Qt.DOWN,action:Fe(IN,t,!0)},{keyCode:Qt.RIGHT,action:Fe(nD,t,e,!0)},{keyCode:Qt.LEFT,action:Fe(nD,t,e,!1)},{keyCode:Qt.RIGHT,ctrlKey:!r,altKey:r,action:Fe(I3,t,e)},{keyCode:Qt.LEFT,ctrlKey:!r,altKey:r,action:Fe(yZ,t,e)},{keyCode:Qt.UP,action:Fe(Z3,t,!1)},{keyCode:Qt.DOWN,action:Fe(Z3,t,!0)},...i?[{keyCode:Qt.UP,action:Fe(tm,t,!1)},{keyCode:Qt.DOWN,action:Fe(tm,t,!0)}]:[]],n).each(u=>{n.preventDefault()})},Rj=(t,e)=>{t.on("keydown",n=>{n.isDefaultPrevented()||gP(t,e,n)})},nd=(t,e)=>({container:t,offset:e}),t4=vo.DOM,e4=t=>e=>t===e?-1:0,Bj=t=>e=>t.isBlock(e)||xt(["BR","IMG","HR","INPUT"],e.nodeName)||t.getContentEditable(e)==="false",BD=(t,e,n)=>{if(Nt(t)&&e>=0)return F.some(nd(t,e));{const r=Dl(t4);return F.from(r.backwards(t,e,e4(t),n)).map(i=>nd(i.container,i.container.data.length))}},FD=(t,e,n)=>{if(Nt(t)&&e>=t.length)return F.some(nd(t,e));{const r=Dl(t4);return F.from(r.forwards(t,e,e4(t),n)).map(i=>nd(i.container,0))}},MD=(t,e,n)=>{if(!Nt(t))return F.none();const r=t.data;if(e>=0&&e<=r.length)return F.some(nd(t,e));{const i=Dl(t4);return F.from(i.backwards(t,e,e4(t),n)).bind(u=>{const g=u.container.data;return MD(u.container,e+g.length,n)})}},ND=(t,e,n)=>{if(!Nt(t))return F.none();const r=t.data;if(e<=r.length)return F.some(nd(t,e));{const i=Dl(t4);return F.from(i.forwards(t,e,e4(t),n)).bind(u=>ND(u.container,e-r.length,n))}},PD=(t,e,n,r,i)=>{const u=Dl(t,Bj(t));return F.from(u.backwards(e,n,r,i))},Fj=t=>t.collapsed&&Nt(t.startContainer),Mj=t=>ya(t.toString().replace(/\u00A0/g," ")),fP=t=>t!==""&&` Â \uFEFF\f 43\r \v`.indexOf(t)!==-1,Xs=(t,e)=>t.substring(e.length),Nj=(t,e,n,r=!1)=>{let i;const u=n.charAt(0);for(i=e-1;i>=0;i--){const g=t.charAt(i);if(!r&&fP(g))return F.none();if(u===g&&Rs(t,n,i,e))break}return F.some(i)},ID=(t,e,n,r=!1)=>{if(!Fj(e))return F.none();const i={text:"",offset:0},u=(b,x,w)=>(i.text=w+i.text,i.offset+=x,Nj(i.text,i.offset,n,r).getOr(x)),g=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return PD(t,e.startContainer,e.startOffset,u,g).bind(b=>{const x=e.cloneRange();if(x.setStart(b.container,b.offset),x.setEnd(e.endContainer,e.endOffset),x.collapsed)return F.none();const w=Mj(x);return w.lastIndexOf(n)!==0?F.none():F.some({text:Xs(w,n),range:x,trigger:n})})},Pj=t=>t.nodeType===Dx,pP=t=>t.nodeType===ep,o4=t=>{if(Pj(t))return nd(t,t.data.length);{const e=t.childNodes;return e.length>0?o4(e[e.length-1]):nd(t,e.length)}},$D=(t,e)=>{const n=t.childNodes;return n.length>0&&e<n.length?$D(n[e],0):n.length>0&&pP(t)&&n.length===e?o4(n[n.length-1]):nd(t,e)},Gy=(t,e)=>{const n=t.getParent(e.container,t.isBlock)??t.getRoot();return PD(t,e.container,e.offset,(r,i)=>i===0?-1:i,n).filter(r=>{const i=r.container.data.charAt(r.offset-1);return!fP(i)}).isSome()},Ij=t=>e=>{const n=$D(e.startContainer,e.startOffset);return!Gy(t,n)},$j=(t,e,n)=>iu(n.triggers,r=>ID(t,e,r)),Lj=(t,e)=>{const n=e(),r=t.selection.getRng();return $j(t.dom,r,n).bind(i=>hP(t,e,i))},hP=(t,e,n,r={})=>{const i=e(),g=t.selection.getRng().startContainer.nodeValue??"",b=st(i.lookupByTrigger(n.trigger),w=>n.text.length>=w.minChars&&w.matches.getOrThunk(()=>Ij(t.dom))(n.range,g,n.text));if(b.length===0)return F.none();
43const x=Promise.all(wt(b,w=>w.fetch(n.text,w.maxResults,r).then(D=>({matchText:n.text,items:D,columns:w.columns,onAction:w.onAction,highlightOn:w.highlightOn}))));return F.some({lookupData:x,context:n})},Hj=V2("type"),zj=jw("fetch"),Vj=jw("onAction"),Uj=t=>df("columns",t),Wj=ta([Hj,V2("trigger"),yE("minChars",1),Uj(1),yE("maxResults",10),iR("matches"),zj,Vj,CE("highlightOn",[],$2)]),Zj=t=>uf("Autocompleter",Wj,t),jj=()=>{const t={},e={},n={},r={},i={},u={},g={},b={},x={},w=(N,H)=>($,U)=>{N[$.toLowerCase()]={...U,type:H}},E=(N,H)=>($,U)=>{N[$.toLowerCase()]={type:H,...U}},D=(N,H)=>r[N.toLowerCase()]=H,R=(N,H)=>g[N.toLowerCase()]=H;return{addButton:w(t,"button"),addGroupToolbarButton:w(t,"grouptoolbarbutton"),addToggleButton:w(t,"togglebutton"),addMenuButton:w(t,"menubutton"),addSplitButton:w(t,"splitbutton"),addMenuItem:w(e,"menuitem"),addNestedMenuItem:w(e,"nestedmenuitem"),addToggleMenuItem:w(e,"togglemenuitem"),addAutocompleter:w(n,"autocompleter"),addContextMenu:w(i,"contextmenu"),addContextToolbar:w(u,"contexttoolbar"),addContextForm:E(u,"contextform"),addSidebar:w(b,"sidebar"),addView:w(x,"views"),addIcon:D,addContext:R,getAll:()=>({buttons:t,menuItems:e,icons:r,popups:n,contextMenus:i,contextToolbars:u,sidebars:b,views:x,contexts:g})}},Gj=t=>{const e=t.ui.registry.getAll().popups,n=rx(e,g=>Zj(g).fold(b=>{throw new Error(Fl(b))},Sn)),r=EC(cd(n,g=>g.trigger)),i=cu(n);return{dataset:n,triggers:r,lookupByTrigger:g=>st(i,b=>b.trigger===g)}},qj=(t,e)=>{const n=Cg(e.load,50);t.on("input",r=>{r.inputType==="insertCompositionText"&&!t.composing||n.throttle()}),t.on("keydown",r=>{const i=r.which;i===8?n.throttle():i===27?(n.cancel(),e.cancelIfNecessary()):(i===38||i===40)&&n.cancel()},!0),t.on("remove",n.cancel)},Kj=t=>{const e=Gi(),n=Te(!1),r=e.isSet,i=()=>{r()&&(Pd(t),n.set(!1),e.clear())},u=D=>{r()||e.set({trigger:D.trigger,matchLength:D.text.length})},g=Ci(()=>Gj(t)),b=D=>e.get().map(R=>ID(t.dom,t.selection.getRng(),R.trigger,!0).bind(N=>hP(t,g,N,D))).getOrThunk(()=>Lj(t,g)),x=D=>{b(D).fold(i,R=>{u(R.context),R.lookupData.then(N=>{e.get().map(H=>{const $=R.context;H.trigger===$.trigger&&(e.set({...H,matchLength:$.text.length}),n.get()?(q2(t,{range:$.range}),Wp(t,{lookupData:N})):(n.set(!0),q2(t,{range:$.range}),Up(t,{lookupData:N})))})})})},w=(D,R)=>{const N=D.compareBoundaryPoints(window.Range.START_TO_START,R),H=D.compareBoundaryPoints(window.Range.END_TO_END,R);return N>=0&&H<=0},E=()=>e.get().bind(({trigger:D})=>{const R=t.selection.getRng();return ID(t.dom,R,D,n.get()).filter(({range:N})=>w(R,N)).map(({range:N})=>N)});t.addCommand("mceAutocompleterReload",(D,R)=>{const N=mo(R)?R.fetchOptions:{};x(N)}),t.addCommand("mceAutocompleterClose",i),t.addCommand("mceAutocompleterRefreshActiveRange",()=>{E().each(D=>{q2(t,{range:D})})}),t.editorCommands.addQueryStateHandler("mceAutoCompleterInRange",()=>E().isSome()),qj(t,{cancelIfNecessary:i,load:x})},bP=hl().browser.isSafari(),LD=t=>Td(Z.fromDom(t)),xP=(t,e)=>{var n;return t.startOffset===0&&t.endOffset===((n=e.textContent)==null?void 0:n.length)},n4=(t,e)=>F.from(t.getParent(e.container(),"details")),vP=(t,e)=>n4(t,e).isSome(),Xj=(t,e)=>{const n=F.from(t.getParent(e.startContainer,"details")),r=F.from(t.getParent(e.endContainer,"details"));if(n.isSome()||r.isSome()){const i=n.bind(u=>F.from(t.select("summary",u)[0]));return F.some({startSummary:i,startDetails:n,endDetails:r})}else return F.none()},yP=(t,e)=>v(e).exists(n=>n.isEqual(t)),Jj=(t,e)=>S(e).exists(n=>Wn(n.getNode())&&h(e,n).exists(r=>r.isEqual(t))||n.isEqual(t)),CP=(t,e)=>e.startSummary.exists(n=>yP(t,n)),Qj=(t,e)=>e.startSummary.exists(n=>Jj(t,n)),wP=(t,e)=>e.startDetails.exists(n=>h(n,t).forall(r=>e.startSummary.exists(i=>!i.contains(t.container())&&i.contains(r.container())))),_P=(t,e,n)=>n.startDetails.exists(r=>m(t,e).forall(i=>!r.contains(i.container()))),SP=(t,e)=>{const n=e.getNode();Gn(n)||t.selection.setCursorLocation(n,e.offset())},kP=(t,e,n)=>{const r=t.dom.getParent(e.container(),"details");if(r&&!r.open){const i=t.dom.select("summary",r)[0];i&&(n?v(i):S(i)).each(g=>SP(t,g))}else SP(t,e)},tG=(t,e)=>{const n=x=>x.contains(t.startContainer),r=x=>x.contains(t.endContainer),i=e.startSummary.exists(n),u=e.startSummary.exists(r),g=e.startDetails.forall(x=>e.endDetails.forall(w=>x!==w));return(i||u)&&!(i&&u)||g},EP=(t,e,n)=>{const{dom:r,selection:i}=t,u=t.getBody();if(n==="character"){const g=gt.fromRangeStart(i.getRng()),b=r.getParent(g.container(),r.isBlock),x=n4(r,g),w=b&&r.isEmpty(b),E=nt(b==null?void 0:b.previousSibling),D=nt(b==null?void 0:b.nextSibling);return w&&(e?D:E)&&vf(!e,u,g).exists(H=>vP(r,H)&&!e1(x,n4(r,H)))?!0:vf(e,u,g).fold(pt,R=>{const N=n4(r,R);
43if(vP(r,R)&&!e1(x,N)){if(e||kP(t,R,!1),b&&w){if(e&&E)return!0;if(!e&&D)return!0;kP(t,R,e),t.dom.remove(b)}return!0}else return!1})}else return!1},AP=(t,e,n,r)=>{const u=t.selection.getRng(),g=gt.fromRangeStart(u),b=t.getBody();return r==="selection"?tG(u,e):n?Qj(g,e)||_P(b,g,e):CP(g,e)||wP(g,e)},eG=(t,e,n)=>Xj(t.dom,t.selection.getRng()).fold(()=>EP(t,e,n),r=>AP(t,r,e,n)||EP(t,e,n)),oG=(t,e,n)=>{const r=t.selection,i=r.getNode(),u=r.getRng(),g=gt.fromRangeStart(u);return Vk(i)?(n==="selection"&&xP(u,i)||H8(e,g,i)?LD(i):t.undoManager.transact(()=>{const b=r.getSel();let{anchorNode:x,anchorOffset:w,focusNode:E,focusOffset:D}=b??{};const R=()=>{mt(x)&&mt(w)&&mt(E)&&mt(D)&&(b==null||b.setBaseAndExtent(x,w,E,D))},N=()=>{x=b==null?void 0:b.anchorNode,w=b==null?void 0:b.anchorOffset,E=b==null?void 0:b.focusNode,D=b==null?void 0:b.focusOffset},H=(U,J)=>{Y(U.childNodes,Q=>{Bv(Q)&&J.appendChild(Q)})},$=t.dom.create("span",{"data-mce-bogus":"1"});H(i,$),i.appendChild($),R(),(n==="word"||n==="line")&&(b==null||b.modify("extend",e?"right":"left",n)),!r.isCollapsed()&&xP(r.getRng(),$)?LD(i):(t.execCommand(e?"ForwardDelete":"Delete"),N(),H($,i),R()),t.dom.remove($)}),!0):!1},zf=(t,e,n)=>eG(t,e,n)||bP&&oG(t,e,n)?F.some(_e):F.none(),TP=t=>(e,n,r={})=>{const i=e.getBody(),u={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:i,currentTarget:i,eventPhase:Event.AT_TARGET,originalTarget:i,explicitOriginalTarget:i,isTrusted:!1,srcElement:i,cancelable:!1,preventDefault:_e,inputType:n},g=d2(new InputEvent(t));return e.dispatch(t,{...g,...u,...r})},qy=TP("input"),Ky=TP("beforeinput"),DP=hl(),OP=DP.os,RP=OP.isMacOS()||OP.isiOS(),BP=DP.browser.isFirefox(),sG=(t,e,n)=>{const r=n.keyCode===Qt.BACKSPACE?"deleteContentBackward":"deleteContentForward",i=t.selection.isCollapsed(),u=i?"character":"selection",g=b=>i?b?"word":"line":"selection";G3([{keyCode:Qt.BACKSPACE,action:Fe(Ga,t)},{keyCode:Qt.BACKSPACE,action:Fe(k3,t,!1)},{keyCode:Qt.DELETE,action:Fe(k3,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(S3,t,!1)},{keyCode:Qt.DELETE,action:Fe(S3,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(sD,t,e,!1)},{keyCode:Qt.DELETE,action:Fe(sD,t,e,!0)},{keyCode:Qt.BACKSPACE,action:Fe(nT,t,!1)},{keyCode:Qt.DELETE,action:Fe(nT,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(zf,t,!1,u)},{keyCode:Qt.DELETE,action:Fe(zf,t,!0,u)},...RP?[{keyCode:Qt.BACKSPACE,altKey:!0,action:Fe(zf,t,!1,g(!0))},{keyCode:Qt.DELETE,altKey:!0,action:Fe(zf,t,!0,g(!0))},{keyCode:Qt.BACKSPACE,metaKey:!0,action:Fe(zf,t,!1,g(!1))}]:[{keyCode:Qt.BACKSPACE,ctrlKey:!0,action:Fe(zf,t,!1,g(!0))},{keyCode:Qt.DELETE,ctrlKey:!0,action:Fe(zf,t,!0,g(!0))}],{keyCode:Qt.BACKSPACE,action:Fe(A3,t,!1)},{keyCode:Qt.DELETE,action:Fe(A3,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe($3,t,!1)},{keyCode:Qt.DELETE,action:Fe($3,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(ms,t,!1)},{keyCode:Qt.DELETE,action:Fe(ms,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(Bh,t,!1)},{keyCode:Qt.DELETE,action:Fe(Bh,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(iD,t,!1)},{keyCode:Qt.DELETE,action:Fe(iD,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(E3,t,!1)},{keyCode:Qt.DELETE,action:Fe(E3,t,!0)},{keyCode:Qt.BACKSPACE,action:Fe(Ih,t,!1)},{keyCode:Qt.DELETE,action:Fe(Ih,t,!0)}],n).filter(b=>t.selection.isEditable()).each(b=>{n.preventDefault(),Ky(t,r).isDefaultPrevented()||(b(),qy(t,r))})},rG=(t,e,n,r)=>Lf([{keyCode:Qt.BACKSPACE,action:Fe(F6,t)},{keyCode:Qt.DELETE,action:Fe(F6,t)},...RP?[{keyCode:Qt.BACKSPACE,altKey:!0,action:Fe(Hy,t)},{keyCode:Qt.DELETE,altKey:!0,action:Fe(Hy,t)},...n?[{keyCode:BP?224:91,action:Fe(()=>(iN(t,r),Hy(t)))}]:[]]:[{keyCode:Qt.BACKSPACE,ctrlKey:!0,action:Fe(Hy,t)},{keyCode:Qt.DELETE,ctrlKey:!0,action:Fe(Hy,t)}]],e),aG=(t,e)=>{let n=!1,r=[];t.on("keydown",i=>{n=i.keyCode===Qt.BACKSPACE,r=rD(t),i.isDefaultPrevented()||sG(t,e,i)}),t.on("keyup",i=>{i.isDefaultPrevented()||(rG(t,i,n,r),r.length=0),n=!1})},iG=(t,e)=>{const n=Z.fromDom(t),r=Z.fromDom(e),i=vl("span"),u=Et(ho,n),g=x=>Jn(x)&&Ms(x,"font-size").isSome(),b=[...g(r)?[r]:[],...yu(r,g,u)];Y(b.slice(1),x=>{b1(x,"font-size"),As(x,"data-mce-style"),i(x)&&kg(x)&&Ai(x)})},cG=t=>{for(;t;){if(jt(t)||Nt(t)&&t.data&&/[\r\n\s]/.test(t.data))return F.from(Z.fromDom(t));t=t.nextSibling}return F.none()},Pb=(t,e)=>{const n=t.dom,r=t.schema.getMoveCaretBeforeOnEnterElements();if(!e)return;if(/^(LI|DT|DD)$/.test(e.nodeName)){const u=x=>/^(ul|ol|dl)$/.test(oo(x)),g=x=>u(x)?F.from(x):ip(x,u),b=x=>n.isEmpty(x.dom);cG(e.firstChild).each(x=>{g(x).fold(()=>
43{if(b(x)){const w=Hf(x,0).element;Jn(w)&&!cc(w)&&Ro(w,Z.fromText(Bs))}},w=>{wr(w,Z.fromText(Bs))})})}const i=n.createRng();if(e.normalize(),e.hasChildNodes()){const u=new ts(e,e);let g=e,b;for(;b=u.current();){if(Nt(b)){i.setStart(b,0),i.setEnd(b,0);break}if(r[b.nodeName.toLowerCase()]){i.setStartBefore(b),i.setEndBefore(b);break}g=b,b=u.next()}b||(i.setStart(g,0),i.setEnd(g,0))}else Wn(e)?e.nextSibling&&n.isBlock(e.nextSibling)?(i.setStartBefore(e),i.setEndBefore(e)):(i.setStartAfter(e),i.setEndAfter(e)):(i.setStart(e,0),i.setEnd(e,0));t.selection.setRng(i),hc(t,i)},Yy=(t,e)=>{const n=t.getRoot();let r,i=e;for(;i!==n&&i&&t.getContentEditable(i)!=="false";){if(t.getContentEditable(i)==="true"){r=i;break}i=i.parentNode}return i!==n?r:n},HD=t=>F.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock)),kX=t=>HD(t).fold(Ut(""),e=>e.nodeName.toUpperCase()),lG=t=>HD(t).filter(e=>Xr(Z.fromDom(e))).isSome(),Ib=t=>{t.innerHTML='<br data-mce-bogus="1">'},FP=(t,e,n)=>{const r=t.dom;F.from(n.style).map(r.parseStyle).each(x=>{const E={...Eg(Z.fromDom(e)),...x};r.setStyles(e,E)});const i=F.from(n.class).map(x=>x.split(/\s+/)),u=F.from(e.className).map(x=>st(x.split(/\s+/),w=>w!==""));Us(i,u,(x,w)=>{const E=st(w,R=>!xt(x,R)),D=[...x,...E];r.setAttrib(e,"class",D.join(" "))});const g=["style","class"],b=Gf(n,(x,w)=>!xt(g,w));r.setAttribs(e,b)},$b=(t,e)=>{if(ws(t).toLowerCase()===e.tagName.toLowerCase()){const r=gc(t);FP(t,e,r)}},MP=(t,e,n,r,i=!0,u,g)=>{const b=t.dom,x=t.schema,w=ws(t),E=n?n.nodeName.toUpperCase():"";let D=e;const R=x.getTextInlineElements();let N;u||E==="TABLE"||E==="HR"?N=b.create(u||w,g||{}):N=n.cloneNode(!1);let H=N;if(!i)b.setAttrib(N,"style",null),b.setAttrib(N,"class",null);else{do if(R[D.nodeName]){if(B(D)||Xn(D))continue;const $=D.cloneNode(!1);b.setAttrib($,"id",""),N.hasChildNodes()?($.appendChild(N.firstChild),N.appendChild($)):(H=$,N.appendChild($))}while((D=D.parentNode)&&D!==r);N.nodeName!=="LI"&&iG(N,H)}return $b(t,N),Ib(H),N},NP=(t,e)=>t.dom.getParent(e,gp),PP=(t,e,n)=>{let r=e;for(;r&&r!==t&&nt(r.nextSibling);){const i=r.parentElement;if(!i||!n(i))return gp(i);r=i}return!1},uG=(t,e,n)=>!e&&n.nodeName.toLowerCase()===ws(t)&&t.dom.isEmpty(n)&&PP(t.getBody(),n,r=>Xe(t.schema.getTextBlockElements(),r.nodeName.toLowerCase())),dG=(t,e,n)=>{var u,g;const r=e(ws(t)),i=NP(t,n);i&&(t.dom.insertAfter(r,i),Pb(t,r),(((g=(u=n.parentElement)==null?void 0:u.childNodes)==null?void 0:g.length)??0)>1&&t.dom.remove(n))},mG=(t,e)=>t.firstChild&&t.firstChild.nodeName===e,IP=t=>{var e;return((e=t.parentNode)==null?void 0:e.firstChild)===t},$P=(t,e)=>{const n=t==null?void 0:t.parentNode;return mt(n)&&n.nodeName===e},s4=t=>mt(t)&&/^(OL|UL|LI)$/.test(t.nodeName),zD=t=>mt(t)&&/^(LI|DT|DD)$/.test(t.nodeName),gG=t=>s4(t)&&s4(t.parentNode),r4=t=>{const e=t.parentNode;return zD(e)?e:t},Xy=(t,e,n)=>{let r=t[n?"firstChild":"lastChild"];for(;r&&!jt(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},LP=t=>We(cd(Eg(Z.fromDom(t)),(e,n)=>`${n}: ${e};`),(e,n)=>e+n,""),fG=(t,e,n,r,i)=>{const u=t.dom,g=t.selection.getRng(),b=n.parentNode;if(n===t.getBody()||!b)return;gG(n)&&(i="LI");const x=zD(r)?LP(r):void 0;let w=zD(r)&&x?e(i,{style:LP(r)}):e(i);if(Xy(n,r,!0)&&Xy(n,r,!1))if($P(n,"LI")){const E=r4(n);u.insertAfter(w,E),IP(n)?u.remove(E):u.remove(n)}else u.replace(w,n);else if(Xy(n,r,!0))$P(n,"LI")?(u.insertAfter(w,r4(n)),w.appendChild(u.doc.createTextNode(" ")),w.appendChild(n)):b.insertBefore(w,n),u.remove(r);else if(Xy(n,r,!1))u.insertAfter(w,r4(n)),u.remove(r);else{n=r4(n);const E=g.cloneRange();E.setStartAfter(r),E.setEndAfter(n);const D=E.extractContents();if(i==="LI"&&mG(D,"LI")){const R=st(wt(w.children,Z.fromDom),Go(vl("br")));w=D.firstChild,u.insertAfter(D,n),Y(R,N=>Cl(Z.fromDom(w),N)),x&&w.setAttribute("style",x)}else u.insertAfter(D,n),u.insertAfter(w,n);u.remove(r)}Pb(t,w)},pG=t=>{Y(y1(Z.fromDom(t),zo),e=>{const n=e.dom;n.nodeValue=ya(n.data)})},hG=(t,e)=>{const n=t.dom.getParent(e,"ol,ul,dl");return n!==null&&t.dom.getContentEditableParent(n)==="false"},EX=(t,e)=>e&&e.nodeName==="A"&&t.isEmpty(e),VD=(t,e)=>t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e,bG=(t,e)=>t.nodeName===e||t.nextSibling&&t.nextSibling.nodeName===e,UD=(t,e)=>mt(e)&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&t.isEditable(e.parentNode)&&t.getContentEditable(e)!=="false",xG=(t,e,n)=>{var g;const r=[];if(!n)return;let i=n;for(;i=i.firstChild;){if(t.isBlock(i))return;jt(i)&&!e[i.nodeName.toLowerCase()]&&r.push(i)}let u=r.length;for(;u--;)i=r[u],(!i.hasChildNodes()||i.firstChild===i.lastChild&&((g=i.firstChild)==null?void 0:g.nodeValue)===""||EX(t,i))&&t.remove(i)},WD=(t,e,n)=>Nt(e)?t?n===1&&e.data.charAt(n-1)===$s?0:n:n===e.data.length-1&&e.data.charAt(n)===$s?e.data.length:n:n,HP=t=>{const e=t.cloneRange();return e.setStart(t.startContainer,WD(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,WD(!1,t.endContainer,t.endOffset)),e},vG=t=>{let e=t;do Nt(e)&&(e.data=e.data.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)},ZD=(t,e,n,r,i)=>{var x;const u=t.dom,g=Yy(u,r)??u.getRoot();let b=u.getParent(r,u.isBlock);
43if(!b||!UD(u,b)){if(b=b||g,!b.hasChildNodes()){const R=u.create(e);return $b(t,R),b.appendChild(R),n.setStart(R,0),n.setEnd(R,0),R}let w=r;for(;w&&w.parentNode!==b;)w=w.parentNode;let E;for(;w&&!u.isBlock(w);)E=w,w=w.previousSibling;const D=(x=E==null?void 0:E.parentElement)==null?void 0:x.nodeName;if(E&&D&&t.schema.isValidChild(D,e.toLowerCase())){const R=E.parentNode,N=u.create(e);for($b(t,N),R.insertBefore(N,E),w=E;w&&!u.isBlock(w);){const H=w.nextSibling;N.appendChild(w),w=H}n.setStart(r,i),n.setEnd(r,i)}}return r},om=(t,e)=>{e.normalize();const n=e.lastChild;(!n||jt(n)&&/^(left|right)$/gi.test(t.getStyle(n,"float",!0)))&&t.add(e,"br")},zP=(t,e)=>{const n=k0(t);return so(e)?!1:q(n)?xt(Mt.explode(n),e.nodeName.toLowerCase()):n},Jy={insert:(t,e)=>{let n,r,i,u,g=!1;const b=t.dom,x=t.schema,w=x.getNonEmptyElements(),E=t.selection.getRng(),D=ws(t),R=Z.fromDom(E.startContainer),N=Xi(R,E.startOffset),H=N.exists(bt=>Rc(bt)&&!oc(bt)),$=E.collapsed&&H,U=(bt,qt)=>MP(t,n,Gt,St,d_(t),bt,qt),J=bt=>{const qt=WD(bt,n,r);if(Nt(n)&&(bt?qt>0:qt<n.data.length))return!1;if((n.parentNode===Gt||n===Gt)&&g&&!bt||bt&&jt(n)&&n===Gt.firstChild)return!0;if(VD(n,"TABLE")||VD(n,"HR"))return bG(n,"BR")?!bt:g&&!bt||!g&&bt;const De=new ts(n,Gt);Nt(n)&&(bt&&qt===0?De.prev():!bt&&qt===n.data.length&&De.next());let Oe;for(;Oe=De.current();){if(jt(Oe)){if(!Oe.getAttribute("data-mce-bogus")){const Co=Oe.nodeName.toLowerCase();if(w[Co]&&Co!=="br")return!1}}else if(Nt(Oe)&&!Bg(Oe.data))return!1;bt?De.prev():De.next()}return!0},Q=()=>{let bt;return/^(H[1-6]|PRE|FIGURE)$/.test(i)&&ge!=="HGROUP"?bt=U(D):bt=U(),zP(t,u)&&UD(b,u)&&b.isEmpty(Gt,void 0,{includeZwsp:!0})?bt=b.split(u,Gt):b.insertAfter(bt,Gt),Pb(t,bt),bt};aS(b,E).each(bt=>{E.setStart(bt.startContainer,bt.startOffset),E.setEnd(bt.endContainer,bt.endOffset)}),n=E.startContainer,r=E.startOffset;const et=!!(e&&e.shiftKey),ft=!!(e&&e.ctrlKey);jt(n)&&n.hasChildNodes()&&!$&&(g=r>n.childNodes.length-1,n=n.childNodes[Math.min(r,n.childNodes.length-1)]||n,g&&Nt(n)?r=n.data.length:r=0);const St=Yy(b,n);if(!St||hG(t,n))return;et||(n=ZD(t,D,E,n,r));let Gt=b.getParent(n,b.isBlock)||b.getRoot();u=mt(Gt==null?void 0:Gt.parentNode)?b.getParent(Gt.parentNode,b.isBlock):null,i=Gt?Gt.nodeName.toUpperCase():"";const ge=u?u.nodeName.toUpperCase():"";if(ge==="LI"&&!ft){const bt=u;Gt=bt,u=bt.parentNode,i=ge}if(jt(u)&&uG(t,et,Gt))return dG(t,U,Gt);if(/^(LI|DT|DD)$/.test(i)&&jt(u)&&b.isEmpty(Gt)){fG(t,U,u,Gt,D);return}if(!$&&(Gt===t.getBody()||!UD(b,Gt)))return;const ht=Gt.parentNode;let it;if($)it=U(D),N.fold(()=>{Ro(R,Z.fromDom(it))},bt=>{wr(bt,Z.fromDom(it))}),t.selection.setCursorLocation(it,0);else if(Ou(Gt))it=lc(Gt),b.isEmpty(Gt)&&Ib(Gt),$b(t,it),Pb(t,it);else if(J(!1))it=Q();else if(J(!0)&&ht){const bt=gt.fromRangeStart(E),qt=$A(bt),De=Z.fromDom(Gt),Co=bS(De,bt,t.schema)?y8(De,bt,t.schema).bind(_n=>F.from(_n.getNode())):F.none();it=ht.insertBefore(U(),Gt);const Yo=VD(Gt,"HR")||qt?it:Co.getOr(Gt);Pb(t,Yo)}else{const bt=HP(E).cloneRange();bt.setEndAfter(Gt);const qt=bt.extractContents();pG(qt),vG(qt),it=qt.firstChild,Gt===it?mt(ht)&&b.insertAfter(qt,ht):b.insertAfter(qt,Gt),xG(b,w,it),om(b,Gt),b.isEmpty(Gt)&&Ib(Gt),it.normalize(),b.isEmpty(it)?(b.remove(it),Q()):($b(t,it),Pb(t,it))}b.setAttrib(it,"id",""),t.dispatch("NewBlock",{newBlock:it})},fakeEventName:"insertParagraph"},jD=(t,e,n)=>{const r=new ts(e,n);let i;const u=t.getNonEmptyElements();for(;i=r.next();)if(u[i.nodeName.toLowerCase()]||Nt(i)&&i.length>0)return!0;return!1},GD=(t,e,n)=>{const r=t.dom.createRng();n?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),t.selection.setRng(r),hc(t,r)},VP=(t,e)=>{const n=t.selection,r=t.dom,i=n.getRng();let u,g=!1;aS(r,i).each(N=>{i.setStart(N.startContainer,N.startOffset),i.setEnd(N.endContainer,N.endOffset)});let b=i.startOffset,x=i.startContainer;if(jt(x)&&x.hasChildNodes()){const N=b>x.childNodes.length-1;x=x.childNodes[Math.min(b,x.childNodes.length-1)]||x,N&&Nt(x)?b=x.data.length:b=0}let w=r.getParent(x,r.isBlock);const E=w&&w.parentNode?r.getParent(w.parentNode,r.isBlock):null,D=E?E.nodeName.toUpperCase():"",R=!!(e&&e.ctrlKey);
43D==="LI"&&!R&&(w=E),Nt(x)&&b>=x.data.length&&(jD(t.schema,x,w||r.getRoot())||(u=r.create("br"),i.insertNode(u),i.setStartAfter(u),i.setEndAfter(u),g=!0)),u=r.create("br"),ef(r,i,u),GD(t,u,g),t.undoManager.add()},CG=(t,e)=>{const n=Z.fromTag("br");wr(Z.fromDom(e),n),t.undoManager.add()},wG=(t,e)=>{SG(t.getBody(),e)||Nc(Z.fromDom(e),Z.fromTag("br"));const n=Z.fromTag("br");Nc(Z.fromDom(e),n),GD(t,n.dom,!1),t.undoManager.add()},_G=t=>Wn(t.getNode()),SG=(t,e)=>_G(gt.after(e))?!0:m(t,gt.after(e)).map(n=>Wn(n.getNode())).getOr(!1),UP=t=>t&&t.nodeName==="A"&&"href"in t,WP=t=>t.fold(pt,UP,UP,pt),kG=t=>{const e=Et(dh,t),n=gt.fromRangeStart(t.selection.getRng());return od(e,t.getBody(),n).filter(WP)},EG=(t,e)=>{e.fold(_e,Et(CG,t),Et(wG,t),_e)},jP={insert:(t,e)=>{const n=kG(t);n.isSome()?n.each(Et(EG,t)):VP(t,e)},fakeEventName:"insertLineBreak"},GP=(t,e)=>HD(t).filter(n=>e.length>0&&ei(Z.fromDom(n),e)).isSome(),AG=t=>GP(t,l_(t)),TG=t=>GP(t,u_(t)),wc=lu.generate([{br:[]},{block:[]},{none:[]}]),DG=(t,e)=>TG(t),qP=t=>(e,n)=>lG(e)===t,KP=(t,e)=>(n,r)=>kX(n)===t.toUpperCase()===e,a4=t=>{const e=Yy(t.dom,t.selection.getStart());return so(e)},Qy=t=>KP("pre",t),OG=()=>KP("summary",!0),Lb=t=>
43(e,n)=>_0(e)===t,qD=(t,e)=>AG(t),i4=(t,e)=>e,RG=t=>{const e=ws(t),n=Yy(t.dom,t.selection.getStart());return mt(n)&&t.schema.isValidChild(n.nodeName,e)},YP=t=>{const e=t.selection.getRng(),n=Z.fromDom(e.startContainer),i=Xi(n,e.startOffset).map(u=>Rc(u)&&!oc(u));return e.collapsed&&i.getOr(!0)},al=(t,e)=>(n,r)=>We(t,(u,g)=>u&&g(n,r),!0)?F.some(e):F.none(),BG=(t,e)=>OM([al([DG],wc.none()),al([Qy(!0),a4],wc.none()),al([OG()],wc.br()),al([Qy(!0),Lb(!1),i4],wc.br()),al([Qy(!0),Lb(!1)],wc.block()),al([Qy(!0),Lb(!0),i4],wc.block()),al([Qy(!0),Lb(!0)],wc.br()),al([qP(!0),i4],wc.br()),al([qP(!0)],wc.block()),al([qD],wc.br()),al([i4],wc.br()),al([RG],wc.block()),al([YP],wc.block())],[t,!!(e&&e.shiftKey)]).getOr(wc.none()),c4=(t,e,n)=>{e.mode.isReadOnly()||(e.selection.isCollapsed()||$8(e),!(mt(n)&&Ky(e,t.fakeEventName).isDefaultPrevented())&&(t.insert(e,n),mt(n)&&qy(e,t.fakeEventName)))},XP=(t,e)=>{if(t.mode.isReadOnly())return;const n=()=>c4(jP,t,e),r=()=>c4(Jy,t,e),i=BG(t,e);switch(S0(t)){case"linebreak":i.fold(n,n,_e);break;case"block":i.fold(r,r,_e);break;case"invert":i.fold(r,n,_e);break;default:i.fold(n,r,_e);break}},JP=hl(),FG=JP.os.isiOS()&&JP.browser.isSafari(),KD=(t,e)=>{e.isDefaultPrevented()||(e.preventDefault(),oF(t.undoManager),t.undoManager.transact(()=>{XP(t,e)}))},l4=t=>{if(!t.collapsed)return!1;const e=t.startContainer;if(Nt(e)){const n=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,r=e.data.charAt(t.startOffset-1);return n.test(r)}else return!1},QP=t=>{let e=F.none();const n=i=>{e=F.some(i.selection.getBookmark()),i.undoManager.add()},r=(i,u)=>{i.undoManager.undo(),e.fold(_e,g=>i.selection.moveToBookmark(g)),KD(i,u),e=F.none()};t.on("keydown",i=>{i.keyCode===Qt.ENTER&&(FG&&l4(t.selection.getRng())?n(t):KD(t,i))}),t.on("keyup",i=>{i.keyCode===Qt.ENTER&&e.each(()=>r(t,i))})},tI=(t,e,n)=>{const r=Oo.os.isMacOS()||Oo.os.isiOS();Lf([{keyCode:Qt.END,action:Fe(DN,t,!0)},{keyCode:Qt.HOME,action:Fe(DN,t,!1)},...r?[]:[{keyCode:Qt.HOME,action:Fe(W3,t,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Qt.END,action:Fe(W3,t,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Qt.END,action:Fe(hD,t,!0)},{keyCode:Qt.HOME,action:Fe(hD,t,!1)},{keyCode:Qt.END,action:Fe($f,t,!0,e)},{keyCode:Qt.HOME,action:Fe($f,t,!1,e)}],n).each(i=>{n.preventDefault()})},MG=(t,e)=>{t.on("keydown",n=>{n.isDefaultPrevented()||tI(t,e,n)})},NG=t=>{t.on("input",e=>{e.isComposing||D8(t)})},u4=hl(),PG=(t,e,n)=>{Lf([{keyCode:Qt.PAGE_UP,action:Fe($f,t,!1,e)},{keyCode:Qt.PAGE_DOWN,action:Fe($f,t,!0,e)}],n)},YD=t=>t.stopImmediatePropagation(),eI=t=>t.keyCode===Qt.PAGE_UP||t.keyCode===Qt.PAGE_DOWN,XD=(t,e,n)=>{n&&!t.get()?e.on("NodeChange",YD,!0):!n&&t.get()&&e.off("NodeChange",YD),t.set(n)},IG=(t,e)=>{if(u4.os.isMacOS())return;const n=Te(!1);t.on("keydown",r=>{eI(r)&&XD(n,t,!0)}),t.on("keyup",r=>{r.isDefaultPrevented()||PG(t,e,r),eI(r)&&n.get()&&(XD(n,t,!1),t.nodeChanged())})},oI=(t,e)=>t===e||t.contains(e),$G=(t,e)=>!oI(t.getBody(),e.startContainer)||!oI(t.getBody(),e.endContainer)?!0:u9(t.dom,e),LG=t=>{t.on("beforeinput",e=>{(!t.selection.isEditable()||$t(e.getTargetRanges(),n=>!$G(t,n)))&&e.preventDefault()})},nI=(t,e)=>{const n=e.container(),r=e.offset();return Nt(n)?(n.insertData(r,t),F.some(gt(n,r+t.length))):ah(e).map(i=>{const u=Z.fromText(t);return e.isAtEnd()?Nc(i,u):wr(i,u),gt(u.dom,t.length)})},Hh=Et(nI,Bs),sI=Et(nI," "),HG=(t,e,n)=>N9(t,e,n)?Hh(e):sI(e),rI=t=>e=>e.fold(n=>h(t.dom,gt.before(n)),n=>v(n),n=>S(n),n=>m(t.dom,gt.after(n))),zG=(t,e,n)=>r=>N9(t,r,n)?Hh(e):sI(e),aI=t=>e=>{t.selection.setRng(e.toRange()),t.nodeChanged()},VG=(t,e)=>t.isEditable(t.getParent(e,"summary")),iI=t=>{const e=gt.fromRangeStart(t.selection.getRng()),n=Z.fromDom(t.getBody());if(t.selection.isCollapsed()){const r=Et(dh,t),i=gt.fromRangeStart(t.selection.getRng());return od(r,t.getBody(),i).bind(rI(n)).map(u=>()=>zG(n,e,t.schema)(u).each(aI(t)))}else return F.none()},UG=t=>{const e=()=>{const n=Z.fromDom(t.getBody());t.selection.isCollapsed()||t.getDoc().execCommand("Delete");const r=gt.fromRangeStart(t.selection.getRng());HG(n,r,t.schema).each(aI(t))};return Ec(Oo.browser.isFirefox()&&t.selection.isEditable()&&VG(t.dom,t.selection.getRng().startContainer),e)},WG=(t,e)=>{G3([{keyCode:Qt.SPACEBAR,action:Fe(iI,t)},{keyCode:Qt.SPACEBAR,action:Fe(UG,t)}],e).each(n=>{e.preventDefault(),Ky(t,"insertText",{data:" "}).isDefaultPrevented()||(n(),qy(t,"insertText",{data:" "}))})},TX=t=>
43{t.on("keydown",e=>{e.isDefaultPrevented()||WG(t,e)})},d4=t=>T_(t)?[{keyCode:Qt.TAB,action:Fe(mP,t,!0)},{keyCode:Qt.TAB,shiftKey:!0,action:Fe(mP,t,!1)}]:[],ZG=(t,e)=>{Lf([...d4(t)],e).each(n=>{e.preventDefault()})},jG=t=>{t.on("keydown",e=>{e.isDefaultPrevented()||ZG(t,e)})},GG=t=>{if(t.addShortcut("Meta+P","","mcePrint"),Kj(t),Yu(t))return Te(null);{const e=vZ(t);return LG(t),wN(t),Rj(t,e),aG(t,e),QP(t),TX(t),NG(t),jG(t),MG(t,e),IG(t,e),e}},qG=(t,e)=>{const n=Dy(t);n===null||i6(t,n)||t.undoManager.transact(()=>{mo(e.styles)&&t.dom.setStyles(n,e.styles),mo(e.attrs)&&Do(e.attrs,(r,i)=>t.dom.setAttrib(n,i,r))})},JD=(t,e)=>()=>{const n=Dy(t);return mt(n)&&n.nodeName===e},KG=t=>{t.addCommand("InsertUnorderedList",(e,n)=>{v6(t,"UL",n)}),t.addCommand("InsertOrderedList",(e,n)=>{v6(t,"OL",n)}),t.addCommand("InsertDefinitionList",(e,n)=>{v6(t,"DL",n)}),t.addCommand("RemoveList",()=>{v3(t)}),t.addCommand("mceListUpdate",(e,n)=>{mo(n)&&qG(t,n)}),t.addCommand("mceListBackspaceDelete",(e,n)=>{w6(t,n)}),t.addQueryStateHandler("InsertUnorderedList",JD(t,"UL")),t.addQueryStateHandler("InsertOrderedList",JD(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",JD(t,"DL"))},YG=t=>{t.on("keydown",e=>{e.keyCode===Qt.BACKSPACE?w6(t,!1)&&e.preventDefault():e.keyCode===Qt.DELETE&&w6(t,!0)&&e.preventDefault()})},cI=t=>t.type===3,lI=t=>t.length===0,XG=t=>{const e=(i,u)=>{const g=hr.create("li");Y(i,b=>g.append(b)),u?t.insert(g,u,!0):t.append(g)},n=(i,u)=>cI(u)?[...i,u]:!lI(i)&&!cI(u)?(e(i,u),[]):i,r=We(t.children(),n,[]);lI(r)||e(r)},JG=t=>{t.on("PreInit",()=>{const{parser:e}=t;e.addNodeFilter("ul,ol",n=>Y(n,XG))})},QG=t=>{t.on("keydown",e=>{e.keyCode!==Qt.TAB||Qt.metaKeyPressed(e)||t.undoManager.transact(()=>{(e.shiftKey?By(t):lM(t))&&e.preventDefault()})})},tq=t=>{gv(t)&&QG(t)},an=t=>{YG(t),KG(t),JG(t),tq(t)};class eq{constructor(e){Ft(this,"editor");Ft(this,"lastPath",[]);this.editor=e;let n;const r=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",i=>{const u=e.selection.getRng(),g={startContainer:u.startContainer,startOffset:u.startOffset,endContainer:u.endContainer,endOffset:u.endOffset};(i.type==="nodechange"||!Xm(g,n))&&e.dispatch("SelectionChange"),n=g}),e.on("contextmenu",()=>{eS(e),e.dispatch("SelectionChange")}),e.on("SelectionChange",()=>{const i=e.selection.getStart(!0);i&&Dv(e)&&!r.isSameElementPath(i)&&e.dom.isChildOf(i,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",i=>{!i.isDefaultPrevented()&&Dv(e)&&(e.selection.getNode().nodeName==="IMG"?Vl.setEditorTimeout(e,()=>{e.nodeChanged()}):e.nodeChanged())})}nodeChanged(e={}){const n=this.editor,r=n.selection;let i;if(n.initialized&&r&&!C_(n)&&!fc(n)){const u=n.getBody();i=r.getStart(!0)||u,(i.ownerDocument!==n.getDoc()||!n.dom.isChildOf(i,u))&&(i=u);const g=[];n.dom.getParent(i,b=>b===u?!0:(g.push(b),!1)),n.dispatch("NodeChange",{...e,element:i,parents:g})}}isSameElementPath(e){let n;const r=this.editor,i=is(r.dom.getParents(e,It,r.getBody()));if(i.length===this.lastPath.length){for(n=i.length;n>=0&&i[n]===this.lastPath[n];n--);if(n===-1)return this.lastPath=i,!0}return this.lastPath=i,!1}}const QD="x-tinymce/html",m4=Ut(QD),tC="<!-- "+QD+" -->",uI=t=>tC+t,oq=t=>t.replace(tC,""),dI=t=>t.indexOf(tC)!==-1,nq=t=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t),mI=(t,e)=>{let n="<"+t;const r=cd(e,(i,u)=>u+'="'+La.encodeAllRaw(i)+'"');return r.length&&(n+=" "+r.join(" ")),n+">"},g4=(t,e,n)=>{const r=t.split(/\n\n/),i=mI(e,n),u="</"+e+">",g=wt(r,x=>x.split(/\n/).join("<br />")),b=x=>i+x+u;return g.length===1?g[0]:wt(g,b).join("")},gI="%MCEPASTEBIN%",sq=(t,e)=>{const{dom:n,selection:r}=t,i=t.getBody();e.set(r.getRng());const u=n.add(t.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},gI);Oo.browser.isFirefox()&&n.setStyle(u,"left",n.getStyle(i,"direction",!0)==="rtl"?65535:-65535),n.bind(u,"beforedeactivate focusin focusout",g=>{g.stopPropagation()}),u.focus(),r.select(u,!0)},tO=(t,e)=>{const n=t.dom;if(eO(t)){let r;const i=e.get();for(;r=eO(t);)n.remove(r),n.unbind(r);i&&t.selection.setRng(i)}e.set(null)},eO=t=>t.dom.get("mcepastebin"),rq=t=>mt(t)&&t.id==="mcepastebin",aq=t=>{const e=t.dom,n=(g,b)=>{g.appendChild(b),e.remove(b,!0)},[r,...i]=st(t.getBody().childNodes,rq);Y(i,g=>{n(r,g)});const u=e.select("div[id=mcepastebin]",r);for(let g=u.length-1;g>=0;g--){const b=e.create("div");r.insertBefore(b,u[g]),n(b,u[g])}return r?r.innerHTML:""},fI=t=>t===gI,pI=t=>{const e=Te(null);return{create:()=>sq(t,e),remove:()=>tO(t,e),getEl:()=>eO(t),getHtml:()=>aq(t),getLastRng:e.get}},hI=(t,e)=>(Mt.each(e,n=>{Oa(n,RegExp)?t=t.replace(n,""):t=t.replace(n[0],n[1])}),t),iq=t=>{const e=mr(),n=lb({},e);let r="";
43const i=e.getVoidElements(),u=Mt.makeMap("script noscript style textarea video audio iframe object"," "),g=e.getBlockElements(),b=x=>{const w=x.name,E=x;if(w==="br"){r+=` 44`;return}if(w!=="wbr"){if(i[w]&&(r+=" "),u[w]){r+=" ";return}if(x.type===3&&(r+=x.value),!(x.name in e.getVoidElements())){let D=x.firstChild;if(D)do b(D);while(D=D.next)}g[w]&&E.next&&(r+=` 45`,w==="p"&&(r+=` 46`))}};return t=hI(t,[/<!\[[^\]]+\]>/g]),b(n.parse(t)),r},oO=t=>(t=hI(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(n,r,i)=>!r&&!i?" ":Bs],/<br class="Apple-interchange-newline">/g,/<br>$/i]),t),cq=t=>{let e=0;return()=>t+e++},lq=t=>{const e=t.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Mt.hasOwn(n,e)?"image/"+n[e]:"image/"+e},uq=(t,e)=>{const n=lb({sanitize:P0(t),sandbox_iframes:hf(t),sandbox_iframes_exclusions:Iu(t),convert_unsafe_embeds:$u(t)},t.schema);n.addNodeFilter("meta",i=>{Mt.each(i,u=>{u.remove()})});const r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return yf({validate:!0},t.schema).serialize(r)},f4=(t,e)=>({content:t,cancelled:e}),dq=(t,e,n)=>{const r=t.dom.create("div",{style:"display:none"},e),i=e_(t,r,n);return f4(i.node.innerHTML,i.isDefaultPrevented())},bI=(t,e,n)=>{const r=t_(t,e,n),i=uq(t,r.content);return t.hasEventListeners("PastePostProcess")&&!r.isDefaultPrevented()?dq(t,i,n):f4(i,r.isDefaultPrevented())},mq=(t,e,n)=>bI(t,e,n),eC=(t,e)=>(t.insertContent(e,{merge:S_(t),paste:!0}),!0),nO=t=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(t),xI=(t,e)=>nO(e)&&$t(mv(t),n=>ma(e.toLowerCase(),`.${n.toLowerCase()}`)),gq=(t,e,n)=>(t.undoManager.extra(()=>{n(t,e)},()=>{t.insertContent('<img src="'+e+'">')}),!0),fq=(t,e,n)=>(t.undoManager.extra(()=>{n(t,e)},()=>{t.execCommand("mceInsertLink",!1,e)}),!0),pq=(t,e,n)=>!t.selection.isCollapsed()&&nO(e)?fq(t,e,n):!1,hq=(t,e,n)=>xI(t,e)?gq(t,e,n):!1,vI=(t,e)=>{Mt.each([pq,hq,eC],n=>!n(t,e,eC))},bq=(t,e,n)=>{n||!iv(t)?eC(t,e):vI(t,e)},yI=cq("mceclip"),p4=t=>{const e=Mb();return JN(e,t),X3(e),e},h4=(t,e,n,r,i)=>{const u=mq(t,e,n);if(!u.cancelled){const g=u.content,b=()=>bq(t,g,r);i?Ky(t,"insertFromPaste",{dataTransfer:p4(g)}).isDefaultPrevented()||(b(),qy(t,"insertFromPaste")):b()}},Hb=(t,e,n,r)=>{const i=n||dI(e);h4(t,oq(e),i,!1,r)},sO=(t,e,n)=>{const r=t.dom.encode(e).replace(/\r\n/g,` 47`),i=A1(r,qE(t)),u=g4(i,ws(t),gc(t));h4(t,u,!1,!0,n)},CI=t=>{const e={};if(t&&t.types)for(let n=0;n<t.types.length;n++){const r=t.types[n];try{e[r]=t.getData(r)}catch{e[r]=""}}return e},il=(t,e)=>e in t&&t[e].length>0,wI=t=>il(t,"text/html")||il(t,"text/plain"),zb=(t,e)=>{const n=e.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return mt(n)?t.dom.encode(n[1]):void 0},oC=(t,e,n,r)=>{const i=yI(),u=m_(t)&&mt(n.name),g=u?zb(t,n.name):i,b=u?n.name:void 0,x=e.create(i,n,r,g,b);return e.add(x),x},xq=(t,e)=>{TT(e.uri).each(({data:n,type:r,base64Encoded:i})=>{const u=i?n:btoa(n),g=e.file,b=t.editorUpload.blobCache,w=b.getByData(u,r)??oC(t,b,g,u);Hb(t,`<img src="${w.blobUri()}">`,!1,!0)})},vq=t=>t.type==="paste",Vb=t=>Promise.all(wt(t,e=>DT(e).then(n=>({file:e,uri:n})))),yq=t=>{const e=mv(t);return n=>Ze(n.type,"image/")&&$t(e,r=>lq(r)===n.type)},rO=(t,e)=>{const n=e.items?qo(Wr(e.items),i=>i.kind==="file"?[i.getAsFile()]:[]):[],r=e.files?Wr(e.files):[];return st(n.length>0?n:r,yq(t))},_I=(t,e,n)=>{const r=vq(e)?e.clipboardData:e.dataTransfer;if(N0(t)&&r){const i=rO(t,r);if(i.length>0)return e.preventDefault(),Vb(i).then(u=>{n&&t.selection.setRng(n),Y(u,g=>{xq(t,g)})}),!0}return!1},SI=t=>{var e,n;return Oo.os.isAndroid()&&((n=(e=t.clipboardData)==null?void 0:e.items)==null?void 0:n.length)===0},kI=t=>Qt.metaKeyPressed(t)&&t.keyCode===86||t.shiftKey&&t.keyCode===45,nC=(t,e,n,r,i)=>{let u=oO(n);const g=il(e,m4())||dI(n),b=!g&&nq(u),x=nO(u);(fI(u)||!u.length||b&&!x)&&(r=!0),(r||x)&&(il(e,"text/plain")&&b?u=e["text/plain"]:u=iq(u)),!fI(u)&&(r?sO(t,u,i):Hb(t,u,g,i))},EI=(t,e,n)=>{let r;const i=()=>e.getLastRng()||t.selection.getRng();
47t.on("keydown",u=>{kI(u)&&!u.isDefaultPrevented()&&(r=u.shiftKey&&u.keyCode===86)}),t.on("paste",u=>{if(u.isDefaultPrevented()||SI(u))return;const g=n.get()==="text"||r;r=!1;const b=CI(u.clipboardData);!wI(b)&&_I(t,u,i())||(il(b,"text/html")?(u.preventDefault(),nC(t,b,b["text/html"],g,!0)):il(b,"text/plain")&&il(b,"text/uri-list")?(u.preventDefault(),nC(t,b,b["text/plain"],g,!0)):(e.create(),Vl.setEditorTimeout(t,()=>{const x=e.getHtml();e.remove(),nC(t,b,x,g,!1)},0)))})},Cq=t=>{const e=i=>Ze(i,"webkit-fake-url"),n=i=>Ze(i,"data:"),r=i=>{var u;return((u=i.data)==null?void 0:u.paste)===!0};t.parser.addNodeFilter("img",(i,u,g)=>{if(!N0(t)&&r(g))for(const b of i){const x=b.attr("src");q(x)&&!b.attr("data-mce-object")&&x!==Oo.transparentSrc&&(e(x)||!cv(t)&&n(x))&&b.remove()}})},wq=(t,e,n)=>{EI(t,e,n),Cq(t)},AI=(t,e)=>{e.get()==="text"?(e.set("html"),o_(t,!1)):(e.set("text"),o_(t,!0)),t.focus()},_q=(t,e)=>{t.addCommand("mceTogglePlainTextPaste",()=>{AI(t,e)}),t.addCommand("mceInsertClipboardContent",(n,r)=>{r.html&&Hb(t,r.html,r.internal,!1),r.text&&sO(t,r.text,!1)})},TI=(t,e,n)=>{if(t)try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(m4(),e),!0}catch{return!1}else return!1},b4=(t,e,n,r)=>{TI(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},aO=t=>
47(e,n)=>{const{dom:r,selection:i}=t,u=r.create("div",{contenteditable:"false","data-mce-bogus":"all"}),g=r.create("div",{contenteditable:"true"},e);r.setStyles(u,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),u.appendChild(g),r.add(t.getBody(),u);const b=i.getRng();g.focus();const x=r.createRng();x.selectNodeContents(g),i.setRng(x),Vl.setEditorTimeout(t,()=>{i.setRng(b),r.remove(u),n()},0)},DI=t=>({html:uI(t.selection.getContent({contextual:!0})),text:t.selection.getContent({format:"text"})}),Sq=t=>!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody()),OI=t=>!t.selection.isCollapsed()||Sq(t),RI=(t,e)=>n=>{!n.isDefaultPrevented()&&OI(t)&&t.selection.isEditable()&&b4(n,DI(t),aO(t),()=>{if(Oo.browser.isChromium()||Oo.browser.isFirefox()){const r=t.selection.getRng();Vl.setEditorTimeout(t,()=>{t.selection.setRng(r),Jl(t,e)},0)}else Jl(t,e)})},iO=t=>e=>{!e.isDefaultPrevented()&&OI(t)&&b4(e,DI(t),aO(t),_e)},kq=(t,e)=>{t.on("cut",RI(t,e)),t.on("copy",iO(t))},cO=(t,e)=>Uu.getCaretRangeFromPoint(e.clientX??0,e.clientY??0,t.getDoc()),BI=t=>{const e=t["text/plain"];return e?e.indexOf("file://")===0:!1},FI=(t,e)=>{e&&t.selection.setRng(e),t.focus()},MI=t=>$t(t.files,e=>/^image\//.test(e.type)),Eq=(t,e,n,r)=>{const i=t.getParent(n,g=>Kn(e,g));if(!nt(t.getParent(n,"summary")))return!0;if(i&&Xe(r,"text/html")){const g=new DOMParser().parseFromString(r["text/html"],"text/html").body;return!nt(g.querySelector(i.nodeName.toLowerCase()))}else return!1},Aq=t=>{t.on("input",e=>{const n=r=>nt(r.querySelector("summary"));if(e.inputType==="deleteByDrag"){const r=st(t.dom.select("details"),n);Y(r,i=>{Wn(i.firstChild)&&i.firstChild.remove();const u=t.dom.create("summary");u.appendChild(Ad().dom),i.prepend(u)})}})},x4=(t,e)=>{gR(t)&&t.on("dragend dragover draggesture dragdrop drop drag",n=>{n.preventDefault(),n.stopPropagation()}),N0(t)||t.on("drop",n=>{const r=n.dataTransfer;r&&MI(r)&&n.preventDefault()}),t.on("drop",n=>{if(n.isDefaultPrevented())return;const r=cO(t,n);if(so(r))return;const i=CI(n.dataTransfer),u=il(i,m4());if((!wI(i)||BI(i))&&_I(t,n,r))return;const g=i[m4()],b=g||i["text/html"]||i["text/plain"],x=Eq(t.dom,t.schema,r.startContainer,i),w=e.get();w&&!x||b&&(n.preventDefault(),Vl.setEditorTimeout(t,()=>{t.undoManager.transact(()=>{(g||w&&x)&&t.execCommand("Delete"),FI(t,r);const E=oO(b);i["text/html"]?Hb(t,E,u,!0):sO(t,E,!0)})}))}),t.on("dragstart",n=>{e.set(!0)}),t.on("dragover dragend",n=>{N0(t)&&!e.get()&&(n.preventDefault(),FI(t,cO(t,n))),n.type==="dragend"&&e.set(!1)}),Aq(t)},Tq=t=>{const e=i=>u=>{i(t,u)},n=UE(t);X(n)&&t.on("PastePreProcess",e(n));const r=WE(t);X(r)&&t.on("PastePostProcess",e(r))},Dq=(t,e)=>{t.on("PastePreProcess",n=>{n.content=e(t,n.content,n.internal)})},NI=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,lO=t=>Mt.trim(t).replace(NI,Mi).toLowerCase(),Oq=(t,e,n)=>{const r=av(t);if(n||r==="all"||!jE(t))return e;const i=r?r.split(/[, ]/):[];if(i&&r!=="none"){const u=t.dom,g=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(b,x,w,E)=>{const D=u.parseStyle(u.decode(w)),R={};for(let H=0;H<i.length;H++){const $=D[i[H]];let U=$,J=u.getStyle(g,i[H],!0);/color/.test(i[H])&&(U=lO(U),J=lO(J)),J!==U&&(R[i[H]]=$)}const N=u.serializeStyle(R,"span");return N?x+' style="'+N+'"'+E:x+E})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(u,g,b,x)=>g+' style="'+b+'"'+x),e},Rq=t=>{(Oo.browser.isChromium()||Oo.browser.isSafari())&&Dq(t,Oq)},Bq=(t,e)=>{const n=Te(!1),r=Te(GE(t)?"text":"html"),i=pI(t);Rq(t),_q(t,r),Tq(t),t.addQueryStateHandler("mceTogglePlainTextPaste",()=>r.get()==="text"),t.on("PreInit",()=>{kq(t,e),x4(t,n),wq(t,i,r)})},Fq=t=>{t.on("click",e=>{t.dom.getParent(e.target,"details")&&e.preventDefault()})},Mq=t=>{t.parser.addNodeFilter("details",e=>{const n=pf(t);Y(e,r=>{n==="expanded"?r.attr("open","open"):n==="collapsed"&&r.attr("open",null)})}),t.serializer.addNodeFilter("details",e=>{const n=Pu(t);Y(e,r=>{n==="expanded"?r.attr("open","open"):n==="collapsed"&&r.attr("open",null)})})},PI=t=>{Fq(t),Mq(t)},Nq=Wn,II=Nt,Pq=t=>On(t.dom),Iq=t=>Pa(t.dom),$I=t=>e=>ho(Z.fromDom(t),e),$q=(t,e,n)=>sn(Z.fromDom(t),r=>Iq(r)||n.isBlock(oo(r)),$I(e)).getOr(Z.fromDom(e)).dom,LI=(t,e)=>sn(Z.fromDom(t),Pq,$I(e)),HI=(t,e,n)=>{const r=new ts(t,e),i=n?r.next.bind(r):r.prev.bind(r);let u=t;for(let g=n?t:i();g&&!Nq(g);g=i())Mn(g)&&(u=g);return u},zI=(t,e,n)=>{const i=gt.fromRangeStart(t).getNode(),u=$q(i,e,n),g=HI(i,u,!1),b=HI(i,u,!0),x=document.createRange();return LI(g,u).fold(()=>{II(g)?x.setStart(g,0):x.setStartBefore(g)},w=>x.setStartBefore(w.dom)),LI(b,u).fold(()=>{II(b)?x.setEnd(b,b.data.length):x.setEndAfter(b)},w=>x.setEndAfter(w.dom)),x},VI=t=>{const e=zI(t.selection.getRng(),t.getBody(),t.schema);t.selection.setRng(AT(e))},Lq=t=>{t.on("mousedown",e=>{e.detail>=3&&(e.preventDefault(),VI(t))})};var Ub;(function(t){t.Before="before",t.After="after"})(Ub||(Ub={}));const Hq=(t,e)=>Math.abs(t.left-e),sC=(t,e)=>Math.abs(t.right-e),zq=(t,e)=>t>=e.top&&t<=e.bottom,Vq=(t,e)=>t.top<e.bottom&&t.bottom>e.top,UI=(t,e)=>{const n=Rw(t,e)/Math.min(t.height,e.height);return Vq(t,e)&&n>.5},Uq=(t,e)=>{const n=st(t,r=>zq(e,r));return Op(n).fold(()=>[[],t],r=>{const{pass:i,fail:u}=Ct(t,g=>UI(g,r));return[i,u]})},Wq=(t,e)=>({node:t.node,position:Hq(t,e)<sC(t,e)?Ub.Before:Ub.After}),Zq=(t,e,n)=>e>t.left&&e<t.right?0:Math.min(Math.abs(t.left-e),Math.abs(t.right-e)),uO=(t,e,n,r)=>{const i=D=>Mn(D.node)?F.some(D):jt(D.node)?uO(Wr(D.node.childNodes),e,n,!1):F.none(),u=(D,R,N)=>i(R).filter(H=>Math.abs(N(D,e,n)-N(H,e,n))<2&&Nt(H.node)),g=(D,R)=>{const N=ad(D,(H,$)=>R(H,e,n)-R($,e,n));return iu(N,i).map(H=>r&&!Nt(H.node)&&N.length>1?u(H,N[1],R).getOr(H):H)},[b,x]=Uq(q6(t),n),{pass:w,fail:E}=Ct(x,D=>D.top<n);return g(b,Zq).orThunk(()=>g(E,_2)).orThunk(()=>g(w,_2))},jq=(t,e,n,r)=>{const i=(u,g)=>{const b=w=>jt(w)&&w.classList.contains("mce-drag-container"),x=st(u.dom.childNodes,Go(b));return g.fold(()=>uO(x,n,r,!0),w=>{const E=st(x,D=>D!==w.dom);return uO(E,n,r,!0)}).orThunk(()=>(ho(u,t)?F.none():Yi(u)).bind(E=>i(E,F.some(u))))};return i(e,F.none())},v4=(t,e,n)=>{const r=Z.fromDom(t),i=Bc(r),g=Z.fromPoint(i,e,n).filter(b=>_i(r,b)).getOr(r);return jq(r,g,e,n)},dO=(t,e,n)=>v4(t,e,n).filter(r=>oh(r.node)).map(r=>Wq(r,e)),mO=t=>{const e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,i=n.defaultView;return{top:e.top+((i==null?void 0:i.scrollY)??0)-r.clientTop,left:e.left+((i==null?void 0:i.scrollX)??0)-r.clientLeft}},Gq=t=>t.inline?mO(t.getBody()):{left:0,top:0},qq=t=>{const e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}},Kq=t=>{const e=t.getBody(),n=t.getDoc().documentElement,r={left:e.scrollLeft,top:e.scrollTop},i={left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop};return t.inline?r:i},DX=(t,e)=>{if(e.target.ownerDocument!==t.getDoc()){const n=mO(t.getContentAreaContainer()),r=Kq(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}},Yq=(t,e,n)=>({pageX:n.left-t.left+e.left,pageY:n.top-t.top+e.top}),Xq=(t,e)=>Yq(Gq(t),qq(t),DX(t,e)),y4=t=>({target:t,srcElement:t}),C4=(t,e,n,r)=>({...e,dataTransfer:r,type:t,...y4(n)}),Jq=(t,e,n)=>{const r=ps("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,timeStamp:0,type:t,composedPath:r,initEvent:r,preventDefault:_e,stopImmediatePropagation:_e,stopPropagation:_e,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,layerX:0,layerY:0,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:r,initMouseEvent:r,getModifierState:r,dataTransfer:n,...y4(e)}},Qq=(t,e)=>{const n=hj(t);return e==="dragstart"?(ZN(n),SD(n)):e==="drop"?(mj(n),X3(n)):(gj(n),kD(n)),n},tK=(t,e,n,r)=>{const i=Qq(n,t);return Gn(r)?Jq(t,e,i):C4(t,r,e,i)},gO=32,eK=100,Wb=8,rC=16,WI=On,oK=S2(WI,Pa),ZI=(t,e,n)=>WI(n)&&n!==e&&t.isEditable(n.parentElement),nK=(t,e,n)=>so(e)||e===n||t.dom.isChildOf(e,n)?!1:t.dom.isEditable(e),OX=(t,e,n,r)=>{const i=t.dom,u=e.cloneNode(!0);i.setStyles(u,{width:n,height:r}),i.setAttrib(u,"data-mce-selected",null);const g=i.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return i.setStyles(g,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),i.setStyles(u,{margin:0,boxSizing:"border-box"}),g.appendChild(u),g},sK=(t,e)=>{t.parentNode!==e&&e.appendChild(t)},w4=(t,e)=>n=>()=>{const r=t==="left"?n.scrollX:n.scrollY;n.scroll({[t]:r+e,behavior:"smooth"})},jI=w4("left",-32),fO=w4("left",gO),_4=w4("top",-32),aC=w4("top",gO),GI=(t,e,n,r,i,u,g,b,x,w,E,D)=>{let R=0,N=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>
47i&&(R=e.pageX+n-i),e.pageY+r>u&&(N=e.pageY+r-u),t.style.width=n-R+"px",t.style.height=r-N+"px";const H=x.clientHeight,$=x.clientWidth,U=g+x.getBoundingClientRect().top,J=b+x.getBoundingClientRect().left;E.on(Q=>{Q.intervalId.clear(),Q.dragging&&D&&(g+Wb>=H?Q.intervalId.set(aC(w)):g-Wb<=0?Q.intervalId.set(_4(w)):b+Wb>=$?Q.intervalId.set(fO(w)):b-Wb<=0?Q.intervalId.set(jI(w)):U+rC>=window.innerHeight?Q.intervalId.set(aC(window)):U-rC<=0?Q.intervalId.set(_4(window)):J+rC>=window.innerWidth?Q.intervalId.set(fO(window)):J-rC<=0&&Q.intervalId.set(jI(window)))})},qI=t=>{t&&t.parentNode&&t.parentNode.removeChild(t)},rK=(t,e)=>{const n=t.getParent(e.parentNode,t.isBlock);qI(e),n&&n!==t.getRoot()&&t.isEmpty(n)&&Td(Z.fromDom(n))},aK=t=>t.button===0,iK=(t,e)=>({pageX:e.pageX-t.relX,pageY:e.pageY+5}),KI=(t,e)=>n=>{if(aK(n)){const r=Xo(e.dom.getParents(n.target),oK).getOr(null);if(mt(r)&&ZI(e.dom,e.getBody(),r)){const i=e.dom.getPos(r),u=e.getBody(),g=e.getDoc().documentElement;t.set({element:r,dataTransfer:Mb(),dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(e.inline?u.scrollWidth:g.offsetWidth)-2,maxY:(e.inline?u.scrollHeight:g.offsetHeight)-2,relX:n.pageX-i.x,relY:n.pageY-i.y,width:r.offsetWidth,height:r.offsetHeight,ghost:OX(e,r,r.offsetWidth,r.offsetHeight),intervalId:ek(eK)})}}},cK=(t,e,n)=>{t._selectionOverrides.hideFakeCaret(),dO(t.getBody(),e,n).fold(()=>t.selection.placeCaretAt(e,n),r=>{const i=t._selectionOverrides.showCaret(1,r.node,r.position===Ub.Before,!1);i?t.selection.setRng(i):t.selection.placeCaretAt(e,n)})},Zb=(t,e,n,r,i)=>{e==="dragstart"&&JN(r,t.dom.getOuterHTML(n));const u=tK(e,n,r,i);return t.dispatch(e,u)},lK=(t,e)=>{const n=oe((i,u)=>cK(e,i,u),0);e.on("remove",n.cancel);const r=t;return i=>t.on(u=>{const g=Math.max(Math.abs(i.screenX-u.screenX),Math.abs(i.screenY-u.screenY));if(!u.dragging&&g>10){const b=Zb(e,"dragstart",u.element,u.dataTransfer,i);if(mt(b.dataTransfer)&&(u.dataTransfer=b.dataTransfer),b.isDefaultPrevented())return;u.dragging=!0,e.focus()}if(u.dragging){const b=i.currentTarget===e.getDoc().documentElement,x=iK(u,Xq(e,i));sK(u.ghost,e.getBody()),GI(u.ghost,x,u.width,u.height,u.maxX,u.maxY,i.clientY,i.clientX,e.getContentAreaContainer(),e.getWin(),r,b),n.throttle(i.clientX,i.clientY)}})},uK=t=>{const e=t.getSel();if(mt(e)){const r=e.getRangeAt(0).startContainer;return Nt(r)?r.parentNode:r}else return null},pO=(t,e)=>n=>{t.on(r=>{if(r.intervalId.clear(),r.dragging){if(nK(e,uK(e.selection),r.element)){const i=e.getDoc().elementFromPoint(n.clientX,n.clientY)??e.getBody();Zb(e,"drop",i,r.dataTransfer,n).isDefaultPrevented()||e.undoManager.transact(()=>{rK(e.dom,r.element),XN(r.dataTransfer).each(g=>e.insertContent(g)),e._selectionOverrides.hideFakeCaret()})}Zb(e,"dragend",e.getBody(),r.dataTransfer,n)}}),YI(t)},hO=(t,e,n)=>{t.on(r=>{r.intervalId.clear(),r.dragging&&n.fold(()=>Zb(e,"dragend",r.element,r.dataTransfer),i=>Zb(e,"dragend",r.element,r.dataTransfer,i))}),YI(t)},RX=(t,e)=>n=>hO(t,e,F.some(n)),YI=t=>{t.on(e=>{e.intervalId.clear(),qI(e.ghost)}),t.clear()},XI=t=>{const e=Gi(),n=vo.DOM,r=document,i=KI(e,t),u=lK(e,t),g=pO(e,t),b=RX(e,t);t.on("mousedown",i),t.on("mousemove",u),t.on("mouseup",g),n.bind(r,"mousemove",u),n.bind(r,"mouseup",b),t.on("remove",()=>{n.unbind(r,"mousemove",u),n.unbind(r,"mouseup",b)}),t.on("keydown",x=>{x.keyCode===Qt.ESC&&hO(e,t,F.none())})},dK=t=>{const e=i=>{if(!i.isDefaultPrevented()){const u=i.dataTransfer;u&&(xt(u.types,"Files")||u.files.length>0)&&(i.preventDefault(),i.type==="drop"&&l3(t,"Dropped file type is not supported"))}},n=i=>{sS(t,i.target)&&e(i)},r=()=>{const i=vo.DOM,u=t.dom,g=document,b=t.inline?t.getBody():t.getDoc(),x=["drop","dragover"];Y(x,w=>{i.bind(g,w,n),u.bind(b,w,e)}),t.on("remove",()=>{Y(x,w=>{i.unbind(g,w,n),u.unbind(b,w,e)})})};t.on("init",()=>{Vl.setEditorTimeout(t,r,0)})},bO=t=>{XI(t),LE(t)&&dK(t)},mK=t=>{const e=oe(()=>{if(!t.removed&&t.getBody().contains(document.activeElement)){const n=t.selection.getRng();if(n.collapsed){const r=lg(t,n,!1);t.selection.setRng(r)}}},0);t.on("focus",()=>{e.throttle()}),t.on("blur",()=>{e.cancel()})},gK=t=>{t.on("init",()=>{t.on("focusin",e=>{const n=e.target;if(Bi(n)){const r=Wu(t.getBody(),n),i=On(r)?r:n;t.selection.getNode()!==i&&Xd(t,i).each(u=>t.selection.setRng(u))}})})},iC=On,xO=(t,e)=>Wu(t.getBody(),e),S4=t=>{const e=t.selection,n=t.dom,r=t.getBody(),i=ze(t,r,n.isBlock,()=>eb(t)),u="sel-"+n.uniqueId(),g="data-mce-selected";let b;const x=ht=>mt(ht)&&n.hasClass(ht,"mce-offscreen-selection"),w=ht=>ht!==r&&(iC(ht)||Bi(ht))&&n.isChildOf(ht,r)&&n.isEditable(ht.parentNode),E=ht=>{ht&&e.setRng(ht)},D=(ht,it,bt,qt=!0)=>t.dispatch("ShowCaret",{target:it,direction:ht,before:bt}).isDefaultPrevented()?null:(qt&&e.scrollIntoView(it,ht===-1),i.show(bt,it)),R=ht=>{ht.hasAttribute("data-mce-caret")&&(lc(ht),e.scrollIntoView(ht))},N=()=>{t.on("click",it=>{n.isEditable(it.target)||(it.preventDefault(),t.focus())}),t.on("blur NewBlock",St),t.on("ResizeWindow FullscreenStateChanged",i.reposition),t.on("tap",it=>{const bt=it.target,qt=xO(t,bt);iC(qt)?(it.preventDefault(),Xd(t,qt).each(ft)):w(bt)&&Xd(t,bt).each(ft)},!0),t.on("mousedown",it=>{const bt=it.target;if(bt!==r&&bt.nodeName!=="HTML"&&!n.isChildOf(bt,r)||!JV(t,it.clientX,it.clientY))return;St(),ge();const qt=xO(t,bt);iC(qt)?(it.preventDefault(),Xd(t,qt).each(ft)):dO(r,it.clientX,it.clientY).each(De=>{it.preventDefault();const Oe=D(1,De.node,De.position===Ub.Before,!1);E(Oe),fa(qt)?qt.focus():t.getBody().focus()})}),t.on("keypress",it=>{Qt.modifierPressed(it)||iC(e.getNode())&&it.preventDefault()}),t.on("GetSelectionRange",it=>{let bt=it.range;if(b){if(!b.parentNode){b=null;return}bt=bt.cloneRange(),bt.selectNode(b),it.range=bt}}),t.on("focusin",it=>{if(!Bi(it.target)&&t.getBody().contains(it.target)&&it.target!==t.getBody()&&!t.dom.isEditable(it.target.parentNode)){i.isShowing()&&i.hide(),it.target.contains(t.selection.getNode())||(t.selection.select(it.target,!0),t.selection.collapse(!0));const bt=ft(t.selection.getRng(),!0);bt&&t.selection.setRng(bt)}}),t.on("SetSelectionRange",it=>
47{it.range=U(it.range);const bt=ft(it.range,it.forward);bt&&(it.range=bt)});const ht=it=>jt(it)&&it.id==="mcepastebin";t.on("AfterSetSelectionRange",it=>{const bt=it.range,qt=bt.startContainer.parentElement;!$(bt)&&!ht(qt)&&ge(),x(qt)||St()}),bO(t),mK(t),gK(t)},H=ht=>ci(ht)||Va(ht)||Dd(ht),$=ht=>H(ht.startContainer)||H(ht.endContainer),U=ht=>{const it=t.schema.getVoidElements(),bt=n.createRng(),qt=ht.startContainer,De=ht.startOffset,Oe=ht.endContainer,Co=ht.endOffset;return Xe(it,qt.nodeName.toLowerCase())?De===0?bt.setStartBefore(qt):bt.setStartAfter(qt):bt.setStart(qt,De),Xe(it,Oe.nodeName.toLowerCase())?Co===0?bt.setEndBefore(Oe):bt.setEndAfter(Oe):bt.setEnd(Oe,Co),bt},J=(ht,it)=>{const bt=Z.fromDom(t.getBody()),qt=t.getDoc(),De=kl(bt,"#"+u).getOrThunk(()=>{const Yo=Z.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',qt);return qn(Yo,"id",u),Ro(bt,Yo),Yo}),Oe=n.createRng();tc(De),Ei(De,[Z.fromText(Bs,qt),Z.fromDom(it),Z.fromText(Bs,qt)]),Oe.setStart(De.dom.firstChild,1),Oe.setEnd(De.dom.lastChild,0),Ti(De,{top:n.getPos(ht,t.getBody()).y+"px"}),g1(De);const Co=e.getSel();return Co&&(Co.removeAllRanges(),Co.addRange(Oe)),Oe},Q=ht=>{const it=t.getDoc().createElement("div");it.style.width=ht.style.width,it.style.height=ht.style.height;const bt=ht.getAttribute("width");bt&&it.setAttribute("width",bt);const qt=ht.getAttribute("height");return qt&&it.setAttribute("height",qt),it},et=ht=>{const it=fp(ht)?Q(ht):ht.cloneNode(!0),bt=t.dispatch("ObjectSelected",{target:ht,targetClone:it});if(bt.isDefaultPrevented())return null;const qt=J(ht,bt.targetClone),De=Z.fromDom(ht);return Y(dr(Z.fromDom(t.getBody()),`*[${g}]`),Oe=>{ho(De,Oe)||As(Oe,g)}),n.getAttrib(ht,g)||ht.setAttribute(g,"1"),b=ht,ge(),qt},ft=(ht,it)=>{if(!ht)return null;if(ht.collapsed){if(!$(ht)){const Oe=it?1:-1,Co=zd(Oe,r,ht),Yo=Co.getNode(!it);if(mt(Yo)){if(oh(Yo))return D(Oe,Yo,it?!Co.isAtEnd():!1,!1);if(Uc(Yo)&&On(Yo.nextSibling)){const In=n.createRng();return In.setStart(Yo,0),In.setEnd(Yo,0),In}}const _n=Co.getNode(it);if(mt(_n)){if(oh(_n))return D(Oe,_n,it?!1:!Co.isAtEnd(),!1);if(Uc(_n)&&On(_n.previousSibling)){const In=n.createRng();return In.setStart(_n,1),In.setEnd(_n,1),In}}}return null}let bt=ht.startContainer,qt=ht.startOffset;const De=ht.endOffset;if(Nt(bt)&&qt===0&&iC(bt.parentNode)&&(bt=bt.parentNode,qt=n.nodeIndex(bt),bt=bt.parentNode),!jt(bt))return null;if(De===qt+1&&bt===ht.endContainer){const Oe=bt.childNodes[qt];if(w(Oe))return et(Oe)}return null},St=()=>{b&&b.removeAttribute(g),kl(Z.fromDom(t.getBody()),"#"+u).each(xn),b=null},Gt=()=>{i.destroy(),b=null},ge=()=>{i.hide()};return Yu(t)||N(),{showCaret:D,showBlockCaretContainer:R,hideFakeCaret:ge,destroy:Gt}},JI=(t,e)=>{let n=e;for(let r=t.previousSibling;Nt(r);r=r.previousSibling)n+=r.data.length;return n},vO=(t,e,n,r,i)=>{if(Nt(n)&&(r<0||r>n.data.length))return[];const u=i&&Nt(n)?[JI(n,r)]:[r];let g=n;for(;g!==e&&g.parentNode;)u.push(t.nodeIndex(g,i)),g=g.parentNode;return g===e?u.reverse():[]},yO=(t,e,n,r,i,u,g=!1)=>{const b=vO(t,e,n,r,g),x=vO(t,e,i,u,g);return{start:b,end:x}},QI=(t,e)=>{const n=e.slice(),r=n.pop();return sr(r)?We(n,(u,g)=>u.bind(b=>F.from(b.childNodes[g])),F.some(t)).bind(u=>Nt(u)&&(r<0||r>u.data.length)?F.none():F.some({node:u,offset:r})):F.none()},CO=(t,e)=>QI(t,e.start).bind(({node:n,offset:r})=>QI(t,e.end).map(({node:i,offset:u})=>{const g=document.createRange();return g.setStart(n,r),g.setEnd(i,u),g})),fK=(t,e,n,r=!1)=>yO(t,e,n.startContainer,n.startOffset,n.endContainer,n.endOffset,r),jb=(t,e,n)=>{if(e&&t.isEmpty(e)&&!n(e)){const r=e.parentNode;t.remove(e,Nt(e.firstChild)&&Bg(e.firstChild.data)),jb(t,r,n)}},k4=(t,e,n,r=!0)=>{const i=e.startContainer.parentNode,u=e.endContainer.parentNode;e.deleteContents(),r&&!n(e.startContainer)&&(Nt(e.startContainer)&&e.startContainer.data.length===0&&t.remove(e.startContainer),Nt(e.endContainer)&&e.endContainer.data.length===0&&t.remove(e.endContainer),jb(t,i,n),i!==u&&jb(t,u,n))},Gb=(t,e)=>F.from(t.dom.getParent(e.startContainer,t.dom.isBlock)),wO=(t,e,n)=>{const r=t.dynamicPatternsLookup({text:n,block:e});return{...t,blockPatterns:_E(r).concat(t.blockPatterns),inlinePatterns:zp(r).concat(t.inlinePatterns)}},_O=(t,e,n,r)=>{const i=t.createRng();return i.setStart(e,0),i.setEnd(n,r),i.toString()},t$=(t,e)=>t.create("span",{"data-mce-type":"bookmark",id:e}),E4=(t,e)=>{const n=t.createRng();return n.setStartAfter(e.start),n.setEndBefore(e.end),n},e$=(t,e,n)=>{const r=CO(t.getRoot(),n).getOrDie("Unable to resolve path range"),i=r.startContainer,u=r.endContainer,g=r.endOffset===0?u:u.splitText(r.endOffset),b=r.startOffset===0?i:i.splitText(r.startOffset),x=b.parentNode,w=g.parentNode;return{prefix:e,end:w.insertBefore(t$(t,e+"-end"),g),start:x.insertBefore(t$(t,e+"-start"),b)}},o$=(t,e,n)=>{jb(t,t.get(e.prefix+"-end"),n),jb(t,t.get(e.prefix+"-start"),n)},cC=t=>t.start.length===0,pK=t=>(e,n)=>{const i=e.data.substring(0,n),u=i.lastIndexOf(t.charAt(t.length-1)),g=i.lastIndexOf(t);return g!==-1?g+t.length:u!==-1?u+1:-1},n$=(t,e,n,r)=>{const i=e.start;return PD(t,r.container,r.offset,pK(i),n).bind(g=>{var w;const b=((w=n.textContent)==null?void 0:w.indexOf(i))??-1;if(b!==-1&&g.offset>=b+i.length){const E=t.createRng();return E.setStart(g.container,g.offset-i.length),E.setEnd(g.container,g.offset),F.some(E)}else{const E=g.offset-i.length;return MD(g.container,E,n).map(D=>{const R=t.createRng();return R.setStart(D.container,D.offset),R.setEnd(g.container,g.offset),R}).filter(D=>D.toString()===i).orThunk(()=>n$(t,e,n,nd(g.container,0)))}})},hK=(t,e,n,r,i,u=!1)=>
47{if(e.start.length===0&&!u){const g=t.createRng();return g.setStart(n,r),g.setEnd(n,r),F.some(g)}return BD(n,r,i).bind(g=>n$(t,e,i,g).bind(x=>{var w;if(u){if(x.endContainer===g.container&&x.endOffset===g.offset)return F.none();if(g.offset===0&&((w=x.endContainer.textContent)==null?void 0:w.length)===x.endOffset)return F.none()}return F.some(x)}))},s$=(t,e,n,r)=>{const i=t.dom,u=i.getRoot(),g=n.pattern,b=n.position.container,x=n.position.offset;return MD(b,x-n.pattern.end.length,e).bind(w=>{const E=yO(i,u,w.container,w.offset,b,x,r);if(cC(g))return F.some({matches:[{pattern:g,startRng:E,endRng:E}],position:w});{const D=A4(t,n.remainingPatterns,w.container,w.offset,e,r),R=D.getOr({matches:[],position:w}),N=R.position;return hK(i,g,N.container,N.offset,e,D.isNone()).map($=>{const U=fK(i,u,$,r);return{matches:R.matches.concat([{pattern:g,startRng:U,endRng:E}]),position:nd($.startContainer,$.startOffset)}})}})},A4=(t,e,n,r,i,u)=>{const g=t.dom;return BD(n,r,g.getRoot()).bind(b=>{const x=_O(g,i,n,r);for(let w=0;w<e.length;w++){const E=e[w];if(!ma(x,E.end))continue;const D=e.slice();D.splice(w,1);const R=s$(t,i,{pattern:E,remainingPatterns:D,position:b},u);if(R.isNone()&&r>0)return A4(t,e,n,r-1,i,u);if(R.isSome())return R}return F.none()})},r$=(t,e,n)=>{t.selection.setRng(n),e.type==="inline-format"?Y(e.format,r=>{t.formatter.apply(r)}):t.execCommand(e.cmd,!1,e.value)},bK=(t,e,n,r)=>{const i=E4(t.dom,n);k4(t.dom,i,r),r$(t,e,i)},xK=(t,e,n,r,i)=>{const u=t.dom,g=E4(u,r),b=E4(u,n);k4(u,b,i),k4(u,g,i);const x={prefix:n.prefix,start:n.end,end:r.start},w=E4(u,x);r$(t,e,w)},vK=(t,e)=>{const n=da("mce_textpattern"),r=Je(e,(i,u)=>{const g=e$(t,n+`_end${i.length}`,u.endRng);return i.concat([{...u,endMarker:g}])},[]);return Je(r,(i,u)=>{const g=r.length-i.length-1,b=cC(u.pattern)?u.endMarker:e$(t,n+`_start${g}`,u.startRng);return i.concat([{...u,startMarker:b}])},[])},yK=t=>ad(t,(e,n)=>n.end.length-e.end.length),CK=(t,e)=>{const n=au(t,r=>$t(e,i=>r.pattern.start===i.pattern.start&&r.pattern.end===i.pattern.end));return t.length===e.length?n?t:e:t.length>e.length?t:e},a$=(t,e,n,r,i,u)=>{const g=A4(t,i.inlinePatterns,n,r,e,u).fold(()=>[],x=>x.matches),b=A4(t,yK(i.inlinePatterns),n,r,e,u).fold(()=>[],x=>x.matches);return CK(g,b)},SO=(t,e)=>{if(e.length===0)return;const n=t.dom,r=t.selection.getBookmark(),i=vK(n,e);Y(i,u=>{const g=n.getParent(u.startMarker.start,n.isBlock),b=x=>x===g;cC(u.pattern)?bK(t,u.pattern,u.endMarker,b):xK(t,u.pattern,u.startMarker,u.endMarker,b),o$(n,u.endMarker,b),o$(n,u.startMarker,b)}),t.selection.moveToBookmark(r)},i$=(t,e,n)=>FD(e,0,e).map(r=>{const i=r.container;return ND(i,n.start.length,e).each(u=>{const g=t.createRng();g.setStart(i,0),g.setEnd(u.container,u.offset),k4(t,g,b=>b===e)}),i}),T4=t=>(e,n)=>{const r=e.dom,i=n.pattern,u=CO(r.getRoot(),n.range).getOrDie("Unable to resolve path range"),g=(b,x)=>{const w=x.get(b);return lo(w)&&Vs(w).exists(E=>Xe(E,"block"))};return Gb(e,u).each(b=>{i.type==="block-format"?g(i.format,e.formatter)&&e.undoManager.transact(()=>{t(e.dom,b,i),e.formatter.apply(i.format)}):i.type==="block-command"&&e.undoManager.transact(()=>{t(e.dom,b,i),e.execCommand(i.cmd,!1,i.value)})}),!0},wK=t=>ad(t,(e,n)=>n.start.length-e.start.length),c$=t=>
47(e,n)=>{const r=wK(e),i=n.replace(Bs," ");return Xo(r,u=>t(u,n,i))},l$=(t,e)=>(n,r,i,u,g=r.textContent??"")=>{const b=n.dom,x=ws(n);return b.is(r,x)?t(i.blockPatterns,g).map(w=>e&&Mt.trim(g).length===w.start.length?[]:[{pattern:w,range:yO(b,b.getRoot(),r,0,r,0,u)}]).getOr([]):[]},_K=t=>/^\s[^\s]/.test(t),SK=T4((t,e,n)=>{i$(t,e,n).each(r=>{const i=Z.fromDom(r),u=$r(i);_K(u)&&Ix(i,u.slice(1))})}),D4=c$((t,e,n)=>e.indexOf(t.start)===0||n.indexOf(t.start)===0),kK=l$(D4,!0),EK=(t,e)=>{const n=t.selection.getRng();return Gb(t,n).map(r=>{const i=Math.max(0,n.startOffset),u=wO(e,r,r.textContent??""),g=a$(t,r,n.startContainer,i,u,!0),b=kK(t,r,u,!0);return{inlineMatches:g,blockMatches:b}}).filter(({inlineMatches:r,blockMatches:i})=>i.length>0||r.length>0)},AK=(t,e)=>{if(e.length===0)return;const n=t.selection.getBookmark();Y(e,r=>SK(t,r)),t.selection.moveToBookmark(n)},TK=T4(i$),DK=c$((t,e,n)=>e===t.start||n===t.start),OK=l$(DK,!1),RK=(t,e)=>{const n=t.selection.getRng();return Gb(t,n).map(r=>{const i=Math.max(0,n.startOffset),u=_O(t.dom,r,n.startContainer,i),g=wO(e,r,u);return OK(t,r,g,!1,u)}).filter(r=>r.length>0)},BK=(t,e)=>{Y(e,n=>TK(t,n))},FK=(t,e)=>EK(t,e).fold(pt,({inlineMatches:n,blockMatches:r})=>(t.undoManager.add(),t.undoManager.extra(()=>{t.execCommand("mceInsertNewLine")},()=>{J1(t),SO(t,n),AK(t,r);const i=t.selection.getRng(),u=BD(i.startContainer,i.startOffset,t.dom.getRoot());t.execCommand("mceInsertNewLine"),u.each(g=>{const b=g.container;b.data.charAt(g.offset-1)===Kf&&(b.deleteData(g.offset-1,1),jb(t.dom,b.parentNode,x=>x===t.dom.getRoot()))})}),!0)),u$=(t,e)=>{const n=t.selection.getRng();Gb(t,n).map(r=>{const i=Math.max(0,n.startOffset-1),u=_O(t.dom,r,n.startContainer,i),g=wO(e,r,u),b=a$(t,r,n.startContainer,i,g,!1);b.length>0&&t.undoManager.transact(()=>{SO(t,b)})})},MK=(t,e)=>RK(t,e).fold(pt,n=>(t.undoManager.transact(()=>{BK(t,n)}),!0)),kO=(t,e,n)=>{for(let r=0;r<t.length;r++)if(n(t[r],e))return!0;return!1},NK=(t,e)=>kO(t,e,(n,r)=>n===r.keyCode&&!Qt.modifierPressed(r)),PK=(t,e)=>kO(t,e,(n,r)=>n.charCodeAt(0)===r.charCode),d$=t=>{const e=[",",".",";",":","!","?"],n=[32],r=()=>SE(k_(t).filter(g=>g.type==="inline-command"||g.type==="block-command"?t.queryCommandSupported(g.cmd):!0),pe(t)),i=()=>ff(t);t.on("keydown",g=>{if(g.keyCode===13&&!Qt.modifierPressed(g)&&t.selection.isCollapsed()&&t.selection.isEditable()){const b=Vp(r(),"enter");(b.inlinePatterns.length>0||b.blockPatterns.length>0||i())&&FK(t,b)&&g.preventDefault()}},!0),t.on("keydown",g=>{if(g.keyCode===32&&t.selection.isCollapsed()&&t.selection.isEditable()){const b=Vp(r(),"space");(b.blockPatterns.length>0||i())&&MK(t,b)&&g.preventDefault()}},!0);const u=()=>{if(t.selection.isCollapsed()&&t.selection.isEditable()){const g=Vp(r(),"space");(g.inlinePatterns.length>0||i())&&u$(t,g)}};t.on("keyup",g=>{NK(n,g)&&u()}),t.on("keypress",g=>{PK(e,g)&&Vl.setEditorTimeout(t,u)})},lC=t=>{d$(t)},IK=t=>{const e=Mt.each,n=Qt.BACKSPACE,r=Qt.DELETE,i=t.dom,u=t.selection,g=t.parser,b=Oo.browser,x=b.isFirefox(),w=b.isChromium()||b.isSafari(),E=Oo.deviceType.isiPhone()||Oo.deviceType.isiPad(),D=Oo.os.isMacOS()||Oo.os.isiOS(),R=(yt,zt)=>{try{t.getDoc().execCommand(yt,!1,String(zt))}catch{}},N=yt=>yt.isDefaultPrevented(),H=()=>{const yt=re=>{const fo=i.create("body"),Ye=re.cloneContents();return fo.appendChild(Ye),u.serializer.serialize(fo,{format:"html"})},zt=re=>{const fo=yt(re),Ye=i.createRng();Ye.selectNode(t.getBody());const en=yt(Ye);return fo===en};t.on("keydown",re=>{const fo=re.keyCode;if(!N(re)&&(fo===r||fo===n)&&t.selection.isEditable()){const Ye=t.selection.isCollapsed(),en=t.getBody();if(Ye&&!ve(t.schema,en)||!Ye&&!zt(t.selection.getRng()))return;re.preventDefault(),t.setContent(""),en.firstChild&&i.isBlock(en.firstChild)?t.selection.setCursorLocation(en.firstChild,0):t.selection.setCursorLocation(en,0),t.nodeChanged()}})},$=()=>{t.shortcuts.add("meta+a",null,"SelectAll")},U=()=>{t.inline||i.bind(t.getDoc(),"mousedown mouseup",yt=>{var re;let zt;if(yt.target===t.getDoc().documentElement)if(zt=u.getRng(),((re=t.getDoc().getSelection())==null?void 0:re.anchorNode)!==null&&t.getBody().focus(),yt.type==="mousedown"){if(ci(zt.startContainer))return;u.placeCaretAt(yt.clientX,yt.clientY)}else u.setRng(zt)})},J=()=>
47{t.on("keydown",yt=>{if(!N(yt)&&yt.keyCode===n){if(!t.getBody().getElementsByTagName("hr").length)return;if(u.isCollapsed()&&u.getRng().startOffset===0){const zt=u.getNode(),re=zt.previousSibling;if(zt.nodeName==="HR"){i.remove(zt),yt.preventDefault();return}re&&re.nodeName&&re.nodeName.toLowerCase()==="hr"&&(i.remove(re),yt.preventDefault())}}})},Q=()=>{Range.prototype.getClientRects||t.on("mousedown",yt=>{if(!N(yt)&&yt.target.nodeName==="HTML"){const zt=t.getBody();zt.blur(),Vl.setEditorTimeout(t,()=>{zt.focus()})}})},et=()=>{const yt=F0(t);t.on("click",zt=>{const re=zt.target;/^(IMG|HR)$/.test(re.nodeName)&&i.isEditable(re)&&(zt.preventDefault(),t.selection.select(re),t.nodeChanged()),re.nodeName==="A"&&i.hasClass(re,yt)&&re.childNodes.length===0&&i.isEditable(re.parentNode)&&(zt.preventDefault(),u.select(re))})},ft=()=>{const yt=zt=>zt.nodeName==="IMG"&&t.dom.isEditable(zt);t.on("mousedown",zt=>{Us(F.from(zt.clientX),F.from(zt.clientY),(re,fo)=>{var ul;const Ye=t.getDoc().caretPositionFromPoint(re,fo),en=((ul=Ye==null?void 0:Ye.offsetNode)==null?void 0:ul.childNodes[Ye.offset-(Ye.offset>0?1:0)])||(Ye==null?void 0:Ye.offsetNode);if(mt(en)&&yt(en)){const qa=en.getBoundingClientRect();zt.preventDefault(),t.hasFocus()||t.focus(),t.selection.select(en),zt.clientX<qa.left||zt.clientY<qa.top?t.selection.collapse(!0):(zt.clientX>qa.right||zt.clientY>qa.bottom)&&t.selection.collapse(!1)}})})},St=()=>{const yt=()=>{const re=i.getAttribs(u.getStart().cloneNode(!1));return()=>{const fo=u.getStart();fo!==t.getBody()&&(i.setAttrib(fo,"style",null),e(re,Ye=>{fo.setAttributeNode(Ye.cloneNode(!0))}))}},zt=()=>!u.isCollapsed()&&i.getParent(u.getStart(),i.isBlock)!==i.getParent(u.getEnd(),i.isBlock);t.on("keypress",re=>{let fo;return!N(re)&&(re.keyCode===8||re.keyCode===46)&&zt()?(fo=yt(),t.getDoc().execCommand("delete",!1),fo(),re.preventDefault(),!1):!0}),i.bind(t.getDoc(),"cut",re=>{if(!N(re)&&zt()){const fo=yt();Vl.setEditorTimeout(t,()=>{fo()})}})},Gt=()=>{t.on("keydown",yt=>{if(!N(yt)&&yt.keyCode===n&&u.isCollapsed()&&u.getRng().startOffset===0){const zt=u.getNode().previousSibling;if(zt&&zt.nodeName&&zt.nodeName.toLowerCase()==="table")return yt.preventDefault(),!1}return!0})},ge=()=>{t.on("keydown",yt=>{if(N(yt)||yt.keyCode!==Qt.BACKSPACE)return;let zt=u.getRng();const re=zt.startContainer,fo=zt.startOffset,Ye=i.getRoot();let en=re;if(!(!zt.collapsed||fo!==0)){for(;en.parentNode&&en.parentNode.firstChild===en&&en.parentNode!==Ye;)en=en.parentNode;en.nodeName==="BLOCKQUOTE"&&(t.formatter.toggle("blockquote",void 0,en),zt=i.createRng(),zt.setStart(re,0),zt.setEnd(re,0),u.setRng(zt))}})},ht=()=>{const yt=vl("figcaption");t.on("keydown",zt=>{if(zt.keyCode===Qt.LEFT||zt.keyCode===Qt.RIGHT){const re=Z.fromDom(t.selection.getNode());yt(re)&&t.selection.isCollapsed()&&oi(re).bind(fo=>{var Ye;return t.selection.getRng().startOffset===0&&zt.keyCode===Qt.LEFT?ki(fo):t.selection.getRng().endOffset===((Ye=re.dom.textContent)==null?void 0:Ye.length)&&zt.keyCode===Qt.RIGHT?yl(fo):F.none()}).each(fo=>{t.selection.setCursorLocation(fo.dom,0)})}})},it=()=>{const yt=()=>{R("StyleWithCSS",!1),R("enableInlineTableEditing",!1),x_(t)||R("enableObjectResizing",!1)};Kp(t)||t.on("BeforeExecCommand mousedown",yt)},bt=()=>{const yt=()=>{e(i.select("a:not([data-mce-block])"),zt=>{var Ye;let re=zt.parentNode;const fo=i.getRoot();if((re==null?void 0:re.lastChild)===zt){for(;re&&!i.isBlock(re);){if(((Ye=re.parentNode)==null?void 0:Ye.lastChild)!==re||re===fo)return;re=re.parentNode}i.add(re,"br",{"data-mce-bogus":1})}})};t.on("SetContent ExecCommand",zt=>{(zt.type==="setcontent"||zt.command==="mceInsertLink")&&yt()})},qt=()=>{t.on("init",()=>{R("DefaultParagraphSeparator",ws(t))})},De=yt=>
47{const zt=yt.getBody(),re=yt.selection.getRng();return re.startContainer===re.endContainer&&re.startContainer===zt&&re.startOffset===0&&re.endOffset===zt.childNodes.length},Oe=()=>{t.on("keyup focusin mouseup",yt=>{!Qt.modifierPressed(yt)&&!De(t)&&u.normalize()},!0)},Co=()=>{t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},Yo=()=>{t.inline||t.on("keydown",()=>{document.activeElement===document.body&&t.getWin().focus()})},_n=()=>{t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",yt=>{let zt;yt.target.nodeName==="HTML"&&(zt=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(zt),t.selection.normalize(),t.nodeChanged())}))},In=()=>{D&&t.on("keydown",yt=>{Qt.metaKeyPressed(yt)&&!yt.shiftKey&&(yt.keyCode===37||yt.keyCode===39)&&(yt.preventDefault(),t.selection.getSel().modify("move",yt.keyCode===37?"backward":"forward","lineboundary"))})},vr=()=>{t.on("click",yt=>{let zt=yt.target;do if(zt.tagName==="A"){yt.preventDefault();return}while(zt=zt.parentNode)}),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},zi=()=>{t.on("init",()=>{t.dom.bind(t.getBody(),"submit",yt=>{yt.preventDefault()})})},Yt=()=>{g.addNodeFilter("br",yt=>{let zt=yt.length;for(;zt--;)yt[zt].attr("class")==="Apple-interchange-newline"&&yt[zt].remove()})},Ce=_e,Ho=()=>{if(!x||t.removed)return!1;const yt=t.selection.getSel();return!yt||!yt.rangeCount||yt.rangeCount===0},No=()=>{w&&(U(),et(),zi(),$(),E&&(Yo(),_n(),vr())),x&&(Q(),it(),Co(),In())},Fr=()=>{ge(),H(),Oo.windowsPhone||Oe(),w&&(U(),et(),qt(),zi(),Gt(),Yt(),E?(Yo(),_n(),vr()):$()),x&&(ht(),ft(),J(),Q(),St(),it(),bt(),Co(),In(),Gt())};return Yu(t)?No():Fr(),{refreshContentEditable:Ce,isHidden:Ho}};class EO extends Error{constructor(n,r){super(n);Ft(this,"url");this.url=r}}const AO={},$K=(t,e,n)=>new Promise((r,i)=>{const u=Z.fromTag("script");lr(u,{type:"text/javascript",src:t,...n});const g=()=>{xn(u)};Mx(u,"load",()=>{g(),r()}),Mx(u,"error",()=>{g(),i(new Error(`Failed to load script url: ${t}`))}),Ro(HC(e),u)}),m$=async(t,e)=>{const n=$o.ScriptLoader.getScriptAttributes(t);return await $K(t,e,n).catch(()=>Promise.reject(new EO(`Failed to load component url: ${t}`,t))),t},LK=t=>cd(t,(e,n)=>Ln(AO,e).getOrThunk(()=>{if(so(window.customElements.get(n))){const r=m$(e,m1());return AO[e]=r,r}else return Promise.resolve(e)}).catch(r=>(delete AO[e],Promise.reject(r)))),g$=(t,e)=>{const n=id(cu(t));return wt(n,r=>m$(r,Z.fromDom(e)))},HK=t=>{const e=t.schema.getComponentUrls();return t.inline?LK(e):g$(e,t.getDoc())},f$=async t=>{const e=HK(t),n=st(await Promise.allSettled(e),r=>r.status==="rejected");n.length>0&&Y(n,r=>{if(r.reason instanceof EO){const{url:i}=r.reason;oU(t,i)}})},zK=t=>{f$(t)},TO=vo.DOM,VK=(t,e)=>{const n=Z.fromDom(t.getBody()),r=Bx(ar(n)),i=Z.fromTag("style");qn(i,"type","text/css"),Ro(i,Z.fromText(e)),Ro(r,i),t.on("remove",()=>{xn(i)})},UK=t=>t.inline?t.getElement().nodeName.toLowerCase():void 0,DO=t=>Gf(t,e=>Gn(e)===!1),p$=t=>{const e=t.options.get,n=t.editorUpload.blobCache;return DO({allow_conditional_comments:e("allow_conditional_comments"),allow_html_data_urls:e("allow_html_data_urls"),allow_svg_data_urls:e("allow_svg_data_urls"),allow_html_in_named_anchor:e("allow_html_in_named_anchor"),allow_script_urls:e("allow_script_urls"),allow_html_in_comments:e("allow_html_in_comments"),allow_mathml_annotation_encodings:e("allow_mathml_annotation_encodings"),allow_unsafe_link_target:e("allow_unsafe_link_target"),convert_unsafe_embeds:e("convert_unsafe_embeds"),convert_fonts_to_spans:e("convert_fonts_to_spans"),extended_mathml_attributes:e("extended_mathml_attributes"),extended_mathml_elements:e("extended_mathml_elements"),fix_list_elements:e("fix_list_elements"),font_size_legacy_values:e("font_size_legacy_values"),forced_root_block:e("forced_root_block"),forced_root_block_attrs:e("forced_root_block_attrs"),preserve_cdata:e("preserve_cdata"),inline_styles:e("inline_styles"),root_name:UK(t),sandbox_iframes:e("sandbox_iframes"),sandbox_iframes_exclusions:Iu(t),sanitize:e("xss_sanitization"),validate:!0,blob_cache:n,document:t.getDoc()})},h$=t=>{const e=t.options.get;return DO({custom_elements:e("custom_elements"),extended_valid_elements:e("extended_valid_elements"),invalid_elements:e("invalid_elements"),invalid_styles:e("invalid_styles"),schema:e("schema"),valid_children:e("valid_children"),valid_classes:e("valid_classes"),valid_elements:e("valid_elements"),valid_styles:e("valid_styles"),verify_html:e("verify_html"),padd_empty_block_inline_children:e("format_empty_lines")})},WK=t=>{const e=t.options.get;return{...p$(t),...h$(t),...DO({remove_trailing_brs:e("remove_trailing_brs"),pad_empty_with_br:e("pad_empty_with_br"),url_c
47onverter:e("url_converter"),url_converter_scope:e("url_converter_scope"),element_format:e("element_format"),entities:e("entities"),entity_encoding:e("entity_encoding"),indent:e("indent"),indent_after:e("indent_after"),indent_before:e("indent_before")})}},ZK=t=>{const e=lb(p$(t),t.schema);return e.addAttributeFilter("src,href,style,tabindex",(n,r)=>{const i=t.dom,u="data-mce-"+r;let g=n.length;for(;g--;){const b=n[g];let x=b.attr(r);if(x&&!b.attr(u)){if(x.indexOf("data:")===0||x.indexOf("blob:")===0)continue;r==="style"?(x=i.serializeStyle(i.parseStyle(x),b.name),x.length||(x=null),b.attr(u,x),b.attr(r,x)):r==="tabindex"?(b.attr(u,x),b.attr(r,null)):b.attr(u,t.convertURL(x,r,b.name))}}}),e.addNodeFilter("script",n=>{let r=n.length;for(;r--;){const i=n[r],u=i.attr("type")||"no/type";u.indexOf("mce-")!==0&&i.attr("type","mce-"+u)}}),lv(t)&&e.addNodeFilter("#cdata",n=>{let r=n.length;for(;r--;){const i=n[r];i.type=8,i.name="#comment",i.value="[CDATA["+t.dom.encode(i.value??"")+"]]"}}),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",n=>{let r=n.length;const i=t.schema.getNonEmptyElements();for(;r--;){const u=n[r];u.isEmpty(i)&&u.getAll("br").length===0&&u.append(new hr("br",1))}}),e},b$=t=>{const e=zE(t);e&&Vl.setEditorTimeout(t,()=>{let n;e===!0?n=t:n=t.editorManager.get(e),n&&!n.destroyed&&(n.focus(),n.selection.scrollIntoView())},100)},OO=t=>{const e=t.dom.getRoot();!t.inline&&(!Dv(t)||t.selection.getStart(!0)===e)&&v(e).each(n=>{const r=n.getNode(),i=pa(r)?v(r).getOr(n):n;t.selection.setRng(i.toRange())})},x$=t=>{t.bindPendingEventDelegates(),t.initialized=!0,Xw(t),t.focus(!0),OO(t),t.nodeChanged({initial:!0});const e=HE(t);X(e)&&e.call(t,t),b$(t),rg(t)&&NF(t,!0)},O4=t=>t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader,jK=(t,e,n)=>{const{pass:r,fail:i}=Ct(e,b=>tinymce.Resource.has(Bf(b))),g=[...r.map(b=>{const x=tinymce.Resource.get(Bf(b));return q(x)?Promise.resolve(O4(t).loadRawCss(b,x)):Promise.resolve()}),O4(t).loadAll(i)];return t.inline?g:g.concat([t.ui.styleSheetLoader.loadAll(n)])},v$=t=>{const e=O4(t),n=tv(t),r=t.contentCSS,i=()=>{e.unloadAll(r),t.inline||t.ui.styleSheetLoader.unloadAll(n)},u=()=>{t.removed?i():t.on("remove",i)};if(t.contentStyles.length>0){let x="";Mt.each(t.contentStyles,w=>{x+=w+`\r 48`}),t.dom.addStyle(x)}const g=Promise.all(jK(t,r,n)).then(u).catch(u),b=zm(t);return b&&VK(t,b),g},GK=t=>{const e=t.getDoc(),n=t.getBody();Yw(t),__(t)||(e.body.spellcheck=!1,TO.setAttrib(n,"spellcheck","false")),t.quirks=IK(t),Bo(t);const r=RE(t);r!==void 0&&(n.dir=r);const i=VE(t);i&&t.on("BeforeSetContent",u=>{Mt.each(i,g=>{u.content=u.content.replace(g,b=>"<!--mce:protected "+escape(b)+"-->")})}),t.on("SetContent",()=>{t.addVisual(t.getBody())}),t.on("compositionstart compositionend",u=>{t.composing=u.type==="compositionstart"})},y$=t=>{Yu(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})},R4=t=>{t.removed!==!0&&(y$(t),x$(t))},qK=t=>{let e=!1;const n=setTimeout(()=>{e||t.setProgressState(!0)},500);return()=>{clearTimeout(n),e=!0,t.setProgressState(!1)}},C$=t=>{const e=t.getElement();let n=t.getDoc();t.inline&&(TO.addClass(e,"mce-content-body"),t.contentDocument=n=document,t.contentWindow=window,t.bodyElement=e,t.contentAreaContainer=e);const r=t.getBody();r.disabled=!0,t.readonly=Kp(t),t._editableRoot=B0(t),!fc(t)&&t.hasEditableRoot()&&(t.inline&&TO.getStyle(r,"position",!0)==="static"&&(r.style.position="relative"),r.contentEditable="true"),r.disabled=!1,t.editorUpload=Ah(t),t.schema=mr(h$(t)),t.dom=vo(n,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,update_styles:!0,root_element:t.inline?t.getBody():null,collect:t.inline,schema:t.schema,contentCssCors:p_(t),referrerPolicy:A0(t),crossOrigin:Hm(t),onSetAttrib:g=>{t.dispatch("SetAttrib",g)}}),t.parser=ZK(t),t.serializer=A5(WK(t),t),t.selection=k5(t.dom,t.getWin(),t.serializer,t),t.annotator=DR(t),t.formatter=zF(t),t.undoManager=EU(t),t._nodeChangeDispatcher=new eq(t),t._selectionOverrides=S4(t),an(t),qZ(t),PI(t),JZ(t),Yu(t)||(Lq(t),lC(t));const i=GG(t);uD(t,i),Ql(t),OU(t),Bq(t,i);const u=RV(t);GK(t),zK(t),u.fold(()=>{const g=qK(t);v$(t).then(()=>{R4(t),g()})},g=>{t.setProgressState(!0),v$(t).then(()=>{g().then(b=>{t.setProgressState(!1),R4(t),r3(t)},b=>{t.notificationManager.open({type:"error",text:String(b)}),R4(t),r3(t)})})})},uC=vo.DOM,B4=(t,e,n,r)=>{const i=Z.fromTag("iframe");return r.each(u=>qn(i,"tabindex",u)),lr(i,n),lr(i,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",...Oo.browser.isFirefox()?{title:e}:{}}),si(i,"tox-edit-area__iframe"),i},w$=t=>{let e=K2(t)+"<html><head>";Y2(t)!==t.editorManager.documentBaseURL&&(e+='<base href="'+t.documentBaseURI.getURI()+'" />'),e+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const n=a_(t),r=i_(t),i=t.translate(M0(t)),u=Oo.browser.isFirefox()?"":`aria-label="${i}"`;return c_(t)&&(e+='<meta http-equiv="Content-Security-Policy" content="'+c_(t)+'" />'),e+=`</head><body id="${n}" class="mce-content-body ${r}" data-id="${t.id}" ${u}><br></body></html>`,e},_$=(t,e)=>{const n=M0(t),r=t.translate(n),i=Qi(Z.fromDom(t.getElement()),"tabindex").bind(kC),u=B4(t.id,r,r_(t),i).dom;u.onload=()=>{u.onload=null,t.dispatch("load")},t.contentAreaContainer=e.iframeContainer,t.iframeElement=u,t.iframeHTML=w$(t),uC.add(e.iframeContainer,u)},S$=t=>{const e=t.iframeElement,n=()=>{t.contentDocument=e.contentDocument,C$(t)};if(th(t)||Oo.browser.isFirefox()){const r=t.getDoc();r.open(),r.write(t.iframeHTML),r.close(),n()}else{const r=Mx(Z.fromDom(e),"load",()=>{r.unbind(),n()});e.srcdoc=t.iframeHTML}},KK=(t,e)=>{_$(t,e),e.editorContainer&&(e.editorContainer.style.display=t.orgDisplay,t.hidden=uC.isHidden(e.editorContainer)),t.getElement().style.display="none",uC.setAttrib(t.id,"aria-hidden","true"),t.getElement().style.visibility=t.orgVisibility,S$(t)},k$=vo.DOM,YK=(t,e,n)=>{const r=Rf.get(n),i=Rf.urls[n]||t.editorManager.documentBaseURL.replace(/\/$/,"");if(n=Mt.trim(n),r&&Mt.inArray(e,n)===-1){if(t.plugins[n])return;try{const u=r(t,i)||{};t.plugins[n]=u,X(u.init)&&(u.init(t,i),e.push(n))}catch(u){nU(t,n,u)}}},XK=t=>{const e=n=>{n.keyCode===Qt.ESC&&!n.defaultPrevented&&s_(t).isDefaultPrevented()&&n.preventDefault()};document.addEventListener("keyup",e),t.inline||t.on("keyup",e),t.on("remove",()=>{document.removeEventListener("keyup",e),t.inline||t.off("keyup",e)})},nm=t=>t.replace(/^\-/,""),E$=t=>{const e=[];Y(Yp(t),n=>{YK(t,e,nm(n))})},JK=t=>{const e=Mt.trim(Gp(t)),n=t.ui.registry.getAll().icons,r={...c3.get("default").icons,...c3.get(e).icons};Do(r,(i,u)=>{Xe(n,u)||t.ui.registry.addIcon(u,i)})},A$=t=>{const e=Nl(t);if(q(e)){const n=Ch.get(e);t.theme=n(t,Ch.urls[e])||{},X(t.theme.init)&&t.theme.init(t,Ch.urls[e]||t.editorManager.documentBaseURL.replace(/\/$/,""))}else t.theme={}},QK=t=>{const e=O0(t),n=xb.get(e);t.model=n(t,xb.urls[e])},tY=t=>{W5.init(t)},RO=t=>{const e=t.theme.renderUI;return e?e():D$(t)},F4=t=>{const e=t.getElement(),r=Nl(t)(t,e);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||t.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||t.id+"_iframecontainer"),r.he
48ight=r.iframeHeight?r.iframeHeight:e.offsetHeight,r},T$=(t,e)=>({editorContainer:t,iframeContainer:e,api:{}}),eY=t=>{const e=k$.create("div");return k$.insertAfter(e,t),T$(e,e)},D$=t=>{const e=t.getElement();return t.inline?T$(null):eY(e)},O$=t=>{const e=t.getElement();return t.orgDisplay=e.style.display,q(Nl(t))?RO(t):X(Nl(t))?F4(t):D$(t)},oY=(t,e)=>{const n={show:F.from(e.show).getOr(_e),hide:F.from(e.hide).getOr(_e),isEnabled:F.from(e.isEnabled).getOr(It),setEnabled:r=>{r&&(t.mode.get()==="readonly"||rg(t))||F.from(e.setEnabled).each(u=>u(r))}};t.ui={...t.ui,...n}},R$=async t=>{t.dispatch("ScriptsLoaded"),JK(t),XK(t),A$(t),QK(t),tY(t),E$(t);const e=await O$(t);oY(t,F.from(e.api).getOr({})),t.editorContainer=e.editorContainer,fU(t),t.inline?C$(t):KK(t,{editorContainer:e.editorContainer,iframeContainer:e.iframeContainer})},zh=vo.DOM,B$=t=>t.charAt(0)==="-",nY=(t,e)=>{const n=h_(e),r=b_(e);if(!za.hasCode(n)&&n!=="en"){const i=ls(r)?r:`${e.editorManager.baseURL}/langs/${n}.js`;t.add(i).catch(()=>{_h(e,i,n)})}},sY=(t,e)=>{const n=Nl(t);
48if(q(n)&&!B$(n)&&!Xe(Ch.urls,n)){const r=v_(t),i=r?t.documentBaseURI.toAbsolute(r):`themes/${n}/theme${e}.js`;Ch.load(n,i).catch(()=>{SF(t,i,n)})}},rY=(t,e)=>{const n=O0(t);if(n!=="plugin"&&!Xe(xb.urls,n)){const r=ME(t),i=q(r)?t.documentBaseURI.toAbsolute(r):`models/${n}/model${e}.js`;xb.load(n,i).catch(()=>{eU(t,i,n)})}},F$=(t,e)=>{W5.load(t,e)},M4=t=>F.from(J2(t)).filter(ls).map(e=>({url:e,name:F.none()})),N4=(t,e,n)=>F.from(e).filter(r=>ls(r)&&!c3.has(r)).map(r=>({url:`${t.editorManager.baseURL}/icons/${r}/icons${n}.js`,name:F.some(r)})),aY=(t,e,n)=>{const r=N4(e,"default",n),i=M4(e).orThunk(()=>N4(e,Gp(e),""));Y(ji([r,i]),u=>{t.add(u.url).catch(()=>{tU(e,u.url,u.name.getOrUndefined())})})},M$=(t,e)=>{const n=(r,i)=>{r!=="licensekeymanager"&&Rf.load(r,i).catch(()=>{_F(t,i,r)})};Do(rv(t),(r,i)=>{n(i,r),t.options.set("plugins",Yp(t).concat(i))}),Y(Yp(t),r=>{r=Mt.trim(r),r&&!Rf.urls[r]&&!B$(r)&&n(r,`plugins/${r}/plugin${e}.js`)})},N$=t=>{const e=Nl(t);return!q(e)||mt(Ch.get(e))},iY=t=>{const e=O0(t);return mt(xb.get(e))},P$=(t,e)=>{const n=$o.ScriptLoader,r=()=>{!t.removed&&N$(t)&&iY(t)&&R$(t)};sY(t,e),rY(t,e),F$(t,e),nY(n,t),aY(n,t,e),M$(t,e),n.loadQueue().then(r,r)},cY=(t,e)=>o2.forElement(t,{contentCssCors:sv(e),referrerPolicy:A0(e)}),lY=t=>{const e=t.id;za.setCode(h_(t));const n=()=>{zh.unbind(window,"ready",n),t.render()};if(!qg.Event.domLoaded){zh.bind(window,"ready",n);return}if(!t.getElement())return;const r=Z.fromDom(t.getElement()),i=uo(r);t.on("remove",()=>{po(r.dom.attributes,g=>As(r,g.name)),lr(r,i)}),t.ui.styleSheetLoader=cY(r,t),qp(t)?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");const u=t.getElement().form||zh.getParent(e,"form");u&&(t.formElement=u,nv(t)&&!Oi(t.getElement())&&(zh.insertAfter(zh.create("input",{type:"hidden",name:e}),e),t.hasHiddenInput=!0),t.formEventDelegate=g=>{t.dispatch(g.type,g)},zh.bind(u,"submit reset",t.formEventDelegate),t.on("reset",()=>{t.resetContent()}),IE(t)&&!u.submit.nodeType&&!u.submit.length&&!u._mceOldSubmit&&(u._mceOldSubmit=u.submit,u.submit=()=>(t.editorManager.triggerSave(),t.setDirty(!1),u._mceOldSubmit(u)))),t.windowManager=wF(t),t.notificationManager=wy(t),A_(t)&&t.on("GetContent",g=>{g.save&&(g.content=zh.encode(g.content))}),$E(t)&&t.on("submit",()=>{t.initialized&&t.save()}),R0(t)&&(t._beforeUnload=()=>{t.initialized&&!t.destroyed&&!t.isHidden()&&t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),P$(t,t.suffix)},I$=["#E41B60","#AD1457","#1939EC","#001CB5","#648000","#465B00","#006CE7","#0054B4","#00838F","#006064","#00866F","#004D40","#51742F","#385021","#CF4900","#A84600","#CC0000","#6A1B9A","#9C27B0","#6A00AB","#3041BA","#0A1877","#774433","#452B24","#607D8B","#455A64"],uY=t=>{var e;return Intl.Segmenter?`${(e=new Intl.Segmenter().segment(t)[Symbol.iterator]().next().value)==null?void 0:e.segment}`:t.trim()[0]},$$=(t,e)=>{let n=5381;for(let r=0;r<t.length;r++)n=(n<<5)+n+t.charCodeAt(r);return(n>>>0)%(e+1)},L$=t=>{const e=$$(t??"",I$.length-1);return I$[e]},H$=(t,e,n)=>{const r=n/2;return`<svg height="${n}" width="${n}" xmlns="http://www.w3.org/2000/svg"><circle cx="${r}" cy="${r}" r="${r}" fill="${e}"/><text x="50%" y="50%" text-anchor="middle" dominant-baseline="central" fill="#FFF" font-family="sans-serif" font-size="${r}">`+t+"</text></svg>"},z$=(t,e,n)=>"data:image/svg+xml,"+encodeURIComponent(H$(t,e,n)),P4=(t,e={size:36})=>z$(uY(t.name),L$(t.id),e.size),V$=ta([Mu("id"),Nd("name"),Nd("avatar"),yo("custom")]),BO=t=>{const e={};return Do(t,(n,r)=>{n.each(i=>{e[r]=i})}),e},U$=t=>{if(!Array.isArray(t))throw new Error("fetch_users must return an array");const e=wt(t,i=>uf("Invalid user object",V$,i)),{errors:n,values:r}=yi(e);if(n.length>0){const i=wt(n,(u,g)=>`User at index ${g}: ${Fl(u)}`);console.warn(`User validation errors: 49`+i.join(` 50`))}return wt(r,i=>{const{id:u,name:g,avatar:b,...x}=i;return{id:u,name:g.getOr(u),avatar:b.getOr(P4({id:u,name:g.getOr(u)})),...BO(x)}})}
50,W$=t=>{const e=new Map,n=new Map,r=w=>F.from(e.get(w)),i=(w,E)=>{e.set(E,w)},u=(w,E)=>F.from(n.get(w)).each(({reject:D})=>{D(E),n.delete(w)}),g=(w,E)=>F.from(n.get(w)).each(({resolve:D})=>{D(E),n.delete(w)}),b=w=>{const E=R_(t);if(Array.isArray(w)){if(!E)return Zf(w,R=>Promise.resolve({id:R,name:R,avatar:P4({id:R,name:R})}))}else return{};const D=id(st(w,R=>!r(R).isSome()));return Y(D,R=>{const N=new Promise((H,$)=>{n.set(R,{resolve:H,reject:$})});i(N,R)}),D.length>0&&E(D).then(U$).then(R=>{const N=new Set(wt(R,H=>H.id));Y(R,H=>g(H.id,H)),Y(D,H=>{N.has(H)||u(H,new Error(`User ${H} not found`))})}).catch(R=>{Y(D,N=>u(N,R instanceof Error?R:new Error("Network error")))}),We(w,(R,N)=>(R[N]=r(N).getOr(Promise.resolve({id:N,name:N,avatar:P4({id:N,name:N})})),R),{})},x=O_(t);return Object.freeze({userId:x,fetchUsers:b})},Z$=t=>W$(t),dY=(t,e)=>{t._editableRoot!==e&&(t._editableRoot=e,rg(t)||(t.getBody().contentEditable=String(t.hasEditableRoot()),t.nodeChanged()),n_(t,e))},mY=t=>t._editableRoot,j$=(t,e)=>({sections:Ut(t),options:Ut(e)}),FO=hl().deviceType,MO=FO.isPhone(),G$=FO.isTablet(),Vh=t=>{if(so(t))return[];{const e=lo(t)?t:t.split(/[ ,]/),n=wt(e,ns);return st(n,ls)}},NO=(t,e)=>{const n=X4(e,(r,i)=>xt(t,i));return j$(n.t,n.f)},I4=(t,e,n={})=>{const r=t.sections(),i=Ln(r,e).getOr({});return Mt.extend({},n,i)},$4=(t,e)=>Xe(t.sections(),e),q$=(t,e)=>$4(t,e)?t.sections()[e]:{},K$=(t,e)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Ln(t,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...e?{menubar:!1}:{}}),PO=(t,e)=>{const n=e.external_plugins??{};return t&&t.external_plugins?Mt.extend({},t.external_plugins,n):n},Y$=(t,e)=>[...Vh(t),...Vh(e)],X$=(t,e,n,r)=>t&&$4(e,"mobile")?r:n,gY=(t,e,n,r)=>{const i=Vh(n.forced_plugins),u=Vh(r.plugins),g=q$(e,"mobile"),b=g.plugins?Vh(g.plugins):u,x=X$(t,e,u,b),w=Y$(i,x);return Mt.extend(r,{forced_plugins:i,plugins:w})},J$=(t,e)=>t&&$4(e,"mobile"),fY=(t,e,n,r,i)=>{const u=t?{mobile:K$(i.mobile??{},e)}:{},g=NO(["mobile"],t1(u,i)),b=Mt.extend(n,r,g.options(),J$(t,g)?I4(g,"mobile"):{},{external_plugins:PO(r,g.options())});return gY(t,g,r,b)},pY=(t,e)=>{const n=cx(e);return fY(MO||G$,MO,n,t,n)},hY=(t,e)=>dF(t,e),Q$=t=>{const e=(r,i)=>{t.formatter.toggle(r,i),t.nodeChanged()},n=r=>()=>{Y("left,center,right,justify".split(","),i=>{r!==i&&t.formatter.remove("align"+i)}),r!=="none"&&e("align"+r)};t.editorCommands.addCommands({JustifyLeft:n("left"),JustifyCenter:n("center"),JustifyRight:n("right"),JustifyFull:n("justify"),JustifyNone:n("none")})},bY=t=>{const e=n=>()=>{const r=t.selection,i=r.isCollapsed()?[t.dom.getParent(r.getNode(),t.dom.isBlock)]:r.getSelectedBlocks();return $t(i,u=>mt(t.formatter.matchNode(u,n)))};t.editorCommands.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify")},"state")},tL=t=>{Q$(t),bY(t)},L4=t=>{t.editorCommands.addCommands({"Cut,Copy,Paste":e=>{const n=t.getDoc();let r;try{n.execCommand(e)}catch{r=!0}if(e==="paste"&&!n.queryCommandEnabled(e)&&(r=!0),r||!n.queryCommandSupported(e)){let i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(Oo.os.isMacOS()||Oo.os.isiOS())&&(i=i.replace(/Ctrl\+/g,"â+")),t.notificationManager.open({text:i,type:"error"})}}})},xY=(t,e,n,r)=>{const i=Z.fromDom(t.getRoot());return Zv(i,gt.fromRangeStart(e),r)?n=n.replace(/^ /," "):n=n.replace(/^ /," "),na(i,gt.fromRangeEnd(e),r)?n=n.replace(/( | )(<br( \/)>)?$/," "):n=n.replace(/ (<br( \/)?>)?$/," "),n},eL=t=>{if(typeof t!="string"){const e=Mt.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}},vY=(t,e)=>{const n=t.selection,r=t.dom;return/^ | $/.test(e)?xY(r,n.getRng(),e,t.schema):e},dC=(t,e)=>{if(t.selection.isEditable()){const{content:n,details:r}=eL(e);cy(t,{...r,content:vY(t,n),format:"html",set:!1,selection:!0}
50).each(i=>{const u=ng(t,i.content,r);qT(t,u,i),t.addVisual()})}},IO=t=>{t.editorCommands.addCommands({mceCleanup:()=>{const e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},insertImage:(e,n,r)=>{dC(t,t.dom.createHTML("img",{src:r}))},insertHorizontalRule:()=>{t.execCommand("mceInsertContent",!1,"<hr>")},insertText:(e,n,r)=>{dC(t,t.dom.encode(r))},insertHTML:(e,n,r)=>{dC(t,r)},mceInsertContent:(e,n,r)=>{dC(t,r)},mceSetContent:(e,n,r)=>{t.setContent(r)},mceReplaceContent:(e,n,r)=>{t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceNewDocument:()=>{t.setContent(ZE(t))}})},yY={"font-size":"size","font-family":"face"},CY=vl("font"),oL=(t,e,n)=>{const r=u=>Ms(u,t).orThunk(()=>CY(u)?Ln(yY,t).bind(g=>Qi(u,g)):F.none()),i=u=>ho(Z.fromDom(e),u);return w1(Z.fromDom(n),u=>r(u),i)},wY=t=>t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,","),_Y=(t,e)=>F.from(vo.DOM.getStyle(e,t,!0)),nL=t=>(e,n)=>F.from(n).map(Z.fromDom).filter(Jn).bind(r=>oL(t,e,r.dom).or(_Y(t,r.dom))).getOr(""),SY=nL("font-size"),kY=k(wY,nL("font-family")),sL=t=>v(t.getBody()).bind(e=>{const n=e.container();return F.from(Nt(n)?n.parentNode:n)}),rL=t=>F.from(t.selection.getRng()).bind(e=>{const n=t.getBody();return e.startContainer===n&&e.startOffset===0?F.none():F.from(t.selection.getStart(!0))}),EY=(t,e)=>rL(t).orThunk(Et(sL,t)).map(Z.fromDom).filter(Jn).bind(e),$O=(t,e)=>EY(t,Fn(F.some,e)),aL=(t,e)=>{if(/^[0-9.]+$/.test(e)){const n=parseInt(e,10);if(n>=1&&n<=7){const r=uv(t),i=dv(t);return i.length>0?i[n-1]||e:r[n-1]||e}else return e}else return e},AY=t=>{const e=t.split(/\s*,\s*/);return wt(e,n=>n.indexOf(" ")!==-1&&!(Ze(n,'"')||Ze(n,"'"))?`'${n}'`:n).join(",")},tu=(t,e)=>{const n=aL(t,e);t.formatter.toggle("fontname",{value:AY(n)}),t.nodeChanged()},o=t=>$O(t,e=>kY(t.getBody(),e.dom)).getOr(""),s=(t,e)=>{t.formatter.toggle("fontsize",{value:aL(t,e)}),t.nodeChanged()},a=t=>$O(t,e=>SY(t.getBody(),e.dom)).getOr(""),c=t=>$O(t,e=>{const n=Z.fromDom(t.getBody()),r=w1(e,u=>Ms(u,"line-height"),Et(ho,n)),i=()=>{const u=parseFloat(rs(e,"line-height")),g=parseFloat(rs(e,"font-size"));return String(u/g)};return r.getOrThunk(i)}).getOr(""),d=(t,e)=>{t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()},f=t=>{const e=(n,r)=>{t.formatter.toggle(n,r),t.nodeChanged()};t.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":n=>{e(n)},"ForeColor,HiliteColor":(n,r,i)=>{e(n,{value:i})},BackColor:(n,r,i)=>{e("hilitecolor",{value:i})},FontName:(n,r,i)=>{tu(t,i)},FontSize:(n,r,i)=>{s(t,i)},LineHeight:(n,r,i)=>{d(t,i)},Lang:(n,r,i)=>{e(n,{value:i.code,customValue:i.customCode??null})},RemoveFormat:n=>{t.formatter.remove(n)},mceBlockQuote:()=>{e("blockquote")},FormatBlock:(n,r,i)=>{e(q(i)?i:"p")},mceToggleFormat:(n,r,i)=>{e(i)}})},p=t=>{const e=n=>t.formatter.match(n);t.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":n=>e(n),mceBlockQuote:()=>e("blockquote")},"state"),t.editorCommands.addQueryValueHandler("FontName",()=>o(t)),t.editorCommands.addQueryValueHandler("FontSize",()=>a(t)),t.editorCommands.addQueryValueHandler("LineHeight",()=>c(t))},y=t=>{f(t),p(t)},C=t=>{t.editorCommands.addCommands({mceAddUndoLevel:()=>{t.undoManager.add()},mceEndUndoLevel:()=>{t.undoManager.add()},Undo:()=>{t.undoManager.undo()},Redo:()=>{t.undoManager.redo()}})},_=t=>{t.editorCommands.addCommands({Indent:()=>{gN(t)},Outdent:()=>{ug(t)}}),t.editorCommands.addCommands({Outdent:()=>uN(t),Indent:()=>ZZ(t)},"state")},A=t=>{const e=(n,r,i)=>{if(t.mode.isReadOnly())return;const u=q(i)?{href:i}:i,g=t.dom.getParent(t.selection.getNode(),"a");mo(u)&&q(u.href)&&(u.href=u.href.replace(/ /g,"%20").replace(/&/g,"&"),(!g||!u.href)&&t.formatter.remove("link"),u.href&&t.formatter.apply("link",u,g))};t.editorCommands.addCommands({unlink:()=>{if(t.selection.isEditable()){if(t.selection.isCollapsed()){const n=t.dom.getParent(t.selection.getStart(),"a");n&&t.dom.remove(n,!0);return}t.formatter.remove("link")}},mceInsertLink:e,createLink:e})},O=(t,e,n,r)=>{const i=t.dom,u=b=>i.isBlock(b)&&b.parentElement===n,g=u(e)?e:i.getParent(r,u,n);return F.from(g).map(Z.fromDom)},M=(t,e)=>{if(t.mode.isReadOnly())return;const n=t.dom,r=t.selection.getRng(),i=e?t.selection.getStart():t.selection.getEnd(),u=e?r.startContainer:r.endContainer,g=Yy(n,u);if(!g||!g.isContentEditable)return;const b=e?wr:Nc,x=ws(t);O(t,i,g,u).each(w=>{const E=MP(t,u,w.dom,g,!1,x);
50b(w,Z.fromDom(E)),t.selection.setCursorLocation(E,0),t.dispatch("NewBlock",{newBlock:E}),qy(t,"insertParagraph")})},I=t=>M(t,!0),L=t=>M(t,!1),W=t=>{t.editorCommands.addCommands({InsertNewBlockBefore:()=>{I(t)},InsertNewBlockAfter:()=>{L(t)}})},j=t=>{t.editorCommands.addCommands({insertParagraph:()=>{c4(Jy,t)},mceInsertNewLine:(e,n,r)=>{XP(t,r)},InsertLineBreak:(e,n,r)=>{c4(jP,t)}})},V=t=>{t.editorCommands.addCommands({mceSelectNodeDepth:(e,n,r)=>{let i=0;t.dom.getParent(t.selection.getNode(),u=>jt(u)&&i++===r?(t.selection.select(u),!1):!0,t.getBody())},mceSelectNode:(e,n,r)=>{t.selection.select(r)},selectAll:()=>{const e=t.dom.getParent(t.selection.getStart(),Pa);if(e){const n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}}})},K=t=>{t.editorCommands.addCommands({mceRemoveNode:(e,n,r)=>{const i=r??t.selection.getNode();if(i!==t.getBody()){const u=t.selection.getBookmark();t.dom.remove(i,!0),t.selection.moveToBookmark(u)}},mcePrint:()=>{t.getWin().print()},mceFocus:(e,n,r)=>{$R(t,r===!0)},mceToggleVisualAid:()=>{t.hasVisual=!t.hasVisual,t.addVisual()}})},tt=t=>{tL(t),L4(t),C(t),V(t),IO(t),A(t),_(t),W(t),j(t),y(t),K(t)},ct=["toggleview"],dt=t=>xt(ct,t.toLowerCase());class Wt{constructor(e){Ft(this,"editor");Ft(this,"commands",{state:{},exec:{},value:{}});this.editor=e}execCommand(e,n=!1,r,i){const u=this.editor,g=e.toLowerCase(),b=i==null?void 0:i.skip_focus;if(u.removed||(g!=="mcefocus"&&(!/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(g)&&!b?u.focus():IL(u)),u.dispatch("BeforeExecCommand",{command:e,ui:n,value:r}).isDefaultPrevented()))return!1;const w=this.commands.exec[g];return X(w)?(w(g,n,r,i),u.dispatch("ExecCommand",{command:e,ui:n,value:r,args:i}),!0):!1}queryCommandState(e){if(!dt(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const n=e.toLowerCase(),r=this.commands.state[n];return X(r)?r(n):!1}queryCommandValue(e){if(!dt(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const n=e.toLowerCase(),r=this.commands.value[n];return X(r)?r(n):""}addCommands(e,n="exec"){const r=this.commands;Do(e,(i,u)=>{Y(u.toLowerCase().split(","),g=>{r[n][g]=i})})}addCommand(e,n,r){const i=e.toLowerCase();this.commands.exec[i]=(u,g,b,x)=>n.call(r??this.editor,g,b,x)}removeCommand(e,n){const r=e.toLowerCase();n?delete this.commands[n][r]:(delete this.commands.exec[r],delete this.commands.state[r],delete this.commands.value[r])}queryCommandSupported(e){const n=e.toLowerCase();return!!this.commands.exec[n]}addQueryStateHandler(e,n,r){this.commands.state[e.toLowerCase()]=()=>n.call(r??this.editor)}addQueryValueHandler(e,n,r){this.commands.value[e.toLowerCase()]=()=>n.call(r??this.editor)}}const kt=Mt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class Ot{constructor(e){Ft(this,"settings");Ft(this,"scope");Ft(this,"toggleEvent");Ft(this,"bindings",{});this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||pt}static isNative(e){return!!kt[e.toLowerCase()]}fire(e,n){return this.dispatch(e,n)}dispatch(e,n){const r=e.toLowerCase(),i=H1(r,n??{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(i);const u=this.bindings[r];if(u)for(let g=0,b=u.length;g<b;g++){const x=u[g];if(!x.removed){if(x.once&&this.off(r,x.func),i.isImmediatePropagationStopped())return i;if(x.func.call(this.scope,i)===!1)return i.preventDefault(),i}}return i}on(e,n,r,i){if(n===!1&&(n=pt),n){const u={func:n,removed:!1};i&&Mt.extend(u,i);const g=e.toLowerCase().split(" ");let b=g.length;for(;b--;){const x=g[b];let w=this.bindings[x];w||(w=[],this.toggleEvent(x,!0)),r?w=[u,...w]:w=[...w,u],this.bindings[x]=w}}return this}off(e,n){if(e){const r=e.toLowerCase().split(" ");let i=r.length;for(;i--;){const u=r[i];let g=this.bindings[u];if(!u)return Do(this.bindings,(b,x)=>{this.toggleEvent(x,!1),delete this.bindings[x]}),this;if(g){if(!n)g.length=0;else{const b=Ct(g,x=>x.func===n);g=b.fail,this.bindings[u]=g,Y(b.pass,x=>{x.removed=!0})}g.length||(this.toggleEvent(e,!1),delete this.bindings[u])}}}else Do(this.bindings,(r,i)=>{this.toggleEvent(i,!1)}),this.bindings={};return this}once(e,n,r){return this.on(e,n,r,{once:!0})}has(e){e=e.toLowerCase();const n=this.bindings[e];return!(!n||n.length===0)}}const Tt=t=>(t._eventDispatcher||(t._eventDispatcher=new Ot({scope:t,toggleEvent:(e,n)=>{Ot.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher),xe={fire(t,e,n){return ly("fire"),this.dispatch(t,e,n)},dispatch(t,e,n){const r=this;if(r.removed&&t!=="remove"&&t!=="detach")return H1(t.toLowerCase(),e??{},r);const i=Tt(r).dispatch(t,e);if(n!==!1&&r.parent){let u=r.parent();for(;u&&!i.isPropagationStopped();)u.dispatch(t,i,!1),u=u.parent?u.parent():void 0}return i},on(t,e,n){return Tt(this).on(t,e,n)},off(t,e){return Tt(this).off(t,e)},once(t,e){return Tt(this).once(t,e)},hasEventListeners(t){return Tt(this).has(t)}},le=vo.DOM;let Qe;const ye=(t,e)=>{if(e==="selectionchange")return t.getDoc();if(!t.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(e))return t.getDoc().documentElement;const n=D0(t);return n?(t.eventRoot||(t.eventRoot=le.select(n)[0]),t.eventRoot):t.getBody()},je=t=>!t.hidden&&!rg(t),ue=(t,e,n)=>{je(t)?t.dispatch(e,n):rg(t)&&lU(t,n)},_t=(t,e)=>{if(t.delegates||(t.delegates={}),t.delegates[e]||t.removed)return;const n=ye(t,e);if(D0(t)){if(Qe||(Qe={},t.editorManager.on("removeEditor",()=>{t.editorManager.activeEditor||Qe&&(Do(Qe,(i,u)=>{t.dom.unbind(ye(t,u))}),Qe=null)})),Qe[e])return;const r=i=>{const u=i.target,g=t.editorManager.get();let b=g.length;for(;b--;){const x=g[b].getBody();(x===u||le.isChildOf(u,x))&&ue(g[b],e,i)}};Qe[e]=r,le.bind(n,e,r)}else{const r=i=>{ue(t,e,i)};le.bind(n,e,r),t.delegates[e]=r}},Lt={...xe,bindPendingEventDelegates(){const t=this;Mt.each(t._pendingNativeEvents,e=>{_t(t,e)})},toggleNativeEvent(t,e){const n=this;t==="focus"||t==="blur"||n.removed||(e?n.initialized?_t(n,t):n._pe
50ndingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&n.delegates&&(n.dom.unbind(ye(n,t),t,n.delegates[t]),delete n.delegates[t]))},unbindAllNativeEvents(){const t=this,e=t.getBody(),n=t.dom;t.delegates&&(Do(t.delegates,(r,i)=>{t.dom.unbind(ye(t,i),i,r)}),delete t.delegates),!t.inline&&e&&n&&(e.onload=null,n.unbind(t.getWin()),n.unbind(t.getDoc())),n&&(n.unbind(e),n.unbind(t.getContainer()))}},Ae=t=>q(t)?{value:t.split(/[ ,]/),valid:!0}:Fo(t,q)?{value:t,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},Ge=t=>{const e=(()=>{switch(t){case"array":return lo;case"boolean":return eo;case"function":return X;case"number":return sr;case"object":return mo;case"string":return q;case"string[]":return Ae;case"object[]":return n=>Fo(n,mo);case"regexp":return n=>Oa(n,RegExp);default:return It}})();return n=>Eo(n,e,`The value must be a ${t}.`)},me=t=>q(t.processor),Ue=(t,e)=>{const n=qf(e.message)?"":`. ${e.message}`;return t+n},jo=t=>t.valid,Eo=(t,e,n="")=>{const r=e(t);return eo(r)?r?{value:t,valid:!0}:{valid:!1,message:n}:r},Ea=(t,e,n)=>{if(!Gn(e)){const r=Eo(e,n);if(jo(r))return r.value;console.error(Ue(`Invalid default value passed for the "${t}" option`,r))}},Pn=(t,e,n=e)=>{const r={},i={},u=(N,H,$)=>{const U=Eo(H,$);return jo(U)?(i[N]=U.value,!0):(console.warn(Ue(`Invalid value passed for the ${N} option`,U)),!1)},g=(N,H)=>{const $=me(H)?Ge(H.processor):H.processor,U=Ea(N,H.default,$);r[N]={...H,default:U,processor:$},Ln(i,N).orThunk(()=>Ln(e,N)).each(Q=>u(N,Q,$))},b=N=>Xe(r,N);return{register:g,isRegistered:b,get:N=>Ln(i,N).orThunk(()=>Ln(r,N).map(H=>H.default)).getOrUndefined(),set:(N,H)=>{if(b(N)){const $=r[N];return $.immutable?(console.error(`"${N}" is an immutable option and cannot be updated`),!1):u(N,H,$.processor)}else return console.warn(`"${N}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:N=>{const H=b(N);return H&&delete i[N],H},isSet:N=>Xe(i,N),debug:()=>{try{console.log(JSON.parse(JSON.stringify(n,(N,H)=>eo(H)||sr(H)||q(H)||nt(H)||lo(H)||Ja(H)?H:Object.prototype.toString.call(H))))}catch(N){console.error(N)}}}},fi=(t,e)=>{t.dom.contentEditable="true"},xr=(t,e)=>{const n=Z.fromDom(t.getBody());e?(t.readonly=!0,t.hasEditableRoot()&&fi(n),G5(t)):(t.readonly=!1,MF(t))},ra=t=>t.readonly,pi=t=>{const e=t.undoManager.add();mt(e)&&(t.undoManager.undo(),t.undoManager.reset())},cl=t=>$t(t,e=>e.type==="characterData"||e.type==="childList"),Vf=t=>{const e=r=>{ra(t)&&cl(r)&&pi(t)},n=new MutationObserver(e);t.on("beforeinput paste cut dragend dragover draggesture dragdrop drop drag",r=>{ra(t)&&r.preventDefault()}),t.on("BeforeExecCommand",r=>{(r.command==="Undo"||r.command==="Redo")&&ra(t)&&r.preventDefault()}),t.on("compositionstart",()=>{ra(t)&&n.observe(t.getBody(),{characterData:!0,childList:!0,subtree:!0})}),t.on("compositionend",()=>{if(ra(t)){const r=n.takeRecords();e(r)}n.disconnect()})},sm=["design","readonly"],Uh=(t,e,n,r)=>{const i=n[e.get()],u=n[r];try{u.activate()}catch(g){console.error(`problem while activating editor mode ${r}:`,g);return}i.deactivate(),i.editorReadOnly!==u.editorReadOnly&&xr(t,u.editorReadOnly),e.set(r),EE(t,r)},gg=(t,e,n,r)=>{if(!(r===n.get()||t.initialized&&rg(t))){if(!Xe(e,r))throw new Error(`Editor mode '${r}' is invalid`);t.initialized?Uh(t,n,e,r):t.on("init",()=>Uh(t,n,e,r))}},mC=(t,e,n)=>{if(xt(sm,e))throw new Error(`Cannot override default mode ${e}`);return{...t,[e]:{...n,deactivate:()=>{try{n.deactivate()}catch(r){console.error(`problem while deactivating editor mode ${e}:`,r)}}}}},LO=t=>{const e=Te("design"),n=Te({design:{activate:_e,deactivate:_e,editorReadOnly:!1},readonly:{activate:_e,deactivate:_e,editorReadOnly:!0}});return Vf(t),uU(t),{isReadOnly:()=>ra(t),set:r=>gg(t,n.get(),e,r),get:()=>e.get(),register:(r,i)=>{n.set(mC(n.get(),r,i))}}},Uf=Mt.each,qb=Mt.explode,H4={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},HO=Mt.makeMap("alt,ctrl,shift,meta,access"),iL=t=>t in HO,TY=t=>{const e={},n=Oo.os.isMacOS()||Oo.os.isiOS();Uf(qb(t.toLowerCase(),"+"),u=>{iL(u)?e[u]=!0:/^[0-9]{2,}$/.test(u)?e.keyCode=parseInt(u,10):(e.charCode=u.charCodeAt(0),e.keyCode=H4[u]||u.toUpperCase().charCo
50deAt(0))});const r=[e.keyCode];let i;for(i in HO)e[i]?r.push(i):e[i]=!1;return e.id=r.join(","),e.access&&(e.alt=!0,n?e.ctrl=!0:e.shift=!0),e.meta&&(n?e.meta=!0:(e.ctrl=!0,e.meta=!1)),e};class z4{constructor(e){Ft(this,"editor");Ft(this,"shortcuts",{});Ft(this,"pendingPatterns",[]);this.editor=e;const n=this;e.on("keyup keypress keydown",r=>{(n.hasModifier(r)||n.isFunctionKey(r))&&!r.isDefaultPrevented()&&(Uf(n.shortcuts,i=>{n.matchShortcut(r,i)&&(n.pendingPatterns=i.subpatterns.slice(0),r.type==="keydown"&&n.executeShortcutAction(i))}),n.matchShortcut(r,n.pendingPatterns[0])&&(n.pendingPatterns.length===1&&r.type==="keydown"&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}add(e,n,r,i){const u=this,g=u.normalizeCommandFunc(r);return Uf(qb(Mt.trim(e)),b=>{const x=u.createShortcut(b,n,g,i);u.shortcuts[x.id]=x}),!0}remove(e){const n=this.createShortcut(e);return this.shortcuts[n.id]?(delete this.shortcuts[n.id],!0):!1}normalizeCommandFunc(e){const n=this,r=e;return typeof r=="string"?()=>{n.editor.execCommand(r,!1,null)}:Mt.isArray(r)?()=>{n.editor.execCommand(r[0],r[1],r[2])}:r}createShortcut(e,n,r,i){const u=Mt.map(qb(e,">"),TY);return u[u.length-1]=Mt.extend(u[u.length-1],{func:r,scope:i||this.editor}),Mt.extend(u[0],{desc:this.editor.translate(n),subpatterns:u.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return e.type==="keydown"&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,n){return!n||n.ctrl!==e.ctrlKey||n.meta!==e.metaKey||n.alt!==e.altKey||n.shift!==e.shiftKey?!1:e.keyCode===n.keyCode||e.charCode&&e.charCode===n.charCode?(e.preventDefault(),!0):!1}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const gC=()=>{const t=jj();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,addView:t.addView,addContext:t.addContext,getAll:t.getAll}},eu=vo.DOM,Wh=Mt.extend,cL=Mt.each;class fC{constructor(e,n,r){Ft(this,"baseUri");Ft(this,"id");Ft(this,"editorUid");Ft(this,"plugins",{});Ft(this,"documentBaseURI");Ft(this,"baseURI");Ft(this,"contentCSS",[]);Ft(this,"contentStyles",[]);Ft(this,"ui");Ft(this,"mode");Ft(this,"options");Ft(this,"editorUpload");Ft(this,"userLookup");Ft(this,"shortcuts");Ft(this,"loadedCSS",{});Ft(this,"editorCommands");Ft(this,"suffix");Ft(this,"editorManager");Ft(this,"hidden");Ft(this,"inline");Ft(this,"hasVisual");Ft(this,"isNotDirty",!1);Ft(this,"annotator");Ft(this,"bodyElement");Ft(this,"bookmark");Ft(this,"composing",!1);Ft(this,"container");Ft(this,"contentAreaContainer");Ft(this,"contentDocument");Ft(this,"contentWindow");Ft(this,"delegates");Ft(this,"destroyed",!1);Ft(this,"dom");Ft(this,"editorContainer");Ft(this,"eventRoot");Ft(this,"formatter");Ft(this,"formElement");Ft(this,"formEventDelegate");Ft(this,"hasHiddenInput",!1);Ft(this,"iframeElement",null);Ft(this,"iframeHTML");Ft(this,"initialized",!1);Ft(this,"notificationManager");Ft(this,"orgDisplay");Ft(this,"orgVisibility");Ft(this,"parser");Ft(this,"quirks");Ft(this,"readonly",!1);Ft(this,"removed",!1);Ft(this,"schema");Ft(this,"selection");Ft(this,"serializer");Ft(this,"startContent","");Ft(this,"targetElm");Ft(this,"theme");Ft(this,"model");Ft(this,"undoManager");Ft(this,"windowManager");Ft(this,"licenseKeyManager");Ft(this,"_beforeUnload");Ft(this,"_eventDispatcher");Ft(this,"_nodeChangeDispatcher");Ft(this,"_pendingNativeEvents",[]);Ft(this,"_selectionOverrides");Ft(this,"_skinLoaded",!1);Ft(this,"_editableRoot",!0);Ft(this,"bindPendingEventDelegates");Ft(this,"toggleNativeEvent");Ft(this,"unbindAllNativeEvents");Ft(this,"fire");Ft(this,"dispatch");Ft(this,"on");Ft(this,"off");Ft(this,"once");Ft(this,"hasEventListeners");this.editorManager=r,Wh(this,Lt);const i=this;this.id=e,this.editorUid=yC(),this.hidden=!1;const u=pY(r.defaultOptions,n);this.options=Pn(i,u,n),jp(i),this.userLookup=Z$(this);const g=this.options.get;g("deprecation_warnings")&&Iz(n,u);const b=g("suffix");b&&(r.suffix=b),this.suffix=r.suffix;const x=g("base_url");x&&r._setBaseUrl(x),this.baseUri=r.baseURI;const w=A0(i);w&&($o.ScriptLoader._setReferrerPolicy(w),vo.DOM.styleSheetLoader._setReferrerPolicy(w)),$o.ScriptLoader._setCrossOrigin(N=>Hm(i)(N,"script")),vo.DOM.styleSheetLoader._setCrossOrigin(N=>Hm(i)(N,"stylesheet"));const E=sv(i);mt(E)&&vo.DOM.styleSheetLoader._setContentCssCors(E),Is.languageLoad=g("language_load"),Is.baseURL=r.baseURL,this.setDirty(!1),this.documentBaseURI=new Gl
50(Y2(i),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=qp(i),this.hasVisual=Xp(i),this.shortcuts=new z4(this),this.editorCommands=new Wt(this),tt(this);const D=g("cache_suffix");D&&(Oo.cacheSuffix=D.replace(/^[\?\&]+/,"")),this.ui={registry:gC(),styleSheetLoader:void 0,show:_e,hide:_e,setEnabled:_e,isEnabled:It},this.mode=LO(i),Object.defineProperty(this,"editorUid",{writable:!1,configurable:!1,enumerable:!0}),r.dispatch("SetupEditor",{editor:this});const R=Vm(i);X(R)&&R.call(i,i)}render(){lY(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return eb(this)}translate(e){return za.translate(e)}getParam(e,n,r){const i=this.options;return i.isRegistered(e)||(mt(r)?i.register(e,{processor:r,default:n}):i.register(e,{processor:It,default:n})),!i.isSet(e)&&!Gn(n)?n:i.get(e)}hasPlugin(e,n){return xt(Yp(this),e)?n?Rf.get(e)!==void 0:!0:!1}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,n,r){this.editorCommands.addCommand(e,n,r)}addQueryStateHandler(e,n,r){this.editorCommands.addQueryStateHandler(e,n,r)}addQueryValueHandler(e,n,r){this.editorCommands.addQueryValueHandler(e,n,r)}addShortcut(e,n,r,i){this.shortcuts.add(e,n,r,i)}execCommand(e,n,r,i){return this.editorCommands.execCommand(e,n,r,i)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(eu.show(e.getContainer()),eu.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(eu.hide(e.getContainer()),eu.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e,n){this.dispatch("ProgressState",{state:e,time:n})}load(e={}){const n=this,r=n.getElement();if(!n.removed&&r){const i={...e,load:!0},u=Oi(r)?r.value:r.innerHTML;n.setContent(u,i),i.no_events||n.dispatch("LoadContent",{...i,element:r})}}save(e={}){const n=this;let r=n.getElement();if(!r||!n.initialized||n.removed)return"";const i={...e,save:!0,element:r};let u=n.getContent(i);const g={...i,content:u};if(g.no_events||n.dispatch("SaveContent",g),g.format==="raw"&&n.dispatch("RawSaveContent",g),u=g.content,Oi(r))r.value=u;else{(e.is_removing||!n.inline)&&(r.innerHTML=u);const b=eu.getParent(n.id,"form");b&&cL(b.elements,x=>x.name===n.id?(x.value=u,!1):!0)}return g.element=i.element=r=null,g.set_dirty!==!1&&n.setDirty(!1),u}setContent(e,n){T5(this,e,n)}getContent(e){return GV(this,e)}insertContent(e,n){n&&(e=Wh({content:e},n)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){e===void 0?T5(this,this.startContent,{initial:!0,format:"raw"}):T5(this,e,{initial:!0}),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const n=!this.isNotDirty;this.isNotDirty=!e,e&&e!==n&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||eu.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=eu.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const n=e.iframeElement;n&&(e.contentWindow=n.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const n=e.getWin();n&&(e.contentDocument=n.document)}return e.contentDocument}getBody(){const e=this.getDoc();return this.bodyElement??(e==null?void 0:e.body)??null}convertURL(e,n,r){const i=this,u=i.options.get,g=Pl(i);if(X(g))return g.call(i,e,r,!0,n);if(!u("convert_urls")||r==="link"||mo(r)&&r.nodeName==="LINK"||e.indexOf("file:")===0||e.length===0)return e;const b=new Gl(e);return b.protocol!=="http"&&b.protocol!=="https"&&b.protocol!==""?e:u("relative_urls")?i.documentBaseURI.toRelative(e):(e=i.documentBaseURI.toAbsolute(e,u("remove_script_host")),e)}addVisual(e){hY(this,e)}setEditableRoot(e){dY(this,e)}hasEditableRoot(){return mY(this)}remove(){O5(this)}destroy(e){CF(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const Zh=vo.DOM,Kb=Mt.each;let zO=!1,jh,aa=[];const ou=t=>{const e=t.type;Kb(sd.get(),n=>{switch(e){case"scroll":n.dispatch("ScrollWindow",t);break;case"resize":n.dispatch("ResizeWindow",t);break}})},Gh=t=>{if(t!==zO){const e=vo.DOM;t?(e.bind(window,"resize",ou),e.bind(window,"scroll",ou)):(e.unbind(window,"resize",ou),e.unbind(window,"scroll",ou)),zO=t}},V4=t=>
50{const e=aa;return aa=st(aa,n=>t!==n),sd.activeEditor===t&&(sd.activeEditor=aa.length>0?aa[0]:null),sd.focusedEditor===t&&(sd.focusedEditor=null),e.length!==aa.length},VO=t=>{t&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(V4(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0)},DY=document.compatMode!=="CSS1Compat",sd={...xe,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,pageUid:yC(),majorVersion:"8",minorVersion:"3.2",releaseDate:"2026-01-14",i18n:za,activeEditor:null,focusedEditor:null,setup(){const t=this;let e="",n="",r=Gl.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(r)&&(r=r.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(r)||(r+="/"));const i=window.tinymce||window.tinyMCEPreInit;if(i)e=i.base||i.baseURL,n=i.suffix;else{const u=document.getElementsByTagName("script");for(let g=0;g<u.length;g++){const b=u[g].src||"";if(b==="")continue;const x=b.substring(b.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(b)){x.indexOf(".min")!==-1&&(n=".min"),e=b.substring(0,b.lastIndexOf("/"));break}}if(!e&&document.currentScript){const g=document.currentScript.src;g.indexOf(".min")!==-1&&(n=".min"),e=g.substring(0,g.lastIndexOf("/"))}}t.baseURL=new Gl(r).toAbsolute(e),t.documentBaseURL=r,t.baseURI=new Gl(t.baseURL),t.suffix=n,MR(t),Y(["majorVersion","minorVersion","releaseDate","pageUid","_addLicenseKeyManager"],u=>Object.defineProperty(t,u,{writable:!1,configurable:!1,enumerable:!0}))},overrideDefaults(t){const e=t.base_url;e&&this._setBaseUrl(e);const n=t.suffix;n&&(this.suffix=n),this.defaultOptions=t;const r=t.plugin_base_urls;r!==void 0&&Do(r,(i,u)=>{Is.PluginManager.urls[u]=i})},init(t){const e=this;let n;const r=Mt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),i=(E,D)=>E.inline&&D.tagName.toLowerCase()in r,u=E=>{let D=E.id;return D||(D=Ln(E,"name").filter(R=>!Zh.get(R)).getOrThunk(Zh.uniqueId),E.setAttribute("id",D)),D},g=E=>{const D=t[E];if(D)return D.apply(e,[])},b=E=>Oo.browser.isIE()||Oo.browser.isEdge()?(u3("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/8/support/#supportedwebbrowsers"),[]):DY?(u3("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):q(E.selector)?Zh.select(E.selector):mt(E.target)?[E.target]:[];let x=E=>{n=E};const w=()=>{let E=0;const D=[];let R;const N=(H,$,U)=>{const J=new fC(H,$,e);D.push(J),J.on("init",()=>{++E===R.length&&x(D)}),J.targetElm=J.targetElm||U,J.render()};Zh.unbind(window,"ready",w),g("onpageload"),R=id(b(t)),Mt.each(R,H=>{VO(e.get(H.id))}),R=Mt.grep(R,H=>!e.get(H.id)),R.length===0?x([]):Kb(R,H=>{i(t,H)?u3("Could not initialize inline editor on invalid inline target element",H):N(u(H),t,H)})};return Zh.bind(window,"ready",w),new Promise(E=>{n?E(n):x=D=>{E(D)}})},get(t){return arguments.length===0?aa.slice(0):q(t)?Xo(aa,e=>e.id===t).getOr(null):sr(t)&&aa[t]?aa[t]:null},add(t){const e=this,n=e.get(t.id);return n===t||(n===null&&aa.push(t),Gh(!0),e.activeEditor=t,e.dispatch("AddEditor",{editor:t}),jh||(jh=r=>{const i=e.dispatch("BeforeUnload");if(i.returnValue)return r.preventDefault(),r.returnValue=i.returnValue,i.returnValue},window.addEventListener("beforeunload",jh))),t},createEditor(t,e){return this.add(new fC(t,e,this))},remove(t){const e=this;let n;if(!t){for(let r=aa.length-1;r>=0;r--)e.remove(aa[r]);return}if(q(t)){Kb(Zh.select(t),r=>{n=e.get(r.id),n&&e.remove(n)});return}return n=t,nt(e.get(n.id))?null:(V4(n)&&e.dispatch("RemoveEditor",{editor:n}),aa.length===0&&window.removeEventListener("beforeunload",jh),n.remove(),Gh(aa.length>0),n)},execCommand(t,e,n){const r=this,i=mo(n)?n.id??n.index:n;switch(t){case"mceAddEditor":{if(!r.get(i)){const u=n.options;new fC(i,u,r).render()}return!0}case"mceRemoveEditor":{const u=r.get(i);return u&&u.remove(),!0}case"mceToggleEditor":{const u=r.get(i);return u?(u.isHidden()?u.show():u.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}}return r.activeEditor?r.activeEditor.execCommand(t,e,n):!1},triggerSave:()=>{Kb(aa,t=>{t.save()})},addI18n:(t,e)=>{za.add(t,e)},translate:t=>za.translate(t),setActive(t){const e=this.activeEditor;this.activeEditor!==t&&(e&&e.dispatch("deactivate",{relatedTarget:t}),t.dispatch("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl(t){this.baseURL=new Gl(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Gl
50(this.baseURL)},_addLicenseKeyManager:t=>W5.add(t)};sd.setup();const OY=(()=>{const t=Gi(),e=u=>({items:u,types:he(u),getType:g=>Ln(u,g).getOrUndefined()}),n=u=>{t.set(u)},r=()=>t.get().getOrUndefined(),i=t.clear;return{FakeClipboardItem:e,write:n,read:r,clear:i}})(),Yb=Math.min,Xb=Math.max,U4=Math.round,ia=(t,e,n)=>{let r=e.x,i=e.y;const u=t.w,g=t.h,b=e.w,x=e.h,w=(n||"").split("");return w[0]==="b"&&(i+=x),w[1]==="r"&&(r+=b),w[0]==="c"&&(i+=U4(x/2)),w[1]==="c"&&(r+=U4(b/2)),w[3]==="b"&&(i-=g),w[4]==="r"&&(r-=u),w[3]==="c"&&(i-=U4(g/2)),w[4]==="c"&&(r-=U4(u/2)),qh(r,i,u,g)},Jb=(t,e,n,r)=>{for(let i=0;i<r.length;i++){const u=ia(t,e,r[i]);if(u.x>=n.x&&u.x+u.w<=n.w+n.x&&u.y>=n.y&&u.y+u.h<=n.h+n.y)return r[i]}return null},RY=(t,e,n)=>qh(t.x-e,t.y-n,t.w+e*2,t.h+n*2),lL=(t,e)=>{const n=Xb(t.x,e.x),r=Xb(t.y,e.y),i=Yb(t.x+t.w,e.x+e.w),u=Yb(t.y+t.h,e.y+e.h);return i-n<0||u-r<0?null:qh(n,r,i-n,u-r)},WO=(t,e,n)=>{let r=t.x,i=t.y,u=t.x+t.w,g=t.y+t.h;const b=e.x+e.w,x=e.y+e.h,w=Xb(0,e.x-r),E=Xb(0,e.y-i),D=Xb(0,u-b),R=Xb(0,g-x);return r+=w,i+=E,n&&(u+=w,g+=E,r-=D,i-=R),u-=D,g-=R,qh(r,i,u-r,g-i)},qh=(t,e,n,r)=>({x:t,y:e,w:n,h:r}),FY={inflate:RY,relativePosition:ia,findBestRelativePosition:Jb,intersect:lL,clamp:WO,create:qh,fromClientRect:t=>qh(t.left,t.top,t.width,t.height)},rm=(t,e,n=1e3)=>{let r=!1,i=null;const u=w=>(...E)=>{r||(r=!0,i!==null&&(window.clearTimeout(i),i=null),w.apply(null,E))},g=u(t),b=u(e);return{start:(...w)=>{!r&&i===null&&(i=window.setTimeout(()=>b.apply(null,w),n))},resolve:g,reject:b}},uL=(()=>{const t={},e={},n={};return{load:(x,w)=>{const E=`Script at URL "${w}" failed to load`,D=`Script at URL "${w}" did not call \`tinymce.Resource.add('${x}', data)\` within 1 second`;if(t[x]!==void 0)return t[x];{const R=new Promise((N,H)=>{const $=rm(N,H);e[x]=$.resolve,$o.ScriptLoader.loadScript(w).then(()=>$.start(D),()=>$.reject(E))});return t[x]=R,R}},add:(x,w)=>{e[x]!==void 0&&(e[x](w),delete e[x]),t[x]=Promise.resolve(w),n[x]=w},has:x=>x in n,get:x=>n[x],unload:x=>{delete t[x],delete n[x]}}})(),dL=()=>(()=>{let t={},e=[];const n={getItem:r=>{const i=t[r];return i||null},setItem:(r,i)=>{e.push(r),t[r]=String(i)},key:r=>e[r],removeItem:r=>{e=e.filter(i=>i===r),delete t[r]},clear:()=>{e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:()=>e.length,configurable:!1,enumerable:!1}),n})();let Kh;try{const t="__storage_test__";Kh=window.localStorage,Kh.setItem(t,t),Kh.removeItem(t)}catch{Kh=dL()}var mL=Kh;const fg={geom:{Rect:FY},util:{Delay:Vl,Tools:Mt,VK:Qt,URI:Gl,EventDispatcher:Ot,Observable:xe,I18n:za,LocalStorage:mL,ImageUploader:$F},dom:{EventUtils:qg,TreeWalker:ts,TextSeeker:Dl,DOMUtils:vo,ScriptLoader:$o,RangeUtils:Uu,Serializer:A5,StyleSheetLoader:Lg,ControlSelection:XL,BookmarkManager:Q0,Selection:k5,Event:qg.Event},html:{Styles:Tu,Entities:La,Node:hr,Schema:mr,DomParser:lb,Writer:FA,Serializer:yf},Env:Oo,AddOnManager:Is,Annotator:DR,Formatter:zF,UndoManager:EU,EditorCommands:Wt,WindowManager:wF,NotificationManager:wy,EditorObservable:Lt,Shortcuts:z4,Editor:fC,FocusManager:BR,EditorManager:sd,DOM:vo.DOM,ScriptLoader:$o.ScriptLoader,PluginManager:Rf,ThemeManager:Ch,ModelManager:xb,IconManager:c3,Resource:uL,FakeClipboard:OY,trim:Mt.trim,isArray:Mt.isArray,is:Mt.is,toArray:Mt.toArray,makeMap:Mt.makeMap,each:Mt.each,map:Mt.map,grep:Mt.grep,inArray:Mt.inArray,extend:Mt.extend,walk:Mt.walk,resolve:Mt.resolve,explode:Mt.explode,_addCacheSuffix:Mt._addCacheSuffix},ZO=Mt.extend(sd,fg),gL=t=>{try{on.exports=t}catch{}};(t=>{window.tinymce=t,window.tinyMCE=t})(ZO),gL(ZO)})()})(jX);var xJ=jX.exports;const pL=pJ(xJ);
vendor: 90,844 bytes, line 50
50tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z" fill-rule="nonzero"/></svg>',"accordion-toggle":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.3 7.3a1 1 0 0 1 1.4 0L16 9.6l2.3-2.3a1 1 0 1 1 1.4 1.4L16 12.4l-3.7-3.7a1 1 0 0 1 0-1.4ZM4.3 11.7a1 1 0 0 1 0-1.4L6.6 8 4.3 5.7a1 1 0 0 1 1.4-1.4L9.4 8l-3.7 3.7a1 1 0 0 1-1.4 0Z"/></svg>',accordion:'<svg width="24" height="24"><rect x="12" y="7" width="10" height="2" rx="1"/><rect x="12" y="11" width="10" height="2" rx="1"/><rect x="12" y="15" width="6" height="2" rx="1"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.3 7.3a1 1 0 0 1 1.4 0L6 9.6l2.3-2.3a1 1 0 0 1 1.4 1.4L6 12.4 2.3 8.7a1 1 0 0 1 0-1.4Z"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',"add-file":'<svg height="24" width="24"><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/></svg>',addtag:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',adjustments:'<svg width="24" height="24"><path d="M16 11a3 3 0 1 1 2.8-4H21v2h-2.2a3 3 0 0 1-2.8 2Zm0-2a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM3 9h8V7H3v2Zm5 10a3 3 0 1 0-2.8-4H3v2h2.2A3 3 0 0 0 8 19Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13 0h-8v-2h8v2Z"/></svg>',"ai-prompt":'<svg width="24" height="24"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 6.7a1 1 0 0 0-1.4 0l-9.9 10a1 1 0 0 0 0 1.3l2.1 2.1c.4.4 1 .4 1.4 0l10-9.9c.3-.3.3-1 0-1.4l-2.2-2Zm1.4 2.8-2-2-3 2.7 2.2 2.2 2.8-2.9Z"/><path d="m18.5 7.3-.7-1.5-1.5-.8 1.5-.7.7-1.5.7 1.5 1.5.7-1.5.8-.7 1.5ZM18.5 16.5l-.7-1.6-1.5-.7 1.5-.7.7-1.6.7 1.6 1.5.7-1.5.7-.7 1.6ZM9.7 7.3 9 5.8 7.5 5 9 4.3l.7-1.5.7 1.5L12 5l-1.5.8-.7 1.5Z"/></g><defs><clipPath id="a"><path d="M0 0h24v24H0z"/></clipPath></defs></svg>',ai:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H5Zm6.8 11.5.5 1.2a68.3 68.3 0 0 0 .7 1.1l.4.1c.3 0 .5 0 .7-.3.2-.1.3-.3.3-.6l-.3-1-2.6-6.2a20.4 20.4 0 0 0-.5-1.3l-.5-.4-.7-.2c-.2 0-.5 0-.6.2-.2 0-.4.2-.5.4l-.3.6-.3.7L5.7 15l-.2.6-.1.4c0 .3 0 .5.3.7l.6.2c.3 0 .5 0 .7-.2l.4-1 .5-1.2h3.9ZM9.8 9l1.5 4h-3l1.5-4Zm5.6-.9v7.6c0 .4 0 .7.2 1l.7.2c.3 0 .6 0 .8-.3l.2-.9V8.1c0-.4 0-.7-.2-.9a1 1 0 0 0-.8-.3c-.2 0-.5.1-.7.3l-.2 1Z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.3.7-9.7 16.3-1.3-.7 9.7-16.3Z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"alt-text":'<svg width="24" height="24"><path d="M3 20a2 2 0 0 1-1.4-.6A2 2 0 0 1 1 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 3 4h18c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H3Zm0-2h18V6H3v12Zm1.5-3H6v-1.5h1.5V15H9v-5a1 1 0 0 0-.3-.7A1 1 0 0 0 8 9H5.5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v5ZM6 12v-1.5h1.5V12H6Z"/><path d="M11 15V9h1.3v4.5h2V15H11Zm5.8-4.5V15h1.4v-4.5h1.3V9h-4v1.5h1.3Z"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8Z" fill-rule="evenodd"/></svg>',"auto-image-enhancement":'<svg width="24" height="24"><path d="M7.7 10.6a5.8 5.8 0 0 0 5.7 5.7A5.8 5.8 0 0 0 7.7 22 5.8 5.8 0 0 0 2 16.3a5.8 5.8 0 0 0 5.7-5.7ZM15.5 2c.3 3 3.3 6 6.5 6.4-3.2.5-6.2 3.4-6.5 6.5-.3-3.4-3-6-6.4-6.5 3.3-.5 6.1-3 6.4-6.4Z"/></svg>',blur:'<svg width="24" height="24"><path d="M19.3 9.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 20 9a1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 10a1 1 0 0 0-.3-.7A1 1 0 0 0 4 9a1 1 0 0 0-.7.3Zm16 6a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 16a1 1 0 0 0-.3-.7A1 1 0 0 0 4 15a1 1 0 0 0-.7.3Zm5-11A1 1 0 0 0 8 5a1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 10 5a1 1 0 0 0-.3-.7A1 1 0 0 0 9 4a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7 1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 16 5a1 1 0 0 0-.3-.7A1 1 0 0 0 15 4a1 1 0 0 0-.7.3Zm-6 16a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 9 20a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3ZM7.6 8.6A2 2 0 0 0 7 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 7 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 14a2 2 0 0 0-1.4.6Zm6-6A2 2 0 0 0 13 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 13 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 14a2 2 0 0 0-1.4.6Z"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1Z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',box:'<svg width="24" height="24"><path d="M3.8 7a1 1 0 0 0-.7.6l-.1 3V13.8a3.5 3.5 0 0 0 4 2.7c.8-.2 1.4-.5 2-1l.3-.3.3.2c.7.7 1.4 1 2.4 1.1 1.2 0 2.4-.6 3-1.6.9-1.2.8-2.8 0-4a3.7 3.7 0 0 0-2-1.2c-.4-.1-1.2-.1-1.6 0a3.4 3.4 0 0 0-1.7 1l-.3.2-.2-.1c-.4-.5-1.2-1-2-1.1-.6-.2-1.5 0-2 .2H5V9c0-1.3 0-1.3-.3-1.6a1 1 0 0 0-1-.3Zm12 2.6c-.3.2-.5.4-.6.8v.6l.9 1 .7 1v.1l-.8 1-.7 1a1 1 0 0 0 0 .7 1 1 0 0 0 1.3.6c.2 0 .3-.2 1-1l.5-.7.6.8.7.8c.4.3 1 .3 1.3 0l.2-.3a1 1 0 0 0 0-.8l-.8-1.2-.7-1a26 26 0 0 0 1.5-2 .8.8 0 0 0 .1-.4c0-.4-.1-.7-.5-.9H20c-.4 0-.5 0-1.2.8l-.7.8-.6-.7-.7-.9a1 1 0 0 0-1 0Zm-9 2 .4.1c.3.1.6.5.7.8l.1.6v.6c-.6 1-2 1.2-2.7.3-.3-.3-.3-.5-.3-1v-.5c.3-.5.7-.8 1.1-1a1.5 1.5 0 0 1 .7 0Zm5.7 0c.4 0 .8.4 1 .8l.2.6-.1.7c-.5.9-1.6 1.1-2.4.6a1.4 1.4 0 0 1-.6-1.1 1.4 1.4 0 0 1 .5-1.2 1.5 1.5 0 0 1 1.4-.4Z"/></svg>',brightness:'<svg width="24" height="24"><path d="M12.7 18.3a1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v1a1 1 0 0 0 .3.7 1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7v-1a1 1 0 0 0-.3-.7ZM11.3 5.7a1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3A1 1 0 0 0 13 5V4a1 1 0 0 0-.3-.7A1 1 0 0 0 12 3a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v1a1 1 0 0 0 .3.7Zm9.4 5.6a1 1 0 0 0-.7-.3h-1a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.7 1 1 0 0 0 .7.3h1a1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7Zm-15 1.4A1 1 0 0 0 6 12a1 1 0 0 0-.3-.7A1 1 0 0 0 5 11H4a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.7 1 1 0 0 0 .7.3h1a1 1 0 0 0 .7-.3Zm13 4.6-.7-.8a1 1 0 0 0-.8-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.8l.7.7a1 1 0 0 0 .7.3 1 1 0 0 0 .8-.3 1 1 0 0 0 .3-.8 1 1 0 0 0-.3-.7ZM5.3 6.7l.7.8a1 1 0 0 0 .8.3 1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.8l-.7-.7A1 1 0 0 0 6 5a1 1 0 0 0-.8.3 1 1 0 0 0-.3.8 1 1 0 0 0 .3.6Zm12 1a1 1 0 0 0 .7-.2l.7-.7A1 1 0 0 0 19 6a1 1 0 0 0-.3-.8 1 1 0 0 0-.8-.3 1 1 0 0 0-.7.3l-.7.7a1 1 0 0 0-.3.8 1 1 0 0 0 .3.7 1 1 0 0 0 .7.2ZM6.7 16.4a1 1 0 0 0-.8.2l-.7.7a1 1 0 0 0-.3.7 1 1 0 0 0 .3.8 1 1 0 0 0 .8.3 1 1 0 0 0 .7-.3l.7-.7a1 1 0 0 0 .3-.8 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3Z"/><path fill-rule="evenodd" d="M13.6 8.3A4 4 0 0 0 12 8a4 4 0 0 0-1.6.3A4 4 0 0 0 9 9.5a4 4 0 0 0-.6 1A4 4 0 0 0 8 12c0 .6.1 1 .3 1.6a4 4 0 0 0 2.1 2 4 4 0 0 0 1.6.4 4 4 0 0 0 1.6-.3 4 4 0 0 0 2-2.1A4 4 0 0 0 16 12a4 4 0 0 0-.3-1.6 4 4 0 0 0-2.1-2ZM14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z" fill-rule="nonzero"/></svg>',camera:'<svg height="24" width="24"><g clip-rule="evenodd" fill-rule="evenodd"><path d="M10 5.4a1 1 0 0 1 .8-.4h4.4a1 1 0 0 1 .8.4l1.2 1.8h2.3A2.5 2.5 0 0 1 22 9.6v8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 4 17.6v-8a2.5 2.5 0 0 1 2.5-2.4h2.3zM11.4 7l-1.2 1.7a1 1 0 0 1-.8.5h-3a.5.5 0 0 0-.4.4v8a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.4h-2.9a1 1 0 0 1-.8-.5L14.6 7z"/><path d="M13 11.4a2 2 0 1 0 0 3.8 2 2 0 0 0 0-3.8zm-4 1.9a4 4 0 1 1 8 0 4 4 0 0 1-8 0z"/></g></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7Z" fill-rule="nonzero"/></svg>',caption:'<svg height="24" width="24"><path d="M6 16h8v-2H6zm10 0h2v-2h-2zM4 20a2 2 0 0 1-1.5-.6A2 2 0 0 1 2 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 4 4h16c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm0-2h16V6H4z"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="m15.7 2 1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 0 1-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2ZM18 12l-4.5-4L9 12h9ZM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16Z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="m13 11-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-3-3-3 3h6Z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 0 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1Zm4.8-6.8V10H7.7V5.8h-1v-1h2ZM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1Zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1ZM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2V18.7l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1Zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6Zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4Zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8Zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1Z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2ZM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Z" fill-rule="evenodd"/></svg>',"checkmark-filled":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm4.8 5a1 1 0 0 0-1.4.3l-5.4 8-2-2.1a1 1 0 1 0-1.5 1.4l3 3a1 1 0 0 0 1.5-.2l6-9a1 1 0 0 0-.2-1.4Z"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11Z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1Z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3Z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0Z" fill-rule="nonzero"/></svg>',"close-filled":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm4.7 5.3a1 1 0 0 0-1.3 0L12 10.6 8.6 7.3a1 1 0 0 0-1.3 1.3l3.3 3.4-3.3 3.4a1 1 0 0 0 1.3 1.3l3.4-3.3 3.4 3.3a1 1 0 0 0 1.3-1.3L13.4 12l3.3-3.4a1 1 0 0 0 0-1.3Z"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5Z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11Zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2Zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2ZM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5Z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24" class="color-swatch-remove-color"><path stroke="#000" stroke-width="2" d="M21 3 3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/></svg>',contrast:'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 0 1 19.4 9c.4 1 .6 2 .6 3.1s-.2 2.1-.6 3.1a8 8 0 0 1-1.7 2.6 8 8 0 0 1-2.6 1.7 7.8 7.8 0 0 1-3.1.6 7.8 7.8 0 0 1-3.1-.6 8 8 0 0 1-2.6-1.7A8 8 0 0 1 4.6 15 7.8 7.8 0 0 1 4 12c0-1.1.2-2.1.6-3.1a8 8 0 0 1 1.7-2.6A8 8 0 0 1 9 4.6 7.8 7.8 0 0 1 12 4Zm-6 8a6 6 0 0 0 1.8 4.2 6 6 0 0 0 1.9 1.3 5.8 5.8 0 0 0 2.3.5V6c-.8 0-1.6.2-2.3.5a6 6 0 0 0-2 1.3 6 6 0 0 0-1.2 1.9A5.8 5.8 0 0 0 6 12Z"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7Zm0 12V9h-7v10h7Z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3ZM9 9v5l5-5H9Zm1 6h5v-5l-5 5Z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0 1 10.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 0 1 2 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 0 1 7 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7Zm12.3 5h-3v10h3v-10ZM8 13.8h-.3l-.4.2a2.8 2.8 0 0 0-.7.4v.1a2.8 2.8 0 0 0-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 0 0 .8-.3 2.4 2.4 0 0 0 .7-.7 2.5 2.5 0 0 0 .3-.8 1.5 1.5 0 0 0 0-.8 1 1 0 0 0-.2-.4 1 1 0 0 0-.5-.2H8Zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4ZM7 5.8h-.4a1 1 0 0 0-.5.3 1 1 0 0 0-.2.5v.7a2.5 2.5 0 0 0 .3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 0 0 0-.8 2.6 2.6 0 0 0-.3-.8A2.5 2.5 0 0 0 7.7 6l-.4-.1H7Z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l2 2V3h14ZM8.5 15.3h-.3a2.6 2.6 0 0 0-.8.4 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3L9 18V18l.4-.4.2-.4.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2h-.5Zm7 0H15a1 1 0 0 0-.4.3 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4a2.8 2.8 0 0 0 .5.7h.1a2.8 2.8 0 0 0 .8.6l.4.1h.7l.5-.2.2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3h-.3ZM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4Zm8.5-7.1h-11v2h11v-2Z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8Zm-8.5 2.2.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1Zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4Zm5.4 4 .2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2Z" fill-rule="evenodd"/></svg>',"document-gear-properties":'<svg height="24" width="24"><path d="M17.3 14.5a7.1 7.1 0 0 1 1.2.6l1.5-.5 1 1.8-1.2 1V18.7l1.2 1-1 1.6-1.5-.4a4.5 4.5 0 0 1-.6.3 7.1 7.1 0 0 1-.6.3L17 23h-2l-.3-1.5a7.4 7.4 0 0 1-.6-.3 4.5 4.5 0 0 1-.6-.3l-1.5.5-1-1.8 1.2-1a3.9 3.9 0 0 1 0-.6v-.7l-1.2-1 1-1.6 1.5.4a4.5 4.5 0 0 1 1.2-.6L15 13h2zM16 16a2 2 0 0 0-1.5.6A1.9 1.9 0 0 0 14 18c0 .6.2 1 .6 1.4s1 .6 1.5.6 1-.2 1.5-.6.6-.8.6-1.4-.2-1-.6-1.4A2 2 0 0 0 16 16z" fill-rule="evenodd"/><path d="M19 7.6V12h-2V9h-4V5H7v14h3v2H7a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h7.4z"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5Zm0 4h2v2h-2V9ZM9 9h2v2H9V9Zm4 4h2v2h-2v-2Zm-4 0h2v2H9v-2Zm0 4h2v2H9v-2Zm4 0h2v2h-2v-2ZM9 5h2v2H9V5Z" fill-rule="evenodd"/></svg>',dropbox:'<svg height="24" width="24"><path clip-rule="evenodd" d="m6.4 9.3-3-2a1 1 0 0 1 0-1.6l4-2.5a1 1 0 0 1 1 0L12 5.5l3.6-2.3a1 1 0 0 1 1 0l4 2.5a1 1 0 0 1 0 1.7l-3 1.9 3 1.9a1 1 0 0 1 0 1.6l-2.9 1.9V16c0 .3-.1.6-.4.8l-4.5 3a1 1 0 0 1-1.2 0l-4.4-3a1 1 0 0 1-.5-.9v-1l-3.2-2.2a1 1 0 0 1 0-1.6zm3 0L12 7.5l2.6 1.8L12 11zM8.9 15v.4l3.3 2.3 3.4-2.3v-.2L12 13l-3.1 2zm-1-10-2 1.4 2 1.3 2-1.3zm8.2 0-2 1.4 2 1.3 2-1.3zm-2 6.9 2-1.3 2 1.3-2 1.3-2-1.3zm-8.3 0 2-1.3L10 12l-2 1.3-2-1.3z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7Zm-2 2h-3v12h3V8Zm-2-6v2H8v15H6V2h7Z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16Zm-2 2H8v3h12v-3Zm-1-6v2H4v5H2V7h17Z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10Zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="m19.8 8.8-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5Zm-2-.2 1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5Zm-1 1-2.5-2.4-6 6 2.5 2.5 6-6Zm-7 7.1-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5Z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.3 2 3-4.7 3.7 6H7l2-3.3Z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4Z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"/></svg>',evernote:'<svg width="24" height="24"><path fill-rule="evenodd" d="m9.5 3-.3.1-2.6 2.6C3.8 8.5 4 8.2 4 8.7c0 1.3.3 3 .6 4.3.5 2 1.1 3.2 2 3.7l1.2.3c1 .2 1.5.2 2.2.2 1.3 0 1.7 0 2.2-.4.3-.2.3-.4.4-1a38.4 38.4 0 0 1 .3-.4l.3.1 1.8.1h1.6v-1.8H14l-.1-.2a6.8 6.8 0 0 1-.5-1c-.2-.4-.3-.6-.5-.7a.8.8 0 0 0-.5-.1.9.9 0 0 0-.8.5l-.4 1.6-.3 1.5H9.4l-2-.3a1 1 0 0 1-.1-.2A10.1 10.1 0 0 1 6 9.7v-.2h4l.5-.5V5H12c.4.2.7.7.8 1.1a1 1 0 0 0 .2.6c.2.2.3.2 1 .3 1.2 0 2 .2 2.5.6.4.2.8.7 1 1.2.3 1.2.5 4 .3 6.4 0 1.8-.4 3.4-.8 4h-.7a8 8 0 0 1-.8 0c-.2 0-.3-.3-.2-.5a.5.5 0 0 1 .4-.3h.9v-1.8H16c-.7 0-.9 0-1.2.2-.9.4-1.4 1.2-1.4 2.1l.1.4.1.2a1 1 0 0 1 .1.2c.3.7.8 1.2 1.4 1.3l1.2.1h1.2a2 2 0 0 0 1-.8 9 9 0 0 0 1.1-4.3c.2-3 0-6.3-.4-7.7A4.3 4.3 0 0 0 16 5.3a7 7 0 0 0-1.3-.2 7.2 7.2 0 0 1-.4 0 5.5 5.5 0 0 1 0-.3c-.2-.5-.6-1-1.2-1.4a3 3 0 0 0-.5-.2c-.4-.2-.5-.2-1.8-.2a26.5 26.5 0 0 0-1.3 0Zm-.8 4v.7H7.2l.7-.8.8-.7v.7Zm7 3.5c-.4 0-.7.5-.9 1v.7h.3c.7 0 1.1.2 1.5.6l.3.2.3-.6V11a1 1 0 0 0-.6-.4 2 2 0 0 0-.8 0Z" clip-rule="evenodd"/></svg>',"export-pdf":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"/><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',"export-word":'<svg width="24" height="24"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5Z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3Z"/><path d="M16.4 9.2a1 1 0 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z"/></g></svg>',exposure:'<svg width="24" height="24"><path d="M5 21a2 2 0 0 1-1.4-.6A2 2 0 0 1 3 19V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h14c.6 0 1 .2 1.4.6.4.4.6.8.6 1.4v14c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H5Zm0-2h14V5L5 19Zm9.5-1v-2h-2v-1.5h2v-2H16v2h2V16h-2v2h-1.5ZM6 8.5h5V7H6v1.5Z"/></svg>',fb:'<svg width="24" height="24"><path fill-rule="evenodd" d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-11 6.7V14H8.1v-2.5h2v-1C10 8.2 11.5 7 12.8 7H16v2.5h-2.4c-.8 0-1 .7-1 1.3v.7h3.2l-1 2.5h-2v5a7 7 0 1 0-2.8-.2Z" clip-rule="evenodd"/></svg>',feedback:'<svg width="24" height="24"><path fill-rule="evenodd" d="M16 6c1 0 2 1 2 2v5c0 1-1 2-2 2h-3l-4 3v-3H8c-1 0-2-1-2-2V8c0-1 1-2 2-2h8Zm-7 5v1h4v-1H9Zm0-2v1h6V9H9Z"/></svg>',fill:'<svg width="24" height="26"><path d="m16.6 12-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z" fill-rule="nonzero"/></svg>',flickr:'<svg width="24" height="24"><path d="M8.2 15.3c1.7 0 3.1-1.4 3.1-3.1A3.2 3.2 0 0 0 8.1 9 3.2 3.2 0 0 0 5 12.2c0 1.7 1.4 3 3.2 3Zm7.6 0c1.7 0 3.2-1.4 3.2-3.1a3.2 3.2 0 0 0-6.3 0c0 1.7 1.4 3 3.1 3Z"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2Zm4-8h2V9h-2v2ZM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',folder:'<svg width="24" height="24"><path fill-rule="evenodd" d="M5.6 6a.6.6 0 0 0-.6.6v11.2a.6.6 0 0 0 .6.6h12.8a.6.6 0 0 0 .6-.6V9a.6.6 0 0 0-.6-.6h-7.2a1 1 0 0 1-.8-.4L9 6H5.6ZM3.8 4.8A2.6 2.6 0 0 1 5.6 4h4a1 1 0 0 1 .8.4l1.3 2h6.7A2.6 2.6 0 0 1 21 9v8.8a2.6 2.6 0 0 1-2.6 2.6H5.6A2.6 2.6 0 0 1 3 17.8V6.6c0-.7.3-1.4.8-1.8Z" clip-rule="evenodd"/></svg>',footnote:'<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',"format-code":'<svg width="24" height="24"><path d="m10 22 2-7H6l9-13h2l-2 8h7L12 22h-2ZM6 2h7l-1.4 2H6V2Zm4.2 4H4v2h4.8l1.4-2Zm-2.7 4H2v2h4l1.5-2Z"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3Z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="m5 15.7 2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7ZM5 18V19h3l1.8-1.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1Z"/></svg>',gamma:'<svg height="24" width="24"><path d="M11.5 16.3a.7.7 0 1 0 1.4 0V14l2.7-6a.7.7 0 1 0-1.2-.6l-2.2 5-2.3-4.9C9.6 7 8.7 7 8 7.2v1.1c.8-.2.9 0 1.2 1l2.3 4.7z"/><path d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2h14v14H5z" fill-rule="evenodd"/></svg>',"google-drive":'<svg height="24" width="24"><path clip-rule="evenodd" d="M8.7 4.5a1 1 0 0 1 .9-.5h4.8a1 1 0 0 1 .9.5l5.6 9.7a1 1 0 0 1 0 1l-2.4 4.2a1 1 0 0 1-.9.5H6.4a1 1 0 0 1-.9-.5l-2.4-4.2a1 1 0 0 1 0-1zM10.2 6l-4.5 7.7h2.5L12.7 6h-2.5zm4.2 1 4.4 7.7-1.2 2.2-4.4-7.7zM12 11.2l-1.5 2.5h3zm2.6 4.5H5.7L7 17.9h8.9l-1.3-2.2z" fill-rule="evenodd"/></svg>',"google-photos":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12.4 3c-.8 0-1.4.7-1.4 1.4v3.2a5 5 0 0 0-8 4c0 .8.6 1.4 1.4 1.4h3.2a5 5 0 0 0-1 3 5 5 0 0 0 5 5c.8 0 1.4-.6 1.4-1.4v-3.2a5 5 0 0 0 8-4c0-.8-.7-1.4-1.4-1.4h-3.2a5 5 0 0 0-4-8Zm.6 8V5a3 3 0 0 1 2.4 3 3 3 0 0 1-2.4 3Zm-2 0H5a3 3 0 0 1 3-2.4 3 3 0 0 1 3 2.4Zm2 2a3 3 0 0 0 3 2.4 3 3 0 0 0 3-2.4h-6Zm-4.4 3a3 3 0 0 1 2.4-3v6a3 3 0 0 1-2.4-3Z" clip-rule="evenodd"/></svg>',grayscale:'<svg height="24" width="24"><path d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12.4 0H19v3.6zm-2.8 0h-2.2l8.6 8.6v-2.2zm-5 0H5l14 14v-2.6z" fill-rule="evenodd"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8Z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',huddle:'<svg height="24" width="24"><path d="M10.3 5.6V8h.8v-2l3.5 2 4.3-2.5L14.6 3l-4.3 2.6zM14.6 8v5.2l4.3-2.6V5.6L14.6 8zM6 13.3v2.5h.9v-2l3.4 2 4.3-2.5-4.3-2.6zm4.3 2.6V21l4.3-2.6v-5.1l-4.3 2.6z"/></svg>',"image-decorative":'<svg width="24" height="24"><path d="M12 10c.3 0 .5-.1.7-.3A1 1 0 0 0 13 9a1 1 0 0 0-.3-.7A1 1 0 0 0 12 8a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 1 1Zm0 6a3 3 0 0 1-1.8-.5A3 3 0 0 1 9.1 14a2 2 0 0 0-.2 0 3 3 0 0 1-2.5-1 3 3 0 0 1-.9-2.2A3 3 0 0 1 6.2 9a3.4 3.4 0 0 1-.5-1 3 3 0 0 1-.2-1 3 3 0 0 1 1-2.2A3 3 0 0 1 8.8 4H9a3 3 0 0 1 1.1-1.4A3 3 0 0 1 12 2a3 3 0 0 1 1.8.5c.5.4.9.9 1.1 1.5h.2a3 3 0 0 1 2.5.8 3 3 0 0 1 .9 2.3c0 .3 0 .7-.2 1a2.8 2.8 0 0 1-.5.9l.5 1 .2 1a3 3 0 0 1-1 2.2 3 3 0 0 1-2.4.9 1.8 1.8 0 0 0-.2 0 3 3 0 0 1-1.1 1.4 3 3 0 0 1-1.8.5Zm0 7a8.7 8.7 0 0 1 .7-3.5 9.2 9.2 0 0 1 2-2.8 9.2 9.2 0 0 1 2.8-2A8.6 8.6 0 0 1 21 14a8.6 8.6 0 0 1-.7 3.5 9.2 9.2 0 0 1-2 2.8 9.2 9.2 0 0 1-2.8 2 8.6 8.6 0 0 1-3.5.7Zm2.5-2.5a6.8 6.8 0 0 0 2.4-1.5 6.8 6.8 0 0 0 1.7-2.6c-1 .4-1.8 1-2.6 1.7a6.8 6.8 0 0 0-1.5 2.4ZM12 23a8.6 8.6 0 0 0-.7-3.5 9.2 9.2 0 0 0-2-2.9 9.2 9.2 0 0 0-2.8-1.9A8.6 8.6 0 0 0 3 14a8.7 8.7 0 0 0 .7 3.5 9.2 9.2 0 0 0 2 2.9 9.2 9.2 0 0 0 2.8 1.9 8.6 8.6 0 0 0 3.5.7Zm-2.5-2.5A6.8 6.8 0 0 1 7.2 19a6.8 6.8 0 0 1-1.6-2.6c.9.4 1.7 1 2.5 1.7a6.8 6.8 0 0 1 1.6 2.4Zm5.9-8.4c.3 0 .5-.1.8-.4.2-.2.3-.5.3-.8 0-.2 0-.4-.2-.6a1.3 1.3 0 0 0-.5-.4l-.8-.4a3 3 0 0 1-.2.5 3.8 3.8 0 0 1-.2.5 2.5 2.5 0 0 1-.3.4 4 4 0 0 1-.4.4l.8.6a.8.8 0 0 0 .3.1h.4ZM15 8.5l.8-.4.5-.4.2-.6a1.1 1.1 0 0 0-.3-.8 1 1 0 0 0-.8-.4 1.1 1.1 0 0 0-.7.2l-.8.6.4.4.3.4a3.9 3.9 0 0 1 .4 1Zm-4-2.3a2.7 2.7 0 0 1 1-.2 2.7 2.7 0 0 1 1 .2l.2-1.1c0-.3-.1-.6-.4-.8A1.2 1.2 0 0 0 12 4c-.3 0-.6.1-.8.3-.3.2-.4.5-.3.8v1.1Zm1 7.8c.3 0 .6-.1.8-.3.3-.2.4-.5.3-.8v-1.1a2.7 2.7 0 0 1-1.1.2 2.7 2.7 0 0 1-1-.2l-.2 1.1c0 .3.1.6.4.8.2.2.5.3.8.3ZM9 8.5a3 3 0 0 1 .4-1l.3-.4.4-.4-.8-.6A.9.9 0 0 0 9 6a1.2 1.2 0 0 0-.3 0c-.4 0-.6 0-.9.3a1.1 1.1 0 0 0-.3.8c0 .2 0 .4.2.6l.5.4.9.4Zm-.3 3.6H9l.3-.2.8-.6a5.5 5.5 0 0 1-.4-.4 2.1 2.1 0 0 1-.3-.4 3.8 3.8 0 0 1-.2-.5 3 3 0 0 1-.1-.5l-1 .4-.4.4a1.1 1.1 0 0 0-.2.6c0 .3.2.6.4.8.2.2.4.4.7.4Z"/></svg>',"image-enhancements":'<svg height="24" width="24"><path d="M5.3 21a2 2 0 0 1-1.5-.6 2 2 0 0 1-.6-1.4V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5.2 3H13v2H5.2v14h14v-8h2v8c0 .6-.1 1-.5 1.4a2 2 0 0 1-1.4.6z"/><path d="M11 9a4 4 0 0 0 4 4 4 4 0 0 0-4 4 4 4 0 0 0-4-4 4 4 0 0 0 4-4zm5.5-6c.2 2.1 2.2 4.1 4.5 4.5-2.3.4-4.3 2.4-4.5 4.5A5.2 5.2 0 0 0 12 7.5 5.2 5.2 0 0 0 16.5 3z"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="m5 15.7 3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7ZM5 18V19h3l2.8-2.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" fill-rule="nonzero"/></svg>',"import-word":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"/><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-1 3v2h2V7h-2Zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4Z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z"/></g></svg>',instagram:'<svg height="24" width="24"><path clip-rule="evenodd" d="M10.1 9a4 4 0 1 1 4.4 6.6A4 4 0 0 1 10.1 9zm2.2 1.3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" fill-rule="evenodd"/><path d="M16 9.3a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z"/><path clip-rule="evenodd" d="M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z" fill-rule="evenodd"/></svg>',invert:'<svg height="24" width="24"><path d="M5 4 3.6 5.4l3.9 4C6.6 10.7 6 12.3 6 14a6 6 0 0 0 10.3 4.2l1.9 1.8 1.4-1.4z" fill-rule="evenodd"/><path d="M13.4 8.4c.9 1 1.6 2.1 2 3.2l2.6 2.6V14c0-5-6-10-6-10s-1 .8-2.1 2l1.4 1.5.7-.7 1.4 1.6z"/></svg>',italic:'<svg width="24" height="24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 0 1-2-2.8Zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7Zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3Zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 0 1-.3-2Zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1Zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6Zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3Zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1Zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3Zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1Zm3-1.4-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 0 0-1.3-3.5Zm-9 0 2 .2V5.5a9 9 0 0 0-2 2.2Zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 0 0-2-2.3Zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 0 1 1.9-2.5Zm4.4 0 .1.1a10 10 0 0 1 1.8 2.4l1.1-.7a7.5 7.5 0 0 0-3-1.8Z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zM7 3.6l3.7 3.7a1 1 0 0 1-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 0 1 1.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="m15 9-8 8H4v-3l8-8 3 3Zm1-1-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1ZM4 18h16v2H4v-2Z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2Z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg height="48" width="48"><path d="M8 14a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 34a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z" fill-rule="evenodd"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-bull-default":'<svg height="48" width="48"><path d="M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/><path d="M12 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z" fill-rule="evenodd"/><path d="M16 31h6v6h-6z"/><path d="M16 31h6v6h-6z"/><path d="M18 12h22v4H18zm4 10h18v4H22zm4 10h14v4H26z" opacity=".2"/></svg>',"list-bull-disc":'<svg height="48" width="48"><path d="M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-bull-square":'<svg height="48" width="48"><path d="M8 21h6v6H8zm0 10h6v6H8zm0-20h6v6H8z"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2Zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5Zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7Zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7Zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6ZM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7ZM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4Zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3ZM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6Zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7Zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4Zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3Zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7Zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8Zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4ZM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22Zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3ZM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM37.1 34.6 34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1ZM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4Zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8Zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3ZM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22Zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1Zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33Zm0 10v-1.2h-1.3V26H33Zm0 10v-1.2h-1.3V36H33Z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15Zm0 10v-1.2h1.3V26H15Zm0 10v-1.2h1.3V36H15Z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="m39.3 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.7 2.3h1.6l-.8-2.3ZM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7Zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26ZM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="m12.6 17-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3ZM11 12.3l-.7 2.3h1.6l-.8-2.3Zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7ZM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7ZM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26Zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3Zm0 10v-1.2H33V27h-1.3Zm0 10v-1.2H33V37h-1.3Z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15Zm0 10v-1.2h1.3V27H15Zm0 10v-1.2h1.3V37H15Z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3ZM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',"math-equation":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 4.8c.1-.5.5-.8 1-.8h10a1 1 0 1 1 0 2h-9.2L8.3 19.2a1 1 0 0 1-1.7.4l-3.4-4.2a1 1 0 0 1 1.6-1.2l2 2.5L9 4.8Zm9.7 5.5c.4.4.4 1 0 1.4L17 13.5l1.8 1.8a1 1 0 1 1-1.4 1.4L15.5 15l-1.8 1.8a1 1 0 0 1-1.4-1.4l1.8-1.8-1.8-1.8a1 1 0 0 1 1.4-1.4l1.8 1.8 1.8-1.8a1 1 0 0 1 1.4 0Z"/></svg>',mentions:'<svg height="24" width="24"><path d="M12 21a8.8 8.8 0 0 1-3.5-.7 9 9 0 0 1-2.9-2 9 9 0 0 1-1.9-2.8A8.8 8.8 0 0 1 3 12c0-1.3.2-2.4.7-3.5a9 9 0 0 1 4.8-4.8A8.8 8.8 0 0 1 12 3c1.3 0 2.4.2 3.5.7a9.1 9.1 0 0 1 4.8 4.8A8.7 8.7 0 0 1 21 12v1.4a3 3 0 0 1-.9 2.2 3 3 0 0 1-2.2.9c-.5 0-1-.1-1.5-.4a3.8 3.8 0 0 1-1.1-1 4.8 4.8 0 0 1-1.5 1 4.3 4.3 0 0 1-1.8.4c-1.2 0-2.3-.4-3.2-1.3-.9-.9-1.3-2-1.3-3.2s.4-2.3 1.3-3.2c.9-.9 2-1.3 3.2-1.3s2.3.4 3.2 1.3c.9.9 1.3 2 1.3 3.2v1.4c0 .4.1.7.4 1 .3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1V12c0-2-.7-3.8-2.1-5.2S14 4.7 12 4.7s-3.8.7-5.2 2.1S4.7 10 4.7 12s.7 3.8 2.1 5.2 3.2 2.1 5.2 2.1h4.5V21zm0-6.2c.8 0 1.4-.3 2-.8a2.7 2.7 0 0 0 .8-2c0-.8-.3-1.4-.8-2a2.7 2.7 0 0 0-2-.8c-.8 0-1.4.3-2 .8a2.7 2.7 0 0 0-.8 2c0 .8.3 1.4.8 2a2.7 2.7 0 0 0 2 .8z"/></svg>',minus:'<svg width="24" height="24"><path d="M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="m15 13 2-2v8H5V7h8l-2 2H7v8h8v-4Zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19Z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3Zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1Z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>',onedrive:'<svg height="24" width="24"><path d="M4 13.7h1zm16 .7h-1zm-11.7-4A4.4 4.4 0 0 1 12.1 8V6a6.4 6.4 0 0 0-5.6 3.4l1.8 1zM12.1 8c2 0 3.6 1.4 4 2.8l2-.5A6.3 6.3 0 0 0 12 6v2zm8.1 6.8-9.8-5.5-1 1.8 9.8 5.5 1-1.8zm-9.8-5.5A5 5 0 0 0 3 13.7h2A3 3 0 0 1 9.5 11l1-1.8zM3 13.7a5 5 0 0 0 1 2.8l1.5-1.1a3 3 0 0 1-.5-1.7zm15.8 1.6a2.3 2.3 0 0 1-2 1.4v2a4.3 4.3 0 0 0 3.9-2.6zm-2 1.4H8v2h8.7zm-8.8 0a3 3 0 0 1-2.5-1.3L4 16.5a5 5 0 0 0 4 2.2v-2zm12.7-.6c.2-.6.3-1.1.3-1.7h-2c0 .3 0 .6-.2.9zm.3-1.7c0-3-3.1-5.1-6-4l.8 1.9a2.3 2.3 0 0 1 3.2 2h2zm-6-4L4.4 15l.8 1.9 10.7-4.6-.7-1.8z"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2Zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19Zm-1 8.8.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3Zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3ZM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4 1 13l6.4 6.5 6.5-6.5-6.5-6.5ZM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7ZM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1Z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2Z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1Z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2Z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1Z" fill-rule="nonzero"/></svg>',"photo-filter":'<svg height="24" width="24"><path d="M4.4 21c-.3 0-.6-.2-.9-.5-.3-.3-.4-.6-.5-.9L19.6 3c.3 0 .6.3.9.5l.5.9zM3 14.7v-2.8L11.9 3h2.8zM3 7V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h2zm14 14 4-4v2c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm-7.7 0L21 9.3v2.8L12 21z"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"/></svg>',preferences:'<svg width="24" height="24"><path d="m20.1 13.5-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5Zm-2.4-1 .7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3Zm-1 10H7v-4h10v4Zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5Zm.5-8H6v2h12V5Z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3Z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m5 22.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3Z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5Z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"revert-changes":'<svg height="24" width="24"><path d="m8.9 18.8.4 3.2H13v-2h-2v-2.6a4.6 4.6 0 0 1-1.6-.6 5.9 5.9 0 0 1-1.3-1l-2.5 1-1-1.7 2.2-1.6a4 4 0 0 1-.2-.7 5.9 5.9 0 0 1 0-.8v-.8l.2-.8-2.2-1.6 1-1.7 2.5 1a6 6 0 0 1 1.2-.9l1.4-.6.4-2.6h2l.3 2.6A5.6 5.6 0 0 1 16 8.2l2.5-1 1 1.6-2.2 1.7.2.7v.8a5 5 0 0 1 0 1h2a2.6 2.6 0 0 0 0-.5V11.3l2.6-2-2.8-4.7-3 1.3a8.2 8.2 0 0 0-.5-.4 3.8 3.8 0 0 0-.6-.3L14.8 2H9.3l-.4 3.2a5 5 0 0 0-1.2.7l-3-1.3L2 9.4l2.6 2V12.6l-2.6 2 2.7 4.7 3-1.3a8 8 0 0 0 1.2.7z"/><path d="m14.5 20.3 2.1-2-2.1-2.2 1.4-1.4 2.1 2.1 2.1-2 1.4 1.3-2 2.1 2 2.1-1.4 1.4-2.1-2-2.1 2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></svg>',"revision-history":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8Z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z" fill-rule="evenodd"/></svg>',saturation:'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 20.5a6 6 0 1 1-5.9-10.2 6 6 0 1 1 11.8 0A6 6 0 1 1 12 20.5Zm-1.1-7.7a6 6 0 0 0-.2.3 4.3 4.3 0 0 1-2-1.3c.9.1 1.6.5 2.2 1Zm2.4.3a6 6 0 0 0-.2-.3 4.3 4.3 0 0 1 2.2-1 4.3 4.3 0 0 1-2 1.3ZM12.2 15a6.3 6.3 0 0 1-.4 0 4.3 4.3 0 0 0 .2 2.5 4.3 4.3 0 0 0 .2-2.5Zm.9 4.2a6 6 0 0 0 .8-4.5 6 6 0 0 0 3.4-2.8 4.3 4.3 0 0 1-1.3 8.4 4.3 4.3 0 0 1-2.9-1.1Zm-2.2 0a4.3 4.3 0 1 1-4.2-7.3 6 6 0 0 0 3.4 2.8 6 6 0 0 0 .8 4.5Zm-3-9.2a4.3 4.3 0 1 1 8.3 0 6 6 0 0 0-4.2 1.5A6 6 0 0 0 7.8 10Z"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3Z"/></svg>',send:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="m13.3 22 7-18.3-18.3 7L9 15l4.3 7ZM18 6.8l-.7-.7L9.4 14l.7.7L18 6.8Z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6ZM8 8h2V6H8v2Zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6ZM14 13h2v-2h-2v2Zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6ZM8 18h2v-2H8v2Z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path fill-rule="evenodd" d="m16 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2Z"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7ZM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7Z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6Zm0-3v2h2V5H6Zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12Z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"/></svg>',"suggestededits-badge":'<svg height="24" width="24"><path d="M11 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V9.7a6 6 0 0 1-2 .3v9H7V5h4a6 6 0 0 1 0-2z"/><path d="M15 13v-2h-4v2zm-3 2H9v2h3zm-1-8H9v2h2zm4 10v-2h-2v2z"/><path d="M21 4a4 4 0 1 1-8 0 4 4 0 0 1 8 0z" class="tox-icon--badge"/></svg>',suggestededits:'<svg width="24" height="24"><path d="M7 3h7.4L19 7.6V19a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2Zm0 16h10V9h-3V5H7v14Z" clip-rule="evenodd"/><path d="M9 7h2v2H9V7Zm2 4h4v2h-4v-2Zm-2 4h3v2H9v-2Z"/><path d="M9 7h2v2H9V7Zm4 8h2v2h-2v-2Z"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8Zm-2 2H5v5h6V6Z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 0 1 2 2v7h-8v-2h6V6h-6V4Z" opacity=".2"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3Z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8 0h-6v5h6v-5Zm-8-7H5v5h6V6Z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5Z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3Z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z"/><path d="m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-1.1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1ZM9 6H5v5h4V6Z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1Zm11-2h-4v5h4V6Z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1Z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 9h-4v5h4v-5Zm-6 0H9v5h4v-5Zm0-7H9v5h4V6Zm6 0h-4v5h4V6Z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15.5V18h3v-2.5H5Zm14-5h-9V18h9v-7.5ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Zm-8 7.5h3v-3H5v3Z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-9h-6v3h6V6ZM5 9h6V6H5v3Z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2Zm-8.5-1H5v3h3v-3ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 11H5v3h6v-3Zm8 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z"/></svg>',"template-add":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z"/><path d="M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2Z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7Z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4Zm2.6-7.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z"/></g></svg>',"text-size-decrease":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z"/></svg>',"text-size-increase":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z"/></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"transform-image":'<svg height="24" width="24"><path d="M3 21v-6h2V9H3V3h6v2h6V3h6v6h-2v6h2v6h-6v-2H9v2zm6-4h6v-2h2V9h-2V7H9v2H7v6h2zM5 7h2V5H5zm12 0h2V5h-2zm0 12h2v-2h-2zM5 19h2v-2H5z"/></svg>',translate:'<svg width="24" height="24"><path d="m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z" fill-rule="evenodd"/></svg>',typography:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z"/><path d="m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8Z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2ZM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1ZM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5Zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5Zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17Zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19Zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19Z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2Z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2ZM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6Z"/></svg>',"upload-from-device":'<svg width="24" height="25"><path d="M11 19a1 1 0 1 0 2 0v-3.2l1.5 1a1 1 0 1 0 1-1.7L12 12.8l-3.5 2.3a1 1 0 0 0 1 1.7l1.5-1V19Z"/><path d="M9.6 4c.3 0 .6.2.8.5l1.3 2h6.7c.7 0 1.4.2 1.8.7.5.5.8 1.2.8 1.9v8.3c0 .7-.3 1.3-.8 1.8a2.6 2.6 0 0 1-1.8.8H16v-2h2.4a.6.6 0 0 0 .4-.2.6.6 0 0 0 .2-.4V9a.6.6 0 0 0-.2-.5.6.6 0 0 0-.4-.1h-7.2a1 1 0 0 1-.8-.5L9 6H5.6a.6.6 0 0 0-.4.2.6.6 0 0 0-.2.4v10.8c0 .1 0 .3.2.4a.6.6 0 0 0 .4.2H8v2H5.6a2.6 2.6 0 0 1-1.8-.8 2.7 2.7 0 0 1-.8-1.8V6.6c0-.7.3-1.3.8-1.8A2.6 2.6 0 0 1 5.6 4h4Z"/></svg>',"upload-from-link":'<svg height="25" width="24"><path d="M11.5 11.8a1 1 0 0 1 1.9-.5 5 5 0 0 1-1.3 4.8l-2.4 2.3A4 4 0 1 1 4 13L5 12a1 1 0 0 1 1.4 1.4l-.7.8A2 2 0 1 0 8.3 17l2.4-2.4a3 3 0 0 0 .8-2.8z"/><path d="M10.1 11.8a1 1 0 0 1-2 .5 5 5 0 0 1 1.4-4.8L12 5.1a4 4 0 0 1 5.5 5.6l-.7.8a1 1 0 0 1-1.5-1.4l.8-.8a2 2 0 1 0-2.7-2.7l-2.4 2.3a3 3 0 0 0-.8 3zm5.7 7.2a1 1 0 1 0 2 0v-3l1.4 1.1a1 1 0 0 0 1.2-1.5l-3.6-2.9-3.6 2.9a1 1 0 0 0 1.2 1.5l1.4-1z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7ZM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13Z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .1-1.3l.1-.1 4.1-3z"/></g></svg>',vibrance:'<svg height="24" width="24"><path d="M12 20 22 4H2zm2.6-8 1.3-2H8l1.3 2h5.2zm-1.2 2h-2.8l1.4 2.2zm5-8L17 8H7L5.6 6h12.8z" fill-rule="evenodd"/></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2Zm-4 0v2a2 2 0 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15ZM5 15v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 11v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 7v2H3V7h2Zm16 0v2h-2V7h2ZM5 3v2H3c0-1.1.9-2 2-2Zm8 0v2h-2V3h2Zm6 0a2 2 0 0 1 2 2h-2V3ZM9 3v2H7V3h2Zm8 0v2h-2V3h2Z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z" fill-rule="evenodd"/></svg>',vk:'<svg width="24" height="24"><path fill-rule="evenodd" d="M14.8 17.4a2 2 0 0 1-1.3.7 8 8 0 0 1-7.7-3.6c-1.4-2-2.2-4.4-2.6-5.7L3 8.6A2 2 0 0 1 5 6h2.5c.4 0 .8.1 1.2.4A2 2 0 0 1 9.8 6h3.5a2 2 0 0 1 1.4.6 2 2 0 0 1 1.5-.6h2.4a2 2 0 0 1 2 2.5c-.5 1.5-1.2 2.6-1.8 3.6a12.5 12.5 0 0 1 2 3.2A2 2 0 0 1 19 18h-2.6a2 2 0 0 1-1.3-.5 6.9 6.9 0 0 1-.3-.2Zm.5-2.5-1.2-1a3 3 0 0 0-.8-.2v2.4h-1.7a5.6 5.6 0 0 1-.3 0c-3-.7-4.7-3.7-5.6-6.1A38.1 38.1 0 0 1 5 8.1V8h2.5a80.5 80.5 0 0 1 1.2 2.5c.6 1.2 1.2 2 2 2.1V9l-.9-1h3.5v4.1a5 5 0 0 0 .4-.3c.7-.7 1.2-1.4 1.6-2.2l.2-.3.7-1.3h2.4a8.5 8.5 0 0 1-.8 2l-1.3 2-.3.3a10.5 10.5 0 0 1 2.8 3.8h-2.6l-.8-.9a20.6 20.6 0 0 0-.3-.3Z" clip-rule="evenodd"/></svg>',warmth:'<svg height="24" width="24"><path d="M12 21.1c-1.4 0-2.6-.5-3.6-1.5s-1.5-2.1-1.5-3.5c0-.8.2-1.6.6-2.2A5 5 0 0 1 8.9 12v-6c0-.8.3-1.5 1-2.1a2.9 2.9 0 0 1 2-.9c.9 0 1.6.3 2.2.9.5.6.8 1.3.8 2.1v6a5 5 0 0 1 1.5 1.8A4.9 4.9 0 0 1 17 16c0 1.4-.5 2.6-1.4 3.5s-2.2 1.5-3.6 1.5zm-3-5h6c0-.5-.2-1-.4-1.4a3 3 0 0 0-.9-1l-.8-.6v-7a1 1 0 0 0-.3-.7A1 1 0 0 0 12 5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v7l-.8.6a2.9 2.9 0 0 0-.9 1 3 3 0 0 0-.3 1.4z"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6ZM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>'}});
50(function(){const on=Object.getPrototypeOf,pn=(o,s,a)=>{var c;return a(o,s.prototype)?!0:((c=o.constructor)==null?void 0:c.name)===s.name},ae=o=>{const s=typeof o;return o===null?"null":s==="object"&&Array.isArray(o)?"array":s==="object"&&pn(o,String,(a,c)=>c.isPrototypeOf(a))?"string":s},qe=o=>s=>ae(s)===o,So=o=>s=>typeof s===o,xo=o=>s=>o===s,un=(o,s)=>hn(o)&&pn(o,s,(a,c)=>on(a)===c),$e=qe("string"),hn=qe("object"),He=o=>un(o,Object),ca=qe("array"),Xa=xo(null),Ta=So("boolean"),zs=xo(void 0),Da=o=>o==null,$n=o=>!Da(o),ke=So("function"),la=So("number"),Oa=(o,s)=>{if(ca(o)){for(let a=0,c=o.length;a<c;++a)if(!s(o[a]))return!1;return!0}return!1},q=()=>{},mo=o=>()=>o(),Ja=(o,s)=>(...a)=>o(s.apply(null,a)),lo=(o,s)=>a=>o(s(a)),nt=o=>()=>o,eo=o=>o,Gn=(o,s)=>o===s;function so(o,...s){return(...a)=>{const c=s.concat(a);return o.apply(null,c)}}const mt=o=>s=>!o(s),X=o=>()=>{throw new Error(o)},sr=o=>o(),Fo=nt(!1),_e=nt(!0),tu=class tu{constructor(s,a){Ft(this,"tag");Ft(this,"value");this.tag=s,this.value=a}static some(s){return new tu(!0,s)}static none(){return tu.singletonNone}fold(s,a){return this.tag?a(this.value):s()}isSome(){return this.tag}isNone(){return!this.tag}map(s){return this.tag?tu.some(s(this.value)):tu.none()}bind(s){return this.tag?s(this.value):tu.none()}exists(s){return this.tag&&s(this.value)}forall(s){return!this.tag||s(this.value)}filter(s){return!this.tag||s(this.value)?this:tu.none()}getOr(s){return this.tag?this.value:s}or(s){return this.tag?this:s}getOrThunk(s){return this.tag?this.value:s()}orThunk(s){return this.tag?this:s()}getOrDie(s){if(this.tag)return this.value;throw new Error(s??"Called getOrDie on None")}static from(s){return $n(s)?tu.some(s):tu.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(s){this.tag&&s(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}};Ft(tu,"singletonNone",new tu(!1));let k=tu;const Fn=Array.prototype.slice,Ut=Array.prototype.indexOf,Sn=Array.prototype.push,Ne=(o,s)=>Ut.call(o,s),Et=(o,s)=>{const a=Ne(o,s);return a===-1?k.none():k.some(a)},Go=(o,s)=>Ne(o,s)>-1,ps=(o,s)=>{for(let a=0,c=o.length;a<c;a++){const d=o[a];if(s(d,a))return!0}return!1},te=(o,s)=>{const a=[];for(let c=0;c<o;c++)a.push(s(c));return a},Pe=(o,s)=>{const a=[];for(let c=0;c<o.length;c+=s){const d=Fn.call(o,c,c+s);a.push(d)}return a},pt=(o,s)=>{const a=o.length,c=new Array(a);for(let d=0;d<a;d++){const f=o[d];c[d]=s(f,d)}return c},It=(o,s)=>{for(let a=0,c=o.length;a<c;a++){const d=o[a];s(d,a)}},F=(o,s)=>{for(let a=o.length-1;a>=0;a--){const c=o[a];s(c,a)}},Vr=(o,s)=>{const a=[],c=[];for(let d=0,f=o.length;d<f;d++){const p=o[d];(s(p,d)?a:c).push(p)}return{pass:a,fail:c}},Io=(o,s)=>{const a=[];for(let c=0,d=o.length;c<d;c++){const f=o[c];s(f,c)&&a.push(f)}return a},An=(o,s,a)=>(F(o,(c,d)=>{a=s(a,c,d)}),a),Zo=(o,s,a)=>(It(o,(c,d)=>{a=s(a,c,d)}),a),ru=(o,s,a)=>{for(let c=0,d=o.length;c<d;c++){const f=o[c];if(s(f,c))return k.some(f);if(a(f,c))break}return k.none()},xt=(o,s)=>ru(o,s,Fo),$t=(o,s)=>{for(let a=0,c=o.length;a<c;a++){const d=o[a];if(s(d,a))return k.some(a)}return k.none()},wt=o=>{const s=[];for(let a=0,c=o.length;a<c;++a){if(!ca(o[a]))throw new Error("Arr.flatten item "+a+" was not an array, input
50: "+o);Sn.apply(s,o[a])}return s},Y=(o,s)=>wt(pt(o,s)),po=(o,s)=>{for(let a=0,c=o.length;a<c;++a){const d=o[a];if(s(d,a)!==!0)return!1}return!0},Ct=o=>{const s=Fn.call(o,0);return s.reverse(),s},st=(o,s)=>Io(o,a=>!Go(s,a)),de=(o,s)=>{const a={};for(let c=0,d=o.length;c<d;c++){const f=o[c];a[String(f)]=s(f,c)}return a},Je=o=>[o],We=(o,s)=>{const a=Fn.call(o,0);return a.sort(s),a},Vn=(o,s)=>s>=0&&s<o.length?k.some(o[s]):k.none(),Xo=o=>Vn(o,0),gl=o=>Vn(o,o.length-1),sx=ke(Array.from)?Array.from:o=>Fn.call(o),bi=(o,s)=>{for(let a=0;a<o.length;a++){const c=s(o[a],a);if(c.isSome())return c}return k.none()},qo=Object.keys,au=Object.hasOwnProperty,is=(o,s)=>{const a=qo(o);for(let c=0,d=a.length;c<d;c++){const f=a[c],p=o[f];s(p,f)}},hs=(o,s)=>Zf(o,(a,c)=>({k:c,v:s(a,c)})),Zf=(o,s)=>{const a={};return is(o,(c,d)=>{const f=s(c,d);a[f.k]=f.v}),a},ad=o=>(s,a)=>{o[a]=s},Wi=(o,s,a,c)=>{is(o,(d,f)=>{(s(d,f)?a:c)(d,f)})},Vs=(o,s)=>{const a={},c={};return Wi(o,s,ad(a),ad(c)),{t:a,f:c}},Ur=(o,s)=>{const a={};return Wi(o,s,ad(a),q),a},Wr=(o,s)=>{const a=[];return is(o,(c,d)=>{a.push(s(c,d))}),a},iu=(o,s)=>{const a=qo(o);for(let c=0,d=a.length;c<d;c++){const f=a[c],p=o[f];if(s(p,f,o))return k.some(p)}return k.none()},id=o=>Wr(o,eo),he=(o,s)=>nn(o,s)?k.from(o[s]):k.none(),nn=(o,s)=>au.call(o,s),Do=(o,s)=>nn(o,s)&&o[s]!==void 0&&o[s]!==null,Zi={generate:o=>{if(!ca(o))throw new Error("cases must be an array");if(o.length===0)throw new Error("there must be at least one case");const s=[],a={};return It(o,(c,d)=>{const f=qo(c);if(f.length!==1)throw new Error("one and only one name per case");const p=f[0],y=c[p];if(a[p]!==void 0)throw new Error("duplicate key detected:"+p);if(p==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ca(y))throw new Error("case arguments must be an array");s.push(p),a[p]=(...C)=>{const _=C.length;if(_!==y.length)throw new Error("Wrong number of arguments to case "+p+". Expected "+y.length+" ("+y+"), got "+_);return{fold:(...O)=>{if(O.length!==o.length)throw new Error("Wrong number of arguments to fold. Expected "+o.length+", got "+O.length);return O[d].apply(null,C)},match:O=>{const M=qo(O);if(s.length!==M.length)throw new Error("Wrong number of arguments to match. Expected: "+s.join(",")+` 51Actual: `+M.join(","));if(!po(s,L=>Go(M,L)))throw new Error("Not all branches were specified when using match. Specified: "+M.join(", ")+` 52Required: `+s.join(", "));return O[p].apply(null,C)},log:O=>{console.log(O,{constructors:s,constructor:p,params:C})}}}}),a}},fe=o=>{let s=o;return{get:()=>s,set:d=>{s=d}}},jf=o=>{let s=k.none(),a=[];const c=_=>jf(A=>{d(O=>{A(_(O))})}),d=_=>{p()?C(_):a.push(_)},f=_=>{p()||(s=k.some(_),y(a),a=[])},p=()=>s.isSome(),y=_=>{It(_,C)},C=_=>{s.each(A=>{setTimeout(()=>{_(A)},0)})};return o(f),{get:d,map:c,isReady:p}},Gf={nu:jf,pure:o=>jf(s=>{s(o)})},cd=o=>{setTimeout(()=>{throw o},0)},cu=o=>{const s=C=>{o().then(C,cd)};return{map:C=>cu(()=>o().then(C)),bind:C=>cu(()=>o().then(_=>C(_).toPromise())),anonBind:C=>cu(()=>o().then(()=>C.toPromise())),toLazy:()=>Gf.nu(s),toCached:()=>{let C=null;return cu(()=>(C===null&&(C=o()),C))},toPromise:o,get:s}},cs={nu:o=>cu(()=>new Promise(o)),pure:o=>cu(()=>Promise.resolve(o))},vC=o=>{const s=f=>f(o),a=nt(o),c=()=>d,d={tag:!0,inner:o,fold:(f,p)=>p(o),isValue:_e,isError:Fo,map:f=>Te.value(f(o)),mapError:c,bind:s,exists:s,forall:s,getOr:a,or:c,getOrThunk:a,orThunk:c,getOrDie:a,each:f=>{f(o)},toOptional:()=>k.some(o)};return d},ax=o=>{const s=()=>a,a={tag:!1,inner:o,fold:(c,d)=>c(o),isValue:Fo,isError:_e,map:s,mapError:c=>Te.error(c(o)),bind:s,exists:Fo,forall:_e,getOr:eo,or:eo,getOrThunk:sr,orThunk:sr,getOrDie:X(String(o)),each:q,toOptional:k.none};return a},Te={value:vC,error:ax,fromOption:(o,s)=>o.fold(()=>ax(s),vC)},xi=o=>({...o,toCached:()=>xi(o.toCached()),bindFuture:C=>xi(o.bind(_=>_.fold(A=>cs.pure(Te.error(A)),A=>C(A)))),bindResult:C=>xi(o.map(_=>_.bind(C))),mapResult:C=>xi(o.map(_=>_.map(C))),mapError:C=>xi(o.map(_=>_.mapError(C))),foldResult:(C,_)=>o.map(A=>A.fold(C,_)),withTimeout:(C,_)=>xi(cs.nu(A=>{let O=!1;const M=setTimeout(()=>{O=!0,A(Te.error(_()))},C);o.get(I=>
52{O||(clearTimeout(M),A(I))})}))}),yg=o=>xi(cs.nu(o)),J4=o=>xi(cs.pure(Te.value(o))),Qh={nu:yg,wrap:xi,pure:J4,value:J4,error:o=>xi(cs.pure(Te.error(o))),fromResult:o=>xi(cs.pure(o)),fromFuture:o=>xi(o.map(Te.value)),fromPromise:o=>yg(s=>{o.then(a=>{s(Te.value(a))},a=>{s(Te.error(a))})})},Q4=typeof window<"u"?window:Function("return this;")(),lm=(o,s,a,c)=>{const d=o+s;return d>c?a:d<a?c:d},da=(o,s,a)=>Math.min(Math.max(o,s),a),yC=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let CC=0;const ee=o=>{const a=new Date().getTime(),c=Math.floor(yC()*1e9);return CC++,o+"_"+c+CC+String(a)},wC=(o,s)=>s,t1=(o,s)=>He(o)&&He(s)?kn(o,s):s,cx=o=>(...s)=>{if(s.length===0)throw new Error("Can't merge zero objects");const a={};for(let c=0;c<s.length;c++){const d=s[c];for(const f in d)nn(d,f)&&(a[f]=o(a[f],d[f]))}return a},kn=cx(t1),e1=cx(wC),ji=(o,s,a=Gn)=>o.exists(c=>a(c,s)),Us=(o,s,a=Gn)=>Ec(o,s,a).getOr(o.isNone()&&s.isNone()),um=o=>{const s=[],a=c=>{s.push(c)};for(let c=0;c<o.length;c++)o[c].each(a);return s},lx=o=>{const s=[];for(let a=0;a<o.length;a++){const c=o[a];if(c.isSome())s.push(c.getOrDie());else return k.none()}return k.some(s)},Ec=(o,s,a)=>o.isSome()&&s.isSome()?k.some(a(o.getOrDie(),s.getOrDie())):k.none(),Ra=(o,s,a,c)=>o.isSome()&&s.isSome()&&a.isSome()?k.some(c(o.getOrDie(),s.getOrDie(),a.getOrDie())):k.none(),uu=(o,s)=>o!=null?k.some(s(o)):k.none(),yi=(o,s)=>o?k.some(s):k.none(),tk=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ek=(o,s)=>{let a=s??Q4;for(let c=0;c<o.length&&a!==void 0&&a!==null;++c)a=a[o[c]];return a},Gi=(o,s)=>{const a=o.split(".");return ek(a,s)};Zi.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const _C=o=>{const s=[],a=[];return It(o,c=>{c.fold(d=>{s.push(d)},d=>{a.push(d)})}),{errors:s,values:a}},ld=o=>{const s=fe(k.none()),a=()=>s.get().each(o);return{clear:()=>{a(),s.set(k.none())},isSet:()=>s.get().isSome(),get:()=>s.get(),set:y=>{a(),s.set(k.some(y))}}},ux=()=>ld(o=>o.destroy()),Rs=()=>ld(o=>o.unbind()),Ze=()=>{const o=ld(q);return{...o,on:a=>o.get().each(a)}},ma=(o,s)=>o+s,Qa=(o,s)=>o.substring(s),ns=(o,s,a)=>s===""||o.length>=s.length&&o.substr(a,a+s.length)===s,dx=(o,s)=>qf(o,s)?Qa(o,s.length):o,SC=(o,s)=>du(o,s)?o:ma(o,s),ls=(o,s,a=0,c)=>{const d=o.indexOf(s,a);return d!==-1?zs(c)?!0:d+s.length<=c:!1},qf=(o,s)=>ns(o,s,0),du=(o,s)=>ns(o,s,o.length-s.length),oe=(o=>s=>s.replace(o,""))(/^\s+|\s+$/g),Cg=o=>o.length>0,Ci=o=>!Cg(o),Kf=o=>{const s=parseFloat(o);return isNaN(s)?k.none():k.some(s)},Bs=(o,s)=>{let a=null,c=null;return{cancel:()=>{Xa(a)||(clearTimeout(a),a=null,c=null)},throttle:(...p)=>{c=p,Xa(a)&&(a=setTimeout(()=>{const y=c;a=null,c=null,o.apply(null,y)},s))}}},ok=(o,s)=>{let a=null;return{cancel:()=>{Xa(a)||(clearTimeout(a),a=null)},throttle:(...f)=>{Xa(a)&&(a=setTimeout(()=>{a=null,o.apply(null,f)},s))}}},mu=(o,s)=>{let a=null;const c=()=>{Xa(a)||(clearTimeout(a),a=null)};return{cancel:c,throttle:(...f)=>{c(),a=setTimeout(()=>{a=null,o.apply(null,f)},s)}}},fl=o=>{let s=!1,a;return(...c)=>(s||(s=!0,a=o.apply(null,c)),a)},EC="\uFEFF",AC="Â ",dm=(o,s)=>{const c=(s||document).createElement("div");if(c.innerHTML=o,!c.hasChildNodes()||c.childNodes.length>1){const d="HTML does not have a single root node";throw console.error(d,o),new Error(d)}return mm(c.childNodes[0])},TC=(o,s)=>{const c=(s||document).createElement(o);return mm(c)},o1=(o,s)=>{const c=(s||document).createTextNode(o);return mm(c)},mm=o=>{if(o==null)throw new Error("Node cannot be null or undefined");return{dom:o}},Zt={fromHtml:dm,fromTag:TC,fromText:o1,fromDom:mm,fromPoint:(o,s,a)=>k.from(o.dom.elementFromPoint(s,a)).map(mm)},n1=(o,s)=>{s.fold(a=>{o.setStartBefore(a.dom)},(a,c)=>{o.setStart(a.dom,c)},a=>{o.setStartAfter(a.dom)})},mx=(o,s)=>{s.fold(a=>{o.setEndBefore(a.dom)},(a,c)=>{o.setEnd(a.dom,c)},a=>{o.setEndAfter(a.dom)})},gu=(o,s,a)=>{const c=o.document.createRange();return n1(c,s),mx(c,a),c},s1=(o,s,a,c,d)=>{const f=o.document.createRange();return f.setStart(s.dom,a),f.setEnd(c.dom,d),f},DC=o=>({left:o.left,top:o.top,right:o.right,bottom:o.bottom,width:o.width,height:o.height}),wi=o=>{const s=o.getClientRects(),a=s.length>0?s[0]:o.getBoundingClientRect();return a.width>0||a.height>0?k.some(a).map(DC):k.none()},OC=o=>{const s=o.getBoundingClientRect();return s.width>0||s.height>0?k.some(s).map(DC):k.none()},wg=Zi.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Xf=(o,s,a)=>s(Zt.fromDom(a.startContainer),a.startOffset,Zt.fromDom(a.endContainer),a.endOffset),bn=(o,s)=>s.match({domRange:a=>({ltr:nt(a),rtl:k.none}),relative:(a,c)=>({ltr:fl(()=>
52gu(o,a,c)),rtl:fl(()=>k.some(gu(o,c,a)))}),exact:(a,c,d,f)=>({ltr:fl(()=>s1(o,a,c,d,f)),rtl:fl(()=>k.some(s1(o,d,f,a,c)))})}),gx=(o,s)=>{const a=s.ltr();return a.collapsed?s.rtl().filter(d=>d.collapsed===!1).map(d=>wg.rtl(Zt.fromDom(d.endContainer),d.endOffset,Zt.fromDom(d.startContainer),d.startOffset)).getOrThunk(()=>Xf(o,wg.ltr,a)):Xf(o,wg.ltr,a)},RC=(o,s)=>{const a=bn(o,s);return gx(o,a)},BC=(o,s)=>RC(o,s).match({ltr:(c,d,f,p)=>{const y=o.document.createRange();return y.setStart(c.dom,d),y.setEnd(f.dom,p),y},rtl:(c,d,f,p)=>{const y=o.document.createRange();return y.setStart(f.dom,p),y.setEnd(c.dom,d),y}});wg.ltr,wg.rtl;const FC=9,r1=11,Ac=1,MC=3,ud=(o,s)=>{const a=o.dom;if(a.nodeType!==Ac)return!1;{const c=a;if(c.matches!==void 0)return c.matches(s);if(c.msMatchesSelector!==void 0)return c.msMatchesSelector(s);if(c.webkitMatchesSelector!==void 0)return c.webkitMatchesSelector(s);if(c.mozMatchesSelector!==void 0)return c.mozMatchesSelector(s);throw new Error("Browser lacks native selectors")}},gm=o=>o.nodeType!==Ac&&o.nodeType!==FC&&o.nodeType!==r1||o.childElementCount===0,nk=(o,s)=>{const a=s===void 0?document:s.dom;return gm(a)?[]:pt(a.querySelectorAll(o),Zt.fromDom)},fx=(o,s)=>{const a=s===void 0?document:s.dom;return gm(a)?k.none():k.from(a.querySelector(o)).map(Zt.fromDom)},ln=(o,s)=>o.dom===s.dom,a1=(o,s)=>{const a=o.dom,c=s.dom;return a===c?!1:a.contains(c)},px=(o,s,a,c)=>{const d=o.isiOS()&&/ipad/i.test(a)===!0,f=o.isiOS()&&!d,p=o.isiOS()||o.isAndroid(),y=p||c("(pointer:coarse)"),C=d||!f&&p&&c("(min-device-width:768px)"),_=f||p&&!C,A=s.isSafari()&&o.isiOS()&&/safari/i.test(a)===!1,O=!_&&!C&&!A;return{isiPad:nt(d),isiPhone:nt(f),isTablet:nt(C),isPhone:nt(_),isTouch:nt(y),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:nt(A),isDesktop:nt(O)}},fu=(o,s)=>{for(let a=0;a<o.length;a++){const c=o[a];if(c.test(s))return c}},sk=(o,s)=>{const a=fu(o,s);if(!a)return{major:0,minor:0};const c=d=>Number(s.replace(a,"$"+d));return hx(c(1),c(2))},NC=(o,s)=>{const a=String(s).toLowerCase();return o.length===0?i1():sk(o,a)},i1=()=>hx(0,0),hx=(o,s)=>({major:o,minor:s}),Jf={nu:hx,detect:NC,unknown:i1},rk=(o,s)=>bi(s.brands,a=>{const c=a.brand.toLowerCase();return xt(o,d=>{var f;return c===((f=d.brand)==null?void 0:f.toLowerCase())}).map(d=>({current:d.name,version:Jf.nu(parseInt(a.version,10),0)}))}),PC=(o,s)=>{const a=String(s).toLowerCase();return xt(o,c=>c.search(a))},ak=(o,s)=>PC(o,s).map(a=>{const c=Jf.detect(a.versionRegexes,s);return{current:a.name,version:c}}),ik=(o,s)=>PC(o,s).map(a=>{const c=Jf.detect(a.versionRegexes,s);return{current:a.name,version:c}}),bx=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,pl=o=>s=>ls(s,o),IC=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:o=>ls(o,"edge/")&&ls(o,"chrome")&&ls(o,"safari")&&ls(o,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,bx],search:o=>ls(o,"chrome")&&!ls(o,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:o=>ls(o,"msie")||ls(o,"trident")},{name:"Opera",versionRegexes:[bx,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:pl("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:pl("firefox")},{name:"Safari",versionRegexes:[bx,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:o=>(ls(o,"safari")||ls(o,"mobile/"))&&ls(o,"applewebkit")}],$C=[{name:"Windows",search:pl("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:o=>ls(o,"iphone")||ls(o,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:pl("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:pl("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:pl("linux"),versionRegexes:[]},{name:"Solaris",search:pl("sunos"),versionRegexes:[]},{name:"FreeBSD",search:pl("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:pl("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],xx={browsers:nt(IC),oses:nt($C)},eR="Edge",ck="Chromium",lk="IE",uk="Opera",hl="Firefox",dk="Safari",mk=()=>vx({current:void 0,version:Jf.unknown()}),vx=o=>{const s=o.current,a=o.version,c=d=>()=>s===d;return{current:s,version:a,isEdge:c(eR),isChromium:c(ck),isIE:c(lk),isOpera:c(uk),isFirefox:c(hl),isSafari:c(dk)}},yx={unknown:mk,nu:vx},oR="Windows",gk="iOS",Cx="Android",bl="Linux",Tc="macOS",fm="Solaris",fk="FreeBSD",Oo="ChromeOS",pk=()=>wx({current:void 0,version:Jf.unknown()}),wx=o=>{const s=o.current,a=o.version,c=d=>()=>s===d;return{current:s,version:a,isWindows:c(oR),isiOS:c(gk),isAndroid:c(Cx),isMacOS:c(Tc),isLinux:c(bl),isSolaris:c(fm),isFreeBSD:c(fk),isChromeOS:c(Oo)}},ss={unknown:pk,nu:wx},c1={detect:(o,s,a)=>{const c=xx.browsers(),d=xx.oses(),f=s.bind(C=>rk(c,C)).orThunk(()=>ak(c,o)).fold(yx.unknown,yx.nu),p=ik(d,o).fold(ss.unknown,ss.nu),y=px(p,f,o,a);return{browser:f,os:p,deviceType:y}}},bk=o=>window.matchMedia(o).matches;let _x=fl(()=>c1.detect(window.navigator.userAgent,k.from(window.navigator.userAgentData),bk));const Cr=()=>_x(),_g=(o,s)=>Gi(o,s),xk=(o,s)=>{const a=_g(o,s);if(a==null)throw new Error(o+" not available on this browser");return a},Mt=Object.getPrototypeOf,ti=o=>xk("HTMLElement",o),l1=o=>{const s=Gi("ownerDocument.defaultView",o);
52return hn(o)&&(ti(s).prototype.isPrototypeOf(o)||/^HTML\w*Element$/.test(Mt(o).constructor.name))},qi=o=>o.dom.nodeName.toLowerCase(),Qf=o=>o.dom.nodeType,Sx=o=>s=>Qf(s)===o,Z=o=>Ba(o)&&l1(o.dom),Ba=Sx(Ac),dd=Sx(MC),kx=Sx(FC),Sg=Sx(r1),Mr=o=>s=>Ba(s)&&qi(s)===o,Fa=o=>Zt.fromDom(o.dom.ownerDocument),Ex=o=>kx(o)?o:Fa(o),Ax=o=>Zt.fromDom(Ex(o).dom.documentElement),tp=o=>Zt.fromDom(Ex(o).dom.defaultView),ga=o=>k.from(o.dom.parentNode).map(Zt.fromDom),Tx=o=>ga(o),xl=o=>k.from(o.dom.parentElement).map(Zt.fromDom),ep=(o,s)=>{const a=ke(s)?s:Fo;let c=o.dom;const d=[];for(;c.parentNode!==null&&c.parentNode!==void 0;){const f=c.parentNode,p=Zt.fromDom(f);if(d.push(p),a(p)===!0)break;c=f}return d},Dx=o=>k.from(o.dom.offsetParent).map(Zt.fromDom),ei=o=>k.from(o.dom.previousSibling).map(Zt.fromDom),Ox=o=>k.from(o.dom.nextSibling).map(Zt.fromDom),Dc=o=>pt(o.dom.childNodes,Zt.fromDom),md=(o,s)=>{const a=o.dom.childNodes;return k.from(a[s]).map(Zt.fromDom)},ho=o=>md(o,0),_i=(o,s)=>({element:o,offset:s}),u1=(o,s)=>{const a=Dc(o);return a.length>0&&s<a.length?_i(a[s],0):_i(o,s)},LC=(o,s,a,c)=>{const f=Fa(o).dom.createRange();return f.setStart(o.dom,s),f.setEnd(a.dom,c),f},oo=(o,s,a,c)=>{const d=LC(o,s,a,c),f=ln(o,a)&&s===c;return d.collapsed&&!f},pu=o=>Sg(o)&&$n(o.dom.host),ks=o=>Zt.fromDom(o.dom.getRootNode()),Oc=o=>pu(o)?o:Zt.fromDom(Ex(o).dom.body),Rc=o=>Jn(o).isSome(),Jn=o=>{const s=ks(o);return pu(s)?k.some(s):k.none()},zo=o=>Zt.fromDom(o.dom.host),vk=o=>{if($n(o.target)){const s=Zt.fromDom(o.target);if(Ba(s)&&yk(s)&&o.composed&&o.composedPath){const a=o.composedPath();if(a)return Xo(a)}}return k.from(o.target)},yk=o=>$n(o.dom.shadowRoot),vl=(o,s,a,c,d,f,p)=>({target:o,x:s,y:a,stop:c,prevent:d,kill:f,raw:p}),Ki=o=>{const s=Zt.fromDom(vk(o).getOr(o.target)),a=()=>o.stopPropagation(),c=()=>o.preventDefault(),d=Ja(c,a);return vl(s,o.clientX,o.clientY,a,c,d,o)},Bc=(o,s)=>a=>{o(a)&&s(Ki(a))},Fs=(o,s,a,c,d)=>{const f=Bc(a,c);return o.dom.addEventListener(s,f,d),{unbind:so(Yi,o,s,f,d)}},hu=(o,s,a,c)=>Fs(o,s,a,c,!1),oi=(o,s,a,c)=>Fs(o,s,a,c,!0),Yi=(o,s,a,c)=>{o.dom.removeEventListener(s,a,c)},Si=_e,Vo=(o,s,a)=>hu(o,s,Si,a),ki=(o,s,a)=>oi(o,s,Si,a),yl=Ki,Nr=()=>Zt.fromDom(document),Js=(o,s=!1)=>o.dom.focus({preventScroll:s}),Qn=o=>o.dom.blur(),Xi=o=>{const s=ks(o).dom;return o.dom===s.activeElement},rr=(o=Nr())=>k.from(o.dom.activeElement).map(Zt.fromDom),Es=o=>rr(ks(o)).filter(s=>o.dom.contains(s.dom)),pm=(o,s)=>{ga(o).each(c=>{c.dom.insertBefore(s.dom,o.dom)})},HC=(o,s)=>{Ox(o).fold(()=>{ga(o).each(d=>{ar(d,s)})},c=>{pm(c,s)})},Rx=(o,s)=>{ho(o).fold(()=>{ar(o,s)},c=>{o.dom.insertBefore(s.dom,c.dom)})},ar=(o,s)=>{o.dom.appendChild(s.dom)},Bx=(o,s,a)=>{md(o,a).fold(()=>{ar(o,s)},c=>{pm(c,s)})},zC=(o,s)=>{It(s,a=>{ar(o,a)})},hm=(o,s,a)=>{if($e(a)||Ta(a)||la(a))o.setAttribute(s,a+"");else throw console.error("Invalid call to Attribute.set. Key ",s,":: Value ",a,":: Element ",o),new Error("Attribute value was not simple")},Ee=(o,s,a)=>{hm(o.dom,s,a)},Fx=(o,s)=>{const a=o.dom;is(s,(c,d)=>{hm(a,d,c)})},Ws=(o,s)=>{const a=o.dom.getAttribute(s);return a===null?void 0:a},ir=(o,s)=>k.from(Ws(o,s)),cr=(o,s)=>{const a=o.dom;return a&&a.hasAttribute?a.hasAttribute(s):!1},Tn=(o,s)=>{o.dom.removeAttribute(s)},bm=o=>Zo(o.dom.attributes,(s,a)=>(s[a.name]=a.value,s),{}),d1=o=>{o.dom.textContent="",It(Dc(o),s=>{Ji(s)})},Ji=o=>{const s=o.dom;s.parentNode!==null&&s.parentNode.removeChild(s)},Fc=(o,s)=>Zt.fromDom(o.dom.cloneNode(s)),Mx=o=>Fc(o,!1),m1=o=>Fc(o,!0),g1=(o,s)=>{const c=(s||document).createElement("div");return c.innerHTML=o,Dc(Zt.fromDom(c))},bu=o=>o.dom.innerHTML,Mc=(o,s)=>{const c=Fa(o).dom,d=Zt.fromDom(c.createDocumentFragment()),f=g1(s,c);zC(d,f),d1(o),ar(o,d)},Ck=o=>{const s=Zt.fromTag("div"),a=Zt.fromDom(o.dom.cloneNode(!0));return ar(s,a),bu(s)},wr=o=>{if(pu(o))return"#shadow-root";{const s=Mx(o);return Ck(s)}},Nc=o=>new Promise((s,a)=>{const c=()=>{f(),s(o)},d=[Vo(o,"load",c),Vo(o,"error",()=>{f(),a("Unable to load data from image: "+o.dom.src)})],f=()=>It(d,p=>p.unbind());o.dom.complete&&c()}),Cl=o=>o.style!==void 0&&ke(o.style.getPropertyValue),Ro=o=>{const s=dd(o)?o.dom.parentNode:o.dom;if(s==null||s.ownerDocument===null)return!1;const a=s.ownerDocument;return Jn(Zt.fromDom(s)).fold(()=>a.body.contains(s),lo(Ro,zo))},ni=()=>VC(Zt.fromDom(document)),VC=o=>{const s=o.dom.body;if(s==null)throw new Error("Body is not available yet");return Zt.fromDom(s)},f1=(o,s,a)=>
52{if(!$e(a))throw console.error("Invalid call to CSS.set. Property ",s,":: Value ",a,":: Element ",o),new Error("CSS value must be a string: "+a);Cl(o)&&o.style.setProperty(s,a)},Ei=(o,s)=>{Cl(o)&&o.style.removeProperty(s)},Be=(o,s,a)=>{const c=o.dom;f1(c,s,a)},qn=(o,s)=>{const a=o.dom;is(s,(c,d)=>{f1(a,d,c)})},lr=(o,s)=>{const a=o.dom;is(s,(c,d)=>{c.fold(()=>{Ei(a,d)},f=>{f1(a,d,f)})})},Dn=(o,s)=>{const a=o.dom,d=window.getComputedStyle(a).getPropertyValue(s);return d===""&&!Ro(o)?Qi(a,s):d},Qi=(o,s)=>Cl(o)?o.style.getPropertyValue(s):"",Hn=(o,s)=>{const a=o.dom,c=Qi(a,s);return k.from(c).filter(d=>d.length>0)},As=o=>{const s={},a=o.dom;if(Cl(a))for(let c=0;c<a.style.length;c++){const d=a.style.item(c);s[d]=a.style[d]}return s},kg=(o,s,a)=>{const c=Zt.fromTag(o);return Be(c,s,a),Hn(c,s).isSome()},uo=(o,s)=>{const a=o.dom;Ei(a,s),ji(ir(o,"style").map(oe),"")&&Tn(o,"style")},tc=o=>o.dom.offsetWidth,xn=(o,s)=>{const a=(y,C)=>{if(!la(C)&&!C.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+C);const _=y.dom;Cl(_)&&(_.style[o]=C+"px")},c=y=>{const C=s(y);if(C<=0||C===null){const _=Dn(y,o);return parseFloat(_)||0}return C},d=c,f=(y,C)=>Zo(C,(_,A)=>{const O=Dn(y,A),M=O===void 0?0:parseInt(O,10);return isNaN(M)?_:_+M},0);return{set:a,get:c,getOuter:d,aggregate:f,max:(y,C,_)=>{const A=f(y,_);return C>A?C-A:0}}},Ai=xn("height",o=>{const s=o.dom;return Ro(o)?s.getBoundingClientRect().height:s.offsetHeight}),Zs=o=>Ai.get(o),Pr=o=>Ai.getOuter(o),op=(o,s)=>{const a=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],c=Ai.max(o,s,a);Be(o,"max-height",c+"px")},UC=o=>o.offsetWidth<=0&&o.offsetHeight<=0,np=o=>!UC(o.dom),sp=xn("width",o=>{const s=o.dom;return Ro(o)?s.getBoundingClientRect().width:s.offsetWidth}),xm=(o,s)=>sp.set(o,s),Ir=o=>sp.get(o),xu=o=>sp.getOuter(o),wk=(o,s)=>{const a=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],c=sp.max(o,s,a);Be(o,"max-width",c+"px")},vm=(o,s)=>({left:o,top:s,translate:(c,d)=>vm(o+c,s+d)}),Jo=vm,p1=o=>{const s=o.getBoundingClientRect();return Jo(s.left,s.top)},h1=(o,s)=>o!==void 0?o:s!==void 0?s:0,Ma=o=>{const s=o.dom.ownerDocument,a=s.body,c=s.defaultView,d=s.documentElement;if(a===o.dom)return Jo(a.offsetLeft,a.offsetTop);const f=h1(c==null?void 0:c.pageYOffset,d.scrollTop),p=h1(c==null?void 0:c.pageXOffset,d.scrollLeft),y=h1(d.clientTop,a.clientTop),C=h1(d.clientLeft,a.clientLeft);return Ti(o).translate(p-C,f-y)},Ti=o=>{const s=o.dom,c=s.ownerDocument.body;return c===s?Jo(c.offsetLeft,c.offsetTop):Ro(o)?p1(s):Jo(0,0)},rs=o=>{const s=o!==void 0?o.dom:document,a=s.body.scrollLeft||s.documentElement.scrollLeft,c=s.body.scrollTop||s.documentElement.scrollTop;return Jo(a,c)},gd=(o,s,a)=>{const d=(a!==void 0?a.dom:document).defaultView;d&&d.scrollTo(o,s)},Eg=((o,s)=>{const a=f=>{if(!o(f))throw new Error("Can only get "+s+" value of a "+s+" node");return c(f).getOr("")},c=f=>o(f)?k.from(f.dom.nodeValue):k.none();return{get:a,getOption:c,set:(f,p)=>{if(!o(f))throw new Error("Can only set raw "+s+" value of a "+s+" node");f.dom.nodeValue=p}}})(dd,"text"),b1=o=>Eg.get(o),Nx=(o,s)=>a=>nR(a)==="rtl"?s:o,nR=o=>Dn(o,"direction")==="rtl"?"rtl":"ltr",Pc=(o,s)=>{const a=Ws(o,s);return a===void 0||a===""?[]:a.split(" ")},_k=(o,s,a)=>{const d=Pc(o,s).concat([a]);return Ee(o,s,d.join(" ")),!0},WC=(o,s,a)=>{const c=Io(Pc(o,s),d=>d!==a);return c.length>0?Ee(o,s,c.join(" ")):Tn(o,s),!1};var Ic=(o,s,a,c,d)=>o(a,c)?k.some(a):ke(d)&&d(a)?k.none():s(a,c,d);const ZC=(o,s,a)=>{let c=o.dom;const d=ke(a)?a:Fo;for(;c.parentNode;){c=c.parentNode;const f=Zt.fromDom(c);if(s(f))return k.some(f);if(d(f))break}return k.none()},Ag=(o,s,a)=>Ic((d,f)=>f(d),ZC,o,s,a),rp=(o,s)=>{const a=o.dom;return a.parentNode?ap(Zt.fromDom(a.parentNode),c=>!ln(o,c)&&s(c)):k.none()},ap=(o,s)=>{const a=d=>s(Zt.fromDom(d));return xt(o.dom.childNodes,a).map(Zt.fromDom)},Px=(o,s)=>{const a=c=>{for(let d=0;d<c.childNodes.length;d++){const f=Zt.fromDom(c.childNodes[d]);if(s(f))return k.some(f);const p=a(c.childNodes[d]);if(p.isSome())return p}return k.none()};return a(o.dom)},jC=o=>fx(o),ec=(o,s,a)=>ZC(o,c=>ud(c,s),a),Sk=(o,s)=>rp(o,a=>ud(a,s)),fd=(o,s)=>ap(o,a=>ud(a,s)),Ko=(o,s)=>fx(s,o),$r=(o,s,a)=>Ic((d,f)=>ud(d,f),ec,o,s,a),wl=(o,s)=>{o.dom.checked=s},Ix=o=>o.dom.checked,pd=o=>o.dom.classList!==void 0,$x=o=>Pc(o,"class"),GC=(o,s)=>_k(o,"class",s),_l=(o,s)=>WC(o,"class",s),Sl=(o,s)=>Go($x(o),s)?_l(o,s):GC(o,s),sn=(o,s)=>{pd(o)?o.dom.classList.add(s):GC(o,s)},qC=o=>{(pd(o)?o.dom.classList:$x(o)).length===0&&Tn(o,"class")},Un=(o,s)=>{pd(o)?o.dom.classList.remove(s):_l(o,s),qC(o)},ip=(o,s)=>{const a=pd(o)?o.dom.classList.toggle(s):Sl(o,s);return qC(o),a},bs=(o,s)=>pd(o)&&o.dom.classList.contains(s),kl=(o,s)=>{It(s,a=>
52{sn(o,a)})},_r=(o,s)=>{It(s,a=>{Un(o,a)})},vu=(o,s)=>{It(s,a=>{ip(o,a)})},x1=(o,s)=>po(s,a=>bs(o,a)),KC=o=>{const s=o.dom.classList,a=new Array(s.length);for(let c=0;c<s.length;c++){const d=s.item(c);d!==null&&(a[c]=d)}return a},Lx=o=>pd(o)?KC(o):$x(o),kk=o=>o.dom.textContent,si=o=>o.dom.value,hd=(o,s)=>{if(s===void 0)throw new Error("Value.set was undefined");o.dom.value=s},js=(o,s,a)=>Io(ep(o,a),s),ur=(o,s)=>nk(s,o),v1=(o,s,a)=>Ag(o,s,a).isSome(),cp=(o,s,a)=>$r(o,s,a).isSome(),YC=o=>ke(o)?o:Fo,XC=(o,s,a)=>{let c=o.dom;const d=YC(a);for(;c.parentNode;){c=c.parentNode;const f=Zt.fromDom(c),p=s(f);if(p.isSome())return p;if(d(f))break}return k.none()},oc=(o,s,a)=>{const c=s(o),d=YC(a);return c.orThunk(()=>d(o)?k.none():XC(o,s,d))},ym={create:(o,s,a,c)=>({start:o,soffset:s,finish:a,foffset:c})},yu=Zi.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Ek=(o,s,a,c)=>o.fold(s,a,c),y1=o=>o.fold(eo,eo,eo),Ak=yu.before,dr=yu.on,Tg=yu.after,Tk={before:Ak,on:dr,after:Tg,cata:Ek,getStart:y1},Dg=Zi.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),C1=o=>Dg.exact(o.start,o.soffset,o.finish,o.foffset),JC=o=>o.match({domRange:s=>Zt.fromDom(s.startContainer),relative:(s,a)=>Tk.getStart(s),exact:(s,a,c,d)=>s}),Hx=Dg.domRange,QC=Dg.relative,tw=Dg.exact,w1=o=>{const s=JC(o);return tp(s)},ew=ym.create,Og={domRange:Hx,relative:QC,exact:tw,exactFromRange:C1,getWin:w1,range:ew},Dk=o=>k.from(o.getSelection()),zx=o=>{if(o.rangeCount>0){const s=o.getRangeAt(0),a=o.getRangeAt(o.rangeCount-1);return k.some(ym.create(Zt.fromDom(s.startContainer),s.startOffset,Zt.fromDom(a.endContainer),a.endOffset))}else return k.none()},Ok=o=>{if(o.anchorNode===null||o.focusNode===null)return zx(o);{const s=Zt.fromDom(o.anchorNode),a=Zt.fromDom(o.focusNode);return oo(s,o.anchorOffset,a,o.focusOffset)?k.some(ym.create(s,o.anchorOffset,a,o.focusOffset)):zx(o)}},Rk=o=>Dk(o).filter(s=>s.rangeCount>0).bind(Ok),Vx=(o,s)=>{const a=BC(o,s);return wi(a)},Ux=(o,s)=>{const a=BC(o,s);return OC(a)},Bk={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Fk=(()=>{const o="[0-9]+",a="[eE]"+("[+-]?"+o),c="\\.",d=y=>`(?:${y})?`,p=`[+-]?(?:${["Infinity",o+c+d(o)+d(a),c+o+d(a),o+d(a)].join("|")})`;return new RegExp(`^(${p})(.*)$`)})(),Mk=(o,s)=>ps(s,a=>ps(Bk[a],c=>o===c)),_1=(o,s)=>k.from(Fk.exec(o)).bind(c=>{const d=Number(c[1]),f=c[2];return Mk(f,s)?k.some({value:d,unit:f}):k.none()}),Nk=(o,s)=>_1(o,s).map(({value:a,unit:c})=>a+c),nc=o=>{const s=o===void 0?window:o;return Cr().browser.isFirefox()?k.none():k.from(s.visualViewport)},Rg=(o,s,a,c)=>({x:o,y:s,width:a,height:c,right:o+a,bottom:s+c}),S1=o=>{const s=o===void 0?window:o,a=s.document,c=rs(Zt.fromDom(a));return nc(s).fold(()=>{const d=s.document.documentElement,f=d.clientWidth,p=d.clientHeight;return Rg(c.left,c.top,f,p)},d=>Rg(Math.max(d.pageLeft,c.left),Math.max(d.pageTop,c.top),d.width,d.height))},lp=(o,s)=>o.view(s).fold(nt([]),c=>{const d=o.owner(c),f=lp(o,d);return[c].concat(f)}),Pk=(o,s)=>{const a=s.owner(o),c=lp(s,a);return k.some(c)};var Cu=Object.freeze({__proto__:null,view:o=>{var a;return(o.dom===document?k.none():k.from((a=o.dom.defaultView)==null?void 0:a.frameElement)).map(Zt.fromDom)},owner:o=>Fa(o)});const up=o=>{const s=Nr(),a=rs(s);return Pk(o,Cu).fold(so(Ma,o),d=>{const f=Ti(o),p=An(d,(y,C)=>{const _=Ti(C);return{left:y.left+_.left,top:y.top+_.top}},{left:0,top:0});return Jo(p.left+f.left+a.left,p.top+f.top+a.top)})},bd=(o,s,a)=>({point:o,width:s,height:a}),$k=(o,s,a,c)=>({x:o,y:s,width:a,height:c}),Ts=(o,s,a,c)=>({x:o,y:s,width:a,height:c,right:o+a,bottom:s+c}),xs=o=>{const s=Ma(o),a=xu(o),c=Pr(o);return Ts(s.left,s.top,a,c)},xd=o=>{const s=up(o),a=xu(o),c=Pr(o);return Ts(s.left,s.top,a,c)},wu=(o,s)=>{const a=Math.max(o.x,s.x),c=Math.max(o.y,s.y),d=Math.min(o.right,s.right),f=Math.min(o.bottom,s.bottom),p=d-a,y=f-c;return Ts(a,c,p,y)},Wx=(o,s)=>Zo(s,(a,c)=>wu(a,c),o),Sr=()=>S1(window),Zx=(o,s)=>ln(o.element,s.event.target),vd=o=>
52(ji(Hn(o,"position"),"fixed")?k.none():Dx(o)).orThunk(()=>{const c=Zt.fromTag("span");return ga(o).bind(d=>{ar(d,c);const f=Dx(c);return Ji(c),f})}),k1=o=>vd(o).map(Ma).getOrThunk(()=>Jo(0,0)),ri=(o,s)=>{const a=k.from(Ws(o,"id")).getOrThunk(()=>{const c=ee("aria");return Ee(s,"id",c),c});Ee(o,"aria-describedby",a)},jx=o=>{Tn(o,"aria-describedby")};var Na;(function(o){o[o.Error=0]="Error",o[o.Value=1]="Value"})(Na||(Na={}));const ts=(o,s,a)=>o.stype===Na.Error?s(o.serror):a(o.svalue),E1=o=>{const s=[],a=[];return It(o,c=>{ts(c,d=>a.push(d),d=>s.push(d))}),{values:s,errors:a}},Bg=(o,s)=>o.stype===Na.Error?{stype:Na.Error,serror:s(o.serror)}:o,nw=(o,s)=>o.stype===Na.Value?{stype:Na.Value,svalue:s(o.svalue)}:o,Gx=(o,s)=>o.stype===Na.Value?s(o.svalue):o,sw=(o,s)=>o.stype===Na.Error?s(o.serror):o,rw=o=>({stype:Na.Value,svalue:o}),A1=o=>({stype:Na.Error,serror:o}),jt={fromResult:o=>o.fold(A1,rw),toResult:o=>ts(o,Te.error,Te.value),svalue:rw,partition:E1,serror:A1,bind:Gx,bindError:sw,map:nw,mapError:Bg,fold:ts},fa=o=>hn(o)&&qo(o).length>100?" removed due to size":JSON.stringify(o,null,2),Lk=o=>{const s=o.length>10?o.slice(0,10).concat([{path:[],getErrorInfo:nt("... (only showing first ten failures)")}]):o;return pt(s,a=>"Failed path: ("+a.path.join(" > ")+`) 53`+a.getErrorInfo())},Zr=(o,s)=>jt.serror([{path:o,getErrorInfo:s}]),Di=(o,s,a)=>Zr(o,()=>'Could not find valid *required* value for "'+s+'" in '+fa(a)),D1=(o,s)=>Zr(o,()=>'Choice schema did not contain choice key: "'+s+'"'),Hk=(o,s,a)=>Zr(o,()=>'The chosen schema: "'+a+'" did not exist in branches: '+fa(s)),yd=(o,s)=>Zr(o,()=>"There are unsupported fields: ["+s.join(", ")+"] specified"),zk=(o,s)=>Zr(o,nt(s)),pa=o=>{const s=(c,d)=>jt.bindError(o(d),f=>zk(c,f)),a=nt("val");return{extract:s,toString:a}},aw=pa(jt.svalue),Oi=nt(aw),Nt=(o,s)=>pa(a=>{const c=typeof a;return o(a)?jt.svalue(a):jt.serror(`Expected type: ${s} but got: ${c}`)}),qx=Nt(la,"number"),Ns=Nt($e,"string"),to=Nt(Ta,"boolean"),_u=Nt(ke,"function"),Mg=o=>{if(Object(o)!==o)return!0;switch({}.toString.call(o).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(o).every(s=>Mg(o[s]));default:return!1}},Wn=pa(o=>Mg(o)?jt.svalue(o):jt.serror("Expected value to be acceptable for sending via postMessage")),Ri=()=>({tag:"required",process:{}}),dp=o=>({tag:"defaultedThunk",process:o}),Pa=o=>dp(nt(o)),On=()=>({tag:"option",process:{}}),Su=o=>({tag:"mergeWithThunk",process:o}),Ng=o=>Su(nt(o)),Kx=(o,s,a,c)=>({tag:"field",key:o,newKey:s,presence:a,prop:c}),Yx=(o,s)=>({tag:"custom",newKey:o,instantiator:s}),Bi=(o,s,a)=>{switch(o.tag){case"field":return s(o.key,o.newKey,o.presence,o.prop);case"custom":return a(o.newKey,o.instantiator)}},mp=(o,s)=>jt.svalue(kn(s,e1.apply(void 0,o))),gp=o=>Ja(jt.serror,wt)(o),fp={consolidateObj:(o,s)=>{const a=jt.partition(o);return a.errors.length>0?gp(a.errors):mp(a.values,s)},consolidateArr:o=>{const s=jt.partition(o);return s.errors.length>0?gp(s.errors):jt.svalue(s.values)}},Jx=(o,s,a,c)=>he(s,a).fold(()=>Di(o,a,s),c),O1=(o,s,a,c)=>{const d=he(o,s).getOrThunk(()=>a(o));return c(d)},Uk=(o,s,a)=>a(he(o,s)),Wk=(o,s,a,c)=>{const d=he(o,s).map(f=>f===!0?a(o):f);return c(d)},Qx=(o,s,a,c,d)=>{const f=y=>d.extract(s.concat([c]),y),p=y=>y.fold(()=>jt.svalue(k.none()),C=>{const _=d.extract(s.concat([c]),C);return jt.map(_,k.some)});switch(o.tag){case"required":return Jx(s,a,c,f);case"defaultedThunk":return O1(a,c,o.process,f);case"option":return Uk(a,c,p);case"defaultedOptionThunk":return Wk(a,c,o.process,p);case"mergeWithThunk":return O1(a,c,nt({}),y=>{const C=kn(o.process(a),y);return f(C)})}},Zk=(o,s,a)=>{const c={},d=[];for(const f of a)Bi(f,(p,y,C,_)=>{const A=Qx(C,o,s,p,_);jt.fold(A,O=>{d.push(...O)},O=>{c[y]=O})},(p,y)=>{c[p]=y(s)});return d.length>0?jt.serror(d):jt.svalue(c)},pp=o=>({extract:(c,d)=>o().extract(c,d),toString:()=>o().toString()}),rR=o=>qo(Ur(o,$n)),Ia=o=>{const s=ve(o),a=An(o,(d,f)=>Bi(f,p=>kn(d,{[p]:!0}),nt(d)),{});return{extract:(d,f)=>{const p=Ta(f)?[]:rR(f),y=Io(p,C=>!Do(a,C));return y.length===0?s.extract(d,f):yd(d,y)},toString:s.toString}},ve=o=>({extract:(c,d)=>Zk(c,d,o),toString:()=>`obj{ 54`+pt(o,d=>Bi(d,(f,p,y,C)=>f+" -> "+C.toString(),(f,p)=>"state("+f+")")).join(` 55`)+"}"}),es=o=>({extract:(c,d)=>{const f=pt(d,(p,y)=>o.extract(c.concat(["["+y+"]"]),p));return fp.consolidateArr(f)},toString:()=>"array("+o.toString()+")"}),Pg=(o,s)=>{const a=s!==void 0?s:eo;return{extract:(f,p)=>{const y=[];for(const C of o){const _=C.extract(f,p);if(_.stype===Na.Value)return{stype:Na.Value,svalue:a(_.svalue)};y.push(_)}return fp.consolidateArr(y)},toString:()=>"oneOf("+pt(o,f=>f.toString()).join(", ")+")"}},iw=(o,s)=>{const a=(f,p)=>es(pa(o)).extract(f,p);return{extract:(f,p)=>{const y=qo(p),C=a(f,y);return jt.bind(C,_=>
55{const A=pt(_,O=>Kx(O,O,Ri(),s));return ve(A).extract(f,p)})},toString:()=>"setOf("+s.toString()+")"}},Cm=(o,s)=>{const a=fl(s);return{extract:(f,p)=>a().extract(f,p),toString:()=>a().toString()}},Ig=Ja(es,ve),t2=(o,s,a,c)=>he(a,c).fold(()=>Hk(o,a,c),f=>f.extract(o.concat(["branch: "+c]),s)),wm=(o,s)=>({extract:(d,f)=>he(f,o).fold(()=>D1(d,o),y=>t2(d,f,s,y)),toString:()=>"chooseOn("+o+"). Possible values: "+qo(s)}),cw=()=>es(aw),El=o=>pa(s=>o(s).fold(jt.serror,jt.svalue)),lw=(o,s)=>iw(a=>jt.fromResult(o(a)),s),e2=(o,s,a)=>{const c=s.extract([o],a);return jt.mapError(c,d=>({input:a,errors:d}))},zn=(o,s,a)=>jt.toResult(e2(o,s,a)),Fi=o=>o.fold(s=>{throw new Error($g(s))},eo),jr=(o,s,a)=>Fi(zn(o,s,a)),$g=o=>`Errors: 56`+Lk(o.errors).join(` 57`)+` 58 59Input object: `+fa(o.input),Gr=(o,s)=>wm(o,hs(s,ve)),_m=(o,s)=>Cm(o,s),Gs=Kx,qr=Yx,R1=o=>El(s=>Go(o,s)?Te.value(s):Te.error(`Unsupported value: "${s}", choose one of "${o.join(", ")}".`)),At=o=>Gs(o,o,Ri(),Oi()),ha=(o,s)=>Gs(o,o,Ri(),s),hp=o=>ha(o,qx),Kn=o=>ha(o,Ns),sc=(o,s)=>Gs(o,o,Ri(),R1(s)),$a=o=>ha(o,_u),jk=(o,s)=>Gs(o,o,On(),pa(a=>jt.serror("The field: "+o+" is forbidden. "+s))),Al=(o,s)=>Gs(o,o,Ri(),ve(s)),uw=(o,s)=>Gs(o,o,Ri(),Ig(s)),ba=(o,s)=>Gs(o,o,Ri(),es(s)),Uo=o=>Gs(o,o,On(),Oi()),$c=(o,s)=>Gs(o,o,On(),s),Lg=o=>$c(o,qx),Yn=o=>$c(o,Ns),o2=(o,s)=>$c(o,R1(s)),n2=o=>$c(o,to),rc=o=>$c(o,_u),B1=(o,s)=>$c(o,es(s)),xa=(o,s)=>$c(o,ve(s)),Gk=(o,s)=>$c(o,Ia(s)),at=(o,s)=>Gs(o,o,Pa(s),Oi()),ai=(o,s,a)=>Gs(o,o,Pa(s),a),bp=(o,s)=>ai(o,s,qx),Zn=(o,s)=>ai(o,s,Ns),Kr=(o,s,a)=>ai(o,s,R1(a)),Ps=(o,s)=>ai(o,s,to),dn=(o,s)=>ai(o,s,_u),dw=(o,s)=>ai(o,s,Wn),Cd=(o,s,a)=>ai(o,s,es(a)),wd=(o,s,a)=>ai(o,s,ve(a)),Hg=(o,s)=>{const a={};return is(o,(c,d)=>{Go(s,d)||(a[d]=c)}),a},xp=(o,s)=>({[o]:s}),s2=o=>{const s={};return It(o,a=>{s[a.key]=a.value}),s},r2=(o,s)=>Hg(o,s),_d=(o,s)=>xp(o,s),zg=o=>s2(o),mw=(o,s)=>o.length===0?Te.value(s):Te.value(kn(s,e1.apply(void 0,o))),a2=o=>Te.error(wt(o)),qk=(o,s)=>{const a=_C(o);return a.errors.length>0?a2(a.errors):mw(a.values,s)},kr=nt,La=kr("touchstart"),as=kr("touchmove"),Sd=kr("touchend"),vp=kr("touchcancel"),va=kr("mousedown"),Vg=kr("mousemove"),Ds=kr("mouseout"),F1=kr("mouseup"),ii=kr("mouseover"),ac=kr("focusin"),i2=kr("focusout"),qs=kr("keydown"),Ug=kr("keyup"),Lc=kr("input"),Sm=kr("change"),km=kr("click"),Kk=kr("transitioncancel"),M1=kr("transitionend"),ku=kr("transitionstart"),yp=kr("selectstart"),mn=o=>nt("alloy."+o),gw={tap:mn("tap")},Eu=mn("focus"),Wg=mn("blur.post"),N1=mn("paste.post"),Au=mn("receive"),mr=mn("execute"),Em=mn("focus.item"),Zg=gw.tap,P1=mn("longpress"),I1=mn("sandbox.close"),$1=mn("typeahead.cancel"),Cp=mn("system.init"),fw=mn("system.touchmove"),c2=mn("system.touchend"),l2=mn("system.scroll"),jg=mn("system.resize"),Hc=mn("system.attached"),Mi=mn("system.detached"),Tu=mn("system.dismissRequested"),pw=mn("system.repositionRequested"),L1=mn("focusmanager.shifted"),u2=mn("slotcontainer.visibility"),hw=mn("system.external.element.scroll"),d2=mn("change.tab"),H1=mn("dismiss.tab"),z1=mn("highlight"),V1=mn("dehighlight"),zc=o=>wr(o),wp="unknown";var Gg;(function(o){o[o.STOP=0]="STOP",o[o.NORMAL=1]="NORMAL",o[o.LOGGING=2]="LOGGING"})(Gg||(Gg={}));const Am=fe({}),bw=(o,s)=>{const a=[],c=new Date().getTime();return{logEventCut:(d,f,p)=>{a.push({outcome:"cut",target:f,purpose:p})},logEventStopped:(d,f,p)=>{a.push({outcome:"stopped",target:f,purpose:p})},logNoParent:(d,f,p)=>{a.push({outcome:"no-parent",target:f,purpose:p})},logEventNoHandlers:(d,f)=>{a.push({outcome:"no-handlers-left",target:f})},logEventResponse:(d,f,p)=>{a.push({outcome:"response",purpose:p,target:f})},write:()=>{const d=new Date().getTime();Go(["mousemove","mouseover","mouseout",Cp()],o)||console.log(o,{event:o,time:d-c,target:s.dom,sequence:pt(a,f=>Go(["cut","stopped","response"],f.outcome)?"{"+f.purpose+"} "+f.outcome+" at ("+zc(f.target)+")":f.outcome)})}}},qg=(o,s,a)=>{switch(he(Am.get(),o).orThunk(()=>{const d=qo(Am.get());return bi(d,f=>o.indexOf(f)>-1?k.some(Am.get()[f]):k.none())}).getOr(Gg.NORMAL)){case Gg.NORMAL:return a(U1());case Gg.LOGGING:{const d=bw(o,s),f=a(d);return d.write(),f}case Gg.STOP:return!0}},Yr=["alloy/data/Fields","alloy/debugging/Debugging"],Yk=()=>{const o=new Error;if(o.stack!==void 0){const s=o.stack.split(` 60`);return xt(s,a=>a.indexOf("alloy")>0&&!ps(Yr,c=>a.indexOf(c)>-1)).getOr(wp)}else return wp},m2={logEventCut:q,logEventStopped:q,logNoParent:q,logEventNoHandlers:q,logEventResponse:q,write:q},g2=(o,s,a)=>qg(o,s,a),U1=nt(m2),xw=nt([At("menu"),At("selectedMenu")]),Tm=nt([At("item"),At("selectedItem")]);nt(ve(Tm().concat(xw())));const vw=nt(ve(Tm())),_p=Al("initSize",[At("numColumns"),At("numRows")]),f2=()=>ha("markers",vw()),yw=()=>Al("markers",[At("backgroundMenu")].concat(xw()).concat(Tm())),vo=o=>Al("markers",pt(o,At)),W1=(o,s,a)=>(Yk(),Gs(s,s,a,El(c=>Te.value((...d)=>c.apply(void 0,d))))),ko=o=>W1("onHandler",o,Pa(q)),Ha=o=>W1("onKeyboardHandler",o,Pa(k.none)),kd=o=>W1("onHandler",o,Ri()),Sp=o=>W1("onKeyboardHandler",o,Ri()),$o=(o,s)=>qr(o,nt(s)),Cw=o=>qr(o,eo),ww=nt(_p),Xk=(o,s,a)=>{const c=a.toString(),d=c.indexOf(")")+1,f=c.indexOf("("),p=c.substring(f+1,d-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:s,parameters:Dm(p.slice(0,1).concat(p.slice(3)))}),o},Dm=o=>pt(o,s=>du(s,"/*")?s.substring(0,s.length-2):s),kp=(o,s)=>{const a=o.toString(),c=a.indexOf(")")+1,d=a.indexOf("("),f=a.substring(d+1,c-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:s,parameters:Dm(f)}),o},_w=(o,s)=>{const a=s.toString(),c=a.indexOf(")")+1,d=a.indexOf("("),f=a.substring(d+1,c-1).split(/,\s*/);return o.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:Dm(f.slice(1))}),o},Jk=(o,s)=>{let a=null;return{cancel:()=>{a!==null&&(clearTimeout(a),a=null)},schedule:(...f)=>{a=setTimeout(()=>{o.apply(null,f),a=null},s)}}},Qk=5,Sw=400,kw=o=>{const s=o.raw;return s.touches===void 0||s.touches.length!==1?k.none():k.some(s.touches[0])},tE=(o,s)=>{const a=Math.abs(o.clientX-s.x),c=Math.abs(o.clientY-s.y);return a>Qk||c>Qk},eE=o=>{const s=Ze(),a=fe(!1),c=Jk(_=>{o.triggerEvent(P1(),_),a.set(!0)},Sw),d=_=>(kw(_).each(A=>{c.cancel();const O={x:A.clientX,y:A.clientY,target:_.target};c.schedule(_),a.set(!1),s.set(O)}),k.none()),f=_=>(c.cancel(),kw(_).each(A=>{s.on(O=>{tE(A,O)&&s.clear()})}),k.none()),p=_=>{c.cancel();const A=O=>ln(O.target,_.target);return s.get().filter(A).map(O=>a.get()?(_.prevent(),!1):o.triggerEvent(Zg(),_))},y=zg([{key:La(),value:d},{key:as(),value:f},{key:Sd(),value:p}]);return{fireIfReady:(_,A)=>he(y,A).bind(O=>O(_))}};var Om;(function(o){o.OnFocusMode="onFocus",o.OnEnterOrSpaceMode="onEnterOrSpace",o.OnApiMode="onApi"})(Om||(Om={}));const za="placeholder",Is=Zi.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Ed=o=>nn(o,"uiType"),ic=(o,s,a,c)=>o.exists(d=>d!==a.owner)?Is.single(!0,nt(a)):he(c,a.name).fold(()=>{throw new Error("Unknown placeholder component: "+a.name+` 61Known: [`+qo(c)+`] 62Namespace: `+o.getOr("none")+` 63Spec: `+JSON.stringify(a,null,2))},d=>d.replace()),Tl=(o,s,a,c)=>Ed(a)&&a.uiType===za?ic(o,s,a,c):Is.single(!1,nt(a)),Kg=(o,s,a,c)=>Tl(o,s,a,c).fold((f,p)=>{const y=Ed(a)?p(s,a.config,a.validated):p(s),C=he(y,"components").getOr([]),_=Y(C,A=>Kg(o,s,A,c));return[{...y,components:_}]},(f,p)=>
63{if(Ed(a)){const y=p(s,a.config,a.validated);return a.validated.preprocess.getOr(eo)(y)}else return p(s)}),Yg=(o,s,a,c)=>Y(a,d=>Kg(o,s,d,c)),Z1=(o,s)=>{let a=!1;const c=()=>a,d=()=>{if(a)throw new Error("Trying to use the same placeholder more than once: "+o);return a=!0,s},f=()=>s.fold((p,y)=>p,(p,y)=>p);return{name:nt(o),required:f,used:c,replace:d}},oE=(o,s,a,c)=>{const d=hs(c,(p,y)=>Z1(y,p)),f=Yg(o,s,a,d);return is(d,p=>{if(p.used()===!1&&p.required())throw new Error("Placeholder: "+p.name()+` was not found in components list 64Namespace: `+o.getOr("none")+` 65Components: `+JSON.stringify(s.components,null,2))}),f},j1=Is.single,p2=Is.multiple,h2=nt(za),Ep=Zi.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Du=at("factory",{sketch:eo}),G1=at("schema",[]),Ap=At("name"),q1=Gs("pname","pname",dp(o=>"<alloy."+ee(o.name)+">"),Oi()),Ew=qr("schema",()=>[Uo("preprocess")]),Dl=at("defaults",nt({})),K1=at("overrides",nt({})),Aw=ve([Du,G1,Ap,q1,Dl,K1]),nE=ve([Du,G1,Ap,Dl,K1]),sE=ve([Du,G1,Ap,q1,Dl,K1]),Tw=ve([Du,Ew,Ap,At("unit"),q1,Dl,K1]),b2=o=>o.fold(k.some,k.none,k.some,k.some),Ol=o=>{const s=a=>a.name;return o.fold(s,s,s,s)},Dw=o=>o.fold(eo,eo,eo,eo),cc=(o,s)=>a=>{const c=jr("Converting part type",s,a);return o(c)},Lr=cc(Ep.required,Aw),Ni=cc(Ep.external,nE),Xr=cc(Ep.optional,sE),Y1=cc(Ep.group,Tw),Rm=nt("entirety");var X1=Object.freeze({__proto__:null,required:Lr,external:Ni,optional:Xr,group:Y1,asNamedPart:b2,name:Ol,asCommon:Dw,original:Rm});const x2=(o,s,a,c)=>kn(s.defaults(o,a,c),a,{uid:o.partUids[s.name]},s.overrides(o,a,c)),rE=(o,s,a)=>{const c={},d={};return It(a,f=>{f.fold(p=>{c[p.pname]=j1(!0,(y,C,_)=>p.factory.sketch(x2(y,p,C,_)))},p=>{const y=s.parts[p.name];d[p.name]=nt(p.factory.sketch(x2(s,p,y[Rm()]),y))},p=>{c[p.pname]=j1(!1,(y,C,_)=>p.factory.sketch(x2(y,p,C,_)))},p=>{c[p.pname]=p2(!0,(y,C,_)=>{const A=y[p.name];return pt(A,O=>p.factory.sketch(kn(p.defaults(y,O,_),O,p.overrides(y,O))))})})}),{internals:nt(c),externals:nt(d)}},Ad=(o,s)=>{const a={};return It(s,c=>{b2(c).each(d=>{const f=Td(o,d.pname);a[d.name]=p=>{const y=jr("Part: "+d.name+" in "+o,ve(d.schema),p);return{...f,config:p,validated:y}}})}),a},Td=(o,s)=>({uiType:h2(),owner:o,name:s}),v2=(o,s,a)=>({uiType:h2(),owner:o,name:s,config:a,validated:{}}),$s=o=>Y(o,s=>s.fold(k.none,k.some,k.none,k.none).map(a=>Al(a.name,a.schema.concat([Cw(Rm())]))).toArray()),Tp=o=>pt(o,Ol),ya=(o,s,a)=>rE(o,s,a),J1=(o,s,a)=>oE(k.some(o),s,s.components,a),rn=(o,s,a)=>{const c=s.partUids[a];return o.getSystem().getByUid(c).toOptional()},Vc=(o,s,a)=>rn(o,s,a).getOrDie("Could not find part: "+a),Ou=(o,s,a)=>{const c={},d=s.partUids,f=o.getSystem();return It(a,p=>{c[p]=nt(f.getByUid(d[p]))}),c},Uc=(o,s)=>{const a=o.getSystem();return hs(s.partUids,(c,d)=>nt(a.getByUid(c)))},ci=o=>qo(o.partUids),Q1=(o,s,a)=>{const c={},d=s.partUids,f=o.getSystem();return It(a,p=>{c[p]=nt(f.getByUid(d[p]).getOrDie())}),c},Ow=(o,s)=>{const a=Tp(s);return zg(pt(a,c=>({key:c,value:o+"-"+c})))},Ru=o=>Gs("partUids","partUids",Su(s=>Ow(s.uid,o)),Oi());var Bm=Object.freeze({__proto__:null,generate:Ad,generateOne:v2,schemas:$s,names:Tp,substitutes:ya,components:J1,defaultUids:Ow,defaultUidsSchema:Ru,getAllParts:Uc,getAllPartNames:ci,getPart:rn,getPartOrDie:Vc,getParts:Ou,getPartsOrDie:Q1});const y2=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Va=(o,s,a,c=1)=>{const d=o*c,f=s*c,p=C=>he(a,C).getOr([]),y=(C,_,A)=>{const O=st(y2,A);return{offset:Jo(C,_),classesOn:Y(A,p),classesOff:Y(O,p)}};return{southeast:()=>y(-o,s,["top","alignLeft"]),southwest:()=>y(o,s,["top","alignRight"]),south:()=>y(-o/2,s,["top","alignCentre"]),northeast:()=>y(-o,-s,["bottom","alignLeft"]),northwest:()=>y(o,-s,["bottom","alignRight"]),north:()=>y(-o/2,-s,["bottom","alignCentre"]),east:()=>y(o,-s/2,["valignCentre","left"]),west:()=>y(-o,-s/2,["valignCentre","right"]),insetNortheast:()=>y(d,f,["top","alignLeft","inset"]),insetNorthwest:()=>y(-d,f,["top","alignRight","inset"]),insetNorth:()=>y(-d/2,f,["top","alignCentre","inset"]),insetSoutheast:()=>y(d,-f,["bottom","alignLeft","inset"]),insetSouthwest:()=>y(-d,-f,["bottom","alignRight","inset"]),insetSouth:()=>y(-d/2,-f,["bottom","alignCentre","inset"]),insetEast:()=>y(-d,-f/2,["valignCentre","right","inset"]),insetWest:()=>y(d,-f/2,["valignCentre","left","inset"])}},Dd=()=>Va(0,0,{}),gr=(o,s,a,c,d,f,p,y=!1)=>({x:o,y:s,bubble:a,direction:c,placement:d,restriction:f,label:`${p}-${d}`,alwaysFit:y}),lc=Zi.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),t0=(o,s,a,c,d,f,p,y,C)=>o.fold(s,a,c,d,f,p,y,C),Fm=(o,s,a,c)=>o.fold(s,s,c,c,s,c,a,a),Od=(o,s,a,c)=>o.fold(s,c,s,c,a,a,s,c),Dp=lc.southeast,C2=lc.southwest,e0=lc.northeast,Mm=lc.northwest,Rd=lc.south,w2=lc.north,Op=lc.east,_2=lc.west,Rw=(o,s)=>{switch(s){case 1:return o.x;case 0:return o.x+o.width;case 2:return o.y;case 3:return o.y+o.height}},Ls=(o,s)=>de(["left","right","top","bottom"],a=>he(s,a).map(c=>Rw(o,c))),Bd=(o,s,a)=>{const c=(C,_)=>s[C].map(A=>{const O=C==="top"||C==="bottom",M=O?a.top:a.left,L=(C==="left"||C==="top"?Math.max:Math.min)(A,_)+M;return O?da(L,o.y,o.bottom):da(L,o.x,o.right)}).getOr(_),d=c("left",o.x),f=c("top",o.y),p=c("right",o.right),y=c("bottom",o.bottom);return Ts(d,f,p-d,y-f)},Fd="layout",Bw=o=>o.x,o0=(o,s)=>o.x+o.width/2-s.width/2,S2=(o,s)=>o.x+o.width-s.width,Rp=(o,s)=>o.y-s.height,n0=o=>o.y+o.height,Fw=(o,s)=>o.y+o.height/2-s.height/2,aE=o=>o.x+o.width,Bp=(o,s)=>o.x-s.width,Os=(o,s,a)=>gr(Bw(o),n0(o),a.southeast(),Dp(),"southeast",Ls(o,{left:1,top:3}),Fd),vs=(o,s,a)=>gr(S2(o,s),n0(o),a.southwest(),C2(),"southwest",Ls(o,{right:0,top:3}),Fd),fr=(o,s,a)=>gr(Bw(o),Rp(o,s),a.northeast(),e0(),"northeast",Ls(o,{left:1,bottom:2}),Fd),Qs=(o,s,a)=>gr(S2(o,s),Rp(o,s),a.northwest(),Mm(),"northwest",Ls(o,{right:0,bottom:2}),Fd),Mn=(o,s,a)=>gr(o0(o,s),Rp(o,s),a.north(),w2(),"north",Ls(o,{bottom:2}),Fd),ys=(o,s,a)=>gr(o0(o,s),n0(o),a.south(),Rd(),"south",Ls(o,{top:3}),Fd),Xg=(o,s,a)=>gr(aE(o),Fw(o,s),a.east(),Op(),"east",Ls(o,{left:0}),Fd),k2=(o,s,a)=>gr(Bp(o,s),Fw(o,s),a.west(),_2(),"west",Ls(o,{right:1}),Fd),E2=()=>[Os,vs,fr,Qs,ys,Mn,Xg,k2],Mw=()=>[vs,Os,Qs,fr,ys,Mn,Xg,k2],s0=()=>[fr,Qs,Os,vs,Mn,ys],A2=()=>[Qs,fr,vs,Os,Mn,ys],T2=()=>
65[Os,vs,fr,Qs,ys,Mn],r0=()=>[vs,Os,Qs,fr,ys,Mn],D2="data-alloy-placement",Jg=(o,s)=>{Ee(o,D2,s)},Nw=o=>ir(o,D2),Fp=o=>Tn(o,D2),Wc="layout-inset",a0=o=>o.x,Mp=(o,s)=>o.x+o.width/2-s.width/2,Qg=(o,s)=>o.x+o.width-s.width,Nm=o=>o.y,Np=(o,s)=>o.y+o.height-s.height,i0=(o,s)=>o.y+o.height/2-s.height/2,Pp=(o,s,a)=>gr(Qg(o,s),Np(o,s),a.insetSouthwest(),Mm(),"southwest",Ls(o,{right:0,bottom:3}),Wc),c0=(o,s,a)=>gr(a0(o),Np(o,s),a.insetSoutheast(),e0(),"southeast",Ls(o,{left:1,bottom:3}),Wc),Pm=(o,s,a)=>gr(Qg(o,s),Nm(o),a.insetNorthwest(),C2(),"northwest",Ls(o,{right:0,top:2}),Wc),Jr=(o,s,a)=>gr(a0(o),Nm(o),a.insetNortheast(),Dp(),"northeast",Ls(o,{left:1,top:2}),Wc),Er=(o,s,a)=>gr(Mp(o,s),Nm(o),a.insetNorth(),Rd(),"north",Ls(o,{top:2}),Wc),tf=(o,s,a)=>gr(Mp(o,s),Np(o,s),a.insetSouth(),w2(),"south",Ls(o,{bottom:3}),Wc),gt=(o,s,a)=>gr(Qg(o,s),i0(o,s),a.insetEast(),_2(),"east",Ls(o,{right:0}),Wc),Ip=(o,s,a)=>gr(a0(o),i0(o,s),a.insetWest(),Op(),"west",Ls(o,{left:1}),Wc),iE=o=>{switch(o){case"north":return Er;case"northeast":return Jr;case"northwest":return Pm;case"south":return tf;case"southeast":return c0;case"southwest":return Pp;case"east":return gt;case"west":return Ip}},Qr=(o,s,a,c,d)=>Nw(c).map(iE).getOr(Er)(o,s,a,c,d),ef=o=>{switch(o){case"north":return tf;case"northeast":return c0;case"northwest":return Pp;case"south":return Er;case"southeast":return Jr;case"southwest":return Pm;case"east":return Ip;case"west":return gt}},Zc=(o,s,a,c,d)=>Nw(c).map(ef).getOr(Er)(o,s,a,c,d),O2=(o,s)=>{op(o,Math.floor(s))},R2=nt((o,s)=>{O2(o,s),qn(o,{"overflow-x":"hidden","overflow-y":"auto"})}),Im=nt((o,s)=>{O2(o,s)}),$p=nt((o,s)=>{wk(o,Math.floor(s))});var Bu;(function(o){o.TopToBottom="toptobottom",o.BottomToTop="bottomtotop"})(Bu||(Bu={}));const l0="data-alloy-vertical-dir",cE=o=>v1(o,s=>Ba(s)&&Ws(s,"data-alloy-vertical-dir")===Bu.BottomToTop);var Ar;(function(o){o[o.HighlightMenuAndItem=0]="HighlightMenuAndItem",o[o.HighlightJustMenu=1]="HighlightJustMenu",o[o.HighlightNone=2]="HighlightNone"})(Ar||(Ar={}));const jc={init:()=>Ua({readState:nt("No State required")})},Ua=o=>o,lE={can:_e,abort:Fo,run:q},of=o=>{if(!Do(o,"can")&&!Do(o,"abort")&&!Do(o,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(o,null,2)+" does not have can, abort, or run!");return{...lE,...o}},Pw=(o,s)=>(...a)=>Zo(o,(c,d)=>c&&s(d).apply(void 0,a),!0),u0=(o,s)=>(...a)=>Zo(o,(c,d)=>c||s(d).apply(void 0,a),!1),uE=o=>ke(o)?{can:_e,abort:Fo,run:o}:o,Iw=o=>{const s=Pw(o,d=>d.can),a=u0(o,d=>d.abort);return{can:s,abort:a,run:(...d)=>{It(o,f=>{f.run.apply(void 0,d)})}}},no=(o,s)=>{m0(o,o.element,s,{})},be=(o,s,a)=>{m0(o,o.element,s,a)},nf=o=>{no(o,mr())},d0=(o,s,a)=>{m0(o,s,a,{})},m0=(o,s,a,c)=>{const d={target:s,...c};o.getSystem().triggerEvent(a,s,d)},dE=(o,s,a,c)=>{const d={...c,target:s};o.getSystem().triggerEvent(a,s,d)},B2=(o,s,a,c)=>{o.getSystem().triggerEvent(a,s,c.event)},Rn=o=>zg(o),g0=(o,s)=>({key:o,value:of({abort:s})}),f0=(o,s)=>({key:o,value:of({can:s})}),F2=o=>({key:o,value:of({run:(s,a)=>{a.event.prevent()}})}),vt=(o,s)=>({key:o,value:of({run:s})}),sf=(o,s,a)=>({key:o,value:of({run:(c,d)=>{s.apply(void 0,[c,d].concat(a))}})}),$m=o=>s=>vt(o,s),Rl=o=>s=>({key:o,value:of({run:(a,c)=>{Zx(a,c)&&s(a,c)}})}),uc=(o,s)=>vt(o,(a,c)=>{a.getSystem().getByUid(s).each(d=>{B2(d,d.element,o,c)})}),Bl=(o,s,a)=>{const c=s.partUids[a];return uc(o,c)},rf=(o,s)=>vt(o,(a,c)=>{const d=c.event,f=a.getSystem().getByDom(d.target).getOrThunk(()=>oc(d.target,y=>a.getSystem().getByDom(y).toOptional(),Fo).getOr(a));s(a,f,c)}),Lm=o=>vt(o,(s,a)=>{a.cut()}),mE=o=>vt(o,(s,a)=>{a.stop()}),af=(o,s)=>Rl(o)(s),vn=Rl(Hc()),dc=Rl(Mi()),M2=Rl(Cp()),Md=$m(mr()),Gc=o=>({classes:zs(o.classes)?[]:o.classes,attributes:zs(o.attributes)?{}:o.attributes,styles:zs(o.styles)?{}:o.styles}),Tr=(o,s)=>({...o,attributes:{...o.attributes,...s.attributes},styles:{...o.styles,...s.styles},classes:o.classes.concat(s.classes)}),$w=(o,s,a)=>Md(c=>{a(c,o,s)}),N2=(o,s,a)=>M2((c,d)=>{a(c,o,s)}),Lw=(o,s,a,c,d,f)=>{const p=Ia(o),y=xa(s,[Gk("config",o)]);return Hw(p,y,s,a,c,d,f)},gE=(o,s,a,c,d,f)=>{const p=o,y=xa(s,[$c("config",o)]);return Hw(p,y,s,a,c,d,f)},fE=(o,s,a)=>Xk((d,...f)=>{const p=[d].concat(f);return d.config({name:nt(o)}).fold(()=>{throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+a)},y=>{const C=Array.prototype.slice.call(p,1);return s.apply(void 0,[d,y.config,y.state].concat(C))})},a,s),P2=o=>({key:o,value:void 0}),Hw=(o,s,a,c,d,f,p)=>{const y=O=>Do(O,a)?O[a]():k.none(),C=hs(d,(O,M)=>fE(a,O,M)),A={...hs(f,(O,M)=>kp(O,M)),...C,revoke:so(P2,a),config:O=>{const M=jr(a+"-config",o,O);return{key:a,value:{config:M,me:A,configAsRaw:fl(()=>jr(a+"-config",o,O)),initialConfig:O,state:p}}},schema:nt(s),exhibit:(O,M)=>Ec(y(O),he(c,"exhibit"),(I,L)=>L(M,I.config,I.state)).getOrThunk(()=>Gc({})),name:nt(a),handlers:O=>y(O).map(M=>he(c,"events").getOr(()=>({}))(M.config,M.state)).getOr({})};return A}
vendor: 4,984 bytes, line 65
65,Pt=o=>zg(o),I2=Ia([At("fields"),At("name"),at("active",{}),at("apis",{}),at("state",jc),at("extra",{})]),tr=o=>{const s=jr("Creating behaviour: "+o.name,I2,o);return Lw(s.fields,s.name,s.active,s.apis,s.extra,s.state)},$2=Ia([At("branchKey"),At("branches"),At("name"),at("active",{}),at("apis",{}),at("state",jc),at("extra",{})]),L2=o=>{const s=jr("Creating behaviour: "+o.name,$2,o);return gE(Gr(s.branchKey,s.branches),s.name,s.active,s.apis,s.extra,s.state)},H2=nt(void 0),pE=(o,s)=>{const a=Rn(s);return tr({fields:[At("enabled")],name:o,active:{events:nt(a)}})},Me=(o,s)=>{const a=pE(o,s);return{key:o,value:{config:{},me:a,configAsRaw:nt({}),initialConfig:{},state:jc}}},zw=o=>({init:()=>{const a=fe(o);return{get:()=>a.get(),set:y=>a.set(y),clear:()=>a.set(o),readState:()=>a.get()}}}),Vw=(o,s)=>{s.ignore||(Js(o.element),s.onFocus(o))};var Uw=Object.freeze({__proto__:null,focus:Vw,blur:(o,s)=>{s.ignore||Qn(o.element)},isFocused:o=>Xi(o.element)}),Ww=Object.freeze({__proto__:null,exhibit:(o,s)=>{const a=s.ignore?{}:{attributes:{tabindex:"-1"}};return Gc(a)},events:o=>Rn([vt(Eu(),(s,a)=>{Vw(s,o),a.stop()})].concat(o.stopMousedown?[vt(va(),(s,a)=>{a.event.prevent()})]:[]))}),xE=[ko("onFocus"),at("stopMousedown",!1),at("ignore",!1)];const Ie=tr({fields:xE,name:"focusing",active:Ww,apis:Uw}),z2=[8],Fu=[9],Pi=[13],p0=[27],ta=[32],cf=[37],Lp=[38],h0=[39],lf=[40],uf=nt("tooltipping.close.all"),Fl=nt("dismiss.popups"),Cs=nt("reposition.popups"),Mu=nt("mouse.released"),Zw=(o,s,a)=>{const c=Ct(o.slice(0,s)),d=Ct(o.slice(s+1));return xt(c.concat(d),a)},V2=(o,s,a)=>{const c=Ct(o.slice(0,s));return xt(c,a)},jw=(o,s,a)=>{const c=o.slice(0,s),d=o.slice(s+1);return xt(d.concat(c),a)},vE=(o,s,a)=>{const c=o.slice(s+1);return xt(c,a)},yo=o=>s=>{const a=s.raw;return Go(o,a.which)},mc=o=>s=>po(o,a=>a(s)),Nd=o=>o.raw.shiftKey===!0,iR=o=>o.raw.ctrlKey===!0,df=mt(Nd),wo=(o,s)=>({matches:o,classification:s}),yE=(o,s)=>xt(o,c=>c.matches(s)).map(c=>c.classification),CE=(o,s,a,c)=>{const d=ur(o.element,"."+s.highlightClass);It(d,f=>{ps(c,y=>ln(y.element,f))||(Un(f,s.highlightClass),o.getSystem().getByDom(f).each(y=>{s.onDehighlight(o,y),no(y,V1())}))})},cR=(o,s,a)=>CE(o,s,a,[]),lR=(o,s,a,c)=>{Vp(o,s,a,c)&&(Un(c.element,s.highlightClass),s.onDehighlight(o,c),no(c,V1()))},Hp=(o,s,a,c)=>{CE(o,s,a,[c]),Vp(o,s,a,c)||(sn(c.element,s.highlightClass),s.onHighlight(o,c),no(c,z1()))},wE=(o,s,a)=>{b0(o,s).each(c=>{Hp(o,s,a,c)})},_E=(o,s,a)=>{U2(o,s).each(c=>{Hp(o,s,a,c)})},zp=(o,s,a,c)=>{kE(o,s,a,c).fold(d=>{throw d},d=>{Hp(o,s,a,d)})},SE=(o,s,a,c)=>{const d=Kw(o,s);xt(d,c).each(p=>{Hp(o,s,a,p)})},Vp=(o,s,a,c)=>bs(c.element,s.highlightClass),Gw=(o,s,a)=>Ko(o.element,"."+s.highlightClass).bind(c=>o.getSystem().getByDom(c).toOptional()),kE=(o,s,a,c)=>{const d=ur(o.element,"."+s.itemClass);return k.from(d[c]).fold(()=>Te.error(new Error("No element found with index "+c)),o.getSystem().getByDom)},b0=(o,s,a)=>Ko(o.element,"."+s.itemClass).bind(c=>o.getSystem().getByDom(c).toOptional()),U2=(o,s,a)=>{const c=ur(o.element,"."+s.itemClass);return(c.length>0?k.some(c[c.length-1]):k.none()).bind(f=>o.getSystem().getByDom(f).toOptional())},W2=(o,s,a,c)=>{const d=ur(o.element,"."+s.itemClass);return $t(d,p=>bs(p,s.highlightClass)).bind(p=>{const y=lm(p,c,0,d.length-1);return o.getSystem().getByDom(d[y]).toOptional()})},qw=(o,s,a)=>W2(o,s,a,-1),EE=(o,s,a)=>W2(o,s,a,1),Kw=(o,s,a)=>{const c=ur(o.element,"."+s.itemClass);return um(pt(c,d=>o.getSystem().getByDom(d).toOptional()))};var Z2=Object.freeze({__proto__:null,dehighlightAll:cR,dehighlight:lR,highlight:Hp,highlightFirst:wE,highlightLast:_E,highlightAt:zp,highlightBy:SE,isHighlighted:Vp,getHighlighted:Gw,getFirst:b0,getLast:U2,getPrevious:qw,getNext:EE,getCandidates:Kw}),Yw=[At("highlightClass"),At("itemClass"),ko("onHighlight"),ko("onDehighlight")];const Bo=tr({fields:Yw,name:"highlighting",apis:Z2}),Xw=(o,s,a)=>{s.exists(d=>a.exists(f=>ln(f,d)))||be(o,L1(),{prevFocus:s,newFocus:a})},j2=()=>{const o=a=>Es(a.element);return{get:o,set:(a,c)=>{const d=o(a);a.getSystem().triggerFocus(c,a.element);const f=o(a);Xw(a,d,f)}}},x0=()=>{const o=a=>Bo.getHighlighted(a).map(c=>c.element);return{get:o,set:(a,c)=>{const d=o(a);a.getSystem().getByDom(c).fold(q,p=>{Bo.highlight(a,p)});const f=o(a);Xw(a,d,f)}}},Nu=(o,s,a,c,d)=>{const f=()=>o.concat([at("focusManager",j2()),ai("focusInside","onFocus",El(_=>Go(["onFocus","onEnterOrSpace","onApi"],_)?Te.value(_):Te.error("Invalid value for focusInside"))),$o("handler",C),$o("state",s),$o("sendFocusIn",d)]),p=(_,A,O,M,I)=>{const L=O(_,A,M,I);return yE(L,A.event).bind(W=>W(_,A,M,I))},C={schema:f,processKey:p,toEvents:(_,A)=>{const O=_.focusInside!==Om.OnFocusMode?k.none():d(_).map(L=>vt(Eu(),(W,j)=>{L(W,_,A),j.stop()})),M=(L,W)=>{const j=yo(ta.concat(Pi))(W.event);_.focusInside===Om.OnEnterOrSpaceMode&&j&&Zx(L,W)&&d(_).each(V=>{V(L,_,A),W.stop()})},I=[vt(qs(),(L,W)=>{p(L,W,a,_,A).fold(()=>{M(L,W)},j=>{W.stop()})}),vt(Ug(),(L,W)=>{p(L,W,c,_,A).each(j=>{W.stop()})})];
65return Rn(O.toArray().concat(I))}};return C},G2=o=>{const s=[Uo("onEscape"),Uo("onEnter"),at("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),at("firstTabstop",0),at("useTabstopAt",_e),Uo("visibilitySelector")].concat([o]),a=(V,K)=>{const tt=V.visibilitySelector.bind(ct=>$r(K,ct)).getOr(K);return Zs(tt)>0},c=(V,K)=>{const tt=ur(V.element,K.selector),ct=Io(tt,dt=>a(K,dt));return k.from(ct[K.firstTabstop])},d=(V,K)=>K.focusManager.get(V).bind(tt=>$r(tt,K.selector)),f=(V,K)=>a(V,K)&&V.useTabstopAt(K),p=(V,K,tt)=>{c(V,K).each(ct=>{K.focusManager.set(V,ct)})},y=(V,K,tt,ct,dt)=>dt(K,tt,Wt=>f(ct,Wt)).fold(()=>ct.cyclic?k.some(!0):k.none(),Wt=>(ct.focusManager.set(V,Wt),k.some(!0))),C=(V,K,tt,ct)=>{const dt=Io(ur(V.element,tt.selector),Wt=>a(tt,Wt));return d(V,tt).bind(Wt=>$t(dt,so(ln,Wt)).bind(Ot=>y(V,dt,Ot,tt,ct)))},_=(V,K,tt)=>{const ct=tt.cyclic?Zw:V2;return C(V,K,tt,ct)},A=(V,K,tt)=>{const ct=tt.cyclic?jw:vE;return C(V,K,tt,ct)},O=V=>Tx(V).bind(ho).exists(K=>ln(K,V)),M=(V,K,tt)=>d(V,tt).filter(ct=>!tt.useTabstopAt(ct)).bind(ct=>(O(ct)?_:A)(V,K,tt)),I=(V,K,tt)=>tt.onEnter.bind(ct=>ct(V,K)),L=(V,K,tt)=>(V.getSystem().broadcastOn([uf()],{closedTooltip:()=>{K.stop()}}),K.isStopped()?k.none():tt.onEscape.bind(ct=>ct(V,K))),W=nt([wo(mc([Nd,yo(Fu)]),_),wo(yo(Fu),A),wo(mc([df,yo(Pi)]),I)]),j=nt([wo(yo(p0),L),wo(yo(Fu),M)]);return Nu(s,jc.init,W,j,()=>k.some(p))};var AE=G2(qr("cyclic",Fo)),Jw=G2(qr("cyclic",_e));const mf=o=>Mr("input")(o)&&Ws(o,"type")!=="radio"||Mr("textarea")(o),Qw=(o,s,a)=>(d0(o,a,mr()),k.some(!0)),Up=(o,s,a)=>mf(a)&&yo(ta)(s.event)?k.none():Qw(o,s,a),Wp=(o,s)=>k.some(!0),q2=[at("execute",Up),at("useSpace",!1),at("useEnter",!0),at("useControlEnter",!1),at("useDown",!1)],Pd=(o,s,a)=>a.execute(o,s,o.element),t_=(o,s,a,c)=>{const d=a.useSpace&&!mf(o.element)?ta:[],f=a.useEnter?Pi:[],p=a.useDown?lf:[],y=d.concat(f).concat(p);return[wo(yo(y),Pd)].concat(a.useControlEnter?[wo(mc([iR,yo(Pi)]),Pd)]:[])},e_=(o,s,a,c)=>a.useSpace&&!mf(o.element)?[wo(yo(ta),Wp)]:[];var o_=Nu(q2,jc.init,t_,e_,()=>k.none());const n_=()=>{const o=Ze();return Ua({readState:()=>o.get().map(d=>({numRows:String(d.numRows),numColumns:String(d.numColumns)})).getOr({numRows:"?",numColumns:"?"}),setGridSize:(d,f)=>{o.set({numRows:d,numColumns:f})},getNumRows:()=>o.get().map(d=>d.numRows),getNumColumns:()=>o.get().map(d=>d.numColumns)})};var s_=Object.freeze({__proto__:null,flatgrid:n_,init:o=>o.state(o)});const v0=o=>(s,a,c,d)=>{const f=o(s.element);return w0(f,s,a,c,d)},y0=(o,s)=>{const a=Nx(o,s);return v0(a)},Zp=(o,s)=>{const a=Nx(s,o);return v0(a)},C0=o=>(s,a,c,d)=>w0(o,s,a,c,d),w0=(o,s,a,c,d)=>c.focusManager.get(s).bind(p=>o(s.element,p,c,d)).map(p=>(c.focusManager.set(s,p),!0)),se=C0,Id=C0,Ml=C0,jp=(o,s)=>$t(o,s).map(a=>({index:a,candidates:o})),r_=(o,s,a)=>{const c=p=>ln(p,s),d=ur(o,a),f=Io(d,np);return jp(f,c)},K2=(o,s)=>$t(o,a=>ln(s,a)),Y2=(o,s,a,c)=>{const d=Math.floor(s/a),f=s%a;return c(d,f).bind(p=>{const y=p.row*a+p.column;return y>=0&&y<o.length?k.some(o[y]):k.none()})},a_=(o,s,a,c,d)=>Y2(o,s,c,(f,p)=>{const C=f===a-1?o.length-f*c:c,_=lm(p,d,0,C-1);return k.some({row:f,column:_})}),i_=(o,s,a,c,d)=>Y2(o,s,c,(f,p)=>{const y=lm(f,d,0,a-1),_=y===a-1?o.length-y*c:c,A=da(p,0,_-1);return k.some({row:y,column:A})}),c_=(o,s,a,c)=>a_(o,s,a,c,1),_0=(o,s,a,c)=>a_(o,s,a,c,-1),ws=(o,s,a,c)=>i_(o,s,a,c,-1),gc=(o,s,a,c)=>i_(o,s,a,c,1),S0=[At("selector"),at("execute",Up),Ha("onEscape"),at("captureTab",!1),ww()],l_=(o,s,a)=>{Ko(o.element,s.selector).each(c=>{s.focusManager.set(o,c)})},u_=(o,s)=>s.focusManager.get(o).bind(a=>$r(a,s.selector)),d_=(o,s,a,c)=>u_(o,a).bind(d=>a.execute(o,s,d)),k0=o=>(s,a,c,d)=>r_(s,a,c.selector).bind(f=>o(f.candidates,f.index,d.getNumRows().getOr(c.initSize.numRows),d.getNumColumns().getOr(c.initSize.numColumns))),X2=(o,s,a)=>a.captureTab?k.some(!0):k.none(),m_=(o,s,a)=>a.onEscape(o,s),g_=k0(_0),Gp=k0(c_),J2=k0(ws),E0=k0(gc),Q2=nt([wo(yo(cf),y0(g_,Gp)),wo(yo(h0),Zp(g_,Gp)),wo(yo(Lp),se(J2)),wo(yo(lf),Id(E0)),wo(mc([Nd,yo(Fu)]),X2),wo(mc([df,yo(Fu)]),X2),wo(yo(ta.concat(Pi)),d_)]),TE=nt([wo(yo(p0),m_),wo(yo(ta),Wp)]);var f_=Nu(S0,n_,Q2,TE,()=>k.some(l_));
65const p_=(o,s,a,c,d)=>{const f=y=>qi(y)==="button"&&Ws(y,"disabled")==="disabled",p=(y,C,_)=>d(y,C,c,0,_.length-1,_[C],A=>f(_[A])?p(y,A,_):k.from(_[A]));return r_(o,a,s).bind(y=>{const C=y.index,_=y.candidates;return p(C,C,_)})},A0=(o,s,a,c)=>p_(o,s,a,c,(d,f,p,y,C,_,A)=>{const O=da(f+p,y,C);return O===d?k.from(_):A(O)}),Hm=(o,s,a,c)=>p_(o,s,a,c,(d,f,p,y,C,_,A)=>{const O=lm(f,p,y,C);return O===d?k.none():A(O)}),h_=[At("selector"),at("getInitial",k.none),at("execute",Up),Ha("onEscape"),at("executeOnMove",!1),at("allowVertical",!0),at("allowHorizontal",!0),at("cycles",!0)],b_=(o,s)=>s.focusManager.get(o).bind(a=>$r(a,s.selector)),T0=(o,s,a)=>b_(o,a).bind(c=>a.execute(o,s,c)),DE=(o,s,a)=>{s.getInitial(o).orThunk(()=>Ko(o.element,s.selector)).each(c=>{s.focusManager.set(o,c)})},OE=(o,s,a)=>(a.cycles?Hm:A0)(o,a.selector,s,-1),zm=(o,s,a)=>(a.cycles?Hm:A0)(o,a.selector,s,1),tv=o=>(s,a,c,d)=>o(s,a,c,d).bind(()=>c.executeOnMove?T0(s,a,c):k.some(!0)),RE=(o,s,a)=>a.onEscape(o,s),BE=(o,s,a,c)=>{const d=[...a.allowHorizontal?cf:[]].concat(a.allowVertical?Lp:[]),f=[...a.allowHorizontal?h0:[]].concat(a.allowVertical?lf:[]);return[wo(yo(d),tv(y0(OE,zm))),wo(yo(f),tv(Zp(OE,zm))),wo(yo(Pi),T0),wo(yo(ta),T0)]},x_=nt([wo(yo(ta),Wp),wo(yo(p0),RE)]);var FE=Nu(h_,jc.init,BE,x_,()=>k.some(DE));const ev=(o,s,a)=>k.from(o[s]).bind(c=>k.from(c[a]).map(d=>({rowIndex:s,columnIndex:a,cell:d}))),D0=(o,s,a,c)=>{const f=o[s].length,p=lm(a,c,0,f-1);return ev(o,s,p)},ov=(o,s,a,c)=>{const d=lm(a,c,0,o.length-1),f=o[d].length,p=da(s,0,f-1);return ev(o,d,p)},Nl=(o,s,a,c)=>{const f=o[s].length,p=da(a+c,0,f-1);return ev(o,s,p)},v_=(o,s,a,c)=>{const d=da(a+c,0,o.length-1),f=o[d].length,p=da(s,0,f-1);return ev(o,d,p)},O0=(o,s,a)=>D0(o,s,a,1),ME=(o,s,a)=>D0(o,s,a,-1),$d=(o,s,a)=>ov(o,a,s,-1),NE=(o,s,a)=>ov(o,a,s,1),PE=(o,s,a)=>Nl(o,s,a,-1),dR=(o,s,a)=>Nl(o,s,a,1),mR=(o,s,a)=>v_(o,a,s,-1),gf=(o,s,a)=>v_(o,a,s,1),qp=[Al("selectors",[At("row"),At("cell")]),at("cycles",!0),at("previousSelector",k.none),at("execute",Up)],nv=(o,s,a)=>{s.previousSelector(o).orThunk(()=>{const d=s.selectors;return Ko(o.element,d.cell)}).each(d=>{s.focusManager.set(o,d)})},IE=(o,s,a)=>Es(o.element).bind(c=>a.execute(o,s,c)),$E=(o,s)=>pt(o,a=>ur(a,s.selectors.cell)),R0=(o,s)=>(a,c,d)=>{const f=d.cycles?o:s;return $r(c,d.selectors.row).bind(p=>{const y=ur(p,d.selectors.cell);return K2(y,c).bind(C=>{const _=ur(a,d.selectors.row);return K2(_,p).bind(A=>{const O=$E(_,d);return f(O,A,C).map(M=>M.cell)})})})},y_=R0(ME,PE),C_=R0(O0,dR),Kp=R0($d,mR),B0=R0(NE,gf),sv=nt([wo(yo(cf),y0(y_,C_)),wo(yo(h0),Zp(y_,C_)),wo(yo(Lp),se(Kp)),wo(yo(lf),Id(B0)),wo(yo(ta.concat(Pi)),IE)]),Yp=nt([wo(yo(ta),Wp)]);var rv=Nu(qp,jc.init,sv,Yp,()=>k.some(nv));const LE=[At("selector"),at("execute",Up),at("moveOnTab",!1)],Xp=(o,s,a)=>a.focusManager.get(o).bind(c=>a.execute(o,s,c)),w_=(o,s,a)=>{Ko(o.element,s.selector).each(c=>{s.focusManager.set(o,c)})},F0=(o,s,a)=>Hm(o,a.selector,s,-1),M0=(o,s,a)=>Hm(o,a.selector,s,1),Vm=(o,s,a,c)=>a.moveOnTab?Ml(F0)(o,s,a,c):k.none(),HE=(o,s,a,c)=>a.moveOnTab?Ml(M0)(o,s,a,c):k.none(),Pl=nt([wo(yo(Lp),Ml(F0)),wo(yo(lf),Ml(M0)),wo(mc([Nd,yo(Fu)]),Vm),wo(mc([df,yo(Fu)]),HE),wo(yo(Pi),Xp),wo(yo(ta),Xp)]),zE=nt([wo(yo(ta),Wp)]);var __=Nu(LE,jc.init,Pl,zE,()=>k.some(w_));const VE=[Ha("onSpace"),Ha("onEnter"),Ha("onShiftEnter"),Ha("onLeft"),Ha("onRight"),Ha("onTab"),Ha("onShiftTab"),Ha("onUp"),Ha("onDown"),Ha("onEscape"),at("stopSpaceKeyup",!1),Uo("focusIn")],gR=(o,s,a)=>[wo(yo(ta),a.onSpace),wo(mc([df,yo(Pi)]),a.onEnter),wo(mc([Nd,yo(Pi)]),a.onShiftEnter),wo(mc([Nd,yo(Fu)]),a.onShiftTab),wo(mc([df,yo(Fu)]),a.onTab),wo(yo(Lp),a.onUp),wo(yo(lf),a.onDown),wo(yo(cf),a.onLeft),wo(yo(h0),a.onRight),wo(yo(ta),a.onSpace)],N0=(o,s,a)=>[...a.stopSpaceKeyup?[wo(yo(ta),Wp)]:[],wo(yo(p0),a.onEscape)];var UE=Nu(VE,jc.init,gR,N0,o=>o.focusIn);const WE=AE.schema(),ZE=Jw.schema(),av=FE.schema(),jE=f_.schema(),S_=rv.schema(),iv=o_.schema(),GE=__.schema(),qE=UE.schema();var cv=Object.freeze({__proto__:null,acyclic:WE,cyclic:ZE,flow:av,flatgrid:jE,matrix:S_,execution:iv,menu:GE,special:qE});const k_=o=>Do(o,"setGridSize"),pe=L2({branchKey:"mode",branches:cv,name:"keying",active:{events:(o,s)=>o.handler.toEvents(o,s)},apis:{focusIn:(o,s,a)=>{s.sendFocusIn(s).fold(()=>
65{o.getSystem().triggerFocus(o.element,o.element)},c=>{c(o,s,a)})},setGridSize:(o,s,a,c,d)=>{k_(a)?a.setGridSize(c,d):console.error("Layout does not support setGridSize")}},state:s_}),Jp=ee("alloy-premade"),E_=o=>(Object.defineProperty(o.element.dom,Jp,{value:o.uid,writable:!0}),_d(Jp,o)),KE=o=>nn(o.dom,Jp),lv=o=>he(o,Jp),Qp=o=>_w((s,...a)=>o(s.getApis(),s,...a),o),P0=o=>o.getSystem().isConnected(),th=o=>{no(o,Mi());const s=o.components();It(s,th)},ff=o=>{const s=o.components();It(s,ff),no(o,Hc())},uv=(o,s)=>{o.getSystem().addToWorld(s),Ro(o.element)&&ff(s)},dv=o=>{th(o),o.getSystem().removeFromWorld(o)},A_=(o,s)=>{ar(o.element,s.element)},mv=o=>{It(o.components(),s=>Ji(s.element)),d1(o.element),o.syncComponents()},T_=(o,s,a)=>{const c=o.components();mv(o);const d=a(s),f=st(c,d);It(f,p=>{th(p),o.getSystem().removeFromWorld(p)}),It(d,p=>{P0(p)?A_(o,p):(o.getSystem().addToWorld(p),A_(o,p),Ro(o.element)&&ff(p))}),o.syncComponents()},pf=(o,s,a)=>{const c=o.components(),d=Y(s,y=>lv(y).toArray());It(c,y=>{Go(d,y)||dv(y)});const f=a(s),p=st(c,f);It(p,y=>{P0(y)&&dv(y)}),It(f,y=>{P0(y)||uv(o,y)}),o.syncComponents()},Pu=(o,s)=>{hf(o,s,ar)},hf=(o,s,a)=>{o.getSystem().addToWorld(s),a(o.element,s.element),Ro(o.element)&&ff(s),o.syncComponents()},Iu=o=>{th(o),Ji(o.element),o.getSystem().removeFromWorld(o)},$u=o=>{const s=ga(o.element).bind(a=>o.getSystem().getByDom(a).toOptional());Iu(o),s.each(a=>{a.syncComponents()})},D_=o=>{const s=o.components();It(s,Iu),d1(o.element),o.syncComponents()},eh=(o,s)=>{O_(o,s,ar)},fc=(o,s)=>{O_(o,s,HC)},O_=(o,s,a)=>{a(o,s.element);const c=Dc(s.element);It(c,d=>{s.getByDom(d).each(ff)})},R_=o=>{const s=Dc(o.element);It(s,a=>{o.getByDom(a).each(th)}),Ji(o.element)},gv=(o,s,a)=>md(o,s).map(d=>{if(a.exists(p=>!ln(p,d))){const p=a.map(qi).getOr("span"),y=Zt.fromTag(p);return pm(d,y),y}else return d}),fv=(o,s,a)=>{a.fold(()=>ar(o,s),c=>{ln(c,s)||(pm(c,s),Ji(c))})},B_=(o,s,a)=>{const c=pt(s,a),d=Dc(o);return It(d.slice(c.length),Ji),c},F_=(o,s,a,c)=>{const d=md(o,s),f=c(a,d),p=gv(o,s,d);return fv(o,f.element,p),f},YE=(o,s,a)=>B_(o,s,(c,d)=>F_(o,d,c,a)),M_=(o,s)=>B_(o,s,(a,c)=>{const d=md(o,c);return fv(o,a,d),a}),Um=(o,s)=>{const a=ks(s),c=rr(a).bind(f=>{const p=y=>ln(f,y);return p(s)?k.some(s):Px(s,p)}),d=o(s);return c.each(f=>{rr(a).filter(p=>ln(p,f)).fold(()=>{Js(f)},q)}),d},pv=(o,s)=>{Um(()=>{T_(o,s,()=>pt(s,o.getSystem().build))},o.element)},N_=(o,s)=>{Um(()=>{pf(o,s,()=>YE(o.element,s,o.getSystem().buildOrPatch))},o.element)},hv=(o,s,a,c)=>{dv(s);const d=F_(o.element,a,c,o.getSystem().buildOrPatch);uv(o,d),o.syncComponents()},bv=(o,s,a)=>{const c=o.getSystem().build(a);hf(o,c,s)},xv=(o,s,a,c)=>{$u(s),bv(o,(d,f)=>Bx(d,f,a),c)},XE=(o,s,a,c)=>(s.reuseDom?N_:pv)(o,c),Wm=(o,s,a,c)=>{bv(o,ar,c)},Zm=(o,s,a,c)=>{bv(o,Rx,c)},I0=(o,s,a,c)=>{const d=$0(o);xt(d,p=>ln(c.element,p.element)).each($u)},$0=(o,s)=>o.components(),P_=(o,s,a,c,d)=>{const f=$0(o);return k.from(f[c]).map(p=>(d.fold(()=>$u(p),y=>{(s.reuseDom?hv:xv)(o,p,c,y)}),p))};var I_=Object.freeze({__proto__:null,append:Wm,prepend:Zm,remove:I0,replaceAt:P_,replaceBy:(o,s,a,c,d)=>{const f=$0(o);return $t(f,c).bind(p=>P_(o,s,a,p,d))},set:XE,contents:$0});const ze=tr({fields:[Ps("reuseDom",!0)],name:"replacing",apis:I_}),L0=(o,s,a)=>ln(s,o.element)&&!ln(s,a),li=Rn([f0(Eu(),(o,s)=>{const a=s.event,c=a.originator,d=a.target;return L0(o,c,d)?(console.warn(Eu()+` did not get interpreted by the desired target. 66Originator: `+zc(c)+` 67Target: `+zc(d)+` 68Check the `+Eu()+" event handlers"),!1):!0})]);var oh=Object.freeze({__proto__:null,events:li});const QE=nt("alloy-id-"),H0=nt("data-alloy-id"),tA=QE(),vv=H0(),yv=(o,s)=>{const a=ee(tA+o);return nh(s,a),a},nh=(o,s)=>{Object.defineProperty(o.dom,vv,{value:s,writable:!0})},qc=o=>{const s=Ba(o)?o.dom[vv]:null;return k.from(s)},bf=o=>ee(o),eA=eo,jm=o=>{const s=d=>`The component must be in a context to execute: ${d}`+(o?` 69`+zc(o().element)+" is not in context.":""),a=d=>()=>{throw new Error(s(d))},c=d=>()=>{console.warn(s(d))};return{debugInfo:nt("fake"),triggerEvent:c("triggerEvent"),triggerFocus:c("triggerFocus"),triggerEscape:c("triggerEscape"),broadcast:c("broadcast"),broadcastOn:c("broadcastOn"),broadcastEvent:c("broadcastEvent"),build:a("build"),buildOrPatch:a("buildOrPatch"),addToWorld:a("addToWorld"),removeFromWorld:a("removeFromWorld"),addToGui:a("addToGui"),removeFromGui:a("removeFromGui"),getByUid:a("getByUid"),getByDom:a("getByDom"),isConnected:Fo}},sh=jm(),z0=(o,s)=>{const a=pt(s,d=>
69xa(d.name(),[At("config"),at("state",jc)])),c=zn("component.behaviours",ve(a),o.behaviours).fold(d=>{throw new Error($g(d)+` 70Complete spec: 71`+JSON.stringify(o,null,2))},eo);return{list:s,data:hs(c,d=>{const f=d.map(p=>({config:p.config,state:p.state.init(p.config)}));return nt(f)})}},Hs=o=>o.list,oA=o=>o.data,Cv=(o,s)=>{const a={};return is(o,(c,d)=>{is(c,(f,p)=>{const y=he(a,p).getOr([]);a[p]=y.concat([s(d,f)])})}),a},Ld=(o,s,a,c)=>{const d={...s};It(a,A=>{d[A.name()]=A.exhibit(o,c)});const f=Cv(d,(A,O)=>({name:A,modification:O})),p=A=>An(A,(O,M)=>({...M.modification,...O}),{}),y=An(f.classes,(A,O)=>O.modification.concat(A),[]),C=p(f.attributes),_=p(f.styles);return Gc({classes:y,attributes:C,styles:_})},Il=(o,s,a,c)=>{try{const d=We(a,(f,p)=>{const y=f[s],C=p[s],_=c.indexOf(y),A=c.indexOf(C);if(_===-1)throw new Error("The ordering for "+o+" does not have an entry for "+y+`. 72Order specified: `+JSON.stringify(c,null,2));if(A===-1)throw new Error("The ordering for "+o+" does not have an entry for "+C+`. 73Order specified: `+JSON.stringify(c,null,2));return _<A?-1:A<_?1:0});return Te.value(d)}catch(d){return Te.error([d])}},wv=(o,s)=>({handler:o,purpose:s}),$_=(o,s)=>({cHandler:o,purpose:s}),nA=(o,s)=>$_(so.apply(void 0,[o.handler].concat(s)),o.purpose),V0=o=>o.cHandler,rh=(o,s)=>({name:o,handler:s}),Hd=(o,s)=>{const a={};return It(o,c=>{a[c.name()]=c.handlers(s)}),a},U0=(o,s,a)=>{const c={...a,...Hd(s,o)};return Cv(c,rh)},W0=(o,s,a,c)=>{const d=U0(o,a,c);return Z0(d,s)},zd=o=>{const s=uE(o);return(a,c,...d)=>{const f=[a,c].concat(d);s.abort.apply(void 0,f)?c.stop():s.can.apply(void 0,f)&&s.run.apply(void 0,f)}},ah=(o,s)=>Te.error(["The event ("+o+`) has more than one behaviour that listens to it. 74When this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]). 75The behaviours that can trigger it are: `+JSON.stringify(pt(s,a=>a.name),null,2)]),_v=(o,s,a)=>{const c=s[a];return c?Il("Event: "+a,"name",o,c).map(d=>{const f=pt(d,p=>p.handler);return Iw(f)}):ah(a,o)},Z0=(o,s)=>{const a=Wr(o,(c,d)=>(c.length===1?Te.value(c[0].handler):_v(c,s,d)).map(p=>{const y=zd(p),C=c.length>1?Io(s[d],_=>ps(c,A=>A.name===_)).join(" > "):c[0].name;return _d(d,wv(y,C))}));return qk(a,{})},Kc="alloy.base.behaviour",L_=ve([Gs("dom","dom",Ri(),ve([At("tag"),at("styles",{}),at("classes",[]),at("attributes",{}),Uo("value"),Uo("innerHtml")])),At("components"),At("uid"),at("events",{}),at("apis",{}),Gs("eventOrder","eventOrder",Ng({[mr()]:["disabling",Kc,"toggling","typeaheadevents"],[Eu()]:[Kc,"focusing","keying"],[Cp()]:[Kc,"disabling","toggling","representing","tooltipping"],[Lc()]:[Kc,"representing","streaming","invalidating"],[Mi()]:[Kc,"representing","item-events","toolbar-button-events","tooltipping"],[va()]:["focusing",Kc,"item-type-events"],[La()]:["focusing",Kc,"item-type-events"],[ii()]:["item-type-events","tooltipping"],[Au()]:["receiving","reflecting","tooltipping"]}),Oi()),Uo("domModification")]),$l=o=>zn("custom.definition",L_,o),Sv=o=>({...o.dom,uid:o.uid,domChildren:pt(o.components,s=>s.element)}),j0=o=>o.domModification.fold(()=>Gc({}),Gc),xf=o=>o.events,ih=(o,s)=>{const a=qo(o),c=qo(s),d=st(c,a),f=Vs(o,(p,y)=>!nn(s,y)||p!==s[y]).t;return{toRemove:d,toSet:f}},G0=(o,s)=>{const{class:a,style:c,...d}=bm(s),{toSet:f,toRemove:p}=ih(o.attributes,d),y=()=>{It(p,tt=>Tn(s,tt)),Fx(s,f)},C=As(s),{toSet:_,toRemove:A}=ih(o.styles,C),O=()=>{It(A,tt=>uo(s,tt)),qn(s,_)},M=Lx(s),I=st(M,o.classes),L=st(o.classes,M),W=()=>{kl(s,L),_r(s,I)},j=tt=>{Mc(s,tt)},V=()=>{const tt=o.domChildren;M_(s,tt)},K=()=>{const tt=s,ct=o.value.getOrUndefined();ct!==si(tt)&&hd(tt,ct??"")};return y(),W(),O(),o.innerHtml.fold(V,j),K(),s},sA=o=>{const s=Zt.fromTag(o.tag);Fx(s,o.attributes),kl(s,o.classes),qn(s,o.styles),o.innerHtml.each(c=>Mc(s,c));const a=o.domChildren;return zC(s,a),o.value.each(c=>{hd(s,c)}),s},H_=(o,s)=>{try{const a=G0(o,s);return k.some(a)}catch{return k.none()}},q0=o=>o.innerHtml.isSome()&&o.domChildren.length>0,rA=(o,s)=>{const a=d=>qi(d)===o.tag&&!q0(o)&&!KE(d),c=s.filter(a).bind(d=>H_(o,d)).getOrThunk(()=>sA(o));return nh(c,o.uid),c},kv=o=>{const s=he(o,"behaviours").getOr({});return Y(qo(s),a=>{const c=s[a];return $n(c)?[c.me]:[]})},Yc=(o,s)=>
75z0(o,s),Ev=o=>{const s=kv(o);return Yc(o,s)},aA=(o,s,a)=>{const c=Sv(o),d=j0(o),f={"alloy.base.modification":d},p=s.length>0?Ld(a,f,s,c):d;return Tr(c,p)},z_=(o,s,a)=>{const c={"alloy.base.behaviour":xf(o)};return W0(a,o.eventOrder,s,c).getOrDie()},V_=(o,s)=>{const a=()=>tt,c=fe(sh),d=Fi($l(o)),f=Ev(o),p=Hs(f),y=oA(f),C=aA(d,p,y),_=rA(C,s),A=z_(d,p,y),O=fe(d.components),M=ct=>{c.set(ct)},I=()=>{c.set(jm(a))},L=()=>{const ct=Dc(_),dt=Y(ct,Wt=>c.get().getByDom(Wt).fold(()=>[],Je));O.set(dt)},W=ct=>{const dt=y;return(ke(dt[ct.name()])?dt[ct.name()]:()=>{throw new Error("Could not find "+ct.name()+" in "+JSON.stringify(o,null,2))})()},j=ct=>ke(y[ct.name()]),V=()=>d.apis,K=ct=>y[ct]().map(dt=>dt.state.readState()).getOr("not enabled"),tt={uid:o.uid,getSystem:c.get,config:W,hasConfigured:j,spec:o,readState:K,getApis:V,connect:M,disconnect:I,element:_,syncComponents:L,components:O.get,events:A};return tt},U_=(o,s)=>{const a=he(o,"components").getOr([]);return s.fold(()=>pt(a,m),c=>pt(a,(d,f)=>l(d,md(c,f))))},iA=(o,s)=>{const{events:a,...c}=eA(o),d=U_(c,s),f={...c,events:{...oh,...a},components:d};return Te.value(V_(f,s))},En=o=>{const s=Zt.fromText(o);return ui({element:s})},ui=o=>{const s=jr("external.component",Ia([At("element"),Uo("uid")]),o),a=fe(jm()),c=y=>{a.set(y)},d=()=>{a.set(jm(()=>p))},f=s.uid.getOrThunk(()=>bf("external"));nh(s.element,f);const p={uid:f,getSystem:a.get,config:k.none,hasConfigured:Fo,connect:c,disconnect:d,getApis:()=>({}),element:s.element,spec:o,readState:nt("No state"),syncComponents:q,components:nt([]),events:{}};return E_(p)},vf=bf,Ii=o=>nn(o,"uid"),l=(o,s)=>lv(o).getOrThunk(()=>{const a=Ii(o)?o:{uid:vf(""),...o};return iA(a,s).getOrDie()}),m=o=>l(o,k.none()),h=E_;var B=Object.freeze({__proto__:null,block:(o,s,a,c)=>{Ee(o.element,"aria-busy",!0);const d=s.getRoot(o).getOr(o),f=Pt([pe.config({mode:"special",onTab:()=>k.some(!0),onShiftTab:()=>k.some(!0)}),Ie.config({})]),p=c(d,f),y=d.getSystem().build(p);ze.append(d,h(y)),y.hasConfigured(pe)&&s.focus&&pe.focusIn(y),a.isBlocked()||s.onBlock(o),a.blockWith(()=>ze.remove(d,y))},unblock:(o,s,a)=>{Tn(o.element,"aria-busy"),a.isBlocked()&&s.onUnblock(o),a.clear()},isBlocked:(o,s,a)=>a.isBlocked()}),P=[dn("getRoot",k.none),Ps("focus",!0),ko("onBlock"),ko("onUnblock")],G=Object.freeze({__proto__:null,init:()=>{const o=ux(),s=a=>{o.set({destroy:a})};return Ua({readState:o.isSet,blockWith:s,clear:o.clear,isBlocked:o.isSet})}});const ot=tr({fields:P,name:"blocking",apis:B,state:G});var Jt=Object.freeze({__proto__:null,getCurrent:(o,s,a)=>s.find(o)});const Kt=[At("find")],Rt=tr({fields:Kt,name:"composing",apis:Jt});var Se=Object.freeze({__proto__:null,getCoupled:(o,s,a,c)=>a.getOrCreate(o,s,c),getExistingCoupled:(o,s,a,c)=>a.getExisting(o,s,c)}),Ke=[ha("others",lw(Te.value,Oi()))],Lo=Object.freeze({__proto__:null,init:()=>{const o={},s=(f,p)=>{if(qo(f.others).length===0)throw new Error("Cannot find any known coupled components");return he(o,p)},a=(f,p,y)=>s(p,y).getOrThunk(()=>{const _=he(p.others,y).getOrDie("No information found for coupled component: "+y)(f),A=f.getSystem().build(_);return o[y]=A,A}),c=(f,p,y)=>s(p,y).orThunk(()=>(he(p.others,y).getOrDie("No information found for coupled component: "+y),k.none())),d=nt({});return Ua({readState:d,getExisting:c,getOrCreate:a})}});const Ve=tr({fields:Ke,name:"coupling",apis:Se,state:Lo}),Wo=["input","button","textarea","select"],us=(o,s,a)=>{(s.disabled()?ea:er)(o,s)},di=(o,s)=>s.useNative===!0&&Go(Wo,qi(o.element)),Gm=o=>cr(o.element,"disabled"),Vd=o=>{Ee(o.element,"disabled","disabled")},qm=o=>{Tn(o.element,"disabled")},Qo=o=>Ws(o.element,"aria-disabled")==="true",Xn=o=>{Ee(o.element,"aria-disabled","true")},Ca=o=>{Ee(o.element,"aria-disabled","false")},ea=(o,s,a)=>{s.disableClass.each(d=>{sn(o.element,d)}),(di(o,s)?Vd:Xn)(o),s.onDisabled(o)},er=(o,s,a)=>{s.disableClass.each(d=>{Un(o.element,d)}),(di(o,s)?qm:Ca)(o),s.onEnabled(o)},Lu=(o,s)=>di(o,s)?Gm(o):Qo(o);var Av=Object.freeze({__proto__:null,enable:er,disable:ea,isDisabled:Lu,onLoad:us,set:(o,s,a,c)=>{(c?ea:er)(o,s)}}),Dr=Object.freeze({__proto__:null,exhibit:(o,s)=>Gc({classes:s.disabled()?s.disableClass.toArray():[]}),events:(o,s)=>Rn([g0(mr(),(a,c)=>Lu(a,o)),N2(o,s,us)])}),W_=[dn("disabled",Fo),at("useNative",!0),Uo("disableClass"),ko("onDisabled"),ko("onEnabled")];const ce=tr({fields:W_,name:"disabling",active:Dr,apis:Av}),wa=(o,s,a,c,d)=>{const f=p=>p+"px";return{position:o,left:s.map(f),top:a.map(f),right:c.map(f),bottom:d.map(f)}},cA=o=>({...o,position:k.some(o.position)}),Z_=(o,s)=>{lr(o,cA(s))},Y0=(o,s)=>{const a=o.element;sn(a,s.transitionClass),Un(a,s.fadeOutClass),sn(a,s.fadeInClass),s.onShow(o)},Tv=(o,s)=>{const a=o.element;sn(a,s.transitionClass),Un(a,s.fadeInClass),sn(a,s.fadeOutClass),s.onHide(o)},Km=(o,s)=>o.y<s.bottom&&o.bottom>s.y,j_=(o,s)=>o.y>=s.y,Dv=(o,s)=>o.bottom<=s.bottom,Ov=(o,s,a)=>({location:"top",leftX:s,topY:a.bounds.y-o.y}),G_=(o,s,a)=>({location:"bottom",leftX:s,bottomY:o.bottom-a.bounds.bottom}),Rv=o=>o.box.x-o.win.x,wL=(o,s,a)=>{const c=s.win,d=s.box,f=Rv(s);return bi(o,p=>{switch(p){case"bottom":return Dv(d,a.bounds)?k.none():k.some(G_(c,f,a));case"top":return j_(d,a.bounds)?k.none():k.some(Ov(c,f,a));default:return k.none()}}).getOr({location:"no-dock"})},_L=(o,s,a)=>po(o,c=>{switch(c){case"bottom":return Dv(s,a.bounds);case"top":return j_(s,a.bounds)}}),SL=(o,s)=>{const a=s.optScrollEnv.fold(nt(o.bounds.y),c=>c.scrollElmTop+(o.bounds.y-c.currentScrollTop));return Jo(o.bounds.x,a)},Bv=(o,s)=>{const a=s.optScrollEnv.fold(nt(o.y),c=>o.y+c.currentScrollTop-c.scrollElmTop);return Jo(o.x,a)},Fv=(o,s,a)=>a.getInitialPos().map(c=>{const d=SL(c,s);return{box:Ts(d.left,d.top,Ir(o),Zs(o)),location:c.location}}),fR=(o,s,a,c,d)=>{const f=Bv(s,a),p=Ts(f.left,f.top,s.width,s.height);c.setInitialPos({style:As(o),position:Dn(o,"position")||"static",boun
75ds:p,location:d.location})},pR=(o,s,a,c,d)=>{c.getInitialPos().fold(()=>fR(o,s,a,c,d),()=>q)},hR=(o,s,a)=>a.getInitialPos().bind(c=>{switch(a.clearInitialPos(),c.position){case"static":return k.some({morph:"static"});case"absolute":const d=vd(o).getOr(ni()),f=xs(d),p=d.dom.scrollTop??0;return k.some({morph:"absolute",positionCss:wa("absolute",he(c.style,"left").map(y=>s.x-f.x),he(c.style,"top").map(y=>s.y-f.y+p),he(c.style,"right").map(y=>f.right-s.right),he(c.style,"bottom").map(y=>f.bottom-s.bottom))});default:return k.none()}}),bR=(o,s,a)=>Fv(o,s,a).filter(({box:c})=>_L(a.getModes(),c,s)).bind(({box:c})=>hR(o,c,a)),Mv=o=>{switch(o.location){case"top":return k.some({morph:"fixed",positionCss:wa("fixed",k.some(o.leftX),k.some(o.topY),k.none(),k.none())});case"bottom":return k.some({morph:"fixed",positionCss:wa("fixed",k.some(o.leftX),k.none(),k.none(),k.some(o.bottomY))});default:return k.none()}},X0=(o,s,a)=>{const c=xs(o),d=Sr(),f=wL(a.getModes(),{win:d,box:c},s);return f.location==="top"||f.location==="bottom"?(fR(o,c,s,a,f),Mv(f)):k.none()},lA=(o,s,a)=>bR(o,s,a).orThunk(()=>s.optScrollEnv.bind(c=>Fv(o,s,a)).bind(({box:c,location:d})=>{const f=Sr(),p=Rv({win:f,box:c}),y=d==="top"?Ov(f,p,s):G_(f,p,s);return Mv(y)})),kL=(o,s,a)=>{const c=o.element;return ji(Hn(c,"position"),"fixed")?lA(c,s,a):X0(c,s,a)},EL=(o,s,a)=>{const c=o.element;return Fv(c,s,a).bind(({box:d})=>hR(c,d,a))},xR=(o,s,a,c)=>{const d=xs(o),f=Sr(),p=Rv({win:f,box:d}),y=c(f,p,s);return y.location==="bottom"||y.location==="top"?(pR(o,d,s,a,y),Mv(y)):k.none()},Ym=(o,s,a)=>{a.setDocked(!1),It(["left","right","top","bottom","position"],c=>uo(o.element,c)),s.onUndocked(o)},Nv=(o,s,a,c)=>{const d=c.position==="fixed";a.setDocked(d),Z_(o.element,c),(d?s.onDocked:s.onUndocked)(o)},q_=(o,s,a,c,d=!1)=>{s.contextual.each(f=>{f.lazyContext(o).each(p=>{const y=Km(p,c.bounds);y!==a.isVisible()&&(a.setVisible(y),d&&!y?(kl(o.element,[f.fadeOutClass]),f.onHide(o)):(y?Y0:Tv)(o,f))})})},Pv=(o,s,a,c,d)=>{q_(o,s,a,c,!0),Nv(o,s,a,d.positionCss)},vR=(o,s,a,c,d)=>{switch(d.morph){case"static":return Ym(o,s,a);case"absolute":return Nv(o,s,a,d.positionCss);case"fixed":return Pv(o,s,a,c,d)}},K_=(o,s,a)=>{const c=s.lazyViewport(o);q_(o,s,a,c),kL(o,c,a).each(d=>{vR(o,s,a,c,d)})},uA=(o,s,a)=>{const c=o.element;a.setDocked(!1);const d=s.lazyViewport(o);EL(o,d,a).each(f=>{switch(f.morph){case"static":{Ym(o,s,a);break}case"absolute":{Nv(o,s,a,f.positionCss);break}}}),a.setVisible(!0),s.contextual.each(f=>{_r(c,[f.fadeInClass,f.fadeOutClass,f.transitionClass]),f.onShow(o)}),Y_(o,s,a)},Y_=(o,s,a)=>{o.getSystem().isConnected()&&K_(o,s,a)},yR=(o,s,a)=>{a.isDocked()&&uA(o,s,a)},zu=o=>(s,a,c)=>{const d=a.lazyViewport(s);xR(s.element,d,c,o).each(p=>{Pv(s,a,c,d,p)})},AL=zu(Ov),TL=zu(G_);var dA=Object.freeze({__proto__:null,refresh:Y_,reset:yR,isDocked:(o,s,a)=>a.isDocked(),getModes:(o,s,a)=>a.getModes(),setModes:(o,s,a,c)=>a.setModes(c),forceDockToTop:AL,forceDockToBottom:TL}),CR=Object.freeze({__proto__:null,events:(o,s)=>Rn([af(M1(),(a,c)=>{o.contextual.each(d=>{bs(a.element,d.transitionClass)&&(_r(a.element,[d.transitionClass,d.fadeInClass]),(s.isVisible()?d.onShown:d.onHidden)(a)),c.stop()})}),vt(l2(),(a,c)=>{Y_(a,o,s)}),vt(hw(),(a,c)=>{Y_(a,o,s)}),vt(jg(),(a,c)=>{yR(a,o,s)})])}),mA=[xa("contextual",[Kn("fadeInClass"),Kn("fadeOutClass"),Kn("transitionClass"),$a("lazyContext"),ko("onShow"),ko("onShown"),ko("onHide"),ko("onHidden")]),dn("lazyViewport",()=>({bounds:Sr(),optScrollEnv:k.none()})),Cd("modes",["top","bottom"],Ns),ko("onDocked"),ko("onUndocked")],wR=Object.freeze({__proto__:null,init:o=>{const s=fe(!1),a=fe(!0),c=Ze(),d=fe(o.modes),f=()=>`docked: ${s.get()}, visible: ${a.get()}, modes: ${d.get().join(",")}`;return Ua({isDocked:s.get,setDocked:s.set,getInitialPos:c.get,setInitialPos:c.set,clearInitialPos:c.clear,isVisible:a.get,setVisible:a.set,getModes:d.get,setModes:d.set,readState:f})}});const Nn=tr({fields:mA,name:"docking",active:CR,apis:dA,state:wR}),gA=Zi.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),X_=o=>s=>s.translate(-o.left,-o.top),$v=o=>s=>s.translate(o.left,o.top),Ud=o=>(s,a)=>Zo(o,(c,d)=>d(c),Jo(s,a)),J_=(o,s,a)=>o.fold(Ud([$v(a),X_(s)]),Ud([X_(s)]),Ud([])),J0=(o,s,a)=>o.fold(Ud([$v(a)]),Ud([]),Ud([$v(s)])),fA=(o,s,a)=>o.fold(Ud([]),Ud([X_(a)]),Ud([$v(s),X_(a)])),_R=(o,s,a,c,d,f)=>{const p=J0(o,d,f),y=J0(s,d,f);return Math.abs(p.left-y.left)<=a&&Math.abs(p.top-y.top)<=c},SR=(o,s,a,c,d,f)=>{const p=J0(o,d,f),y=J0(s,d,f),C=Math.abs(p.left-y.left),_=Math.abs(p.top-y.top);return Jo(C,_)},pA=(o,s,a)=>{const c=o.fold((d,f)=>({position:k.some("absolute"),left:k.some(d+"px"),top:k.some(f+"px")}),(d,f)=>({position:k.some("absolute"),left:k.some(d-a.left+"px"),top:k.some(f-a.top+"px")}),(d,f)=>({position:k.some("fixed"),left:k.some(d+"px"),top:k.some(f+"px")}));return{right:k.none(),bottom:k.none(),...c}},Q_=(o,s,a)=>o.fold((c,d)=>Wd(c+s,d+a),(c,d)=>Hl(c+s,d+a),(c,d)=>
75ch(c+s,d+a)),tS=(o,s,a,c)=>{const d=(f,p)=>(y,C)=>{const _=f(s,a,c);return p(y.getOr(_.left),C.getOr(_.top))};return o.fold(d(fA,Wd),d(J0,Hl),d(J_,ch))},Wd=gA.offset,Hl=gA.absolute,ch=gA.fixed,kR=(o,s)=>{const a=Ws(o,s);return zs(a)?NaN:parseInt(a,10)},DL=(o,s)=>{const a=o.element,c=kR(a,s.leftAttr),d=kR(a,s.topAttr);return isNaN(c)||isNaN(d)?k.none():k.some(Jo(c,d))},OL=(o,s,a)=>{const c=o.element;Ee(c,s.leftAttr,a.left+"px"),Ee(c,s.topAttr,a.top+"px")},ER=(o,s)=>{const a=o.element;Tn(a,s.leftAttr),Tn(a,s.topAttr)},RL=(o,s,a,c)=>DL(o,s).fold(()=>a,d=>ch(d.left+c.left,d.top+c.top)),AR=(o,s,a,c,d,f)=>{const p=RL(o,s,a,c),y=s.mustSnap?DR(o,s,p,d,f):Q0(o,s,p,d,f),C=J_(p,d,f);return OL(o,s,C),y.fold(()=>({coord:ch(C.left,C.top),extra:k.none()}),_=>({coord:_.output,extra:_.extra}))},BL=(o,s)=>{ER(o,s)},TR=(o,s,a,c)=>bi(o,d=>{const f=d.sensor;return _R(s,f,d.range.left,d.range.top,a,c)?k.some({output:tS(d.output,s,a,c),extra:d.extra}):k.none()}),DR=(o,s,a,c,d)=>{const f=s.getSnapPoints(o);return TR(f,a,c,d).orThunk(()=>Zo(f,(C,_)=>{const A=_.sensor,O=SR(a,A,_.range.left,_.range.top,c,d);return C.deltas.fold(()=>({deltas:k.some(O),snap:k.some(_)}),M=>{const I=(O.left+O.top)/2,L=(M.left+M.top)/2;return I<=L?{deltas:k.some(O),snap:k.some(_)}:C})},{deltas:k.none(),snap:k.none()}).snap.map(C=>({output:tS(C.output,a,c,d),extra:C.extra})))},Q0=(o,s,a,c,d)=>{const f=s.getSnapPoints(o);return TR(f,a,c,d)},OR=(o,s,a)=>({coord:tS(o.output,o.output,s,a),extra:o.extra});var ML=Object.freeze({__proto__:null,snapTo:(o,s,a,c)=>{const d=s.getTarget(o.element);if(s.repositionTarget){const f=Fa(o.element),p=rs(f),y=k1(d),C=OR(c,p,y),_=pA(C.coord,p,y);lr(d,_)}}});const pr=(o,s)=>wd(o,{},pt(s,a=>jk(a.name(),"Cannot configure "+a.name()+" for "+o)).concat([qr("dump",eo)])),Lv=o=>o.dump,zr=(o,s)=>({...Pt(s),...o.dump}),zl={field:pr,augment:zr,get:Lv},NL=(o,s)=>(o.length>0?[Al("parts",o)]:[]).concat([At("uid"),at("dom",{}),at("components",[]),Cw("originalSpec"),at("debug.sketcher",{})]).concat(s),RR=(o,s,a,c,d)=>{const f=NL(c,d);return jr(o+" [SpecSchema]",Ia(f.concat(s)),a)},PL=(o,s,a,c)=>{const d=oS(c),f=RR(o,s,d,[],[]);return a(f,d)},hA=(o,s,a,c,d)=>{const f=oS(d),p=$s(a),y=Ru(a),C=RR(o,s,f,p,[y]),_=ya(o,C,a),A=J1(o,C,_.internals());return c(C,A,f,_.externals())},eS=o=>nn(o,"uid"),oS=o=>eS(o)?o:{...o,uid:bf("uid")},IL=o=>o.uid!==void 0,VY=Ia([At("name"),At("factory"),At("configFields"),at("apis",{}),at("extraApis",{})]),BR=Ia([At("name"),At("factory"),At("configFields"),At("partFields"),at("apis",{}),at("extraApis",{})]),pc=o=>{const s=jr("Sketcher for "+o.name,VY,o),a=f=>PL(s.name,s.configFields,s.factory,f),c=hs(s.apis,Qp),d=hs(s.extraApis,(f,p)=>kp(f,p));return{name:s.name,configFields:s.configFields,sketch:a,...c,...d}},Wa=o=>{const s=jr("Sketcher for "+o.name,BR,o),a=p=>hA(s.name,s.configFields,s.partFields,s.factory,p),c=Ad(s.name,s.partFields),d=hs(s.apis,Qp),f=hs(s.extraApis,(p,y)=>kp(p,y));return{name:s.name,partFields:s.partFields,configFields:s.configFields,sketch:a,parts:c,...d,...f}},Vu=pc({name:"Container",factory:o=>{const{attributes:s,...a}=o.dom;return{uid:o.uid,dom:{tag:"div",attributes:{role:"presentation",...s},...a},components:o.components,behaviours:Lv(o.containerBehaviours),events:o.events,domModification:o.domModification,eventOrder:o.eventOrder}},configFields:[at("components",[]),pr("containerBehaviours",[]),at("events",{}),at("domModification",{}),at("eventOrder",{})]}),bA="data-initial-z-index",$L=o=>{ga(o.element).filter(Ba).each(s=>{ir(s,bA).fold(()=>uo(s,"z-index"),a=>Be(s,"z-index",a)),Tn(s,bA)})},LL=o=>{ga(o.element).filter(Ba).each(s=>{Hn(s,"z-index").each(a=>{Ee(s,bA,a)}),Be(s,"z-index",Dn(o.element,"z-index"))})},FR=(o,s)=>{o.getSystem().addToGui(s),LL(s)},tb=o=>{$L(o),o.getSystem().removeFromGui(o)},nS=(o,s,a)=>o.getSystem().build(Vu.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[s]},events:a}));var HL=xa("snaps",[At("getSnapPoints"),ko("onSensor"),At("leftAttr"),At("topAttr"),at("lazyViewport",Sr),at("mustSnap",!1)]);const Hv=[at("useFixed",Fo),At("blockerClass"),at("getTarget",eo),at("onDrag",q),at("repositionTarget",!0),at("onDrop",q),dn("getBounds",Sr),HL],sS=o=>Ra(Hn(o,"left"),Hn(o,"top"),Hn(o,"position"),(s,a,c)=>(c==="fixed"?ch:Wd)(parseInt(s,10),parseInt(a,10))).getOrThunk(()=>{const s=Ma(o);return Hl(s.left,s.top)}),xA=(o,s,a,c,d)=>{const f=d.bounds,p=J0(s,a,c),y=da(p.left,f.x,f.x+f.width-d.width),C=da(p.top,f.y,f.y+f.height-d.height),_=Hl(y,C);return s.fold(()=>{const A=fA(_,a,c);return Wd(A.left,A.top)}
75,nt(_),()=>{const A=J_(_,a,c);return ch(A.left,A.top)})},zL=(o,s,a,c,d,f,p)=>{const y=s.fold(()=>{const C=Q_(a,f.left,f.top),_=J_(C,c,d);return ch(_.left,_.top)},C=>{const _=AR(o,C,a,f,c,d);return _.extra.each(A=>{C.onSensor(o,A)}),_.coord});return xA(o,y,c,d,p)},VL=(o,s,a,c)=>{const d=s.getTarget(o.element);if(s.repositionTarget){const f=Fa(o.element),p=rs(f),y=k1(d),C=sS(d),_=zL(o,s.snaps,C,p,y,c,a),A=pA(_,p,y);lr(d,A)}s.onDrag(o,d,c)},MR=(o,s)=>({bounds:o.getBounds(),height:Pr(s.element),width:xu(s.element)}),vA=(o,s,a,c,d)=>{const f=a.update(c,d),p=a.getStartData().getOrThunk(()=>MR(s,o));f.each(y=>{VL(o,s,p,y)})},NR=(o,s,a,c)=>{s.each(tb),a.snaps.each(f=>{BL(o,f)});const d=a.getTarget(o.element);c.reset(),a.onDrop(o,d)},yA=o=>(s,a)=>{const c=d=>{a.setStartData(MR(s,d))};return Rn([vt(l2(),d=>{a.getStartData().each(()=>c(d))}),...o(s,a,c)])},UL=o=>Rn([vt(va(),o.forceDrop),vt(F1(),o.drop),vt(Vg(),(s,a)=>{o.move(a.event)}),vt(Ds(),o.delayDrop)]);var ZL=Object.freeze({__proto__:null,getData:o=>k.from(Jo(o.x,o.y)),getDelta:(o,s)=>Jo(s.left-o.left,s.top-o.top)});const PR=(o,s,a)=>[vt(va(),(c,d)=>{if(d.event.raw.button!==0)return;d.stop();const p=()=>NR(c,k.some(_),o,s),y=Jk(p,200),C={drop:p,delayDrop:y.schedule,forceDrop:p,move:O=>{y.cancel(),vA(c,o,s,ZL,O)}},_=nS(c,o.blockerClass,UL(C));(()=>{a(c),FR(c,_)})()})],jL=[...Hv,$o("dragger",{handlers:yA(PR)})],GL=o=>Rn([vt(La(),o.forceDrop),vt(Sd(),o.drop),vt(vp(),o.drop),vt(as(),(s,a)=>{o.move(a.event)})]),eb=o=>{const s=o[0];return k.some(Jo(s.clientX,s.clientY))};var rS=Object.freeze({__proto__:null,getData:o=>{const a=o.raw.touches;return a.length===1?eb(a):k.none()},getDelta:(o,s)=>Jo(s.left-o.left,s.top-o.top)});const $R=(o,s,a)=>{const c=Ze(),d=f=>{NR(f,c.get(),o,s),c.clear()};return[vt(La(),(f,p)=>{p.stop();const y=()=>d(f),C={drop:y,delayDrop:q,forceDrop:y,move:O=>{vA(f,o,s,rS,O)}},_=nS(f,o.blockerClass,GL(C));c.set(_),(()=>{a(f),FR(f,_)})()}),vt(as(),(f,p)=>{p.stop(),vA(f,o,s,rS,p.event)}),vt(Sd(),(f,p)=>{p.stop(),d(f)}),vt(vp(),d)]},Qt=[...Hv,$o("dragger",{handlers:yA($R)})],lh=(o,s,a)=>[...PR(o,s,a),...$R(o,s,a)],qL=[...Hv,$o("dragger",{handlers:yA(lh)})];var YL=Object.freeze({__proto__:null,mouse:jL,touch:Qt,mouseOrTouch:qL}),HR=Object.freeze({__proto__:null,init:()=>{let o=k.none(),s=k.none();const a=()=>{o=k.none(),s=k.none()},c=(C,_)=>{const A=o.map(O=>C.getDelta(O,_));return o=k.some(_),A},d=(C,_)=>C.getData(_).bind(A=>c(C,A)),f=C=>{s=k.some(C)},p=()=>s,y=nt({});return Ua({readState:y,reset:a,update:d,getStartData:p,setStartData:f})}});const Xm=L2({branchKey:"mode",branches:YL,name:"dragging",active:{events:(o,s)=>o.dragger.handlers(o,s)},extra:{snap:o=>({sensor:o.sensor,range:o.range,output:o.output,extra:k.from(o.extra)})},state:HR,apis:ML}),JL=["input","textarea"],_A=o=>{const s=qi(o);return Go(JL,s)},zR=(o,s)=>{const a=s.getRoot(o).getOr(o.element);Un(a,s.invalidClass),s.notify.each(c=>{_A(o.element)&&Ee(o.element,"aria-invalid",!1),c.getContainer(o).each(d=>{Mc(d,c.validHtml)}),c.onValid(o)})},VR=(o,s,a,c)=>{const d=s.getRoot(o).getOr(o.element);sn(d,s.invalidClass),s.notify.each(f=>{_A(o.element)&&Ee(o.element,"aria-invalid",!0),f.getContainer(o).each(p=>{Mc(p,c)}),f.onInvalid(o,c)})},SA=(o,s,a)=>s.validator.fold(()=>cs.pure(Te.value(!0)),c=>c.validate(o)),kA=(o,s,a)=>(s.notify.each(c=>{c.onValidate(o)}),SA(o,s).map(c=>o.getSystem().isConnected()?c.fold(d=>(VR(o,s,a,d),Te.error(d)),d=>(zR(o,s),Te.value(d))):Te.error("No longer in system")));var EA=Object.freeze({__proto__:null,markValid:zR,markInvalid:VR,query:SA,run:kA,isInvalid:(o,s)=>{const a=s.getRoot(o).getOr(o.element);return bs(a,s.invalidClass)}}),aS=Object.freeze({__proto__:null,events:(o,s)=>o.validator.map(a=>Rn([vt(a.onEvent,c=>{kA(c,o,s).get(eo)})].concat(a.validateOnLoad?[vn(c=>{kA(c,o,s).get(q)})]:[]))).getOr({})}),iS=[At("invalidClass"),at("getRoot",k.none),xa("notify",[at("aria","alert"),at("getContainer",k.none),at("validHtml",""),ko("onValid"),ko("onInvalid"),ko("onValidate")]),xa("validator",[At("validate"),at("onEvent","input"),at("validateOnLoad",!0)])];const ob=(o,s,a)=>{s.store.manager.onLoad(o,s,a)},Uu=(o,s,a)=>{s.store.manager.onUnload(o,s,a)};var jY=Object.freeze({__proto__:null,onLoad:ob,onUnload:Uu,setValue:(o,s,a,c)=>{s.store.manager.setValue(o,s,a,c)},getValue:(o,s,a)=>s.store.manager.getValue(o,s,a),getState:(o,s,a)=>a}),e9=Object.freeze({__proto__:null,events:(o,s)=>{const a=o.resetOnDom?[vn((c,d)=>{ob(c,o,s)}),dc((c,d)=>{Uu(c,o,s)})]:[N2(o,s,ob)];return Rn(a)}});const cS=()=>{const o=fe(null),s=()=>({mode:"memory",value:o.get()}),a=()=>o.get()===null,c=()=>{o.set(null)};
75return Ua({set:o.set,get:o.get,isNotSet:a,clear:c,readState:s})},o9=()=>Ua({readState:q}),UR=()=>{const o=fe({}),s=fe({});return Ua({readState:()=>({mode:"dataset",dataByValue:o.get(),dataByText:s.get()}),lookup:p=>he(o.get(),p).orThunk(()=>he(s.get(),p)),update:p=>{const y=o.get(),C=s.get(),_={},A={};It(p,O=>{_[O.value]=O,he(O,"meta").each(M=>{he(M,"text").each(I=>{A[I]=O})})}),o.set({...y,..._}),s.set({...C,...A})},clear:()=>{o.set({}),s.set({})}})};var WR=Object.freeze({__proto__:null,memory:cS,dataset:UR,manual:o9,init:o=>o.store.manager.state(o)});const ZR=(o,s,a,c)=>{const d=s.store;a.update([c]),d.setValue(o,c),s.onSetValue(o,c)},n9=(o,s,a)=>{const c=s.store,d=c.getDataKey(o);return a.lookup(d).getOrThunk(()=>c.getFallbackEntry(d))},jR=(o,s,a)=>{s.store.initialValue.each(d=>{ZR(o,s,a,d)})},GR=(o,s,a)=>{a.clear()};var s9=[Uo("initialValue"),At("getFallbackEntry"),At("getDataKey"),At("setValue"),$o("manager",{setValue:ZR,getValue:n9,onLoad:jR,onUnload:GR,state:UR})];const qR=(o,s,a)=>s.store.getValue(o),r9=(o,s,a,c)=>{s.store.setValue(o,c),s.onSetValue(o,c)},AA=(o,s,a)=>{s.store.initialValue.each(c=>{s.store.setValue(o,c)})};var KR=[At("getValue"),at("setValue",q),Uo("initialValue"),$o("manager",{setValue:r9,getValue:qR,onLoad:AA,onUnload:q,state:jc.init})];const YR=(o,s,a,c)=>{a.set(c),s.onSetValue(o,c)},XR=(o,s,a)=>a.get(),a9=(o,s,a)=>{s.store.initialValue.each(c=>{a.isNotSet()&&a.set(c)})},i9=(o,s,a)=>{a.clear()};var c9=[Uo("initialValue"),$o("manager",{setValue:YR,getValue:XR,onLoad:a9,onUnload:i9,state:cS})],l9=[ai("store",{mode:"memory"},Gr("mode",{memory:c9,manual:KR,dataset:s9})),ko("onSetValue"),at("resetOnDom",!1)];const ne=tr({fields:l9,name:"representing",active:e9,apis:jY,extra:{setValueFrom:(o,s)=>{const a=ne.getValue(s);ne.setValue(o,a)}},state:WR}),hc=tr({fields:iS,name:"invalidating",active:aS,apis:EA,extra:{validation:o=>s=>{const a=ne.getValue(s);return cs.pure(o(a))}}});var JR=Object.freeze({__proto__:null,exhibit:(o,s)=>Gc({classes:[],styles:s.useFixed()?{}:{position:"relative"}})});const lS=Zi.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),TA=(o,s,a,c,d,f)=>{const p=s.rect,y=p.x-a,C=p.y-c,_=p.width,A=p.height,O=d-(y+_),M=f-(C+A),I=k.some(y),L=k.some(C),W=k.some(O),j=k.some(M),V=k.none();return t0(s.direction,()=>wa(o,I,L,V,V),()=>wa(o,V,L,W,V),()=>wa(o,I,V,V,j),()=>wa(o,V,V,W,j),()=>wa(o,I,L,V,V),()=>wa(o,I,V,V,j),()=>wa(o,I,L,V,V),()=>wa(o,V,L,W,V))},DA=(o,s)=>o.fold(()=>{const a=s.rect;return wa("absolute",k.some(a.x),k.some(a.y),k.none(),k.none())},(a,c,d,f)=>TA("absolute",s,a,c,d,f),(a,c,d,f)=>TA("fixed",s,a,c,d,f)),OA=(o,s)=>{const a=so(up,s),c=o.fold(a,a,()=>{const p=rs();return up(s).translate(-p.left,-p.top)}),d=xu(s),f=Pr(s);return Ts(c.left,c.top,d,f)},d9=(o,s)=>s.fold(()=>o.fold(Sr,Sr,Ts),a=>o.fold(nt(a),nt(a),()=>{const c=QR(o,a.x,a.y);return Ts(c.left,c.top,a.width,a.height)})),QR=(o,s,a)=>{const c=Jo(s,a),d=()=>{const f=rs();return c.translate(-f.left,-f.top)};return o.fold(nt(c),nt(c),d)},RA=(o,s,a,c)=>o.fold(s,a,c);lS.none;const m9=lS.relative,uS=lS.fixed,g9=(o,s)=>({anchorBox:o,origin:s}),t8=(o,s)=>g9(o,s),hr=Zi.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),f9=(o,s)=>{const{x:a,y:c,right:d,bottom:f}=s,{x:p,y,right:C,bottom:_,width:A,height:O}=o,M=p>=a&&p<=d,I=y>=c&&y<=f,L=M&&I,W=C<=d&&C>=a,j=_<=f&&_>=c,V=W&&j,K=Math.min(A,p>=a?d-p:C-a),tt=Math.min(O,y>=c?f-y:_-c);return{originInBounds:L,sizeInBounds:V,visibleW:K,visibleH:tt}},e8=(o,s)=>{const{x:a,y:c,right:d,bottom:f}=s,{x:p,y,width:C,height:_}=o,A=Math.max(a,d-C),O=Math.max(c,f-_),M=da(p,a,A),I=da(y,c,O),L=Math.min(M+C,d)-M,W=Math.min(I+_,f)-I;return Ts(M,I,L,W)},o8=(o,s,a)=>{const c=nt(s.bottom-a.y),d=nt(a.bottom-s.y),f=Fm(o,d,d,c),p=nt(s.right-a.x),y=nt(a.right-s.x);return{maxWidth:Od(o,y,y,p),maxHeight:f}},p9=(o,s,a,c)=>{const d=o.bubble,f=d.offset,p=Bd(c,o.restriction,f),y=o.x+f.left,C=o.y+f.top,_=Ts(y,C,s,a),{originInBounds:A,sizeInBounds:O,visibleW:M,visibleH:I}=f9(_,p),L=A&&O,W=L?_:e8(_,p),j=W.width>0&&W.height>0,{maxWidth:V,maxHeight:K}=o8(o.direction,W,c),tt={rect:W,maxHeight:K,maxWidth:V,direction:o.direction,placement:o.placement,classes:{on:d.classesOn,off:d.classesOff},layout:o.label,testY:C};return L||o.alwaysFit?hr.fit(tt):hr.nofit(tt,M,I,j)},n8=(o,s,a,c,d,f)=>{const p=c.width,y=c.height,C=(A,O,M,I,L)=>{const W=A(a,c,d,o,f),j=p9(W,p,y,f);return j.fold(nt(j),(V,K,tt,ct)=>(L===ct?tt>I||K>M:!L&&ct)?j:hr.nofit(O,M,I,L))};return Zo(s,(A,O)=>{const M=so(C,O);return A.fold(nt(A),M)},hr.nofit({rect:a,maxHeight:c.height,maxWidth:c.width,direction:Dp(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:a.y},-1,-1,!1)).fold(eo,eo)},BA=["top","bottom","right","left"],dS="data-alloy-transition-timer",h9=(o,s)=>x1(o,s.classes),b9=(o,s,a)=>a.exists(c=>{const d=o.mode;return d==="all"?!0:c[d]!==s[d]}),x9=(o,s)=>{const a=c=>parseFloat(c).toFixed(3);return iu(s,(c,d)=>{const f=o[d].map(a),p=c.map(a);return!Us(f,p)}).isSome()},s8=o=>{const s=f=>{const y=Dn(o,f).split(/\s*,\s*/);return Io(y,Cg)},a=f=>{if($e(f)&&/^[\d.]+/.test(f)){const p=parseFloat(f);return du(f,"ms")?p:p*1e3}else return 0},c=s("transition-delay"),d=s("transition-duration");return Zo(d,(f,p,y)=>{const C=a(c[y])+a(p);return Math.max(f,C)},0)},v9=(o,s)=>{const a=Rs(),c=Rs();let d;const f=_=>{const A=_.raw.pseudoElement??"";return ln(_.target,o)&&Ci(A)&&Go(BA,_.raw.propertyName)},p=_=>{if(Da(_)||f(_)){a.clear(),c.clear();const A=_==null?void 0:_.raw.type;(Da(A)||A===M1())&&(clearTimeout(d),Tn(o,dS),_r(o,s.classes))}},y=Vo(o,ku(),_=>{f(_)&&(y.unbind(),a.set(Vo(o,M1(),p)),c.set(Vo(o,Kk(),p)))}),C=s8(o);window.requestAnimationFrame(()=>{d=setTimeout(p,C+17),Ee(o,dS,d)})},y9=(o,s)=>{kl(o,s.classes),ir(o,dS).each(a=>{clearTimeout(parseInt(a,10)),Tn(o,dS)}),v9(o,s)},r8=(o,s,a,c,d,f)=>{const p=b9(c,d,f);if(p||h9(o,c)){Be(o,"position",a.position);const y=OA(s,o),C=DA(s,{...d,rect:y}),_=de(BA,A=>C[A]);
75x9(a,_)&&(lr(o,_),p&&y9(o,c),tc(o))}else _r(o,c.classes)},a8=o=>({width:Math.ceil(xu(o)),height:Pr(o)}),i8=(o,s,a,c)=>{uo(s,"max-height"),uo(s,"max-width");const d=a8(s);return n8(s,c.preference,o,d,a,c.bounds)},C9=(o,s)=>{const a=s.classes;_r(o,a.off),kl(o,a.on)},w9=(o,s,a)=>{const c=a.maxHeightFunction;c(o,s.maxHeight)},_9=(o,s,a)=>{const c=a.maxWidthFunction;c(o,s.maxWidth)},S9=(o,s,a)=>{const c=DA(a.origin,s);a.transition.each(d=>{r8(o,a.origin,c,d,s,a.lastPlacement)}),Z_(o,c)},c8=(o,s)=>{Jg(o,s.placement)},FA=(o,s,a)=>o[s]===void 0?a:o[s],yf=(o,s,a,c,d,f,p,y)=>{const C=FA(p,"maxHeightFunction",R2()),_=FA(p,"maxWidthFunction",q),A=o.anchorBox,O=o.origin,M={bounds:d9(O,f),origin:O,preference:c,maxHeightFunction:C,maxWidthFunction:_,lastPlacement:d,transition:y};return l8(A,s,a,M)},l8=(o,s,a,c)=>{const d=i8(o,s,a,c);return S9(s,d,c),c8(s,d),C9(s,d),w9(s,d,c),_9(s,d,c),{layout:d.layout,placement:d.placement}},zv=eo,Cf=()=>xa("layouts",[At("onLtr"),At("onRtl"),Uo("onBottomLtr"),Uo("onBottomRtl")]),mS=(o,s,a,c,d,f,p)=>{const y=p.map(cE).getOr(!1),C=s.layouts.map(I=>I.onLtr(o)),_=s.layouts.map(I=>I.onRtl(o)),A=y?s.layouts.bind(I=>I.onBottomLtr.map(L=>L(o))).or(C).getOr(d):C.getOr(a),O=y?s.layouts.bind(I=>I.onBottomRtl.map(L=>L(o))).or(_).getOr(f):_.getOr(c);return Nx(A,O)(o)},nb=(o,s,a)=>{const c=s.hotspot,d=OA(a,c.element),f=mS(o.element,s,T2(),r0(),s0(),A2(),k.some(s.hotspot.element));return k.some(zv({anchorBox:d,bubble:s.bubble.getOr(Dd()),overrides:s.overrides,layouts:f}))};var k9=[At("hotspot"),Uo("bubble"),at("overrides",{}),Cf(),$o("placement",nb)];const E9=(o,s,a)=>{const c=QR(a,s.x,s.y),d=Ts(c.left,c.top,s.width,s.height),f=mS(o.element,s,E2(),Mw(),E2(),Mw(),k.none());return k.some(zv({anchorBox:d,bubble:s.bubble,overrides:s.overrides,layouts:f}))};var u8=[At("x"),At("y"),at("height",0),at("width",0),at("bubble",Dd()),at("overrides",{}),Cf(),$o("placement",E9)];const d8=Zi.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),A9=o=>o.fold(eo,(s,a,c)=>s.translate(-a,-c)),T9=o=>o.fold(eo,eo),MA=o=>Zo(o,(s,a)=>s.translate(a.left,a.top),Jo(0,0)),NA=o=>{const s=pt(o,A9);return MA(s)},gS=o=>{const s=pt(o,T9);return MA(s)},D9=d8.screen,wf=d8.absolute,m8=(o,s,a)=>{const c=tp(a.root).dom,d=f=>{const p=Fa(f),y=Fa(o.element);return ln(p,y)};return k.from(c.frameElement).map(Zt.fromDom).filter(d).map(Ma)},PA=(o,s,a)=>{const c=Fa(o.element),d=rs(c),f=m8(o,s,a).getOr(d);return wf(f,d.left,d.top)},IA=(o,s,a,c)=>{const d=D9(Jo(o,s));return k.some(bd(d,a,c))},g8=(o,s,a,c,d)=>o.map(f=>{const p=[s,f.point],y=RA(c,()=>gS(p),()=>gS(p),()=>NA(p)),C=$k(y.left,y.top,f.width,f.height),_=a.showAbove?s0():T2(),A=a.showAbove?A2():r0(),O=mS(d,a,_,A,_,A,k.none());return zv({anchorBox:C,bubble:a.bubble.getOr(Dd()),overrides:a.overrides,layouts:O})}),Vv=(o,s,a)=>{const c=PA(o,a,s);return s.node.filter(Ro).bind(d=>{const f=d.dom.getBoundingClientRect(),p=IA(f.left,f.top,f.width,f.height),y=s.node.getOr(o.element);return g8(p,c,s,a,y)})};var Uv=[At("node"),At("root"),Uo("bubble"),Cf(),at("overrides",{}),at("showAbove",!1),$o("placement",Vv)];const Wv=(o,s)=>({element:o,offset:s}),$A=(o,s)=>{const a=Dc(o);if(a.length===0)return Wv(o,s);if(s<a.length)return Wv(a[s],0);{const c=a[a.length-1],d=dd(c)?b1(c).length:Dc(c).length;return Wv(c,d)}},Jm=(o,s)=>dd(o)?Wv(o,s):$A(o,s),Zd=o=>o.foffset!==void 0,f8=(o,s)=>s.getSelection.getOrThunk(()=>()=>Rk(o))().map(c=>{if(Zd(c)){const d=Jm(c.start,c.soffset),f=Jm(c.finish,c.foffset);return Og.range(d.element,d.offset,f.element,f.offset)}else return c}),O9=(o,s,a)=>{const c=tp(s.root).dom,d=PA(o,a,s),f=f8(c,s).bind(C=>{if(Zd(C))return Ux(c,Og.exactFromRange(C)).orThunk(()=>{const A=Zt.fromText(EC);pm(C.start,A);const O=Vx(c,Og.exact(A,0,A,1));return Ji(A),O}).bind(A=>IA(A.left,A.top,A.width,A.height));{const _=hs(C,O=>O.dom.getBoundingClientRect()),A={left:Math.min(_.firstCell.left,_.lastCell.left),right:Math.max(_.firstCell.right,_.lastCell.right),top:Math.min(_.firstCell.top,_.lastCell.top),bottom:Math.max(_.firstCell.bottom,_.lastCell.bottom)};return IA(A.left,A.top,A.right-A.left,A.bottom-A.top)}}),y=f8(c,s).bind(C=>Zd(C)?Ba(C.start)?k.some(C.start):xl(C.start):k.some(C.firstCell)).getOr(o.element);return g8(f,d,s,a,y)};var p8=[Uo("getSelection"),At("root"),Uo("bubble"),Cf(),at("overrides",{}),at("showAbove",!1),$o("placement",O9)];const Ul="link-layout",fS=o=>o.x+o.width,h8=(o,s)=>o.x-s.width,LA=(o,s)=>o.y-s.height+o.height,HA=o=>o.y,zA=(o,s,a)=>gr(fS(o),HA(o),a.southeast(),Dp(),"southeast",Ls(o,{left:0,top:2}),Ul),pS=(o,s,a)=>gr(h8(o,s),HA(o),a.southwest(),C2(),"southwest",Ls(o,{right:1,top:2}),Ul),VA=(o,s,a)=>gr(fS(o),LA(o,s),a.northeast(),e0(),"northeast",Ls(o,{left:0,bottom:3}),Ul),b8=(o,s,a)=>gr(h8(o,s),LA(o,s),a.northwest(),Mm(),"northwest",Ls(o,{right:1,bottom:3}),Ul),x8=()=>[zA,pS,VA,b8],v8=()=>[pS,zA,b8,VA],hS=(o,s,a)=>{const c=OA(a,s.item.element),d=mS(o.element,s,x8(),v8(),x8(),v8(),k.none());return k.some(zv({anchorBox:c,bubble:Dd(),overrides:s.overrides,layouts:d}))};var UA=[At("item"),Cf(),at("overrides",{}),$o("placement",hS)],bS=Gr("type",{selection:p8,node:Uv,hotspot:k9,submenu:UA,makeshift:u8});const y8=[ba("classes",Ns),Kr("mode","all",["all","layout","placement"])],R9=[at("useFixed",Fo),Uo("getBounds")],C8=[ha("anchor",bS),xa("transition",y8)],w8=()=>{const o=document.documentElement;return uS(0,0,o.clientWidth,o.clientHeight)},_8=o=>{const s=Ma(o.element),a=o.element.dom.getBoundingClientRect();return m9(s.left,s.top,a.width,a.height)},S8=(o,s,a,c,d,f)=>{const p=t8(s.anchorBox,o);return yf(p,c.element,s.bubble,s.layouts,d,a,s.overrides,f)},B9=(o,s,a,c,d)=>{const f=k.none();xS(o,s,a,c,d,f)},xS=(o,s,a,c,d,f)=>{const p=jr("placement.info",ve(C8),d),y=p.anchor,C=c.element,_=a.get(c.uid);
75Um(()=>{Be(C,"position","fixed");const A=Hn(C,"visibility");Be(C,"visibility","hidden");const O=s.useFixed()?w8():_8(o);y.placement(o,y,O).each(M=>{const I=f.orThunk(()=>s.getBounds.map(sr)),L=S8(O,M,I,c,_,p.transition);a.set(c.uid,L)}),A.fold(()=>{uo(C,"visibility")},M=>{Be(C,"visibility",M)}),Hn(C,"left").isNone()&&Hn(C,"top").isNone()&&Hn(C,"right").isNone()&&Hn(C,"bottom").isNone()&&ji(Hn(C,"position"),"fixed")&&uo(C,"position")},C)};var F9=Object.freeze({__proto__:null,position:B9,positionWithinBounds:xS,getMode:(o,s,a)=>s.useFixed()?"fixed":"absolute",reset:(o,s,a,c)=>{const d=c.element;It(["position","left","right","top","bottom"],f=>uo(d,f)),Fp(d),a.clear(c.uid)}}),k8=Object.freeze({__proto__:null,init:()=>{let o={};return Ua({readState:()=>o,clear:d=>{$n(d)?delete o[d]:o={}},set:(d,f)=>{o[d]=f},get:d=>he(o,d)})}});const oa=tr({fields:R9,name:"positioning",active:JR,apis:F9,state:k8}),M9=(o,s)=>s.universal?o:Io(o,a=>Go(s.channels,a));var Zv=Object.freeze({__proto__:null,events:o=>Rn([vt(Au(),(s,a)=>{const c=o.channels,d=qo(c),f=a,p=M9(d,f);It(p,y=>{const C=c[y],_=C.schema,A=jr("channel["+y+`] data 76Receiver: `+zc(s.element),_,f.data);C.onReceive(s,A)})})])}),P9=[ha("channels",lw(Te.value,Ia([kd("onReceive"),at("schema",Oi())])))];const na=tr({fields:P9,name:"receiving",active:Zv});var A8=Object.freeze({__proto__:null,events:(o,s)=>{const a=(c,d)=>{o.updateState.each(f=>{const p=f(c,d);s.set(p)}),o.renderComponents.each(f=>{const p=f(d,s.get());(o.reuseDom?N_:pv)(c,p)})};return Rn([vt(Au(),(c,d)=>{const f=d;if(!f.universal){const p=o.channel;Go(f.channels,p)&&a(c,f.data)}}),vn((c,d)=>{o.initialData.each(f=>{a(c,f)})})])}}),$9=Object.freeze({__proto__:null,getState:(o,s,a)=>a}),L9=[At("channel"),Uo("renderComponents"),Uo("updateState"),Uo("initialData"),Ps("reuseDom",!0)],z9=Object.freeze({__proto__:null,init:()=>{const o=fe(k.none()),s=()=>o.set(k.none());return{readState:()=>o.get().getOr("none"),get:o.get,set:o.set,clear:s}}});const mi=tr({fields:L9,name:"reflecting",active:A8,apis:$9,state:z9}),T8=(o,s,a,c)=>{a.get().each(p=>{D_(o)});const d=s.getAttachPoint(o);Pu(d,o);const f=o.getSystem().build(c);return Pu(o,f),a.set(f),f},D8=(o,s,a,c)=>{const d=T8(o,s,a,c);return s.onOpen(o,d),d},O8=(o,s,a,c)=>a.get().map(()=>T8(o,s,a,c)),vS=(o,s,a,c,d)=>{WA(o,s),D8(o,s,a,c),d(),B8(o,s)},yS=(o,s,a)=>{a.get().each(c=>{D_(o),$u(o),s.onClose(o,c),a.clear()})},CS=(o,s,a)=>a.isOpen(),V9=(o,s,a,c)=>CS(o,s,a)&&a.get().exists(d=>s.isPartOf(o,d,c)),U9=(o,s,a)=>a.get(),W9=(o,s,a,c)=>{Hn(o.element,s).fold(()=>{Tn(o.element,a)},d=>{Ee(o.element,a,d)}),Be(o.element,s,c)},Z9=(o,s,a)=>{ir(o.element,a).fold(()=>uo(o.element,s),c=>Be(o.element,s,c))},WA=(o,s,a)=>{const c=s.getAttachPoint(o);Be(o.element,"position",oa.getMode(c)),W9(o,"visibility",s.cloakVisibilityAttr,"hidden")},R8=o=>ps(["top","left","right","bottom"],s=>Hn(o,s).isSome()),B8=(o,s,a)=>{R8(o.element)||uo(o.element,"position"),Z9(o,"visibility",s.cloakVisibilityAttr)};var j9=Object.freeze({__proto__:null,cloak:WA,decloak:B8,open:D8,openWhileCloaked:vS,close:yS,isOpen:CS,isPartOf:V9,getState:U9,setContent:O8}),G9=Object.freeze({__proto__:null,events:(o,s)=>Rn([vt(I1(),(a,c)=>{yS(a,o,s)})])}),q9=[ko("onOpen"),ko("onClose"),At("isPartOf"),At("getAttachPoint"),at("cloakVisibilityAttr","data-precloak-visibility")],F8=Object.freeze({__proto__:null,init:()=>{const o=Ze(),s=nt("not-implemented");return Ua({readState:s,isOpen:o.isSet,clear:o.clear,set:o.set,get:o.get})}});const To=tr({fields:q9,name:"sandboxing",active:G9,apis:j9,state:F8}),jv=(o,s)=>s.getAnimationRoot.fold(()=>o.element,a=>a(o)),Qm=o=>o.dimension.property,uh=(o,s)=>o.dimension.getDimension(s),wS=(o,s)=>{const a=jv(o,s);_r(a,[s.shrinkingClass,s.growingClass])},jd=(o,s)=>{Un(o.element,s.openClass),sn(o.element,s.closedClass),Be(o.element,Qm(s),"0px"),tc(o.element)},ZA=(o,s)=>{Un(o.element,s.closedClass),sn(o.element,s.openClass),uo(o.element,Qm(s))}
76,M8=(o,s,a,c)=>{a.setCollapsed(),Be(o.element,Qm(s),uh(s,o.element)),wS(o,s),jd(o,s),s.onStartShrink(o),s.onShrunk(o)},dh=(o,s,a,c)=>{const d=c.getOrThunk(()=>uh(s,o.element));a.setCollapsed(),Be(o.element,Qm(s),d),tc(o.element);const f=jv(o,s);Un(f,s.growingClass),sn(f,s.shrinkingClass),jd(o,s),s.onStartShrink(o)},jA=(o,s,a)=>{const c=uh(s,o.element);(c==="0px"?M8:dh)(o,s,a,k.some(c))},N8=(o,s,a)=>{const c=jv(o,s),d=bs(c,s.shrinkingClass),f=uh(s,o.element);ZA(o,s);const p=uh(s,o.element);(d?()=>{Be(o.element,Qm(s),f),tc(o.element)}:()=>{jd(o,s)})(),Un(c,s.shrinkingClass),sn(c,s.growingClass),ZA(o,s),Be(o.element,Qm(s),p),a.setExpanded(),s.onStartGrow(o)},_f=(o,s,a)=>{if(a.isExpanded()){uo(o.element,Qm(s));const c=uh(s,o.element);Be(o.element,Qm(s),c)}},K9=(o,s,a)=>{a.isExpanded()||N8(o,s,a)},Y9=(o,s,a)=>{a.isExpanded()&&jA(o,s,a)},Xc=(o,s,a)=>{a.isExpanded()&&M8(o,s,a)},P8=(o,s,a)=>a.isExpanded(),I8=(o,s,a)=>a.isCollapsed(),GA=(o,s,a)=>{const c=jv(o,s);return bs(c,s.growingClass)===!0},$8=(o,s,a)=>{const c=jv(o,s);return bs(c,s.shrinkingClass)===!0};var J9=Object.freeze({__proto__:null,refresh:_f,grow:K9,shrink:Y9,immediateShrink:Xc,hasGrown:P8,hasShrunk:I8,isGrowing:GA,isShrinking:$8,isTransitioning:(o,s,a)=>GA(o,s)||$8(o,s),toggleGrow:(o,s,a)=>{(a.isExpanded()?jA:N8)(o,s,a)},disableTransitions:wS,immediateGrow:(o,s,a)=>{a.isExpanded()||(ZA(o,s),Be(o.element,Qm(s),uh(s,o.element)),wS(o,s),a.setExpanded(),s.onStartGrow(o),s.onGrown(o))}}),H8=Object.freeze({__proto__:null,exhibit:(o,s,a)=>{const c=s.expanded;return Gc(c?{classes:[s.openClass],styles:{}}:{classes:[s.closedClass],styles:_d(s.dimension.property,"0px")})},events:(o,s)=>Rn([af(M1(),(a,c)=>{c.event.raw.propertyName===o.dimension.property&&(wS(a,o),s.isExpanded()&&uo(a.element,o.dimension.property),(s.isExpanded()?o.onGrown:o.onShrunk)(a))})])}),z8=[At("closedClass"),At("openClass"),At("shrinkingClass"),At("growingClass"),Uo("getAnimationRoot"),ko("onShrunk"),ko("onStartShrink"),ko("onGrown"),ko("onStartGrow"),at("expanded",!1),ha("dimension",Gr("property",{width:[$o("property","width"),$o("getDimension",o=>Ir(o)+"px")],height:[$o("property","height"),$o("getDimension",o=>Zs(o)+"px")]}))],tH=Object.freeze({__proto__:null,init:o=>{const s=fe(o.expanded),a=()=>"expanded: "+s.get();return Ua({isExpanded:()=>s.get()===!0,isCollapsed:()=>s.get()===!1,setCollapsed:so(s.set,!1),setExpanded:so(s.set,!0),readState:a})}});const _a=tr({fields:z8,name:"sliding",active:H8,apis:J9,state:tH});var oH=Object.freeze({__proto__:null,events:(o,s)=>{const c=o.stream.streams.setup(o,s);return Rn([vt(o.event,c),dc(()=>s.cancel())].concat(o.cancelEvent.map(d=>[vt(d,()=>s.cancel())]).getOr([])))}});const V8=o=>{const s=fe(null);return Ua({readState:()=>({timer:s.get()!==null?"set":"unset"}),setTimer:f=>{s.set(f)},cancel:()=>{const f=s.get();f!==null&&f.cancel()}})};var YA=Object.freeze({__proto__:null,throttle:V8,init:o=>o.stream.streams.state(o)});const nH=(o,s)=>{const a=o.stream,c=mu(o.onStream,a.delay);return s.setTimer(c),(d,f)=>{c.throttle(d,f),a.stopEvent&&f.stop()}};var Gv=[ha("stream",Gr("mode",{throttle:[At("delay"),at("stopEvent",!0),$o("streams",{setup:nH,state:V8})]})),at("event","input"),Uo("cancelEvent"),kd("onStream")];const sb=tr({fields:Gv,name:"streaming",active:oH,state:YA});var U8=Object.freeze({__proto__:null,exhibit:(o,s)=>Gc({attributes:zg([{key:s.tabAttr,value:"true"}])})}),rH=[at("tabAttr","data-alloy-tabstop")];const gn=tr({fields:rH,name:"tabstopping",active:U8}),aH=(o,s,a)=>{const c=s.aria;c.update(o,c,a.get())},iH=(o,s,a)=>{s.toggleClass.each(c=>{a.get()?sn(o.element,c):Un(o.element,c)})},mh=(o,s,a,c)=>{const d=a.get();a.set(c),iH(o,s,a),aH(o,s,a),d!==c&&s.onToggled(o,c)},XA=(o,s,a)=>{mh(o,s,a,!a.get())},W8=(o,s,a)=>{mh(o,s,a,!0)},JA=(o,s,a)=>{mh(o,s,a,!1)},cH=(o,s,a)=>a.get(),QA=(o,s,a)=>{mh(o,s,a,s.selected)};var lH=Object.freeze({__proto__:null,onLoad:QA,toggle:XA,isOn:cH,on:W8,off:JA,set:mh}),Z8=Object.freeze({__proto__:null,exhibit:()=>Gc({}),events:(o,s)=>{const a=$w(o,s,XA),c=N2(o,s,QA);return Rn(wt([o.toggleOnExecute?[a]:[],[c]]))}});const uH=(o,s,a)=>{Ee(o.element,"aria-pressed",a),s.syncWithExpanded&&eT(o,s,a)},dH=(o,s,a)=>{Ee(o.element,"aria-selected",a)},tT=(o,s,a)=>{Ee(o.element,"aria-checked",a)},eT=(o,s,a)=>{Ee(o.element,"aria-expanded",a)};var j8=[at("selected",!1),Uo("toggleClass"),at("toggleOnExecute",!0),ko("onToggled"),ai("aria",{mode:"none"},Gr("mode",{pressed:[at("syncWithExpanded",!1),$o("update",uH)],checked:[$o("update",tT)],expanded:[$o("update",eT)],selected:[$o("update",dH)],none:[$o("update",q)]}))];const go=tr({fields:j8,name:"toggling",active:Z8,apis:lH,state:zw(!1)}),_S=ee("tooltip.exclusive"),qv=ee("tooltip.show"),Kv=ee("tooltip.hide"),Yv=ee("tooltip.immediateHide"),Xv=ee("tooltip.immediateShow"),G8=(o,s,a)=>
76{o.getSystem().broadcastOn([_S],{})};var gH=Object.freeze({__proto__:null,hideAllExclusive:G8,immediateOpenClose:(o,s,a,c)=>no(o,c?Xv:Yv),isEnabled:(o,s,a)=>a.isEnabled(),setComponents:(o,s,a,c)=>{a.getTooltip().each(d=>{d.getSystem().isConnected()&&ze.set(d,c)})},setEnabled:(o,s,a,c)=>a.setEnabled(c)}),fH=Object.freeze({__proto__:null,events:(o,s)=>{const a=p=>{s.getTooltip().each(y=>{y.getSystem().isConnected()&&($u(y),o.onHide(p,y),s.clearTooltip())}),s.clearTimer()},c=p=>{if(!s.isShowing()&&s.isEnabled()){G8(p);const y=o.lazySink(p).getOrDie(),C=p.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:Rn(o.mode==="normal"?[vt(ii(),_=>{no(p,qv)}),vt(Ds(),_=>{no(p,Kv)})]:[]),behaviours:Pt([ze.config({})])});s.setTooltip(C),Pu(y,C),o.onShow(p,C),oa.position(y,C,{anchor:o.anchor(p)})}},d=p=>{s.getTooltip().each(y=>{const C=o.lazySink(p).getOrDie();oa.position(C,y,{anchor:o.anchor(p)})})},f=()=>{switch(o.mode){case"normal":return[vt(ac(),p=>{no(p,Xv)}),vt(Wg(),p=>{no(p,Yv)}),vt(ii(),p=>{no(p,qv)}),vt(Ds(),p=>{no(p,Kv)})];case"follow-highlight":return[vt(z1(),(p,y)=>{no(p,qv)}),vt(V1(),p=>{no(p,Kv)})];case"children-normal":return[vt(ac(),(p,y)=>{Es(p.element).each(C=>{ud(y.event.target,"[data-mce-tooltip]")&&s.getTooltip().fold(()=>{no(p,Xv)},_=>{s.isShowing()&&(o.onShow(p,_),d(p))})})}),vt(Wg(),p=>{Es(p.element).fold(()=>{no(p,Yv)},q)}),vt(ii(),p=>{Ko(p.element,"[data-mce-tooltip]:hover").each(y=>{s.getTooltip().fold(()=>{no(p,qv)},C=>{s.isShowing()&&(o.onShow(p,C),d(p))})})}),vt(Ds(),p=>{Ko(p.element,"[data-mce-tooltip]:hover").fold(()=>{no(p,Kv)},q)})];default:return[vt(ac(),(p,y)=>{Es(p.element).each(C=>{ud(y.event.target,"[data-mce-tooltip]")&&s.getTooltip().fold(()=>{no(p,Xv)},_=>{s.isShowing()&&(o.onShow(p,_),d(p))})})}),vt(Wg(),p=>{Es(p.element).fold(()=>{no(p,Yv)},q)})]}};return Rn(wt([[M2(p=>{o.onSetup(p)}),vt(qv,p=>{s.resetTimer(()=>{c(p)},o.delayForShow())}),vt(Kv,p=>{s.resetTimer(()=>{a(p)},o.delayForHide())}),vt(Xv,p=>{s.resetTimer(()=>{c(p)},0)}),vt(Yv,p=>{s.resetTimer(()=>{a(p)},0)}),vt(Au(),(p,y)=>{const C=y;C.universal||(Go(C.channels,_S)||Go(C.channels,uf()))&&(C.data.closedTooltip&&s.isShowing()&&C.data.closedTooltip(),a(p))}),dc(p=>{a(p)})],f()]))}}),pH=[At("lazySink"),At("tooltipDom"),at("exclusive",!0),at("tooltipComponents",[]),dn("delayForShow",nt(300)),dn("delayForHide",nt(100)),dn("onSetup",q),Kr("mode","normal",["normal","follow-highlight","children-keyboard-focus","children-normal"]),at("anchor",o=>({type:"hotspot",hotspot:o,layouts:{onLtr:nt([ys,Mn,Os,fr,vs,Qs]),onRtl:nt([ys,Mn,Os,fr,vs,Qs])},bubble:Va(0,-2,{})})),ko("onHide"),ko("onShow")],hH=Object.freeze({__proto__:null,init:()=>{const o=fe(!0),s=Ze(),a=Ze(),c=()=>{s.on(clearTimeout)},d=(p,y)=>{c(),s.set(setTimeout(p,y))},f=nt("not-implemented");return Ua({getTooltip:a.get,isShowing:a.isSet,setTooltip:a.set,clearTooltip:a.clear,clearTimer:c,resetTimer:d,readState:f,isEnabled:()=>o.get(),setEnabled:p=>o.set(p)})}});const yn=tr({fields:pH,name:"tooltipping",active:fH,state:hH,apis:gH});var nT=Object.freeze({__proto__:null,events:()=>Rn([g0(yp(),_e)]),exhibit:()=>Gc({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})});const Wu=tr({fields:[],name:"unselecting",active:nT}),bH=o=>{const s=o.dom.attributes!==void 0?o.dom.attributes:[];return Zo(s,(a,c)=>c.name==="class"?a:{...a,[c.name]:c.value},{})},xH=o=>Array.prototype.slice.call(o.dom.classList,0),Zu=o=>{const s=Zt.fromHtml(o),a=Dc(s),c=bH(s),d=xH(s),f=a.length===0?{}:{innerHtml:bu(s)};return{tag:qi(s),classes:d,attributes:c,...f}},Mo=o=>{const s=IL(o)&&Do(o,"uid")?o.uid:bf("memento");return{get:f=>f.getSystem().getByUid(s).getOrDie(),getOpt:f=>f.getSystem().getByUid(s).toOptional(),asSpec:()=>({...o,uid:s})}},or=Bm,bc=X1,vH=(o,s)=>{const a=fe(!1),c=fe(!1);return{stop:()=>{a.set(!0)},cut:()=>{c.set(!0)},isStopped:a.get,isCut:c.get,event:o,setSource:s.set,getSource:s.get}},K8=o=>{const s=fe(!1);return{stop:()=>{s.set(!0)},cut:q,isStopped:s.get,isCut:Fo,event:o,setSource:X("Cannot set source of a broadcasted event"),getSource:X("Cannot get source of a broadcasted event")}},Y8=o=>o.raw.which===z2[0]&&!Go(["input","textarea"],qi(o.target))&&!cp(o.target,'[contenteditable="true"]'),X8=(o,s)=>{const a={stopBackspace:!0,...s},c=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],d=eE(a),f=pt(c.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),I=>Vo(o,I,L=>{d.fireIfReady(L,I).each(j=>{j&&L.kill()}),a.triggerEvent(I,L)&&L.kill()})),p=Ze(),y=Vo(o,"paste",I=>{d.fireIfReady(I,"paste").each(W=>{W&&I.kill()}),a.triggerEvent("paste",I)&&I.kill(),p.set(setTimeout(()=>{a.triggerEvent(N1(),I)},0))}),C=Vo(o,"keydown",I=>{a.triggerEvent("keydown",I)?I.kill():a.stopBackspace&&Y8(I)&&I.prevent()}),_=Vo(o,"focusin",I=>{a.triggerEvent("focusin",I)&&I.kill()}),A=Ze(),O=Vo(o,"focusout",I=>{a.triggerEvent("focusout",I)&&I.kill(),A.set(setTimeout(()=>{a.triggerEvent(Wg(),I)},0))});return{unbind:()=>{It(f,I=>{I.unbind()}),C.unbind(),_.unbind(),O.unbind(),y.unbind(),p.on(clearTimeout),A.on(clearTimeout)}}},Gd=(o,s)=>{const a=he(o,"target").getOr(s);return fe(a)},Jc=Zi.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),sT=(o,s,a,c,d,f)=>{const p=o(s,c),y=vH(a,d);return p.fold(()=>(f.logEventNoHandlers(s,c),Jc.complete()),C=>{const _=C.descHandler;return V0(_)(y),y.isStopped()?(f.logEventStopped(s,C.element,_.purpose),Jc.stopped()):y.isCut()?(f.logEventCut(s,C.element,_.purpose),Jc.complete()):ga(C.element).fold(()=>(f.logNoParent(s,C.element,_.purpose),Jc.complete()),O=>(f.logEventResponse(s,C.element,_.purpose),Jc.resume(O)))})},gh=(o,s,a,c,d,f)=>sT(o,s,a,c,d,f).fold(_e,p=>gh(o,s,a,p,d,f),Fo),yH=(o,s,a,c,d)=>{const f=Gd(a,c);return sT(o,s,a,c,f,d)},rT=(o,s,a)=>{const c=K8(s);return It(o,d=>{const f=d.descHandler;V0(f)(c)}),c.isStopped()},J8=(o,s,a,c)=>SS(o,s,a,a.target,c),SS=(o,s,a,c,d)=>{const f=Gd(a,c);return gh(o,s,a,c,f,d)},kS=(o,s)=>({element:o,descHandler:s}
76),Q8=(o,s)=>({id:o,descHandler:s}),Qc=()=>{const o={},s=(p,y,C)=>{is(C,(_,A)=>{const O=o[A]!==void 0?o[A]:{};O[y]=nA(_,p),o[A]=O})},a=(p,y)=>qc(y).bind(C=>he(p,C)).map(C=>kS(y,C));return{registerId:s,unregisterId:p=>{is(o,(y,C)=>{nn(y,p)&&delete y[p]})},filterByType:p=>he(o,p).map(y=>Wr(y,(C,_)=>Q8(_,C))).getOr([]),find:(p,y,C)=>he(o,y).bind(_=>oc(C,A=>a(_,A),p))}},aT=()=>{const o=Qc(),s={},a=_=>{const A=_.element;return qc(A).getOrThunk(()=>yv("uid-",_.element))},c=(_,A)=>{const O=s[A];if(O===_)f(_);else throw new Error('The tagId "'+A+'" is already used by: '+zc(O.element)+` 77Cannot use it for: `+zc(_.element)+` 78The conflicting element is`+(Ro(O.element)?" ":" not ")+"already in the DOM")},d=_=>{const A=a(_);Do(s,A)&&c(_,A);const O=[_];o.registerId(O,A,_.events),s[A]=_},f=_=>{qc(_.element).each(A=>{delete s[A],o.unregisterId(A)})};return{find:(_,A,O)=>o.find(_,A,O),filter:_=>o.filterByType(_),register:d,unregister:f,getById:_=>he(s,_)}},iT=o=>{const s=V=>ga(o.element).fold(_e,K=>ln(V,K)),a=aT(),c=(V,K)=>a.find(s,V,K),d=X8(o.element,{triggerEvent:(V,K)=>g2(V,K.target,tt=>J8(c,V,K,tt))}),f={debugInfo:nt("real"),triggerEvent:(V,K,tt)=>{g2(V,K,ct=>SS(c,V,tt,K,ct))},triggerFocus:(V,K)=>{qc(V).fold(()=>{Js(V)},tt=>{g2(Eu(),V,ct=>(yH(c,Eu(),{originator:K,kill:q,prevent:q,target:V},V,ct),!1))})},triggerEscape:(V,K)=>{f.triggerEvent("keydown",V.element,K.event)},getByUid:V=>W(V),getByDom:V=>j(V),build:m,buildOrPatch:l,addToGui:V=>{C(V)},removeFromGui:V=>{_(V)},addToWorld:V=>{p(V)},removeFromWorld:V=>{y(V)},broadcast:V=>{M(V)},broadcastOn:(V,K)=>{I(V,K)},broadcastEvent:(V,K)=>{L(V,K)},isConnected:_e},p=V=>{V.connect(f),dd(V.element)||(a.register(V),It(V.components(),p),f.triggerEvent(Cp(),V.element,{target:V.element}))},y=V=>{dd(V.element)||(It(V.components(),y),a.unregister(V)),V.disconnect()},C=V=>{Pu(o,V)},_=V=>{$u(V)},A=()=>{d.unbind(),Ji(o.element)},O=V=>{const K=a.filter(Au());It(K,tt=>{const ct=tt.descHandler;V0(ct)(V)})},M=V=>{O({universal:!0,data:V})},I=(V,K)=>{O({universal:!1,channels:V,data:K})},L=(V,K)=>{const tt=a.filter(V);return rT(tt,K)},W=V=>a.getById(V).fold(()=>Te.error(new Error('Could not find component with uid: "'+V+'" in system.')),Te.value),j=V=>{const K=qc(V).getOr("not found");return W(K)};return p(o),{root:o,element:o.element,destroy:A,add:C,remove:_,getByUid:W,getByDom:j,addToWorld:p,removeFromWorld:y,broadcast:M,broadcastOn:I,broadcastEvent:L}},t7=()=>{const o=(s,a)=>{a.stop(),nf(s)};return[vt(km(),o),vt(Zg(),o),Lm(La()),Lm(va())]},cT=o=>{const s=a=>Md((c,d)=>{a(c),d.stop()});return Rn(wt([o.map(s).toArray(),t7()]))},Ks=pc({name:"Button",factory:o=>{const s=cT(o.action),a=o.dom.tag,c=f=>he(o.dom,"attributes").bind(p=>he(p,f)),d=()=>{if(a==="button"){const f=c("type").getOr("button"),p=c("role").map(y=>({role:y})).getOr({});return{type:f,...p}}else return{role:o.role.getOr(c("role").getOr("button"))}};return{uid:o.uid,dom:o.dom,components:o.components,events:s,behaviours:zl.augment(o.buttonBehaviours,[Ie.config({}),pe.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:d()},eventOrder:o.eventOrder}},configFields:[at("uid",void 0),At("dom"),at("components",[]),zl.field("buttonBehaviours",[Ie,pe]),Uo("action"),Uo("role"),at("eventOrder",{})]}),CH=nt([at("shell",!1),At("makeItem"),at("setupItem",q),zl.field("listBehaviours",[ze])]),lT=Xr({name:"items",overrides:()=>({behaviours:Pt([ze.config({})])})}),_H=nt([lT]),uT=nt("CustomList"),dT=(o,s,a,c)=>{const d=(y,C)=>{p(y).fold(()=>{throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},_=>{const A=ze.contents(_),O=C.length,M=O-A.length,I=M>0?te(M,()=>o.makeItem()):[],L=A.slice(O);It(L,j=>ze.remove(_,j)),It(I,j=>ze.append(_,j));const W=ze.contents(_);It(W,(j,V)=>{o.setupItem(y,j,C[V],V)})})},f=o.shell?{behaviours:[ze.config({})],components:[]}:{behaviours:[],components:s},p=y=>o.shell?k.some(y):rn(y,o,"items");return{uid:o.uid,dom:o.dom,components:f.components,behaviours:zr(o.listBehaviours,f.behaviours),apis:{setItems:d}}},e7=Wa({name:uT(),configFields:CH(),partFields:_H(),factory:dT,apis:{setItems:(o,s,a)=>{o.setItems(s,a)}}}),rb="aria-controls",o7=o=>Ag(o,a=>{if(!Ba(a))return!1;const c=Ws(a,"id");return c!==void 0&&c.indexOf(rb)>-1}).bind(a=>{const c=Ws(a,"id"),d=ks(a);return Ko(d,`[${rb}="${c}"]`)}),n7=()=>{const o=ee(rb);return{id:o,link:c=>{Ee(c,rb,o)},unlink:c=>{Tn(c,rb)}}},s7=(o,s)=>o7(s).exists(a=>Sf(o,a)),Sf=(o,s)=>v1(s,a=>ln(a,o.element),Fo)||s7(o,s),r7="alloy.item-hover",a7="alloy.item-focus",i7="alloy.item-toggled",c7=o=>{(Es(o.element).isNone()||Ie.isFocused(o))&&(Ie.isFocused(o)||Ie.focus(o),be(o,r7,{item:o}))},l7=o=>{be(o,a7,{item:o})},u7=(o,s)=>{be(o,i7,{item:o,state:s})},mT=nt(r7),SH=nt(a7),d7=nt(i7),m7=o=>o.role.fold(()=>o.toggling.map(s=>s.exclusive?"menuitemradio":"menuitemcheckbox").getOr("menuitem"),eo),kH=(o,s)=>({aria:{mode:s?"selected":"checked"},...Ur(o,(a,c)=>c!=="exclusive"),onToggled:(a,c)=>{ke(o.onToggled)&&o.onToggled(a,c),u7(a,c)}}),EH=o=>({dom:o.dom,domModification:{...o.domModification,attributes:{role:m7(o),...o.domModification.attributes,"aria-haspopup":o.hasSubmenu,...o.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:zl.augment(o.itemBehaviours,[o.toggling.fold(go.revoke,s=>go.config(kH(s,o.role.exists(a=>a==="option")))),Ie.config({ignore:o.ignoreFocus,stopMousedown:o.ignoreFocus,onFocus:s=>{l7(s)}}),pe.config({mode:"execution"}),ne.config({store:{mode:"memory",initialValue:o.data}}),Me("item-type-events",[...t7(),vt(ii(),c7),vt(Em(),Ie.focus)])]),components:o.components,eventOrder:o.eventOrder});var gT=[At("data"),At("components"),At("dom"),at("hasSubmenu",!1),Uo("toggling"),Uo("role"),zl.field("itemBehaviours",[go,Ie,pe,ne]),at("ignoreFocus",!1),at("domModification",{}),$o("builder",EH),at("eventOrder",{})];const g7=o=>({dom:o.dom,components:o.components,events:Rn([mE(Em())])});var f7=[At("dom"),At("components"),$o("builder",g7)];const fT=nt("item-widget"),pT=nt([Lr({name:"widget",overrides:o=>({behaviours:Pt([ne.config({store:{mode:"manual",getValue:s=>o.data,setValue:q}})])})})]),p7=o=>{const s=ya(fT(),o,pT()),a=J1(fT(),o,s.internals()),c=f=>rn(f,o,"widget").map(p=>(pe.focusIn(p),p)),d=(f,p)=>mf(p.event.target)?k.none():(o.autofocus&&p.setSource(f.element),k.none());return{dom:o.dom,components:a,domModification:o.domModification,events:Rn([Md((f,p)=>{c(f).each(y=>{p.stop()})}),vt(ii(),c7),vt(Em(),(f,p)=>
78{o.autofocus?c(f):Ie.focus(f)})]),behaviours:zl.augment(o.widgetBehaviours,[ne.config({store:{mode:"memory",initialValue:o.data}}),Ie.config({ignore:o.ignoreFocus,onFocus:f=>{l7(f)}}),pe.config({mode:"special",focusIn:o.autofocus?f=>{c(f)}:H2(),onLeft:d,onRight:d,onEscape:(f,p)=>!Ie.isFocused(f)&&!o.autofocus?(Ie.focus(f),k.some(!0)):(o.autofocus&&p.setSource(f.element),k.none())})])}};var hT=[At("uid"),At("data"),At("components"),At("dom"),at("autofocus",!1),at("ignoreFocus",!1),zl.field("widgetBehaviours",[ne,Ie,pe]),at("domModification",{}),Ru(pT()),$o("builder",p7)];const b7=Gr("type",{widget:hT,item:gT,separator:f7}),x7=(o,s)=>({mode:"flatgrid",selector:"."+o.markers.item,initSize:{numColumns:s.initSize.numColumns,numRows:s.initSize.numRows},focusManager:o.focusManager}),v7=(o,s)=>({mode:"matrix",selectors:{row:s.rowSelector,cell:"."+o.markers.item},previousSelector:s.previousSelector,focusManager:o.focusManager}),DH=(o,s)=>({mode:"menu",selector:"."+o.markers.item,moveOnTab:s.moveOnTab,focusManager:o.focusManager}),bT=nt([Y1({factory:{sketch:o=>{const s=jr("menu.spec item",b7,o);return s.builder(s)}},name:"items",unit:"item",defaults:(o,s)=>nn(s,"uid")?s:{...s,uid:bf("item")},overrides:(o,s)=>({type:s.type,ignoreFocus:o.fakeFocus,domModification:{classes:[o.markers.item]}})})]),OH=nt([Yn("role"),At("value"),At("items"),At("dom"),At("components"),at("eventOrder",{}),pr("menuBehaviours",[Bo,ne,Rt,pe]),ai("movement",{mode:"menu",moveOnTab:!0},Gr("mode",{grid:[ww(),$o("config",x7)],matrix:[$o("config",v7),At("rowSelector"),at("previousSelector",k.none)],menu:[at("moveOnTab",!0),$o("config",DH)]})),f2(),at("fakeFocus",!1),at("focusManager",j2()),ko("onHighlight"),ko("onDehighlight"),at("showMenuRole",!0)]),xT=nt("alloy.menu-focus"),y7=(o,s)=>{const a=ur(o.element,'[role="menuitemradio"][aria-checked="true"]');It(a,c=>{ln(c,s.element)||o.getSystem().getByDom(c).each(d=>{go.off(d)})})},fh=(o,s,a,c)=>({uid:o.uid,dom:o.dom,markers:o.markers,behaviours:zr(o.menuBehaviours,[Bo.config({highlightClass:o.markers.selectedItem,itemClass:o.markers.item,onHighlight:o.onHighlight,onDehighlight:o.onDehighlight}),ne.config({store:{mode:"memory",initialValue:o.value}}),Rt.config({find:k.some}),pe.config(o.movement.config(o,o.movement))]),events:Rn([vt(SH(),(d,f)=>{const p=f.event;d.getSystem().getByDom(p.target).each(y=>{Bo.highlight(d,y),f.stop(),be(d,xT(),{menu:d,item:y})})}),vt(mT(),(d,f)=>{const p=f.event.item;Bo.highlight(d,p)}),vt(d7(),(d,f)=>{const{item:p,state:y}=f.event;y&&Ws(p.element,"role")==="menuitemradio"&&y7(d,p)})]),components:s,eventOrder:o.eventOrder,...o.showMenuRole?{domModification:{attributes:{role:o.role.getOr("menu")}}}:{}}),tg=Wa({name:"Menu",configFields:OH(),partFields:bT(),factory:fh}),vT=o=>Zf(o,(s,a)=>({k:s,v:a})),Jv=(o,s,a,c)=>he(a,c).bind(d=>he(o,d).bind(f=>{const p=Jv(o,s,a,f);return k.some([f].concat(p))})).getOr([]),RH=(o,s)=>{const a={};is(o,(p,y)=>{It(p,C=>{a[C]=y})});const c=s,d=vT(s),f=hs(d,(p,y)=>[y].concat(Jv(a,c,d,y)));return hs(a,p=>he(f,p).getOr([p]))},C7=()=>{const o=fe({}),s=fe({}),a=fe({}),c=Ze(),d=fe({}),f=()=>{o.set({}),s.set({}),a.set({}),c.clear()},p=()=>c.get().isNone(),y=(dt,Wt)=>{s.set({...s.get(),[dt]:{type:"prepared",menu:Wt}})},C=(dt,Wt,kt,Ot)=>{c.set(dt),o.set(kt),s.set(Wt),d.set(Ot);const Tt=RH(Ot,kt);a.set(Tt)},_=dt=>iu(o.get(),(Wt,kt)=>Wt===dt),A=(dt,Wt,kt)=>W(dt).bind(Ot=>_(dt).bind(Tt=>Wt(Tt).map(xe=>({triggeredMenu:Ot,triggeringItem:xe,triggeringPath:kt}
78)))),O=(dt,Wt)=>{const kt=Io(V(dt).toArray(),Ot=>W(Ot).isSome());return he(a.get(),dt).bind(Ot=>{const Tt=Ct(kt.concat(Ot)),xe=Y(Tt,(le,Qe)=>A(le,Wt,Tt.slice(0,Qe+1)).fold(()=>ji(c.get(),le)?[]:[k.none()],ye=>[k.some(ye)]));return lx(xe)})},M=dt=>he(o.get(),dt).map(Wt=>{const kt=he(a.get(),dt).getOr([]);return[Wt].concat(kt)}),I=dt=>he(a.get(),dt).bind(Wt=>Wt.length>1?k.some(Wt.slice(1)):k.none()),L=dt=>he(a.get(),dt),W=dt=>j(dt).bind(yT),j=dt=>he(s.get(),dt),V=dt=>he(o.get(),dt);return{setMenuBuilt:y,setContents:C,expand:M,refresh:L,collapse:I,lookupMenu:j,lookupItem:V,otherMenus:dt=>{const Wt=d.get();return st(qo(Wt),dt)},getPrimary:()=>c.get().bind(W),getMenus:()=>s.get(),clear:f,isClear:p,getTriggeringPath:O}},yT=o=>o.type==="prepared"?k.some(o.menu):k.none(),CT={init:C7,extractPreparedMenu:yT},ES=ee("tiered-menu-item-highlight"),wT=ee("tiered-menu-item-dehighlight"),BH=(o,s)=>{const a=Ze(),c=(_t,Lt,Ae)=>hs(Ae,(Ge,me)=>{const Ue=()=>tg.sketch({...Ge,value:me,markers:o.markers,fakeFocus:o.fakeFocus,onHighlight:(jo,Eo)=>{be(jo,ES,{menuComp:jo,itemComp:Eo})},onDehighlight:(jo,Eo)=>{be(jo,wT,{menuComp:jo,itemComp:Eo})},focusManager:o.fakeFocus?x0():j2()});return me===Lt?{type:"prepared",menu:_t.getSystem().build(Ue())}:{type:"notbuilt",nbMenu:Ue}}),d=CT.init(),f=_t=>{const Lt=c(_t,o.data.primary,o.data.menus),Ae=C();return d.setContents(o.data.primary,Lt,o.data.expansions,Ae),d.getPrimary()},p=_t=>ne.getValue(_t).value,y=(_t,Lt,Ae)=>bi(Lt,Ge=>{if(!Ge.getSystem().isConnected())return k.none();const me=Bo.getCandidates(Ge);return xt(me,Ue=>p(Ue)===Ae)}),C=_t=>hs(o.data.menus,(Lt,Ae)=>Y(Lt.items,Ge=>Ge.type==="separator"?[]:[Ge.data.value])),_=Bo.highlight,A=(_t,Lt)=>{_(_t,Lt),Bo.getHighlighted(Lt).orThunk(()=>Bo.getFirst(Lt)).each(Ae=>{o.fakeFocus?Bo.highlight(Lt,Ae):d0(_t,Ae.element,Em())})},O=(_t,Lt)=>um(pt(Lt,Ae=>_t.lookupMenu(Ae).bind(Ge=>Ge.type==="prepared"?k.some(Ge.menu):k.none()))),M=(_t,Lt,Ae)=>{const Ge=O(Lt,Lt.otherMenus(Ae));It(Ge,me=>{_r(me.element,[o.markers.backgroundMenu]),o.stayInDom||ze.remove(_t,me)})},I=_t=>a.get().getOrThunk(()=>{const Lt={},Ae=ur(_t.element,`.${o.markers.item}`),Ge=Io(Ae,me=>Ws(me,"aria-haspopup")==="true");return It(Ge,me=>{_t.getSystem().getByDom(me).each(Ue=>{const jo=p(Ue);Lt[jo]=Ue})}),a.set(Lt),Lt}),L=(_t,Lt)=>{const Ae=I(_t);is(Ae,(Ge,me)=>{const Ue=Go(Lt,me);Ee(Ge.element,"aria-expanded",Ue)}
78)},W=(_t,Lt,Ae)=>k.from(Ae[0]).bind(Ge=>Lt.lookupMenu(Ge).bind(me=>{if(me.type==="notbuilt")return k.none();{const Ue=me.menu,jo=O(Lt,Ae.slice(1));return It(jo,Eo=>{sn(Eo.element,o.markers.backgroundMenu)}),Ro(Ue.element)||ze.append(_t,h(Ue)),_r(Ue.element,[o.markers.backgroundMenu]),A(_t,Ue),M(_t,Lt,Ae),k.some(Ue)}}));let j;(function(_t){_t[_t.HighlightSubmenu=0]="HighlightSubmenu",_t[_t.HighlightParent=1]="HighlightParent"})(j||(j={}));const V=(_t,Lt,Ae)=>{if(Ae.type==="notbuilt"){const Ge=_t.getSystem().build(Ae.nbMenu());return d.setMenuBuilt(Lt,Ge),Ge}else return Ae.menu},K=(_t,Lt,Ae=j.HighlightSubmenu)=>{if(Lt.hasConfigured(ce)&&ce.isDisabled(Lt))return k.some(Lt);{const Ge=p(Lt);return d.expand(Ge).bind(me=>(L(_t,me),k.from(me[0]).bind(Ue=>d.lookupMenu(Ue).bind(jo=>{const Eo=V(_t,Ue,jo);return Ro(Eo.element)||ze.append(_t,h(Eo)),o.onOpenSubmenu(_t,Lt,Eo,Ct(me)),Ae===j.HighlightSubmenu?(Bo.highlightFirst(Eo),W(_t,d,me)):(Bo.dehighlightAll(Eo),k.some(Lt))}))))}},tt=(_t,Lt)=>{const Ae=p(Lt);return d.collapse(Ae).bind(Ge=>(L(_t,Ge),W(_t,d,Ge).map(me=>(o.onCollapseMenu(_t,Lt,me),me))))},ct=(_t,Lt)=>{const Ae=p(Lt);return d.refresh(Ae).bind(Ge=>(L(_t,Ge),W(_t,d,Ge)))},dt=(_t,Lt)=>mf(Lt.element)?k.none():K(_t,Lt,j.HighlightSubmenu),Wt=(_t,Lt)=>mf(Lt.element)?k.none():tt(_t,Lt),kt=(_t,Lt)=>tt(_t,Lt).orThunk(()=>o.onEscape(_t,Lt).map(()=>_t)),Ot=_t=>(Lt,Ae)=>$r(Ae.getSource(),`.${o.markers.item}`).bind(Ge=>Lt.getSystem().getByDom(Ge).toOptional().bind(me=>_t(Lt,me).map(_e))),Tt=Rn([vt(xT(),(_t,Lt)=>{const Ae=Lt.event.item;d.lookupItem(p(Ae)).each(()=>{const Ge=Lt.event.menu;Bo.highlight(_t,Ge);const me=p(Lt.event.item);d.refresh(me).each(Ue=>M(_t,d,Ue))})}),Md((_t,Lt)=>{const Ae=Lt.event.target;_t.getSystem().getByDom(Ae).each(Ge=>{p(Ge).indexOf("collapse-item")===0&&tt(_t,Ge),K(_t,Ge,j.HighlightSubmenu).fold(()=>{o.onExecute(_t,Ge)},q)})}),vn((_t,Lt)=>{f(_t).each(Ae=>{ze.append(_t,h(Ae)),o.onOpenMenu(_t,Ae),o.highlightOnOpen===Ar.HighlightMenuAndItem?A(_t,Ae):o.highlightOnOpen===Ar.HighlightJustMenu&&_(_t,Ae)})}),vt(ES,(_t,Lt)=>{o.onHighlightItem(_t,Lt.event.menuComp,Lt.event.itemComp)}),vt(wT,(_t,Lt)=>{o.onDehighlightItem(_t,Lt.event.menuComp,Lt.event.itemComp)}),...o.navigateOnHover?[vt(mT(),(_t,Lt)=>{const Ae=Lt.event.item;ct(_t,Ae),K(_t,Ae,j.HighlightParent),o.onHover(_t,Ae)})]:[]]),xe=_t=>Bo.getHighlighted(_t).bind(Bo.getHighlighted),le=_t=>{xe(_t).each(Lt=>{tt(_t,Lt)})},Qe=_t=>{d.getPrimary().each(Lt=>{A(_t,Lt)})},ye=_t=>k.from(_t.components()[0]).filter(Lt=>Ws(Lt.element,"role")==="menu"),ue={collapseMenu:le,highlightPrimary:Qe,repositionMenus:_t=>{d.getPrimary().bind(Ae=>xe(_t).bind(Ge=>{const me=p(Ge),Ue=id(d.getMenus()),jo=um(pt(Ue,CT.extractPreparedMenu));return d.getTriggeringPath(me,Eo=>y(_t,jo,Eo))}).map(Ge=>({primary:Ae,triggeringPath:Ge}))).fold(()=>{ye(_t).each(Ae=>{o.onRepositionMenu(_t,Ae,[])})},({primary:Ae,triggeringPath:Ge})=>{o.onRepositionMenu(_t,Ae,Ge)})}};return{uid:o.uid,dom:o.dom,markers:o.markers,behaviours:zr(o.tmenuBehaviours,[pe.config({mode:"special",onRight:Ot(dt),onLeft:Ot(Wt),onEscape:Ot(kt),focusIn:(_t,Lt)=>{d.getPrimary().each(Ae=>{d0(_t,Ae.element,Em())})}}),Bo.config({highlightClass:o.markers.selectedMenu,itemClass:o.markers.menu}),Rt.config({find:_t=>Bo.getHighlighted(_t)}),ze.config({})]),eventOrder:o.eventOrder,apis:ue,events:Tt}},w7=nt("collapse-item"),_7=(o,s,a)=>({primary:o,menus:s,expansions:a}),S7=(o,s)=>({primary:o,menus:_d(o,s),expansions:{}}),k7=o=>({value:ee(w7()),meta:{text:o}}),ph=pc({name:"TieredMenu",configFields:[Sp("onExecute"),Sp("onEscape"),kd("onOpenMenu"),kd("onOpenSubmenu"),ko("onRepositionMenu"),ko("onCollapseMenu"),at("highlightOnOpen",Ar.HighlightMenuAndItem),Al("data",[At("primary"),At("menus"),At("expansions")]),at("fakeFocus",!1),ko("onHighlightItem"),ko("onDehighlightItem"),ko("onHover"),yw(),At("dom"),at("navigateOnHover",!0),at("stayInDom",!1),pr("tmenuBehaviours",[pe,Bo,Rt,ze]),at("eventOrder",{})],apis:{collapseMenu:(o,s)=>{o.collapseMenu(s)},highlightPrimary:(o,s)=>{o.highlightPrimary(s)},repositionMenus:(o,s)=>{o.repositionMenus(s)}},factory:BH,extraApis:{tieredData:_7,singleData:S7,collapseItem:k7}}),AS=nt("sink"),FH=nt(Xr({name:AS(),overrides:nt({dom:{tag:"div"}
78,behaviours:Pt([oa.config({useFixed:_e})]),events:Rn([Lm(qs()),Lm(va()),Lm(km())])})})),MH=Ia([at("isExtraPart",Fo),xa("fireEventInstead",[at("event",Tu())])]),_T=o=>{const s=jr("Dismissal",MH,o);return{[Fl()]:{schema:Ia([At("target")]),onReceive:(a,c)=>{To.isOpen(a)&&(To.isPartOf(a,c.target)||s.isExtraPart(a,c.target)||s.fireEventInstead.fold(()=>To.close(a),f=>no(a,f.event)))}}}},NH=Ia([xa("fireEventInstead",[at("event",pw())]),$a("doReposition")]),TS=o=>{const s=jr("Reposition",NH,o);return{[Cs()]:{onReceive:a=>{To.isOpen(a)&&s.fireEventInstead.fold(()=>s.doReposition(a),c=>no(a,c.event))}}}},E7=(o,s)=>{const a=o.getHotspot(s).getOr(s),c="hotspot",d=o.getAnchorOverrides();return o.layouts.fold(()=>({type:c,hotspot:a,overrides:d}),f=>({type:c,hotspot:a,overrides:d,layouts:f}))},Qv=(o,s,a)=>{const c=o.fetch;return c(a).map(s)},A7=(o,s,a,c,d,f,p)=>{const y=Qv(o,s,c),C=T7(c,o);return y.map(_=>_.bind(A=>{const O=A.menus[A.primary];return k.from(O).each(M=>{o.listRole.each(I=>{M.role=I})}),k.from(ph.sketch({...f.menu(),uid:bf(""),data:A,highlightOnOpen:p,onOpenMenu:(M,I)=>{const L=C().getOrDie();oa.position(L,I,{anchor:a}),To.decloak(d)},onOpenSubmenu:(M,I,L)=>{const W=C().getOrDie();oa.position(W,L,{anchor:{type:"submenu",item:I}}),To.decloak(d)},onRepositionMenu:(M,I,L)=>{const W=C().getOrDie();oa.position(W,I,{anchor:a}),It(L,j=>{oa.position(W,j.triggeredMenu,{anchor:{type:"submenu",item:j.triggeringItem}})})},onEscape:()=>(Ie.focus(c),To.close(d),k.some(!0))}))}))},DS=(o,s,a,c,d,f,p)=>{const y=E7(o,a);return A7(o,s,y,a,c,d,p).map(_=>(_.fold(()=>{To.isOpen(c)&&To.close(c)},A=>{To.cloak(c),To.open(c,A),f(c)}),c))},PH=(o,s,a,c,d,f,p)=>(To.close(c),cs.pure(c)),OS=(o,s,a,c,d,f)=>{const p=Ve.getCoupled(a,"sandbox");return(To.isOpen(p)?PH:DS)(o,s,a,p,c,d,f)},IH=(o,s,a)=>{const c=Rt.getCurrent(s).getOr(s),d=Ir(o.element);a?Be(c.element,"min-width",d+"px"):xm(c.element,d)},T7=(o,s)=>o.getSystem().getByUid(s.uid+"-"+AS()).map(a=>()=>Te.value(a)).getOrThunk(()=>s.lazySink.fold(()=>()=>Te.error(new Error("No internal sink is specified, nor could an external sink be found")),a=>()=>a(o))),D7=o=>{To.getState(o).each(s=>{ph.repositionMenus(s)})},O7=(o,s,a)=>{const c=n7(),d=(y,C)=>{const _=E7(o,s);c.link(s.element),o.matchWidth&&IH(_.hotspot,C,o.useMinWidth),o.onOpen(_,y,C),a!==void 0&&a.onOpen!==void 0&&a.onOpen(y,C)},f=(y,C)=>{c.unlink(s.element),p().getOr(C).element.dom.dispatchEvent(new window.FocusEvent("focusout")),a!==void 0&&a.onClose!==void 0&&a.onClose(y,C)},p=T7(s,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:c.id}},behaviours:zl.augment(o.sandboxBehaviours,[ne.config({store:{mode:"memory",initialValue:s}}),To.config({onOpen:d,onClose:f,isPartOf:(y,C,_)=>Sf(C,_)||Sf(s,_),getAttachPoint:()=>p().getOrDie()}),Rt.config({find:y=>To.getState(y).bind(C=>Rt.getCurrent(C))}),na.config({channels:{..._T({isExtraPart:Fo}),...TS({doReposition:D7})}})])}},$H=o=>{const s=Ve.getCoupled(o,"sandbox");D7(s)},ST=()=>[at("sandboxClasses",[]),zl.field("sandboxBehaviours",[Rt,na,To,ne])],LH=nt([At("dom"),At("fetch"),ko("onOpen"),Ha("onExecute"),at("getHotspot",k.some),at("getAnchorOverrides",nt({})),Cf(),pr("dropdownBehaviours",[go,Ve,pe,Ie]),At("toggleClass"),at("eventOrder",{}),Uo("lazySink"),at("matchWidth",!1),at("useMinWidth",!1),Uo("role"),Uo("listRole")].concat(ST())),HH=nt([Ni({schema:[yw(),at("fakeFocus",!1)],name:"menu",defaults:o=>({onExecute:o.onExecute})}),FH()]),zH=(o,s,a,c)=>{const d=A=>he(o.dom,"attributes").bind(O=>he(O,A)),f=A=>{To.getState(A).each(O=>{ph.highlightPrimary(O)})},p=(A,O,M)=>OS(o,eo,A,c,O,M),y=A=>{p(A,f,Ar.HighlightMenuAndItem).get(q)},C={expand:A=>{go.isOn(A)||p(A,q,Ar.HighlightNone).get(q)},open:A=>{go.isOn(A)||p(A,q,Ar.HighlightMenuAndItem).get(q)},refetch:A=>Ve.getExistingCoupled(A,"sandbox").fold(()=>p(A,q,Ar.HighlightMenuAndItem).map(q),M=>DS(o,eo,A,M,c,q,Ar.HighlightMenuAndItem).map(q)),isOpen:go.isOn,close:A=>{go.isOn(A)&&p(A,q,Ar.HighlightMenuAndItem).get(q)},repositionMenus:A=>{go.isOn(A)&&$H(A)}},_=(A,O)=>(nf(A),k.some(!0));return{uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.dropdownBehaviours,[go.config({toggleClass:o.toggleClass,aria:{mode:"exp
78anded"}}),Ve.config({others:{sandbox:A=>O7(o,A,{onOpen:()=>go.on(A),onClose:()=>go.off(A)})}}),pe.config({mode:"special",onSpace:_,onEnter:_,onDown:(A,O)=>{if(gi.isOpen(A)){const M=Ve.getCoupled(A,"sandbox");f(M)}else gi.open(A);return k.some(!0)},onEscape:(A,O)=>gi.isOpen(A)?(gi.close(A),k.some(!0)):k.none()}),Ie.config({})]),events:cT(k.some(y)),eventOrder:{...o.eventOrder,[mr()]:["disabling","toggling","alloy.base.behaviour"]},apis:C,domModification:{attributes:{"aria-haspopup":o.listRole.getOr("true"),...o.role.fold(()=>({}),A=>({role:A})),...o.dom.tag==="button"?{type:d("type").getOr("button")}:{}}}}},gi=Wa({name:"Dropdown",configFields:LH(),partFields:HH(),factory:zH,apis:{open:(o,s)=>o.open(s),refetch:(o,s)=>o.refetch(s),expand:(o,s)=>o.expand(s),close:(o,s)=>o.close(s),isOpen:(o,s)=>o.isOpen(s),repositionMenus:(o,s)=>o.repositionMenus(s)}}),R7="form",VH=[pr("formBehaviours",[ne])],kT=o=>"<alloy.field."+o+">",UH=o=>{const s=(()=>{const f=[];return{field:(y,C)=>(f.push(y),v2(R7,kT(y),C)),record:nt(f)}})(),a=o(s),c=s.record(),d=pt(c,f=>Lr({name:f,pname:kT(f)}));return hA(R7,VH,d,F7,a)},B7=(o,s)=>o.fold(()=>Te.error(s),Te.value),F7=(o,s)=>({uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.formBehaviours,[ne.config({store:{mode:"manual",getValue:a=>{const c=Uc(a,o);return hs(c,(d,f)=>d().bind(p=>{const y=Rt.getCurrent(p);return B7(y,new Error(`Cannot find a current component to extract the value from for form part '${f}': `+zc(p.element)))}).map(ne.getValue))},setValue:(a,c)=>{is(c,(d,f)=>{rn(a,o,f).each(p=>{Rt.getCurrent(p).each(y=>{ne.setValue(y,d)})})})}}})]),apis:{getField:(a,c)=>rn(a,o,c).bind(Rt.getCurrent)}}),kf={getField:Qp((o,s,a)=>o.getField(s,a)),sketch:UH},ab=nt([At("dom"),at("shell",!0),pr("toolbarBehaviours",[ze])]),ZH=nt([Xr({name:"groups",overrides:()=>({behaviours:Pt([ze.config({})])})})]),ty=(o,s,a,c)=>{const d=(y,C)=>{f(y).fold(()=>{throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},_=>{ze.set(_,C)})},f=y=>o.shell?k.some(y):rn(y,o,"groups"),p=o.shell?{behaviours:[ze.config({})],components:[]}:{behaviours:[],components:s};return{uid:o.uid,dom:o.dom,components:p.components,behaviours:zr(o.toolbarBehaviours,p.behaviours),apis:{setGroups:d,refresh:q},domModification:{attributes:{role:"group"}}}},ju=Wa({name:"Toolbar",configFields:ab(),partFields:ZH(),factory:ty,apis:{setGroups:(o,s,a)=>{o.setGroups(s,a)}}}),jH=nt([vo(["toggledClass"]),At("lazySink"),$a("fetch"),rc("getBounds"),xa("fireDismissalEventInstead",[at("event",Tu())]),Cf(),ko("onToggled")]),GH=nt([Ni({name:"button",overrides:o=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Pt([go.config({toggleClass:o.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:o.onToggled})])})}),Ni({factory:ju,schema:ab(),name:"toolbar",overrides:o=>({toolbarBehaviours:Pt([pe.config({mode:"cyclic",onEscape:s=>(rn(s,o,"button").each(Ie.focus),k.none())})])})})]),ib=Ze(),M7=(o,s)=>{ib.set(!0),ET(o,s),ib.clear()},ET=(o,s)=>{const a=Ve.getCoupled(o,"toolbarSandbox");To.isOpen(a)?To.close(a):To.open(a,s.toolbar())},ey=(o,s,a,c)=>{const d=a.getBounds.map(p=>p()),f=a.lazySink(o).getOrDie();oa.positionWithinBounds(f,s,{anchor:{type:"hotspot",hotspot:o,layouts:c,overrides:{maxWidthFunction:$p()}}},d)},N7=(o,s,a,c,d)=>{ju.setGroups(s,d),ey(o,s,a,c),go.on(o)},qH=(o,s,a)=>{const c=n7(),d=(p,y)=>{const C=ib.get().getOr(!1);a.fetch().get(_=>{N7(o,y,a,s.layouts,_),c.link(o.element),C||pe.focusIn(y)})},f=()=>{go.off(o),ib.get().getOr(!1)||Ie.focus(o),c.unlink(o.element)};return{dom:{tag:"div",attributes:{id:c.id}},behaviours:Pt([pe.config({mode:"special",onEscape:p=>(To.close(p),k.some(!0))}),To.config({onOpen:d,onClose:f,isPartOf:(p,y,C)=>Sf(y,C)||Sf(o,C),getAttachPoint:()=>a.lazySink(o).getOrDie()}),na.config({channels:{..._T({isExtraPart:Fo,...a.fireDismissalEventInstead.map(p=>({fireEventInstead:{event:p.event}})).getOr({})}),...TS({doReposition:()=>{To.getState(Ve.getCoupled(o,"toolbarSandbox")).each(p=>{ey(o,p,a,s.layouts)})}})}})])}},eg=Wa({name:"FloatingToolbarButton",factory:(o,s,a,c)=>({...Ks.sketch({...c.button(),action:d=>{ET(d,c)},buttonBehaviours:zl.augment({dump:c.button().buttonBehaviours},[Ve.config({others:{toolbarSandbox:d=>qH(d,a,o)}})])}),apis:{setGroups:(d,f)=>{To.getState(Ve.getCoupled(d,"toolbarSandbox")).each(p=>{N7(d,p,o,a.layouts,f)})},reposition:d=>{To.getState(Ve.getCoupled(d,"toolbarSandbox")).each(f=>{ey(d,f,o,a.layouts)})},toggle:d=>{ET(d,c)},toggleWithoutFocusing:d=>{M7(d,c)},getToolbar:d=>To.getState(Ve.getCoupled(d,"toolbarSandbox")),isOpen:d=>To.isOpen(Ve.getCoupled(d,"toolbarSandbox"))}}),configFields:jH(),partFields:GH(),apis:{setGroups:(o,s,a)=>{o.setGroups(s,a)},reposition:(o,s)=>{o.reposition(s)},toggle:(o,s)=>{o.toggle(s)},toggleWithoutFocusing:(o,s)=>{o.toggleWithoutFocusing(s)},getToolbar:(o,s)=>o.getToolbar(s),isOpen:(o,s)=>o.isOpen(s)}}),P7=nt([at("prefix","form-field"),pr("fieldBehaviours",[Rt,ne])]),KH=nt([Xr({schema:[At("dom")],name:"label"}),Xr({factory:{sketch:o=>({uid:o.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:o.text}})},schema:[At("text")],name:"aria-descriptor"}),Lr({factory:{sketch:o=>{const s=r2(o,["factory"]);return o.factory.sketch(s)}},schema:[At("factory")],name:"field"})]),YH=(o,s,a,c)=>{const d=zr(o.fieldBehaviours,[Rt.config({find:y=>rn(y,o,"field")}),ne.config({store:{mode:"manual",getValue:y=>Rt.getCurrent(y).bind(ne.getValue),setValue:(y,C)=>{Rt.getCurrent(y).each(_=>{ne.setValue(_,C)})}}})]),f=Rn([vn((y,C)=>{const _=Ou(y,o,["label","field","aria-descriptor"]);_.field().each(A=>{const O=ee(o.prefix);_.label().each(M=>{Ee(M.element,"for",O),Ee(A.element,"id",O)}
78),_["aria-descriptor"]().each(M=>{const I=ee(o.prefix);Ee(M.element,"id",I),Ee(A.element,"aria-describedby",I)})})})]),p={getField:y=>rn(y,o,"field"),getLabel:y=>rn(y,o,"label")};return{uid:o.uid,dom:o.dom,components:s,behaviours:d,events:f,apis:p}},ro=Wa({name:"FormField",configFields:P7(),partFields:KH(),factory:YH,apis:{getField:(o,s)=>o.getField(s),getLabel:(o,s)=>o.getLabel(s)}}),XH=nt([at("field1Name","field1"),at("field2Name","field2"),kd("onLockedChange"),vo(["lockClass"]),at("locked",!1),zl.field("coupledFieldBehaviours",[Rt,ne]),dn("onInput",q)]),JH=(o,s,a)=>rn(o,s,a).bind(Rt.getCurrent),I7=(o,s)=>Lr({factory:ro,name:o,overrides:a=>({fieldBehaviours:Pt([Me("coupled-input-behaviour",[vt(Lc(),c=>{JH(c,a,s).each(d=>{rn(c,a,"lock").each(f=>{go.isOn(f)&&a.onLockedChange(c,d,f),a.onInput(c)})})})])])})}),QH=nt([I7("field1","field2"),I7("field2","field1"),Lr({factory:Ks,schema:[At("dom")],name:"lock",overrides:o=>({buttonBehaviours:Pt([go.config({selected:o.locked,toggleClass:o.markers.lockClass,aria:{mode:"pressed"}})])})})]),tz=(o,s,a,c)=>({uid:o.uid,dom:o.dom,components:s,behaviours:zl.augment(o.coupledFieldBehaviours,[Rt.config({find:k.some}),ne.config({store:{mode:"manual",getValue:d=>{const f=Q1(d,o,["field1","field2"]);return{[o.field1Name]:ne.getValue(f.field1()),[o.field2Name]:ne.getValue(f.field2())}},setValue:(d,f)=>{const p=Q1(d,o,["field1","field2"]);Do(f,o.field1Name)&&ne.setValue(p.field1(),f[o.field1Name]),Do(f,o.field2Name)&&ne.setValue(p.field2(),f[o.field2Name])}}})]),apis:{getField1:d=>rn(d,o,"field1"),getField2:d=>rn(d,o,"field2"),getLock:d=>rn(d,o,"lock")}}),ds=Wa({name:"FormCoupledInputs",configFields:XH(),partFields:QH(),factory:tz,apis:{getField1:(o,s)=>o.getField1(s),getField2:(o,s)=>o.getField2(s),getLock:(o,s)=>o.getLock(s)}}),ez=(o,s)=>{const a=pt(o.options,d=>({dom:{tag:"option",value:d.value,innerHtml:d.text}})),c=o.data.map(d=>_d("initialValue",d)).getOr({});return{uid:o.uid,dom:{tag:"select",classes:o.selectClasses,attributes:o.selectAttributes},components:a,behaviours:zr(o.selectBehaviours,[Ie.config({}),ne.config({store:{mode:"manual",getValue:d=>si(d.element),setValue:(d,f)=>{const p=Xo(o.options);xt(o.options,C=>C.value===f).isSome()?hd(d.element,f):d.element.dom.selectedIndex===-1&&f===""&&p.each(C=>hd(d.element,C.value))},...c}})])}},TT=pc({name:"HtmlSelect",configFields:[At("options"),pr("selectBehaviours",[Ie,ne]),at("selectClasses",[]),at("selectAttributes",{}),Uo("data")],factory:ez}),$7=(o,s,a,c,d)=>{const f=()=>o.lazySink(s),p=c.type==="horizontal"?{layouts:{onLtr:()=>T2(),onRtl:()=>r0()}}:{},y=_=>_.length===2,C=_=>y(_)?p:{};return ph.sketch({dom:{tag:"div"},data:c.data,markers:c.menu.markers,highlightOnOpen:c.menu.highlightOnOpen,fakeFocus:c.menu.fakeFocus,onEscape:()=>(To.close(s),o.onEscape.map(_=>_(s)),k.some(!0)),onExecute:()=>k.some(!0),onOpenMenu:(_,A)=>{oa.positionWithinBounds(f().getOrDie(),A,a,d())},onOpenSubmenu:(_,A,O,M)=>{const I=f().getOrDie();oa.position(I,O,{anchor:{type:"submenu",item:A,...C(M)}})},onRepositionMenu:(_,A,O)=>{const M=f().getOrDie();oa.positionWithinBounds(M,A,a,d()),It(O,I=>{const L=C(I.triggeringPath);oa.position(M,I.triggeredMenu,{anchor:{type:"submenu",item:I.triggeringItem,...L}})})}})},oz=(o,s)=>{const a=(M,I)=>o.getRelated(M).exists(W=>Sf(W,I)),c=(M,I)=>{To.setContent(M,I)},d=(M,I,L)=>{const W=k.none;f(M,I,L,W)},f=(M,I,L,W)=>{const j=o.lazySink(M).getOrDie();To.openWhileCloaked(M,I,()=>oa.positionWithinBounds(j,M,L,W())),ne.setValue(M,k.some({mode:"position",config:L,getBounds:W}))},p=(M,I,L)=>{y(M,I,L,k.none)},y=(M,I,L,W)=>{const j=$7(o,M,I,L,W);To.open(M,j),ne.setValue(M,k.some({mode:"menu",menu:j}))},C=M=>{To.isOpen(M)&&(ne.setValue(M,k.none()),To.close(M))},_=M=>To.getState(M),A=M=>{To.isOpen(M)&&ne.getValue(M).each(I=>{switch(I.mode){case"menu":To.getState(M).each(ph.repositionMenus);break;case"position":const L=o.lazySink(M).getOrDie();oa.positionWithinBounds(L,M,I.config,I.getBounds());break}})},O={setContent:c,showAt:d,showWithinBounds:f,showMenuAt:p,showMenuWithinBounds:y,hide:C,getContent:_,reposition:A,isOpen:To.isOpen};return{uid:o.uid,dom:o.dom,behaviours:zr(o.inlineBehaviours,[To.config({isPartOf:(M,I,L)=>
vendor: 4,104 bytes, lines 78-79
78Sf(I,L)||a(M,L),getAttachPoint:M=>o.lazySink(M).getOrDie(),onOpen:M=>{o.onShow(M)},onClose:M=>{o.onHide(M)}}),ne.config({store:{mode:"memory",initialValue:k.none()}}),na.config({channels:{..._T({isExtraPart:s.isExtraPart,...o.fireDismissalEventInstead.map(M=>({fireEventInstead:{event:M.event}})).getOr({})}),...TS({...o.fireRepositionEventInstead.map(M=>({fireEventInstead:{event:M.event}})).getOr({}),doReposition:A})}})]),eventOrder:o.eventOrder,apis:O}},jn=pc({name:"InlineView",configFields:[At("lazySink"),ko("onShow"),ko("onHide"),rc("onEscape"),pr("inlineBehaviours",[To,ne,na]),xa("fireDismissalEventInstead",[at("event",Tu())]),xa("fireRepositionEventInstead",[at("event",pw())]),at("getRelated",k.none),at("isExtraPart",Fo),at("eventOrder",k.none)],factory:oz,apis:{showAt:(o,s,a,c)=>{o.showAt(s,a,c)},showWithinBounds:(o,s,a,c,d)=>{o.showWithinBounds(s,a,c,d)},showMenuAt:(o,s,a,c)=>{o.showMenuAt(s,a,c)},showMenuWithinBounds:(o,s,a,c,d)=>{o.showMenuWithinBounds(s,a,c,d)},hide:(o,s)=>{o.hide(s)},isOpen:(o,s)=>o.isOpen(s),getContent:(o,s)=>o.getContent(s),setContent:(o,s,a)=>{o.setContent(s,a)},reposition:(o,s)=>{o.reposition(s)}}}),DT=nt([Zn("type","text"),Uo("data"),at("inputAttributes",{}),at("inputStyles",{}),at("tag","input"),at("inputClasses",[]),ko("onSetValue"),dn("fromInputValue",eo),dn("toInputValue",eo),at("styles",{}),at("eventOrder",{}),pr("inputBehaviours",[ne,Ie]),at("selectOnFocus",!0)]),L7=o=>Pt([Ie.config({onFocus:o.selectOnFocus?s=>{const a=s.element,c=si(a);o.type!=="range"&&a.dom.setSelectionRange(0,c.length)}:q})]),nz=o=>({...L7(o),...zr(o.inputBehaviours,[ne.config({store:{mode:"manual",...o.data.map(s=>({initialValue:s})).getOr({}),getValue:s=>o.fromInputValue(si(s.element)),setValue:(s,a)=>{si(s.element)!==a&&hd(s.element,o.toInputValue(a))}},onSetValue:o.onSetValue})])}),OT=o=>({tag:o.tag,attributes:{type:o.type,...o.inputAttributes},styles:o.inputStyles,classes:o.inputClasses}),H7=(o,s)=>({uid:o.uid,dom:OT(o),components:[],behaviours:nz(o),eventOrder:o.eventOrder}),qd=pc({name:"Input",configFields:DT(),factory:H7}),RT=Ad(fT(),pT()),sz=(o,s)=>{const a=ir(o,"id").fold(()=>{const c=ee("dialog-label");return Ee(s,"id",c),c},eo);Ee(o,"aria-labelledby",a)},rz=nt([At("lazySink"),Uo("dragBlockClass"),dn("getBounds",Sr),at("useTabstopAt",_e),at("firstTabstop",0),at("eventOrder",{}),pr("modalBehaviours",[pe]),Ha("onExecute"),Sp("onEscape")]),RS={sketch:eo},BT=nt([Xr({name:"draghandle",overrides:(o,s)=>({behaviours:Pt([Xm.config({mode:"mouse",getTarget:a=>ec(a,'[role="dialog"]').getOr(a),blockerClass:o.dragBlockClass.getOrDie(new Error(`The drag blocker class was not specified for a dialog with a drag handle: 79`+JSON.stringify(s,null,2)).message),getBounds:o.getDragBounds})])})}),Lr({schema:[At("dom")],name:"title"}),Lr({factory:RS,schema:[At("dom")],name:"close"}),Lr({factory:RS,schema:[At("dom")],name:"body"}),Xr({factory:RS,schema:[At("dom")],name:"footer"}),Ni({factory:{sketch:(o,s)=>({...o,dom:s.dom,components:s.components})},schema:[at("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),at("components",[])],name:"blocker"})]),az=(o,s,a,c)=>{const d=Ze(),f=L=>{d.set(L);const W=o.lazySink(L).getOrDie(),j=c.blocker(),V=W.getSystem().build({...j,components:j.components.concat([h(L)]),behaviours:Pt([Ie.config({}),Me("dialog-blocker-events",[af(ac(),()=>{ot.isBlocked(L)?q():pe.focusIn(L)})])])});Pu(W,V),pe.focusIn(L)},p=L=>{d.clear(),ga(L.element).each(W=>{L.getSystem().getByDom(W).each(j=>{$u(j)})})},y=L=>Vc(L,o,"body"),C=L=>rn(L,o,"footer"),_=(L,W)=>{ot.block(L,W)},A=L=>{ot.unblock(L)},O=ee("modal-events"),M={...o.eventOrder,[Hc()]:[O].concat(o.eventOrder["alloy.system.attached"]||[])},I=Cr();return{uid:o.uid,dom:o.dom,components:s,apis:{show:f,hide:p,getBody:y,getFooter:C,setIdle:A,setBusy:_},eventOrder:M,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:zr(o.modalBehaviours,[ze.config({}),pe.config({mode:"cyclic",onEnter:o.onExecute,onEscape:o.onEscape,useTabstopAt:o.useTabstopAt,firstTabstop:o.firstTabstop}),ot.config({getRoot:d.get}),Me(O,[vn(L=>
79{const W=Vc(L,o,"title").element,j=kk(W);I.os.isMacOS()&&$n(j)?Ee(L.element,"aria-label",j):sz(L.element,W)})])])}},Ys=Wa({name:"ModalDialog",configFields:rz(),partFields:BT(),factory:az,apis:{show:(o,s)=>{o.show(s)},hide:(o,s)=>{o.hide(s)},getBody:(o,s)=>o.getBody(s),getFooter:(o,s)=>o.getFooter(s),setBusy:(o,s,a)=>{o.setBusy(s,a)},setIdle:(o,s)=>{o.setIdle(s)}}}),iz=Xr({schema:[At("dom")],name:"label"}),Ef=o=>Xr({name:""+o+"-edge",overrides:s=>s.model.manager.edgeActions[o].fold(()=>({}),c=>({events:Rn([sf(La(),(d,f,p)=>c(d,p),[s]),sf(va(),(d,f,p)=>c(d,p),[s]),sf(Vg(),(d,f,p)=>{p.mouseIsDown.get()&&c(d,p)},[s])])}))}),cz=Ef("top-left"),lz=Ef("top"),z7=Ef("top-right"),V7=Ef("right"),uz=Ef("bottom-right"),dz=Ef("bottom"),mz=Ef("bottom-left"),$i=Ef("left"),Wl=Lr({name:"thumb",defaults:nt({dom:{styles:{position:"absolute"}}}),overrides:o=>({events:Rn([Bl(La(),o,"spectrum"),Bl(as(),o,"spectrum"),Bl(Sd(),o,"spectrum"),Bl(va(),o,"spectrum"),Bl(Vg(),o,"spectrum"),Bl(F1(),o,"spectrum")])})}),oy=o=>Nd(o.event),FT=Lr({schema:[qr("mouseIsDown",()=>fe(!1))],name:"spectrum",overrides:o=>{const a=o.model.manager,c=(d,f)=>a.getValueFromEvent(f).map(p=>a.setValueFrom(d,o,p));return{behaviours:Pt([pe.config({mode:"special",onLeft:(d,f)=>a.onLeft(d,o,oy(f)),onRight:(d,f)=>a.onRight(d,o,oy(f)),onUp:(d,f)=>a.onUp(d,o,oy(f)),onDown:(d,f)=>a.onDown(d,o,oy(f))}),gn.config({}),Ie.config({})]),events:Rn([vt(La(),c),vt(as(),c),vt(va(),c),vt(Vg(),(d,f)=>{o.mouseIsDown.get()&&c(d,f)})])}}});var MT=[iz,$i,V7,lz,dz,cz,z7,mz,uz,Wl,FT];const ny=nt("slider.change.value"),U7=o=>o.type.indexOf("touch")!==-1,hh=o=>{const s=o.event.raw;if(U7(s)){const a=s;return a.touches!==void 0&&a.touches.length===1?k.some(a.touches[0]).map(c=>Jo(c.clientX,c.clientY)):k.none()}else{const a=s;return a.clientX!==void 0?k.some(a).map(c=>Jo(c.clientX,c.clientY)):k.none()}},gz="top",BS="right",PT="bottom",W7="left",Gu=o=>o.model.minX,bh=o=>o.model.minY,FS=o=>o.model.minX-1,xc=o=>o.model.minY-1,Rr=o=>o.model.maxX,qu=o=>o.model.maxY,Sa=o=>o.model.maxX+1,MS=o=>o.model.maxY+1,fn=(o,s,a)=>s(o)-a(o),IT=o=>fn(o,Rr,Gu),Ku=o=>fn(o,qu,bh),cb=o=>IT(o)/2,$T=o=>Ku(o)/2,Af=(o,s)=>s?o.stepSize*o.speedMultiplier:o.stepSize,NS=o=>o.snapToGrid,Z7=o=>o.snapStart,PS=o=>o.rounded,IS=(o,s)=>o[s+"-edge"]!==void 0,LT=o=>IS(o,W7),HT=o=>IS(o,BS),$S=o=>IS(o,gz),zT=o=>IS(o,PT),Zl=o=>o.model.value.get(),Tf=(o,s)=>({x:o,y:s}),jl=(o,s)=>{be(o,ny(),{value:s})},fz=(o,s)=>{jl(o,Tf(FS(s),xc(s)))},pz=(o,s)=>{jl(o,xc(s))},hz=(o,s)=>{jl(o,Tf(cb(s),xc(s)))},j7=(o,s)=>{jl(o,Tf(Sa(s),xc(s)))},bz=(o,s)=>{jl(o,Sa(s))},xz=(o,s)=>{jl(o,Tf(Sa(s),$T(s)))},G7=(o,s)=>{jl(o,Tf(Sa(s),MS(s)))},vz=(o,s)=>{jl(o,MS(s))},q7=(o,s)=>{jl(o,Tf(cb(s),MS(s)))},sy=(o,s)=>{jl(o,Tf(FS(s),MS(s)))},yz=(o,s)=>{jl(o,FS(s))},Cz=(o,s)=>{jl(o,Tf(FS(s),$T(s)))},LS=(o,s,a,c)=>o<s?o:o>a?a:o===s?s-1:Math.max(s,o-c),HS=(o,s,a,c)=>o>a?o:o<s?s:o===a?a+1:Math.min(a,o+c),zS=(o,s,a)=>Math.max(s,Math.min(a,o)),K7=(o,s,a,c,d)=>d.fold(()=>{const f=o-s,p=Math.round(f/c)*c;return zS(s+p,s-1,a+1)},f=>{const p=(o-f)%c,y=Math.round(p/c),C=Math.floor((o-f)/c),_=Math.floor((a-f)/c),A=Math.min(_,C+y),O=f+A*c;return Math.max(f,O)}),wz=(o,s,a)=>Math.min(a,Math.max(o,s))-s,Y7=o=>{const{min:s,max:a,range:c,value:d,step:f,snap:p,snapStart:y,rounded:C,hasMinEdge:_,hasMaxEdge:A,minBound:O,maxBound:M,screenRange:I}=o,L=_?s-1:s,W=A?a+1:a;if(d<O)return L;if(d>M)return W;{const j=wz(d,O,M),V=zS(j/I*c+s,L,W);return p&&V>=s&&V<=a?K7(V,s,a,f,y):C?Math.round(V):V}},X7=o=>{const{min:s,max:a,range:c,value:d,hasMinEdge:f,hasMaxEdge:p,maxBound:y,maxOffset:C,centerMinEdge:_,centerMaxEdge:A}=o;return d<s?f?0:_:d>a?p?y:A:(d-s)/c*C},VT="top",J7="right",Q7="bottom",VS="left",Gl="width",_z="height",ql=o=>o.element.dom.getBoundingClientRect(),tl=(o,s)=>o[s],ry=o=>{const s=ql(o);return tl(s,VS)},tB=o=>{const s=ql(o);return tl(s,J7)},ay=o=>{const s=ql(o);return tl(s,VT)},UT=o=>{const s=ql(o);return tl(s,Q7)},WT=o=>{const s=ql(o);return tl(s,Gl)},eB=o=>{const s=ql(o);return tl(s,_z)},oB=(o,s,a)=>(o+s)/2-a,nB=(o,s)=>{const a=ql(o),c=ql(s),d=tl(a,VS),f=tl(a,J7),p=tl(c,VS);return oB(d,f,p)},sB=(o,s)=>
79{const a=ql(o),c=ql(s),d=tl(a,VT),f=tl(a,Q7),p=tl(c,VT);return oB(d,f,p)},US=(o,s)=>{be(o,ny(),{value:s})},ZT=(o,s,a)=>{const c={min:Gu(s),max:Rr(s),range:IT(s),value:a,step:Af(s),snap:NS(s),snapStart:Z7(s),rounded:PS(s),hasMinEdge:LT(s),hasMaxEdge:HT(s),minBound:ry(o),maxBound:tB(o),screenRange:WT(o)};return Y7(c)},Sz=(o,s,a)=>{const c=ZT(o,s,a);return US(o,c),c},rB=(o,s)=>{const a=Gu(s);US(o,a)},aB=(o,s)=>{const a=Rr(s);US(o,a)},iB=(o,s,a,c)=>{const f=(o>0?HS:LS)(Zl(a),Gu(a),Rr(a),Af(a,c));return US(s,f),k.some(f)},jT=o=>(s,a,c)=>iB(o,s,a,c).map(_e),kz=o=>hh(o).map(a=>a.left),Ez=(o,s,a,c,d)=>{const p=WT(o),y=c.bind(A=>k.some(nB(A,o))).getOr(0),C=d.bind(A=>k.some(nB(A,o))).getOr(p),_={min:Gu(s),max:Rr(s),range:IT(s),value:a,hasMinEdge:LT(s),hasMaxEdge:HT(s),minBound:ry(o),maxBound:tB(o),maxOffset:p,centerMinEdge:y,centerMaxEdge:C};return X7(_)},GT=(o,s,a,c,d,f)=>{const p=Ez(s,f,a,c,d);return ry(s)-ry(o)+p},cB=(o,s,a,c)=>{const d=Zl(a),f=GT(o,c.getSpectrum(o),d,c.getLeftEdge(o),c.getRightEdge(o),a),p=Ir(s.element)/2;Be(s.element,"left",f-p+"px")},lb=jT(-1),WS=jT(1),Az=k.none,lB=k.none,uB={"top-left":k.none(),top:k.none(),"top-right":k.none(),right:k.some(bz),"bottom-right":k.none(),bottom:k.none(),"bottom-left":k.none(),left:k.some(yz)};var dB=Object.freeze({__proto__:null,setValueFrom:Sz,setToMin:rB,setToMax:aB,findValueOfOffset:ZT,getValueFromEvent:kz,findPositionOfValue:GT,setPositionFromValue:cB,onLeft:lb,onRight:WS,onUp:Az,onDown:lB,edgeActions:uB});const iy=(o,s)=>{be(o,ny(),{value:s})},cy=(o,s,a)=>{const c={min:bh(s),max:qu(s),range:Ku(s),value:a,step:Af(s),snap:NS(s),snapStart:Z7(s),rounded:PS(s),hasMinEdge:$S(s),hasMaxEdge:zT(s),minBound:ay(o),maxBound:UT(o),screenRange:eB(o)};return Y7(c)},qT=(o,s,a)=>{const c=cy(o,s,a);return iy(o,c),c},Tz=(o,s)=>{const a=bh(s);iy(o,a)},Dz=(o,s)=>{const a=qu(s);iy(o,a)},Oz=(o,s,a,c)=>{const f=(o>0?HS:LS)(Zl(a),bh(a),qu(a),Af(a,c));return iy(s,f),k.some(f)},KT=o=>(s,a,c)=>Oz(o,s,a,c).map(_e),mB=o=>hh(o).map(a=>a.top),Rz=(o,s,a,c,d)=>{const p=eB(o),y=c.bind(A=>k.some(sB(A,o))).getOr(0),C=d.bind(A=>k.some(sB(A,o))).getOr(p),_={min:bh(s),max:qu(s),range:Ku(s),value:a,hasMinEdge:$S(s),hasMaxEdge:zT(s),minBound:ay(o),maxBound:UT(o),maxOffset:p,centerMinEdge:y,centerMaxEdge:C};return X7(_)},YT=(o,s,a,c,d,f)=>{const p=Rz(s,f,a,c,d);return ay(s)-ay(o)+p},gB=(o,s,a,c)=>{const d=Zl(a),f=YT(o,c.getSpectrum(o),d,c.getTopEdge(o),c.getBottomEdge(o),a),p=Zs(s.element)/2;Be(s.element,"top",f-p+"px")},Bz=k.none,Fz=k.none,Mz=KT(-1),Nz=KT(1),Pz={"top-left":k.none(),top:k.some(pz),"top-right":k.none(),right:k.none(),"bottom-right":k.none(),bottom:k.some(vz),"bottom-left":k.none(),left:k.none()};var Iz=Object.freeze({__proto__:null,setValueFrom:qT,setToMin:Tz,setToMax:Dz,findValueOfOffset:cy,getValueFromEvent:mB,findPositionOfValue:YT,setPositionFromValue:gB,onLeft:Bz,onRight:Fz,onUp:Mz,onDown:Nz,edgeActions:Pz});const ZS=(o,s)=>{be(o,ny(),{value:s})},ly=(o,s)=>({x:o,y:s}),fB=(o,s,a)=>{const c=ZT(o,s,a.left),d=cy(o,s,a.top),f=ly(c,d);return ZS(o,f),f},$z=(o,s,a,c,d)=>{const f=o>0?HS:LS,p=s?Zl(c).x:f(Zl(c).x,Gu(c),Rr(c),Af(c,d)),y=s?f(Zl(c).y,bh(c),qu(c),Af(c,d)):Zl(c).y;return ZS(a,ly(p,y)),k.some(p)},jS=(o,s)=>(a,c,d)=>$z(o,s,a,c,d).map(_e),Lz=(o,s)=>{const a=Gu(s),c=bh(s);ZS(o,ly(a,c))},pB=(o,s)=>{const a=Rr(s),c=qu(s);ZS(o,ly(a,c))},Hz=o=>hh(o),zz=(o,s,a,c)=>{const d=Zl(a),f=GT(o,c.getSpectrum(o),d.x,c.getLeftEdge(o),c.getRightEdge(o),a),p=YT(o,c.getSpectrum(o),d.y,c.getTopEdge(o),c.getBottomEdge(o),a),y=Ir(s.element)/2,C=Zs(s.element)/2;Be(s.element,"left",f-y+"px"),Be(s.element,"top",p-C+"px")},Vz=jS(-1,!1),GS=jS(1,!1),Uz=jS(-1,!0),Wz=jS(1,!0),Zz={"top-left":k.some(fz),top:k.some(hz),"top-right":k.some(j7),right:k.some(xz),"bottom-right":k.some(G7),bottom:k.some(q7),"bottom-left":k.some(sy),left:k.some(Cz)};var jz=Object.freeze({__proto__:null,setValueFrom:fB,setToMin:Lz,setToMax:pB,getValueFromEvent:Hz,setPositionFromValue:zz,onLeft:Vz,onRight:GS,onUp:Uz,onDown:Wz,edgeActions:Zz});const Gz=[at("stepSize",1),at("speedMultiplier",10),at("onChange",q),at("onChoose",q),at("onInit",q),at("onDragStart",q),at("onDragEnd",q),at("snapToGri
79d",!1),at("rounded",!0),Uo("snapStart"),ha("model",Gr("mode",{x:[at("minX",0),at("maxX",100),qr("value",o=>fe(o.mode.minX)),At("getInitialValue"),$o("manager",dB)],y:[at("minY",0),at("maxY",100),qr("value",o=>fe(o.mode.minY)),At("getInitialValue"),$o("manager",Iz)],xy:[at("minX",0),at("maxX",100),at("minY",0),at("maxY",100),qr("value",o=>fe({x:o.mode.minX,y:o.mode.minY})),At("getInitialValue"),$o("manager",jz)]})),pr("sliderBehaviours",[pe,ne]),qr("mouseIsDown",()=>fe(!1))],Kl=Wa({name:"Slider",configFields:Gz,partFields:MT,factory:(o,s,a,c)=>{const d=dt=>Vc(dt,o,"thumb"),f=dt=>Vc(dt,o,"spectrum"),p=dt=>rn(dt,o,"left-edge"),y=dt=>rn(dt,o,"right-edge"),C=dt=>rn(dt,o,"top-edge"),_=dt=>rn(dt,o,"bottom-edge"),A=o.model,O=A.manager,M=(dt,Wt)=>{O.setPositionFromValue(dt,Wt,o,{getLeftEdge:p,getRightEdge:y,getTopEdge:C,getBottomEdge:_,getSpectrum:f})},I=(dt,Wt)=>{A.value.set(Wt);const kt=d(dt);M(dt,kt)},L=(dt,Wt)=>{I(dt,Wt);const kt=d(dt);return o.onChange(dt,kt,Wt),k.some(!0)},W=dt=>{O.setToMin(dt,o)},j=dt=>{O.setToMax(dt,o)},V=dt=>{const Wt=()=>{rn(dt,o,"thumb").each(Ot=>{const Tt=A.value.get();o.onChoose(dt,Ot,Tt)})},kt=o.mouseIsDown.get();o.mouseIsDown.set(!1),kt&&Wt()},K=(dt,Wt)=>{Wt.stop(),o.mouseIsDown.set(!0),o.onDragStart(dt,d(dt))},tt=(dt,Wt)=>{Wt.stop(),o.onDragEnd(dt,d(dt)),V(dt)},ct=dt=>{rn(dt,o,"spectrum").map(pe.focusIn)};return{uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.sliderBehaviours,[pe.config({mode:"special",focusIn:ct}),ne.config({store:{mode:"manual",getValue:dt=>A.value.get(),setValue:I}}),na.config({channels:{[Mu()]:{onReceive:V}}})]),events:Rn([vt(ny(),(dt,Wt)=>{L(dt,Wt.event.value)}),vn((dt,Wt)=>{const kt=A.getInitialValue();A.value.set(kt);const Ot=d(dt);M(dt,Ot);const Tt=f(dt);o.onInit(dt,Ot,Tt,A.value.get())}),vt(La(),K),vt(Sd(),tt),vt(va(),(dt,Wt)=>{ct(dt),K(dt,Wt)}),vt(F1(),tt)]),apis:{resetToMin:W,resetToMax:j,setValue:I,refresh:M},domModification:{styles:{position:"relative"}}}},apis:{setValue:(o,s,a)=>{o.setValue(s,a)},resetToMin:(o,s)=>{o.resetToMin(s)},resetToMax:(o,s)=>{o.resetToMax(s)},refresh:(o,s)=>{o.refresh(s)}}}),hB="container",qz=[pr("slotBehaviours",[])],bB=o=>"<alloy.field."+o+">",Kz=o=>{const s=(()=>{const f=[];return{slot:(y,C)=>(f.push(y),v2(hB,bB(y),C)),record:nt(f)}})(),a=o(s),c=s.record(),d=pt(c,f=>Lr({name:f,pname:bB(f)}));return hA(hB,qz,d,Yz,a)},Yz=(o,s)=>{const a=W=>ci(o),c=(W,j)=>rn(W,o,j),d=(W,j)=>(V,K)=>rn(V,o,K).map(tt=>W(tt,K)).getOr(j),f=W=>(j,V)=>{It(V,K=>W(j,K))},p=(W,j)=>Ws(W.element,"aria-hidden")!=="true",y=(W,j)=>{if(!p(W)){const V=W.element;uo(V,"display"),Tn(V,"aria-hidden"),be(W,u2(),{name:j,visible:!0})}},C=(W,j)=>{if(p(W)){const V=W.element;Be(V,"display","none"),Ee(V,"aria-hidden","true"),be(W,u2(),{name:j,visible:!1})}},_=d(p,!1),A=d(C),O=f(A),M=W=>O(W,a()),I=d(y),L={getSlotNames:a,getSlot:c,isShowing:_,hideSlot:A,hideAllSlots:M,showSlot:I};return{uid:o.uid,dom:o.dom,components:s,behaviours:Lv(o.slotBehaviours),apis:L}},Br={...hs({getSlotNames:(o,s)=>o.getSlotNames(s),getSlot:(o,s,a)=>o.getSlot(s,a),isShowing:(o,s,a)=>o.isShowing(s,a),hideSlot:(o,s,a)=>o.hideSlot(s,a),hideAllSlots:(o,s)=>o.hideAllSlots(s),showSlot:(o,s,a)=>o.showSlot(s,a)},o=>Qp(o)),sketch:Kz},Xz=(o,s)=>Zo(o,(d,f)=>s(f,d.len).fold(nt(d),y=>({len:y.finish,list:d.list.concat([y])})),{len:0,list:[]}).list,XT=(o,s,a)=>({within:o,extra:s,withinWidth:a}),xB=(o,s,a)=>{const c=Xz(o,(y,C)=>{const _=a(y);return k.some({element:y,start:C,finish:C+_,width:_})}),d=Io(c,y=>y.finish<=s),f=An(d,(y,C)=>y+C.width,0),p=c.slice(d.length);return{within:d,extra:p,withinWidth:f}},uy=o=>pt(o,s=>s.element),Jz=(o,s,a)=>{const c=uy(o.concat(s));return XT(c,[],a)},Qz=(o,s,a,c)=>{const d=uy(o).concat([a]);return XT(d,uy(s),c)},tV=(o,s,a)=>XT(uy(o),[],a),eV=(o,s,a)=>{const c=xB(s,o,a);return c.extra.length===0?k.some(c):k.none()},oV=(o,s,a,c)=>{const d=eV(o,s,a).getOrThunk(()=>xB(s,o-a(c),a)),f=d.within,p=d.extra,y=d.withinWidth;return p.length===1&&p[0].width<=a(c)?Jz(f,p,y):p.length>=1?Qz(f,p,c,y):tV(f,p,y)},vB=(o,s)=>{const a=pt(s,c=>h(c));ju.setGroups(o,a)},JT=o=>bi(o,s=>Es(s.element).bind(a=>s.getSystem().getByDom(a).toOptional())),yB=(o,s,a)=>{const c=s.builtGroups.get();if(c.length===0)return;const d=Vc(o,s,"primary"),f=Ve.getCoupled(o,"overflowGroup");Be(d.element,"visibility","hidden");const p=c.concat([f]),y=JT(p);a([]),vB(d,p);const C=Ir(d.element),_=oV(C,s.builtGroups.get(),A=>Math.ceil(A.element.dom.getBoundingClientRect().width),f);_.extra.length===0?(ze.remove(d,f),a([])):(vB(d,_.within),a(_.extra)),uo(d.element,"visibility"),tc(d.element),y.each(Ie.focu
vendor: 8,603 bytes, line 79
79s)},CB=nt([pr("splitToolbarBehaviours",[Ve]),qr("builtGroups",()=>fe([]))]),nV=nt([vo(["overflowToggledClass"]),rc("getOverflowBounds"),At("lazySink"),qr("overflowGroups",()=>fe([])),ko("onOpened"),ko("onClosed")].concat(CB())),sV=nt([Lr({factory:ju,schema:ab(),name:"primary"}),Ni({schema:ab(),name:"overflow"}),Ni({name:"overflow-button"}),Ni({name:"overflow-group"})]),rV=nt([At("items"),vo(["itemSelector"]),pr("tgroupBehaviours",[pe])]),aV=nt([Y1({name:"items",unit:"item"})]),iV=(o,s,a,c)=>({uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.tgroupBehaviours,[pe.config({mode:"flow",selector:o.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}),qS=Wa({name:"ToolbarGroup",configFields:rV(),partFields:aV(),factory:iV}),wB=o=>pt(o,s=>h(s)),_B=(o,s,a)=>{yB(o,a,c=>{a.overflowGroups.set(c),s.getOpt(o).each(d=>{eg.setGroups(d,wB(c))})})},cV=(o,s,a,c)=>{const d=Mo(eg.sketch({fetch:()=>cs.nu(f=>{f(wB(o.overflowGroups.get()))}),layouts:{onLtr:()=>[vs,Os],onRtl:()=>[Os,vs],onBottomLtr:()=>[Qs,fr],onBottomRtl:()=>[fr,Qs]},getBounds:a.getOverflowBounds,lazySink:o.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:o.markers.overflowToggledClass},parts:{button:c["overflow-button"](),toolbar:c.overflow()},onToggled:(f,p)=>o[p?"onOpened":"onClosed"](f)}));return{uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.splitToolbarBehaviours,[Ve.config({others:{overflowGroup:()=>qS.sketch({...c["overflow-group"](),items:[d.asSpec()]})}})]),apis:{setGroups:(f,p)=>{o.builtGroups.set(pt(p,f.getSystem().build)),_B(f,d,o)},refresh:f=>_B(f,d,o),toggle:f=>{d.getOpt(f).each(p=>{eg.toggle(p)})},toggleWithoutFocusing:f=>{d.getOpt(f).each(eg.toggleWithoutFocusing)},isOpen:f=>d.getOpt(f).map(eg.isOpen).getOr(!1),reposition:f=>{d.getOpt(f).each(p=>{eg.reposition(p)})},getOverflow:f=>d.getOpt(f).bind(eg.getToolbar)},domModification:{attributes:{role:"group"}}}},SB=Wa({name:"SplitFloatingToolbar",configFields:nV(),partFields:sV(),factory:cV,apis:{setGroups:(o,s,a)=>{o.setGroups(s,a)},refresh:(o,s)=>{o.refresh(s)},reposition:(o,s)=>{o.reposition(s)},toggle:(o,s)=>{o.toggle(s)},toggleWithoutFocusing:(o,s)=>{o.toggle(s)},isOpen:(o,s)=>o.isOpen(s),getOverflow:(o,s)=>o.getOverflow(s)}}),lV=nt([vo(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),ko("onOpened"),ko("onClosed")].concat(CB())),uV=nt([Lr({factory:ju,schema:ab(),name:"primary"}),Lr({factory:ju,schema:ab(),name:"overflow",overrides:o=>({toolbarBehaviours:Pt([_a.config({dimension:{property:"height"},closedClass:o.markers.closedClass,openClass:o.markers.openClass,shrinkingClass:o.markers.shrinkingClass,growingClass:o.markers.growingClass,onShrunk:s=>{rn(s,o,"overflow-button").each(a=>{go.off(a)}),o.onClosed(s)},onGrown:s=>{o.onOpened(s)},onStartGrow:s=>{rn(s,o,"overflow-button").each(go.on)}}),pe.config({mode:"acyclic",onEscape:s=>(rn(s,o,"overflow-button").each(Ie.focus),k.some(!0))})])})}),Ni({name:"overflow-button",overrides:o=>({buttonBehaviours:Pt([go.config({toggleClass:o.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),Ni({name:"overflow-group"})]),dV=(o,s)=>rn(o,s,"overflow").map(_a.hasGrown).getOr(!1),dy=(o,s,a)=>{rn(o,s,"overflow-button").each(c=>{rn(o,s,"overflow").each(d=>{if(QT(o,s),_a.hasShrunk(d)){const f=s.onOpened;s.onOpened=p=>{a||pe.focusIn(d),f(p),s.onOpened=f}}else{const f=s.onClosed;s.onClosed=p=>{a||Ie.focus(c),f(p),s.onClosed=f}}_a.toggleGrow(d)})})},QT=(o,s)=>{rn(o,s,"overflow").each(a=>{yB(o,s,c=>{const d=pt(c,f=>h(f));ju.setGroups(a,d)}),rn(o,s,"overflow-button").each(c=>{_a.hasGrown(a)&&go.on(c)}),_a.refresh(a)})},mV=(o,s,a,c)=>{const d="alloy.toolbar.toggle",f=(p,y)=>{const C=pt(y,p.getSystem().build);o.builtGroups.set(C)};return{uid:o.uid,dom:o.dom,components:s,behaviours:zr(o.splitToolbarBehaviours,[Ve.config({others:{overflowGroup:p=>qS.sketch({...c["overflow-group"](),items:[Ks.sketch({...c["overflow-button"](),action:y=>{no(p,d)}})]})}}),Me("toolbar-toggle-events",[vt(d,p=>{dy(p,o,!1)})])]),apis:{setGroups:(p,y)=>{f(p,y),QT(p,o)},refresh:p=>QT(p,o),toggle:p=>{dy(p,o,!1)},toggleWithoutFocusing:p=>{dy(p,o,!0)},isOpen:p=>dV(p,o)},domModification:{attributes:{role:"group"}}}},t5=Wa({name:"SplitSlidingToolbar",configFields:lV(),partFields:uV(),factory:mV,apis:{setGroups:(o,s,a)=>{o.setGroups(s,a)},refresh:(o,s)=>{o.refresh(s)},toggle:(o,s)=>{o.toggle(s)},isOpen:(o,s)=>o.isOpen(s)}}),my=(o,s)=>({uid:o.uid,dom:o.dom,components:o.components,events:cT(o.action),behaviours:zr(o.tabButtonBehaviours,[Ie.config({}),pe.config({mode:"execution",useSpace:!0,useEnter:!0}),ne.config({store:{mode:"memory",initialValue:o.value}})]),domModification:o.domModification}),kB=pc({name:"TabButton",configFields:[at("uid",void 0),At("value"),Gs("dom","dom",Su(()=>({attributes:{role:"tab",id:ee("aria"),"aria-selected":"false"}})),Oi()),Uo("action"),at("domModification",{}),pr("tabButtonBehaviours",[Ie,pe,ne]),At("view")],factory:my}),gV=nt([At("tabs"),At("dom"),at("clickToDismiss",!1),pr("tabbarBehaviours",[Bo,pe]),vo(["tabClass","selectedClass"])]),fV=Y1({factory:kB,name:"tabs",unit:"tab",overrides:o=>{const s=(c,d)=>{Bo.dehighlight(c,d),be(c,H1(),{tabbar:c,button:d})},a=(c,d)=>{Bo.highlight(c,d),be(c,d2(),{tabbar:c,button:d})};return{action:c=>{const d=c.getSystem().getByUid(o.uid).getOrDie(),f=Bo.isHighlighted(d,c);(f&&o.clickToDismiss?s:f?q:a)(d,c)},domModification:{classes:[o.markers.tabClass]}}}}),EB=nt([fV]),pV=(o,s,a,c)=>({uid:o.uid,dom:o.dom,components:s,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:zr(o.tabbarBehaviours,[Bo.config({highlightClass:o.markers.selectedClass,itemClass:o.markers.tabClass,onHighlight:(d,f)=>{Ee(f.element,"aria-selected","true")},onDehighlight:(d,f)=>{Ee(f.element,"aria-selected","false")}}),pe.config({mode:"flow",getInitial:d=>Bo.getHighlighted(d).map(f=>f.element),selector:"."+o.markers.tabClass,executeOnMove:!0})])}),AB=Wa({name:"Tabbar",configFields:gV(),partFields:EB(),factory:pV}),hV=(o,s)=>({uid:o.uid,dom:o.dom,behaviours:zr(o.tabviewBehaviours,[ze.config({})]),domModification:{attributes:{role:"tabpanel"}}}),bV=pc({name:"Tabview",configFields:[pr("tabviewBehaviours",[ze])],factory:hV}),xV=nt([at("selectFirst",!0),ko("onChangeTab"),ko("onDismissTab"),at("tabs",[]),pr("tabSectionBehaviours",[])]),vV=Lr({factory:AB,schema:[At("dom"),Al("markers",[At("tabClass"),At("selectedClass")])],name:"tabbar",defaults:o=>({tabs:o.tabs})}),yV=Lr({factory:bV,name:"tabview"}),CV=nt([vV,yV]),TB=(o,s,a,c)=>{const d=p=>{const y=ne.getValue(p);rn(p,o,"tabview").each(C=>{xt(o.tabs,A=>A.value===y).each(A=>{const O=A.view();ir(p.element,"id").each(M=>{Ee(C.element,"aria-labelledby",M)}),ze.set(C,O),o.onChangeTab(C,p,O)})})},f=(p,y)=>{rn(p,o,"tabbar").each(C=>{y(C).each(nf)})};return{uid:o.uid,dom:o.dom,components:s,behaviours:Lv(o.tabSectionBehaviours),events:Rn(wt([o.selectFirst?[vn((p,y)=>{f(p,Bo.getFirst)})]:[],[vt(d2(),(p,y)=>{const C=y.event.button;d(C)}),vt(H1(),(p,y)=>{const C=y.event.button;o.onDismissTab(p,C)})]])),apis:{getViewItems:p=>rn(p,o,"tabview").map(y=>ze.contents(y)).getOr([]),showTab:(p,y)=>{f(p,_=>{const A=Bo.getCandidates(_);return xt(A,M=>ne.getValue(M)===y).filter(M=>!Bo.isHighlighted(_,M))})}}}},xh=Wa({name:"TabSection",configFields:xV(),partFields:CV(),factory:TB,apis:{getViewItems:(o,s)=>o.getViewItems(s),showTab:(o,s,a)=>{o.showTab(s,a)}}}),KS=(o,s,a)=>{const c=ne.getValue(a);ne.setValue(s,c),o5(s)},e5=(o,s)=>{const a=o.element,c=si(a),d=a.dom;Ws(a,"type")!=="number"&&s(d,c)},o5=o=>{e5(o,(s,a)=>s.setSelectionRange(a.length,a.length))},DB=(o,s)=>{e5(o,(a,c)=>a.setSelectionRange(s,c.length))},OB=(o,s,a)=>{if(o.selectsOver){const c=ne.getValue(s),d=o.getDisplayText(c),f=ne.getValue(a);return o.getDisplayText(f).indexOf(d)===0?k.some(()=>{KS(o,s,a),DB(s,d.length)}):k.none()}else return k.none()},n5=nt("alloy.typeahead.itemexecute"),wV=(o,s,a,c)=>{const d=(O,M,I)=>{o.previewing.set(!1);const L=Ve.getCoupled(O,"sandbox");if(To.isOpen(L))Rt.getCurrent(L).each(W=>{Bo.getHighlighted(W).fold(()=>{I(W)},()=>{B2(L,W.element,"keydown",M)})});else{const W=j=>{Rt.getCurrent(j).each(I)};DS(o,p(O),O,L,c,W,Ar.HighlightMenuAndItem).get(q)}},f=L7(o),p=O=>M=>M.map(I=>{const L=id(I.menus),W=Y(L,V=>Io(V.items,K=>K.type==="item"));return ne.getState(O).update(pt(W,V=>V.data)),I}),y=O=>Rt.getCurrent(O),C="typeaheadevents",_=[Ie.config({}),ne.config({onSetValue:o.onSetValue,store:{mode:"dataset",getDataKey:O=>si(O.element),getFallbackEntry:O=>({value:O,meta:{}}),setValue:(O,M)=>{hd(O.element,o.model.getDisplayText(M))},...o.initialData.map(O=>_d("initialValue",O)).getOr({})}}
vendor: 8,343 bytes, line 79
79),sb.config({stream:{mode:"throttle",delay:o.responseTime,stopEvent:!1},onStream:(O,M)=>{const I=Ve.getCoupled(O,"sandbox");if(Ie.isFocused(O)&&si(O.element).length>=o.minChars){const W=y(I).bind(V=>Bo.getHighlighted(V).map(ne.getValue));o.previewing.set(!0);const j=V=>{y(I).each(K=>{W.fold(()=>{o.model.selectsOver&&Bo.highlightFirst(K)},tt=>{Bo.highlightBy(K,ct=>ne.getValue(ct).value===tt.value),Bo.getHighlighted(K).orThunk(()=>(Bo.highlightFirst(K),k.none()))})})};DS(o,p(O),O,I,c,j,Ar.HighlightJustMenu).get(q)}},cancelEvent:$1()}),pe.config({mode:"special",onDown:(O,M)=>(d(O,M,Bo.highlightFirst),k.some(!0)),onEscape:O=>{const M=Ve.getCoupled(O,"sandbox");return To.isOpen(M)?(To.close(M),k.some(!0)):k.none()},onUp:(O,M)=>(d(O,M,Bo.highlightLast),k.some(!0)),onEnter:O=>{const M=Ve.getCoupled(O,"sandbox"),I=To.isOpen(M);if(I&&!o.previewing.get())return y(M).bind(L=>Bo.getHighlighted(L)).map(L=>(be(O,n5(),{item:L}),!0));{const L=ne.getValue(O);return no(O,$1()),o.onExecute(M,O,L),I&&To.close(M),k.some(!0)}}}),go.config({toggleClass:o.markers.openClass,aria:{mode:"expanded"}}),Ve.config({others:{sandbox:O=>O7(o,O,{onOpen:()=>go.on(O),onClose:()=>{o.lazyTypeaheadComp.get().each(M=>Tn(M.element,"aria-activedescendant")),go.off(O)}})}}),Me(C,[vn(O=>{o.lazyTypeaheadComp.set(k.some(O))}),dc(O=>{o.lazyTypeaheadComp.set(k.none())}),Md(O=>{const M=q;OS(o,p(O),O,c,M,Ar.HighlightMenuAndItem).get(q)}),vt(n5(),(O,M)=>{const I=Ve.getCoupled(O,"sandbox");KS(o.model,O,M.event.item),no(O,$1()),o.onItemExecute(O,I,M.event.item,ne.getValue(O)),To.close(I),o5(O)})].concat(o.dismissOnBlur?[vt(Wg(),O=>{const M=Ve.getCoupled(O,"sandbox");Es(M.element).isNone()&&To.close(M)})]:[]))],A={[Mi()]:[ne.name(),sb.name(),C],...o.eventOrder};return{uid:o.uid,dom:OT(kn(o,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...f,...zr(o.typeaheadBehaviours,_)},eventOrder:A}},_V=nt([Uo("lazySink"),At("fetch"),at("minChars",5),at("responseTime",1e3),ko("onOpen"),at("getHotspot",k.some),at("getAnchorOverrides",nt({})),at("layouts",k.none()),at("eventOrder",{}),wd("model",{},[at("getDisplayText",o=>o.meta!==void 0&&o.meta.text!==void 0?o.meta.text:o.value),at("selectsOver",!0),at("populateFromBrowse",!0)]),ko("onSetValue"),Ha("onExecute"),ko("onItemExecute"),at("inputClasses",[]),at("inputAttributes",{}),at("inputStyles",{}),at("matchWidth",!0),at("useMinWidth",!1),at("dismissOnBlur",!0),vo(["openClass"]),Uo("initialData"),Uo("listRole"),pr("typeaheadBehaviours",[Ie,ne,sb,pe,go,Ve]),qr("lazyTypeaheadComp",()=>fe(k.none)),qr("previewing",()=>fe(!0))].concat(DT()).concat(ST())),SV=nt([Ni({schema:[yw()],name:"menu",overrides:o=>({fakeFocus:!0,onHighlightItem:(s,a,c)=>{o.previewing.get()?o.lazyTypeaheadComp.get().each(d=>{OB(o.model,d,c).fold(()=>{o.model.selectsOver?(Bo.dehighlight(a,c),o.previewing.set(!0)):o.previewing.set(!1)},f=>{f(),o.previewing.set(!1)})}):o.lazyTypeaheadComp.get().each(d=>{o.model.populateFromBrowse&&KS(o.model,d,c),ir(c.element,"id").each(f=>Ee(d.element,"aria-activedescendant",f))})},onExecute:(s,a)=>o.lazyTypeaheadComp.get().map(c=>(be(c,n5(),{item:a}),!0)),onHover:(s,a)=>{o.previewing.set(!1),o.lazyTypeaheadComp.get().each(c=>{o.model.populateFromBrowse&&KS(o.model,c,a)})}})})]),s5=Wa({name:"Typeahead",configFields:_V(),partFields:SV(),factory:wV});var RB=tinymce.util.Tools.resolve("tinymce.ThemeManager"),YS=tinymce.util.Tools.resolve("tinymce.util.Delay"),ub=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),kV=tinymce.util.Tools.resolve("tinymce.EditorManager"),db=tinymce.util.Tools.resolve("tinymce.Env"),vc;(function(o){o.default="wrap",o.floating="floating",o.sliding="sliding",o.scrolling="scrolling"})(vc||(vc={}));var mb;(function(o){o.auto="auto",o.top="top",o.bottom="bottom"})(mb||(mb={}));const tn=o=>s=>s.options.get(o),gb=o=>s=>k.from(o(s)),BB=o=>{const s=db.deviceType.isPhone(),a=db.deviceType.isTablet()||s,c=o.options.register,d=p=>$e(p)||p===!1,f=p=>$e(p)||la(p);c("skin",{processor:p=>$e(p)||p===!1,default:"oxide"}),c("skin_url",{processor:"string"}),c("height",{processor:f,default:Math.max(o.getElement().offsetHeight,400)}),c("width",{processor:f,default:ub.DOM.getStyle(o.getElement(),"width")}),c("min_height",{processor:"number",default:100}),c("min_width",{processor:"number"}),c("max_height",{processor:"number"}),c("max_width",{processor:"number"}),c("style_formats",{processor:"object[]"}),c("style_formats_merge",{processor:"boolean",default:!1}),c("style_formats_autohide",{processor:"boolean",default:!1}),c("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),c("font_family_formats",{processor:"string",default:"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"}),c("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),c("font_size_input_default_unit",{processor:"string",default:"pt"}),c("block_formats",{processor:"string",default:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre"}),c("content_langs",{processor:"object[]"}),c("removed_menuitems",{processor:"string",default:""}),c("menubar",{processor:p=>$e(p)||Ta(p),default:!s}),c("menu",{processor:"object",default:{}}),c("toolbar",{processor:p=>Ta(p)||$e(p)||ca(p)?{value:p,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),te(9,p=>{c("toolbar"+(p+1),{processor:"string"})}),c("toolbar_mode",{processor:"string",default:a?"scrolling":"floating"}),c("toolbar_groups",{processor:"object",default:{}}),c("toolbar_location",{processor:"string",default:mb.auto}),c("toolbar_persist",{processor:"boolean",default:!1}),c("toolbar_sticky",{processor:"boolean",default:o.inline}),c("toolbar_sticky_offset",{processor:"number",default:0}),c("fixed_toolbar_container",{processor:"string",default:""}),c("fixed_toolbar_container_target",{processor:"object"}),c("ui_mode",{processor:"string",default:"combined"}),c("file_picker_callback",{processor:"function"}),c("file_picker_validator_handler",{processor:"function"}),c("file_picker_types",{processor:"string"}),c("typeahead_urls",{processor:"boolean",default:!0}),c("anchor_top",{processor:d,default:"#top"}),c("anchor_bottom",{processor:d,default:"#bottom"}),c("draggable_modal",{processor:"boolean",default:!1}),c("statusbar",{processor:"boolean",default:!0}),c("elementpath",{processor:"boolean",default:!0}),c("branding",{processor:"boolean",default:!0}),c("promotion",{processor:"boolean",default:!0}),c("resize",{processor:p=>p==="both"||Ta(p),default:!db.deviceType.isTouch()}),c("sidebar_show",{processor:"string"}),c("help_accessibility",{processor:"boolean",default:o.hasPlugin("help")}),c("default_font_stack",{processor:"string[]",default:[]})},FB=tn("readonly"),XS=tn("disabled"),r5=tn("height"),a5=tn("width"),i5=gb(tn("min_width")),c5=gb(tn("min_height")),JS=gb(tn("max_width")),l5=gb(tn("max_height")),MB=gb(tn("style_formats")),NB=tn("style_formats_merge"),u5=tn("style_formats_autohide"),PB=tn("content_langs"),IB=tn("removed_menuitems"),vh=tn("toolbar_mode"),$B=tn("toolbar_groups"),d5=tn("toolbar_location"),QS=tn("fixed_toolbar_container"),LB=tn("fixed_toolbar_container_target"),HB=tn("toolbar_persist"),zB=tn("toolbar_sticky_offset"),VB=tn("menubar"),t3=tn("toolbar"),UB=tn("file_picker_callback"),WB=tn("file_picker_validator_handler"),e3=tn("font_size_input_default_unit"),m5=tn("file_picker_types"),g5=tn("typeahead_urls"),ZB=tn("anchor_top"),f5=tn("anchor_bottom"),jB=tn("draggable_modal"),GB=tn("statusbar"),qB=tn("elementpath"),p5=tn("branding"),KB=tn("resize"),YB=tn("paste_as_text"),XB=tn("sidebar_show"),JB=tn("promotion"),QB=tn("help_accessibility"),tF=tn("default_font_stack"),gy=tn("skin"),fy=o=>o.options.get("skin")===!1,fb=o=>o.options.get("menubar")!==!1,h5=o=>{const s=o.options.get("skin_url");
79if(fy(o))return s;if(s)return o.documentBaseURI.toAbsolute(s);{const a=o.options.get("skin");return kV.baseURL+"/skins/ui/"+a}},EV=o=>k.from(o.options.get("skin_url")),eF=o=>o.options.get("line_height_formats").split(" "),pb=o=>{const s=t3(o),a=$e(s),c=ca(s)&&s.length>0;return!Df(o)&&(c||a||s===!0)},py=o=>{const s=te(9,c=>o.options.get("toolbar"+(c+1))),a=Io(s,$e);return yi(a.length>0,a)},Df=o=>py(o).fold(()=>{const s=t3(o);return Oa(s,$e)&&s.length>0},_e),o3=o=>d5(o)===mb.bottom,oF=o=>{if(!o.inline)return k.none();const s=QS(o)??"";if(s.length>0)return Ko(ni(),s);const a=LB(o);return $n(a)?k.some(Zt.fromDom(a)):k.none()},hb=o=>o.inline&&oF(o).isSome(),b5=o=>oF(o).getOrThunk(()=>Oc(ks(Zt.fromDom(o.getElement())))),x5=o=>o.inline&&!fb(o)&&!pb(o)&&!Df(o),bb=o=>(o.options.get("toolbar_sticky")||o.inline)&&!hb(o)&&!x5(o),Of=o=>!hb(o)&&o.options.get("ui_mode")==="split",nF=o=>{const s=o.options.get("menu");return hs(s,a=>({...a,items:a.items}))};var AV=Object.freeze({__proto__:null,get ToolbarMode(){return vc},get ToolbarLocation(){return mb},register:BB,getSkinUrl:h5,getSkinUrlOption:EV,isReadOnly:FB,isDisabled:XS,getSkin:gy,isSkinDisabled:fy,getHeightOption:r5,getWidthOption:a5,getMinWidthOption:i5,getMinHeightOption:c5,getMaxWidthOption:JS,getMaxHeightOption:l5,getUserStyleFormats:MB,shouldMergeStyleFormats:NB,shouldAutoHideStyleFormats:u5,getLineHeightFormats:eF,getContentLanguages:PB,getRemovedMenuItems:IB,isMenubarEnabled:fb,isMultipleToolbars:Df,isToolbarEnabled:pb,isToolbarPersist:HB,getMultipleToolbarsOption:py,getUiContainer:b5,useFixedContainer:hb,isSplitUiMode:Of,getToolbarMode:vh,isDraggableModal:jB,isDistractionFree:x5,isStickyToolbar:bb,getStickyToolbarOffset:zB,getToolbarLocation:d5,isToolbarLocationBottom:o3,getToolbarGroups:$B,getMenus:nF,getMenubar:VB,getToolbar:t3,getFilePickerCallback:UB,getFilePickerTypes:m5,useTypeaheadUrls:g5,getAnchorTop:ZB,getAnchorBottom:f5,getFilePickerValidatorHandler:WB,getFontSizeInputDefaultUnit:e3,useStatusBar:GB,useElementPath:qB,promotionEnabled:JB,useBranding:p5,getResize:KB,getPasteAsText:YB,getSidebarShow:XB,useHelpAccessibility:QB,getDefaultFontStack:tF});const TV=["visible","hidden","clip"],sF=o=>oe(o).length>0&&!Go(TV,o),rF=o=>{if(Z(o)){const s=Dn(o,"overflow-x"),a=Dn(o,"overflow-y");return sF(s)||sF(a)}else return!1},aF=o=>o.plugins.fullscreen&&o.plugins.fullscreen.isFullscreen(),DV=(o,s)=>{const a=js(s,rF),c=a.length===0?Jn(s).map(zo).map(d=>js(d,rF)).getOr([]):a;return Xo(c).map(d=>({element:d,others:c.slice(1),isFullscreen:()=>aF(o)}))},og=(o,s)=>Of(o)?DV(o,s):k.none(),yh=o=>{const s=[...pt(o.others,xs),Sr()];return o.isFullscreen()?Sr():Wx(xs(o.element),s)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:iF,setPrototypeOf:Yu,isFrozen:OV,getPrototypeOf:RV,getOwnPropertyDescriptor:v5}=Object;let{freeze:Cn,seal:Yl,create:cF}=Object,{apply:y5,construct:C5}=typeof Reflect<"u"&&Reflect;Cn||(Cn=function(s){return s}),Yl||(Yl=function(s){return s}),y5||(y5=function(s,a,c){return s.apply(a,c)}),C5||(C5=function(s,a){return new s(...a)});const n3=Hi(Array.prototype.forEach),BV=Hi(Array.prototype.lastIndexOf),lF=Hi(Array.prototype.pop),hy=Hi(Array.prototype.push),FV=Hi(Array.prototype.splice),s3=Hi(String.prototype.toLowerCase),w5=Hi(String.prototype.toString),uF=Hi(String.prototype.match),by=Hi(String.prototype.replace),MV=Hi(String.prototype.indexOf),NV=Hi(String.prototype.trim),Xu=Hi(Object.prototype.hasOwnProperty),Li=Hi(RegExp.prototype.test),xy=PV(TypeError);function Hi(o){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var a=arguments.length,c=new Array(a>1?a-1:0),d=1;d<a;d++)c[d-1]=arguments[d];return y5(o,s,c)}}function PV(o){return function(){for(var s=arguments.length,a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];return C5(o,a)}}function wn(o,s){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s3;Yu&&Yu(o,null);let c=s.length;for(;c--;){let d=s[c];if(typeof d=="string"){const f=a(d);f!==d&&(OV(s)||(s[c]=f),d=f)}o[d]=!0}return o}function IV(o){for(let s=0;s<o.length;s++)Xu(o,s)||(o[s]=null);return o}function ng(o){const s=cF(null);for(const[a,c]of iF(o))Xu(o,a)&&(Array.isArray(c)?s[a]=IV(c):c&&typeof c=="object"&&c.constructor===Object?s[a]=ng(c):s[a]=c);return s}function vy(o,s){for(;o!==null;){const c=v5(o,s);if(c){if(c.get)return Hi(c.get);if(typeof c.value=="function")return Hi(c.value)}o=RV(o)}function a(){return null}return a}const dF=Cn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),r3=Cn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_5=Cn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mF=Cn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),S5=Cn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gF=Cn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fF=Cn(["#text"]),k5=Cn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
79spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),E5=Cn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pF=Cn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),a3=Cn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$V=Yl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),LV=Yl(/<%[\w\W]*|[\w\W]*%>/gm),HV=Yl(/\$\{[\w\W]*/gm),zV=Yl(/^data-[\-\w.\u00B7-\uFFFF]+$/),VV=Yl(/^aria-[\-\w]+$/),hF=Yl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UV=Yl(/^(?:\w+script|data):/i),WV=Yl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bF=Yl(/^html$/i),ZV=Yl(/^[a-z][.\w]*(-[.\w]+)+$/i);var A5=Object.freeze({__proto__:null,ARIA_ATTR:VV,ATTR_WHITESPACE:WV,CUSTOM_ELEMENT:ZV,DATA_ATTR:zV,DOCTYPE_NAME:bF,ERB_EXPR:LV,IS_ALLOWED_URI:hF,IS_SCRIPT_OR_DATA:UV,MUSTACHE_EXPR:$V,TMPLIT_EXPR:HV});const yy={element:1,text:3,progressingInstruction:7,comment:8,document:9},jV=function(){return typeof window>"u"?null:window},GV=function(s,a){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let c=null;const d="data-tt-policy-suffix";a&&a.hasAttribute(d)&&(c=a.getAttribute(d));const f="dompurify"+(c?"#"+c:"");try{return s.createPolicy(f,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},xF=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vF(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jV();const s=ao=>vF(ao);if(s.version="3.2.6",s.removed=[],!o||!o.document||o.document.nodeType!==yy.document||!o.Element)return s.isSupported=!1,s;let{document:a}=o;const c=a,d=c.currentScript,{DocumentFragment:f,HTMLTemplateElement:p,Node:y,Element:C,NodeFilter:_,NamedNodeMap:A=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:O,DOMParser:M,trustedTypes:I}=o,L=C.prototype,W=vy(L,"cloneNode"),j=vy(L,"remove"),V=vy(L,"nextSibling"),K=vy(L,"childNodes"),tt=vy(L,"parentNode");if(typeof p=="function"){const ao=a.createElement("template");ao.content&&ao.content.ownerDocument&&(a=ao.content.ownerDocument)}let ct,dt="";const{implementation:Wt,createNodeIterator:kt,createDocumentFragment:Ot,getElementsByTagName:Tt}=a,{importNode:xe}=c;let le=xF();s.isSupported=typeof iF=="function"&&typeof tt=="function"&&Wt&&Wt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Qe,ERB_EXPR:ye,TMPLIT_EXPR:je,DATA_ATTR:ue,ARIA_ATTR:_t,IS_SCRIPT_OR_DATA:Lt,ATTR_WHITESPACE:Ae,CUSTOM_ELEMENT:Ge}=A5;let{IS_ALLOWED_URI:me}=A5,Ue=null;const jo=wn({},[...dF,...r3,..._5,...S5,...fF]);let Eo=null;const Ea=wn({},[...k5,...E5,...pF,...a3]);
vendor: 7,397 bytes, line 79
79let Pn=Object.seal(cF(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),fi=null,xr=null,ra=!0,pi=!0,cl=!1,Vf=!0,sm=!1,Uh=!0,gg=!1,mC=!1,LO=!1,Uf=!1,qb=!1,H4=!1,HO=!0,iL=!1;const TY="user-content-";let z4=!0,gC=!1,eu={},Wh=null;const cL=wn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let fC=null;const Zh=wn({},["audio","video","img","source","image","track"]);let Kb=null;const zO=wn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),jh="http://www.w3.org/1998/Math/MathML",aa="http://www.w3.org/2000/svg",ou="http://www.w3.org/1999/xhtml";let Gh=ou,V4=!1,VO=null;const DY=wn({},[jh,aa,ou],w5);let sd=wn({},["mi","mo","mn","ms","mtext"]),UO=wn({},["annotation-xml"]);const OY=wn({},["title","style","font","a","script"]);let Yb=null;const Xb=["application/xhtml+xml","text/html"],U4="text/html";let ia=null,Jb=null;const RY=a.createElement("form"),lL=function(t){return t instanceof RegExp||t instanceof Function},WO=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Jb&&Jb===t)){if((!t||typeof t!="object")&&(t={}),t=ng(t),Yb=Xb.indexOf(t.PARSER_MEDIA_TYPE)===-1?U4:t.PARSER_MEDIA_TYPE,ia=Yb==="application/xhtml+xml"?w5:s3,Ue=Xu(t,"ALLOWED_TAGS")?wn({},t.ALLOWED_TAGS,ia):jo,Eo=Xu(t,"ALLOWED_ATTR")?wn({},t.ALLOWED_ATTR,ia):Ea,VO=Xu(t,"ALLOWED_NAMESPACES")?wn({},t.ALLOWED_NAMESPACES,w5):DY,Kb=Xu(t,"ADD_URI_SAFE_ATTR")?wn(ng(zO),t.ADD_URI_SAFE_ATTR,ia):zO,fC=Xu(t,"ADD_DATA_URI_TAGS")?wn(ng(Zh),t.ADD_DATA_URI_TAGS,ia):Zh,Wh=Xu(t,"FORBID_CONTENTS")?wn({},t.FORBID_CONTENTS,ia):cL,fi=Xu(t,"FORBID_TAGS")?wn({},t.FORBID_TAGS,ia):ng({}),xr=Xu(t,"FORBID_ATTR")?wn({},t.FORBID_ATTR,ia):ng({}),eu=Xu(t,"USE_PROFILES")?t.USE_PROFILES:!1,ra=t.ALLOW_ARIA_ATTR!==!1,pi=t.ALLOW_DATA_ATTR!==!1,cl=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Vf=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,sm=t.SAFE_FOR_TEMPLATES||!1,Uh=t.SAFE_FOR_XML!==!1,gg=t.WHOLE_DOCUMENT||!1,Uf=t.RETURN_DOM||!1,qb=t.RETURN_DOM_FRAGMENT||!1,H4=t.RETURN_TRUSTED_TYPE||!1,LO=t.FORCE_BODY||!1,HO=t.SANITIZE_DOM!==!1,iL=t.SANITIZE_NAMED_PROPS||!1,z4=t.KEEP_CONTENT!==!1,gC=t.IN_PLACE||!1,me=t.ALLOWED_URI_REGEXP||hF,Gh=t.NAMESPACE||ou,sd=t.MATHML_TEXT_INTEGRATION_POINTS||sd,UO=t.HTML_INTEGRATION_POINTS||UO,Pn=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&lL(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Pn.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&lL(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Pn.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Pn.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),sm&&(pi=!1),qb&&(Uf=!0),eu&&(Ue=wn({},fF),Eo=[],eu.html===!0&&(wn(Ue,dF),wn(Eo,k5)),eu.svg===!0&&(wn(Ue,r3),wn(Eo,E5),wn(Eo,a3)),eu.svgFilters===!0&&(wn(Ue,_5),wn(Eo,E5),wn(Eo,a3)),eu.mathMl===!0&&(wn(Ue,S5),wn(Eo,pF),wn(Eo,a3))),t.ADD_TAGS&&(Ue===jo&&(Ue=ng(Ue)),wn(Ue,t.ADD_TAGS,ia)),t.ADD_ATTR&&(Eo===Ea&&(Eo=ng(Eo)),wn(Eo,t.ADD_ATTR,ia)),t.ADD_URI_SAFE_ATTR&&wn(Kb,t.ADD_URI_SAFE_ATTR,ia),t.FORBID_CONTENTS&&(Wh===cL&&(Wh=ng(Wh)),wn(Wh,t.FORBID_CONTENTS,ia)),z4&&(Ue["#text"]=!0),gg&&wn(Ue,["html","head","body"]),Ue.table&&(wn(Ue,["tbody"]),delete fi.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw xy('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xy('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ct=t.TRUSTED_TYPES_POLICY,dt=ct.createHTML("")}else ct===void 0&&(ct=GV(I,d)),ct!==null&&typeof dt=="string"&&(dt=ct.createHTML(""));Cn&&Cn(t),Jb=t}},qh=wn({},[...r3,..._5,...mF]),BY=wn({},[...S5,...gF]),FY=function(t){let e=tt(t);(!e||!e.tagName)&&(e={namespaceURI:Gh,tagName:"template"});const n=s3(t.tagName),r=s3(e.tagName);return VO[t.namespaceURI]?t.namespaceURI===aa?e.namespaceURI===ou?n==="svg":e.namespaceURI===jh?n==="svg"&&(r==="annotation-xml"||sd[r]):!!qh[n]:t.namespaceURI===jh?e.namespaceURI===ou?n==="math":e.namespaceURI===aa?n==="math"&&UO[r]:!!BY[n]:t.namespaceURI===ou?e.namespaceURI===aa&&!UO[r]||e.namespaceURI===jh&&!sd[r]?!1:!BY[n]&&(OY[n]||!qh[n]):!!(Yb==="application/xhtml+xml"&&VO[t.namespaceURI]):!1},rm=function(t){hy(s.removed,{element:t});try{tt(t).removeChild(t)}catch{j(t)}},pC=function(t,e){try{hy(s.removed,{attribute:e.getAttributeNode(t),from:e})}catch{hy(s.removed,{attribute:null,from:e})}if(e.removeAttribute(t),t==="is")if(Uf||qb)try{rm(e)}catch{}else try{e.setAttribute(t,"")}catch{}},uL=function(t){let e=null,n=null;if(LO)t="<remove></remove>"+t;else{const u=uF(t,/^[\r\n\t ]+/);n=u&&u[0]}Yb==="application/xhtml+xml"&&Gh===ou&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=ct?ct.createHTML(t):t;if(Gh===ou)try{e=new M().parseFromString(r,Yb)}catch{}if(!e||!e.documentElement){e=Wt.createDocument(Gh,"template",null);try{e.documentElement.innerHTML=V4?dt:r}catch{}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),Gh===ou?Tt.call(e,gg?"html":"body")[0]:gg?e.documentElement:i},dL=function(t){return kt.call(t.ownerDocument||t,t,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT|_.SHOW_PROCESSING_INSTRUCTION|_.SHOW_CDATA_SECTION,null)},Kh=function(t){return t instanceof O&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof A)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},mL=function(t){return typeof y=="function"&&t instanceof y};function fg(ao,t,e){n3(ao,n=>{n.call(s,t,e,Jb)})}const ZO=function(t){let e=null;if(fg(le.beforeSanitizeElements,t,null),Kh(t))return rm(t),!0;const n=ia(t.nodeName);if(fg(le.uponSanitizeElement,t,{tagName:n,allowedTags:Ue}),Uh&&t.hasChildNodes()&&!mL(t.firstElementChild)&&Li(/<[/\w!]/g,t.innerHTML)&&Li(/<[/\w!]/g,t.textContent)||t.nodeType===yy.progressingInstruction||Uh&&t.nodeType===yy.comment&&Li(/<[/\w]/g,t.data))return rm(t),!0;if(!Ue[n]||fi[n]){if(!fi[n]&&MY(n)&&(Pn.tagNameCheck instanceof RegExp&&Li(Pn.tagNameCheck,n)||Pn.tagNameCheck instanceof Function&&Pn.tagNameCheck(n)))return!1;if(z4&&!Wh[n]){const r=tt(t)||t.parentNode,i=K(t)||t.childNodes;if(i&&r){const u=i.length;for(let g=u-1;g>=0;--g){const b=W(i[g],!0);b.__removalCount=(t.__removalCount||0)+1,r.insertBefore(b,V(t))}}}return rm(t),!0}return t instanceof C&&!FY(t)||(n==="noscript"||n==="noembed"||n==="noframes")&&Li(/<\/no(script|embed|frames)/i,t.innerHTML)?(rm(t),!0):(sm&&t.nodeType===yy.text&&(e=t.textContent,n3([Qe,ye,je],r=>{e=by(e,r," ")}),t.textContent!==e&&(hy(s.removed,{element:t.cloneNode()}),t.textContent=e)),fg(le.afterSanitizeElements,t,null),!1)},gL=function(t,e,n){if(HO&&(e==="id"||e==="name")&&(n in a||n in RY))return!1;
79if(!(pi&&!xr[e]&&Li(ue,e))){if(!(ra&&Li(_t,e))){if(!Eo[e]||xr[e]){if(!(MY(t)&&(Pn.tagNameCheck instanceof RegExp&&Li(Pn.tagNameCheck,t)||Pn.tagNameCheck instanceof Function&&Pn.tagNameCheck(t))&&(Pn.attributeNameCheck instanceof RegExp&&Li(Pn.attributeNameCheck,e)||Pn.attributeNameCheck instanceof Function&&Pn.attributeNameCheck(e))||e==="is"&&Pn.allowCustomizedBuiltInElements&&(Pn.tagNameCheck instanceof RegExp&&Li(Pn.tagNameCheck,n)||Pn.tagNameCheck instanceof Function&&Pn.tagNameCheck(n))))return!1}else if(!Kb[e]){if(!Li(me,by(n,Ae,""))){if(!((e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&MV(n,"data:")===0&&fC[t])){if(!(cl&&!Li(Lt,by(n,Ae,"")))){if(n)return!1}}}}}}return!0},MY=function(t){return t!=="annotation-xml"&&uF(t,Ge)},ll=function(t){fg(le.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Kh(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Eo,forceKeepAttr:void 0};let r=e.length;for(;r--;){const i=e[r],{name:u,namespaceURI:g,value:b}=i,x=ia(u),w=b;let E=u==="value"?w:NV(w);if(n.attrName=x,n.attrValue=E,n.keepAttr=!0,n.forceKeepAttr=void 0,fg(le.uponSanitizeAttribute,t,n),E=n.attrValue,iL&&(x==="id"||x==="name")&&(pC(u,t),E=TY+E),Uh&&Li(/((--!?|])>)|<\/(style|title)/i,E)){pC(u,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){pC(u,t);continue}if(!Vf&&Li(/\/>/i,E)){pC(u,t);continue}sm&&n3([Qe,ye,je],R=>{E=by(E,R," ")});const D=ia(t.nodeName);if(!gL(D,x,E)){pC(u,t);continue}if(ct&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!g)switch(I.getAttributeType(D,x)){case"TrustedHTML":{E=ct.createHTML(E);break}case"TrustedScriptURL":{E=ct.createScriptURL(E);break}}if(E!==w)try{g?t.setAttributeNS(g,u,E):t.setAttribute(u,E),Kh(t)?rm(t):lF(s.removed)}catch{pC(u,t)}}fg(le.afterSanitizeAttributes,t,null)},W4=function ao(t){let e=null;const n=dL(t);for(fg(le.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)fg(le.uponSanitizeShadowNode,e,null),ZO(e),ll(e),e.content instanceof f&&ao(e.content);fg(le.afterSanitizeShadowDOM,t,null)};return s.sanitize=function(ao){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,n=null,r=null,i=null;if(V4=!ao,V4&&(ao="<!-->"),typeof ao!="string"&&!mL(ao))if(typeof ao.toString=="function"){if(ao=ao.toString(),typeof ao!="string")throw xy("dirty is not a string, aborting")}else throw xy("toString is not a function");if(!s.isSupported)return ao;if(mC||WO(t),s.removed=[],typeof ao=="string"&&(gC=!1),gC){if(ao.nodeName){const b=ia(ao.nodeName);if(!Ue[b]||fi[b])throw xy("root node is forbidden and cannot be sanitized in-place")}}else if(ao instanceof y)e=uL("<!---->"),n=e.ownerDocument.importNode(ao,!0),n.nodeType===yy.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?e=n:e.appendChild(n);else{if(!Uf&&!sm&&!gg&&ao.indexOf("<")===-1)return ct&&H4?ct.createHTML(ao):ao;if(e=uL(ao),!e)return Uf?null:H4?dt:""}e&&LO&&rm(e.firstChild);const u=dL(gC?ao:e);for(;r=u.nextNode();)ZO(r),ll(r),r.content instanceof f&&W4(r.content);if(gC)return ao;if(Uf){if(qb)for(i=Ot.call(e.ownerDocument);e.firstChild;)i.appendChild(e.firstChild);else i=e;return(Eo.shadowroot||Eo.shadowrootmode)&&(i=xe.call(c,i,!0)),i}let g=gg?e.outerHTML:e.innerHTML;return gg&&Ue["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&Li(bF,e.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+e.ownerDocument.doctype.name+`> 80`+g),sm&&n3([Qe,ye,je],b=>{g=by(g,b," ")}),ct&&H4?ct.createHTML(g):g},s.setConfig=function(){let ao=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};WO(ao),mC=!0},s.clearConfig=function(){Jb=null,mC=!1},s.isValidAttribute=function(ao,t,e){Jb||WO({});const n=ia(ao),r=ia(t);return gL(n,r,e)},s.addHook=function(ao,t){typeof t=="function"&&hy(le[ao],t)},s.removeHook=function(ao,t){if(t!==void 0){const e=BV(le[ao],t);return e===-1?void 0:FV(le[ao],e,1)[0]}return lF(le[ao])},s.removeHooks=function(ao){le[ao]=[]},s.removeAllHooks=function(){le=xF()},s}var T5=vF();const Cy=o=>T5().sanitize(o);var sa=tinymce.util.Tools.resolve("tinymce.util.I18n");const i3={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-disc":!0,"list-bull-default":!0,"list-bull-square":!0},yF="temporary-placeholder",D5=o=>()=>he(o,yF).getOr("!not found!"),O5=(o,s)=>{const a=o.toLowerCase();if(sa.isRtl()){const c=SC(a,"-rtl");return nn(s,c)?c:a}else return a},CF=(o,s)=>he(s,O5(o,s)),qV=(o,s)=>{const a=s();return CF(o,a).getOrThunk(D5(a))},c3=(o,s,a)=>{const c=s();return CF(o,c).or(a).getOrThunk(D5(c))},xb=o=>sa.isRtl()?nn(i3,o):!1,R5=()=>Me("add-focusable",[vn(o=>{fd(o.element,"svg").each(s=>
80Ee(s,"focusable","false"))})]),B5=(o,s,a,c)=>{const d=xb(s)?["tox-icon--flip"]:[],f=he(a,O5(s,a)).or(c).getOrThunk(D5(a));return{dom:{tag:o.tag,attributes:o.attributes??{},classes:o.classes.concat(d),innerHtml:f},behaviours:Pt([...o.behaviours??[],R5()]),eventOrder:o.eventOrder??{}}},yc=(o,s,a,c=k.none())=>B5(s,o,a(),c),KV=(o,s,a)=>{const c=a(),d=xt(o,f=>nn(c,O5(f,c)));return B5(s,d.getOr(yF),c,k.none())},YV={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},F5=pc({name:"Notification",factory:o=>{const s=ee("notification-text"),a=Mo({dom:Zu(`<p id=${s}>${Cy(o.backstageProvider.translate(o.text))}</p>`),behaviours:Pt([ze.config({})])}),c=L=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${L}%`}}}),d=L=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${L}%`}}),f=Mo({dom:{tag:"div",classes:o.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[c(0)]},d(0)],behaviours:Pt([ze.config({})])}),C={updateProgress:(L,W)=>{L.getSystem().isConnected()&&f.getOpt(L).each(j=>{ze.set(j,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[c(W)]},d(W)])})},updateText:(L,W)=>{if(L.getSystem().isConnected()){const j=a.get(L);ze.set(j,[En(W)])}}},_=wt([o.icon.toArray(),[o.level],k.from(YV[o.level]).toArray()]),A=Mo(Ks.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":o.backstageProvider.translate("Close")}},components:[yc("close",{tag:"span",classes:["tox-icon"]},o.iconProvider)],buttonBehaviours:Pt([gn.config({}),yn.config({...o.backstageProvider.tooltips.getConfig({tooltipText:o.backstageProvider.translate("Close")})})]),action:L=>{o.onAction(L)}})),O=KV(_,{tag:"div",classes:["tox-notification__icon"]},o.iconProvider),M={dom:{tag:"div",classes:["tox-notification__body"]},components:[a.asSpec()],behaviours:Pt([ze.config({})])},I=[O,M];return{uid:o.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":s},classes:["tox-notification","tox-notification--in",`tox-notification--${o.level}`]},behaviours:Pt([gn.config({}),Ie.config({}),pe.config({mode:"special",onEscape:L=>(o.onAction(L),k.some(!0))})]),components:I.concat(o.progress?[f.asSpec()]:[]).concat([A.asSpec()]),apis:C}},configFields:[Kr("level","info",["success","error","warning","warn","info"]),At("progress"),Uo("icon"),At("onAction"),At("text"),At("iconProvider"),At("backstageProvider")],apis:{updateProgress:(o,s,a)=>{o.updateProgress(s,a)},updateText:(o,s,a)=>{o.updateText(s,a)}}});var XV=(o,s,a,c)=>{const d=s.backstage.shared,f=()=>Zt.fromDom(o.queryCommandValue("ToggleView")===""?o.getContentAreaContainer():o.getContainer()),p=()=>{const O=xs(f());return k.some(O)},y=O=>{p().each(M=>{It(O,I=>{uo(I.element,"width"),Ir(I.element)>M.width&&Be(I.element,"width",M.width+"px")})})};return{open:(O,M,I)=>{const L=()=>{const tt=kt=>{ze.remove(kt,j),V()},ct=(kt,Ot)=>{Dc(kt.element).length===0?dt(kt,Ot):Wt(kt,Ot)},dt=(kt,Ot)=>{jn.hide(kt),c.clear(),Ot&&o.focus()},Wt=(kt,Ot)=>{Ot&&pe.focusIn(kt)};c.on(kt=>{M();const Ot=I();tt(kt),ct(kt,Ot)})},W=()=>!bb(o)||!d.header.isPositionedAtTop(),j=m(F5.sketch({text:O.text,level:Go(["success","error","warning","warn","info"],O.type)?O.type:void 0,progress:O.progressBar===!0,icon:O.icon,onAction:L,iconProvider:d.providers.icons,backstageProvider:d.providers}));if(c.isSet()){const tt=h(j);c.on(ct=>{ze.append(ct,tt),jn.reposition(ct),j.hasConfigured(Nn)&&Nn.refresh(ct),y(ct.components())})}else{const tt=m(jn.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:d.getSink,fireDismissalEventInstead:{},...d.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Pt([pe.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),ze.config({}),...W()?[Nn.config({contextual:{lazyContext:()=>k.some(xs(f())),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:kt=>og(o,kt.element).map(Tt=>({bounds:yh(Tt),optScrollEnv:k.some({currentScrollTop:Tt.element.dom.scrollTop,scrollElmTop:Ma(Tt.element).top})})).getOrThunk(()=>({bounds:Sr(),optScrollEnv:k.none()}))})]:[]])}
80)),ct=h(j),dt={maxHeightFunction:Im()},Wt={...d.anchors.banner(),overrides:dt};c.set(tt),a.add(tt),jn.showWithinBounds(tt,ct,{anchor:Wt},p)}la(O.timeout)&&O.timeout>0&&YS.setEditorTimeout(o,()=>{L()},O.timeout);const V=()=>{c.on(tt=>{jn.reposition(tt),tt.hasConfigured(Nn)&&Nn.refresh(tt),y(tt.components())})};return{close:L,reposition:V,text:tt=>{F5.updateText(j,tt)},settings:O,getEl:()=>j.element.dom,progressBar:{value:tt=>{F5.updateProgress(j,tt)}}}},close:O=>{O.close()},getArgs:O=>O.settings}};const JV={setup:(o,s)=>{const a=(d,f)=>{be(d,qs(),{raw:f})},c=()=>o.getMenu().bind(Bo.getHighlighted);s.on("keydown",d=>{const f=d.which;o.isActive()&&(o.isMenuOpen()?f===13?(c().each(nf),d.preventDefault()):f===40?(c().fold(()=>{o.getMenu().each(Bo.highlightFirst)},p=>{a(p,d)}),d.preventDefault(),d.stopImmediatePropagation()):(f===37||f===38||f===39)&&c().each(p=>{a(p,d),d.preventDefault(),d.stopImmediatePropagation()}):(f===13||f===38||f===40)&&o.cancelIfNecessary())}),s.on("NodeChange",()=>{o.isActive()&&!o.isProcessingAction()&&!s.queryCommandState("mceAutoCompleterInRange")&&o.cancelIfNecessary()})}};var M5;(function(o){o[o.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",o[o.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"})(M5||(M5={}));var Xl=M5;const N5="tox-menu-nav__js",wy="tox-collection__item",Rf="tox-swatch",Ch={normal:N5,color:Rf},P5="tox-collection__item--enabled",wF="tox-collection__group-heading",I5="tox-collection__item-icon",l3="tox-collection__item-image",QV="tox-collection__item-image-selector",sg="tox-collection__item-label",wh="tox-collection__item-accessory",_F="tox-collection__item-caret",tU="tox-collection__item-checkmark",_h="tox-collection__item--active",SF="tox-collection__item-container",eU="tox-collection__item-container--column",kF="tox-collection__item-container--row",oU="tox-collection__item-container--align-right",nU="tox-collection__item-container--align-left",u3="tox-collection__item-container--valign-top",EF="tox-collection__item-container--valign-middle",sU="tox-collection__item-container--valign-bottom",$5=o=>he(Ch,o).getOr(N5),rU=o=>o==="color"?"tox-swatches":"tox-menu",L5=o=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:rU(o),tieredMenu:"tox-tiered-menu"}),Kd=o=>{const s=L5(o);return{backgroundMenu:s.backgroundMenu,selectedMenu:s.selectedMenu,menu:s.menu,selectedItem:s.selectedItem,item:$5(o)}},fX=(o,s,a)=>{const c=L5(a);return{tag:"div",classes:wt([[c.menu,`tox-menu-${s}-column`],o?[c.hasIcons]:[]])}},H5=[tg.parts.items({})],_y=(o,s,a)=>{const c=L5(a);return{dom:{tag:"div",classes:wt([[c.tieredMenu]])},markers:Kd(a)}},AF=ee("refetch-trigger-event"),TF=ee("redirect-menu-item-interaction"),DF="tox-menu__searcher",Sy=o=>Ko(o.element,`.${DF}`).bind(s=>o.getSystem().getByDom(s).toOptional()),OF=Sy,aU=(o,s)=>{ne.setValue(o,s.fetchPattern),o.element.dom.selectionStart=s.selectionStart,o.element.dom.selectionEnd=s.selectionEnd},z5=o=>{const s=ne.getValue(o),a=o.element.dom.selectionStart,c=o.element.dom.selectionEnd;return{fetchPattern:s,selectionStart:a,selectionEnd:c}},RF=(o,s)=>{ir(s.element,"id").each(a=>Ee(o.element,"aria-activedescendant",a))},iU=o=>{const s=(d,f)=>(f.cut(),k.none()),a=(d,f)=>{const p={interactionEvent:f.event,eventType:f.event.raw.type};return be(d,TF,p),k.some(!0)},c="searcher-events";return{dom:{tag:"div",classes:[wy]},components:[qd.sketch({inputClasses:[DF,"tox-textfield"],inputAttributes:{...o.placeholder.map(d=>({placeholder:o.i18n(d)})).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:Pt([Me(c,[vt(Lc(),d=>{no(d,AF)}),vt(qs(),(d,f)=>{f.event.raw.key==="Escape"&&f.stop()})]),pe.config({mode:"special",onLeft:s,onRight:s,onSpace:s,onEnter:a,onEscape:a,onUp:a,onDown:a})]),eventOrder:{keydown:[c,pe.name()]}})]}},d3="tox-collection--results__js",ky=o=>o.dom?{...o,dom:{...o.dom,attributes:{...o.dom.attributes??{},id:ee("aria-item-search-result-id"),"aria-selected":"false"}}}:o,V5="Use arrow keys to navigate.",U5=(o,s)=>a=>{const c=Pe(a,s);return pt(c,d=>({dom:o,components:d}))},W5=o=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"],attributes:{"aria-label":sa.translate(V5
80)}},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[tg.parts.items({preprocess:o!=="auto"?U5({tag:"div",classes:["tox-swatches__row"]},o):eo})]}]}),cU=o=>({dom:{tag:"div",classes:["tox-menu","tox-image-selector-menu"]},components:[{dom:{tag:"div",classes:["tox-image-selector"]},components:[tg.parts.items({preprocess:o!=="auto"?U5({tag:"div",classes:["tox-image-selector__row"]},o):eo})]}]}),Z5=o=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[tg.parts.items({preprocess:U5({tag:"div",classes:["tox-collection__group"]},o)})]}),BF=(o,s)=>{const a=[];let c=[];return It(o,(d,f)=>{s(d,f)?(c.length>0&&a.push(c),c=[],(nn(d.dom,"innerHtml")||d.components&&d.components.length>0)&&c.push(d)):c.push(d)}),c.length>0&&a.push(c),pt(a,d=>({dom:{tag:"div",classes:["tox-collection__group"]},components:d}))},j5=(o,s,a)=>tg.parts.items({preprocess:c=>{const d=pt(c,a);return o!=="auto"&&o>1?U5({tag:"div",classes:["tox-collection__group"]},o)(d):BF(d,(f,p)=>s[p].type==="separator")}}),FF=o=>ps(o,s=>s.type==="widget"),G5=(o,s,a=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(o===1?["tox-collection--list"]:["tox-collection--grid"]),attributes:{...FF(s)?{"aria-label":sa.translate(V5)}:{}}},components:[j5(o,s,eo)]}),MF=(o,s,a=!0)=>{const c=ee("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",d3].concat(o===1?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:c}},components:[j5(o,s,ky)]}},rg=(o,s,a)=>{const c=ee("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(o===1?["tox-collection--list"]:["tox-collection--grid"])},components:[iU({i18n:sa.translate,placeholder:a.placeholder}),{dom:{tag:"div",classes:[...o===1?["tox-collection--list"]:["tox-collection--grid"],d3],attributes:{id:c}},components:[j5(o,s,ky)]}]}},Sh=(o,s=!0)=>({dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[tg.parts.items({preprocess:a=>BF(a,(c,d)=>o[d].type==="separator")})]}),Ey=o=>ps(o,s=>"icon"in s&&s.icon!==void 0),Ju=o=>(console.error($g(o)),console.log(o),k.none()),NF=(o,s,a,c,d)=>{const f=Sh(a);return{value:o,dom:f.dom,components:f.components,items:a}},q5=(o,s,a,c,d)=>{const f=()=>d.menuType!=="searchable"?G5(c,a):d.searchMode.searchMode==="search-with-field"?rg(c,a,d.searchMode):MF(c,a);if(d.menuType==="color"){const p=W5(c);return{value:o,dom:p.dom,components:p.components,items:a}}else if(d.menuType==="imageselector"&&c!=="auto"){const p=cU(c);return{value:o,dom:p.dom,components:p.components,items:a}}else if(d.menuType==="normal"&&c==="auto"){const p=G5(c,a);return{value:o,dom:p.dom,components:p.components,items:a}}else if(d.menuType==="normal"||d.menuType==="searchable"){const p=f();return{value:o,dom:p.dom,components:p.components,items:a}}else if(d.menuType==="listpreview"&&c!=="auto"){const p=Z5(c);return{value:o,dom:p.dom,components:p.components,items:a}}else return{value:o,dom:fX(s,c,d.menuType),components:H5,items:a}},os=Kn("type"),K5=Kn("name"),m3=Kn("label"),ag=Kn("text"),PF=Kn("title"),Y5=Kn("icon"),lU=Kn("url"),vb=Kn("value"),uU=$a("fetch"),dU=$a("getSubmenuItems"),Bf=$a("onAction"),mU=$a("onItemAction"),kh=dn("onSetup",()=>q),gU=Yn("name"),ig=Yn("text"),fU=Yn("role"),el=Yn("icon"),Eh=Yn("tooltip"),IF=Yn("chevronTooltip"),Ay=Yn("label"),X5=Yn("shortcut"),pU=rc("select"),yb=Ps("active",!1),hU=Ps("borderless",!1),ol=Ps("enabled",!0),Ty=Ps("primary",!1),$F=o=>at("columns",o),J5=at("meta",{}),Q5=dn("onAction",q),Ah=o=>Zn("type",o),t6=o=>Gs("name","name",dp(()=>ee(`${o}-name`)),Ns),LF=o=>Gs("value","value",dp(()=>ee(`${o}-value`)),Oi()),Cb=[os,ag,sc("level",["info","warn","error","success"]),Y5,at("url","")],bU=ve(Cb),xU=o=>[os,o],vU=[os,ag,ol,t6("button"),el,hU,o2("buttonType",["primary","secondary","toolbar"]),Ty,Zn("context","mode:design")],g3=ve(vU),ka=[os,K5],nl=ka.concat([Ay]),HF=ka.concat([m3,ol,Zn("context","mode:design")]),yU=ve(HF),CU=to,wU=nl.concat([$F("auto"),Zn("context","mode:design")]),_U=ve(wU),zF=Ig([vb,ag,Y5
vendor: 4,390 bytes, line 80
80]),VF=nl.concat([Zn("storageKey","default"),Zn("context","mode:design")]),SU=ve(VF),kU=Ns,AU=ve(nl),UF=Ns,WF=ka.concat([Zn("tag","textarea"),Kn("scriptId"),Kn("scriptUrl"),rc("onFocus"),dw("settings",void 0)]),ZF=ka.concat([Zn("tag","textarea"),$a("init")]),TU=El(o=>zn("customeditor.old",Ia(ZF),o).orThunk(()=>zn("customeditor.new",Ia(WF),o))),DU=Ns,Ff=[ol,ig,fU,X5,LF("menuitem"),J5,Zn("context","mode:design")],OU=ve([os,K5].concat(Ff)),RU=to,wb=[t6("button"),el,Kr("align","end",["start","end"]),Ty,ol,o2("buttonType",["primary","secondary"]),Zn("context","mode:design")],Qu=[...wb,ag],f3=[sc("type",["submit","cancel","custom"]),...Qu],sl=[sc("type",["menu"]),ig,Eh,el,ba("items",OU),...wb],BU=[...wb,sc("type",["togglebutton"]),Eh,el,ig,Ps("active",!1)],p3=Gr("type",{submit:f3,cancel:f3,custom:f3,menu:sl,togglebutton:BU}),FU=nl.concat([Zn("context","mode:design"),Yn("dropAreaLabel"),Yn("buttonLabel"),Yn("allowedFileTypes"),B1("allowedFileExtensions",Ns)]),Th=ve(FU),MU=cw(),e6=o=>[os,hp("columns"),o],o6=[os,Kn("html"),Kr("presets","presentation",["presentation","document"]),dn("onInit",q),Ps("stretched",!1)],NU=ve(o6),PU=nl.concat([Ps("border",!1),Ps("sandboxed",!0),Ps("streamContent",!1),Ps("transparent",!0)]),Dh=ve(PU),jF=Ns,GF=ve(ka.concat([Yn("height")])),IU=ve([Kn("url"),Lg("zoom"),Lg("cachedWidth"),Lg("cachedHeight")]),n6=nl.concat([Yn("inputMode"),Yn("placeholder"),Ps("maximized",!1),ol,Zn("context","mode:design")]),qF=ve(n6),s6=Ns,KF=o=>[os,m3,o,Kr("align","start",["start","center","end"]),Yn("for")],YF=[ag,vb],Dy=[ag,ba("items",_m("items",()=>XF))],XF=Pg([ve(YF),ve(Dy)]),$U=nl.concat([ba("items",XF),ol,Zn("context","mode:design")]),LU=ve($U),HU=Ns,r6=nl.concat([uw("items",[ag,vb]),bp("size",1),ol,Zn("context","mode:design")]),zU=ve(r6),a6=Ns,VU=nl.concat([Ps("constrain",!0),ol,Zn("context","mode:design")]),Oy=ve(VU),JF=ve([Kn("width"),Kn("height")]),QF=ka.concat([m3,bp("min",0),bp("max",0)]),UU=ve(QF),WU=qx,ZU=[os,ba("header",Ns),ba("cells",es(Ns))],jU=ve(ZU),h3=nl.concat([Yn("placeholder"),Ps("maximized",!1),ol,Zn("context","mode:design"),n2("spellcheck")]),tM=ve(h3),GU=Ns,i6=[Zn("buttonType","default"),Yn("text"),Yn("tooltip"),Yn("icon"),ai("search",!1,Pg([to,ve([Yn("placeholder")])],o=>Ta(o)?o?k.some({placeholder:k.none()}):k.none():k.some(o))),$a("fetch"),dn("onSetup",()=>q),Zn("context","mode:design")],Mf=ve([os,...i6]),c6=o=>zn("menubutton",Mf,o),_b=[sc("type",["directory","leaf"]),PF,Kn("id"),$c("menu",Mf),Yn("customStateIcon"),Yn("customStateIconTooltip")],l6=ve(_b),qU=_b.concat([ba("children",_m("children",()=>wm("type",{directory:eM,leaf:l6})))]),eM=ve(qU),Oh=wm("type",{directory:eM,leaf:l6}),oM=[os,ba("items",Oh),rc("onLeafAction"),rc("onToggleExpand"),Cd("defaultExpandedIds",[],Ns),Yn("defaultSelectedId")],KU=ve(oM),nM=nl.concat([Kr("filetype","file",["image","media","file"]),ol,Yn("picker_text"),Zn("context","mode:design")]),YU=ve(nM),XU=ve([vb,J5]),u6=o=>Gs("items","items",Ri(),es(El(s=>zn(`Checking item of ${o}`,b3,s).fold(a=>Te.error($g(a)),a=>Te.value(a))))),b3=pp(()=>wm("type",{alertbanner:bU,bar:ve(xU(u6("bar"))),button:g3,checkbox:yU,colorinput:SU,colorpicker:AU,dropzone:Th,grid:ve(e6(u6("grid"))),iframe:Dh,input:qF,listbox:LU,selectbox:zU,sizeinput:Oy,slider:UU,textarea:tM,urlinput:YU,customeditor:TU,htmlpanel:NU,imagepreview:GF,collection:_U,label:ve(KF(u6("label"))),table:jU,tree:KU,panel:sM})),JU=[os,at("classes",[]),ba("items",b3)],sM=ve(JU),QU=[t6("tab"),PF,ba("items",b3)],tW=[os,uw("tabs",QU)],eW=ve(tW),oW=Qu,nW=p3,sW=ve([Kn("title"),ha("body",wm("type",{panel:sM,tabpanel:eW})),Zn("size","normal"),Cd("buttons",[],nW),at("initialData",{}),dn("onAction",q),dn("onChange",q),dn("onSubmit",q),dn("onClose",q),dn("onCancel",q),dn("onTabChange",q)]),rM=o=>zn("dialog",sW,o),rW=ve([sc("type",["cancel","custom"]),...oW]),aW=ve([Kn("title"),Kn("url"),Lg("height"),Lg("width"),B1("buttons",rW),dn("onAction",q),dn("onCancel",q),dn("onClose",q),dn("onMessage",q)]),iW=o=>zn("dialog",aW,o),d6=o=>hn(o)?[o].concat(Y(id(o),d6)):ca(o)?Y(o,d6):[],cW=o=>$e(o.type)&&$e(o.name),lW={checkbox:CU,colorinput:kU,colorpicker:UF,dropzone:MU,input:s6,iframe:jF,imagepreview:IU,selectbox:a6,sizeinput:JF,slider:WU,listbox:HU,size:JF,textarea:GU,urlinput:XU,customeditor:DU,collection:zF,togglemenuitem:RU},aM=o=>k.from(lW[o.type]),iM=o=>Io(d6(o),cW),uW=o=>{const s=iM(o),a=Y(s,c=>aM(c).fold(()=>[],d=>[ha(c.name,d)]));
80return ve(a)},Ry=o=>{const s=Fi(rM(o)),a=uW(o),c=o.initialData??{};return{internalDialog:s,dataValidator:a,initialData:c}},Rh={open:(o,s)=>{const a=Ry(s);return o(a.internalDialog,a.initialData,a.dataValidator)},openUrl:(o,s)=>{const a=Fi(iW(s));return o(a)},redial:o=>Ry(o)},cM=ve([os,ig]),dW=o=>zn("separatormenuitem",cM,o),mW=ve([Ah("autocompleteitem"),yb,ol,J5,vb,ig,el]),gW=o=>zn("Autocompleter.Separator",cM,o),fW=o=>zn("Autocompleter.Item",mW,o),Sb=[ol,Eh,el,ig,kh,Zn("context","mode:design")],pW=ve([os,Bf,X5].concat(Sb)),Yd=o=>zn("toolbarbutton",pW,o),m6=[yb].concat(Sb),hW=ve(m6.concat([os,Bf,X5])),g6=o=>zn("ToggleButton",hW,o),x3=[dn("predicate",Fo),Kr("scope","node",["node","editor"]),Kr("position","selection",["node","selection","line"])],bW=Sb.concat([Ah("contextformbutton"),Zn("align","end"),Ty,Bf,qr("original",eo)]),xW=m6.concat([Ah("contextformbutton"),Zn("align","end"),Ty,Bf,qr("original",eo)]),vW=Sb.concat([Ah("contextformbutton")]),f6=m6.concat([Ah("contextformtogglebutton")]),lM=Gr("type",{contextformbutton:bW,contextformtogglebutton:xW}),By=[Ay,ba("commands",lM),$c("launch",Gr("type",{contextformbutton:vW,contextformtogglebutton:f6})),dn("onInput",q),dn("onSetup",q)],v3=[...x3,...By,sc("type",["contextform"]),dn("initValue",nt("")),Yn("placeholder")],kb=[...x3,...By,sc("type",["contextsliderform"]),dn("initValue",nt(0)),dn("min",nt(0)),dn("max",nt(100))],yW=[...x3,...By,sc("type",["contextsizeinputform"]),dn("initValue",nt({width:"",height:""}))],uM=Gr("type",{contextform:v3,contextsliderform:kb,contextsizeinputform:yW}),CW=o=>zn("ContextForm",uM,o),Eb=Sb.concat([Ah("contexttoolbarbutton")]),wW=ve([Ah("contexttoolbar"),xa("launch",Eb),ha("items",Pg([Ns,Ig([Yn("name"),Yn("label"),ba("items",Ns)])]))].concat(x3)),y3=o=>({name:o.name.getOrUndefined(),label:o.label.getOrUndefined(),items:o.items}),p6=o=>({...o,launch:o.launch.getOrUndefined(),items:$e(o.items)?o.items:pt(o.items,y3)}),_W=o=>zn("ContextToolbar",wW,o),SW=[os,Kn("src"),Yn("alt"),Cd("classes",[],Ns)],kW=ve(SW),h6=[os,ag,gU,Cd("classes",["tox-collection__item-label"],Ns)],EW=ve(h6),dM=pp(()=>wm("type",{cardimage:kW,cardtext:EW,cardcontainer:AW})),AW=ve([os,Zn("direction","horizontal"),Zn("align","left"),Zn("valign","middle"),ba("items",dM)]),mM=ve([os,Ay,ba("items",dM),kh,Q5].concat(Ff)),b6=o=>zn("cardmenuitem",mM,o),TW=ve([os,yb,el,Ay].concat(Ff)),DW=o=>zn("choicemenuitem",TW,o),x6=[os,Kn("fancytype"),Q5],gM=[at("initData",{})].concat(x6),OW=[rc("select"),wd("initData",{},[Ps("allowCustomColors",!0),Zn("storageKey","default"),B1("colors",Oi())])].concat(x6),v6=[rc("select"),Al("initData",[hp("columns"),Cd("items",[],Oi())])].concat(x6),fM=Gr("fancytype",{inserttable:gM,colorswatch:OW,imageselect:v6}),pM=o=>zn("fancymenuitem",fM,o),RW=ve([os,yb,lU,Ay,Eh].concat(Ff)),BW=ve([os,yb,Y5,m3,Eh,vb].concat(Ff)),hM=o=>zn("imagemenuitem",RW,o),y6=o=>zn("resetimageitem",BW,o),FW=ve([os,kh,Q5,el].concat(Ff)),MW=o=>zn("menuitem",FW,o),NW=ve([os,dU,kh,el].concat(Ff)),PW=o=>zn("nestedmenuitem",NW,o),IW=ve([os,el,yb,kh,Bf].concat(Ff)),$W=o=>zn("togglemenuitem",IW,o),LW=ve([el,Eh,dn("onShow",q),dn("onHide",q),kh]),C6=o=>zn("sidebar",LW,o),HW=ve([os,ha("items",Pg([Ig([K5,ba("items",Ns)]),Ns]))].concat(Sb)),w6=o=>zn("GroupToolbarButton",HW,o),zW=ve([os,Eh,IF,el,ig,pU,uU,kh,Kr("presets","normal",["normal","color","listpreview"]),$F(1),Bf,mU,Zn("context","mode:design")]),VW=o=>zn("SplitButton",zW,o),C3=[ig,el,Yn("tooltip"),Kr("buttonType","secondary",["primary","secondary"]),Ps("borderless",!1),$a("onAction"),Zn("context","mode:design")],UW=[...C3,ag,sc("type",["button"])],WW=[...C3,Ps("active",!1),sc("type",["togglebutton"])],_6={button:UW,togglebutton:WW},ZW=[sc("type",["group"]),Cd("buttons",[],Gr("type",_6))],jW=Gr("type",{..._6,group:ZW}),GW=ve([Cd("buttons",[],jW),$a("onShow"),$a("onHide")]),qW=o=>zn("view",GW,o),S6=(o,s,a)=>{const c=ur(o.element,"."+a);if(c.length>0){const d=$t(c,f=>{const p=f.dom.getBoundingClientRect().top,y=c[0].dom.getBoundingClientRect().top;return Math.abs(p-y)>s}).getOr(c.length);return k.some({numColumns:d,numRows:Math.ceil(c.length/d)})}else return k.none()},bM=(o,s)=>Pt([Me(o,s)]),Ab={namedEvents:bM,unnamedEvents:o=>bM(ee("unnamed-events"),o)},td={item:o=>ce.config({disabled:o,disableClass:"tox-collection__item--state-disabled"}),button:o=>ce.config({disabled:o}),splitButton:o=>ce.config({disabled:o,disableClass:"tox-tbtn--disabled"}),toolbarButton:o=>ce.config({disabled:o,disableClass:"tox-tbtn--disabled",useNative:!1})},Fy=(o,s)=>{const a=o.getApi(s);return c=>{c(a)}},ed=(o,s)=>vn(a=>{ke(o.onBeforeSetup)&&o.onBeforeSetup(a),Fy(o,a)(d=>{const f=o.onSetup(d);ke(f)&&s.set(f)})}),Nf=(o,s)=>dc(a=>Fy(o,a)(s.get())),w3=(o,s,a)=>dc(c=>(a.set(ne.getValue(c)),Fy(o,c)(s.get()))),k6="silver.uistate",Bh="setDisabled",YW="setEnabled",E6="init",XW=["switchmode",E6],My=(o,s)=>{const a=o.mainUi.outerContainer,c=[o.mainUi.mothership,...o.uiMotherships];s===Bh&&It(c,d=>{d.broadcastOn([Fl()],{target:a.element})}),It(c,d=>{d.broadcastOn([k6],s)})},xM=(o,s)=>{o.on("init SwitchMode",a=>{My(s,a.type)}),o.on("DisabledStateChange",a=>{if(!a.isDefaultPrevented()){const c=a.state?Bh:E6;My(s,c),a.state||o.nodeChanged()}}),o.on("NodeChange",a=>{const c=o.ui.isEnabled()?a.type:Bh;My(s,c)}),FB(o)&&o.mode.set("readonly")},ms=o=>na.config({channels:{[k6]:{onReceive:(s,a)=>
80{if(a===Bh||a===YW){ce.set(s,a===Bh);return}const{contextType:c,shouldDisable:d}=o();c==="mode"&&!Go(XW,a)||ce.set(s,d)}}}}),cg=(o,s)=>Md((a,c)=>{Fy(o,a)(o.onAction),!o.triggersSubmenu&&s===Xl.CLOSE_ON_EXECUTE&&(a.getSystem().isConnected()&&no(a,I1()),c.stop())}),JW={[mr()]:["disabling","alloy.base.behaviour","toggling","item-events"]},Xd=um,Fh=(o,s,a,c)=>{const d=fe(q);return{type:"item",dom:s.dom,components:Xd(s.optComponents),data:o.data,eventOrder:JW,hasSubmenu:o.triggersSubmenu,itemBehaviours:Pt([Me("item-events",[cg(o,a),ed(o,d),Nf(o,d)]),td.item(()=>!o.enabled||c.checkUiComponentContext(o.context).shouldDisable),ms(()=>c.checkUiComponentContext(o.context)),ze.config({})].concat(o.itemBehaviours))}},lg=o=>({value:o.value,meta:{text:o.text.getOr(""),...o.meta}}),QW=(o,s)=>{const a=Zt.fromTag("div");sn(a,"tox-image-selector-loading-spinner");const c=f=>{sn(f,"tox-image-selector-loading-spinner-wrapper"),ar(f,a)},d=f=>{Un(f,"tox-image-selector-loading-spinner-wrapper"),Ji(a)};return{dom:{tag:o.tag,attributes:o.attributes??{},classes:o.classes},components:[{dom:{tag:"div",classes:["tox-image-selector-image-wrapper"]},components:[{dom:{tag:"img",attributes:{src:s},classes:["tox-image-selector-image-img"]}}]},...o.checkMark.toArray()],behaviours:Pt([...o.behaviours??[],Me("render-image-events",[vn(f=>{c(f.element),Ko(f.element,"img").each(p=>{Nc(p).catch(y=>{console.error(y)}).finally(()=>{d(f.element)})})})])])}},tZ=(o,s)=>QW(s,o),A6=o=>{const s=db.os.isMacOS()||db.os.isiOS(),d=s?{alt:"â¥",ctrl:"â",shift:"â§",meta:"â",access:"ââ¥"}:{meta:"Ctrl",access:"Shift+Alt"},f=o.split("+"),p=pt(f,y=>{const C=y.toLowerCase().trim();return nn(d,C)?d[C]:y});return s?p.join(""):p.join("+")},_3=(o,s,a=[I5])=>yc(o,{tag:"div",classes:a},s),vM=o=>({dom:{tag:"div",classes:[sg]},components:[En(sa.translate(o))]}),S3=(o,s)=>({dom:{tag:"div",classes:s,innerHtml:o}}),T6=(o,s)=>({dom:{tag:"div",classes:[sg]},components:[{dom:{tag:o.tag,styles:o.styles},components:[En(sa.translate(s))]}]}),D6=o=>({dom:{tag:"div",classes:[wh]},components:[En(A6(o))]}),O6=o=>_3("checkmark",o,[tU]),Cc=o=>_3("chevron-right",o,[_F]),eZ=o=>_3("chevron-down",o,[_F]),oZ=(o,s)=>{const a=o.direction==="vertical"?eU:kF,c=o.align==="left"?nU:oU;return{dom:{tag:"div",classes:[SF,a,c,(()=>{switch(o.valign){case"top":return u3;case"middle":return EF;case"bottom":return sU}})()]},components:s}},yM=(o,s,a)=>({dom:{tag:"img",classes:s,attributes:{src:o,alt:a.getOr("")}}}),CM=(o,s,a)=>{const c="custom",d="remove",f=o.value,p=o.iconContent.map(_=>c3(_,s.icons,a)),y=o.ariaLabel.map(_=>({"aria-label":s.translate(_),"data-mce-name":_})).getOr({});return{dom:(()=>{const _=Rf,A=p.getOr(""),O={tag:"div",attributes:y,classes:[_]};return f===c?{...O,tag:"button",classes:[...O.classes,"tox-swatches__picker-btn"],innerHtml:A}:f===d?{...O,classes:[...O.classes,"tox-swatch--remove"],innerHtml:A}:$n(f)?{...O,attributes:{...O.attributes,"data-mce-color":f},styles:{"background-color":f},innerHtml:A}:O})(),optComponents:[]}},R6=(o,s)=>{const a=o.map(c=>({attributes:{id:ee("menu-item"),"aria-label":sa.translate(c)}})).getOr({});return{tag:"div",classes:[N5,wy].concat(s),...a}},wM=o=>({dom:{tag:"label"},components:[En(o)]}),nZ=(o,s,a,c)=>{const d={tag:"div",classes:[I5]},f=M=>yc(M,d,s.icons,c),p=()=>k.some({dom:d}),y=a?o.iconContent.map(f).orThunk(p):k.none(),C=o.checkMark,_=k.from(o.meta).fold(()=>vM,M=>nn(M,"style")?so(T6,M.style):vM),A=o.htmlContent.fold(()=>o.textContent.map(_),M=>k.some(S3(M,[sg])));return{dom:R6(o.ariaLabel,[]),optComponents:[y,A,o.shortcutContent.map(D6),C,o.caret,o.labelContent.map(wM)]}},sZ=o=>({dom:R6(o.ariaLabel,[QV]),optComponents:[k.some(tZ(o.iconContent.getOrDie(),{tag:"div",classes:[l3],checkMark:o.checkMark})),o.labelContent.map(wM)]}),Tb=(o,s,a,c=k.none())=>o.presets==="color"?CM(o,s,c):o.presets==="img"?sZ(o):nZ(o,s,a,c),_M=(o,s,a)=>he(o,"tooltipWorker").map(c=>[yn.config({lazySink:s.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:d=>({type:"submenu",item:d,overrides:{maxHeightFunction:Im}}),mode:"follow-highlight",onShow:(d,f)=>{c(p=>{yn.setComponents(d,[ui({element:Zt.fromDom(p)})])})}})]).getOrThunk(()=>a.map(c=>[yn.config({...s.providers.tooltips.getConfig({tooltipText:c}),mode:"follow-highlight"})]).getOr([])),rZ=o=>ub.DOM.encode(o),B6=(o,s)=>{const a=sa.translate(o),c=rZ(a);if(s.length>0){const d=new RegExp(tk(s),"gi");return c.replace(d,f=>`<span class="tox-autocompleter-highlight">${f}</span>`)}else return c},aZ=(o,s,a,c,d,f,p,y=!0)=>{const C=Tb({presets:c,textContent:k.none(),htmlContent:a?o.text.map(A=>B6(A,s)):k.none(),ariaLabel:o.text,labelContent:k.none(),iconContent:o.icon,shortcutContent:k.none(),checkMark:k.none(),caret:k.none(),value:o.value},p.providers,y,o.icon),_=o.text.filter(A=>!a&&A!=="");return Fh({context:"mode:design",data:lg(o),enabled:o.enabled,getApi:nt({}),onAction:A=>d(o.value,o.meta),onSetup:nt(q),triggersSubmenu:!1,itemBehaviours:_M(o,p,_)},C,f,p.providers)},SM=(o,s)=>pt(o,a=>{switch(a.type){case"cardcontainer":return oZ(a,SM(a.items,s));case"cardimage":return yM(a.src,a.classes,a.alt);case"cardtext":const d=a.name.exists(f=>Go(s.cardText.highlightOn,f))?k.from(s.cardText.matchText).getOr(""):"";return S3(B6(a.text,d),a.classes)}}),iZ=(o,s,a,c)=>{const d=p=>({isEnabled:()=>!ce.isDisabled(p),setEnabled:y=>{ce.set(p,!y),It(ur(p.element,"*"),C=>{p.getSystem().getByDom(C).each(_=>{_.hasConfigured(ce)&&ce.set(_,!y)})})}}),f={dom:R6(o.label,[]),optComponents:[k.some({dom:{tag:"div",classes:[SF,kF]},components:SM(o.items,c)})]};return Fh({context:"mode:design",data:lg({text:k.none(),...o}),enabled:o.enabled,getApi:d,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:k.from(c.itemBehaviours).getOr([])},f,s,a.providers)},F6=(o,s,a,c,d,f,p,y=!0)=>{const C=O=>({setActive:M=>{go.set(O,M)},isActive:()=>go.isOn(O),isEnabled:()=>!ce.isDisabled(O),setEnabled:M=>ce.set(O,!M)}),_=Tb({presets:a,textContent:s?o.text:k.none(),htmlContent:k.none(),labelContent:o.label,ariaLabel:o.text,iconContent:o.icon,shortcutContent:s?o.shortcut:k.none(),checkMark:s?k.some(O6(p.icons)):k.none(),caret:k.none(),value:o.value},p,y),A=o.text.filter(nt(!s)).map(O=>yn.config(p.tooltips.getConfig({tooltipText:p.translate(O)})));return kn(Fh({context:o.context,data:lg(o),enabled:o.enabled,getApi:C,onAction:O=>c(o.value),onSetup:O=>(O.setActive(d),q),triggersSubmenu:!1,itemBehaviours:[...A.toArray()]},_,f,p),{toggling:{toggleClass:P5,toggleOnExecute:!1,selected:o.active,exclusive:!0}})},k3=o=>({value:Mh(o)}),E3=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,kM=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,A3=o=>E3.test(o)||kM.test(o),Mh=o=>dx(o,"#").toUpperCase(),EM=o=>A3(o)?k.some({value:Mh(o)}):k.none(),AM=o=>({value:o.value.replace(E3,(a,c,d,f)=>c+c+d+d+f+f)}),TM=o=>{const s=AM(o),a=kM.exec(s.value);return a===null?["FFFFFF","FF","FF","FF"]:a},M6=o=>{const s=o.toString(16);return(s.length===1?"0"+s:s).toUpperCase()},Ny=o=>{const s=M6(o.red)+M6(o.green)+M6(o.blue);return k3(s)},Pf=(o,s,a)=>({hue:o,saturation:s,value:a}),N6=o=>{let s=0,a=0,c=0;const d=o.red/255,f=o.green/255,p=o.blue/255,y=Math.min(d,Math.min(f,p)),C=Math.max(d,Math.max(f,p));if(y===C)return c=y,Pf(0,0,c*100);const _=d===y?f-p:p===y?d-f:p-d;return s=d===y?3:p===y?1:5,s=60*(s-_/(C-y)),a=(C-y)/C,c=C,Pf(Math.round(s),Math.round(a*100),Math.round(c*100))},DM=Math.min,P6=Math.max,Py=Math.round,I6=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,OM=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,nr=(o,s,a,c)=>({red:o,green:s,blue:a,alpha:c}),T3=o=>{const s=parseInt(o,10);return s.toString()===o&&s>=0&&s<=255},RM=o=>{let s,a,c;const d=(o.hue||0)%360;let f=o.saturation/100,p=o.value/100;if(f=P6(0,DM(f,1)),p=P6(0,DM(p,1)),f===0)return s=a=c=Py(255*p),nr(s,a,c,1);const y=d/60,C=p*f,_=C*(1-Math.abs(y%2-1)),A=p-C;switch(Math.floor(y)){case 0:s=C,a=_,c=0;break;case 1:s=_,a=C,c=0;break;case 2:s=0,a=C,c=_;break;case 3:s=0,a=_,c=C;break;case 4:s=_,a=0,c=C;break;case 5:s=C,a=0,c=_;break;default:s=a=c=0}return s=Py(255*(s+A)),a=Py(255*(a+A)),c=Py(255*(c+A)),nr(s,a,c,1)},Iy=o=>{const s=TM(o),a=parseInt(s[1],16),c=parseInt(s[2],16),d=parseInt(s[3],16);return nr(a,c,d,1)},$6=(o,s,a,c)=>{const d=parseInt(o,10),f=parseInt(s,10),p=parseInt(a,10),y=parseFloat(c);return nr(d,f,p,y)},L6=o=>{const s=I6.exec(o);if(s!==null)return k.some($6(s[1],s[2],s[3],"1"));const a=OM.exec(o);return a!==null?k.some($6(a[1],a[2],a[3],a[4])):k.none()},BM=o=>`rgba(${o.red},${o.green},${o.blue},${o.alpha})`,FM=nr(255,0,0,1),MM=o=>N6(Iy(o)),od=o=>Ny(RM(o)),H6=o=>EM(o).orThunk(()=>L6(o).map(Ny)).getOrThunk(()=>{const s=document.createElement("canvas");s.height=1,s.width=1;const a=s.getContext("2d");a.clearRect(0,0,s.width,s.height),a.fillStyle="#FFFFFF",a.fillStyle=o,a.fillRect(0,0,1,1);const c=a.getImageData(0,0,1,1).data,d=c[0],f=c[1],p=c[2],y=c[3];
80return Ny(nr(d,f,p,y))}),NM=o=>{o.dispatch("SkinLoaded")},D3=(o,s)=>{o.dispatch("SkinLoadError",s)},z6=o=>{o.dispatch("ResizeEditor")},V6=(o,s)=>{o.dispatch("ResizeContent",s)},cZ=(o,s)=>{o.dispatch("ScrollContent",s)},PM=(o,s)=>{o.dispatch("TextColorChange",s)},lZ=(o,s)=>{o.dispatch("AfterProgressState",{state:s})},uZ=(o,s)=>o.dispatch("ResolveName",{name:s.nodeName.toLowerCase(),target:s}),dZ=(o,s)=>{o.dispatch("ToggleToolbarDrawer",{state:s})},mZ=(o,s)=>{o.dispatch("StylesTextUpdate",s)},IM=(o,s)=>{o.dispatch("AlignTextUpdate",s)},gZ=(o,s)=>{o.dispatch("FontSizeTextUpdate",s)},Jd=(o,s)=>{o.dispatch("FontSizeInputTextUpdate",s)},O3=(o,s)=>{o.dispatch("BlocksTextUpdate",s)},fZ=(o,s)=>{o.dispatch("FontFamilyTextUpdate",s)},pZ=o=>{o.dispatch("ToggleSidebar")},$M=o=>{o.dispatch("ToggleView")},U6=o=>{o.dispatch("ContextToolbarClose")},W6=o=>{o.dispatch("ContextFormSlideBack")},Nh=(o,s)=>()=>{o(),s()},br=(o,s=_e)=>If(o,"NodeChange",a=>{a.setEnabled(o.selection.isEditable()&&s())}),$y=(o,s)=>a=>{const c=Rs(),d=()=>{a.setActive(o.formatter.match(s));const f=o.formatter.formatChanged(s,a.setActive);c.set(f)};return o.initialized?d():o.once("init",d),()=>{o.off("init",d),c.clear()}},Ly=(o,s)=>a=>{const c=br(o)(a),d=$y(o,s)(a);return()=>{c(),d()}},If=(o,s,a)=>c=>{const d=()=>a(c),f=()=>{a(c),o.on(s,d)};return o.initialized?f():o.once("init",f),()=>{o.off("init",f),o.off(s,d)}},R3=o=>s=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("mceToggleFormat",!1,s.format)})},Za=(o,s)=>()=>o.execCommand(s);var Ph=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const LM={},HM=(o,s=10)=>{const a=Ph.getItem(o),c=$e(a)?JSON.parse(a):[],f=(_=>s-_.length<0?_.slice(0,s):_)(c),p=_=>{Et(f,_).each(y),f.unshift(_),f.length>s&&f.pop(),Ph.setItem(o,JSON.stringify(f))},y=_=>{f.splice(_,1)};return{add:p,state:()=>f.slice(0)}},Z6=o=>he(LM,o).getOrThunk(()=>{const s=`tinymce-custom-colors-${o}`,a=Ph.getItem(s);if(Da(a)){const d=Ph.getItem("tinymce-custom-colors");Ph.setItem(s,$n(d)?d:"[]")}const c=HM(s,10);return LM[o]=c,c}),hZ=o=>pt(Z6(o).state(),s=>({type:"choiceitem",text:s,icon:"checkmark",value:s})),j6=(o,s)=>{Z6(o).add(s)},B3="forecolor",G6="hilitecolor",zM=5,bZ=o=>q6(o.map((s,a)=>a%2===0?"#"+H6(s).value:s)),q6=o=>{const s=[];for(let a=0;a<o.length;a+=2)s.push({text:o[a+1],value:o[a],icon:"checkmark",type:"choiceitem"});return s},ja=o=>s=>s.options.get(o),K6="#000000",VM=o=>{const s=o.options.register,a=f=>Oa(f,$e)?{value:bZ(f),valid:!0}:{valid:!1,message:"Must be an array of strings."},c=f=>Oa(f,$e)?{value:q6(f),valid:!0}:{valid:!1,message:"Must be an array of strings."},d=f=>la(f)&&f>0?{value:f,valid:!0}:{valid:!1,message:"Must be a positive number."};s("color_map",{processor:a,default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]}),s("color_map_raw",{processor:c}),s("color_map_background",{processor:a}),s("color_map_foreground",{processor:a}),s("color_cols",{processor:d,default:Y6(o)}),s("color_cols_foreground",{processor:d,default:UM(o,B3)}),s("color_cols_background",{processor:d,default:UM(o,G6)}),s("custom_colors",{processor:"boolean",default:!0}),s("color_default_foreground",{processor:"string",default:K6}),s("color_default_background",{processor:"string",default:K6})},F3=(o,s)=>s===B3&&o.options.isSet("color_map_foreground")?ja("color_map_foreground")(o):s===G6&&o.options.isSet("color_map_background")?ja("color_map_background")(o):o.options.isSet("color_map_raw")?ja("color_map_raw")(o):ja("color_map")(o),Y6=(o,s="default")=>Math.max(zM,Math.ceil(Math.sqrt(F3(o,s).length))),UM=(o,s)=>{const a=ja("color_cols")(o),c=Y6(o,s);return a===Y6(o)?c:a},WM=(o,s="default")=>Math.round(s===B3?ja("color_cols_foreground")(o):s===G6?ja("color_cols_background")(o):ja("color_cols")(o)),X6=ja("custom_colors"),xZ=ja("color_default_foreground"),ZM=ja("color_default_background"),J6="rgba(0, 0, 0, 0)",Qd=o=>L6(o).exists(s=>s.alpha!==0),Q6=o=>oc(o,s=>{if(Ba(s)){const a=Dn(s,"background-color");return yi(Qd(a),a)}else return k.none()}).getOr(J6),tD=(o,s)=>{const a=Zt.fromDom(o.selection.getStart()),c=s==="hilitecolor"?Q6(a):Dn(a,"color");return L6(c).map(d=>"#"+Ny(d).value)},jM=(o,s,a)=>{o.undoManager.transact(()=>{o.focus(),o.formatter.apply(s,{value:a}),o.nodeChanged()})},GM=(o,s)=>{o.undoManager.transact(()=>{o.focus(),o.formatter.remove(s,{value:null},void 0,!0),o.nodeChanged()})},qM=o=>{o.addCommand("mceApplyTextcolor",(s,a)=>{jM(o,s,a)}),o.addCommand("mceRemoveTextcolor",s=>{GM(o,s)})},M3=o=>
80{const s="choiceitem",a={type:s,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return o?[a,{type:s,text:"Custom color",icon:"color-picker",value:"custom"}]:[a]},N3=(o,s,a,c)=>{a==="custom"?nD(o)(f=>{f.each(p=>{j6(s,p),o.execCommand("mceApplyTextcolor",s,p),c(p)})},tD(o,s).getOr(K6)):a==="remove"?(c(""),o.execCommand("mceRemoveTextcolor",s)):(c(a),o.execCommand("mceApplyTextcolor",s,a))},Db=(o,s,a)=>o.concat(hZ(s).concat(M3(a))),eD=(o,s,a)=>c=>{c(Db(o,s,a))},P3=(o,s,a)=>{const c=s==="forecolor"?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";o.setIconFill(c,a)},KM=(o,s)=>{o.setTooltip(s)},YM=(o,s)=>a=>{const c=tD(o,s);return ji(c,a.toUpperCase())},oD=(o,s,a)=>{if(Ci(a))return s==="forecolor"?"Text color":"Background color";const c=s==="forecolor"?"Text color {0}":"Background color {0}",d=Db(F3(o,s),s,!1),f=xt(d,p=>p.value===a).getOr({text:""}).text;return o.translate([c,o.translate(f)])},XM=(o,s,a,c)=>{o.ui.registry.addSplitButton(s,{tooltip:oD(o,a,c.get()),chevronTooltip:s==="forecolor"?"Text color menu":"Background color menu",presets:"color",icon:s==="forecolor"?"text-color":"highlight-bg-color",select:YM(o,a),columns:WM(o,a),fetch:eD(F3(o,a),a,X6(o)),onAction:d=>{N3(o,a,c.get(),q)},onItemAction:(d,f)=>{N3(o,a,f,p=>{c.set(p),PM(o,{name:s,color:p})})},onSetup:d=>{P3(d,s,c.get());const f=p=>{p.name===s&&(P3(d,p.name,p.color),KM(d,oD(o,a,p.color)))};return o.on("TextColorChange",f),Nh(br(o)(d),()=>{o.off("TextColorChange",f)})}})},JM=(o,s,a,c,d)=>{o.ui.registry.addNestedMenuItem(s,{text:c,icon:s==="forecolor"?"text-color":"highlight-bg-color",onSetup:f=>(KM(f,oD(o,a,d.get())),P3(f,s,d.get()),br(o)(f)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:YM(o,a),initData:{storageKey:a},onAction:f=>{N3(o,a,f.value,p=>{d.set(p),PM(o,{name:s,color:p})})}}]})},nD=o=>(s,a)=>{let c=!1;const d=y=>{const _=y.getData().colorpicker;c?(s(k.from(_)),y.close()):o.windowManager.alert(o.translate(["Invalid hex color code: {0}",_]))},f=(y,C)=>{C.name==="hex-valid"&&(c=C.value)},p={colorpicker:a};o.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:p,onAction:f,onSubmit:d,onClose:q,onCancel:()=>{s(k.none())}})},QM=o=>{qM(o);const s=xZ(o),a=ZM(o),c=fe(s),d=fe(a);XM(o,"forecolor","forecolor",c),XM(o,"backcolor","hilitecolor",d),JM(o,"forecolor","forecolor","Text color",c),JM(o,"backcolor","hilitecolor","Background color",d)},vZ=(o,s,a,c,d)=>{const f=C=>({setActive:_=>{go.set(C,_)},isActive:()=>go.isOn(C),isEnabled:()=>!ce.isDisabled(C),setEnabled:_=>ce.set(C,!_)}),p=Tb({presets:"img",textContent:k.none(),htmlContent:k.none(),ariaLabel:o.tooltip,iconContent:k.some(o.url),labelContent:o.label,shortcutContent:k.none(),checkMark:k.some(O6(d.icons)),caret:k.none(),value:o.value},d,!0),y=o.tooltip.map(C=>yn.config(d.tooltips.getConfig({tooltipText:d.translate(C)})));return kn(Fh({context:o.context,data:lg(o),enabled:o.enabled,getApi:f,onAction:C=>{s(o.value),C.setActive(!0)},onSetup:C=>(C.setActive(a),q),triggersSubmenu:!1,itemBehaviours:[...y.toArray()]},p,c,d),{toggling:{toggleClass:P5,toggleOnExecute:!1,selected:o.active,exclusive:!0}})},I3=(o,s,a,c,d,f,p,y)=>{const C=Ey(s),A=yZ(s,a,c,d!=="color"?"normal":"color",f,p,y);return q5(o,C,A,c,{menuType:d})},yZ=(o,s,a,c,d,f,p)=>um(pt(o,y=>y.type==="choiceitem"?DW(y).fold(Ju,C=>k.some(F6(C,a===1,c,s,f(C.value),d,p,Ey(o)))):y.type==="imageitem"?hM(y).fold(Ju,C=>k.some(vZ(C,s,f(C.value),d,p))):y.type==="resetimage"?y6(y).fold(Ju,C=>k.some(F6({...C,text:C.tooltip,icon:k.some(C.icon),label:k.some(C.label)},a===1,c,s,f(C.value),d,p,Ey(o)))):k.none())),$f=(o,s)=>{const a=Kd(s);return o===1?{mode:"menu",moveOnTab:!0}:o==="auto"?{mode:"grid",selector:"."+a.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+{color:"tox-swatches__row",imageselector:"tox-image-selector__row",listpreview:"tox-collection__group",normal:"tox-collection__group"}[s],previousSelector:d=>s==="color"?Ko(d.element,"[aria-checked=true]"):k.none()}},CZ=(o,s)=>o===1?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:o==="auto"?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:s==="color"?".tox-swatches__row":".tox-collection__group",cell:s==="color"?`.${Rf}`:`.${wy}`}}
80,wZ=(o,s)=>{const a=tN(o,s),c=s.colorinput.getColorCols(o.initData.storageKey),d="color",p={...I3(ee("menu-value"),a,y=>{o.onAction({value:y})},c,d,Xl.CLOSE_ON_EXECUTE,o.select.getOr(Fo),s.shared.providers),markers:Kd(d),movement:$f(c,d),showMenuRole:!1};return{type:"widget",data:{value:ee("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[RT.widget(tg.sketch(p))]}},tN=(o,s)=>{const a=o.initData.allowCustomColors&&s.colorinput.hasCustomColors();return o.initData.colors.fold(()=>Db(s.colorinput.getColors(o.initData.storageKey),o.initData.storageKey,a),c=>c.concat(M3(a)))},eN=(o,s)=>{const a="imageselector",c=o.initData.columns,f={...I3(ee("menu-value"),o.initData.items,p=>{o.onAction({value:p})},c,a,Xl.CLOSE_ON_EXECUTE,o.select.getOr(Fo),s.shared.providers),markers:Kd(a),movement:$f(c,a),showMenuRole:!1};return{type:"widget",data:{value:ee("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem","tox-collection--toolbar"]},autofocus:!0,components:[RT.widget(tg.sketch(f))]}},oN=ee("cell-over"),nN=ee("cell-execute"),sD=o=>(s,a)=>o.shared.providers.translate(["{0} columns, {1} rows",a,s]),_Z=(o,s,a)=>{const c=p=>be(p,oN,{row:o,col:s}),d=p=>be(p,nN,{row:o,col:s}),f=(p,y)=>{y.stop(),d(p)};return m({dom:{tag:"div",attributes:{role:"button","aria-label":a}},behaviours:Pt([Me("insert-table-picker-cell",[vt(ii(),Ie.focus),vt(mr(),d),vt(km(),f),vt(Zg(),f)]),go.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Ie.config({onFocus:c})])})},sN=(o,s,a)=>{const c=[];for(let d=0;d<s;d++){const f=[];for(let p=0;p<a;p++){const y=o(d+1,p+1);f.push(_Z(d,p,y))}c.push(f)}return c},SZ=(o,s,a,c,d)=>{for(let f=0;f<c;f++)for(let p=0;p<d;p++)go.set(o[f][p],f<=s&&p<=a)},kZ=o=>Y(o,s=>pt(s,h)),rN=(o,s)=>En(`${s}x${o}`),rD={inserttable:(o,s)=>{const d=sD(s),f=sN(d,10,10),p=rN(0,0),y=Mo({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[p],behaviours:Pt([ze.config({})])});return{type:"widget",data:{value:ee("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[RT.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:kZ(f).concat(y.asSpec()),behaviours:Pt([Me("insert-table-picker",[vn(C=>{ze.set(y.get(C),[p])}),rf(oN,(C,_,A)=>{const{row:O,col:M}=A.event;SZ(f,O,M,10,10),ze.set(y.get(C),[rN(O+1,M+1)])}),rf(nN,(C,_,A)=>{const{row:O,col:M}=A.event;no(C,I1()),o.onAction({numRows:O+1,numColumns:M+1})})]),pe.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:wZ,imageselect:eN},AZ=(o,s)=>he(rD,o.fancytype).map(a=>a(o,s)),TZ=(o,s,a,c=!0,d=!1)=>{const f=d?eZ(a.icons):Cc(a.icons),p=C=>({isEnabled:()=>!ce.isDisabled(C),setEnabled:_=>ce.set(C,!_),setIconFill:(_,A)=>{Ko(C.element,`svg path[class="${_}"], rect[class="${_}"]`).each(O=>{Ee(O,"fill",A)})},setTooltip:_=>{const A=a.translate(_);Ee(C.element,"aria-label",A)}}),y=Tb({presets:"normal",iconContent:o.icon,textContent:o.text,htmlContent:k.none(),ariaLabel:o.text,labelContent:k.none(),caret:k.some(f),checkMark:k.none(),shortcutContent:o.shortcut},a,c);return Fh({context:o.context,data:lg(o),getApi:p,enabled:o.enabled,onAction:q,onSetup:o.onSetup,triggersSubmenu:!0,itemBehaviours:[]},y,s,a)},DZ=(o,s,a,c=!0)=>{const d=p=>({isEnabled:()=>!ce.isDisabled(p),setEnabled:y=>ce.set(p,!y)}),f=Tb({presets:"normal",iconContent:o.icon,textContent:o.text,htmlContent:k.none(),labelContent:k.none(),ariaLabel:o.text,caret:k.none(),checkMark:k.none(),shortcutContent:o.shortcut},a,c);return Fh({context:o.context,data:lg(o),getApi:d,enabled:o.enabled,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:[]},f,s,a)},OZ=o=>({type:"separator",dom:{tag:"div",classes:[wy,wF]},components:o.text.map(En).toArray()}),aN=(o,s,a,c=!0)=>{const d=p=>({setActive:y=>{go.set(p,y)},isActive:()=>go.isOn(p),isEnabled:()=>!ce.isDisabled(p),setEnabled:y=>ce.set(p,!y)}),f=Tb({iconContent:o.icon,textContent:o.text,htmlContent:k.none(),labelContent:k.none(),ariaLabel:o.text,checkMark:k.some(O6(a.icons)),caret:k.none(),shortcutContent:o.shortcut,presets:"normal",meta:o.meta},a,c);return kn(Fh({context:o.context,data:lg(o),enabled:o.enabled,getApi:d,onAction:o.onAction,onSetup:o.onSetup,triggersSubmenu:!1,itemBehaviours:[]},f,s,a),{toggling:{toggleClass:P5,toggleOnExecute:!1,selected:o.active},role:o.role.getOrUndefined()})},iN=aZ,aD=OZ,RZ=DZ,BZ=TZ,FZ=aN,MZ=AZ,NZ=iZ,PZ=o=>{switch(o.searchMode){case"no-search":return{menuType:"normal"};default:return{menuType:"searchable",searchMode:o}}},IZ=o=>{const s=ne.getValue(o),a=Sy(o).map(z5);gi.refetch(s).get(()=>{const c=Ve.getCoupled(s,"sandbox");a.each(d=>Sy(c).each(f=>aU(f,d)))})},$Z=(o,s)=>{LZ(o).each(a=>{dE(o,a.element,s.event.eventType,s.event.interactionEvent)})},LZ=o=>To.getState(o).bind(Bo.getHighlighted).bind(Bo.getHighlighted),iD=o=>bs(o.element,d3)?k.some(o.element):Ko(o.element,"."+d3),cN=(o,s,a)=>{OF(o).each(c=>{RF(c,a),iD(s).each(f=>{ir(f,"id").each(p=>Ee(c.element,"aria-controls",p))})}),Ee(a.element,"aria-selected","true")},HZ=(o,s,a)=>{Ee(a.element,"aria-selected","false")},zZ=o=>{OF(o).each(s=>Ie.focus(s))},Hy=o=>Ve.getExistingCoupled(o,"sandbox").bind(Sy).map(z5).map(a=>a.fetchPattern).getOr("");var Ob;(function(o){o[o.ContentFocus=0]="ContentFocus",o[o.UiFocus=1]="UiFocus"})(Ob||(Ob={}));const VZ=(o,s,a,c,d)=>{const f=a.shared.providers,p=y=>d?{...y,shortcut:k.none(),icon:y.text.isSome()?k.none():y.icon}:y;switch(o.type){case"menuitem":return MW(o).fold(Ju,y=>k.some(RZ(p(y),s,f,c)));case"nestedmenuitem":return PW(o).fold(Ju,y=>k.some(BZ(p(y),s,f,c,d)));case"togglemenuitem":return $W(o).fold(Ju,y=>k.some(FZ(p(y),s,f,c)));case"separator":return dW(o).fold(Ju,y=>k.some(aD(y)));case"fancymenuitem":return pM(o).fold(Ju,y=>MZ(y,a));default:return console.error("Unknown item in general menu",o),k.none()}},UZ=(o,s,a,c,d,f,p)=>{const y=c===1,C=!y||Ey(o);return um(pt(o,_=>{switch(_.type){case"separator":return gW(_).fold(Ju,A=>k.some(aD(A)));case"cardmenuitem":return b6(_).fold(Ju,A=>k.some(NZ({...A,onAction:O=>{A.onAction(O),a(A.value,A.meta)}},d,f,{itemBehaviours:_M(A.meta,f,k.none()),cardText:{matchText:s,highlightOn:p}})));case"autocompleteitem":default:return fW(_).fold(Ju,A=>k.some(iN(A,s,y,"normal",a,d,f,C)))}}))},$3=(o,s,a,c,d,f)=>{const p=Ey(s),y=um(pt(s,A=>{const O=I=>d?!nn(I,"text"):p,M=I=>VZ(I,a,c,O(I),d);return A.type==="nestedmenuitem"&&A.getSubmenuItems().length<=0?M({...A,enabled:!1}):M(A)})),C=PZ(f);return(d?NF:q5)(o,p,y,1,C)},cD=o=>ph.singleData(o.value,o),lD=(o,s,a,c)=>{const d=$f(s,c),f=Kd(c);return{data:cD({...o,movement:d,menuBehaviours:Ab.unnamedEvents(s!=="auto"?[]:[vn((p,y)=>{S6(p,4,f.item).each(({numColumns:C,numRows:_})=>{pe.setGridSize(p,_,C)})})])}),menu:{markers:Kd(c),fakeFocus:a===Ob.ContentFocus}}},lN=o=>ym.create(Zt.fromDom(o.startContainer),o.startOffset,Zt.fromDom(o.endContainer),o.endOffset),WZ={register:(o,s)=>{const a=ee("autocompleter"),c=fe(!1),d=fe(!1),f=Ze(),p=m(jn.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:a}},components:[],fireDismissalEventInstead:{},inlineBehaviours:Pt([Me("dismissAutocompleter",[vt(Tu(),()=>O()),vt(z1(),(V,K)=>{ir(K.event.target,"id").each(tt=>Ee(Zt.fromDom(o.getBody()),"aria-activedescendant",tt))}
80)])]),lazySink:s.getSink})),y=()=>jn.isOpen(p),C=d.get,_=()=>{if(y()){jn.hide(p),o.dom.remove(a,!1);const V=Zt.fromDom(o.getBody());ir(V,"aria-owns").filter(K=>K===a).each(()=>{Tn(V,"aria-owns"),Tn(V,"aria-activedescendant")})}},A=()=>jn.getContent(p).bind(V=>Vn(V.components(),0)),O=()=>o.execCommand("mceAutocompleterClose"),M=V=>{const K=bi(V,tt=>k.from(tt.columns)).getOr(1);return Y(V,tt=>{const ct=tt.items;return UZ(ct,tt.matchText,(dt,Wt)=>{const kt={hide:()=>O(),reload:Ot=>{_(),o.execCommand("mceAutocompleterReload",!1,{fetchOptions:Ot})}};o.execCommand("mceAutocompleterRefreshActiveRange"),f.get().each(Ot=>{c.set(!0),tt.onAction(kt,Ot,dt,Wt),c.set(!1)})},K,Xl.BUBBLE_TO_SANDBOX,s,tt.highlightOn)})},I=(V,K)=>{const tt=bi(V,ct=>k.from(ct.columns)).getOr(1);jn.showMenuAt(p,{anchor:{type:"selection",getSelection:()=>f.get().map(lN),root:Zt.fromDom(o.getBody())}},lD(q5("autocompleter-value",!0,K,tt,{menuType:"normal"}),tt,Ob.ContentFocus,"normal")),A().each(Bo.highlightFirst)},L=V=>{const K=M(V);K.length>0?(I(V,K),Ee(Zt.fromDom(o.getBody()),"aria-owns",a),o.inline||W()):_()},W=()=>{o.dom.get(a)&&o.dom.remove(a,!1);const V=o.getDoc().documentElement,K=o.selection.getNode(),tt=m1(p.element);qn(tt,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:`${K.offsetTop}px`,left:`${K.offsetLeft}px`}),o.dom.add(V,tt.dom),Ko(tt,'[role="menu"]').each(ct=>{uo(ct,"position"),uo(ct,"max-height")})};o.on("AutocompleterStart",({lookupData:V})=>{d.set(!0),c.set(!1),L(V)}),o.on("AutocompleterUpdate",({lookupData:V})=>L(V)),o.on("AutocompleterUpdateActiveRange",({range:V})=>f.set(V)),o.on("AutocompleterEnd",()=>{_(),d.set(!1),c.set(!1),f.clear()});const j={cancelIfNecessary:O,isMenuOpen:y,isActive:C,isProcessingAction:c.get,getMenu:A};JV.setup(j,o)}},uN=(o,s)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:pt(o.items,s.interpreter)});var ZZ=tinymce.util.Tools.resolve("tinymce.html.Entities");const Rb=(o,s,a,c)=>{const d=dN(o,s,a,c);return ro.sketch(d)},jZ=(o,s)=>Rb(o,s,[],[]),dN=(o,s,a,c)=>({dom:gN(a),components:o.toArray().concat([s]),fieldBehaviours:Pt(c)}),mN=()=>gN([]),gN=o=>({tag:"div",classes:["tox-form__group"].concat(o)}),ug=(o,s)=>ro.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(o))]}),Ga=ee("form-component-change"),fN=ee("form-component-input"),Ih=ee("form-close"),dg=ee("form-cancel"),Jl=ee("form-action"),zy=ee("form-submit"),uD=ee("form-block"),L3=ee("form-unblock"),pN=ee("form-tabchange"),dD=ee("form-resize"),GZ=(o,s,a)=>{const c=o.label.map(I=>ug(I,s)),d=s.icons(),f=I=>d[I]??I,p=I=>(L,W)=>{$r(W.event.target,"[data-collection-item-value]").each(j=>{I(L,W,j,Ws(j,"data-collection-item-value"))})},y=(I,L)=>{const j=s.checkUiComponentContext("mode:design").shouldDisable||s.isDisabled()?" tox-collection__item--state-disabled":"",V=pt(L,ct=>{const dt=sa.translate(ct.text),Wt=o.columns===1?`<div class="tox-collection__item-label">${dt}</div>`:"",kt=`<div class="tox-collection__item-icon">${f(ct.icon)}</div>`,Ot={_:" "," - ":" ","-":" "},Tt=dt.replace(/\_| \- |\-/g,xe=>Ot[xe]);return`<div data-mce-tooltip="${Tt}" class="tox-collection__item${j}" tabindex="-1" data-collection-item-value="${ZZ.encodeAllRaw(ct.value)}" aria-label="${Tt}">${kt}${Wt}</div>`}),K=o.columns!=="auto"&&o.columns>1?Pe(V,o.columns):[V],tt=pt(K,ct=>`<div class="tox-collection__group">${ct.join("")}</div>`);Mc(I.element,tt.join(""))},C=p((I,L,W,j)=>{L.stop(),s.checkUiComponentContext("mode:design").shouldDisable||s.isDisabled()||be(I,Jl,{name:o.name,value:j})}),_=[vt(ii(),p((I,L,W)=>{Js(W,!0)})),vt(km(),C),vt(Zg(),C),vt(ac(),p((I,L,W)=>{Ko(I.element,"."+_h).each(j=>{Un(j,_h)}),sn(W,_h)})),vt(i2(),p(I=>{Ko(I.element,"."+_h).each(L=>{Un(L,_h),Qn(L)})})),Md(p((I,L,W,j)=>{be(I,Jl,{name:o.name,value:j})}))],A=(I,L)=>pt(ur(I.element,".tox-collection__item"),L),O=ro.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(o.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:eo},behaviours:Pt([ce.config({disabled:()=>s.checkUiComponentContext(o.context).shouldDisable,onDisabled:I=>{A(I,L=>{sn(L,"tox-collection__item--state-disabled"),Ee(L,"aria-disabled",!0)})},onEnabled:I=>{A(I,L=>{Un(L,"tox-collection__item--state-disabled"),Tn(L,"aria-disabled")})}}),ms(()=>s.checkUiComponentContext(o.context)),ze.config({}),yn.config({...s.tooltips.getConfig({tooltipText:"",onShow:I=>
80{Ko(I.element,"."+_h+"[data-mce-tooltip]").each(L=>{ir(L,"data-mce-tooltip").each(W=>{yn.setComponents(I,s.tooltips.getComponents({tooltipText:W}))})})}}),mode:"children-keyboard-focus",anchor:I=>({type:"node",node:Ko(I.element,"."+_h).orThunk(()=>jC(".tox-collection__item")),root:I.element,layouts:{onLtr:nt([ys,Mn,Os,fr,vs,Qs]),onRtl:nt([ys,Mn,Os,fr,vs,Qs])},bubble:Va(0,-2,{})})}),ne.config({store:{mode:"memory",initialValue:a.getOr([])},onSetValue:(I,L)=>{y(I,L),o.columns==="auto"&&S6(I,5,"tox-collection__item").each(({numRows:W,numColumns:j})=>{pe.setGridSize(I,W,j)}),no(I,dD)}}),gn.config({}),pe.config(CZ(o.columns,"normal")),Me("collection-events",_)]),eventOrder:{[mr()]:["disabling","alloy.base.behaviour","collection-events"],[ac()]:["collection-events","tooltipping"]}});return Rb(c,O,["tox-form__group--collection"],[])},qZ=(o,s)=>gi.sketch({dom:o.dom,components:o.components,toggleClass:"mce-active",dropdownBehaviours:Pt([td.button(()=>s.providers.isDisabled()||s.providers.checkUiComponentContext(o.context).shouldDisable),ms(()=>s.providers.checkUiComponentContext(o.context)),Wu.config({}),gn.config({})]),layouts:o.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:s.getSink,fetch:a=>cs.nu(c=>o.fetch(c)).map(c=>k.from(cD(kn(I3(ee("menu-value"),c,d=>{o.onItemAction(a,d)},o.columns,o.presets,Xl.CLOSE_ON_EXECUTE,Fo,s.providers),{movement:$f(o.columns,o.presets)})))),parts:{menu:_y(!1,1,o.presets)}}),H3=ee("color-input-change"),hN=ee("color-swatch-change"),bN=ee("color-picker-cancel"),KZ=(o,s,a,c)=>{const d=ro.parts.field({factory:qd,inputClasses:["tox-textfield"],data:c,onSetValue:_=>hc.run(_).get(q),inputBehaviours:Pt([ce.config({disabled:()=>s.providers.isDisabled()||s.providers.checkUiComponentContext(o.context).shouldDisable}),ms(()=>s.providers.checkUiComponentContext(o.context)),gn.config({}),hc.config({invalidClass:"tox-textbox-field-invalid",getRoot:_=>xl(_.element),notify:{onValid:_=>{const A=ne.getValue(_);be(_,H3,{color:A})}},validator:{validateOnLoad:!1,validate:_=>{const A=ne.getValue(_);if(A.length===0)return cs.pure(Te.value(!0));{const O=Zt.fromTag("span");Be(O,"background-color",A);const M=Hn(O,"background-color").fold(()=>Te.error("blah"),I=>Te.value(A));return cs.pure(M)}}}})]),selectOnFocus:!1}),f=o.label.map(_=>ug(_,s.providers)),p=(_,A)=>{be(_,hN,{value:A})},y=(_,A)=>{C.getOpt(_).each(O=>{A==="custom"?a.colorPicker(M=>{M.fold(()=>no(O,bN),I=>{p(O,I),j6(o.storageKey,I)})},"#ffffff"):A==="remove"?p(O,""):p(O,A)})},C=Mo(qZ({dom:{tag:"span",attributes:{"aria-label":s.providers.translate("Color swatch")}},layouts:{onRtl:()=>[vs,Os,ys],onLtr:()=>[Os,vs,ys]},components:[],fetch:eD(a.getColors(o.storageKey),o.storageKey,a.hasCustomColors()),columns:a.getColorCols(o.storageKey),presets:"color",onItemAction:y,context:o.context},s));return ro.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:f.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[d,C.asSpec()]}]),fieldBehaviours:Pt([Me("form-field-events",[vt(H3,(_,A)=>{C.getOpt(_).each(O=>{Be(O.element,"background-color",A.event.color)}),be(_,Ga,{name:o.name})}),vt(hN,(_,A)=>{ro.getField(_).each(O=>{ne.setValue(O,A.event.value),Rt.getCurrent(_).each(Ie.focus)})}),vt(bN,(_,A)=>{ro.getField(_).each(O=>{Rt.getCurrent(_).each(Ie.focus)})})])])})},Ql={self:()=>Rt.config({find:k.some}),memento:o=>Rt.config({find:o.getOpt}),childAt:o=>Rt.config({find:s=>md(s.element,o).bind(a=>s.getSystem().getByDom(a).toOptional())})},vN=ve([at("preprocess",eo),at("postprocess",eo)]),XZ=(o,s)=>{const a=jr("RepresentingConfigs.memento processors",vN,s);return ne.config({store:{mode:"manual",getValue:c=>{const d=o.get(c),f=ne.getValue(d);return a.postprocess(f)},setValue:(c,d)=>{const f=a.preprocess(d),p=o.get(c);ne.setValue(p,f)}}})},$h=(o,s,a)=>ne.config({store:{mode:"manual",...o.map(c=>({initialValue:c})).getOr({}),getValue:s,setValue:a}}),yN=(o,s,a)=>$h(o,c=>s(c.element),(c,d)=>a(c.element,d)),JZ=o=>yN(o,bu,Mc),z3=o=>ne.config({store:{mode:"memory",initialValue:o}}),V3=ee("rgb-hex-update"),CN=ee("slider-update"),wN=ee("palette-update"),_N=(o,s)=>{const a=Kl.parts.spectrum({dom:{tag:"div",classes:[s("hue-slider-spectrum")],attributes:{role:"presentation"}}}),c=Kl.parts.thumb({dom:{tag:"div",classes:[s("hue-slider-thumb")],attributes:{role:"presentation"}}});return Kl.sketch({dom:{tag:"div",classes:[s("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:nt(0)},components:[a,c],sliderBehaviours:Pt([Ie.config({})]),onChange:(d,f,p)=>{Ee(d.element,"aria-valuenow",Math.floor(360-p*3.6)),be(d,CN,{value:p})}})},SN=ee("valid-input"),kN=ee("invalid-input"),EN=ee("validating-input"),U3="colorcustom.rgb.",QZ={isEnabled:_e,setEnabled:q,immediatelyShow:q,immediatelyHide:q},tj=(o,s,a,c,d,f)=>{const p=(W,j)=>{const V=j.get();W!==V.isEnabled()&&(V.setEnabled(W),W?V.immediatelyShow():V.immediatelyHide())},y=(W,j,V)=>
80hc.config({invalidClass:s("invalid"),notify:{onValidate:K=>{be(K,EN,{type:W})},onValid:K=>{p(!1,V),be(K,SN,{type:W,value:ne.getValue(K)})},onInvalid:K=>{p(!0,V),be(K,kN,{type:W,value:ne.getValue(K)})}},validator:{validate:K=>{const tt=ne.getValue(K),ct=j(tt)?Te.value(!0):Te.error(o("aria.input.invalid"));return cs.pure(ct)},validateOnLoad:!1}}),C=(W,j,V,K,tt)=>{const ct=fe(QZ),dt=o(U3+"range"),Wt=ro.parts.label({dom:{tag:"label"},components:[En(V)]}),kt=ro.parts.field({data:tt,factory:qd,inputAttributes:{type:"text","aria-label":K,...j==="hex"?{"aria-live":"polite"}:{}},inputClasses:[s("textfield")],inputBehaviours:Pt([y(j,W,ct),gn.config({}),yn.config({...d({tooltipText:"",onSetup:je=>{ct.set({isEnabled:()=>yn.isEnabled(je),setEnabled:ue=>yn.setEnabled(je,ue),immediatelyShow:()=>yn.immediateOpenClose(je,!0),immediatelyHide:()=>yn.immediateOpenClose(je,!1)}),yn.setEnabled(je,!1)},onShow:(je,ue)=>{yn.setComponents(je,[{dom:{tag:"p",classes:[s("rgb-warning-note")]},components:[En(o(j==="hex"?"colorcustom.rgb.invalidHex":"colorcustom.rgb.invalid"))]}])}})})]),onSetValue:je=>{hc.isInvalid(je)&&hc.run(je).get(q)}}),Ot=ee("aria-invalid"),Tt=Mo(f("invalid",k.some(Ot),"warning")),xe=Mo({dom:{tag:"div",classes:[s("invalid-icon")]},components:[Tt.asSpec()]}),le=[Wt,kt,xe.asSpec()],Qe=j!=="hex"?[ro.parts["aria-descriptor"]({text:dt})]:[],ye=le.concat(Qe);return{dom:{tag:"div",attributes:{role:"presentation"},classes:[s("rgb-container")]},components:ye}},_=(W,j)=>{const V=Ny(j);return kf.getField(W,"hex").each(K=>{Ie.isFocused(K)||ne.setValue(W,{hex:V.value})}),V},A=(W,j)=>{const V=j.red,K=j.green,tt=j.blue;ne.setValue(W,{red:V,green:K,blue:tt})},O=Mo({dom:{tag:"div",classes:[s("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),M=(W,j)=>{O.getOpt(W).each(V=>{Be(V.element,"background-color","#"+j.value)})};return pc({factory:()=>{const W={red:fe(k.some(255)),green:fe(k.some(255)),blue:fe(k.some(255)),hex:fe(k.some("ffffff"))},j=(ue,_t)=>{const Lt=Iy(_t);A(ue,Lt),ct(Lt)},V=ue=>W[ue].get(),K=(ue,_t)=>{W[ue].set(_t)},tt=()=>V("red").bind(ue=>V("green").bind(_t=>V("blue").map(Lt=>nr(ue,_t,Lt,1)))),ct=ue=>{const _t=ue.red,Lt=ue.green,Ae=ue.blue;K("red",k.some(_t)),K("green",k.some(Lt)),K("blue",k.some(Ae))},dt=(ue,_t)=>{const Lt=_t.event;Lt.type!=="hex"?K(Lt.type,k.none()):c(ue)},Wt=(ue,_t)=>{a(ue);const Lt=k3(_t);K("hex",k.some(Lt.value));const Ae=Iy(Lt);A(ue,Ae),ct(Ae),be(ue,V3,{hex:Lt}),M(ue,Lt)},kt=(ue,_t,Lt)=>{const Ae=parseInt(Lt,10);K(_t,k.some(Ae)),tt().each(Ge=>{const me=_(ue,Ge);be(ue,V3,{hex:me}),M(ue,me)})},Ot=ue=>ue.type==="hex",Tt=(ue,_t)=>{const Lt=_t.event;Ot(Lt)?Wt(ue,Lt.value):kt(ue,Lt.type,Lt.value)},xe=ue=>({label:o(U3+ue+".label"),description:o(U3+ue+".description")}),le=xe("red"),Qe=xe("green"),ye=xe("blue"),je=xe("hex");return kn(kf.sketch(ue=>({dom:{tag:"form",classes:[s("rgb-form")],attributes:{"aria-label":o("aria.color.picker")}},components:[ue.field("red",ro.sketch(C(T3,"red",le.label,le.description,255))),ue.field("green",ro.sketch(C(T3,"green",Qe.label,Qe.description,255))),ue.field("blue",ro.sketch(C(T3,"blue",ye.label,ye.description,255))),ue.field("hex",ro.sketch(C(A3,"hex",je.label,je.description,"ffffff"))),O.asSpec()],formBehaviours:Pt([hc.config({invalidClass:s("form-invalid")}),Me("rgb-form-events",[vt(SN,Tt),vt(kN,dt),vt(EN,dt)])])})),{apis:{updateHex:(ue,_t)=>{ne.setValue(ue,{hex:_t.value}),j(ue,_t),M(ue,_t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(W,j,V)=>{W.updateHex(j,V)}},extraApis:{}})},ej=(o,s)=>{const a=Kl.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[s("sv-palette-spectrum")]}}),c=Kl.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[s("sv-palette-thumb")],innerHtml:`<div class=${s("sv-palette-inner-thumb")} role="presentation"></div>`}}),d=(_,A)=>{const{width:O,height:M}=_,I=_.getContext("2d");if(I===null)return;I.fillStyle=A,I.fillRect(0,0,O,M);const L=I.createLinearGradient(0,0,O,0);L.addColorStop(0,"rgba(255,255,255,1)"),L.addColorStop(1,"rgba(255,255,255,0)"),I.fillStyle=L,I.fillRect(0,0,O,M);const W=I.createLinearGradient(0,0,0,M);W.addColorStop(0,"rgba(0,0,0,0)"),W.addColorStop(1,"rgba(0,0,0,1)"),I.fillStyle=W,I.fillRect(0,0,O,M)},f=(_,A)=>{const O=_.components()[0].element.dom,M=Pf(A,100,100),I=RM(M);d(O,BM(I))},p=(_,A)=>{const O=N6(Iy(A));Kl.setValue(_,{x:O.saturation,y:100-O.value}),Ee(_.element,"aria-valuetext",o(["Saturation {0}%, Brightness {1}%",O.saturation,O.value]))};return pc({factory:_=>{const A=nt({x:0,y:0}),O=(L,W,j)=>{la(j)||Ee(L.element,"aria-valuetext",o(["Saturation {0}%, Brightness {1}%",Math.floor(j.x),Math.floor(100-j.y)])),be(L,wN,{value:j})},M=(L,W,j,V)=>{d(j.element.dom,BM(FM))},I=Pt([Rt.config({find:k.some}),Ie.config({})]);return Kl.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":o(["Saturation {0}%, Brightness {1}%",0,0])},classes:[s("sv-palette")]},model:{mode:"xy",getInitialValue:A},rounded:!1,components:[a,c],onChange:O,onInit:M,sliderBehaviours:I})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(_,A,O)=>{f(A,O)},setThumb:(_,A,O)=>{p(A,O)}},extraApis:{}})},AN=(o,s,a,c)=>{const d=p=>{const y=tj(o,s,p.onValidHex,p.onInvalidHex,a,c),C=ej(o,s),_=Ot=>(100-Ot)/100*360,A=Ot=>100-Ot/360*100,O={paletteRgba:fe(FM),paletteHue:fe(0)},M=Mo(_N(o,s)),I=Mo(C.sketch({})),L=Mo(y.sketch({})),W=(Ot,Tt,xe)=>{I.getOpt(Ot).each(le=>{C.setHue(le,xe)})},j=(Ot,Tt)=>{L.getOpt(Ot).each(xe=>{y.updateHex(xe,Tt)})},V=(Ot,Tt,xe)=>{M.getOpt(Ot).each(le=>{Kl.setValue(le,A(xe))})},K=(Ot,Tt)=>{I.getOpt(Ot).each(xe=>{C.setThumb(xe,Tt)})},tt=(Ot,Tt)=>{const xe=Iy(Ot);O.paletteRgba.set(xe),O.paletteHue.set(Tt)},ct=(Ot,Tt,xe,le)=>{tt(Tt,xe),It(le,Qe=>{Qe(Ot,Tt,xe)})},dt=()=>{const Ot=[j];return(Tt,xe)=>{const le=xe.event.value,Qe=O.paletteHue.get(),ye=Pf(Qe,le.x,100-le.y),je=od(ye);ct(Tt,je,Qe,Ot)}},Wt=()=>{const Ot=[W,j];return(Tt,xe)=>{const le=_(xe.event.value),Qe=O.paletteRgba.get(),ye=N6(Qe),je=Pf(le,ye.saturation,ye.value),ue=od(je);ct(Tt,ue,le,Ot)}},kt=()=>{const Ot=[W,V,K];return(Tt,xe)=>{const le=xe.event.hex,Qe=MM(le);ct(Tt,le,Qe.hue,Ot)}};return{uid:p.uid,dom:p.dom,components:[I.asSpec(),M.asSpec(),L.asSpec()],behaviours:Pt([Me("colour-picker-events",[vt(V3,kt()),vt(wN,dt()),vt(CN,Wt())]),Rt.config({find:Ot=>L.getOpt(Ot)}),pe.config({mode:"acyclic"})])}};return pc({name:"ColourPicker",configFields:[At("dom"),at("onValidHex",q),at("onInvalidHex",q)],factory:d})},TN={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red channel","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green channel","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue channel","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.rgb.invalid":"Numbers only, 0 to 255","colorcustom.rgb.invalidHex":"Hexadecimal only, 000000 to FFFFFF","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},DN=o=>s=>$e(s)?o.translate(TN[s]):o.translate(s),W3=(o,s,a)=>{const c=_=>"tox-"+_,d=(_,A,O=_,M=_)=>yc(O,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+_],attributes:{title:s.translate(M),"aria-live":"polite",...A.fold(()=>({}),I=>({id:I}))}},s.icons),f=AN(DN(s),c,s.tooltips.getConfig,d),p=_=>{be(_,Jl,{name:"hex-valid",value:!0})},y=_=>{be(_,Jl,{name:"hex-valid",value:!1})},C=Mo(f.sketch({dom:{tag:"div",classes:[c("color-picker-container")],attributes:{role:"presentation"}},onValidHex:p,onInvalidHex:y}));return{dom:{tag:"div"},components:[C.asSpec()],behaviours:Pt([$h(a,_=>{const A=C.get(_);return Rt.getCurrent(A).bind(I=>ne.getValue(I).hex).map(I=>"#"+dx(I,"#")).getOr("")},(_,A)=>
80{const O=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,M=k.from(O.exec(A)).bind(W=>Vn(W,1)),I=C.get(_);Rt.getCurrent(I).fold(()=>{console.log("Can not find form")},W=>{ne.setValue(W,{hex:M.getOr("")}),kf.getField(W,"hex").each(j=>{no(j,Lc())})})}),Ql.self()])}};var ON=tinymce.util.Tools.resolve("tinymce.Resource");const RN=o=>nn(o,"init"),oj=o=>{const s=Ze(),a=Mo({dom:{tag:o.tag}}),c=Ze(),d=!RN(o)&&o.onFocus.isSome()?[Ie.config({onFocus:f=>{o.onFocus.each(p=>{p(f.element.dom)})}}),gn.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Pt([Me("custom-editor-events",[vn(f=>{a.getOpt(f).each(p=>{(RN(o)?o.init(p.element.dom):ON.load(o.scriptId,o.scriptUrl).then(y=>y(p.element.dom,o.settings))).then(y=>{c.on(C=>{y.setValue(C)}),c.clear(),s.set(y)})})})]),$h(k.none(),()=>s.get().fold(()=>c.get().getOr(""),f=>f.getValue()),(f,p)=>{s.get().fold(()=>c.set(p),y=>y.setValue(p))}),Ql.self()].concat(d)),components:[a.asSpec()]}};var tm=tinymce.util.Tools.resolve("tinymce.util.Tools");const mD=ee("browse.files.event"),nj=(o,s,a)=>{const c=tm.explode(s.getOption("images_file_types")),d=f=>a.fold(()=>ps(c,p=>du(f.name.toLowerCase(),`.${p.toLowerCase()}`)),p=>ps(p,y=>du(f.name.toLowerCase(),`.${y.toLowerCase()}`)));return Io(sx(o),d)},sj=(o,s,a)=>{const c=(M,I)=>{I.stop()},d=M=>(I,L)=>{It(M,W=>{W(I,L)})},f=(M,I)=>{var L;if(!ce.isDisabled(M)){const W=I.event.raw;be(M,mD,{files:(L=W.dataTransfer)==null?void 0:L.files})}},p=(M,I)=>{const L=I.event.raw.target;be(M,mD,{files:L.files})},y=(M,I)=>{I&&(ne.setValue(M,nj(I,s,o.allowedFileExtensions)),be(M,Ga,{name:o.name}))},C=Mo({dom:{tag:"input",attributes:{type:"file",accept:o.allowedFileTypes.getOr("image/*")},styles:{display:"none"}},behaviours:Pt([Me("input-file-events",[Lm(km()),Lm(Zg())])])}),_=o.label.map(M=>ug(M,s)),A=ro.parts.field({factory:Ks,dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[En(s.translate(o.buttonLabel.getOr("Browse for an image"))),C.asSpec()],action:M=>{C.get(M).element.dom.click()},buttonBehaviours:Pt([Ql.self(),z3(a.getOr([])),gn.config({}),td.button(()=>s.checkUiComponentContext(o.context).shouldDisable),ms(()=>s.checkUiComponentContext(o.context))])}),O={dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Pt([ce.config({disabled:()=>s.checkUiComponentContext(o.context).shouldDisable}),ms(()=>s.checkUiComponentContext(o.context)),go.config({toggleClass:"dragenter",toggleOnExecute:!1}),Me("dropzone-events",[vt("dragenter",d([c,go.toggle])),vt("dragleave",d([c,go.toggle])),vt("dragover",c),vt("drop",d([c,f])),vt(Sm(),p)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[En(s.translate(o.dropAreaLabel.getOr("Drop an image here")))]},A]}]};return Rb(_,O,["tox-form__group--stretched"],[Me("handle-files",[vt(mD,(M,I)=>{ro.getField(M).each(L=>{y(L,I.event.files)})})])])},rj=(o,s)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${o.columns}col`]},components:pt(o.items,s.interpreter)}),Z3=ee("alloy-fake-before-tabstop"),gD=ee("alloy-fake-after-tabstop"),BN=o=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:o},behaviours:Pt([Ie.config({ignore:!0}),gn.config({})])}),FN=(o,s)=>({dom:{tag:"div",classes:["tox-navobj",...o.getOr([])]},components:[BN([Z3]),s,BN([gD])],behaviours:Pt([Ql.childAt(1)])}),fD=(o,s)=>{be(o,qs(),{raw:{which:9,shiftKey:s}})},MN=(o,s)=>{const a=s.element;bs(a,Z3)?fD(o,!0):bs(a,gD)&&fD(o,!1)},Vy=o=>cp(o,["."+Z3,"."+gD].join(","),Fo),j3=ee("update-dialog"),pD=ee("update-title"),NN=ee("update-body"),PN=ee("update-footer"),Fe=ee("body-send-message"),Lf=ee("dialog-focus-shifted"),G3=Cr().browser,Bb=G3.isSafari(),IN=G3.isFirefox(),hD=Bb||IN,aj=G3.isChromium(),$N=({scrollTop:o,scrollHeight:s,clientHeight:a})=>Math.ceil(o)+a>=s,LN=(o,s)=>o.scrollTo(0,s==="bottom"?99999999:s),ij=(o,s)=>{const a=o.body;return k.from(!/^<!DOCTYPE (html|HTML)/.test(s)&&(!aj&&!Bb||$n(a)&&(a.scrollTop!==0||Math.abs(a.scrollHeight-a.clientHeight)>1))?a:o.documentElement)},HN=(o,s,a)=>{const c=o.dom;k.from(c.contentDocument).fold(a,d=>{let f=0;const p=ij(d,s).map(C=>(f=C.scrollTop,C)).forall($N),y=()=>{const C=c.contentWindow;$n(C)&&(p?LN(C,"bottom"):!p&&hD&&f!==0&&LN(C,f))};Bb&&c.addEventListener("load",y,{once:!0}),d.open(),d.write(s),d.close(),Bb||y()})},zN=yi(hD,Bb?500:200).map(o=>Bs(HN,o)),_X=(o,s)=>{const a=fe(o.getOr(""));return{getValue:c=>a.get(),setValue:(c,d)=>
80{if(a.get()!==d){const f=c.element,p=()=>Ee(f,"srcdoc",d);s?zN.fold(nt(HN),y=>y.throttle)(f,d,p):p()}a.set(d)}}},Uy=(o,s,a)=>{const c="tox-dialog__iframe",d=o.transparent?[]:[`${c}--opaque`],f=o.border?["tox-navobj-bordered"]:[],p={...o.label.map(O=>({title:O})).getOr({}),...a.map(O=>({srcdoc:O})).getOr({}),...o.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},y=_X(a,o.streamContent),C=o.label.map(O=>ug(O,s)),_=O=>FN(k.from(f),{uid:O.uid,dom:{tag:"iframe",attributes:p,classes:[c,...d]},behaviours:Pt([gn.config({}),Ie.config({}),$h(a,y.getValue,y.setValue),na.config({channels:{[Lf]:{onReceive:(M,I)=>{I.newFocus.each(L=>{xl(M.element).each(W=>{(ln(M.element,L)?sn:Un)(W,"tox-navobj-bordered-focus")})})}}}})])}),A=ro.parts.field({factory:{sketch:_}});return Rb(C,A,["tox-form__group--stretched"],[])},bD=(o,s,a,c,d)=>{const f=a*d,p=c*d,y=Math.max(0,o/2-f/2),C=Math.max(0,s/2-p/2);return{left:y.toString()+"px",top:C.toString()+"px",width:f.toString()+"px",height:p.toString()+"px"}},VN=(o,s,a)=>{const c=Ir(o),d=Zs(o);return Math.min(c/s,d/a,1)},lj=(o,s)=>{const a=fe(s.getOr({url:""})),c=Mo({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:s.map(C=>({src:C.url})).getOr({})}}),d=Mo({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[c.asSpec()]}),f=(C,_)=>{const A={url:_.url};_.zoom.each(M=>A.zoom=M),_.cachedWidth.each(M=>A.cachedWidth=M),_.cachedHeight.each(M=>A.cachedHeight=M),a.set(A);const O=()=>{const{cachedWidth:M,cachedHeight:I,zoom:L}=A;if(!zs(M)&&!zs(I)){if(zs(L)){const j=VN(C.element,M,I);A.zoom=j}const W=bD(Ir(C.element),Zs(C.element),M,I,A.zoom);d.getOpt(C).each(j=>{qn(j.element,W)})}};c.getOpt(C).each(M=>{const I=M.element;_.url!==Ws(I,"src")&&(Ee(I,"src",_.url),Un(C.element,"tox-imagepreview__loaded")),O(),Nc(I).then(L=>{C.getSystem().isConnected()&&(sn(C.element,"tox-imagepreview__loaded"),A.cachedWidth=L.dom.naturalWidth,A.cachedHeight=L.dom.naturalHeight,O())})})},p={};o.height.each(C=>p.height=C);const y=s.map(C=>({url:C.url,zoom:k.from(C.zoom),cachedWidth:k.from(C.cachedWidth),cachedHeight:k.from(C.cachedHeight)}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:p,attributes:{role:"presentation"}},components:[d.asSpec()],behaviours:Pt([Ql.self(),$h(y,()=>a.get(),f)])}},uj=(o,s,a)=>{const c="tox-label",d=o.align==="center"?[`${c}--center`]:[],f=o.align==="end"?[`${c}--end`]:[],p=Mo({dom:{tag:"label",classes:[c,...d,...f]},components:[En(s.providers.translate(o.label))]}),y=pt(o.items,s.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[p.asSpec(),...y],behaviours:Pt([Ql.self(),ze.config({}),JZ(k.none()),pe.config({mode:"acyclic"}),Me("label",[vn(C=>{o.for.each(_=>{a(_).each(A=>{p.getOpt(C).each(O=>{const M=Ws(A.element,"id")??ee("form-field");Ee(A.element,"id",M),Ee(O.element,"for",M)})})})})])])}},xD=ee("toolbar.button.execute"),dj=o=>Md((s,a)=>{Fy(o,s)(c=>
80{be(s,xD,{buttonApi:c}),o.onAction(c)})}),em=ee("common-button-display-events"),vD={[mr()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[Hc()]:["toolbar-button-events",em],[Mi()]:["toolbar-button-events","dropdown-events","tooltipping"],[va()]:["focusing","alloy.base.behaviour",em]},q3=o=>Be(o.element,"width",Dn(o.element,"width")),UN=(o,s,a)=>yc(o,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:a},s),yD=(o,s)=>UN(o,s,[]),Hf=(o,s)=>UN(o,s,[ze.config({})]),CD=(o,s,a)=>({dom:{tag:"span",classes:[`${s}__select-label`]},components:[En(a.translate(o))],behaviours:Pt([ze.config({})])}),rl=ee("update-menu-text"),Lh=ee("update-menu-icon"),K3=ee("update-tooltip-text"),wD=(o,s,a,c)=>{const d=fe(q),f=fe(o.tooltip),p=o.text.map(j=>Mo(CD(j,s,a.providers))),y=o.icon.map(j=>Mo(Hf(j,a.providers.icons))),C=(j,V)=>{const K=ne.getValue(j);return Ie.focus(K),be(K,"keydown",{raw:V.event.raw}),gi.close(K),k.some(!0)},_=o.role.fold(()=>({}),j=>({role:j})),A=k.from(o.listRole).map(j=>({listRole:j})).getOr({}),O=o.ariaLabel.fold(()=>({}),j=>({"aria-label":a.providers.translate(j)})),M=yc("chevron-down",{tag:"div",classes:[`${s}__select-chevron`]},a.providers.icons),I=ee("common-button-display-events"),L="dropdown-events";return Mo(gi.sketch({...o.uid?{uid:o.uid}:{},..._,...A,dom:{tag:"button",classes:[s,`${s}--select`].concat(pt(o.classes,j=>`${s}--${j}`)),attributes:{...O,...$n(c)?{"data-mce-name":c}:{}}},components:Xd([y.map(j=>j.asSpec()),p.map(j=>j.asSpec()),k.some(M)]),matchWidth:!0,useMinWidth:!0,onOpen:(j,V,K)=>{o.searchable&&zZ(K)},dropdownBehaviours:Pt([...o.dropdownBehaviours,td.button(()=>o.disabled||a.providers.checkUiComponentContext(o.context).shouldDisable),ms(()=>a.providers.checkUiComponentContext(o.context)),Wu.config({}),ze.config({}),...o.tooltip.map(j=>yn.config(a.providers.tooltips.getConfig({tooltipText:a.providers.translate(j),onShow:V=>{if(Ec(f.get(),o.tooltip,(K,tt)=>tt!==K).getOr(!1)){const K=a.providers.translate(f.get().getOr(""));yn.setComponents(V,a.providers.tooltips.getComponents({tooltipText:K}))}}}))).toArray(),Me(L,[ed(o,d),Nf(o,d)]),Me(I,[vn((j,V)=>{o.listRole!=="listbox"&&q3(j)})]),Me("update-dropdown-width-variable",[vt(jg(),(j,V)=>gi.close(j))]),Me("menubutton-update-display-text",[vt(rl,(j,V)=>{p.bind(K=>K.getOpt(j)).each(K=>{ze.set(K,[En(a.providers.translate(V.event.text))])})}),vt(Lh,(j,V)=>{y.bind(K=>K.getOpt(j)).each(K=>{ze.set(K,[Hf(V.event.icon,a.providers.icons)])})}),vt(K3,(j,V)=>{const K=a.providers.translate(V.event.text);Ee(j.element,"aria-label",K),f.set(k.some(V.event.text))})])]),eventOrder:kn(vD,{[va()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[Hc()]:["toolbar-button-events",yn.name(),L,I]}),sandboxBehaviours:Pt([pe.config({mode:"special",onLeft:C,onRight:C}),Me("dropdown-sandbox-events",[vt(AF,(j,V)=>{IZ(j),V.stop()}),vt(TF,(j,V)=>{$Z(j,V),V.stop()})])]),lazySink:a.getSink,toggleClass:`${s}--active`,parts:{menu:{..._y(!1,o.columns,o.presets),fakeFocus:o.searchable,...o.listRole==="listbox"?{}:{onHighlightItem:cN,onCollapseMenu:(j,V,K)=>{Bo.getHighlighted(K).each(tt=>{cN(j,K,tt)})},onDehighlightItem:HZ}}},getAnchorOverrides:()=>({maxHeightFunction:(j,V)=>{R2()(j,V-10)}}),fetch:j=>cs.nu(so(o.fetch,j))})).asSpec()},Y3=o=>$e(o),WN=o=>o.type==="separator",ZN=o=>nn(o,"getSubmenuItems"),mj={type:"separator"},gj=(o,s)=>{const a=Zo(o,(c,d)=>Y3(d)?d===""?c:d==="|"?c.length>0&&!WN(c[c.length-1])?c.concat([mj]):c:nn(s,d.toLowerCase())?c.concat([s[d.toLowerCase()]]):c:c.concat([d]),[]);return a.length>0&&WN(a[a.length-1])&&a.pop(),a},SX=(o,s)=>{const a=o.getSubmenuItems(),c=jN(a,s),d=kn(c.menus,{[o.value]:c.items}),f=kn(c.expansions,{[o.value]:o.value});return{item:o,menus:d,expansions:f}},fj=o=>{const s=he(o,"value").getOrThunk(()=>ee("generated-menu-item"));return kn({value:s},o)},jN=(o,s)=>{const a=gj($e(o)?o.split(" "):o,s);return An(a,(c,d)=>{if(ZN(d)){const f=fj(d),p=SX(f,s);return{menus:kn(c.menus,p.menus),items:[p.item,...c.items],expansions:kn(c.expansions,p.expansions)}}else return{...c,items:[d,...c.items]}},{menus:{},expansions:{},items:[]})},_D=o=>
80o.search.fold(()=>({searchMode:"no-search"}),s=>({searchMode:"search-with-field",placeholder:s.placeholder})),pj=o=>o.search.fold(()=>({searchMode:"no-search"}),s=>({searchMode:"search-with-results"})),mg=(o,s,a,c)=>{const d=ee("primary-menu"),f=jN(o,a.shared.providers.menuItems());if(f.items.length===0)return k.none();const p=_D(c),y=$3(d,f.items,s,a,c.isHorizontalMenu,p),C=pj(c),_=hs(f.menus,(O,M)=>$3(M,O,s,a,!1,C)),A=kn(_,_d(d,y));return k.from(ph.tieredData(d,A,f.expansions))},Wy=o=>!nn(o,"items"),SD="data-value",X3=(o,s,a,c,d)=>pt(a,f=>Wy(f)?{type:"togglemenuitem",...d?{}:{role:"option"},text:f.text,value:f.value,active:f.value===c,onAction:()=>{ne.setValue(o,f.value),be(o,Ga,{name:s}),Ie.focus(o)}}:{type:"nestedmenuitem",text:f.text,getSubmenuItems:()=>X3(o,s,f.items,c,d)}),kD=(o,s)=>bi(o,a=>Wy(a)?yi(a.value===s,a):kD(a.items,s)),GN=(o,s,a)=>{const c=ps(o.items,_=>!Wy(_)),d=s.shared.providers,f=a.bind(_=>kD(o.items,_)).orThunk(()=>Xo(o.items).filter(Wy)),p=o.label.map(_=>ug(_,d)),y=ro.parts.field({dom:{},factory:{sketch:_=>wD({context:o.context,uid:_.uid,text:f.map(A=>A.text),icon:k.none(),tooltip:k.none(),role:yi(!c,"combobox"),...c?{}:{listRole:"listbox"},ariaLabel:o.label,fetch:(A,O)=>{const M=X3(A,o.name,o.items,ne.getValue(A),c);O(mg(M,Xl.CLOSE_ON_EXECUTE,s,{isHorizontalMenu:!1,search:k.none()}))},onSetup:nt(q),getApi:nt({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[gn.config({}),$h(f.map(A=>A.value),A=>Ws(A.element,SD),(A,O)=>{kD(o.items,O).each(M=>{Ee(A.element,SD,M.value),be(A,rl,{text:M.text})})})]},"tox-listbox",s.shared)}}),C={dom:{tag:"div",classes:["tox-listboxfield"]},components:[y]};return ro.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:wt([p.toArray(),[C]]),fieldBehaviours:Pt([ce.config({disabled:()=>!o.enabled||d.checkUiComponentContext(o.context).shouldDisable,onDisabled:_=>{ro.getField(_).each(ce.disable)},onEnabled:_=>{ro.getField(_).each(ce.enable)}})])})},Fb=(o,s)=>({dom:{tag:"div",classes:o.classes},components:pt(o.items,s.shared.interpreter)}),qN=(o,s,a)=>{const c=pt(o.items,C=>({text:s.translate(C.text),value:C.value})),d=o.label.map(C=>ug(C,s)),f=ro.parts.field({dom:{},...a.map(C=>({data:C})).getOr({}),selectAttributes:{size:o.size},options:c,factory:TT,selectBehaviours:Pt([ce.config({disabled:()=>!o.enabled||s.checkUiComponentContext(o.context).shouldDisable}),gn.config({}),Me("selectbox-change",[vt(Sm(),(C,_)=>{be(C,Ga,{name:o.name})})])])}),p=o.size>1?k.none():k.some(yc("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},s.icons)),y={dom:{tag:"div",classes:["tox-selectfield"]},components:wt([[f],p.toArray()])};return ro.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:wt([d.toArray(),[y]]),fieldBehaviours:Pt([ce.config({disabled:()=>!o.enabled||s.checkUiComponentContext(o.context).shouldDisable,onDisabled:C=>{ro.getField(C).each(ce.disable)},onEnabled:C=>{ro.getField(C).each(ce.enable)}}),ms(()=>s.checkUiComponentContext(o.context))])})},KN=o=>{const s={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},a=d=>d in s?s[d]:1;let c=o.value.toFixed(a(o.unit));return c.indexOf(".")!==-1&&(c=c.replace(/\.?0*$/,"")),c+o.unit},J3=o=>{const a=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(o);if(a!==null){const c=parseFloat(a[1]),d=a[2];return Te.value({value:c,unit:d})}else return Te.error(o)},YN=(o,s)=>{const a={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},c=d=>nn(a,d);return o.unit===s?k.some(o.value):c(o.unit)&&c(s)?a[o.unit]===a[s]?k.some(o.value):k.some(o.value/a[o.unit]*a[s]):k.none()},Mb=o=>k.none(),hj=(o,s)=>a=>YN(a,s).map(c=>({value:c*o,unit:s})),XN=(o,s)=>{const a=J3(o).toOptional(),c=J3(s).toOptional();return Ec(a,c,(d,f)=>YN(d,f.unit).map(p=>f.value/p).map(p=>hj(p,f.unit)).getOr(Mb)).getOr(Mb)},JN=(o,s)=>{let a=Mb;const c=ee("ratio-event"),d=W=>yc(W,{tag:"span",classes:["tox-icon","tox-lock-icon__"+W]},s.icons),f=()=>!o.enabled||s.checkUiComponentContext(o.context).shouldDisable,p=ms(()=>s.checkUiComponentContext(o.context)),y=o.label.getOr("Constrain proportions"),C=s.translate(y),_=ds.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":C,"data-mce-name":y}},components:[d("lock"),d("unlock")],buttonBehaviours:Pt([ce.config({disabled:f}),p,gn.config({}),yn.config(s.tooltips.getConfig({tooltipText:C}))])}),A=W=>({dom:{tag:"div",classes:["tox-form__group"]},components:W}),O=W=>ro.parts.field({factory:qd,inputClasses:["tox-textfield"],inputBehaviours:Pt([ce.config({disabled:f}),p,gn.config({}),Me("size-input-events",[vt(ac(),(j,V)=>{be(j,c,{isField1:W})}),vt(Sm(),(j,V)=>{be(j,Ga,{name:o.name})})])]),selectOnFocus:!1}),M=W=>({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(W))]}
80),I=ds.parts.field1(A([ro.parts.label(M("Width")),O(!0)])),L=ds.parts.field2(A([ro.parts.label(M("Height")),O(!1)]));return ds.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[I,L,A([M(AC),_])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(W,j,V)=>{J3(ne.getValue(W)).each(K=>{a(K).each(tt=>{ne.setValue(j,KN(tt))})})},coupledFieldBehaviours:Pt([ce.config({disabled:f,onDisabled:W=>{ds.getField1(W).bind(ro.getField).each(ce.disable),ds.getField2(W).bind(ro.getField).each(ce.disable),ds.getLock(W).each(ce.disable)},onEnabled:W=>{ds.getField1(W).bind(ro.getField).each(ce.enable),ds.getField2(W).bind(ro.getField).each(ce.enable),ds.getLock(W).each(ce.enable)}}),ms(()=>s.checkUiComponentContext("mode:design")),Me("size-input-events2",[vt(c,(W,j)=>{const V=j.event.isField1,K=V?ds.getField1(W):ds.getField2(W),tt=V?ds.getField2(W):ds.getField1(W),ct=K.map(ne.getValue).getOr(""),dt=tt.map(ne.getValue).getOr("");a=XN(ct,dt)})])])})},bj=(o,s,a)=>{const c=Kl.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(o.label))]}),d=Kl.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),f=Kl.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Kl.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:o.min,maxX:o.max,getInitialValue:nt(a.getOrThunk(()=>(Math.abs(o.max)-Math.abs(o.min))/2))},components:[c,d,f],sliderBehaviours:Pt([Ql.self(),Ie.config({})]),onChoose:(p,y,C)=>{be(p,Ga,{name:o.name,value:C})},onChange:(p,y,C)=>{be(p,Ga,{name:o.name,value:C})}})},xj=(o,s)=>{const a=y=>({dom:{tag:"th",innerHtml:s.translate(y)}}),c=y=>({dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:pt(y,a)}]}),d=y=>({dom:{tag:"td",innerHtml:s.translate(y)}}),f=y=>({dom:{tag:"tr"},components:pt(y,d)}),p=y=>({dom:{tag:"tbody"},components:pt(y,f)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[c(o.header),p(o.cells)],behaviours:Pt([gn.config({}),Ie.config({})])}},QN=(o,s)=>{const a=o.label.map(L=>ug(L,s)),c=[ce.config({disabled:()=>o.disabled||s.checkUiComponentContext(o.context).shouldDisable}),ms(()=>s.checkUiComponentContext(o.context)),pe.config({mode:"execution",useEnter:o.multiline!==!0,useControlEnter:o.multiline===!0,execute:L=>(no(L,zy),k.some(!0))}),Me("textfield-change",[vt(Lc(),(L,W)=>{be(L,Ga,{name:o.name})}),vt(N1(),(L,W)=>{be(L,Ga,{name:o.name})})]),gn.config({})],d=o.validation.map(L=>hc.config({getRoot:W=>xl(W.element),invalidClass:"tox-invalid",validator:{validate:W=>{const j=ne.getValue(W),V=L.validator(j);return cs.pure(V===!0?Te.value(j):Te.error(V))},validateOnLoad:L.validateOnLoad}})).toArray(),f=o.placeholder.fold(nt({}),L=>({placeholder:s.translate(L)})),p=o.inputMode.fold(nt({}),L=>({inputmode:L})),C={...o.spellcheck.fold(nt({}),L=>({spellcheck:L})),...f,...p,"data-mce-name":o.name},_=ro.parts.field({tag:o.multiline===!0?"textarea":"input",...o.data.map(L=>({data:L})).getOr({}),inputAttributes:C,inputClasses:[o.classname],inputBehaviours:Pt(wt([c,d])),selectOnFocus:!1,factory:qd}),A=o.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[_]}:_,M=(o.flex?["tox-form__group--stretched"]:[]).concat(o.maximized?["tox-form-group--maximize"]:[]),I=[ce.config({disabled:()=>o.disabled||s.checkUiComponentContext(o.context).shouldDisable,onDisabled:L=>{ro.getField(L).each(ce.disable)},onEnabled:L=>{ro.getField(L).each(ce.enable)}}),ms(()=>s.checkUiComponentContext(o.context))];return Rb(a,A,M,I)},tP=(o,s,a)=>QN({name:o.name,multiline:!1,label:o.label,inputMode:o.inputMode,placeholder:o.placeholder,flex:!1,disabled:!o.enabled,classname:"tox-textfield",validation:k.none(),maximized:o.maximized,data:a,context:o.context,spellcheck:k.none()},s),vj=(o,s,a)=>QN({name:o.name,multiline:!0,label:o.label,inputMode:k.none(),placeholder:o.placeholder,flex:!0,disabled:!o.enabled,classname:"tox-textarea",validation:k.none(),maximized:o.maximized,data:a,context:o.context,spellcheck:o.spellcheck},s),eP=o=>({isEnabled:()=>!ce.isDisabled(o),setEnabled:s=>
vendor: 4,085 bytes, line 80
80ce.set(o,!s),setActive:s=>{const a=o.element;s?(sn(a,"tox-tbtn--enabled"),Ee(a,"aria-pressed",!0)):(Un(a,"tox-tbtn--enabled"),Tn(a,"aria-pressed"))},isActive:()=>bs(o.element,"tox-tbtn--enabled"),setTooltip:s=>{be(o,K3,{text:s})},setText:s=>{be(o,rl,{text:s})},setIcon:s=>be(o,Lh,{icon:s})}),Zy=(o,s,a,c,d=!0,f)=>{const p=o.buttonType==="bordered"?["bordered"]:[];return wD({text:o.text,icon:o.icon,tooltip:o.tooltip,ariaLabel:o.tooltip,searchable:o.search.isSome(),role:c,fetch:(y,C)=>{const _={pattern:o.search.isSome()?Hy(y):""};o.fetch(A=>{C(mg(A,Xl.CLOSE_ON_EXECUTE,a,{isHorizontalMenu:!1,search:o.search}))},_,eP(y))},onSetup:o.onSetup,getApi:y=>eP(y),columns:1,presets:"normal",classes:p,dropdownBehaviours:[...d?[gn.config({})]:[]],context:o.context},s,a.shared,f)},yj=(o,s,a)=>{const c=f=>p=>{const y=!p.isActive();p.setActive(y),f.storage.set(y),a.shared.getSink().each(C=>{s().getOpt(C).each(_=>{Js(_.element),be(_,Jl,{name:f.name,value:f.storage.get()})})})},d=f=>p=>{p.setActive(f.storage.get())};return f=>{f(pt(o,p=>{const y=p.text.fold(()=>({}),C=>({text:C}));return{type:p.type,active:!1,...y,context:p.context,onAction:c(p),onSetup:d(p)}}))}},oP=o=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":o}},components:[En(o)]}),nP=(o,s,a)=>{o.customStateIcon.each(c=>s.push(rP(c,a.shared.providers.icons,o.customStateIconTooltip.fold(()=>[],d=>[yn.config(a.shared.providers.tooltips.getConfig({tooltipText:d}))]),["tox-icon-custom-state"])))},sP=ee("leaf-label-event-id"),ED=({leaf:o,onLeafAction:s,visible:a,treeId:c,selectedId:d,backstage:f})=>{const p=o.menu.map(C=>Zy(C,"tox-mbtn",f,k.none(),a)),y=[oP(o.title)];return nP(o,y,f),p.each(C=>y.push(C)),Ks.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(a?["tox-tree--leaf__label--visible"]:[])},components:y,role:"treeitem",action:C=>{s(o.id),C.getSystem().broadcastOn([`update-active-item-${c}`],{value:o.id})},eventOrder:{[qs()]:[sP,"keying"]},buttonBehaviours:Pt([...a?[gn.config({})]:[],go.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),na.config({channels:{[`update-active-item-${c}`]:{onReceive:(C,_)=>{(_.value===o.id?go.on:go.off)(C)}}}}),Me(sP,[vn((C,_)=>{d.each(A=>{(A===o.id?go.on:go.off)(C)})}),vt(qs(),(C,_)=>{const A=_.event.raw.code==="ArrowLeft",O=_.event.raw.code==="ArrowRight";A?(ec(C.element,".tox-tree--directory").each(M=>{C.getSystem().getByDom(M).each(I=>{fd(M,".tox-tree--directory__label").each(L=>{I.getSystem().getByDom(L).each(Ie.focus)})})}),_.stop()):O&&_.stop()})])])})},rP=(o,s,a,c,d)=>yc(o,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"].concat(c||[]),behaviours:a,attributes:d},s),Cj=(o,s)=>rP(o,s,[]),aP=ee("directory-label-event-id"),iP=({directory:o,visible:s,noChildren:a,backstage:c})=>{const d=o.menu.map(y=>Zy(y,"tox-mbtn",c,k.none())),f=[{dom:{tag:"div",classes:["tox-chevron"]},components:[Cj("chevron-right",c.shared.providers.icons)]},oP(o.title)];nP(o,f,c),d.each(y=>{f.push(y)});const p=y=>{ec(y.element,".tox-tree--directory").each(C=>{y.getSystem().getByDom(C).each(_=>{const A=!go.isOn(_);go.toggle(_),be(y,"expand-tree-node",{expanded:A,node:o.id})})})};return Ks.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(s?["tox-tree--directory__label--visible"]:[])},components:f,action:p,eventOrder:{[qs()]:[aP,"keying"]},buttonBehaviours:Pt([...s?[gn.config({})]:[],Me(aP,[vt(qs(),(y,C)=>{const _=C.event.raw.code==="ArrowRight",A=C.event.raw.code==="ArrowLeft";_&&a&&C.stop(),(_||A)&&ec(y.element,".tox-tree--directory").each(O=>{y.getSystem().getByDom(O).each(M=>{!go.isOn(M)&&_||go.isOn(M)&&A?(p(y),C.stop()):A&&!go.isOn(M)&&(ec(M.element,".tox-tree--directory").each(I=>{fd(I,".tox-tree--directory__label").each(L=>{M.getSystem().getByDom(L).each(Ie.focus)})}),C.stop())})})})])])})},wj=({children:o,onLeafAction:s,visible:a,treeId:c,expandedIds:d,selectedId:f,backstage:p})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:o.map(y=>y.type==="leaf"?ED({leaf:y,selectedId:f,onLeafAction:s,visible:a,treeId:c,backstage:p}
80):AD({directory:y,expandedIds:d,selectedId:f,onLeafAction:s,labelTabstopping:a,treeId:c,backstage:p})),behaviours:Pt([_a.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking",expanded:a}),ze.config({})])}),_j=ee("directory-event-id"),AD=({directory:o,onLeafAction:s,labelTabstopping:a,treeId:c,backstage:d,expandedIds:f,selectedId:p})=>{const{children:y}=o,C=fe(f),_=O=>y.map(M=>M.type==="leaf"?ED({leaf:M,selectedId:p,onLeafAction:s,visible:O,treeId:c,backstage:d}):AD({directory:M,expandedIds:C.get(),selectedId:p,onLeafAction:s,labelTabstopping:O,treeId:c,backstage:d})),A=f.includes(o.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[iP({directory:o,visible:a,noChildren:o.children.length===0,backstage:d}),wj({children:y,expandedIds:f,selectedId:p,onLeafAction:s,visible:A,treeId:c,backstage:d})],behaviours:Pt([Me(_j,[vn((O,M)=>{go.set(O,A)}),vt("expand-tree-node",(O,M)=>{const{expanded:I,node:L}=M.event;C.set(I?[...C.get(),L]:C.get().filter(W=>W!==L))})]),go.config({...o.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(O,M)=>{const I=O.components()[1],L=_(M);M?_a.grow(I):_a.shrink(I),ze.set(I,L)}})])}},Sj=ee("tree-event-id"),kj=(o,s)=>{const a=o.onLeafAction.getOr(q),c=o.onToggleExpand.getOr(q),d=o.defaultExpandedIds,f=fe(d),p=fe(o.defaultSelectedId),y=ee("tree-id"),C=(_,A)=>o.items.map(O=>O.type==="leaf"?ED({leaf:O,selectedId:_,onLeafAction:a,visible:!0,treeId:y,backstage:s}):AD({directory:O,selectedId:_,onLeafAction:a,expandedIds:A,labelTabstopping:!0,treeId:y,backstage:s}));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:C(p.get(),f.get()),behaviours:Pt([pe.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),Me(Sj,[vt("expand-tree-node",(_,A)=>{const{expanded:O,node:M}=A.event;f.set(O?[...f.get(),M]:f.get().filter(I=>I!==M)),c(f.get(),{expanded:O,node:M})})]),na.config({channels:{[`update-active-item-${y}`]:{onReceive:(_,A)=>{p.set(k.some(A.value)),ze.set(_,C(k.some(A.value),f.get()))}}}}),ze.config({})])}},Q3=(o,s,a=[],c,d,f,p)=>{const y=s.fold(()=>({}),A=>({action:A})),C={buttonBehaviours:Pt([td.item(()=>!o.enabled||p.checkUiComponentContext(o.context).shouldDisable),ms(()=>p.checkUiComponentContext(o.context)),gn.config({}),...f.map(A=>yn.config(p.tooltips.getConfig({tooltipText:p.translate(A)}))).toArray(),Me("button press",[F2("click")])].concat(a)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...y},_=kn(C,{dom:c});return kn(_,{components:d})},cP=(o,s,a,c=[],d)=>{const f=o.tooltip.map(_=>({"aria-label":a.translate(_)})).getOr({}),p={tag:"button",classes:["tox-tbtn"],attributes:{...f,"data-mce-name":d}},y=o.icon.map(_=>yD(_,a.icons)),C=Xd([y]);return Q3(o,s,c,p,C,o.tooltip,a)},TD=o=>{switch(o){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];case"secondary":default:return["tox-button","tox-button--secondary"]}},DD=(o,s,a,c=[],d=[])=>{const f=a.translate(o.text),p=o.icon.map(I=>yD(I,a.icons)),y=[p.getOrThunk(()=>En(f))],C=o.buttonType.getOr(!o.primary&&!o.borderless?"secondary":"primary"),O={tag:"button",classes:[...TD(C),...p.isSome()?["tox-button--icon"]:[],...o.borderless?["tox-button--naked"]:[],...d],attributes:{"aria-label":f,"data-mce-name":o.text}},M=o.icon.map(nt(f));return Q3(o,s,c,O,y,M,a)},lP=(o,s,a,c=[],d=[])=>{const f=DD(o,k.some(s),a,c,d);return Ks.sketch(f)},OD=(o,s)=>a=>{s==="custom"?be(a,Jl,{name:o,value:{}}):s==="submit"?no(a,zy):s==="cancel"?no(a,dg):console.error("Unknown button type: ",s)},uP=(o,s)=>s==="menu",RD=(o,s)=>s==="custom"||s==="cancel"||s==="submit",Ej=(o,s)=>s==="togglebutton",Aj=(o,s,a)=>{const c=o.icon.map(V=>Hf(V,s.icons)).map(Mo),d=V=>{be(V,Jl,{name:o.name,value:{setIcon:K=>{c.map(tt=>tt.getOpt(V).each(ct=>{ze.set(ct,[Hf(K,s.icons)])}))}}})},f=o.buttonType.getOr(o.primary?"primary":"secondary"),p={...o,name:o.name??"",tooltip:o.tooltip,enabled:o.enabled??!1},y=p.tooltip.or(o.text).map(V=>({"aria-label":s.translate(V)})).getOr({}),C=TD(f??"secondary"),_=o.icon.isSome()&&o.text.isSome(),A={tag:"button",classes:[...C.concat(o.icon.isSome()?["tox-button--icon"]:[]),...o.active?["tox-button--enabled"]:[],..._?["tox-button--icon-and-text"]:[]],attributes:{...y,...$n(a)?{"data-mce-name":a}:{}}},O=[],M=s.translate(o.text.getOr("")),I=En(M),W=[...Xd([c.map(V=>V.asSpec())]),...o.text.isSome()?[I]:[]],j=Q3(p,k.some(d),O,A,W,o.tooltip,s);return Ks.sketch(j)},jy=(o,s,a)=>
80{if(uP(o,s)){const c=()=>p,d=o,f={...o,buttonType:"default",type:"menubutton",search:k.none(),onSetup:y=>(y.setEnabled(o.enabled),q),fetch:yj(d.items,c,a)},p=Mo(Zy(f,"tox-tbtn",a,k.none(),!0,o.text.or(o.tooltip).getOrUndefined()));return p.asSpec()}else if(RD(o,s)){const c=OD(o.name,s),d={...o,context:s==="cancel"?"any":o.context,borderless:!1};return lP(d,c,a.shared.providers,[])}else{if(Ej(o,s))return Aj(o,a.shared.providers,o.text.or(o.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",s),new Error("Unknown footer button type")}},Tj=(o,s)=>{const a=OD(o.name,"custom");return jZ(k.none(),ro.parts.field({factory:Ks,...DD(o,k.some(a),s,[z3(""),Ql.self()])}))},dP={type:"separator"},Dj=o=>({type:"menuitem",value:o.url,text:o.title,meta:{attach:o.attach},onAction:q}),Nb=(o,s)=>({type:"menuitem",value:s,text:o,meta:{attach:void 0},onAction:q}),Oj=o=>pt(o,Dj),mP=(o,s)=>Io(s,a=>a.type===o),gP=(o,s)=>Oj(mP(o,s)),Rj=o=>gP("header",o.targets),nd=o=>gP("anchor",o.targets),t4=o=>k.from(o.anchorTop).map(s=>Nb("<top>",s)).toArray(),e4=o=>k.from(o.anchorBottom).map(s=>Nb("<bottom>",s)).toArray(),Bj=o=>pt(o,s=>Nb(s,s)),BD=o=>Zo(o,(s,a)=>s.length===0||a.length===0?s.concat(a):s.concat(dP,a),[]),FD=(o,s)=>{const a=o.toLowerCase();return Io(s,c=>{const d=c.meta!==void 0&&c.meta.text!==void 0?c.meta.text:c.text,f=c.value??"";return ls(d.toLowerCase(),a)||ls(f.toLowerCase(),a)})},MD=(o,s,a)=>{var p;const c=ne.getValue(s),d=((p=c==null?void 0:c.meta)==null?void 0:p.text)??c.value;return a.getLinkInformation().fold(()=>[],y=>{const C=FD(d,Bj(a.getHistory(o)));return o==="file"?BD([C,FD(d,Rj(y)),FD(d,wt([t4(y),nd(y),e4(y)]))]):C})},ND=ee("aria-invalid"),PD=(o,s,a,c)=>{const d=s.shared.providers,f=K=>{const tt=ne.getValue(K);a.addToHistory(tt.value,o.filetype)},p={...c.map(K=>({initialData:K})).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{type:"url"},minChars:0,responseTime:0,fetch:K=>{const tt=MD(o.filetype,K,a),ct=mg(tt,Xl.BUBBLE_TO_SANDBOX,s,{isHorizontalMenu:!1,search:k.none()});return cs.pure(ct)},getHotspot:K=>L.getOpt(K),onSetValue:(K,tt)=>{K.hasConfigured(hc)&&hc.run(K).get(q)},typeaheadBehaviours:Pt([...a.getValidationHandler().map(K=>hc.config({getRoot:tt=>xl(tt.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(tt,ct)=>{A.getOpt(tt).each(dt=>{Ee(dt.element,"title",d.translate(ct))})}},validator:{validate:tt=>{const ct=ne.getValue(tt);return Qh.nu(dt=>{K({type:o.filetype,url:ct.value},Wt=>{if(Wt.status==="invalid"){Ee(tt.element,"aria-errormessage",ND);const kt=Te.error(Wt.message);dt(kt)}else{Tn(tt.element,"aria-errormessage");const kt=Te.value(Wt.message);dt(kt)}})})},validateOnLoad:!1}})).toArray(),ce.config({disabled:()=>!o.enabled||d.checkUiComponentContext(o.context).shouldDisable}),gn.config({}),Me("urlinput-events",[vt(Lc(),K=>{const tt=si(K.element),ct=tt.trim();ct!==tt&&hd(K.element,ct),o.filetype==="file"&&be(K,Ga,{name:o.name})}),vt(Sm(),K=>{be(K,Ga,{name:o.name}),f(K)}),vt(N1(),K=>{be(K,Ga,{name:o.name}),f(K)})])]),eventOrder:{[Lc()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:K=>K.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:s.shared.getSink,parts:{menu:_y(!1,1,"normal")},onExecute:(K,tt,ct)=>{be(tt,zy,{})},onItemExecute:(K,tt,ct,dt)=>{f(K),be(K,Ga,{name:o.name})}},y=ro.parts.field({...p,factory:s5}),C=o.label.map(K=>ug(K,d)),A=Mo(((K,tt,ct=K,dt=K)=>yc(ct,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+K],attributes:{title:d.translate(dt),"aria-live":"polite",...tt.fold(()=>({}),Wt=>({id:Wt}))}},d.icons))("invalid",k.some(ND),"warning")),O=Mo({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[A.asSpec()]}),M=a.getUrlPicker(o.filetype),I=ee("browser.url.event"),L=Mo({dom:{tag:"div",classes:["tox-control-wrap"]},components:[y,O.asSpec()],behaviours:Pt([ce.config({disabled:()=>!o.enabled||d.checkUiComponentContext(o.context).shouldDisable})])}),W=Mo(lP({context:o.context,name:o.name,icon:k.some("browse"),text:o.picker_text.or(o.label).getOr(""),enabled:o.enabled,primary:!1,buttonType:k.none(),borderless:!0},K=>no(K,I),d,[],["tox-browse-url"])),j=()=>({dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:wt([[L.asSpec()],M.map(()=>W.asSpec()).toArray()])}),V=K=>{Rt.getCurrent(K).each(tt=>{const ct=ne.getValue(tt),dt={fieldname:o.name,...ct};M.each(Wt=>{Wt(dt).get(kt=>{ne.setValue(tt,kt),be(K,Ga,{name:o.name})})})})};return ro.sketch({dom:mN(),components:C.toArray().concat([j()]),fieldBehaviours:Pt([ce.config({disabled:()=>!o.enabled||d.checkUiComponentContext(o.context).shouldDisable,onDisabled:K=>{ro.getField(K).each(ce.disable),W.getOpt(K).each(ce.disable)},onEnabled:K=>{ro.getField(K).each(ce.enable),W.getOpt(K).each(ce.enable)}}),ms(()=>d.checkUiComponentContext(o.context)),Me("url-input-events",[vt(I,V)])])})},Fj=(o,s)=>{const a=qV(o.icon,s.icons);return Vu.sketch({dom:{tag:"div",attributes:{role:"alert"}
80,classes:["tox-notification","tox-notification--in",`tox-notification--${o.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:o.url?void 0:a},components:o.url?[Ks.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:a,attributes:{title:s.translate(o.iconTooltip)}},action:c=>be(c,Jl,{name:"alert-banner",value:o.url}),buttonBehaviours:Pt([R5()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:s.translate(o.text)}}]})},Mj=(o,s,a)=>{const c=C=>(C.element.dom.click(),k.some(!0)),d=ro.parts.field({factory:{sketch:eo},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Pt([Ql.self(),ce.config({disabled:()=>!o.enabled||s.checkUiComponentContext(o.context).shouldDisable,onDisabled:C=>{xl(C.element).each(_=>sn(_,"tox-checkbox--disabled"))},onEnabled:C=>{xl(C.element).each(_=>Un(_,"tox-checkbox--disabled"))}}),gn.config({}),Ie.config({}),yN(a,Ix,wl),pe.config({mode:"special",onEnter:c,onSpace:c,stopSpaceKeyup:!0}),Me("checkbox-events",[vt(Sm(),(C,_)=>{be(C,Ga,{name:o.name})})])])}),f=ro.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[En(s.translate(o.label))],behaviours:Pt([Wu.config({})])}),p=C=>yc(C==="checked"?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+C]},s.icons),y=Mo({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[p("checked"),p("unchecked")]});return ro.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[d,y.asSpec(),f],fieldBehaviours:Pt([ce.config({disabled:()=>!o.enabled||s.checkUiComponentContext(o.context).shouldDisable}),ms(()=>s.checkUiComponentContext(o.context))])})},fP=(o,s)=>{const a=["tox-form__group",...o.stretched?["tox-form__group--stretched"]:[]],c=Me("htmlpanel",[vn(d=>{o.onInit(d.element.dom)})]);return o.presets==="presentation"?Vu.sketch({dom:{tag:"div",classes:a,innerHtml:o.html},containerBehaviours:Pt([yn.config({...s.tooltips.getConfig({tooltipText:"",onShow:d=>{Ko(d.element,"[data-mce-tooltip]:hover").orThunk(()=>Es(d.element)).each(f=>{ir(f,"data-mce-tooltip").each(p=>{yn.setComponents(d,s.tooltips.getComponents({tooltipText:p}))})})}}),mode:"children-normal",anchor:d=>({type:"node",node:Ko(d.element,"[data-mce-tooltip]:hover").orThunk(()=>Es(d.element).filter(f=>ir(f,"data-mce-tooltip").isSome())),root:d.element,layouts:{onLtr:nt([ys,Mn,Os,fr,vs,Qs]),onRtl:nt([ys,Mn,Os,fr,vs,Qs])},bubble:Va(0,-2,{})})}),c])}):Vu.sketch({dom:{tag:"div",classes:a,innerHtml:o.html,attributes:{role:"document"}},containerBehaviours:Pt([gn.config({}),Ie.config({}),c])})},Xs=o=>(s,a,c,d,f)=>he(a,"name").fold(()=>o(a,d,k.none(),f),p=>s.field(p,o(a,d,he(c,p),f))),Nj=o=>(s,a,c,d,f)=>{const p=kn(a,{source:"dynamic"});return Xs(o)(s,p,c,d,f)},ID={bar:Xs((o,s)=>uN(o,s.shared)),collection:Xs((o,s,a)=>GZ(o,s.shared.providers,a)),alertbanner:Xs((o,s)=>Fj(o,s.shared.providers)),input:Xs((o,s,a)=>tP(o,s.shared.providers,a)),textarea:Xs((o,s,a)=>vj(o,s.shared.providers,a)),label:Xs((o,s,a,c)=>uj(o,s.shared,c)),iframe:Nj((o,s,a)=>Uy(o,s.shared.providers,a)),button:Xs((o,s)=>Tj(o,s.shared.providers)),checkbox:Xs((o,s,a)=>Mj(o,s.shared.providers,a)),colorinput:Xs((o,s,a)=>KZ(o,s.shared,s.colorinput,a)),colorpicker:Xs((o,s,a)=>W3(o,s.shared.providers,a)),dropzone:Xs((o,s,a)=>sj(o,s.shared.providers,a)),grid:Xs((o,s)=>rj(o,s.shared)),listbox:Xs((o,s,a)=>GN(o,s,a)),selectbox:Xs((o,s,a)=>qN(o,s.shared.providers,a)),sizeinput:Xs((o,s)=>JN(o,s.shared.providers)),slider:Xs((o,s,a)=>bj(o,s.shared.providers,a)),urlinput:Xs((o,s,a)=>PD(o,s,s.urlinput,a)),customeditor:Xs(oj),htmlpanel:Xs((o,s)=>fP(o,s.shared.providers)),imagepreview:Xs((o,s,a)=>lj(o,a)),table:Xs((o,s)=>xj(o,s.shared.providers)),tree:Xs((o,s)=>kj(o,s)),panel:Xs((o,s)=>Fb(o,s))},Pj={field:(o,s)=>s,record:nt([])},pP=(o,s,a,c,d)=>{const f=kn(c,{shared:{interpreter:p=>o4(o,p,a,f,d)}});return o4(o,s,a,f,d)},o4=(o,s,a,c,d)=>he(ID,s.type).fold(()=>(console.error(`Unknown factory type "${s.type}", defaulting to container: `,s),s),f=>f(o,s,a,c,d)),$D=(o,s,a,c)=>o4(Pj,o,s,a,c),Gy={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},Ij=(o,s,a)=>{const d={maxHeightFunction:Im()},f=()=>({type:"node",root:Oc(ks(o())),node:k.from(o()),bubble:Va(12,12,Gy),layouts:{onRtl:()=>[Jr],onLtr:()=>[Pm]},overrides:d}),p=()=>({type:"hotspot",hotspot:s(),bubble:Va(-12,12,Gy),layouts:{onRtl:()=>[Os,vs,ys],onLtr:()=>[vs,Os,ys]},overrides:d});return()=>a()?f():p()},$j=(o,s,a,c)=>{const f={maxHeightFunction:Im()},p=()=>({type:"node",root:Oc(ks(s())),node:k.from(s()),bubble:Va(12,12,Gy),layouts:{onRtl:()=>[Er],onLtr:()=>[Er]},overrides:f}),y=()=>o?{type:"node",root:Oc(ks(s())),node:k.from(s()),bubble:Va(0,-Pr(s()),Gy),layouts:{onRtl:()=>
80[Mn],onLtr:()=>[Mn]},overrides:f}:{type:"hotspot",hotspot:a(),bubble:Va(0,0,Gy),layouts:{onRtl:()=>[Mn],onLtr:()=>[Mn]},overrides:f};return()=>c()?p():y()},Lj=(o,s,a)=>{const c=()=>({type:"node",root:Oc(ks(o())),node:k.from(o()),layouts:{onRtl:()=>[Er],onLtr:()=>[Er]}}),d=()=>({type:"hotspot",hotspot:s(),layouts:{onRtl:()=>[ys],onLtr:()=>[ys]}});return()=>a()?c():d()},hP=(o,s)=>()=>({type:"selection",root:s(),getSelection:()=>{const a=o.selection.getRng(),c=o.model.table.getSelectedCells();if(c.length>1){const d=c[0],f=c[c.length-1],p={firstCell:Zt.fromDom(d),lastCell:Zt.fromDom(f)};return k.some(p)}return k.some(Og.range(Zt.fromDom(a.startContainer),a.startOffset,Zt.fromDom(a.endContainer),a.endOffset))}}),Hj=o=>s=>({type:"node",root:o(),node:s}),zj=(o,s,a,c)=>{const d=hb(o),f=()=>Zt.fromDom(o.getBody()),p=()=>Zt.fromDom(o.getContentAreaContainer()),y=()=>d||!c();return{inlineDialog:Ij(p,s,y),inlineBottomDialog:$j(o.inline,p,a,y),banner:Lj(p,s,y),cursor:hP(o,f),node:Hj(f)}},Vj=o=>(s,a)=>{nD(o)(s,a)},Uj=o=>()=>X6(o),Wj=o=>s=>F3(o,s),Zj=o=>s=>WM(o,s),jj=o=>({colorPicker:Vj(o),hasCustomColors:Uj(o),getColors:Wj(o),getColorCols:Zj(o)}),Gj=o=>()=>jB(o),qj=o=>({isDraggableModal:Gj(o)}),Kj=o=>{const s=fe(o3(o)?"bottom":"top");return{isPositionedAtTop:()=>s.get()==="top",getDockingMode:s.get,setDockingMode:s.set}},Yj=o=>Do(o,"items"),bP=o=>Do(o,"format"),LD=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],xP=o=>nn(o,"items"),n4=o=>nn(o,"block"),vP=o=>nn(o,"inline"),Xj=o=>nn(o,"selector"),yP=o=>Zo(o,(s,a)=>{if(xP(a)){const c=yP(a.items);return{customFormats:s.customFormats.concat(c.customFormats),formats:s.formats.concat([{title:a.title,items:c.formats}])}}else if(vP(a)||n4(a)||Xj(a)){const d=`custom-${$e(a.name)?a.name:a.title.toLowerCase()}`;return{customFormats:s.customFormats.concat([{name:d,format:a}]),formats:s.formats.concat([{title:a.title,format:d,icon:a.icon}])}}else return{...s,formats:s.formats.concat(a)}},{customFormats:[],formats:[]}),Jj=(o,s)=>{const a=yP(s),c=d=>{It(d,f=>{o.formatter.has(f.name)||o.formatter.register(f.name,f.format)})};return o.formatter?c(a.customFormats):o.on("init",()=>{c(a.customFormats)}),a.formats},CP=o=>MB(o).map(s=>{const a=Jj(o,s);return NB(o)?LD.concat(a):a}).getOr(LD),Qj=o=>{const s=qo(o);return s.length===1&&Go(s,"title")},wP=(o,s,a)=>({...o,type:"formatter",isSelected:s(o.format),getStylePreview:a(o.format)}),_P=(o,s,a,c)=>{const d=C=>wP(C,a,c),f=C=>{const _=y(C.items);return{...C,type:"submenu",getStyleItems:nt(_)}},p=C=>{const _=$e(C.name)?C.name:ee(C.title),A=`custom-${_}`,O={...C,type:"formatter",format:A,isSelected:a(A),getStylePreview:c(A)};return o.formatter.register(_,O),O},y=C=>pt(C,_=>Yj(_)?f(_):bP(_)?d(_):Qj(_)?{..._,type:"separator"}:p(_));return y(s)},SP=o=>{const s=y=>()=>o.formatter.match(y),a=y=>()=>{const C=o.formatter.get(y);return C!==void 0?k.some({tag:C.length>0&&(C[0].inline||C[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(y))}):k.none()},c=fe([]),d=fe([]),f=fe(!1);return o.on("PreInit",y=>{const C=CP(o),_=_P(o,C,s,a);c.set(_)}),o.on("addStyleModifications",y=>{const C=_P(o,y.items,s,a);d.set(C),f.set(y.replace)}),{getData:()=>{const y=f.get()?[]:c.get(),C=d.get();return y.concat(C)}}},kP=o=>{let c=0;const d=()=>c>0,f=y=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[En(y.tooltipText)]}];return{getConfig:y=>({delayForShow:()=>d()?60:300,delayForHide:nt(300),exclusive:!0,lazySink:o,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:f(y),onShow:(C,_)=>{c++,y.onShow&&y.onShow(C,_)},onHide:(C,_)=>{c--,y.onHide&&y.onHide(C,_)},onSetup:y.onSetup}),getComponents:f}},tG=o=>
80$n(o)&&o.nodeType===1,EP=tm.trim,AP=o=>s=>!!(tG(s)&&(s.contentEditable===o||s.getAttribute("data-mce-contenteditable")===o)),eG=AP("true"),oG=AP("false"),zf=(o,s,a,c,d)=>({type:o,title:s,url:a,level:c,attach:d}),TP=o=>{let s=o;for(;s=s.parentNode;){const a=s.contentEditable;if(a&&a!=="inherit")return eG(s)}return!1},qy=(o,s)=>pt(ur(Zt.fromDom(s),o),a=>a.dom),Ky=o=>o.innerText||o.textContent,DP=o=>o.id?o.id:ee("h"),OP=o=>o&&o.nodeName==="A"&&(o.id||o.name)!==void 0,RP=o=>OP(o)&&BP(o),nG=o=>o&&/^(H[1-6])$/.test(o.nodeName),BP=o=>TP(o)&&!oG(o),sG=o=>nG(o)&&BP(o),rG=o=>nG(o)?parseInt(o.nodeName.substr(1),10):0,aG=o=>{const s=DP(o),a=()=>{o.id=s};return zf("header",Ky(o)??"","#"+s,rG(o),a)},iG=o=>{const s=o.id||o.name,a=Ky(o);return zf("anchor",a||"#"+s,"#"+s,0,q)},cG=o=>pt(Io(o,sG),aG),Pb=o=>pt(Io(o,RP),iG),Yy=o=>qy("h1,h2,h3,h4,h5,h6,a:not([href])",o),HD=o=>EP(o.title).length>0,lG={find:o=>{const s=Yy(o);return Io(cG(s).concat(Pb(s)),HD)}},Ib="tinymce-url-history",FP=5,$b=o=>$e(o)&&/^https?/.test(o),MP=o=>ca(o)&&o.length<=FP&&po(o,$b),NP=o=>hn(o)&&iu(o,s=>!MP(s)).isNone(),PP=()=>{const o=Ph.getItem(Ib);if(o===null)return{};let s;try{s=JSON.parse(o)}catch(a){if(a instanceof SyntaxError)return console.log("Local storage "+Ib+" was not valid JSON",a),{};throw a}return NP(s)?s:(console.log("Local storage "+Ib+" was not valid format",s),{})},uG=o=>{if(!NP(o))throw new Error(`Bad format for history: 81`+JSON.stringify(o));Ph.setItem(Ib,JSON.stringify(o))},dG=o=>{const s=PP();return he(s,o).getOr([])},mG=(o,s)=>{if(!$b(o))return;const a=PP(),c=he(a,s).getOr([]),d=Io(c,f=>f!==o);a[s]=[o].concat(d).slice(0,FP),uG(a)},IP=o=>!!o,$P=o=>hs(tm.makeMap(o,/[, ]/),IP),s4=o=>k.from(UB(o)),zD=o=>{const s=k.from(m5(o)).filter(IP).map($P);return s4(o).fold(Fo,a=>s.fold(_e,c=>qo(c).length>0?c:!1))},gG=(o,s)=>{const a=zD(o);return Ta(a)?a?s4(o):k.none():a[s]?s4(o):k.none()},r4=(o,s)=>gG(o,s).map(a=>c=>cs.nu(d=>{const f=(y,C)=>{if(!$e(y))throw new Error("Expected value to be string");if(C!==void 0&&!hn(C))throw new Error("Expected meta to be a object");d({value:y,meta:C})},p={filetype:s,fieldname:c.fieldname,...k.from(c.meta).getOr({})};a.call(o,f,c.value,p)})),Xy=o=>k.from(o).filter($e).getOrUndefined(),LP=o=>g5(o)?k.some({targets:lG.find(o.getBody()),anchorTop:Xy(ZB(o)),anchorBottom:Xy(f5(o))}):k.none(),fG=o=>k.from(WB(o)),pG=o=>({getHistory:dG,addToHistory:mG,getLinkInformation:()=>LP(o),getValidationHandler:()=>fG(o),getUrlPicker:s=>r4(o,s)}),hG=(o,s,a,c)=>{const d=fe(!1),f=Kj(s),p={icons:()=>s.ui.registry.getAll().icons,menuItems:()=>s.ui.registry.getAll().menuItems,translate:sa.translate,isDisabled:()=>!s.ui.isEnabled(),getOption:s.options.get,tooltips:kP(o.dialog),checkUiComponentContext:V=>{if(XS(s))return{contextType:"disabled",shouldDisable:!0};const[K,tt=""]=V.split(":"),ct=s.ui.registry.getAll().contexts,dt=he(ct,K).fold(()=>he(ct,"mode").map(Wt=>Wt("design")).getOr(!1),Wt=>tt.charAt(0)==="!"?!Wt(tt.slice(1)):Wt(tt));return{contextType:K,shouldDisable:!dt}}},y=pG(s),C=SP(s),_=jj(s),A=qj(s),O=()=>d.get(),M=V=>d.set(V),I={shared:{providers:p,anchors:zj(s,a,c,f.isPositionedAtTop),header:f},urlinput:y,styles:C,colorinput:_,dialog:A,isContextMenuOpen:O,setContextMenuState:M},L=V=>k.none(),W={...I,shared:{...I.shared,interpreter:V=>$D(V,{},W,L),getSink:o.popup}},j={...I,shared:{...I.shared,interpreter:V=>$D(V,{},j,L),getSink:o.dialog}};return{popup:W,dialog:j}},VD={skipFocus:"ToggleToolbarDrawer skipFocus is deprecated see migration guide: https://www.tiny.cloud/docs/tinymce/latest/migration-from-7x/"},bG=o=>{console.warn(VD[o],new Error().stack)},UD=(o,s,a)=>{const c=(Tt,xe)=>{It([s,...a],le=>{le.broadcastEvent(Tt,xe)})},d=(Tt,xe)=>{It([s,...a],le=>{le.broadcastOn([Tt],xe)})},f=Tt=>d(Fl(),{target:Tt.target}),p=Tt=>{d(uf(),{closedTooltip:()=>{Tt.preventDefault()}})},y=Nr(),C=Vo(y,"touchstart",f),_=Vo(y,"touchmove",Tt=>c(fw(),Tt)),A=Vo(y,"touchend",Tt=>c(c2(),Tt)),O=Vo(y,"mousedown",f),M=Vo(y,"mouseup",Tt=>{Tt.raw.button===0&&d(Mu(),{target:Tt.target})}),I=Tt=>d(Fl(),{target:Zt.fromDom(Tt.target)}),L=Tt=>{Tt.button===0&&d(Mu(),{target:Zt.fromDom(Tt.target)})},W=()=>{It(o.editorManager.get(),Tt=>
81{o!==Tt&&Tt.dispatch("DismissPopups",{relatedTarget:o})})},j=Tt=>c(l2(),yl(Tt)),V=Tt=>{d(Cs(),{}),c(jg(),yl(Tt))},K=ks(Zt.fromDom(o.getElement())),tt=ki(K,"scroll",Tt=>{requestAnimationFrame(()=>{const xe=o.getContainer();if(xe!=null){const Qe=og(o,s.element).map(ye=>[ye.element,...ye.others]).getOr([]);ps(Qe,ye=>ln(ye,Tt.target))&&(o.dispatch("ElementScroll",{target:Tt.target.dom}),c(hw(),Tt))}})}),ct=()=>d(Cs(),{}),dt=Tt=>{Tt.state&&d(Fl(),{target:Zt.fromDom(o.getContainer())})},Wt=Tt=>{d(Fl(),{target:Zt.fromDom(Tt.relatedTarget.getContainer())})},kt=Tt=>o.dispatch("focusin",Tt),Ot=Tt=>o.dispatch("focusout",Tt);o.on("PostRender",()=>{o.on("click",I),o.on("tap",I),o.on("mouseup",L),o.on("mousedown",W),o.on("ScrollWindow",j),o.on("ResizeWindow",V),o.on("ResizeEditor",ct),o.on("AfterProgressState",dt),o.on("DismissPopups",Wt),o.on("CloseActiveTooltips",p),It([s,...a],Tt=>{Tt.element.dom.addEventListener("focusin",kt),Tt.element.dom.addEventListener("focusout",Ot)})}),o.on("remove",()=>{o.off("click",I),o.off("tap",I),o.off("mouseup",L),o.off("mousedown",W),o.off("ScrollWindow",j),o.off("ResizeWindow",V),o.off("ResizeEditor",ct),o.off("AfterProgressState",dt),o.off("DismissPopups",Wt),o.off("CloseActiveTooltips",p),It([s,...a],Tt=>{Tt.element.dom.removeEventListener("focusin",kt),Tt.element.dom.removeEventListener("focusout",Ot)}),O.unbind(),C.unbind(),_.unbind(),A.unbind(),M.unbind(),tt.unbind()}),o.on("detach",()=>{It([s,...a],R_),It([s,...a],Tt=>Tt.destroy())})},xG=q,WD=Fo,HP=nt([]);var vG=Object.freeze({__proto__:null,setup:xG,isDocked:WD,getBehaviours:HP});const ZD=nt(ee("toolbar-height-change")),om={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},zP="tox-tinymce--toolbar-sticky-on",yG="tox-tinymce--toolbar-sticky-off",AX=(o,s)=>{const a=Fa(s),d=tp(s).dom.innerHeight,f=rs(a),p=Zt.fromDom(o.elm),y=xd(p),C=Zs(p),_=y.y,A=_+C,O=Ma(s),M=Zs(s),I=O.top,L=I+M,W=Math.abs(I-f.top)<2,j=Math.abs(L-(f.top+d))<2;if(W&&_<L)gd(f.left,_-M,a);else if(j&&A>I){const V=_-d+C+M;gd(f.left,V,a)}},Jy=(o,s)=>Go(Nn.getModes(o),s),jD=o=>{const s=c=>Pr(c)+(parseInt(Dn(c,"margin-top"),10)||0)+(parseInt(Dn(c,"margin-bottom"),10)||0),a=o.element;xl(a).each(c=>{const d="padding-"+Nn.getModes(o)[0];if(Nn.isDocked(o)){const f=Ir(c);Be(a,"width",f+"px"),Be(c,d,s(a)+"px")}else uo(a,"width"),uo(c,d)})},GD=(o,s)=>{s?(Un(o,om.fadeOutClass),kl(o,[om.transitionClass,om.fadeInClass])):(Un(o,om.fadeInClass),kl(o,[om.fadeOutClass,om.transitionClass]))},VP=(o,s)=>{const a=Zt.fromDom(o.getContainer());s?(sn(a,zP),Un(a,yG)):(sn(a,yG),Un(a,zP))},CG=(o,s)=>{const a=Fa(s);rr(a).filter(c=>!ln(s,c)).filter(c=>ln(c,Zt.fromDom(a.dom.body))||a1(o,c)).each(()=>Js(s))},wG=(o,s)=>Es(o).orThunk(()=>s().toOptional().bind(a=>Es(a.element))),_G=(o,s,a)=>{o.inline||(s.header.isPositionedAtTop()||o.on("ResizeEditor",()=>{a().each(Nn.reset)}),o.on("ResizeWindow ResizeEditor",()=>{a().each(jD)}),o.on("SkinLoaded",()=>{a().each(c=>{Nn.isDocked(c)?Nn.reset(c):Nn.refresh(c)})}),o.on("FullscreenStateChanged",()=>{a().each(Nn.reset)})),o.on("AfterScrollIntoView",c=>{a().each(d=>{Nn.refresh(d);const f=d.element;np(f)&&AX(c,f)})}),o.on("PostRender",()=>{VP(o,!1)})},SG=o=>o().map(Nn.isDocked).getOr(!1),UP=()=>[na.config({channels:{[ZD()]:{onReceive:jD}}})],WP=(o,s)=>{const a=Ze(),c=s.getSink,d=y=>{c().each(C=>y(C.element))},f=y=>{o.inline||jD(y),VP(o,Nn.isDocked(y)),y.getSystem().broadcastOn([Cs()],{}),c().each(C=>C.getSystem().broadcastOn([Cs()],{}))},p=o.inline?[]:UP();return[Ie.config({}),Nn.config({contextual:{lazyContext:y=>{const C=Pr(y.element),_=o.inline?o.getContentAreaContainer():o.getContainer();return k.from(_).map(A=>{const O=xs(Zt.fromDom(A));return og(o,y.element).fold(()=>{const I=O.height-C,L=O.y+(Jy(y,"top")?0:C);return Ts(O.x,L,O.width,I)},I=>{const L=wu(O,yh(I)),W=Jy(y,"top")?L.y:L.y+C;return Ts(L.x,W,L.width,L.height-C)})})},onShow:()=>{d(y=>GD(y,!0))},onShown:y=>{d(C=>_r(C,[om.transitionClass,om.fadeInClass])),a.get().each(C=>{CG(y.element,C),a.clear()})},onHide:y=>{wG(y.element,c).fold(a.clear,a.set),d(C=>GD(C,!1))},onHidden:()=>{d(y=>_r(y,[om.transitionClass]))},...om},lazyViewport:y=>og(o,y.element).fold(()=>{const _=Sr(),A=zB(o),O=_.y+(Jy(y,"top")&&!aF(o)?A:0),M=_.height-(Jy(y,"bottom")?A:0);return{bounds:Ts(_.x,O,_.width,M),optScrollEnv:k.none()}},_=>({bounds:yh(_),optScrollEnv:k.some({currentScrollTop:_.element.dom.scrollTop,scrollElmTop:Ma(_.element).top})})),modes:[s.header.getDockingMode()],onDocked:f,onUndocked:f}),...p]};var kG=Object.freeze({__proto__:null,setup:_G,isDocked:SG,getBehaviours:WP});const EG=o=>{const s=o.editor,a=o.sticky?WP:HP;return{uid:o.uid,dom:o.dom,components:o.components,behaviours:Pt(a(s,o.sharedBackstage))}};var ZP=pc({factory:(o,s)=>{const a=(d,f)=>{const p=pt(f,y=>{const C={type:"menubutton",text:y.text,fetch:A=>{A(y.getItems())},context:"any"},_=c6(C).mapError(A=>$g(A)).getOrDie();return Zy(_,"tox-mbtn",s.backstage,k.some("menuitem"))});ze.set(d,p)},c={focus:pe.focusIn,setMenus:a};return{uid:o.uid,dom:o.dom,components:[],behaviours:Pt([ze.config({}),Me("menubar-events",[vn(d=>{o.onSetup(d)}),vt(ii(),(d,f)=>{Ko(d.element,".tox-mbtn--active").each(p=>{$r(f.event.target,".tox-mbtn").each(y=>{ln(p,y)||d.getSystem().getByDom(p).each(C=>{d.getSystem().getByDom(y).each(_=>{gi.expand(_),gi.close(C),Ie.focus(_)})})})})}),vt(L1(),(d,f)=>{f.event.prevFocus.bind(p=>d.getSystem().getByDom(p).toOptional()).each(p=>{f.event.newFocus.bind(y=>d.getSystem().getByDom(y).toOptional()).each(y=>
81{gi.isOpen(p)&&(gi.expand(y),gi.close(p))})})})]),pe.config({mode:"flow",selector:".tox-mbtn",onEscape:d=>(o.onEscape(d),k.some(!0))}),gn.config({})]),apis:c,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[At("dom"),At("uid"),At("onEscape"),At("backstage"),at("onSetup",q)],apis:{focus:(o,s)=>{o.focus(s)},setMenus:(o,s,a)=>{o.setMenus(s,a)}}});const jP="ð Get all features",GP="https://www.tiny.cloud/tinymce-upgrade-to-cloud/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",AG=o=>{const s=o.promotionLink?[{dom:{tag:"a",attributes:{href:GP,rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:jP}}]:[];return{uid:o.uid,dom:o.dom,components:s}},TG=o=>{const{sidebars:s}=o.ui.registry.getAll();It(qo(s),a=>{const c=s[a],d=()=>ji(k.from(o.queryCommandValue("ToggleSidebar")),a);o.ui.registry.addToggleButton(a,{icon:c.icon,tooltip:c.tooltip,onAction:f=>{o.execCommand("ToggleSidebar",!1,a),f.setActive(d())},onSetup:f=>{f.setActive(d());const p=()=>f.setActive(d());return o.on("ToggleSidebar",p),()=>{o.off("ToggleSidebar",p)}},context:"any"})})},wc=o=>({element:()=>o.element.dom}),DG=(o,s)=>{const a=pt(qo(s),c=>{const d=s[c],f=Fi(C6(d));return{name:c,getApi:wc,onSetup:f.onSetup,onShow:f.onShow,onHide:f.onHide}});return pt(a,c=>{const d=fe(q);return o.slot(c.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Ab.unnamedEvents([ed(c,d),Nf(c,d),vt(u2(),(f,p)=>{const y=p.event;xt(a,_=>_.name===y.name).each(_=>{(y.visible?_.onShow:_.onHide)(_.getApi(f))})})])})})},qP=o=>Br.sketch(s=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:DG(s,o),slotBehaviours:Ab.unnamedEvents([vn(a=>Br.hideAllSlots(a))])})),KP=(o,s,a)=>{Rt.getCurrent(o).each(d=>{ze.set(d,[qP(s)]);const f=a==null?void 0:a.toLowerCase();$e(f)&&nn(s,f)&&Rt.getCurrent(d).each(p=>{Br.showSlot(p,f),_a.immediateGrow(d),uo(d.element,"width"),a4(o.element,"region")})})},a4=(o,s)=>{Ee(o,"role",s)},Qy=(o,s)=>{Rt.getCurrent(o).each(c=>{Rt.getCurrent(c).each(f=>{_a.hasGrown(c)?Br.isShowing(f,s)?(_a.shrink(c),a4(o.element,"presentation")):(Br.hideAllSlots(f),Br.showSlot(f,s),a4(o.element,"region")):(Br.hideAllSlots(f),Br.showSlot(f,s),_a.grow(c),a4(o.element,"region"))})})},OG=o=>Rt.getCurrent(o).bind(a=>_a.isGrowing(a)||_a.hasGrown(a)?Rt.getCurrent(a).bind(f=>xt(Br.getSlotNames(f),p=>Br.isShowing(f,p))):k.none()),Lb=ee("FixSizeEvent"),qD=ee("AutoSizeEvent"),i4=o=>({uid:o.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Pt([gn.config({}),Ie.config({}),_a.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:s=>{Rt.getCurrent(s).each(Br.hideAllSlots),no(s,qD)},onGrown:s=>{no(s,qD)},onStartGrow:s=>{be(s,Lb,{width:Hn(s.element,"width").getOr("")})},onStartShrink:s=>{be(s,Lb,{width:Ir(s.element)+"px"})}}),ze.config({}),Rt.config({find:s=>{const a=ze.contents(s);return Xo(a)}})])}],behaviours:Pt([Ql.childAt(0),Me("sidebar-sliding-events",[vt(Lb,(s,a)=>{Be(s.element,"width",a.event.width)}),vt(qD,(s,a)=>{uo(s.element,"width")})])])}),RG=o=>(s,a)=>({dom:{tag:"div",attributes:{"aria-label":o.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:Zu('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),YP=o=>Rt.getCurrent(o).each(s=>Js(s.element,!0)),al=(o,s)=>{const a="tabindex",c=`data-mce-${a}`;k.from(o.iframeElement).map(Zt.fromDom).each(d=>{s?(ir(d,a).each(f=>Ee(d,c,f)),Ee(d,a,-1)):(Tn(d,a),ir(d,c).each(f=>{Ee(d,a,f),Tn(d,c)}))})},BG=(o,s,a,c)=>{const d=s.element;if(al(o,a),a)ot.block(s,RG(c)),uo(d,"display"),Tn(d,"aria-hidden"),o.hasFocus()&&YP(s);else{const f=Rt.getCurrent(s).exists(p=>Xi(p.element));ot.unblock(s),Be(d,"display","none"),Ee(d,"aria-hidden","true"),f&&o.focus()}},c4=o=>({uid:o.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Pt([ze.config({}),ot.config({focus:!1}),Rt.config({find:s=>Xo(s.components())})]),components:[]}),XP=o=>o.type==="focusin",JP=o=>XP(o)?(o.composed?Xo(o.composedPath()):k.from(o.target)).map(Zt.fromDom).filter(
81Ba).exists(a=>bs(a,"mce-pastebin")):!1,FG=(o,s,a)=>{const c=fe(!1),d=Ze(),f=y=>{c.get()&&!JP(y)&&(y.preventDefault(),YP(s()),o.editorManager.setActive(o))};o.inline||o.on("PreInit",()=>{o.dom.bind(o.getWin(),"focusin",f),o.on("BeforeExecCommand",y=>{y.command.toLowerCase()==="mcefocus"&&y.value!==!0&&f(y)})});const p=y=>{y!==c.get()&&(c.set(y),BG(o,s(),y,a.providers),lZ(o,y))};o.on("ProgressState",y=>{if(d.on(clearTimeout),la(y.time)){const C=YS.setEditorTimeout(o,()=>p(y.state),y.time);d.set(C)}else p(y.state),d.clear()})},KD=o=>{const s=o.label.isNone()?o.title.fold(()=>({}),a=>({attributes:{"aria-label":a}})):o.label.fold(()=>({}),a=>({attributes:{"aria-label":a}}));return{dom:{tag:"div",classes:["tox-toolbar__group"].concat(o.label.isSome()?["tox-toolbar__group_with_label"]:[]),...s},components:[...o.label.map(a=>({dom:{tag:"span",classes:["tox-label","tox-label--context-toolbar"]},components:[En(a)]})).toArray(),qS.parts.items({})],items:o.items,markers:{itemSelector:".tox-tbtn:not([disabled]), .tox-toolbar-nav-item:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:Pt([gn.config({}),Ie.config({ignore:!0})])}},l4=o=>qS.sketch(KD(o)),QP=(o,s)=>{const a=vn(c=>{const d=pt(o.initGroups,l4);ju.setGroups(c,d)});return Pt([td.toolbarButton(()=>o.providers.checkUiComponentContext("any").shouldDisable),ms(()=>o.providers.checkUiComponentContext("any")),pe.config({mode:s,onEscape:o.onEscape,visibilitySelector:".tox-toolbar__overflow",selector:".tox-toolbar__group"}),Me("toolbar-events",[a])])},tI=o=>{const s=o.cyclicKeying?"cyclic":"acyclic";return{uid:o.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":KD({title:k.none(),label:k.none(),items:[]}),"overflow-button":cP({context:"any",icon:k.some("more-drawer"),enabled:!0,tooltip:k.some("Reveal or hide additional toolbar items")},k.none(),o.providers,[],"overflow-button")},splitToolbarBehaviours:QP(o,s)}},MG=o=>{const s=tI(o),a=4,c=SB.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return SB.sketch({...s,lazySink:o.getSink,getOverflowBounds:()=>{const d=o.moreDrawerData.lazyHeader().element,f=xd(d),p=Ax(d),y=xd(p),C=Math.max(p.dom.scrollHeight,y.height);return Ts(f.x+a,y.y,f.width-a*2,C)},parts:{...s.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:o.attributes}}},components:[c],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:d=>o.onToggled(d,!0),onClosed:d=>o.onToggled(d,!1)})},NG=o=>{const s=t5.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),a=t5.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),c=tI(o);return t5.sketch({...c,components:[s,a],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:d=>{d.getSystem().broadcastOn([ZD()],{type:"opened"}),o.onToggled(d,!0)},onClosed:d=>{d.getSystem().broadcastOn([ZD()],{type:"closed"}),o.onToggled(d,!1)}})},u4=o=>{const s=o.cyclicKeying?"cyclic":"acyclic";return ju.sketch({uid:o.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(o.type===vc.scrolling?["tox-toolbar--scrolling"]:[])},components:[ju.parts.groups({})],toolbarBehaviours:QP(o,s)})},PG=(o,s)=>{const a=o.type==="togglebutton",c=o.icon.map(V=>Hf(V,s.icons)).map(Mo),f=V=>{const K=Wt=>{c.map(kt=>kt.getOpt(V).each(Ot=>{ze.set(Ot,[Hf(Wt,s.icons)])}))},tt=Wt=>{const kt=V.element;Wt?(sn(kt,"tox-button--enabled"),Ee(kt,"aria-pressed",!0)):(Un(kt,"tox-button--enabled"),Tn(kt,"aria-pressed"))},ct=()=>bs(V.element,"tox-button--enabled"),dt=()=>Js(V.element);if(a)return o.onAction({setIcon:K,setActive:tt,isActive:ct,focus:dt});if(o.type==="button")return o.onAction({setIcon:K})},p={...o,name:a?o.text.getOr(o.icon.getOr("")):o.text??o.icon.getOr(""),primary:o.buttonType==="primary",buttonType:k.from(o.buttonType),tooltip:o.tooltip,icon:o.icon,enabled:!0,borderless:o.borderless},y=TD(o.buttonType??"secondary"),C=a?o.text.map(s.translate):k.some(s.translate(o.text)),_=C.map(En),A=p.tooltip.or(C).map(V=>({"aria-label":s.translate(V)})).getOr({}),O=c.map(V=>V.asSpec()),M=Xd([O,_]),I=o.icon.isSome()&&_.isSome(),L={tag:"button",classes:y.concat(...o.icon.isSome()&&!I?["tox-button--icon"]:[]).concat(...I?["tox-button--icon-and-text"]:[]).concat(...o.borderless?["tox-button--naked"]:[]).concat(...o.type==="togglebutton"&&o.active?["tox-button--enabled"]:[]),attributes:A},W=[],j=Q3(p,k.some(f),W,L,M,o.tooltip,s);return Ks.sketch(j)},YD=(o,s)=>PG(o,s),eI=(o,s)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:pt(o.buttons,a=>YD(a,s))}),XD=Cr().deviceType,IG=XD.isPhone(),oI=XD.isTablet(),$G=o=>{let s=!1;const a=pt(o.buttons,c=>c.type==="group"?(s=!0,eI(c,o.providers)):YD(c,o.providers));return{uid:o.uid,dom:{tag:"div",classes:[s?"tox-view__toolbar":"tox-view__header",...IG||oI?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:Pt([Ie.config({}),pe.config({mode:"flow",selector:"button, .tox-button",focusInside:Om.OnEnterOrSpaceMode})]),components:s?a:[Vu.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Vu.sketch({dom:{tag:"div",classes:["tox-view__header-end"]}
81,components:a})]}},LG=o=>({uid:o.uid,behaviours:Pt([Ie.config({}),gn.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}}),nI=(o,s,a,c)=>{const d={getPane:f=>or.getPart(f,o,"pane"),getOnShow:f=>o.viewConfig.onShow,getOnHide:f=>o.viewConfig.onHide};return{uid:o.uid,dom:o.dom,components:s,behaviours:Pt([Ie.config({}),pe.config({mode:"cyclic",focusInside:Om.OnEnterOrSpaceMode})]),apis:d}};var Hh=Wa({name:"silver.View",configFields:[At("viewConfig")],partFields:[Xr({factory:{sketch:$G},schema:[At("buttons"),At("providers")],name:"header"}),Xr({factory:{sketch:LG},schema:[],name:"pane"})],factory:nI,apis:{getPane:(o,s)=>o.getPane(s),getOnShow:(o,s)=>o.getOnShow(s),getOnHide:(o,s)=>o.getOnHide(s)}});const sI=(o,s,a)=>Wr(s,(c,d)=>{const f=Fi(qW(c));return o.slot(d,Hh.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:f,components:[...f.buttons.length>0?[Hh.parts.header({buttons:f.buttons,providers:a})]:[],Hh.parts.pane({})]}))}),HG=(o,s)=>Br.sketch(a=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:sI(a,o,s),slotBehaviours:Ab.unnamedEvents([vn(c=>Br.hideAllSlots(c))])})),rI=o=>xt(Br.getSlotNames(o),s=>Br.isShowing(o,s)),zG=o=>{const s=o.element;Be(s,"display","none"),Ee(s,"aria-hidden","true")},aI=o=>{const s=o.element;uo(s,"display"),Tn(s,"aria-hidden")},VG=o=>({getContainer:nt(o)}),iI=(o,s,a)=>{Br.getSlot(o,s).each(c=>{Hh.getPane(c).each(d=>{a(c)(VG(d.element.dom))})})},UG=(o,s)=>iI(o,s,Hh.getOnShow),WG=(o,s)=>iI(o,s,Hh.getOnHide);var d4=pc({factory:(o,s)=>{const f={setViews:(p,y)=>{ze.set(p,[HG(y,s.backstage.shared.providers)])},whichView:p=>Rt.getCurrent(p).bind(rI),toggleView:(p,y,C,_)=>Rt.getCurrent(p).exists(A=>{const O=rI(A),M=O.exists(L=>_===L),I=Br.getSlot(A,_).isSome();return I&&(Br.hideAllSlots(A),M?(zG(p),y()):(C(),aI(p),Br.showSlot(A,_),UG(A,_)),O.each(L=>WG(A,L))),I})};return{uid:o.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:Pt([ze.config({}),Rt.config({find:p=>{const y=ze.contents(p);return Xo(y)}})]),apis:f}},name:"silver.ViewWrapper",configFields:[At("backstage")],apis:{setViews:(o,s,a)=>o.setViews(s,a),toggleView:(o,s,a,c,d)=>o.toggleView(s,a,c,d),whichView:(o,s)=>o.whichView(s)}});const ZG=(o,s,a)=>{let c=!1;const d=p=>{Sk(p,".tox-statusbar").each(y=>{Dn(y,"display")==="none"&&Ws(y,"aria-hidden")==="true"?(uo(y,"display"),Tn(y,"aria-hidden")):(Be(y,"display","none"),Ee(y,"aria-hidden","true"))})},f={getSocket:p=>or.getPart(p,o,"socket"),setSidebar:(p,y,C)=>{or.getPart(p,o,"sidebar").each(_=>KP(_,y,C))},toggleSidebar:(p,y)=>{or.getPart(p,o,"sidebar").each(C=>Qy(C,y))},whichSidebar:p=>or.getPart(p,o,"sidebar").bind(OG).getOrNull(),getHeader:p=>or.getPart(p,o,"header"),getToolbar:p=>or.getPart(p,o,"toolbar"),setToolbar:(p,y)=>{or.getPart(p,o,"toolbar").each(C=>{const _=pt(y,l4);C.getApis().setGroups(C,_)})},setToolbars:(p,y)=>{or.getPart(p,o,"multiple-toolbar").each(C=>{const _=pt(y,A=>pt(A,l4));e7.setItems(C,_)})},refreshToolbar:p=>{or.getPart(p,o,"toolbar").each(C=>C.getApis().refresh(C))},toggleToolbarDrawer:p=>{or.getPart(p,o,"toolbar").each(y=>{uu(y.getApis().toggle,C=>C(y))})},toggleToolbarDrawerWithoutFocusing:p=>{or.getPart(p,o,"toolbar").each(y=>{uu(y.getApis().toggleWithoutFocusing,C=>C(y))})},isToolbarDrawerToggled:p=>or.getPart(p,o,"toolbar").bind(y=>k.from(y.getApis().isOpen).map(C=>C(y))).getOr(!1),getThrobber:p=>or.getPart(p,o,"throbber"),focusToolbar:p=>{or.getPart(p,o,"toolbar").orThunk(()=>or.getPart(p,o,"multiple-toolbar")).each(C=>{pe.focusIn(C)})},setMenubar:(p,y)=>{or.getPart(p,o,"menubar").each(C=>{ZP.setMenus(C,y)})},focusMenubar:p=>{or.getPart(p,o,"menubar").each(y=>{ZP.focus(y)})},setViews:(p,y)=>{or.getPart(p,o,"viewWrapper").each(C=>{d4.setViews(C,y)})},toggleView:(p,y)=>or.getPart(p,o,"viewWrapper").exists(C=>d4.toggleView(C,()=>f.showMainView(p),()=>f.hideMainView(p),y)),whichView:p=>or.getPart(p,o,"viewWrapper").bind(d4.whichView).getOrNull(),hideMainView:p=>{c=f.isToolbarDrawerToggled(p),c&&f.toggleToolbarDrawer(p),or.getPart(p,o,"editorContainer").each(y=>{const C=y.element;d(C),Be(C,"display","none"),Ee(C,"aria-hidden","true")})},showMainView:p=>{c&&f.toggleToolbarDrawer(p),or.getPart(p,o,"editorContainer").each(y=>{const C=y.element;d(C),uo(C,"display"),Tn(C,"aria-hidden")})}};return{uid:o.uid,dom:o.dom,components:s,apis:f,behaviours:o.behaviours}},jG=bc.optional({factory:ZP,name:"menubar",schema:[At("backstage")]}),GG=o=>o.type===vc.sliding?NG:o.type===vc.floating?MG:u4,qG=bc.optional({factory:{sketch:o=>e7.sketch({uid:o.uid,dom:o.dom,listBehaviours:Pt([pe.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>u4({type:o.type,uid:ee("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:o.providers,onEscape:()=>(o.onEscape(),k.some(!0))}),setupItem:(s,a,c,d)=>{ju.setGroups(a,c)},shell:!0})},name:"multiple-toolbar",schema:[At("dom"),At("onEscape")]}),JD=bc.optional({factory:{sketch:o=>{const s=GG(o),a={type:o.type,uid:o.uid,onEscape:()=>(o.onEscape(),k.some(!0)),onToggled:(c,d)=>o.onToolbarToggled(d),cyclicKeying:!1,initGroups:[],getSink:o.getSink,providers:o.providers,moreDrawerData:{lazyToolbar:o.lazyToolbar,lazyMoreButton:o.lazyMoreButton,lazyHeader:o.lazyHeader},attributes:o.attributes};return s(a)}},name:"toolbar",schema:[At("dom"),At("onEscape"),At("getSink")]}),KG=bc.optional({factory:{sketch:EG},name:"header",schema:[At("dom")]}),YG=bc.optional({factory:{sketch:AG},name:"promotion",schema:[At("dom"),At("promotionLink")]}),cI=bc.optional({name:"socket",schema:[At("dom")]}),lI=bc.optional({factory:{sketch:i4},name:"sidebar",schema:[At("dom")]}),XG=bc.optional({factory:{sketch:c4},name:"throbber",schema:[At("dom")]}),JG=bc.optional({factory:d4,name:"viewWrapper",schema:[At("backstage")]}),QG=o=>({uid:o.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:o.components}),tq=bc.optional({factory:{sketch:QG},name:"editorContainer",schema:[]});var an=Wa({name:"OuterContainer",factory:ZG,configFields:[At("dom"),At("behaviours")],partFields:[KG,jG,JD,qG,cI,lI,YG,XG,JG,tq],apis:{getSocket:(o,s)=>o.getSocket(s),setSidebar:(o,s,a,c)=>{o.setSidebar(s,a,c)},toggleSidebar:(o,s,a)=>{o.toggleSidebar(s,a)},whichSidebar:(o,s)=>o.whichSidebar(s),getHeader:(o,s)=>o.getHeader(s),getToolbar:(o,s)=>o.getToolbar(s),setToolbar:(o,s,a)=>{o.setToolbar(s,a)},setToolbars:(o,s,a)=>{o.setToolbars(s,a)},refreshToolbar:(o,s)=>o.refreshToolbar(s),toggleToolbarDrawer:(o,s)=>{o.toggleToolbarDrawer(s)},toggleToolbarDrawerWithoutFocusing:(o,s)=>{o.toggleToolbarDrawerWithoutFocusing(s)},isToolbarDrawerToggled:(o,s)=>o.isToolbarDrawerToggled(s),getThrobber:(o,s)=>o.getThrobber(s),setMenubar:(o,s,a)=>{o.setMenubar(s,a)},focusMenubar:(o,s)=>{o.focusMenubar(s)},focusToolbar:(o,s)=>{o.focusToolbar(s)}
81,setViews:(o,s,a)=>{o.setViews(s,a)},toggleView:(o,s,a)=>o.toggleView(s,a),whichView:(o,s)=>o.whichView(s)}});const eq="file edit view insert format tools table help",QD={file:{title:"File",items:"newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},m4=(o,s,a)=>{const c=IB(a).split(/[ ,]/);return{text:o.title,getItems:()=>Y(o.items,d=>{const f=d.toLowerCase();return f.trim().length===0?[]:ps(c,p=>p===f)?[]:f==="separator"||f==="|"?[{type:"separator"}]:s.menuItems[f]?[s.menuItems[f]]:[]})}},tC=o=>o.split(" "),uI=(o,s)=>{const a={...QD,...s.menus},c=qo(s.menus).length>0,d=s.menubar===void 0||s.menubar===!0?tC(eq):tC(s.menubar===!1?"":s.menubar),f=Io(d,y=>{const C=nn(QD,y);return c?C||he(s.menus,y).exists(_=>nn(_,"items")):C}),p=pt(f,y=>{const C=a[y];return m4({title:C.title,items:tC(C.items)},s,o)});return Io(p,y=>{const C=_=>$e(_)||_.type!=="separator";return y.getItems().length>0&&ps(y.getItems(),C)})},oq=o=>{const s=()=>{o._skinLoaded=!0,NM(o)};return()=>{o.initialized?s():o.on("init",s)}},dI=(o,s)=>()=>D3(o,{message:s}),nq=o=>{const s=gy(o);return s?k.from(s):k.none()},mI=(o,s,a)=>(o.on("remove",()=>a.unload(s)),a.load(s)),g4=(o,s,a,c)=>(o.on("remove",()=>c.unloadRawCss(s)),c.loadRawCss(s,a)),gI=(o,s)=>"ui/"+o+"/"+s,sq=o=>k.from(tinymce.Resource.get(o)).filter($e),tO=(o,s,a="")=>{const c=nq(o).map(f=>gI(f,`${s}.css`)),d=c.bind(sq);return Ec(c,d,(f,p)=>({_kind:"load-raw",key:f,css:p})).getOrThunk(()=>{const f=o.editorManager.suffix;return{_kind:"load-stylesheet",url:a+`/${s}${f}.css`}})},eO=(o,s)=>{const a=o.ui.styleSheetLoader,c=tO(o,"skin",s);switch(c._kind){case"load-raw":const{key:d,css:f}=c;return g4(o,d,f,a),Promise.resolve();case"load-stylesheet":const{url:p}=c;return mI(o,p,a);default:return Promise.resolve()}},rq=(o,s)=>{if(Rc(Zt.fromDom(o.getElement()))){const c=ub.DOM.styleSheetLoader,d=tO(o,"skin.shadowdom",s);switch(d._kind){case"load-raw":const{key:f,css:p}=d;return g4(o,f,p,c),Promise.resolve();case"load-stylesheet":const{url:y}=d;return mI(o,y,c);default:return Promise.resolve()}}else return Promise.resolve()},aq=(o,s,a)=>{const d=tO(o,s?"content.inline":"content",a);switch(d._kind){case"load-raw":const{key:f,css:p}=d;return s?g4(o,f,p,o.ui.styleSheetLoader):o.on("PostRender",()=>{g4(o,f,p,o.dom.styleSheetLoader)}),Promise.resolve();case"load-stylesheet":const{url:y}=d;return a&&o.contentCSS.push(y),Promise.resolve();default:return Promise.resolve()}},fI=async(o,s)=>{const a=h5(s);if(await aq(s,o,a),!fy(s)&&$e(a))return Promise.all([eO(s,a),rq(s,a)]).then()},pI=(o,s)=>fI(o,s).then(oq(s),dI(s,"Skin could not be loaded")),hI=so(pI,!1),iq=so(pI,!0),oO=o=>({isEnabled:()=>!ce.isDisabled(o),setEnabled:s=>ce.set(o,!s),setText:s=>be(o,rl,{text:s}),setIcon:s=>be(o,Lh,{icon:s})}),cq=o=>({setActive:s=>{go.set(o,s)},isActive:()=>go.isOn(o),isEnabled:()=>!ce.isDisabled(o),setEnabled:s=>ce.set(o,!s),setText:s=>be(o,rl,{text:s}),setIcon:s=>be(o,Lh,{icon:s})}),lq=(o,s)=>o.map(a=>({"aria-label":s.translate(a)})).getOr({}),uq=ee("focus-button"),f4=(o,s,a,c,d,f,p)=>{const y=s.map(_=>Mo(CD(_,"tox-tbtn",d))),C=o.map(_=>Mo(Hf(_,d.icons)));return{dom:{tag:"button",classes:["tox-tbtn"].concat(s.isSome()?["tox-tbtn--select"]:[]),attributes:{...lq(a,d),...$n(p)?{"data-mce-name":p}:{}}
81},components:Xd([C.map(_=>_.asSpec()),y.map(_=>_.asSpec())]),eventOrder:{[va()]:["focusing","alloy.base.behaviour",em],[Hc()]:[em,"toolbar-group-button-events"],[Mi()]:[em,"toolbar-group-button-events","tooltipping"]},buttonBehaviours:Pt([td.toolbarButton(()=>d.checkUiComponentContext(f).shouldDisable),ms(()=>d.checkUiComponentContext(f)),Me(em,[vn((_,A)=>q3(_)),vt(rl,(_,A)=>{y.bind(O=>O.getOpt(_)).each(O=>{ze.set(O,[En(d.translate(A.event.text))])})}),vt(Lh,(_,A)=>{C.bind(O=>O.getOpt(_)).each(O=>{ze.set(O,[Hf(A.event.icon,d.icons)])})}),vt(va(),(_,A)=>{A.event.prevent(),no(_,uq)})])].concat(c.getOr([])))}},dq=(o,s,a,c,d)=>{const f=s.shared,p=fe(q),y={toolbarButtonBehaviours:[],getApi:oO,onSetup:o.onSetup},C=[Me("toolbar-group-button-events",[ed(y,p),Nf(y,p)]),...o.tooltip.map(_=>yn.config(s.shared.providers.tooltips.getConfig({tooltipText:s.shared.providers.translate(_)}))).toArray()];return eg.sketch({lazySink:f.getSink,fetch:()=>cs.nu(_=>{_(pt(a(o.items),l4))}),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:f4(o.icon,o.text,o.tooltip,k.some(C),f.providers,o.context,d),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:c}}}})},bI=(o,s,a,c)=>{var p;const d=fe(q),f=f4(o.icon,o.text,o.tooltip,k.none(),a,o.context,c);return Ks.sketch({dom:f.dom,components:f.components,eventOrder:vD,buttonBehaviours:{...Pt([Me("toolbar-button-events",[dj({onAction:o.onAction,getApi:s.getApi}),ed(s,d),Nf(s,d)]),...o.tooltip.map(y=>yn.config(a.tooltips.getConfig({tooltipText:a.translate(y)+o.shortcut.map(C=>` (${A6(C)})`).getOr("")}))).toArray(),td.toolbarButton(()=>!o.enabled||a.checkUiComponentContext(o.context).shouldDisable),ms(()=>a.checkUiComponentContext(o.context))].concat(s.toolbarButtonBehaviours)),[em]:(p=f.buttonBehaviours)==null?void 0:p[em]}})},mq=(o,s,a)=>eC(o,s,[],a),eC=(o,s,a,c)=>bI(o,{toolbarButtonBehaviours:a.length>0?[Me("toolbarButtonWith",a)]:[],getApi:oO,onSetup:o.onSetup},s,c),nO=(o,s,a)=>xI(o,s,[],a),xI=(o,s,a,c)=>bI(o,{toolbarButtonBehaviours:[ze.config({}),go.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(a.length>0?[Me("toolbarToggleButtonWith",a)]:[]),getApi:cq,onSetup:o.onSetup},s,c),gq=(o,s,a)=>c=>cs.nu(d=>s.fetch(d)).map(d=>k.from(cD(kn(I3(ee("menu-value"),d,f=>{s.onItemAction(o(c),f)},s.columns,s.presets,Xl.CLOSE_ON_EXECUTE,s.select.getOr(Fo),a),{movement:$f(s.columns,s.presets),menuBehaviours:Ab.unnamedEvents(s.columns!=="auto"?[]:[vn((f,p)=>{S6(f,4,$5(s.presets)).each(({numRows:y,numColumns:C})=>{pe.setGridSize(f,y,C)})})])})))),fq=(o,s,a)=>c=>{const d=c.getSystem(),f=c.element,p=()=>{const C=bs(f,"tox-split-button__chevron"),_=C?ei(f).bind(O=>d.getByDom(O).toOptional()):k.some(c),A=C?k.some(c):Ox(f).bind(O=>d.getByDom(O).toOptional().filter(M=>bs(M.element,"tox-split-button__chevron")));return{mainOpt:_,chevronOpt:A}},y=C=>{const{mainOpt:_,chevronOpt:A}=p();_.each(C),A.each(C)};return{isEnabled:()=>{const{mainOpt:C}=p();return C.exists(_=>!ce.isDisabled(_))},setEnabled:C=>y(_=>ce.set(_,!C)),setText:C=>
81{const{mainOpt:_}=p();_.each(A=>be(A,rl,{text:C}))},setIcon:C=>{const{mainOpt:_}=p();_.each(A=>be(A,Lh,{icon:C}))},setIconFill:(C,_)=>y(A=>{Ko(A.element,`svg path[class="${C}"], rect[class="${C}"]`).each(O=>{Ee(O,"fill",_)})}),isActive:()=>{const{mainOpt:C}=p();return C.exists(_=>go.isOn(_))},setActive:C=>{const{mainOpt:_}=p();_.each(A=>go.set(A,C))},setTooltip:C=>{o.set(C);const{mainOpt:_,chevronOpt:A}=p();_.each(M=>Ee(M.element,"aria-label",s.providers.translate(C)));const O=a.chevronTooltip.map(M=>s.providers.translate(M)).getOr(s.providers.translate(C));A.each(M=>Ee(M.element,"aria-label",O))}}},pq=(o,s,a)=>{const c=fe(q),d=fe(o.tooltip.getOr("")),f=fq(d,s,o),p=ee("tox-split-menu"),y=fe(!1),C=()=>({"aria-haspopup":"menu","aria-expanded":String(y.get()),"aria-controls":p}),_=()=>o.tooltip.map(W=>s.providers.translate(W)).getOr(s.providers.translate("Text color")),A=()=>o.chevronTooltip.map(W=>s.providers.translate(W)).getOrThunk(()=>{const W=_();return s.providers.translate(["{0} menu",W])}),O=(W,j)=>{y.set(W),Ee(j.element,"aria-expanded",String(W))},M=gi.sketch({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:qV("chevron-down",s.providers.icons),attributes:{"aria-label":A(),...$n(a)?{"data-mce-name":a+"-chevron"}:{},...C()}},components:[],toggleClass:"tox-tbtn--enabled",dropdownBehaviours:Pt([Me("split-dropdown-events",[vn((W,j)=>q3(W)),ed({getApi:f,onSetup:o.onSetup},c),vt("alloy-dropdown-open",W=>O(!0,W)),vt("alloy-dropdown-close",W=>O(!1,W))]),td.toolbarButton(()=>s.providers.checkUiComponentContext(o.context).shouldDisable),ms(()=>s.providers.checkUiComponentContext(o.context)),Wu.config({}),yn.config(s.providers.tooltips.getConfig({tooltipText:A(),onShow:W=>{if(d.get()!==o.tooltip.getOr("")){const j=o.chevronTooltip.map(V=>s.providers.translate(V)).getOr(`${s.providers.translate(d.get())} menu`);yn.setComponents(W,s.providers.tooltips.getComponents({tooltipText:j}))}}}))]),lazySink:s.getSink,fetch:gq(f,o,s.providers),getHotspot:W=>ei(W.element).bind(j=>W.getSystem().getByDom(j).toOptional()),onOpen:(W,j,V)=>{Bo.highlightBy(V,K=>bs(K.element,"tox-collection__item--active")),Bo.getHighlighted(V).each(pe.focusIn)},parts:{menu:{..._y(!1,o.columns,o.presets),dom:{..._y(!1,o.columns,o.presets).dom,tag:"div",attributes:{id:p}}}}}),I=f4(o.icon,o.text,k.none(),k.some([go.config({toggleClass:"tox-tbtn--enabled",aria:o.presets==="color"?{mode:"none"}:{mode:"pressed"},toggleOnExecute:!1}),...o.tooltip.isSome()?[yn.config(s.providers.tooltips.getConfig({tooltipText:s.providers.translate(o.tooltip.getOr("")),onShow:W=>{if(d.get()!==o.tooltip.getOr("")){const j=s.providers.translate(d.get());yn.setComponents(W,s.providers.tooltips.getComponents({tooltipText:j}))}}}))]:[]]),s.providers,o.context,a);return[Ks.sketch({dom:{...I.dom,classes:["tox-tbtn","tox-split-button__main"].concat(o.text.isSome()?["tox-tbtn--select"]:[]),attributes:{"aria-label":_(),...$n(a)?{"data-mce-name":a}:{}}},components:I.components,eventOrder:I.eventOrder,buttonBehaviours:I.buttonBehaviours,action:W=>{if(o.onAction){const j=f(W);j.isEnabled()&&o.onAction(j)}}}),M]},hq=".tox-toolbar-slider__input,.tox-toolbar-textfield",vI=o=>{jn.getContent(o).each(s=>{Ko(s.element,hq).fold(()=>pe.focusIn(s),Js)})},bq=o=>Es(o.element).each(s=>{ec(s,'[tabindex="-1"]').each(a=>{Js(a)})}),yI=ee("forward-slide"),p4=ee("backward-slide"),h4=ee("change-slide-event"),Hb="tox-pop--resizing",sO=o=>{const s=fe([]);return{sketch:jn.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:c=>{s.set([]),jn.getContent(c).each(d=>{uo(d.element,"visibility")}),Un(c.element,Hb),uo(c.element,"width")},onHide:()=>{s.set([]),o.onHide()},inlineBehaviours:Pt([Me("context-toolbar-events",[af(M1(),(c,d)=>{d.event.raw.propertyName==="width"&&(Un(c.element,Hb),uo(c.element,"width"))}),vt(h4,(c,d)=>{const f=c.element;uo(f,"width");const p=Ir(f),y=Es(c.element).isSome();uo(f,"left"),uo(f,"right"),uo(f,"max-width"),jn.setContent(c,d.event.contents),sn(f,Hb);const C=Ir(f);Be(f,"transition","none"),jn.reposition(c),uo(f,"transition"),Be(f,"width",p+"px"),d.event.focus.fold(()=>{y&&vI(c)},_=>{rr(ks(c.element)).fold(()=>Js(_),A=>{ln(A,_)||o.focusElement(_)})}),setTimeout(()=>{Be(c.element,"width",C+"px")},0)}),vt(yI,(c,d)=>{jn.getContent(c).each(f=>{s.set(s.get().concat([{bar:f,focus:rr(ks(c.element))}]))}),be(c,h4,{contents:d.event.forwardContents,focus:k.none()})}),vt(p4,(c,d)=>{o.onBack(),gl(s.get()).each(f=>{s.set(s.get().slice(0,s.get().length-1)),be(c,h4,{contents:h(f.bar),focus:f.focus})})})]),pe.config({mode:"special",onEscape:c=>gl(s.get()).fold(()=>o.onEscape(),d=>(no(c,p4),k.some(!0)))})]),lazySink:()=>Te.value(o.sink)}),inSubtoolbar:()=>s.get().length>0}},CI=(o,s)=>{const a=Fi(Yd({type:"button",icon:"chevron-left",tooltip:"Back",onAction:q}));return eC(a,s.shared.providers,[vt(xD,c=>{no(c,p4)})])},il=(o,s,a)=>Ci(a)?o.translate(s):o.translate([s,o.translate(a)]),wI=(o,s)=>{const a=(p,y,C,_)=>{const A=o.shared.providers.translate(p.title);if(p.type==="separator")return k.some({type:"separator",text:A});if(p.type==="submenu"){const O=Y(p.getStyleItems(),M=>c(M,y,_));return y===0&&O.length<=0?k.none():k.some({type:"nestedmenuitem",text:A,enabled:O.length>0,getSubmenuItems:()=>Y(p.getStyleItems(),M=>c(M,y,_))})}else return k.some({type:"togglemenuitem",text:A,icon:p.icon,active:p.isSelected(_),enabled:!C,onAction:s.onAction(p),...p.getStylePreview().fold(()=>({}
81),O=>({meta:{style:O}}))})},c=(p,y,C)=>{const _=p.type==="formatter"&&s.isInvalid(p);return y===0?_?[]:a(p,y,!1,C).toArray():a(p,y,_,C).toArray()},d=p=>{const y=s.getCurrentValue(),C=s.shouldHide?0:1;return Y(p,_=>c(_,C,y))};return{validateItems:d,getFetch:(p,y)=>(C,_)=>{const A=y(),O=d(A),M=mg(O,Xl.CLOSE_ON_EXECUTE,p,{isHorizontalMenu:!1,search:k.none()});_(M)}}},zb=(o,s)=>{const a=s.dataset,c=a.type==="basic"?()=>pt(a.data,d=>wP(d,s.isSelectedFor,s.getPreviewFor)):a.getData;return{items:wI(o,s),getStyleItems:c}},oC=(o,s,a,c,d,f)=>{const{items:p,getStyleItems:y}=zb(s,a),C=fe(a.tooltip),_=O=>({getComponent:nt(O),setTooltip:M=>{const I=s.shared.providers.translate(M);Ee(O.element,"aria-label",I),C.set(M)}}),A=O=>{const M=I=>O.setTooltip(il(o,c(I.value),I.value));return o.on(d,M),Nh(If(o,"NodeChange",I=>{const L=I.getComponent();a.updateText(L),ce.set(I.getComponent(),!o.selection.isEditable()||y().length===0)})(O),()=>o.off(d,M))};return wD({context:"mode:design",text:a.icon.isSome()?k.none():a.text,icon:a.icon,ariaLabel:k.some(a.tooltip),tooltip:k.none(),role:k.none(),fetch:p.getFetch(s,y),onSetup:A,getApi:_,columns:1,presets:"normal",classes:a.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[yn.config({...s.shared.providers.tooltips.getConfig({tooltipText:s.shared.providers.translate(a.tooltip),onShow:O=>{if(a.tooltip!==C.get()){const M=s.shared.providers.translate(C.get());yn.setComponents(O,s.shared.providers.tooltips.getComponents({tooltipText:M}))}}})})]},"tox-tbtn",s.shared,f)},xq=o=>pt(o,s=>{let a=s,c=s;const d=s.split("=");return d.length>1&&(a=d[0],c=d[1]),{title:a,format:c}}),vq=o=>({type:"basic",data:o});var Vb;(function(o){o[o.SemiColon=0]="SemiColon",o[o.Space=1]="Space"})(Vb||(Vb={}));const yq=(o,s)=>s===Vb.SemiColon?o.replace(/;$/,"").split(";"):o.split(" "),rO=(o,s,a)=>{const c=o.options.get(s);return{type:"basic",data:xq(yq(c,a))}},_I="Align",SI=nt("Alignment {0}"),kI="left",nC=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],EI=o=>{const s=()=>xt(nC,y=>o.formatter.match(y.format)),a=y=>()=>o.formatter.match(y),c=y=>k.none,d=y=>{const _=s().fold(nt(kI),A=>A.title.toLowerCase());be(y,Lh,{icon:`align-${_}`}),IM(o,{value:_})},f=vq(nC),p=y=>()=>xt(nC,C=>C.format===y.format).each(C=>o.execCommand(C.command));return{tooltip:il(o,SI(),kI),text:k.none(),icon:k.some("align-left"),isSelectedFor:a,getCurrentValue:k.none,getPreviewFor:c,onAction:p,updateText:d,dataset:f,shouldHide:!1,isInvalid:y=>!o.formatter.canApply(y.format)}},Cq=(o,s)=>oC(o,s,EI(o),SI,"AlignTextUpdate","align"),wq=(o,s)=>{const a=zb(s,EI(o));o.ui.registry.addNestedMenuItem("align",{text:s.shared.providers.translate(_I),onSetup:br(o),getSubmenuItems:()=>a.items.validateItems(a.getStyleItems())})},AI=(o,s)=>{const a=s(),c=pt(a,d=>d.format);return k.from(o.formatter.closest(c)).bind(d=>xt(a,f=>f.format===d))},_q="Blocks",TI=nt("Block {0}"),b4="Paragraph",aO=o=>{const s=f=>()=>o.formatter.match(f),a=f=>()=>{const p=o.formatter.get(f);return p?k.some({tag:p.length>0&&(p[0].inline||p[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(f))}):k.none()},c=f=>{const y=AI(o,()=>d.data).fold(nt(b4),C=>C.title);be(f,rl,{text:y}),O3(o,{value:y})},d=rO(o,"block_formats",Vb.SemiColon);return{tooltip:il(o,TI(),b4),text:k.some(b4),icon:k.none(),isSelectedFor:s,getCurrentValue:k.none,getPreviewFor:a,onAction:R3(o),updateText:c,dataset:d,shouldHide:!1,isInvalid:f=>!o.formatter.canApply(f.format)}},DI=(o,s)=>oC(o,s,aO(o),TI,"BlocksTextUpdate","blocks"),Sq=(o,s)=>{const a=zb(s,aO(o));o.ui.registry.addNestedMenuItem("blocks",{text:_q,onSetup:br(o),getSubmenuItems:()=>a.items.validateItems(a.getStyleItems())})},OI="Fonts",RI=nt("Font {0}"),iO="System Font",kq=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],cO=o=>{const s=o.split(/\s*,\s*/);return pt(s,a=>a.replace(/^['"]+|['"]+$/g,""))},BI=(o,s)=>s.length>0&&po(s,a=>o.indexOf(a.toLowerCase())>-1),FI=(o,s)=>{if(o.indexOf("-apple-system")===0||s.length>0){const a=cO(o.toLowerCase());return BI(a,kq)||BI(a,s)}else return!1},MI=o=>{const s=()=>{const C=L=>L?cO(L)[0]:"",_=o.queryCommandValue("FontName"),A=y.data,O=_?_.toLowerCase():"",M=tF(o);return{matchOpt:xt(A,L=>{const W=L.format;return W.toLowerCase()===O||C(W).toLowerCase()===C(O).toLowerCase()}).orThunk(()=>yi(FI(O,M),{title:iO,format:O})),font:_}},a=C=>_=>_.exists(A=>A.format===C),c=()=>{const{matchOpt:C}=s();return C},d=C=>()=>k.some({tag:"div",styles:C.indexOf("dings")===-1?{"font-family":C}:{}}),f=C=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("FontName",!1,C.format)})},p=C=>{const{matchOpt:_,font:A}=s(),O=_.fold(nt(A),M=>M.title);be(C,rl,{text:O}),fZ(o,{value:O})},y=rO(o,"font_family_formats",Vb.SemiColon);return{tooltip:il(o,RI(),iO),text:k.some(iO),icon:k.none(),isSelectedFor:a,getCurrentValue:c,getPreviewFor:d,onAction:f,updateText:p,dataset:y,shouldHide:!1,isInvalid:Fo}},Eq=(o,s)=>oC(o,s,MI(o),RI,"FontFamilyTextUpdate","fontfamily"),Aq=(o,s)=>{const a=zb(s,MI(o));o.ui.registry.addNestedMenuItem("fontfamily",{text:s.shared.providers.translate(OI),onSetup:br(o),getSubmenuItems:()=>
81a.items.validateItems(a.getStyleItems())})};var x4=tinymce.util.Tools.resolve("tinymce.util.VK");const Tq=(o,s,a,c)=>{let d=k.none();const f=tt=>tt.map(ct=>ne.getValue(ct)).getOr(""),p=If(o,"NodeChange SwitchMode DisabledStateChange",tt=>{const ct=tt.getComponent();d=k.some(ct),a.updateInputValue(ct),ce.set(ct,!o.selection.isEditable()||XS(o))}),y=tt=>({getComponent:nt(tt)}),C=fe(q),_=ee("custom-number-input-events"),A=(tt,ct,dt)=>{const Wt=f(d),kt=a.getNewValue(Wt,tt),Ot=Wt.length-`${kt}`.length,Tt=d.map(le=>le.element.dom.selectionStart-Ot),xe=d.map(le=>le.element.dom.selectionEnd-Ot);a.onAction(kt,dt),d.each(le=>{ne.setValue(le,kt),ct&&(Tt.each(Qe=>le.element.dom.selectionStart=Qe),xe.each(Qe=>le.element.dom.selectionEnd=Qe))})},O=(tt,ct)=>A((dt,Wt)=>dt-Wt,tt,ct),M=(tt,ct)=>A((dt,Wt)=>dt+Wt,tt,ct),I=tt=>xl(tt.element).fold(k.none,ct=>(Js(ct),k.some(!0))),L=tt=>Xi(tt.element)?(ho(tt.element).each(ct=>Js(ct)),k.some(!0)):k.none(),W=(tt,ct,dt,Wt)=>{const kt=fe(q),Ot=s.shared.providers.translate(dt),Tt=ee("altExecuting"),xe=If(o,"NodeChange SwitchMode DisabledStateChange",Qe=>{ce.set(Qe.getComponent(),!o.selection.isEditable()||XS(o))}),le=Qe=>{ce.isDisabled(Qe)||tt(!0)};return Ks.sketch({dom:{tag:"button",attributes:{"aria-label":Ot,"data-mce-name":ct},classes:Wt.concat(ct)},components:[yD(ct,s.shared.providers.icons)],buttonBehaviours:Pt([ce.config({}),yn.config(s.shared.providers.tooltips.getConfig({tooltipText:Ot})),Me(Tt,[ed({onSetup:xe,getApi:y},kt),Nf({getApi:y},kt),vt(qs(),(Qe,ye)=>{(ye.event.raw.keyCode===x4.SPACEBAR||ye.event.raw.keyCode===x4.ENTER)&&(ce.isDisabled(Qe)||tt(!1))}),vt(km(),le),vt(Sd(),le)])]),eventOrder:{[qs()]:[Tt,"keying"],[km()]:[Tt,"alloy.base.behaviour"],[Sd()]:[Tt,"alloy.base.behaviour"],[Hc()]:["alloy.base.behaviour",Tt,"tooltipping"],[Mi()]:[Tt,"tooltipping"]}})},j=Mo(W(tt=>O(!1,tt),"minus","Decrease font size",[])),V=Mo(W(tt=>M(!1,tt),"plus","Increase font size",[])),K=Mo({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[qd.sketch({inputBehaviours:Pt([ce.config({}),Me(_,[ed({onSetup:p,getApi:y},C),Nf({getApi:y},C)]),Me("input-update-display-text",[vt(rl,(tt,ct)=>{ne.setValue(tt,ct.event.text)}),vt(i2(),tt=>{a.onAction(ne.getValue(tt))}),vt(Sm(),tt=>{a.onAction(ne.getValue(tt))})]),pe.config({mode:"special",onEnter:tt=>(A(eo,!0,!0),k.some(!0)),onEscape:I,onUp:tt=>(M(!0,!1),k.some(!0)),onDown:tt=>(O(!0,!1),k.some(!0)),onLeft:(tt,ct)=>(ct.cut(),k.none()),onRight:(tt,ct)=>(ct.cut(),k.none())})])})],behaviours:Pt([Ie.config({}),pe.config({mode:"special",onEnter:L,onSpace:L,onEscape:I}),Me("input-wrapper-events",[vt(ii(),tt=>{It([j,V],ct=>{const dt=Zt.fromDom(ct.get(tt).element.dom);Xi(dt)&&Qn(dt)})})])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...$n(c)?{"data-mce-name":c}:{}}},components:[j.asSpec(),K.asSpec(),V.asSpec()],behaviours:Pt([Ie.config({}),pe.config({mode:"flow",focusInside:Om.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:tt=>Xi(tt.element)?k.none():(Js(tt.element),k.some(!0))})])}},Dq="Font sizes",NI=nt("Font size {0}"),lO="12pt",Oq={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},Rq={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},Bq=(o,s)=>{const a=Math.pow(10,s);return Math.round(o*a)/a},Fq=(o,s)=>/[0-9.]+px$/.test(o)?Bq(parseInt(o,10)*72/96,s||0)+"pt":he(Rq,o).getOr(o),Mq=o=>he(Oq,o).getOr(""),PI=o=>{const s=()=>{let C=k.none();const _=y.data,A=o.queryCommandValue("FontSize");if(A)for(let O=3;C.isNone()&&O>=0;O--){const M=Fq(A,O),I=Mq(M);C=xt(_,L=>L.format===A||L.format===M||L.format===I)}return{matchOpt:C,size:A}},a=C=>_=>_.exists(A=>A.format===C),c=()=>{const{matchOpt:C}=s();return C},d=nt(k.none),f=C=>()=>{o.undoManager.transact(()=>{o.focus(),o.execCommand("FontSize",!1,C.format)})},p=C=>{const{matchOpt:_,size:A}=s(),O=_.fold(nt(A),M=>M.title);be(C,rl,{text:O}),gZ(o,{value:O})},y=rO(o,"font_size_formats",Vb.Space);return{tooltip:il(o,NI(),lO),text:k.some(lO),icon:k.none(),isSelectedFor:a,getPreviewFor:d,getCurrentValue:c,onAction:f,updateText:p,dataset:y,shouldHide:!1,isInvalid:Fo}},Nq=(o,s)=>oC(o,s,PI(o),NI,"FontSizeTextUpdate","fontsize"),II=o=>{const s={step:1};return{em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[o]??s},Pq=16,Iq=o=>o>=0,$I=o=>{const s=()=>o.queryCommandValue("FontSize");return{updateInputValue:c=>be(c,rl,{text:s()}),onAction:(c,d)=>o.execCommand("FontSize",!1,c,{skip_focus:!d}),getNewValue:(c,d)=>{_1(c,["unsupportedLength","empty"]);const f=s(),p=_1(c,["unsupportedLength","empty"]).or(_1(f,["unsupportedLength","empty"])),y=p.map(M=>M.value).getOr(Pq),C=e3(o),_=p.map(M=>M.unit).filter(M=>M!=="").getOr(C),A=d(y,II(_).step),O=`${Iq(A)?A:y}${_}`;return O!==f&&Jd(o,{value:O}),O}}},$q=(o,s)=>Tq(o,s,$I(o),"fontsizeinput"),LI=(o,s)=>{const a=zb(s,PI(o));o.ui.registry.addNestedMenuItem("fontsize",{text:Dq,onSetup:br(o),getSubmenuItems:()=>
81a.items.validateItems(a.getStyleItems())})},HI="Formats",zI=o=>Ci(o)?"Formats":"Format {0}",VI=(o,s)=>{const a="Formats",c=p=>()=>o.formatter.match(p),d=p=>()=>{const y=o.formatter.get(p);return y!==void 0?k.some({tag:y.length>0&&(y[0].inline||y[0].block)||"div",styles:o.dom.parseStyle(o.formatter.getCssText(p))}):k.none()},f=p=>{const y=O=>Yj(O)?Y(O.items,y):bP(O)?[{title:O.title,format:O.format}]:[],C=Y(CP(o),y),A=AI(o,nt(C)).fold(nt({title:a,tooltipLabel:""}),O=>({title:O.title,tooltipLabel:O.title}));be(p,rl,{text:A.title}),mZ(o,{value:A.tooltipLabel})};return{tooltip:il(o,zI(""),""),text:k.some(a),icon:k.none(),isSelectedFor:c,getCurrentValue:k.none,getPreviewFor:d,onAction:R3(o),updateText:f,shouldHide:u5(o),isInvalid:p=>!o.formatter.canApply(p.format),dataset:s}},Lq=(o,s)=>{const a={type:"advanced",...s.styles};return oC(o,s,VI(o,a),zI,"StylesTextUpdate","styles")},Ub=(o,s)=>{const a={type:"advanced",...s.styles},c=zb(s,VI(o,a));o.ui.registry.addNestedMenuItem("styles",{text:HI,onSetup:br(o,()=>c.getStyleItems().length>0),getSubmenuItems:()=>c.items.validateItems(c.getStyleItems())})},Hq=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],sC=(o,s)=>(a,c,d,f)=>{const p=o(a).mapError(y=>$g(y)).getOrDie();return s(p,c,d,f)},zq={button:sC(Yd,(o,s,a,c)=>mq(o,s.shared.providers,c)),togglebutton:sC(g6,(o,s,a,c)=>nO(o,s.shared.providers,c)),menubutton:sC(c6,(o,s,a,c)=>Zy(o,"tox-tbtn",s,k.none(),!1,c)),splitbutton:sC(VW,(o,s,a,c)=>pq(o,s.shared,c)),grouptoolbarbutton:sC(w6,(o,s,a,c)=>{const d=a.ui.registry.getAll().buttons,f=y=>v4(a,{buttons:d,toolbar:y,allowToolbarGroups:!1},s,k.none()),p={[l0]:s.shared.header.isPositionedAtTop()?Bu.TopToBottom:Bu.BottomToTop};switch(vh(a)){case vc.floating:return dq(o,s,f,p,c);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})},Vq=(o,s,a,c)=>he(zq,o.type).fold(()=>(console.error("skipping button defined by",o),k.none()),d=>k.some(d(o,s,a,c))),UI={styles:Lq,fontsize:Nq,fontsizeinput:$q,fontfamily:Eq,blocks:DI,align:Cq,navigateback:CI},Uq=o=>{const s=pt(Hq,a=>{const c=Io(a.items,d=>nn(o,d)||nn(UI,d));return{name:a.name,items:c}});return Io(s,a=>a.items.length>0)},Wq=o=>{const s=o.split("|");return pt(s,a=>({items:a.trim().split(" ")}))},Zq=o=>Oa(o,s=>(nn(s,"name")||nn(s,"label"))&&nn(s,"items")),uO=o=>{const s=o.toolbar,a=o.buttons;return s===!1?[]:s===void 0||s===!0?Uq(a):$e(s)?Wq(s):Zq(s)?s:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},jq=(o,s,a,c,d,f)=>he(s,a.toLowerCase()).orThunk(()=>f.bind(p=>bi(p,y=>he(s,y+a.toLowerCase())))).fold(()=>he(UI,a.toLowerCase()).map(p=>p(o,d)),p=>p.type==="grouptoolbarbutton"&&!c?(console.warn(`Ignoring the '${a}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),k.none()):Vq(p,d,o,a.toLowerCase())),v4=(o,s,a,c)=>{const d=uO(s),f=pt(d,p=>{const y=Y(p.items,C=>C.trim().length===0?[]:jq(o,s.buttons,C,s.allowToolbarGroups,a,c).map(_=>Array.isArray(_)?_:[_]).getOr([]));return{title:k.from(o.translate(p.name)),label:yi(p.label!==void 0,o.translate(p.label)),items:y}});return Io(f,p=>p.items.length>0)},dO=(o,s,a,c)=>{const d=s.mainUi.outerContainer,f=a.toolbar,p=a.buttons;if(Oa(f,$e)){const y=f.map(C=>{const _={toolbar:C,buttons:p,allowToolbarGroups:a.allowToolbarGroups};return v4(o,_,c,k.none())});an.setToolbars(d,y)}else an.setToolbar(d,v4(o,a,c,k.none()))},mO=Cr(),Gq=mO.os.isiOS()&&mO.os.version.major<=12,qq=(o,s)=>{const{uiMotherships:a}=s,c=o.dom;let d=o.getWin();const f=o.getDoc().documentElement,p=fe(Jo(d.innerWidth,d.innerHeight)),y=fe(Jo(f.offsetWidth,f.offsetHeight)),C=()=>{const M=p.get();(M.left!==d.innerWidth||M.top!==d.innerHeight)&&(p.set(Jo(d.innerWidth,d.innerHeight)),V6(o))},_=()=>{const M=o.getDoc().documentElement,I=y.get();(I.left!==M.offsetWidth||I.top!==M.offsetHeight)&&(y.set(Jo(M.offsetWidth,M.offsetHeight)),V6(o))},A=M=>{cZ(o,M)};c.bind(d,"resize",C),c.bind(d,"scroll",A);const O=ki(Zt.fromDom(o.getBody()),"load",_);o.on("hide",()=>{It(a,M=>{Be(M.element,"display","none")})}),o.on("show",()=>{It(a,M=>{uo(M.element,"display")})}),o.on("NodeChange",_),o.on("remove",()=>{O.unbind(),c.unbind(d,"resize",C),c.unbind(d,"scroll",A),d=null})},Kq=(o,s,a)=>{Of(o)&&fc(a.mainUi.mothership.element,a.popupUi.mothership),eh(s,a.dialogUi.mothership)};var Yq=Object.freeze({__proto__:null,render:(o,s,a,c,d)=>{const{mainUi:f,uiMotherships:p}=s,y=fe(0),C=f.outerContainer;hI(o);const _=Zt.fromDom(d.targetNode),A=Oc(ks(_));fc(_,f.mothership),Kq(o,A,s),o.on("PostRender",()=>{an.setSidebar(C,a.sidebar,XB(o)),an.setViews(C,a.views)}),o.on("SkinLoaded",()=>
81{dO(o,s,a,c),y.set(o.getWin().innerWidth),an.setMenubar(C,uI(o,a)),qq(o,s)});const O=an.getSocket(C).getOrDie("Could not find expected socket element");if(Gq){qn(O.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const W=ok(()=>{o.dispatch("ScrollContent")},20),j=Vo(O.element,"scroll",W.throttle);o.on("remove",j.unbind)}xM(o,s),o.addCommand("ToggleSidebar",(W,j)=>{an.toggleSidebar(C,j),pZ(o)}),o.addQueryValueHandler("ToggleSidebar",()=>an.whichSidebar(C)??""),o.addCommand("ToggleView",(W,j)=>{if(an.toggleView(C,j)){const V=C.element;f.mothership.broadcastOn([Fl()],{target:V}),It(p,K=>{K.broadcastOn([Fl()],{target:V})}),Xa(an.whichView(C))&&(o.focus(),o.nodeChanged(),an.refreshToolbar(C)),$M(o)}}),o.addQueryValueHandler("ToggleView",()=>an.whichView(C)??"");const M=vh(o),I=()=>{an.refreshToolbar(s.mainUi.outerContainer)};(M===vc.sliding||M===vc.floating)&&o.on("ResizeWindow ResizeEditor ResizeContent",()=>{const W=o.getWin().innerWidth;W!==y.get()&&(I(),y.set(W))});const L={setEnabled:W=>{My(s,W?"setEnabled":"setDisabled")},isEnabled:()=>!ce.isDisabled(C)};return{iframeContainer:O.element.dom,editorContainer:C.element.dom,api:L}}});const Xq=o=>/^[0-9\.]+(|px)$/i.test(""+o)?k.some(parseInt(""+o,10)):k.none(),y4=o=>la(o)?o+"px":o,C4=(o,s,a)=>{const c=s.filter(f=>o<f),d=a.filter(f=>o>f);return c.or(d).getOr(o)},Jq=(o,s)=>{if(typeof s=="number")return k.from(s);const a=/^([0-9.]+)(pt|em|px)$/.exec(s.trim());if(a){const c=a[2],d=Number.parseFloat(a[1]);if(Number.isNaN(d)||d<0)return k.none();if(c==="em")return k.from(d*Number.parseFloat(window.getComputedStyle(o.dom).fontSize));if(c==="pt")return k.from(d*(72/96));if(c==="px")return k.from(d)}return k.none()},Qq=o=>{const s=Jq(Zt.fromDom(o.targetElm),r5(o)),a=c5(o),c=l5(o);return s.map(d=>C4(d,a,c))},tK=o=>Qq(o).getOr(r5(o)),gO=o=>{const s=a5(o),a=i5(o),c=JS(o);return Xq(s).map(d=>C4(d,a,c))},eK=o=>gO(o).getOr(a5(o)),{ToolbarLocation:Wb,ToolbarMode:rC}=AV,WI=40,oK=(o,s,a,c,d)=>{const{mainUi:f,uiMotherships:p}=a,y=ub.DOM,C=hb(o),_=bb(o),A=JS(o).or(gO(o)),O=c.shared.header,M=O.isPositionedAtTop,I=150,L=vh(o),W=L===rC.sliding||L===rC.floating,j=fe(!1),V=()=>j.get()&&!o.removed,K=ue=>W?ue.fold(nt(0),_t=>_t.components().length>1?Zs(_t.components()[1].element):0):0,tt=ue=>{switch(d5(o)){case Wb.auto:const _t=an.getToolbar(f.outerContainer),Lt=K(_t),Ae=Zs(ue.element)-Lt,Ge=xs(s);if(Ge.y>Ae)return"top";{const Ue=Ax(s),jo=Math.max(Ue.dom.scrollHeight,Zs(Ue));return Ge.bottom<jo-Ae||Sr().bottom<Ge.bottom-Ae?"bottom":"top"}case Wb.bottom:return"bottom";case Wb.top:default:return"top"}},ct=ue=>{d.on(_t=>{Nn.setModes(_t,[ue]),O.setDockingMode(ue);const Lt=M()?Bu.TopToBottom:Bu.BottomToTop;Ee(_t.element,l0,Lt)})},dt=()=>{d.on(ue=>{const _t=A.getOrThunk(()=>S1().width-Ti(s).left-10);Be(ue.element,"max-width",_t+"px")})},Wt=(ue,_t)=>{d.on(Lt=>{const Ae=an.getToolbar(f.outerContainer),Ge=K(Ae),me=xs(s),Ue=kt(o,f.outerContainer.element),jo=()=>Ue.fold(()=>me.x,xr=>{const ra=xs(xr);return ln(xr,ni())?me.x:me.x-ra.x}),Eo=()=>Ue.fold(()=>M()?Math.max(me.y-Zs(Lt.element)+Ge,0):me.bottom,xr=>{const ra=xs(xr),pi=xr.dom.scrollTop??0,Vf=ln(xr,ni())?Math.max(me.y-Zs(Lt.element)+Ge,0):me.y-ra.y+pi-Zs(Lt.element)+Ge;return M()?Vf:me.bottom}),Ea=jo(),Pn=yi(ue,Math.ceil(f.outerContainer.element.dom.getBoundingClientRect().width)).filter(xr=>xr>I).map(xr=>{const ra=_t.getOr(rs()),pi=window.innerWidth-(Ea-ra.left),cl=Math.max(Math.min(xr,pi),I);return pi<xr&&Be(f.outerContainer.element,"width",cl+"px"),{width:cl+"px"}}).getOr({width:"max-content"}),fi={position:"absolute",left:Math.round(Ea)+"px",top:Eo()+"px"};qn(f.outerContainer.element,{...fi,...Pn})})},kt=(ue,_t)=>Of(ue)?vd(_t):k.none(),Ot=()=>{It(p,ue=>{ue.broadcastOn([Cs()],{})})},Tt=()=>!C&&(Ma(f.outerContainer.element).left+xu(f.outerContainer.element)>=window.innerWidth-WI||Hn(f.outerContainer.element,"width").isSome())?(Be(f.outerContainer.element,"position","absolute"),Be(f.outerContainer.element,"left","0px"),uo(f.outerContainer.element,"width"),!0):!1,xe=ue=>{if(!V())return;C||dt();const _t=rs(),Lt=C?!1:Tt();if(W&&an.refreshToolbar(f.outerContainer),!C){const Ae=rs(),Ge=yi(_t.left!==Ae.left,_t);Wt(Lt,Ge),Ge.each(me=>{gd(me.left,Ae.top)})}_&&d.on(ue),Ot()},le=()=>C||!_||!V()?!1:d.get().exists(ue=>{const _t=O.getDockingMode(),Lt=tt(ue);return Lt!==_t?(ct(Lt),!0):!1});return{isVisible:V,isPositionedAtTop:M,show:()=>{j.set(!0),Be(f.outerContainer.element,"display","flex"),y.addClass(o.getBody(),"mce-edit-focus"),It(p,ue=>{uo(ue.element,"display")}),le(),Of(o)?xe(ue=>Nn.isDocked(ue)?Nn.reset(ue):Nn.refresh(ue)):xe(Nn.refresh)},hide:()=>{j.set(!1),Be(f.outerContainer.element,"display","none"),y.removeClass(o.getBody(),"mce-edit-focus"),It(p,ue=>{Be(ue.element,"display","none")})},update:xe,updateMode:()=>{le()&&xe(Nn.reset)},repositionPopups:Ot}},ZI=(o,s)=>{const a=xs(o);return{pos:s?a.y:a.bottom,bounds:a}},nK=(o,s,a,c)=>{const d=fe(ZI(s,a.isPositionedAtTop())),f=_=>{const{pos:A,bounds:O}=ZI(s,a.isPositionedAtTop()),{pos:M,bounds:I}=d.get(),L=O.height!==I.height||O.width!==I.width;d.set({pos:A,bounds:O}),L&&V6(o,_),a.isVisible()&&(M!==A?a.update(Nn.reset):L&&(a.updateMode(),a.repositionPopups()))};c||(o.on("activate",a.show),o.on("deactivate",a.hide)),o.on("SkinLoaded ResizeWindow",()=>a.update(Nn.reset)),o.on("NodeChange keydown",_=>{requestAnimationFrame(()=>f(_))});let p=0;const y=mu(()=>a.update(Nn.refresh),33);o.on("ScrollWindow",()=>{const _=rs().left;_!==p&&(p=_,y.throttle()),a.updateMode()}),Of(o)&&o.on("ElementScroll",_=>{a.update(Nn.refresh)});const C=Rs();C.set(ki(Zt.fromDom(o.getBody()),"load",_=>f(_.raw))),o.on("remove",()=>{C.clear()})};var sK=Object.freeze({__proto__:null,render:(o,s,a,c,d)=>{const{mainUi:f}=s,p=Ze(),y=Zt.fromDom(d.targetNode),C=oK(o,y,s,c,p),_=HB(o);iq(o);const A=()=>{if(p.isSet()){C.show();return}p.set(an.getHeader(f.outerContainer).getOrDie());const M=b5(o);Of(o)?(fc(y,f.mothership),fc(y,s.popupUi.mothership)):eh(M,f.mothership),eh(M,s.dialogUi.mothership);const I=()=>{dO(o,s,a,c),an.setMenubar(f.outerContainer,uI(o,a)),C.show(),nK(o,y,C,_),o.nodeChanged()};_?o.once("SkinLoaded",I):I()};o.on("show",A),o.on("hide",C.hide),_||(o.on("focus",A),o.on("blur",C.hide)),o.on("init",()=>{(o.hasFocus()||_)&&A()}),xM(o,s);const O={show:A,hide:C.hide,setEnabled:M=>{My(s,M?"setEnabled":"setDisabled")},isEnabled:()=>!ce.isDisabled(f.outerContainer)};return{editorContainer:f.outerContainer.element.dom,api:O}}});const w4=()=>{const o=Ze(),s=Ze(),a=Ze();return{dialogUi:o,popupUi:s,mainUi:a,getUiMotherships:()=>{const f=o.get().map(y=>y.mothership),p=s.get().map(y=>y.mothership);return f.fold(()=>p.toArray(),y=>p.fold(()=>[y],C=>ln(y.element,C.element)?[y]:[y,C]))},lazyGetInOuterOrDie:(f,p)=>()=>a.get().bind(y=>p(y.outerContainer)).getOrDie(`Could not find ${f} element in OuterContainer`)}}
vendor: 6,653 bytes, line 81
81,jI="contexttoolbar-show",fO="contexttoolbar-hide",_4=(o,s,a)=>({setInputEnabled:c=>{!c&&a&&Js(a),ce.set(o,!c)},isInputEnabled:()=>!ce.isDisabled(o),hide:()=>{no(o,I1())},back:()=>{no(o,p4)},getValue:()=>s.get().getOrThunk(()=>ne.getValue(o)),setValue:c=>{o.getSystem().isConnected()?ne.setValue(o,c):s.set(c)}}),aC=(o,s,a)=>{const d=ga(o.element).bind(f=>o.getSystem().getByDom(f).toOptional());return _4(d.getOr(o),s,a)},GI=(o,s,a)=>vt(xD,(c,d)=>{const f=o.get(c),p=_4(f,a,c.element);s.onAction(p,d.event.buttonApi)}),qI=(o,s,a,c)=>{const{primary:d,...f}=s.original,p=Fi(Yd({...f,type:"button",onAction:q}));return eC(p,a,[GI(o,s,c)])},rK=(o,s,a,c)=>{const{primary:d,...f}=s.original,p=Fi(g6({...f,type:"togglebutton",onAction:q}));return xI(p,a,[GI(o,s,c)])},aK=o=>o.type==="contextformtogglebutton",iK=(o,s,a,c)=>aK(s)?rK(o,s,a,c):qI(o,s,a,c),KI=(o,s,a,c)=>{const d=pt(s,y=>Mo(iK(o,y,a,c)));return{asSpecs:()=>pt(d,y=>y.asSpec()),findPrimary:y=>bi(s,(C,_)=>C.primary?k.from(d[_]).bind(A=>A.getOpt(y)).filter(mt(ce.isDisabled)):k.none())}},cK=(o,s,a,c)=>{const{width:d,height:f}=o.initValue();let p=Mb;const y=ee("ratio-event"),C=kt=>_4(kt,c),_=kt=>yc(kt,{tag:"span",classes:["tox-icon","tox-lock-icon__"+kt]},s.icons),A=()=>!1,O=o.label.getOr("Constrain proportions"),M=s.translate(O),I=ds.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-lock-context-form-size-input","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":M,"data-mce-name":O}},components:[_("lock"),_("unlock")],buttonBehaviours:Pt([ce.config({disabled:A}),gn.config({}),yn.config(s.tooltips.getConfig({tooltipText:M}))])}),L=kt=>({dom:{tag:"div",classes:["tox-context-form__group"]},components:kt}),W=kt=>ec(kt.element,"div.tox-focusable-wrapper").fold(k.none,Tt=>(Js(Tt),k.some(!0))),j=kt=>ro.parts.field({factory:qd,inputClasses:["tox-textfield","tox-toolbar-textfield","tox-textfield-size"],data:kt?d:f,inputBehaviours:Pt([ce.config({disabled:A}),gn.config({}),Me("size-input-toolbar-events",[vt(ac(),(Ot,Tt)=>{be(Ot,y,{isField1:kt})})]),pe.config({mode:"special",onEnter:a,onEscape:W})]),selectOnFocus:!1}),V=kt=>({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(kt))]}),K=kt=>({dom:{tag:"div",classes:["tox-focusable-wrapper","tox-toolbar-nav-item"]},components:[kt],behaviours:Pt([gn.config({}),Ie.config({}),pe.config({mode:"special",onEnter:Ot=>Ko(Ot.element,"input").fold(k.none,xe=>(Js(xe),k.some(!0)))})])}),tt=K(ds.parts.field1(L([ro.parts.label(V("Width:")),j(!0)]))),ct=K(ds.parts.field2(L([ro.parts.label(V("Height:")),j(!1)]))),dt=fe(q),Wt=[ed({onBeforeSetup:kt=>Ko(kt.element,"input").each(Js),onSetup:o.onSetup,getApi:C},dt),w3({getApi:C},dt,c)];return ds.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[tt,L([I]),ct],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(kt,Ot,Tt)=>{J3(ne.getValue(kt)).each(xe=>{p(xe).each(le=>{ne.setValue(Ot,KN(le))})})},onInput:kt=>no(kt,fN),coupledFieldBehaviours:Pt([Ie.config({}),pe.config({mode:"flow",focusInside:Om.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-focusable-wrapper"}),ce.config({disabled:A,onDisabled:kt=>{ds.getField1(kt).bind(ro.getField).each(ce.disable),ds.getField2(kt).bind(ro.getField).each(ce.disable),ds.getLock(kt).each(ce.disable)},onEnabled:kt=>{ds.getField1(kt).bind(ro.getField).each(ce.enable),ds.getField2(kt).bind(ro.getField).each(ce.enable),ds.getLock(kt).each(ce.enable)}}),ms(()=>s.checkUiComponentContext("mode:design")),Me("size-input-toolbar-events2",[vt(y,(kt,Ot)=>{const Tt=Ot.event.isField1,xe=Tt?ds.getField1(kt):ds.getField2(kt),le=Tt?ds.getField2(kt):ds.getField1(kt),Qe=xe.map(ne.getValue).getOr(""),ye=le.map(ne.getValue).getOr("");p=XN(Qe,ye)}),vt(fN,kt=>o.onInput(C(kt))),...Wt])])})},Zb=(o,s,a)=>ro.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[...o.toArray(),s],fieldBehaviours:Pt([ce.config({disabled:()=>a.checkUiComponentContext("mode:design").shouldDisable,onDisabled:c=>{bq(c),ro.getField(c).each(ce.disable)},onEnabled:c=>{ro.getField(c).each(ce.enable)}})])}),lK=(o,s,a,c)=>{const d=fe(q),f=C=>aC(C,c),p=o.label.map(C=>ro.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(C))]})),y=ro.parts.field({factory:qd,type:"range",inputClasses:["tox-toolbar-slider__input","tox-toolbar-nav-item"],inputAttributes:{min:String(o.min()),max:String(o.max())},data:o.initValue().toString(),fromInputValue:C=>Kf(C).getOr(o.min()),toInputValue:C=>String(C),inputBehaviours:Pt([ce.config({disabled:()=>s.checkUiComponentContext("mode:design").shouldDisable}),ms(()=>s.checkUiComponentContext("mode:design")),pe.config({mode:"special",onEnter:a,onLeft:(C,_)=>(_.cut(),k.none()),onRight:(C,_)=>(_.cut(),k.none())}),Me("slider-events",[ed({onSetup:o.onSetup,getApi:f,onBeforeSetup:pe.focusIn},d),w3({getApi:f},d,c),vt(Lc(),C=>{o.onInput(f(C))})])])});return Zb(p,y,s)},uK=(o,s,a,c)=>{const d=fe(q),f=A=>aC(A,c),p=o.label.map(A=>ro.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[En(s.translate(A))]})),C={...o.placeholder.map(A=>({placeholder:s.translate(A)})).getOr({})},_=ro.parts.field({factory:qd,inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-item"],inputAttributes:C,data:o.initValue(),selectOnFocus:!0,inputBehaviours:Pt([ce.config({disabled:()=>s.checkUiComponentContext("mode:design").shouldDisable}),ms(()=>s.checkUiComponentContext("mode:design")),pe.config({mode:"special",onEnter:a,onLeft:(A,O)=>(O.cut(),k.none()),onRight:(A,O)=>(O.cut(),k.none())}),Me("input-events",[ed({onSetup:o.onSetup,getApi:A=>ec(A.element,".tox-toolbar").bind(M=>Ko(M,"button:enabled")).fold(()=>aC(A,c),M=>aC(A,c,M)),onBeforeSetup:pe.focusIn},d),w3({getApi:f},d,c),vt(Lc(),A=>{o.onInput(f(A))})])])});return Zb(p,_,s)},pO=(o,s,a)=>{const c=Ze(),f=Mo(o(a,_=>y.findPrimary(_).orThunk(()=>C.findPrimary(_)).map(A=>(nf(A),!0)),c)),p=Vr(s.commands,_=>_.align==="start"),y=KI(f,p.pass,a,c),C=KI(f,p.fail,a,c);return Io([{title:k.none(),label:k.none(),items:y.asSpecs()},{title:k.none(),label:k.none(),items:[f.asSpec()]},{title:k.none(),label:k.none(),items:C.asSpecs()}],_=>_.items.length>0)},hO=(o,s)=>{switch(o.type){case"contextform":return pO(so(uK,o),o,s);case"contextsliderform":return pO(so(lK,o),o,s);case"contextsizeinputform":return pO(so(cK,o),o,s)}},YI={renderContextForm:(o,s,a)=>u4({type:o,uid:ee("context-toolbar"),initGroups:hO(s,a),onEscape:k.none,cyclicKeying:!0,providers:a}),buildInitGroups:hO},XI=(o,s,a)=>s.bottom-o.y>=a&&o.bottom-s.y>=a,dK=o=>{const s=o.getBoundingClientRect();if(s.height<=0&&s.width<=0){const a=u1(Zt.fromDom(o.startContainer),o.startOffset).element;
81return(dd(a)?ga(a):k.some(a)).filter(Ba).map(d=>d.dom.getBoundingClientRect()).getOr(s)}else return s},bO=o=>{const s=o.selection.getRng(),a=dK(s);if(o.inline){const c=rs();return Ts(c.left+a.left,c.top+a.top,a.width,a.height)}else{const c=xd(Zt.fromDom(o.getBody()));return Ts(c.x+a.left,c.y+a.top,a.width,a.height)}},mK=(o,s)=>s.filter(a=>Ro(a)&&Z(a)).map(xd).getOrThunk(()=>bO(o)),gK=(o,s,a)=>{const c=Math.max(o.x+a,s.x),d=Math.min(o.right-a,s.right);return{x:c,width:d-c}},iC=(o,s,a,c,d,f)=>{const p=Zt.fromDom(o.getContainer()),y=Ko(p,".tox-editor-header").getOr(p),C=xs(y),_=C.y>=s.bottom,A=c&&!_;if(o.inline&&A)return{y:Math.max(C.bottom+f,a.y),bottom:a.bottom};if(o.inline&&!A)return{y:a.y,bottom:Math.min(C.y-f,a.bottom)};const O=d==="line"?xs(p):s;return A?{y:Math.max(C.bottom+f,a.y),bottom:Math.min(O.bottom-f,a.bottom)}:{y:Math.max(O.y+f,a.y),bottom:Math.min(C.y-f,a.bottom)}},xO=(o,s,a,c=0)=>{const d=S1(window),f=xs(Zt.fromDom(o.getContentAreaContainer())),p=fb(o)||pb(o)||Df(o),{x:y,width:C}=gK(f,d,c);if(o.inline&&!p)return Ts(y,d.y,C,d.height);{const _=s.header.isPositionedAtTop(),{y:A,bottom:O}=iC(o,f,d,_,a,c);return Ts(y,A,C,O-A)}},S4=12,JI={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},vO={maxHeightFunction:Im(),maxWidthFunction:$p()},yO=(o,s)=>{const a=o.selection.getRng(),c=u1(Zt.fromDom(a.startContainer),a.startOffset);return a.startContainer===a.endContainer&&a.startOffset===a.endOffset-1&&ln(c.element,s)},QI=(o,s,a)=>{const c=Hn(o,"position");Be(o,"position",s);const d=a(o);return c.each(f=>Be(o,"position",f)),d},CO=o=>o==="node",fK=(o,s,a,c,d)=>{const f=bO(o),p=c.lastElement().exists(y=>ln(a,y));if(yO(o,a))return p?Qr:Er;if(p)return QI(s,c.getMode(),()=>XI(f,xs(s),-20)&&!c.isReposition()?Zc:Qr);{const y=c.getMode()==="fixed"?d.y+rs().top:d.y,C=Zs(s)+S4;return y+C<=f.y?Er:tf}},jb=(o,s,a,c)=>{const d=C=>(_,A,O,M,I)=>{const L=fK(o,M,C,a,I),W={..._,y:I.y,height:I.height};return{...L(W,A,O,M,I),alwaysFit:!0}},f=C=>CO(c)?[d(C)]:[];return s?{onLtr:C=>[ys,Os,vs,fr,Qs,Mn].concat(f(C)),onRtl:C=>[ys,vs,Os,Qs,fr,Mn].concat(f(C))}:{onLtr:C=>[Mn,ys,fr,Os,Qs,vs].concat(f(C)),onRtl:C=>[Mn,ys,Qs,vs,fr,Os].concat(f(C))}},k4=(o,s,a,c)=>s==="line"?{bubble:Va(S4,0,JI),layouts:{onLtr:()=>[Xg],onRtl:()=>[k2]},overrides:vO}:{bubble:Va(0,S4,JI,1/S4),layouts:jb(o,a,c,s),overrides:vO},Gb=(o,s)=>{const a=Io(s,f=>f.predicate(o.dom)),{pass:c,fail:d}=Vr(a,f=>f.type==="contexttoolbar");return{contextToolbars:c,contextForms:d}},wO=o=>{if(o.length<=1)return o;{const s=f=>ps(o,p=>p.position===f),a=f=>Io(o,p=>p.position===f),c=s("selection"),d=s("node");if(c||d)if(d&&c){const f=a("node"),p=pt(a("selection"),y=>({...y,position:"node"}));return f.concat(p)}else return a(c?"selection":"node");else return a("line")}},_O=o=>{if(o.length<=1)return o;{const s=c=>xt(o,d=>d.position===c);return s("selection").orThunk(()=>s("node")).orThunk(()=>s("line")).map(c=>c.position).fold(()=>[],c=>Io(o,d=>d.position===c))}},t$=(o,s,a)=>{const c=Gb(o,s);if(c.contextForms.length>0)return k.some({elem:o,toolbars:[c.contextForms[0]]});{const d=Gb(o,a);if(d.contextForms.length>0)return k.some({elem:o,toolbars:[d.contextForms[0]]});if(c.contextToolbars.length>0||d.contextToolbars.length>0){const f=wO(c.contextToolbars.concat(d.contextToolbars));return k.some({elem:o,toolbars:f})}else return k.none()}},E4=(o,s,a)=>o(s)?k.none():XC(s,c=>{if(Ba(c)){const{contextToolbars:d,contextForms:f}=Gb(c,a.inNodeScope),p=f.length>0?f:_O(d);return p.length>0?k.some({elem:c,toolbars:p}):k.none()}else return k.none()},o),e$=(o,s)=>{const a=Zt.fromDom(s.getBody()),c=p=>ln(p,a),d=p=>!c(p)&&!a1(a,p),f=Zt.fromDom(s.selection.getNode());return d(f)?k.none():t$(f,o.inNodeScope,o.inEditorScope).orThunk(()=>E4(c,f,o))},o$=(o,s)=>{const a={},c=[],d=[],f={},p={},y=(A,O)=>{const M=Fi(CW(O));a[A]=M,M.launch.map(I=>{f["form:"+A]={...O.launch,type:I.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{s(M)}}}),M.scope==="editor"?d.push(M):c.push(M),p[A]=M},C=(A,O)=>{_W(O).each(M=>{M.launch.isSome()&&(f["toolbar:"+A]={...O.launch,type:"button",onAction:()=>{s(M)}}),O.scope==="editor"?d.push(M):c.push(M),p[A]=M})},_=qo(o);return It(_,A=>{const O=o[A];O.type==="contextform"||O.type==="contextsliderform"||O.type==="contextsizeinputform"?y(A,O):O.type==="contexttoolbar"&&C(A,O)}),{forms:a,inNodeScope:c,inEditorScope:d,lookupTable:p,formNavigators:f}},cC="tox-pop--transition",pK=o=>o===x4.ENTER||o===x4.SPACEBAR,n$=(o,s,a,c)=>{const d=c.backstage,f=d.shared,p=Cr().deviceType.isTouch,y=Ze(),C=Ze(),_=Ze(),A=sO({sink:a,onEscape:()=>(o.focus(),U6(o),k.some(!0)),onHide:()=>{U6(o)},onBack:()=>{W6(o)},focusElement:ye=>{o.getBody().contains(ye.dom)?o.focus():Js(ye)}}),O=m(A.sketch),M=()=>{const ye=_.get().getOr("node"),je=CO(ye)?1:0;return xO(o,f,ye,je)},I=()=>!o.removed&&!(p()&&d.isContextMenuOpen()),L=ye=>ji(Ec(ye,y.get(),ln),!0),W=()=>{if(I()){const ye=M(),je=ji(_.get(),"node")?mK(o,y.get()):bO(o);return ye.height<=0||!XI(je,ye,.01)}else return!0},j=()=>
81{y.clear(),C.clear(),_.clear(),jn.hide(O)},V=()=>{if(jn.isOpen(O)){const ye=O.element;uo(ye,"display"),W()?Be(ye,"display","none"):(C.set(0),jn.reposition(O))}},K=ye=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[ye],behaviours:Pt([pe.config({mode:"acyclic"}),Me("pop-dialog-wrap-events",[vn(je=>{o.shortcuts.add("ctrl+F9","focus statusbar",()=>pe.focusIn(je))}),dc(je=>{o.shortcuts.remove("ctrl+F9")})])])}),tt=ye=>{const je=kt([ye]);be(O,yI,{forwardContents:K(je)})},ct=fl(()=>o$(s,tt)),dt=(ye,je)=>v4(o,{buttons:ye,toolbar:je.items,allowToolbarGroups:!1},c.backstage,k.some(["form:","toolbar:"])),Wt=(ye,je)=>YI.buildInitGroups(ye,je),kt=ye=>{const{buttons:je}=o.ui.registry.getAll(),ue=ct(),_t={...je,...ue.formNavigators},Lt=vh(o)===vc.scrolling?vc.scrolling:vc.default,Ae=wt(pt(ye,Ge=>Ge.type==="contexttoolbar"?dt(_t,p6(Ge)):Wt(Ge,f.providers)));return u4({type:Lt,uid:ee("context-toolbar"),initGroups:Ae,onEscape:k.none,cyclicKeying:!0,providers:f.providers})},Ot=(ye,je)=>{const ue=ye==="node"?f.anchors.node(je):f.anchors.cursor(),_t=k4(o,ye,p(),{lastElement:y.get,isReposition:()=>ji(C.get(),0),getMode:()=>oa.getMode(a)});return kn(ue,_t)},Tt=(ye,je)=>{if(Qe.cancel(),!I())return;const ue=kt(ye),_t=ye[0].position,Lt=Ot(_t,je);_.set(_t),C.set(1);const Ae=O.element;uo(Ae,"display"),L(je)||(Un(Ae,cC),oa.reset(a,O)),jn.showWithinBounds(O,K(ue),{anchor:Lt,transition:{classes:[cC],mode:"placement"}},()=>k.some(M())),je.fold(y.clear,y.set),W()&&Be(Ae,"display","none")},xe=()=>{Be(O.element,"transition","none"),V(),uo(O.element,"transition")};let le=!1;const Qe=mu(()=>{if(!(!o.hasFocus()||o.removed||le))if(bs(O.element,cC))Qe.throttle();else{const ye=ct();e$(ye,o).fold(j,je=>{Tt(je.toolbars,k.some(je.elem))})}},17);o.on("init",()=>{o.on("remove",j),o.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",V),o.on("click focus SetContent",Qe.throttle),o.on("keyup",ye=>{(!pK(ye.keyCode)||!A.inSubtoolbar())&&Qe.throttle()}),o.on(fO,j),o.on(jI,ye=>{const je=ct();he(je.lookupTable,ye.toolbarKey).each(ue=>{Tt([ue],yi(ye.target!==o,ye.target)),vI(O)})}),o.on("focusout",ye=>{YS.setEditorTimeout(o,()=>{Es(a.element).isNone()&&Es(O.element).isNone()&&!o.hasFocus()&&j()},0)}),o.on("SwitchMode",()=>{o.mode.isReadOnly()&&j()}),o.on("DisabledStateChange",ye=>{ye.state&&j()}),o.on("ExecCommand",({command:ye})=>{ye.toLowerCase()==="toggleview"&&j()}),o.on("AfterProgressState",ye=>{ye.state?j():o.hasFocus()&&Qe.throttle()}),o.on("dragstart",()=>{le=!0}),o.on("dragend drop",()=>{le=!1}),o.on("NodeChange",ye=>{A.inSubtoolbar()?xe():Es(O.element).fold(Qe.throttle,q)})})},hK=o=>{It([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],a=>{o.ui.registry.addToggleButton(a.name,{tooltip:a.text,icon:a.icon,onAction:Za(o,a.cmd),onSetup:Ly(o,a.name)})}),o.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:br(o),onAction:Za(o,"JustifyNone")})},s$=(o,s)=>{const a=()=>{const c=s.getOptions(o),d=s.getCurrent(o).map(s.hash),f=Ze();return pt(c,p=>({type:"togglemenuitem",text:s.display(p),onSetup:y=>{const C=A=>{A&&(f.on(O=>O.setActive(!1)),f.set(y)),y.setActive(A)};C(ji(d,s.hash(p)));const _=s.watcher(o,p,C);return()=>{f.clear(),_()}},onAction:()=>s.setCurrent(o,p)}))};o.ui.registry.addMenuButton(s.name,{tooltip:s.text,icon:s.icon,fetch:c=>c(a()),onSetup:s.onToolbarSetup}),o.ui.registry.addNestedMenuItem(s.name,{type:"nestedmenuitem",text:s.text,getSubmenuItems:a,onSetup:s.onMenuSetup})},A4=o=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:eF,hash:s=>Nk(s,["fixed","relative","empty"]).getOr(s),display:eo,watcher:(s,a,c)=>s.formatter.formatChanged("lineheight",c,!1,{value:a}).unbind,getCurrent:s=>k.from(s.queryCommandValue("LineHeight")),setCurrent:(s,a)=>s.execCommand("LineHeight",!1,a),onToolbarSetup:br(o),onMenuSetup:br(o)}),r$=o=>k.from(PB(o)).map(a=>({name:"language",text:"Language",icon:"language",getOptions:nt(a),hash:c=>zs(c.customCode)?c.code:`${c.code}/${c.customCode}`,display:c=>c.title,watcher:(c,d,f)=>c.formatter.formatChanged("lang",f,!1,{value:d.code,customValue:d.customCode??null}).unbind,getCurrent:c=>{const d=Zt.fromDom(c.selection.getNode());return oc(d,f=>
81k.some(f).filter(Ba).bind(p=>ir(p,"lang").map(C=>{const _=ir(p,"data-mce-lang").getOrUndefined();return{code:C,customCode:_,title:""}})))},setCurrent:(c,d)=>c.execCommand("Lang",!1,d),onToolbarSetup:c=>{const d=Rs();return c.setActive(o.formatter.match("lang",{},void 0,!0)),d.set(o.formatter.formatChanged("lang",c.setActive,!0)),Nh(d.clear,br(o)(c))},onMenuSetup:br(o)})),bK=o=>{s$(o,A4(o)),r$(o).each(s=>s$(o,s))},xK=(o,s)=>{wq(o,s),Aq(o,s),Ub(o,s),Sq(o,s),LI(o,s)},vK=o=>{o.ui.registry.addContext("editable",()=>o.selection.isEditable()),o.ui.registry.addContext("mode",s=>o.mode.get()===s),o.ui.registry.addContext("any",_e),o.ui.registry.addContext("formatting",s=>o.formatter.canApply(s)),o.ui.registry.addContext("insert",s=>o.schema.isValidChild(o.selection.getNode().tagName,s))},yK=o=>If(o,"NodeChange",s=>{s.setEnabled(o.queryCommandState("outdent")&&o.selection.isEditable())}),CK=o=>{o.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:yK(o),onAction:Za(o,"outdent")}),o.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:br(o,()=>o.queryCommandState("indent")),onAction:Za(o,"indent")})},a$=o=>{CK(o)},SO=(o,s)=>a=>{a.setActive(s.get());const c=d=>{s.set(d.state),a.setActive(d.state)};return o.on("PastePlainTextToggle",c),Nh(()=>o.off("PastePlainTextToggle",c),br(o)(a))},i$=o=>{const s=fe(YB(o)),a=()=>o.execCommand("mceTogglePlainTextPaste");o.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:a,onSetup:SO(o,s)}),o.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:a,onSetup:SO(o,s)})},T4=(o,s)=>()=>{o.execCommand("mceToggleFormat",!1,s)},wK=o=>{tm.each([{name:"bold",text:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(s,a)=>{o.ui.registry.addToggleButton(s.name,{tooltip:s.text,icon:s.icon,onSetup:Ly(o,s.name),onAction:T4(o,s.name),shortcut:s.shortcut})});for(let s=1;s<=6;s++){const a="h"+s,c=`Access+${s}`;o.ui.registry.addToggleButton(a,{text:a.toUpperCase(),tooltip:"Heading "+s,onSetup:Ly(o,a),onAction:T4(o,a),shortcut:c})}},c$=o=>{tm.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy",context:"any"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],s=>{o.ui.registry.addButton(s.name,{tooltip:s.text,icon:s.icon,onAction:Za(o,s.action),shortcut:s.shortcut,context:s.context})}),tm.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],s=>{o.ui.registry.addButton(s.name,{tooltip:s.text,icon:s.icon,onSetup:br(o),onAction:Za(o,s.action)})})},l$=o=>{tm.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],s=>{o.ui.registry.addToggleButton(s.name,{tooltip:s.text,icon:s.icon,onAction:Za(o,s.action),onSetup:Ly(o,s.name)})})},_K=o=>{wK(o),c$(o),l$(o)},BX=o=>{tm.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],s=>{o.ui.registry.addMenuItem(s.name,{text:s.text,icon:s.icon,shortcut:s.shortcut,onAction:Za(o,s.action),context:s.context})}),tm.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"}
81,{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],s=>{o.ui.registry.addMenuItem(s.name,{text:s.text,icon:s.icon,shortcut:s.shortcut,onSetup:br(o),onAction:Za(o,s.action)})}),o.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:br(o),onAction:T4(o,"code")})},SK=o=>{_K(o),BX(o)},D4=(o,s)=>If(o,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",a=>{a.setEnabled(!o.mode.isReadOnly()&&o.undoManager[s]())}),kK=o=>{o.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:D4(o,"hasUndo"),onAction:Za(o,"undo")}),o.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:D4(o,"hasRedo"),onAction:Za(o,"redo")})},EK=o=>{o.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:D4(o,"hasUndo"),onAction:Za(o,"undo"),shortcut:"Meta+Z"}),o.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:D4(o,"hasRedo"),onAction:Za(o,"redo"),shortcut:"Meta+Y"})},AK=o=>{kK(o),EK(o)},TK=o=>If(o,"VisualAid",s=>{s.setActive(o.hasVisual)}),DK=o=>{o.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:TK(o),onAction:Za(o,"mceToggleVisualAid"),context:"any"})},OK=o=>{o.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:Za(o,"mceToggleVisualAid"),context:"any"})},RK=o=>{OK(o),DK(o)},BK=(o,s)=>{hK(o),SK(o),xK(o,s),AK(o),QM(o),RK(o),a$(o),bK(o),i$(o),vK(o)},FK=o=>$e(o)?o.split(/[ ,]/):o,u$=o=>s=>s.options.get(o),MK=o=>{const s=o.options.register;s("contextmenu_avoid_overlap",{processor:"string",default:""}),s("contextmenu_never_use_native",{processor:"boolean",default:!1}),s("contextmenu",{processor:a=>a===!1?{value:[],valid:!0}:$e(a)||Oa(a,$e)?{value:FK(a),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})},kO=u$("contextmenu_never_use_native"),NK=u$("contextmenu_avoid_overlap"),PK=o=>d$(o).length===0,d$=o=>{const s=o.ui.registry.getAll().contextMenus,a=o.options.get("contextmenu");return o.options.isSet("contextmenu")?a:Io(a,c=>nn(s,c))},lC=(o,s)=>({type:"makeshift",x:o,y:s}),IK=(o,s,a)=>lC(o.x+s,o.y+a),EO=o=>o.type==="longpress"||o.type.indexOf("touch")===0,AO=o=>{if(EO(o)){const s=o.touches[0];return lC(s.pageX,s.pageY)}else return lC(o.pageX,o.pageY)},$K=o=>{if(EO(o)){const s=o.touches[0];return lC(s.clientX,s.clientY)}else return lC(o.clientX,o.clientY)},m$=(o,s)=>{const a=ub.DOM.getPos(o);return IK(s,a.x,a.y)},LK=(o,s)=>s.type==="contextmenu"||s.type==="longpress"?o.inline?AO(s):m$(o.getContentAreaContainer(),$K(s)):g$(o),g$=o=>({type:"selection",root:Zt.fromDom(o.selection.getNode())}),HK=o=>({type:"node",node:k.some(Zt.fromDom(o.selection.getNode())),root:Zt.fromDom(o.getBody())}),f$=(o,s,a)=>{switch(a){case"node":return HK(o);case"point":return LK(o,s);case"selection":return g$(o)}},zK=(o,s,a,c,d,f)=>{const p=a(),y=f$(o,s,f);mg(p,Xl.CLOSE_ON_EXECUTE,c,{isHorizontalMenu:!1,search:k.none()}).map(C=>{s.preventDefault(),jn.showMenuAt(d,{anchor:y},{menu:{markers:Kd("normal")},data:C})})},TO={onLtr:()=>[ys,Os,vs,fr,Qs,Mn,Er,tf,Jr,c0,Pm,Pp],onRtl:()=>[ys,vs,Os,Qs,fr,Mn,Er,tf,Pm,Pp,Jr,c0]},VK=12,UK={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},DO=(o,s)=>{const a=o.selection;if(a.isCollapsed()||s.touches.length<1)return!1;{const c=s.touches[0],d=a.getRng();return Vx(o.getWin(),Og.domRange(d)).exists(p=>p.left<=c.clientX&&p.right>=c.clientX&&p.top<=c.clientY&&p.bottom>=c.clientY)}},p$=o=>{const s=o.selection.getRng(),a=()=>{YS.setEditorTimeout(o,()=>{o.selection.setRng(s)},10),f()};o.once("touchend",a);const c=p=>{p.preventDefault(),p.stopImmediatePropagation()};o.on("mousedown",c,!0);const d=()=>f();o.once("longpresscancel",d);const f=()=>{o.off("touchend",a),o.off("longpresscancel",d),o.off("mousedown",c)}},h$=(o,s,a)=>{const c=f$(o,s,a);return{bubble:Va(0,a==="point"?VK:0,UK),layouts:TO,overrides:{maxWidthFunction:$p(),maxHeightFunction:Im()},...c}},WK=(o,s,a,c,d,f,p)=>{const y=h$(o,s,f);mg(a,Xl.CLOSE_ON_EXECUTE,c,{isHorizontalMenu:!0,search:k.none()}).map(C=>{s.preventDefault();const _=p?Ar.HighlightMenuAndItem:Ar.HighlightNone;jn.showMenuWithinBounds(d,{anchor:y},{menu:{markers:Kd("normal"),highlightOnOpen:_},data:C,type:"horizontal"},()=>k.some(xO(o,c.shared,f==="node"?"node":"selection"))),o.dispatch(fO)})},ZK=(o,s,a,c,d,f)=>{const p=Cr(),y=p.os.isiOS(),C=p.os.isMacOS(),_=p.os.isAndroid(),A=p.deviceType.isTouch(),O=()=>!(_||y||C&&A),M=()=>{const I=a();WK(o,s,I,c,d,f,O())};if((C||y)&&f!=="node"){const I=()=>{p$(o),M()};DO(o,s)?I():(o.once("selectionchange",I),o.once("touchend",()=>o.off("selectionchange",I)))}else M()},b$=o=>$e(o)?o==="|":o.type==="separator",OO={type:"separator"},x$=o=>{const s=a=>({text:a.text,icon:a.icon,enabled:a.enabled,shortcut:a.shortcut});if($e(o))return o;switch(o.type){case"separator":return OO;case"submenu":return{type:"nestedmenuitem",...s(o),getSubmenuItems:()=>{const c=o.getSubmenuItems();return $e(c)?c:pt(c,x$)}};default:const a=o;return{type:"menuitem",...s(a),onAction:mo(a.onAction)}}},O4=(o,s)=>{if(s.length===0)return o;const c=gl(o).filter(d=>!b$(d)).fold(()=>[],d=>[OO]);return o.concat(c).concat(s).concat([OO])},jK=(o,s,a)=>{const c=Zo(s,(d,f)=>he(o,f.toLowerCase()).map(p=>{const y=p.update(a);if($e(y)&&Cg(oe(y)))return O4(d,y.split(" "));if(ca(y)&&y.length>0){const C=pt(y,x$);return O4(d,C)}else return d}).getOrThunk(()=>d.concat([f])),[]);return c.length>0&&b$(c[c.length-1])&&c.pop(),c},v$=(o,s)=>s.ctrlKey&&!kO(o),GK=o=>o.type==="longpress"||nn(o,"touches"),y$=(o,s)=>!GK(s)&&(s.button!==2||s.target===o.getBody()&&s.pointerType===""),R4=(o,s)=>y$(o,s)?o.selection.getStart(!0):s.target,qK=(o,s)=>{const a=NK(o),c=y$(o,s)?"selection":"point";if(Cg(a)){const d=R4(o,s);return cp(Zt.fromDom(d),a)?"node":c}else return c},C$=(o,s,a)=>{const d=Cr().deviceType.isTouch,f=m(jn.sketch({dom:{tag:"div"},lazySink:s,onEscape:()=>o.focus(),onShow:()=>a.setContextMenuState(!0),onHide:()=>a.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:Pt([Me("dismissContextMenu",[vt(Tu(),(C,_)=>{To.close(C),o.focus()})])])})),p=()=>jn.hide(f),y=C=>{if(kO(o)&&C.preventDefault(),v$(o,C)||PK(o))return;const _=qK(o,C),A=()=>{const M=R4(o,C),I=o.ui.registry.getAll(),L=d$(o);return jK(I.contextMenus,L,M)};(d()?ZK:zK)(o,C,A,a,f,_)};o.on("init",()=>{const C="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(d()?"":" ResizeWindow");o.on(C,p),o.on("longpress contextmenu",y)})},uC=40,B4=uC/2,w$=(o,s,a,c,d,f)=>o.fold(()=>Xm.snap({sensor:Hl(a-B4,c-B4),range:Jo(d,f),output:Hl(k.some(a),k.some(c)),extra:{td:s}}),p=>
81{const y=a-B4,C=c-B4,_=uC,A=uC,O=p.element.dom.getBoundingClientRect();return Xm.snap({sensor:Hl(y,C),range:Jo(_,A),output:Hl(k.some(a-O.width/2),k.some(c-O.height/2)),extra:{td:s}})}),_$=(o,s,a)=>{const c=(d,f)=>d.exists(p=>ln(p,f));return{getSnapPoints:o,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(d,f)=>{const p=f.td;c(s.get(),p)||(s.set(p),a(p))},mustSnap:!0}},S$=o=>Mo(Ks.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Pt([Xm.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:o}),Wu.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),KK=(o,s)=>{const a=fe([]),c=fe([]),d=fe(!1),f=Ze(),p=Ze(),y=kt=>{const Ot=xd(kt);return w$(I.getOpt(s),kt,Ot.x,Ot.y,Ot.width,Ot.height)},C=()=>pt(a.get(),kt=>y(kt)),_=kt=>{const Ot=xd(kt);return w$(L.getOpt(s),kt,Ot.right,Ot.bottom,Ot.width,Ot.height)},A=()=>pt(c.get(),kt=>_(kt)),O=_$(C,f,kt=>{p.get().each(Ot=>{o.dispatch("TableSelectorChange",{start:kt,finish:Ot})})}),M=_$(A,p,kt=>{f.get().each(Ot=>{o.dispatch("TableSelectorChange",{start:Ot,finish:kt})})}),I=S$(O),L=S$(M),W=m(I.asSpec()),j=m(L.asSpec()),V=(kt,Ot,Tt,xe)=>{const le=Ot.dom.getBoundingClientRect();uo(kt.element,"display");const Qe=tp(Zt.fromDom(o.getBody())).dom.innerHeight,ye=Tt(le),je=xe(le,Qe);(ye||je)&&Be(kt.element,"display","none")},K=(kt,Ot,Tt,xe)=>{const le=Tt(Ot);Xm.snapTo(kt,le),V(kt,Ot,je=>je[xe]<0,(je,ue)=>je[xe]>ue)},tt=kt=>K(W,kt,y,"top"),ct=()=>f.get().each(tt),dt=kt=>K(j,kt,_,"bottom"),Wt=()=>p.get().each(dt);if(Cr().deviceType.isTouch()){const kt=Ot=>pt(Ot,Zt.fromDom);o.on("TableSelectionChange",Ot=>{d.get()||(Pu(s,W),Pu(s,j),d.set(!0));const Tt=Zt.fromDom(Ot.start),xe=Zt.fromDom(Ot.finish);f.set(Tt),p.set(xe),k.from(Ot.otherCells).each(le=>{a.set(kt(le.upOrLeftCells)),c.set(kt(le.downOrRightCells)),tt(Tt),dt(xe)})}),o.on("ResizeEditor ResizeWindow ScrollContent",()=>{ct(),Wt()}),o.on("TableSelectionClear",()=>{d.get()&&($u(W),$u(j),d.set(!1)),f.clear(),p.clear()})}};var k$=`<svg height="16" viewBox="0 0 80 16" width="80" xmlns="http://www.w3.org/2000/svg"><g opacity=".8"><path d="m80 3.537v-2.202h-7.976v11.585h7.976v-2.25h-5.474v-2.621h4.812v-2.069h-4.812v-2.443zm-10.647 6.929c-.493.217-1.13.337-1.864.337s-1.276-.156-1.805-.47a3.732 3.732 0 0 1 -1.3-1.298c-.324-.554-.48-1.191-.48-1.877s.156-1.335.48-1.877a3.635 3.635 0 0 1 1.3-1.299 3.466 3.466 0 0 1 1.805-.481c.65 0 .914.06 1.263.18.36.12.698.277.986.47.289.192.578.384.842.6l.12.085v-2.586l-.023-.024c-.385-.35-.855-.614-1.384-.818-.53-.205-1.155-.313-1.877-.313-.721 0-1.6.144-2.333.445a5.773 5.773 0 0 0 -1.937 1.251 5.929 5.929 0 0 0 -1.324 1.9c-.324.735-.48 1.565-.48 2.455s.156 1.72.48 2.454c.325.734.758 1.383 1.324 1.913.553.53 1.215.938 1.937 1.25a6.286 6.286 0 0 0 2.333.434c.819 0 1.384-.108 1.961-.313.59-.216 1.083-.505 1.468-.866l.024-.024v-2.49l-.12.096c-.41.337-.878.626-1.396.866zm-14.869-4.15-4.8-5.04-.024-.025h-.902v11.67h2.502v-6.847l2.827 3.08.385.409.397-.41 2.791-3.067v6.845h2.502v-11.679h-.902l-4.788 5.052z"/><path clip-rule="evenodd" d="m15.543 5.137c0-3.032-2.466-5.113-4.957-5.137-.36 0-.745.024-1.094.096-.157.024-3.85.758-3.85.758-3.032.602-4.62 2.466-4.704 4.788-.024.89-.024 4.27-.024 4.27.036 3.165 2.406 5.138 5.017 5.126.337 0 1.119-.109 1.287-.145.144-.024.385-.084.746-.144.661-.12 1.684-.325 3.067-.602 2.37-.409 4.103-2.009 4.44-4.33.156-1.023.084-4.692.084-4.692zm-3.213 3.308-2.346.457v2.31l-5.859 1.143v-5.75l2.346-.458v3.441l3.513-.686v-3.44l-3.513.685v-2.297l5.859-1.143v5.75zm20.09-3.296-.083-1.023h-2.13v8.794h2.346v-4.884c0-1.107.95-1.985 2.057-1.997 1.095 0 1.901.89 1.901 1.997v4.884h2.346v-5.245c-.012-2.105-1.588-3.777-3.67-3.765a3.764 3.764 0 0 0 -2.778 1.25l.012-.011zm-6.014-4.102 2.346-.458v2.298l-2.346.457z" fill-rule="evenodd"/><path d="m28.752 4.126h-2.346v8.794h2.346z"/><path clip-rule="evenodd" d="m43.777 15.483 4.043-11.357h-2.418l-1.54 4.355-.445 1.324-.36-1.324-1.54-4.355h-2.418l3.151 8.794-1.083 3.08zm-21.028-5.51c0 .722.541 1.034.878 1.034s.638-.048.95-.144l.518 1.708c-.217.145-.879.518-2.13.518a2.565 2.565 0 0 1 -2.562-2.587c-.024-1.
81082-.024-2.49 0-4.21h-1.54v-2.142h1.54v-1.912l2.346-.458v2.37h2.201v2.142h-2.2v3.693-.012z" fill-rule="evenodd"/></g></svg> 82`;const YK=o=>o.nodeName==="BR"||!!o.getAttribute("data-mce-bogus")||o.getAttribute("data-mce-type")==="bookmark",XK=(o,s,a)=>{const c=s.delimiter??"âº",d=(C,_,A)=>Ks.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":A}},components:[En(C)],action:O=>{o.focus(),o.selection.select(_),o.nodeChanged()},buttonBehaviours:Pt([yn.config({...a.tooltips.getConfig({tooltipText:a.translate(["Select the {0} element",_.nodeName.toLowerCase()]),onShow:(O,M)=>{ri(O.element,M.element)},onHide:O=>{jx(O.element)}})}),td.button(a.isDisabled),ms(()=>a.checkUiComponentContext("any"))])}),f=()=>({dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[En(` ${c} `)]}),p=C=>Zo(C,(_,A,O)=>{const M=d(A.name,A.element,O);return O===0?_.concat([M]):_.concat([f(),M])},[]),y=C=>{const _=[];let A=C.length;for(;A-- >0;){const O=C[A];if(O.nodeType===1&&!YK(O)){const M=uZ(o,O);if(M.isDefaultPrevented()||_.push({name:M.name,element:O}),M.isPropagationStopped())break}}return _};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Pt([pe.config({mode:"flow",selector:"div[role=button]"}),ce.config({disabled:a.isDisabled}),ms(()=>a.checkUiComponentContext("any")),gn.config({}),ze.config({}),Me("elementPathEvents",[vn((C,_)=>{o.shortcuts.add("alt+F11","focus statusbar elementpath",()=>pe.focusIn(C)),o.on("NodeChange",A=>{const O=y(A.parents),M=O.length>0?p(O):[];ze.set(C,M)})})])]),components:[]}};var nm;(function(o){o[o.None=0]="None",o[o.Both=1]="Both",o[o.Vertical=2]="Vertical"})(nm||(nm={}));const E$=o=>{const s=Zt.fromDom(o.getContainer()),a=Zs(s),c=Ir(s);return{height:a,width:c}},JK=(o,s,a,c)=>{const d=C4(c.height+s.top,c5(o),l5(o));return a===nm.Both?{height:d,width:C4(c.width+s.left,i5(o),JS(o))}:{height:d}},A$=(o,s,a)=>{const c=Zt.fromDom(o.getContainer()),d=E$(o),f=JK(o,s,a,d);return is(f,(p,y)=>{la(p)&&Be(c,y,y4(p))}),z6(o),f},QK=o=>{const s=KB(o);return s===!1?nm.None:s==="both"?nm.Both:nm.Vertical},tY=(o,s)=>s===nm.Both?sa.translate(["Editor's height: {0} pixels, Editor's width: {1} pixels",o.height,o.width]):sa.translate(["Editor's height: {0} pixels",o.height]),RO=(o,s,a)=>{Ee(o.element,"aria-valuetext",tY(s,a))},F4=(o,s,a,c,d)=>{const p=Jo(c*20,d*20),y=A$(o,p,a);return RO(s,y,a),k.some(!0)},T$=(o,s)=>{const a=QK(o);if(a===nm.None)return k.none();const c=a===nm.Both?sa.translate("Press the arrow keys to resize the editor."):sa.translate("Press the Up and Down arrow keys to resize the editor."),d=a===nm.Both?"tox-statusbar__resize-cursor-both":"tox-statusbar__resize-cursor-default";return k.some(yc("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle",d],attributes:{"aria-label":s.translate(c),"data-mce-name":"resize-handle",role:"separator"},behaviours:[Xm.config({mode:"mouse",repositionTarget:!1,onDrag:(f,p,y)=>{const C=A$(o,y,a);RO(f,C,a)},blockerClass:"tox-blocker"}),pe.config({mode:"special",onLeft:f=>F4(o,f,a,-1,0),onRight:f=>F4(o,f,a,1,0),onUp:f=>F4(o,f,a,0,-1),onDown:f=>F4(o,f,a,0,1)}),gn.config({}),Ie.config({}),yn.config(s.tooltips.getConfig({tooltipText:s.translate("Resize")})),Me("set-aria-valuetext",[vn(f=>{const p=()=>{RO(f,E$(o),a)};o._skinLoaded?p():o.once("SkinLoaded",p)})])],eventOrder:{[Hc()]:["add-focusable","set-aria-valuetext"]}},s.icons))},eY=(o,s)=>{const a=(c,d,f)=>ze.set(c,[En(s.translate(["{0}
82 "+f,d[f]]))]);return Ks.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Pt([td.button(s.isDisabled),ms(()=>s.checkUiComponentContext("any")),gn.config({}),ze.config({}),ne.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Me("wordcount-events",[Md(c=>{const d=ne.getValue(c),f=d.mode==="words"?"characters":"words";ne.setValue(c,{mode:f,count:d.count}),a(c,d.count,f)}),vn(c=>{o.on("wordCountUpdate",d=>{const{mode:f}=ne.getValue(c);ne.setValue(c,{mode:f,count:d.wordCount}),a(c,d.wordCount,f)})})])]),eventOrder:{[mr()]:["disabling","alloy.base.behaviour","wordcount-events"]}})},D$=(o,s)=>{const a=()=>({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7",rel:"noopener",target:"_blank","aria-label":o.translate(["Build with {0}","TinyMCE"])},innerHtml:o.translate(["Build with {0}",k$.trim()])},behaviours:Pt([Ie.config({})])}]}),c=()=>{const y=A6("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[En(sa.translate(["Press {0} for help",y]))]}},d=()=>{const y=[];return o.hasPlugin("wordcount")&&y.push(eY(o,s)),p5(o)&&y.push(a()),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:y}},f=()=>{const y=[],C=QB(o),_=qB(o),A=p5(o)||o.hasPlugin("wordcount"),O=()=>{const M="tox-statusbar__text-container--flex-start",I="tox-statusbar__text-container--flex-end",L="tox-statusbar__text-container--space-around";if(C){const W="tox-statusbar__text-container-3-cols";return!A&&!_?[W,L]:A&&!_?[W,I]:[W,M]}return[A&&!_?I:M]};return _&&y.push(XK(o,{},s)),C&&y.push(c()),A&&y.push(d()),y.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...O()]},components:y}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const y=f(),C=T$(o,s);return y.concat(C.toArray())})()}},O$=(o,s)=>s.get().getOrDie(`UI for ${o} has not been rendered`),oY=(o,s)=>{const a=o.inline,c=a?sK:Yq,d=bb(o)?kG:vG,f=w4(),p=Ze(),y=Ze(),C=Ze(),M=Cr().deviceType.isTouch()?["tox-platform-touch"]:[],I=o3(o),L=vh(o),W=Mo({dom:{tag:"div",classes:["tox-anchorbar"]}}),j=Mo({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),V=()=>f.mainUi.get().map(me=>me.outerContainer).bind(an.getHeader),K=()=>Te.fromOption(f.dialogUi.get().map(me=>me.sink),"UI has not been rendered"),tt=()=>Te.fromOption(f.popupUi.get().map(me=>me.sink),"(popup) UI has not been rendered"),ct=f.lazyGetInOuterOrDie("anchor bar",W.getOpt),dt=f.lazyGetInOuterOrDie("bottom anchor bar",j.getOpt),Wt=f.lazyGetInOuterOrDie("toolbar",an.getToolbar),kt=f.lazyGetInOuterOrDie("throbber",an.getThrobber),Ot=hG({popup:tt,dialog:K},o,ct,dt),Tt=()=>{const me={attributes:{[l0]:I?Bu.BottomToTop:Bu.TopToBottom}},Ue=an.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:Ot.popup,onEscape:()=>{o.focus()}}),jo=an.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:Ot.popup.shared.getSink,providers:Ot.popup.shared.providers,onEscape:()=>{o.focus()},onToolbarToggled:sm=>{dZ(o,sm)},type:L,lazyToolbar:Wt,lazyHeader:()=>V().getOrDie("Could not find header element"),...me}),Eo=an.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:Ot.popup.shared.providers,onEscape:()=>{o.focus()},type:L}),Ea=Df(o),Pn=pb(o),fi=fb(o),xr=JB(o),ra=xe(xr),pi=Ea||Pn||fi,cl=()=>Ea?[Eo]:Pn?[jo]:[],Vf=[ra,Ue];return an.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(pi?[]:["tox-editor-header--empty"]),...me},components:wt([fi?Vf:[],cl(),hb(o)?[]:[W.asSpec()]]),sticky:bb(o),editor:o,sharedBackstage:Ot.popup.shared})},xe=me=>an.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]},promotionLink:me}),le=()=>{const me=an.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),Ue=an.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}});return{dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[me,Ue]}},Qe=()=>{const me=b5(o),Ue=ln(ni(),me)&&Dn(me,"display")==="grid",jo={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(M),attributes:{...sa.isRtl()?{dir:"rtl"}:{}}}
82,behaviours:Pt([oa.config({useFixed:()=>d.isDocked(V)})])},Eo={dom:{styles:{width:document.body.clientWidth+"px"}},events:Rn([vt(jg(),fi=>{Be(fi.element,"width",document.body.clientWidth+"px")})])},Ea=m(kn(jo,Ue?Eo:{})),Pn=iT(Ea);return y.set(Pn),{sink:Ea,mothership:Pn}},ye=()=>{const me={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(M),attributes:{...sa.isRtl()?{dir:"rtl"}:{}}},behaviours:Pt([oa.config({useFixed:()=>d.isDocked(V),getBounds:()=>s.getPopupSinkBounds()})])},Ue=m(me),jo=iT(Ue);return C.set(jo),{sink:Ue,mothership:jo}},je=()=>{const me=Tt(),Ue=le(),jo=an.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:Ot.popup}),Eo=an.parts.viewWrapper({backstage:Ot.popup}),Ea=GB(o)&&!a?k.some(D$(o,Ot.popup.shared.providers)):k.none(),Pn=wt([I?[]:[me],a?[]:[Ue],I?[me]:[]]),fi=an.parts.editorContainer({components:wt([Pn,a?[]:[j.asSpec()]])}),xr=x5(o),ra={role:"application",...sa.isRtl()?{dir:"rtl"}:{},...xr?{"aria-hidden":"true"}:{}},pi=m(an.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(a?["tox-tinymce-inline"]:[]).concat(I?["tox-tinymce--toolbar-bottom"]:[]).concat(M),styles:{visibility:"hidden",...xr?{opacity:"0",border:"0"}:{}},attributes:ra},components:[fi,...a?[]:[Eo,...Ea.toArray()],jo],behaviours:Pt([ms(()=>Ot.popup.shared.providers.checkUiComponentContext("any")),ce.config({disableClass:"tox-tinymce--disabled"}),pe.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])})),cl=iT(pi);return p.set(cl),{mothership:cl,outerContainer:pi}},ue=me=>{const Ue=y4(tK(o)),jo=y4(eK(o));return o.inline||(kg("div","width",jo)&&Be(me.element,"width",jo),kg("div","height",Ue)?Be(me.element,"height",Ue):Be(me.element,"height","400px")),Ue},_t=me=>{o.addShortcut("alt+F9","focus menubar",()=>{an.focusMenubar(me)}),o.addShortcut("alt+F10","focus toolbar",()=>{an.focusToolbar(me)}),o.addCommand("ToggleToolbarDrawer",(Ue,jo,Eo)=>{jo!=null&&jo.skipFocus?(bG("skipFocus"),an.toggleToolbarDrawerWithoutFocusing(me)):Eo!=null&&Eo.skip_focus?an.toggleToolbarDrawerWithoutFocusing(me):an.toggleToolbarDrawer(me)}),o.addQueryStateHandler("ToggleToolbarDrawer",()=>an.isToolbarDrawerToggled(me)),o.on("blur",()=>{vh(o)===vc.floating&&an.isToolbarDrawerToggled(me)&&an.toggleToolbarDrawerWithoutFocusing(me)})},Lt=me=>{const{mainUi:Ue,popupUi:jo,uiMotherships:Eo}=me;hs($B(o),(gg,mC)=>{o.ui.registry.addGroupToolbarButton(mC,gg)});const{buttons:Ea,menuItems:Pn,contextToolbars:fi,sidebars:xr,views:ra}=o.ui.registry.getAll(),pi=py(o),cl={menuItems:Pn,menus:nF(o),menubar:VB(o),toolbar:pi.getOrThunk(()=>t3(o)),allowToolbarGroups:L===vc.floating,buttons:Ea,sidebar:xr,views:ra};_t(Ue.outerContainer),UD(o,Ue.mothership,Eo),d.setup(o,Ot.popup.shared,V),BK(o,Ot.popup),C$(o,Ot.popup.shared.getSink,Ot.popup),TG(o),FG(o,kt,Ot.popup.shared),n$(o,fi,jo.sink,{backstage:Ot.popup}),KK(o,jo.sink);const Vf=o.getElement(),sm=ue(Ue.outerContainer),Uh={targetNode:Vf,height:sm};return c.render(o,me,cl,Ot.popup,Uh)},Ae=me=>(C.set(me.mothership),me),Ge=()=>{const me=je(),Ue=Qe(),jo=Of(o)?ye():Ae(Ue);f.dialogUi.set(Ue),f.popupUi.set(jo),f.mainUi.set(me);const Eo={popupUi:jo,dialogUi:Ue,mainUi:me,uiMotherships:f.getUiMotherships()};return Lt(Eo)};return{popups:{backstage:Ot.popup,getMothership:()=>O$("popups",C)},dialogs:{backstage:Ot.dialog,getMothership:()=>O$("dialogs",y)},renderUI:Ge}},R$=o=>{const s=[],a={};return is(o,(c,d)=>{c.fold(()=>{s.push(d)},f=>{a[d]=f})}),s.length>0?Te.error(s):Te.value(a)},zh=(o,s,a,c)=>{const d=Mo(kf.sketch(f=>({dom:{tag:"div",classes:["tox-form"].concat(o.classes)},components:pt(o.items,p=>pP(f,p,s,a,c))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[d.asSpec()]}],behaviours:Pt([pe.config({mode:"acyclic",useTabstopAt:mt(Vy)}),Ql.memento(d),XZ(d,{postprocess:f=>R$(f).fold(p=>(console.error(p),{}),eo)}),Me("dialog-body-panel",[vt(ac(),(f,p)=>{f.getSystem().broadcastOn([Lf],{newFocus:k.some(p.event.target)})})])])}},B$=(o,s,a)=>pt(o,(c,d)=>{ze.set(a,o[d].view());const f=s.dom.getBoundingClientRect();return ze.set(a,[]),f.height}),nY=o=>Xo(We(o,(s,a)=>s>
82a?-1:s<a?1:0)),sY=(o,s,a)=>{const c=Ax(o).dom,d=ec(o,".tox-dialog-wrap").getOr(o),f=Dn(d,"position")==="fixed";let p;f?p=Math.max(c.clientHeight,window.innerHeight):p=Math.max(c.offsetHeight,c.scrollHeight);const y=Zs(s),_=s.dom.offsetLeft>=a.dom.offsetLeft+Ir(a)?Math.max(Zs(a),y):y,A=parseInt(Dn(o,"margin-top"),10)||0,O=parseInt(Dn(o,"margin-bottom"),10)||0,I=Zs(o)+A+O-_;return p-I},rY=(o,s)=>{Xo(o).each(a=>xh.showTab(s,a.value))},F$=(o,s)=>{Be(o,"height",s+"px"),Be(o,"flex-basis",s+"px")},M4=(o,s,a)=>{ec(o,'[role="dialog"]').each(c=>{Ko(c,'[role="tablist"]').each(d=>{a.get().map(f=>(Be(s,"height","0"),Be(s,"flex-basis","0"),Math.min(f,sY(c,s,d)))).each(f=>{F$(s,f)})})})},N4=o=>Ko(o,'[role="tabpanel"]'),aY=o=>{const s=Ze();return{extraEvents:[vn(d=>{const f=d.element;N4(f).each(p=>{Be(p,"visibility","hidden"),d.getSystem().getByDom(p).toOptional().each(y=>{const C=B$(o,p,y);nY(C).fold(s.clear,s.set)}),M4(f,p,s),uo(p,"visibility"),rY(o,d),requestAnimationFrame(()=>{M4(f,p,s)})})}),vt(jg(),d=>{const f=d.element;N4(f).each(p=>{M4(f,p,s)})}),vt(dD,(d,f)=>{const p=d.element;N4(p).each(y=>{const C=rr(ks(y));Be(y,"visibility","hidden");const _=Hn(y,"height").map(M=>parseInt(M,10));uo(y,"height"),uo(y,"flex-basis");const A=y.dom.getBoundingClientRect().height;_.forall(M=>A>M)?(s.set(A),M4(p,y,s)):_.each(M=>{F$(y,M)}),uo(y,"visibility"),C.each(Js)})})],selectFirst:!1}},M$="send-data-to-section",N$="send-data-to-view",iY=(o,s,a,c)=>{const d=fe({}),f=A=>{const O=ne.getValue(A),M=R$(O).getOr({}),I=d.get(),L=kn(I,M);d.set(L)},p=A=>{const O=d.get();ne.setValue(A,O)},y=fe(null),C=pt(o.tabs,A=>({value:A.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[En(a.shared.providers.translate(A.title))],view:()=>[kf.sketch(O=>({dom:{tag:"div",classes:["tox-form"]},components:pt(A.items,M=>pP(O,M,s,a,c)),formBehaviours:Pt([pe.config({mode:"acyclic",useTabstopAt:mt(Vy)}),Me("TabView.form.events",[vn(p),dc(f)]),na.config({channels:zg([{key:M$,value:{onReceive:f}},{key:N$,value:{onReceive:p}}])})])}))]})),_=aY(C);return xh.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(A,O,M)=>{const I=ne.getValue(O);be(A,pN,{name:I,oldName:y.get()}),y.set(I)},tabs:C,components:[xh.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[AB.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Pt([gn.config({})])}),xh.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:_.selectFirst,tabSectionBehaviours:Pt([Me("tabpanel",_.extraEvents),pe.config({mode:"acyclic"}),Rt.config({find:A=>Xo(xh.getViewItems(A))}),$h(k.none(),A=>(A.getSystem().broadcastOn([M$],{}),d.get()),(A,O)=>{d.set(O),A.getSystem().broadcastOn([N$],{})})])})},P$=(o,s,a,c,d,f)=>{const p=_=>{const A=_.body;switch(A.type){case"tabpanel":return[iY(A,_.initialData,c,f)];default:return[zh(A,_.initialData,c,f)]}},y=(_,A)=>k.some({isTabPanel:()=>A.body.type==="tabpanel"}),C={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...a.map(_=>({id:_})).getOr({}),...d?C:{}}},components:[],behaviours:Pt([Ql.childAt(0),mi.config({channel:`${NN}-${s}`,updateState:y,renderComponents:p,initialData:o})])}},cY=(o,s,a,c,d,f)=>P$(o,s,k.some(a),c,d,f),lY=(o,s,a,c)=>{const d=P$(o,s,k.none(),a,!1,c);return Ys.parts.body(d)},I$=o=>{const s={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[FN(k.none(),{dom:{tag:"iframe",attributes:{src:o.url}},behaviours:Pt([gn.config({}),Ie.config({})])})]}],behaviours:Pt([pe.config({mode:"acyclic",useTabstopAt:mt(Vy)})])};return Ys.parts.body(s)},uY=db.deviceType.isTouch(),$$=(o,s)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[o,s]}),L$=(o,s)=>Ys.parts.close(Ks.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":s.translate("Close")}},action:o,buttonBehaviours:Pt([gn.config({})])})),H$=()=>Ys.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),z$=(o,s)=>Ys.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Zu(`<p>${Cy(s.translate(o))}</p>`)}]}]}),P4=o=>Ys.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:o}),V$=(o,s)=>[Vu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:o}),Vu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]}
82,components:s})],BO=o=>{const s="tox-dialog",a=s+"-wrap",c=a+"__backdrop",d=s+"__disable-scroll";return Ys.sketch({lazySink:o.lazySink,onEscape:f=>(o.onEscape(f),k.some(!0)),useTabstopAt:f=>!Vy(f),firstTabstop:o.firstTabstop,dom:{tag:"div",classes:[s].concat(o.extraClasses),styles:{position:"relative",...o.extraStyles}},components:[o.header,o.body,...o.footer.toArray()],parts:{blocker:{dom:Zu(`<div class="${a}"></div>`),components:[{dom:{tag:"div",classes:uY?[c,c+"--opaque"]:[c]}}]}},dragBlockClass:a,modalBehaviours:Pt([Ie.config({}),Me("dialog-events",o.dialogEvents.concat([af(ac(),(f,p)=>{ot.isBlocked(f)?q():pe.focusIn(f)}),vt(L1(),(f,p)=>{f.getSystem().broadcastOn([Lf],{newFocus:p.event.newFocus})})])),Me("scroll-lock",[vn(()=>{sn(ni(),d)}),dc(()=>{Un(ni(),d)})]),...o.extraBehaviours]),eventOrder:{[mr()]:["dialog-events"],[Hc()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Mi()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...o.eventOrder}})},U$=o=>Ks.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":o.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:Pt([gn.config({}),yn.config(o.tooltips.getConfig({tooltipText:o.translate("Close")}))]),components:[yc("close",{tag:"span",classes:["tox-icon"]},o.icons)],action:s=>{no(s,dg)}}),W$=(o,s,a,c)=>{const d=f=>[En(c.translate(f.title))];return{dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...a.map(f=>({id:f})).getOr({})}},components:[],behaviours:Pt([mi.config({channel:`${pD}-${s}`,initialData:o,renderComponents:d})])}},Z$=()=>({dom:Zu('<div class="tox-dialog__draghandle"></div>')}),dY=(o,s,a,c)=>Vu.sketch({dom:Zu('<div class="tox-dialog__header"></div>'),components:[W$(o,s,k.some(a),c),Z$(),U$(c)],containerBehaviours:Pt([Xm.config({mode:"mouse",blockerClass:"blocker",getTarget:d=>$r(d,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"},onDrag:(d,f)=>{d.getSystem().broadcastOn([Cs()],{target:f})}})])}),mY=(o,s,a)=>{const c=Ys.parts.title(W$(o,s,k.none(),a)),d=Ys.parts.draghandle(Z$()),f=Ys.parts.close(U$(a)),p=[c].concat(o.draggable?[d]:[]).concat([f]);return Vu.sketch({dom:Zu('<div class="tox-dialog__header"></div>'),components:p})},j$=(o,s,a)=>mY({title:a.shared.providers.translate(o),draggable:a.dialog.isDraggableModal()},s,a.shared.providers),FO=(o,s,a,c)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":a.translate(o)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${c.getOr(0)}px`,position:"absolute"}},behaviours:s,components:[{dom:Zu('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),MO=(o,s,a)=>({onClose:()=>a.closeWindow(),onBlock:c=>{const d=Ko(o().element,".tox-dialog__header").map(f=>Zs(f));Ys.setBusy(o(),(f,p)=>FO(c.message,p,s,d))},onUnblock:()=>{Ys.setIdle(o())}}),G$="tox-dialog--fullscreen",Vh="tox-dialog--width-lg",NO="tox-dialog--width-md",I4=o=>{switch(o){case"large":return k.some(Vh);case"medium":return k.some(NO);default:return k.none()}},$4=(o,s)=>{const a=Zt.fromDom(s.element.dom);bs(a,G$)||(_r(a,[Vh,NO]),I4(o).each(c=>sn(a,c)))},q$=(o,s)=>{const a=Zt.fromDom(o.element.dom),c=Lx(a),d=xt(c,f=>f===Vh||f===NO).or(I4(s));vu(a,[G$,...d.toArray()])},K$=(o,s,a)=>m(BO({...o,firstTabstop:1,lazySink:a.shared.getSink,extraBehaviours:[z3({}),...o.extraBehaviours],onEscape:c=>{no(c,dg)},dialogEvents:s,eventOrder:{[Au()]:[mi.name(),na.name()],[Hc()]:["scroll-lock",mi.name(),"messages","dialog-events","alloy.base.behaviour"],[Mi()]:["alloy.base.behaviour","dialog-events","messages",mi.name(),"scroll-lock"]}})),PO=(o,s={})=>{const a=c=>{const d=pt(c.items,f=>{const p=he(s,f.name).getOr(fe(!1));return{...f,storage:p}});return{...c,items:d}};return pt(o,c=>c.type==="menu"?a(c):c)},Y$=o=>Zo(o,(s,a)=>a.type==="menu"?Zo(a.items,(d,f)=>(d[f.name]=f.storage,d),s):s,{}),X$=(o,s)=>[rf(ac(),MN),o(Ih,(a,c,d,f)=>{Xi(f.element)&&rr(ks(f.element)).each(Qn),s.onClose(),c.onClose()}),o(dg,(a,c,d,f)=>{c.onCancel(a),no(f,Ih)}),vt(L3,(a,c)=>s.onUnblock()),vt(uD,(a,c)=>s.onBlock(c.event))],gY=(o,s)=>{const a=(d,f)=>vt(d,(p,y)=>{c(p,(C,_)=>{f(o(),C,y.event,p)})}),c=(d,f)=>{mi.getState(d).get().each(p=>{f(p,d)})};return[...X$(a,s),a(Jl,(d,f,p)=>{f.onAction(d,{name:p.name})})]},J$=(o,s,a)=>{const c=(f,p)=>vt(f,(y,C)=>{d(y,(_,A)=>{p(o(),_,C.event,y)})}),d=(f,p)=>{mi.getState(f).get().each(y=>{p(y.internalDialog,f)})};return[...X$(c,s),c(zy,(f,p)=>p.onSubmit(f)),c(Ga,(f,p,y)=>{p.onChange(f,{name:y.name})}),c(Jl,(f,p,y,C)=>{const _=()=>C.getSystem().isConnected()?pe.focusIn(C):void 0,A=I=>cr(I,"disabled")||ir(I,"aria-disabled").exists(L=>L==="true"),O=ks(C.element),M=rr(O);p.onAction(f,{name:y.name,value:y.value}),rr(O).fold(_,I=>{A(I)||M.exists(L=>a1(I,L)&&A(L))?_():a().toOptional().filter(L=>!a1(L.element,I)).each(_)})}),c(pN,(f,p,y)=>{p.onTabChange(f,{newTabName:y.name,oldTabName:y.oldName})}),dc(f=>{const p=o();ne.setValue(f,p.getData())})]},fY=(o,s)=>jy(o,o.type,s),pY=(o,s,a)=>xt(s,c=>c.name===a).bind(c=>c.memento.getOpt(o)),hY=(o,s)=>{const a=s.map(y=>y.footerButtons).getOr([]),c=Vr(a,y=>y.align==="start"),d=(y,C)=>Vu.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${y}`]},components:pt(C,_=>_.memento.asSpec())}),f=d("start",c.pass),p=d("end",c.fail);return[f,p]},Q$=(o,s,a)=>{const c=(d,f)=>{const p=pt(f.buttons,C=>{const _=Mo(fY(C,a));return{name:C.name,align:C.align,memento:_}}),y=C=>pY(d,p,C);return k.some({lookupByName:y,footerButtons:p})};return{dom:Zu('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Pt([mi.config({channel:`${PN}-${s}`,initialData:o,updateState:c,renderComponents:hY})])}},bY=(o,s,a)=>Q$(o,s,a),tL=(o,s,a)=>Ys.parts.footer(Q$(o,s,a)),L4=(o,s)=>{if(o.getRoot().getSystem().isConnected()){const c=Rt.getCurrent(o.getFormWrapper()).getOr(o.getFormWrapper());return kf.getField(c,s).orThunk(()=>o.getFooter().bind(p=>mi.getState(p).get()).bind(p=>p.lookupByName(s)))}else return k.none()},xY=(o,s)=>{const a=o.getRoot();return mi.getState(a).get().map(c=>Fi(zn("data",c.dataValidator,s))).getOr(s)},eL=(o,s,a)=>{const c=L=>{const W=o.getRoot();W.getSystem().isConnected()&&L(W)},I={getData:()=>{const L=o.getRoot(),W=L.getSystem().isConnected()?o.getFormWrapper():L,j=ne.getValue(W),V=hs(a,K=>K.get());return{...j,...V}},setData:L=>{c(W=>{const j=I.getData(),V=kn(j,L),K=xY(o,V),tt=o.getFormWrapper();ne.setValue(tt,K),is(a,(ct,dt)=>
82{nn(V,dt)&&ct.set(V[dt])})})},setEnabled:(L,W)=>{L4(o,L).each(W?ce.enable:ce.disable)},focus:L=>{L4(o,L).each(Ie.focus)},block:L=>{if(!$e(L))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");c(W=>{be(W,uD,{message:L})})},unblock:()=>{c(L=>{no(L,L3)})},showTab:L=>{c(W=>{const j=o.getBody();mi.getState(j).get().exists(K=>K.isTabPanel())&&Rt.getCurrent(j).each(K=>{xh.showTab(K,L)})})},redial:L=>{c(W=>{const j=o.getId(),V=s(L),K=PO(V.internalDialog.buttons,a);W.getSystem().broadcastOn([`${j3}-${j}`],V),W.getSystem().broadcastOn([`${pD}-${j}`],V.internalDialog),W.getSystem().broadcastOn([`${NN}-${j}`],V.internalDialog),W.getSystem().broadcastOn([`${PN}-${j}`],{...V.internalDialog,buttons:K}),I.setData(V.initialData)})},close:()=>{c(L=>{no(L,Ih)})},toggleFullscreen:o.toggleFullscreen};return I},vY=(o,s,a)=>{const c=ee("dialog"),d=o.internalDialog,f=j$(d.title,c,a),p=fe(d.size),y=tt=>L4(V,tt),C=I4(p.get()).toArray(),_=(tt,ct)=>(p.set(ct.internalDialog.size),$4(ct.internalDialog.size,tt),k.some(ct)),A=lY({body:d.body,initialData:d.initialData},c,a,y),O=PO(d.buttons),M=Y$(O),I=yi(O.length!==0,tL({buttons:O},c,a)),L=J$(()=>K,MO(()=>j,a.shared.providers,s),a.shared.getSink),W={id:c,header:f,body:A,footer:I,extraClasses:C,extraBehaviours:[mi.config({channel:`${j3}-${c}`,updateState:_,initialData:o})],extraStyles:{}},j=K$(W,L,a),V=(()=>{const tt=()=>{const dt=Ys.getBody(j);return Rt.getCurrent(dt).getOr(dt)},ct=()=>{q$(j,p.get())};return{getId:nt(c),getRoot:nt(j),getBody:()=>Ys.getBody(j),getFooter:()=>Ys.getFooter(j),getFormWrapper:tt,toggleFullscreen:ct}})(),K=eL(V,s.redial,M);return{dialog:j,instanceApi:K}},dC=(o,s,a,c=!1,d)=>{const f=ee("dialog"),p=ee("dialog-label"),y=ee("dialog-content"),C=o.internalDialog,_=Tt=>L4(kt,Tt),A=fe(C.size),O=I4(A.get()).toArray(),M=(Tt,xe)=>(A.set(xe.internalDialog.size),$4(xe.internalDialog.size,Tt),d(),k.some(xe)),I=Mo(dY({title:C.title,draggable:!0},f,p,a.shared.providers)),L=Mo(cY({body:C.body,initialData:C.initialData},f,y,a,c,_)),W=PO(C.buttons),j=Y$(W),V=yi(W.length!==0,Mo(bY({buttons:W},f,a))),K=J$(()=>Ot,{onBlock:Tt=>{ot.block(dt,(xe,le)=>{const Qe=I.getOpt(dt).map(ye=>Zs(ye.element));return FO(Tt.message,le,a.shared.providers,Qe)})},onUnblock:()=>{ot.unblock(dt)},onClose:()=>s.closeWindow()},a.shared.getSink),tt="tox-dialog-inline",ct=Cr().os,dt=m({dom:{tag:"div",classes:["tox-dialog",tt,...O],attributes:{role:"dialog",...ct.isMacOS()?{"aria-label":C.title}:{"aria-labelledby":p}}},eventOrder:{[Au()]:[mi.name(),na.name()],[mr()]:["execute-on-form"],[Hc()]:["reflecting","execute-on-form"]},behaviours:Pt([pe.config({mode:"cyclic",onEscape:Tt=>(no(Tt,Ih),k.some(!0)),useTabstopAt:Tt=>!Vy(Tt)&&(qi(Tt)!=="button"||Ws(Tt,"disabled")!=="disabled"),firstTabstop:1}),mi.config({channel:`${j3}-${f}`,updateState:M,initialData:o}),Ie.config({}),Me("execute-on-form",K.concat([af(ac(),(Tt,xe)=>{pe.focusIn(Tt)}),vt(L1(),(Tt,xe)=>{Tt.getSystem().broadcastOn([Lf],{newFocus:xe.event.newFocus})})])),ot.config({getRoot:()=>k.some(dt)}),ze.config({}),z3({})]),components:[I.asSpec(),L.asSpec(),...V.map(Tt=>Tt.asSpec()).toArray()]}),Wt=()=>{q$(dt,A.get())},kt={getId:nt(f),getRoot:nt(dt),getFooter:()=>V.map(Tt=>Tt.get(dt)),getBody:()=>L.get(dt),getFormWrapper:()=>{const Tt=L.get(dt);return Rt.getCurrent(Tt).getOr(Tt)},toggleFullscreen:Wt},Ot=eL(kt,s.redial,j);return{dialog:dt,instanceApi:Ot}};var IO=tinymce.util.Tools.resolve("tinymce.util.URI");const yY=o=>{const s=p=>{o.getSystem().isConnected()&&p(o)};return{block:p=>{if(!$e(p))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s(y=>{be(y,uD,{message:p})})},unblock:()=>{s(p=>{no(p,L3)})},close:()=>{s(p=>{no(p,Ih)})},sendMessage:p=>{s(y=>{y.getSystem().broadcastOn([Fe],p)})}}},CY=["insertContent","setContent","execCommand","close","block","unblock"],oL=o=>hn(o)&&CY.indexOf(o.mceAction)!==-1,wY=o=>!oL(o)&&hn(o)&&nn(o,"mceAction"),_Y=(o,s,a)=>{switch(a.mceAction){case"insertContent":o.insertContent(a.content);break;case"setContent":o.setContent(a.content);break;case"execCommand":const c=Ta(a.ui)?a.ui:!1;o.execCommand(a.cmd,c,a.value);break;
82case"close":s.close();break;case"block":s.block(a.message);break;case"unblock":s.unblock();break}},nL=(o,s,a,c)=>{const d=ee("dialog"),f=j$(o.title,d,c),p=I$(o),y=o.buttons.bind(tt=>tt.length===0?k.none():k.some(tL({buttons:tt},d,c))),C=gY(()=>K,MO(()=>V,c.shared.providers,s)),_={...o.height.fold(()=>({}),tt=>({height:tt+"px","max-height":tt+"px"})),...o.width.fold(()=>({}),tt=>({width:tt+"px","max-width":tt+"px"}))},A=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],O=new IO(o.url,{base_uri:new IO(window.location.href)}),M=`${O.protocol}://${O.host}${O.port?":"+O.port:""}`,I=Rs(),L=(tt,ct)=>k.some(ct),W=[mi.config({channel:`${j3}-${d}`,updateState:L,initialData:o}),Me("messages",[vn(()=>{const tt=Vo(Zt.fromDom(window),"message",ct=>{if(O.isSameOrigin(new IO(ct.raw.origin))){const dt=ct.raw.data;oL(dt)?_Y(a,K,dt):wY(dt)&&o.onMessage(K,dt)}});I.set(tt)}),dc(I.clear)]),na.config({channels:{[Fe]:{onReceive:(tt,ct)=>{Ko(tt.element,"iframe").each(dt=>{const Wt=dt.dom.contentWindow;$n(Wt)&&Wt.postMessage(ct,M)})}}}})],V=K$({id:d,header:f,body:p,footer:y,extraClasses:A,extraBehaviours:W,extraStyles:_},C,c),K=yY(V);return{dialog:V,instanceApi:K}},SY=o=>{const s=o.shared;return{open:(c,d)=>{const f=()=>{Ys.hide(_),d()},p=Mo(jy({context:"any",name:"close-alert",text:"OK",primary:!0,buttonType:k.some("primary"),align:"end",enabled:!0,icon:k.none()},"cancel",o)),y=H$(),C=L$(f,s.providers),_=m(BO({lazySink:()=>s.getSink(),header:$$(y,C),body:z$(c,s.providers),footer:k.some(P4(V$([],[p.asSpec()]))),onEscape:f,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[vt(dg,f)],eventOrder:{}}));Ys.show(_);const A=p.get(_);Ie.focus(A)}}},kY=o=>{const s=o.shared;return{open:(c,d)=>{const f=M=>{Ys.hide(A),d(M)},p=Mo(jy({context:"any",name:"yes",text:"Yes",primary:!0,buttonType:k.some("primary"),align:"end",enabled:!0,icon:k.none()},"submit",o)),y=jy({context:"any",name:"no",text:"No",primary:!1,buttonType:k.some("secondary"),align:"end",enabled:!0,icon:k.none()},"cancel",o),C=H$(),_=L$(()=>f(!1),s.providers),A=m(BO({lazySink:()=>s.getSink(),header:$$(C,_),body:z$(c,s.providers),footer:k.some(P4(V$([],[y,p.asSpec()]))),onEscape:()=>f(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[vt(dg,()=>f(!1)),vt(zy,()=>f(!0))],eventOrder:{}}));Ys.show(A);const O=p.get(A);Ie.focus(O)}}},sL=(o,s)=>Fi(zn("data",s,o)),rL=o=>cp(o,".tox-alert-dialog")||cp(o,".tox-confirm-dialog"),EY=(o,s,a,c)=>s&&a?[]:[Nn.config({contextual:{lazyContext:()=>k.some(xs(Zt.fromDom(o.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition",onHide:c},modes:["top"],lazyViewport:d=>og(o,d.element).map(p=>({bounds:yh(p),optScrollEnv:k.some({currentScrollTop:p.element.dom.scrollTop,scrollElmTop:Ma(p.element).top})})).getOrThunk(()=>({bounds:Sr(),optScrollEnv:k.none()}))})],$O=o=>{const s=o.editor,a=bb(s),c=SY(o.backstages.dialog),d=kY(o.backstages.dialog),f=(L,W,j)=>{if(!zs(W)){if(W.inline==="toolbar")return _(L,o.backstages.popup.shared.anchors.inlineDialog(),j,W);if(W.inline==="bottom")return A(L,o.backstages.popup.shared.anchors.inlineBottomDialog(),j,W);if(W.inline==="cursor")return _(L,o.backstages.popup.shared.anchors.cursor(),j,W)}return C(L,j)},p=(L,W)=>y(L,W),y=(L,W)=>{const j=V=>{const K=nL(V,{closeWindow:()=>{Ys.hide(K.dialog),W(K.instanceApi)}},s,o.backstages.dialog);return Ys.show(K.dialog),K.instanceApi};return Rh.openUrl(j,L)},C=(L,W)=>{const j=(V,K,tt)=>{const ct=K,Wt=vY({dataValidator:tt,initialData:ct,internalDialog:V},{redial:Rh.redial,closeWindow:()=>{Ys.hide(Wt.dialog),W(Wt.instanceApi)}},o.backstages.dialog);return Ys.show(Wt.dialog),Wt.instanceApi.setData(ct),Wt.instanceApi};return Rh.open(j,L)},_=(L,W,j,V)=>{const K=(tt,ct,dt)=>{const Wt=sL(ct,dt),kt=Ze(),Ot=o.backstages.popup.shared.header.isPositionedAtTop(),Tt={dataValidator:dt,initialData:Wt,internalDialog:tt},xe=()=>kt.on(_t=>{jn.reposition(_t),(!a||!Ot)&&Nn.refresh(_t)}),le=dC(Tt,{redial:Rh.redial,closeWindow:()=>{kt.on(jn.hide),s.off("ResizeEditor",xe),s.off("ScrollWindow",Qe),kt.clear(),j(le.instanceApi)}},o.backstages.popup,V.ariaAttrs,xe),Qe=()=>le.dialog.getSystem().broadcastOn([Cs()],{target:le.dialog.element}),ye=()=>le.dialog.getSystem().broadcastOn([Fl()],{target:le.dialog.element}),je=m(jn.sketch({lazySink:o.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:V.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Pt([Me("window-manager-inline-events",[vt(Tu(),(_t,Lt)=>{no(le.dialog,dg)})]),...EY(s,a,Ot,ye)]),isExtraPart:(_t,Lt)=>rL(Lt)}));kt.set(je);const ue=()=>{const _t=s.inline?ni():Zt.fromDom(s.getContainer()),Lt=xs(_t);return k.some(Lt)};
82return jn.showWithinBounds(je,h(le.dialog),{anchor:W},ue),(!a||!Ot)&&(Nn.refresh(je),s.on("ResizeEditor",xe)),s.on("ScrollWindow",Qe),le.instanceApi.setData(Wt),pe.focusIn(le.dialog),le.instanceApi};return Rh.open(K,L)},A=(L,W,j,V)=>{const K=(tt,ct,dt)=>{const Wt=sL(ct,dt),kt=Ze(),Ot=o.backstages.popup.shared.header.isPositionedAtTop(),Tt={dataValidator:dt,initialData:Wt,internalDialog:tt},xe=()=>kt.on(je=>{jn.reposition(je),Nn.refresh(je)}),le=dC(Tt,{redial:Rh.redial,closeWindow:()=>{kt.on(jn.hide),s.off("ResizeEditor ScrollWindow ElementScroll",xe),kt.clear(),j(le.instanceApi)}},o.backstages.popup,V.ariaAttrs,xe),Qe=m(jn.sketch({lazySink:o.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:V.persistent?{event:"doNotDismissYet"}:{},...Ot?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Pt([Me("window-manager-inline-events",[vt(Tu(),(je,ue)=>{no(le.dialog,dg)})]),Nn.config({contextual:{lazyContext:()=>k.some(xs(Zt.fromDom(s.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:je=>og(s,je.element).map(_t=>({bounds:yh(_t),optScrollEnv:k.some({currentScrollTop:_t.element.dom.scrollTop,scrollElmTop:Ma(_t.element).top})})).getOrThunk(()=>({bounds:Sr(),optScrollEnv:k.none()}))})]),isExtraPart:(je,ue)=>rL(ue)}));kt.set(Qe);const ye=()=>o.backstages.popup.shared.getSink().toOptional().bind(je=>{const ue=og(s,je.element),_t=15,Lt=ue.map(me=>yh(me)).getOr(Sr()),Ae=xs(Zt.fromDom(s.getContentAreaContainer())),Ge=wu(Ae,Lt);return k.some(Ts(Ge.x,Ge.y,Ge.width,Ge.height-_t))});return jn.showWithinBounds(Qe,h(le.dialog),{anchor:W},ye),Nn.refresh(Qe),s.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",xe),le.instanceApi.setData(Wt),pe.focusIn(le.dialog),le.instanceApi};return Rh.open(K,L)};return{open:f,openUrl:p,alert:(L,W)=>{c.open(L,W)},close:L=>{L.close()},confirm:(L,W)=>{d.open(L,W)}}},aL=o=>{BB(o),VM(o),MK(o)};var AY=()=>{RB.add("silver",o=>{aL(o);let s=()=>Sr();const{dialogs:a,popups:c,renderUI:d}=oY(o,{getPopupSinkBounds:()=>s()}),f=()=>{const A=d();return og(o,c.getMothership().element).each(M=>{s=()=>yh(M)}),A};WZ.register(o,c.backstage.shared);const p=$O({editor:o,backstages:{popup:c.backstage,dialog:a.backstage}}),y=Ze(),C=()=>XV(o,{backstage:c.backstage},c.getMothership(),y),_=()=>Ko(Zt.fromDom(o.getContainer()),".tox-promotion").map(A=>A.dom).getOrNull();return{renderUI:f,getWindowManagerImpl:nt(p),getNotificationManagerImpl:C,getPromotionElement:_}})};AY()})();(function(){var on=tinymce.util.Tools.resolve("tinymce.ModelManager");const pn=(l,m,h)=>{var v;return h(l,m.prototype)?!0:((v=l.constructor)==null?void 0:v.name)===m.name},ae=l=>{const m=typeof l;return l===null?"null":m==="object"&&Array.isArray(l)?"array":m==="object"&&pn(l,String,(h,v)=>v.isPrototypeOf(h))?"string":m},qe=l=>m=>ae(m)===l,So=l=>m=>typeof m===l,xo=l=>m=>l===m,un=qe("string"),$e=qe("object"),hn=qe("array"),He=xo(null),ca=So("boolean"),Xa=xo(void 0),Ta=l=>l==null,zs=l=>!Ta(l),Da=So("function"),$n=So("number"),ke=()=>{},la=(l,m)=>(...h)=>l(m.apply(null,h)),Oa=(l,m)=>h=>l(m(h)),q=l=>()=>l,mo=l=>l,Ja=(l,m)=>l===m;function lo(l,...m){return(...h)=>{const v=m.concat(h);return l.apply(null,v)}}const nt=l=>m=>!l(m),eo=l=>()=>{throw new Error(l)},Gn=l=>l(),so=q(!1),mt=q(!0),Ii=class Ii{constructor(m,h){Ft(this,"tag");Ft(this,"value");this.tag=m,this.value=h}static some(m){return new Ii(!0,m)}static none(){return Ii.singletonNone}fold(m,h){return this.tag?h(this.value):m()}isSome(){return this.tag}isNone(){return!this.tag}map(m){return this.tag?Ii.some(m(this.value)):Ii.none()}bind(m){return this.tag?m(this.value):Ii.none()}exists(m){return this.tag&&m(this.value)}forall(m){return!this.tag||m(this.value)}filter(m){return!this.tag||m(this.value)?this:Ii.none()}getOr(m){return this.tag?this.value:m}or(m){return this.tag?this:m}getOrThunk(m){return this.tag?this.value:m()}orThunk(m){return this.tag?this:m()}getOrDie(m){if(this.tag)return this.value;throw new Error(m??"Called getOrDie on None")}static from(m){return zs(m)?Ii.some(m):Ii.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(m){this.tag&&m(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}};Ft(Ii,"singletonNone",new Ii(!1));let X=Ii;const sr=Array.prototype.slice,Fo=Array.prototype.indexOf,_e=Array.prototype.push,k=(l,m)=>Fo.call(l,m),Fn=(l,m)=>k(l,m)>-1,Ut=(l,m)=>{for(let h=0,v=l.length;h<v;h++){const S=l[h];if(m(S,h))return!0}return!1},Sn=(l,m)=>{const h=[];for(let v=0;v<l;v++)h.push(m(v));return h},Ne=(l,m)=>{const h=l.length,v=new Array(h);for(let S=0;S<h;S++){const T=l[S];v[S]=m(T,S)}return v},Et=(l,m)=>{for(let h=0,v=l.length;h<v;h++){const S=l[h];m(S,h)}},Go=(l,m)=>{for(let h=l.length-1;h>=0;h--){const v=l[h];m(v,h)}},ps=(l,m)=>{const h=[],v=[];for(let S=0,T=l.length;S<T;S++){const B=l[S];(m(B,S)?h:v).push(B)}return{pass:h,fail:v}},te=(l,m)=>{const h=[];for(let v=0,S=l.length;v<S;v++){const T=l[v];m(T,v)&&h.push(T)}return h},Pe=(l,m,h)=>(Go(l,(v,S)=>{h=m(h,v,S)}),h),pt=(l,m,h)=>(Et(l,(v,S)=>{h=m(h,v,S)}),h),It=(l,m,h)=>{for(let v=0,S=l.length;v<S;v++){const T=l[v];if(m(T,v))return X.some(T);if(h(T,v))break}return X.none()},F=(l,m)=>It(l,m,so),Vr=(l,m)=>{for(let h=0,v=l.length;h<v;h++){const S=l[h];if(m(S,h))return X.some(h)}return X.none()},Io=l=>{const m=[];for(let h=0,v=l.length;h<v;++h){if(!hn(l[h]))throw new Error("Arr.flatten item "+h+" was not an array, input
82: "+l);_e.apply(m,l[h])}return m},An=(l,m)=>Io(Ne(l,m)),Zo=(l,m)=>{for(let h=0,v=l.length;h<v;++h){const S=l[h];if(m(S,h)!==!0)return!1}return!0},ru=l=>{const m=sr.call(l,0);return m.reverse(),m},xt=(l,m)=>{const h={};for(let v=0,S=l.length;v<S;v++){const T=l[v];h[String(T)]=m(T,v)}return h},$t=(l,m)=>{const h=sr.call(l,0);return h.sort(m),h},wt=(l,m)=>m>=0&&m<l.length?X.some(l[m]):X.none(),Y=l=>wt(l,0),po=l=>wt(l,l.length-1),Ct=(l,m)=>{for(let h=0;h<l.length;h++){const v=m(l[h],h);if(v.isSome())return v}return X.none()},st=Object.keys,de=Object.hasOwnProperty,Je=(l,m)=>{const h=st(l);for(let v=0,S=h.length;v<S;v++){const T=h[v],B=l[T];m(B,T)}},We=(l,m)=>Vn(l,(h,v)=>({k:v,v:m(h,v)})),Vn=(l,m)=>{const h={};return Je(l,(v,S)=>{const T=m(v,S);h[T.k]=T.v}),h},Xo=l=>(m,h)=>{l[h]=m},gl=(l,m,h,v)=>{Je(l,(S,T)=>{(m(S,T)?h:v)(S,T)})},sx=(l,m)=>{const h={};return gl(l,m,Xo(h),ke),h},bi=(l,m)=>{const h=[];return Je(l,(v,S)=>{h.push(m(v,S))}),h},qo=l=>bi(l,mo),au=(l,m)=>is(l,m)?X.from(l[m]):X.none(),is=(l,m)=>de.call(l,m),hs=(l,m)=>is(l,m)&&l[m]!==void 0&&l[m]!==null,Zf=l=>{for(const m in l)if(de.call(l,m))return!1;return!0},Wi={generate:l=>{if(!hn(l))throw new Error("cases must be an array");if(l.length===0)throw new Error("there must be at least one case");const m=[],h={};return Et(l,(v,S)=>{const T=st(v);if(T.length!==1)throw new Error("one and only one name per case");const B=T[0],P=v[B];if(h[B]!==void 0)throw new Error("duplicate key detected:"+B);if(B==="cata")throw new Error("cannot have a case named cata (sorry)");if(!hn(P))throw new Error("case arguments must be an array");m.push(B),h[B]=(...z)=>{const G=z.length;if(G!==P.length)throw new Error("Wrong number of arguments to case "+B+". Expected "+P.length+" ("+P+"), got "+G);return{fold:(...Bt)=>{if(Bt.length!==l.length)throw new Error("Wrong number of arguments to fold. Expected "+l.length+", got "+Bt.length);return Bt[S].apply(null,z)},match:Bt=>{const Jt=st(Bt);if(m.length!==Jt.length)throw new Error("Wrong number of arguments to match. Expected: "+m.join(",")+` 83Actual: `+Jt.join(","));if(!Zo(m,Rt=>Fn(Jt,Rt)))throw new Error("Not all branches were specified when using match. Specified: "+Jt.join(", ")+` 84Required: `+m.join(", "));return Bt[B].apply(null,z)},log:Bt=>{console.log(Bt,{constructors:m,constructor:B,params:z})}}}}),h}},Vs=l=>{let m=l;return{get:()=>m,set:S=>{m=S}}},Ur=l=>l.slice(0).sort(),Wr=(l,m)=>{throw new Error("All required keys ("+Ur(l).join(", ")+") were not specified. Specified keys were: "+Ur(m).join(", ")+".")},iu=l=>{throw new Error("Unsupported keys for object: "+Ur(l).join(", "))},id=(l,m)=>{if(!hn(m))throw new Error("The "+l+" fields must be an array. Was: "+m+".");Et(m,h=>{if(!un(h))throw new Error("The value "+h+" in the "+l+" fields was not a string.")})},he=(l,m)=>{throw new Error("All values need to be of type: "+m+". Keys ("+Ur(l).join(", ")+") were not.")},nn=l=>{const m=Ur(l);F(m,(v,S)=>S<m.length-1&&v===m[S+1]).each(v=>{throw new Error("The field: "+v+" occurs more than once in the combined fields: ["+m.join(", ")+"].")})},Do=(l,m)=>rx(l,m,{validate:Da,label:"function"}),rx=(l,m,h)=>{if(m.length===0)throw new Error("You must specify at least one required field.");return id("required",m),nn(m),v=>{const S=st(v);Zo(m,P=>Fn(S,P))||Wr(m,S),l(m,S);const B=te(m,P=>!h.validate(v[P],P));return B.length>0&&he(B,h.label),v}},Zi=(l,m)=>{const h=te(m,v=>!Fn(l,v));h.length>0&&iu(h)},fe=l=>Do(Zi,l),jf=l=>{const m=T=>T(l),h=q(l),v=()=>S,S={tag:!0,inner:l,fold:(T,B)=>B(l),isValue:mt,isError:so,map:T=>cd.value(T(l)),mapError:v,bind:m,exists:m,forall:m,getOr:h,or:v,getOrThunk:h,orThunk:v,getOrDie:h,each:T=>{T(l)},toOptional:()=>X.some(l)};return S},X4=l=>{const m=()=>h,h={tag:!1,inner:l,fold:(v,S)=>v(l),isValue:so,isError:mt,map:m,mapError:v=>cd.error(v(l)),bind:m,exists:so,forall:mt,getOr:mo,or:mo,getOrThunk:Gn,orThunk:Gn,getOrDie:eo(String(l)),each:ke,toOptional:X.none};return h},cd={value:jf,error:X4,fromOption:(l,m)=>l.fold(()=>X4(m),jf)},cu=typeof window<"u"?window:Function("return this;")(),Ln=l=>{const m=l.replace(/\./g,"-");return{resolve:v=>m+"-"+v}},Xe=(l,m,h=Ja)=>l.exists(v=>h(v,m)),cs=l=>{const m=[],h=v=>{m.push(v)};for(let v=0;v<l.length;v++)l[v].each(h);return m},vC=(l,m)=>l!=null?m(l):X.none(),ax=(l,m)=>l?X.some(m):X.none(),lu=(l,m)=>{let h=m??cu;for(let v=0;v<l.length&&h!==void 0&&h!==null;++v)h=h[l[v]];return h},Te=(l,m)=>{const h=l.split(".");return lu(h,m)},xi=l=>{const m=Vs(X.none()),h=()=>m.get().each(l);return{clear:()=>{h(),m.set(X.none())},isSet:()=>m.get().isSome(),get:()=>m.get(),set:P=>{h(),m.set(X.some(P))}}},yg=()=>{const l=xi(ke);return{...l,on:h=>l.get().each(h)}},J4=(l,m)=>l.substring(m),ua=(l,m,h)=>m===""||l.length>=m.length&&l.substr(h,h+m.length)===m,tR=(l,m)=>ix(l,m)?J4(l,m.length):l,vi=(l,m,h=0,v)=>{const S=l.indexOf(m,h);return S!==-1?Xa(v)?!0:S+m.length<=v:!1},ix=(l,m)=>ua(l,m,0),Qh=(l,m)=>ua(l,m,l.length-m.length),lm=(l=>m=>m.replace(l,""))(/^\s+|\s+$/g),da=l=>l.length>0,yC=l=>{const m=parseFloat(l);return isNaN(m)?X.none():X.some(m)},CC=(l,m)=>{let h=null;const v=()=>{He(h)||(clearTimeout(h),h=null)};return{cancel:v,throttle:(...T)=>{v(),h=setTimeout(()=>{h=null,l.apply(null,T)},m)}}},ee=l=>{let m=!1,h;return(...v)=>(m||(m=!0,h=l.apply(null,v)),h)},wC="Â ",t1=["tfoot","thead","tbody","colgroup"],cx=l=>Fn(t1,l),kn=(l,m)=>({rows:l,columns:m}),e1=(l,m)=>({row:l,column:m}),ji=(l,m,h)=>({element:l,rowspan:m,colspan:h}),Us=(l,m,h,v)=>({element:l,rowspan:m,colspan:h,isNew:v}),um=(l,m,h,v,S,T)=>({element:l,rowspan:m,colspan:h,row:v,column:S,isLocked:T}),lx=(l,m,h)=>({element:l,cells:m,section:h}),Ec=(l,m,h,v)=>({element:l,cells:m,section:h,isNew:v}),Ra=(l,m,h)=>
84({element:l,isNew:m,isLocked:h}),uu=(l,m,h,v)=>({element:l,cells:m,section:h,isNew:v}),yi=(l,m,h,v)=>({startRow:l,startCol:m,finishRow:h,finishCol:v}),tk=(l,m,h)=>({element:l,colspan:m,column:h}),ek=(l,m)=>({element:l,columns:m}),Gi=(l,m,h)=>{const v=l.cells,S=v.slice(0,m),T=v.slice(m),B=S.concat(h).concat(T);return ux(l,B)},_C=(l,m,h)=>Gi(l,m,[h]),ld=(l,m,h)=>{const v=l.cells;v[m]=h},ux=(l,m)=>uu(l.element,m,l.section,l.isNew),Rs=(l,m)=>{const h=l.cells,v=Ne(h,m);return uu(l.element,v,l.section,l.isNew)},Ze=(l,m)=>l.cells[m],ma=(l,m)=>Ze(l,m).element,Qa=l=>l.cells.length,ns=l=>{const m=ps(l,h=>h.section==="colgroup");return{rows:m.fail,cols:m.pass}},dx=(l,m,h)=>{const v=Ne(l.cells,h);return uu(m(l.element),v,l.section,!0)},SC=(l,m)=>{const v=(m||document).createElement("div");if(v.innerHTML=l,!v.hasChildNodes()||v.childNodes.length>1){const S="HTML does not have a single root node";throw console.error(S,l),new Error(S)}return du(v.childNodes[0])},ls=(l,m)=>{const v=(m||document).createElement(l);return du(v)},qf=(l,m)=>{const v=(m||document).createTextNode(l);return du(v)},du=l=>{if(l==null)throw new Error("Node cannot be null or undefined");return{dom:l}}
84,oe={fromHtml:SC,fromTag:ls,fromText:qf,fromDom:du,fromPoint:(l,m,h)=>X.from(l.dom.elementFromPoint(m,h)).map(du)},Cg=(l,m)=>{const h=l.document.createRange();return h.selectNode(m.dom),h},Ci=(l,m)=>{const h=l.document.createRange();return Kf(h,m),h},Kf=(l,m)=>l.selectNodeContents(m.dom),Bs=(l,m)=>{m.fold(h=>{l.setStartBefore(h.dom)},(h,v)=>{l.setStart(h.dom,v)},h=>{l.setStartAfter(h.dom)})},ok=(l,m)=>{m.fold(h=>{l.setEndBefore(h.dom)},(h,v)=>{l.setEnd(h.dom,v)},h=>{l.setEndAfter(h.dom)})},mu=(l,m,h)=>{const v=l.document.createRange();return Bs(v,m),ok(v,h),v},fl=(l,m,h,v,S)=>{const T=l.document.createRange();return T.setStart(m.dom,h),T.setEnd(v.dom,S),T},EC=l=>({left:l.left,top:l.top,right:l.right,bottom:l.bottom,width:l.width,height:l.height}),AC=l=>{const m=l.getClientRects(),h=m.length>0?m[0]:l.getBoundingClientRect();return h.width>0||h.height>0?X.some(h).map(EC):X.none()},dm=Wi.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),TC=(l,m,h)=>m(oe.fromDom(h.startContainer),h.startOffset,oe.fromDom(h.endContainer),h.endOffset),o1=(l,m)=>m.match({domRange:h=>({ltr:q(h),rtl:X.none}),relative:(h,v)=>({ltr:ee(()=>mu(l,h,v)),rtl:ee(()=>X.some(mu(l,v,h)))}),exact:(h,v,S,T)=>({ltr:ee(()=>fl(l,h,v,S,T)),rtl:ee(()=>X.some(fl(l,S,T,h,v)))})}),mm=(l,m)=>{const h=m.ltr();return h.collapsed?m.rtl().filter(S=>S.collapsed===!1).map(S=>dm.rtl(oe.fromDom(S.endContainer),S.endOffset,oe.fromDom(S.startContainer),S.startOffset)).getOrThunk(()=>TC(l,dm.ltr,h)):TC(l,dm.ltr,h)},Yf=(l,m)=>{const h=o1(l,m);return mm(l,h)},Zt=(l,m)=>Yf(l,m).match({ltr:(v,S,T,B)=>{const P=l.document.createRange();return P.setStart(v.dom,S),P.setEnd(T.dom,B),P},rtl:(v,S,T,B)=>{const P=l.document.createRange();return P.setStart(T.dom,B),P.setEnd(v.dom,S),P}});dm.ltr,dm.rtl;const n1=8,mx=9,gu=11,s1=1,DC=3,wi=(l,m)=>{const h=l.dom;if(h.nodeType!==s1)return!1;{const v=h;if(v.matches!==void 0)return v.matches(m);
84if(v.msMatchesSelector!==void 0)return v.msMatchesSelector(m);if(v.webkitMatchesSelector!==void 0)return v.webkitMatchesSelector(m);if(v.mozMatchesSelector!==void 0)return v.mozMatchesSelector(m);throw new Error("Browser lacks native selectors")}},OC=l=>l.nodeType!==s1&&l.nodeType!==mx&&l.nodeType!==gu||l.childElementCount===0,wg=(l,m)=>{const h=m===void 0?document:m.dom;return OC(h)?[]:Ne(h.querySelectorAll(l),oe.fromDom)},Xf=(l,m)=>{const h=m===void 0?document:m.dom;return OC(h)?X.none():X.from(h.querySelector(l)).map(oe.fromDom)},bn=(l,m)=>l.dom===m.dom,gx=(l,m)=>{const h=l.dom,v=m.dom;return h===v?!1:h.contains(v)},RC=wi,BC=(l,m,h,v)=>{const S=l.isiOS()&&/ipad/i.test(h)===!0,T=l.isiOS()&&!S,B=l.isiOS()||l.isAndroid(),P=B||v("(pointer:coarse)"),z=S||!T&&B&&v("(min-device-width:768px)"),G=T||B&&!z,ot=m.isSafari()&&l.isiOS()&&/safari/i.test(h)===!1,Bt=!G&&!z&&!ot;return{isiPad:q(S),isiPhone:q(T),isTablet:q(z),isPhone:q(G),isTouch:q(P),isAndroid:l.isAndroid,isiOS:l.isiOS,isWebView:q(ot),isDesktop:q(Bt)}},FC=(l,m)=>{for(let h=0;h<l.length;h++){const v=l[h];if(v.test(m))return v}},r1=(l,m)=>{const h=FC(l,m);if(!h)return{major:0,minor:0};const v=S=>Number(m.replace(h,"$"+S));return ud(v(1),v(2))},Ac=(l,m)=>{const h=String(m).toLowerCase();return l.length===0?MC():r1(l,h)},MC=()=>ud(0,0),ud=(l,m)=>({major:l,minor:m}),gm={nu:ud,detect:Ac,unknown:MC},nk=(l,m)=>Ct(m.brands,h=>{const v=h.brand.toLowerCase();return F(l,S=>{var T;return v===((T=S.brand)==null?void 0:T.toLowerCase())}).map(S=>({current:S.name,version:gm.nu(parseInt(h.version,10),0)}))}),fx=(l,m)=>{const h=String(m).toLowerCase();return F(l,v=>v.search(h))},ln=(l,m)=>fx(l,m).map(h=>{const v=gm.detect(h.versionRegexes,m);return{current:h.name,version:v}}),a1=(l,m)=>fx(l,m).map(h=>{const v=gm.detect(h.versionRegexes,m);return{current:h.name,version:v}}),px=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,fu=l=>m=>vi(m,l),sk=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:l=>vi(l,"edge/")&&vi(l,"chrome")&&vi(l,"safari")&&vi(l,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,px],search:l=>vi(l,"chrome")&&!vi(l,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:l=>vi(l,"msie")||vi(l,"trident")},{name:"Opera",versionRegexes:[px,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:fu("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:fu("firefox")},{name:"Safari",versionRegexes:[px,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:l=>(vi(l,"safari")||vi(l,"mobile/"))&&vi(l,"applewebkit")}],NC=[{name:"Windows",search:fu("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:l=>vi(l,"iphone")||vi(l,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:fu("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:fu("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:fu("linux"),versionRegexes:[]},{name:"Solaris",search:fu("sunos"),versionRegexes:[]},{name:"FreeBSD",search:fu("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:fu("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],i1={browsers:q(sk),oses:q(NC)},hx="Edge",Jf="Chromium",rk="IE",PC="Opera",ak="Firefox",ik="Safari",bx=()=>pl({current:void 0,version:gm.unknown()}),pl=l=>{const m=l.current,h=l.version,v=S=>()=>m===S;return{current:m,version:h,isEdge:v(hx),isChromium:v(Jf),isIE:v(rk),isOpera:v(PC),isFirefox:v(ak),isSafari:v(ik)}},IC={unknown:bx,nu:pl},$C="Windows",xx="iOS",eR="Android",ck="Linux",lk="macOS",uk="Solaris",hl="FreeBSD",dk="ChromeOS",mk=()=>vx({current:void 0,version:gm.unknown()}),vx=l=>{const m=l.current,h=l.version,v=S=>()=>m===S;return{current:m,version:h,isWindows:v($C),isiOS:v(xx),isAndroid:v(eR),isMacOS:v(lk),isLinux:v(ck),isSolaris:v(uk),isFreeBSD:v(hl),isChromeOS:v(dk)}},yx={unknown:mk,nu:vx},gk={detect:(l,m,h)=>{const v=i1.browsers(),S=i1.oses(),T=m.bind(z=>nk(v,z)).orThunk(()=>ln(v,l)).fold(IC.unknown,IC.nu),B=a1(S,l).fold(yx.unknown,yx.nu),P=BC(B,T,l,h);return{browser:T,os:B,deviceType:P}}},Cx=l=>window.matchMedia(l).matches;let bl=ee(()=>gk.detect(window.navigator.userAgent,X.from(window.navigator.userAgentData),Cx));const Tc=()=>bl(),fm=(l,m)=>Te(l,m),fk=(l,m)=>{const h=fm(l,m);if(h==null)throw new Error(l+" not available on this browser");return h},Oo=Object.getPrototypeOf,pk=l=>fk("HTMLElement",l),wx=l=>{const m=Te("ownerDocument.defaultView",l);return $e(l)&&(pk(m).prototype.isPrototypeOf(l)||/^HTML\w*Element$/.test(Oo(l).constructor.name))},ss=l=>l.dom.nodeName.toLowerCase(),hk=l=>l.dom.nodeType,c1=l=>m=>hk(m)===l,bk=l=>hk(l)===n1||ss(l)==="#comment",_x=l=>Cr(l)&&wx(l.dom),Cr=c1(s1),_g=c1(DC),xk=c1(mx),Mt=c1(gu),ti=l=>m=>
84Cr(m)&&ss(m)===l,l1=l=>oe.fromDom(l.dom.ownerDocument),qi=l=>xk(l)?l:l1(l),Qf=l=>oe.fromDom(qi(l).dom.documentElement),Sx=l=>oe.fromDom(qi(l).dom.defaultView),Z=l=>X.from(l.dom.parentNode).map(oe.fromDom),Ba=l=>X.from(l.dom.parentElement).map(oe.fromDom),dd=(l,m)=>{const h=Da(m)?m:so;let v=l.dom;const S=[];for(;v.parentNode!==null&&v.parentNode!==void 0;){const T=v.parentNode,B=oe.fromDom(T);if(S.push(B),h(B)===!0)break;v=T}return S},kx=l=>X.from(l.dom.previousSibling).map(oe.fromDom),Sg=l=>X.from(l.dom.nextSibling).map(oe.fromDom),Mr=l=>Ne(l.dom.childNodes,oe.fromDom),Fa=(l,m)=>{const h=l.dom.childNodes;return X.from(h[m]).map(oe.fromDom)},Ex=l=>Fa(l,0),Ax=(l,m,h,v)=>{const T=l1(l).dom.createRange();return T.setStart(l.dom,m),T.setEnd(h.dom,v),T},tp=(l,m,h,v)=>{const S=Ax(l,m,h,v),T=bn(l,h)&&m===v;return S.collapsed&&!T},ga=l=>Mt(l)&&zs(l.dom.host),Tx=l=>oe.fromDom(l.dom.getRootNode()),xl=l=>ga(l)?l:oe.fromDom(qi(l).dom.body),ep=l=>{const m=Tx(l);return ga(m)?X.some(m):X.none()},Dx=l=>oe.fromDom(l.dom.host),ei=l=>{if(zs(l.target)){const m=oe.fromDom(l.target);if(Cr(m)&&Ox(m)&&l.composed&&l.composedPath){const h=l.composedPath();if(h)return Y(h)}}return X.from(l.target)},Ox=l=>zs(l.dom.shadowRoot),Dc=(l,m,h,v,S,T,B)=>({target:l,x:m,y:h,stop:v,prevent:S,kill:T,raw:B}),md=l=>{const m=oe.fromDom(ei(l).getOr(l.target)),h=()=>l.stopPropagation(),v=()=>l.preventDefault(),S=la(v,h);return Dc(m,l.clientX,l.clientY,h,v,S,l)},ho=(l,m)=>h=>{l(h)&&m(md(h))},_i=(l,m,h,v,S)=>{const T=ho(h,v);return l.dom.addEventListener(m,T,S),{unbind:lo(LC,l,m,T,S)}},u1=(l,m,h,v)=>_i(l,m,h,v,!1),LC=(l,m,h,v)=>{l.dom.removeEventListener(m,h,v)},oo=mt,pu=(l,m,h)=>u1(l,m,oo,h),ks=md,Oc=(l,m)=>{Z(l).each(v=>{v.dom.insertBefore(m.dom,l.dom)})},Rc=(l,m)=>{Sg(l).fold(()=>{Z(l).each(S=>{zo(S,m)})},v=>{Oc(v,m)})},Jn=(l,m)=>{Ex(l).fold(()=>{zo(l,m)},v=>{l.dom.insertBefore(m.dom,v.dom)})},zo=(l,m)=>{l.dom.appendChild(m.dom)},vk=(l,m,h)=>{Fa(l,h).fold(()=>{zo(l,m)},v=>{Oc(v,m)})},yk=(l,m)=>{Oc(l,m),zo(m,l)},vl=(l,m)=>{Et(m,(h,v)=>{const S=v===0?l:m[v-1];Rc(S,h)})},Ki=(l,m)=>{Et(m,h=>{zo(l,h)})},Bc=(l,m,h)=>{if(un(h)||ca(h)||$n(h))l.setAttribute(m,h+"");else throw console.error("Invalid call to Attribute.set. Key ",m,":: Value ",h,":: Element ",l),new Error("Attribute value was not simple")},Fs=(l,m,h)=>{Bc(l.dom,m,h)},hu=(l,m)=>{const h=l.dom;Je(m,(v,S)=>{Bc(h,S,v)})},oi=(l,m)=>{Je(m,(h,v)=>{h.fold(()=>{Vo(l,v)},S=>{Bc(l.dom,v,S)})})},Yi=(l,m)=>{const h=l.dom.getAttribute(m);return h===null?void 0:h},Si=(l,m)=>X.from(Yi(l,m)),Vo=(l,m)=>{l.dom.removeAttribute(m)},ki=l=>pt(l.dom.attributes,(m,h)=>(m[h.name]=h.value,m),{}),yl=l=>{l.dom.textContent="",Et(Mr(l),m=>{Nr(m)})},Nr=l=>{const m=l.dom;m.parentNode!==null&&m.parentNode.removeChild(m)},Js=l=>{const m=Mr(l);m.length>0&&vl(l,m),Nr(l)},Qn=(l,m)=>oe.fromDom(l.dom.cloneNode(m)),Xi=l=>Qn(l,!1),rr=l=>Qn(l,!0),Es=(l,m)=>{const h=oe.fromTag(m),v=ki(l);return hu(h,v),h},pm=(l,m)=>{const h=Es(l,m),v=Mr(rr(l));return Ki(h,v),h},HC=(l,m)=>{const h=Es(l,m);Rc(l,h);const v=Mr(l);return Ki(h,v),Nr(l),h},Rx=(l,m)=>{const v=document.createElement("div");return v.innerHTML=l,Mr(oe.fromDom(v))},ar=l=>Ne(l,oe.fromDom),Bx=l=>l.dom.innerHTML,zC=l=>{const m=oe.fromTag("div"),h=oe.fromDom(l.dom.cloneNode(!0));return zo(m,h),Bx(m)},hm=l=>l.style!==void 0&&Da(l.style.getPropertyValue),Ee=l=>{const m=_g(l)?l.dom.parentNode:l.dom;if(m==null||m.ownerDocument===null)return!1;const h=m.ownerDocument;return ep(oe.fromDom(m)).fold(()=>h.body.contains(m),Oa(Ee,Dx))},Fx=l=>{const m=l.dom.body;if(m==null)throw new Error("Body is not available yet");return oe.fromDom(m)},Ws=(l,m,h)=>{if(!un(h))throw console.error("Invalid call to CSS.set. Property ",m,":: Value ",h,":: Element ",l),new Error("CSS value must be a string: "+h);hm(l)&&l.style.setProperty(m,h)},ir=(l,m)=>{hm(l)&&l.style.removeProperty(m)},cr=(l,m,h)=>{const v=l.dom;Ws(v,m,h)},Tn=(l,m)=>{const h=l.dom;Je(m,(v,S)=>{Ws(h,S,v)})},bm=(l,m)=>{const h=l.dom,S=window.getComputedStyle(h).getPropertyValue(m);return S===""&&!Ee(l)?d1(h,m):S},d1=(l,m)=>hm(l)?l.style.getPropertyValue(m):"",Ji=(l,m)=>{const h=l.dom,v=d1(h,m);return X.from(v).filter(S=>S.length>0)},Fc=(l,m)=>{const h=l.dom;ir(h,m),Xe(Si(l,"style").map(lm),"")&&Vo(l,"style")},Mx=(l,m)=>{const h=l.dom,v=m.dom;hm(h)&&hm(v)&&(v.style.cssText=h.style.cssText)},m1=(l,m)=>{const h=(P,z)=>{if(!$n(z)&&!z.match(/^[0-9]+$/))throw new Error(l+".set accepts only positive integer values. Value was "+z);const G=P.dom;hm(G)&&(G.style[l]=z+"px")},v=P=>{const z=m(P);if(z<=0||z===null){const G=bm(P,l);return parseFloat(G)||0}return z},S=v,T=(P,z)=>pt(z,(G,ot)=>{const Bt=bm(P,ot),Jt=Bt===void 0?0:parseInt(Bt,10);return isNaN(Jt)?G:G+Jt},0);return{set:h,get:v,getOuter:S,aggregate:T,max:(P,z,G)=>{const ot=T(P,G);return z>ot?z-ot:0}}},g1=(l,m)=>yC(l).getOr(m),bu=(l,m,h)=>g1(bm(l,m),h),Mc=(l,m,h,v)=>{const S=bu(l,`padding-${h}`,0),T=bu(l,`padding-${v}`,0),B=bu(l,`border-${h}-width`,0),P=bu(l,`border-${v}-width`,0);return m-S-T-B-P},Ck=(l,m)=>{const h=l.dom,v=h.getBoundingClientRect().width||h.offsetWidth;return Mc(l,v,"left","right")},wr=l=>bu(l,"height",l.dom.offsetHeight),Nc=l=>bu(l,"width",l.dom.offsetWidth),Cl=l=>Ck(l),Ro=m1("height",l=>{const m=l.dom;return Ee(l)?m.getBoundingClientRect().height:m.offsetHeight}),ni=l=>Ro.get(l),VC=l=>Ro.getOuter(l),f1=wr,Ei=m1("width",l=>{const m=l.dom;return Ee(l)?m.getBoundingClientRect().width:m.offsetWidth}),Be=l=>Ei.get(l),qn=l=>Ei.getOuter(l),lr=Cl,Dn=Nc,Qi=(l,m)=>({left:l,top:m,translate:(v,S)=>Qi(l+v,m+S)}),Hn=Qi,As=l=>{const m=l.getBoundingClientRect();return Hn(m.left,m.top)},kg=(l,m)=>l!==void 0?l:m!==void 0?m:0,uo=l=>{const m=l.dom.ownerDocument,h=m.body,v=m.defaultView,S=m.documentElement;if(h===l.dom)return Hn(h.offsetLeft,h.offsetTop);const T=kg(v==null?void 0:v.pageYOffset,S.scrollTop),B=kg(v==null?void 0:v.pageXOffset,S.scrollLeft),P=kg(S.clientTop,h.clientTop),z=kg(S.clientLeft,h.clientLeft);return tc(l).translate(B-z,T-P)},tc=l=>{const m=l.dom,v=m.ownerDocument.body;return v===m?Hn(v.offsetLeft,v.offsetTop):Ee(l)?As(m):Hn(0,0)},xn=l=>{const m=l!==void 0?l.dom:document,h=m.body.scrollLeft||m.documentElement.scrollLeft,v=m.body.scrollTop||m.documentElement.scrollTop;return Hn(h,v)},Ai=(l,m,h)=>{const S=(h!==void 0?h.dom:document).defaultView;S&&S.scrollBy(l,m)},Pr=((l,m)=>{const h=T=>{if(!l(T))throw new Error("Can only get "+m+" value of a "+m+" node");return v(T).getOr("")},v=T=>l(T)?X.from(T.dom.nodeValue):X.none();return{get:h,getOption:v,set:(T,B)=>{if(!l(T))throw new Error("Can only set raw "+m+" value of a "+m+" node");T.dom.nodeValue=B}}})(_g,"text"),op=l=>Pr.get(l),UC=l=>Pr.getOption(l),np=(l,m)=>Pr.set(l,m),sp=(l,m)=>h=>xm(h)==="rtl"?m:l,xm=l=>bm(l,"direction")==="rtl"?"rtl":"ltr",Ir=(l,m)=>{const h=Yi(l,m);return h===void 0||h===""?[]:h.split(" ")},xu=(l,m,h)=>{const S=Ir(l,m).concat([h]);return Fs(l,m,S.join(" ")),!0},wk=(l,m,h)=>{const v=te(Ir(l,m),S=>S!==h);return v.length>0?Fs(l,m,v.join(" ")):Vo(l,m),!1};var vm=(l,m,h,v,S)=>l(h,v)?X.some(h):Da(S)&&S(h)?X.none():m(h,v,S);const Jo=(l,m,h)=>{let v=l.dom;const S=Da(h)?h:so;for(;v.parentNode;){v=v.parentNode;const T=oe.fromDom(v);if(m(T))return X.some(T);if(S(T))break}return X.none()},p1=(l,m,h)=>vm((S,T)=>T(S),Jo,l,m,h),h1=(l,m)=>{const h=S=>m(oe.fromDom(S));return F(l.dom.childNodes,h).map(oe.fromDom)},Ma=(l,m)=>{const h=v=>{for(let S=0;S<v.childNodes.length;S++){const T=oe.fromDom(v.childNodes[S]);if(m(T))return X.some(T);const B=h(v.childNodes[S]);if(B.isSome())return B}return X.none()};return h(l.dom)},Ti=(l,m,h)=>Jo(l,v=>wi(v,m),h),rs=(l,m)=>h1(l,h=>wi(h,m)),gd=(l,m)=>Xf(m,l),Ms=(l,m,h)=>vm((S,T)=>wi(S,T),Ti,l,m,h),Eg=l=>l.dom.classList!==void 0,b1=l=>Ir(l,"class"),Nx=(l,m)=>xu(l,"class",m),nR=(l,m)=>wk(l,"class",m),Pc=(l,m)=>{Eg(l)?l.dom.classList.add(m):Nx(l,m)},_k=l=>{(Eg(l)?l.dom.classList:b1(l)).length===0&&Vo(l,"class")},WC=(l,m)=>{Eg(l)?l.dom.classList.remove(m):nR(l,m),_k(l)},Ic=(l,m)=>Eg(l)&&l.dom.classList.contains(m),ZC=(l,m)=>{Et(m,h=>{WC(l,h)})},Ag=l=>Ms(l,"[contenteditable]"),rp=(l,m=!1)=>Ee(l)?l.dom.isContentEditable:Ag(l).fold(q(m),h=>ap(h)==="true"),ap=l=>l.dom.contentEditable,Px=l=>m=>{Pc(m,l)},jC=l=>m=>{ZC(m,l)},ec=(l,m,h)=>te(dd(l,h),m),Sk=(l,m)=>te(Mr(l),m),fd=(l,m)=>{let h=[];return Et(Mr(l),v=>{m(v)&&(h=h.concat([v])),h=h.concat(fd(v,m))}),h},Ko=(l,m,h)=>ec(l,v=>wi(v,m),h),$r=(l,m)=>Sk(l,h=>wi(h,m)),wl=(l,m)=>wg(m,l),Ix=(l,m,h,v)=>({parent:l,children:m,element:h,index:v}),pd=l=>Z(l).bind(m=>{const h=Mr(m);
84return $x(h,l).map(v=>Ix(m,h,l,v))}),$x=(l,m)=>Vr(l,lo(bn,m)),GC=(l,m,h)=>Jo(l,m,h).isSome(),_l=l=>ss(l)==="img"?1:UC(l).fold(()=>Mr(l).length,m=>m.length),Sl=l=>UC(l).filter(m=>m.trim().length!==0||m.indexOf(wC)>-1).isSome(),sn=l=>_x(l)&&Yi(l,"contenteditable")==="false",qC=["img","br"],Un=l=>Sl(l)||Fn(qC,ss(l))||sn(l),ip=l=>Ma(l,Un),bs=l=>kl(l,Un),kl=(l,m)=>{const h=v=>{const S=Mr(v);for(let T=S.length-1;T>=0;T--){const B=S[T];if(m(B))return X.some(B);const P=h(B);if(P.isSome())return P}return X.none()};return h(l)},vu={create:(l,m,h,v)=>({start:l,soffset:m,finish:h,foffset:v})},x1=Wi.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),KC=(l,m,h,v)=>l.fold(m,h,v),Lx=l=>l.fold(mo,mo,mo),kk=x1.before,si=x1.on,hd=x1.after,js={before:kk,on:si,after:hd,cata:KC,getStart:Lx},ur=Wi.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),v1=l=>ur.exact(l.start,l.soffset,l.finish,l.foffset),cp=l=>l.match({domRange:m=>oe.fromDom(m.startContainer),relative:(m,h)=>js.getStart(m),exact:(m,h,v,S)=>m}),YC=ur.domRange,XC=ur.relative,oc=ur.exact,sR=l=>{const m=cp(l);return Sx(m)},ym=vu.create,yu={domRange:YC,relative:XC,exact:oc,exactFromRange:v1,getWin:sR,range:ym},Ek=(l,m,h)=>{var v;return X.from((v=l.caretPositionFromPoint)==null?void 0:v.call(l,m,h)).bind(S=>{if(S.offsetNode===null)return X.none();const T=l.createRange();return T.setStart(S.offsetNode,S.offset),T.collapse(),X.some(T)})},y1=(l,m,h)=>{var v;return X.from((v=l.caretRangeFromPoint)==null?void 0:v.call(l,m,h))},Ak=(l,m,h)=>l.caretPositionFromPoint?Ek(l,m,h):l.caretRangeFromPoint?y1(l,m,h):X.none(),dr=(l,m,h)=>{const v=l.document;return Ak(v,m,h).map(S=>vu.create(oe.fromDom(S.startContainer),S.startOffset,oe.fromDom(S.endContainer),S.endOffset))},Tg=(l,m)=>{const h=ss(l);return h==="input"?js.after(l):Fn(["br","img"],h)?m===0?js.before(l):js.after(l):js.on(l,m)},Tk=(l,m)=>{const h=l.fold(js.before,Tg,js.after),v=m.fold(js.before,Tg,js.after);return yu.relative(h,v)},Dg=(l,m,h,v)=>{const S=Tg(l,m),T=Tg(h,v);return yu.relative(S,T)},C1=l=>X.from(l.getSelection()),JC=(l,m)=>{C1(l).each(h=>{h.removeAllRanges(),h.addRange(m)})},Hx=(l,m,h,v,S)=>{const T=fl(l,m,h,v,S);JC(l,T)},QC=(l,m,h,v,S,T)=>{m.collapse(h.dom,v),m.extend(S.dom,T)},tw=(l,m)=>Yf(l,m).match({ltr:(h,v,S,T)=>{Hx(l,h,v,S,T)},rtl:(h,v,S,T)=>{C1(l).each(B=>{if(B.setBaseAndExtent)B.setBaseAndExtent(h.dom,v,S.dom,T);else if(B.extend)try{QC(l,B,h,v,S,T)}catch{Hx(l,S,T,h,v)}else Hx(l,S,T,h,v)})}}),w1=(l,m,h,v,S)=>{const T=Dg(m,h,v,S);tw(l,T)},ew=(l,m,h)=>{const v=Tk(m,h);tw(l,v)},Og=l=>{if(l.rangeCount>0){const m=l.getRangeAt(0),h=l.getRangeAt(l.rangeCount-1);return X.some(vu.create(oe.fromDom(m.startContainer),m.startOffset,oe.fromDom(h.endContainer),h.endOffset))}else return X.none()},Dk=l=>{if(l.anchorNode===null||l.focusNode===null)return Og(l);{const m=oe.fromDom(l.anchorNode),h=oe.fromDom(l.focusNode);return tp(m,l.anchorOffset,h,l.focusOffset)?X.some(vu.create(m,l.anchorOffset,h,l.focusOffset)):Og(l)}},zx=(l,m,h=!0)=>{const S=(h?Ci:Cg)(l,m);JC(l,S)},Ok=l=>C1(l).filter(m=>m.rangeCount>0).bind(Dk),Rk=l=>Ok(l).map(m=>yu.exact(m.start,m.soffset,m.finish,m.foffset)),Vx=(l,m)=>{const h=Zt(l,m);return AC(h)},Ux=(l,m,h)=>dr(l,m,h),Bk=l=>{C1(l).each(m=>m.removeAllRanges())},Fk={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Mk=(()=>{const l="[0-9]+",h="[eE]"+("[+-]?"+l),v="\\.",S=P=>`(?:${P})?`,B=`[+-]?(?:${["Infinity",l+v+S(l)+S(h),v+l+S(h),l+S(h)].join("|")})`;return new RegExp(`^(${B})(.*)$`)})(),_1=(l,m)=>Ut(m,h=>Ut(Fk[h],v=>l===v)),Nk=(l,m)=>X.from(Mk.exec(l)).bind(v=>{const S=Number(v[1]),T=v[2];return _1(T,m)?X.some({value:S,unit:T}):X.none()}),nc=l=>Ne(l,q(0)),Rg=(l,m,h,v,S)=>S(l.slice(0,m)).concat(v).concat(S(l.slice(h))),S1=l=>(m,h,v,S)=>{if(l(v)){const T=Math.max(S,m[h]-Math.abs(v)),B=Math.abs(T-m[h]);return v>=0?B:-B}else return v},lp=S1(l=>l<0),Pk=S1(mt),Ik=()=>{const l=(P,z,G,ot,Bt)=>{const Jt=lp(P,z,ot,Bt);return Rg(P,z,G+1,[Jt,0],nc)},m=(P,z,G,ot)=>{const Bt=(100+G)/100,Jt=Math.max(ot,(P[z]+G)/Bt);return Ne(P,(Kt,Rt)=>(Rt===z?Jt:Kt/Bt)-Kt)},h=(P,z,G,ot,Bt,Jt)=>Jt?m(P,z,ot,Bt):l(P,z,G,ot,Bt);return{resizeTable:(P,z)=>P(z),clampTableDelta:lp,calcLeftEdgeDeltas:h,calcMiddleDeltas:(P,z,G,ot,Bt,Jt,Kt)=>h(P,G,ot,Bt,Jt,Kt),calcRightEdgeDeltas:(P,z,G,ot,Bt,Jt)=>{if(Jt)return m(P,G,ot,Bt);{const Kt=lp(P,G,ot,Bt);return nc(P.slice(0,G)).concat([Kt])}}
84,calcRedestributedWidths:(P,z,G,ot)=>{if(ot){const Jt=(z+G)/z,Kt=Ne(P,Rt=>Rt/Jt);return{delta:Jt*100-100,newSizes:Kt}}else return{delta:G,newSizes:P}}}},ow=()=>{const l=(B,P,z,G,ot)=>{const Bt=G>=0?z:P,Jt=Pk(B,Bt,G,ot);return Rg(B,P,z+1,[Jt,-Jt],nc)};return{resizeTable:(B,P,z)=>{z&&B(P)},clampTableDelta:(B,P,z,G,ot)=>{if(ot){if(z>=0)return z;{const Bt=pt(B,(Jt,Kt)=>Jt+Kt-G,0);return Math.max(-Bt,z)}}else return lp(B,P,z,G)},calcLeftEdgeDeltas:l,calcMiddleDeltas:(B,P,z,G,ot,Bt)=>l(B,z,G,ot,Bt),calcRightEdgeDeltas:(B,P,z,G,ot,Bt)=>{if(Bt)return nc(B);{const Jt=G/B.length;return Ne(B,q(Jt))}},calcRedestributedWidths:(B,P,z,G)=>({delta:0,newSizes:B})}},Cu=(l,m,h=0)=>Si(l,m).map(v=>parseInt(v,10)).getOr(h),up=(l,m)=>Cu(l,m,1),bd=l=>ti("col")(l)?Cu(l,"span",1)>1:up(l,"colspan")>1,$k=l=>up(l,"rowspan")>1,Ts=(l,m)=>parseInt(bm(l,m),10),xs=q(10),xd=q(10),wu=(l,m)=>Wx(l,m,mt),Wx=(l,m,h)=>An(Mr(l),v=>wi(v,m)?h(v)?[v]:[]:Wx(v,m,h)),Sr=(l,m,h=so)=>{if(h(m))return X.none();if(Fn(l,ss(m)))return X.some(m);const v=S=>wi(S,"table")||h(S);return Ti(m,l.join(","),v)},Zx=(l,m)=>Sr(["td","th"],l,m),vd=l=>wu(l,"th,td"),k1=l=>wi(l,"colgroup")?$r(l,"col"):An(Na(l),m=>$r(m,"col")),ri=(l,m)=>Ms(l,"table",m),jx=l=>wu(l,"tr"),Na=l=>ri(l).fold(q([]),m=>$r(m,"colgroup")),ts=ti("th"),E1=l=>Zo(l,m=>ts(m.element)),Bg=(l,m)=>l&&m?"sectionCells":l?"section":"cells",nw=l=>{const m=l.section==="thead",h=Xe(Gx(l.cells),"th");return l.section==="tfoot"?{type:"footer"}:m||h?{type:"header",subType:Bg(m,h)}:{type:"body"}},Gx=l=>{const m=te(l,h=>ts(h.element));return m.length===0?X.some("td"):m.length===l.length?X.some("th"):X.none()},sw=l=>{const m=Ne(l,S=>nw(S).type),h=Fn(m,"header"),v=Fn(m,"footer");if(!h&&!v)return X.some("body");{const S=Fn(m,"body");return h&&!S&&!v?X.some("header"):!h&&!S&&v?X.some("footer"):X.none()}},rw=l=>Ct(l.all,m=>{const h=nw(m);return h.type==="header"?X.from(h.subType):X.none()}),A1=(l,m)=>Ne(l,h=>{if(ss(h)==="colgroup"){const v=Ne(k1(h),S=>{const T=Cu(S,"span",1);return ji(S,1,T)});return lx(h,v,"colgroup")}else{const v=Ne(vd(h),S=>
84{const T=Cu(S,"rowspan",1),B=Cu(S,"colspan",1);return ji(S,T,B)});return lx(h,v,m(h))}}),Fg=l=>Z(l).map(m=>{const h=ss(m);return cx(h)?h:"tbody"}).getOr("tbody"),T1=l=>{const m=jx(l),v=[...Na(l),...m];return A1(v,Fg)},jt=(l,m)=>A1(l,()=>m),fa="data-snooker-locked-cols",Lk=l=>Si(l,fa).bind(m=>X.from(m.match(/\d+/g))).map(m=>xt(m,mt)),Zr=l=>{const m=pt(ns(l).rows,(v,S)=>(Et(S.cells,(T,B)=>{T.isLocked&&(v[B]=!0)}),v),{}),h=bi(m,(v,S)=>parseInt(S,10));return $t(h)},Di=(l,m)=>l+","+m,D1=(l,m,h)=>X.from(l.access[Di(m,h)]),Hk=(l,m,h)=>{const v=yd(l,S=>h(m,S.element));return v.length>0?X.some(v[0]):X.none()},yd=(l,m)=>{const h=An(l.all,v=>v.cells);return te(h,m)},zk=l=>{const m={};let h=0;return Et(l.cells,v=>{const S=v.colspan;Sn(S,T=>{const B=h+T;m[B]=tk(v.element,S,B)}),h+=S}),m},pa=l=>{const m={},h=[],S=Y(l).map(Kt=>Kt.element).bind(ri).bind(Lk).getOr({});let T=0,B=0,P=0;const{pass:z,fail:G}=ps(l,Kt=>Kt.section==="colgroup");Et(G,Kt=>{const Rt=[];Et(Kt.cells,Ht=>{let Dt=0;for(;m[Di(P,Dt)]!==void 0;)Dt++;const Se=hs(S,Dt.toString()),Ke=um(Ht.element,Ht.rowspan,Ht.colspan,P,Dt,Se);for(let ie=0;ie<Ht.colspan;ie++)for(let Lo=0;Lo<Ht.rowspan;Lo++){const Ve=P+Lo,Wo=Dt+ie,us=Di(Ve,Wo);m[us]=Ke,B=Math.max(B,Wo+1)}Rt.push(Ke)}),T++,h.push(lx(Kt.element,Rt,Kt.section)),P++});const{columns:ot,colgroups:Bt}=po(z).map(Kt=>{const Rt=zk(Kt);return{colgroups:[ek(Kt.element,qo(Rt))],columns:Rt}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:kn(T,B),access:m,all:h,columns:ot,colgroups:Bt}},to={fromTable:l=>{const m=T1(l);return pa(m)},generate:pa,getAt:D1,findItem:Hk,filterItems:yd,justCells:l=>An(l.all,m=>m.cells),justColumns:l=>qo(l.columns),hasColumns:l=>st(l.columns).length>0,getColumnAt:(l,m)=>X.from(l.columns[m])},_u=(l,m,h)=>Ra(h(l.element,m),!0,l.isLocked),Mg=(l,m)=>l.section!==m?uu(l.element,l.cells,m,l.isNew):l,Wn=()=>({transformRow:Mg,transformCell:(l,m,h)=>{const v=h(l.element,m),S=ss(v)!=="td"?HC(v,"td"):v;return Ra(S,l.isNew,l.isLocked)}}),Ri=()=>({transformRow:Mg,transformCell:_u}),dp=()=>({transformRow:(l,m)=>Mg(l,m==="thead"?"tbody":m),transformCell:_u}),Su={getTableSectionType:(l,m)=>{const h=to.fromTable(l);switch(rw(h).getOr(m)){case"section":return Wn();case"sectionCells":return Ri();case"cells":return dp()}},section:Wn,sectionCells:Ri,cells:dp,fallback:()=>({transformRow:mo,transformCell:_u})},Ng=(l,m=mt)=>{const h=l.grid,v=Sn(h.columns,mo),S=Sn(h.rows,mo);return Ne(v,T=>Kx(()=>An(S,G=>to.getAt(l,G,T).filter(ot=>ot.column===T).toArray()),G=>G.colspan===1&&m(G.element),()=>to.getAt(l,0,T)))},Kx=(l,m,h)=>{const v=l();return F(v,m).orThunk(()=>X.from(v[0]).orThunk(h)).map(B=>B.element)},Yx=l=>{const m=l.grid,h=Sn(m.rows,mo),v=Sn(m.columns,mo);return Ne(h,S=>Kx(()=>An(v,z=>to.getAt(l,S,z).filter(G=>G.row===S).fold(q([]),G=>[G])),z=>z.rowspan===1,()=>to.getAt(l,S,0)))},Bi=(l,m)=>{if(m<0||m>=l.length-1)return X.none();const h=l[m].fold(()=>{const S=ru(l.slice(0,m));return Ct(S,(T,B)=>T.map(P=>({value:P,delta:B+1})))},S=>X.some({value:S,delta:0})),v=l[m+1].fold(()=>{const S=l.slice(m+1);return Ct(S,(T,B)=>T.map(P=>({value:P,delta:B+1})))},S=>X.some({value:S,delta:1}));return h.bind(S=>v.map(T=>{const B=T.delta+S.delta;return Math.abs(T.value-S.value)/B}))},mp=(l,m)=>({row:l,y:m}),gp=(l,m)=>({col:l,x:m}),Vk=l=>uo(l).left+qn(l),Xx=l=>uo(l).left,fp=(l,m)=>gp(l,Xx(m)),Jx=(l,m)=>gp(l,Vk(m)),O1=l=>uo(l).top,Uk=(l,m)=>mp(l,O1(m)),Wk=(l,m)=>mp(l,O1(m)+VC(m)),Qx=(l,m,h)=>{if(h.length===0)return[];const v=Ne(h.slice(1),(T,B)=>T.map(P=>l(B,P))),S=h[h.length-1].map(T=>m(h.length-1,T));return v.concat([S])},Zk=l=>-l,pp={delta:mo,positions:l=>Qx(Uk,Wk,l),edge:O1},ve=sp({delta:mo,edge:Xx,positions:l=>Qx(fp,Jx,l)},{delta:Zk,edge:Vk,positions:l=>Qx(Jx,fp,l)}),es={delta:(l,m)=>ve(m).delta(l,m),positions:(l,m)=>ve(m).positions(l,m),edge:l=>ve(l).edge(l)},Pg=/(\d+(\.\d+)?)%/,iw=/(\d+(\.\d+)?)px|em/,Cm=ti("col"),Ig=ti("tr"),t2=(l,m,h)=>{const v=Ba(l).getOrThunk(()=>Fx(l1(l)));return m(l)/h(v)*100},wm=(l,m)=>{cr(l,"width",m+"px")},cw=(l,m)=>{cr(l,"width",m+"%")},El=(l,m)=>{cr(l,"height",m+"px")},lw=l=>{Fc(l,"height")},e2=l=>f1(l)+"px",zn=(l,m,h,v)=>{const S=ri(l).map(T=>{const B=h(T);return Math.floor(m/100*B)}).getOr(m);return v(l,S),S},Fi=(l,m,h,v)=>{const S=parseFloat(l);return Qh(l,"%")&&ss(m)!=="table"?zn(m,S,h,v):S},jr=l=>{const m=e2(l);return m?Fi(m,l,ni,El):ni(l)},$g=(l,m,h)=>{const v=h(l),S=up(l,m);return v/S},Gr=(l,m)=>Ji(l,m).orThunk(()=>Si(l,m).map(h=>h+"px")),_m=l=>Gr(l,"width"),Gs=l=>Gr(l,"height"),qr=l=>t2(l,Be,lr),R1=l=>Cm(l)?Math.round(Be(l)):Dn(l),At=l=>Ig(l)?ni(l):$g(l,"rowspan",jr),ha=l=>_m(l).bind(h=>Nk(h,["fixed","relative","empty"])),hp=(l,m,h)=>{cr(l,"width",m+h)},Kn=l=>Be(l)+"px",sc=l=>ni(l)+"px",$a=l=>t2(l,Be,lr)+"%",jk=l=>_m(l).exists(m=>Pg.test(m)),Al=l=>_m(l).exists(m=>iw.test(m)),uw=l=>_m(l).isNone(),ba=q(Pg),Uo=ti("col"),$c=l=>_m(l).getOrThunk(()=>R1(l)+"px"),Lg=l=>Gs(l).getOrThunk(()=>At(l)+"px"),Yn=l=>Ne(to.justColumns(l),m=>X.from(m.element)),o2=l=>{const m=Tc().browser,h=m.isChromium()||m.isFirefox();return Uo(l)?h:!0},n2=(l,m,h,v,S,T)=>l.filter(v).fold(()=>T(Bi(h,m)),B=>S(B)),rc=(l,m,h,v)=>{const S=Ng(l),T=to.hasColumns(l)?Yn(l):S,B=[X.some(es.edge(m))].concat(Ne(es.positions(S,m),z=>z.map(G=>G.x))),P=nt(bd);return Ne(T,(z,G)=>n2(z,G,B,P,ot=>{if(o2(ot))return h(ot);{const Bt=vC(S[G],mo);return n2(Bt,G,B,P,Jt=>v(X.some(Math.round(Be(Jt)))),v)}},v))},B1=l=>l.map(m=>m+"px").getOr(""),xa=(l,m)=>rc(l,m,$c,B1),Gk=(l,m,h)=>rc(l,m,qr,v=>v.fold(()=>h.minCellWidth(),S=>S/h.pixelWidth()*100)),at=(l,m,h)=>rc(l,m,R1,v=>v.getOrThunk(h.minCellWidth)),ai=(l,m,h,v)=>{const S=Yx(l),T=Ne(l.all,P=>X.some(P.element)),B=[X.some(pp.edge(m))].concat(Ne(pp.positions(S,m),P=>P.map(z=>z.y)));return Ne(T,(P,z)=>n2(P,z,B,mt,h,v))},bp=(l,m)=>ai(l,m,At,h=>h.getOrThunk(xd)),Zn=(l,m)=>ai(l,m,Lg,B1),Kr=(l,m)=>()=>Ee(l)?m(l):parseFloat(Ji(l,"width").getOr("0")),Ps=l=>{const m=Kr(l,Be),h=q(0);return{width:m,pixelWidth:m,getWidths:(S,T)=>at(S,l,T),getCellDelta:h,singleColumnWidth:q([0]),minCellWidth:h,setElementWidth:ke,adjustTableWidth:ke,isRelative:!0,label:"none"}},dn=l=>{const m=Kr(l,z=>parseFloat($a(z))),h=Kr(l,Be);return{width:m,pixelWidth:h,getWidths:(z,G)=>Gk(z,l,G),getCellDelta:z=>z/h()*100,singleColumnWidth:(z,G)=>[100-z],minCellWidth:()=>xs()/h()*100,setElementWidth:cw,adjustTableWidth:z=>{const G=m(),ot=z/100*G,Bt=G+ot;cw(l,Bt)},isRelative:!0,label:"percent"}},dw=l=>{const m=Kr(l,Be);return{width:m,pixelWidth:m,getWidths:(B,P)=>at(B,l,P),getCellDelta:mo,singleColumnWidth:(B,P)=>[Math.max(xs(),B+P)-B],minCellWidth:xs,setElementWidth:wm,adjustTableWidth:B=>{const P=m()+B;wm(l,P)},isRelative:!1,label:"pixel"}},Cd=(l,m)=>ba().exec(m)!==null?dn(l):dw(l),Hg={getTableSize:l=>_m(l).fold(()=>Ps(l),h=>Cd(l,h)),pixelSize:dw,percentageSize:dn,noneSize:Ps},xp=(l,m,h,v)=>{h===v?Vo(l,m):Fs(l,m,h)},s2=(l,m,h)=>{po($r(l,m)).fold(()=>Jn(l,h),v=>Rc(v,h))},r2=(l,m)=>{const h=rs(l,m).getOrThunk(()=>{const v=oe.fromTag(m,l1(l).dom);return m==="thead"?s2(l,"caption,colgroup",v):m==="colgroup"?s2(l,"caption",v):zo(l,v),v});return yl(h),h},_d=(l,m)=>{const h=[],v=[],S=Kt=>Ne(Kt,Rt=>{Rt.isNew&&h.push(Rt.element);const Ht=Rt.element;return yl(Ht),Et(Rt.cells,Dt=>{Dt.isNew&&v.push(Dt.element),xp(Dt.element,"colspan",Dt.colspan,1),xp(Dt.element,"rowspan",Dt.rowspan,1),zo(Ht,Dt.element)}),Ht}),T=Kt=>An(Kt,Rt=>Ne(Rt.cells,Ht=>(xp(Ht.element,"span",Ht.colspan,1),Ht.element))),B=(Kt,Rt)=>{const Ht=r2(l,Rt),Se=(Rt==="colgroup"?T:S)(Kt);Ki(Ht,Se)},P=Kt=>
84{rs(l,Kt).each(Nr)},z=(Kt,Rt)=>{Kt.length>0?B(Kt,Rt):P(Rt)},G=[],ot=[],Bt=[],Jt=[];return Et(m,Kt=>{switch(Kt.section){case"thead":G.push(Kt);break;case"tbody":ot.push(Kt);break;case"tfoot":Bt.push(Kt);break;case"colgroup":Jt.push(Kt);break}}),z(Jt,"colgroup"),z(G,"thead"),z(ot,"tbody"),z(Bt,"tfoot"),{newRows:h,newCells:v}},zg=l=>Ne(l,m=>{const h=Xi(m.element);return Et(m.cells,v=>{const S=rr(v.element);xp(S,"colspan",v.colspan,1),xp(S,"rowspan",v.rowspan,1),zo(h,S)}),h}),mw=(l,m)=>Ne(l,h=>Ze(h,m)),a2=(l,m)=>l[m],qk=(l,m)=>{if(l.length===0)return 0;const h=l[0];return Vr(l,S=>!m(h.element,S.element)).getOr(l.length)},kr=(l,m,h,v)=>{const S=a2(l,m),T=S.section==="colgroup",B=qk(S.cells.slice(h),v),P=T?1:qk(mw(l.slice(m),h),v);return{colspan:B,rowspan:P}},La=(l,m)=>{const h=Ne(l,S=>Ne(S.cells,so)),v=(S,T,B,P)=>{for(let z=S;z<S+B;z++)for(let G=T;G<T+P;G++)h[z][G]=!0};return Ne(l,(S,T)=>{const B=An(S.cells,(P,z)=>{if(h[T][z]===!1){const G=kr(l,T,z,m);return v(T,z,G.rowspan,G.colspan),[Us(P.element,G.rowspan,G.colspan,P.isNew)]}else return[]});return Ec(S.element,B,S.section,S.isNew)})},as=(l,m,h)=>{const v=[];Et(l.colgroups,S=>{const T=[];for(let B=0;B<l.grid.columns;B++){const P=to.getColumnAt(l,B).map(z=>Ra(z.element,h,!1)).getOrThunk(()=>Ra(m.colGap(),!0,!1));T.push(P)}v.push(uu(S.element,T,"colgroup",h))});for(let S=0;S<l.grid.rows;S++){const T=[];for(let z=0;z<l.grid.columns;z++){const G=to.getAt(l,S,z).map(ot=>Ra(ot.element,h,ot.isLocked)).getOrThunk(()=>Ra(m.gap(),!0,!1));T.push(G)}const B=l.all[S],P=uu(B.element,T,B.section,h);v.push(P)}return v},Sd=(l,m)=>as(l,m,!1),vp=l=>La(l,bn),va=(l,m)=>Ct(l.all,h=>F(h.cells,v=>bn(m,v.element))),Vg=(l,m,h)=>{const v=Ne(m.selection,T=>Zx(T).bind(B=>va(l,B)).filter(h)),S=cs(v);return ax(S.length>0,S)},Ds=(l,m,h,v,S,T,B,P,z)=>{const G=to.fromTable(T),ot=X.from(z==null?void 0:z.section).getOrThunk(Su.fallback);return m(G,B).map(Jt=>{const Kt=Sd(G,P),Rt=l(Kt,Jt,bn,S(P),ot),Ht=Zr(Rt.grid),Dt=vp(Rt.grid);return{info:Jt,grid:Dt,cursor:Rt.cursor,lockedColumns:Ht}}).bind(Jt=>{const Kt=_d(T,Jt.grid),Rt=X.from(z==null?void 0:z.sizing).getOrThunk(()=>Hg.getTableSize(T)),Ht=X.from(z==null?void 0:z.resize).getOrThunk(ow);return h(T,Jt.grid,Jt.info,{sizing:Rt,resize:Ht,section:ot}),v(T),Vo(T,fa),Jt.lockedColumns.length>0&&Fs(T,fa,Jt.lockedColumns.join(",")),X.some({cursor:Jt.cursor,newRows:Kt.newRows,newCells:Kt.newCells})})},F1=(l,m)=>Zx(m.element).bind(h=>va(l,h).map(v=>({...v,generators:m.generators,clipboard:m.clipboard}))),ii=(l,m)=>Vg(l,m,mt).map(h=>({cells:h,generators:m.generators,clipboard:m.clipboard})),ac=(l,m)=>m.mergable,i2=(l,m)=>m.unmergable,qs=(l,m)=>Vg(l,m,mt),Ug=(l,m)=>Vg(l,m,h=>!h.isLocked),Lc=(l,m)=>va(l,m).exists(h=>!h.isLocked),Sm=(l,m)=>Zo(m,h=>Lc(l,h)),km=(l,m)=>ac(l,m).filter(h=>Sm(l,h.cells)),Kk=(l,m)=>i2(l,m).filter(h=>Sm(l,h)),ku={...Wi.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},yp=(l,m)=>l.length===0?ku.none():l.length===1?ku.only(0):m===0?ku.left(0,1):m===l.length-1?ku.right(m-1,m):m>0&&m<l.length-1?ku.middle(m-1,m,m+1):ku.none(),mn=(l,m,h,v,S)=>{const T=l.slice(0),B=yp(l,m),P=q(Ne(T,q(0))),z=Jt=>v.singleColumnWidth(T[Jt],h),G=(Jt,Kt)=>S.calcLeftEdgeDeltas(T,Jt,Kt,h,v.minCellWidth(),v.isRelative),ot=(Jt,Kt,Rt)=>S.calcMiddleDeltas(T,Jt,Kt,Rt,h,v.minCellWidth(),v.isRelative),Bt=(Jt,Kt)=>S.calcRightEdgeDeltas(T,Jt,Kt,h,v.minCellWidth(),v.isRelative);return B.fold(P,z,G,ot,Bt)},gw=(l,m,h)=>{let v=0;for(let S=l;S<m;S++)v+=h[S]!==void 0?h[S]:0;return v},Eu=(l,m)=>{const h=to.justCells(l);return Ne(h,v=>{const S=gw(v.column,v.column+v.colspan,m);return{element:v.element,width:S,colspan:v.colspan}})},Wg=(l,m)=>{const h=to.justColumns(l);return Ne(h,(v,S)=>({element:v.element,width:m[S],colspan:v.colspan}))},N1=(l,m)=>Ne(l.all,(h,v)=>({element:h.element,height:m[v]})),Au=l=>Pe(l,(m,h)=>m+h,0),mr=(l,m)=>to.hasColumns(l)?Wg(l,m):Eu(l,m),Em=(l,m,h)=>{const v=mr(l,m);Et(v,S=>{h.setElementWidth(S.element,S.width)})},Zg=(l,m,h,v,S)=>{const T=to.fromTable(l),B=S.getCellDelta(m),P=S.getWidths(T,S),z=h===T.grid.columns-1,G=v.clampTableDelta(P,h,B,S.minCellWidth(),z),ot=mn(P,h,G,S,v),Bt=Ne(ot,(Jt,Kt)=>Jt+P[Kt]);Em(T,Bt,S),v.resizeTable(S.adjustTableWidth,G,z)},P1=(l,m,h)=>{const v=to.fromTable(l),S=bp(v,l),T=Ne(S,(z,G)=>h===G?Math.max(m+z,xd()):z),B=N1(v,T);Et(B,z=>{El(z.element,z.height)}),Et(to.justCells(v),z=>{lw(z.element)});const P=Au(T);El(l,P)},I1=(l,m,h,v,S)=>{const T=to.generate(m),B=v.getWidths(T,v),P=v.pixelWidth(),{newSizes:z,delta:G}=S.calcRedestributedWidths(B,P,h.pixelDelta,v.isRelative);Em(T,z,v),v.adjustTableWidth(G)},$1=(l,m,h,v)=>{const S=to.generate(m),T=v.getWidths(S,v);Em(S,T,v)},Cp=(l,m)=>{bd(l)||ha(l).each(v=>{const S=v.value/2;hp(l,S,v.unit),hp(m,S,v.unit)})},fw=(l,m,h)=>{const v=Cu(l,m,1);h===1||v<=1?Vo(l,m):Fs(l,m,Math.min(h,v))},c2=(l,m)=>h=>{const v=h.column+h.colspan-1,S=h.column;return v>=l&&S<m},l2=(l,m,h)=>
84{if(to.hasColumns(l)){const v=te(to.justColumns(l),c2(m,h)),S=Ne(v,B=>{const P=rr(B.element);return fw(P,"span",h-m),P}),T=oe.fromTag("colgroup");return Ki(T,S),[T]}else return[]},jg=(l,m,h)=>Ne(l.all,v=>{const S=te(v.cells,c2(m,h)),T=Ne(S,P=>{const z=rr(P.element);return fw(z,"colspan",h-m),z}),B=oe.fromTag("tr");return Ki(B,T),B}),Hc=(l,m)=>{const h=to.fromTable(l);return Ug(h,m).map(S=>{const T=S[S.length-1],B=S[0].column,P=T.column+T.colspan,z=l2(h,B,P),G=jg(h,B,P);return[...z,...G]})},Mi=(l,m,h)=>{const v=to.fromTable(l);return qs(v,m).bind(T=>{const B=as(v,h,!1),z=ns(B).rows.slice(T[0].row,T[T.length-1].row+T[T.length-1].rowspan),G=An(z,Bt=>{const Jt=te(Bt.cells,Kt=>!Kt.isLocked);return Jt.length>0?[{...Bt,cells:Jt}]:[]}),ot=vp(G);return ax(ot.length>0,ot)}).map(T=>zg(T))},Tu=(l,m,h,v,S,T)=>({minRow:l,minCol:m,maxRow:h,maxCol:v,allCells:S,selectedCells:T}),pw=(l,m)=>{const h=l.grid.columns;let S=l.grid.rows,T=h,B=0,P=0;const z=[],G=[];return Je(l.access,ot=>{if(z.push(ot),m(ot)){G.push(ot);const Bt=ot.row,Jt=Bt+ot.rowspan-1,Kt=ot.column,Rt=Kt+ot.colspan-1;Bt<S?S=Bt:Jt>B&&(B=Jt),Kt<T?T=Kt:Rt>P&&(P=Rt)}}),Tu(S,T,B,P,z,G)},L1=(l,m,h)=>{const v=l[h].element,S=oe.fromTag("td");zo(S,oe.fromTag("br")),(m?zo:Jn)(v,S)},u2=(l,m,h,v)=>{const S=te(l,P=>P.section!=="colgroup"),T=m.grid.columns,B=m.grid.rows;for(let P=0;P<B;P++){let z=!1;for(let G=0;G<T;G++)P<h.minRow||P>h.maxRow||G<h.minCol||G>h.maxCol||(to.getAt(m,P,G).filter(v).isNone()?L1(S,z,P):z=!0)}},hw=(l,m,h,v)=>{Je(h.columns,B=>{(B.column<m.minCol||B.column>m.maxCol)&&Nr(B.element)});const S=te(wu(l,"tr"),B=>B.dom.childElementCount===0);Et(S,Nr),(m.minCol===m.maxCol||m.minRow===m.maxRow)&&Et(wu(l,"th,td"),B=>{Vo(B,"rowspan"),Vo(B,"colspan")}),Vo(l,fa),Vo(l,"data-snooker-col-series"),Hg.getTableSize(l).adjustTableWidth(v)},d2=(l,m,h,v)=>{if(v.minCol===0&&m.grid.columns===v.maxCol+1)return 0;const S=at(m,l,h),T=pt(S,(G,ot)=>G+ot,0),z=pt(S.slice(v.minCol,v.maxCol+1),(G,ot)=>G+ot,0)/T*h.pixelWidth()-h.pixelWidth();return h.getCellDelta(z)},H1=(l,m)=>{const h=Jt=>wi(Jt.element,m),v=rr(l),S=T1(v),T=Hg.getTableSize(l),B=to.generate(S),P=pw(B,h),z="th:not("+m+"),td:not("+m+")",G=Wx(v,"th,td",Jt=>wi(Jt,z));Et(G,Nr),u2(S,B,P,h);const ot=to.fromTable(l),Bt=d2(l,ot,T,P);return hw(v,P,B,Bt),v},z1=ti("col"),V1=ti("colgroup"),zc=l=>ss(l)==="tr"||V1(l),wp=l=>{const m=Cu(l,"colspan",1),h=Cu(l,"rowspan",1);return{element:l,colspan:m,rowspan:h}},Gg=(l,m=wp)=>{const h=P=>z1(P.element)?l.col(P):l.cell(P),v=P=>V1(P.element)?l.colgroup(P):l.row(P),S=P=>{if(zc(P))return v({element:P});{const z=P,G=h(m(z));return T=X.some({item:z,replacement:G}),G}};let T=X.none();return{getOrInit:(P,z)=>T.fold(()=>S(P),G=>z(P,G.item)?G.replacement:S(P))}},Am=l=>m=>{const h=[],v=(B,P)=>F(h,z=>P(z.item,B)),S=B=>{const P=l==="td"?{scope:null}:{},z=m.replace(B,l,P);return h.push({item:B,sub:z}),z};return{replaceOrInit:(B,P)=>{if(zc(B)||z1(B))return B;{const z=B;return v(z,P).fold(()=>S(z),G=>P(B,G.item)?G.sub:S(z))}}}},bw=l=>Si(l,"scope").map(m=>m.substr(0,3)),Yr={modification:Gg,transform:Am,merging:l=>({unmerge:v=>{const S=bw(v);return S.each(T=>Fs(v,"scope",T)),()=>{const T=l.cell({element:v,colspan:1,rowspan:1});return Fc(T,"width"),Fc(v,"width"),S.each(B=>Fs(T,"scope",B)),T}},merge:v=>{const S=()=>{const T=cs(Ne(v,bw));if(T.length===0)return X.none();{const B=T[0],P=["row","col"];return Ut(T,G=>G!==B&&Fn(P,G))?X.none():X.from(B)}};return Fc(v[0],"width"),S().fold(()=>Vo(v[0],"scope"),T=>Fs(v[0],"scope",T+"group")),q(v[0])}})},Yk=(l,m)=>{const h=l.slice(0,m[m.length-1].row+1),v=vp(h);return An(v,S=>{const T=S.cells.slice(0,m[m.length-1].column+1);return Ne(T,B=>B.element)})},m2=(l,m)=>{const h=l.slice(m[0].row+m[0].rowspan-1,l.length),v=vp(h);return An(v,S=>{const T=S.cells.slice(m[0].column+m[0].colspan-1,S.cells.length);return Ne(T,B=>B.element)})},g2=(l,m,h)=>{const v=to.fromTable(l);return qs(v,m).map(T=>{const B=as(v,h,!1),{rows:P}=ns(B),z=Yk(P,T),G=m2(P,T);return{upOrLeftCells:z,downOrRightCells:G}})},vw={only:(l,m)=>{const h=xk(l)?Qf(l):l;return{parent:q(h),view:q(l),dragContainer:q(h),origin:q(Hn(0,0)),isResizable:m}},detached:(l,m,h)=>{const v=()=>uo(m);return{parent:q(m),view:q(l),dragContainer:q(m),origin:v,isResizable:h}},body:(l,m)=>({parent:q(l),view:q(l),dragContainer:q(l),origin:()=>uo(l),isResizable:m})},_p=Wi.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),f2=(l,m,h)=>{const v=h.substring(0,h.length-l.length),S=parseFloat(v);return v===S.toString()?m(S):_p.invalid(h)},vo={..._p,from:l=>Qh(l,"%")?f2("%",_p.percent,l):Qh(l,"px")?f2("px",_p.pixels,l):_p.invalid(l)},W1=(l,m)=>Ne(l,h=>vo.from(h).fold(()=>h,S=>S/m*100+"%",S=>S+"%")),ko=(l,m,h)=>{const v=h/m;return Ne(l,S=>vo.from(S).fold(()=>S,B=>B*v+"px",B=>B/100*h+"px"))},Ha=(l,m)=>{const h=l.fold(()=>q(""),v=>{const S=v/m;return q(S+"px")},()=>{const v=100/m;return q(v+"%")});return Sn(m,h)},kd=(l,m,h)=>l.fold(()=>m,v=>ko(m,h,v),v=>W1(m,h)),Sp=(l,m,h)=>{const v=vo.from(h),S=Zo(l,T=>T==="0px")?Ha(v,l.length):kd(v,l,m);return Xk(S)},$o=(l,m)=>l.length===0?m:Pe(l,(h,v)=>vo.from(v).fold(q(0),mo,mo)+h,0),Cw=(l,m)=>{const h=Math.floor(l);return{value:h+m,remainder:l-h}},ww=(l,m)=>vo.from(l).fold(q(l),h=>h+m+"px",h=>h+m+"%"),Xk=l=>{if(l.length===0)return l;const m=Pe(l,(v,S)=>{const T=vo.from(S).fold(()=>({value:S,remainder:0}),B=>Cw(B,"px"),B=>({value:B+"%",remainder:0}));return{output:[T.value].concat(v.output),remainder:v.remainder+T.remainder}},{output:[],remainder:0}),h=m.output;return h.slice(0,h.length-1).concat([ww(h[h.length-1],Math.round(m.remainder))])},Dm=vo.from,kp=(l,m,h)=>{Et(m,v=>{const S=l.slice(v.column,v.colspan+v.column),T=$o(S,xs());cr(v.element,"width",T+h)})},_w=(l,m,h)=>{Et(m,(v,S)=>{const T=$o([l[S]],xs());cr(v.element,"width",T+h)})},Jk=(l,m,h)=>{Et(h,v=>{Fc(v.element,"height")}),Et(m,(v,S)=>{cr(v.element,"height",l[S])})},Qk=l=>Dm(l).fold(q("px"),q("px"),q("%")),Sw=(l,m,h)=>{const v=to.fromTable(l),S=v.all,T=to.justCells(v),B=to.justColumns(v);m.each(P=>{const z=Qk(P),G=Be(l),ot=xa(v,l),Bt=Sp(ot,G,P);to.hasColumns(v)?_w(Bt,B,z):kp(Bt,T,z),cr(l,"width",P)}),h.each(P=>{const z=ni(l),G=Zn(v,l),ot=Sp(G,z,P);Jk(ot,S,T),cr(l,"height",P)})},kw=jk,tE=Al,eE=uw;var Om=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],za=()=>{const l=G=>oe.fromDom(G.dom.cloneNode(!1)),m=G=>qi(G).dom,h=G=>Cr(G)?ss(G)==="body"?!0:Fn(Om,ss(G)):!1,v=G=>
84Cr(G)?Fn(["br","img","hr","input"],ss(G)):!1,S=G=>Cr(G)&&Yi(G,"contenteditable")==="false",T=(G,ot)=>G.dom.compareDocumentPosition(ot.dom),B=(G,ot)=>{const Bt=ki(G);hu(ot,Bt)},P=G=>{const ot=ss(G);return Fn(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],ot)},z=G=>Cr(G)?Si(G,"lang"):X.none();return{up:q({selector:Ti,closest:Ms,predicate:Jo,all:dd}),down:q({selector:wl,predicate:fd}),styles:q({get:bm,getRaw:Ji,set:cr,remove:Fc}),attrs:q({get:Yi,set:Fs,remove:Vo,copyTo:B}),insert:q({before:Oc,after:Rc,afterAll:vl,append:zo,appendAll:Ki,prepend:Jn,wrap:yk}),remove:q({unwrap:Js,remove:Nr}),create:q({nu:oe.fromTag,clone:l,text:oe.fromText}),query:q({comparePosition:T,prevSibling:kx,nextSibling:Sg}),property:q({children:Mr,name:ss,parent:Z,document:m,isText:_g,isComment:bk,isElement:Cr,isSpecial:P,getLanguage:z,getText:op,setText:np,isBoundary:h,isEmptyTag:v,isNonEditable:S}),eq:bn,is:RC}};const Is=(l,m)=>({item:l,mode:m}),Ed=(l,m,h,v=ic)=>l.property().parent(m).map(S=>Is(S,v)),ic=(l,m,h,v=Tl)=>h.sibling(l,m).map(S=>Is(S,v)),Tl=(l,m,h,v=Tl)=>{const S=l.property().children(m);return h.first(S).map(B=>Is(B,v))},Kg=[{current:Ed,next:ic,fallback:X.none()},{current:ic,next:Tl,fallback:X.some(Ed)},{current:Tl,next:Tl,fallback:X.some(ic)}],Yg=(l,m,h,v,S=Kg)=>F(S,B=>B.current===h).bind(B=>B.current(l,m,v,B.next).orThunk(()=>B.fallback.bind(P=>Yg(l,m,P,v)))),j1={left:()=>({sibling:(h,v)=>h.query().prevSibling(v),first:h=>h.length>0?X.some(h[h.length-1]):X.none()}),right:()=>({sibling:(h,v)=>h.query().nextSibling(v),first:h=>h.length>0?X.some(h[0]):X.none()})},p2=(l,m,h,v,S,T)=>Yg(l,m,v,S).bind(P=>T(P.item)?X.none():h(P.item)?X.some(P.item):p2(l,P.item,h,P.mode,S,T)),h2=(l,m,h,v)=>p2(l,m,h,ic,j1.left(),v),Ep=(l,m,h,v)=>p2(l,m,h,ic,j1.right(),v),Du=(l,m)=>({element:l,offset:m}),G1=(l,m,h)=>l.property().isText(m)&&l.property().getText(m).trim().length===0||l.property().isComment(m)?h(m).bind(v=>G1(l,v,h).orThunk(()=>X.some(v))):X.none(),Ap=(l,m)=>l.property().isText(m)?l.property().getText(m).length:l.property().children(m).length,q1=(l,m)=>{const h=G1(l,m,l.query().prevSibling).getOr(m);
84if(l.property().isText(h))return Du(h,Ap(l,h));const v=l.property().children(h);return v.length>0?q1(l,v[v.length-1]):Du(h,Ap(l,h))},Ew=q1,Dl=za(),K1=l=>Ew(Dl,l),Aw=l=>m=>l.property().children(m).length===0,nE=(l,m,h)=>Tw(l,m,Aw(l),h),sE=(l,m,h)=>b2(l,m,Aw(l),h),Tw=h2,b2=Ep,Ol=za(),Dw=(l,m)=>nE(Ol,l,m),cc=(l,m)=>sE(Ol,l,m),Lr=(l,m,h)=>Tw(Ol,l,m,h),Ni=(l,m,h)=>b2(Ol,l,m,h),Xr=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Y1=(l,m)=>{const h=l.property().name(m);return Fn(["ol","ul"],h)},Rm=(l,m)=>{const h=l.property().name(m);return Fn(Xr,h)},X1=(l,m)=>Fn(["br","img","hr","input"],l.property().name(m)),x2=(l,m,h,v)=>{const S=h[0],T=h.slice(1);return v(l,m,S,T)},rE=(l,m,h)=>h.length>0?x2(l,m,h,Ad):X.none(),Ad=(l,m,h,v)=>{const S=m(l,h);return Pe(v,(T,B)=>{const P=m(l,B);return Td(l,T,P)},S)},Td=(l,m,h)=>m.bind(v=>h.filter(lo(l.eq,v))),v2=(l,m)=>lo(l.eq,m),$s=(l,m,h,v=so)=>{const S=[m].concat(l.up().all(m)),T=[h].concat(l.up().all(h)),B=ot=>Vr(ot,v).fold(()=>ot,Jt=>ot.slice(0,Jt+1)),P=B(S),z=B(T),G=F(P,ot=>Ut(z,v2(l,ot)));return{firstpath:P,secondpath:z,shared:G}},Tp=rE,ya=$s,J1=za(),rn=(l,m)=>Tp(J1,(h,v)=>l(v),m),Vc=(l,m,h)=>ya(J1,l,m,h),Ou=za(),Uc=l=>Rm(Ou,l),ci=l=>Y1(Ou,l),Q1=l=>X1(Ou,l),Ow=l=>{const m=ti("br"),h=z=>Zo(z,G=>m(G)||_g(G)&&op(G).trim().length===0),v=z=>ss(z)==="li"||Jo(z,ci).isSome(),S=z=>Sg(z).map(G=>Uc(G)?!0:Q1(G)?ss(G)!=="img":!1).getOr(!1),T=z=>bs(z).bind(G=>{const ot=S(G);return Z(G).map(Bt=>ot===!0||v(Bt)||m(G)||Uc(Bt)&&!bn(z,Bt)?[]:[oe.fromTag("br")])}).getOr([]),P=(()=>{const z=An(l,G=>{const ot=Mr(G);return h(ot)?[]:ot.concat(T(G))});return z.length===0?[oe.fromTag("br")]:z})();yl(l[0]),Ki(l[0],P)},Ru=l=>{Vo(l,"width"),Vo(l,"height")},Bm=l=>{const m=$a(l);Sw(l,X.some(m),X.none()),Ru(l)},y2=l=>{const m=Kn(l);Sw(l,X.some(m),X.none()),Ru(l)},Va=l=>{const m=sc(l);Sw(l,X.none(),X.some(m)),Ru(l)},Dd=l=>{Fc(l,"width");const m=k1(l),h=m.length>0?m:vd(l);Et(h,v=>{Fc(v,"width"),Ru(v)}),Ru(l)},gr={scope:["row","col"]},lc=l=>()=>{const m=oe.fromTag("td",l.dom);return zo(m,oe.fromTag("br",l.dom)),m},t0=l=>()=>oe.fromTag("col",l.dom),Fm=l=>()=>oe.fromTag("colgroup",l.dom),Od=l=>()=>oe.fromTag("tr",l.dom),Dp=(l,m,h)=>{const v=pm(l,m);return Je(h,(S,T)=>{S===null?Vo(v,T):Fs(v,T,S)}),v},C2=l=>l,e0=(l,m,h)=>ip(l).map(S=>{const T=h.join(","),B=Ko(S,T,P=>bn(P,l));return Pe(B,(P,z)=>{const G=Xi(z);return zo(P,G),G},m)}).getOr(m),Mm=(l,m)=>{Je(gr,(h,v)=>Si(l,v).filter(S=>Fn(h,S)).each(S=>Fs(m,v,S)))},Rd=(l,m,h)=>{const v=(B,P)=>{Mx(B.element,P),Fc(P,"height"),B.colspan!==1&&Fc(P,"width")},S=B=>{const P=oe.fromTag(ss(B.element),m.dom),z=h.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),G=z.length>0?e0(B.element,P,z):P;return zo(G,oe.fromTag("br")),v(B,P),Mm(B.element,P),l(B.element,P),P};return{col:B=>{const P=oe.fromTag(ss(B.element),m.dom);return v(B,P),l(B.element,P),P},colgroup:Fm(m),row:Od(m),cell:S,replace:Dp,colGap:t0(m),gap:lc(m)}},w2=l=>({col:t0(l),colgroup:Fm(l),row:Od(l),cell:lc(l),replace:C2,colGap:t0(l),gap:lc(l)}),Op=l=>to.fromTable(l).grid,_2=(l,m,h,v)=>{const S=ns(l).rows;if(S.length===0)return l;for(let T=m.startRow;T<=m.finishRow;T++)for(let B=m.startCol;B<=m.finishCol;B++){const P=S[T],z=Ze(P,B).isLocked;ld(P,B,Ra(v(),!1,z))}return l},Rw=(l,m,h,v)=>{const S=ns(l).rows;let T=!0;for(let B=0;B<S.length;B++)for(let P=0;P<Qa(S[0]);P++){const z=S[B],G=Ze(z,P),ot=G.element,Bt=h(ot,m);Bt&&!T?ld(z,P,Ra(v(),!0,G.isLocked)):Bt&&(T=!1)}return l},Ls=(l,m)=>pt(l,(h,v)=>Ut(h,S=>m(S.element,v.element))?h:h.concat([v]),[]),Bd=(l,m,h,v)=>(m>0&&m<l[0].cells.length&&Et(l,S=>{const T=S.cells[m-1];let B=0;const P=v();for(;S.cells.length>m+B&&h(T.element,S.cells[m+B].element);)ld(S,m+B,Ra(P,!0,S.cells[m+B].isLocked)),B++}),l),Fd=(l,m,h,v)=>{const S=ns(l).rows;if(m>0&&m<S.length){const T=S[m-1].cells,B=Ls(T,h);Et(B,P=>{let z=X.none();for(let G=m;G<S.length;G++)for(let ot=0;ot<Qa(S[0]);ot++){const Bt=S[G],Jt=Ze(Bt,ot);h(Jt.element,P.element)&&(z.isNone()&&(z=X.some(v())),z.each(Rt=>{ld(Bt,ot,Ra(Rt,!0,Jt.isLocked))}))}})}return l},Bw=(l,m,h)=>
84{if(l.row>=m.length||l.column>Qa(m[0]))return cd.error("invalid start address out of table bounds, row: "+l.row+", column: "+l.column);const v=m.slice(l.row),S=v[0].cells.slice(l.column),T=Qa(h[0]),B=h.length;return cd.value({rowDelta:v.length-B,colDelta:S.length-T})},o0=(l,m)=>{const h=Qa(l[0]),v=Qa(m[0]);return{rowDelta:0,colDelta:h-v}},S2=(l,m)=>{const h=l.length,v=m.length;return{rowDelta:h-v,colDelta:0}},Rp=(l,m,h,v)=>{const S=m.section==="colgroup"?h.col:h.cell;return Sn(l,T=>Ra(S(),!0,v(T)))},n0=(l,m,h,v)=>{const S=l[l.length-1];return l.concat(Sn(m,()=>{const T=S.section==="colgroup"?h.colgroup:h.row,B=dx(S,T,mo),P=Rp(B.cells.length,B,h,z=>is(v,z.toString()));return ux(B,P)}))},Fw=(l,m,h,v)=>Ne(l,S=>{const T=Rp(m,S,h,so);return Gi(S,v,T)}),aE=(l,m,h)=>Ne(l,v=>pt(h,(S,T)=>{const B=Rp(1,v,m,mt)[0];return _C(S,T,B)},v)),Bp=(l,m,h)=>{const v=m.colDelta<0?Fw:mo,S=m.rowDelta<0?n0:mo,T=Zr(l),B=Qa(l[0]),P=Ut(T,ot=>ot===B-1),z=v(l,Math.abs(m.colDelta),h,P?B-1:B),G=Zr(z);return S(z,Math.abs(m.rowDelta),h,xt(G,mt))},Os=(l,m,h,v)=>{const S=Ze(l[m],h),T=lo(v,S.element),B=l[m];return l.length>1&&Qa(B)>1&&(h>0&&T(ma(B,h-1))||h<B.cells.length-1&&T(ma(B,h+1))||m>0&&T(ma(l[m-1],h))||m<l.length-1&&T(ma(l[m+1],h)))},vs=(l,m,h,v,S,T)=>{const B=l.row,P=l.column,z=h.length,G=Qa(h[0]),ot=B+z,Bt=P+G+T.length,Jt=xt(T,mt);for(let Kt=B;Kt<ot;Kt++){let Rt=0;for(let Ht=P;Ht<Bt;Ht++){if(Jt[Ht]){Rt++;continue}Os(m,Kt,Ht,S)&&Rw(m,ma(m[Kt],Ht),S,v.cell);const Dt=Ht-P-Rt,Se=Ze(h[Kt-B],Dt),Ke=Se.element,ie=v.replace(Ke);ld(m[Kt],Ht,Ra(ie,!0,Se.isLocked))}}return m},fr=(l,m,h)=>{const v=Qa(m[0]),S=ns(m).cols.length+l.row,T=Sn(v-l.column,P=>P+l.column),B=F(T,P=>Zo(h,z=>z!==P)).getOr(v-1);return{row:S,column:B}},Qs=(l,m,h)=>te(h,v=>v>=l.column&&v<=Qa(m[0])+l.column),Mn=(l,m,h,v,S)=>{const T=Zr(m),B=fr(l,m,T),P=ns(h).rows,z=Qs(B,P,T);return Bw(B,m,P).map(ot=>{const Bt={...ot,colDelta:ot.colDelta-z.length},Jt=Bp(m,Bt,v),Kt=Zr(Jt),Rt=Qs(B,P,Kt);return vs(B,Jt,P,v,S,Rt)})},ys=(l,m,h,v,S)=>{Bd(m,l,S,v.cell);const T=S2(h,m),B=Bp(h,T,v),P=S2(m,B),z=Bp(m,P,v);return Ne(z,(G,ot)=>Gi(G,l,B[ot].cells))},Xg=(l,m,h,v,S)=>{Fd(m,l,S,v.cell);const T=Zr(m),B=o0(m,h),P={...B,colDelta:B.colDelta-T.length},z=Bp(m,P,v),{cols:G,rows:ot}=ns(z),Bt=Zr(z),Jt=o0(h,m),Kt={...Jt,colDelta:Jt.colDelta+Bt.length},Rt=aE(h,v,Bt),Ht=Bp(Rt,Kt,v);return[...G,...ot.slice(0,l),...Ht,...ot.slice(l,ot.length)]},k2=(l,m,h,v)=>dx(l,S=>v(S,h),m),E2=(l,m,h,v,S)=>{const{rows:T,cols:B}=ns(l),P=T.slice(0,m),z=T.slice(m),G=k2(T[h],(ot,Bt)=>m>0&&m<T.length&&v(ma(T[m-1],Bt),ma(T[m],Bt))?Ze(T[m],Bt):Ra(S(ot.element,v),!0,ot.isLocked),v,S);return[...B,...P,G,...z]},Mw=(l,m,h,v,S,T,B)=>{if(h==="colgroup"||!v){const P=Ze(l,S);return Ra(B(P.element,T),!0,!1)}else return Ze(l,m)},s0=(l,m,h,v,S)=>Ne(l,T=>{const B=m>0&&m<Qa(T)&&v(ma(T,m-1),ma(T,m)),P=Mw(T,m,T.section,B,h,v,S);return _C(T,m,P)}),A2=(l,m)=>An(l,h=>{const v=h.cells,S=Pe(m,(T,B)=>B>=0&&B<T.length?T.slice(0,B).concat(T.slice(B+1)):T,v);return S.length>0?[uu(h.element,S,h.section,h.isNew)]:[]}),T2=(l,m,h)=>{const{rows:v,cols:S}=ns(l);return[...S,...v.slice(0,m),...v.slice(h+1)]},r0=(l,m,h,v)=>ma(l[m],h)!==void 0&&m>0&&v(ma(l[m-1],h),ma(l[m],h)),D2=(l,m,h)=>m>0&&h(ma(l,m-1),ma(l,m)),Jg=(l,m,h,v)=>r0(l,m,h,v)||D2(l[m],h,v),Nw=(l,m)=>Zo(m,mo)&&E1(l.cells)?mt:(v,S,T)=>!(ss(v.element)==="th"&&m[T]),Fp=(l,m)=>Zo(m,mo)&&E1(l)?mt:(v,S,T)=>!(ss(v.element)==="th"&&m[S]),Wc=(l,m,h,v)=>{const S=B=>B==="row"?$k(m):bd(m),T=B=>S(B)?`${B}group`:B;return l?ts(m)?T(h):null:v&&ts(m)?T(h==="row"?"col":"row"):null},a0=(l,m)=>(h,v,S)=>X.some(Wc(l,h.element,"col",m[S])),Mp=(l,m)=>(h,v)=>X.some(Wc(l,h.element,"row",m[v])),Qg=(l,m,h)=>Ra(h(l.element,m),!0,l.isLocked),Nm=(l,m,h,v,S,T,B)=>{const P=z=>Ut(m,G=>h(z.element,G.element));return Ne(l,(z,G)=>Rs(z,(ot,Bt)=>{if(P(ot)){const Jt=B(ot,G,Bt)?S(ot,h,v):ot;return T(Jt,G,Bt).each(Kt=>{oi(Jt.element,{scope:X.from(Kt)})}),Jt}else return ot}))},Np=(l,m,h)=>An(l,(v,S)=>Jg(l,S,m,h)?[]:[Ze(v,m)]),i0=(l,m,h)=>{const v=l[m];return An(v.cells,(S,T)=>Jg(l,m,T,h)?[]:[S])},Pp=(l,m,h,v,S)=>{const T=ns(l).rows,B=An(m,ot=>Np(T,ot,v)),P=Ne(T,ot=>E1(ot.cells)),z=Fp(B,P),G=Mp(h,P);return Nm(l,B,v,S,Qg,G,z)},c0=(l,m,h,v,S,T,B)=>{const{cols:P,rows:z}=ns(l),G=z[m[0]],ot=An(m,Dt=>i0(z,Dt,S)),Bt=Ne(G.cells,(Dt,Se)=>E1(Np(z,Se,S))),Jt=[...z];Et(m,Dt=>{Jt[Dt]=B.transformRow(z[Dt],h)});const Kt=[...P,...Jt],Rt=Nw(G,Bt),Ht=a0(v,Bt);return Nm(Kt,ot,S,T,B.transformCell,Ht,Rt)},Pm=(l,m,h,v)=>{const S=ns(l).rows,T=Ne(m,B=>Ze(S[B.row],B.column));return Nm(l,T,h,v,Qg,X.none,mt)}
84,Jr=l=>pt(l,(h,v)=>Ut(h,T=>T.column===v.column)?h:h.concat([v]),[]).sort((h,v)=>h.column-v.column),Er=l=>rp(l,!0),tf=l=>{vd(l).length===0&&Nr(l)},gt=(l,m)=>({grid:l,cursor:m}),Ip=l=>Ct(l,m=>Ct(m.cells,h=>{const v=h.element;return ax(Er(v),v)})),iE=(l,m,h)=>{var S,T;const v=ns(l).rows;return X.from((T=(S=v[m])==null?void 0:S.cells[h])==null?void 0:T.element).filter(Er).orThunk(()=>Ip(v))},Qr=(l,m,h)=>{const v=iE(l,m,h);return gt(l,v)},ef=l=>pt(l,(h,v)=>Ut(h,T=>T.row===v.row)?h:h.concat([v]),[]).sort((h,v)=>h.row-v.row),Zc=(l,m,h,v)=>{const S=m[0].row,T=ef(m),B=Pe(T,(P,z)=>({grid:E2(P.grid,S,z.row+P.delta,h,v.getOrInit),delta:P.delta+1}),{grid:l,delta:0}).grid;return Qr(B,S,m[0].column)},O2=(l,m,h,v)=>{const S=ef(m),T=S[S.length-1],B=T.row+T.rowspan,P=Pe(S,(z,G)=>E2(z,B,G.row,h,v.getOrInit),l);return Qr(P,B,m[0].column)},R2=(l,m,h,v)=>{const S=m.details,T=Jr(S),B=T[0].column,P=Pe(T,(z,G)=>({grid:s0(z.grid,B,G.column+z.delta,h,v.getOrInit),delta:z.delta+1}),{grid:l,delta:0}).grid;return Qr(P,S[0].row,B)},Im=(l,m,h,v)=>{const S=m.details,T=S[S.length-1],B=T.column+T.colspan,P=Jr(S),z=Pe(P,(G,ot)=>s0(G,B,ot.column,h,v.getOrInit),l);return Qr(z,S[0].row,B)},$p=(l,m,h,v)=>{const S=Jr(m),T=Ne(S,P=>P.column),B=Pp(l,T,!0,h,v.replaceOrInit);return Qr(B,m[0].row,m[0].column)},Bu=(l,m,h,v)=>{const S=Pm(l,m,h,v.replaceOrInit);return Qr(S,m[0].row,m[0].column)},l0=(l,m,h,v)=>{const S=Jr(m),T=Ne(S,P=>P.column),B=Pp(l,T,!1,h,v.replaceOrInit);return Qr(B,m[0].row,m[0].column)},cE=(l,m,h,v)=>{const S=Pm(l,m,h,v.replaceOrInit);return Qr(S,m[0].row,m[0].column)},Ar=(l,m)=>(h,v,S,T,B)=>{const P=ef(v),z=Ne(P,ot=>ot.row),G=c0(h,z,l,m,S,T.replaceOrInit,B);return Qr(G,v[0].row,v[0].column)},jc=Ar("thead",!0),Ua=Ar("tbody",!1),lE=Ar("tfoot",!1),of=(l,m,h,v)=>{const S=Jr(m.details),T=A2(l,Ne(S,P=>P.column)),B=T.length>0?T[0].cells.length-1:0;return Qr(T,S[0].row,Math.min(S[0].column,B))},Pw=(l,m,h,v)=>{const S=ef(m),T=T2(l,S[0].row,S[S.length-1].row),B=Math.max(ns(T).rows.length-1,0);return Qr(T,Math.min(m[0].row,B),m[0].column)},u0=(l,m,h,v)=>{const S=m.cells;Ow(S);const T=_2(l,m.bounds,h,v.merge(S));return gt(T,X.from(S[0]))},uE=(l,m,h,v)=>{const T=Pe(m,(B,P)=>Rw(B,P,h,v.unmerge(P)),l);return gt(T,X.from(m[0]))},Iw=(l,m,h,v)=>{const T=((z,G)=>{const ot=to.fromTable(z);return as(ot,G,!0)})(m.clipboard,m.generators),B=e1(m.row,m.column);return Mn(B,l,T,m.generators,h).fold(()=>gt(l,X.some(m.element)),z=>Qr(z,m.row,m.column))},no=(l,m,h)=>{const v=jt(l,h.section),S=to.generate(v);return as(S,m,!0)},be=(l,m,h,v)=>{const S=ns(l).rows,T=m.cells[0].column,B=S[m.cells[0].row],P=no(m.clipboard,m.generators,B),z=ys(T,l,P,m.generators,h);return Qr(z,m.cells[0].row,m.cells[0].column)},nf=(l,m,h,v)=>{const S=ns(l).rows,T=m.cells[m.cells.length-1].column+m.cells[m.cells.length-1].colspan,B=S[m.cells[0].row],P=no(m.clipboard,m.generators,B),z=ys(T,l,P,m.generators,h);return Qr(z,m.cells[0].row,T)},d0=(l,m,h,v)=>{const S=ns(l).rows,T=m.cells[0].row,B=S[T],P=no(m.clipboard,m.generators,B),z=Xg(T,l,P,m.generators,h);return Qr(z,m.cells[0].row,m.cells[0].column)},m0=(l,m,h,v)=>{const S=ns(l).rows,T=m.cells[m.cells.length-1].row+m.cells[m.cells.length-1].rowspan,B=S[m.cells[0].row],P=no(m.clipboard,m.generators,B),z=Xg(T,l,P,m.generators,h);return Qr(z,T,m.cells[0].column)},dE=(l,m)=>{const h=to.fromTable(l);return qs(h,m).bind(S=>{const T=S[S.length-1],B=S[0].column,P=T.column+T.colspan,z=Io(Ne(h.all,G=>te(G.cells,ot=>ot.column>=B&&ot.column<P)));return Gx(z)}).getOr("")},B2=(l,m)=>{const h=to.fromTable(l);return qs(h,m).bind(Gx).getOr("")},Rn=(l,m)=>{const h=to.fromTable(l);return qs(h,m).bind(S=>{const T=S[S.length-1],B=S[0].row,P=T.row+T.rowspan,z=h.all.slice(B,P);return sw(z)}).getOr("")},g0=(l,m,h,v)=>$1(l,m,h,v.sizing),f0=(l,m,h,v)=>I1(l,m,h,v.sizing,v.resize),F2=(l,m)=>Ut(m,h=>h.column===0&&h.isLocked),vt=(l,m)=>Ut(m,h=>h.column+h.colspan>=l.grid.columns&&h.isLocked),sf=(l,m)=>{const h=Ng(l),v=Jr(m);return pt(v,(S,T)=>{const P=h[T.column].map(qn).getOr(0);return S+P},0)},$m=l=>(m,h)=>qs(m,h).filter(v=>!(l?F2:vt)(m,v)).map(v=>({details:v,pixelDelta:sf(m,v)})),Rl=(l,m)=>Ug(l,m).map(h=>({details:h,pixelDelta:-sf(l,h)})),uc=l=>(m,h)=>ii(m,h).filter(v=>!(l?F2:vt)(m,v.cells)),Bl=Yr.transform("th"),rf=Yr.transform("td"),Lm=(l,m,h,v)=>Ds(Zc,qs,ke,ke,Yr.modification,l,m,h,v),mE=(l,m,h,v)=>Ds(O2,qs,ke,ke,Yr.modification,l,m,h,v),af=(l,m,h,v)=>Ds(R2,$m(!0),f0,ke,Yr.modification,l,m,h,v),vn=(l,m,h,v)=>Ds(Im,$m(!1),f0,ke,Yr.modification,l,m,h,v),dc=(l,m,h,v)=>Ds(of,Rl,f0,tf,Yr.modification,l,m,h,v),M2=(l,m,h,v)=>Ds(Pw,qs,ke,tf,Yr.modification,l,m,h,v),Md=(l,m,h,v)=>Ds($p,Ug,ke,ke,Bl,l,m,h,v),Gc=(l,m,h,v)=>Ds(l0,Ug,ke,ke,rf,l,m,h,v),Tr=(l,m,h,v)=>Ds(jc,qs,ke,ke,Bl,l,m,h,v),$w=(l,m,h,v)=>Ds(Ua,qs,ke,ke,rf,l,m,h,v),N2=(l,m,h,v)=>Ds(lE,qs,ke,ke,rf,l,m,h,v),Lw=(l,m,h,v)=>Ds(Bu,Ug,ke,ke,Bl,l,m,h,v),gE=(l,m,h,v)=>Ds(cE,Ug,ke,ke,rf,l,m,h,v),fE=(l,m,h,v)=>Ds(u0,km,g0,ke,Yr.merging,l,m,h,v),P2=(l,m,h,v)=>Ds(uE,Kk,g0,ke,Yr.merging,l,m,h,v),Hw=(l,m,h,v)=>Ds(Iw,F1,g0,ke,Yr.modification,l,m,h,v),Pt=(l,m,h,v)=>Ds(be,uc(!0),ke,ke,Yr.modification,l,m,h,v),I2=(l,m,h,v)=>Ds(nf,uc(!1),ke,ke,Yr.modification,l,m,h,v),tr=(l,m,h,v)=>Ds(d0,ii,ke,ke,Yr.modification,l,m,h,v),$2=(l,m,h,v)=>Ds(m0,ii,ke,ke,Yr.modification,l,m,h,v),L2=dE,H2=B2,pE=Rn,Me=(l,m)=>{const h=m.column,v=m.column+m.colspan-1,S=m.row,T=m.row+m.rowspan-1;return h<=l.finishCol&&v>=l.startCol&&S<=l.finishRow&&T>=l.startRow},zw=(l,m)=>m.column>=l.startCol&&m.column+m.colspan-1<=l.finishCol&&m.row>=l.startRow&&m.row+m.rowspan-1<=l.finishRow,Vw=(l,m)=>{let h=!0;const v=lo(zw,m);for(let S=m.startRow;S<=m.finishRow;S++)for(let T=m.startCol;T<=m.finishCol;T++)h=h&&to.getAt(l,S,T).exists(v);return h?X.some(m):X.none()},hE=(l,m)=>yi(Math.min(l.row,m.row),Math.min(l.column,m.column),Math.max(l.row+l.rowspan-1,m.row+m.rowspan-1),Math.max(l.column+l.colspan-1,m.column+m.colspan-1)),bE=(l,m,h)=>{const v=to.findItem(l,m,bn),S=to.findItem(l,h,bn);return v.bind(T=>S.map(B=>hE(T,B)))},Uw=(l,m,h)=>bE(l,m,h).bind(v=>Vw(l,v)),CL=(l,m,h,v)=>to.findItem(l,m,bn).bind(S=>{const T=h>0?S.row+S.rowspan-1:S.row,B=v>0?S.column+S.colspan-1:S.column;return to.getAt(l,T+h,B+v).map(z=>z.element)}),aR=(l,m,h)=>bE(l,m,h).map(v=>{const S=to.filterItems(l,lo(Me,v));return Ne(S,T=>T.element)}),Ww=(l,m)=>{const h=(v,S)=>gx(S,v);return to.findItem(l,m,h).map(v=>v.element)},xE=(l,m,h)=>ri(l).bind(v=>{const S=Pi(v);return CL(S,l,m,h)}),Ie=(l,m,h)=>{const v=Pi(l);return aR(v,m,h)},z2=(l,m,h,v,S)=>{const T=Pi(l),B=bn(l,h)?X.some(m):Ww(T,m),P=bn(l,S)?X.some(v):Ww(T,v);return B.bind(z=>P.bind(G=>aR(T,z,G)))},Fu=(l,m,h)=>{const v=Pi(l);return Uw(v,m,h)},Pi=to.fromTable,p0={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},ta=()=>
84oe.fromTag("th"),cf=()=>oe.fromTag("td"),Lp=()=>oe.fromTag("col"),h0=(l,m,h,v)=>{const S=oe.fromTag("tr");for(let T=0;T<l;T++){const B=v<m||T<h?ta():cf();T<h&&Fs(B,"scope","row"),v<m&&Fs(B,"scope","col"),zo(B,oe.fromTag("br")),zo(S,B)}return S},lf=l=>{const m=oe.fromTag("colgroup");return Sn(l,()=>zo(m,Lp())),m},uf=(l,m,h,v)=>Sn(l,S=>h0(m,h,v,S)),Fl=(l,m,h,v,S,T=p0)=>{const B=oe.fromTag("table"),P=S!=="cells";Tn(B,T.styles),hu(B,T.attributes),T.colGroups&&zo(B,lf(m));const z=Math.min(l,h);if(P&&h>0){const Kt=oe.fromTag("thead");zo(B,Kt);const Ht=uf(h,m,S==="sectionCells"?z:0,v);Ki(Kt,Ht)}const G=oe.fromTag("tbody");zo(B,G);const ot=P?l-z:l,Jt=uf(ot,m,P?0:h,v);return Ki(G,Jt),B},Cs=l=>{let m=[];return{bind:T=>{if(T===void 0)throw new Error("Event bind error: undefined handler");m.push(T)},unbind:T=>{m=te(m,B=>B!==T)},trigger:(...T)=>{const B={};Et(l,(P,z)=>{B[P]=T[z]}),Et(m,P=>{P(B)})}}},Mu=l=>{const m=We(l,v=>({bind:v.bind,unbind:v.unbind})),h=We(l,v=>v.trigger);return{registry:m,trigger:h}},Zw=fe(["compare","extract","mutate","sink"]),V2=fe(["element","start","stop","destroy"]),jw=fe(["forceDrop","drop","move","delayDrop"]),vE=()=>{let l=X.none();const m=()=>{l=X.none()},h=(T,B)=>{const P=l.map(z=>T.compare(z,B));return l=X.some(B),P},v=(T,B)=>{B.extract(T).each(z=>{h(B,z).each(ot=>{S.trigger.move(ot)})})},S=Mu({move:Cs(["info"])});return{onEvent:v,reset:m,events:S.registry}},yo=()=>{const l=Mu({move:Cs(["info"])});return{onEvent:ke,reset:ke,events:l.registry}},mc=()=>{const l=yo(),m=vE();let h=l;return{on:()=>{h.reset(),h=m},off:()=>{h.reset(),h=l},isOn:()=>h===m,onEvent:(P,z)=>{h.onEvent(P,z)},events:m.events}},Nd=(l,m,h)=>{let v=!1;const S=Mu({start:Cs([]),stop:Cs([])}),T=mc(),B=()=>{Rt.stop(),T.isOn()&&(T.off(),S.trigger.stop())},P=CC(B,200),z=Dt=>{Rt.start(Dt),T.on(),S.trigger.start()},G=Dt=>{P.cancel(),T.onEvent(Dt,m)};T.events.move.bind(Dt=>{m.mutate(l,Dt.info)});const ot=()=>{v=!0},Bt=()=>{v=!1},Jt=()=>v,Kt=Dt=>(...Se)=>{v&&Dt.apply(null,Se)},Rt=m.sink(jw({forceDrop:B,drop:Kt(B),move:Kt(G),delayDrop:Kt(P.throttle)}),h),Ht=()=>{Rt.destroy()};return{element:Rt.element,go:z,on:ot,off:Bt,isActive:Jt,destroy:Ht,events:S.registry}},df=Ln("ephox-dragster").resolve,wo=l=>{const m={layerClass:df("blocker"),...l},h=oe.fromTag("div");return Fs(h,"role","presentation"),Fs(h,"data-mce-bogus","all"),Tn(h,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Pc(h,df("blocker")),Pc(h,m.layerClass),{element:q(h),destroy:()=>{Nr(h)}}};var Hp=Zw({compare:(l,m)=>Hn(m.left-l.left,m.top-l.top),extract:l=>X.some(Hn(l.x,l.y)),sink:(l,m)=>{const h=wo(m),v=pu(h.element(),"mousedown",l.forceDrop),S=pu(h.element(),"mouseup",l.drop),T=pu(h.element(),"mousemove",l.move),B=pu(h.element(),"mouseout",l.delayDrop),P=()=>{h.destroy(),S.unbind(),T.unbind(),B.unbind(),v.unbind()},z=ot=>{zo(ot,h.element())},G=()=>{Nr(h.element())};return V2({element:h.element,start:z,stop:G,destroy:P})},mutate:(l,m)=>{l.mutate(m.left,m.top)}});const wE=(l,m={})=>{const h=m.mode??Hp;return Nd(l,h,m)},zp=Ln("ephox-snooker").resolve,SE=()=>{const l=Mu({drag:Cs(["xDelta","yDelta"])});return{mutate:(h,v)=>{l.trigger.drag(h,v)},events:l.registry}},Vp=()=>{const l=Mu({drag:Cs(["xDelta","yDelta","target"])});let m=X.none();const h=SE();return h.events.drag.bind(T=>{m.each(B=>{l.trigger.drag(T.xDelta,T.yDelta,B)})}),{assign:T=>{m=X.some(T)},get:()=>m,mutate:h.mutate,events:l.registry}},Gw=(l,m,h,v,S)=>{const T=oe.fromTag("div");return Tn(T,{position:"absolute",left:m-v/2+"px",top:h+"px",height:S+"px",width:v+"px"}),hu(T,{"data-mce-bogus":"all","data-column":l,role:"presentation"}),T},kE=(l,m,h,v,S)=>{const T=oe.fromTag("div");return Tn(T,{position:"absolute",left:m+"px",top:h-S/2+"px",height:S+"px",width:v+"px"}),hu(T,{"data-mce-bogus":"all","data-row":l,role:"presentation"}),T},b0=zp("resizer-bar"),U2=zp("resizer-rows"),W2=zp("resizer-cols"),qw=7,EE=(l,m)=>An(l.all,(h,v)=>m(h.element)?[v]:[]),Kw=(l,m)=>{const h=[];return Sn(l.grid.columns,v=>{to.getColumnAt(l,v).map(T=>T.element).forall(m)&&h.push(v)}),te(h,v=>{const S=to.filterItems(l,T=>T.column===v);return Zo(S,T=>m(T.element))})},Z2=l=>{const m=wl(l.parent(),"."+b0);Et(m,Nr)},Yw=(l,m,h)=>{const v=l.origin();Et(m,S=>{S.each(T=>{const B=h(v,T);Pc(B,b0),zo(l.parent(),B)})})},Bo=(l,m,h,v)=>{Yw(l,m,(S,T)=>{const B=Gw(T.col,T.x-S.left,h.top-S.top,qw,v);return Pc(B,W2),B})},Xw=(l,m,h,v)=>{Yw(l,m,(S,T)=>{const B=kE(T.row,h.left-S.left,T.y-S.top,v,qw);return Pc(B,U2),B})},j2=(l,m,h,v,S)=>{const T=uo(h),B=m.isResizable,P=v.length>0?pp.positions(v,h):[],z=P.length>0?EE(l,B):[],G=te(P,(Kt,Rt)=>Ut(z,Ht=>Rt===Ht));Xw(m,G,T,qn(h));const ot=S.length>0?es.positions(S,h):[],Bt=ot.length>0?Kw(l,B):[],Jt=te(ot,(Kt,Rt)=>Ut(Bt,Ht=>Rt===Ht));Bo(m,Jt,T,VC(h))},x0=(l,m)=>{if(Z2(l),l.isResizable(m)){const h=to.fromTable(m),v=Yx(h),S=Ng(h);j2(h,l,m,v,S)}},Nu=(l,m)=>{const h=wl(l.parent(),"."+b0);Et(h,m)},G2=l=>{Nu(l,m=>{cr(m,"display","none")})},AE=l=>{Nu(l,m=>{cr(m,"display","block")})},Jw=l=>Ic(l,U2),mf=l=>Ic(l,W2),Qw=zp("resizer-bar-dragging"),Up=l=>{const m=Vp(),h=wE(m,{});let v=X.none();const S=(Ht,Dt)=>X.from(Yi(Ht,Dt));m.events.drag.bind(Ht=>{S(Ht.target,"data-row").each(Dt=>{const Se=Ts(Ht.target,"top");cr(Ht.target,"top",Se+Ht.yDelta+"px")}
84),S(Ht.target,"data-column").each(Dt=>{const Se=Ts(Ht.target,"left");cr(Ht.target,"left",Se+Ht.xDelta+"px")})});const T=(Ht,Dt)=>{const Se=Ts(Ht,Dt),Ke=Cu(Ht,"data-initial-"+Dt,0);return Se-Ke};h.events.stop.bind(()=>{m.get().each(Ht=>{v.each(Dt=>{S(Ht,"data-row").each(Se=>{const Ke=T(Ht,"top");Vo(Ht,"data-initial-top"),Rt.trigger.adjustHeight(Dt,Ke,parseInt(Se,10))}),S(Ht,"data-column").each(Se=>{const Ke=T(Ht,"left");Vo(Ht,"data-initial-left"),Rt.trigger.adjustWidth(Dt,Ke,parseInt(Se,10))}),x0(l,Dt)})})});const B=(Ht,Dt)=>{Rt.trigger.startAdjust(),m.assign(Ht),Fs(Ht,"data-initial-"+Dt,Ts(Ht,Dt)),Pc(Ht,Qw),cr(Ht,"opacity","0.2"),h.go(l.dragContainer())},P=pu(l.parent(),"mousedown",Ht=>{Jw(Ht.target)&&B(Ht.target,"top"),mf(Ht.target)&&B(Ht.target,"left")}),z=Ht=>bn(Ht,l.view()),G=Ht=>Ms(Ht,"table",z).filter(rp),ot=Ht=>Ic(Ht,"ephox-snooker-resizer-bar")||Ic(Ht,"ephox-dragster-blocker"),Bt=pu(l.view(),"mouseover",Ht=>{G(Ht.target).fold(()=>{Ee(Ht.target)&&!ot(Ht.target)&&Z2(l)},Dt=>{h.isActive()&&(v=X.some(Dt),x0(l,Dt))})}),Jt=()=>{P.unbind(),Bt.unbind(),h.destroy(),Z2(l)},Kt=Ht=>{x0(l,Ht)},Rt=Mu({adjustHeight:Cs(["table","delta","row"]),adjustWidth:Cs(["table","delta","column"]),startAdjust:Cs([])});return{destroy:Jt,refresh:Kt,on:h.on,off:h.off,hideBars:lo(G2,l),showBars:lo(AE,l),events:Rt.registry}},q2={create:(l,m,h)=>{const v=pp,S=es,T=Up(l),B=Mu({beforeResize:Cs(["table","type"]),afterResize:Cs(["table","type"]),startDrag:Cs([])});return T.events.adjustHeight.bind(P=>{const z=P.table;B.trigger.beforeResize(z,"row");const G=v.delta(P.delta,z);P1(z,G,P.row),B.trigger.afterResize(z,"row")}),T.events.startAdjust.bind(P=>{B.trigger.startDrag()}),T.events.adjustWidth.bind(P=>{const z=P.table;B.trigger.beforeResize(z,"col");const G=S.delta(P.delta,z),ot=h(z);Zg(z,G,P.column,m,ot),B.trigger.afterResize(z,"col")}),{on:T.on,off:T.off,refreshBars:T.refresh,hideBars:T.hideBars,showBars:T.showBars,destroy:T.destroy,events:B.registry}}},Pd=l=>m=>m.options.get(l),t_="100%",e_=l=>{const m=l.dom,h=m.getParent(l.selection.getStart(),m.isBlock)??l.getBody();return lr(oe.fromDom(h))+"px"},o_=(l,m)=>jp(l)||!K2(l)?m:Ml(l)?{...m,width:e_(l)}:{...m,width:t_},n_=(l,m)=>jp(l)||K2(l)?m:Ml(l)?{...m,width:e_(l)}:{...m,width:t_},uR=l=>{const m=l.options.register;m("table_clone_elements",{processor:"string[]"}),m("table_use_colgroups",{processor:"boolean",default:!0}),m("table_header_type",{processor:h=>{const v=Fn(["section","cells","sectionCells","auto"],h);return v?{value:h,valid:v}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),m("table_sizing_mode",{processor:"string",default:"auto"}),m("table_default_attributes",{processor:"object",default:{border:"1"}}),m("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),m("table_column_resizing",{processor:h=>{const v=Fn(["preservetable","resizetable"],h);return v?{value:h,valid:v}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),m("table_resize_bars",{processor:"boolean",default:!0}),m("table_style_by_css",{processor:"boolean",default:!0}),m("table_merge_content_on_paste",{processor:"boolean",default:!0})},s_=l=>X.from(l.options.get("table_clone_elements")),v0=l=>{const m=l.options.get("object_resizing");return Fn(m.split(","),"table")},y0=Pd("table_header_type"),Zp=Pd("table_column_resizing"),C0=l=>Zp(l)==="preservetable",w0=l=>Zp(l)==="resizetable",se=Pd("table_sizing_mode"),Id=l=>se(l)==="relative",Ml=l=>se(l)==="fixed",jp=l=>se(l)==="responsive",r_=Pd("table_resize_bars"),K2=Pd("table_style_by_css"),Y2=Pd("table_merge_content_on_paste"),a_=l=>{const m=l.options,h=m.get("table_default_attributes");return m.isSet("table_default_attributes")?h:n_(l,h)},i_=l=>{const m=l.options,h=m.get("table_default_styles");return m.isSet("table_default_styles")?h:o_(l,h)},c_=Pd("table_use_colgroups"),_0=l=>oe.fromDom(l.getBody()),ws=l=>m=>bn(m,_0(l)),gc=l=>{Vo(l,"data-mce-style");const m=h=>Vo(h,"data-mce-style");Et(vd(l),m),Et(k1(l),m),Et(jx(l),m)},S0=l=>oe.fromDom(l.selection.getStart()),l_=l=>l.getBoundingClientRect().width,u_=l=>l.getBoundingClientRect().height,d_=l=>(m,h)=>{const v=m.dom.getStyle(h,l)||m.dom.getAttrib(h,l);return X.from(v).filter(da)},k0=d_("width"),X2=d_("height"),m_=l=>/^(\d+(\.\d+)?)%$/.test(l),g_=l=>/^(\d+(\.\d+)?)px$/.test(l),Gp=l=>p1(l,ti("table")).exists(rp),J2=l=>Ti(l,"table"),E0=(l,m,h)=>{const v=S=>T=>h!==void 0&&h(T)||bn(T,S);return bn(l,m)?X.some({boxes:X.some([l]),start:l,finish:m}):J2(l).bind(S=>J2(m).bind(T=>{if(bn(S,T))return X.some({boxes:Ie(S,l,m),start:l,finish:m});if(gx(S,T)){const B=Ko(m,"td,th",v(S)),P=B.length>0?B[B.length-1]:m;return X.some({boxes:z2(S,l,S,m,T),start:l,finish:P})}else if(gx(T,S)){const B=Ko(l,"td,th",v(T)),P=B.length>0?B[B.length-1]:l;return X.some({boxes:z2(T,l,S,m,T),start:l,finish:P})}else return Vc(l,m).shared.bind(B=>Ms(B,"table",h).bind(P=>{const z=Ko(m,"td,th",v(P)),G=z.length>0?z[z.length-1]:m,ot=Ko(l,"td,th",v(P)),Bt=ot.length>0?ot[ot.length-1]:l;return X.some({boxes:z2(P,l,S,m,T),start:Bt,finish:G})}))}))},Q2=(l,m)=>{const h=wl(l,m);return h.length>0?X.some(h):X.none()},TE=(l,m)=>F(l,h=>wi(h,m)),f_=(l,m,h)=>gd(l,m).bind(v=>gd(l,h).bind(S=>rn(J2,[v,S]).map(T=>
84({first:v,last:S,table:T})))),p_=(l,m)=>Ti(l,"table").bind(h=>gd(h,m).bind(v=>E0(v,l).bind(S=>S.boxes.map(T=>({boxes:T,start:S.start,finish:S.finish}))))),A0=(l,m,h,v,S)=>TE(l,S).bind(T=>xE(T,m,h).bind(B=>p_(B,v))),Hm=(l,m)=>Q2(l,m),h_=(l,m,h)=>f_(l,m,h).bind(v=>{const S=z=>bn(l,z),T="thead,tfoot,tbody,table",B=Ti(v.first,T,S),P=Ti(v.last,T,S);return B.bind(z=>P.bind(G=>bn(z,G)?Fu(v.table,v.first,v.last):X.none()))}),b_=mo,T0=l=>{const m=(v,S)=>Si(v,S).exists(T=>parseInt(T,10)>1),h=v=>m(v,"rowspan")||m(v,"colspan");return l.length>0&&Zo(l,h)?X.some(l):X.none()},DE=(l,m,h)=>m.length<=1?X.none():h_(l,h.firstSelectedSelector,h.lastSelectedSelector).map(v=>({bounds:v,cells:m})),zm={create:(l,m)=>({selection:l,kill:m})},tv=(l,m,h,v)=>{switch(l.tag){case"none":return m();case"single":return v(l.element);case"multiple":return h(l.elements)}},RE=()=>({tag:"none"}),BE=l=>({tag:"multiple",elements:l}),x_=l=>({tag:"single",element:l}),FE=(l,m,h)=>({get:()=>Hm(l(),h).fold(()=>m().fold(RE,x_),BE)}),D0={create:(l,m,h,v)=>({start:js.on(l,m),finish:js.on(h,v)})},ov=(l,m)=>{const h=Zt(l,m);return vu.create(oe.fromDom(h.startContainer),h.startOffset,oe.fromDom(h.endContainer),h.endOffset)},Nl=D0.create,v_=(l,m,h,v,S,T,B)=>bn(h,S)&&v===T?X.none():Ms(h,"td,th",m).bind(P=>Ms(S,"td,th",m).bind(z=>O0(l,m,P,z,B))),O0=(l,m,h,v,S)=>bn(h,v)?X.none():E0(h,v,m).bind(T=>{const B=T.boxes.getOr([]);return B.length>1?(S(l,B,T.start,T.finish),X.some(zm.create(X.some(Nl(h,0,h,_l(h))),!0))):X.none()}),ME=(l,m,h,v,S)=>{const T=B=>(S.clearBeforeUpdate(h),S.selectRange(h,B.boxes,B.start,B.finish),B.boxes);return A0(v,l,m,S.firstSelectedSelector,S.lastSelectedSelector).map(T)},$d=Wi.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),NE=(l,m,h)=>{const v=l.getRect(m),S=l.getRect(h);return S.right>v.left&&S.left<v.right},PE=l=>Ms(l,"tr"),gf={...$d,verify:(l,m,h,v,S,T,B)=>Ms(v,"td,th",B).bind(P=>Ms(m,"td,th",B).map(z=>bn(P,z)?bn(v,P)&&_l(P)===S?T(z):$d.none("in same cell"):rn(PE,[P,z]).fold(()=>NE(l,z,P)?$d.success():T(z),G=>T(z)))).getOr($d.none("default")),cata:(l,m,h,v,S)=>l.fold(m,h,v,S)},qp=ti("br"),nv=(l,m,h)=>m(l,h).bind(v=>_g(v)&&op(v).trim().length===0?nv(v,m,h):X.some(v)),IE=(l,m,h)=>h.traverse(m).orThunk(()=>nv(m,h.gather,l)).map(h.relative),$E=(l,m)=>Fa(l,m).filter(qp).orThunk(()=>Fa(l,m-1).filter(qp)),R0=(l,m,h,v)=>$E(m,h).bind(S=>v.traverse(S).fold(()=>nv(S,v.gather,l).map(v.relative),T=>pd(T).map(B=>js.on(B.parent,B.index)))),y_=(l,m,h,v)=>(qp(m)?IE(l,m,v):R0(l,m,h,v)).map(T=>({start:T,finish:T})),C_=l=>gf.cata(l,m=>X.none(),()=>X.none(),m=>X.some(Du(m,0)),m=>X.some(Du(m,_l(m)))),Kp=(l,m)=>({left:l.left,top:l.top+m,right:l.right,bottom:l.bottom+m}),B0=(l,m)=>({left:l.left,top:l.top-m,right:l.right,bottom:l.bottom-m}),sv=(l,m,h)=>({left:l.left+m,top:l.top+h,right:l.right+m,bottom:l.bottom+h}),Yp=l=>l.top,rv=l=>l.bottom,LE=(l,m,h)=>h>=0&&h<_l(m)?l.getRangedRect(m,h,m,h+1):h>0?l.getRangedRect(m,h-1,m,h):X.none(),Xp=l=>({left:l.left,top:l.top,right:l.right,bottom:l.bottom}),w_=(l,m)=>X.some(l.getRect(m)),F0=(l,m,h)=>Cr(m)?w_(l,m).map(Xp):_g(m)?LE(l,m,h).map(Xp):X.none(),M0=(l,m)=>Cr(m)?w_(l,m).map(Xp):_g(m)?l.getRangedRect(m,0,m,_l(m)).map(Xp):X.none(),Vm=5,HE=100,Pl=Wi.generate([{none:[]},{retry:["caret"]}]),zE=(l,m)=>l.left<m.left||Math.abs(m.right-l.left)<1||l.left>m.right,__=(l,m,h)=>p1(m,Uc).fold(so,v=>M0(l,v).exists(S=>zE(h,S))),VE=(l,m,h,v,S)=>{const T=Kp(S,Vm);return Math.abs(h.bottom-v.bottom)<1||h.top>S.bottom?Pl.retry(T):h.top===S.bottom?Pl.retry(Kp(S,1)):__(l,m,S)?Pl.retry(sv(T,Vm,0)):Pl.none()},N0={point:Yp,adjuster:(l,m,h,v,S)=>{const T=B0(S,Vm);return Math.abs(h.top-v.top)<1||h.bottom<S.top?Pl.retry(T):h.bottom===S.top?Pl.retry(B0(S,1)):__(l,m,S)?Pl.retry(sv(T,Vm,0)):Pl.none()},move:B0,gather:Dw},UE={point:rv,adjuster:VE,move:Kp,gather:cc},WE=(l,m,h)=>l.elementFromPoint(m,h).filter(v=>ss(v)==="table").isSome(),ZE=(l,m,h,v,S)=>av(l,m,h,m.move(v,Vm),S),av=(l,m,h,v,S)=>S===0?X.some(v):WE(l,v.left,m.point(v))?ZE(l,m,h,v,S-1):l.situsFromPoint(v.left,m.point(v)).bind(T=>T.start.fold(X.none,B=>M0(l,B).bind(P=>m.adjuster(l,B,P,h,v).fold(X.none,z=>av(l,m,h,z,S-1))).orThunk(()=>X.some(v)),X.none)),jE=(l,m,h)=>l.point(m)>h.getInnerHeight()?X.some(l.point(m)-h.getInnerHeight()):l.point(m)<0?X.some(-l.point(m)):X.none(),S_=(l,m,h)=>{const v=l.move(h,Vm),S=av(m,l,h,v,HE).getOr(v);return jE(l,S,m).fold(()=>m.situsFromPoint(S.left,l.point(S)),T=>(m.scrollBy(0,T),m.situsFromPoint(S.left,l.point(S)-T)))},iv={tryUp:lo(S_,N0),tryDown:lo(S_,UE),getJumpSize:q(Vm)},GE=20,qE=(l,m,h)=>l.getSelection().bind(v=>y_(m,v.finish,v.foffset,h).fold(()=>X.some(Du(v.finish,v.foffset)),S=>{const T=l.fromSitus(S),B=gf.verify(l,v.finish,v.foffset,T.finish,T.foffset,h.failure,m);return C_(B)})),cv=(l,m,h,v,S,T)=>T===0?X.none():Jp(l,m,h,v,S).bind(B=>{const P=l.fromSitus(B),z=gf.verify(l,h,v,P.finish,P.foffset,S.failure,m);return gf.cata(z,()=>X.none(),()=>X.some(B),G=>bn(h,G)&&v===0?k_(l,h,v,B0,S):cv(l,m,G,0,S,T-1),G=>bn(h,G)&&v===_l(G)?k_(l,h,v,Kp,S):cv(l,m,G,_l(G),S,T-1))}),k_=(l,m,h,v,S)=>F0(l,m,h).bind(T=>pe(l,S,v(T,iv.getJumpSize()))),pe=(l,m,h)=>{const v=Tc().browser;return v.isChromium()||v.isSafari()||v.isFirefox()?m.retry(l,h):X.none()},Jp=(l,m,h,v,S)=>F0(l,h,v).bind(T=>pe(l,S,T)),E_=(l,m,h)=>qE(l,m,h).bind(v=>cv(l,m,v.element,v.offset,h,GE).map(l.fromSitus)),KE=(l,m)=>GC(l,h=>Z(h).exists(v=>bn(v,m))),lv=(l,m,h,v,S)=>Ms(v,"td,th",m).bind(T=>Ms(T,"table",m).bind(B=>KE(S,B)?E_(l,m,h).bind(P=>Ms(P.finish,"td,th",m).map(z=>({start:T,finish:z,range:P}))):X.none())),Qp=(l,m,h,v,S,T)=>T(v,m).orThunk(()=>lv(l,m,h,v,S).map(B=>{const P=B.range;return zm.create(X.some(Nl(P.start,P.soffset,P.finish,P.foffset)),!0)})),P0=(l,m)=>Ms(l,"tr",m).bind(h=>Ms(h,"table",m).bind(v=>{const S=wl(v,"tr");return bn(h,S[0])?Lr(v,T=>bs(T).isSome(),m).map(T=>{const B=_l(T);return zm.create(X.some(Nl(T,B,T,B)),!0)}):X.none()})),th=(l,m)=>Ms(l,"tr",m).bind(h=>Ms(h,"table",m).bind(v=>{const S=wl(v,"tr");return bn(h,S[S.length-1])?Ni(v,T=>ip(T).isSome(),m).map(T=>zm.create(X.some(Nl(T,0,T,0)),!0)):X.none()})),ff=(l,m,h,v,S,T,B)=>lv(l,h,v,S,T).bind(P=>O0(m,h,P.start,P.finish,B)),uv=(l,m)=>Ms(l,"td,th",m),dv=l=>Ba(l).exists(rp),A_=(l,m,h,v)=>{const S=yg(),T=S.clear,B=ot=>{S.on(Bt=>{v.clearBeforeUpdate(m),uv(ot.target,h).each(Jt=>{E0(Bt,Jt,h).each(Kt=>{const Rt=Kt.boxes.getOr([]);if(Rt.length===1){const Ht=Rt[0],Dt=ap(Ht)==="false",Se=Xe(Ag(ot.target),Ht,b
84n);Dt&&Se&&v.selectRange(m,Rt,Ht,Ht)}else Rt.length>1&&(v.selectRange(m,Rt,Kt.start,Kt.finish),l.selectContents(Jt))})})})};return{clearstate:T,mousedown:ot=>{v.clear(m),uv(ot.target,h).filter(dv).each(S.set)},mouseover:ot=>{B(ot)},mouseup:ot=>{B(ot),T()}}},mv={traverse:Sg,gather:cc,relative:js.before,retry:iv.tryDown,failure:gf.failedDown},T_={traverse:kx,gather:Dw,relative:js.before,retry:iv.tryUp,failure:gf.failedUp},pf=l=>m=>m===l,Pu=pf(38),hf=pf(40),Iu=l=>l>=37&&l<=40,$u={isBackward:pf(37),isForward:pf(39)},D_={isBackward:pf(39),isForward:pf(37)},eh=l=>({elementFromPoint:(Dt,Se)=>oe.fromPoint(oe.fromDom(l.document),Dt,Se),getRect:Dt=>Dt.dom.getBoundingClientRect(),getRangedRect:(Dt,Se,Ke,ie)=>{const Lo=yu.exact(Dt,Se,Ke,ie);return Vx(l,Lo)},getSelection:()=>Rk(l).map(Dt=>ov(l,Dt)),fromSitus:Dt=>{const Se=yu.relative(Dt.start,Dt.finish);return ov(l,Se)},situsFromPoint:(Dt,Se)=>Ux(l,Dt,Se).map(Ke=>D0.create(Ke.start,Ke.soffset,Ke.finish,Ke.foffset)),clearSelection:()=>{Bk(l)},collapseSelection:(Dt=!1)=>{Rk(l).each(Se=>Se.fold(Ke=>Ke.collapse(Dt),(Ke,ie)=>{const Lo=Dt?Ke:ie;ew(l,Lo,Lo)},(Ke,ie,Lo,Ve)=>{const Wo=Dt?Ke:Lo,us=Dt?ie:Ve;w1(l,Wo,us,Wo,us)}))},setSelection:Dt=>{w1(l,Dt.start,Dt.soffset,Dt.finish,Dt.foffset)},setRelativeSelection:(Dt,Se)=>{ew(l,Dt,Se)},selectNode:Dt=>{zx(l,Dt,!1)},selectContents:Dt=>{zx(l,Dt)},getInnerHeight:()=>l.innerHeight,getScrollY:()=>xn(oe.fromDom(l.document)).top,scrollBy:(Dt,Se)=>{Ai(Dt,Se,oe.fromDom(l.document))}}),fc=(l,m)=>({rows:l,cols:m}),O_=(l,m,h,v)=>{const S=eh(l),T=A_(S,m,h,v);return{clearstate:T.clearstate,mousedown:T.mousedown,mouseover:T.mouseover,mouseup:T.mouseup}},R_=l=>p1(l,_x).exists(rp),gv=(l,m)=>R_(l)||R_(m),fv=(l,m,h,v)=>{const S=eh(l),T=()=>(v.clear(m),X.none());return{keydown:(z,G,ot,Bt,Jt,Kt)=>{const Rt=z.raw,Ht=Rt.which,Dt=Rt.shiftKey===!0;return Q2(m,v.selectedSelector).fold(()=>(Iu(Ht)&&!Dt&&v.clearBeforeUpdate(m),Iu(Ht)&&Dt&&!gv(G,Bt)?X.none:hf(Ht)&&Dt?lo(ff,S,m,h,mv,Bt,G,v.selectRange):Pu(Ht)&&Dt?lo(ff,S,m,h,T_,Bt,G,v.selectRange):hf(Ht)?lo(Qp,S,h,mv,Bt,G,th):Pu(Ht)?lo(Qp,S,h,T_,Bt,G,P0):X.none),Ke=>{const ie=Lo=>()=>Ct(Lo,Wo=>ME(Wo.rows,Wo.cols,m,Ke,v)).fold(()=>f_(m,v.firstSelectedSelector,v.lastSelectedSelector).map(Wo=>{const us=hf(Ht)||Kt.isForward(Ht)?js.after:js.before;return S.setRelativeSelection(js.on(Wo.first,0),us(Wo.table)),v.clear(m),zm.create(X.none(),!0)}),Wo=>X.some(zm.create(X.none(),!0)));return Iu(Ht)&&Dt&&!gv(G,Bt)?X.none:hf(Ht)&&Dt?ie([fc(1,0)]):Pu(Ht)&&Dt?ie([fc(-1,0)]):Kt.isBackward(Ht)&&Dt?ie([fc(0,-1),fc(-1,0)]):Kt.isForward(Ht)&&Dt?ie([fc(0,1),fc(1,0)]):Iu(Ht)&&!Dt?T:X.none})()},keyup:(z,G,ot,Bt,Jt)=>Q2(m,v.selectedSelector).fold(()=>{const Kt=z.raw,Rt=Kt.which;return Kt.shiftKey===!0&&Iu(Rt)&&gv(G,Bt)?v_(m,h,G,ot,Bt,Jt,v.selectRange):X.none()},X.none)}},B_=(l,m,h,v)=>{const S=eh(l);return(T,B)=>{v.clearBeforeUpdate(m),E0(T,B,h).each(P=>{const z=P.boxes.getOr([]);v.selectRange(m,z,P.start,P.finish),S.selectContents(B),S.collapseSelection()})}},M_={byClass:l=>{const m=Px(l.selected),h=jC([l.selected,l.lastSelected,l.firstSelected]),v=T=>{const B=wl(T,l.selectedSelector);Et(B,h)};return{clearBeforeUpdate:v,clear:v,selectRange:(T,B,P,z)=>{v(T),Et(B,m),Pc(P,l.firstSelected),Pc(z,l.lastSelected)},selectedSelector:l.selectedSelector,firstSelectedSelector:l.firstSelectedSelector,lastSelectedSelector:l.lastSelectedSelector}},byAttr:(l,m,h)=>{const v=z=>{Vo(z,l.selected),Vo(z,l.firstSelected),Vo(z,l.lastSelected)},S=z=>{Fs(z,l.selected,"1")},T=z=>{B(z),h()},B=z=>{const G=wl(z,`${l.selectedSelector},${l.firstSelectedSelector},${l.lastSelectedSelector}`);Et(G,v)};return{clearBeforeUpdate:B,clear:T,selectRange:(z,G,ot,Bt)=>{T(z),Et(G,S),Fs(ot,l.firstSelected,"1"),Fs(Bt,l.lastSelected,"1"),m(G,ot,Bt)},selectedSelector:l.selectedSelector,firstSelectedSelector:l.firstSelectedSelector,lastSelectedSelector:l.lastSelectedSelector}}},Um="data-mce-selected",pv="td["+Um+"],th["+Um+"]",N_="["+Um+"]",hv="data-mce-first-selected",bv="td["+hv+"],th["+hv+"]",xv="data-mce-last-selected",XE="td["+xv+"],th["+xv+"]",Wm=N_,Zm={selected:Um,selectedSelector:pv,firstSelected:hv,firstSelectedSelector:bv,lastSelected:xv,lastSelectedSelector:XE},I0=(l,m,h)=>({element:h,mergable:DE(m,l,Zm),unmergable:T0(l),selection:b_(l)}),$0=(l,m,h)=>({element:l,clipboard:m,generators:h}),P_=(l,m,h,v)=>({selection:b_(l),clipboard:h,generators:v}),JE=l=>ri(l).bind(m=>Hm(m,Zm.firstSelectedSelector)).fold(q(l),m=>m[0]),I_=l=>(m,h)=>{const v=ss(m),S=v==="col"||v==="colgroup"?JE(m):m;return Ms(S,l,h)},ze=I_("th,td,caption"),L0=I_("th,td"),li=l=>ar(l.model.table.getSelectedCells()),oh=l=>te(li(l),m=>wi(m,Zm.selectedSelector)),QE=l=>ri(l[0]).map(m=>{const h=H1(m,Wm);return gc(h),[h]}),H0=(l,m)=>Ne(m,h=>
84l.selection.serializer.serialize(h.dom,{})).join(""),tA=(l,m)=>{const h=l.getDoc(),v=Tx(oe.fromDom(l.getBody())),S=oe.fromTag("div",h);Fs(S,"data-mce-bogus","all"),Tn(S,{position:"fixed",left:"-9999999px",top:"0",overflow:"hidden",opacity:"0"});const T=xl(v);Ki(S,m),zo(T,S);const B=S.dom.innerText;return Nr(S),B},vv=(l,m)=>{l.on("BeforeGetContent",h=>{const v=S=>{h.preventDefault(),QE(S).each(T=>{const B=h.format==="text"?tA(l,T):H0(l,T);h.content=B})};if(h.selection===!0){const S=oh(l);S.length>=1&&v(S)}}),l.on("BeforeSetContent",h=>{if(h.selection===!0&&h.paste===!0){const v=li(l);Y(v).each(S=>{ri(S).each(T=>{const B=te(Rx(h.content),z=>ss(z)!=="meta"),P=ti("table");if(Y2(l)&&B.length===1&&P(B[0])){h.preventDefault();const z=oe.fromDom(l.getDoc()),G=w2(z),ot=$0(S,B[0],G);m.pasteCells(T,ot).each(()=>{l.focus()})}})})}})},yv=(l,m)=>l.dispatch("NewRow",{node:m}),nh=(l,m)=>l.dispatch("NewCell",{node:m}),qc=(l,m,h)=>{l.dispatch("TableModified",{...h,table:m})},bf=(l,m,h,v,S)=>{l.dispatch("TableSelectionChange",{cells:m,start:h,finish:v,otherCells:S})},eA=l=>{l.dispatch("TableSelectionClear")},jm=(l,m,h,v,S)=>{l.dispatch("ObjectResizeStart",{target:m,width:h,height:v,origin:S})},sh=(l,m,h,v,S)=>{l.dispatch("ObjectResized",{target:m,width:h,height:v,origin:S})},z0={structure:!1,style:!0},Hs={structure:!0,style:!1},oA={structure:!0,style:!0},Cv=(l,m)=>Id(l)?Hg.percentageSize(m):Ml(l)?Hg.pixelSize(m):Hg.getTableSize(m),Ld=(l,m,h)=>{const v=Hr=>ss(_0(Hr))==="table",S=Hr=>!v(l)||Op(Hr).rows>1,T=Hr=>!v(l)||Op(Hr).columns>1,B=s_(l),P=w0(l)?ke:Cp,z=Hr=>{switch(y0(l)){case"section":return Su.section();case"sectionCells":return Su.sectionCells();case"cells":return Su.cells();default:return Su.getTableSectionType(Hr,"section")}},G=(Hr,Av)=>Av.cursor.fold(()=>{const K0=vd(Hr);return Y(K0).filter(Ee).map(Hu=>{h.clearSelectedCells(Hr.dom);const Dr=l.dom.createRng();return Dr.selectNode(Hu.dom),l.selection.setRng(Dr),Fs(Hu,"data-mce-selected","1"),Dr})},K0=>{const Hu=K1(K0),Dr=l.dom.createRng();return Dr.setStart(Hu.element.dom,Hu.offset),Dr.setEnd(Hu.element.dom,Hu.offset),l.selection.setRng(Dr),h.clearSelectedCells(Hr.dom),X.some(Dr)}),ot=(Hr,Av,K0,Hu)=>(Dr,W_,ce=!1)=>{gc(Dr);const wa=oe.fromDom(l.getDoc()),cA=Rd(K0,wa,B),Z_={sizing:Cv(l,Dr),resize:w0(l)?Ik():ow(),section:z(Dr)};return Av(Dr)?Hr(Dr,W_,cA,Z_).bind(Y0=>{m.refresh(Dr.dom),Et(Y0.newRows,Km=>{yv(l,Km.dom)}),Et(Y0.newCells,Km=>{nh(l,Km.dom)});const Tv=G(Dr,Y0);return Ee(Dr)&&(gc(Dr),ce||qc(l,Dr.dom,Hu)),Tv.map(Km=>({rng:Km,effect:Hu}))}):X.none()},Bt=ot(M2,S,ke,Hs),Jt=ot(dc,T,ke,Hs),Kt=ot(Lm,mt,ke,Hs),Rt=ot(mE,mt,ke,Hs),Ht=ot(af,mt,P,Hs),Dt=ot(vn,mt,P,Hs),Se=ot(fE,mt,ke,Hs),Ke=ot(P2,mt,ke,Hs),ie=ot(Pt,mt,ke,Hs),Lo=ot(I2,mt,ke,Hs),Ve=ot(tr,mt,ke,Hs),Wo=ot($2,mt,ke,Hs),us=ot(Hw,mt,ke,oA),di=ot(Lw,mt,ke,Hs),Gm=ot(gE,mt,ke,Hs),Vd=ot(Md,mt,ke,Hs),qm=ot(Gc,mt,ke,Hs),Qo=ot(Tr,mt,ke,Hs),Xn=ot($w,mt,ke,Hs),Ca=ot(N2,mt,ke,Hs);return{deleteRow:Bt,deleteColumn:Jt,insertRowsBefore:Kt,insertRowsAfter:Rt,insertColumnsBefore:Ht,insertColumnsAfter:Dt,mergeCells:Se,unmergeCells:Ke,pasteColsBefore:ie,pasteColsAfter:Lo,pasteRowsBefore:Ve,pasteRowsAfter:Wo,pasteCells:us,makeCellsHeader:di,unmakeCellsHeader:Gm,makeColumnsHeader:Vd,unmakeColumnsHeader:qm,makeRowsHeader:Qo,makeRowsBody:Xn,makeRowsFooter:Ca,getTableRowType:pE,getTableCellType:H2,getTableColType:L2}},Il=(l,m)=>{l.selection.select(m.dom,!0),l.selection.collapse(!0)},wv=(l,m)=>{gd(m,"td,th").each(lo(Il,l))},$_=(l,m)=>{Et(wl(m,"tr"),h=>{yv(l,h.dom),Et(wl(h,"th,td"),v=>{nh(l,v.dom)})})},nA=l=>un(l)&&l.indexOf("%")!==-1,V0=(l,m,h,v,S)=>{const T=i_(l),B={styles:T,attributes:a_(l),colGroups:c_(l)};return l.undoManager.ignore(()=>{const P=Fl(h,m,S,v,y0(l),B);Fs(P,"data-mce-id","__mce");const z=zC(P);l.insertContent(z),l.addVisual()}),gd(_0(l),'table[data-mce-id="__mce"]').map(P=>(Ml(l)?y2(P):jp(l)?Dd(P):(Id(l)||nA(T.width))&&Bm(P),gc(P),Vo(P,"data-mce-id"),$_(l,P),wv(l,P),P.dom)).getOrNull()},rh=(l,m,h,v={})=>{const S=T=>$n(T)&&T>0;if(S(m)&&S(h)){const T=v.headerRows||0,B=v.headerColumns||0;return V0(l,h,m,B,T)}else return console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table."),null};var Hd=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const U0="x-tinymce/dom-table-",W0=U0+"rows",zd=U0+"columns",ah=l=>{const m=Hd.FakeClipboardItem(l);Hd.write([m])},_v=l=>{const m=Hd.read()??[];return Ct(m,h=>X.from(h.getType(l)))},Z0=l=>{_v(l).isSome()&&Hd.clear()},Kc=l=>{l.fold($l,m=>ah({[W0]:m}))},L_=()=>_v(W0),$l=()=>Z0(W0),Sv=l=>{l.fold(xf,m=>ah({[zd]:m}))},j0=()=>_v(zd),xf=()=>Z0(zd),ih=l=>ze(S0(l),ws(l)).filter(Gp),G0=l=>L0(S0(l),ws(l)).filter(Gp),sA=(l,m)=>{const h=ws(l),v=()=>ih(l).each(Dt=>{ri(Dt,h).filter(nt(h)).each(Se=>{const Ke=oe.fromText("");
84if(Rc(Se,Ke),Nr(Se),l.dom.isEmpty(l.getBody()))l.setContent(""),l.selection.setCursorLocation();else{const ie=l.dom.createRng();ie.setStart(Ke.dom,0),ie.setEnd(Ke.dom,0),l.selection.setRng(ie),l.nodeChanged()}})}),S=Dt=>ih(l).each(Se=>{jp(l)||Ml(l)||Id(l)||ri(Se,h).each(ie=>{Dt==="relative"&&!kw(ie)?Bm(ie):Dt==="fixed"&&!tE(ie)?y2(ie):Dt==="responsive"&&!eE(ie)&&Dd(ie),gc(ie),qc(l,ie.dom,Hs)})}),T=Dt=>ri(Dt,h),B=Dt=>G0(l).bind(Se=>T(Se).map(Ke=>Dt(Ke,Se))),P=(Dt,Se)=>{B(Ke=>{l.formatter.toggle("tableclass",{value:Se},Ke.dom),qc(l,Ke.dom,z0)})},z=(Dt,Se)=>{B(Ke=>{const ie=li(l),Ve=Zo(ie,Wo=>l.formatter.match("tablecellclass",{value:Se},Wo.dom))?l.formatter.remove:l.formatter.apply;Et(ie,Wo=>Ve("tablecellclass",{value:Se},Wo.dom)),qc(l,Ke.dom,z0)})},G=()=>{ih(l).each(Dt=>{ri(Dt,h).each(Se=>{rs(Se,"caption").fold(()=>{const Ke=oe.fromTag("caption");zo(Ke,oe.fromText("Caption")),vk(Se,Ke,0),l.selection.setCursorLocation(Ke.dom,0)},Ke=>{ti("caption")(Dt)&&Xf("td",Se).each(ie=>l.selection.setCursorLocation(ie.dom,0)),Nr(Ke)}),qc(l,Se.dom,Hs)})})},ot=Dt=>{l.focus()},Bt=(Dt,Se=!1)=>B((Ke,ie)=>{const Lo=I0(li(l),Ke,ie);Dt(Ke,Lo,Se).each(ot)}),Jt=()=>B((Dt,Se)=>{const Ke=I0(li(l),Dt,Se),ie=Rd(ke,oe.fromDom(l.getDoc()),X.none());return Mi(Dt,Ke,ie)}),Kt=()=>B((Dt,Se)=>{const Ke=I0(li(l),Dt,Se);return Hc(Dt,Ke)}),Rt=(Dt,Se)=>Se().each(Ke=>{const ie=Ne(Ke,Lo=>rr(Lo));B((Lo,Ve)=>{const Wo=w2(oe.fromDom(l.getDoc())),us=P_(li(l),Ve,ie,Wo);Dt(Lo,us).each(ot)})}),Ht=Dt=>(Se,Ke)=>au(Ke,"type").each(ie=>{Bt(Dt(ie),Ke.no_events)});Je({mceTableSplitCells:()=>Bt(m.unmergeCells),mceTableMergeCells:()=>Bt(m.mergeCells),mceTableInsertRowBefore:()=>Bt(m.insertRowsBefore),mceTableInsertRowAfter:()=>Bt(m.insertRowsAfter),mceTableInsertColBefore:()=>Bt(m.insertColumnsBefore),mceTableInsertColAfter:()=>Bt(m.insertColumnsAfter),mceTableDeleteCol:()=>Bt(m.deleteColumn),mceTableDeleteRow:()=>Bt(m.deleteRow),mceTableCutCol:()=>Kt().each(Dt=>{Sv(Dt),Bt(m.deleteColumn)}),mceTableCutRow:()=>Jt().each(Dt=>{Kc(Dt),Bt(m.deleteRow)}),mceTableCopyCol:()=>Kt().each(Dt=>Sv(Dt)),mceTableCopyRow:()=>Jt().each(Dt=>Kc(Dt)),mceTablePasteColBefore:()=>Rt(m.pasteColsBefore,j0),mceTablePasteColAfter:()=>Rt(m.pasteColsAfter,j0),mceTablePasteRowBefore:()=>Rt(m.pasteRowsBefore,L_),mceTablePasteRowAfter:()=>Rt(m.pasteRowsAfter,L_),mceTableDelete:v,mceTableCellToggleClass:z,mceTableToggleClass:P,mceTableToggleCaption:G,mceTableSizingMode:(Dt,Se)=>S(Se),mceTableCellType:Ht(Dt=>Dt==="th"?m.makeCellsHeader:m.unmakeCellsHeader),mceTableColType:Ht(Dt=>Dt==="th"?m.makeColumnsHeader:m.unmakeColumnsHeader),mceTableRowType:Ht(Dt=>{switch(Dt){case"header":return m.makeRowsHeader;case"footer":return m.makeRowsFooter;default:return m.makeRowsBody}})},(Dt,Se)=>l.addCommand(Se,Dt)),l.addCommand("mceInsertTable",(Dt,Se)=>{rh(l,Se.rows,Se.columns,Se.options)}),l.addCommand("mceTableApplyCellStyle",(Dt,Se)=>{const Ke=Ve=>"tablecell"+Ve.toLowerCase().replace("-","");if(!$e(Se))return;const ie=te(li(l),Gp);if(ie.length===0)return;const Lo=sx(Se,(Ve,Wo)=>l.formatter.has(Ke(Wo))&&un(Ve));Zf(Lo)||(Je(Lo,(Ve,Wo)=>{const us=Ke(Wo);Et(ie,di=>{Ve===""?l.formatter.remove(us,{value:null},di.dom,!0):l.formatter.apply(us,{value:Ve},di.dom)})}),T(ie[0]).each(Ve=>qc(l,Ve.dom,z0)))})},H_=(l,m)=>{const h=ws(l),v=S=>L0(S0(l)).bind(T=>ri(T,h).map(B=>{const P=I0(li(l),B,T);return S(B,P)})).getOr("");Je({mceTableRowType:()=>v(m.getTableRowType),mceTableCellType:()=>v(m.getTableCellType),mceTableColType:()=>v(m.getTableColType)},(S,T)=>l.addQueryValueHandler(T,S))},q0=l=>!Ic(oe.fromDom(l.target),"ephox-snooker-resizer-bar"),rA=(l,m)=>{const h=FE(()=>oe.fromDom(l.getBody()),()=>L0(S0(l),ws(l)),Zm.selectedSelector),v=(z,G,ot)=>{ri(G).each(Jt=>{const Kt=Ne(z,Ke=>Ke.dom),Rt=s_(l),Ht=Rd(ke,oe.fromDom(l.getDoc()),Rt),Dt=li(l),Se=g2(Jt,{selection:Dt},Ht).map(Ke=>We(Ke,ie=>Ne(ie,Lo=>Lo.dom))).getOrUndefined();bf(l,Kt,G.dom,ot.dom,Se)})},S=()=>eA(l),T=M_.byAttr(Zm,v,S);return l.on("init",z=>{const G=l.getWin(),ot=_0(l),Bt=ws(l),Jt=()=>{const Qo=l.selection,Xn=oe.fromDom(Qo.getStart()),Ca=oe.fromDom(Qo.getEnd());rn(ri,[Xn,Ca]).fold(()=>T.clear(ot),ke)},Kt=O_(G,ot,Bt,T),Rt=fv(G,ot,Bt,T),Ht=B_(G,ot,Bt,T),Dt=Qo=>Qo.raw.shiftKey===!0;l.on("TableSelectorChange",Qo=>Ht(Qo.start,Qo.finish));const Se=(Qo,Xn)=>
84{Dt(Qo)&&(Xn.kill&&Qo.kill(),Xn.selection.each(Ca=>{const ea=yu.relative(Ca.start,Ca.finish),er=Zt(G,ea);l.selection.setRng(er)}))},Ke=Qo=>{const Xn=ks(Qo);if(Xn.raw.shiftKey&&Iu(Xn.raw.which)){const Ca=l.selection.getRng(),ea=oe.fromDom(Ca.startContainer),er=oe.fromDom(Ca.endContainer);Rt.keyup(Xn,ea,Ca.startOffset,er,Ca.endOffset).each(Lu=>{Se(Xn,Lu)})}},ie=Qo=>{const Xn=ks(Qo);m.hide();const Ca=l.selection.getRng(),ea=oe.fromDom(Ca.startContainer),er=oe.fromDom(Ca.endContainer),Lu=sp($u,D_)(oe.fromDom(l.selection.getStart()));Rt.keydown(Xn,ea,Ca.startOffset,er,Ca.endOffset,Lu).each(Hr=>{Se(Xn,Hr)}),m.show()},Lo=Qo=>Qo.button===0,Ve=Qo=>Qo.buttons===void 0?!0:(Qo.buttons&1)!==0,Wo=Qo=>{Kt.clearstate()},us=Qo=>{Lo(Qo)&&q0(Qo)&&Kt.mousedown(ks(Qo))},di=Qo=>{Ve(Qo)&&q0(Qo)&&Kt.mouseover(ks(Qo))},Gm=Qo=>{Lo(Qo)&&q0(Qo)&&Kt.mouseup(ks(Qo))},qm=(()=>{const Qo=Vs(oe.fromDom(ot)),Xn=Vs(0);return{touchEnd:ea=>{const er=oe.fromDom(ea.target);if(ti("td")(er)||ti("th")(er)){const Lu=Qo.get(),Hr=Xn.get();bn(Lu,er)&&ea.timeStamp-Hr<300&&(ea.preventDefault(),Ht(er,er))}Qo.set(er),Xn.set(ea.timeStamp)}}})();l.on("dragstart",Wo),l.on("mousedown",us),l.on("mouseover",di),l.on("mouseup",Gm),l.on("touchend",qm.touchEnd),l.on("keyup",Ke),l.on("keydown",ie),l.on("NodeChange",Jt)}),l.on("PreInit",()=>{l.serializer.addTempAttr(Zm.firstSelected),l.serializer.addTempAttr(Zm.lastSelected)}),{getSelectedCells:()=>tv(h.get(),q([]),z=>Ne(z,G=>G.dom),z=>[z.dom]),clearSelectedCells:z=>T.clear(oe.fromDom(z))}},kv=(l,m)=>{const h=oe.fromDom(l.getBody());return vw.body(h,m)},Yc=l=>zs(l)&&l.nodeName==="TABLE",Ev="bar-",aA=l=>Yi(l,"data-mce-resize")!=="false",z_=l=>{const m=to.fromTable(l);to.hasColumns(m)||Et(vd(l),h=>{const v=bm(h,"width");cr(h,"width",v),Vo(h,"width")})},V_=l=>ix(l,"corner-"),U_=l=>tR(l,"corner-"),iA=l=>{const m=yg(),h=yg(),v=yg();let S,T,B,P;const z=ie=>Cv(l,ie),G=()=>C0(l)?ow():Ik(),ot=ie=>Op(ie).columns,Bt=ie=>Op(ie).rows,Jt=(ie,Lo,Ve,Wo)=>{const us=U_(Lo),di=Qh(us,"e"),Gm=ix(us,"n");if(T===""&&Bm(ie),P===""&&Va(ie),Ve!==S&&T!==""){cr(ie,"width",T);const Vd=G(),qm=z(ie),Qo=C0(l)||di?ot(ie)-1:0;Zg(ie,Ve-S,Qo,Vd,qm)}else if(m_(T)){const Vd=parseFloat(T.replace("%","")),qm=Ve*Vd/S;cr(ie,"width",qm+"%")}if(g_(T)&&z_(ie),Wo!==B&&P!==""){cr(ie,"height",P);const Vd=Gm?0:Bt(ie)-1;P1(ie,Wo-B,Vd)}},Kt=()=>{h.on(ie=>{ie.destroy()})};l.on("init",()=>{const ie=kv(l,aA);if(v.set(ie),v0(l)&&r_(l)){const Lo=G(),Ve=q2.create(ie,Lo,z);l.mode.isReadOnly()||Ve.on(),Ve.events.startDrag.bind(Wo=>{m.set(l.selection.getRng())}),Ve.events.beforeResize.bind(Wo=>{const us=Wo.table.dom;jm(l,us,l_(us),u_(us),Ev+Wo.type)}),Ve.events.afterResize.bind(Wo=>{const us=Wo.table,di=us.dom;gc(us),m.on(Gm=>{l.selection.setRng(Gm),l.focus()}),sh(l,di,l_(di),u_(di),Ev+Wo.type),l.undoManager.add()}),h.set(Ve)}}),l.on("ObjectResizeStart",ie=>{const Lo=ie.target;if(Yc(Lo)&&!l.mode.isReadOnly()){const Ve=oe.fromDom(Lo);Et(l.dom.select(".mce-clonedresizable"),Wo=>{l.dom.addClass(Wo,"mce-"+Zp(l)+"-columns")}),!tE(Ve)&&Ml(l)?y2(Ve):!kw(Ve)&&Id(l)&&Bm(Ve),eE(Ve)&&ix(ie.origin,Ev)&&Bm(Ve),S=ie.width,T=jp(l)?"":k0(l,Lo).getOr(""),B=ie.height,P=X2(l,Lo).getOr("")}}),l.on("ObjectResized",ie=>{const Lo=ie.target;if(Yc(Lo)){const Ve=oe.fromDom(Lo),Wo=ie.origin;V_(Wo)&&Jt(Ve,Wo,ie.width,ie.height),gc(Ve),qc(l,Ve.dom,z0)}});const Rt=()=>{h.on(ie=>{ie.on(),ie.showBars()})},Ht=()=>{h.on(ie=>{ie.off(),ie.hideBars()})};return l.on("DisabledStateChange",ie=>{ie.state?Ht():Rt()}),l.on("SwitchMode",()=>{l.mode.isReadOnly()?Ht():Rt()}),l.on("dragstart dragend",ie=>{ie.type==="dragstart"?Ht():Rt()}),l.on("remove",()=>{Kt()}),{refresh:ie=>{h.on(Lo=>Lo.refreshBars(oe.fromDom(ie)))},hide:()=>{h.on(ie=>ie.hideBars())},show:()=>{h.on(ie=>ie.showBars())}}},En=l=>{uR(l);const m=iA(l),h=rA(l,m),v=Ld(l,m,h);return sA(l,v),H_(l,v),vv(l,v),{getSelectedCells:h.getSelectedCells,clearSelectedCells:h.clearSelectedCells}},ui=l=>({table:En(l)});var vf=()=>{on.add("dom",ui)};vf()})();tinymce.Resource.add("ui/oxide/skin.css",`.tox{box-shadow:none;box-sizing:content-box;cursor:auto;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}@keyframes tox-rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.tox{color:var(--tox-private-color-black,#222f3e);font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--tox-private-font-size-base, 16px)}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);z-index:var(--tox-private-z-index-sink,1300)}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-sha
84dow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox #accessibility-issue__subheader{font-size:16px;color:#222f3e}.tox .accessbility-sr-only{position:absolute;clip:rect(1px,1px,1px,1px);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox #accessibility-issue__contentID{margin-top:8px;margin-bottom:8px}.tox #accessibility-issue__contentID span:first-child{font-weight:700}.tox #accessibility-issue__document{padding-bottom:8px}.tox .accessibility-issue__repair{margin-top:8px}.tox .accessibility-issue__repair .tox-form__group .tox-form__group--error{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:#e6f0fd;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{font-size:14px;color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon.accessibility-issue__icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:#fffae6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{font-size:14px;color:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon.accessibility-issue__icon svg{fill:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:#fae6e6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{font-size:14px;color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon.accessibility-issue__icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon.accessibility-issue__icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .mce-codemirror{background:#fff;bottom:0;font-size:13px;left:0;position:absolute;right:0;top:0;z-index:1}.tox .mce-codemirror.tox-inline-codemirror{margin:8px;position:absolute}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{border-width:var(--tox-private-button-border-width,1px);border-style:var(--tox-private-button-border-style,solid);border-radius:var(--tox-private-control-border-radius,6px);font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--tox-private-button-font-size, 14px);font-style:var(--tox-private-button-font-style,normal);font-weight:var(--tox-private-button-font-weight,bold);line-height:var(--tox-private-control-line-height, 24px);padding:var(--tox-private-button-padding-y,4px) var(--tox-private-button-padding-x,16px);text-align:center;-webkit-text-decoration:none;text-decoration:none;text-transform:none;letter-spacing:normal;box-shadow:none;box-sizing:border-box;
84cursor:pointer;outline:0;position:relative;white-space:nowrap;display:inline-flex;justify-content:center;align-items:center;gap:2px}.tox .tox-button::before{border-radius:var(--tox-private-control-border-radius,6px);bottom:calc(-1 * var(--tox-private-button-border-width,1px));box-shadow:var(--tox-private-button-focus-outline,inset 0 0 0 1px #fff,0 0 0 2px #006ce7);content:'';left:calc(-1 * var(--tox-private-button-border-width,1px));opacity:0;pointer-events:none;position:absolute;right:calc(-1 * var(--tox-private-button-border-width,1px));top:calc(-1 * var(--tox-private-button-border-width,1px))}.tox .tox-button:focus:not(:disabled){background-color:var(--tox-private-button-focus-background-color,#0060ce);background-image:none;border-color:var(--tox-private-button-focus-border-color,#0060ce);box-shadow:var(--tox-private-button-focus-box-shadow,none);color:var(--tox-private-button-focus-text-color,#fff)}.tox .tox-button:focus:not(:disabled)::before{opacity:1}.tox .tox-button.tox-button--icon,.tox .tox-button:has(.tox-icon:only-child){padding:4px}.tox .tox-button .tox-icon svg{display:block;fill:currentColor}.tox .tox-button .tox-icon.tox-icon--success svg{fill:var(--tox-private-color-success,#78AB46)}.tox .tox-button .tox-icon.tox-icon--error svg{fill:var(--tox-private-color-error,#c00)}.tox .tox-button--stretch{width:100%}.tox-context-form__group .tox-button--icon,.tox-context-form__group .tox-button.tox-button--icon{margin:6px 1px 5px 0;padding:0}.tox .tox-button{background-color:var(--tox-private-button-primary-background-color,#006ce7);background-image:none;background-position:0 0;background-repeat:repeat;color:var(--tox-private-button-primary-text-color,#fff);border-color:var(--tox-private-button-primary-border-color,#006ce7)}.tox .tox-button[disabled]{background-color:var(--tox-private-button-primary-disabled-background-color,#006ce7);background-image:none;border-color:var(--tox-private-button-primary-disabled-border-color,#006ce7);color:var(--tox-private-button-primary-disabled-text-color,rgba(255,255,255,.5));cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:var(--tox-private-button-primary-focus-background-color,#0060ce);border-color:var(--tox-private-button-primary-focus-border-color,#0060ce);color:var(--tox-private-button-primary-focus-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button:hover:not(:disabled){background-color:var(--tox-private-button-primary-hover-background-color,#0060ce);border-color:var(--tox-private-button-primary-hover-border-color,#0060ce);color:var(--tox-private-button-primary-hover-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button:active:not(:disabled){background-color:var(--tox-private-button-primary-active-background-color,#0054b4);border-color:var(--tox-private-button-primary-active-border-color,#0054b4);color:var(--tox-private-button-primary-active-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled{background-color:var(--tox-private-button-primary-enabled-background-color,#0054b4);border-color:var(--tox-private-button-primary-enabled-border-color,#0054b4);color:var(--tox-private-button-primary-enabled-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled[disabled]{color:var(--tox-private-button-primary-disabled-text-color,rgba(255,255,255,.5));cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:var(--tox-private-button-primary-enabled-focus-background-color,#00489b);border-color:var(--tox-private-button-primary-enabled-focus-border-color,#00489b);color:var(--tox-private-button-primary-enabled-focus-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:var(--tox-private-button-primary-enabled-hover-background-color,#00489b);border-color:var(--tox-private-button-primary-enabled-hover-border-color,#00489b);color:var(--tox-private-button-primary-enabled-hover-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:var(--tox-private-button-primary-enabled-active-background-color,#003c81);border-color:var(--tox-private-button-primary-enabled-active-border-color,#003c81);color:var(--tox-private-button-primary-enabled-active-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button--secondary{background-color:var(--tox-private-button-secondary-background-color,#f0f0f0);border-color:var(--tox-private-button-secondary-border-color,#f0f0f0);color:var(--tox-private-button-secondary-text-color,#222f3e);border-style:solid;border-width:1px;background-image:none;background-position:0 0;background-repeat:repeat;border-radius:6px;box-shadow:none;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;-webkit-text-decoration:none;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:var(--tox-private-button-secondary-disabled-background-color,#f0f0f0);background-image:none;border-color:var(--tox-private-button-secondary-disabled-border-color,#f0f0f0);color:var(--tox-private-button-secondary-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--secondary:focus:not(:disabled){background-color:var(--tox-private-button-secondary-focus-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-focus-border-color,#e3e3e3);color:var(--tox-private-button-secondary-focus-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary:hover:not(:disabled){background-color:var(--tox-private-button-secondary-hover-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-hover-border-color,#e3e3e3);color:var(--tox-private-button-secondary-hover-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary:active:not(:disabled){background-color:var(--tox-private-button-secondary-active-background-color,#d6d6d6);border-color:var(--tox-private-button-secondary-active-border-color,#d6d6d6);color:var(--tox-private-button-secondary-active-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled{background-color:var(--tox-private-button-secondary-enabled-background-color,#a8c8ed);border-color:var(--tox-private-button-secondary-enabled-border-color,#a8c8ed);color:var(--tox-private-button-secondary-enabled-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled[disabled]{color:var(--tox-private-button-secondary-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-focus-background-color,#93bbe9);border-color:var(--tox-private-button-secondary-enabled-focus-border-color,#93bbe9);color:var(--tox-private-button-secondary-enabled-focus-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-hover-background-color,#93bbe9);border-color:var(--tox-private-button-secondary-enabled-hover-border-color,#93bbe9);color:var(--tox-private-button-secondary-enabled-hover-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-active-background-color,#7daee4);border-color:var(--tox-private-button-secondary-enabled-active-border-color,#7daee4);color:var(--tox-private-button-secondary-enabled-active-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:var(--tox-private-button-naked-text-color,#222f3e)}.tox .tox-button--naked[disabled]{background-color:rgba(34,47,62,.12);border-color:transparent;color:var(--tox-private-button-naked-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--naked:focus:not(:disabled){background-color:var(--tox-private-button-naked-focus-background-color,rgba(34,47,62,.12));border-color:var(--tox-private-button-naked-focus-border-color,transparent);color:var(--tox-private-button-naked-focus-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked:hover:not(:disabled){background-color:var(--tox-private-button-naked-hover-background-color,rgba(34,47,62,.12));border-color:var(--tox-private-button-naked-hover-background-color,transparent);color:var(--tox-private-button-naked-hover-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked:active:not(:disabled){background-color:var(--tox-private-button-naked-active-background-color,rgba(34,47,62,.18));border-color:var(--tox-private-button-naked-active-border-color,transparent);color:var(--tox-private-button-naked-active-text-color,#222f3e);box-shadow:unset}.tox .tox-button--secondary--outline{background-color:transparent;border-color:var(--tox-private-button-secondary-outline-border-color,#f0f0f0);color:var(--tox-private-button-secondary-outline-text-color,#222f3e)}.tox .tox-button--secondary--outline:focus:not(:disabled){background-color:var(--tox-private-button-secondary-outline-focus-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-outline-focus-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-focus-text-color,#222f3e)}.tox .tox-button--secondary--outline:hover:not(:disabled){background-color:var(--tox-private-button-secondary-outline-hover-background-color,#f0f0f0);border-color:var(--tox-private-button-secondary-outline-hover-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-hover-text-color,#222f3e)}.tox .tox-button--secondary--outline:active:not(:disabled){background-color:var(--tox-private-button-secondary-outline-active-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-outline-active-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-active-text-color,#222f3e)}.tox .tox-button--secondary--outline[disabled]{background-color:var(--tox-private-button-secondary-outline-disabled-background-color,transparent);border-color:var(--tox-private-button-secondary-outline-disabled-border-color,#f0f0f0);color:var(--tox-private-button-secondary-outline-disabled-text-color,rgba(34,47,62,.5))}.tox .tox-checkbox{align-items:center;border-radius:var(--tox-private-checkbox-border-radius,6px);cursor:pointer;display:flex;height:var(--tox-private-control-height,36px);min-width:var(--tox-private-control-height,36px)}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:var(--tox-private-pad-xs,calc(4px - 1px));border-radius:var(--tox-private-checkbox-border-radius,6px);box-shadow:0 0 0 2px transparent;height:var(--tox-private-control-line-height,24px);aspect-ratio:1}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;
84fill:var(--tox-private-checkbox-unselected-color,rgba(34,47,62,0.3))}@media (forced-colors:active){.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:currentColor!important}}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:var(--tox-private-checkbox-indeterminate-color,#006ce7)}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:var(--tox-private-checkbox-selected-color,#006ce7)}.tox .tox-checkbox--disabled{color:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{box-shadow:var(--tox-private-checkbox-focus-box-shadow,inset 0 0 0 1px #006ce7)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:var(--tox-private-pad-xs,4px)}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:var(--tox-private-pad-xs,4px)}.tox[dir=rtl] .tox-checkbox__label{margin-right:var(--tox-private-pad-xs,4px)}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:var(--tox-private-pad-xs,4px)}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-image-selector-menu .tox-collection__item,.tox .tox-image-selector-menu .tox-collection__item-image-selector{flex-direction:column}.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-image,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-image{flex-grow:1}.tox .tox-image-selector-menu .tox-collection__item label,.tox .tox-image-selector-menu .tox-collection__item-image-selector label{width:48px;white-space:nowrap;overflow:hidden;font-size:12px;color:#222f3e;text-align:center;align-self:flex-end}.tox .tox-image-selector-menu .tox-collection__item-checkmark{height:24px;width:24px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tox .tox-image-selector-menu .tox-collection__item-checkmark svg path{f
84ill:#006ce7;stroke:#006ce7}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#fff}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--enabled:not(.tox-collection__item--state-disabled){z-index:2;background-color:#fff;opacity:.8;background-clip:content-box}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#006ce7;color:#fff}@media (forced-colors:active){.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){border:solid 1px}}.tox .tox-collection--grid .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#f0f0f0;color:#222f3e;position:relative;z-index:1}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 inset;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){border-radius:3px;outline:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e;background-color:#fff;position:relative}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection__item-image{border:1px solid #eee;border-radius:6px;display:flex;flex-direction:column;justify-content:center;margin-bottom:4px;position:relative}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:currentColor;display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:currentColor}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,0.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}@media (forced-colors:active){.tox .tox-hue-slider,.tox .tox-rgb-form .tox-rgba-preview{background-color:currentColor!important;border:1px solid highlight!important;forced-color-adjust:none}}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{min-width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important;box-shadow:0 0 0 1px red}.tox .tox-rgb-container{position:relative}.tox .tox-rgb-form .tox-invalid-icon{align-content:center;align-items:center;display:none;height:100%;position:absolute;right:0;top:0}.tox .tox-rgb-form .tox-invalid-icon .tox-control-wrap__status-icon-invalid{margin:0}.tox .tox-rgb-warning-note{background-color:#f5cccc;border:1px solid #f0b3b3;border-radius:3px;
84color:#77181f;padding:3px}.tox input.tox-invalid+.tox-invalid-icon{display:flex}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}@media (forced-colors:active){.tox .tox-swatches__row{forced-color-adjust:none}}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#f0f0f0}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}
84.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment{background:#fff;border:1px solid #fff;border-radius:6px;padding:8px;padding-bottom:16px;position:relative}.tox .tox-comment:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected{background-color:#fff2c9;border:1px solid #ffcf30;box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected:focus{border:2px solid #006ce7;margin:-1px}.tox .tox-comment.tox-comment--selected:focus:not(:first-child){margin-top:7px}.tox .tox-comment.tox-comment--selected .tox-comment__single{margin-bottom:12px}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus{position:relative}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus::after{top:-9px;pointer-events:none;position:absolute;content:"";display:block;bottom:-9px;left:-9px;right:-9px;border-radius:6px;border:2px solid #006ce7}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus:last-of-type:has(textarea):after{bottom:calc((12px + 16px + 1px) * -1)}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial;transition:max-height .5s cubic-bezier(0, 1, 0, 1);white-space:pre-wrap}.tox .tox-comment__body.tox-comment__body--expanded{max-height:100em;transition:max-height 1s ease-in-out}.tox .tox-comment__body.tox-comment__body--pending{transition:max-height 0s}.tox .tox-comment__body p{margin:0}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%;font-size:16px}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__expander p:focus{font-weight:700}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-tbtn.tox-comment__mention-btn{display:flex;width:34px;height:34px;padding:5px;justify-content:center;align-items:center;margin:0;background-color:transparent}.tox .tox-comment-thread{background:#fff;position:relative;border-radius:6px;background-color:transparent}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto;padding:12px;scroll-behavior:smooth}.tox .tox-comment__scroll:has(textarea:focus){scroll-behavior:auto}.tox .tox-comment--disappearing{transition:opacity .5s ease}.tox .tox-comment[data-transitioning-destination=deleting]{opacity:0}
84.tox .tox-ring-loader{width:10px;height:10px;border:1px solid #fff;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:tox-rotation 1s linear infinite}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,0.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;-webkit-text-decoration:none;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #144782;color:#144782}@media (forced-colors:active){.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid highlight;color:highlight}}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#144782;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:'';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered iframe{border-radius:6px}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #006ce7;border-radius:4px;content:'';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}@media (forced-colors:active){.tox .tox-edit-area::before{border:2px solid highlight}}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-custom-preview{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;flex:1;padding:8px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34 47 3.1%);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}@media (forced-colors:active){.tox .tox-color-input span{border-color:currentColor;border-width:2px!important;forced-color-adjust:none}}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}@media (forced-colors:active){.tox .tox-color-input span::before{border:none}}
84.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-context-form__group .tox-button--icon.tox-lock-context-form-size-input{margin-left:8px;margin-right:8px}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled],.tox .tox-toolbar-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-focusable-wrapper:focus,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus,.tox .tox-toolbar-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-toolbar-textfield{max-width:250px;min-height:unset;height:28px;margin:5px 0 6px 0}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox .tox-textfield-size{width:80px}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}@media (forced-colors:active){.tox .tox-listbox__select-chevron svg{fill:currentColor!important}}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);
84cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-selectfield select option:checked{background-color:revert;color:revert}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-image-selector-loading-spinner-wrapper{display:flex;justify-content:center;align-items:center}.tox .tox-image-selector-loading-spinner{position:absolute;width:min(24px,30%);aspect-ratio:1;border-radius:50%;border:3px solid #006ce7;border-bottom-color:transparent;animation:tox-rotation 1s linear infinite}.tox .tox-toolbar .tox-image-selector,.tox .tox-toolbar__overflow .tox-image-selector,.tox .tox-toolbar__primary .tox-image-selector{margin:5px 0 6px 11px}.tox .tox-image-selector-menu{border:0;border-radius:3px;margin:-4px -4px;padding:4px}.tox .tox-image-selector-menu .tox-collection--list .tox-collection__group{border:0;padding:0;margin:-4px -4px}.tox .tox-image-selector-menu .tox-collection__item{max-width:48px}.tox .tox-image-selector-menu .tox-collection__item-icon{border:1px solid #eee;border-radius:3px;margin-bottom:4px;width:100%}.tox .tox-image-selector-menu .tox-collection__item-icon svg path{stroke:#c00}.tox .tox-image-selector__row{display:flex}.tox .tox-image-selector--remove{align-items:center;display:flex;justify-content:center}.tox .tox-image-selector--remove svg path{stroke:#c00}.tox .tox-image-selector-image-wrapper{width:46px;height:46px;
84display:flex;align-items:center;justify-content:center}.tox .tox-image-selector-image-img{max-width:100%;max-height:100%}.tox .tox-image-selector__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-image-selector__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-image-selector__picker-btn:hover{background:#f0f0f0}.tox .tox-context-toolbar{position:absolute;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;z-index:1150;background-color:#fff;border:1px solid #e0e0e0;border-radius:9px;box-shadow:0 2px 8px rgba(0,0,0,.08);padding:4px}.tox .tox-context-toolbar[popover]{inset:auto;margin:0}.tox .tox-context-toolbar .tox-toolbar{display:flex;flex-wrap:nowrap;gap:8px}.tox .tox-context-toolbar .tox-toolbar__group{display:flex;flex-wrap:nowrap;flex-shrink:0;gap:4px;align-items:center}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:#006ce7;border-color:#eee}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox-mentions__card-common{z-index:1200}.tox.tox-mentions__card{background:#fff;border:1px solid #eee;display:flex;padding:4px 8px}.tox.tox-mentions__card .tox-mentions__container{display:flex;flex-direction:column;align-self:center;margin:0 4px}.tox .tox-mentions__avatar{width:42px;height:42px;border-radius:50%;margin-right:4px}.tox .tox-mentions__username{font-size:14px;line-height:21px;color:#222f3e}.tox .tox-mentions__description{font-size:12px;line-height:21px;color:rgba(34,47,62,.7)}.tox .tox-collection__item--active .tox-mentions__description,.tox .tox-collection__item--active .tox-mentions__username{color:inherit}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#fff;border:0;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-mbtn:focus:not(:disabled)::after{pointer-events:none;border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-mbtn:focus:not(:disabled)::after{border:2px solid highlight}}
84.tox .tox-mbtn--active,.tox .tox-mbtn:not(:disabled).tox-mbtn--active:focus{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-left:auto;margin-right:auto;margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in;width:max-content}.tox .tox-notification a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification:focus{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success a:focus,.tox .tox-notification--success a:hover{color:#24321d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success a:focus-visible{border-radius:1px;outline:2px solid #517342;outline-offset:2px}.tox .tox-notification--success a:active{color:#0d120a;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error a:focus,.tox .tox-notification--error a:hover{color:#220709;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error a:focus-visible{border-radius:1px;outline:2px solid #77181f;outline-offset:2px}.tox .tox-notification--error a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn a:focus,.tox .tox-notification--warn a:hover,.tox .tox-notification--warning a:focus,.tox .tox-notification--warning a:hover{color:#2c280d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn a:focus-visible,.tox .tox-notification--warning a:focus-visible{border-radius:1px;outline:2px solid #7a6e25;outline-offset:2px}.tox .tox-notification--warn a:active,.tox .tox-notification--warning a:active{color:#050502;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info a:focus,.tox .tox-notification--info a:hover{color:#163355;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info a:focus-visible{border-radius:1px;outline:2px solid #2a64a6;outline-offset:2px}.tox .tox-notification--info a:active{color:#0b1a2c;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;
84justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-notification-container-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-notification-container-dock-fadein{opacity:1;visibility:visible}.tox .tox-notification-container-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-notification-container-dock-transition.tox-notification-container-dock-fadein{transition-delay:0s}.tox .tox-onboarding-overlay{height:100%;background-color:#f0f0f0;position:absolute;top:0;left:0;right:0;z-index:1302;overflow:auto;display:grid;justify-content:center;align-items:center}.tox .tox-onboarding-dialog{max-width:512px;background-color:#fff;display:flex;flex-direction:column;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);border-radius:12px;margin:8px}.tox .tox-onboarding-dialog .tox-onboarding-header{color:#222f3e;display:flex;justify-content:center;align-items:center;font-size:20px;margin:24px 0 8px}.tox .tox-onboarding-dialog .tox-onboarding-step{display:grid;grid-template-columns:min-content 1fr min-content;align-items:center;margin:0 24px}.tox .tox-onboarding-dialog .tox-onboarding-step:not(:last-child){border-bottom:1px solid #e3e3e3}.tox .tox-onboarding-dialog .tox-onboarding-step--number{width:24px;aspect-ratio:1;border-radius:50%;border:1px solid #00ad0e;display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:700;color:#00ad0e}.tox .tox-onboarding-dialog .tox-onboarding-step--body{padding:24px 0 24px 16px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-onboarding-dialog .tox-onboarding-step--action{padding-left:24px}.tox .tox-onboarding-dialog .tox-onboarding-footer{background-color:#f0f0f0;display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.tox .tox-onboarding-dialog .tox-onboarding-footer p{display:flex;align-items:center;justify-content:center;gap:4px;font-size:14px;color:rgba(34,47,62,.7)}.tox .tox-onboarding-dialog svg{width:24px;fill:rgba(34,47,62,0.7)}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin{display:grid;align-items:center;grid-template-columns:min-content 1fr min-content;border-bottom:1px solid #e3e3e3;padding:24px 0;margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body{margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--icon{display:grid;place-content:center;width:56px;height:56px;line-height:24px;font-size:24px;border-radius:12px;background:linear-gradient(180deg,#fff 24%,#f0f0f0 100%);box-shadow:0 1px 1px 0 #222f3e12,0 3px 6px 0 #222f3e06;color:#006ce7}.tox .tox-promotion-dialog--subtitle{margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore{text-align:center;margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore a{color:#006ce7}.tox .tox-promotion-dialog--footer{background-color:#f0f0f0;color:rgba(34,47,62,.7);font-size:12px;text-align:center;padding:16px}.tox .tox-promotion-button{display:flex;align-items:center;height:26.6px;line-height:26.6px;font-size:14px;font-weight:700;background-color:#f1ebf9;color:#851aff;padding:8px 16px;cursor:pointer;white-space:nowrap;border-radius:5px}.tox .tox-promotion-button:focus{outline:1px solid #851AFF}.tox .tox-onboarding-dialog a,.tox .tox-promotion-dialog--footer a{color:rgba(34,47,62,.7);cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus,.tox .tox-onboarding-dialog a:hover,.tox .tox-promotion-dialog--footer a:focus,.tox .tox-promotion-dialog--footer a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus-visible,.tox .tox-promotion-dialog--footer a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-onboarding-dialog a:active,.tox .tox-promotion-dialog--footer a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}@media (forced-colors:active){.tox .tox-pop::after,.tox .tox-pop::before{content:none}}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;
84top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:var(--tox-private-sidebar-background-color,#f0f0f0);display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-sidebar-content{display:flex;flex-direction:column;position:relative;height:100%;min-width:300px;max-width:300px;width:300px;border-left:1px solid var(--tox-private-sidebar-border-color,#e3e3e3)}.tox .tox-sidebar-content__header{align-items:center;display:flex;justify-content:space-between;box-shadow:var(--tox-private-sidebar-header-box-shadow,0 4px 8px 0 rgba(34,47,62,.1));padding:var(--tox-private-pad-sm,8px) 12px;background:var(--tox-private-background-color,#fff);z-index:1}.tox .tox-sidebar-content__header .tox-sidebar-content__header-close-button{margin-left:auto}.tox .tox-sidebar-content__title{font-size:var(--tox-private-font-size-lg, 20px);font-weight:var(--tox-private-font-weight-normal,normal);padding:var(--tox-private-pad-sm,8px) 0 var(--tox-private-pad-sm,8px) 0;color:var(--tox-private-text-color,#222f3e);line-height:28px}.tox .tox-floating-sidebar{--tox-private-floating-sidebar-requested-height:600px;--tox-private-floating-sidebar-width:min(380px, 90vw);--tox-private-floating-sidebar-height:min(var(--tox-private-floating-sidebar-requested-height), 80vh);box-shadow:var(--tox-private-floating-sidebar-box-shadow,0 0 40px 1px rgba(34,47,62,.15),0 16px 16px -10px rgba(34,47,62,.15));width:var(--tox-private-floating-sidebar-width);height:var(--tox-private-floating-sidebar-height);background-color:var(--tox-private-background-color,#fff);border-radius:12px;overflow:hidden}.tox .tox-floating-sidebar__content-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.tox .tox-floating-sidebar__header{position:relative}.tox-ai .tox-ai__user-prompt{display:flex;flex-direction:column;margin-left:auto;gap:inherit}.tox-ai .tox-ai__user-prompt__context{margin-left:auto}.tox-ai .tox-ai__user-prompt__text{background-color:var(--tox-private-ai-user-prompt-background,#f0f0f0);padding:var(--tox-private-pad-sm,8px) 12px;border-radius:var(--tox-private-control-border-radius,6px);max-width:80%;align-self:flex-end;color:var(--tox-private-text-color,#222f3e)}.tox-ai .tox-ai__scroll{overflow:auto;background-color:var(--tox-private-background-color,#fff);display:flex;padding:12px;flex-direction:column;align-items:flex-start;gap:12px;flex:1 0 0;align-self:stretch}.tox-ai .tox-ai__response-content{padding:var(--tox-private-pad-sm,8px) 0;color:var(--tox-private-text-color,#222f3e);font-feature-settings:'liga' off,'clig' off;font-size:var(--tox-private-font-size-sm, 14px);font-style:normal;
84font-weight:var(--tox-private-font-weight-normal,normal);line-height:var(--tox-private-line-height, 18px);white-space:pre-wrap}.tox-ai .tox-ai__response.tox-ai__response-streaming{background:linear-gradient(180deg,var(--tox-private-color-black,#222f3e) 0,transparent 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.tox-ai .tox-ai__error-message{border-radius:var(--tox-private-panel-border-radius,6px);border:1px solid var(--tox-private-color-error,#c00);background:linear-gradient(0deg,color-mix(in srgb,var(--tox-private-color-white,#fff) 90%,transparent) 0,color-mix(in srgb,var(--tox-private-color-white,#fff) 90%,transparent) 100%),var(--tox-private-color-error,#c00);padding:var(--tox-private-pad-sm,8px);width:100%}.tox-ai .tox-ai__footer{border-top:1px solid var(--tox-private-ai-footer-border-color,#e3e3e3);padding:12px;gap:var(--tox-private-pad-sm,8px);background-color:var(--tox-private-background-color,#fff);display:flex;flex-direction:column}.tox-ai .tox-ai__context{display:flex;gap:8px}.tox-ai .tox-ai__footer-actions{display:flex;gap:var(--tox-private-pad-sm,8px)}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-skeleton .tox-skeleton__line{height:16px;width:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}.tox .tox-skeleton .tox-skeleton__circle{height:36px;width:36px;margin-right:8px;border-radius:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}@keyframes wave{0%{background-position:-268px 0}100%{background-position:268px 0}}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-toolbar-slider{align-items:center;display:inline-flex;height:16px}.tox .tox-toolbar-slider__input{appearance:none;background:#eee;border-radius:16px;width:130px;height:2px}.tox .tox-toolbar-slider__input::-webkit-slider-runnable-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-moz-range-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-webkit-slider-thumb{-webkit-appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input::-moz-range-thumb{appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input:focus-visible{outline:0}.tox .tox-toolbar-slider__input:focus::-webkit-slider-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:focus::-moz-range-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:hover::-webkit-slider-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:hover::-moz-range-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:active::-webkit-slider-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input:active::-moz-range-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input[disabled]::-webkit-slider-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-toolbar-slider__input[disabled]::-moz-range-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:first-child{animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-ai__spinner{width:24px;height:24px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{align-items:flex-start;display:flex;flex:1 1 auto;height:16px;justify-content:space-between}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);position:relative;-webkit-text-decoration:none;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,0.8);height:1em;margin-left:.3em;width:auto}@media (forced-colors:active){.tox .tox-statusbar__branding svg{fill:currentColor}}.tox .tox-statusbar__branding a{align-items:center;display:inline-flex}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-cursor-default{cursor:ns-resize}
84.tox .tox-statusbar__resize-cursor-both{cursor:nwse-resize}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;display:flex;flex:0 0 auto;justify-content:flex-end;margin-bottom:3px;margin-left:4px;margin-right:calc(3px - 8px);margin-top:3px;padding-bottom:0;padding-left:0;padding-right:0;position:relative}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,0.5)}.tox .tox-statusbar__resize-handle:focus svg,.tox .tox-statusbar__resize-handle:hover svg{fill:#222f3e}.tox .tox-statusbar__resize-handle:focus-visible{background-color:transparent;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px transparent}.tox .tox-statusbar__resize-handle:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar__resize-handle:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__resize-handle:only-child{margin-left:auto}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox[dir=rtl] .tox-statusbar__branding svg{margin-left:0;margin-right:.3em}.tox .tox-tag{width:-moz-fit-content;width:fit-content;display:flex;padding:4px 6px;align-items:center;gap:4px;border-radius:3px;background:linear-gradient(0deg,color-mix(in srgb,var(--tox-private-color-white,#fff) 90%,transparent) 0,color-mix(in srgb,var(--tox-private-color-white,#fff) 90%,transparent) 100%),var(--tox-private-color-tint,#006ce7);line-height:var(--tox-private-base-value, 16px);font-size:var(--tox-private-font-size-xs, 12px)}.tox .tox-tag .tox-tag__icon{height:var(--tox-private-base-value,16px)}.tox .tox-tag .tox-tag__close{height:var(--tox-private-base-value,16px)}.tox .tox-tag .tox-tag__close .tox-button.tox-button--icon{border:0;padding:0}.tox .tox-tag .tox-tag__close .tox-button.tox-button--icon::before{box-shadow:none}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-toggle{display:flex;align-items:center;gap:var(--tox-private-pad-xs,4px);padding:var(--tox-private-pad-xs,4px);font-weight:var(--tox-private-font-weight-normal,normal);line-height:var(--tox-private-control-line-height, 24px);white-space:nowrap;background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e)}.tox .tox-toggle input{position:absolute;opacity:0;width:0;height:0}.tox .tox-toggle__slider{position:relative;cursor:pointer;box-sizing:border-box;transition:.4s;border-radius:34px;width:28px;height:16px;background-color:var(--tox-private-slider-background-color,#fff);border:1px solid var(--tox-private-slider-border-color,#e3e3e3)}.tox .tox-toggle__slider::before{position:absolute;content:"";height:12px;width:12px;left:1px;bottom:1px;transition:.4s;border-radius:50%;background-color:var(--tox-private-slider-handle-background-color,#222f3e)}.tox input:checked+.tox-toggle__slider{background-color:var(--tox-private-slider-checked-background-color,#006ce7);border:1px solid var(--tox-private-slider-checked-border-color,#006ce7)}.tox input:focus+.tox-toggle__slider{box-shadow:0 0 0 1px var(--tox-private-color-white,#fff),0 0 0 2px var(--tox-private-color-tint,#006ce7)}.tox input:checked+.tox-toggle__slider::before{transform:translateX(12px);background-color:var(--tox-private-slider-checked-handle-background-color,#fff)}.tox input:disabled+.tox-toggle__slider::before{opacity:50%}.tox .tox-tbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;padding:0;text-transform:none;width:34px}.tox .tox-tbtn .tox-tbtn__icon-wrap{pointer-events:none}@media (forced-colors:active){.tox .tox-tbtn.tox-tbtn:hover,.tox .tox-tbtn:hover{outline:1px dashed currentColor}.tox .tox-tbtn.tox-tbtn--active,.tox .tox-tbtn.tox-tbtn--enabled,.tox .tox-tbtn.tox-tbtn--enabled:focus,.tox .tox-tbtn.tox-tbtn--enabled:hover,.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){outline:1px solid currentColor;position:relative}}.tox .tox-tbtn svg{display:block;fill:#222f3e}@media (forced-colors:active){.tox .tox-tbtn svg{fill:currentColor!important}.tox .tox-tbtn svg.tox-tbtn--enabled,.tox .tox-tbtn svg:focus:not(.tox-tbtn--disabled){fill:currentColor!important}.tox .tox-tbtn svg .tox-tbtn:disabled,.tox .tox-tbtn svg .tox-tbtn:disabled:hover,.tox .tox-tbtn svg.tox-tbtn--disabled,.tox .tox-tbtn svg.tox-tbtn--disabled:hover{filter:contrast(0%)}}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#fff;border:0;box-shadow:none;position:relative;z-index:1}.tox .tox-tbtn:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn:focus::after{border:2px solid highlight}}.tox .tox-tbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--active,.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:focus,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e;position:relative}.tox .tox-tbtn--active>*,.tox .tox-tbtn--enabled:focus>*,.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--active svg,.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:focus svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--active.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:focus.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--enabled:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn--enabled:focus::after{border:2px solid highlight}}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-label--context-toolbar{margin:6px 1px 5px 0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-number-input{background:#f7f7f7;border-radius:3px;display:flex;margin:6px 1px 5px 0;position:relative;width:auto}.tox .tox-number-input:focus{background:#f7f7f7}.tox .tox-number-input:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper{display:flex;pointer-events:none;position:relative;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background-color:#f7f7f7;z-index:1}.tox .tox-number-input .tox-input-wrapper:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border:2px solid highlight}}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;position:relative;width:60px}.tox .tox-number-input input:hover{background:#f0f0f0;color:#222f3e}.tox .tox-number-input input:focus{background-color:#f7f7f7}.tox .tox-number-input input:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{color:#222f3e;height:28px;position:relative;text-align:center;width:24px}@media (forced-colors:active){.tox .tox-number-input button:active,.tox .tox-number-input button:focus,.tox .tox-number-input button:hover{outline:1px solid currentColor!important}}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}@media (forced-colors:active){.tox .tox-number-input button svg,.tox .tox-number-input button svg:active,.tox .tox-number-input button svg:hover{fill:currentColor!important}.tox .tox-number-input button svg:disabled{filter:contrast(0)}}.tox .tox-number-input button:focus{background:#f7f7f7;z-index:1}.tox .tox-number-input button:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input button:focus::after{border:2px solid highlight}}.tox .tox-number-input button:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#f7f7f7}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn--bordered,.tox .tox-tbtn--bordered:focus,.tox .tox-tbtn--bordered:hover{border:1px solid #eee}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-tbtn__select-chevron svg{fill:currentColor}}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke:focus{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button__main{border-radius:3px 0 0 3px;margin-right:0}.tox .tox-split-button__main:focus{border:0;box-shadow:none;background:#fff;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button__main:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:3px 0 0 3px}@media (forced-colors:active){.tox .tox-split-button__main:focus::after{border:2px solid highlight}}.tox .tox-split-button__chevron{width:16px;border-radius:0 3px 3px 0;margin-left:0}.tox .tox-split-button__chevron:focus{border:0;box-shadow:none;background:#fff;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button__chevron:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:0 3px 3px 0}@media (forced-colors:active){.tox .tox-split-button__chevron:focus::after{border:2px solid highlight}}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-split-button__chevron svg{fill:currentColor}}.tox.tox-platform-touch .tox-split-button__main{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button__chevron.tox-tbtn--disabled,.tox .tox-split-button__main.tox-tbtn--disabled{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__chevron.tox-tbtn--disabled:hover,.tox .tox-split-button__main.tox-tbtn--disabled:hover{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__chevron.tox-tbtn--disabled:focus,.tox .tox-split-button__main.tox-tbtn--disabled:focus{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__main.tox-tbtn--disabled svg .tox-icon-highlight-bg-color__color,.tox .tox-split-button__main.tox-tbtn--disabled svg .tox-icon-text-color__color{op
84acity:.3}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0px)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}@media (forced-colors:active){.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{outline:1px solid currentColor}}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox .tox-focusable-wrapper{border:1px solid transparent;margin-right:2px;pointer-events:none}.tox .tox-focusable-wrapper .tox-textfield-size{pointer-events:all}.tox .tox-focusable-wrapper:focus{background-color:#f7f7f7;border-radius:6px;border-style:solid;border-width:1px}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}@media (forced-colors:active){.tox.tox-tinymce-aux .tox-toolbar__overflow{border:solid}}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox-context-form__group{display:flex;align-items:center}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-tooltip{display:inline-block;max-width:min(80%,15em);padding:8px 0 0 0;position:relative;width:max-content;z-index:1150}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:none;color:#fff;font-size:12px;font-style:normal;font-weight:600;overflow-wrap:break-word;padding:4px 6px;text-transform:none}@media (forced-colors:active){.tox .tox-tooltip__body{outline:outset 1px}}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}
84.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#f0f0f0;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-icon-custom-state{flex-grow:1;display:flex;justify-content:flex-end}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}[data-mce-name=uploadcare-enhance-filter] .color-swatch-remove-color path{fill:#c00;stroke:#c00}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column;height:100%}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden;background-color:#fff}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:10px;position:relative}.tox .tox-view__label{color:#222f3e;font-weight:700;line-height:24px;padding:4px 16px;text-align:center;white-space:nowrap}.tox .tox-view__label--normal{font-size:16px}.tox .tox-view__label--large{font-size:20px}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__align-right{margin-left:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;overflow-x:auto;padding:10px}
84.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;position:relative;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-view .tox-revisionhistory__pane{padding:0}.tox .tox-revisionhistory__container{display:flex;flex-direction:column;height:100%}.tox .tox-revisionhistory{background-color:#fff;border-top:1px solid #f0f0f0;display:flex;flex:1;height:100%;overflow-x:auto;overflow-y:hidden;position:relative;width:100%}.tox .tox-revisionhistory__iframe{flex:1}.tox .tox-revisionhistory__sidebar{display:flex;flex-direction:column;height:100%;min-width:248px;width:316px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__sidebar-title{background-color:#fff;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);color:#222f3e;font-size:20px;font-weight:400;line-height:28px;padding:12px;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions{background-color:#f0f0f0;display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:10px 12px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus{height:100%;position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;bottom:1px;left:1px;right:1px;top:1px}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card{background-color:#fff;border:1px solid #f0f0f0;border-radius:6px;color:#222f3e;cursor:pointer;display:flex;flex-direction:column;font-size:14px;padding:12px;width:100%}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #006ce7;box-shadow:0 0 0 2px #006ce7!important}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected{background-color:#fff5cc;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);position:relative}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #e3b82a;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #e3b82a}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-label{display:block;width:min-content;padding:4px 8px;margin-bottom:8px;font-size:12px;font-weight:700;border-radius:4px;background:#d3d5d8}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-content{display:flex;flex-direction:row;gap:8px;align-items:center}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-info{display:flex;flex-direction:column;flex:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date-label{font-size:14px;font-weight:700;line-height:18px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__avatar{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__norevision{color:rgba(34,47,62,.7);font-size:16px;line-height:24px;padding:5px 5.5px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-check-icon{color:#222f3e;height:24px}.tox [data-mce-name=suggestededits] .tox-icon .tox-icon--badge{fill:#006ce7}.tox .tox-view .tox-suggestededits__pane{padding:0}.tox .tox-suggestededits__sink{position:relative;z-index:1000}.tox .tox-suggestededits__sink .tox-tiered-menu .tox-collection--list{position:absolute}.tox .tox-suggestededits__container{height:100%;display:flex;flex-direction:column}.tox .tox-suggestededits__container .tox-suggestededits{background-color:#fff;border-top:1px solid #eee;display:flex;flex:1;height:inherit;overflow-x:auto;overflow-y:hidden;position:relative}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__content{flex:1}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__model{height:100%;position:relative}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__model .tox-suggestededits__iframe{height:100%;width:100%;overflow:scroll;background-color:#fff}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar{background-color:#f0f0f0;
84display:flex;flex-direction:column;flex:0 1 auto;min-width:248px;width:316px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-header{padding:4px 12px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content{display:flex;flex:1;flex-direction:column;gap:12px;overflow:auto;padding:6px 12px 12px 12px;position:relative}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card{background-color:#fff;border-radius:6px;padding:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--divider{background-color:#f0f0f0;height:1px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--editor,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--single{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:6px;padding:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header{display:flex;flex:auto;justify-content:space-between;align-items:center;gap:8px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user{display:flex;align-items:center;flex:1 0 0;gap:8px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user .tox-suggestededits__card--avatar{height:24px;width:24px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user .tox-suggestededits__card--avatar .tox-skeleton__circle,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user .tox-suggestededits__card--avatar img{height:24px;width:24px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user .tox-suggestededits__card--details{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--user .tox-suggestededits__card--details .tox-suggestededits__card--name{color:#222f3e}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--feedback-user{display:flex;align-items:center;flex:1 0 0;gap:8px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--feedback-user .tox-suggestededits__card--avatar{height:36px;width:36px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--feedback-user .tox-suggestededits__card--details{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--feedback-user .tox-suggestededits__card--details .tox-suggestededits__card--name{color:#222f3e;font-size:14px;font-weight:700}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--feedback-user .tox-suggestededits__card--detail
84s .tox-suggestededits__card--timestamp{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution{align-items:center;border:0;border-radius:20px;height:20px;width:20px;display:flex;flex:0 0 auto;justify-content:center;text-align:center}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution.tox-suggestededits__resolution--accepted .tox-icon svg{fill:#78AB46}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution.tox-suggestededits__resolution--rejected .tox-icon svg{fill:#c00}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content{display:flex;flex-direction:column;align-self:stretch;flex:auto;gap:6px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations{display:flex;gap:8px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-bar{align-items:center;border-radius:6px;display:flex;flex-direction:column;font-size:12px;justify-content:space-between;width:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-bar--insert{background-color:#78ab46;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-bar--modify{background-color:#006ce7;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-bar--remove{background-color:#c00;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-text{color:#222f3e;font-weight:700}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__card--feedback{color:#222f3e;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__card--textarea{border:2px solid #eee;border-radius:6px;color:#222f3e;gap:8px;padding:5px 6px;resize:none;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__card--textarea:focus{border:2px solid #006ce7}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--footer{display:flex;flex-direction:column;gap:6px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--footer .tox-suggestededits__card--timestamp{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--footer .tox-suggestededits__card--timestamp .tox-icon svg{fill:#222F3E80;transform:translate(0,8px);margin-top:-10px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--buttons{display:flex;align-items:center;gap:8px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--buttons.tox-suggestededits__card--review-buttons{justify-content:space-between;padding:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--buttons.tox-suggestededits__card--feedback-buttons{justify-content:flex-end}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--hidden{opacity:.5}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--resolved{background-color:#d3d5d8}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active:focus,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active:focus-visible{outline:2px solid #006ce7}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active .tox-suggestededits__card--single{border-radius:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active .tox-suggestededits__card--single:focus,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active .tox-suggestededits__card--single:focus-visible{outline:2px solid #006ce7}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card:hover{box-shadow:0 4px 8px 0 #d3d5d8}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}
84.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}`);tinymce.Resource.add("ui/oxide/content.css",`@keyframes tox-rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center}.mce-content-body .mce-item-anchor:empty{cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor:not(:empty){background-position-x:2px;display:inline-block;padding-left:12px}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment[contenteditable=false]:not([data-mce-selected]),.tox-comments-visible span.tox-comment img:not([data-mce-selected]),.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment>video:not([data-mce-selected]){outline:3px solid #ffe796}.tox-comments-visible .tox-comment[contenteditable=false][data-mce-annotation-active=true]:not([data-mce-selected]){outline:3px solid #ffcf30}.tox-comments-visible span.tox-comment:not([data-mce-selected]){background-color:#ffe796;outline:0}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]:not([data-mce-selected=inline-boundary]){background-color:#ffcf30}.tox-comments-visible span.tox-comment[data-mce-selected]{background-color:#ffcf30;border-radius:3px;box-shadow:0 0 0 2px #006ce7}.tox-comments-visible span.tox-comment[data-mce-selected]:has(img[data-mce-selected],> audio[data-mce-selected],> video[data-mce-selected],span.mce-preview-object[data-mce-selected]){box-shadow:none}.tox-comments-visible span.tox-comment[data-mce-selected] img:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected] span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected]>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected]>video:not([data-mce-selected]){box-shadow:0 0 0 5px #006ce7}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] img:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>video:not([data-mce-selected]){outline:3px solid #ffcf30}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3
84E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;tab-size:4;hyphens:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}div.mce-footnotes hr{margin-inline:0 auto;width:25%}div.mce-footnotes li>a.mce-footnotes-backlink{-webkit-text-decoration:none;text-decoration:none}@media print{sup.mce-footnote a{color:#000;-webkit-text-decoration:none;text-decoration:none}div.mce-footnotes{page-break-inside:avoid;break-inside:avoid;width:100%}div.mce-footnotes li>a.mce-footnotes-backlink{display:none}}tiny-math-block{display:flex;justify-content:center;margin:16px 0 16px 0}tiny-math-inline{display:inline-block}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px;position:relative}.mce-preview-object .mce-shim{background:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-content-body .mce-mergetag{cursor:default!important;-webkit-user-select:none;user-select:none}.mce-content-body .mce-mergetag:hover{background-color:rgba(0,108,231,.1)}.mce-content-body .mce-mergetag-affix{background-color:rgba(0,108,231,.1);color:#006ce7}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3
84E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}@media (forced-colors:active){.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:highlight;filter:brightness(30%);z-index:-1}}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}@media print{.mce-content-body .mce-placeholder,.mce-content-body [data-mce-bogus=all],.mce-content-body [data-mce-bogus]{display:none!important}.mce-content-body .mce-visual-caret{display:none!important}.mce-content-body .mce-edit-focus,.mce-content-body :focus,.mce-content-body [data-mce-selected]{outline:0!important}}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:1298}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:first-of-type{cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed black;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0 0 0%);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;
84color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body details[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}.mce-content-body img[data-mce-selected]::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.tox-suggestededits__annotation--added,.tox-suggestededits__annotation--modified,.tox-suggestededits__annotation--removed{-webkit-text-decoration:none;text-decoration:none}.tox-suggestededits__annotation--added__highlight{background-color:rgba(120,171,70,.2);-webkit-text-decoration:underline;text-decoration:underline}.tox-suggestededits__annotation--added__selected{background-color:rgba(120,171,70,.2);box-shadow:0 -2px 0 0 #006ce7 inset,0 -2px 0 0 #006ce7;-webkit-text-decoration:none;text-decoration:none}.tox-suggestededits__annotation--modified__highlight{background-color:rgba(0,108,231,.2);-webkit-text-decoration:underline;text-decoration:underline}.tox-suggestededits__annotation--modified__selected{background-color:rgba(0,108,231,.2);box-shadow:0 -2px 0 0 #006ce7 inset,0 -2px 0 0 #006ce7;-webkit-text-decoration:none;text-decoration:none}.tox-suggestededits__annotation--removed__highlight{background-color:rgba(204,0,0,.2);-webkit-text-decoration:line-through;text-decoration:line-through}.tox-suggestededits__annotation--removed__selected{background-color:rgba(204,0,0,.2);box-shadow:0 -2px 0 0 #006ce7 inset,0 -2px 0 0 #006ce7;-webkit-text-decoration:line-through;text-decoration:line-through}.tox-suggestededits__annotation--added.tox-suggestededits__annotation--added__hidden,.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--modified__hidden,.tox-suggestededits__annotation--removed.tox-suggestededits__annotation--removed__hidden{display:none;-webkit-text-decoration:none;text-decoration:none}:has(> div > iframe).tox-suggestededits__annotation--added,:has(> div > iframe).tox-suggestededits__annotation--modified,:has(> div > iframe).tox-suggestededits__annotation--removed{padding:7px;margin:5px}iframe.tox-suggestededits__annotation--added__highlight,img.tox-suggestededits__annotation--added__highlight,video.tox-suggestededits__annotation--added__highlight{outline:.25em solid rgba(120,171,70,.2);padding:.25em}iframe.tox-suggestededits__annotation--added__selected,img.tox-suggestededits__annotation--added__selected,video.tox-suggestededits__annotation--added__selected{border:.25em solid rgba(120,171,70,.2);outline:.125em solid #006ce7;padding:0}iframe.tox-suggestededits__annotation--modified__highlight,img.tox-suggestededits__annotation--modified__highlight,video.tox-suggestededits__annotation--modified__highlight{outline:.25em solid rgba(0,108,231,.2);padding:.25em}iframe.tox-suggestededits__annotation--modified__selected,img.tox-suggestededits__annotation--modified__selected,video.tox-suggestededits__annotation--modified__selected{border:.25em solid rgba(0,108,231,.2);outline:.125em solid #006ce7;padding:0}iframe.tox-suggestededits__annotation--removed__highlight,img.tox-suggestededits__annotation--removed__highlight,video.tox-suggestededits__annotation--removed__highlight{outline:.25em solid rgba(204,0,0,.2);padding:.25em}iframe.tox-suggestededits__annotation--removed__selected,img.tox-suggestededits__annotation--removed__selected,video.tox-suggestededits__annotation--removed__selected{border:.25em solid rgba(204,0,0,.2);outline:.125em solid #006ce7;padding:0}div.tox-suggestededits__annotation:has(> hr){padding:.25em}div.tox-suggestededits__annotation--removed__highlight>hr{border-color:rgba(0,0,0,.2)}div.tox-suggestededits__annotation--added__highlight>hr{border-color:rgba(0,0,0,.2)}.mce-pagebreak.tox-suggestededits__annotation--added__selected,.mce-pagebreak.tox-suggestededits__annotation--modified__selected,.mce-pagebreak.tox-suggestededits__annotation--removed__selected{border:1px dashed #aaa;box-shadow:none}.mce-pagebreak.tox-suggestededits__annotation--added__highlight,.mce-pagebreak.tox-suggestededits__annotation--modified__highlight,.mce-pagebreak.tox-suggestededits__annotation--removed__highlight{padding:0}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc ul>li{list-style-type:none}[data-mce-block]{display:block}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.tox-uc-loading-background{width:100%;height:100%;background:rgba(255,255,255,.5)}.tox-uc-loading-spinner-wrapper{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tox-uc-loading-spinner{width:min(24px,30%);aspect-ratio:1;border-radius:50%;border:3px solid #006ce7;border-bottom-color:transparent;animation:tox-rotation 1s linear infinite}.tox-uc-video{display:block;position:relative;margin:16px 0 16px 0}.tox-uc-video:not([data-mce-selected]):after{content:"";position:absolute;top:0;left:0;width:100%;height:100%}.tox-uploadcare-placeholder{all:initial;display:inline-block;position:relative;width:min(100%,600px);height:80px;--tox-uploadcare-placeholder--content-cursor:auto!important;--tox-uploadcare-placeholder--content-color:rgba(34, 47, 62, 0.7);--tox-uploadcare-placeholder--content-background-color:#fff;--tox-uploadcare-placeholder--content-border:2px solid #e3e3e3;--tox-uploadcare-placeholder--content-font-family:monospace,sans-serif;--tox-uploadcare-placeholder--content-height:100%;--tox-uploadcare-placeholder--content-width:100%;--tox-uploadcare-placeholder--content-display:inline-flex;--tox-uploadcare-placeholder--content-align-items:center;--tox-uploadcare-placeholder--content-justify-content:center;--tox-uploadcare-placeholder--content-gap:8px;--tox-uploadcare-placeholder--icon-fill:rgba(34, 47, 62, 0.7);--tox-uploadcare-placeholder--icon-min-width:24px;--tox-uc-loading-spinner-wrapper-display-none:none;--tox-uc-loading-spinner-wrapper-display:flex;--tox-uc-loading-spinner-wrapper-position:absolute;--tox-uc-loading-spinner-wrapper-top:0;--tox-uc-loading-spinner-wrapper-left:0;--tox-uc-loading-spinner-wrapper-width:100%;--tox-uc-loading-spinner-wrapper-height:100%;--tox-uc-loading-spinner-wrapper-justify-content:center;--tox-uc-loading-spinner-wrapper-align-items:center;--tox-uc-loading-spinner-aspect-ratio:1/1;
84--tox-uc-loading-spinner-width:min(24px, 30%);--tox-uc-loading-spinner-border-radius:50%;--tox-uc-loading-spinner-border:3px solid #006ce7;--tox-uc-loading-spinner-border-bottom-color:transparent;--tox-uc-loading-spinner-animation:tox-rotation 1s linear infinite}@media print{tiny-uploadcare-placeholder{display:none!important}}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A
841/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}[data-ephox-foam-a11y-violation]{outline:2px solid;position:relative}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation]{outline-width:4px;transition:outline-width .1s ease-in-out,background-color .1s ease-in-out;box-shadow:0 0 0 99999px #222f3e80;z-index:1}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-info]{outline-color:#006ce7}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-warn]{outline-color:#fc0}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-error]{outline-color:#c00}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=info]{outline-color:#006ce7;background-color:#e6f0fd}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=warning]{outline-color:#fc0;background-color:#fffae6}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=error]{outline-color:#c00;background-color:#fae6e6}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation]:is(td,th,tr){position:static}body{font-family:sans-serif}table{border-collapse:collapse}`);tinymce.Resource.add("content/default/content.css",`body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}
84.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}`);(function(){var on=tinymce.util.Tools.resolve("tinymce.PluginManager");const pn=(te,Pe,pt)=>{var It;return pt(te,Pe.prototype)?!0:((It=te.constructor)==null?void 0:It.name)===Pe.name},ae=te=>{const Pe=typeof te;return te===null?"null":Pe==="object"&&Array.isArray(te)?"array":Pe==="object"&&pn(te,String,(pt,It)=>It.isPrototypeOf(pt))?"string":Pe},qe=te=>Pe=>ae(Pe)===te,So=te=>Pe=>te===Pe,xo=qe("string"),un=So(void 0),$e=te=>te==null,hn=te=>!$e(te),He=te=>Pe=>!te(Pe),ca=Object.hasOwnProperty,Xa=(te,Pe)=>ca.call(te,Pe),Ta=(te,Pe,pt)=>te.length>=Pe.length&&te.substr(pt,pt+Pe.length)===Pe,zs=(te,Pe,pt=0,It)=>{const F=te.indexOf(Pe,pt);return F!==-1?un(It)?!0:F+Pe.length<=It:!1},Da=(te,Pe)=>Ta(te,Pe,0),$n="\uFEFF",ke=te=>te===$n,la=te=>te.replace(/\uFEFF/g,""),Oa=()=>/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g,q=te=>Pe=>Pe.options.get(te),mo=te=>{const Pe=te.options.register;Pe("autolink_pattern",{processor:"regexp",default:new RegExp("^"+Oa().source+"$","i")}),Pe("link_default_target",{processor:"string"}),Pe("link_default_protocol",{processor:"string",default:"https"})},Ja=q("autolink_pattern"),lo=q("link_default_target"),nt=q("link_default_protocol"),eo=q("allow_unsafe_link_target");var Gn=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const so=te=>te.nodeType===3,mt=te=>te.nodeType===1,X=te=>/^[(\[{ \u00a0]$/.test(te),sr=te=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(te),Fo=te=>/[?!,.;:]/.test(te),_e=(te,Pe,pt)=>{for(let It=Pe-1;It>=0;It--){const F=te.charAt(It);if(!ke(F)&&pt(F))return It}return-1},k=(te,Pe)=>{let pt=te,It=Pe;for(;mt(pt)&&pt.childNodes[It];)pt=pt.childNodes[It],It=so(pt)?pt.data.length:pt.childNodes.length;return{container:pt,offset:It}},Fn=(te,Pe)=>{const pt=te.schema.getVoidElements(),It=Ja(te),{dom:F,selection:Vr}=te;if(F.getParent(Vr.getNode(),"a[href]")!==null||te.mode.isReadOnly())return null;const Io=Vr.getRng(),An=Gn(F,de=>F.isBlock(de)||Xa(pt,de.nodeName.toLowerCase())||F.getContentEditable(de)==="false"||F.getParent(de,"a[href]")!==null),{container:Zo,offset:ru}=k(Io.endContainer,Io.endOffset),xt=F.getParent(Zo,F.isBlock)??F.getRoot(),$t=An.backwards(Zo,ru+Pe,(de,Je)=>{const We=de.data,Vn=_e(We,Je,He(X));return Vn===-1||Fo(We[Vn])?Vn:Vn+1},xt);if(!$t)return null;let wt=$t.container;const Y=An.backwards($t.container,$t.offset,(de,Je)=>{wt=de;const We=_e(de.data,Je,X);return We===-1?We:We+1},xt),po=F.createRng();Y?po.setStart(Y.container,Y.offset):po.setStart(wt,0),po.setEnd($t.container,$t.offset);const st=la(po.toString()).match(It);if(st){let de=st[0];return Da(de,"www.")?de=nt(te)+"://"+de:zs(de,"@")&&!sr(de)&&(de="mailto:"+de),{rng:po,url:de}}else return null},Ut=(te,Pe)=>{const{dom:pt,selection:It}=te,{rng:F,url:Vr}=Pe,Io=It.getBookmark();It.setRng(F);const An="createlink",Zo={command:An,ui:!1,value:Vr};if(!te.dispatch("BeforeExecCommand",Zo).isDefaultPrevented()){te.getDoc().execCommand(An,!1,Vr),te.dispatch("ExecCommand",Zo);const xt=lo(te);if(xo(xt)){const $t=It.getNode();pt.setAttrib($t,"target",xt),xt==="_blank"&&!eo(te)&&pt.setAttrib($t,"rel","noopener")}}It.moveToBookmark(Io),te.nodeChanged()},Sn=te=>{const Pe=Fn(te,-1);hn(Pe)&&Ut(te,Pe)},Ne=Sn,Et=te=>{const Pe=Fn(te,0);hn(Pe)&&Ut(te,Pe)},Go=te=>{te.on("keydown",Pe=>{Pe.keyCode===13&&!Pe.isDefaultPrevented()&&Et(te)}),te.on("keyup",Pe=>{Pe.keyCode===32?Sn(te):(Pe.keyCode===48&&Pe.shiftKey||Pe.keyCode===221)&&Ne(te)})};var ps=()=>{on.add("autolink",te=>{mo(te),Go(te)})};ps()})();(function(){var on=tinymce.util.Tools.resolve("tinymce.PluginManager");const pn=Ct=>({backspaceDelete:st=>{Ct.execCommand("mceListBackspaceDelete",!1,st)}}),ae=Ct=>Ct==null,qe=Ct=>!ae(Ct),So=Ct=>()=>Ct,xo=(Ct,st)=>Ct===st,un=So(!1),po=class po{constructor(st,de){Ft(this,"tag");Ft(this,"value");this.tag=st,this.value=de}static some(st){return new po(!0,st)}static none(){return po.singletonNone}fold(st,de){return this.tag?de(this.value):st()}isSome(){return this.tag}isNone(){return!this.tag}map(st){return this.tag?po.some(st(this.value)):po.none()}bind(st){return this.tag?st(this.value):po.none()}exists(st){return this.tag&&st(this.value)}forall(st){return!this.tag||st(this.value)}filter(st){return!this.tag||st(this.value)?this:po.none()}getOr(st){return this.tag?this.value:st}or(st){return this.tag?this:st}getOrThunk(st){return this.tag?this.value:st()}orThunk(st){return this.tag?this:st()}getOrDie(st){if(this.tag)return this.value;throw new Error(st??"Called getOrDie on None")}static from(st){return qe(st)?po.some(st):po.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(st){this.tag&&st(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}};Ft(po,"singletonNone",new po(!1));let $e=po;const hn=Array.prototype.slice,He=(Ct,st)=>{for(let de=0,Je=Ct.length;de<Je;de++){const We=Ct[de];if(st(We,de))return!0}return!1},ca=(Ct,st)=>{const de=Ct.length,Je=new Array(de);for(let We=0;We<de;We++){const Vn=Ct[We];Je[We]=st(Vn,We)}return Je},Xa=(Ct,st)=>{for(let de=0,Je=Ct.length;de<Je;de++){const We=Ct[de];st(We,de)}},Ta=(Ct,st,de)=>(Xa(Ct,(Je,We)=>{de=st(de,Je,We)}),de),zs=(Ct,st,de)=>{for(let Je=0,We=Ct.length;Je<We;Je++){const Vn=Ct[Je];if(st(Vn,Je))return $e.some(Vn);if(de(Vn,Je))break}
84return $e.none()},Da=(Ct,st)=>zs(Ct,st,un),$n=Ct=>{const st=hn.call(Ct,0);return st.reverse(),st},ke=(Ct,st,de=xo)=>Ct.exists(Je=>de(Je,st)),Oa=(Ct=>st=>st.replace(Ct,""))(/^\s+|\s+$/g),q=Ct=>Ct.length>0,mo=Ct=>!q(Ct),Ja=Ct=>{const st=$n(Oa(Ct).split("")),de=ca(st,(Je,We)=>{const Vn=Je.toUpperCase().charCodeAt(0)-65+1;return Math.pow(26,We)*Vn});return Ta(de,(Je,We)=>Je+We,0)},lo=Ct=>{if(Ct--,Ct<0)return"";{const st=Ct%26,de=Math.floor(Ct/26),Je=lo(de),We=String.fromCharCode(65+st);return Je+We}},nt=Ct=>/^[A-Z]+$/.test(Ct),eo=Ct=>/^[a-z]+$/.test(Ct),Gn=Ct=>/^[0-9]+$/.test(Ct),so=Ct=>Gn(Ct)?2:nt(Ct)?0:eo(Ct)?1:mo(Ct)?3:4,mt=Ct=>{switch(so(Ct)){case 2:return $e.some({listStyleType:$e.none(),start:Ct});case 0:return $e.some({listStyleType:$e.some("upper-alpha"),start:Ja(Ct).toString()});case 1:return $e.some({listStyleType:$e.some("lower-alpha"),start:Ja(Ct).toString()});case 3:return $e.some({listStyleType:$e.none(),start:""});case 4:return $e.none()}},X=Ct=>{const st=parseInt(Ct.start,10);return ke(Ct.listStyleType,"upper-alpha")?lo(st):ke(Ct.listStyleType,"lower-alpha")?lo(st).toLowerCase():Ct.start},Fo=(Ct=>st=>st.options.get(Ct))("forced_root_block"),_e=Ct=>/\btox\-/.test(Ct.className),k=Ct=>st=>qe(st)&&Ct.test(st.nodeName),Fn=Ct=>st=>qe(st)&&st.nodeName.toLowerCase()===Ct,Ut=k(/^(OL|UL|DL)$/),Sn=k(/^(TH|TD)$/),Ne=k(/^(LI|DT|DD)$/),Et=(Ct,st)=>zs(Ct,Ut,Sn).exists(de=>de.nodeName===st&&!_e(de)),Go=(Ct,st)=>{const de=Ct.selection.getNode();return st({parents:Ct.dom.getParents(de),element:de}),Ct.on("NodeChange",st),()=>Ct.off("NodeChange",st)},ps=(Ct,st)=>st!==null&&!Ct.dom.isEditable(st),te=(Ct,st)=>{const de=Ct.dom.getParent(st,"ol,ul,dl");return ps(Ct,de)||!Ct.selection.isEditable()},Pe=Fn("ol"),pt=["OL","UL","DL"],It=pt.join(","),F=(Ct,st)=>{const de=st||Ct.selection.getStart(!0);return Ct.dom.getParent(de,It,Vr(Ct,de))},Vr=(Ct,st)=>{const de=Ct.dom.getParents(st,Ct.dom.isBlock),Je=Vn=>Vn.nodeName.toLowerCase()!==Fo(Ct);return Da(de,Vn=>Je(Vn)&&Io(Ct.schema,Vn)).getOr(Ct.getBody())},Io=(Ct,st)=>!Ut(st)&&!Ne(st)&&He(pt,de=>Ct.isValidChild(st.nodeName,de)),An=Ct=>{const st=F(Ct);!Pe(st)||te(Ct,st)||Ct.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:X({start:Ct.dom.getAttrib(st,"start","1"),listStyleType:$e.from(Ct.dom.getStyle(st,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:de=>{const Je=de.getData();mt(Je.start).each(We=>{Ct.execCommand("mceListUpdate",!1,{attrs:{start:We.start==="1"?"":We.start},styles:{"list-style-type":We.listStyleType.getOr("")}})}),de.close()}})},Zo=Ct=>{Ct.addCommand("mceListProps",()=>{An(Ct)})},ru=(Ct,st)=>de=>{const Je=We=>{de.setActive(Et(We.parents,st)),de.setEnabled(!te(Ct,We.element)&&Ct.selection.isEditable())};return de.setEnabled(Ct.selection.isEditable()),Go(Ct,Je)},xt=Ct=>{const st=de=>()=>Ct.execCommand(de);Ct.hasPlugin("advlist")||(Ct.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:st("InsertOrderedList"),onSetup:ru(Ct,"OL")}),Ct.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:st("InsertUnorderedList"),onSetup:ru(Ct,"UL")}))},$t=(Ct,st)=>de=>Go(Ct,We=>de.setEnabled(Et(We.parents,st)&&!te(Ct,We.element))),wt=Ct=>{const st={text:"List properties...",icon:"ordered-list",onAction:()=>Ct.execCommand("mceListProps"),onSetup:$t(Ct,"OL")};Ct.ui.registry.addMenuItem("listprops",st),Ct.ui.registry.addContextMenu("lists",{update:de=>{const Je=F(Ct,de);return Pe(Je)?["listprops"]:[]}})};var Y=()=>{on.add("lists",Ct=>(Zo(Ct),xt(Ct),wt(Ct),pn(Ct)))};Y()})();(function(){var on=tinymce.util.Tools.resolve("tinymce.PluginManager");const ae=(xt=>$t=>xt===$t)(null),qe=xt=>xt,So=(xt,$t)=>{const wt=xt.length,Y=new Array(wt);for(let po=0;po<wt;po++){const Ct=xt[po];Y[po]=$t(Ct,po)}return Y},xo=(xt,$t)=>{let wt=null;return{cancel:()=>{ae(wt)||(clearTimeout(wt),wt=null)},throttle:(...Ct)=>{ae(wt)&&(wt=setTimeout(()=>{wt=null,xt.apply(null,Ct)},$t))}}},un=xt=>xt.replace(/\uFEFF/g,""),hn={aletter:"[A-Za-zªµºÃ-ÃÃ-öø-ËË-ËË -ˤˬˮͰ-ʹͶͷͺ-ͽÎÎ-ÎÎÎ-ΡΣ-ϵϷ-ÒÒ-Ô§Ô±-ÕÕÕ¡-Ö×-תװ-×³Ø -Ùٮٯٱ-ÛÛÛ¥Û¦Û®Û¯Ûº-Û¼Û¿ÜÜ-ܯÝ-Þ¥Þ±ß-ߪߴߵߺà -à à à ¤à ¨à¡-à¡à¤-हऽà¥à¥-ॡॱ-ॷॹ-ॿà¦
-à¦à¦à¦à¦-নপ-রলশ-হঽà§à§à§à§-à§¡à§°à§±à¨
-à¨à¨à¨à¨-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹà©-à©à©à©²-à©´àª
-àªàª-àªàª-નપ-રલળવ-હઽà«à« à«¡à¬
-à¬à¬à¬à¬-ନପ-ରଲଳଵ-ହଽààà-à¡à±à®à®
-à®à®-à®à®-à®à®à®à®à®à®à®£à®¤à®¨-பம-ஹà¯à°
-à°à°-à°à°-నప-ళవ-హఽà±à±à± ౡà²
-à²à²-à²à²-ನಪ-ಳವ-ಹಽà³à³ ೡೱೲà´
-à´à´-à´à´-ഺഽàµàµ ൡൺ-ൿà¶
-à¶à¶-නඳ-රලà·-à·à¼à½-à½à½-ཬà¾-à¾á -á
á-áºá¼á-áá-áá-ááá-áá -áá-áá-á°á²-áµá¸-á¾áá-á
á-áá-áá-áá-áá-áá -á´á-á¬á¯-á¿á-áá -áªá®-á°á-áá-áá -á±á-áá -á¬á®-á°á -á¡·á¢-ᢨᢪᢰ-ᣵá¤-á¤á¨-á¨á¬
-ᬳá
-áá®-ᮠᮮᮯá¯-ᯥá°-á°£á±-á±á±-ᱽᳩ-ᳬá
84³®-á³±á´-á¶¿á¸-á¼á¼-á¼á¼ -á½ á½-á½á½-á½á½á½á½á½-á½½á¾-á¾´á¾¶-ᾼιá¿-á¿á¿-á¿á¿-á¿á¿-á¿á¿ -Ῥῲ-á¿´á¿¶-ῼâ±â¿â-ââââ-âââ-ââ¤â¦â¨âª-ââ¯-â¹â¼-â¿â -â â â -ââ¶-â©â°-Ⱞⰰ-â±â± -ⳤⳫ-â³®â´-ⴥⴰ-ⵥⵯâ¶-â¶â¶ -ⶦⶨ-ⶮⶰ-ⶶⶸ-â¶¾â·-â·â·-â·â·-â·â·-â·â¸¯ã ã»ã¼ã -ãã±-ãã -ãºê-êê-ê½ê-êê-êêªê«ê-ê®ê¿-êê -ê¯ê-êê¢-êê-êêêê -ê©êº-ê ê -ê ê -ê ê -ê ¢ê¡-ꡳê¢-ꢳꣲ-ꣷꣻê¤-ꤥꤰ-ê¥ê¥ -ꥼê¦-ꦲê§ê¨-ꨨê©-ê©ê©-ê©ê¬-ê¬ê¬-ê¬ê¬-ê¬ê¬ -ꬦꬨ-ꬮê¯-ꯢê°-í£í°-íí-í»ï¬-ï¬ï¬-ï¬ï¬ï¬-ﬨשׁ-זּטּ-לּמּïïïïï-ï®±ï¯-ï´½ïµ-ï¶ï¶-ï·ï·°-ﷻﹰ-ï¹´ï¹¶-ﻼA-Zï½-ï½ï¾ -ï¾¾ï¿-ï¿ï¿-ï¿ï¿-ï¿ï¿-ï¿]",midnumlet:"[-'\\.âââ¤ï¹ï¼ï¼]",midletter:"[:··״â§ï¸ï¹ï¼]",midnum:"[±+*/,;;ÖØØÙ¬ß¸âï¸ï¸ï¹ï¹ï¼ï¼]",numeric:"[0-9Ù -٩٫۰-Û¹ß-ß०-९০-৯੦-੯૦-૯à¦-à¯à¯¦-௯౦-౯೦-೯൦-൯à¹-à¹à»-à»à¼ -༩á-áá-áá -á©á -á á¥-á¥á§-á§áª-áªáª-áªá-áá®°-᮹á±-á±á±-á±ê -ê©ê£-ê£ê¤-ê¤ê§-ê§ê©-ê©ê¯°-꯹]",cr:"\\r",lf:"\\n",newline:"[\v\f \u2028\u2029]",extend:"[Ì-ͯÒ-ÒÖ-Ö½Ö¿×××× ×Ø-ØÙ-ÙÙ°Û-ÛÛ-Û¤Û§Û¨Ûª-ÛÜܰ-ÝÞ¦-Þ°ß«-ß³à -à à -à £à ¥-à §à ©-à à¡-à¡à¤-à¤à¤º-़ा-à¥à¥-à¥à¥¢à¥£à¦-à¦à¦¼à¦¾-à§à§à§à§-à§à§à§¢à§£à¨-à¨à¨¼à¨¾-à©à©à©à©-à©à©à©°à©±à©µàª-àªàª¼àª¾-à« à«-à«à«-à«à«¢à«£à¬-à¬à¬¼à¬¾-àààà-àààà¢à£à®à®¾-à¯à¯-à¯à¯-à¯à¯à°-à°à°¾-à±à±-à±à±-à±à±à±à±¢à±£à²à²à²¼à²¾-à³à³-à³à³-à³à³à³à³¢à³£à´à´à´¾-àµàµ-àµàµ-àµàµàµ¢àµ£à¶à¶à·à·-à·à·à·-à·à·²à·³à¸±à¸´-ฺà¹-à¹àº±àº´-ູົຼà»-à»à¼à¼à¼µà¼·à¼¹à¼¾à¼¿à½±-à¾à¾à¾à¾-à¾à¾-ྼà¿á«-á¾á-áá-á á¢-á¤á§-áá±-á´á-ááá-áá-áá-áá²-á´ááá²á³á¶-ááá -á ᢩᤠ-ᤫᤰ-᤻ᦰ-á§á§á§á¨-á¨á©-á©á© -᩿᩼á¬-á¬á¬´-áá«-á³á®-á®á®¡-᯦᮪-᯳ᰤ-á°·á³-á³á³-᳨á³á³²á·-ᷦ᷼-á·¿âââ-â°â³¯-⵿⳱ⷠ-â·¿ãª-ã¯ããê¯-ê²ê¼ê½ê°ê±ê ê ê ê £-ê §ê¢ê¢ê¢´-ê£ê£ -꣱ꤦ-ê¤ê¥-ê¥ê¦-ê¦ê¦³-ê§ê¨©-ꨶê©ê©ê©ê©»êª°êª²-ꪴꪷꪸꪾ꪿ê«ê¯£-ꯪ꯬ê¯ï¬ï¸-ï¸ï¸ -︦ï¾ï¾]",format:"[ÂØ-ØÛÜá´áµâââª-â®â -â¤âª-â¯\uFEFF-ï¿»]",katakana:"[ã±-ãµããã -ãºã¼-ã¿ã°-ã¿ã-ã¾ã-ãヲ-ï¾]",extendnumlet:"[=_â¿ââ︳︴ï¹-ï¹ï¼¿â-â¿<>]",punctuation:"[~â|!-*+-\\/:;?@\\[-`{}¡«·»¿;·Õ-ÕÖÖÖ¾××××³×´ØØØØØØØÙª-ÙÛÜ-Üß·-ß¹à °-à ¾à¡à¥¤à¥¥à¥°à·´à¹à¹à¹à¼-à¼à¼º-༽ྠà¿-à¿à¿à¿á-áá»á¡-á¨ááá®ááá«-ááµá¶á-áá-áá -á á¥á¥ á¨á¨áª -᪦᪨-áªá-á ᯼-᯿᰻-᰿᱾᱿á³â-â§â°-ââ -ââ-ââ½â¾ââããâ¨-âµâ ââ¦-â¯â¦-â¦â§-â§â§¼â§½â³¹-⳼⳾⳿⵰â¸-⸮⸰⸱ã-ãã-ãã-ãã°ã½ã ã»ê¾ê¿ê-êê³ê¾ê²-ê·ê¡´-ê¡·ê£ê£ê£¸-꣺꤮꤯ê¥ê§-ê§ê§ê§ê©-ê©ê«ê«ê¯«ï´¾ï´¿ï¸-ï¸ï¸°-ï¹ï¹-﹡﹣﹨﹪﹫ï¼-ï¼ï¼ -ï¼ï¼-ï¼ï¼ï¼ï¼ï¼ ï¼»-]_ï½ï½ï½-ï½¥]"},He={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},ca=[new RegExp(hn.aletter),new RegExp(hn.midnumlet),new RegExp(hn.midletter),new RegExp(hn.midnum),new RegExp(hn.numeric),new RegExp(hn.cr),new RegExp(hn.lf),new RegExp(hn.newline),new RegExp(hn.extend),new RegExp(hn.format),new RegExp(hn.katakana),new RegExp(hn.extendnumlet),new RegExp("@")],Xa="",Ta=new RegExp("^"+hn.punctuation+"$"),zs=/^\s+$/,Da=ca,$n=He.OTHER,ke=xt=>{let $t=$n;const wt=Da.length;for(let Y=0;Y<wt;++Y){const po=Da[Y];if(po&&po.test(xt)){$t=Y;break}}return $t},la=xt=>{const $t={};return wt=>{if($t[wt])return $t[wt];{const Y=xt(wt);return $t[wt]=Y,Y}}},Oa=xt=>{const $t=la(ke);return So(xt,$t)},q=(xt,$t)=>{const wt=xt[$t],Y=xt[$t+1];if($t<0||$t>xt.length-1&&$t!==0||wt===He.ALETTER&&Y===He.ALETTER)return!1;const po=xt[$t+2];if(wt===He.ALETTER&&(Y===He.MIDLETTER||Y===He.MIDNUMLET||Y===He.AT)&&po===He.ALETTER)return!1;const Ct=xt[$t-1];return(wt===He.MIDLETTER||wt===He.MIDNUMLET||Y===He.AT)&&Y===He.ALETTER&&Ct===He.ALETTER||(wt===He.NUMERIC||wt===He.ALETTER)&&(Y===He.NUMERIC||Y===He.ALETTER)||(wt===He.MIDNUM||wt===He.MIDNUMLET)&&Y===He.NUMERIC&&Ct===He.NUMERIC||wt===He.NUMERIC&&(Y===He.MIDNUM||Y===He.MIDNUMLET)&&po===He.NUMERIC||(wt===He.EXTEND||wt===He.FORMAT)&&(Y===He.ALETTER||Y===He.NUMERIC||Y===He.KATAKANA||Y===He.EXTEND||Y===He.FORMAT)||(Y===He.EXTEND||Y===He.FORMAT&&(po===He.ALETTER||po===He.NUMERIC||po===He.KATAKANA||po===He.EXTEND||po===He.FORMAT))&&(wt===He.ALETTER||wt===He.NUMERIC||wt===He.KATAKANA||wt===He.EXTEND||wt===He.FORMAT)||wt===He.CR&&Y===He.LF?!1:wt===He.NEWLINE||wt===He.CR||wt===He.LF||Y===He.NEWLINE||Y===He.CR||Y===He.LF?!0:!(wt===He.KATAKANA&&Y===He.KATAKANA||Y===He.EXTENDNUMLET&&(wt===He.ALETTER||wt===He.NUMERIC||wt===He.KATAKANA||wt===He.EXTENDNUMLET)||wt===He.EXTENDNUMLET&&(Y===He.ALETTER||Y===He.NUMERIC||Y===He.KATAKANA)||wt===He.AT)},mo=Xa,Ja=zs,lo=Ta,nt=xt=>xt==="http"||xt==="https",eo=(xt,$t)=>{let wt;for(wt=$t;wt<xt.length&&!Ja.test(xt[wt]);wt++);return wt},Gn=(xt,$t)=>{const wt=eo(xt,$t+1);return xt.slice($t+1,wt).join(mo).substr(0,3)==="://"?wt:$t},so=(xt,$t,wt,Y)=>{const po=[],Ct=[];let st=[];for(let de=0;de<wt.length;++de)if(st.push(xt[de]),q(wt,de)){const Je=$t[de];if((Y.includeWhitespace||!Ja.test(Je))&&(Y.includePunctuation||!lo.test(Je))){const We=de-st.length+1,Vn=de+1,Xo=$t.slice(We,Vn).join(mo);if(nt(Xo)){const gl=Gn($t,de),sx=xt.slice(Vn,gl);Array.prototype.push.apply(st,sx),de=gl}$t[de+1]==="."&&/^([a-zA-Z]\.)+$/.test(Xo+".")?(st.push(xt[de+1]),Ct.push({start:We,end:Vn+1})):Ct.push({start:We,end:Vn}),po.push(st)}st=[]}return{words:po,indices:Ct}},mt=()=>({includeWhitespace:!1,includePunctuation:!1}),X=(xt,$t,wt)=>{wt={...mt(),...wt};const Y=So(xt,$t),po=Oa(Y);return so(xt,Y,po,wt)},Fo=(xt,$t,wt)=>X(xt,$t,wt).words;var _e=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const k=(xt,$t)=>{const wt=$t.getBlockElements(),Y=$t.getVoidElements(),po=We=>wt[We.nodeName]||Y[We.nodeName],Ct=[];let st="";const de=new _e(xt,xt);let Je;for(;Je=de.next();)Je.nodeType===3?st+=un(Je.data):po(Je)&&st.length&&(Ct.push(st),st="");return st.length&&Ct.push(st),Ct},Fn=xt=>xt.replace(/\u200B/g,""),Ut=xt=>xt.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length,Sn=(xt,$t)=>{const wt=Fn(k(xt,$t).join(` 85`));return Fo(wt.split(""),qe).length},Ne=(xt,$t)=>{const wt=k(xt,$t).join("");return Ut(wt)},Et=(xt,$t)=>{const wt=k(xt,$t).join("").replace(/\s/g,"");return Ut(wt)},Go=(xt,$t)=>()=>$t(xt.getBody(),xt.schema),ps=(xt,$t)=>()=>$t(xt.selection.getRng().cloneContents(),xt.schema),te=xt=>Go(xt,Sn),Pe=xt=>({body:{getWordCount:te(xt),getCharacterCount:Go(xt,Ne),getCharacterCountWithoutSpaces:Go(xt,Et)},selection:{getWordCount:ps(xt,Sn),getCharacterCount:ps(xt,Ne),getCharacterCountWithoutSpaces:ps(xt,Et)},getCount:te(xt)}
85),pt=(xt,$t)=>{xt.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String($t.body.getWordCount()),String($t.selection.getWordCount())],["Characters (no spaces)",String($t.body.getCharacterCountWithoutSpaces()),String($t.selection.getCharacterCountWithoutSpaces())],["Characters",String($t.body.getCharacterCount()),String($t.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},It=(xt,$t)=>{xt.addCommand("mceWordCount",()=>pt(xt,$t))};var F=tinymce.util.Tools.resolve("tinymce.util.Delay");const Vr=(xt,$t)=>{xt.dispatch("wordCountUpdate",{wordCount:{words:$t.body.getWordCount(),characters:$t.body.getCharacterCount(),charactersWithoutSpaces:$t.body.getCharacterCountWithoutSpaces()}})},Io=(xt,$t)=>{Vr(xt,$t)},An=(xt,$t,wt)=>{const Y=xo(()=>Io(xt,$t),wt);xt.on("init",()=>{Io(xt,$t),F.setEditorTimeout(xt,()=>{xt.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",Y.throttle)},0),xt.on("remove",Y.cancel)})},Zo=xt=>{const $t=()=>xt.execCommand("mceWordCount");xt.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:$t,context:"any"}),xt.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:$t,context:"any"})};var ru=(xt=300)=>{on.add("wordcount",$t=>{const wt=Pe($t);return It($t,wt),Zo($t),An($t,wt,xt),wt})};ru()})();function vJ(on){return on.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase().replace(/[-_\s]+(.)?/g,(pn,ae)=>ae?ae.toUpperCase():"")}function ZX(on,pn){if(on===0)return"0 B";const ae=["B","KB","MB","GB","TB"],qe=1024,So=Math.floor(Math.log(on)/Math.log(qe)),xo=on/Math.pow(qe,So);return new Intl.NumberFormat(pn,{maximumFractionDigits:2}).format(xo)+" "+ae[So]}const yJ={license_key:"gpl",height:448,width:"100%",menubar:!1,plugins:"autolink lists wordcount",icons:"customIcons",toolbar:["bold italic underline strikethrough | removeformat | numlist bullist | customAttachmentBtn customArchiveBtn customImageBtn customVideoBtn"],statusbar:!0,elementpath:!1,branding:!1,resize:!1,skin:"oxide",content_css:"default",paste_as_text:!0,paste_block_drop:!0,paste_data_images:!1,link_default_target:"_blank"},CJ={"it-IT":"it","en-GB":"en","es-ES":"es","pt-BR":"pt-BR"};var bC,rd,nx,JO,QO,hL,bL,cm,su,Jh,vg,xC,xL,vL,yL,Ao,GX,qX,KX,YX,XX,JX,YO,$Y,QX,LY,tJ,eJ,oJ,nJ,sJ,rJ,aJ,iJ,XO,cJ,lJ;class TJ extends bJ{constructor(ae){super(ae);Ui(this,Ao);Ui(this,bC);Ui(this,rd);Ui(this,nx);Ui(this,JO,{});Ui(this,QO,320);Ui(this,hL,.1);Ui(this,bL,[".jpg",".jpeg",".png",".webp",".mp4",".mov",".webm"]);Ui(this,cm);Ui(this,su);Ui(this,Jh);Ui(this,vg,[]);Ui(this,xC,0);Ui(this,xL,"ERROR_ALREADY_QUEUED");Ui(this,vL,"ERROR_INVALID_TYPE");Ui(this,yL,"ERROR_MAX_TOTAL_SIZE");fs(this,Ao,GX).call(this)}performCall(ae=null){this.formCta.disabled=!0,hJ.performPostRequest(this.form.getAttribute("action"),this.prepareFormData(ae),qe=>{qe.location?location.href=qe.location:location.reload()},()=>{this.formCta.disabled=!1})}prepareFormData(ae=null){const qe=super.prepareFormData(ae);return co(this,vg).forEach(({file:So},xo)=>{qe.append("files[]",So)}),qe}}bC=new WeakMap,rd=new WeakMap,nx=new WeakMap,JO=new WeakMap,QO=new WeakMap,hL=new WeakMap,bL=new WeakMap,cm=new WeakMap,su=new WeakMap,Jh=new WeakMap,vg=new WeakMap,xC=new WeakMap,xL=new WeakMap,vL=new WeakMap,yL=new WeakMap,Ao=new WeakSet,GX=async function(){fs(this,Ao,qX).call(this),fs(this,Ao,KX).call(this),await fs(this,Ao,oJ).call(this),fs(this,Ao,cJ).call(this),fs(this,Ao,lJ).call(this)},qX=function(){xg(this,bC,document.documentElement.lang),xg(this,rd,CJ[co(this,bC)])},KX=function(){xg(this,su,this.form.querySelector("input#file")),co(this,su).addEventListener("change",ae=>{const qe=ae.target;let So=!1;Array.from(qe.files).forEach(async xo=>{try{await fs(this,Ao,YX).call(this,xo),So||fs(this,Ao,YO).call(this)}catch(un){So=!0,fs(this,Ao,JX).call(this,un)}}),So||fs(this,Ao,YO).call(this),qe.value=""}),xg(this,cm,this.form.querySelector(".ticket-form-attachments")),xg(this,nx,co(this,cm).dataset.maxTotalSize?parseInt(co(this,cm).dataset.maxTotalSize):null),xg(this,JO,co(this,cm).dataset.allowedTypes?JSON.parse(co(this,cm).dataset.allowedTypes):{}),xg(this,Jh,this.form.querySelector(".ticket-form-attachments-message")),fs(this,Ao,YO).call(this)},YX=async function(ae){if(co(this,vg).some(({file:qe})=>qe.name===ae.name&&qe.size===ae.size))throw{fileName:ae.name,error:co(this,xL)};if(ae.type&&co(this,su).getAttribute("accept")&&!co(this,su).getAttribute("accept").split(",").some(qe=>(qe=qe.trim(),qe.startsWith(".")?ae.name.endsWith(qe):qe.endsWith("/*")?ae.type.startsWith(qe.slice(0,-1)):ae.type===qe)))throw{fileName:ae.name,error:co(this,vL)};if(co(this,nx)&&co(this,xC)+ae.size>co(this,nx))throw{fileName:ae.name,error:co(this,yL)};
85xg(this,xC,co(this,xC)+ae.size),co(this,vg).push({file:ae,previewElement:await fs(this,Ao,QX).call(this,ae)})},XX=function(ae){const qe=co(this,vg).findIndex(({file:xo})=>xo===ae);if(qe===-1)return;const So=co(this,vg)[qe];xg(this,vg,co(this,vg).filter((xo,un)=>un!==qe)),xg(this,xC,co(this,xC)-So.file.size),co(this,cm).removeChild(So.previewElement),co(this,vg).length===0&&co(this,cm).classList.add("empty"),fs(this,Ao,YO).call(this)},JX=function({error:ae,fileName:qe}){co(this,Jh).textContent=fs(this,Ao,$Y).call(this,ae,{fileName:qe}),co(this,Jh).classList.add("error")},YO=function(){co(this,Jh).classList.remove("error"),co(this,Jh).textContent=fs(this,Ao,$Y).call(this,"hintMaxTotalSize")},$Y=function(ae,qe={}){let So=co(this,Jh).dataset[vJ(ae)];return qe={...qe,maxTotalSize:ZX(co(this,nx),co(this,bC)),remainingSize:ZX(co(this,nx)-co(this,xC),co(this,bC))},Object.entries(qe).forEach(([xo,un])=>{So=So.replace(`:${xo}`,un)}),So},QX=async function(ae){const qe=co(this,su).dataset.filetype,So=document.createElement("div");if(So.classList.add("ticket-form-attachments-preview"),So.setAttribute("title",ae.name),ae.type.startsWith("image/")&&fs(this,Ao,LY).call(this,ae))So.classList.add("ticket-form-attachments-preview-image"),So.style.backgroundImage=`url(${await fs(this,Ao,tJ).call(this,ae)})`;else if(ae.type.startsWith("video/")&&fs(this,Ao,LY).call(this,ae)){So.classList.add("ticket-form-attachments-preview-video"),So.style.backgroundImage=`url(${await fs(this,Ao,eJ).call(this,ae)})`;const $e=document.createElement("iconify-icon");$e.setAttribute("icon","iconify:play-03"),So.appendChild($e)}else{So.classList.add("ticket-form-attachments-preview-generic");const $e=document.createElement("iconify-icon");qe==="image"?$e.setAttribute("icon","iconify:image-02"):qe==="video"?$e.setAttribute("icon","iconify:play-01"):qe==="archive"?$e.setAttribute("icon","iconify:package-00"):qe==="document"?$e.setAttribute("icon","iconify:file-02"):$e.setAttribute("icon","iconify:paperclip"),So.appendChild($e)}const xo=document.createElement("button");xo.setAttribute("type","button"),xo.addEventListener("click",()=>{fs(this,Ao,XX).call(this,ae)});const un=document.createElement("iconify-icon");return un.setAttribute("icon","iconify:x-01"),xo.appendChild(un),So.appendChild(xo),co(this,cm).appendChild(So),co(this,cm).classList.remove("empty"),So},LY=function(ae){return co(this,bL).some(qe=>ae.name.toLowerCase().endsWith(qe))},tJ=async function(ae){return new Promise((qe,So)=>{const xo=document.createElement("img");xo.addEventListener("load",()=>{const un=document.createElement("canvas");un.width=co(this,QO),un.height=xo.height*un.width/xo.width,un.getContext("2d").drawImage(xo,0,0,un.width,un.height);const hn=un.toDataURL("image/png");URL.revokeObjectURL(xo.src),qe(hn)}),xo.addEventListener("error",So),xo.src=URL.createObjectURL(ae)})},eJ=async function(ae){return new Promise((qe,So)=>{const xo=document.createElement("video");xo.muted=!0,xo.playsInline=!0,xo.preload="metadata",xo.addEventListener("loadeddata",()=>{xo.currentTime=xo.duration*co(this,hL)}),xo.addEventListener("seeked",()=>{const un=document.createElement("canvas");un.width=co(this,QO),un.height=xo.videoHeight*un.width/xo.videoWidth,un.getContext("2d").drawImage(xo,0,0,un.width,un.height);const hn=un.toDataURL("image/png");URL.revokeObjectURL(xo.src),qe(hn)}),xo.addEventListener("error",So),xo.src=URL.createObjectURL(ae)})},oJ=async function(){await fs(this,Ao,nJ).call(this),await fs(this,Ao,sJ).call(this),await fs(this,Ao,rJ).call(this)},nJ=async function(){co(this,rd)==="it"&&await ox(()=>import("./it-CHvBEjDK.js"),[]),co(this,rd)==="es"&&await ox(()=>import("./es-DJ3wQYZS.js"),[]),co(this,rd)==="pt-BR"&&await ox(()=>import("./pt-BR-BiSCw2Up.js"),[])},sJ=async function(){let ae;co(this,rd)==="it"&&(ae=ox(()=>import("./it-BX2RPqrj.js"),[])),co(this,rd)==="en"&&(ae=ox(()=>import("./en-DwlHzdjv.js"),[])),co(this,rd)==="es"&&(ae=ox(()=>import("./es-Cd8GTq5Z.js"),[])),co(this,rd)==="pt-BR"&&(ae=ox(()=>import("./pt-BR-BqhiBcbF.js"),[])),await ae.then(({default:qe})=>{pL.addI18n(co(this,rd),qe)})},rJ=async function(){await ox(async()=>{const{default:ae}=await import("./icons-B1z2ov55.js");return{default:ae}},[]).then(({default:ae})=>{pL.IconManager.add("customIcons",{icons:ae})})},aJ=function(ae={}){return{...yJ,...ae,language:co(this,rd),setup:qe=>{fs(this,Ao,iJ).call(this,qe)}}},iJ=function(ae){ae.ui.registry.addButton("customAttachmentBtn",{icon:"file",tooltip:ae.translate("Attach a file"),onAction:()=>fs(this,Ao,XO).call(this,"document")}),ae.ui.registry.addButton("customArchiveBtn",{icon:"package",tooltip:ae.translate("Attach an archive"),onAction:()=>fs(this,Ao,XO).call(this,"archive")}),ae.ui.registry.addButton("customImageBtn",{icon:"image",tooltip:ae.translate("Attach an image"),onAction:()=>fs(this,Ao,XO).call(this,"image",!0)}),ae.ui.registry.addButton("customVideoBtn",{icon:"embed",tooltip:ae.translate("Attach a video"),onAction:()=>fs(this,Ao,XO).call(this,"video",!0)})},XO=function(ae,qe=!1){const So=co(this,JO)[ae]||[];
85So.length?co(this,su).setAttribute("accept",So.join(",")):co(this,su).removeAttribute("accept"),qe?co(this,su).setAttribute("capture","environment"):co(this,su).removeAttribute("capture"),co(this,su).setAttribute("data-filetype",ae),co(this,su).click()},cJ=function(){this.form.querySelectorAll(".field-tinymce textarea").forEach(ae=>{pL.init(fs(this,Ao,aJ).call(this,{target:ae}))})},lJ=function(){this.form.querySelectorAll(".field-tinymce textarea").forEach(ae=>{this.validator.addField(ae,[{validator:()=>pL.get(ae.id).getContent({format:"text"}).trim().length>0,errorMessage:validationErrors.required}])})};export{TJ as TicketForm};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.