symsp-enduser.wolkenservicedesk.com Open in urlscan Pro
54.148.58.218  Public Scan

Submitted URL: http://symsp-enduser.wolkenservicedesk.com/scripts.89c4785bf53fa05a57b9.js
Effective URL: https://symsp-enduser.wolkenservicedesk.com/scripts.89c4785bf53fa05a57b9.js
Submission: On February 07 via manual from JP — Scanned from JP

Form analysis 0 forms found in the DOM

Text Content

!function(t){function e(t,n){if(n=n||{},(t=t||"")instanceof e)return t;if(!(this instanceof e))return new e(t,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,a=null,u=!1,c=!1;return"string"==typeof t&&(t=function(t){t=t.replace(z,"").replace(A,"").toLowerCase();var e,n=!1;if(H[t])t=H[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=P.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=P.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=P.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=P.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=P.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=P.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=P.hex8.exec(t))?{r:S(e[1]),g:S(e[2]),b:S(e[3]),a:_(e[4]),format:n?"name":"hex8"}:(e=P.hex6.exec(t))?{r:S(e[1]),g:S(e[2]),b:S(e[3]),format:n?"name":"hex"}:(e=P.hex4.exec(t))?{r:S(e[1]+""+e[1]),g:S(e[2]+""+e[2]),b:S(e[3]+""+e[3]),a:_(e[4]+""+e[4]),format:n?"name":"hex8"}:!!(e=P.hex3.exec(t))&&{r:S(e[1]+""+e[1]),g:S(e[2]+""+e[2]),b:S(e[3]+""+e[3]),format:n?"name":"hex"}}(t)),"object"==typeof t&&(T(t.r)&&T(t.g)&&T(t.b)?(e=function(t,e,n){return{r:255*w(t,255),g:255*w(e,255),b:255*w(n,255)}}(t.r,t.g,t.b),u=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):T(t.h)&&T(t.s)&&T(t.v)?(r=E(t.s),i=E(t.v),e=o(t.h,r,i),u=!0,c="hsv"):T(t.h)&&T(t.s)&&T(t.l)&&(r=E(t.s),a=E(t.l),e=function(t,e,n){function r(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t}var o,i,a;if(t=w(t,360),e=w(e,100),n=w(n,100),0===e)o=i=a=n;else{var u=.5>n?n*(1+e):n+e-n*e,c=2*n-u;o=r(c,u,t+1/3),i=r(c,u,t),a=r(c,u,t-1/3)}return{r:255*o,g:255*i,b:255*a}}(t.h,r,a),u=!0,c="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=x(n),{ok:u,format:t.format||c,r:B(255,R(e.r,0)),g:B(255,R(e.g,0)),b:B(255,R(e.b,0)),a:n}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=M(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=M(this._r)),this._g<1&&(this._g=M(this._g)),this._b<1&&(this._b=M(this._b)),this._ok=r.ok,this._tc_id=N++}function n(t,e,n){t=w(t,255),e=w(e,255),n=w(n,255);var r,o,i=R(t,e,n),a=B(t,e,n),u=(i+a)/2;if(i==a)r=o=0;else{var c=i-a;switch(o=u>.5?c/(2-i-a):c/(i+a),i){case t:r=(e-n)/c+(n>e?6:0);break;case e:r=(n-t)/c+2;break;case n:r=(t-e)/c+4}r/=6}return{h:r,s:o,l:u}}function r(t,e,n){t=w(t,255),e=w(e,255),n=w(n,255);var r,o,i=R(t,e,n),a=B(t,e,n),u=i,c=i-a;if(o=0===i?0:c/i,i==a)r=0;else{switch(i){case t:r=(e-n)/c+(n>e?6:0);break;case e:r=(n-t)/c+2;break;case n:r=(t-e)/c+4}r/=6}return{h:r,s:o,v:u}}function o(e,n,r){e=6*w(e,360),n=w(n,100),r=w(r,100);var o=t.floor(e),i=e-o,a=r*(1-n),u=r*(1-i*n),c=r*(1-(1-i)*n),s=o%6;return{r:255*[r,u,a,a,c,r][s],g:255*[c,r,r,u,a,a][s],b:255*[a,a,c,r,r,u][s]}}function i(t,e,n,r){var o=[k(M(t).toString(16)),k(M(e).toString(16)),k(M(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function a(t,e,n,r){return[k(O(r)),k(M(t).toString(16)),k(M(e).toString(16)),k(M(n).toString(16))].join("")}function u(t,n){n=0===n?0:n||10;var r=e(t).toHsl();return r.s-=n/100,r.s=C(r.s),e(r)}function c(t,n){n=0===n?0:n||10;var r=e(t).toHsl();return r.s+=n/100,r.s=C(r.s),e(r)}function s(t){return e(t).desaturate(100)}function l(t,n){n=0===n?0:n||10;var r=e(t).toHsl();return r.l+=n/100,r.l=C(r.l),e(r)}function f(t,n){n=0===n?0:n||10;var r=e(t).toRgb();return r.r=R(0,B(255,r.r-M(-n/100*255))),r.g=R(0,B(255,r.g-M(-n/100*255))),r.b=R(0,B(255,r.b-M(-n/100*255))),e(r)}function d(t,n){n=0===n?0:n||10;var r=e(t).toHsl();return r.l-=n/100,r.l=C(r.l),e(r)}function m(t,n){var r=e(t).toHsl(),o=(r.h+n)%360;return r.h=0>o?360+o:o,e(r)}function g(t){var n=e(t).toHsl();return n.h=(n.h+180)%360,e(n)}function h(t){var n=e(t).toHsl(),r=n.h;return[e(t),e({h:(r+120)%360,s:n.s,l:n.l}),e({h:(r+240)%360,s:n.s,l:n.l})]}function p(t){var n=e(t).toHsl(),r=n.h;return[e(t),e({h:(r+90)%360,s:n.s,l:n.l}),e({h:(r+180)%360,s:n.s,l:n.l}),e({h:(r+270)%360,s:n.s,l:n.l})]}function v(t){var n=e(t).toHsl(),r=n.h;return[e(t),e({h:(r+72)%360,s:n.s,l:n.l}),e({h:(r+216)%360,s:n.s,l:n.l})]}function b(t,n,r){n=n||6,r=r||30;var o=e(t).toHsl(),i=360/r,a=[e(t)];for(o.h=(o.h-(i*n>>1)+720)%360;--n;)o.h=(o.h+i)%360,a.push(e(o));return a}function y(t,n){n=n||6;for(var r=e(t).toHsv(),o=r.h,i=r.s,a=r.v,u=[],c=1/n;n--;)u.push(e({h:o,s:i,v:a})),a=(a+c)%1;return u}function x(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function w(e,n){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=B(n,R(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),t.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function C(t){return B(1,R(0,t))}function S(t){return parseInt(t,16)}function k(t){return 1==t.length?"0"+t:""+t}function E(t){return 1>=t&&(t=100*t+"%"),t}function O(e){return t.round(255*parseFloat(e)).toString(16)}function _(t){return S(t)/255}function T(t){return!!P.CSS_UNIT.exec(t)}var z=/^\s+/,A=/\s+$/,N=0,M=t.round,B=t.min,R=t.max,D=t.random;e.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,n,r,o=this.toRgb();return n=o.g/255,r=o.b/255,.2126*(.03928>=(e=o.r/255)?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(.03928>=n?n/12.92:t.pow((n+.055)/1.055,2.4))+.0722*(.03928>=r?r/12.92:t.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=M(100*this._a)/100,this},toHsv:function(){var t=r(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=r(this._r,this._g,this._b),e=M(360*t.h),n=M(100*t.s),o=M(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+o+"%)":"hsva("+e+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=M(360*t.h),r=M(100*t.s),o=M(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+o+"%)":"hsla("+e+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return i(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,o){var i=[k(M(t).toString(16)),k(M(e).toString(16)),k(M(n).toString(16)),k(O(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:M(this._r),g:M(this._g),b:M(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+M(this._r)+", "+M(this._g)+", "+M(this._b)+")":"rgba("+M(this._r)+", "+M(this._g)+", "+M(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:M(100*w(this._r,255))+"%",g:M(100*w(this._g,255))+"%",b:M(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+M(100*w(this._r,255))+"%, "+M(100*w(this._g,255))+"%, "+M(100*w(this._b,255))+"%)":"rgba("+M(100*w(this._r,255))+"%, "+M(100*w(this._g,255))+"%, "+M(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(I[i(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var n="#"+a(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=e(t);r="#"+a(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1;return!e&&this._a<1&&this._a>=0&&("hex"===t||"hex6"===t||"hex3"===t||"hex4"===t||"hex8"===t||"name"===t)?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return e(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(s,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(h,arguments)},tetrad:function(){return this._applyCombination(p,arguments)}},e.fromRatio=function(t,n){if("object"==typeof t){var r={};for(var o in t)t.hasOwnProperty(o)&&(r[o]="a"===o?t[o]:E(t[o]));t=r}return e(t,n)},e.equals=function(t,n){return!(!t||!n)&&e(t).toRgbString()==e(n).toRgbString()},e.random=function(){return e.fromRatio({r:D(),g:D(),b:D()})},e.mix=function(t,n,r){r=0===r?0:r||50;var o=e(t).toRgb(),i=e(n).toRgb(),a=r/100;return e({r:(i.r-o.r)*a+o.r,g:(i.g-o.g)*a+o.g,b:(i.b-o.b)*a+o.b,a:(i.a-o.a)*a+o.a})},e.readability=function(n,r){var o=e(n),i=e(r);return(t.max(o.getLuminance(),i.getLuminance())+.05)/(t.min(o.getLuminance(),i.getLuminance())+.05)},e.isReadable=function(t,n,r){var o,i,a=e.readability(t,n);switch(i=!1,(o=function(t){var e,n;return"AA"!==(e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e&&(e="AA"),"small"!==(n=(t.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:e,size:n}}(r)).level+o.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},e.mostReadable=function(t,n,r){var o,i,a,u,c=null,s=0;i=(r=r||{}).includeFallbackColors,a=r.level,u=r.size;for(var l=0;l<n.length;l++)(o=e.readability(t,n[l]))>s&&(s=o,c=e(n[l]));return e.isReadable(t,c,{level:a,size:u})||!i?c:(r.includeFallbackColors=!1,e.mostReadable(t,["#fff","#000"],r))};var H=e.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=e.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(H),P=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define((function(){return e})):window.tinycolor=e}(Math),function(t){"use strict";function e(){}var n=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},r=function(t){return function(){return t}},o=function(t){return t};function i(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}function a(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}}function u(){return f}var c,s=r(!1),l=r(!0),f=(c={fold:function(t,e){return t()},is:s,isSome:s,isNone:l,getOr:g,getOrThunk:m,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:r(null),getOrUndefined:r(void 0),or:g,orThunk:m,map:u,each:e,bind:u,exists:s,forall:l,filter:u,equals:d,equals_:d,toArray:function(){return[]},toString:r("none()")},Object.freeze&&Object.freeze(c),c);function d(t){return t.isNone()}function m(t){return t()}function g(t){return t}function h(t){return function(e){return function(t){if(null===t)return"null";var e=typeof t;return"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(e)===t}}function p(t,e){return W.call(t,e)}function v(t,e){return-1<p(t,e)}function b(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1}function y(t,e,n){return function(t,e){for(var n=t.length-1;0<=n;n--)e(t[n])}(t,(function(t){n=e(n,t)})),n}function x(t,e,n){return $(t,(function(t){n=e(n,t)})),n}function w(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return D.some(o)}return D.none()}function C(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return D.some(n);return D.none()}function S(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!P(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);q.apply(e,t[n])}return e}(G(t,e))}function k(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0}function E(t){var e=j.call(t,0);return e.reverse(),e}function O(t,e){return X(t,(function(t){return!v(e,t)}))}function _(t){return 0===t.length?D.none():D.some(t[0])}function T(t){return 0===t.length?D.none():D.some(t[t.length-1])}function z(t,e){for(var n=Y(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}function A(t,e){return Z(t,(function(t,n){return{k:n,v:e(t,n)}}))}function N(t){return function(e,n){t[n]=e}}function M(t,e){var n={},r={};return function(t,e,n,r){z(t,(function(t,o){(e(t,o)?n:r)(t,o)}))}(t,e,N(n),N(r)),{t:n,f:r}}function B(t,e){return Q(t,e)?D.from(t[e]):D.none()}var R=function(t){function e(){return i}function n(e){return e(t)}var o=r(t),i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:l,isNone:s,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:e,orThunk:e,map:function(e){return R(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?i:f},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,(function(e){return n(t,e)}))}};return i},D={some:R,none:u,from:function(t){return null==t?f:R(t)}},H=h("string"),I=h("object"),P=h("array"),L=h("null"),F=h("boolean"),V=h("function"),U=h("number"),j=Array.prototype.slice,W=Array.prototype.indexOf,q=Array.prototype.push,G=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++)r[o]=e(t[o],o);return r},$=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},X=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},K=V(Array.from)?Array.from:function(t){return j.call(t)},Y=Object.keys,J=Object.hasOwnProperty,Z=function(t,e){var n={};return z(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Q=function(t,e){return J.call(t,e)},tt=function(){return(tt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function et(t,e){return function(){return e===t}}function nt(t,e){return function(){return e===t}}function rt(t,e){var n=String(e).toLowerCase();return w(t,(function(t){return t.search(n)}))}function ot(t,e){return-1!==t.indexOf(e)}function it(t,e){return function(t,e,n){return""===e||!(t.length<e.length)&&t.substr(0,0+e.length)===e}(t,e)}function at(t){return t.replace(/^\s+|\s+$/g,"")}function ut(t){return t.replace(/\s+$/g,"")}function ct(t){return function(e){return ot(e,t)}}function st(){return Ce.get()}function lt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var o={};return $(t,(function(t,n){o[t]=r(e[n])})),o}}function ft(t,e){var n=t.dom();if(n.nodeType!==Oe)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function dt(t){return t.nodeType!==Oe&&t.nodeType!==_e||0===t.childElementCount}function mt(t,e){return t.dom()===e.dom()}function gt(t){return te.fromDom(t.dom().ownerDocument)}function ht(t){return te.fromDom(t.dom().ownerDocument.defaultView)}function pt(t){return D.from(t.dom().parentNode).map(te.fromDom)}function vt(t){return D.from(t.dom().previousSibling).map(te.fromDom)}function bt(t){return D.from(t.dom().nextSibling).map(te.fromDom)}function yt(t){return E(Se(t,vt))}function xt(t){return Se(t,bt)}function wt(t){return G(t.dom().childNodes,te.fromDom)}function Ct(t,e){var n=t.dom().childNodes;return D.from(n[e]).map(te.fromDom)}function St(t){return Ct(t,0)}function kt(t){return Ct(t,t.dom().childNodes.length-1)}function Et(t,e){pt(t).each((function(n){n.dom().insertBefore(e.dom(),t.dom())}))}function Ot(t,e){bt(t).fold((function(){pt(t).each((function(t){ze(t,e)}))}),(function(t){Et(t,e)}))}function _t(t,e){St(t).fold((function(){ze(t,e)}),(function(n){t.dom().insertBefore(e.dom(),n.dom())}))}function Tt(t,e){$(e,(function(e){ze(t,e)}))}function zt(t){t.dom().textContent="",$(wt(t),(function(t){Ae(t)}))}function At(t){var e=wt(t);0<e.length&&function(t,e){$(e,(function(e){Et(t,e)}))}(t,e),Ae(t)}function Nt(t){return t.dom().nodeName.toLowerCase()}function Mt(t){return function(e){return function(t){return t.dom().nodeType}(e)===t}}function Bt(t){var e=Me(t)?t.dom().parentNode:t.dom();return null!=e&&e.ownerDocument.body.contains(e)}function Rt(t,e){return void 0!==t?t:void 0!==e?e:0}function Dt(e){var n=void 0!==e?e.dom():t.document;return Re(n.body.scrollLeft||n.documentElement.scrollLeft,n.body.scrollTop||n.documentElement.scrollTop)}function Ht(e,n,r){(void 0!==r?r.dom():t.document).defaultView.scrollTo(e,n)}function It(t,e){He&&V(t.dom().scrollIntoViewIfNeeded)?t.dom().scrollIntoViewIfNeeded(!1):t.dom().scrollIntoView(e)}function Pt(t,e,n,o){return{x:r(t),y:r(e),width:r(n),height:r(o),right:r(t+n),bottom:r(e+o)}}function Lt(t){return function(e){return!!e&&e.nodeType===t}}function Ft(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return v(e,n)}return!1}}function Vt(t){return function(e){if(Pe(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}function Ut(t){return void 0!==t.style&&V(t.style.getPropertyValue)}function jt(e,n,r){if(!(H(r)||F(r)||U(r)))throw t.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,r+"")}function Wt(t,e){var n=t.dom();z(e,(function(t,e){jt(n,e,t)}))}function qt(t,e){var n=t.dom().getAttribute(e);return null===n?void 0:n}function Gt(t,e){t.dom().removeAttribute(e)}function $t(e,n){var r=e.dom(),o=t.window.getComputedStyle(r).getPropertyValue(n),i=""!==o||Bt(e)?o:Ke(r,n);return null===i?void 0:i}function Xt(t,e){var n=t.dom(),r=Ke(n,e);return D.from(r).filter((function(t){return 0<t.length}))}function Kt(t){return w(t,Ne)}function Yt(t,e){return t.children&&v(t.children,e)}var Jt,Zt,Qt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:r(t)}},te={fromHtml:function(e,n){var r=(n||t.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||1<r.childNodes.length)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Qt(r.childNodes[0])},fromTag:function(e,n){var r=(n||t.document).createElement(e);return Qt(r)},fromText:function(e,n){var r=(n||t.document).createTextNode(e);return Qt(r)},fromDom:Qt,fromPoint:function(t,e,n){var r=t.dom();return D.from(r.elementFromPoint(e,n)).map(Qt)}},ee=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return ee(e())}}},ne=function(){return re(0,0)},re=function(t,e){return{major:t,minor:e}},oe=function(t,e){var n=String(e).toLowerCase();return 0===t.length?ne():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};function r(t){return Number(e.replace(n,"$"+t))}return re(r(1),r(2))}(t,n)},ie=ne,ae="Firefox",ue=function(t){var e=t.current;return{current:e,version:t.version,isEdge:et("Edge",e),isChrome:et("Chrome",e),isIE:et("IE",e),isOpera:et("Opera",e),isFirefox:et(ae,e),isSafari:et("Safari",e)}},ce=function(){return ue({current:void 0,version:ie()})},se=ue,le=(r("Edge"),r("Chrome"),r("IE"),r("Opera"),r(ae),r("Safari"),"Windows"),fe="Android",de="Solaris",me="FreeBSD",ge="ChromeOS",he=function(t){var e=t.current;return{current:e,version:t.version,isWindows:nt(le,e),isiOS:nt("iOS",e),isAndroid:nt(fe,e),isOSX:nt("OSX",e),isLinux:nt("Linux",e),isSolaris:nt(de,e),isFreeBSD:nt(me,e),isChromeOS:nt(ge,e)}},pe=function(){return he({current:void 0,version:ie()})},ve=he,be=(r(le),r("iOS"),r(fe),r("Linux"),r("OSX"),r(de),r(me),r(ge),/.*?version\/\ ?([0-9]+)\.([0-9]+).*/),ye=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return ot(t,"edge/")&&ot(t,"chrome")&&ot(t,"safari")&&ot(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,be],search:function(t){return ot(t,"chrome")&&!ot(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return ot(t,"msie")||ot(t,"trident")}},{name:"Opera",versionRegexes:[be,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ct("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ct("firefox")},{name:"Safari",versionRegexes:[be,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(ot(t,"safari")||ot(t,"mobile/"))&&ot(t,"applewebkit")}}],xe=[{name:"Windows",search:ct("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return ot(t,"iphone")||ot(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ct("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ct("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ct("linux"),versionRegexes:[]},{name:"Solaris",search:ct("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ct("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ct("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],we={browsers:r(ye),oses:r(xe)},Ce=ee(function(e,n){var o=we.browsers(),i=we.oses(),a=function(t,e){return rt(t,e).map((function(t){var n=oe(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,e).fold(ce,se),u=function(t,e){return rt(t,e).map((function(t){var n=oe(t.versionRegexes,e);return{current:t.name,version:n}}))}(i,e).fold(pe,ve);return{browser:a,os:u,deviceType:function(t,e,n,o){var i=t.isiOS()&&!0===/ipad/i.test(n),a=t.isiOS()&&!i,u=t.isiOS()||t.isAndroid(),c=u||o("(pointer:coarse)"),s=i||!a&&u&&o("(min-device-width:768px)"),l=a||u&&!s,f=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!l&&!s&&!f;return{isiPad:r(i),isiPhone:r(a),isTablet:r(s),isPhone:r(l),isTouch:r(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:r(f),isDesktop:r(d)}}(u,a,e,(function(e){return t.window.matchMedia(e).matches}))}}(t.navigator.userAgent)),Se=function(t,e){for(var n=[],r=function(t){return n.push(t),e(t)},o=e(t);(o=o.bind(r)).isSome(););return n},ke=t.Node.ELEMENT_NODE,Ee=t.Node.TEXT_NODE,Oe=ke,_e=t.Node.DOCUMENT_NODE,Te=st().browser.isIE()?function(e,n){return function(e,n){return function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(e,n,t.Node.DOCUMENT_POSITION_CONTAINED_BY)}(e.dom(),n.dom())}:function(t,e){var n=t.dom(),r=e.dom();return n!==r&&n.contains(r)},ze=(lt("element","offset"),function(t,e){t.dom().appendChild(e.dom())}),Ae=function(t){var e=t.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},Ne=(void 0!==t.window||Function("return this;")(),Mt(ke)),Me=Mt(Ee),Be=function(t,e){return{left:r(t),top:r(e),translate:function(n,r){return Be(t+n,e+r)}}},Re=Be,De=function(t){var e=t.dom(),n=e.ownerDocument.body;return n===e?Re(n.offsetLeft,n.offsetTop):Bt(t)?function(t){var e=t.getBoundingClientRect();return Re(e.left,e.top)}(e):Re(0,0)},He=st().browser.isSafari(),Ie=function(e){var n=void 0===e?t.window:e,r=Dt(te.fromDom(n.document));return function(e){return D.from((void 0===e?t.window:e).visualViewport)}(n).fold((function(){var t=n.document.documentElement,e=t.clientWidth,o=t.clientHeight;return Pt(r.left(),r.top(),e,o)}),(function(t){return Pt(Math.max(t.pageLeft,r.left()),Math.max(t.pageTop,r.top()),t.width,t.height)}))},Pe=Lt(1),Le=Ft(["textarea","input"]),Fe=Lt(3),Ve=Lt(8),Ue=Lt(9),je=Lt(11),We=Ft(["br"]),qe=Vt("true"),Ge=Vt("false"),$e={isText:Fe,isElement:Pe,isComment:Ve,isDocument:Ue,isDocumentFragment:je,isBr:We,isContentEditableTrue:qe,isContentEditableFalse:Ge,isRestrictedNode:function(t){return!!t&&!Object.getPrototypeOf(t)},matchNodeNames:Ft,hasPropValue:function(t,e){return function(n){return Pe(n)&&n[t]===e}},hasAttribute:function(t,e){return function(e){return Pe(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,e){return function(n){return Pe(n)&&n.getAttribute(t)===e}},matchStyleValues:function(t,e){var n=e.toLowerCase().split(" ");return function(e){var r;if(Pe(e))for(r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null);if((o?o.getPropertyValue(t):null)===n[r])return!0}return!1}},isBogus:function(t){return Pe(t)&&t.hasAttribute("data-mce-bogus")},isBogusAll:function(t){return Pe(t)&&"all"===t.getAttribute("data-mce-bogus")},isTable:function(t){return Pe(t)&&"TABLE"===t.tagName},isTextareaOrInput:Le},Xe=function(t,e,n){jt(t.dom(),e,n)},Ke=function(t,e){return Ut(t)?t.style.getPropertyValue(e):""},Ye=st().browser,Je={},Ze={exports:Je};function Qe(e){t.setTimeout((function(){throw e}),0)}Jt=Je,Zt=Ze,function(t){"object"==typeof Jt&&void 0!==Zt?Zt.exports=t():("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=n[a]={exports:{}};e[a][0].call(s.exports,(function(t){return o(e[a][1][t]||t)}),s,s.exports,t,e,n,r)}return n[a].exports}for(var i=!1,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&g())}function g(){if(!f){var t=c(m);f=!0;for(var e=l.length;e;){for(s=l,l=[];++d<e;)s&&s[d].run();d=-1,e=l.length}s=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function p(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new h(t,e)),1!==l.length||f||c(g)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){function n(){}function r(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],s(t,this)}function o(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,r._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(l){return void a(e.promise,l)}i(e.promise,r)}else(1===t._state?i:a)(e.promise,t._value)}))):t._deferreds.push(e)}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void s(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,u(t)}catch(o){a(t,o)}}function a(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&r._immediateFn((function(){t._handled||r._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)o(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var r=!1;try{t((function(t){r||(r=!0,i(e,t))}),(function(t){r||(r=!0,a(e,t))}))}catch(n){if(r)return;r=!0,a(e,n)}}var l;l=setTimeout,r.prototype.catch=function(t){return this.then(null,t)},r.prototype.then=function(t,e){var r=new this.constructor(n);return o(this,new c(t,e,r)),r},r.all=function(t){var e=Array.prototype.slice.call(t);return new r((function(t,r){if(0===e.length)return t([]);var o=e.length;function i(a,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var c=u.then;if("function"==typeof c)return void c.call(u,(function(t){i(a,t)}),r)}e[a]=u,0==--o&&t(e)}catch(n){r(n)}}for(var a=0;a<e.length;a++)i(a,e[a])}))},r.resolve=function(t){return t&&"object"==typeof t&&t.constructor===r?t:new r((function(e){e(t)}))},r.reject=function(t){return new r((function(e,n){n(t)}))},r.race=function(t){return new r((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},r._immediateFn="function"==typeof t?function(e){t(e)}:function(t){l(t,0)},r._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},r._setImmediateFn=function(t){r._immediateFn=t},r._setUnhandledRejectionFn=function(t){r._unhandledRejectionFn=t},void 0!==e&&e.exports?e.exports=r:this.Promise||(this.Promise=r)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"==typeof e?e:function(t){var e=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o((function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}));var tn,en,nn,rn=Ze.exports.boltExport,on=function(e){var n=D.none(),r=[],o=function(t){i()?a(t):r.push(t)},i=function(){return n.isSome()},a=function(e){n.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(t){n=D.some(t),function(t){$(t,a)}(r),r=[]})),{get:o,map:function(t){return on((function(e){o((function(n){e(t(n))}))}))},isReady:i}},an={nu:on,pure:function(t){return on((function(e){e(t)}))}},un=function(t){function e(e){t().then(e,Qe)}return{map:function(e){return un((function(){return t().then(e)}))},bind:function(e){return un((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return un((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return an.nu(e)},toCached:function(){var e=null;return un((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},cn=function(t){return un((function(){return new rn(t)}))},sn=function(t){return function(t,e){return e((function(e){var n=[],r=0;0===t.length?e([]):$(t,(function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))}))}))}(t,cn)},ln=function(t){return{is:function(e){return t===e},isValue:l,isError:s,getOr:r(t),getOrThunk:r(t),getOrDie:r(t),or:function(e){return ln(t)},orThunk:function(e){return ln(t)},fold:function(e,n){return n(t)},map:function(e){return ln(e(t))},mapError:function(e){return ln(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return D.some(t)}}},fn=function(t){return{is:s,isValue:s,isError:l,getOr:o,getOrThunk:function(t){return t()},getOrDie:function(){return function(t){return function(){throw new Error(t)}}(String(t))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return fn(t)},mapError:function(e){return fn(e(t))},each:e,bind:function(e){return fn(t)},exists:s,forall:l,toOption:D.none}},dn={value:ln,error:fn,fromOption:function(t,e){return t.fold((function(){return fn(e)}),ln)}},mn=window.Promise?window.Promise:(tn=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},en=hn.immediateFn||"function"==typeof t.setImmediate&&t.setImmediate||function(e){t.setTimeout(e,1)},hn.prototype.catch=function(t){return this.then(null,t)},hn.prototype.then=function(t,e){var n=this;return new hn((function(r,o){pn.call(n,new xn(t,e,r,o))}))},hn.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&tn(arguments[0])?arguments[0]:arguments);return new hn((function(e,n){if(0===t.length)return e([]);var r=t.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}t[i]=a,0==--r&&e(t)}catch(m){n(m)}}for(var i=0;i<t.length;i++)o(i,t[i])}))},hn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===hn?t:new hn((function(e){e(t)}))},hn.reject=function(t){return new hn((function(e,n){n(t)}))},hn.race=function(t){return new hn((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},hn);function gn(t,e){return function(){t.apply(e,arguments)}}function hn(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],wn(t,gn(vn,this),gn(bn,this))}function pn(t){var e=this;null!==this._state?en((function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(d){return void t.reject(d)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)})):this._deferreds.push(t)}function vn(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void wn(gn(e,t),gn(vn,this),gn(bn,this))}this._state=!0,this._value=t,yn.call(this)}catch(d){bn.call(this,d)}}function bn(t){this._state=!1,this._value=t,yn.call(this)}function yn(){for(var t=0,e=this._deferreds.length;t<e;t++)pn.call(this,this._deferreds[t]);this._deferreds=null}function xn(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function wn(t,e,n){var r=!1;try{t((function(t){r||(r=!0,e(t))}),(function(t){r||(r=!0,n(t))}))}catch(g){if(r)return;r=!0,n(g)}}function Cn(e,n){return"number"!=typeof n&&(n=0),t.setTimeout(e,n)}function Sn(e,n){return"number"!=typeof n&&(n=1),t.setInterval(e,n)}function kn(e,n){var r,o;return(o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];t.clearTimeout(r),r=Cn((function(){e.apply(this,o)}),n)}).stop=function(){t.clearTimeout(r)},o}function En(t,e,n){var r,o;if(!t)return 0;if(n=n||t,void 0!==t.length){for(r=0,o=t.length;r<o;r++)if(!1===e.call(n,t[r],r,t))return 0}else for(r in t)if(t.hasOwnProperty(r)&&!1===e.call(n,t[r],r,t))return 0;return 1}function On(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1}function _n(t){return null==t?"":(""+t).replace(Vn,"")}function Tn(t,e){return e?!("array"!==e||!Fn.isArray(t))||typeof t===e:void 0!==t}var zn={requestAnimationFrame:function(e,n){nn?nn.then(e):nn=new mn((function(e){!function(e,n){var r,o=t.window.requestAnimationFrame,i=["ms","moz","webkit"];for(r=0;r<i.length&&!o;r++)o=t.window[i[r]+"RequestAnimationFrame"];(o=o||function(e){t.window.setTimeout(e,0)})(e,n)}(e,n=n||t.document.body)})).then(e)},setTimeout:Cn,setInterval:Sn,setEditorTimeout:function(t,e,n){return Cn((function(){t.removed||e()}),n)},setEditorInterval:function(e,n,r){var o;return o=Sn((function(){e.removed?t.clearInterval(o):n()}),r)},debounce:kn,throttle:kn,clearInterval:function(e){return t.clearInterval(e)},clearTimeout:function(e){return t.clearTimeout(e)}},An=t.navigator.userAgent,Nn=st(),Mn=Nn.browser,Bn=Nn.os,Rn=Nn.deviceType,Dn=/WebKit/.test(An)&&!Mn.isEdge(),Hn="FormData"in t.window&&"FileReader"in t.window&&"URL"in t.window&&!!t.URL.createObjectURL,In=-1!==An.indexOf("Windows Phone"),Pn={opera:Mn.isOpera(),webkit:Dn,ie:!(!Mn.isIE()&&!Mn.isEdge())&&Mn.version.major,gecko:Mn.isFirefox(),mac:Bn.isOSX()||Bn.isiOS(),iOS:Rn.isiPad()||Rn.isiPhone(),android:Bn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:t.window.getSelection&&"Range"in t.window,documentMode:Mn.isIE()?t.document.documentMode||7:10,fileApi:Hn,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Mn.isIE(),desktop:Rn.isDesktop(),windowsPhone:In,browser:{current:Mn.current,version:Mn.version,isChrome:Mn.isChrome,isEdge:Mn.isEdge,isFirefox:Mn.isFirefox,isIE:Mn.isIE,isOpera:Mn.isOpera,isSafari:Mn.isSafari},os:{current:Bn.current,version:Bn.version,isAndroid:Bn.isAndroid,isChromeOS:Bn.isChromeOS,isFreeBSD:Bn.isFreeBSD,isiOS:Bn.isiOS,isLinux:Bn.isLinux,isOSX:Bn.isOSX,isSolaris:Bn.isSolaris,isWindows:Bn.isWindows},deviceType:{isDesktop:Rn.isDesktop,isiPad:Rn.isiPad,isiPhone:Rn.isiPhone,isPhone:Rn.isPhone,isTablet:Rn.isTablet,isTouch:Rn.isTouch,isWebView:Rn.isWebView}},Ln=Array.isArray,Fn={isArray:Ln,toArray:function(t){var e,n,r=t;if(!Ln(t))for(r=[],e=0,n=t.length;e<n;e++)r[e]=t[e];return r},each:En,map:function(t,e){var n=[];return En(t,(function(r,o){n.push(e(r,o,t))})),n},filter:function(t,e){var n=[];return En(t,(function(r,o){e&&!e(r,o,t)||n.push(r)})),n},indexOf:function(t,e){var n,r;if(t)for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},reduce:function(t,e,n,r){var o=0;for(arguments.length<3&&(n=t[0]);o<t.length;o++)n=e.call(r,n,t[o],o);return n},findIndex:On,find:function(t,e,n){var r=On(t,e,n);return-1!==r?t[r]:void 0},last:function(t){return t[t.length-1]}},Vn=/^\s*|\s*$/g,Un=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),Fn.each(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;Un(t,e,n,r)})))},jn={trim:_n,isArray:Fn.isArray,is:Tn,toArray:Fn.toArray,makeMap:function(t,e,n){var r;for(e=e||",","string"==typeof(t=t||[])&&(t=t.split(e)),n=n||{},r=t.length;r--;)n[t[r]]={};return n},each:Fn.each,map:Fn.map,grep:Fn.filter,inArray:Fn.indexOf,hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},extend:function(t,e){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,c=arguments;for(n=1,r=c.length;n<r;n++)for(o in e=c[n])e.hasOwnProperty(o)&&void 0!==(u=e[o])&&(t[o]=u);return t},create:function(t,e,n){var r,o,i,a,u,c=this,s=0;if(t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t),i=t[3].match(/(^|\.)(\w+)$/i)[2],!(o=c.createNS(t[3].replace(/\.\w+$/,""),n))[i]){if("static"===t[2])return o[i]=e,void(this.onCreate&&this.onCreate(t[2],t[3],o[i]));e[i]||(e[i]=function(){},s=1),o[i]=e[i],c.extend(o[i].prototype,e),t[5]&&(r=c.resolve(t[5]).prototype,a=t[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=s?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],c.each(r,(function(t,e){o[i].prototype[e]=r[e]})),c.each(e,(function(t,e){r[e]?o[i].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==i&&(o[i].prototype[e]=t)}))),c.each(e.static,(function(t,e){o[i][e]=t}))}},walk:Un,createNS:function(e,n){var r,o;for(n=n||t.window,e=e.split("."),r=0;r<e.length;r++)n[o=e[r]]||(n[o]={}),n=n[o];return n},resolve:function(e,n){var r,o;for(n=n||t.window,r=0,o=(e=e.split(".")).length;r<o&&(n=n[e[r]]);r++);return n},explode:function(t,e){return!t||Tn(t,"array")?t:Fn.map(t.split(e||","),_n)},_addCacheSuffix:function(t){var e=Pn.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t}};function Wn(t){var e;return function(n){return(e=e||function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n}(t,r(!0))).hasOwnProperty(Nt(n))}}function qn(t){return Ne(t)&&!Zn(t)}function Gn(t){return Ne(t)&&"br"===Nt(t)}function $n(t){return t&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")}var Xn,Kn,Yn,Jn=Wn(["h1","h2","h3","h4","h5","h6"]),Zn=Wn(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),Qn=Wn(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),tr=Wn(["ul","ol","dl"]),er=Wn(["li","dd","dt"]),nr=Wn(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),rr=Wn(["thead","tbody","tfoot"]),or=Wn(["td","th"]),ir=Wn(["pre","script","textarea","style"]),ar=function(t,e){var n,r=e.childNodes;if(!$e.isElement(e)||!$n(e)){for(n=r.length-1;0<=n;n--)ar(t,r[n]);if(!1===$e.isDocument(e)){if($e.isText(e)&&0<e.nodeValue.length){var o=jn.trim(e.nodeValue).length;if(t.isBlock(e.parentNode)||0<o)return;if(0===o&&function(t){return t.previousSibling&&"SPAN"===t.previousSibling.nodeName&&t.nextSibling&&"SPAN"===t.nextSibling.nodeName}(e))return}else if($e.isElement(e)&&(1===(r=e.childNodes).length&&$n(r[0])&&e.parentNode.insertBefore(r[0],e),r.length||nr(te.fromDom(e))))return;t.remove(e)}return e}},ur={trimNode:ar},cr=jn.makeMap,sr=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fr=/[<>&\"\']/g,dr=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,mr={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:"Ÿ"};function gr(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n<t.length;n+=2)r=String.fromCharCode(parseInt(t[n],e)),Kn[r]||(i[r]=o="&"+t[n+1]+";",i[o]=r);return i}}function hr(t,e){return t.replace(e?sr:lr,(function(t){return Kn[t]||t}))}function pr(t,e){return t.replace(e?sr:lr,(function(t){return 1<t.length?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":Kn[t]||"&#"+t.charCodeAt(0)+";"}))}function vr(t,e,n){return n=n||Xn,t.replace(e?sr:lr,(function(t){return Kn[t]||n[t]||t}))}Kn={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Yn={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},Xn=gr("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var br={encodeRaw:hr,encodeAllRaw:function(t){return(""+t).replace(fr,(function(t){return Kn[t]||t}))},encodeNumeric:pr,encodeNamed:vr,getEncodeFunc:function(t,e){var n=gr(e)||Xn,r=cr(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?sr:lr,(function(t){return void 0!==Kn[t]?Kn[t]:void 0!==n[t]?n[t]:1<t.length?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))}:r.named?e?function(t,e){return vr(t,e,n)}:vr:r.numeric?pr:hr},decode:function(t){return t.replace(dr,(function(t,e){return e?65535<(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10))?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):mr[e]||String.fromCharCode(e):Yn[t]||Xn[t]||function(t){var e;return(e=te.fromTag("div").dom()).innerHTML=t,e.textContent||e.innerText||t}(t)}))}},yr={},xr={},wr=jn.makeMap,Cr=jn.each,Sr=jn.extend,kr=jn.explode,Er=jn.inArray,Or=function(t,e){return(t=jn.trim(t))?t.split(e||" "):[]},_r=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),Cr(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?wr(t,/[, ]/):kr(t,/[, ]/)}))),n};function Tr(t){function e(e,n,r){var o=t[e];return o?o=wr(o,/[, ]/,wr(o.toUpperCase(),/[, ]/)):(o=yr[e])||(o=wr(n," ",wr(n.toUpperCase()," ")),o=Sr(o,r),yr[e]=o),o}var n,r,o,i,a,u,c,s,l,f,d,m,g,h={},p={},v=[],b={},y={};function x(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")}function w(t){var e,n,r,o,i,a,u,c,s,l,f,d,m,g,p,b,y,w,C,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,E=/[*?+]/;if(t)for(t=Or(t,","),h["@"]&&(b=h["@"].attributes,y=h["@"].attributesOrder),e=0,n=t.length;e<n;e++)if(i=S.exec(t[e])){if(s=i[2],p=i[3],c=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===(g=i[1])&&(a.paddEmpty=!0),"-"===g&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),b){for(w in b)d[w]=b[w];m.push.apply(m,y)}if(c)for(r=0,o=(c=Or(c,"|")).length;r<o;r++)if(i=k.exec(c[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),g=i[3],C=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],m.splice(Er(m,l),1);continue}g&&("="===g&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:C}),u.defaultValue=C),":"===g&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:C}),u.forcedValue=C),"<"===g&&(u.validValues=wr(C,"?"))),E.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=x(l),a.attributePatterns.push(u)):(d[l]||m.push(l),d[l]=u)}b||"@"!==s||(b=d,y=m),p&&(a.outputName=s,h[p]=a),E.test(s)?(a.pattern=x(s),v.push(a)):h[s]=a}}function C(t){h={},v=[],w(t),Cr(o,(function(t,e){p[e]=t.children}))}function S(t){var e=/^(~)?(.+)$/;t&&(yr.text_block_elements=yr.block_elements=null,Cr(Or(t,","),(function(t){var n=e.exec(t),r="~"===n[1],o=r?"span":"div",i=n[2];if(p[i]=p[o],b[i]=o,r||(l[i.toUpperCase()]={},l[i]={}),!h[i]){var a=h[o];delete(a=Sr({},a)).removeEmptyAttrs,delete a.removeEmpty,h[i]=a}Cr(p,(function(t,e){t[o]&&(p[e]=t=Sr({},p[e]),t[i]=t[o])}))})))}function k(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;yr[t.schema]=null,e&&Cr(Or(e,","),(function(t){var e,r,o=n.exec(t);o&&(e=(r=o[1])?p[o[2]]:p[o[2]]={"#comment":{}},e=p[o[2]],Cr(Or(o[3],"|"),(function(t){"-"===r?delete e[t]:e[t]={}})))}))}function E(t){var e,n=h[t];if(n)return n;for(e=v.length;e--;)if((n=v[e]).pattern.test(t))return n}return o=function(t){function e(t,e,n){function o(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o}var i,a,u;for(e=e||"","string"==typeof(n=n||[])&&(n=Or(n)),i=(t=Or(t)).length;i--;)u={attributes:o(a=Or([r,e].join(" "))),attributesOrder:a,children:o(n,xr)},s[t[i]]=u}function n(t,e){var n,r,o,i;for(n=(t=Or(t)).length,e=Or(e);n--;)for(r=s[t[n]],o=0,i=e.length;o<i;o++)r.attributes[e[o]]={},r.attributesOrder.push(e[o])}var r,o,i,a,u,c,s={};return yr[t]?yr[t]:(r="id accesskey class dir lang style tabindex title role",o="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",i="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(r+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",o+=" article aside details dialog figure main header footer hgroup section nav",i+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(r+=" xml:lang",i=[i,c="acronym applet basefont big font strike tt"].join(" "),Cr(Or(c),(function(t){e(t,"",i)})),o=[o,u="center dir isindex noframes"].join(" "),a=[o,i].join(" "),Cr(Or(u),(function(t){e(t,"",a)}))),a=a||[o,i].join(" "),e("html","manifest","head body"),e("head","","base command link meta noscript script style title"),e("title hr noscript br"),e("base","href target"),e("link","href rel media hreflang type sizes hreflang"),e("meta","name http-equiv content charset"),e("style","media type scoped"),e("script","src async defer type charset"),e("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",a),e("address dt dd div caption","",a),e("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",i),e("blockquote","cite",a),e("ol","reversed start type","li"),e("ul","","li"),e("li","value",a),e("dl","","dt dd"),e("a","href target rel media hreflang type",i),e("q","cite",i),e("ins del","cite datetime",a),e("img","src sizes srcset alt usemap ismap width height"),e("iframe","src name width height",a),e("embed","src type width height"),e("object","data type typemustmatch name usemap form width height",[a,"param"].join(" ")),e("param","name value"),e("map","name",[a,"area"].join(" ")),e("area","alt coords shape href target rel media hreflang type"),e("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),e("colgroup","span","col"),e("col","span"),e("tbody thead tfoot","","tr"),e("tr","","td th"),e("td","colspan rowspan headers",a),e("th","colspan rowspan headers scope abbr",a),e("form","accept-charset action autocomplete enctype method name novalidate target",a),e("fieldset","disabled form name",[a,"legend"].join(" ")),e("label","form for",i),e("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"),e("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?a:i),e("select","disabled form multiple name required size","option optgroup"),e("optgroup","disabled label","option"),e("option","disabled label selected value"),e("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),e("menu","type label",[a,"li"].join(" ")),e("noscript","",a),"html4"!==t&&(e("wbr"),e("ruby","",[i,"rt rp"].join(" ")),e("figcaption","",a),e("mark rt rp summary bdi","",i),e("canvas","width height",a),e("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[a,"track source"].join(" ")),e("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[a,"track source"].join(" ")),e("picture","","img source"),e("source","src srcset type media sizes"),e("track","kind src srclang label default"),e("datalist","",[i,"option"].join(" ")),e("article section nav aside main header footer","",a),e("hgroup","","h1 h2 h3 h4 h5 h6"),e("figure","",[a,"figcaption"].join(" ")),e("time","datetime",i),e("dialog","open",a),e("command","type label icon disabled checked radiogroup command"),e("output","for form name",i),e("progress","value max",i),e("meter","value min max low high optimum",i),e("details","open",[a,"summary"].join(" ")),e("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(n("script","language xml:space"),n("style","xml:space"),n("object","declare classid code codebase codetype archive standby align border hspace vspace"),n("embed","align name hspace vspace"),n("param","valuetype type"),n("a","charset name rev shape coords"),n("br","clear"),n("applet","codebase archive code object alt name width height align hspace vspace"),n("img","name longdesc align border hspace vspace"),n("iframe","longdesc frameborder marginwidth marginheight scrolling align"),n("font basefont","size color face"),n("input","usemap align"),n("select"),n("textarea"),n("h1 h2 h3 h4 h5 h6 div p legend caption","align"),n("ul","type compact"),n("li","type"),n("ol dl menu dir","compact"),n("pre","width xml:space"),n("hr","align noshade size width"),n("isindex","prompt"),n("table","summary width frame rules cellspacing cellpadding align bgcolor"),n("col","width align char charoff valign"),n("colgroup","width align char charoff valign"),n("thead","align char charoff valign"),n("tr","align char charoff valign bgcolor"),n("th","axis align char charoff valign nowrap bgcolor width height"),n("form","accept"),n("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),n("tfoot","align char charoff valign"),n("tbody","align char charoff valign"),n("area","nohref"),n("body","background bgcolor text link vlink alink")),"html4"!==t&&(n("input button select textarea","autofocus"),n("input textarea","placeholder"),n("a","download"),n("link script img","crossorigin"),n("img","loading"),n("iframe","sandbox seamless allowfullscreen loading")),Cr(Or("a form meter progress dfn"),(function(t){s[t]&&delete s[t].children[t]})),delete s.caption.children.table,delete s.script,yr[t]=s)}((t=t||{}).schema),!1===t.verify_html&&(t.valid_elements="*[*]"),n=_r(t.valid_styles),r=_r(t.invalid_styles,"map"),s=_r(t.valid_classes,"map"),i=e("whitespace_elements","pre script noscript style textarea video audio iframe object code"),a=e("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),u=e("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),c=e("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),f=e("non_empty_elements","td th iframe video audio object script pre code",u),d=e("move_caret_before_on_enter_elements","table",f),m=e("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=e("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",m),g=e("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),Cr((t.special||"script noscript noframes noembed title style textarea xmp").split(" "),(function(t){y[t]=new RegExp("</"+t+"[^>]*>","gi")})),t.valid_elements?C(t.valid_elements):(Cr(o,(function(t,e){h[e]={attributes:t.attributes,attributesOrder:t.attributesOrder},p[e]=t.children})),"html5"!==t.schema&&Cr(Or("strong/b em/i"),(function(t){t=Or(t,"/"),h[t[1]].outputName=t[0]})),Cr(Or("ol ul sub sup blockquote span font a table tbody tr strong em b i"),(function(t){h[t]&&(h[t].removeEmpty=!0)})),Cr(Or("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(t){h[t].paddEmpty=!0})),Cr(Or("span"),(function(t){h[t].removeEmptyAttrs=!0}))),S(t.custom_elements),k(t.valid_children),w(t.extended_valid_elements),k("+ol[ul|ol],+ul[ul|ol]"),Cr({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(function(t,e){h[e]&&(h[e].parentsRequired=Or(t))})),t.invalid_elements&&Cr(kr(t.invalid_elements),(function(t){h[t]&&delete h[t]})),E("span")||w("span[!data-mce-type|*]"),{children:p,elements:h,getValidStyles:function(){return n},getValidClasses:function(){return s},getBlockElements:function(){return l},getInvalidStyles:function(){return r},getShortEndedElements:function(){return u},getTextBlockElements:function(){return m},getTextInlineElements:function(){return g},getBoolAttrs:function(){return c},getElementRule:E,getSelfClosingElements:function(){return a},getNonEmptyElements:function(){return f},getMoveCaretBeforeOnEnterElements:function(){return d},getWhiteSpaceElements:function(){return i},getSpecialElements:function(){return y},isValidChild:function(t,e){var n=p[t.toLowerCase()];return!(!n||!n[e.toLowerCase()])},isValid:function(t,e){var n,r,o=E(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(t))return!0}return!1},getCustomElements:function(){return b},addValidElements:w,setValidElements:C,addCustomElements:S,addValidChildren:k}}function zr(t,e,n,r){function o(t){return 1<(t=parseInt(t,10).toString(16)).length?t:"0"+t}return"#"+o(e)+o(n)+o(r)}function Ar(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)}function Nr(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)}function Mr(e,n){var r,o=n||{};for(r in e)Ir[r]||(o[r]=e[r]);if(o.target||(o.target=o.srcElement||t.document),Pn.experimentalShadowDom&&(o.target=function(t,e){if(t.composedPath){var n=t.composedPath();if(n&&0<n.length)return n[0]}return e}(e,o.target)),e&&Hr.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var i=o.target.ownerDocument||t.document,a=i.documentElement,u=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=Lr,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=Lr,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=Lr,o.stopPropagation()})===function(t){return t.isDefaultPrevented===Lr||t.isDefaultPrevented===Pr}(o)&&(o.isDefaultPrevented=Pr,o.isPropagationStopped=Pr,o.isImmediatePropagationStopped=Pr),void 0===o.metaKey&&(o.metaKey=!1),o}function Br(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function(){Nr(t,"DOMContentLoaded",i),Nr(t,"load",i),n.domLoaded||(n.domLoaded=!0,e(o))};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():Ar(t,"DOMContentLoaded",i),Ar(t,"load",i)}}var Rr=" ",Dr=function(t,e){var n,r,o,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,l={};for(t=t||{},e&&(o=e.getValidStyles(),i=e.getInvalidStyles()),r="\\\" \\' \\; \\: ; : \ufeff".split(" "),n=0;n<r.length;n++)l[r[n]]="\ufeff"+n,l["\ufeff"+n]=r[n];return{toHex:function(t){return t.replace(a,zr)},parse:function(e){function r(t,e,r){var o,i,a,u;if((o=C[t+"-top"+e])&&(i=C[t+"-right"+e])&&(a=C[t+"-bottom"+e])&&(u=C[t+"-left"+e])){var c=[o,i,a,u];for(n=c.length-1;n--&&c[n]===c[n+1];);-1<n&&r||(C[t+e]=-1===n?c[0]:c.join(" "),delete C[t+"-top"+e],delete C[t+"-right"+e],delete C[t+"-bottom"+e],delete C[t+"-left"+e])}}function o(t){var e,n=C[t];if(n){for(e=(n=n.split(" ")).length;e--;)if(n[e]!==n[0])return!1;return C[t]=n[0],!0}}function i(t){return b=!0,l[t]}function f(t,e){return b&&(t=t.replace(/\uFEFF[0-9]/g,(function(t){return l[t]}))),e||(t=t.replace(/\\([\'\";:])/g,"$1")),t}function d(t){return String.fromCharCode(parseInt(t.slice(1),16))}function m(t){return t.replace(/\\[0-9a-f]+/gi,d)}function g(e,n,r,o,i,a){if(i=i||a)return"'"+(i=f(i)).replace(/\'/g,"\\'")+"'";if(n=f(n||r||o),!t.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return S&&(n=S.call(k,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var h,p,v,b,y,x,w,C={},S=t.url_converter,k=t.url_converter_scope||this;if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,i).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(t){return t.replace(/[;:]/g,i)}));h=c.exec(e);)if(c.lastIndex=h.index+h[0].length,p=h[1].replace(s,"").toLowerCase(),v=h[2].replace(s,""),p&&v){if(p=m(p),v=m(v),-1!==p.indexOf("\ufeff")||-1!==p.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===p||/expression\s*\(|\/\*|\*\//.test(v)))continue;"font-weight"===p&&"700"===v?v="bold":"color"!==p&&"background-color"!==p||(v=v.toLowerCase()),v=(v=v.replace(a,zr)).replace(u,g),C[p]=b?f(v,!0):v}r("border","",!0),r("border","-width"),r("border","-color"),r("border","-style"),r("padding",""),r("margin",""),x="border-style",w="border-color",o(y="border-width")&&o(x)&&o(w)&&(C.border=C[y]+" "+C[x]+" "+C[w],delete C[y],delete C[x],delete C[w]),"medium none"===C.border&&delete C.border,"none"===C["border-image"]&&delete C["border-image"]}return C},serialize:function(t,e){function n(e){var n,r,i,a;if(n=o[e])for(r=0,i=n.length;r<i;r++)(a=t[e=n[r]])&&(s+=(0<s.length?" ":"")+e+": "+a+";")}var r,a,u,c,s="";if(e&&o)n("*"),n(e);else for(r in t)!(a=t[r])||i&&(u=r,c=void 0,(c=i["*"])&&c[u]||(c=i[e])&&c[u])||(s+=(0<s.length?" ":"")+r+": "+a+";");return s}}},Hr=/^(?:mouse|contextmenu)|click/,Ir={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Pr=function(){return!1},Lr=function(){return!0},Fr=(Vr.prototype.bind=function(e,n,r,o){function i(t){m.executeHandlers(Mr(t||g.event),a)}var a,u,c,s,l,f,d,m=this,g=t.window;if(e&&3!==e.nodeType&&8!==e.nodeType){e[m.expando]?a=e[m.expando]:(a=m.count++,e[m.expando]=a,m.events[a]={}),o=o||e;var h=n.split(" ");for(c=h.length;c--;)f=i,l=d=!1,"DOMContentLoaded"===(s=h[c])&&(s="ready"),m.domLoaded&&"ready"===s&&"complete"===e.readyState?r.call(o,Mr({type:s})):(m.hasMouseEnterLeave||(l=m.mouseEnterLeave[s])&&(f=function(t){var e,n;if(e=t.currentTarget,(n=t.relatedTarget)&&e.contains)n=e.contains(n);else for(;n&&n!==e;)n=n.parentNode;n||((t=Mr(t||g.event)).type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,m.executeHandlers(t,a))}),m.hasFocusIn||"focusin"!==s&&"focusout"!==s||(d=!0,l="focusin"===s?"focus":"blur",f=function(t){(t=Mr(t||g.event)).type="focus"===t.type?"focusin":"focusout",m.executeHandlers(t,a)}),(u=m.events[a][s])?"ready"===s&&m.domLoaded?r(Mr({type:s})):u.push({func:r,scope:o}):(m.events[a][s]=u=[{func:r,scope:o}],u.fakeName=l,u.capture=d,u.nativeHandler=f,"ready"===s?Br(e,f,m):Ar(e,l||s,f,d)));return e=u=0,r}},Vr.prototype.unbind=function(t,e,n){var r,o,i,a,u,c;if(!t||3===t.nodeType||8===t.nodeType)return this;if(r=t[this.expando]){if(c=this.events[r],e){var s=e.split(" ");for(i=s.length;i--;)if(o=c[u=s[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var l=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=l,o.fakeName=f,o.capture=d,c[u]=o}n&&0!==o.length||(delete c[u],Nr(t,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in c)Nr(t,(o=c[u]).fakeName||u,o.nativeHandler,o.capture);c={}}for(u in c)return this;delete this.events[r];try{delete t[this.expando]}catch(v){t[this.expando]=null}}return this},Vr.prototype.fire=function(t,e,n){var r;if(!t||3===t.nodeType||8===t.nodeType)return this;var o=Mr(null,n);for(o.type=e,o.target=t;(r=t[this.expando])&&this.executeHandlers(o,r),(t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow)&&!o.isPropagationStopped(););return this},Vr.prototype.clean=function(t){var e,n;if(!t||3===t.nodeType||8===t.nodeType)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName)for(this.unbind(t),e=(n=t.getElementsByTagName("*")).length;e--;)(t=n[e])[this.expando]&&this.unbind(t);return this},Vr.prototype.destroy=function(){this.events={}},Vr.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},Vr.prototype.executeHandlers=function(t,e){var n,r,o,i,a=this.events[e];if(n=a&&a[t.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return},Vr.Event=new Vr,Vr);function Vr(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in t.document.documentElement,this.hasFocusIn="onfocusin"in t.document.documentElement,this.count=1}function Ur(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}var jr,Wr,qr,Gr,$r,Xr,Kr,Yr,Jr,Zr,Qr,to,eo,no,ro,oo,io,ao,uo="sizzle"+-new Date,co=t.window.document,so=0,lo=0,fo=jo(),mo=jo(),go=jo(),ho=function(t,e){return t===e&&(Qr=!0),0},po="undefined",vo={}.hasOwnProperty,bo=[],yo=bo.pop,xo=bo.push,wo=bo.push,Co=bo.slice,So=bo.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},ko="[\\x20\\t\\r\\n\\f]",Eo="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Oo="\\["+ko+"*("+Eo+")(?:"+ko+"*([*^$|!~]?=)"+ko+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Eo+"))|)"+ko+"*\\]",_o=":("+Eo+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Oo+")*)|.*)\\)|)",To=new RegExp("^"+ko+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ko+"+$","g"),zo=new RegExp("^"+ko+"*,"+ko+"*"),Ao=new RegExp("^"+ko+"*([>+~]|"+ko+")"+ko+"*"),No=new RegExp("="+ko+"*([^\\]'\"]*?)"+ko+"*\\]","g"),Mo=new RegExp(_o),Bo=new RegExp("^"+Eo+"$"),Ro={ID:new RegExp("^#("+Eo+")"),CLASS:new RegExp("^\\.("+Eo+")"),TAG:new RegExp("^("+Eo+"|[*])"),ATTR:new RegExp("^"+Oo),PSEUDO:new RegExp("^"+_o),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ko+"*(even|odd|(([+-]|)(\\d*)n|)"+ko+"*(?:([+-]|)"+ko+"*(\\d+)|))"+ko+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ko+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ko+"*((?:-\\d)?\\d*)"+ko+"*\\)|)(?=[^-]|$)","i")},Do=/^(?:input|select|textarea|button)$/i,Ho=/^h\d$/i,Io=/^[^{]+\{\s*\[native \w/,Po=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Lo=/[+~]/,Fo=/'|\\/g,Vo=new RegExp("\\\\([\\da-f]{1,6}"+ko+"?|("+ko+")|.)","ig");try{wo.apply(bo=Co.call(co.childNodes),co.childNodes)}catch($w){wo={apply:bo.length?function(t,e){xo.apply(t,Co.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}var Uo=function(t,e,n,r){var o,i,a,u,c,s,l,f,d,m;if((e?e.ownerDocument||e:co)!==eo&&to(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(u=(e=e||eo).nodeType)&&9!==u)return[];if(ro&&!r){if(o=Po.exec(t))if(a=o[1]){if(9===u){if(!(i=e.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(a))&&ao(e,i)&&i.id===a)return n.push(i),n}else{if(o[2])return wo.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&Wr.getElementsByClassName)return wo.apply(n,e.getElementsByClassName(a)),n}if(Wr.qsa&&(!oo||!oo.test(t))){if(f=l=uo,d=e,m=9===u&&t,1===u&&"object"!==e.nodeName.toLowerCase()){for(s=Xr(t),(l=e.getAttribute("id"))?f=l.replace(Fo,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;c--;)s[c]=f+Jo(s[c]);d=Lo.test(t)&&Ko(e.parentNode)||e,m=s.join(",")}if(m)try{return wo.apply(n,d.querySelectorAll(m)),n}catch(y){}finally{l||e.removeAttribute("id")}}}return Yr(t.replace(To,"$1"),e,n,r)};function jo(){var t=[];return function e(n,r){return t.push(n+" ")>qr.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function Wo(t){return t[uo]=!0,t}function qo(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||1<<31)-(~t.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function Go(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function $o(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function Xo(t){return Wo((function(e){return e=+e,Wo((function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function Ko(t){return t&&typeof t.getElementsByTagName!=po&&t}for(jr in Wr=Uo.support={},$r=Uo.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},to=Uo.setDocument=function(t){var e,n=t?t.ownerDocument||t:co,r=n.defaultView;return n!==eo&&9===n.nodeType&&n.documentElement?(no=(eo=n).documentElement,ro=!$r(n),r&&r!==function(t){try{return t.top}catch(e){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",(function(){to()}),!1):r.attachEvent&&r.attachEvent("onunload",(function(){to()}))),Wr.attributes=!0,Wr.getElementsByTagName=!0,Wr.getElementsByClassName=Io.test(n.getElementsByClassName),Wr.getById=!0,qr.find.ID=function(t,e){if(typeof e.getElementById!=po&&ro){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},qr.filter.ID=function(t){var e=t.replace(Vo,Ur);return function(t){return t.getAttribute("id")===e}},qr.find.TAG=Wr.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!=po)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"!==t)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},qr.find.CLASS=Wr.getElementsByClassName&&function(t,e){if(ro)return e.getElementsByClassName(t)},io=[],oo=[],Wr.disconnectedMatch=!0,oo=oo.length&&new RegExp(oo.join("|")),io=io.length&&new RegExp(io.join("|")),e=Io.test(no.compareDocumentPosition),ao=e||Io.test(no.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},ho=e?function(t,e){if(t===e)return Qr=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!Wr.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===co&&ao(co,t)?-1:e===n||e.ownerDocument===co&&ao(co,e)?1:Zr?So.call(Zr,t)-So.call(Zr,e):0:4&r?-1:1)}:function(t,e){if(t===e)return Qr=!0,0;var r,o=0,i=t.parentNode,a=e.parentNode,u=[t],c=[e];if(!i||!a)return t===n?-1:e===n?1:i?-1:a?1:Zr?So.call(Zr,t)-So.call(Zr,e):0;if(i===a)return qo(t,e);for(r=t;r=r.parentNode;)u.unshift(r);for(r=e;r=r.parentNode;)c.unshift(r);for(;u[o]===c[o];)o++;return o?qo(u[o],c[o]):u[o]===co?-1:c[o]===co?1:0},n):eo},Uo.matches=function(t,e){return Uo(t,null,null,e)},Uo.matchesSelector=function(t,e){if((t.ownerDocument||t)!==eo&&to(t),e=e.replace(No,"='$1']"),Wr.matchesSelector&&ro&&(!io||!io.test(e))&&(!oo||!oo.test(e)))try{var n=(void 0).call(t,e);if(n||Wr.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch($w){}return 0<Uo(e,eo,null,[t]).length},Uo.contains=function(t,e){return(t.ownerDocument||t)!==eo&&to(t),ao(t,e)},Uo.attr=function(t,e){(t.ownerDocument||t)!==eo&&to(t);var n=qr.attrHandle[e.toLowerCase()],r=n&&vo.call(qr.attrHandle,e.toLowerCase())?n(t,e,!ro):void 0;return void 0!==r?r:Wr.attributes||!ro?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},Uo.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Uo.uniqueSort=function(t){var e,n=[],r=0,o=0;if(Qr=!Wr.detectDuplicates,Zr=!Wr.sortStable&&t.slice(0),t.sort(ho),Qr){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return Zr=null,t},Gr=Uo.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=Gr(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=Gr(e);return n},(qr=Uo.selectors={cacheLength:50,createPseudo:Wo,match:Ro,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Vo,Ur),t[3]=(t[3]||t[4]||t[5]||"").replace(Vo,Ur),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Uo.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Uo.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Ro.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Mo.test(n)&&(e=Xr(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Vo,Ur).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=fo[t+" "];return e||(e=new RegExp("(^|"+ko+")"+t+"("+ko+"|$)"))&&fo(t,(function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!=po&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=Uo.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&-1<o.indexOf(n):"$="===e?n&&o.slice(-n.length)===n:"~="===e?-1<(" "+o+" ").indexOf(n):"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var s,l,f,d,m,g,h=i!=a?"nextSibling":"previousSibling",p=e.parentNode,v=u&&e.nodeName.toLowerCase(),b=!c&&!u;if(p){if(i){for(;h;){for(f=e;f=f[h];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===t&&!g&&"nextSibling"}return!0}if(g=[a?p.firstChild:p.lastChild],a&&b){for(m=(s=(l=p[uo]||(p[uo]={}))[t]||[])[0]===so&&s[1],d=s[0]===so&&s[2],f=m&&p.childNodes[m];f=++m&&f&&f[h]||(d=m=0)||g.pop();)if(1===f.nodeType&&++d&&f===e){l[t]=[so,m,d];break}}else if(b&&(s=(e[uo]||(e[uo]={}))[t])&&s[0]===so)d=s[1];else for(;(f=++m&&f&&f[h]||(d=m=0)||g.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[uo]||(f[uo]={}))[t]=[so,d]),f!==e)););return(d-=o)===r||d%r==0&&0<=d/r}}},PSEUDO:function(t,e){var n,r=qr.pseudos[t]||qr.setFilters[t.toLowerCase()]||Uo.error("unsupported pseudo: "+t);return r[uo]?r(e):1<r.length?(n=[t,t,"",e],qr.setFilters.hasOwnProperty(t.toLowerCase())?Wo((function(t,n){for(var o,i=r(t,e),a=i.length;a--;)t[o=So.call(t,i[a])]=!(n[o]=i[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:Wo((function(t){var e=[],n=[],r=Kr(t.replace(To,"$1"));return r[uo]?Wo((function(t,e,n,o){for(var i,a=r(t,null,o,[]),u=t.length;u--;)(i=a[u])&&(t[u]=!(e[u]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),!n.pop()}})),has:Wo((function(t){return function(e){return 0<Uo(t,e).length}})),contains:Wo((function(t){return t=t.replace(Vo,Ur),function(e){return-1<(e.textContent||e.innerText||Gr(e)).indexOf(t)}})),lang:Wo((function(t){return Bo.test(t||"")||Uo.error("unsupported lang: "+t),t=t.replace(Vo,Ur).toLowerCase(),function(e){var n;do{if(n=ro?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.window.location&&t.window.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===no},focus:function(t){return t===eo.activeElement&&(!eo.hasFocus||eo.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!qr.pseudos.empty(t)},header:function(t){return Ho.test(t.nodeName)},input:function(t){return Do.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:Xo((function(){return[0]})),last:Xo((function(t,e){return[e-1]})),eq:Xo((function(t,e,n){return[n<0?n+e:n]})),even:Xo((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:Xo((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:Xo((function(t,e,n){for(var r=n<0?n+e:n;0<=--r;)t.push(r);return t})),gt:Xo((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}}).pseudos.nth=qr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})qr.pseudos[jr]=Go(jr);for(jr in{submit:!0,reset:!0})qr.pseudos[jr]=$o(jr);function Yo(){}function Jo(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Zo(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=lo++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,a){var u,c,s=[so,i];if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o){if((u=(c=e[uo]||(e[uo]={}))[r])&&u[0]===so&&u[1]===i)return s[2]=u[2];if((c[r]=s)[2]=t(e,n,a))return!0}}}function Qo(t){return 1<t.length?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function ti(t,e,n,r,o){for(var i,a=[],u=0,c=t.length,s=null!=e;u<c;u++)(i=t[u])&&(n&&!n(i,r,o)||(a.push(i),s&&e.push(u)));return a}function ei(t,e,n,r,o,i){return r&&!r[uo]&&(r=ei(r)),o&&!o[uo]&&(o=ei(o,i)),Wo((function(i,a,u,c){var s,l,f,d=[],m=[],g=a.length,h=i||function(t,e,n){for(var r=0,o=e.length;r<o;r++)Uo(t,e[r],n);return n}(e||"*",u.nodeType?[u]:u,[]),p=!t||!i&&e?h:ti(h,d,t,u,c),v=n?o||(i?t:g||r)?[]:a:p;if(n&&n(p,v,u,c),r)for(s=ti(v,m),r(s,[],u,c),l=s.length;l--;)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f));if(i){if(o||t){if(o){for(s=[],l=v.length;l--;)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}for(l=v.length;l--;)(f=v[l])&&-1<(s=o?So.call(i,f):d[l])&&(i[s]=!(a[s]=f))}}else v=ti(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):wo.apply(a,v)}))}function ni(t){for(var e,n,r,o=t.length,i=qr.relative[t[0].type],a=i||qr.relative[" "],u=i?1:0,c=Zo((function(t){return t===e}),a,!0),s=Zo((function(t){return-1<So.call(e,t)}),a,!0),l=[function(t,n,r){return!i&&(r||n!==Jr)||((e=n).nodeType?c(t,n,r):s(t,n,r))}];u<o;u++)if(n=qr.relative[t[u].type])l=[Zo(Qo(l),n)];else{if((n=qr.filter[t[u].type].apply(null,t[u].matches))[uo]){for(r=++u;r<o&&!qr.relative[t[r].type];r++);return ei(1<u&&Qo(l),1<u&&Jo(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(To,"$1"),n,u<r&&ni(t.slice(u,r)),r<o&&ni(t=t.slice(r)),r<o&&Jo(t))}l.push(n)}return Qo(l)}function ri(t){return void 0!==t}function oi(t){return"string"==typeof t}function ii(t,e){var n,r,o;for(o=(e=e||di).createElement("div"),n=e.createDocumentFragment(),o.innerHTML=t;r=o.firstChild;)n.appendChild(r);return n}function ai(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function ui(t,e,n){var r,o;return e=Ai(e)[0],t.each((function(){n&&r===this.parentNode||(r=this.parentNode,o=e.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)})),t}function ci(t,e){return new Ai.fn.init(t,e)}function si(t){return null==t?"":(""+t).replace(Ei,"")}function li(t,e){var n,r,o,i;if(t)if(void 0===(n=t.length)){for(r in t)if(t.hasOwnProperty(r)&&!1===e.call(i=t[r],r,i))break}else for(o=0;o<n&&!1!==e.call(i=t[o],o,i);o++);return t}function fi(t,e){var n=[];return li(t,(function(t,r){e(r,t)&&n.push(r)})),n}Yo.prototype=qr.filters=qr.pseudos,qr.setFilters=new Yo,Xr=Uo.tokenize=function(t,e){var n,r,o,i,a,u,c,s=mo[t+" "];if(s)return e?0:s.slice(0);for(a=t,u=[],c=qr.preFilter;a;){for(i in n&&!(r=zo.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=Ao.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(To," ")}),a=a.slice(n.length)),qr.filter)qr.filter.hasOwnProperty(i)&&(!(r=Ro[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return e?a.length:a?Uo.error(t):mo(t,u).slice(0)},Kr=Uo.compile=function(t,e){var n,r=[],o=[],i=go[t+" "];if(!i){for(n=(e=e||Xr(t)).length;n--;)(i=ni(e[n]))[uo]?r.push(i):o.push(i);(i=go(t,function(t,e){function n(n,i,a,u,c){var s,l,f,d=0,m="0",g=n&&[],h=[],p=Jr,v=n||o&&qr.find.TAG("*",c),b=so+=null==p?1:Math.random()||.1,y=v.length;for(c&&(Jr=i!==eo&&i);m!==y&&null!=(s=v[m]);m++){if(o&&s){for(l=0;f=t[l++];)if(f(s,i,a)){u.push(s);break}c&&(so=b)}r&&((s=!f&&s)&&d--,n&&g.push(s))}if(d+=m,r&&m!==d){for(l=0;f=e[l++];)f(g,h,i,a);if(n){if(0<d)for(;m--;)g[m]||h[m]||(h[m]=yo.call(u));h=ti(h)}wo.apply(u,h),c&&!n&&0<h.length&&1<d+e.length&&Uo.uniqueSort(u)}return c&&(so=b,Jr=p),g}var r=0<e.length,o=0<t.length;return r?Wo(n):n}(o,r))).selector=t}return i},Yr=Uo.select=function(t,e,n,r){var o,i,a,u,c,s="function"==typeof t&&t,l=!r&&Xr(t=s.selector||t);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&Wr.getById&&9===e.nodeType&&ro&&qr.relative[i[1].type]){if(!(e=(qr.find.ID(a.matches[0].replace(Vo,Ur),e)||[])[0]))return n;s&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=Ro.needsContext.test(t)?0:i.length;o--&&!qr.relative[u=(a=i[o]).type];)if((c=qr.find[u])&&(r=c(a.matches[0].replace(Vo,Ur),Lo.test(i[0].type)&&Ko(e.parentNode)||e))){if(i.splice(o,1),!(t=r.length&&Jo(i)))return wo.apply(n,r),n;break}}return(s||Kr(t,l))(r,e,!ro,n,Lo.test(t)&&Ko(e.parentNode)||e),n},Wr.sortStable=uo.split("").sort(ho).join("")===uo,Wr.detectDuplicates=!!Qr,to(),Wr.sortDetached=!0;var di=t.document,mi=Array.prototype.push,gi=Array.prototype.slice,hi=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,pi=Fr.Event,vi=jn.makeMap("children,contents,next,prev"),bi=function(t,e,n,r){var o;if(oi(e))e=ii(e,Oi(t[0]));else if(e.length&&!e.nodeType){if(e=Ai.makeArray(e),r)for(o=e.length-1;0<=o;o--)bi(t,e[o],n,r);else for(o=0;o<e.length;o++)bi(t,e[o],n,r);return t}if(e.nodeType)for(o=t.length;o--;)n.call(t[o],e);return t},yi=jn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),xi=jn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),wi={for:"htmlFor",class:"className",readonly:"readOnly"},Ci={float:"cssFloat"},Si={},ki={},Ei=/^\s*|\s*$/g,Oi=function(t){return t?9===t.nodeType?t:t.ownerDocument:di};function _i(t,e,n){var r=[],o=t[e];for("string"!=typeof n&&n instanceof Ai&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&Ai(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r}function Ti(t,e,n,r){var o=[];for(r instanceof Ai&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"==typeof r&&Ai(t).is(r))break}o.push(t)}return o}function zi(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null}ci.fn=ci.prototype={constructor:ci,selector:"",context:null,length:0,init:function(e,n){var r,o,i=this;if(!e)return i;if(e.nodeType)return i.context=i[0]=e,i.length=1,i;if(n&&n.nodeType)i.context=n;else{if(n)return Ai(e).attr(n);i.context=n=t.document}if(oi(e)){if(!(r="<"===(i.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:hi.exec(e)))return Ai(n).find(e);if(r[1])for(o=ii(e,Oi(n)).firstChild;o;)mi.call(i,o),o=o.nextSibling;else{if(!(o=Oi(n).getElementById(r[2])))return i;if(o.id!==r[2])return i.find(e);i.length=1,i[0]=o}}else this.add(e,!1);return i},toArray:function(){return jn.toArray(this)},add:function(t,e){var n,r;if(oi(t))return this.add(Ai(t));if(!1!==e)for(n=Ai.unique(this.toArray().concat(Ai.makeArray(t))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else mi.apply(this,Ai.makeArray(t));return this},attr:function(t,e){var n,r=this;if("object"==typeof t)li(t,(function(t,e){r.attr(t,e)}));else{if(!ri(e)){if(r[0]&&1===r[0].nodeType){if((n=Si[t])&&n.get)return n.get(r[0],t);if(xi[t])return r.prop(t)?t:void 0;null===(e=r[0].getAttribute(t,2))&&(e=void 0)}return e}this.each((function(){var n;if(1===this.nodeType){if((n=Si[t])&&n.set)return void n.set(this,e);null===e?this.removeAttribute(t,2):this.setAttribute(t,e,2)}}))}return r},removeAttr:function(t){return this.attr(t,null)},prop:function(t,e){var n=this;if("object"==typeof(t=wi[t]||t))li(t,(function(t,e){n.prop(t,e)}));else{if(!ri(e))return n[0]&&n[0].nodeType&&t in n[0]?n[0][t]:e;this.each((function(){1===this.nodeType&&(this[t]=e)}))}return n},css:function(t,e){function n(t){return t.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()}))}function r(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t}))}var o,i,a=this;if("object"==typeof t)li(t,(function(t,e){a.css(t,e)}));else if(ri(e))t=n(t),"number"!=typeof e||yi[t]||(e=e.toString()+"px"),a.each((function(){var n=this.style;if((i=ki[t])&&i.set)i.set(this,e);else{try{this.style[Ci[t]||t]=e}catch(o){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(r(t)):n.removeAttribute(t))}}));else{if(o=a[0],(i=ki[t])&&i.get)return i.get(o);if(!o.ownerDocument.defaultView)return o.currentStyle?o.currentStyle[n(t)]:"";try{return o.ownerDocument.defaultView.getComputedStyle(o,null).getPropertyValue(r(t))}catch(f){return}}return a},remove:function(){for(var t,e=this.length;e--;)pi.clean(t=this[e]),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var t,e=this.length;e--;)for(t=this[e];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(t){var e,n=this;if(ri(t)){e=n.length;try{for(;e--;)n[e].innerHTML=t}catch(m){Ai(n[e]).empty().append(t)}return n}return n[0]?n[0].innerHTML:""},text:function(t){var e;if(ri(t)){for(e=this.length;e--;)"innerText"in this[e]?this[e].innerText=t:this[0].textContent=t;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return bi(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)}))},prepend:function(){return bi(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)}),!0)},before:function(){return this[0]&&this[0].parentNode?bi(this,arguments,(function(t){this.parentNode.insertBefore(t,this)})):this},after:function(){return this[0]&&this[0].parentNode?bi(this,arguments,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}),!0):this},appendTo:function(t){return Ai(t).append(this),this},prependTo:function(t){return Ai(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return ui(this,t)},wrapAll:function(t){return ui(this,t,!0)},wrapInner:function(t){return this.each((function(){Ai(this).contents().wrapAll(t)})),this},unwrap:function(){return this.parent().each((function(){Ai(this).replaceWith(this.childNodes)}))},clone:function(){var t=[];return this.each((function(){t.push(this.cloneNode(!0))})),Ai(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,e){var n=this;return"string"!=typeof t||(-1!==t.indexOf(" ")?li(t.split(" "),(function(){n.toggleClass(this,e)})):n.each((function(n,r){var o,i;(i=ai(r,t))!==e&&(o=r.className,i?r.className=si((" "+o+" ").replace(" "+t+" "," ")):r.className+=o?" "+t:t)}))),n},hasClass:function(t){return ai(this[0],t)},each:function(t){return li(this,t)},on:function(t,e){return this.each((function(){pi.bind(this,t,e)}))},off:function(t,e){return this.each((function(){pi.unbind(this,t,e)}))},trigger:function(t){return this.each((function(){"object"==typeof t?pi.fire(this,t.type,t):pi.fire(this,t)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new Ai(gi.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var e,n,r=[];for(e=0,n=this.length;e<n;e++)Ai.find(t,this[e],r);return Ai(r)},filter:function(t){return Ai("function"==typeof t?fi(this.toArray(),(function(e,n){return t(n,e)})):Ai.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof Ai&&(t=t[0]),this.each((function(n,r){for(;r;){if("string"==typeof t&&Ai(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}})),Ai(e)},offset:function(t){var e,n,r,o,i=0,a=0;return t?this.css(t):((e=this[0])&&(r=(n=e.ownerDocument).documentElement,e.getBoundingClientRect&&(i=(o=e.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:mi,sort:Array.prototype.sort,splice:Array.prototype.splice},jn.extend(ci,{extend:jn.extend,makeArray:function(t){return function(t){return t&&t===t.window}(t)||t.nodeType?[t]:jn.toArray(t)},inArray:function(t,e){var n;if(e.indexOf)return e.indexOf(t);for(n=e.length;n--;)if(e[n]===t)return n;return-1},isArray:jn.isArray,each:li,trim:si,grep:fi,find:Uo,expr:Uo.selectors,unique:Uo.uniqueSort,text:Uo.getText,contains:Uo.contains,filter:function(t,e,n){var r=e.length;for(n&&(t=":not("+t+")");r--;)1!==e[r].nodeType&&e.splice(r,1);return 1===e.length?Ai.find.matchesSelector(e[0],t)?[e[0]]:[]:Ai.find.matches(t,e)}}),li({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return _i(t,"parentNode")},next:function(t){return zi(t,"nextSibling",1)},prev:function(t){return zi(t,"previousSibling",1)},children:function(t){return Ti(t.firstChild,"nextSibling",1)},contents:function(t){return jn.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},(function(t,e){ci.fn[t]=function(n){var r=[];this.each((function(){var t=e.call(r,this,n,r);t&&(Ai.isArray(t)?r.push.apply(r,t):r.push(t))})),1<this.length&&(vi[t]||(r=Ai.unique(r)),0===t.indexOf("parents")&&(r=r.reverse()));var o=Ai(r);return n?o.filter(n):o}})),li({parentsUntil:function(t,e){return _i(t,"parentNode",e)},nextUntil:function(t,e){return Ti(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return Ti(t,"previousSibling",1,e).slice(1)}},(function(t,e){ci.fn[t]=function(n,r){var o=[];this.each((function(){var t=e.call(o,this,n,o);t&&(Ai.isArray(t)?o.push.apply(o,t):o.push(t))})),1<this.length&&(o=Ai.unique(o),0!==t.indexOf("parents")&&"prevUntil"!==t||(o=o.reverse()));var i=Ai(o);return r?i.filter(r):i}})),ci.fn.is=function(t){return!!t&&0<this.filter(t).length},ci.fn.init.prototype=ci.fn,ci.overrideDefaults=function(t){var e,n=function(r,o){return e=e||t(),0===arguments.length&&(r=e.element),new n.fn.init(r,o=o||e.context)};return Ai.extend(n,this),n},ci.attrHooks=Si,ci.cssHooks=ki;var Ai=ci,Ni=(Mi.prototype.current=function(){return this.node},Mi.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},Mi.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},Mi.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},Mi.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n])return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},Mi.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if((i=t.parentNode)&&i!==this.rootNode)return i}},Mi);function Mi(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}var Bi,Ri=jn.each,Di=jn.grep,Hi=Pn.ie,Ii=/^([a-z0-9],?)+$/i,Pi=/^[ \t\r\n]*$/,Li=function(t,e){var n=e.attr("style"),r=t.serialize(t.parse(n),e[0].nodeName);e.attr("data-mce-style",r=r||null)},Fi=function(t,e){var n,r,o=0;if(t)for(n=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)r=t.nodeType,(!e||3!==r||r!==n&&t.nodeValue.length)&&(o++,n=r);return o};function Vi(e,i){var a,u=this;function c(t){if(t&&e&&"string"==typeof t){var n=e.getElementById(t);return n&&n.id!==t?e.getElementsByName(t)[1]:n}return t}function s(t){return"string"==typeof t&&(t=c(t)),V(t)}function l(t,e,n){var r,o,i=s(t);return i.length&&(o=(r=a[e])&&r.get?r.get(i,e):i.attr(e)),void 0===o&&(o=n||""),o}function f(t){var e=c(t);return e?e.attributes:[]}function d(t,e,n){var r,o;""===n&&(n=null);var u=s(t);r=u.attr(e),u.length&&((o=a[e])&&o.set?o.set(u,n,e):u.attr(e,n),r!==n&&i.onSetAttrib&&i.onSetAttrib({attrElm:u,attrName:e,attrValue:n}))}function m(){return i.root_element||e.body}function g(t,n){return function(t,e,n){var r,o,i=0,a=0,u=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===$t(te.fromDom(t),"position"))return{x:i=(o=e.getBoundingClientRect()).left+(u.documentElement.scrollLeft||t.scrollLeft)-u.documentElement.clientLeft,y:a=o.top+(u.documentElement.scrollTop||t.scrollTop)-u.documentElement.clientTop};for(r=e;r&&r!==n&&r.nodeType&&!Yt(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=e.parentNode;r&&r!==n&&r.nodeType&&!Yt(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(t){return Ye.isFirefox()&&"table"===Nt(t)?Kt(wt(t)).filter((function(t){return"caption"===Nt(t)})).bind((function(t){return Kt(xt(t)).map((function(e){var n=e.dom().offsetTop,r=t.dom().offsetTop,o=t.dom().offsetHeight;return n<=r?-o:0}))})).getOr(0):0}(te.fromDom(e))}return{x:i,y:a}}(e.body,c(t),n)}function h(t,e,n){var r=s(t);return n?r.css(e):("float"===(e=e.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()})))&&(e=Pn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)}function p(t){var e,n;return e=h(t=c(t),"width"),n=h(t,"height"),-1===e.indexOf("px")&&(e=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(e,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}}function v(t,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(Ii.test(e)){var r=e.toLowerCase().split(/,/),o=t.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(t.nodeType&&1!==t.nodeType)return!1}var i=Array.isArray(t)?t:[t];return 0<Uo(e,i[0].ownerDocument||i[0],null,i).length}function b(t,e,n,r){var o,i=[],a=c(t);for(r=void 0===r,n=n||("BODY"!==m().nodeName?m().parentNode:null),jn.is(e,"string")&&(e="*"===(o=e)?function(t){return 1===t.nodeType}:function(t){return v(t,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!e||"function"==typeof e&&e(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null}function y(t,e,n){var r=e;if(t)for("string"==typeof e&&(r=function(t){return v(t,e)}),t=t[n];t;t=t[n])if("function"==typeof r&&r(t))return t;return null}function x(t,e,n){var r,o="string"==typeof t?c(t):t;return!!o&&(jn.isArray(o)&&(o.length||0===o.length)?(r=[],Ri(o,(function(t,o){t&&("string"==typeof t&&(t=c(t)),r.push(e.call(n,t,o)))})),r):e.call(n||u,o))}function w(t,e){s(t).each((function(t,n){Ri(e,(function(t,e){d(n,e,t)}))}))}function C(t,e){var n=s(t);Hi?n.each((function(t,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(y){Ai("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}})):n.html(e)}function S(t,n,r,o,i){return x(t,(function(t){var a="string"==typeof n?e.createElement(n):n;return w(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&C(a,o)),i?a:t.appendChild(a)}))}function k(t,n,r){return S(e.createElement(t),t,n,r,!0)}function E(t,e){var n=s(t);return e?n.each((function(){for(var t;t=this.firstChild;)3===t.nodeType&&0===t.data.length?this.removeChild(t):this.parentNode.insertBefore(t,this)})).remove():n.remove(),1<n.length?n.toArray():n[0]}function O(t,e,n){s(t).toggleClass(e,n).each((function(){""===this.className&&Ai(this).attr("class",null)}))}function _(t,e,n){return x(e,(function(e){return jn.is(e,"array")&&(t=t.cloneNode(!0)),n&&Ri(Di(e.childNodes),(function(e){t.appendChild(e)})),e.parentNode.replaceChild(t,e)}))}function T(){return e.createRange()}function z(t){if(t&&$e.isElement(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null}void 0===i&&(i={});var A={},N=t.window,M={},B=0,R=function(e,i){void 0===i&&(i={});var a,u=0,c={};function s(t){e.getElementsByTagName("head")[0].appendChild(t)}function l(n,r,o){function l(t){v.status=t,v.passed=[],v.failed=[],g&&(g.onload=null,g.onerror=null,g=null)}function f(){for(var t=v.passed,e=t.length;e--;)t[e]();l(2)}function d(){for(var t=v.failed,e=t.length;e--;)t[e]();l(3)}function m(t,e){t()||((new Date).getTime()-p<a?zn.setTimeout(e):d())}var g,h,p,v,b=function(){m((function(){for(var t,n,r=e.styleSheets,o=r.length;o--;)if((n=(t=r[o]).ownerNode?t.ownerNode:t.owningElement)&&n.id===g.id)return f(),!0}),b)},y=function(){m((function(){try{var t=h.sheet.cssRules;return f(),!!t}catch(r){}}),y)};if(n=jn._addCacheSuffix(n),c[n]?v=c[n]:c[n]=v={passed:[],failed:[]},r&&v.passed.push(r),o&&v.failed.push(o),1!==v.status)if(2!==v.status)if(3!==v.status){if(v.status=1,(g=e.createElement("link")).rel="stylesheet",g.type="text/css",g.id="u"+u++,g.async=!1,g.defer=!1,p=(new Date).getTime(),i.contentCssCors&&(g.crossOrigin="anonymous"),i.referrerPolicy&&Xe(te.fromDom(g),"referrerpolicy",i.referrerPolicy),!("onload"in g)||(x=t.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(x[1],10)<536){if(0<t.navigator.userAgent.indexOf("Firefox"))return(h=e.createElement("style")).textContent='@import "'+n+'"',y(),void s(h);b()}else g.onload=b,g.onerror=d;var x;s(g),g.href=n}else d();else f()}function f(t){return cn((function(e){l(t,n(e,r(dn.value(t))),n(e,r(dn.error(t))))}))}function d(t){return t.fold(o,o)}return a=i.maxLoadTime||5e3,{load:l,loadAll:function(t,e,n){sn(G(t,f)).get((function(t){var r=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a)?n:r).push(a)}return{pass:n,fail:r}}(t,(function(t){return t.isValue()}));0<r.fail.length?n(r.fail.map(d)):e(r.pass.map(d))}))},_setReferrerPolicy:function(t){i.referrerPolicy=t}}}(e,{contentCssCors:i.contentCssCors,referrerPolicy:i.referrerPolicy}),D=[],I=i.schema?i.schema:Tr({}),P=Dr({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),L=i.ownEvents?new Fr:Fr.Event,F=I.getBlockElements(),V=Ai.overrideDefaults((function(){return{context:e,element:q.getRoot()}})),U=br.encodeAllRaw,j=function(t,n,r,o){if(jn.isArray(t)){for(var a=t.length,u=[];a--;)u[a]=j(t[a],n,r,o);return u}return!i.collect||t!==e&&t!==N||D.push([t,n,r,o]),L.bind(t,n,r,o||q)},W=function(t,n,r){var o;if(jn.isArray(t)){o=t.length;for(var i=[];o--;)i[o]=W(t[o],n,r);return i}if(D&&(t===e||t===N))for(o=D.length;o--;){var a=D[o];t!==a[0]||n&&n!==a[1]||r&&r!==a[2]||L.unbind(a[0],a[1],a[2])}return L.unbind(t,n,r)},q={doc:e,settings:i,win:N,files:M,stdMode:!0,boxModel:!0,styleSheetLoader:R,boundEvents:D,styles:P,schema:I,events:L,isBlock:function(t){if("string"==typeof t)return!!F[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!F[t.nodeName])}return!1},$:V,$$:s,root:null,clone:function(t,n){if(!Hi||1!==t.nodeType||n)return t.cloneNode(n);if(n)return null;var r=e.createElement(t.nodeName);return Ri(f(t),(function(e){d(r,e.nodeName,l(t,e.nodeName))})),r},getRoot:m,getViewPort:function(t){var e=Ie(t);return{x:e.x(),y:e.y(),w:e.width(),h:e.height()}},getRect:function(t){var e,n;return e=g(t=c(t)),n=p(t),{x:e.x,y:e.y,w:n.w,h:n.h}},getSize:p,getParent:function(t,e,n){var r=b(t,e,n,!1);return r&&0<r.length?r[0]:null},getParents:b,get:c,getNext:function(t,e){return y(t,e,"nextSibling")},getPrev:function(t,e){return y(t,e,"previousSibling")},select:function(t,n){return Uo(t,c(n)||i.root_element||e,[])},is:v,add:S,create:k,createHTML:function(t,e,n){var r,o="";for(r in o+="<"+t,e)e.hasOwnProperty(r)&&null!=e[r]&&(o+=" "+r+'="'+U(e[r])+'"');return void 0!==n?o+">"+n+"</"+t+">":o+" />"},createFragment:function(t){var n,r=e.createElement("div"),o=e.createDocumentFragment();for(t&&(r.innerHTML=t);n=r.firstChild;)o.appendChild(n);return o},remove:E,setStyle:function(t,e,n){var r=H(e)?s(t).css(e,n):s(t).css(e);i.update_styles&&Li(P,r)},getStyle:h,setStyles:function(t,e){var n=s(t).css(e);i.update_styles&&Li(P,n)},removeAllAttribs:function(t){return x(t,(function(t){var e,n=t.attributes;for(e=n.length-1;0<=e;e--)t.removeAttributeNode(n.item(e))}))},setAttrib:d,setAttribs:w,getAttrib:l,getPos:g,parseStyle:function(t){return P.parse(t)},serializeStyle:function(t,e){return P.serialize(t,e)},addStyle:function(n){var r,o;if(q!==Vi.DOM&&e===t.document){if(A[n])return;A[n]=!0}(o=e.getElementById("mceDefaultStyles"))||((o=e.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=e.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=n:o.appendChild(e.createTextNode(n))},loadCSS:function(n){var r;q===Vi.DOM||e!==t.document?(n=n||"",r=e.getElementsByTagName("head")[0],Ri(n.split(","),(function(t){var e;t=jn._addCacheSuffix(t),M[t]||(M[t]=!0,e=k("link",tt(tt({rel:"stylesheet",type:"text/css",href:t},i.contentCssCors?{crossOrigin:"anonymous"}:{}),i.referrerPolicy?{referrerPolicy:i.referrerPolicy}:{})),r.appendChild(e))}))):Vi.DOM.loadCSS(n)},addClass:function(t,e){s(t).addClass(e)},removeClass:function(t,e){O(t,e,!1)},hasClass:function(t,e){return s(t).hasClass(e)},toggleClass:O,show:function(t){s(t).show()},hide:function(t){s(t).hide()},isHidden:function(t){return"none"===s(t).css("display")},uniqueId:function(t){return(t||"mce_")+B++},setHTML:C,getOuterHTML:function(t){var e="string"==typeof t?c(t):t;return $e.isElement(e)?e.outerHTML:Ai("<div></div>").append(Ai(e).clone()).html()},setOuterHTML:function(t,e){s(t).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}E(Ai(this).html(e),!0)}))},decode:br.decode,encode:U,insertAfter:function(t,e){var n=c(e);return x(t,(function(t){var e,r;return e=n.parentNode,(r=n.nextSibling)?e.insertBefore(t,r):e.appendChild(t),t}))},replace:_,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=k(e),Ri(f(t),(function(e){d(n,e.nodeName,l(t,e.nodeName))})),_(n,t,!0)),n||t},findCommonAncestor:function(t,e){for(var n,r=t;r;){for(n=e;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},toHex:function(t){return P.toHex(jn.trim(t))},run:x,getAttribs:f,isEmpty:function(t,e){var n,r,o,i,a=0;if(t=t.firstChild){var u=new Ni(t,t.parentNode),c=I?I.getWhiteSpaceElements():{};e=e||(I?I.getNonEmptyElements():null);do{if(o=t.nodeType,$e.isElement(t)){var s=t.getAttribute("data-mce-bogus");if(s){t=u.next("all"===s);continue}if(i=t.nodeName.toLowerCase(),e&&e[i]){if("br"!==i)return!1;a++,t=u.next();continue}for(n=(r=f(t)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!Pi.test(t.nodeValue))return!1;if(3===o&&t.parentNode&&c[t.parentNode.nodeName]&&Pi.test(t.nodeValue))return!1;t=u.next()}while(t)}return a<=1},createRng:T,nodeIndex:Fi,split:function(t,e,n){var r,o,i,a=T();if(t&&e)return a.setStart(t.parentNode,Fi(t)),a.setEnd(e.parentNode,Fi(e)),r=a.extractContents(),(a=T()).setStart(e.parentNode,Fi(e)+1),a.setEnd(t.parentNode,Fi(t)+1),o=a.extractContents(),(i=t.parentNode).insertBefore(ur.trimNode(q,r),t),i.insertBefore(n||e,t),i.insertBefore(ur.trimNode(q,o),t),E(t),n||e},bind:j,unbind:W,fire:function(t,e,n){return L.fire(t,e,n)},getContentEditable:z,getContentEditableParent:function(t){for(var e=m(),n=null;t&&t!==e&&null===(n=z(t));t=t.parentNode);return n},destroy:function(){if(D)for(var t=D.length;t--;){var e=D[t];L.unbind(e[0],e[1],e[2])}Uo.setDocument&&Uo.setDocument()},isChildOf:function(t,e){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},dumpRng:function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset}};return a=function(t,e,n){var r=e.keep_values,o={set:function(t,n,r){e.url_converter&&(n=e.url_converter.call(e.url_converter_scope||q,n,r,t[0])),t.attr("data-mce-"+r,n).attr(r,n)},get:function(t,e){return t.attr("data-mce-"+e)||t.attr(e)}},i={style:{set:function(e,n){null===n||"object"!=typeof n?(r&&e.attr("data-mce-style",n),null!==n&&"string"==typeof n?(e.removeAttr("style"),e.css(t.parse(n))):e.attr("style",n)):e.css(n)},get:function(e){var n=e.attr("data-mce-style")||e.attr("style");return t.serialize(t.parse(n),e[0].nodeName)}}};return r&&(i.href=i.src=o),i}(P,i),q}(Bi=Vi=Vi||{}).DOM=Bi(t.document),Bi.nodeIndex=Fi;var Ui=Vi,ji=Ui.DOM,Wi=jn.each,qi=jn.grep,Gi=($i.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},$i.prototype.loadScript=function(e,n,r){var o,i,a=ji;i=a.uniqueId(),(o=t.document.createElement("script")).id=i,o.type="text/javascript",o.src=jn._addCacheSuffix(e),this.settings.referrerPolicy&&a.setAttrib(o,"referrerpolicy",this.settings.referrerPolicy),o.onload=function(){a.remove(i),o&&(o.onreadystatechange=o.onload=o=null),n()},o.onerror=function(){V(r)?r():void 0!==t.console&&t.console.log&&t.console.log("Failed to load script: "+e)},(t.document.getElementsByTagName("head")[0]||t.document.body).appendChild(o)},$i.prototype.isDone=function(t){return 2===this.states[t]},$i.prototype.markDone=function(t){this.states[t]=2},$i.prototype.add=function(t,e,n,r){void 0===this.states[t]&&(this.queue.push(t),this.states[t]=0),e&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:e,failure:r,scope:n||this}))},$i.prototype.load=function(t,e,n,r){return this.add(t,e,n,r)},$i.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},$i.prototype.loadQueue=function(t,e,n){this.loadScripts(this.queue,t,e,n)},$i.prototype.loadScripts=function(t,e,n,r){function o(t,e){Wi(a.scriptLoadedCallbacks[e],(function(e){V(e[t])&&e[t].call(e.scope)})),a.scriptLoadedCallbacks[e]=void 0}var i,a=this,u=[];a.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this}),(i=function(){var e=qi(t);if(t.length=0,Wi(e,(function(t){2!==a.states[t]?3!==a.states[t]?1!==a.states[t]&&(a.states[t]=1,a.loading++,a.loadScript(t,(function(){a.states[t]=2,a.loading--,o("success",t),i()}),(function(){a.states[t]=3,a.loading--,u.push(t),o("failure",t),i()}))):o("failure",t):o("success",t)})),!a.loading){var n=a.queueLoadedCallbacks.slice(0);a.queueLoadedCallbacks.length=0,Wi(n,(function(t){0===u.length?V(t.success)&&t.success.call(t.scope):V(t.failure)&&t.failure.call(t.scope,u)}))}})()},$i.ScriptLoader=new $i,$i);function $i(t){void 0===t&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}function Xi(){return B(Yi,Ji.get())}var Ki,Yi={},Ji=ee("en"),Zi={getData:function(){return A(Yi,(function(t){return tt({},t)}))},setCode:function(t){t&&Ji.set(t)},getCode:function(){return Ji.get()},add:function(t,e){var n=Yi[t];n||(Yi[t]=n={}),z(e,(function(t,e){n[e.toLowerCase()]=t}))},translate:function(t){function e(t){return V(t)?Object.prototype.toString.call(t):i(t)?"":""+t}function n(t){var n=e(t);return B(o,n.toLowerCase()).map(e).getOr(n)}function r(t){return t.replace(/{context:\w+}$/,"")}var o=Xi().getOr({}),i=function(t){return""===t||null==t};if(i(t))return"";if(function(t){return I(t)&&Q(t,"raw")}(t))return e(t.raw);if(function(t){return P(t)&&1<t.length}(t)){var a=t.slice(1);return r(n(t[0]).replace(/\{([0-9]+)\}/g,(function(t,n){return Q(a,n)?e(a[n]):t})))}return r(n(t))},isRtl:function(){return Xi().bind((function(t){return B(t,"_dir")})).exists((function(t){return"rtl"===t}))},hasCode:function(t){return Q(Yi,t)}};function Qi(){function t(t,e){var n=X(u,(function(n){return n.name===t&&n.state===e}));$(n,(function(t){return t.callback()}))}function e(t){var e;return a[t]&&(e=a[t].dependencies),e||[]}function n(t,e){return"object"==typeof e?e:"string"==typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}}var r=this,o=[],i={},a={},u=[],c=function(r,o,u,s,l){if(!i[r]){var f="string"==typeof o?o:o.prefix+o.resource+o.suffix;0!==f.indexOf("/")&&-1===f.indexOf("://")&&(f=Qi.baseURL+"/"+f),i[r]=f.substring(0,f.lastIndexOf("/"));var d=function(){t(r,"loaded"),function(t,r,o,i){var a=e(t);$(a,(function(t){var e=n(r,t);c(e.resource,e,void 0,void 0)})),o&&o.call(i||Gi)}(r,o,u,s)};a[r]?d():Gi.ScriptLoader.add(f,d,s,l)}},s=function(t,e,n){void 0===n&&(n="added"),Q(a,t)&&"added"===n||Q(i,t)&&"loaded"===n?e():u.push({name:t,state:n,callback:e})};return{items:o,urls:i,lookup:a,_listeners:u,get:function(t){return a[t]?a[t].instance:void 0},dependencies:e,requireLangPack:function(t,e){!1!==Qi.languageLoad&&s(t,(function(){var n=Zi.getCode();!n||e&&-1===(","+(e||"")+",").indexOf(","+n+",")||Gi.ScriptLoader.add(i[t]+"/langs/"+n+".js")}),"loaded")},add:function(e,n,r){var i=n;return o.push(i),a[e]={instance:i,dependencies:r},t(e,"added"),i},remove:function(t){delete i[t],delete a[t]},createUrl:n,addComponents:function(t,e){var n=r.urls[t];$(e,(function(t){Gi.ScriptLoader.add(n+"/"+t)}))},load:c,waitFor:s}}function ta(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null===r&&(r=t.setTimeout((function(){e.apply(null,o),r=null}),n))}}}function ea(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&t.clearTimeout(r),r=t.setTimeout((function(){e.apply(null,o),r=null}),n)}}}function na(t,e){var n=qt(t,e);return void 0===n||""===n?[]:n.split(" ")}function ra(t){return void 0!==t.dom().classList}function oa(t,e){ra(t)?t.dom().classList.add(e):function(t,e){!function(t,e,n){var r=na(t,e).concat([n]);Xe(t,e,r.join(" "))}(t,"class",e)}(t,e)}function ia(t,e){return ra(t)&&t.dom().classList.contains(e)}function aa(e,n){return function(e,n){var r=void 0===n?t.document:n.dom();return dt(r)?[]:G(r.querySelectorAll(e),te.fromDom)}(n,e)}(Ki=Qi=Qi||{}).PluginManager=Ki(),Ki.ThemeManager=Ki();var ua=Qi,ca=function(t,e){var n=[];return $(wt(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(ca(t,e))})),n};function sa(t,e,n,r,o){return t(n,r)?D.some(n):V(o)&&o(n)?D.none():e(n,r,o)}function la(t,e,n){for(var o=t.dom(),i=V(n)?n:r(!1);o.parentNode;){var a=te.fromDom(o=o.parentNode);if(e(a))return D.some(a);if(i(a))break}return D.none()}function fa(t,e,n){return sa((function(t,e){return e(t)}),la,t,e,n)}function da(t,e,n){return la(t,(function(t){return ft(t,e)}),n)}function ma(e,n){return function(e,n){var r=void 0===n?t.document:n.dom();return dt(r)?D.none():D.from(r.querySelector(e)).map(te.fromDom)}(n,e)}function ga(t,e,n){return sa(ft,da,t,e,n)}function ha(t,e){function n(t,e){return function(t,e){var n=t.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}(t,e)?D.some(qt(t,e)):D.none()}var r=t.selection.getRng(),o=te.fromDom(r.startContainer),i=te.fromDom(t.getBody()),a=e.fold((function(){return"."+qa()}),(function(t){return"["+Ga()+'="'+t+'"]'}));return ga(Ct(o,r.startOffset).getOr(o),a,(function(t){return mt(t,i)})).bind((function(e){return n(e,""+$a()).bind((function(r){return n(e,""+Ga()).map((function(e){var n=Xa(t,r);return{uid:r,name:e,elements:n}}))}))}))}function pa(e,n){var r=gt(e).dom(),o=te.fromDom(r.createDocumentFragment());Tt(o,function(e,n){var r=(n||t.document).createElement("div");return r.innerHTML=e,wt(te.fromDom(r))}(n,r)),zt(e),ze(e,o)}function va(t,e){return te.fromDom(t.dom().cloneNode(e))}function ba(t){return va(t,!1)}function ya(t){return va(t,!0)}function xa(t){return Za(t)&&(t=t.parentNode),Ja(t)&&t.hasAttribute("data-mce-caret")}function wa(t){return Za(t)&&Ya.isZwsp(t.data)}function Ca(t){return xa(t)||wa(t)}function Sa(t){return t.firstChild!==t.lastChild||!$e.isBr(t.firstChild)}function ka(t){var e=t.container();return!(!t||!$e.isText(e))&&(e.data.charAt(t.offset())===Ya.ZWSP||t.isAtStart()&&wa(e.previousSibling))}function Ea(t){var e=t.container();return!(!t||!$e.isText(e))&&(e.data.charAt(t.offset()-1)===Ya.ZWSP||t.isAtEnd()&&wa(e.nextSibling))}function Oa(t){return t&&t.hasAttribute("data-mce-caret")?(function(t){var e=t.getElementsByTagName("br"),n=e[e.length-1];$e.isBogus(n)&&n.parentNode.removeChild(n)}(t),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null}function _a(t){return!cu(t)&&(ou(t)?!iu(t.parentNode):au(t)||ru(t)||uu(t)||su(t))}function Ta(t,e){return _a(t)&&function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(su(t))return!1;if(eu(t))return!0}return!0}(t,e)}function za(t){return t?{left:lu(t.left),top:lu(t.top),bottom:lu(t.bottom),right:lu(t.right),width:lu(t.width),height:lu(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function Aa(t,e){return t=za(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t}function Na(t,e,n){return 0<=t&&t<=Math.min(e.height,n.height)/2}function Ma(t,e){return t.bottom-t.height/2<e.top||!(t.top>e.bottom)&&Na(e.top-t.bottom,t,e)}function Ba(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&Na(e.bottom-t.top,t,e)}function Ra(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}function Da(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null}function Ha(t,e){return 1===t.nodeType&&t.hasChildNodes()&&(e>=t.childNodes.length&&(e=t.childNodes.length-1),t=t.childNodes[e]),t}function Ia(t){return"string"==typeof t&&768<=t.charCodeAt(0)&&fu.test(t)}function Pa(t,e,n){return t.isSome()&&e.isSome()?D.some(n(t.getOrDie(),e.getOrDie())):D.none()}function La(t){return t&&/[\r\n\t ]/.test(t)}function Fa(t){return!!t.setStart&&!!t.setEnd}function Va(t){var e,n=t.startContainer,r=t.startOffset;return!!(La(t.toString())&&bu(n.parentNode)&&$e.isText(n)&&(e=n.data,La(e[r-1])||La(e[r+1])))}function Ua(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom}function ja(t,e){var n=Aa(t,e);return n.width=1,n.right=n.left+1,n}var Wa,qa=r("mce-annotation"),Ga=r("data-mce-annotation"),$a=r("data-mce-annotation-uid"),Xa=function(t,e){return aa(te.fromDom(t.getBody()),"["+$a()+'="'+e+'"]')},Ka=0,Ya={isZwsp:function(t){return"\ufeff"===t},ZWSP:"\ufeff",trim:function(t){return t.replace(new RegExp("\ufeff","g"),"")}},Ja=$e.isElement,Za=$e.isText,Qa=function(t){return Za(t)&&t.data[0]===Ya.ZWSP},tu=function(t){return Za(t)&&t.data[t.data.length-1]===Ya.ZWSP},eu=$e.isContentEditableTrue,nu=$e.isContentEditableFalse,ru=$e.isBr,ou=$e.isText,iu=$e.matchNodeNames(["script","style","textarea"]),au=$e.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),uu=$e.matchNodeNames(["table"]),cu=Ca,su=function(t){return!1===function(t){return $e.isElement(t)&&"true"===t.getAttribute("unselectable")}(t)&&nu(t)},lu=Math.round,fu=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),du=[].slice,mu=$e.isElement,gu=_a,hu=$e.matchStyleValues("display","block table"),pu=$e.matchStyleValues("float","left right"),vu=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=du.call(arguments);return function(t){for(var e=0;e<n.length;e++)if(!n[e](t))return!1;return!0}}(mu,gu,a(pu)),bu=a($e.matchStyleValues("white-space","pre pre-line pre-wrap")),yu=$e.isText,xu=$e.isBr,wu=Ui.nodeIndex,Cu=Ha,Su=function(t){return"createRange"in t?t.createRange():Ui.DOM.createRng()},ku=function(t){var e,n;return e=0<(n=t.getClientRects()).length?za(n[0]):za(t.getBoundingClientRect()),!Fa(t)&&xu(t)&&Ua(e)?function(t){var e,n=t.ownerDocument,r=Su(n),o=n.createTextNode(Rr),i=t.parentNode;return i.insertBefore(o,t),r.setStart(o,0),r.setEnd(o,1),e=za(r.getBoundingClientRect()),i.removeChild(o),e}(t):Ua(e)&&Fa(t)?function(t){var e=t.endContainer,n=t.startOffset,r=t.endOffset;if(t.startContainer===e&&$e.isText(e)&&0===n&&1===r){var o=t.cloneRange();return o.setEndAfter(e),ku(o)}return null}(t):e};function Eu(t,e,n){function o(){return n=n||function(t){function e(t){0!==t.height&&(0<i.length&&function(t,e){return t.left===e.left&&t.top===e.top&&t.bottom===e.bottom&&t.right===e.right}(t,i[i.length-1])||i.push(t))}function n(t,n){var r=Su(t.ownerDocument);if(n<t.data.length){if(Ia(t.data[n]))return i;if(Ia(t.data[n-1])&&(r.setStart(t,n),r.setEnd(t,n+1),!Va(r)))return e(ja(ku(r),!1)),i}0<n&&(r.setStart(t,n-1),r.setEnd(t,n),Va(r)||e(ja(ku(r),!1))),n<t.data.length&&(r.setStart(t,n),r.setEnd(t,n+1),Va(r)||e(ja(ku(r),!0)))}var r,o,i=[];if(yu(t.container()))return n(t.container(),t.offset()),i;if(mu(t.container()))if(t.isAtEnd())o=Cu(t.container(),t.offset()),yu(o)&&n(o,o.data.length),vu(o)&&!xu(o)&&e(ja(ku(o),!1));else{if(o=Cu(t.container(),t.offset()),yu(o)&&n(o,0),vu(o)&&t.isAtEnd())return e(ja(ku(o),!1)),i;r=Cu(t.container(),t.offset()-1),vu(r)&&!xu(r)&&(!hu(r)&&!hu(o)&&vu(o)||e(ja(ku(r),!1))),vu(o)&&e(ja(ku(o),!0))}return i}(Eu(t,e))}return{container:r(t),offset:r(e),toRange:function(){var n;return(n=Su(t.ownerDocument)).setStart(t,e),n.setEnd(t,e),n},getClientRects:o,isVisible:function(){return 0<o().length},isAtStart:function(){return yu(t),0===e},isAtEnd:function(){return yu(t)?e>=t.data.length:e>=t.childNodes.length},isEqual:function(n){return n&&t===n.container()&&e===n.offset()},getNode:function(n){return Cu(t,n?e-1:e)}}}function Ou(t){return function(e){return t===e}}function _u(t){return(pc(t)?"text()":t.nodeName.toLowerCase())+"["+function(t){var e,n,r;return e=xc(yc(t)),n=Fn.findIndex(e,Ou(t),t),e=e.slice(0,n+1),r=Fn.reduce(e,(function(t,n,r){return pc(n)&&pc(e[r-1])&&t++,t}),0),e=Fn.filter(e,$e.matchNodeNames([t.nodeName])),(n=Fn.findIndex(e,Ou(t),t))-r}(t)+"]"}function Tu(t,e){var n,r,o,i,u,c=[];return n=e.container(),r=e.offset(),pc(n)?o=function(t,e){for(;(t=t.previousSibling)&&pc(t);)e+=t.data.length;return e}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),c.push(_u(n)),u=function(t,e,n){var r=[];for(e=e.parentNode;e!==t;e=e.parentNode)r.push(e);return r}(t,n),u=Fn.filter(u,a($e.isBogus)),(c=c.concat(Fn.map(u,(function(t){return _u(t)})))).reverse().join("/")+","+o}function zu(t,e){var n,r,o;return e?(e=(n=e.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=Fn.reduce(e,(function(t,e){return(e=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e))?("text()"===e[1]&&(e[1]="#text"),function(t,e,n){var r=xc(t);return r=Fn.filter(r,(function(t,e){return!pc(t)||!pc(r[e-1])})),(r=Fn.filter(r,$e.matchNodeNames([e])))[n]}(t,e[1],parseInt(e[2],10))):null}),t))?pc(r)?function(t,e){for(var n,r=t,o=0;pc(r);){if(n=r.data.length,o<=e&&e<=o+n){t=r,e-=o;break}if(!pc(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return pc(t)&&e>t.data.length&&(e=t.data.length),hc(t,e)}(r,parseInt(o,10)):(o="after"===o?bc(r)+1:bc(r),hc(r.parentNode,o)):null):null}function Au(t,e){$e.isText(e)&&0===e.data.length&&t.remove(e)}function Nu(t,e,n){$e.isDocumentFragment(n)?function(t,e,n){var r=D.from(n.firstChild),o=D.from(n.lastChild);e.insertNode(n),r.each((function(e){return Au(t,e.previousSibling)})),o.each((function(e){return Au(t,e.nextSibling)}))}(t,e,n):function(t,e,n){e.insertNode(n),Au(t,n.previousSibling),Au(t,n.nextSibling)}(t,e,n)}function Mu(t,e,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,l=t.getRoot();for($e.isText(a)?c.push(n?function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&$e.isText(r);r=r.previousSibling)o+=t(r.data).length;return o}(e,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(t.nodeIndex(i[u],n)+s));a&&a!==l;a=a.parentNode)c.push(t.nodeIndex(a,n));return c}function Bu(t,e,n){var r=0;return jn.each(t.select(e),(function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++})),r}function Ru(t,e){var n,r,o,i=e?"start":"end";r=t[i+"Offset"],$e.isElement(n=t[i+"Container"])&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(e?r:r-1,o.length-1)])&&t["set"+(e?"Start":"End")](n,r=e?0:n.childNodes.length)}function Du(t){return Ru(t,!0),Ru(t,!1),t}function Hu(t,e){var n;if($e.isElement(t)&&(t=Ha(t,e),wc(t)))return t;if(Ca(t)){if($e.isText(t)&&xa(t)&&(t=t.parentNode),wc(n=t.previousSibling))return n;if(wc(n=t.nextSibling))return n}}function Iu(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(wc(r)||"IMG"===o)return{name:o,index:Bu(n.dom,o,r)};var a=function(t){return Hu(t.startContainer,t.startOffset)||Hu(t.endContainer,t.endOffset)}(i);return a?{name:o=a.tagName,index:Bu(n.dom,o,a)}:function(t,e,n,r){var o=e.dom,i={};return i.start=Mu(o,t,n,r,!0),e.isCollapsed()||(i.end=Mu(o,t,n,r,!1)),i}(t,n,e,i)}function Pu(t,e,n){var r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,"&#xFEFF;"):t.create("span",r)}function Lu(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),a=t.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Bu(n,u,a)};var c=Du(r.cloneRange());return i||(c.collapse(!1),Nu(n,c,Pu(n,o+"_end",e))),(r=Du(r)).collapse(!0),Nu(n,r,Pu(n,o+"_start",e)),t.moveToBookmark({id:o,keep:1}),{id:o}}function Fu(t,e,n){function r(t){for(var e;(e=o[t]())&&!$e.isText(e)&&!n(e););return D.from(e).filter($e.isText)}void 0===n&&(n=s);var o=new Ni(t,e);return{current:function(){return D.from(o.current()).filter($e.isText)},next:function(){return r("next")},prev:function(){return r("prev")},prev2:function(){return r("prev2")}}}function Vu(t,e){var n=e||function(e){return t.isBlock(e)||$e.isBr(e)||$e.isContentEditableFalse(e)},r=function(t,e,n,o){if($e.isText(t)){var i=o(t,e,t.data);if(-1!==i)return D.some({container:t,offset:i})}return n().bind((function(t){return r(t.container,t.offset,n,o)}))};return{backwards:function(t,e,o,i){var a=Fu(t,i,n);return r(t,e,(function(){return a.prev().map((function(t){return{container:t,offset:t.length}}))}),o).getOrNull()},forwards:function(t,e,o,i){var a=Fu(t,i,n);return r(t,e,(function(){return a.next().map((function(t){return{container:t,offset:0}}))}),o).getOrNull()}}}function Uu(t){return $e.isElement(t)&&t.id===Sc}function ju(t,e){for(;e&&e!==t;){if(e.id===Sc)return e;e=e.parentNode}return null}function Wu(t){var e=t.parentNode;e&&e.removeChild(t)}function qu(t,e){0===e.length?Wu(t):t.nodeValue=e}function Gu(t){var e=Ya.trim(t);return{count:t.length-e.length,text:e}}function $u(t,e){return Oc(t),e}function Xu(t,e,n){var r=t.getParam(e,n);if(-1===r.indexOf("="))return r;var o=t.getParam(e,"","hash");return o.hasOwnProperty(t.id)?o[t.id]:n}function Ku(t,e,n){var r,o,i,a,u,c=Aa(e.getBoundingClientRect(),n);return i="BODY"===t.tagName?(r=t.ownerDocument.documentElement,o=t.scrollLeft||r.scrollLeft,t.scrollTop||r.scrollTop):(u=t.getBoundingClientRect(),o=t.scrollLeft-u.left,t.scrollTop-u.top),c.left+=o,c.right+=o,c.top+=i,c.bottom+=i,c.width=1,0<(a=e.offsetWidth-e.clientWidth)&&(n&&(a*=-1),c.left+=a,c.right+=a),c}function Yu(){return Uc.isIE()||Uc.isEdge()||Uc.isFirefox()}function Ju(t){return jc(t)||$e.isTable(t)&&Yu()}function Zu(t){return 0<t}function Qu(t){return t<0}function tc(t,e){for(var n;n=t(e);)if(!$c(n))return n;return null}function ec(t,e,n,r,o){var i=new Ni(t,r);if(Qu(e)){if((Wc(t)||$c(t))&&n(t=tc(i.prev,!0)))return t;for(;t=tc(i.prev,o);)if(n(t))return t}if(Zu(e)){if((Wc(t)||$c(t))&&n(t=tc(i.next,!0)))return t;for(;t=tc(i.next,o);)if(n(t))return t}return null}function nc(t,e){for(;t&&t!==e;){if(qc(t))return t;t=t.parentNode}return null}function rc(t,e,n){return nc(t.container(),n)===nc(e.container(),n)}function oc(t,e){var n,r;return e?(n=e.container(),r=e.offset(),Xc(n)?n.childNodes[r+t]:null):null}function ic(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n}function ac(t,e,n){var r,o,i,a;for(o=t?"previousSibling":"nextSibling";n&&n!==e;){if(Gc(r=n[o])&&(r=r[o]),Wc(r)){if(a=n,nc(r,i=e)===nc(a,i))return r;break}if(Kc(r))break;n=n.parentNode}return null}function uc(t,e,n){var r,o,a,u,c=i(ac,!0,e),s=i(ac,!1,e);if(a=n.startOffset,xa(o=n.startContainer)){if(Xc(o)||(o=o.parentNode),"before"===(u=o.getAttribute("data-mce-caret"))&&Ju(r=o.nextSibling))return Yc(r);if("after"===u&&Ju(r=o.previousSibling))return Jc(r)}if(!n.collapsed)return n;if($e.isText(o)){if(Gc(o)){if(1===t){if(r=s(o))return Yc(r);if(r=c(o))return Jc(r)}if(-1===t){if(r=c(o))return Jc(r);if(r=s(o))return Yc(r)}return n}if(tu(o)&&a>=o.data.length-1)return 1===t&&(r=s(o))?Yc(r):n;if(Qa(o)&&a<=1)return-1===t&&(r=c(o))?Jc(r):n;if(a===o.data.length)return(r=s(o))?Yc(r):n;if(0===a)return(r=c(o))?Jc(r):n}return n}function cc(t,e){return D.from(oc(t?0:-1,e)).filter(Wc)}function sc(t,e,n){var r=uc(t,e,n);return-1===t?Eu.fromRangeStart(r):Eu.fromRangeEnd(r)}function lc(t){return D.from(t.getNode()).map(te.fromDom)}function fc(t,e){for(;e=t(e);)if(e.isVisible())return e;return e}function dc(t,e){var n=rc(t,e);return!(n||!$e.isBr(t.getNode()))||n}(Wa=Eu=Eu||{}).fromRangeStart=function(t){return Wa(t.startContainer,t.startOffset)},Wa.fromRangeEnd=function(t){return Wa(t.endContainer,t.endOffset)},Wa.after=function(t){return Wa(t.parentNode,wu(t)+1)},Wa.before=function(t){return Wa(t.parentNode,wu(t))},Wa.isAbove=function(t,e){return Pa(_(e.getClientRects()),T(t.getClientRects()),Ma).getOr(!1)},Wa.isBelow=function(t,e){return Pa(T(e.getClientRects()),_(t.getClientRects()),Ba).getOr(!1)},Wa.isAtStart=function(t){return!!t&&t.isAtStart()},Wa.isAtEnd=function(t){return!!t&&t.isAtEnd()},Wa.isTextPosition=function(t){return!!t&&$e.isText(t.container())},Wa.isElementPosition=function(t){return!1===Wa.isTextPosition(t)};var mc,gc,hc=Eu,pc=$e.isText,vc=$e.isBogus,bc=Ui.nodeIndex,yc=function(t){var e=t.parentNode;return vc(e)?yc(e):e},xc=function(t){return t?Fn.reduce(t.childNodes,(function(t,e){return vc(e)&&"BR"!==e.nodeName?t=t.concat(xc(e)):t.push(e),t}),[]):[]},wc=$e.isContentEditableFalse,Cc={getBookmark:function(t,e,n){return 2===e?Iu(Ya.trim,n,t):3===e?function(t){var e=t.getRng();return{start:Tu(t.dom.getRoot(),hc.fromRangeStart(e)),end:Tu(t.dom.getRoot(),hc.fromRangeEnd(e))}}(t):e?function(t){return{rng:t.getRng()}}(t):Lu(t,!1)},getUndoBookmark:i(Iu,o,!0),getPersistentBookmark:Lu},Sc="_mce_caret",kc=$e.isElement,Ec=$e.isText,Oc=function(t){kc(t)&&Ca(t)&&(Sa(t)?t.removeAttribute("data-mce-caret"):Wu(t)),Ec(t)&&qu(t,Ya.trim(function(t){try{return t.nodeValue}catch(c){return""}}(t)))},_c={removeAndReposition:function(t,e){return hc.isTextPosition(e)?function(t,e){return Ec(t)&&e.container()===t?function(t,e){var n=Gu(t.data.substr(0,e.offset())),r=Gu(t.data.substr(e.offset())),o=n.text+r.text;return 0<o.length?(qu(t,o),hc(t,e.offset()-n.count)):e}(t,e):$u(t,e)}(t,e):function(t,e){return e.container()===t.parentNode?function(t,e){var n=e.container(),r=function(t,e){var n=p(t,e);return-1===n?D.none():D.some(n)}(K(n.childNodes),t).map((function(t){return t<e.offset()?hc(n,e.offset()-1):e})).getOr(e);return Oc(t),r}(t,e):$u(t,e)}(t,e)},remove:Oc},Tc=Ui.DOM,zc=function(t){return t.getParam("content_security_policy","")},Ac=function(t){if(t.getParam("force_p_newlines",!1))return"p";var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},Nc=function(t){return t.getParam("forced_root_block_attrs",{})},Mc=function(t){return t.getParam("automatic_uploads",!0,"boolean")},Bc=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},Rc=function(t){return t.getParam("images_upload_url","","string")},Dc=function(t){return t.getParam("images_upload_base_path","","string")},Hc=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},Ic=function(t){return t.getParam("images_upload_handler",null,"function")},Pc=function(t){return t.getParam("content_css_cors",!1,"boolean")},Lc=function(t){return t.getParam("referrer_policy","","string")},Fc=function(t){return t.getParam("language","en","string")},Vc=function(t){return t.getParam("indent_use_margin",!1)},Uc=st().browser,jc=$e.isContentEditableFalse,Wc=$e.isContentEditableFalse,qc=$e.matchStyleValues("display","block table table-cell table-caption list-item"),Gc=Ca,$c=xa,Xc=$e.isElement,Kc=_a,Yc=i(ic,!0),Jc=i(ic,!1);function Zc(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null}function Qc(t,e){if(Zu(t)){if(Ps(e.previousSibling)&&!Ds(e.previousSibling))return hc.before(e);if(Ds(e))return hc(e,0)}if(Qu(t)){if(Ps(e.nextSibling)&&!Ds(e.nextSibling))return hc.after(e);if(Ds(e))return hc(e,e.data.length)}return Qu(t)?Is(e)?hc.before(e):hc.after(e):hc.before(e)}function ts(t){return{next:function(e){return Vs(mc.Forwards,e,t)},prev:function(e){return Vs(mc.Backwards,e,t)}}}function es(t){return hc.isTextPosition(t)?0===t.offset():_a(t.getNode())}function ns(t){if(hc.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return _a(t.getNode(!0))}function rs(t,e){return!hc.isTextPosition(t)&&!hc.isTextPosition(e)&&t.getNode()===e.getNode(!0)}function os(t,e,n){return Us(t,e,n).bind((function(r){return rc(n,r,e)&&function(t,e,n){return t?!rs(e,n)&&!function(t){return!hc.isTextPosition(t)&&$e.isBr(t.getNode())}(e)&&ns(e)&&es(n):!rs(n,e)&&es(e)&&ns(n)}(t,n,r)?Us(t,e,r):D.some(r)}))}function is(t,e){var n=t?e.firstChild:e.lastChild;return $e.isText(n)?D.some(hc(n,t?0:n.data.length)):n?_a(n)?D.some(t?hc.before(n):function(t){return $e.isBr(t)?hc.before(t):hc.after(t)}(n)):function(t,e,n){var r=t?hc.before(n):hc.after(n);return Us(t,e,r)}(t,e,n):D.none()}function as(t,e){return $e.isElement(e)&&t.isBlock(e)&&!e.innerHTML&&!Pn.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e}function us(t,e){return Gs.lastPositionIn(t).fold((function(){return!1}),(function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0}))}function cs(t,e,n){return!(!function(t){return!1===t.hasChildNodes()}(e)||!ju(t,e)||(function(t,e){var n=t.ownerDocument.createTextNode(Ya.ZWSP);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)}(e,n),0))}function ss(t,e,n,r){var o,i,a,u,c=n[e?"start":"end"],s=t.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;1<=o;o--){if(u=i.childNodes,cs(s,i,r))return!0;if(c[o]>u.length-1)return!!cs(s,i,r)||us(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),e?r.setStart(i,a):r.setEnd(i,a)}return!0}function ls(t){return $e.isText(t)&&0<t.data.length}function fs(t,e,n){var r,o,i,a,u,c,s=t.get(n.id+"_"+e),l=n.keep;if(s){if(r=s.parentNode,o="start"===e?l?s.hasChildNodes()?(r=s.firstChild,1):ls(s.nextSibling)?(r=s.nextSibling,0):ls(s.previousSibling)?(r=s.previousSibling,s.previousSibling.data.length):(r=s.parentNode,t.nodeIndex(s)+1):t.nodeIndex(s):l?s.hasChildNodes()?(r=s.firstChild,1):ls(s.previousSibling)?(r=s.previousSibling,s.previousSibling.data.length):(r=s.parentNode,t.nodeIndex(s)):t.nodeIndex(s),u=r,c=o,!l){for(a=s.previousSibling,i=s.nextSibling,jn.each(jn.grep(s.childNodes),(function(t){$e.isText(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))}));s=t.get(n.id+"_"+e);)t.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&$e.isText(a)&&!Pn.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),t.remove(i),u=a,c=o)}return D.some(hc(u,c))}return D.none()}function ds(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)}function ms(t){return!ds(t)&&!Ys(t)}function gs(t){return!!t.nodeType}function hs(t,e,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!function(t){return t&&/^(IMG)$/.test(t.nodeName)}(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?r=new Ni(u=i[a],t.getParent(u,t.isBlock)):(r=new Ni(u=i[i.length-1],t.getParent(u,t.isBlock))).next(!0),o=r.current();o;o=r.next())if(3===o.nodeType&&!Js(o))return n.setStart(o,0),void e.setRng(n)}function ps(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(1===t.nodeType||!Js(t))return t}}function vs(t,e){return gs(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]}function bs(t,e,n){return t.schema.isValidChild(e,n)}function ys(t,e){return"string"!=typeof t?t=t(e):e&&(t=t.replace(/%(\w+)/g,(function(t,n){return e[n]||t}))),t}function xs(t,e){return t=""+((t=t||"").nodeName||t),e=""+((e=e||"").nodeName||e),t.toLowerCase()===e.toLowerCase()}function ws(t,e,n){return"color"!==n&&"backgroundColor"!==n||(e=t.toHex(e)),"fontWeight"===n&&700===e&&(e="bold"),"fontFamily"===n&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function Cs(t,e,n){return ws(t,t.getStyle(e,n),n)}function Ss(t,e){var n;return t.getParent(e,(function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n})),n}function ks(t,e,n){return t.getParents(e,n,t.getRoot())}function Es(t,e){for(var n=e;n;){if($e.isElement(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e}function Os(t,e,n,r){for(var o=e.data,i=n;t?0<=i:i<o.length;t?i--:i++)if(r(o.charAt(i)))return t?i+1:i;return-1}function _s(t,e,n){return Os(t,e,n,(function(t){return Ys(t)||ds(t)}))}function Ts(t,e,n){return Os(t,e,n,ms)}function zs(t,e,n,r,o,i){function a(e,n,r){var i=Vu(t);return D.from((o?i.backwards:i.forwards)(e,n,(function(t,e){return Zs(t.parentNode)?-1:r(o,u=t,e)}),c))}var u,c=t.getParent(n,t.isBlock)||e;return a(n,r,_s).bind((function(t){return i?a(t.container,t.offset+(o?-1:0),Ts):D.some(t)})).orThunk((function(){return u?D.some({container:u,offset:o?0:u.length}):D.none()}))}function As(t,e,n,r,o){$e.isText(r)&&0===r.nodeValue.length&&r[o]&&(r=r[o]);for(var i=Qs(t,r),a=0;a<i.length;a++)for(var u=0;u<e.length;u++){var c=e[u];if((!("collapsed"in c)||c.collapsed===n.collapsed)&&t.is(i[a],c.selector))return i[a]}return r}function Ns(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent($e.isText(n)?n.parentNode:n,(function(e){return e!==a&&el(t,e)}),u)}if(o&&e[0].wrapper&&(o=Qs(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&!xs(o=o[r],"br"););return o||n}function Ms(t,e,n,r,o,i,a){var u,c,s,l,f,d;if(u=c=a?n:o,l=a?"previousSibling":"nextSibling",f=t.getRoot(),$e.isText(u)&&!tl(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!e[0].block_expand&&t.isBlock(c))return c;for(s=c[l];s;s=s[l])if(!Zs(s)&&!tl(s)&&("BR"!==(d=s).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return c;if(c===f||c.parentNode===f){u=c;break}c=c.parentNode}return u}function Bs(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,a=e.endContainer,u=e.endOffset,c=t.dom;return $e.isElement(o)&&o.hasChildNodes()&&(o=Ha(o,i),$e.isText(o)&&(i=0)),$e.isElement(a)&&a.hasChildNodes()&&(a=Ha(a,e.collapsed?u:u-1),$e.isText(a)&&(u=a.nodeValue.length)),o=Es(c,o),a=Es(c,a),(Zs(o.parentNode)||Zs(o))&&(o=Zs(o)?o:o.parentNode,$e.isText(o=e.collapsed?o.previousSibling||o:o.nextSibling||o)&&(i=e.collapsed?o.length:0)),(Zs(a.parentNode)||Zs(a))&&(a=Zs(a)?a:a.parentNode,$e.isText(a=e.collapsed?a.nextSibling||a:a.previousSibling||a)&&(u=e.collapsed?0:a.length)),e.collapsed&&(zs(c,t.getBody(),o,i,!0,r).each((function(t){o=t.container,i=t.offset})),zs(c,t.getBody(),a,u,!1,r).each((function(t){a=t.container,u=t.offset}))),(n[0].inline||n[0].block_expand)&&(n[0].inline&&$e.isText(o)&&0!==i||(o=Ms(c,n,o,i,a,u,!0)),n[0].inline&&$e.isText(a)&&u!==a.nodeValue.length||(a=Ms(c,n,o,i,a,u,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(o=As(c,n,e,o,"previousSibling"),a=As(c,n,e,a,"nextSibling")),(n[0].block||n[0].selector)&&(o=Ns(t,n,o,"previousSibling"),a=Ns(t,n,a,"nextSibling"),n[0].block&&(c.isBlock(o)||(o=Ms(c,n,o,i,a,u,!0)),c.isBlock(a)||(a=Ms(c,n,o,i,a,u,!1)))),$e.isElement(o)&&(i=c.nodeIndex(o),o=o.parentNode),$e.isElement(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}}(gc=mc=mc||{})[gc.Backwards=-1]="Backwards",gc[gc.Forwards=1]="Forwards";var Rs=$e.isContentEditableFalse,Ds=$e.isText,Hs=$e.isElement,Is=$e.isBr,Ps=_a,Ls=function(t){return au(t)||function(t){return!!su(t)&&!0!==x(K(t.getElementsByTagName("*")),(function(t,e){return t||eu(e)}),!1)}(t)},Fs=Ta,Vs=function(t,e,n){var o,i,a,u,c;if(!Hs(n)||!e)return null;if(e.isEqual(hc.after(n))&&n.lastChild){if(c=hc.after(n.lastChild),Qu(t)&&Ps(n.lastChild)&&Hs(n.lastChild))return Is(n.lastChild)?hc.before(n.lastChild):c}else c=e;var s=c.container(),l=c.offset();if(Ds(s)){if(Qu(t)&&0<l)return hc(s,--l);if(Zu(t)&&l<s.length)return hc(s,++l);o=s}else{if(Qu(t)&&0<l&&(i=Zc(s,l-1),Ps(i)))return!Ls(i)&&(a=ec(i,t,Fs,i))?Ds(a)?hc(a,a.data.length):hc.after(a):Ds(i)?hc(i,i.data.length):hc.before(i);if(Zu(t)&&l<s.childNodes.length&&(i=Zc(s,l),Ps(i)))return Is(i)?function(t,e){var n=e.nextSibling;return n&&Ps(n)?Ds(n)?hc(n,0):hc.before(n):Vs(mc.Forwards,hc.after(e),t)}(n,i):!Ls(i)&&(a=ec(i,t,Fs,i))?Ds(a)?hc(a,0):hc.before(a):Ds(i)?hc(i,0):hc.after(i);o=i||c.getNode()}return(Zu(t)&&c.isAtEnd()||Qu(t)&&c.isAtStart())&&(o=ec(o,t,r(!0),n,!0),Fs(o,n))?Qc(t,o):(i=ec(o,t,Fs,n),!(u=Fn.last(X(function(t,e){for(var n=[];t&&t!==e;)n.push(t),t=t.parentNode;return n}(s,n),Rs)))||i&&u.contains(i)?i?Qc(t,i):null:c=Zu(t)?hc.after(u):hc.before(u))},Us=function(t,e,n){var r=ts(e);return D.from(t?r.next(n):r.prev(n))},js=function(t,e,n,r){return os(t,e,n).bind((function(n){return r(n)?js(t,e,n,r):D.some(n)}))},Ws=i(Us,!0),qs=i(Us,!1),Gs={fromPosition:Us,nextPosition:Ws,prevPosition:qs,navigate:os,navigateIgnore:js,positionIn:is,firstPositionIn:i(is,!0),lastPositionIn:i(is,!1)},$s=function(t,e,n){return Cc.getBookmark(t,e,n)},Xs=function(t,e){(function(t,e){var n=t.dom;if(e){if(function(t){return jn.isArray(t.start)}(e))return function(t,e){var n=t.createRng();return ss(t,!0,e,n)&&ss(t,!1,e,n)?D.some(n):D.none()}(n,e);if(function(t){return"string"==typeof t.start}(e))return D.some(function(t,e){var n,r;return n=t.createRng(),r=zu(t.getRoot(),e.start),n.setStart(r.container(),r.offset()),r=zu(t.getRoot(),e.end),n.setEnd(r.container(),r.offset()),n}(n,e));if(function(t){return t.hasOwnProperty("id")}(e))return function(t,e){var n=fs(t,"start",e);return Pa(n,fs(t,"end",e).or(n),(function(e,n){var r=t.createRng();return r.setStart(as(t,e.container()),e.offset()),r.setEnd(as(t,n.container()),n.offset()),r}))}(n,e);if(function(t){return t.hasOwnProperty("name")}(e))return function(t,e){return D.from(t.select(e.name)[e.index]).map((function(e){var n=t.createRng();return n.selectNode(e),n}))}(n,e);if(function(t){return t.hasOwnProperty("rng")}(e))return D.some(e.rng)}return D.none()})(t,e).each((function(e){t.setRng(e)}))},Ks=function(t){return $e.isElement(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},Ys=function(t){return" "===t},Js=function(t){return t&&$e.isText(t)&&/^([\t \r\n]+|)$/.test(t.nodeValue)},Zs=Ks,Qs=ks,tl=Js,el=vs,nl=jn.each,rl=function(t,e,n){var r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset,u=t.select("td[data-mce-selected],th[data-mce-selected]");if(0<u.length)nl(u,(function(t){n([t])}));else{var c=function(t){var e;return 3===(e=t[0]).nodeType&&e===r&&o>=e.nodeValue.length&&t.splice(0,1),e=t[t.length-1],0===a&&0<t.length&&e===i&&3===e.nodeType&&t.splice(t.length-1,1),t},s=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},l=function(t,e){do{if(t.parentNode===e)return t;t=t.parentNode}while(t)},f=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,a=i.parentNode;i&&i!==e;i=a){a=i.parentNode;var u=s(i===t?i:i[o],o);u.length&&(r||u.reverse(),n(c(u)))}};if(1===r.nodeType&&r.hasChildNodes()&&(r=r.childNodes[o]),1===i.nodeType&&i.hasChildNodes()&&(i=function(t,e){var n=t.childNodes;return--e>n.length-1?e=n.length-1:e<0&&(e=0),n[e]||t}(i,a)),r===i)return n(c([r]));for(var d=t.findCommonAncestor(r,i),m=r;m;m=m.parentNode){if(m===i)return f(r,d,!0);if(m===d)break}for(m=i;m;m=m.parentNode){if(m===r)return f(i,d);if(m===d)break}var g=l(r,d)||r,h=l(i,d)||i;f(r,g,!0);var p=s(g===r?g:g.nextSibling,"nextSibling",h===i?h.nextSibling:h);p.length&&n(c(p)),f(i,h)}};function ol(t){return sl.get(t)}function il(t,e,n,r){var o=e.uid,i=void 0===o?function(t){var e=(new Date).getTime();return"mce-annotation_"+Math.floor(1e9*Math.random())+ ++Ka+String(e)}():o,a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(e,["uid"]),u=te.fromTag("span",t);oa(u,qa()),Xe(u,""+$a(),i),Xe(u,""+Ga(),n);var c=r(i,a),s=c.attributes,l=c.classes,f=void 0===l?[]:l;return Wt(u,void 0===s?{}:s),function(t,e){$(e,(function(e){oa(t,e)}))}(u,f),u}function al(t){var e=function(){var t={};return{register:function(e,n){t[e]={name:e,settings:n}},lookup:function(e){return t.hasOwnProperty(e)?D.from(t[e]).map((function(t){return t.settings})):D.none()}}}();!function(t,e){t.on("init",(function(){t.serializer.addNodeFilter("span",(function(t){$(t,(function(t){(function(t){return D.from(t.attr(Ga())).bind(e.lookup)})(t).each((function(e){!1===e.persistent&&t.unwrap()}))}))}))}))}(t,e);var n=function(t,e){function n(t,e){o(t,(function(t){return e(t),t}))}var r=ee({}),o=function(t,e){var n=r.get(),o=e(n.hasOwnProperty(t)?n[t]:{listeners:[],previous:ee(D.none())});n[t]=o,r.set(n)},i=ea((function(){var e=r.get(),i=function(t,e){var n=j.call(t,0);return n.sort(void 0),n}(Y(e));$(i,(function(e){o(e,(function(r){var o=r.previous.get();return ha(t,D.some(e)).fold((function(){o.isSome()&&(function(t){n(t,(function(e){$(e.listeners,(function(e){return e(!1,t)}))}))}(e),r.previous.set(D.none()))}),(function(t){var e=t.uid,i=t.name,a=t.elements;o.is(e)||(function(t,e,r){n(t,(function(n){$(n.listeners,(function(n){return n(!0,t,{uid:e,nodes:G(r,(function(t){return t.dom()}))})}))}))}(i,e,a),r.previous.set(D.some(e)))})),{previous:r.previous,listeners:r.listeners}}))}))}),30);return t.on("remove",(function(){i.cancel()})),t.on("NodeChange",(function(){i.throttle()})),{addListener:function(t,e){o(t,(function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}}))}}}(t);return{register:function(t,n){e.register(t,n)},annotate:function(n,r){e.lookup(n).each((function(e){!function(t,e,n,r){t.undoManager.transact((function(){var o=t.selection.getRng();if(o.collapsed&&function(t,e){var n=Bs(t,e,[{inline:!0}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)}(t,o),t.selection.getRng().collapsed){var i=il(t.getDoc(),r,e,n.decorate);pa(i,Rr),t.selection.getRng().insertNode(i.dom()),t.selection.select(i.dom())}else{var a=Cc.getPersistentBookmark(t.selection,!1),u=t.selection.getRng();(function(t,e,n,r,o){function i(){s.set(D.none())}function a(t){$(t,l)}var u=[],c=il(t.getDoc(),o,n,r),s=ee(D.none()),l=function(e){switch(function(t,e,n,r){return pt(e).fold((function(){return"skipping"}),(function(o){return"br"===r||function(t){return Me(t)&&"\ufeff"===ol(t)}(e)?"valid":function(t){return Ne(t)&&ia(t,qa())}(e)?"existing":Uu(e)?"caret":bs(t,n,r)&&bs(t,Nt(o),n)?"valid":"invalid-child"}))}(t,e,"span",Nt(e))){case"invalid-child":i(),a(wt(e)),i();break;case"valid":!function(t,e){Et(t,e),ze(e,t)}(e,s.get().getOrThunk((function(){var t=ba(c);return u.push(t),s.set(D.some(t)),t})))}};rl(t.dom,e,(function(t){i(),function(t){a(G(t,te.fromDom))}(t)}))})(t,u,e,n.decorate,r),t.selection.moveToBookmark(a)}}))}(t,n,e,r)}))},annotationChanged:function(t,e){n.addListener(t,e)},remove:function(e){ha(t,D.some(e)).each((function(t){$(t.elements,At)}))},getAll:function(e){return A(function(t,e){var n=aa(te.fromDom(t.getBody()),"["+Ga()+'="'+e+'"]'),r={};return $(n,(function(t){var e=qt(t,$a()),n=r.hasOwnProperty(e)?r[e]:[];r[e]=n.concat([t])})),r}(t,e),(function(t){return G(t,(function(t){return t.dom()}))}))}}}function ul(t,e,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(t[r])return t[r];if(t!==e){var i=t[o];if(i)return i;for(var a=t.parent;a&&a!==e;a=a.parent)if(i=a[o])return i}}function cl(t){if(!ll.test(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)}var sl=function(t,e){var n=function(e){return t(e)?D.from(e.dom().nodeValue):D.none()};return{get:function(e){if(!t(e))throw new Error("Can only get text value of a text node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw text value of a text node");e.dom().nodeValue=n}}}(Me),ll=/^[ \t\r\n]*$/,fl={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},dl=(ml.create=function(t,e){var n=new ml(t,fl[t]||1);if(e)for(var r in e)n.attr(r,e[r]);return n},ml.prototype.replace=function(t){return t.parent&&t.remove(),this.insert(t,this),this.remove(),this},ml.prototype.attr=function(t,e){var n;if("string"!=typeof t){for(var r in t)this.attr(r,t[r]);return this}if(n=this.attributes){if(void 0===e)return n.map[t];if(null===e){if(t in n.map){delete n.map[t];for(var o=n.length;o--;)if(n[o].name===t)return n.splice(o,1),this}return this}if(t in n.map){for(o=n.length;o--;)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,this}},ml.prototype.clone=function(){var t,e=new ml(this.name,this.type);if(t=this.attributes){var n=[];n.map={};for(var r=0,o=t.length;r<o;r++){var i=t[r];"id"!==i.name&&(n[n.length]={name:i.name,value:i.value},n.map[i.name]=i.value)}e.attributes=n}return e.value=this.value,e.shortEnded=this.shortEnded,e},ml.prototype.wrap=function(t){return this.parent.insert(t,this),t.append(this),this},ml.prototype.unwrap=function(){for(var t=this.firstChild;t;){var e=t.next;this.insert(t,this,!0),t=e}this.remove()},ml.prototype.remove=function(){var t=this.parent,e=this.next,n=this.prev;return t&&(t.firstChild===this?(t.firstChild=e)&&(e.prev=null):n.next=e,t.lastChild===this?(t.lastChild=n)&&(n.next=null):e.prev=n,this.parent=this.next=this.prev=null),this},ml.prototype.append=function(t){t.parent&&t.remove();var e=this.lastChild;return e?((e.next=t).prev=e,this.lastChild=t):this.lastChild=this.firstChild=t,t.parent=this,t},ml.prototype.insert=function(t,e,n){t.parent&&t.remove();var r=e.parent||this;return n?(e===r.firstChild?r.firstChild=t:e.prev.next=t,t.prev=e.prev,(t.next=e).prev=t):(e===r.lastChild?r.lastChild=t:e.next.prev=t,t.next=e.next,(t.prev=e).next=t),t.parent=r,t},ml.prototype.getAll=function(t){for(var e=[],n=this.firstChild;n;n=ul(n,this))n.name===t&&e.push(n);return e},ml.prototype.empty=function(){if(this.firstChild){for(var t=[],e=this.firstChild;e;e=ul(e,this))t.push(e);for(var n=t.length;n--;)(e=t[n]).parent=e.firstChild=e.lastChild=e.next=e.prev=null}return this.firstChild=this.lastChild=null,this},ml.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this.firstChild;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(t[r.name])return!1;for(var o=r.attributes.length;o--;){var i=r.attributes[o].name;if("name"===i||0===i.indexOf("data-mce-bookmark"))return!1}}if(8===r.type)return!1;if(3===r.type&&!cl(r))return!1;if(3===r.type&&r.parent&&e[r.parent.name]&&ll.test(r.value))return!1;if(n&&n(r))return!1}while(r=ul(r,this));return!0},ml.prototype.walk=function(t){return ul(this,null,t)},ml);function ml(t,e){this.name=t,1===(this.type=e)&&(this.attributes=[],this.attributes.map={})}function gl(t,e,n){var r,o,i,a,u=1;for(a=t.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(e);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r}function hl(t,e){var n=t.exec(e);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null}function pl(t,e){function n(){}void 0===e&&(e=Tr()),!1!==(t=t||{}).fix_self_closing&&(t.fix_self_closing=!0);var r=t.comment?t.comment:n,o=t.cdata?t.cdata:n,i=t.text?t.text:n,a=t.start?t.start:n,u=t.end?t.end:n,c=t.pi?t.pi:n,s=t.doctype?t.doctype:n;return{parse:function(n,l){function f(t){var e,n;for(e=q.length;e--&&q[e].name!==t;);if(0<=e){for(n=q.length-1;e<=n;n--)(t=q[n]).valid&&u(t.name);q.length=e}}function d(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),r(e))}function m(t,e){var r=t||"",o=!it(r,"--"),i=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&function(t,e){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(t.substr(e))}(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(e){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/;a.lastIndex=n;var u=a.exec(t);return u?u.index+u[0].length:r.length}(n,o,e);return t=n.substr(e,i-e),d(o?r+t:t),i+1}function g(e,n,r,o,i){var a,u;if(r=(n=n.toLowerCase())in E?n:$(r||o||i||""),_&&!C&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(n)){if(!(a=M[n])&&B){for(u=B.length;u--&&!(a=B[u]).pattern.test(n););-1===u&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(X[n]&&!t.allow_script_urls){var c=r.replace(/[\s\u0000-\u001F]+/g,"");try{c=decodeURIComponent(c)}catch(v){c=unescape(c)}if(K.test(c))return;if(function(t,e){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?!1===t.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))}(t,c))return}C&&(n in X||0===n.indexOf("on"))||(b.map[n]=r,b.push({name:n,value:r}))}void 0===l&&(l="html");var h,p,v,b,y,x,w,C,S,k,E,O,_,T,z,A,N,M,B,R,D,H,I,P,L,F,V,U,j,W=0,q=[],G=0,$=br.decode,X=jn.makeMap("src,href,data,background,formaction,poster,xlink:href"),K=/((java|vb)script|mhtml):/i,Y="html"===l?0:1;for(L=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),F=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,k=e.getShortEndedElements(),P=t.self_closing_elements||e.getSelfClosingElements(),E=e.getBoolAttrs(),_=t.validate,S=t.remove_internals,j=t.fix_self_closing,V=e.getSpecialElements(),I=n+">";h=L.exec(I);){var J=h[0];if(W<h.index&&i($(n.substr(W,h.index-W))),p=h[7])":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),f(p);else if(p=h[8]){if(h.index+J.length>n.length){i($(n.substr(h.index))),W=h.index+J.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),O=p in k,j&&P[p]&&0<q.length&&q[q.length-1].name===p&&f(p);var Z=hl(F,h[9]);if(null!==Z){if("all"===Z){W=gl(e,n,L.lastIndex),L.lastIndex=W;continue}z=!1}if(!_||(T=e.getElementRule(p))){if(z=!0,_&&(M=T.attributes,B=T.attributePatterns),(N=h[9])?((C=-1!==N.indexOf("data-mce-type"))&&S&&(z=!1),(b=[]).map={},N.replace(F,g)):(b=[]).map={},_&&!C){if(R=T.attributesRequired,D=T.attributesDefault,T.removeEmptyAttrs&&!b.length&&(z=!1),H=T.attributesForced)for(y=H.length;y--;)w=(A=H[y]).name,"{$uid}"===(U=A.value)&&(U="mce_"+G++),b.map[w]=U,b.push({name:w,value:U});if(D)for(y=D.length;y--;)(w=(A=D[y]).name)in b.map||("{$uid}"===(U=A.value)&&(U="mce_"+G++),b.map[w]=U,b.push({name:w,value:U}));if(R){for(y=R.length;y--&&!(R[y]in b.map););-1===y&&(z=!1)}if(A=b.map["data-mce-bogus"]){if("all"===A){W=gl(e,n,L.lastIndex),L.lastIndex=W;continue}z=!1}}z&&a(p,b,O)}else z=!1;if(v=V[p]){v.lastIndex=W=h.index+J.length,W=(h=v.exec(n))?(z&&(x=n.substr(W,h.index-W)),h.index+h[0].length):(x=n.substr(W),n.length),z&&(0<x.length&&i(x,!0),u(p)),L.lastIndex=W;continue}O||(N&&N.indexOf("/")===N.length-1?z&&u(p):q.push({name:p,valid:z}))}else if(p=h[1])d(p);else if(p=h[2]){if(!(1==Y||t.preserve_cdata||0<q.length&&e.isValidChild(q[q.length-1].name,"#cdata"))){W=m("",h.index+2),L.lastIndex=W;continue}o(p)}else if(p=h[3])s(p);else{if((p=h[4])||"<!"===J){W=m(p,h.index+J.length),L.lastIndex=W;continue}if(p=h[5]){if(1!=Y){W=m("?",h.index+2),L.lastIndex=W;continue}c(p,h[6])}}W=h.index+J.length}for(W<n.length&&i($(n.substr(W))),y=q.length-1;0<=y;y--)(p=q[y]).valid&&u(p.name)}}}function vl(t,e){var n,r,o,i,a,u=e,c=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,s=t.schema;for(u=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")}(t.getTempAttrs(),u),a=s.getShortEndedElements();i=c.exec(u);)r=c.lastIndex,o=i[0].length,n=a[i[1]]?r:Xl.findEndTag(s,u,r),u=u.substring(0,r-o)+u.substring(n),c.lastIndex=r-o;return Ya.trim(u)}function bl(t){var e,n,r,o,i,a=[];return e=(t=t||{}).indent,n=Yl(t.indent_before||""),r=Yl(t.indent_after||""),o=br.getEncodeFunc(t.entity_encoding||"raw",t.entities),i="html"===t.element_format,{start:function(t,u,c){var s,l,f,d;if(e&&n[t]&&0<a.length&&0<(d=a[a.length-1]).length&&"\n"!==d&&a.push("\n"),a.push("<",t),u)for(s=0,l=u.length;s<l;s++)a.push(" ",(f=u[s]).name,'="',o(f.value,!0),'"');a[a.length]=!c||i?">":" />",c&&e&&r[t]&&0<a.length&&0<(d=a[a.length-1]).length&&"\n"!==d&&a.push("\n")},end:function(t){var n;a.push("</",t,">"),e&&r[t]&&0<a.length&&0<(n=a[a.length-1]).length&&"\n"!==n&&a.push("\n")},text:function(t,e){0<t.length&&(a[a.length]=e?t:o(t))},cdata:function(t){a.push("<![CDATA[",t,"]]>")},comment:function(t){a.push("\x3c!--",t,"--\x3e")},pi:function(t,n){n?a.push("<?",t," ",o(n),"?>"):a.push("<?",t,"?>"),e&&a.push("\n")},doctype:function(t){a.push("<!DOCTYPE",t,">",e?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}}function yl(t,e){void 0===e&&(e=Tr());var n=bl(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(r){var o,i;i=t.validate,o={3:function(t){n.text(t.value,t.raw)},8:function(t){n.comment(t.value)},7:function(t){n.pi(t.name,t.value)},10:function(t){n.doctype(t.value)},4:function(t){n.cdata(t.value)},11:function(t){if(t=t.firstChild)for(;a(t),t=t.next;);}},n.reset();var a=function(t){var r,u,c,s,l,f,d,m,g,h=o[t.type];if(h)h(t);else{if(r=t.name,u=t.shortEnded,c=t.attributes,i&&c&&1<c.length&&((f=[]).map={},g=e.getElementRule(t.name))){for(d=0,m=g.attributesOrder.length;d<m;d++)(s=g.attributesOrder[d])in c.map&&(f.map[s]=l=c.map[s],f.push({name:s,value:l}));for(d=0,m=c.length;d<m;d++)(s=c[d].name)in f.map||(f.map[s]=l=c.map[s],f.push({name:s,value:l}));c=f}if(n.start(t.name,c,u),!u){if(t=t.firstChild)for(;a(t),t=t.next;);n.end(r)}}};return 1!==r.type||t.inner?o[11](r):a(r),n.getContent()}}}function xl(t){var e=gt(t).dom();return t.dom()===e.activeElement}function wl(e){var n=void 0!==e?e.dom():t.document;return D.from(n.activeElement).map(te.fromDom)}function Cl(t,e){var n=Me(e)?ol(e).length:wt(e).length+1;return n<t?n:t<0?0:t}function Sl(t){return nf.range(t.start(),Cl(t.soffset(),t.start()),t.finish(),Cl(t.foffset(),t.finish()))}function kl(t,e){return!$e.isRestrictedNode(e.dom())&&(Te(t,e)||mt(t,e))}function El(t){return function(e){return kl(t,e.start())&&kl(t,e.finish())}}function Ol(t){return nf.range(te.fromDom(t.startContainer),t.startOffset,te.fromDom(t.endContainer),t.endOffset)}function _l(e){var n=t.document.createRange();try{return n.setStart(e.start().dom(),e.soffset()),n.setEnd(e.finish().dom(),e.foffset()),D.some(n)}catch(d){return D.none()}}function Tl(t){return(t.bookmark?t.bookmark:D.none()).bind((function(e){return function(t,e){return D.from(e).filter(El(t)).map(Sl)}(te.fromDom(t.getBody()),e)})).bind(_l)}function zl(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==sf.getParent(e,(function(e){return function(t){return uf.isEditorUIElement(t)}(e)||!!n&&t.dom.is(e,n)}))}function Al(e,n){var r=n.editor;cf(r),r.on("focusin",(function(){var t=e.focusedEditor;t!==this&&(t&&t.fire("blur",{focusedEditor:this}),e.setActive(this),(e.focusedEditor=this).fire("focus",{blurredEditor:t}),this.focus(!0))})),r.on("focusout",(function(){var n=this;zn.setEditorTimeout(n,(function(){var r=e.focusedEditor;zl(n,function(){try{return t.document.activeElement}catch(r){return t.document.body}}())||r!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),ql||sf.bind(t.document,"focusin",ql=function(n){var r,o=e.activeEditor;r=n.target,o&&r.ownerDocument===t.document&&(r===t.document.body||zl(o,r)||e.focusedEditor!==o||(o.fire("blur",{focusedEditor:null}),e.focusedEditor=null))})}function Nl(e,n){e.focusedEditor===n.editor&&(e.focusedEditor=null),e.activeEditor||(sf.unbind(t.document,"focusin",ql),ql=null)}function Ml(t,e){(function(t,e){return function(t){return t.collapsed?D.from(Ha(t.startContainer,t.startOffset)).map(te.fromDom):D.none()}(e).bind((function(e){return rr(e)?D.some(e):!1===Te(t,e)?D.some(t):D.none()}))})(te.fromDom(t.getBody()),e).bind((function(t){return Gs.firstPositionIn(t.dom())})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))}function Bl(t){if(t.setActive)try{t.setActive()}catch(c){t.focus()}else t.focus()}function Rl(t){return t.inline?function(t){var e=t.getBody();return e&&function(t){return xl(t)||function(t){return wl(gt(t)).filter((function(e){return t.dom().contains(e.dom())}))}(t).isSome()}(te.fromDom(e))}(t):function(t){return t.iframeElement&&xl(te.fromDom(t.iframeElement))}(t)}function Dl(t){return t instanceof dl}function Hl(t,e){t.dom.setHTML(t.getBody(),e),function(t){df(t)&&Gs.firstPositionIn(t.getBody()).each((function(e){var n=e.getNode(),r=$e.isTable(n)?Gs.firstPositionIn(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)}function Il(t,e,n){return void 0===n&&(n={}),n.format=n.format?n.format:"html",n.set=!0,n.content=Dl(e)?"":e,Dl(e)||n.no_events||(t.fire("BeforeSetContent",n),e=n.content),D.from(t.getBody()).fold(r(e),(function(r){return Dl(e)?function(t,e,n,r){!function(t,e,n){var r=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&Jl(n.firstChild,(function(n){$(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),$(e,(function(t){"string"==typeof n.attr(t.name)&&(o[t.name]?o[t.name].nodes.push(n):o[t.name]={filter:t,nodes:[n]})}))})),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i}(t,e,n);$(r,(function(t){$(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))}(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=yl({validate:t.validate},t.schema).serialize(n);return r.content=ir(te.fromDom(e))?o:jn.trim(o),Hl(t,r.content),r.no_events||t.fire("SetContent",r),n}(t,r,e,n):function(t,e,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===e.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+i+"</li>"),n=(o=Ac(t))&&t.schema.isValidChild(e.nodeName.toLowerCase(),o.toLowerCase())?t.dom.createHTML(o,t.settings.forced_root_block_attrs,n=i):n||'<br data-mce-bogus="1">',Hl(t,n),t.fire("SetContent",r)):("raw"!==r.format&&(n=yl({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=ir(te.fromDom(e))?n:jn.trim(n),Hl(t,r.content),r.no_events||t.fire("SetContent",r)),r.content}(t,r,e,n)}))}function Pl(t){return D.from(t).each((function(t){return t.destroy()}))}function Ll(t){var e=P(t)?t.join(" "):t,n=G(H(e)?e.split(" "):[],at);return X(n,(function(t){return 0<t.length}))}function Fl(t,e){return t.sections().hasOwnProperty(e)}function Vl(t,e){return B(t,"toolbar_mode").orThunk((function(){return B(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)}function Ul(t,e,n){return D.from(e.settings[n]).filter(t)}function jl(t,e){return e.dom()[t]}function Wl(t,e){return parseInt($t(e,t),10)}(pl=pl||{}).findEndTag=gl;var ql,Gl,$l,Xl=pl,Kl={trimExternal:vl,trimInternal:vl},Yl=jn.makeMap,Jl=function(t,e){e(t),t.firstChild&&Jl(t.firstChild,e),t.next&&Jl(t.next,e)},Zl=function(e){if(!P(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var n=[],r={};return $(e,(function(o,i){var a=Y(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!P(c))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(t){var e=Y(t);if(n.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+e.join(","));if(!k(n,(function(t){return v(e,t)})))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+n.join(", "));return t[u].apply(null,o)},log:function(e){t.console.log(e,{constructors:n,constructor:u,params:o})}}}})),r},Ql={create:lt("start","soffset","finish","foffset")},tf=(Zl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),function(t){return t.fold(o,o,o)}),ef=Zl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),nf={domRange:ef.domRange,relative:ef.relative,exact:ef.exact,exactFromRange:function(t){return ef.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){return ht(function(t){return t.match({domRange:function(t){return te.fromDom(t.startContainer)},relative:function(t,e){return tf(t)},exact:function(t,e,n,r){return t}})}(t))},range:Ql.create},rf=st().browser,of=function(t){var e=function(t){return!0===t.inline||rf.isIE()}(t)?function(t){return function(t){var e=t.getSelection();return(e&&0!==e.rangeCount?D.from(e.getRangeAt(0)):D.none()).map(Ol)}(ht(t).dom()).filter(El(t))}(te.fromDom(t.getBody())):D.none();t.bookmark=e.isSome()?e:t.bookmark},af=Tl,uf={isEditorUIElement:function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},cf=function(e){var n=ta((function(){of(e)}),0);e.on("init",(function(){e.inline&&function(e,n){function r(){n.throttle()}Ui.DOM.bind(t.document,"mouseup",r),e.on("remove",(function(){Ui.DOM.unbind(t.document,"mouseup",r)}))}(e,n),function(t,e){st().browser.isIE()?function(t){t.on("focusout",(function(){of(t)}))}(t):function(t,e){t.on("mouseup touchend",(function(t){e.throttle()}))}(t,e),t.on("keyup NodeChange",(function(e){!function(t){return"nodechange"===t.type&&t.selectionChange}(e)&&of(t)}))}(e,n)})),e.on("remove",(function(){n.cancel()}))},sf=Ui.DOM,lf=zl,ff=function(t){return t.editorManager.setActive(t)},df=Rl,mf=Ui.DOM,gf=Object.prototype.hasOwnProperty,hf=(Gl=function(t,e){return I(t)&&I(e)?hf(t,e):e},function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)gf.call(o,i)&&(n[i]=Gl(n[i],o[i]))}return n}),pf=lt("sections","settings"),vf=st().deviceType,bf=vf.isTouch(),yf=vf.isPhone(),xf=vf.isTablet(),wf=["lists","autolink","autosave"],Cf={table_grid:!1,object_resizing:!1,resize:!1},Sf=($l={},{add:function(t,e){$l[t]=e},get:function(t){return $l[t]?$l[t]:{icons:{}}},has:function(t){return Q($l,t)}}),kf=i(jl,"clientWidth"),Ef=i(jl,"clientHeight"),Of=i(Wl,"margin-top"),_f=i(Wl,"margin-left"),Tf=function(t,e,n){var r=te.fromDom(t.getBody()),o=t.inline?r:function(t){return te.fromDom(t.dom().ownerDocument.documentElement)}(r),i=function(t,e,n,r){var o=function(t){return t.dom().getBoundingClientRect()}(e);return{x:n-(t?o.left+e.dom().clientLeft+_f(e):0),y:r-(t?o.top+e.dom().clientTop+Of(e):0)}}(t.inline,o,e,n);return function(t,e,n){var r=kf(t),o=Ef(t);return 0<=e&&0<=n&&e<=r&&n<=o}(o,i.x,i.y)};function zf(t){function e(){var e=t.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():function(){function t(){throw new Error("Theme did not provide a NotificationManager implementation.")}return{open:t,close:t,reposition:t,getArgs:t}}()}function n(){0<a.length&&e().reposition(a)}function r(t){C(a,(function(e){return e===t})).each((function(t){a.splice(t,1)}))}function o(o){if(!t.removed&&function(t){return function(t){return D.from(t).map(te.fromDom)}(t.inline?t.getBody():t.getContentAreaContainer()).map((function(t){return Te(gt(t),t)})).getOr(!1)}(t))return w(a,(function(t){return function(t,e){return!(t.type!==e.type||t.text!==e.text||t.progressBar||t.timeout||e.progressBar||e.timeout)}(e().getArgs(t),o)})).getOrThunk((function(){t.editorManager.setActive(t);var i=e().open(o,(function(){r(i),n()}));return function(t){a.push(t)}(i),n(),i}))}var i,a=[];return(i=t).on("SkinLoaded",(function(){var t=i.settings.service_message;t&&o({text:t,type:"warning",timeout:0})})),i.on("ResizeEditor ResizeWindow NodeChange",(function(){zn.requestAnimationFrame(n)})),i.on("remove",(function(){$(a.slice(),(function(t){e().close(t)}))})),{open:o,close:function(){D.from(a[0]).each((function(t){e().close(t),r(t),n()}))},getNotifications:function(){return a}}}var Af=ua.PluginManager,Nf=ua.ThemeManager;function Mf(t){function e(){var e=t.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():function(){function t(){throw new Error("Theme did not provide a WindowManager implementation.")}return{open:t,openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}}()}function n(t,e){return function(){return e?e.apply(t,arguments):void 0}}function r(e){!function(e){t.fire("CloseWindow",{dialog:e})}(e),0===(i=X(i,(function(t){return t!==e}))).length&&t.focus()}function o(e){t.editorManager.setActive(t),of(t);var n=e();return function(e){i.push(e),function(e){t.fire("OpenWindow",{dialog:e})}(e)}(n),n}var i=[];return t.on("remove",(function(){$(i,(function(t){e().close(t)}))})),{open:function(t,n){return o((function(){return e().open(t,n,r)}))},openUrl:function(t){return o((function(){return e().openUrl(t,r)}))},alert:function(t,r,o){e().alert(t,n(o||this,r))},confirm:function(t,r,o){e().confirm(t,n(o||this,r))},close:function(){D.from(i[i.length-1]).each((function(t){e().close(t),r(t)}))}}}function Bf(t,e){t.notificationManager.open({type:"error",text:e})}function Rf(t,e){t._skinLoaded?Bf(t,e):t.on("SkinLoaded",(function(){Bf(t,e)}))}function Df(e,n,r){!function(t,e,n){t.fire(e,n)}(e,n,{message:r}),t.console.error(r)}function Hf(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e}var If=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=t.window.console;o&&(o.error?o.error.apply(o,arguments):o.log.apply(o,arguments))},Pf={pluginLoadError:function(t,e,n){Df(t,"PluginLoadError",Hf("plugin",e,n))},iconsLoadError:function(t,e,n){Df(t,"IconsLoadError",Hf("icons",e,n))},languageLoadError:function(t,e,n){Df(t,"LanguageLoadError",Hf("language",e,n))},pluginInitError:function(t,e,n){var r=Zi.translate(["Failed to initialize plugin: {0}",e]);If(r,n),Rf(t,r)},uploadError:function(t,e){Rf(t,Zi.translate(["Failed to upload image: {0}",e]))},displayError:Rf,initError:If};function Lf(t){return{getBookmark:i($s,t),moveToBookmark:i(Xs,t)}}function Ff(e,n){var r,o,i,a,c,s,l,f,d,m,g,h,p,v,b,y,x,w=n.dom,C=jn.each,S=n.getDoc(),k=t.document,E=Math.abs,O=Math.round,_=n.getBody();function T(t){return t&&("IMG"===t.nodeName||n.dom.is(t,"figure.image"))}function z(t){var e=t.target;!function(t,e){if("longpress"!==t.type&&0!==t.type.indexOf("touch"))return T(t.target)&&!Uf(t.clientX,t.clientY,e);var n=t.touches[0];return T(t.target)&&!Uf(n.clientX,n.clientY,e)}(t,n.selection.getRng())||t.isDefaultPrevented()||n.selection.select(e)}function A(t){return n.dom.is(t,"figure.image")?t.querySelector("img"):t}function N(t){var e=function(t){return t.getParam("object_resizing")}(n);return!1!==e&&!Pn.iOS&&("string"!=typeof e&&(e="table,img,figure.image,div"),"false"!==t.getAttribute("data-mce-resize")&&t!==n.getBody()&&ft(te.fromDom(t),e))}function M(t){var e,a,u,C;v=(v=(e=t.screenX-s)*c[2]+m)<5?5:v,b=(b=(a=t.screenY-l)*c[3]+g)<5?5:b,(T(r)&&!1!==function(t){return t.getParam("resize_img_proportional",!0,"boolean")}(n)?!jf.modifierPressed(t):jf.modifierPressed(t))&&(E(e)>E(a)?(b=O(v*h),v=O(b/h)):(v=O(b/h),b=O(v*h))),w.setStyles(A(o),{width:v,height:b}),u=0<(u=c.startPos.x+e)?u:0,C=0<(C=c.startPos.y+a)?C:0,w.setStyles(i,{left:u,top:C,display:"block"}),i.innerHTML=v+" &times; "+b,c[2]<0&&o.clientWidth<=v&&w.setStyle(o,"left",f+(m-v)),c[3]<0&&o.clientHeight<=b&&w.setStyle(o,"top",d+(g-b)),(e=_.scrollWidth-y)+(a=_.scrollHeight-x)!=0&&w.setStyles(i,{left:u-e,top:C-a}),p||(function(t,e,n,r){t.fire("ObjectResizeStart",{target:e,width:n,height:r})}(n,r,m,g),p=!0)}function B(t){function r(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)}var o;p||n.removed||(C(w.select("img[data-mce-selected],hr[data-mce-selected]"),(function(t){t.removeAttribute("data-mce-selected")})),o="mousedown"===t.type?t.target:e.getNode(),r(o=w.$(o).closest("table,img,figure.image,hr")[0],_)&&(L(),r(e.getStart(!0),o)&&r(e.getEnd(!0),o))?H(o):I())}function R(t){return Wf(function(t,e){for(;e&&e!==t;){if(qf(e)||Wf(e))return e;e=e.parentNode}return null}(n.getBody(),t))}a={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var D=function(){function t(t,e){e&&(r.style[t]||!n.schema.isValid(r.nodeName.toLowerCase(),t)?w.setStyle(A(r),t,e):w.setAttrib(A(r),t,e))}p=!1,t("width",v),t("height",b),w.unbind(S,"mousemove",M),w.unbind(S,"mouseup",D),k!==S&&(w.unbind(k,"mousemove",M),w.unbind(k,"mouseup",D)),w.remove(o),w.remove(i),H(r),function(t,e,n,r){t.fire("ObjectResized",{target:e,width:n,height:r})}(n,r,v,b),w.setAttrib(r,"style",w.getAttrib(r,"style")),n.nodeChanged()},H=function(t){var e,u,p,E,O;I(),P(),e=w.getPos(t,_),f=e.x,d=e.y,O=t.getBoundingClientRect(),u=O.width||O.right-O.left,p=O.height||O.bottom-O.top,r!==t&&(r=t,v=b=0),E=n.fire("ObjectSelected",{target:t}),N(t)&&!E.isDefaultPrevented()?C(a,(function(t,e){var n;(n=w.get("mceResizeHandle"+e))&&w.remove(n),n=w.add(_,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Pn.ie&&(n.contentEditable=!1),w.bind(n,"mousedown",(function(e){e.stopImmediatePropagation(),e.preventDefault(),function(e){s=e.screenX,l=e.screenY,m=A(r).clientWidth,g=A(r).clientHeight,h=g/m,(c=t).startPos={x:u*t[0]+f,y:p*t[1]+d},y=_.scrollWidth,x=_.scrollHeight,o=r.cloneNode(!0),w.addClass(o,"mce-clonedresizable"),w.setAttrib(o,"data-mce-bogus","all"),o.contentEditable=!1,o.unSelectabe=!0,w.setStyles(o,{left:f,top:d,margin:0}),o.removeAttribute("data-mce-selected"),_.appendChild(o),w.bind(S,"mousemove",M),w.bind(S,"mouseup",D),k!==S&&(w.bind(k,"mousemove",M),w.bind(k,"mouseup",D)),i=w.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},m+" &times; "+g)}(e)})),t.elm=n,w.setStyles(n,{left:u*t[0]+f-n.offsetWidth/2,top:p*t[1]+d-n.offsetHeight/2})})):I(),r.setAttribute("data-mce-selected","1")},I=function(){var t,e;for(t in P(),r&&r.removeAttribute("data-mce-selected"),a)(e=w.get("mceResizeHandle"+t))&&(w.unbind(e),w.remove(e))},P=function(){for(var t in a){var e=a[t];e.elm&&(w.unbind(e.elm),delete e.elm)}},L=function(){try{n.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(u){}};return n.on("init",(function(){if(L(),Pn.browser.isIE()||Pn.browser.isEdge()){n.on("mousedown click",(function(t){var e=t.target,r=e.nodeName;p||!/^(TABLE|IMG|HR)$/.test(r)||R(e)||(2!==t.button&&n.selection.select(e,"TABLE"===r),"mousedown"===t.type&&n.nodeChanged())}));var t=function(t){function e(t){zn.setEditorTimeout(n,(function(){return n.selection.select(t)}))}if(R(t.target))return t.preventDefault(),void e(t.target);/^(TABLE|IMG|HR)$/.test(t.target.nodeName)&&(t.preventDefault(),"IMG"===t.target.tagName&&e(t.target))};w.bind(_,"mscontrolselect",t),n.on("remove",(function(){return w.unbind(_,"mscontrolselect",t)}))}var e=zn.throttle((function(t){n.composing||B(t)}));n.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",e),n.on("keyup compositionend",(function(t){r&&"TABLE"===r.nodeName&&e(t)})),n.on("hide blur",I),n.on("contextmenu longpress",z,!0)})),n.on("remove",P),{isResizable:N,showResizeRect:H,hideResizeRect:I,updateResizeRect:B,destroy:function(){r=o=null}}}(Lf=Lf||{}).isBookmarkNode=Ks;var Vf=Lf,Uf=function(t,e,n){if(n.collapsed)return!1;if(Pn.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if($e.isElement(r))return b(r.getClientRects(),(function(n){return Ra(n,t,e)}))}return b(n.getClientRects(),(function(n){return Ra(n,t,e)}))},jf={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||this.metaKeyPressed(t)},metaKeyPressed:function(t){return Pn.mac?t.metaKey:t.ctrlKey&&!t.altKey}},Wf=$e.isContentEditableFalse,qf=$e.isContentEditableTrue;function Gf(t){return"textarea"===Nt(t)}function $f(t,e){var n=function(t){var e=t.dom().ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom())return Re(n.offsetLeft,n.offsetTop);var i=Rt(r.pageYOffset,o.scrollTop),a=Rt(r.pageXOffset,o.scrollLeft),u=Rt(o.clientTop,n.clientTop),c=Rt(o.clientLeft,n.clientLeft);return De(t).translate(a-c,i-u)}(t),r=function(t){return zd.get(t)}(t);return{element:t,bottom:n.top()+r,height:r,pos:n,cleanup:e}}function Xf(t,e,n,r){Bd(t,(function(o,i){return Md(t,e,n,r)}),n)}function Kf(t,e,n,r,o){var i={elm:r.element.dom(),alignToTop:o};!function(t,e){return t.fire("ScrollIntoView",e).isDefaultPrevented()}(t,i)&&(n(e,Dt(e).top(),r,o),function(t,e){t.fire("AfterScrollIntoView",e)}(t,i))}function Yf(t,n,r,o){var i=te.fromDom(t.getDoc());Kf(t,i,r,function(t){return $f(te.fromDom(t),e)}(n),o)}function Jf(t,e,n,r){var o=t.pos;if(n)Ht(o.left(),o.top(),r);else{var i=o.top()-e+t.height;Ht(o.left(),i,r)}}function Zf(t,e,n,r,o){var i=n+e,a=r.pos.top(),u=r.bottom,c=n<=u-a;a<e?Jf(r,n,!1!==o,t):i<a?Jf(r,n,c?!1!==o:!0===o,t):i<u&&!c&&Jf(r,n,!0===o,t)}function Qf(t,e,n,r){var o=t.dom().defaultView.innerHeight;Zf(t,e,o,n,r)}function td(e,n,r,o){var i=e.dom().defaultView.innerHeight;Zf(e,n,i,r,o);var a=function(e){var n=Dt(te.fromDom(t.document)),r=function(t,e){var n=e.owner(t);return Ad(e,n)}(e,Nd),o=De(e),i=y(r,(function(t,e){var n=De(e);return{left:t.left+n.left(),top:t.top+n.top()}}),{left:0,top:0});return Re(i.left+o.left()+n.left(),i.top+o.top()+n.top())}(r.element),u=Ie(t.window);a.top()<u.y()?It(r.element,!1!==o):a.top()>u.bottom()&&It(r.element,!0===o)}function ed(t,e,n){return Xf(t,Qf,e,n)}function nd(t,e,n){return Yf(t,e,Qf,n)}function rd(t,e,n){return Xf(t,td,e,n)}function od(t,e,n){return Yf(t,e,td,n)}function id(t){return $e.isContentEditableTrue(t)||$e.isContentEditableFalse(t)}function ad(e,n){var r=(n||t.document).createDocumentFragment();return $(e,(function(t){r.appendChild(t.dom())})),te.fromDom(r)}function ud(t,e){return function(t,e,n){return Te(e,t)?function(t){return t.slice(0,-1)}(function(t,e){for(var n=V(e)?e:s,r=t.dom(),o=[];null!=r.parentNode;){var i=r.parentNode,a=te.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||mt(t,e)}))):[]}(t,e,r(!1))}function cd(t,e,n,r){var o=n,i=new Ni(n,o),a=t.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==jn.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?e.setStartBefore(n):"BR"===n.nodeName?e.setEndBefore(n):e.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?e.setStart(o,0):e.setEnd(o,o.childNodes.length))}function sd(t){var e=t.selection.getSel();return e&&0<e.rangeCount}function ld(t,e){var n=parseInt(qt(t,e),10);return isNaN(n)?1:n}function fd(t){return x(t,(function(t,e){return e.cells().length>t?e.cells().length:t}),0)}function dd(t,e){for(var n=t.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(mt(o[i],e))return D.some(Wd(i,r));return D.none()}function md(t,e,n,r,o){for(var i=[],a=t.rows(),u=n;u<=o;u++){var c=a[u].cells(),s=e<r?c.slice(e,r+1):c.slice(r,e+1);i.push(jd(a[u].element(),s))}return i}function gd(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e}function hd(t,e){var n=function(t){return aa(t,"td[data-mce-selected],th[data-mce-selected]")}(e),r=function(t){return X($d(t),or)}(t);return 0<n.length?n:r}function pd(){return ad([])}function vd(t,e,n){return null!==function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(t,e,n)}function bd(t,e,n){return vd(t,e,(function(t){return t.nodeName===n}))}function yd(t){return t&&"TABLE"===t.nodeName}function xd(t,e,n){for(var r=new Ni(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());e=r[n?"prev":"next"]();)if($e.isBr(e))return!0}function wd(t,e,n,r,o){var i,a,u=t.getRoot(),c=t.schema.getNonEmptyElements(),s=t.getParent(o.parentNode,t.isBlock)||u;if(r&&$e.isBr(o)&&e&&t.isEmpty(s))return D.some(Eu(o.parentNode,t.nodeIndex(o)));for(var l,f,d=new Ni(o,s);a=d[r?"prev":"next"]();){if("false"===t.getContentEditableParent(a)||(f=u,Ca(l=a)&&!1===vd(l,f,Uu)))return D.none();if($e.isText(a)&&0<a.nodeValue.length)return!1===bd(a,u,"A")?D.some(Eu(a,r?a.nodeValue.length:0)):D.none();if(t.isBlock(a)||c[a.nodeName.toLowerCase()])return D.none();i=a}return n&&i?D.some(Eu(i,0)):D.none()}function Cd(t,e,n,r){var o,i,a,u,c,s,l,f=t.getRoot(),d=!1;if(i=r[(n?"start":"end")+"Offset"],s=$e.isElement(o=r[(n?"start":"end")+"Container"])&&i===o.childNodes.length,u=t.schema.getNonEmptyElements(),c=n,Ca(o))return D.none();if($e.isElement(o)&&i>o.childNodes.length-1&&(c=!1),$e.isDocument(o)&&(o=f,i=0),o===f){if(c&&(a=o.childNodes[0<i?i-1:0])){if(Ca(a))return D.none();if(u[a.nodeName]||yd(a))return D.none()}if(o.hasChildNodes()){if(i=Math.min(!c&&0<i?i-1:i,o.childNodes.length-1),i=$e.isText(o=o.childNodes[i])&&s?o.data.length:0,!e&&o===f.lastChild&&yd(o))return D.none();if(function(t,e){for(;e&&e!==t;){if($e.isContentEditableFalse(e))return!0;e=e.parentNode}return!1}(f,o)||Ca(o))return D.none();if(o.hasChildNodes()&&!1===yd(o)){var m=new Ni(a=o,f);do{if($e.isContentEditableFalse(a)||Ca(a)){d=!1;break}if($e.isText(a)&&0<a.nodeValue.length){i=c?0:a.nodeValue.length,o=a,d=!0;break}if(u[a.nodeName.toLowerCase()]&&(!(l=a)||!/^(TD|TH|CAPTION)$/.test(l.nodeName))){i=t.nodeIndex(a),o=a.parentNode,c||i++,d=!0;break}}while(a=c?m.next():m.prev())}}}return e&&($e.isText(o)&&0===i&&wd(t,s,e,!0,o).each((function(t){o=t.container(),i=t.offset(),d=!0})),$e.isElement(o)&&(!(a=(a=o.childNodes[i])||o.childNodes[i-1])||!$e.isBr(a)||function(t,e){return t.previousSibling&&"A"===t.previousSibling.nodeName}(a)||xd(t,a,!1)||xd(t,a,!0)||wd(t,s,e,!0,a).each((function(t){o=t.container(),i=t.offset(),d=!0})))),c&&!e&&$e.isText(o)&&i===o.nodeValue.length&&wd(t,s,e,!1,o).each((function(t){o=t.container(),i=t.offset(),d=!0})),d?D.some(Eu(o,i)):D.none()}function Sd(t){return 0===t.dom().length?(Ae(t),D.none()):D.some(t)}function kd(t,e,n,r,o){var i=n?e.startOffset:e.endOffset;return D.from(n?e.startContainer:e.endContainer).map(te.fromDom).map((function(t){return r&&e.collapsed?t:Ct(t,o(t,i)).getOr(t)})).bind((function(t){return Ne(t)?D.some(t):pt(t)})).map((function(t){return t.dom()})).getOr(t)}function Ed(t,e,n){return kd(t,e,!0,n,(function(t,e){return Math.min(function(t){return t.dom().childNodes.length}(t),e)}))}function Od(t,e,n){return kd(t,e,!1,n,(function(t,e){return 0<e?e-1:e}))}function _d(t,e){for(var n=t;t&&$e.isText(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n}function Td(t,e,n){if(t&&t.hasOwnProperty(e)){var r=X(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}}var zd=function(t,e){function n(e){var n=function(t){var e=t.dom();return Bt(t)?e.getBoundingClientRect().height:e.offsetHeight}(e);if(n<=0||null===n){var r=$t(e,t);return parseFloat(r)||0}return n}function r(t,e){return x(e,(function(e,n){var r=$t(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)}return{set:function(e,n){if(!U(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom();Ut(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return o<e?e-o:0}}}("height"),Ad=function(t,e){return t.view(e).fold(r([]),(function(e){var n=t.owner(e),r=Ad(t,n);return[e].concat(r)}))},Nd=Object.freeze({__proto__:null,view:function(e){return(e.dom()===t.document?D.none():D.from(e.dom().defaultView.frameElement)).map(te.fromDom)},owner:function(t){return gt(t)}}),Md=function(t,e,n,r){var o=te.fromDom(t.getBody()),i=te.fromDom(t.getDoc());!function(t){t.dom()}(o);var a=function(t,e){var n=function(t,e){var n=wt(t);if(0===n.length||Gf(t))return{element:t,offset:e};if(e<n.length&&!Gf(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return Gf(r)?{element:t,offset:e}:"img"===Nt(r)?{element:r,offset:1}:Me(r)?{element:r,offset:ol(r).length}:{element:r,offset:wt(r).length}}(t,e),r=te.fromHtml('<span data-mce-bogus="all">'+Ya.ZWSP+"</span>");return Et(n.element,r),$f(r,(function(){return Ae(r)}))}(te.fromDom(n.startContainer),n.startOffset);Kf(t,i,e,a,r),a.cleanup()},Bd=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(te.fromDom(r),te.fromDom(i));var u=t.dom.createRng();u.setStart(r,o),u.setEnd(i,a),t.selection.setRng(n)},Rd=function(t,e,n){(t.inline?nd:od)(t,e,n)},Dd=function(t,e,n){(t.inline?ed:rd)(t,e,n)},Hd=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(t,e))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(l){r=function(t,e,n){var r,i,a;if(r=n.elementFromPoint(t,e),i=n.body.createTextRange(),r&&"HTML"!==r.tagName||(r=n.body),i.moveToElementText(r),0<(a=(a=jn.toArray(i.getClientRects())).sort((function(t,n){return(t=Math.abs(Math.max(t.top-e,t.bottom-e)))-Math.abs(Math.max(n.top-e,n.bottom-e))}))).length){e=(a[0].bottom+a[0].top)/2;try{return i.moveToPoint(t,e),i.collapse(!0),i}catch(o){}}return null}(t,e,n)}return function(t,e){var n=t&&t.parentElement?t.parentElement():null;return $e.isContentEditableFalse(function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(n,e,id))?null:t}(r,n.body)}return r},Id=function(t,e){return G(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Pd=ud,Ld=function(t,e){return[t].concat(ud(t,e))},Fd=function(t){return St(t).fold(r([t]),(function(e){return[t].concat(Fd(e))}))},Vd=function(t){return kt(t).fold(r([t]),(function(e){return"br"===Nt(e)?vt(e).map((function(e){return[t].concat(Vd(e))})).getOr([]):[t].concat(Vd(e))}))},Ud=lt("element","width","rows"),jd=lt("element","cells"),Wd=lt("x","y"),qd=function(t){return function(t,e){var n=ba(t.element()),r=te.fromTag("tbody");return Tt(r,e),ze(n,r),n}(t,function(t){return G(t.rows(),(function(t){var e=G(t.cells(),(function(t){var e=ya(t);return Gt(e,"colspan"),Gt(e,"rowspan"),e})),n=ba(t.element());return Tt(n,e),n}))}(t))},Gd=gd,$d=function(t){return S(t,(function(t){var e=Da(t);return e?[te.fromDom(e)]:[]}))},Xd=hd,Kd=function(t){return hd(Gd(t.selection.getSel()),te.fromDom(t.getBody()))},Yd=function(t,e){var n=Xd(e,t);return 0<n.length?function(t,e){return function(t,e){return da(e,"table",i(mt,t))}(t,e[0]).bind((function(t){var n=e[0],r=e[e.length-1];return function(t,e,n){return dd(t,e).bind((function(e){return dd(t,n).map((function(n){return function(t,e,n){var r=e.x(),o=e.y(),i=n.x(),a=n.y(),u=o<a?md(t,r,o,i,a):md(t,r,a,i,o);return Ud(t.element(),fd(u),u)}(t,e,n)}))}))}(function(t){var e=Ud(ba(t),0,[]);return $(aa(t,"tr"),(function(t,n){$(aa(t,"td,th"),(function(r,o){!function(t,e,n,r,o){for(var i=ld(o,"rowspan"),a=ld(o,"colspan"),u=t.rows(),c=n;c<n+i;c++){u[c]||(u[c]=jd(ya(r),[]));for(var s=e;s<e+a;s++)u[c].cells()[s]=c===n&&s===e?o:ba(o)}}(e,function(t,e,n){for(;r=e,o=n,i=void 0,((i=t.rows())[o]?i[o].cells():[])[r];)e++;var r,o,i;return e}(e,o,n),n,t,r)}))})),Ud(e.element(),fd(e.rows()),e.rows())}(t),n,r).map((function(t){return ad([qd(t)])}))})).getOrThunk(pd)}(t,n):function(t,e){return 0<e.length&&e[0].collapsed?pd():function(t,e){return function(t,e){var n=x(e,(function(t,e){return ze(e,t),e}),t);return 0<e.length?ad([n]):n}(te.fromDom(e.cloneContents()),function(t,e){var n=te.fromDom(e.commonAncestorContainer),o=Ld(n,t),a=X(o,(function(t){return qn(t)||Jn(t)})),u=function(t,e){return w(t,(function(t){return"li"===Nt(t)&&function(t,e){return Pa(function(t){var e=t.startContainer,n=t.startOffset;return $e.isText(e)?0===n?D.some(te.fromDom(e)):D.none():D.from(e.childNodes[n]).map(te.fromDom)}(e),function(t){var e=t.endContainer,n=t.endOffset;return $e.isText(e)?n===e.data.length?D.some(te.fromDom(e)):D.none():D.from(e.childNodes[n-1]).map(te.fromDom)}(e),(function(e,n){var r=w(Fd(t),i(mt,e)),o=w(Vd(t),i(mt,n));return r.isSome()&&o.isSome()})).getOr(!1)}(t,e)})).fold(r([]),(function(e){return function(t){return w(t,(function(t){return"ul"===Nt(t)||"ol"===Nt(t)}))}(t).map((function(t){return[te.fromTag("li"),te.fromTag(Nt(t))]})).getOr([])}))}(o,e),c=a.concat(u.length?u:function(t){return er(t)?pt(t).filter(tr).fold(r([]),(function(e){return[t,e]})):tr(t)?[t]:[]}(n));return G(c,ba)}(t,e))}(t,e[0])}(t,e)},Jd=function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset},Zd=function(t,e){var n=e.collapsed,r=e.cloneRange(),o=Eu.fromRangeStart(e);return Cd(t,n,!0,r).each((function(t){n&&Eu.isAbove(o,t)||r.setStart(t.container(),t.offset())})),n||Cd(t,n,!1,r).each((function(t){r.setEnd(t.container(),t.offset())})),n&&r.collapse(!0),Jd(e,r)?D.none():D.some(r)};function Qd(t){return!!t.select}function tm(t){return!(!t||!t.ownerDocument)&&Te(te.fromDom(t.ownerDocument),te.fromDom(t))}function em(t,e,n,r){function o(t,e){return function(t,e,n){if((n=function(t,e){return(t=t||{format:"html"}).set=!0,t.selection=!0,t.content=e,t}(n,e)).no_events||!(n=t.fire("BeforeSetContent",n)).isDefaultPrevented()){var r=t.selection.getRng();!function(t,e){var n=D.from(e.firstChild).map(te.fromDom),r=D.from(e.lastChild).map(te.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(vt).filter(Me).bind(Sd),i=r.bind(bt).filter(Me).bind(Sd);Pa(o,n.filter(Me),(function(t,e){!function(t,e){t.insertData(0,e)}(e.dom(),t.dom().data),Ae(t)})),Pa(i,r.filter(Me),(function(e,n){var r=n.dom().length;n.dom().appendData(e.dom().data),t.setEnd(n.dom(),r),Ae(e)})),t.collapse(!1)}(r,r.createContextualFragment(n.content)),t.selection.setRng(r),Dd(t,r),n.no_events||t.fire("SetContent",n)}else t.fire("SetContent",n)}(r,t,e)}function i(){var e,n,r=d();return!(r&&r.anchorNode&&r.focusNode)||((e=t.createRng()).setStart(r.anchorNode,r.anchorOffset),e.collapse(!0),(n=t.createRng()).setStart(r.focusNode,r.focusOffset),n.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,n)<=0)}var a,u,c,s,l=function(t,e){var n,r;return{selectorChangedWithUnbind:function(o,i){return n||(n={},r={},e.on("NodeChange",(function(e){var o=e.element,i=t.getParents(o,null,t.getRoot()),a={};jn.each(n,(function(e,n){jn.each(i,(function(o){if(t.is(o,n))return r[n]||(jn.each(e,(function(t){t(!0,{node:o,selector:n,parents:i})})),r[n]=e),a[n]=e,!1}))})),jn.each(r,(function(t,e){a[e]||(delete r[e],jn.each(t,(function(t){t(!1,{node:o,selector:e,parents:i})})))}))}))),n[o]||(n[o]=[]),n[o].push(i),{unbind:function(){Td(n,o,i),Td(r,o,i)}}}}}(t,r).selectorChangedWithUnbind,f=function(t){var e=m();e.collapse(!!t),g(e)},d=function(){return e.getSelection?e.getSelection():e.document.selection},m=function(){function n(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(a){return-1}}var o,i,a,u;if(!e)return null;if(null==(u=e.document))return null;if(void 0!==r.bookmark&&!1===df(r)){var l=af(r);if(l.isSome())return l.map((function(t){return Id(r,[t])[0]})).getOr(u.createRange())}try{(o=d())&&!$e.isRestrictedNode(o.anchorNode)&&(i=0<o.rangeCount?o.getRangeAt(0):o.createRange?o.createRange():u.createRange())}catch(f){}return(i=(i=Id(r,[i])[0])||(u.createRange?u.createRange():u.body.createTextRange())).setStart&&9===i.startContainer.nodeType&&i.collapsed&&(a=t.getRoot(),i.setStart(a,0),i.setEnd(a,0)),c&&s&&(0===n(i.START_TO_START,i,c)&&0===n(i.END_TO_END,i,c)?i=s:s=c=null),i},g=function(t,e){var n,o;if(function(t){return!!t&&(!!Qd(t)||tm(t.startContainer)&&tm(t.endContainer))}(t)){var i=Qd(t)?t:null;if(i){s=null;try{i.select()}catch(l){}}else{if(n=d(),t=r.fire("SetSelectionRange",{range:t,forward:e}).range,n){s=t;try{n.removeAllRanges(),n.addRange(t)}catch(l){}!1===e&&n.extend&&(n.collapse(t.endContainer,t.endOffset),n.extend(t.startContainer,t.startOffset)),c=0<n.rangeCount?n.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!n.setBaseAndExtent||Pn.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(o=t.startContainer.childNodes[t.startOffset])&&"IMG"===o.tagName&&(n.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),n.anchorNode===t.startContainer&&n.focusNode===t.endContainer||n.setBaseAndExtent(o,0,o,1)),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},h={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:f,setCursorLocation:function(e,n){var o=t.createRng();e?(o.setStart(e,n),o.setEnd(e,n),g(o),f(!1)):(cd(t,o,r.getBody(),!0),g(o))},getContent:function(t){return function(t,e){if(void 0===e&&(e={}),e.get=!0,e.format=e.format||"html",e.selection=!0,(e=t.fire("BeforeGetContent",e)).isDefaultPrevented())return t.fire("GetContent",e),e.content;if("text"===e.format)return function(t){return D.from(t.selection.getRng()).map((function(e){var n=t.dom.add(t.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),r=Ya.trim(n.innerText);return t.dom.remove(n),r})).getOr("")}(t);e.getInner=!0;var n=function(t,e){var n,r=t.selection.getRng(),o=t.dom.create("body"),i=t.selection.getSel(),a=Id(t,Gd(i));return(n=e.contextual?Yd(te.fromDom(t.getBody()),a).dom():r.cloneContents())&&o.appendChild(n),t.selection.serializer.serialize(o,e)}(t,e);return"tree"===e.format?n:(e.content=t.selection.isCollapsed()?"":n,t.fire("GetContent",e),e.content)}(r,t)},setContent:o,getBookmark:function(t,e){return a.getBookmark(t,e)},moveToBookmark:function(t){return a.moveToBookmark(t)},select:function(e,n){return function(t,e,n){return D.from(e).map((function(e){var r=t.nodeIndex(e),o=t.createRng();return o.setStart(e.parentNode,r),o.setEnd(e.parentNode,r+1),n&&(cd(t,o,e,!0),cd(t,o,e,!1)),o}))}(t,e,n).each(g),e},isCollapsed:function(){var t=m(),e=d();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:i,setNode:function(e){return o(t.getOuterHTML(e)),e},getNode:function(){return function(t,e){var n,r,o,i,a;return e?(r=e.startContainer,o=e.endContainer,i=e.startOffset,a=e.endOffset,n=e.commonAncestorContainer,!e.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?_d(r.nextSibling,!0):r.parentNode,o=0===a?_d(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):t}(r.getBody(),m())},getSel:d,setRng:g,getRng:m,getStart:function(t){return Ed(r.getBody(),m(),t)},getEnd:function(t){return Od(r.getBody(),m(),t)},getSelectedBlocks:function(e,n){return function(t,e,n,r){var o,i,a=[];if(i=t.getRoot(),n=t.getParent(n||Ed(i,e,e.collapsed),t.isBlock),r=t.getParent(r||Od(i,e,e.collapsed),t.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new Ni(o=n,i);(o=u.next())&&o!==r;)t.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(t,m(),e,n)},normalize:function(){var e=m();if(function(t){return 1<gd(t).length}(d())||!sd(r))return e;var n=Zd(t,e);return n.each((function(t){g(t,i())})),n.getOr(e)},selectorChanged:function(t,e){return l(t,e),h},selectorChangedWithUnbind:l,getScrollContainer:function(){for(var e,n=t.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},scrollIntoView:function(t,e){return Rd(r,t,e)},placeCaretAt:function(t,e){return g(Hd(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=m();return t.collapsed?hc.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=c=s=null,u.destroy()}};return a=Vf(h),u=Ff(h,r),h.bookmarkManager=a,h.controlSelection=u,h}function nm(t,e,n,r){(t.padd_empty_with_br||e.insert)&&n[r.name]?r.empty().append(new dl("br",1)).shortEnded=!0:r.empty().append(new dl("#text",3)).value=Rr}function rm(t,e,n,r){return r.isEmpty(e,n,(function(e){return function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty}(t,e)}))}function om(t,e){void 0===e&&(e=Tr());var n={},r=[],o={},i={};(t=t||{}).validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var a=function(t){var e,a,u;(a=t.name)in n&&((u=o[a])?u.push(t):o[a]=[t]),e=r.length;for(;e--;)(a=r[e].name)in t.attributes.map&&((u=i[a])?u.push(t):i[a]=[t]);return t},u={schema:e,addAttributeFilter:function(t,e){dm(mm(t),(function(t){var n;for(n=0;n<r.length;n++)if(r[n].name===t)return void r[n].callbacks.push(e);r.push({name:t,callbacks:[e]})}))},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(t,e){dm(mm(t),(function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)}))},getNodeFilters:function(){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push({name:e,callbacks:n[e]});return t},filterNode:a,parse:function(u,c){var s,l,f,d,m,g,h,p,v,b,y,x=[];c=c||{},o={},i={},v=gm(fm("script,style,head,html,body,title,meta,param"),e.getBlockElements());var w,C=e.getNonEmptyElements(),S=e.children,k=t.validate,E=!1===(w="forced_root_block"in c?c.forced_root_block:t.forced_root_block)?"":!0===w?"p":w,O=e.getWhiteSpaceElements(),_=/^[ \t\r\n]+/,T=/[ \t\r\n]+$/,z=/[ \t\r\n]+/g,A=/^[ \t\r\n]+$/;function N(t){var n,r,o,i,a=e.getBlockElements();for(n=t.prev;n&&3===n.type;){if(0<(o=n.value.replace(T,"")).length)return void(n.value=o);if(r=n.next){if(3===r.type&&r.value.length){n=n.prev;continue}if(!a[r.name]&&"script"!==r.name&&"style"!==r.name){n=n.prev;continue}}i=n.prev,n.remove(),n=i}}b=O.hasOwnProperty(c.context)||O.hasOwnProperty(t.root_name);var M=function(t,e){var r,i=new dl(t,e);return t in n&&((r=o[t])?r.push(i):o[t]=[i]),i};s=Xl({validate:k,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:function(t){var e,n={};for(e in t)"li"!==e&&"p"!==e&&(n[e]=t[e]);return n}(e.getSelfClosingElements()),cdata:function(t){y.append(M("#cdata",4)).value=t},text:function(t,e){var n;b||(t=t.replace(z," "),function(t,e){return t&&(e[t.name]||"br"===t.name)}(y.lastChild,v)&&(t=t.replace(_,""))),0!==t.length&&((n=M("#text",3)).raw=!!e,y.append(n).value=t)},comment:function(t){y.append(M("#comment",8)).value=t},pi:function(t,e){y.append(M(t,7)).value=e,N(y)},doctype:function(t){y.append(M("#doctype",10)).value=t,N(y)},start:function(t,n,o){var a,u,c,s,l;if(c=k?e.getElementRule(t):{}){for((a=M(c.outputName||t,1)).attributes=n,a.shortEnded=o,y.append(a),(l=S[y.name])&&S[a.name]&&!l[a.name]&&x.push(a),u=r.length;u--;)(s=r[u].name)in n.map&&((h=i[s])?h.push(a):i[s]=[a]);v[t]&&N(a),o||(y=a),!b&&O[t]&&(b=!0)}},end:function(n){var r,o,i,a,u;if(o=k?e.getElementRule(n):{}){if(v[n]&&!b){if((r=y.firstChild)&&3===r.type)if(0<(i=r.value.replace(_,"")).length)r.value=i,r=r.next;else for(a=r.next,r.remove(),r=a;r&&3===r.type;)a=r.next,0!==(i=r.value).length&&!A.test(i)||(r.remove(),r=a),r=a;if((r=y.lastChild)&&3===r.type)if(0<(i=r.value.replace(T,"")).length)r.value=i,r=r.prev;else for(a=r.prev,r.remove(),r=a;r&&3===r.type;)a=r.prev,0!==(i=r.value).length&&!A.test(i)||(r.remove(),r=a),r=a}if(b&&O[n]&&(b=!1),o.removeEmpty&&rm(e,C,O,y)&&!y.attr("name")&&!y.attr("id"))return u=y.parent,v[y.name]?y.empty().remove():y.unwrap(),void(y=u);o.paddEmpty&&(function(t){return lm(t,"#text")&&t.firstChild.value===Rr}(y)||rm(e,C,O,y))&&nm(t,c,v,y),y=y.parent}}},e);var B=y=new dl(c.context||t.root_name,11);if(s.parse(u,c.format),k&&x.length&&(c.context?c.invalid=!0:function(t){var n,r,o,i,u,c,s,l,f,d,m,g,h,p,v,b;for(g=fm("tr,td,th,tbody,thead,tfoot,table"),d=e.getNonEmptyElements(),m=e.getWhiteSpaceElements(),h=e.getTextBlockElements(),p=e.getSpecialElements(),n=0;n<t.length;n++)if((r=t[n]).parent&&!r.fixed)if(h[r.name]&&"li"===r.parent.name){for(v=r.next;v&&h[v.name];)v.name="li",v.fixed=!0,r.parent.insert(v,r.parent),v=v.next;r.unwrap(r)}else{for(i=[r],o=r.parent;o&&!e.isValidChild(o.name,r.name)&&!g[o.name];o=o.parent)i.push(o);if(o&&1<i.length){for(i.reverse(),u=c=a(i[0].clone()),f=0;f<i.length-1;f++){for(e.isValidChild(c.name,i[f].name)?(s=a(i[f].clone()),c.append(s)):s=c,l=i[f].firstChild;l&&l!==i[f+1];)b=l.next,s.append(l),l=b;c=s}rm(e,d,m,u)?o.insert(r,i[0],!0):(o.insert(u,i[0],!0),o.insert(r,u)),(rm(e,d,m,o=i[0])||lm(o,"br"))&&o.empty().remove()}else if(r.parent){if("li"===r.name){if((v=r.prev)&&("ul"===v.name||"ul"===v.name)){v.append(r);continue}if((v=r.next)&&("ul"===v.name||"ul"===v.name)){v.insert(r,v.firstChild,!0);continue}r.wrap(a(new dl("ul",1)));continue}e.isValidChild(r.parent.name,"div")&&e.isValidChild("div",r.name)?r.wrap(a(new dl("div",1))):p[r.name]?r.empty().remove():r.unwrap()}}}(x)),E&&("body"===B.name||c.isRootContent)&&function(){function n(t){t&&((i=t.firstChild)&&3===i.type&&(i.value=i.value.replace(_,"")),(i=t.lastChild)&&3===i.type&&(i.value=i.value.replace(T,"")))}var r,o,i=B.firstChild;if(e.isValidChild(B.name,E.toLowerCase())){for(;i;)r=i.next,3===i.type||1===i.type&&"p"!==i.name&&!v[i.name]&&!i.attr("data-mce-type")?(o||((o=M(E,1)).attr(t.forced_root_block_attrs),B.insert(o,i)),o.append(i)):(n(o),o=null),i=r;n(o)}}(),!c.invalid){for(p in o)if(o.hasOwnProperty(p)){for(h=n[p],m=(l=o[p]).length;m--;)l[m].parent||l.splice(m,1);for(f=0,d=h.length;f<d;f++)h[f](l,p,c)}for(f=0,d=r.length;f<d;f++)if((h=r[f]).name in i){for(m=(l=i[h.name]).length;m--;)l[m].parent||l.splice(m,1);for(m=0,g=h.callbacks.length;m<g;m++)h.callbacks[m](l,h.name,c)}}return B}};return function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",(function(t,r,o){var i,a,u,c,s,l,f,d,m=t.length,g=jn.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),p=n.getNonEmptyElements();for(g.body=1,i=0;i<m;i++)if(u=(a=t[i]).parent,g[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if("span"!==(l=s.name)||"bookmark"!==s.attr("data-mce-type")){if("br"!==l)break;if("br"===l){a=null;break}}s=s.prev}a&&(a.remove(),rm(n,h,p,u)&&(f=n.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&nm(e,o,g,u)))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&!g[(c=u).name];)u=u.parent;c===u&&!0!==e.padd_empty_with_br&&((d=new dl("#text",3)).value=Rr,a.replace(d))}})),t.addAttributeFilter("href",(function(t){var n,r,o,i=t.length;if(!e.allow_unsafe_link_target)for(;i--;)"a"===(n=t[i]).name&&"_blank"===n.attr("target")&&n.attr("rel",(o=(r=n.attr("rel"))?jn.trim(r):"",/\b(noopener)\b/g.test(o)?o:o.split(" ").filter((function(t){return 0<t.length})).concat(["noopener"]).sort().join(" ")))})),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",(function(t){for(var e,n,r,o,i=t.length;i--;)if("a"===(o=t[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,e=o.lastChild;n=e.prev,r.insert(e,o),e=n;);})),e.fix_list_elements&&t.addNodeFilter("ul,ol",(function(t){for(var e,n,r=t.length;r--;)if("ul"===(n=(e=t[r]).parent).name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new dl("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}})),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",(function(t){for(var e,r,o,i,a,u,c,s=t.length,l=n.getValidClasses();s--;){for(r=(e=t[s]).attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,(u=l["*"])&&u[i]&&(c=!0),u=l[e.name],!c&&u&&u[i]&&(c=!0),c&&(a&&(a+=" "),a+=i);a.length||(a=null),e.attr("class",a)}}))}(u,t),sm(u,t),u}function im(t,e,n){-1===jn.inArray(e,n)&&(t.addAttributeFilter(n,(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)})),e.push(n))}function am(t,e){var n=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:Ui.DOM,o=e&&e.schema?e.schema:Tr(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var a=om(t,o);return hm(a,t,r),{schema:o,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:function(n,i){void 0===i&&(i={});var u=tt({format:"html"},i),c=vm(e,n,u),s=function(t,e,n){var r=Ya.trim(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||ir(te.fromDom(e))?r:jn.trim(r)}(r,c,u),l=function(t,e,n){var r=n.selection?tt({forced_root_block:!1},n):n,o=t.parse(e,r);return pm(o),o}(a,s,u);return"tree"===u.format?l:function(t,e,n,r,o){return function(t,e,n){return e.no_events||!t?n:function(t,e){return t.fire("PostProcess",e)}(t,tt(tt({},e),{content:n})).content}(t,o,function(t,e,n){return yl(t,e).serialize(n)}(e,n,r))}(e,t,o,l,u)},addRules:function(t){o.addValidElements(t)},setRules:function(t){o.setValidElements(t)},addTempAttr:i(im,a,n),getTempAttrs:function(){return n},getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters}}(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}}function um(t){var e,n,r=decodeURIComponent(t).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(e=n[1]),{type:e,data:r[1]}}function cm(t){return(t||"blobid")+xm++}var sm=function(t,e){e.inline_styles&&function(t,e){var n=Dr();e.convert_fonts_to_spans&&function(t,e,n){t.addNodeFilter("font",(function(t){$(t,(function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),a=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),function(t,e){$(["color","face","size"],(function(e){t.attr(e,null)}))}(t)}))}))}(t,n,jn.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){$(t,(function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))}))}))}(t,n)}(t,e)},lm=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},fm=jn.makeMap,dm=jn.each,mm=jn.explode,gm=jn.extend,hm=function(t,e,n){t.addAttributeFilter("data-mce-tabindex",(function(t,e){for(var n,r=t.length;r--;)(n=t[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(e,null)})),t.addAttributeFilter("src,href,style",(function(t,r){for(var o,i,a=t.length,u="data-mce-"+r,c=e.url_converter,s=e.url_converter_scope;a--;)void 0!==(i=(o=t[a]).attr(u))?(o.attr(r,0<i.length?i:null),o.attr(u,null)):(i=o.attr(r),"style"===r?i=n.serializeStyle(n.parseStyle(i),o.name):c&&(i=c.call(s,i,r,o.name)),o.attr(r,0<i.length?i:null))})),t.addAttributeFilter("class",(function(t){for(var e,n,r=t.length;r--;)(n=(e=t[r]).attr("class"))&&(n=e.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),e.attr("class",0<n.length?n:null))})),t.addAttributeFilter("data-mce-type",(function(t,e,n){for(var r,o=t.length;o--;)"bookmark"!==(r=t[o]).attr("data-mce-type")||n.cleanup||(D.from(r.firstChild).exists((function(t){return!Ya.isZwsp(t.value)}))?r.unwrap():r.remove())})),t.addNodeFilter("noscript",(function(t){for(var e,n=t.length;n--;)(e=t[n].firstChild)&&(e.value=br.decode(e.value))})),t.addNodeFilter("script,style",(function(t,n){for(var r,o,i,a=t.length,u=function(t){return t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};a--;)o=(r=t[a]).firstChild?r.firstChild.value:"","script"===n?((i=r.attr("type"))&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===e.element_format&&0<o.length&&(r.firstChild.value="// <![CDATA[\n"+u(o)+"\n// ]]>")):"xhtml"===e.element_format&&0<o.length&&(r.firstChild.value="\x3c!--\n"+u(o)+"\n--\x3e")})),t.addNodeFilter("#comment",(function(t){for(var r,o=t.length;o--;)r=t[o],e.preserve_cdata&&0===r.value.indexOf("[CDATA[")?(r.name="#cdata",r.type=4,r.value=n.decode(r.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===r.value.indexOf("mce:protected ")&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(r.value).substr(14))})),t.addNodeFilter("xml:namespace,input",(function(t,e){for(var n,r=t.length;r--;)7===(n=t[r]).type?n.remove():1===n.type&&("input"!==e||n.attr("type")||n.attr("type","text"))})),t.addAttributeFilter("data-mce-type",(function(e){$(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)}))},pm=function(t){function e(t){return t&&"br"===t.name}var n,r;e(n=t.lastChild)&&e(r=n.prev)&&(n.remove(),r.remove())},vm=function(e,n,r){return function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events}(e,r)?function(e,n,r){var o,i,a,u=e.dom;return n=n.cloneNode(!0),(o=t.document.implementation).createHTMLDocument&&(i=o.createHTMLDocument(""),jn.each("BODY"===n.nodeName?n.childNodes:[n],(function(t){i.body.appendChild(i.importNode(t,!0))})),n="BODY"!==n.nodeName?i.body.firstChild:i.body,a=u.doc,u.doc=i),function(t,e){t.fire("PreProcess",e)}(e,tt(tt({},r),{node:n})),a&&(u.doc=a),n}(e,n,r):n},bm=function(e){return 0===e.indexOf("blob:")?function(e){return new mn((function(n,r){function o(){r("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")}try{var i=new t.XMLHttpRequest;i.open("GET",e,!0),i.responseType="blob",i.onload=function(){200===this.status?n(this.response):o()},i.onerror=o,i.send()}catch(g){o()}}))}(e):0===e.indexOf("data:")?function(e){return new mn((function(n){var r,o,i,a=um(e);try{r=t.atob(a.data)}catch($w){return void n(new t.Blob([]))}for(o=new Uint8Array(r.length),i=0;i<o.length;i++)o[i]=r.charCodeAt(i);n(new t.Blob([o],{type:a.type}))}))}(e):null},ym=um,xm=0;function wm(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&t.dom.is(e,r[o].selector))return!0;return!1}function Cm(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,(function(e){return!!wm(t,e,n)||e.parentNode===o||!!eg(t,e,n,r,!0)})),eg(t,e,n,r))}function Sm(t,e,n){return!!tg(e,n.inline)||!!tg(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0)}function km(t,e,n,r,o,i){var a,u,c,s=n[r];if(n.onmatch)return n.onmatch(e,n,r);if(s)if(void 0===s.length){for(a in s)if(s.hasOwnProperty(a)){if(u="attributes"===r?t.getAttrib(e,a):Cs(t,e,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!tg(u,ws(t,ys(s[a],i),a)))return}}else for(c=0;c<s.length;c++)if("attributes"===r?t.getAttrib(e,s[c]):Cs(t,e,s[c]))return n;return n}function Em(t,e,n,r){var o;return r?Cm(t,r,e,n):(r=t.selection.getNode(),!!Cm(t,r,e,n)||!((o=t.selection.getStart())===r||!Cm(t,o,e,n)))}function Om(t,e,n){var r,o=[],i={};return r=t.selection.getStart(),t.dom.getParent(r,(function(r){var a,u;for(a=0;a<e.length;a++)!i[u=e[a]]&&eg(t,r,u,n)&&(i[u]=!0,o.push(u))}),t.dom.getRoot()),o}function _m(t,e){var n,r,o,i,a=t.formatter.get(e),u=t.dom;if(a)for(n=ks(u,t.selection.getStart()),o=a.length-1;0<=o;o--){if(!(i=a[o].selector)||a[o].defaultBlock)return!0;for(r=n.length-1;0<=r;r--)if(u.is(n[r],i))return!0}return!1}function Tm(t,e){return t.splitText(e)}function zm(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&$e.isText(e)?0<n&&n<e.nodeValue.length&&(e=(r=Tm(e,n)).previousSibling,n<o?(e=r=Tm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):($e.isText(e)&&0<n&&n<e.nodeValue.length&&(e=Tm(e,n),n=0),$e.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=Tm(r,o).previousSibling).nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}}function Am(t,e,n){if(0!==n){var r=t.data.slice(e,e+n);t.replaceData(e,n,function(t,e,n){return x(t,(function(r,o){return ds(o)||Ys(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+Rr}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}}),{previousCharIsSpace:!1,str:""}).str}(r,0===e,e+n>=t.data.length))}}function Nm(t,e){var n=t.data.slice(e),r=n.length-function(t){return t.replace(/^\s+/g,"")}(n).length;return Am(t,e,r)}function Mm(t,e){return _a(e)&&!1===function(t,e){return $e.isText(e)&&/^[ \t\r\n]*$/.test(e.data)&&!1===function(t,e){var n=te.fromDom(t);return function(t,e,n){return da(t,"pre,code",n).isSome()}(te.fromDom(e),0,i(mt,n))}(t,e)}(t,e)||function(t){return $e.isElement(t)&&"A"===t.nodeName&&t.hasAttribute("name")}(e)||ng(e)}function Bm(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===hc.isTextPosition(t)&&n===e.parentNode&&r>hc.before(e).offset()}(e,t)?hc(e.container(),e.offset()-1):e}function Rm(t){return _a(t.previousSibling)?D.some(function(t){return $e.isText(t)?hc(t,t.data.length):hc.after(t)}(t.previousSibling)):t.previousSibling?Gs.lastPositionIn(t.previousSibling):D.none()}function Dm(t){return _a(t.nextSibling)?D.some(function(t){return $e.isText(t)?hc(t,0):hc.before(t)}(t.nextSibling)):t.nextSibling?Gs.firstPositionIn(t.nextSibling):D.none()}function Hm(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))}function Im(t,e){return e&&t.schema.getBlockElements().hasOwnProperty(Nt(e))}function Pm(t){if(ig(t)){var e=te.fromHtml('<br data-mce-bogus="1">');return zt(t),ze(t,e),D.some(hc.before(e.dom()))}return D.none()}function Lm(t){return 0<function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==ug||1<t.childNodes.length)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length}function Fm(t){if(t){var e=new Ni(t,t);for(t=e.current();t;t=e.next())if($e.isText(t))return t}return null}function Vm(t){var e=te.fromTag("span");return Wt(e,{id:cg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&ze(e,te.fromText(ug)),e}function Um(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(Lm(e))ag(t,!1,te.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),u=function(t){var e=Fm(t);return e&&e.nodeValue.charAt(0)===ug&&e.deleteData(0,1),e}(e);i.startContainer===u&&0<i.startOffset&&i.setStart(u,i.startOffset-1),i.endContainer===u&&0<i.endOffset&&i.setEnd(u,i.endOffset-1),r.remove(e,!0),a&&r.isEmpty(a)&&Zm(te.fromDom(a)),o.setRng(i)}}function jm(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Um(t,e,n);else if(!(e=ju(t.getBody(),o.getStart())))for(;e=r.get(cg);)Um(t,e,!1)}function Wm(t,e,n){var r=t.dom,o=r.getParent(n,i(vs,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(Jm(te.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))}function qm(t,e){return t.appendChild(e),e}function Gm(t,e){var n=y(t,(function(t,e){return qm(t,e.cloneNode(!1))}),e);return qm(n,n.ownerDocument.createTextNode(ug))}function $m(t,e){return t.schema.getTextInlineElements().hasOwnProperty(Nt(e))&&!Uu(e.dom())&&!$e.isBogus(e.dom())}var Xm,Km=0,Ym=function(t){return t+Km+++function(){function t(){return Math.round(4294967295*Math.random()).toString(36)}return"s"+(new Date).getTime().toString(36)+t()+t()+t()}()},Jm=function(t){var e=aa(t,"br"),n=X(function(t){for(var e=[],n=t.dom();n;)e.push(te.fromDom(n)),n=n.lastChild;return e}(t).slice(-1),Gn);e.length===n.length&&$(n,Ae)},Zm=function(t){zt(t),ze(t,te.fromHtml('<br data-mce-bogus="1">'))},Qm=function(t){kt(t).each((function(e){vt(e).each((function(n){Zn(t)&&Gn(e)&&Zn(n)&&Ae(e)}))}))},tg=xs,eg=function(t,e,n,r,o){var i,a,u,c,s=t.formatter.get(n),l=t.dom;if(s&&e)for(a=0;a<s.length;a++)if(Sm(t.dom,e,i=s[a])&&km(l,e,i,"attributes",o,r)&&km(l,e,i,"styles",o,r)){if(c=i.classes)for(u=0;u<c.length;u++)if(!t.dom.hasClass(e,c[u]))return;return i}},ng=$e.hasAttribute("data-mce-bookmark"),rg=$e.hasAttribute("data-mce-bogus"),og=$e.hasAttributeValue("data-mce-bogus","all"),ig=function(t,e){return void 0===e&&(e=!0),function(t,e){var n,r=0;if(Mm(t,t))return!1;if(!(n=t.firstChild))return!0;var o=new Ni(n,t);do{if(e){if(og(n)){n=o.next(!0);continue}if(rg(n)){n=o.next();continue}}if($e.isBr(n))r++,n=o.next();else{if(Mm(t,n))return!1;n=o.next()}}while(n);return r<=1}(t.dom(),e)},ag=function(t,e,n,r){void 0===r&&(r=!0);var o=function(t,e,n){return function(t,e,n){return t?function(t,e){return Dm(e).orThunk((function(){return Rm(e)})).orThunk((function(){return function(t,e){return Gs.nextPosition(t,hc.after(e)).fold((function(){return Gs.prevPosition(t,hc.before(e))}),D.some)}(t,e)}))}(e,n):function(t,e){return Rm(e).orThunk((function(){return Dm(e)})).orThunk((function(){return function(t,e){var n=hc.before(e.previousSibling?e.previousSibling:e.parentNode);return Gs.prevPosition(t,n).fold((function(){return Gs.nextPosition(t,hc.after(e))}),D.some)}(t,e)}))}(e,n)}(t,e,n).map(i(Bm,n))}(e,t.getBody(),n.dom()),a=la(n,i(Im,t),function(t){return function(e){return e.dom()===t}}(t.getBody())),u=function(t,e,n){var r=vt(t).filter(Me),o=bt(t).filter(Me);return Ae(t),function(t,e,r,o){return t.isSome()&&e.isSome()&&r.isSome()?D.some(function(t,e,r){var o=t.dom(),i=e.dom(),a=o.data.length;return function(t,e,n){var r=ut(t.data).length;t.appendData(e.data),Ae(te.fromDom(e)),n&&Nm(t,r)}(o,i,n),r.container()===i?hc(o,a):r}(t.getOrDie(),e.getOrDie(),r.getOrDie())):D.none()}(r,o,e).orThunk((function(){return n&&(r.each((function(t){return function(t,e){var n=t.data.slice(0,e),r=n.length-ut(n).length;return Am(t,e-r,r)}(t.dom(),t.dom().length)})),o.each((function(t){return Nm(t.dom(),0)}))),e}))}(n,o,function(t,e){return Q(t.schema.getTextInlineElements(),Nt(e))}(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(Pm).fold((function(){r&&Hm(t,e,u)}),(function(n){r&&Hm(t,e,D.some(n))}))},ug=Ya.ZWSP,cg="_mce_caret",sg={},lg=Fn.filter,fg=Fn.each;function dg(t){this.compare=function(e,n){if(e.nodeName!==n.nodeName)return!1;function r(e){var n={};return _g(t.getAttribs(e),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=t.getAttrib(e,o))})),n}function o(t,e){var n,r;for(r in t)if(t.hasOwnProperty(r)){if(void 0===(n=e[r]))return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(e.hasOwnProperty(r))return!1;return!0}return!(!o(r(e),r(n))||!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))||Ks(e)||Ks(n))}}function mg(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)}function gg(t,e,n){var r,o;if(o=e[n?"startOffset":"endOffset"],$e.isElement(r=e[n?"startContainer":"endContainer"])){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[i<o?i:o]}return $e.isText(r)&&n&&o>=r.nodeValue.length&&(r=new Ni(r,t.getBody()).next()||r),$e.isText(r)&&!n&&0===o&&(r=new Ni(r,t.getBody()).prev()||r),r}function hg(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o}function pg(t,e,n,r,o){var i=te.fromDom(e),a=te.fromDom(t.create(r,o));return Tt(a,n?xt(i):yt(i)),n?(Et(i,a),_t(a,i)):(Ot(i,a),ze(a,i)),a.dom()}function vg(t,e,n,r){return!(e=ps(e,n,r))||"BR"===e.nodeName||t.isBlock(e)}function bg(t,e,n,r,o){var i,a=t.dom;if(!function(t,e,n){return!!Ag(e,n.inline)||!!Ag(e,n.block)||(n.selector?$e.isElement(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return!1;var u=r;if("all"!==e.remove){zg(e.styles,(function(t,r){t=ws(a,ys(t,n),r),"number"==typeof r&&(r=t,o=null),!e.remove_similar&&o&&!Ag(Cs(a,o,r),t)||a.setStyle(u,r,""),i=!0})),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),zg(e.attributes,(function(t,r){var i;if(t=ys(t,n),"number"==typeof r&&(r=t,o=null),e.remove_similar||!o||Ag(a.getAttrib(o,r),t)){if("class"===r&&(t=a.getAttrib(u,r))&&(i="",zg(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(u,r,i);"class"===r&&u.removeAttribute("className"),Tg.test(r)&&u.removeAttribute("data-mce-"+r),u.removeAttribute(r)}})),zg(e.classes,(function(t){t=ys(t,n),o&&!a.hasClass(o,t)||a.removeClass(u,t)}));for(var c=a.getAttribs(u),s=0;s<c.length;s++){var l=c[s].nodeName;if(0!==l.indexOf("_")&&0!==l.indexOf("data-"))return!1}}return"none"!==e.remove?(function(t,e,n){var r,o=e.parentNode,i=t.dom,a=Ac(t);n.block&&(a?o===i.getRoot()&&(n.list_block&&Ag(e,n.list_block)||zg(jn.grep(e.childNodes),(function(e){bs(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=hg(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=0}))):i.isBlock(e)&&!i.isBlock(o)&&(vg(i,e,!1)||vg(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),vg(i,e,!0)||vg(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),n.selector&&n.inline&&!Ag(n.inline,e)||i.remove(e,!0)}(t,u,e),!0):void 0}function yg(t,e,n,r,o){function i(r){var i=function(t,e,n,r,o){var i;return zg(ks(t.dom,e.parentNode).reverse(),(function(e){var a;i||"_start"===e.id||"_end"===e.id||(a=eg(t,e,n,r,o))&&!1!==a.split&&(i=e)})),i}(t,r,e,n,o);return function(t,e,n,r,o,i,a,u){var c,s,l,f,d,m,g=t.dom;if(n){for(m=n.parentNode,c=r.parentNode;c&&c!==m;c=c.parentNode){for(s=g.clone(c,!1),d=0;d<e.length;d++)if(bg(t,e[d],u,s,s)){s=0;break}s&&(l&&s.appendChild(l),f=f||s,l=s)}a.mixed&&g.isBlock(n)||(r=g.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(t,l,i,r,r,0,f,n)}function a(t){var e=m.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return function(t){return Ks(t)&&$e.isElement(t)&&("_start"===t.id||"_end"===t.id)}(n)&&(n=n[t?"firstChild":"lastChild"]),$e.isText(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),m.remove(e,!0),n}function u(e){var n,r,o=e.commonAncestorContainer,u=Bs(t,e,l,!0);if(f.split){if(u=zm(u),(n=gg(t,u,!0))!==(r=gg(t,u))){if(/^(TR|TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n="TR"===n.nodeName?n.firstChild.firstChild||n:n.firstChild||n),o&&/^T(HEAD|BODY|FOOT|R)$/.test(o.nodeName)&&function(t){return/^(TH|TD)$/.test(t.nodeName)}(r)&&r.firstChild&&(r=r.firstChild||r),mg(m,n,r)){var c=D.from(n.firstChild).getOr(n);return i(pg(m,c,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void a(!0)}if(mg(m,r,n))return c=D.from(r.lastChild).getOr(r),i(pg(m,c,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void a(!1);n=hg(m,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=hg(m,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=m.createRng();s.setStartAfter(n),s.setEndBefore(r),rl(m,s,(function(t){$(t,(function(t){Ks(t)||Ks(t.parentNode)||i(t)}))})),i(n),i(r),n=a(!0),r=a()}else n=r=i(n);u.startContainer=n.parentNode?n.parentNode:n,u.startOffset=m.nodeIndex(n),u.endContainer=r.parentNode?r.parentNode:r,u.endOffset=m.nodeIndex(r)+1}rl(m,u,(function(e){zg(e,(function(e){h(e),$e.isElement(e)&&"underline"===t.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===Ss(m,e.parentNode)&&bg(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)}))}))}var c,s,l=t.formatter.get(e),f=l[0],d=!0,m=t.dom,g=t.selection,h=function(e){var r,o,i,a,u;if($e.isElement(e)&&m.getContentEditable(e)&&(a=d,d="true"===m.getContentEditable(e),u=!0),r=jn.grep(e.childNodes),d&&!u)for(o=0,i=l.length;o<i&&!bg(t,l[o],n,e,e);o++);if(f.deep&&r.length){for(o=0,i=r.length;o<i;o++)h(r[o]);u&&(d=a)}};if(r)gs(r)?((s=m.createRng()).setStartBefore(r),s.setEndAfter(r),u(s)):u(r);else if("false"!==m.getContentEditable(g.getNode()))g.isCollapsed()&&f.inline&&!m.select("td[data-mce-selected],th[data-mce-selected]").length?function(t,e,n,r){var o,i,a,u,c,s,l=t.dom,f=t.selection,d=[],m=f.getRng();for(3===(u=o=m.startContainer).nodeType&&(m.startOffset!==o.nodeValue.length&&(a=!0),u=u.parentNode);u;){if(eg(t,u,e,n,r)){c=u;break}u.nextSibling&&(a=!0),d.push(u),u=u.parentNode}if(c)if(a){i=f.getBookmark(),m.collapse(!0);var g=Bs(t,m,t.formatter.get(e),!0);g=zm(g),t.formatter.remove(e,n,g),f.moveToBookmark(i)}else{s=ju(t.getBody(),c);var h=Vm(!1).dom(),p=Gm(d,h);Wm(t,h,s||c),Um(t,s,!1),f.setCursorLocation(p,1),l.isEmpty(c)&&l.remove(c)}}(t,e,n,o):(c=Cc.getPersistentBookmark(t.selection,!0),u(g.getRng()),g.moveToBookmark(c),f.inline&&Em(t,e,n,g.getStart())&&hs(m,g,g.getRng()),t.nodeChanged());else{r=g.getNode();for(var p=0,v=l.length;p<v&&(!l[p].ceFalseOverride||!bg(t,l[p],n,r,r));p++);}}function xg(t){return $e.isElement(t)&&!Ks(t)&&!Uu(t)&&!$e.isBogus(t)}function wg(t,e){var n;for(n=t;n;n=n[e]){if($e.isText(n)&&0!==n.nodeValue.length)return t;if($e.isElement(n)&&!Ks(n))return n}return t}function Cg(t,e,n){var r,o,i=new dg(t);if(e&&n&&(e=wg(e,"previousSibling"),n=wg(n,"nextSibling"),i.compare(e,n))){for(r=e.nextSibling;r&&r!==n;)r=(o=r).nextSibling,e.appendChild(o);return t.remove(n),jn.each(jn.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n}function Sg(t,e){return i((function(e,n){return!(!n||!Cs(t,n,e))}),e)}function kg(t,e,n){return i((function(e,n,r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Bg(t,r)}),e,n)}function Eg(t,e){var n;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(n=Ss(t,e.parentNode),t.getStyle(e,"color")&&n?t.setStyle(e,"text-decoration",n):t.getStyle(e,"text-decoration")===n&&t.setStyle(e,"text-decoration",null))}function Og(t,e,n,r,o){return null===e.get()&&function(t,e){var n=ee({});t.set({}),e.on("NodeChange",(function(r){Ig(e,r.element,n,t.get())}))}(e,t),function(t,e,n,r){var o=t.get();$(e.split(","),(function(t){o[t]||(o[t]={similar:r,callbacks:[]}),o[t].callbacks.push(n)})),t.set(o)}(e,n,r,o),{unbind:function(){return function(t,e,n){var r=t.get();$(e.split(","),(function(t){r[t].callbacks=X(r[t].callbacks,(function(t){return t!==n})),0===r[t].callbacks.length&&delete r[t]})),t.set(r)}(e,n,r)}}}Xm=function(t){var e,n,r=t.selection.getRng();e=$e.matchNodeNames(["pre"]),r.collapsed||(n=t.selection.getSelectedBlocks(),fg(lg(lg(n,e),(function(t){return e(t.previousSibling)&&-1!==Fn.indexOf(n,t.previousSibling)})),(function(t){!function(t,e){Ai(e).remove(),Ai(t).append("<br><br>").append(e.childNodes)}(t.previousSibling,t)})))},sg.pre||(sg.pre=[]),sg.pre.push(Xm);var _g=jn.each,Tg=/^(src|href|style)$/,zg=jn.each,Ag=xs,Ng=jn.each,Mg=function(t,e,n){Ng(t.childNodes,(function(t){xg(t)&&(e(t)&&n(t),t.hasChildNodes()&&Mg(t,e,n))}))},Bg=function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)},Rg=function(e){return e.collapsed?e:function(e){var n=hc.fromRangeStart(e),r=hc.fromRangeEnd(e),o=e.commonAncestorContainer;return Gs.fromPosition(!1,o,r).map((function(i){return!rc(n,r,o)&&rc(n,i,o)?function(e,n,r,o){var i=t.document.createRange();return i.setStart(e,n),i.setEnd(r,o),i}(n.container(),n.offset(),i.container(),i.offset()):e})).getOr(e)}(e)},Dg=jn.each,Hg=function(t,e,n,r){function o(t,e){if(e=e||f,t){if(e.onformat&&e.onformat(t,e,n,r),Dg(e.styles,(function(e,r){m.setStyle(t,r,ys(e,n))})),e.styles){var o=m.getAttrib(t,"style");o&&m.setAttrib(t,"data-mce-style",o)}Dg(e.attributes,(function(e,r){m.setAttrib(t,r,ys(e,n))})),Dg(e.classes,(function(e){e=ys(e,n),m.hasClass(t,e)||m.addClass(t,e)}))}}function a(t,e){var n=!1;return!!f.selector&&(Dg(t,(function(t){if(!("collapsed"in t)||t.collapsed===d)return m.is(e,t.selector)&&!Uu(e)?(o(e,t),!(n=!0)):void 0})),n)}function u(r,i,u,c){var s,d,m=[],g=!0;o(d=r.create(s=f.inline||f.block)),rl(r,i,(function(i){var u,h=function(i){var p=!1,v=g,b=i.nodeName.toLowerCase(),y=i.parentNode.nodeName.toLowerCase();if($e.isElement(i)&&r.getContentEditable(i)&&(v=g,g="true"===r.getContentEditable(i),p=!0),xs(b,"br"))return u=0,void(f.block&&r.remove(i));if(f.wrapper&&eg(t,i,e,n))u=0;else{if(g&&!p&&f.block&&!f.wrapper&&vs(t,b)&&bs(t,y,s))return o(i=r.rename(i,s)),m.push(i),void(u=0);if(f.selector){var x=a(l,i);if(!f.inline||x)return void(u=0)}!g||p||!bs(t,s,b)||!bs(t,y,s)||!c&&3===i.nodeType&&1===i.nodeValue.length&&65279===i.nodeValue.charCodeAt(0)||Uu(i)||f.inline&&r.isBlock(i)?(u=0,Dg(jn.grep(i.childNodes),h),p&&(g=v),u=0):(u||(u=r.clone(d,!1),i.parentNode.insertBefore(u,i),m.push(u)),u.appendChild(i))}};Dg(i,h)})),!0===f.links&&Dg(m,(function(t){var e=function(t){"A"===t.nodeName&&o(t,f),Dg(jn.grep(t.childNodes),e)};e(t)})),Dg(m,(function(i){var a,u,c,s,d;u=0,Dg(i.childNodes,(function(t){(function(t){return t&&$e.isText(t)&&0===t.length})(t)||Ks(t)||u++})),a=u,!(1<m.length)&&r.isBlock(i)||0!==a?(f.inline||f.wrapper)&&(f.exact||1!==a||((s=function(t){var e=!1;return Dg(t.childNodes,(function(t){if(function(t){return t&&1===t.nodeType&&!Ks(t)&&!Uu(t)&&!$e.isBogus(t)}(t))return e=t,!1})),e}(c=i))&&!Ks(s)&&Sm(r,s,f)&&(o(d=r.clone(s,!1)),r.replace(d,c,!0),r.remove(s,!0)),i=d||c),function(t,e,n,r){Ng(e,(function(e){Ng(t.dom.select(e.inline,r),(function(r){xg(r)&&bg(t,e,n,r,e.exact?r:null)})),function(t,e,n){e.clear_child_styles&&Ng(t.select(e.links?"*:not(a)":"*",n),(function(n){xg(n)&&Ng(e.styles,(function(e,r){t.setStyle(n,r,"")}))}))}(t.dom,e,r)}))}(t,l,n,i),function(t,e,n,r,o){eg(t,o.parentNode,n,r)&&bg(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(eg(t,i,n,r))return bg(t,e,r,o),!0}))}(t,f,e,n,i),function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Mg(r,Sg(t,"fontSize"),kg(t,"backgroundColor",ys(e.styles.backgroundColor,n)))}(r,f,n,i),function(t,e,n,r){"sub"!==e.inline&&"sup"!==e.inline||(Mg(r,Sg(t,"fontSize"),kg(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,f,0,i),function(t,e,n,r){r&&!1!==e.merge_siblings&&(r=Cg(t,ps(r),r),r=Cg(t,r,ps(r,!0)))}(r,f,0,i)):r.remove(i,!0)}))}var c,s,l=t.formatter.get(e),f=l[0],d=!r&&t.selection.isCollapsed(),m=t.dom,g=t.selection;if("false"!==m.getContentEditable(g.getNode())){if(f){if(r)gs(r)?a(l,r)||((s=m.createRng()).setStartBefore(r),s.setEndAfter(r),u(m,Bs(t,s,l),0,!0)):u(m,r,0,!0);else if(d&&f.inline&&!m.select("td[data-mce-selected],th[data-mce-selected]").length)!function(t,e,n){var r,o,i,a,u,c,s=t.selection;a=(r=s.getRng()).startOffset,c=r.startContainer.nodeValue,(o=ju(t.getBody(),s.getStart()))&&(i=Fm(o));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;c&&0<a&&a<c.length&&l.test(c.charAt(a))&&l.test(c.charAt(a-1))?(u=s.getBookmark(),r.collapse(!0),r=zm(r=Bs(t,r,t.formatter.get(e))),t.formatter.apply(e,n,r),s.moveToBookmark(u)):(o&&i.nodeValue===ug||(i=(o=function(t,e){return t.importNode(e,!0)}(t.getDoc(),Vm(!0).dom())).firstChild,r.insertNode(o),a=1),t.formatter.apply(e,n,o),s.setCursorLocation(i,a))}(t,e,n);else{var h=t.selection.getNode();t.settings.forced_root_block||!l[0].defaultBlock||m.getParent(h,m.isBlock)||Hg(t,l[0].defaultBlock),t.selection.setRng(Rg(t.selection.getRng())),c=Cc.getPersistentBookmark(t.selection,!0),u(m,Bs(t,g.getRng(),l)),f.styles&&function(t,e,n,r){(e.styles.color||e.styles.textDecoration)&&(jn.walk(r,i(Eg,t),"childNodes"),Eg(t,r))}(m,f,0,h),g.moveToBookmark(c),hs(m,g,g.getRng()),t.nodeChanged()}!function(t,e){fg(sg[t],(function(t){t(e)}))}(e,t)}}else{r=g.getNode();for(var p=0,v=l.length;p<v;p++)if(l[p].ceFalseOverride&&m.is(r,l[p].selector))return void o(r,l[p])}},Ig=function(t,e,n,r){var o=Y(n.get()),i={},a={},u=X(ks(t.dom,e),(function(t){return 1===t.nodeType&&!t.getAttribute("data-mce-bogus")}));z(r,(function(e,n){jn.each(u,(function(r){return t.formatter.matchNode(r,n,{},e.similar)?(-1===o.indexOf(n)&&($(e.callbacks,(function(t){t(!0,{node:r,format:n,parents:u})})),i[n]=e.callbacks),a[n]=e.callbacks,!1):!wm(t,r,n)&&void 0}))}));var c=Pg(n.get(),a,e,u);n.set(tt(tt({},i),c))},Pg=function(t,e,n,r){return M(t,(function(t,o){return!!Q(e,o)||($(t,(function(t){t(!1,{node:n,format:o,parents:r})})),!1)})).t};function Lg(t,e){function n(t){var e;return function(t,e){e.classes.length&&Dh.addClass(t,e.classes.join(" ")),Dh.setAttribs(t,e.attrs)}(e=Dh.create((o="string"==typeof t?{name:t,classes:[],attrs:{}}:t).name),o),e}var r,o,i,a=e&&e.schema||Tr({}),u=function(t,e,r){var o,i,c,s=0<e.length&&e[0],l=s&&s.name;if(c=function(t,e){var n="string"!=typeof t?t.nodeName.toLowerCase():t,r=a.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(e&&-1!==jn.inArray(o,e)?e:o[0])}(t,l))l===c?(i=e[0],e=e.slice(1)):i=c;else if(s)i=e[0],e=e.slice(1);else if(!r)return t;return i&&(o=n(i)).appendChild(t),r&&(o||(o=Dh.create("div")).appendChild(t),jn.each(r,(function(e){var r=n(e);o.insertBefore(r,t)}))),u(o,e,i&&i.siblings)};return t&&t.length?(r=n(o=t[0]),(i=Dh.create("div")).appendChild(u(r,t.slice(1),o.siblings)),i):""}function Fg(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=jn.trim(t))&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(t,e,r,o,i){switch(e){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==jn.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""}))),n.name=e||"div",n}function Vg(t,e){var n,r,o,i,a,u,c="";if(!1===(u=t.settings.preview_styles))return"";function s(t){return t.replace(/%(\w+)/g,"")}if("string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof e){if(!(e=t.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(n=e.block||e.inline||"span",r=(i=function(t){return t&&"string"==typeof t?(t=(t=t.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),jn.map(t.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=jn.map(t.split(/(?:~\+|~|\+)/),Fg),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[]}(e.selector)).length?(i[0].name||(i[0].name=n),n=e.selector,Lg(i,t)):Lg([n],t),o=Dh.select(n,r)[0]||r.firstChild,Rh(e.styles,(function(t,e){(t=s(t))&&Dh.setStyle(o,e,t)})),Rh(e.attributes,(function(t,e){(t=s(t))&&Dh.setAttrib(o,e,t)})),Rh(e.classes,(function(t){t=s(t),Dh.hasClass(o,t)||Dh.addClass(o,t)})),t.fire("PreviewFormats"),Dh.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),a=Dh.getStyle(t.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Rh(u.split(" "),(function(e){var n=Dh.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Dh.getStyle(t.getBody(),e,!0),"#ffffff"===Dh.toHex(n).toLowerCase())||"color"===e&&"#000000"===Dh.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===a)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*a+"px"}"border"===e&&n&&(c+="padding:0 2px;"),c+=e+":"+n+";"}})),t.fire("AfterPreviewFormats"),Dh.remove(r),c)}function Ug(t,e,n,r,o){var i=e.get(n);!Em(t,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Hg(t,n,r,o):yg(t,n,r,o)}function jg(t){var e=function(t){var e={},n=function(t,r){t&&("string"!=typeof t?jn.each(t,(function(t,e){n(e,t)})):(P(r)||(r=[r]),jn.each(r,(function(t){void 0===t.deep&&(t.deep=!t.selector),void 0===t.split&&(t.split=!t.selector||t.inline),void 0===t.remove&&t.selector&&!t.inline&&(t.remove="none"),t.selector&&t.inline&&(t.mixed=!0,t.block_expand=!0),"string"==typeof t.classes&&(t.classes=t.classes.split(/\s+/))})),e[t]=r))};return n(function(t){var e={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],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},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,n,r){jn.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return jn.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),(function(t){e[t]={block:t,remove:"all"}})),e}(t.dom)),n(t.settings.formats),{get:function(t){return t?e[t]:e},has:function(t){return Q(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}}(t),n=ee(null);return Hh(t),function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();jm(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==ug||jm(t,ju(r,n.getStart())),37!==e&&39!==e||jm(t,ju(r,n.getStart()))}(t,e.keyCode)}))}(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:i(Hg,t),remove:i(yg,t),toggle:i(Ug,t,e),match:i(Em,t),matchAll:i(Om,t),matchNode:i(eg,t),canApply:i(_m,t),formatChanged:i(Og,t,n),getCssText:i(Vg,t)}}function Wg(t){return $e.isElement(t)?t.outerHTML:$e.isText(t)?br.encodeRaw(t.data,!1):$e.isComment(t)?"\x3c!--"+t.data+"--\x3e":""}function qg(t){return"fragmented"===t.type?t.fragments.join(""):t.content}function Gg(e){var n=te.fromTag("body",Ih.get().getOrThunk((function(){var e=t.document.implementation.createHTMLDocument("undo");return Ih.set(D.some(e)),e})));return pa(n,qg(e)),$(aa(n,"*[data-mce-bogus]"),At),function(t){return t.dom().innerHTML}(n)}function $g(t){return 0===t.get()}function Xg(t,e,n){$g(n)&&(t.typing=e)}function Kg(t,e){t.typing&&(Xg(t,!1,e),t.add())}function Yg(t){var e=ee(D.none()),n=ee(0),r=ee(0),o={data:[],typing:!1,beforeChange:function(){!function(t,e,n){$g(e)&&n.set(D.some(Cc.getUndoBookmark(t.selection)))}(t,n,e)},add:function(i,a){return function(t,e,n,r,o,i,a){var u=t.settings,c=Ph(t);if(i=jn.extend(i=i||{},c),!1===$g(r)||t.removed)return null;var s=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:s,originalEvent:a}).isDefaultPrevented())return null;if(s&&Fh(s,i))return null;if(e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t})),u.custom_undo_redo_levels&&e.data.length>u.custom_undo_redo_levels){for(var l=0;l<e.data.length-1;l++)e.data[l]=e.data[l+1];e.data.length--,n.set(e.data.length)}i.bookmark=Cc.getUndoBookmark(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(i),n.set(e.data.length-1);var f={level:i,lastLevel:s,originalEvent:a};return t.fire("AddUndo",f),0<n.get()&&(t.setDirty(!0),t.fire("change",f)),i}(t,o,r,n,e,i,a)},undo:function(){return function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,Xg(e,!1,n)),0<r.get()&&(r.set(r.get()-1),o=e.data[r.get()],Lh(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o}(t,o,n,r)},redo:function(){return function(t,e,n){var r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],Lh(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r}(t,r,o.data)},clear:function(){!function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")}(t,o,r)},reset:function(){!function(t){t.clear(),t.add()}(o)},hasUndo:function(){return function(t,e,n){return 0<n.get()||e.typing&&e.data[0]&&!Fh(Ph(t),e.data[0])}(t,o,r)},hasRedo:function(){return function(t,e){return e.get()<t.data.length-1&&!t.typing}(o,r)},transact:function(t){return function(t,e,n){return Kg(t,e),t.beforeChange(),t.ignore(n),t.add()}(o,n,t)},ignore:function(t){!function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}}(n,t)},extra:function(e,n){!function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,a=e.data[n.get()-1];Lh(t,a,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}}(t,o,r,e,n)}};return function(t,e,n){function r(t){Xg(e,!1,n),e.add({},t)}var o=ee(!1);t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;"Undo"!==r&&"Redo"!==r&&"mceRepaint"!==r&&(Kg(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;"Undo"!==e&&"Redo"!==e&&"mceRepaint"!==e&&r(t)})),t.on("ObjectResizeStart cut",(function(){e.beforeChange()})),t.on("SaveContent ObjectResized blur",r),t.on("dragend",r),t.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((33<=i&&i<=36||37<=i&&i<=40||45===i||n.ctrlKey)&&(r(),t.nodeChanged()),46!==i&&8!==i||t.nodeChanged(),o.get()&&e.typing&&!1===Fh(Ph(t),e.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:e.data[0],lastLevel:null})),t.fire("TypingUndo"),o.set(!1),t.nodeChanged()))})),t.on("keydown",(function(t){var i=t.keyCode;t.isDefaultPrevented()||(33<=i&&i<=36||37<=i&&i<=40||45===i?e.typing&&r(t):!(i<16||20<i)||224===i||91===i||e.typing||t.ctrlKey&&!t.altKey||t.metaKey||(e.beforeChange(),Xg(e,!0,n),e.add({},t),o.set(!0)))})),t.on("mousedown",(function(t){e.typing&&r(t)})),t.on("input",(function(t){t.inputType&&(function(t){return"insertReplacementText"===t.inputType}(t)||function(t){return"insertText"===t.inputType&&null===t.data}(t))&&r(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))}(t,o,n),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),o}function Jg(t){return"keydown"===t.type||"keyup"===t.type}function Zg(t){var e=t.keyCode;return e===jf.BACKSPACE||e===jf.DELETE}function Qg(t){return void 0===t.touches||1!==t.touches.length?D.none():D.some(t.touches[0])}function th(t,e){return t.hasOwnProperty(e.nodeName)}function eh(t,e){if($e.isText(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||th(t,e.nextSibling)))return!0}return!1}function nh(t){var e,n,r,o,i,a,u,c,s,l,f=t.dom,d=t.selection,m=t.schema,g=m.getBlockElements(),h=d.getStart(),p=t.getBody(),v=Ac(t);if(h&&$e.isElement(h)&&v&&(l=p.nodeName.toLowerCase(),m.isValidChild(l,v.toLowerCase())&&!function(t,e,n){return b(Pd(te.fromDom(n),te.fromDom(e)),(function(e){return th(t,e.dom())}))}(g,p,h))){for(n=(e=d.getRng()).startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=df(t),h=p.firstChild;h;)if(y=g,$e.isText(x=h)||$e.isElement(x)&&!th(y,x)&&!Ks(x)){if(eh(g,h)){h=(u=h).nextSibling,f.remove(u);continue}a||(a=f.create(v,Nc(t)),h.parentNode.insertBefore(a,h),c=!0),h=(u=h).nextSibling,a.appendChild(u)}else a=null,h=h.nextSibling;var y,x;c&&s&&(e.setStart(n,r),e.setEnd(o,i),d.setRng(e),t.nodeChanged())}}function rh(t){return jh(t)&&t.data[0]===Ya.ZWSP}function oh(t){return jh(t)&&t.data[t.data.length-1]===Ya.ZWSP}function ih(t){return t.ownerDocument.createTextNode(Ya.ZWSP)}function ah(t,e){return t?function(t){if(jh(t.previousSibling))return oh(t.previousSibling)||t.previousSibling.appendData(Ya.ZWSP),t.previousSibling;if(jh(t))return rh(t)||t.insertData(0,Ya.ZWSP),t;var e=ih(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(jh(t.nextSibling))return rh(t.nextSibling)||t.nextSibling.insertData(0,Ya.ZWSP),t.nextSibling;if(jh(t))return oh(t)||t.appendData(Ya.ZWSP),t;var e=ih(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)}function uh(t,e){return $e.isText(t.container())?ah(e,t.container()):ah(e,t.getNode())}function ch(t,e){var n=e.get();return n&&t.container()===n&&wa(n)}function sh(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?wa(n)?$e.isText(n.nextSibling)?hc(n.nextSibling,0):hc.after(n):ka(e)?hc(n,r+1):e:wa(n)?$e.isText(n.previousSibling)?hc(n.previousSibling,n.previousSibling.data.length):hc.before(n):Ea(e)?hc(n,r-1):e}function lh(t,e){return nc(e,t)||t}function fh(t,e,n){var r=Xh.normalizeForwards(n),o=lh(e,r.container());return Xh.findRootInline(t,o,r).fold((function(){return Gs.nextPosition(o,r).bind(i(Xh.findRootInline,t,o)).map((function(t){return Yh.before(t)}))}),D.none)}function dh(t,e){return null===ju(t,e)}function mh(t,e,n){return Xh.findRootInline(t,e,n).filter(i(dh,e))}function gh(t,e,n){var r=Xh.normalizeBackwards(n);return mh(t,e,r).bind((function(t){return Gs.prevPosition(t,r).isNone()?D.some(Yh.start(t)):D.none()}))}function hh(t,e,n){var r=Xh.normalizeForwards(n);return mh(t,e,r).bind((function(t){return Gs.nextPosition(t,r).isNone()?D.some(Yh.end(t)):D.none()}))}function ph(t,e,n){var r=Xh.normalizeBackwards(n),o=lh(e,r.container());return Xh.findRootInline(t,o,r).fold((function(){return Gs.prevPosition(o,r).bind(i(Xh.findRootInline,t,o)).map((function(t){return Yh.after(t)}))}),D.none)}function vh(t){return!1===Xh.isRtl(Jh(t))}function bh(t,e,n){return Kh([fh,gh,hh,ph],[t,e,n]).filter(vh)}function yh(t){return t.fold(r("before"),r("start"),r("end"),r("after"))}function xh(t){return t.fold(Yh.before,Yh.before,Yh.after,Yh.after)}function wh(t,e,n,r,o,i){return Pa(Xh.findRootInline(e,n,r),Xh.findRootInline(e,n,o),(function(e,r){return e!==r&&Xh.hasSameParentBlock(n,e,r)?Yh.after(t?e:r):i})).getOr(i)}function Ch(t,e){return t.fold(r(!0),(function(t){return!function(t,e){return yh(t)===yh(e)&&Jh(t)===Jh(e)}(t,e)}))}function Sh(t,e){return t?e.fold(n(D.some,Yh.start),D.none,n(D.some,Yh.after),D.none):e.fold(D.none,n(D.some,Yh.before),D.none,n(D.some,Yh.end))}function kh(t,e,n,r){var o=Xh.normalizePosition(t,r),a=bh(e,n,o);return bh(e,n,o).bind(i(Sh,t)).orThunk((function(){return function(t,e,n,r,o){var a=Xh.normalizePosition(t,o);return Gs.fromPosition(t,n,a).map(i(Xh.normalizePosition,t)).fold((function(){return r.map(xh)}),(function(o){return bh(e,n,o).map(i(wh,t,e,n,a,o)).filter(i(Ch,r))})).filter(vh)}(t,e,n,a,r)}))}function Eh(t,e,n){var r=t?1:-1;return e.setRng(hc(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0}function Oh(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)}function _h(t){return!1!==t.settings.inline_boundaries}function Th(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")}function zh(t,e,n){return Gh(e,n).map((function(e){return Oh(t,e),n}))}function Ah(t,e,n){return function(){return!!_h(e)&&np(t,e)}}function Nh(t){return x(t,(function(t,e){return t.concat(function(t){function e(e){return G(e,(function(e){return(e=za(e)).node=t,e}))}if($e.isElement(t))return e(t.getClientRects());if($e.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(e))}),[])}var Mh,Bh,Rh=jn.each,Dh=Ui.DOM,Hh=function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var 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"])},Ih=ee(D.none()),Ph=function(t){var e,n;return function(t){return-1!==t.indexOf("</iframe>")}(e=(n=S(function(t){return X(G(K(t.childNodes),Wg),(function(t){return 0<t.length}))}(t.getBody()),(function(e){var n=Kl.trimInternal(t.serializer,e);return 0<n.length?[n]:[]}))).join(""))?function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}}(n):function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}}(e)},Lh=function(e,n,r){"fragmented"===n.type?function(e,n){!function(e,n){var r=0;$(e,(function(e){0===e[0]?r++:1===e[0]?(function(e,n,r){var o=function(e){var n,r,o;for(o=t.document.createElement("div"),n=t.document.createDocumentFragment(),e&&(o.innerHTML=e);r=o.firstChild;)n.appendChild(r);return n}(n);if(e.hasChildNodes()&&r<e.childNodes.length){var i=e.childNodes[r];i.parentNode.insertBefore(o,i)}else e.appendChild(o)}(n,e[1],r),r++):2===e[0]&&function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}}(n,r)}))}(function(t,e){function n(n,r,o,i){for(var a=n;a-r<i&&a<o&&t[a]===e[a-r];)++a;return function(t,e,n){return{start:t,end:e,diag:n}}(n,a,r)}var r=t.length+e.length+2,o=new Array(r),i=new Array(r),a=function(n,r,o,i,c){var s=u(n,r,o,i);if(null===s||s.start===r&&s.diag===r-i||s.end===n&&s.diag===n-o)for(var l=n,f=o;l<r||f<i;)l<r&&f<i&&t[l]===e[f]?(c.push([0,t[l]]),++l,++f):i-o<r-n?(c.push([2,t[l]]),++l):(c.push([1,e[f]]),++f);else{a(n,s.start,o,s.start-s.diag,c);for(var d=s.start;d<s.end;++d)c.push([0,t[d]]);a(s.end,r,s.end-s.diag,i,c)}},u=function(r,a,u,c){var s=a-r,l=c-u;if(0==s||0==l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2==0?v:1+v)/2;for(o[1+b]=r,i[1+b]=a+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){for(o[m=d+b]=d===-f||d!==f&&o[m-1]<o[m+1]?o[m+1]:o[m-1]+1,h=(g=o[m])-r+u-d;g<a&&h<c&&t[g]===e[h];)o[m]=++g,++h;if(p%2!=0&&p-f<=d&&d<=p+f&&i[m-p]<=o[m])return n(i[m-p],d+r-u,a,c)}for(d=p-f;d<=p+f;d+=2){for(i[m=d+b-p]=d===p-f||d!==p+f&&i[m+1]<=i[m-1]?i[m+1]-1:i[m-1],h=(g=i[m]-1)-r+u-d;r<=g&&u<=h&&t[g]===e[h];)i[m]=g--,h--;if(p%2==0&&-f<=d&&d<=f&&i[m]<=o[m+p])return n(i[m],d+r-u,a,c)}}},c=[];return a(0,t.length,0,e.length,c),c}(G(K(n.childNodes),Wg),e),n)}(n.fragments,e.getBody()):e.setContent(n.content,{format:"raw"}),e.selection.moveToBookmark(r?n.beforeBookmark:n.bookmark)},Fh=function(t,e){return!(!t||!e)&&(!!function(t,e){return qg(t)===qg(e)}(t,e)||function(t,e){return Gg(t)===Gg(e)}(t,e))},Vh=[9,27,jf.HOME,jf.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,jf.DOWN,jf.UP,jf.LEFT,jf.RIGHT].concat(Pn.browser.isFirefox()?[224]:[]),Uh="data-mce-placeholder",jh=$e.isText,Wh=i(ah,!0),qh=i(ah,!1),Gh=function(t,e){return e.fold((function(e){_c.remove(t.get());var n=Wh(e);return t.set(n),D.some(hc(n,n.length-1))}),(function(e){return Gs.firstPositionIn(e).map((function(e){if(ch(e,t))return hc(t.get(),1);_c.remove(t.get());var n=uh(e,!0);return t.set(n),hc(n,1)}))}),(function(e){return Gs.lastPositionIn(e).map((function(e){if(ch(e,t))return hc(t.get(),t.get().length-1);_c.remove(t.get());var n=uh(e,!1);return t.set(n),hc(n,n.length-1)}))}),(function(e){_c.remove(t.get());var n=qh(e);return t.set(n),D.some(hc(n,1))}))},$h=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Xh={isInlineTarget:function(t,e){return ft(te.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},findRootInline:function(t,e,n){var r=function(t,e,n){return X(Ui.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return D.from(r[r.length-1])},isRtl:function(t){return"rtl"===Ui.DOM.getStyle(t,"direction",!0)||function(t){return $h.test(t)}(t.textContent)},isAtZwsp:function(t){return ka(t)||Ea(t)},normalizePosition:sh,normalizeForwards:i(sh,!0),normalizeBackwards:i(sh,!1),hasSameParentBlock:function(t,e,n){var r=nc(e,t),o=nc(n,t);return r&&r===o}},Kh=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return D.none()},Yh=Zl([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Jh=function(t){return t.fold(o,o,o,o)},Zh=bh,Qh=kh,tp=(i(kh,!1),i(kh,!0),xh),ep=function(t){return t.fold(Yh.start,Yh.start,Yh.end,Yh.end)},np=function(t,e){var n=e.selection.getRng(),r=t?hc.fromRangeEnd(n):hc.fromRangeStart(n);return!!function(t){return V(t.selection.getSel().modify)}(e)&&(t&&ka(r)?Eh(!0,e.selection,r):!(t||!Ea(r))&&Eh(!1,e.selection,r))},rp={move:function(t,e,n){return function(){return!!_h(t)&&function(t,e,n){var r=t.getBody(),o=hc.fromRangeStart(t.selection.getRng()),a=i(Xh.isInlineTarget,t);return Qh(n,a,r,o).bind((function(n){return zh(t,e,n)}))}(t,e,n).isSome()}},moveNextWord:i(Ah,!0),movePrevWord:i(Ah,!1),setupSelectedState:function(t){var e=ee(null),n=i(Xh.isInlineTarget,t);return t.on("NodeChange",(function(r){_h(t)&&(function(t,e,n){var r=X(e.select('*[data-mce-selected="inline-boundary"]'),t),o=X(n,t);$(O(r,o),i(Th,!1)),$(O(o,r),i(Th,!0))}(n,t.dom,r.parents),function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=hc.fromRangeStart(t.selection.getRng());hc.isTextPosition(n)&&!1===Xh.isAtZwsp(n)&&(Oh(t,_c.removeAndReposition(e.get(),n)),e.set(null))}}(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=X(r,t);$(o,(function(r){var o=hc.fromRangeStart(e.selection.getRng());Zh(t,e.getBody(),o).bind((function(t){return zh(e,n,t)}))}))}}(n,t,e,r.parents))})),e},setCaretPosition:Oh};function op(t,e,n,r,o,i){function a(r){var i,a,u;for(u=Nh([r]),-1===t&&(u=u.reverse()),i=0;i<u.length;i++)if(!n(a=u[i],c)){if(0<l.length&&e(a,Fn.last(l))&&s++,a.line=s,o(a))return!0;l.push(a)}}var u,c,s=0,l=[];return(c=Fn.last(i.getClientRects()))&&(a(u=i.getNode()),function(t,e,n,r){for(;r=ec(r,t,Ta,e);)if(n(r))return}(t,r,a,u)),l}function ip(t){return function(e){return function(t,e){return e.line>t}(t,e)}}function ap(t){return function(e){return function(t,e){return e.line===t}(t,e)}}function up(t,e){return Math.abs(t.left-e)}function cp(t,e){return Math.abs(t.right-e)}function sp(t,e){return t>=e.left&&t<=e.right}function lp(t,e){return Fn.reduce(t,(function(t,n){var r,o;return r=Math.min(up(t,e),cp(t,e)),o=Math.min(up(n,e),cp(n,e)),sp(e,n)?n:sp(e,t)?t:o===r&&Ep(n.node)||o<r?n:t}))}function fp(t,e,n,r){for(;r=Op(r,t,Ta,e);)if(n(r))return}function dp(t,e,n,r,o){return e._selectionOverrides.showCaret(t,n,r,o)}function mp(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?null:function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e)}function gp(t,e,n){var r=uc(1,t.getBody(),e),o=hc.fromRangeStart(r),i=o.getNode();if(Tp(i))return dp(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Tp(a))return dp(1,t,a,!1,!1);var u=t.dom.getParent(o.getNode(),(function(t){return Tp(t)||_p(t)}));return Tp(u)?dp(1,t,u,!1,n):null}function hp(t,e,n){return e&&e.collapsed&&gp(t,e,n)||e}function pp(t,e,n){return D.from(n.container()).filter($e.isText).exists((function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))}))}function vp(t){var e=t.container();return $e.isText(e)&&0===e.data.length}function bp(t,e){return function(n){return D.from(oc(t?0:-1,n)).filter(e).isSome()}}function yp(t){return"IMG"===t.nodeName&&"block"===$t(te.fromDom(t),"display")}function xp(t){return $e.isContentEditableFalse(t)&&!$e.isBogusAll(t)}(Bh=Mh=Mh||{})[Bh.Up=-1]="Up",Bh[Bh.Down=1]="Down";var wp,Cp,Sp=i(op,Mh.Up,Ma,Ba),kp=i(op,Mh.Down,Ba,Ma),Ep=$e.isContentEditableFalse,Op=ec,_p=$e.isContentEditableTrue,Tp=$e.isContentEditableFalse,zp=i(pp,!0,ds),Ap=i(pp,!1,ds),Np=bp(!0,yp),Mp=bp(!1,yp),Bp=bp(!0,$e.isTable),Rp=bp(!1,$e.isTable),Dp=bp(!0,xp),Hp=bp(!1,xp);function Ip(t,e){return t===mc.Backwards?E(e):e}function Pp(t,e,n,r){for(var o,i,a,u,c,s=ts(n),l=r,f=[];l&&(u=s,c=l,o=e===mc.Forwards?u.next(c):u.prev(c));){if($e.isBr(o.getNode(!1)))return e===mc.Forwards?{positions:Ip(e,f).concat([o]),breakType:wp.Br,breakAt:D.some(o)}:{positions:Ip(e,f),breakType:wp.Br,breakAt:D.some(o)};if(o.isVisible()){if(t(l,o)){var d=(i=l,$e.isBr((a=o).getNode(e===mc.Forwards))?wp.Br:!1===rc(i,a)?wp.Block:wp.Wrap);return{positions:Ip(e,f),breakType:d,breakAt:D.some(o)}}f.push(o),l=o}else l=o}return{positions:Ip(e,f),breakType:wp.Eol,breakAt:D.none()}}function Lp(t,e,n,r){return e(n,r).breakAt.map((function(r){var o=e(n,r).positions;return t===mc.Backwards?o.concat(r):[r].concat(o)})).getOr([])}function Fp(t,e){return x(t,(function(t,n){return t.fold((function(){return D.some(n)}),(function(r){return Pa(_(r.getClientRects()),_(n.getClientRects()),(function(t,o){var i=Math.abs(e-t.left);return Math.abs(e-o.left)<=i?n:r})).or(t)}))}),D.none())}function Vp(t,e){return _(e.getClientRects()).bind((function(e){return Fp(t,e.left)}))}function Up(t,e,n){var r,o,a=ts(t.getBody()),u=i(fc,a.next),c=i(fc,a.prev);if(n.collapsed&&t.settings.forced_root_block){if(!(r=t.dom.getParent(n.startContainer,"PRE")))return;(1===e?u(hc.fromRangeStart(n)):c(hc.fromRangeStart(n)))||(o=function(t){var e=t.dom.create(Ac(t));return(!Pn.ie||11<=Pn.ie)&&(e.innerHTML='<br data-mce-bogus="1">'),e}(t),1===e?t.$(r).after(o):t.$(r).before(o),t.selection.select(o,!0),t.selection.collapse())}}function jp(t,e){return function(){var n=function(t,e){var n,r=ts(t.getBody()),o=i(fc,r.next),a=i(fc,r.prev),u=e?mc.Forwards:mc.Backwards,c=e?o:a,s=t.selection.getRng();return(n=function(t,e,n,r){var o=t===mc.Forwards,i=o?Dp:Hp;if(!r.collapsed){var a=Db(r);if(Rb(a))return dp(t,e,a,t===mc.Backwards,!0)}var u=function(t){return xa(t.startContainer)}(r),c=sc(t,e.getBody(),r);if(i(c))return mp(e,c.getNode(!o));var s=Xh.normalizePosition(o,n(c));if(!s)return u?r:null;if(i(s))return dp(t,e,s.getNode(!o),o,!0);var l=n(s);return l&&i(l)&&dc(s,l)?dp(t,e,l.getNode(!o),o,!0):u?hp(e,s.toRange(),!0):null}(u,t,c,s))?n:(n=Up(t,u,s))||null}(t,e);return!!n&&(t.selection.setRng(n),!0)}}function Wp(t,e){return function(){var n=function(t,e){var n,r=e?1:-1,o=e?kp:Sp,i=t.selection.getRng();return(n=function(t,e,n,r){var o,i,a,u,c,s,l,f,d;if(d=Db(r),o=sc(t,e.getBody(),r),i=n(e.getBody(),ip(1),o),a=X(i,ap(1)),c=Fn.last(o.getClientRects()),(Dp(o)||Bp(o))&&(d=o.getNode()),(Hp(o)||Rp(o))&&(d=o.getNode(!0)),!c)return null;if((u=lp(a,s=c.left))&&Rb(u.node))return l=Math.abs(s-u.left),f=Math.abs(s-u.right),dp(t,e,u.node,l<f,!0);if(d){var m=function(t,e,n,r){function o(t){return Fn.last(t.getClientRects())}var i,a,u,c,s,l,f=ts(e),d=[],m=0;l=o(c=1===t?(i=f.next,a=Ba,u=Ma,hc.after(r)):(i=f.prev,a=Ma,u=Ba,hc.before(r)));do{if(c.isVisible()&&!u(s=o(c),l)){if(0<d.length&&a(s,Fn.last(d))&&m++,(s=za(s)).position=c,s.line=m,n(s))return d;d.push(s)}}while(c=i(c));return d}(t,e.getBody(),ip(1),d);if(u=lp(X(m,ap(1)),s))return hp(e,u.position.toRange(),!0);if(u=Fn.last(X(m,ap(0))))return hp(e,u.position.toRange(),!0)}}(r,t,o,i))?n:(n=Up(t,r,i))||null}(t,e);return!!n&&(t.selection.setRng(n),!0)}}function qp(t,e){return function(){var n=e?hc.fromRangeEnd(t.selection.getRng()):hc.fromRangeStart(t.selection.getRng()),o=e?Nb(t.getBody(),n):Ab(t.getBody(),n);return(e?T(o.positions):_(o.positions)).filter(function(t){return function(e){return t?Hp(e):Dp(e)}}(e)).fold(r(!1),(function(e){return t.selection.setRng(e.toRange()),!0}))}}function Gp(t,e,n,r,o){var i=aa(te.fromDom(n),"td,th,caption").map((function(t){return t.dom()}));return function(t,e,n){return x(t,(function(t,r){return t.fold((function(){return D.some(r)}),(function(t){var o=Math.sqrt(Math.abs(t.x-e)+Math.abs(t.y-n)),i=Math.sqrt(Math.abs(r.x-e)+Math.abs(r.y-n));return D.some(i<o?r:t)}))}),D.none())}(X(function(t,e){return S(e,(function(e){var n=function(t,e){return{left:t.left- -1,top:t.top- -1,right:t.right+-2,bottom:t.bottom+-2,width:t.width+-1,height:t.height+-1}}(za(e.getBoundingClientRect()));return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]}))}(t,i),(function(t){return e(t,o)})),r,o).map((function(t){return t.cell}))}function $p(t,e){t.selection.setRng(e),Dd(t,e)}function Xp(t,e,n){var r=t(e,n);return function(t){return t.breakType===wp.Wrap&&0===t.positions.length}(r)||!$e.isBr(n.getNode())&&function(t){return t.breakType===wp.Br&&1===t.positions.length}(r)?!function(t,e,n){return n.breakAt.map((function(n){return t(e,n).breakAt.isSome()})).getOr(!1)}(t,e,r):r.breakAt.isNone()}function Kp(t,e,n){var r=function(t,e){var n=e.getNode(t);return $e.isElement(n)&&"TABLE"===n.nodeName?D.some(n):D.none()}(!!e,n),o=!1===e;r.fold((function(){return $p(t,n.toRange())}),(function(r){return Gs.positionIn(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return $p(t,n.toRange())}),(function(o){return function(t,e,n,r){var o=Ac(e);o?e.undoManager.transact((function(){var r=te.fromTag(o);Wt(r,Nc(e)),ze(r,te.fromTag("br")),t?Ot(te.fromDom(n),r):Et(te.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom(),0),i.setEnd(r.dom(),0),$p(e,i)})):$p(e,r.toRange())}(e,t,r,n)}))}))}function Yp(t,e){return function(){return D.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(n){return D.from(t.dom.getParent(n,"table")).map((function(n){return function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Yu()||!function(t,e,n){var r=hc.fromRangeStart(e);return Gs.positionIn(!t,n).map((function(t){return t.isEqual(r)})).getOr(!1)}(e,o,n)||($p(t,dp(i,t,n,!e,!0)),0))}(t,e,n)}))})).getOr(!1)}}function Jp(t,e){return function(){return D.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(n){return D.from(t.dom.getParent(n,"table")).map((function(r){return function(t,e,n,r){var o=t.selection.getRng(),i=hc.fromRangeStart(o),a=t.getBody();if(!e&&Pb(r,i)){var u=function(t,e,n){return function(t,e){return _(e.getClientRects()).bind((function(e){return Hb(t,e.left,e.top)})).bind((function(t){return Vp(function(t){return Gs.lastPositionIn(t).map((function(e){return Ab(t,e).positions.concat(e)})).getOr([])}(t),e)}))}(e,n).orThunk((function(){return _(n.getClientRects()).bind((function(n){return Fp(Mb(t,hc.before(e)),n.left)}))})).getOr(hc.before(e))}(a,n,i);return Kp(t,e,u),!0}return!(!e||!Lb(r,i)||(u=function(t,e,n){return function(t,e){return T(e.getClientRects()).bind((function(e){return Ib(t,e.left,e.top)})).bind((function(t){return Vp(function(t){return Gs.firstPositionIn(t).map((function(e){return[e].concat(Nb(t,e).positions)})).getOr([])}(t),e)}))}(e,n).orThunk((function(){return _(n.getClientRects()).bind((function(n){return Fp(Bb(t,hc.after(e)),n.left)}))})).getOr(hc.after(e))}(a,n,i),Kp(t,e,u),0))}(t,e,r,n)}))})).getOr(!1)}}function Zp(t){return v(["figcaption"],Nt(t))}function Qp(e){var n=t.document.createRange();return n.setStartBefore(e.dom()),n.setEndBefore(e.dom()),n}function tv(t,e,n){n?ze(t,e):_t(t,e)}function ev(t,e){return function(){return!!t.selection.isCollapsed()&&function(t,e){var n=te.fromDom(t.getBody()),r=hc.fromRangeStart(t.selection.getRng()),o=Ac(t),a=Nc(t);return function(t,e){var n=i(mt,e);return fa(te.fromDom(t.container()),Zn,n).filter(Zp)}(r,n).exists((function(){if(function(t,e,n){return e?function(t,e){return Nb(t,e).breakAt.isNone()}(t.dom(),n):function(t,e){return Ab(t,e).breakAt.isNone()}(t.dom(),n)}(n,e,r)){var i=function(t,e,n,r){return""===e?function(t,e){var n=te.fromTag("br");return tv(t,n,e),Qp(n)}(t,r):function(t,e,n,r){var o=te.fromTag(n),i=te.fromTag("br");return Wt(o,r),ze(o,i),tv(t,o,e),Qp(i)}(t,r,e,n)}(n,o,a,e);return t.selection.setRng(i),!0}return!1}))}(t,e)}}function nv(t,e){return{from:r(t),to:r(e)}}function rv(t,e){var n=te.fromDom(t),o=te.fromDom(e.container());return Ub(n,o).map((function(t){return function(t,e){return{block:r(t),position:r(e)}}(t,e)}))}function ov(t){var e=function(t){var e=wt(t);return C(e,Zn).fold((function(){return e}),(function(t){return e.slice(0,t)}))}(t);return $(e,Ae),e}function iv(t,e){return w(Ld(e,t).reverse(),(function(t){return ig(t)})).each(Ae)}function av(t,e,n,r){if(ig(n))return Zm(n),Gs.firstPositionIn(n.dom());(function(t){return 0===X(yt(t),(function(t){return!ig(t)})).length})(r)&&ig(e)&&Et(r,te.fromTag("br"));var o=Gs.prevPosition(n.dom(),hc.before(r.dom()));return $(ov(e),(function(t){Et(r,t)})),iv(t,e),o}function uv(t,e,n){if(ig(n))return Ae(n),ig(e)&&Zm(e),Gs.firstPositionIn(e.dom());var r=Gs.lastPositionIn(n.dom());return $(ov(e),(function(t){ze(n,t)})),iv(t,e),r}function cv(t,e){Gs.positionIn(t,e.dom()).map((function(t){return t.getNode()})).map(te.fromDom).filter(Gn).each(Ae)}function sv(t,e,n){return cv(!0,e),cv(!1,n),function(t,e){return Te(e,t)?function(t,e){var n=Ld(e,t);return D.from(n[n.length-1])}(e,t):D.none()}(e,n).fold(i(uv,t,e,n),i(av,t,e,n))}function lv(t,e){var n=te.fromDom(e),r=i(mt,t);return la(n,or,r).isSome()}function fv(t){return lc(t).exists(Gn)}function dv(t,e,n){var r=_(X(Ld(te.fromDom(n.container()),e),Zn)).getOr(e);return Gs.fromPosition(t,r.dom(),n).filter(fv)}function mv(t,e){return lc(e).exists(Gn)||dv(!0,t,e).isSome()}function gv(t,e){return function(t){return D.from(t.getNode(!0)).map(te.fromDom)}(e).exists(Gn)||dv(!1,t,e).isSome()}function hv(t,e,n){return Gs.fromPosition(e,t,n).bind((function(o){return function(t){return or(te.fromDom(t))||er(te.fromDom(t))}(o.getNode())||function(t,e,n,o){function i(e){return qn(te.fromDom(e))&&!rc(n,o,t)}return cc(!e,n).fold((function(){return cc(e,o).fold(r(!1),i)}),i)}(t,e,n,o)?D.none():e&&$e.isContentEditableFalse(o.getNode())||!1===e&&$e.isContentEditableFalse(o.getNode(!0))?function(t,e,n,r){var o=r.getNode(!1===e);return Ub(te.fromDom(t),te.fromDom(n.getNode())).map((function(t){return ig(t)?Kb.remove(t.dom()):Kb.moveToElement(o)})).orThunk((function(){return D.some(Kb.moveToElement(o))}))}(t,e,n,o):e&&Hp(n)||!1===e&&Dp(n)?D.some(Kb.moveToPosition(o)):D.none()}))}function pv(t,e){return D.from(Yb(t.getBody(),e))}function vv(t,e,n,r,o,i){var a=dp(r,t,i.getNode(!o),o,!0);if(e.collapsed){var u=e.cloneRange();o?u.setEnd(a.startContainer,a.startOffset):u.setStart(a.endContainer,a.endOffset),u.deleteContents()}else e.deleteContents();return t.selection.setRng(a),function(t,e){$e.isText(e)&&0===e.data.length&&t.remove(e)}(t.dom,n),!0}function bv(t,e){return function(n){return Gh(e,n).map((function(e){return rp.setCaretPosition(t,e),!0})).getOr(!1)}}function yv(e,n,r,o){var a=e.getBody(),u=i(Xh.isInlineTarget,e);e.undoManager.ignore((function(){e.selection.setRng(function(e,n){var r=t.document.createRange();return r.setStart(e.container(),e.offset()),r.setEnd(n.container(),n.offset()),r}(r,o)),e.execCommand("Delete"),Zh(u,a,hc.fromRangeStart(e.selection.getRng())).map(ep).map(bv(e,n))})),e.nodeChanged()}function xv(t){return 1===wt(t).length}function wv(t,e){return{start:r(t),end:r(e)}}function Cv(t,e){return ga(te.fromDom(t),"td,th",e)}function Sv(t,e){return da(t,"table",e)}function kv(t){return!1===mt(t.start(),t.end())}function Ev(t,e){return Sv(t.start(),e).bind((function(n){return Sv(t.end(),e).bind((function(t){return function(t,e){return t?D.some(e):D.none()}(mt(n,t),n)}))}))}function Ov(t){return aa(t,"td,th")}function _v(t,e){return C(t,(function(t){return mt(t,e)}))}function Tv(t){return function(t){return Pa(_v(t.cells(),t.rng().start()),_v(t.cells(),t.rng().end()),(function(e,n){return t.cells().slice(e,n+1)}))}(t).map((function(e){var n=t.cells();return e.length===n.length?ny.removeTable(t.table()):ny.emptyCells(e)}))}function zv(t,e){return $(e,Zm),t.selection.setCursorLocation(e[0].dom(),0),!0}function Av(t,e){return ag(t,!1,e),!0}function Nv(t,e){return w(Ld(e,t),or)}function Mv(t,e){return t?Bp(e):Rp(e)}function Bv(t){var e=parseInt(t,10);return isNaN(e)?0:e}function Rv(t,e){return(t||function(t){return"table"===Nt(t)}(e)?"margin":"padding")+("rtl"===$t(e,"direction")?"-right":"-left")}function Dv(t){var e=cy(t);return!0!==t.readonly&&(1<e.length||function(t,e){return k(e,(function(e){var n=Xt(e,Rv(Vc(t),e)).map(Bv).getOr(0);return"false"!==t.dom.getContentEditable(e.dom())&&0<n}))}(t,e))}function Hv(t){return tr(t)||er(t)}function Iv(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=function(t){return t.getParam("indentation","40px","string")}(t),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=Vc(t),s=Ac(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),$(cy(t),(function(t){!function(t,e,n,r,o,i){var a=Rv(n,te.fromDom(i));if("outdent"===e){var u=Math.max(0,Bv(i.style[a])-r);t.setStyle(i,a,u?u+o:"")}else u=Bv(i.style[a])+r+o,t.setStyle(i,a,u)}(n,e,c,u,a,t.dom())}))}function Pv(t,e,n){return Gs.navigateIgnore(t,e,n,vp)}function Lv(t,e){return w(Ld(te.fromDom(e.container()),t),Zn)}function Fv(t,e,n){return Pv(t,e.dom(),n).forall((function(t){return Lv(e,n).fold((function(){return!1===rc(t,n,e.dom())}),(function(r){return!1===rc(t,n,e.dom())&&Te(r,te.fromDom(t.container()))}))}))}function Vv(t,e,n){return Lv(e,n).fold((function(){return Pv(t,e.dom(),n).forall((function(t){return!1===rc(t,n,e.dom())}))}),(function(e){return Pv(t,e.dom(),n).isNone()}))}function Uv(t){return D.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))}function jv(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e}function Wv(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)}function qv(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t}function Gv(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!$e.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===e}function $v(t){t.innerHTML='<br data-mce-bogus="1">'}function Xv(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e}function Kv(t,e){return e&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==t.getContentEditable(e)}function Yv(t,e,n){return!1===$e.isText(e)?n:t?1===n&&e.data.charAt(n-1)===Ya.ZWSP?0:n:n===e.data.length-1&&e.data.charAt(n)===Ya.ZWSP?e.data.length:n}function Jv(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}function Zv(t,e){var n=Ac(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&t.dom.setAttribs(e,Nc(t))}function Qv(t,e,n){var r=t.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),e.scrollIntoView(r),t.remove(r)}function tb(t,e,n,r){var o=t.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),e.setRng(o)}function eb(t,e){var n=te.fromTag("br");Et(te.fromDom(e),n),t.undoManager.add()}function nb(t,e){yy(t.getBody(),e)||Ot(te.fromDom(e),te.fromTag("br"));var n=te.fromTag("br");Ot(te.fromDom(e),n),Qv(t.dom,t.selection,n.dom()),tb(t.dom,t.selection,n.dom(),!1),t.undoManager.add()}function rb(t){return t&&"A"===t.nodeName&&"href"in t}function ob(t){return t.fold(r(!1),rb,rb,r(!1))}function ib(t,n){n.fold(e,i(eb,t),i(nb,t),e)}function ab(t,e){return py(t).filter((function(t){return 0<e.length&&ft(te.fromDom(t),e)})).isSome()}function ub(t,e){return Cy(t)}function cb(t){return function(e,n){return""===Ac(e)===t}}function sb(t){return function(e,n){return by(e)===t}}function lb(t,e){return function(n,r){return vy(n)===t.toUpperCase()===e}}function fb(t){return lb("pre",t)}function db(t){return function(e,n){return function(t){return t.getParam("br_in_pre",!0)}(e)===t}}function mb(t,e){return wy(t)}function gb(t,e){return e}function hb(t){var e=Ac(t),n=hy(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")}function pb(t,e){return function(n,r){return x(t,(function(t,e){return t&&e(n,r)}),!0)?D.some(e):D.none()}}function vb(t,e){var n=e.container(),r=e.offset();return $e.isText(n)?(n.insertData(r,t),D.some(Eu(n,r+t.length))):lc(e).map((function(n){var r=te.fromText(t);return e.isAtEnd()?Ot(n,r):Et(n,r),Eu(r.dom(),t.length)}))}function bb(t){return Eu.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()}function yb(t,e){return _(X(Ld(te.fromDom(e.container()),t),Zn)).getOr(t)}function xb(t,e){return bb(e)?Ap(e):Ap(e)||Gs.prevPosition(yb(t,e).dom(),e).exists(Ap)}function wb(t,e){return bb(e)?zp(e):zp(e)||Gs.nextPosition(yb(t,e).dom(),e).exists(zp)}function Cb(t){return lc(t).bind((function(t){return fa(t,Ne)})).exists((function(t){return function(t){return v(["pre","pre-wrap"],t)}($t(t,"white-space"))}))}function Sb(t,e){return function(t,e){return!Cb(e)&&(sy(t,e)||fy(t,e)||gv(t,e)||xb(t,e))}(t,e)||function(t,e){var n=function(t){var e=t.container(),n=t.offset();return $e.isText(e)&&n<e.data.length?Eu(e,n+1):t}(e);return!Cb(n)&&(ly(t,n)||dy(t,n)||mv(t,n)||wb(t,n))}(t,e)}function kb(t,e){return Ys(t.charAt(e))}function Eb(t){var e=t.container();return $e.isText(e)&&ot(e.data,Rr)}function Ob(t){var e=te.fromDom(t.getBody());t.selection.isCollapsed()&&function(t,e){return D.some(e).filter(Eb).bind((function(e){var n=e.container();return function(t,e){var n=e.data,r=Eu(e,0);return!(!kb(n,0)||Sb(t,r)||(e.data=" "+n.slice(1),0))}(t,n)||function(t){var e=t.data,n=function(t){var e=t.split("");return G(e,(function(t,n){return Ys(t)&&0<n&&n<e.length-1&&ms(e[n-1])&&ms(e[n+1])?" ":t})).join("")}(e);return n!==e&&(t.data=n,!0)}(n)||function(t,e){var n=e.data,r=Eu(e,n.length-1);return!(!kb(n,n.length-1)||Sb(t,r)||(e.data=n.slice(0,-1)+" ",0))}(t,n)?D.some(e):D.none()}))}(e,Eu.fromRangeStart(t.selection.getRng())).each((function(e){t.selection.setRng(e.toRange())}))}function _b(t){var e=hc.fromRangeStart(t.selection.getRng()),n=te.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=i(Xh.isInlineTarget,t),o=hc.fromRangeStart(t.selection.getRng());return Zh(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return Gs.prevPosition(t.dom(),hc.before(e))}),(function(t){return Gs.firstPositionIn(t)}),(function(t){return Gs.lastPositionIn(t)}),(function(e){return Gs.nextPosition(t.dom(),hc.after(e))}))}}(n)).bind(function(t,e){return function(n){return function(t,e){return!Cb(e)&&(function(t,e){return function(t,e){return Gs.prevPosition(t.dom(),e).isNone()}(t,e)||function(t,e){return Gs.nextPosition(t.dom(),e).isNone()}(t,e)||sy(t,e)||ly(t,e)||gv(t,e)||mv(t,e)}(t,e)||xb(t,e)||wb(t,e))}(t,n)?Ey(e):Oy(e)}}(n,e)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(t))}return!1}function Tb(t,e){e.hasAttribute("data-mce-caret")&&(Oa(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))}function zb(t,e){var n=function(t){return ma(te.fromDom(t.getBody()),"*[data-mce-caret]").fold(r(null),(function(t){return t.dom()}))}(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void Tb(t,n)):void(Sa(n)&&(Tb(t,n),t.undoManager.add()))}(Cp=wp=wp||{})[Cp.Br=0]="Br",Cp[Cp.Block=1]="Block",Cp[Cp.Wrap=2]="Wrap",Cp[Cp.Eol=3]="Eol";var Ab=i(Pp,Eu.isAbove,-1),Nb=i(Pp,Eu.isBelow,1),Mb=i(Lp,-1,Ab),Bb=i(Lp,1,Nb),Rb=$e.isContentEditableFalse,Db=Da,Hb=i(Gp,(function(t){return t.bottom}),(function(t,e){return t.y<e})),Ib=i(Gp,(function(t){return t.top}),(function(t,e){return t.y>e})),Pb=i(Xp,Ab),Lb=i(Xp,Nb),Fb=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,r)}},Vb=function(t,n){return w(function(t,n){return S(function(t){return G(t,(function(t){return tt({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:e},t)}))}(t),(function(t){return function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey}(t,n)?[t]:[]}))}(t,n),(function(t){return t.action()}))},Ub=function(t,e){return Te(t,e)?fa(e,(function(t){return Qn(t)||er(t)}),function(t){return function(e){return mt(t,te.fromDom(e.dom().parentNode))}}(t)):D.none()},jb=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)}(t))},Wb=function(t,e,n,r){return e?sv(t,r,n):sv(t,n,r)},qb=function(t,e){var n=te.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?function(t,e,n){var r=rv(t,hc.fromRangeStart(n)),o=r.bind((function(n){return Gs.fromPosition(e,t,n.position()).bind((function(n){return rv(t,n).map((function(n){return function(t,e,n){return $e.isBr(n.position().getNode())&&!1===ig(n.block())?Gs.positionIn(!1,n.block().dom()).bind((function(r){return r.isEqual(n.position())?Gs.fromPosition(e,t,r).bind((function(e){return rv(t,e)})):D.some(n)})).getOr(n):n}(t,e,n)}))}))}));return Pa(r,o,nv).filter((function(t){return function(t){return!1===mt(t.from().block(),t.to().block())}(t)&&function(t){return pt(t.from().block()).bind((function(e){return pt(t.to().block()).filter((function(t){return mt(e,t)}))})).isSome()}(t)&&function(t){return!1===$e.isContentEditableFalse(t.from().block().dom())&&!1===$e.isContentEditableFalse(t.to().block().dom())}(t)}))}(t,e,n):D.none()}(n.dom(),e,t.selection.getRng()).bind((function(t){return Wb(n,e,t.from().block(),t.to().block())}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},Gb=function(t,e){return!t.selection.isCollapsed()&&function(t){var e=te.fromDom(t.getBody());return function(t,e){var n=Gs.prevPosition(t.dom(),hc.fromRangeStart(e)).isNone(),r=Gs.nextPosition(t.dom(),hc.fromRangeEnd(e)).isNone();return!function(t,e){return lv(t,e.startContainer)||lv(t,e.endContainer)}(t,e)&&n&&r}(e,t.selection.getRng())?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Pa(Ub(t,te.fromDom(n.startContainer)),Ub(t,te.fromDom(n.endContainer)),(function(r,o){return!1===mt(r,o)&&(n.deleteContents(),Wb(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)}(t)},$b=i(dv,!1),Xb=i(dv,!0),Kb=Zl([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Yb=function(t,e){for(;e&&e!==t;){if($e.isContentEditableTrue(e)||$e.isContentEditableFalse(e))return e;e=e.parentNode}return null},Jb=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=t.selection.getNode();return pv(t,n).filter($e.isContentEditableFalse).fold((function(){return function(t,e,n){var r=uc(e?1:-1,t,n),o=hc.fromRangeStart(r),i=te.fromDom(t);return!1===e&&Hp(o)?D.some(Kb.remove(o.getNode(!0))):e&&Dp(o)?D.some(Kb.remove(o.getNode())):!1===e&&Dp(o)&&gv(i,o)?$b(i,o).map((function(t){return Kb.remove(t.getNode())})):e&&Hp(o)&&mv(i,o)?Xb(i,o).map((function(t){return Kb.remove(t.getNode())})):function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return $e.isElement(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&$e.isContentEditableFalse(e.nextSibling)?D.some(Kb.moveToElement(e.nextSibling)):!1===t&&$e.isContentEditableFalse(e.previousSibling)?D.some(Kb.moveToElement(e.previousSibling)):D.none()}(e,n.getNode(!1===e)).fold((function(){return hv(t,e,n)}),D.some):hv(t,e,n).bind((function(e){return function(t,e,n){return n.fold((function(t){return D.some(Kb.remove(t))}),(function(t){return D.some(Kb.moveToElement(t))}),(function(n){return rc(e,n,t)?D.none():D.some(Kb.moveToPosition(n))}))}(t,n,e)}))}(t,e,o)}(t.getBody(),e,t.selection.getRng()).map((function(n){return n.fold(function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),ag(t,e,te.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?hc.before(n):hc.after(n);return t.selection.setRng(r.toRange()),!0}}(t,e),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))})).getOr(!1)}),(function(){return!0}))}(t,e):function(t,e){var n=t.selection.getNode();return!!$e.isContentEditableFalse(n)&&pv(t,n.parentNode).filter($e.isContentEditableFalse).fold((function(){return function(t){$(aa(t,".mce-offscreen-selection"),Ae)}(te.fromDom(t.getBody())),ag(t,e,te.fromDom(t.selection.getNode())),jb(t),!0}),(function(){return!0}))}(t,e)},Zb=function(t){var e,n=Yb(t.getBody(),t.selection.getNode());return $e.isContentEditableTrue(n)&&t.dom.isBlock(n)&&t.dom.isEmpty(n)&&(e=t.dom.create("br",{"data-mce-bogus":"1"}),t.dom.setHTML(n,""),n.appendChild(e),t.selection.setRng(hc.before(e).toRange())),!0},Qb=function(t,e){return function(t,e){var n=t.selection.getRng();if(!$e.isText(n.commonAncestorContainer))return!1;var r=e?mc.Forwards:mc.Backwards,o=ts(t.getBody()),a=i(fc,o.next),u=i(fc,o.prev),c=e?a:u,s=e?Dp:Hp,l=sc(r,t.getBody(),n),f=Xh.normalizePosition(e,c(l));if(!f||!dc(l,f))return!1;if(s(f))return vv(t,n,l.getNode(),r,e,f);var d=c(f);return!!(d&&s(d)&&dc(f,d))&&vv(t,n,l.getNode(),r,e,d)}(t,e)},ty=function(t,e,n){if(t.selection.isCollapsed()&&function(t){return!1!==t.settings.inline_boundaries}(t)){var o=hc.fromRangeStart(t.selection.getRng());return function(t,e,n,o){var a=function(t,e){return nc(e,t)||t}(t.getBody(),o.container()),u=i(Xh.isInlineTarget,t),c=Zh(u,a,o);return c.bind((function(t){return n?t.fold(r(D.some(ep(t))),D.none,r(D.some(tp(t))),D.none):t.fold(D.none,r(D.some(tp(t))),D.none,r(D.some(ep(t))))})).map(bv(t,e)).getOrThunk((function(){var r=Gs.navigate(n,a,o),i=r.bind((function(t){return Zh(u,a,t)}));return c.isSome()&&i.isSome()?Xh.findRootInline(u,a,o).map((function(e){return!!function(t){return Pa(Gs.firstPositionIn(t),Gs.lastPositionIn(t),(function(e,n){var r=Xh.normalizePosition(!0,e),o=Xh.normalizePosition(!1,n);return Gs.nextPosition(t,r).map((function(t){return t.isEqual(o)})).getOr(!0)})).getOr(!0)}(e)&&(ag(t,n,te.fromDom(e)),!0)})).getOr(!1):i.bind((function(i){return r.map((function(r){return n?yv(t,e,o,r):yv(t,e,r,o),!0}))})).getOr(!1)}))}(t,e,n,o)}return!1},ey=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=te.fromDom(t.getBody()),o=te.fromDom(t.selection.getStart()),a=X(function(t,e){var n=Ld(e,t);return C(n,Zn).fold(r(n),(function(t){return n.slice(0,t)}))}(n,o),xv);return T(a).map((function(n){var r=hc.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Pa(Gs.firstPositionIn(n),Gs.lastPositionIn(n),(function(r,o){var i=Xh.normalizePosition(!0,r),a=Xh.normalizePosition(!1,o),u=Xh.normalizePosition(!1,e);return t?Gs.nextPosition(n,u).map((function(t){return t.isEqual(a)&&e.isEqual(i)})).getOr(!1):Gs.prevPosition(n,u).map((function(t){return t.isEqual(i)&&e.isEqual(a)})).getOr(!1)})).getOr(!0)}(e,r,n.dom())||function(t){return Uu(t.dom())&&Lm(t.dom())}(n)||(function(t,e,n,r){var o=i($m,e),a=G(X(r,o),(function(t){return t.dom()}));if(0===a.length)ag(e,t,n);else{var u=function(t,e){var n=Vm(!1),r=Gm(e,n.dom());return Et(te.fromDom(t),n),Ae(te.fromDom(t)),hc(r,0)}(n.dom(),a);e.selection.setRng(u.toRange())}}(e,t,n,a),0))})).getOr(!1)}(t,e)},ny=Zl([{removeTable:["element"]},{emptyCells:["cells"]}]),ry=function(t,e){return Ev(e,t).isSome()},oy=function(t,e){return w(Ld(e,t),(function(t){return"caption"===Nt(t)}))},iy=function(t,e){return Zm(e),t.selection.setCursorLocation(e.dom(),0),D.some(!0)},ay=function(t,e){var n=te.fromDom(t.selection.getStart(!0)),o=Kd(t);return t.selection.isCollapsed()&&0===o.length?function(t,e,n){var r=te.fromDom(t.getBody());return oy(r,n).fold((function(){return function(t,e,n,r){var o=hc.fromRangeStart(t.selection.getRng());return Nv(n,r).bind((function(r){return ig(r)?iy(t,r):function(t,e,n,r,o){return Gs.navigate(n,t.getBody(),o).bind((function(t){return Nv(e,te.fromDom(t.getNode())).map((function(t){return!1===mt(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)}(t,e,r,n)||function(t,e){var n=hc.fromRangeStart(t.selection.getRng());return Mv(e,n)||Gs.fromPosition(e,t.getBody(),n).map((function(t){return Mv(e,t)})).getOr(!1)}(t,e)}),(function(n){return function(t,e,n,r){var o=hc.fromRangeStart(t.selection.getRng());return ig(r)?iy(t,r):function(t,e,n,r,o){return Gs.navigate(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Gs.firstPositionIn(t.dom()).bind((function(o){return Gs.lastPositionIn(t.dom()).map((function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)}))})).getOr(!0)}(r,n,o,i)?function(t,e){return iy(t,e)}(t,r):function(t,e,n){return oy(t,te.fromDom(n.getNode())).map((function(t){return!1===mt(t,e)}))}(e,r,i)})).or(D.some(!0))}(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))}(t,e,n):function(t,e){var n=te.fromDom(t.getBody()),o=t.selection.getRng(),a=Kd(t);return 0!==a.length?zv(t,a):function(t,e,n,o){return oy(e,o).fold((function(){return function(t,e,n){return function(t,e){return function(t,e){var n=function(t){return function(e){return mt(t,e)}}(t);return function(t,e){return Pa(Cv(t.startContainer,e),Cv(t.endContainer,e),wv).filter(kv).filter((function(t){return ry(e,t)})).orThunk((function(){return function(t,e){var n=Cv(e.startContainer,t),r=Cv(e.endContainer,t);return e.collapsed?D.none():Pa(n,r,wv).fold((function(){return n.fold((function(){return r.bind((function(e){return Sv(e,t).bind((function(t){return _(Ov(t)).map((function(t){return wv(t,e)}))}))}))}),(function(e){return Sv(e,t).bind((function(t){return T(Ov(t)).map((function(t){return wv(e,t)}))}))}))}),(function(e){return ry(t,e)?D.none():function(t,e){return Sv(t.start(),e).bind((function(e){return T(Ov(e)).map((function(e){return wv(t.start(),e)}))}))}(e,t)}))}(e,t)}))}(e,n).bind((function(t){return function(t,e){return Ev(t,e).map((function(e){return function(t,e,n){return{rng:r(t),table:r(e),cells:r(n)}}(t,e,Ov(e))}))}(t,n)}))}(t,e).bind(Tv)}(e,n).map((function(e){return e.fold(i(Av,t),i(zv,t))}))}(t,e,n)}),(function(e){return function(t,e){return iy(t,e)}(t,e)})).getOr(!1)}(t,n,o,e)}(t,n)},uy=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=hc.fromRangeStart(t.selection.getRng());return Gs.fromPosition(e,t.getBody(),n).filter((function(t){return e?Np(t):Mp(t)})).bind((function(t){return D.from(oc(e?0:-1,t))})).map((function(e){return t.selection.select(e),!0})).getOr(!1)}(t,e)},cy=function(t){return X(G(t.selection.getSelectedBlocks(),te.fromDom),(function(t){return!Hv(t)&&!function(t){return pt(t).map(Hv).getOr(!1)}(t)&&function(t){return fa(t,(function(t){return $e.isContentEditableTrue(t.dom())||$e.isContentEditableFalse(t.dom())})).exists((function(t){return $e.isContentEditableTrue(t.dom())}))}(t)}))},sy=i(Vv,!1),ly=i(Vv,!0),fy=i(Fv,!1),dy=i(Fv,!0),my=function(t,e,n){if(t.selection.isCollapsed()&&Dv(t)){var r=t.dom,o=t.selection.getRng(),i=hc.fromRangeStart(o),a=r.getParent(o.startContainer,r.isBlock);if(null!==a&&sy(te.fromDom(a),i))return Iv(t,"outdent"),!0}return!1},gy=function(t,e){var n,r,o=e,i=t.dom,a=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var u=function(t){for(;t;){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}}(e.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&e.insertBefore(i.doc.createTextNode(Rr),e.firstChild)}if(r=i.createRng(),e.normalize(),e.hasChildNodes()){for(var c=new Ni(e,e);n=c.current();){if($e.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=c.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else $e.isBr(e)?e.nextSibling&&i.isBlock(e.nextSibling)?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)):(r.setStart(e,0),r.setEnd(e,0));t.selection.setRng(r),Dd(t,r)}},hy=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},py=Uv,vy=function(t){return Uv(t).fold(r(""),(function(t){return t.nodeName.toUpperCase()}))},by=function(t){return Uv(t).filter((function(t){return er(te.fromDom(t))})).isSome()},yy=function(t,e){return!!function(t){return $e.isBr(t.getNode())}(hc.after(e))||Gs.nextPosition(t,hc.after(e)).map((function(t){return $e.isBr(t.getNode())})).getOr(!1)},xy=function(t,e){var n=function(t){var e=i(Xh.isInlineTarget,t),n=hc.fromRangeStart(t.selection.getRng());return Zh(e,t.getBody(),n).filter(ob)}(t);n.isSome()?n.each(i(ib,t)):function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();Zd(i,a).each((function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)}));var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null;"LI"!==(f?f.nodeName.toUpperCase():"")||!(!e||!e.ctrlKey)||(l=f),c&&3===c.nodeType&&u>=c.nodeValue.length&&!function(t,e,n){for(var r,o=new Ni(e,n),i=t.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(t.schema,c,l)&&(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0),n=i.create("br"),Nu(i,a,n),Qv(i,o,n),tb(i,o,n,r),t.undoManager.add()}(t,e)},wy=function(t){return ab(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))},Cy=function(t){return ab(t,function(t){return t.getParam("no_newline_selector","")}(t))},Sy=Zl([{br:[]},{block:[]},{none:[]}]),ky=function(t,n){(function(t,e){return Kh([pb([ub],Sy.none()),pb([lb("summary",!0)],Sy.br()),pb([fb(!0),db(!1),gb],Sy.br()),pb([fb(!0),db(!1)],Sy.block()),pb([fb(!0),db(!0),gb],Sy.block()),pb([fb(!0),db(!0)],Sy.br()),pb([sb(!0),gb],Sy.br()),pb([sb(!0)],Sy.block()),pb([cb(!0),gb,hb],Sy.block()),pb([cb(!0)],Sy.br()),pb([mb],Sy.br()),pb([cb(!1),gb],Sy.br()),pb([hb],Sy.block())],[t,!(!e||!e.shiftKey)]).getOr(Sy.none())})(t,n).fold((function(){xy(t,n)}),(function(){!function(t,e){function n(e){var n,r,o,i=u,c=y.getTextInlineElements();if(e||"TABLE"===g||"HR"===g?(n=b.create(e||p),Zv(t,n)):n=s.cloneNode(!1),o=n,!1===function(t){return t.getParam("keep_styles",!0)}(t))b.setAttrib(n,"style",null),b.setAttrib(n,"class",null);else do{if(c[i.nodeName]){if(Uu(i)||Ks(i))continue;r=i.cloneNode(!1),b.setAttrib(r,"id",""),n.hasChildNodes()?r.appendChild(n.firstChild):o=r,n.appendChild(r)}}while((i=i.parentNode)&&i!==a);return $v(o),n}function r(t){var e,n,r=Yv(t,u,c);if($e.isText(u)&&(t?0<r:r<u.nodeValue.length))return!1;if(u.parentNode===s&&v&&!t)return!0;if(t&&$e.isElement(u)&&u===s.firstChild)return!0;if(Xv(u,"TABLE")||Xv(u,"HR"))return v&&!t||!v&&t;var o=new Ni(u,s);for($e.isText(u)&&(t&&0===r?o.prev():t||r!==u.nodeValue.length||o.next());e=o.current();){if($e.isElement(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),x[n]&&"br"!==n))return!1}else if($e.isText(e)&&!/^[ \t\r\n]*$/.test(e.nodeValue))return!1;t?o.prev():o.next()}return!0}function o(){f=/^(H[1-6]|PRE|FIGURE)$/.test(g)&&"HGROUP"!==h?n(p):n(),function(t){return t.getParam("end_container_on_empty_block",!1)}(t)&&Kv(b,m)&&b.isEmpty(s)?f=b.split(m,s):b.insertAfter(f,s),gy(t,f)}var i,a,u,c,s,l,f,d,m,g,h,p,v,b=t.dom,y=t.schema,x=y.getNonEmptyElements(),w=t.selection.getRng();Zd(b,w).each((function(t){w.setStart(t.startContainer,t.startOffset),w.setEnd(t.endContainer,t.endOffset)})),u=w.startContainer,c=w.startOffset,p=Ac(t),l=!(!e||!e.shiftKey);var C=!(!e||!e.ctrlKey);$e.isElement(u)&&u.hasChildNodes()&&(v=c>u.childNodes.length-1,u=u.childNodes[Math.min(c,u.childNodes.length-1)]||u,c=v&&$e.isText(u)?u.nodeValue.length:0),(a=Jv(b,u))&&((p&&!l||!p&&l)&&(u=function(t,e,n,r,o){var i,a,u,c,s,l,f=e||"P",d=t.dom,m=Jv(d,r);if(!(a=d.getParent(r,d.isBlock))||!Kv(d,a)){if(l=(a=a||m)===t.getBody()||function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return Zv(t,i=d.create(f)),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(c=r;c.parentNode!==a;)c=c.parentNode;for(;c&&!d.isBlock(c);)c=(u=c).previousSibling;if(u&&t.schema.isValidChild(l,f.toLowerCase())){for(Zv(t,i=d.create(f)),u.parentNode.insertBefore(i,u),c=u;c&&!d.isBlock(c);)s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r}(t,p,w,u,c)),s=b.getParent(u,b.isBlock),m=s?b.getParent(s.parentNode,b.isBlock):null,g=s?s.nodeName.toUpperCase():"","LI"!==(h=m?m.nodeName.toUpperCase():"")||C||(m=(s=m).parentNode,g=h),/^(LI|DT|DD)$/.test(g)&&b.isEmpty(s)?function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){!function(t){return Wv(t)&&Wv(t.parentNode)}(n)||(o="LI");var u=o?e(o):i.create("BR");if(Gv(n,r,!0)&&Gv(n,r,!1))jv(n,"LI")?i.insertAfter(u,qv(n)):i.replace(u,n);else if(Gv(n,r,!0))jv(n,"LI")?(i.insertAfter(u,qv(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n);else if(Gv(n,r,!1))i.insertAfter(u,qv(n));else{n=qv(n);var c=a.cloneRange();c.setStartAfter(r),c.setEndAfter(n);var s=c.extractContents();"LI"===o&&function(t,e){return t.firstChild&&"LI"===t.firstChild.nodeName}(s)?(u=s.firstChild,i.insertAfter(s,n)):(i.insertAfter(s,n),i.insertAfter(u,n))}i.remove(r),gy(t,u)}}(t,n,m,s,p):p&&s===t.getBody()||(p=p||"P",xa(s)?(f=Oa(s),b.isEmpty(s)&&$v(s),gy(t,f)):r()?o():r(!0)?(f=s.parentNode.insertBefore(n(),s),gy(t,Xv(s,"HR")?f:s)):((i=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,Yv(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,Yv(!1,t.endContainer,t.endOffset)),e}(w).cloneRange()).setEndAfter(s),function(t){$(ca(te.fromDom(t),Me),(function(t){var e=t.dom();e.nodeValue=Ya.trim(e.nodeValue)}))}(d=i.extractContents()),function(t){for(;$e.isText(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild;);}(d),f=d.firstChild,b.insertAfter(d,s),function(t,e,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;$e.isElement(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)(!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||(a=o)&&"A"===a.nodeName&&t.isEmpty(a))&&t.remove(o);var a}}(b,x,f),function(t,e){var n;e.normalize(),(n=e.lastChild)&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")}(b,s),b.isEmpty(s)&&$v(s),f.normalize(),b.isEmpty(f)?(b.remove(f),o()):gy(t,f)),b.setAttrib(f,"id",""),t.fire("NewBlock",{newBlock:f})))}(t,n)}),e)},Ey=i(vb,Rr),Oy=i(vb," "),_y=st().browser,Ty=(zy.prototype.nodeChanged=function(t){var e,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(r=this.editor.getBody(),(e=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(e,r)||(e=r),n=[],this.editor.dom.getParent(e,(function(t){if(t===r)return!0;n.push(t)})),(t=t||{}).element=e,t.parents=n,this.editor.fire("NodeChange",t))},zy.prototype.isSameElementPath=function(t){var e,n;if((n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t)).length===this.lastPath.length){for(e=n.length;0<=e&&n[e]===this.lastPath[e];e--);if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},zy);function zy(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r,o;o={startContainer:(r=t.selection.getRng()).startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset},"nodechange"!==n.type&&Jd(o,e)||t.fire("SelectionChange"),e=o})),t.on("contextmenu",(function(){t.fire("SelectionChange")})),t.on("SelectionChange",(function(){var e=t.selection.getStart(!0);!e||!Pn.range&&t.selection.isCollapsed()||sd(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&sd(t)&&("IMG"===t.selection.getNode().nodeName?zn.setEditorTimeout(t,(function(){t.nodeChanged()})):t.nodeChanged())}))}function Ay(t){return $e.isElement(t)&&Qn(te.fromDom(t))}function Ny(t){var e,n,r,o;return o=t.getBoundingClientRect(),n=(e=t.ownerDocument).documentElement,{top:o.top+(r=e.defaultView).pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}}function My(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function By(t,e){for(var n=t.getBody();e&&e!==n;){if(Qy(e)||tx(e))return e;e=e.parentNode}return null}function Ry(e){function n(t){t&&e.selection.setRng(t)}function r(){return e.selection.getRng()}function o(t,n,r,o){return void 0===o&&(o=!0),e.fire("ShowCaret",{target:n,direction:t,before:r}).isDefaultPrevented()?null:(o&&e.selection.scrollIntoView(n,-1===t),s.show(r,n))}function a(t){return Ca(t)||Qa(t)||tu(t)}var u,c=e.getBody(),s=function(n,r,o,i){var a,u,c=ee(D.none()),s=Ac(n),l=0<s.length?s:"p",f=function(){!function(t){var e,n,r,o,i;for(e=Ai("*[contentEditable=false]",t),o=0;o<e.length;o++)r=(n=e[o]).previousSibling,tu(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),Qa(r=n.nextSibling)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(r),u&&(_c.remove(u),u=null),c.get().each((function(t){Ai(t.caret).remove(),c.set(D.none())})),zn.clearInterval(a)},d=function(){a=zn.setInterval((function(){df(e)?Ai("div.mce-visual-caret",r).toggleClass("mce-visual-caret-hidden"):Ai("div.mce-visual-caret",r).addClass("mce-visual-caret-hidden")}),500)};return{show:function(n,o){var i,a;if(f(),function(t){return $e.isElement(t)&&/^(TD|TH)$/i.test(t.tagName)}(o))return null;if(!function(t){return e.dom.isBlock(t)}(o))return u=function(t,e){var n,r,o;if(r=t.ownerDocument.createTextNode(Ya.ZWSP),o=t.parentNode,e){if(Za(n=t.previousSibling)){if(Ca(n))return n;if(tu(n))return n.splitText(n.data.length-1)}o.insertBefore(r,t)}else{if(Za(n=t.nextSibling)){if(Ca(n))return n;if(Qa(n))return n.splitText(1),n}t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r)}return r}(o,n),a=o.ownerDocument.createRange(),jc(u.nextSibling)?(a.setStart(u,0),a.setEnd(u,0)):(a.setStart(u,1),a.setEnd(u,1)),a;u=function(e,n,r){var o,i;return(o=n.ownerDocument.createElement(e)).setAttribute("data-mce-caret",r?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(function(){var e=t.document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}()),i=n.parentNode,r?i.insertBefore(o,n):n.nextSibling?i.insertBefore(o,n.nextSibling):i.appendChild(o),o}(l,o,n),i=Ku(r,o,n),Ai(u).css("top",i.top);var s=Ai('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(i).appendTo(r)[0];return c.set(D.some({caret:s,element:o,before:n})),c.get().each((function(t){n&&Ai(t.caret).addClass("mce-visual-caret-before")})),d(),(a=o.ownerDocument.createRange()).setStart(u,0),a.setEnd(u,0),a},hide:f,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each((function(t){var e=Ku(r,t.element,t.before);Ai(t.caret).css(tt({},e))}))},destroy:function(){return zn.clearInterval(a)}}}(e,c),l="sel-"+e.dom.uniqueId(),f=function(t){return a(t.startContainer)||a(t.endContainer)},d=function(t,n){var r,i,a,s,d,m,h,p,v,b,y=e.$,x=e.dom;if(!t)return null;if(t.collapsed){if(!f(t))if(!1===n){if(Ju((p=sc(-1,c,t)).getNode(!0)))return o(-1,p.getNode(!0),!1,!1);if(Ju(p.getNode()))return o(-1,p.getNode(),!p.isAtEnd(),!1)}else{if(Ju((p=sc(1,c,t)).getNode()))return o(1,p.getNode(),!p.isAtEnd(),!1);if(Ju(p.getNode(!0)))return o(1,p.getNode(!0),!1,!1)}return null}if(d=t.startOffset,m=t.endOffset,3===(s=t.startContainer).nodeType&&0===d&&tx(s.parentNode)&&(d=x.nodeIndex(s=s.parentNode),s=s.parentNode),1!==s.nodeType)return null;if(m===d+1&&s===t.endContainer&&(r=s.childNodes[d]),!tx(r))return null;if(v=b=r.cloneNode(!0),(h=e.fire("ObjectSelected",{target:r,targetClone:v})).isDefaultPrevented())return null;i=ma(te.fromDom(e.getBody()),"#"+l).fold((function(){return y([])}),(function(t){return y([t.dom()])})),v=h.targetClone,0===i.length&&(i=y('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",l)).appendTo(e.getBody()),t=e.dom.createRng(),v===b&&Pn.ie?(i.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(v),t.setStartAfter(i[0].firstChild.firstChild),t.setEndAfter(v)):(i.empty().append(Rr).append(v).append(Rr),t.setStart(i[0].firstChild,1),t.setEnd(i[0].lastChild,0)),i.css({top:x.getPos(r,e.getBody()).y}),i[0].focus(),(a=e.selection.getSel()).removeAllRanges(),a.addRange(t);var w=te.fromDom(r);return $(aa(te.fromDom(e.getBody()),"*[data-mce-selected]"),(function(t){mt(w,t)||Gt(t,"data-mce-selected")})),e.dom.getAttrib(r,"data-mce-selected")||r.setAttribute("data-mce-selected","1"),u=r,g(),t},m=function(){u&&(u.removeAttribute("data-mce-selected"),ma(te.fromDom(e.getBody()),"#"+l).each(Ae),u=null),ma(te.fromDom(e.getBody()),"#"+l).each(Ae),u=null},g=function(){s.hide()};return Pn.ceFalse&&function(){var t;e.on("mouseup",(function(t){var o=r();o.collapsed&&Tf(e,t.clientX,t.clientY)&&n(gp(e,o,!1))})),e.on("click",(function(t){var n;(n=By(e,t.target))&&(tx(n)&&(t.preventDefault(),e.focus()),Qy(n)&&e.dom.isChildOf(n,e.selection.getNode())&&m())})),e.on("blur NewBlock",(function(){m()})),e.on("ResizeWindow FullscreenStateChanged",(function(){return s.reposition()})),(t=e).on("tap",(function(e){var n=By(t,e.target);tx(n)&&(e.preventDefault(),d(mp(t,n)))}),!0),e.on("mousedown",(function(t){var r,a=t.target;if((a===c||"HTML"===a.nodeName||e.dom.isChildOf(a,c))&&!1!==Tf(e,t.clientX,t.clientY))if(r=By(e,a))tx(r)?(t.preventDefault(),d(mp(e,r))):(m(),Qy(r)&&t.shiftKey||Uf(t.clientX,t.clientY,e.selection.getRng())||(g(),e.selection.placeCaretAt(t.clientX,t.clientY)));else if(!1===Ju(a)){m(),g();var u=function(t,e,n){var r,o=Nh(function(t){return X(K(t.getElementsByTagName("*")),Ju)}(t));return(r=(r=lp(X(o,(function(t){return n>=t.top&&n<=t.bottom})),e))&&lp(function(t,e){function n(t,n){var o;return o=X(Nh([n]),(function(n){return!t(n,e)})),r=r.concat(o),0===o.length}var r=[];return r.push(e),fp(Mh.Up,t,i(n,Ma),e.node),fp(Mh.Down,t,i(n,Ba),e.node),r}(t,r),e))&&Ju(r.node)?function(t,e){return{node:t.node,before:up(t,e)<cp(t,e)}}(r,e):null}(c,t.clientX,t.clientY);if(u&&!function(t,n){var r=e.dom.getParent(t,e.dom.isBlock),o=e.dom.getParent(n,e.dom.isBlock);return!(!r||!e.dom.isChildOf(r,o)||!1!==tx(By(e,r)))||r&&!function(t,n){return e.dom.getParent(t,e.dom.isBlock)===e.dom.getParent(n,e.dom.isBlock)}(r,o)&&function(t){var e=ts(t);if(!t.firstChild)return!1;var n=hc.before(t.firstChild),r=e.next(n);return r&&!Dp(r)&&!Hp(r)}(r)}(t.target,u.node)){t.preventDefault();var s=o(1,u.node,u.before,!1);e.getBody().focus(),n(s)}}})),e.on("keypress",(function(t){jf.modifierPressed(t)||tx(e.selection.getNode())&&t.preventDefault()})),e.on("GetSelectionRange",(function(t){var e=t.range;if(u){if(!u.parentNode)return void(u=null);(e=e.cloneRange()).selectNode(u),t.range=e}})),e.on("SetSelectionRange",(function(t){t.range=function(t){var n=e.schema.getShortEndedElements(),r=e.dom.createRng(),o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset;return Q(n,o.nodeName.toLowerCase())?0===i?r.setStartBefore(o):r.setStartAfter(o):r.setStart(o,i),Q(n,a.nodeName.toLowerCase())?0===u?r.setEndBefore(a):r.setEndAfter(a):r.setEnd(a,u),r}(t.range);var n=d(t.range,t.forward);n&&(t.range=n)})),e.on("AfterSetSelectionRange",(function(t){var n=t.range;f(n)||function(t){return"mcepastebin"===t.id}(n.startContainer.parentNode)||g(),function(t){return e.dom.hasClass(t,"mce-offscreen-selection")}(n.startContainer.parentNode)||m()})),e.on("copy",(function(t){var n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!Pn.ie){var r=function(){var t=e.dom.get(l);return t?t.getElementsByTagName("*")[0]:t}();r&&(t.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}})),Jy(e),Zy(e)}(),{showCaret:o,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Oa(t),n(r()),e.selection.scrollIntoView(t))},hideFakeCaret:g,destroy:function(){s.destroy(),u=null}}}function Dy(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),function(t){var e=t.dom.getRoot();t.inline||sd(t)&&t.selection.getStart(!0)!==e||Gs.firstPositionIn(e).each((function(e){var n=e.getNode(),r=$e.isTable(n)?Gs.firstPositionIn(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),function(t){t.settings.auto_focus&&zn.setEditorTimeout(t,(function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()}),100)}(t)}function Hy(t){return t.replace(/^\-/,"")}function Iy(t){return{editorContainer:t,iframeContainer:t}}function Py(t){return"-"===t.charAt(0)}function Ly(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null}function Fy(t,e){var n=hc.after(t),r=ts(e).prev(n);return r?r.toRange():null}function Vy(t,e){var n=t.selection.getRng(),r=n.startContainer,o=n.startOffset;n.collapsed&&function(t,e){return $e.isText(t)&&t.nodeValue[e-1]===Rr}(r,o)&&$e.isText(r)&&(r.insertData(o-1," "),r.deleteData(o,1),n.setStart(r,o),n.setEnd(r,o),t.selection.setRng(n)),t.selection.setContent(e)}function Uy(t,e){t.getDoc().execCommand(e,!1,null)}function jy(t){return function(e,n){return D.from(n).map(te.fromDom).filter(Ne).bind((function(n){return function(t,e,n){function o(e){return Xt(e,t).orThunk((function(){return"font"===Nt(e)?B(lx,t).bind((function(t){return function(t,e){return D.from(qt(t,e))}(e,t)})):D.none()}))}return function(t,e,n){return e(t).orThunk((function(){return n(t)?D.none():function(t,e,n){for(var o=t.dom(),i=V(n)?n:r(!1);o.parentNode;){var a=te.fromDom(o=o.parentNode),u=e(a);if(u.isSome())return u;if(i(a))break}return D.none()}(t,e,n)}))}(te.fromDom(n),(function(t){return o(t)}),(function(t){return mt(te.fromDom(e),t)}))}(t,e,n.dom()).or(function(t,e){return D.from(Ui.DOM.getStyle(e,t,!0))}(t,n.dom()))})).getOr("")}}function Wy(t){return Gs.firstPositionIn(t.getBody()).map((function(t){var e=t.container();return $e.isText(e)?e.parentNode:e}))}function qy(t){return D.from(t.selection.getRng()).bind((function(e){return function(t,e){return t.startContainer===e&&0===t.startOffset}(e,t.getBody())?D.none():D.from(t.selection.getStart(!0))}))}function Gy(t,e){if(/^[0-9\.]+$/.test(e)){var n=parseInt(e,10);if(1<=n&&n<=7){var r=function(t){return jn.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return jn.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e}var $y=function(t,e){return function(t,e,n){return{pageX:n.left-t.left+e.left,pageY:n.top-t.top+e.top}}(function(t){return t.inline?Ny(t.getBody()):{left:0,top:0}}(t),function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}}(t),function(t,e){if(e.target.ownerDocument===t.getDoc())return{left:e.pageX,top:e.pageY};var n=Ny(t.getContentAreaContainer()),r=function(t){var e=t.getBody(),n=t.getDoc().documentElement;return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop}}(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}(t,e))},Xy=$e.isContentEditableFalse,Ky=$e.isContentEditableTrue,Yy=function(t){t.dragging=!1,t.element=null,My(t.ghost)},Jy=function(e){(function(e){var n,r,o,i,a,u,c={};n=Ui.DOM,u=t.document,r=function(t,e){return function(n){if(function(t){return 0===t.button}(n)){var r=w(e.dom.getParents(n.target),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=du.call(arguments);return function(t){for(var e=0;e<n.length;e++)if(n[e](t))return!0;return!1}}(Xy,Ky)).getOr(null);if(function(t,e){return Xy(e)&&e!==t}(e.getBody(),r)){var o=e.dom.getPos(r),i=e.getBody(),a=e.getDoc().documentElement;t.element=r,t.screenX=n.screenX,t.screenY=n.screenY,t.maxX=(e.inline?i.scrollWidth:a.offsetWidth)-2,t.maxY=(e.inline?i.scrollHeight:a.offsetHeight)-2,t.relX=n.pageX-o.x,t.relY=n.pageY-o.y,t.width=r.offsetWidth,t.height=r.offsetHeight,t.ghost=function(t,e,n,r){var o=e.cloneNode(!0);t.dom.setStyles(o,{width:n,height:r}),t.dom.setAttrib(o,"data-mce-selected",null);var i=t.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return t.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),t.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(e,r,t.width,t.height)}}}}(c,e),o=function(t,e){var n=zn.throttle((function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)}),0);return function(r){var o=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(function(t){return t.element}(t)&&!t.dragging&&10<o){if(e.fire("dragstart",{target:t.element}).isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var i=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}}(t,$y(e,r));!function(t,e){t.parentNode!==e&&e.appendChild(t)}(t.ghost,e.getBody()),function(t,e,n,r,o,i){var a=0,u=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(a=e.pageX+n-o),e.pageY+r>i&&(u=e.pageY+r-i),t.style.width=n-a+"px",t.style.height=r-u+"px"}(t.ghost,i,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}}(c,e),i=function(t,e){return function(n){if(t.dragging&&function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!Xy(e)}(e,function(t){var e=t.getSel().getRangeAt(0).startContainer;return 3===e.nodeType?e.parentNode:e}(e.selection),t.element)){var r=function(t){var e=t.cloneNode(!0);return e.removeAttribute("data-mce-selected"),e}(t.element),o=e.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||(r=o.targetClone,e.undoManager.transact((function(){My(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()})))}Yy(t)}}(c,e),a=function(t,e){return function(){t.dragging&&e.fire("dragend"),Yy(t)}}(c,e),e.on("mousedown",r),e.on("mousemove",o),e.on("mouseup",i),n.bind(u,"mousemove",o),n.bind(u,"mouseup",a),e.on("remove",(function(){n.unbind(u,"mousemove",o),n.unbind(u,"mouseup",a)}))})(e),function(t){t.on("drop",(function(e){var n=void 0!==e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Xy(n)||Xy(t.dom.getContentEditableParent(n)))&&e.preventDefault()}))}(e)},Zy=function(e){var n=ta((function(){if(!e.removed&&e.getBody().contains(t.document.activeElement)&&e.selection.getRng().collapsed){var n=hp(e,e.selection.getRng(),!1);e.selection.setRng(n)}}),0);e.on("focus",(function(){n.throttle()})),e.on("blur",(function(){n.cancel()}))},Qy=$e.isContentEditableTrue,tx=$e.isContentEditableFalse,ex=Ui.DOM,nx=function(e,n){var o,a,u=e.settings,c=e.getElement(),s=e.getDoc();u.inline||(e.getElement().style.visibility=e.orgVisibility),n||e.inline||(s.open(),s.write(e.iframeHTML),s.close()),e.inline&&(e.on("remove",(function(){var t=this.getBody();ex.removeClass(t,"mce-content-body"),ex.removeClass(t,"mce-edit-focus"),ex.setAttrib(t,"contentEditable",null)})),ex.addClass(c,"mce-content-body"),e.contentDocument=s=t.document,e.contentWindow=t.window,e.bodyElement=c,e.contentAreaContainer=c,u.root_name=c.nodeName.toLowerCase()),(o=e.getBody()).disabled=!0,e.readonly=u.readonly,e.readonly||(e.inline&&"static"===ex.getStyle(o,"position",!0)&&(o.style.position="relative"),o.contentEditable=e.getParam("content_editable_state",!0)),o.disabled=!1,e.editorUpload=function(e){function n(t){return function(n){return e.selection?t(n):[]}}function o(t,e,n){for(var r=0;-1!==(r=t.indexOf(e,r))&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1),-1!==r;);return t}function i(t,e,n){return t=o(t,'src="'+e+'"','src="'+n+'"'),o(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"')}function a(t,n){$(e.undoManager.data,(function(e){"fragmented"===e.type?e.fragments=G(e.fragments,(function(e){return i(e,t,n)})):e.content=i(e.content,t,n)}))}function u(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function c(t,n){h.removeByUri(t.src),a(t.src,n),e.$(t).attr({src:Bc(e)?function(t){return t+(-1===t.indexOf("?")?"?":"&")+(new Date).getTime()}(n):n,"data-mce-src":e.convertURL(n,"src")})}function s(r){return m=m||function(e,n){function r(e,r,o,i){var a,u;(a=new t.XMLHttpRequest).open("POST",n.url),a.withCredentials=n.credentials,a.upload.onprogress=function(t){i(t.loaded/t.total*100)},a.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+a.status)},a.onload=function(){var t;a.status<200||300<=a.status?o("HTTP Error: "+a.status):(t=JSON.parse(a.responseText))&&"string"==typeof t.location?r(function(t,e){return t?t.replace(/\/$/,"")+"/"+e.replace(/^\//,""):e}(n.basePath,t.location)):o("Invalid JSON: "+a.responseText)},(u=new t.FormData).append("file",e.blob(),e.filename()),a.send(u)}function o(t,e){return{url:e,blobInfo:t,status:!0}}function i(t,e){return{url:"",blobInfo:t,status:!1,error:e}}function a(t,e){jn.each(u[t],(function(t){t(e)})),delete u[t]}var u={};return!1===V(n.handler)&&(n.handler=r),{upload:function(t,c){return!n.url&&function(t){return t===r}(n.handler)?new mn((function(t){t([])})):function(t,r){return t=jn.grep(t,(function(t){return!e.isUploaded(t.blobUri())})),mn.all(jn.map(t,(function(t){return e.isPending(t.blobUri())?function(t){var e=t.blobUri();return new mn((function(t){u[e]=u[e]||[],u[e].push(t)}))}(t):function(t,n,r){return e.markPending(t.blobUri()),new mn((function(c){var s;try{var l=function(){s&&s.close()};n(t,(function(n){l(),e.markUploaded(t.blobUri(),n),a(t.blobUri(),o(t,n)),c(o(t,n))}),(function(n){l(),e.removeFailed(t.blobUri()),a(t.blobUri(),i(t,n)),c(i(t,n))}),(function(t){t<0||100<t||(s=s||r()).progressBar.value(t)}))}catch(u){c(i(t,u.message))}}))}(t,n.handler,r)})))}(t,c)}}}(p,{url:Rc(e),basePath:Dc(e),credentials:Hc(e),handler:Ic(e)}),b().then(n((function(t){var o=G(t,(function(t){return t.blobInfo}));return m.upload(o,u).then(n((function(n){var o=G(n,(function(n,r){var o=t[r].image;return n.status&&function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")}(e)?c(o,n.url):n.error&&Pf.uploadError(e,n.error),{element:o,status:n.status}}));return r&&r(o),o})))})))}function l(t){if(Mc(e))return s(t)}function f(t){return!1!==k(v,(function(e){return e(t)}))&&(0!==t.getAttribute("src").indexOf("data:")||function(t){return t.getParam("images_dataimg_filter",r(!0),"function")}(e)(t))}function d(t){return t.replace(/src="(blob:[^"]+)"/g,(function(t,n){var r=p.getResultUri(n);if(r)return'src="'+r+'"';var o=h.getByUri(n);return(o=o||x(e.editorManager.get(),(function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)}),null))?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':t}))}var m,g,h=function(){var e=[],n=function(e){var n,o;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return n=e.id||Ym("blobid"),o=e.name||n,{id:r(n),name:r(o),filename:r(o+"."+function(t){return{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[t.toLowerCase()]||"dat"}(e.blob.type)),blob:r(e.blob),base64:r(e.base64),blobUri:r(e.blobUri||t.URL.createObjectURL(e.blob)),uri:r(e.uri)}},o=function(t){return i((function(e){return e.id()===t}))},i=function(t){return X(e,t)[0]};return{create:function(t,e,r,o){if(H(t))return n({id:t,name:o,blob:e,base64:r});if(I(t))return n(t);throw new Error("Unknown input type")},add:function(t){o(t.id())||e.push(t)},get:o,getByUri:function(t){return i((function(e){return e.blobUri()===t}))},findFirst:i,removeByUri:function(n){e=X(e,(function(e){return e.blobUri()!==n||(t.URL.revokeObjectURL(e.blobUri()),!1)}))},destroy:function(){$(e,(function(e){t.URL.revokeObjectURL(e.blobUri())})),e=[]}}}(),p=function(){function t(t,e){return{status:t,resultUri:e}}function e(t){return t in n}var n={};return{hasBlobUri:e,getResultUri:function(t){var e=n[t];return e?e.resultUri:null},isPending:function(t){return!!e(t)&&1===n[t].status},isUploaded:function(t){return!!e(t)&&2===n[t].status},markPending:function(e){n[e]=t(1,null)},markUploaded:function(e,r){n[e]=t(2,r)},removeFailed:function(t){delete n[t]},destroy:function(){n={}}}}(),v=[],b=function(){return(g=g||function(e,n){var o={};return{findAll:function(i,a){var u;a=a||r(!0),u=X(function(t){return t?K(t.getElementsByTagName("img")):[]}(i),(function(t){var n=t.src;return!!Pn.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&!(!n||n===Pn.transparentSrc)&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&a(t):0===n.indexOf("data:")&&a(t))}));var c=G(u,(function(e){if(o[e.src])return new mn((function(t){o[e.src].then((function(n){if("string"==typeof n)return n;t({image:e,blobInfo:n.blobInfo})}))}));var r=new mn((function(r,o){!function(e,n,r,o){var i,a;0!==n.src.indexOf("blob:")?(i=ym(n.src).data,(a=e.findFirst((function(t){return t.base64()===i})))?r({image:n,blobInfo:a}):bm(n.src).then((function(t){a=e.create(cm(),t,i),e.add(a),r({image:n,blobInfo:a})}),(function(t){o(t)}))):(a=e.getByUri(n.src))?r({image:n,blobInfo:a}):bm(n.src).then((function(o){(function(e){return new mn((function(n){var r=new t.FileReader;r.onloadend=function(){n(r.result)},r.readAsDataURL(e)}))})(o).then((function(t){i=ym(t).data,a=e.create(cm(),o,i),e.add(a),r({image:n,blobInfo:a})}))}),(function(t){o(t)}))}(n,e,r,o)})).then((function(t){return delete o[t.image.src],t})).catch((function(t){return delete o[e.src],t}));return o[e.src]=r}));return mn.all(c)}}}(p,h)).findAll(e.getBody(),f).then(n((function(t){return t=X(t,(function(t){return"string"!=typeof t||(Pf.displayError(e,t),!1)})),$(t,(function(t){a(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")})),t})))};return e.on("SetContent",(function(){Mc(e)?l():b()})),e.on("RawSaveContent",(function(t){t.content=d(t.content)})),e.on("GetContent",(function(t){t.source_view||"raw"===t.format||(t.content=d(t.content))})),e.on("PostRender",(function(){e.parser.addNodeFilter("img",(function(t){$(t,(function(t){var e=t.attr("src");if(!h.getByUri(e)){var n=p.getResultUri(e);n&&t.attr("src",n)}}))}))})),{blobCache:h,addFilter:function(t){v.push(t)},uploadImages:s,uploadImagesAuto:l,scanForImages:b,destroy:function(){h.destroy(),p.destroy(),g=m=null}}}(e),e.schema=Tr(u),e.dom=Ui(s,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:u.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:Pc(e),referrerPolicy:Lc(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=function(t){var e=om(t.settings,t.schema);return e.addAttributeFilter("src,href,style,tabindex",(function(e,n){for(var r,o,i,a=e.length,u=t.dom;a--;)if(o=(r=e[a]).attr(n),!r.attr(i="data-mce-"+n)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=u.serializeStyle(u.parseStyle(o),r.name)).length||(o=null),r.attr(i,o),r.attr(n,o)):"tabindex"===n?(r.attr(i,o),r.attr(n,null)):r.attr(i,t.convertURL(o,n,r.name))}})),e.addNodeFilter("script",(function(t){for(var e,n,r=t.length;r--;)0!==(n=(e=t[r]).attr("type")||"no/type").indexOf("mce-")&&e.attr("type","mce-"+n)})),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",(function(e){for(var n,r=e.length;r--;)(n=e[r]).type=8,n.name="#comment",n.value="[CDATA["+t.dom.encode(n.value)+"]]"})),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){for(var n,r=e.length,o=t.schema.getNonEmptyElements();r--;)(n=e[r]).isEmpty(o)&&0===n.getAll("br").length&&(n.append(new dl("br",1)).shortEnded=!0)})),e}(e),e.serializer=am(u,e),e.selection=em(e.dom,e.getWin(),e.serializer,e),e.annotator=al(e),e.formatter=jg(e),e.undoManager=Yg(e),e._nodeChangeDispatcher=new Ty(e),e._selectionOverrides=Ry(e),function(t){var e=ee(D.none()),n=ee(!1),o=ea((function(e){t.fire("longpress",tt(tt({},e),{type:"longpress"})),n.set(!0)}),400);t.on("touchstart",(function(t){Qg(t).each((function(i){o.cancel();var a={x:r(i.clientX),y:r(i.clientY),target:r(t.target)};o.throttle(t),n.set(!1),e.set(D.some(a))}))}),!0),t.on("touchmove",(function(r){o.cancel(),Qg(r).each((function(r){e.get().each((function(o){!function(t,e){var n=Math.abs(t.clientX-e.x()),r=Math.abs(t.clientY-e.y());return 5<n||5<r}(r,o)||(e.set(D.none()),n.set(!1),t.fire("longpresscancel"))}))}))}),!0),t.on("touchend touchcancel",(function(r){o.cancel(),"touchcancel"!==r.type&&e.get().filter((function(t){return t.target().isEqualNode(r.target)})).each((function(){n.get()?r.preventDefault():t.fire("tap",tt(tt({},r),{type:"tap"}))}))}),!0)}(e),function(t){!function(t){t.on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}))}(t),function(t){t.parser.addNodeFilter("details",(function(t){$(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){$(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",H(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)}(e),function(t){t.on("click",(function(e){3<=e.detail&&function(t){var e=t.selection.getRng(),n=Eu.fromRangeStart(e),r=Eu.fromRangeEnd(e);if(Eu.isElementPosition(n)){var o=n.container();Ay(o)&&Gs.firstPositionIn(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Eu.isElementPosition(r)&&Ay(o=n.container())&&Gs.lastPositionIn(o).each((function(t){return e.setEnd(t.container(),t.offset())})),t.selection.setRng(Rg(e))}(t)}))}(e),function(t){var e=rp.setupSelectedState(t);(function(t){t.on("keyup compositionstart",i(zb,t))})(t),function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){var r=st().os;Vb([{keyCode:jf.RIGHT,action:jp(t,!0)},{keyCode:jf.LEFT,action:jp(t,!1)},{keyCode:jf.UP,action:Wp(t,!1)},{keyCode:jf.DOWN,action:Wp(t,!0)},{keyCode:jf.RIGHT,action:Yp(t,!0)},{keyCode:jf.LEFT,action:Yp(t,!1)},{keyCode:jf.UP,action:Jp(t,!1)},{keyCode:jf.DOWN,action:Jp(t,!0)},{keyCode:jf.RIGHT,action:rp.move(t,e,!0)},{keyCode:jf.LEFT,action:rp.move(t,e,!1)},{keyCode:jf.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:rp.moveNextWord(t,e)},{keyCode:jf.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:rp.movePrevWord(t,e)},{keyCode:jf.UP,action:ev(t,!1)},{keyCode:jf.DOWN,action:ev(t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))}(t,e),function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){Vb([{keyCode:jf.BACKSPACE,action:Fb(my,t,!1)},{keyCode:jf.BACKSPACE,action:Fb(Jb,t,!1)},{keyCode:jf.DELETE,action:Fb(Jb,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(Qb,t,!1)},{keyCode:jf.DELETE,action:Fb(Qb,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(ty,t,e,!1)},{keyCode:jf.DELETE,action:Fb(ty,t,e,!0)},{keyCode:jf.BACKSPACE,action:Fb(ay,t,!1)},{keyCode:jf.DELETE,action:Fb(ay,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(uy,t,!1)},{keyCode:jf.DELETE,action:Fb(uy,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(Gb,t,!1)},{keyCode:jf.DELETE,action:Fb(Gb,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(qb,t,!1)},{keyCode:jf.DELETE,action:Fb(qb,t,!0)},{keyCode:jf.BACKSPACE,action:Fb(ey,t,!1)},{keyCode:jf.DELETE,action:Fb(ey,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&function(t,e){Vb([{keyCode:jf.BACKSPACE,action:Fb(Zb,t)},{keyCode:jf.DELETE,action:Fb(Zb,t)}],e)}(t,e)}))}(t,e),function(t){t.on("keydown",(function(e){e.keyCode===jf.ENTER&&function(t,e){e.isDefaultPrevented()||(e.preventDefault(),function(t){t.typing&&(t.typing=!1,t.add())}(t.undoManager),t.undoManager.transact((function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),ky(t,e)})))}(t,e)}))}(t),function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&function(t,e){Vb([{keyCode:jf.SPACEBAR,action:Fb(_b,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))}(t),function(t){!function(t){var e=ta((function(){t.composing||Ob(t)}),0);_y.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))}(t),t.on("input",(function(e){!1===e.isComposing&&Ob(t)}))}(t),function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&function(t,e){Vb([{keyCode:jf.END,action:qp(t,!0)},{keyCode:jf.HOME,action:qp(t,!1)}],e).each((function(t){e.preventDefault()}))}(t,e)}))}(t)}(e),function(t){Ac(t)&&t.on("NodeChange",i(nh,t))}(e),function(t){var e=t.dom,n=Ac(t),r=function(t){return t.getParam("placeholder",Tc.getAttrib(t.getElement(),"placeholder"),"string")}(t),o=function(i,a){if(!function(t){if(Jg(t)){var e=t.keyCode;return!Zg(t)&&(jf.metaKeyPressed(t)||t.altKey||112<=e&&e<=123||v(Vh,e))}return!1}(i)){var u=t.getBody(),c=!function(t){return Jg(t)&&!(Zg(t)||"keyup"===t.type&&229===t.keyCode)}(i)&&function(t,e,n){if(ig(te.fromDom(e),!1)){var r=""===n,o=e.firstElementChild;return!o||!t.getStyle(e.firstElementChild,"padding-left")&&!t.getStyle(e.firstElementChild,"padding-right")&&(r?!t.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(e,u,n);""!==e.getAttrib(u,Uh)===c&&!a||(e.setAttrib(u,Uh,c?r:null),e.setAttrib(u,"aria-placeholder",c?r:null),function(t,e){t.fire("PlaceholderToggle",{state:e})}(t,c),t.on(c?"keydown":"keyup",o),t.off(c?"keyup":"keydown",o))}};r&&t.on("init",(function(n){o(n,!0),t.on("change SetContent ExecCommand",o),t.on("remove",(function(){var n=t.getBody();e.setAttrib(n,Uh,null),e.setAttrib(n,"aria-placeholder",null)}))}))}(e),function(t){t.fire("PreInit")}(e),u.browser_spellcheck||u.gecko_spellcheck||(s.body.spellcheck=!1,ex.setAttrib(o,"spellcheck","false")),e.quirks=function(e){function n(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(i){}}function r(t){return t.isDefaultPrevented()}function o(){e.shortcuts.add("meta+a",null,"SelectAll")}function i(){e.on("keydown",(function(t){if(!r(t)&&t.keyCode===c&&f.isCollapsed()&&0===f.getRng().startOffset){var e=f.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}}))}function a(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(function(t){var n;if("HTML"===t.target.nodeName){if(11<Pn.ie)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}})))}var u=jn.each,c=jf.BACKSPACE,s=jf.DELETE,l=e.dom,f=e.selection,d=e.settings,m=e.parser,g=Pn.gecko,h=Pn.webkit,p="data:text/mce-internal,",v=Pn.ie?"Text":"URL";function b(t){var e=l.create("body"),n=t.cloneContents();return e.appendChild(n),f.serializer.serialize(e,{format:"html"})}function y(){var t=l.getAttribs(f.getStart().cloneNode(!1));return function(){var n=f.getStart();n!==e.getBody()&&(l.setAttrib(n,"style",null),u(t,(function(t){n.setAttributeNode(t.cloneNode(!0))})))}}function x(){return!f.isCollapsed()&&l.getParent(f.getStart(),l.isBlock)!==l.getParent(f.getEnd(),l.isBlock)}return e.on("keydown",(function(t){var n,o,i,a,u;if(!r(t)&&t.keyCode===jf.BACKSPACE&&(o=(n=f.getRng()).startContainer,i=n.startOffset,a=l.getRoot(),u=o,n.collapsed&&0===i)){for(;u&&u.parentNode&&u.parentNode.firstChild===u&&u.parentNode!==a;)u=u.parentNode;"BLOCKQUOTE"===u.tagName&&(e.formatter.toggle("blockquote",null,u),(n=l.createRng()).setStart(o,0),n.setEnd(o,0),f.setRng(n))}})),e.on("keydown",(function(t){var n,o,i=t.keyCode;if(!r(t)&&(i===s||i===c)){if(n=e.selection.isCollapsed(),o=e.getBody(),n&&!l.isEmpty(o))return;if(!n&&!function(t){var n=b(t),r=l.createRng();return r.selectNode(e.getBody()),n===b(r)}(e.selection.getRng()))return;t.preventDefault(),e.setContent(""),o.firstChild&&l.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}})),Pn.windowsPhone||e.on("keyup focusin mouseup",(function(t){jf.modifierPressed(t)||f.normalize()}),!0),h&&(e.inline||l.bind(e.getDoc(),"mousedown mouseup",(function(t){var n;if(t.target===e.getDoc().documentElement)if(n=f.getRng(),e.getBody().focus(),"mousedown"===t.type){if(Ca(n.startContainer))return;f.placeCaretAt(t.clientX,t.clientY)}else f.setRng(n)})),e.on("click",(function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==l.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&l.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),f.select(n))})),d.forced_root_block&&e.on("init",(function(){n("DefaultParagraphSeparator",Ac(e))})),e.on("init",(function(){e.dom.bind(e.getBody(),"submit",(function(t){t.preventDefault()}))})),i(),m.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),Pn.iOS?(e.inline||e.on("keydown",(function(){t.document.activeElement===t.document.body&&e.getWin().focus()})),a(),e.on("click",(function(t){var e=t.target;do{if("A"===e.tagName)return void t.preventDefault()}while(e=e.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):o()),11<=Pn.ie&&(a(),i()),Pn.ie&&(o(),n("AutoUrlDetect",!1),e.on("dragstart",(function(t){!function(t){var n,r;t.dataTransfer&&(e.selection.isCollapsed()&&"IMG"===t.target.tagName&&f.select(t.target),0<(n=e.selection.getContent()).length&&(r=p+escape(e.id)+","+escape(n),t.dataTransfer.setData(v,r)))}(t)})),e.on("drop",(function(t){if(!r(t)){var n=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(v))&&0<=e.indexOf(p)?(e=e.substr(p.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(t);if(n&&n.id!==e.id){t.preventDefault();var o=Hd(t.x,t.y,e.getDoc());f.setRng(o),function(t,n){e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:t,internal:!0}):e.execCommand("mceInsertContent",!1,t)}(n.html)}}}))),g&&(e.on("keydown",(function(t){if(!r(t)&&t.keyCode===c){if(!e.getBody().getElementsByTagName("hr").length)return;if(f.isCollapsed()&&0===f.getRng().startOffset){var n=f.getNode(),o=n.previousSibling;if("HR"===n.nodeName)return l.remove(n),void t.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(l.remove(o),t.preventDefault())}}})),t.Range.prototype.getClientRects||e.on("mousedown",(function(t){if(!r(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),zn.setEditorTimeout(e,(function(){n.focus()}))}})),e.on("keypress",(function(t){var n;if(!r(t)&&(8===t.keyCode||46===t.keyCode)&&x())return n=y(),e.getDoc().execCommand("delete",!1,null),n(),t.preventDefault(),!1})),l.bind(e.getDoc(),"cut",(function(t){var n;!r(t)&&x()&&(n=y(),zn.setEditorTimeout(e,(function(){n()})))})),d.readonly||e.on("BeforeExecCommand mousedown",(function(){n("StyleWithCSS",!1),n("enableInlineTableEditing",!1),d.object_resizing||n("enableObjectResizing",!1)})),e.on("SetContent ExecCommand",(function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||u(l.select("a"),(function(t){var e=t.parentNode,n=l.getRoot();if(e.lastChild===t){for(;e&&!l.isBlock(e);){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}l.add(e,"br",{"data-mce-bogus":1})}}))})),e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),Pn.mac&&e.on("keydown",(function(t){!jf.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})),i()),{refreshContentEditable:function(){},isHidden:function(){var t;return!(!g||e.removed||(t=e.selection.getSel())&&t.rangeCount&&0!==t.rangeCount)}}}(e),function(t){t.fire("PostRender")}(e);var l=function(t){return t.getParam("directionality",Zi.isRtl()?"rtl":void 0)}(e);void 0!==l&&(o.dir=l),u.protect&&e.on("BeforeSetContent",(function(t){jn.each(u.protect,(function(e){t.content=t.content.replace(e,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))}))})),e.on("SetContent",(function(){e.addVisual(e.getBody())})),e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",(function(t){e.composing="compositionstart"===t.type})),0<e.contentStyles.length&&(a="",jn.each(e.contentStyles,(function(t){a+=t+"\r\n"})),e.dom.addStyle(a)),function(t){return t.inline?ex.styleSheetLoader:t.dom.styleSheetLoader}(e).loadAll(e.contentCSS,(function(t){Dy(e)}),(function(t){Dy(e)})),u.content_style&&function(t,e){var n=te.fromDom(t.getDoc().head),r=te.fromTag("style");Xe(r,"type","text/css"),ze(r,te.fromText(e)),ze(n,r)}(e,u.content_style)},rx=Ui.DOM,ox=Ui.DOM,ix=function(t,e,n){var r=Af.get(n),o=Af.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=jn.trim(n),r&&-1===jn.inArray(e,n)){if(jn.each(Af.dependencies(n),(function(n){ix(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);(t.plugins[n]=i).init&&(i.init(t,o),e.push(n))}catch($w){Pf.pluginInitError(t,n,$w)}}},ax=function(e){e.fire("ScriptsLoaded"),function(t){var e=jn.trim(t.settings.icons),n=t.ui.registry.getAll().icons;z(tt(tt({},{"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>',"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>',"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 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-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.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 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>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 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 13l-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>',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-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 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.4l-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>',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>',"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 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 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:'<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.3L4 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.8L5 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:'<svg width="24" height="24"><path d="M17.3 8.2L13.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"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 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 19l3-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 d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></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:'<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.2l.1-.4v-.3-.4a1 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 4l.2-.5v-.4-.3a2.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-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>',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.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 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.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 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.6l5.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>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 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>',"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 10l-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 4l3 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 10L5.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.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 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 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 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 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 id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 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>',"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.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 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>',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>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 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 width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 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 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 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.2L6.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>',"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 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 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="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 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.8l.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.8l.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.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 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-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.5L8 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>',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.5l-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-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 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.1l-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>',"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>',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>',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 d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',"sort-asc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 8h5a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zm0 8h8a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0-4h7a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/><path fill-rule="nonzero" d="M16 8.4l-2.3 2.3a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L18 8.4V18a1 1 0 0 1-2 0V8.4z"/></g></svg>',"sort-dsc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 16h5a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2zm0-8h8a1 1 0 0 0 0-2H4a1 1 0 1 0 0 2zm0 4h7a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2z"/><path fill-rule="nonzero" d="M16 15.6l-2.3-2.3a1 1 0 0 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 0 0-1.4-1.4L18 15.6V6a1 1 0 0 0-2 0v9.6z"/></g></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.5l-.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 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 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 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 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>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 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-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.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 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.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 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.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 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-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 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 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:'<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 id="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.6l-.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>',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>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 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-3l2.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 1 1 2 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 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:'<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.4L8.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>',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>',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-3l.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>'}),Sf.get(e).icons),(function(e,r){Q(n,r)||t.ui.registry.addIcon(r,e)}))}(e),function(t){var e=t.settings.theme;if(H(e)){t.settings.theme=Hy(e);var n=Nf.get(e);t.theme=new n(t,Nf.urls[e]),t.theme.init&&t.theme.init(t,Nf.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(e),function(t){var e=[];jn.each(t.settings.plugins.split(/[ ,]/),(function(n){ix(t,e,Hy(n))}))}(e);var n=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,H(t.settings.theme)?function(t){return t.theme.renderUI()}(t):V(t.settings.theme)?function(t){var e=t.getElement(),n=(0,t.settings.theme)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):function(t){var e=t.getElement();return t.inline?Iy(null):function(t){var e=ox.create("div");return ox.insertAfter(e,t),Iy(e)}(e)}(t)}(e);return e.editorContainer=n.editorContainer?n.editorContainer:null,function(t){t.contentCSS=t.contentCSS.concat(function(t){var e=function(t){var e=t.settings.content_css;return H(e)?G(e.split(","),at):P(e)?e:!1===e||t.inline?[]:["default"]}(t),n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return G(e,(function(e){return function(t){return/^[a-z0-9\-]+$/i.test(t)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)}))}(t))}(e),e.inline?nx(e):function(e,n){var r=function(e,n){var r=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),o=function(t,e,n,r){var o=te.fromTag("iframe");return Wt(o,r),Wt(o,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),oa(o,"tox-edit-area__iframe"),o}(e.id,r,0,function(t){return t.getParam("iframe_attrs",{})}(e)).dom();o.onload=function(){o.onload=null,e.fire("load")};var i=function(e,n){if(t.document.domain!==t.window.location.hostname&&Pn.browser.isIE()){var r=Ym("mce");return e[r]=function(){nx(e)},rx.setAttrib(n,"src",'javascript:(function(){document.open();document.domain="'+t.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+r+"(true);})()"),!0}return!1}(e,o);return e.contentAreaContainer=n.iframeContainer,e.iframeElement=o,e.iframeHTML=function(t){var e,n,r;return r=function(t){return t.getParam("doctype","<!DOCTYPE html>")}(t)+"<html><head>",function(t){return t.getParam("document_base_url","")}(t)!==t.documentBaseUrl&&(r+='<base href="'+t.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',e=function(t){return Xu(t,"body_id","tinymce")}(t),n=function(t){return Xu(t,"body_class","")}(t),zc(t)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+zc(t)+'" />'),r+'</head><body id="'+e+'" class="mce-content-body '+n+'" data-id="'+t.id+'"><br></body></html>'}(e),rx.add(n.iframeContainer,o),i}(e,n);n.editorContainer&&(rx.get(n.editorContainer).style.display=e.orgDisplay,e.hidden=rx.isHidden(n.editorContainer)),e.getElement().style.display="none",rx.setAttrib(e.id,"aria-hidden","true"),r||nx(e)}(e,n)},ux=Ui.DOM,cx=$e.matchNodeNames(["td","th"]),sx=function(t,e){var n=function(t){var e;return"string"!=typeof t?(e=jn.extend({paste:t.paste,data:{paste:t.paste}},t),{content:t.content,details:e}):{content:t,details:{}}}(e);!function(t,e,n){var r,o,i,a,u,c,s,l,f,d,m,g=t.selection,h=t.dom;if(/^ | $/.test(e)&&(e=function(t,e){var n,r;function o(t){return n[t]&&3===n[t].nodeType}return r=t.startOffset,3===(n=t.startContainer).nodeType&&(0<r?e=e.replace(/^&nbsp;/," "):o("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),r<n.length?e=e.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}(g.getRng(),e)),r=t.parser,m=n.merge,o=yl({validate:t.settings.validate},t.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',(c=t.fire("BeforeSetContent",c={content:e,format:"html",selection:!0,paste:n.paste})).isDefaultPrevented())t.fire("SetContent",{content:c.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=c.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,d);var p=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),v=t.getBody();p===v&&g.isCollapsed()&&h.isBlock(v.firstChild)&&function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]}(t,v.firstChild)&&h.isEmpty(v.firstChild)&&((l=h.createRng()).setStart(v.firstChild,0),l.setEnd(v.firstChild,0),g.setRng(l)),g.isCollapsed()||(t.selection.setRng(Rg(t.selection.getRng())),t.getDoc().execCommand("Delete",!1,null),e=function(t,e){var n,r;return r=t.startOffset,3===(n=t.startContainer).nodeType&&t.collapsed&&(n.data[r]===Rr?(n.deleteData(r,1),/[\u00a0| ]$/.test(e)||(e+=" ")):n.data[r-1]===Rr&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(e)||(e=" "+e))),e}(t.selection.getRng(),e));var b={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(e,b),!0===n.paste&&function(t,e){var n=e.firstChild,r=e.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||function(t,e){return t.getBlockElements()[e.name]&&function(t){return t.firstChild&&t.firstChild===t.lastChild}(e)&&function(t){return"br"===t.name||t.value===Rr}(e.firstChild)}(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r||"ul"!==n.name&&"ol"!==n.name)}(t.schema,u)&&function(t,e){return!!Ly(t,e)}(h,i))return l=function(t,e,n,r){function o(t){var r=hc.fromRangeStart(n),o=ts(e.getRoot()),i=1===t?o.prev(r):o.next(r);return!i||Ly(e,i.getNode())!==a}var i=function(t,e,n){var r=e.serialize(n);return function(t){var e=t.firstChild,n=t.lastChild;return e&&"META"===e.nodeName&&e.parentNode.removeChild(e),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),t}(t.createFragment(r))}(e,t,r),a=Ly(e,n.startContainer),u=function(t){return 0<t.length&&function(t){return!t.firstChild||function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===Rr||$e.isBr(t)}(t.firstChild)}(t)}(t[t.length-1])?t.slice(0,-1):t}(function(t){return jn.grep(t.childNodes,(function(t){return"LI"===t.nodeName}))}(i.firstChild)),c=e.getRoot();return o(1)?function(t,e,n){var r=t.parentNode;return jn.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=hc.before(t),r=ts(e).next(n);return r?r.toRange():null}(t,n)}(a,u,c):o(2)?function(t,e,n,r){return r.insertAfter(e.reverse(),t),Fy(e[0],n)}(a,u,c,e):function(t,e,n,r){var o=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),jn.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),Fy(e[e.length-1],n)}(a,u,c,n)}(o,h,t.selection.getRng(),u),t.selection.setRng(l),void t.fire("SetContent",c);if(function(t){for(var e=t;e=e.walk();)1===e.type&&e.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(s=f).prev;f;f=f.walk(!0))if(3===f.type||!h.isBlock(f.name)){t.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(s,f,"br"===f.name);break}if(t._selectionOverrides.showBlockCaretContainer(i),b.invalid){for(Vy(t,d),i=g.getNode(),a=t.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;e=i===a?a.innerHTML:h.getOuterHTML(i),e=o.serialize(r.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return o.serialize(u)})))),i===a?h.setHTML(a,e):h.setOuterHTML(i,e)}else!function(t,e,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(t.dom.createFragment(e),n);else{var r=n.firstChild;!r||r===n.lastChild&&"BR"===r.nodeName?t.dom.setHTML(n,e):Vy(t,e)}}(t,e=o.serialize(u),i);!function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=new dg(r);jn.each(r.select("*[data-mce-fragment]"),(function(t){for(var e=t.parentNode;e&&e!==o;e=e.parentNode)n[t.nodeName.toLowerCase()]&&i.compare(e,t)&&r.remove(t,!0)}))}}(t,m),function(t,e){var n,r,o,i,a,u=t.dom,c=t.selection;if(e){if(t.selection.scrollIntoView(e),n=function(e){for(var n=t.getBody();e&&e!==n;e=e.parentNode)if("false"===t.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),c.select(n);var s=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(s.setStart(i,i.nodeValue.length),Pn.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(s.setStartBefore(e),s.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(t.$(r).empty(),s.setStart(r,0),s.setEnd(r,0),cx(r)||function(t){return!!t.getAttribute("data-mce-fragment")}(r)||!(o=function(e){var n=hc.fromRangeStart(e);if(n=ts(t.getBody()).next(n))return n.toRange()}(s))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(s=o,u.remove(r))),c.setRng(s)}}(t,h.get("mce_marker")),function(t){jn.each(t.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")}))}(t.getBody()),function(t,e){D.from(t.getParent(e,"td,th")).map(te.fromDom).each(Qm)}(t.dom,t.selection.getStart()),t.fire("SetContent",c),t.addVisual()}}(t,n.content,n.details)},lx={"font-size":"size","font-family":"face"},fx={getFontSize:jy("font-size"),getFontFamily:n((function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")}),jy("font-family")),toPt:function(t,e){return/[0-9.]+px$/.test(t)?function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}(72*parseInt(t,10)/96,e||0)+"pt":t}},dx=jn.each,mx=jn.map,gx=jn.inArray,hx=(px.prototype.execCommand=function(t,e,n,r){var o,i,u=!1,c=this;if(!c.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?function(t){Tl(t).each((function(e){t.selection.setRng(e)}))}(c.editor):c.editor.focus(),(r=c.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=c.commands.exec[i])return o(i,e,n),c.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(dx(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return c.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!(u=!0)})),u)return u;if(c.editor.theme&&c.editor.theme.execCommand&&c.editor.theme.execCommand(t,e,n))return c.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{u=c.editor.getDoc().execCommand(t,e,n)}catch(a){}return!!u&&(c.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},px.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(d){}return!1}},px.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(d){}}},px.prototype.addCommands=function(t,e){var n=this;e=e||"exec",dx(t,(function(t,r){dx(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},px.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},px.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(c){}return!1},px.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},px.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},px.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},px.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},px.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},px.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e?{value:e}:void 0),this.editor.nodeChanged()},px.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},px.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},px.prototype.setupCommands=function(t){var e=this;function n(e){return function(){var n=t.selection.isCollapsed()?[t.dom.getParent(t.selection.getNode(),t.dom.isBlock)]:t.selection.getSelectedBlocks(),r=mx(n,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==gx(r,!0)}}this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(g){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Pn.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),dx("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r,o;e.execNativeCommand(n),(r=t.dom.getParent(t.selection.getNode(),"ol,ul"))&&/^(H[1-6]|P|ADDRESS|PRE)$/.test((o=r.parentNode).nodeName)&&(e.storeSelection(),t.dom.split(o,r),e.restoreSelection())},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,r)},FontName:function(e,n,r){!function(t,e){var n=Gy(t,e);t.formatter.toggle("fontname",{value:function(t){var e=t.split(/\s*,\s*/);return G(e,(function(t){return-1===t.indexOf(" ")||it(t,'"')||it(t,"'")?t:"'"+t+"'"})).join(",")}(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:Gy(t,e)}),t.nodeChanged()}(t,r)},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){sx(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){ky(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){Iv(t,e)},mceRepaint:function(){},InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){var o;"string"==typeof r&&(r={href:r}),o=t.dom.getParent(t.selection.getNode(),"a"),r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),$e.isContentEditableTrue);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},delete:function(){!function(t){my(t)||Jb(t,!1)||Qb(t,!1)||ty(t,!1)||qb(t,!1)||ay(t)||Gb(t)||ey(t,!1)||(Uy(t,"Delete"),jb(t))}(t)},forwardDelete:function(){!function(t){Jb(t,!0)||Qb(t,!0)||ty(t,!0)||qb(t,!0)||ay(t)||Gb(t)||ey(t,!0)||Uy(t,"ForwardDelete")}(t)},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return xy(t,r),!0}}),e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return Dv(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return function(t){return qy(t).fold((function(){return Wy(t).map((function(e){return fx.getFontFamily(t.getBody(),e)})).getOr("")}),(function(e){return fx.getFontFamily(t.getBody(),e)}))}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return qy(t).fold((function(){return Wy(t).map((function(e){return fx.getFontSize(t.getBody(),e)})).getOr("")}),(function(e){return fx.getFontSize(t.getBody(),e)}))}(t)}),this)},px);function px(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}var vx=jn.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"," "),bx=(yx.isNative=function(t){return!!vx[t.toLowerCase()]},yx.prototype.fire=function(t,e){var n,r,o,i;if(t=t.toLowerCase(),(e=e||{}).type=t,e.target||(e.target=this.scope),e.preventDefault||(e.preventDefault=function(){e.isDefaultPrevented=l},e.stopPropagation=function(){e.isPropagationStopped=l},e.stopImmediatePropagation=function(){e.isImmediatePropagationStopped=l},e.isDefaultPrevented=s,e.isPropagationStopped=s,e.isImmediatePropagationStopped=s),this.settings.beforeFire&&this.settings.beforeFire(e),n=this.bindings[t])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(t,i.func),e.isImmediatePropagationStopped())return e.stopPropagation(),e;if(!1===i.func.call(this.scope,e))return e.preventDefault(),e}return e},yx.prototype.on=function(t,e,n,r){var o,i,a;if(!1===e&&(e=s),e){var u={func:e};for(r&&jn.extend(u,r),a=(i=t.toLowerCase().split(" ")).length;a--;)(o=this.bindings[t=i[a]])||(o=this.bindings[t]=[],this.toggleEvent(t,!0)),n?o.unshift(u):o.push(u)}return this},yx.prototype.off=function(t,e){var n,r,o,i,a;if(t)for(n=(i=t.toLowerCase().split(" ")).length;n--;){if(r=this.bindings[t=i[n]],!t){for(o in this.bindings)this.toggleEvent(o,!1),delete this.bindings[o];return this}if(r){if(e)for(a=r.length;a--;)r[a].func===e&&(r=r.slice(0,a).concat(r.slice(a+1)),this.bindings[t]=r);else r.length=0;r.length||(this.toggleEvent(t,!1),delete this.bindings[t])}}else{for(t in this.bindings)this.toggleEvent(t,!1);this.bindings={}}return this},yx.prototype.once=function(t,e,n){return this.on(t,e,n,{once:!0})},yx.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||0===this.bindings[t].length)},yx);function yx(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||s}function xx(t){return t._eventDispatcher||(t._eventDispatcher=new bx({scope:t,toggleEvent:function(e,n){bx.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher}function wx(t,e,n){try{t.getDoc().execCommand(e,!1,n)}catch(m){}}function Cx(t,e){t.dom().contentEditable=e?"true":"false"}function Sx(t){return!0===t.readonly}function kx(t){t.parser.addAttributeFilter("contenteditable",(function(e){Sx(t)&&$(e,(function(t){t.attr(Nx,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(Nx,(function(e){Sx(t)&&$(e,(function(t){t.attr("contenteditable",t.attr(Nx))}))})),t.serializer.addTempAttr(Nx)}function Ex(t,e){return"selectionchange"===e?t.getDoc():!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e)?t.getDoc().documentElement:t.settings.event_root?(t.eventRoot||(t.eventRoot=Mx.select(t.settings.event_root)[0]),t.eventRoot):t.getBody()}function Ox(t,e,n){!function(t){return!t.hidden&&!Sx(t)}(t)?Sx(t)&&function(t,e){var n=e.target;!function(t){return"click"===t.type}(e)||jf.metaKeyPressed(e)||!function(t,e){return null!==t.dom.getParent(e,"a")}(t,n)||e.preventDefault()}(t,n):t.fire(e,n)}function _x(t,e){var n,r;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed)if(n=Ex(t,e),t.settings.event_root){if(zx||(zx={},t.editorManager.on("removeEditor",(function(){var e;if(!t.editorManager.activeEditor&&zx){for(e in zx)t.dom.unbind(Ex(t,e));zx=null}}))),zx[e])return;zx[e]=r=function(n){for(var r=n.target,o=t.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();a!==r&&!Mx.isChildOf(r,a)||Ox(o[i],e,n)}},Mx.bind(n,e,r)}else Mx.bind(n,e,r=function(n){Ox(t,e,n)}),t.delegates[e]=r}function Tx(e,n,r,o){var i=r[n.get()],a=r[o];try{a.activate()}catch($w){return void t.console.error("problem while activating editor mode "+o+":",$w)}i.deactivate(),i.editorReadOnly!==a.editorReadOnly&&function(t,e){var n=te.fromDom(t.getBody());(function(t,e,n){ia(t,e)&&!1===n?function(t,e){ra(t)?t.dom().classList.remove(e):function(t,e){!function(t,e,n){var r=X(na(t,e),(function(t){return"mce-content-readonly"!==t}));0<r.length?Xe(t,e,r.join(" ")):Gt(t,e)}(t,"class")}(t),function(t){0===(ra(t)?t.dom().classList:function(t){return na(t,"class")}(t)).length&&Gt(t,"class")}(t)}(t,e):n&&oa(t,e)})(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){D.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,Cx(n,!1),function(t){$(aa(t,'*[contenteditable="true"]'),(function(t){Xe(t,Nx,"true"),Cx(t,!1)}))}(n)):(t.readonly=!1,Cx(n,!0),function(t){$(aa(t,"*["+Nx+'="true"]'),(function(t){Gt(t,Nx),Cx(t,!0)}))}(n),wx(t,"StyleWithCSS",!1),wx(t,"enableInlineTableEditing",!1),wx(t,"enableObjectResizing",!1),function(t){return Rl(t)||function(t){return wl().filter((function(e){return!function(t){var e=t.classList;return void 0!==e&&(e.contains("tox-edit-area")||e.contains("tox-edit-area__iframe")||e.contains("mce-content-body"))}(e.dom())&&lf(t,e.dom())})).isSome()}(t)}(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())}(e,a.editorReadOnly),n.set(o),function(t,e){t.fire("SwitchMode",{mode:e})}(e,o)}var zx,Ax={fire:function(t,e,n){if(this.removed&&"remove"!==t&&"detach"!==t)return e;var r=xx(this).fire(t,e);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(t,r,!1),o=o.parent();return r},on:function(t,e,n){return xx(this).on(t,e,n)},off:function(t,e){return xx(this).off(t,e)},once:function(t,e){return xx(this).once(t,e)},hasEventListeners:function(t){return xx(this).has(t)}},Nx="data-mce-contenteditable",Mx=Ui.DOM,Bx=tt(tt({},Ax),{bindPendingEventDelegates:function(){var t=this;jn.each(t._pendingNativeEvents,(function(e){_x(t,e)}))},toggleNativeEvent:function(t,e){var n=this;"focus"!==t&&"blur"!==t&&(e?n.initialized?_x(n,t):n._pendingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&(n.dom.unbind(Ex(n,t),t,n.delegates[t]),delete n.delegates[t]))},unbindAllNativeEvents:function(){var t,e=this,n=e.getBody(),r=e.dom;if(e.delegates){for(t in e.delegates)e.dom.unbind(Ex(e,t),t,e.delegates[t]);delete e.delegates}!e.inline&&n&&r&&(n.onload=null,r.unbind(e.getWin()),r.unbind(e.getDoc())),r&&(r.unbind(n),r.unbind(e.getContainer()))}}),Rx=["design","readonly"],Dx=jn.each,Hx=jn.explode,Ix={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Px=jn.makeMap("alt,ctrl,shift,meta,access"),Lx=(Fx.prototype.add=function(t,e,n,r){var o,i=this;return"string"==typeof(o=n)?n=function(){i.editor.execCommand(o,!1,null)}:jn.isArray(o)&&(n=function(){i.editor.execCommand(o[0],o[1],o[2])}),Dx(Hx(jn.trim(t)),(function(t){var o=i.createShortcut(t,e,n,r);i.shortcuts[o.id]=o})),!0},Fx.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},Fx.prototype.parseShortcut=function(t){var e,n,r={};for(n in Dx(Hx(t.toLowerCase(),"+"),(function(t){t in Px?r[t]=!0:/^[0-9]{2,}$/.test(t)?r.keyCode=parseInt(t,10):(r.charCode=t.charCodeAt(0),r.keyCode=Ix[t]||t.toUpperCase().charCodeAt(0))})),e=[r.keyCode],Px)r[n]?e.push(n):r[n]=!1;return r.id=e.join(","),r.access&&(r.alt=!0,Pn.mac?r.ctrl=!0:r.shift=!0),r.meta&&(Pn.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},Fx.prototype.createShortcut=function(t,e,n,r){var o;return(o=jn.map(Hx(t,">"),this.parseShortcut))[o.length-1]=jn.extend(o[o.length-1],{func:n,scope:r||this.editor}),jn.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},Fx.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},Fx.prototype.isFunctionKey=function(t){return"keydown"===t.type&&112<=t.keyCode&&t.keyCode<=123},Fx.prototype.matchShortcut=function(t,e){return!!e&&e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&e.alt===t.altKey&&e.shift===t.shiftKey&&!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0)},Fx.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},Fx);function Fx(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var e=this;t.on("keyup keypress keydown",(function(t){!e.hasModifier(t)&&!e.isFunctionKey(t)||t.isDefaultPrevented()||(Dx(e.shortcuts,(function(n){if(e.matchShortcut(t,n))return e.pendingPatterns=n.subpatterns.slice(0),"keydown"===t.type&&e.executeShortcutAction(n),!0})),e.matchShortcut(t,e.pendingPatterns[0])&&(1===e.pendingPatterns.length&&"keydown"===t.type&&e.executeShortcutAction(e.pendingPatterns[0]),e.pendingPatterns.shift()))}))}function Vx(){var t=function(){function t(t,e){return function(n,r){return t[n.toLowerCase()]=tt(tt({},r),{type:e})}}var e={},n={},r={},o={},i={},a={},u={};return{addButton:t(e,"button"),addGroupToolbarButton:t(e,"grouptoolbarbutton"),addToggleButton:t(e,"togglebutton"),addMenuButton:t(e,"menubutton"),addSplitButton:t(e,"splitbutton"),addMenuItem:t(n,"menuitem"),addNestedMenuItem:t(n,"nestedmenuitem"),addToggleMenuItem:t(n,"togglemenuitem"),addAutocompleter:t(r,"autocompleter"),addContextMenu:t(i,"contextmenu"),addContextToolbar:t(a,"contexttoolbar"),addContextForm:t(a,"contextform"),addSidebar:t(u,"sidebar"),addIcon:function(t,e){return o[t.toLowerCase()]=e},getAll:function(){return{buttons:e,menuItems:n,icons:o,popups:r,contextMenus:i,contextToolbars:a,sidebars:u}}}}();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,getAll:t.getAll}}var Ux=jn.each,jx=jn.trim,Wx="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),qx={ftp:21,http:80,https:443,mailto:25},Gx=($x.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},$x.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},$x.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},$x.prototype.toRelative=function(t){var e;if("./"===t)return t;var n=new $x(t,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(e=this.toRelPath(this.path,n.path),n.query&&(e+="?"+n.query),n.anchor&&(e+="#"+n.anchor),e)},$x.prototype.toAbsolute=function(t,e){var n=new $x(t,{base_uri:this});return n.getURI(e&&this.isSameOrigin(n))},$x.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=qx[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},$x.prototype.toRelPath=function(t,e){var n,r,o,i=0,a="",u=t.substring(0,t.lastIndexOf("/")).split("/");if(n=e.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return e;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},$x.prototype.toAbsPath=function(t,e){var n,r,o,i=0,a=[];r=/\/$/.test(e)?"/":"";var u=t.split("/"),c=e.split("/");for(Ux(u,(function(t){t&&a.push(t)})),u=a,n=c.length-1,a=[];0<=n;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?0<i?i--:a.push(c[n]):i++);return 0!==(o=(n=u.length-i)<=0?E(a).join("/"):u.slice(0,n).join("/")+"/"+E(a).join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},$x.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(e+=this.protocol?this.protocol+"://":"//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},$x);function $x(e,n){e=jx(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var a=this.settings.base_uri?this.settings.base_uri.path:new $x(t.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(a,e);else{var u=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,u[1])+u[2]}}e=e.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);Ux(Wx,(function(t,e){var n=c[e];n=n&&n.replace(/\(mce_at\)/g,"@@"),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}var Xx=Ui.DOM,Kx=jn.extend,Yx=jn.each,Jx=jn.resolve,Zx=Pn.ie,Qx=(tw.prototype.render=function(){!function(n){var r=n.settings,o=n.id;Zi.setCode(Fc(n));var i=function(){ux.unbind(t.window,"ready",i),n.render()};if(Fr.Event.domLoaded){if(n.getElement()&&Pn.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||ux.getParent(o,"form");a&&(n.formElement=a,r.hidden_input&&!$e.isTextareaOrInput(n.getElement())&&(ux.insertAfter(ux.create("input",{type:"hidden",name:o}),o),n.hasHiddenInput=!0),n.formEventDelegate=function(t){n.fire(t.type,t)},ux.bind(a,"submit reset",n.formEventDelegate),n.on("reset",(function(){n.resetContent()})),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=Mf(n),n.notificationManager=zf(n),"xml"===r.encoding&&n.on("GetContent",(function(t){t.save&&(t.content=ux.encode(t.content))})),r.add_form_submit_trigger&&n.on("submit",(function(){n.initialized&&n.save()})),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),function(t,n){var r=Gi.ScriptLoader;!function(t,e,n,r){var o=e.settings,i=o.theme;if(H(i)){if(!Py(i)&&!Nf.urls.hasOwnProperty(i)){var a=o.theme_url;Nf.load(i,a?e.documentBaseURI.toAbsolute(a):"themes/"+i+"/theme"+n+".js")}t.loadQueue((function(){Nf.waitFor(i,r)}))}else r()}(r,t,n,(function(){!function(t,n){var r=Fc(n),o=function(t){return t.getParam("language_url","","string")}(n);if(!1===Zi.hasCode(r)&&"en"!==r){var i=""!==o?o:n.editorManager.baseURL+"/langs/"+r+".js";t.add(i,e,void 0,(function(){Pf.languageLoadError(n,i,r)}))}}(r,t),function(t,n){(function(t){return D.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return 0<t.length})).map((function(t){return{url:t,name:D.none()}}))})(n).orThunk((function(){return function(t){return D.from(function(t){return t.getParam("icons","","string")}(t)).filter((function(t){return 0<t.length&&!Sf.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons.js",name:D.some(e)}}))}(n)})).each((function(r){t.add(r.url,e,void 0,(function(){Pf.iconsLoadError(n,r.url,r.name.getOrUndefined())}))}))}(r,t),function(t,n,r){P(n.plugins)&&(n.plugins=n.plugins.join(" ")),jn.each(n.external_plugins,(function(r,o){Af.load(o,r,e,void 0,(function(){Pf.pluginLoadError(t,r,o)})),n.plugins+=" "+o})),jn.each(n.plugins.split(/[ ,]/),(function(n){if((n=jn.trim(n))&&!Af.urls[n])if(Py(n)){n=n.substr(1,n.length);var o=Af.dependencies(n);jn.each(o,(function(n){var o=Af.createUrl({prefix:"plugins/",resource:n,suffix:"/plugin"+r+".js"},n);Af.load(o.resource,o,e,void 0,(function(){Pf.pluginLoadError(t,o.prefix+o.resource+o.suffix,o.resource)}))}))}else{var i={prefix:"plugins/",resource:n,suffix:"/plugin"+r+".js"};Af.load(n,i,e,void 0,(function(){Pf.pluginLoadError(t,i.prefix+i.resource+i.suffix,n)}))}}))}(t,t.settings,n),r.loadQueue((function(){t.removed||ax(t)}),t,(function(){t.removed||ax(t)}))}))}(n,n.suffix)}}else ux.bind(t.window,"ready",i)}(this)},tw.prototype.focus=function(t){!function(t,e){t.removed||(e?ff(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===Rl(t)&&af(t).each((function(e){t.selection.setRng(e),r=e}));var o=function(t,e){return t.dom.getParent(e,(function(e){return"true"===t.dom.getContentEditable(e)}))}(t,e.getNode());if(t.$.contains(n,o))return Bl(o),Ml(t,r),ff(t);t.inline||(Pn.opera||Bl(n),t.getWin().focus()),(Pn.gecko||t.inline)&&(Bl(n),Ml(t,r)),ff(t)}(t))}(this,t)},tw.prototype.hasFocus=function(){return df(this)},tw.prototype.execCallback=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r,o=this.settings[t];if(o)return this.callbackLookup&&(r=this.callbackLookup[t])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?Jx(r):0,o=Jx(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[t]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},tw.prototype.translate=function(t){return Zi.translate(t)},tw.prototype.getParam=function(t,e,n){return function(t,e,n,r){var o=e in t.settings?t.settings[e]:n;return"hash"===r?function(t){var e={};return"string"==typeof t?$(0<t.indexOf("=")?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");e[jn.trim(n[0])]=jn.trim(1<n.length?n[1]:n[0])})):e=t,e}(o):"string"===r?Ul(H,t,e).getOr(n):"number"===r?Ul(U,t,e).getOr(n):"boolean"===r?Ul(F,t,e).getOr(n):"object"===r?Ul(I,t,e).getOr(n):"array"===r?Ul(P,t,e).getOr(n):"string[]"===r?Ul(function(t){return function(e){return P(e)&&k(e,t)}}(H),t,e).getOr(n):"function"===r?Ul(V,t,e).getOr(n):o}(this,t,e,n)},tw.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},tw.prototype.addCommand=function(t,e,n){this.editorCommands.addCommand(t,e,n)},tw.prototype.addQueryStateHandler=function(t,e,n){this.editorCommands.addQueryStateHandler(t,e,n)},tw.prototype.addQueryValueHandler=function(t,e,n){this.editorCommands.addQueryValueHandler(t,e,n)},tw.prototype.addShortcut=function(t,e,n,r){this.shortcuts.add(t,e,n,r)},tw.prototype.execCommand=function(t,e,n,r){return this.editorCommands.execCommand(t,e,n,r)},tw.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},tw.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},tw.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},tw.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(Xx.show(this.getContainer()),Xx.hide(this.id)),this.load(),this.fire("show"))},tw.prototype.hide=function(){var t=this,e=t.getDoc();t.hidden||(Zx&&e&&!t.inline&&e.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(Xx.hide(t.getContainer()),Xx.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},tw.prototype.isHidden=function(){return!!this.hidden},tw.prototype.setProgressState=function(t,e){this.fire("ProgressState",{state:t,time:e})},tw.prototype.load=function(t){var e,n=this.getElement();if(this.removed)return"";if(n){(t=t||{}).load=!0;var r=$e.isTextareaOrInput(n)?n.value:n.innerHTML;return e=this.setContent(r,t),t.element=n,t.no_events||this.fire("LoadContent",t),t.element=n=null,e}},tw.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(t=t||{}).save=!0,t.element=o,t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,$e.isTextareaOrInput(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=Xx.getParent(r.id,"form"))&&Yx(n.elements,(function(t){if(t.name===r.id)return t.value=e,!1}))),t.element=o=null,!1!==t.set_dirty&&r.setDirty(!1),e},tw.prototype.setContent=function(t,e){return Il(this,t,e)},tw.prototype.getContent=function(t){return function(t,e){return void 0===e&&(e={}),D.from(t.getBody()).fold(r("tree"===e.format?new dl("body",11):""),(function(n){return function(t,e,n){var r;if(e.format=e.format?e.format:"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),"raw"===e.format)r=jn.trim(Kl.trimExternal(t.serializer,n.innerHTML));else if("text"===e.format)r=Ya.trim(n.innerText||n.textContent);else{if("tree"===e.format)return t.serializer.serialize(n,e);r=function(t,e){var n=Ac(t),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")}(t,t.serializer.serialize(n,e))}return e.content="text"===e.format||ir(te.fromDom(n))?r:jn.trim(r),e.no_events||t.fire("GetContent",e),e.content}(t,e,n)}))}(this,t)},tw.prototype.insertContent=function(t,e){e&&(t=Kx({content:t},e)),this.execCommand("mceInsertContent",!1,t)},tw.prototype.resetContent=function(t){void 0===t?Il(this,this.startContent,{format:"raw"}):Il(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},tw.prototype.isDirty=function(){return!this.isNotDirty},tw.prototype.setDirty=function(t){var e=!this.isNotDirty;this.isNotDirty=!t,t&&t!==e&&this.fire("dirty")},tw.prototype.getContainer=function(){return this.container||(this.container=Xx.get(this.editorContainer||this.id+"_parent")),this.container},tw.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},tw.prototype.getElement=function(){return this.targetElm||(this.targetElm=Xx.get(this.id)),this.targetElm},tw.prototype.getWin=function(){var t;return this.contentWindow||(t=this.iframeElement)&&(this.contentWindow=t.contentWindow),this.contentWindow},tw.prototype.getDoc=function(){var t;return this.contentDocument||(t=this.getWin())&&(this.contentDocument=t.document),this.contentDocument},tw.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},tw.prototype.convertURL=function(t,e,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",t,n,!0,e):!r.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:r.relative_urls?this.documentBaseURI.toRelative(t):t=this.documentBaseURI.toAbsolute(t,r.remove_script_host)},tw.prototype.addVisual=function(t){var e,n=this,r=n.settings,o=n.dom;t=t||n.getBody(),void 0===n.hasVisual&&(n.hasVisual=r.visual),Yx(o.select("table,a",t),(function(t){var i;switch(t.nodeName){case"TABLE":return e=r.visual_table_class||"mce-item-table",void((i=o.getAttrib(t,"border"))&&"0"!==i||!n.hasVisual?o.removeClass(t,e):o.addClass(t,e));case"A":return void(o.getAttrib(t,"href")||(i=o.getAttrib(t,"name")||t.id,e=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(t,e):o.removeClass(t,e)))}})),n.fire("VisualAid",{element:t,hasVisual:n.hasVisual})},tw.prototype.remove=function(){!function(t){if(!t.removed){var e=t._selectionOverrides,n=t.editorUpload,r=t.getBody(),o=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&o&&mf.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){mf.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),mf.remove(t.getContainer()),Pl(e),Pl(n),t.destroy()}}(this)},tw.prototype.destroy=function(t){!function(t,e){var n=t.selection,r=t.dom;t.destroyed||(e||t.removed?(e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),Pl(n),Pl(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),mf.unbind(e,"submit reset",t.formEventDelegate))}(t),function(t){t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null)}(t),t.destroyed=!0):t.remove())}(this,t)},tw.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},tw.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},tw.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},tw.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},tw.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},tw.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},tw);function tw(n,r,o){var a=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=o,this.documentBaseUrl=o.documentBaseURL,Kx(this,Bx),this.settings=function(t,e,n,r,o){var a=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:Vl(t,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return tt(tt({},i),r?Cf:{})}(o,e,n,bf,t);return function(t,e,n,r,o){var a=t?{mobile:function(t,e){var n={resize:!1,toolbar_mode:Vl(t,"scrolling"),toolbar_sticky:!1};return tt(tt(tt({},Cf),n),e?{menubar:!1}:{})}(o,e)}:{},u=function(t,e){var n=M(e,(function(e,n){return v(t,n)}));return pf(n.t,n.f)}(["mobile"],hf(a,o)),c=jn.extend(n,r,u.settings(),function(t,e){return t&&Fl(e,"mobile")}(t,u)?function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=r.hasOwnProperty(e)?r[e]:{};return jn.extend({},n,o)}(u,"mobile"):{},{validate:!0,external_plugins:function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?jn.extend({},t.external_plugins,n):n}(r,u.settings())});return function(t,e,n,r){var o=Ll(n.forced_plugins),a=Ll(r.plugins),u=function(t,e){return Fl(t,e)?t.sections()[e]:{}}(e,"mobile"),c=u.plugins?Ll(u.plugins):a,s=function(t,e){return[].concat(Ll(t)).concat(Ll(e))}(o,t&&function(t,e,n){var r=t.sections();return Fl(t,e)&&"mobile"===r[e].theme}(e,"mobile")?function(t){return X(t,i(v,wf))}(c):t&&Fl(e,"mobile")?c:a);return jn.extend(r,{plugins:s.join(" ")})}(t,u,r,c)}(yf||xf,yf,a,r,o)}(this,n,this.documentBaseUrl,o.defaultSettings,r),this.settings.suffix&&(o.suffix=this.settings.suffix),this.suffix=o.suffix,this.settings.base_url&&o._setBaseUrl(this.settings.base_url),this.baseUri=o.baseURI,this.settings.referrer_policy&&(Gi.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Ui.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ua.languageLoad=this.settings.language_load,ua.baseURL=o.baseURL,this.id=n,this.setDirty(!1),this.documentBaseURI=new Gx(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new Lx(this),this.editorCommands=new hx(this),this.settings.cache_suffix&&(Pn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:Vx()};var u=function(n){var r=ee("design"),o=ee({design:{activate:e,deactivate:e,editorReadOnly:!1},readonly:{activate:e,deactivate:e,editorReadOnly:!0}});return function(t){t.serializer?kx(t):t.on("PreInit",(function(){kx(t)}))}(n),function(t){t.on("ShowCaret",(function(e){Sx(t)&&e.preventDefault()})),t.on("ObjectSelected",(function(e){Sx(t)&&e.preventDefault()}))}(n),{isReadOnly:function(){return Sx(n)},set:function(t){return function(t,e,n,r){if(r!==n.get()){if(!Q(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?Tx(t,n,e,r):t.on("init",(function(){return Tx(t,n,e,r)}))}}(n,o.get(),r,t)},get:function(){return r.get()},register:function(e,n){o.set(function(e,n,r){var o;if(v(Rx,n))throw new Error("Cannot override default mode "+n);return tt(tt({},e),((o={})[n]=tt(tt({},r),{deactivate:function(){try{r.deactivate()}catch($w){t.console.error("problem while deactivating editor mode "+n+":",$w)}}}),o))}(o.get(),e,n))}}}(this);this.mode=u,this.setMode=u.set,o.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ai.overrideDefaults((function(){return{context:a.inline?a.getBody():a.getDoc(),element:a.getBody()}}))}function ew(t){var e=t.type;cw(hw.get(),(function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t)}}))}function nw(t){t!==fw&&(t?Ai(window).on("resize scroll",ew):Ai(window).off("resize scroll",ew),fw=t)}function rw(t){var e=mw;delete dw[t.id];for(var n=0;n<dw.length;n++)if(dw[n]===t){dw.splice(n,1);break}return mw=X(mw,(function(e){return t!==e})),hw.activeEditor===t&&(hw.activeEditor=0<mw.length?mw[0]:null),hw.focusedEditor===t&&(hw.focusedEditor=null),e.length!==mw.length}var ow,iw,aw=Ui.DOM,uw=jn.explode,cw=jn.each,sw=jn.extend,lw=0,fw=!1,dw=[],mw=[],gw="CSS1Compat"!==t.document.compatMode,hw=tt(tt({},Ax),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ai,majorVersion:"5",minorVersion:"2.0",releaseDate:"2020-02-13",editors:dw,i18n:Zi,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,n,r="";n=Gx.getDocumentBaseUrl(t.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));var o=window.tinymce||window.tinyMCEPreInit;if(o)e=o.base||o.baseURL,r=o.suffix;else{for(var a=t.document.getElementsByTagName("script"),u=0;u<a.length;u++){var c;if(""!==(c=a[u].src||"")){var s=c.substring(c.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(c)){-1!==s.indexOf(".min")&&(r=".min"),e=c.substring(0,c.lastIndexOf("/"));break}}}!e&&t.document.currentScript&&(-1!==(c=t.document.currentScript.src).indexOf(".min")&&(r=".min"),e=c.substring(0,c.lastIndexOf("/")))}this.baseURL=new Gx(n).toAbsolute(e),this.documentBaseURL=n,this.baseURI=new Gx(this.baseURL),this.suffix=r,function(t){t.on("AddEditor",i(Al,t)),t.on("RemoveEditor",i(Nl,t))}(this)},overrideDefaults:function(t){var e;(e=t.base_url)&&this._setBaseUrl(e),t.suffix&&(this.suffix=t.suffix);var n=(this.defaultSettings=t).plugin_base_urls;for(var r in n)ua.PluginManager.urls[r]=n[r]},init:function(e){var n,r,o=this;function i(t){var e=t.id;return e||(e=(e=t.name)&&!aw.get(e)?t.name:aw.uniqueId(),t.setAttribute("id",e)),e}function a(t,e){return e.constructor===RegExp?e.test(t.className):aw.hasClass(t,e)}r=jn.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"," ");var u=function(t){n=t},c=function(){function n(t,e,n){var r=new Qx(t,e,o);f.push(r),r.on("init",(function(){++l===s.length&&u(f)})),r.targetElm=r.targetElm||n,r.render()}var s,l=0,f=[];aw.unbind(window,"ready",c),function(t){var n=e[t];n&&n.apply(o,Array.prototype.slice.call(arguments,2))}("onpageload"),s=Ai.unique(function(e){var n,r=[];if(Pn.browser.isIE()&&Pn.browser.version.major<11)return Pf.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(gw)return Pf.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(e.types)return cw(e.types,(function(t){r=r.concat(aw.select(t.selector))})),r;if(e.selector)return aw.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":0<(n=e.elements||"").length&&cw(uw(n),(function(e){var n;(n=aw.get(e))?r.push(n):cw(t.document.forms,(function(t){cw(t.elements,(function(t){t.name===e&&(e="mce_editor_"+lw++,aw.setAttrib(t,"id",e),r.push(t))}))}))}));break;case"textareas":case"specific_textareas":cw(aw.select("textarea"),(function(t){e.editor_deselector&&a(t,e.editor_deselector)||e.editor_selector&&!a(t,e.editor_selector)||r.push(t)}))}return r}(e)),e.types?cw(e.types,(function(t){jn.each(s,(function(r){return!aw.is(r,t.selector)||(n(i(r),sw({},e,t),r),!1)}))})):(jn.each(s,(function(t){!function(t){t&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(rw(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}(o.get(t.id))})),0===(s=jn.grep(s,(function(t){return!o.get(t.id)}))).length?u([]):cw(s,(function(t){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(e,t)?n(i(t),e,t):Pf.initError("Could not initialize inline editor on invalid inline target element",t)})))};return o.settings=e,aw.bind(window,"ready",c),new mn((function(t){n?t(n):u=function(e){t(e)}}))},get:function(t){return 0===arguments.length?mw.slice(0):H(t)?w(mw,(function(e){return e.id===t})).getOr(null):U(t)&&mw[t]?mw[t]:null},add:function(t){var e=this;return dw[t.id]===t||(null===e.get(t.id)&&(function(t){return"length"!==t}(t.id)&&(dw[t.id]=t),dw.push(t),mw.push(t)),nw(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),ow||(ow=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",ow))),t},createEditor:function(t,e){return this.add(new Qx(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!H(t))return L(r.get((n=t).id))?null:(rw(n)&&r.fire("RemoveEditor",{editor:n}),0===mw.length&&window.removeEventListener("beforeunload",ow),n.remove(),nw(0<mw.length),n);cw(aw.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=mw.length-1;0<=e;e--)r.remove(mw[e])},execCommand:function(t,e,n){var r=this.get(n);switch(t){case"mceAddEditor":return this.get(n)||new Qx(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(t,e,n)},triggerSave:function(){cw(mw,(function(t){t.save()}))},addI18n:function(t,e){Zi.add(t,e)},translate:function(t){return Zi.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Gx(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Gx(this.baseURL)}});function pw(t){return{walk:function(e,n){return rl(t,e,n)},split:zm,normalize:function(e){return Zd(t,e).fold(r(!1),(function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0}))}}}function vw(t,e,n){var r,o,i,a,u,c;return r=e.x,o=e.y,i=t.w,a=t.h,u=e.w,c=e.h,"b"===(n=(n||"").split(""))[0]&&(o+=c),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=_w(c/2)),"c"===n[1]&&(r+=_w(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=_w(a/2)),"c"===n[4]&&(r-=_w(i/2)),Tw(r,o,i,a)}function bw(){}hw.setup(),(iw=pw=pw||{}).compareRanges=Jd,iw.getCaretRangeFromPoint=Hd,iw.getSelectedNode=Da,iw.getNode=Ha;var yw,xw,ww,Cw,Sw=pw,kw=(yw={},xw={},{load:function(e,n){var r='Script at URL "'+n+'" failed to load',o='Script at URL "'+n+"\" did not call `tinymce.Resource.add('"+e+"', data)` within 1 second";if(void 0!==yw[e])return yw[e];var i=new mn((function(i,a){var u=function(e,n,r){function o(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];i||(i=!0,null!==a&&(t.clearTimeout(a),a=null),e.apply(null,n))}}void 0===r&&(r=1e3);var i=!1,a=null,u=o(e),c=o(n);return{start:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];i||null!==a||(a=t.setTimeout((function(){return c.apply(null,e)}),r))},resolve:u,reject:c}}(i,a);xw[e]=u.resolve,Gi.ScriptLoader.loadScript(n,(function(){return u.start(o)}),(function(){return u.reject(r)}))}));return yw[e]=i},add:function(t,e){void 0!==xw[t]&&(xw[t](e),delete xw[t]),yw[t]=mn.resolve(e)}}),Ew=Math.min,Ow=Math.max,_w=Math.round,Tw=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},zw={inflate:function(t,e,n){return Tw(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:vw,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if((o=vw(t,e,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(t,e){var n,r,o,i;return n=Ow(t.x,e.x),r=Ow(t.y,e.y),o=Ew(t.x+t.w,e.x+e.w),i=Ew(t.y+t.h,e.y+e.h),o-n<0||i-r<0?null:Tw(n,r,o-n,i-r)},clamp:function(t,e,n){var r,o,i,a,u,c,s,l,f,d;return c=t.y,s=t.x+t.w,l=t.y+t.h,f=e.x+e.w,d=e.y+e.h,r=Ow(0,e.x-(u=t.x)),o=Ow(0,e.y-c),i=Ow(0,s-f),a=Ow(0,l-d),u+=r,c+=o,n&&(s+=r,l+=o,u-=i,c-=a),Tw(u,c,(s-=i)-u,(l-=a)-c)},create:Tw,fromClientRect:function(t){return Tw(t.left,t.top,t.width,t.height)}},Aw=jn.each,Nw=jn.extend;bw.extend=ww=function(t){function e(){var t,e,n;if(!Cw&&(this.init&&this.init.apply(this,arguments),e=this.Mixins))for(t=e.length;t--;)(n=e[t]).init&&n.init.apply(this,arguments)}function n(){return this}function r(t,e){return function(){var n,r=this._super;return this._super=u[t],n=e.apply(this,arguments),this._super=r,n}}var o,i,a,u=this.prototype;for(i in Cw=!0,o=new this,Cw=!1,t.Mixins&&(Aw(t.Mixins,(function(e){for(var n in e)"init"!==n&&(t[n]=e[n])})),u.Mixins&&(t.Mixins=u.Mixins.concat(t.Mixins))),t.Methods&&Aw(t.Methods.split(","),(function(e){t[e]=n})),t.Properties&&Aw(t.Properties.split(","),(function(e){var n="_"+e;t[e]=function(t){return void 0!==t?(this[n]=t,this):this[n]}})),t.Statics&&Aw(t.Statics,(function(t,n){e[n]=t})),t.Defaults&&u.Defaults&&(t.Defaults=Nw({},u.Defaults,t.Defaults)),t)o[i]="function"==typeof(a=t[i])&&u[i]?r(i,a):a;return e.prototype=o,(e.constructor=e).extend=ww,e};var Mw,Bw,Rw,Dw,Hw=Math.min,Iw=Math.max,Pw=Math.round,Lw={serialize:function(t){var e=JSON.stringify(t);return H(e)?e.replace(/[\u0080-\uFFFF]/g,(function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e})):e},parse:function(t){try{return JSON.parse(t)}catch(c){}}},Fw={callbacks:{},count:0,send:function(t){var e=this,n=Ui.DOM,r=void 0!==t.count?t.count:e.count,o="tinymce_jsonp_"+r;e.callbacks[r]=function(i){n.remove(o),delete e.callbacks[r],t.callback(i)},n.add(n.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),e.count++}},Vw=tt(tt({},Ax),{send:function(e){var n,r=0,o=function(){!e.async||4===n.readyState||1e4<r++?(e.success&&r<1e4&&200===n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,1e4<r?"TIMED_OUT":"GENERAL",n,e),n=null):zn.setTimeout(o,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",Vw.fire("beforeInitialize",{settings:e}),n=new t.XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(n.withCredentials=!0),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&jn.each(e.requestheaders,(function(t){n.setRequestHeader(t.key,t.value)})),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),(n=Vw.fire("beforeSend",{xhr:n,settings:e}).xhr).send(e.data),!e.async)return o();zn.setTimeout(o,10)}}}),Uw=jn.extend,jw=(Ww.sendRPC=function(t){return(new Ww).send(t)},Ww.prototype.send=function(t){var e=t.error,n=t.success,r=Uw(this.settings,t);r.success=function(t,o){void 0===(t=Lw.parse(t))&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=Lw.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",Vw.send(r)},Ww);function Ww(t){this.settings=Uw({},t),this.count=0}try{Mw=t.window.localStorage}catch($w){Bw={},Rw=[],Dw={getItem:function(t){return Bw[t]||null},setItem:function(t,e){Rw.push(t),Bw[t]=String(e)},key:function(t){return Rw[t]},removeItem:function(t){Rw=Rw.filter((function(e){return e===t})),delete Bw[t]},clear:function(){Rw=[],Bw={}},length:0},Object.defineProperty(Dw,"length",{get:function(){return Rw.length},configurable:!1,enumerable:!1}),Mw=Dw}var qw,Gw=jn.extend(hw,{geom:{Rect:zw},util:{Promise:mn,Delay:zn,Tools:jn,VK:jf,URI:Gx,Class:bw,EventDispatcher:bx,Observable:Ax,I18n:Zi,XHR:Vw,JSON:Lw,JSONRequest:jw,JSONP:Fw,LocalStorage:Mw,Color:function(t){function e(t){var e;return"object"==typeof t?"r"in t?(r=t.r,o=t.g,i=t.b):"v"in t&&function(t,e,n){var a,u,c,s;if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,n=parseInt(n,10)/100,e=Iw(0,Hw(e,1)),n=Iw(0,Hw(n,1)),0!==e){switch(a=t/60,c=(u=n*e)*(1-Math.abs(a%2-1)),s=n-u,Math.floor(a)){case 0:r=u,o=c,i=0;break;case 1:r=c,o=u,i=0;break;case 2:r=0,o=u,i=c;break;case 3:r=0,o=c,i=u;break;case 4:r=c,o=0,i=u;break;case 5:r=u,o=0,i=c;break;default:r=o=i=0}r=Pw(255*(r+s)),o=Pw(255*(o+s)),i=Pw(255*(i+s))}else r=o=i=Pw(255*n)}(t.h,t.s,t.v):(e=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(r=parseInt(e[1],10),o=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(r=parseInt(e[1],16),o=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(r=parseInt(e[1]+e[1],16),o=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16)),r=r<0?0:255<r?255:r,o=o<0?0:255<o?255:o,i=i<0?0:255<i?255:i,n}var n={},r=0,o=0,i=0;return t&&e(t),n.toRgb=function(){return{r:r,g:o,b:i}},n.toHsv=function(){return function(t,e,n){var r,o,i,a;return o=0,(i=Hw(t/=255,Hw(e/=255,n/=255)))===(a=Iw(t,Iw(e,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:Pw(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/((o=a)-i))),s:Pw(100*r),v:Pw(100*o)})}(r,o,i)},n.toHex=function(){function t(t){return 1<(t=parseInt(t,10).toString(16)).length?t:"0"+t}return"#"+t(r)+t(o)+t(i)},n.parse=e,n}},dom:{EventUtils:Fr,Sizzle:Uo,DomQuery:Ai,TreeWalker:Ni,TextSeeker:Vu,DOMUtils:Ui,ScriptLoader:Gi,RangeUtils:Sw,Serializer:am,ControlSelection:Ff,BookmarkManager:Vf,Selection:em,Event:Fr.Event},html:{Styles:Dr,Entities:br,Node:dl,Schema:Tr,SaxParser:Xl,DomParser:om,Writer:bl,Serializer:yl},Env:Pn,AddOnManager:ua,Annotator:al,Formatter:jg,UndoManager:Yg,EditorCommands:hx,WindowManager:Mf,NotificationManager:zf,EditorObservable:Bx,Shortcuts:Lx,Editor:Qx,FocusManager:uf,EditorManager:hw,DOM:Ui.DOM,ScriptLoader:Gi.ScriptLoader,PluginManager:ua.PluginManager,ThemeManager:ua.ThemeManager,IconManager:Sf,Resource:kw,trim:jn.trim,isArray:jn.isArray,is:jn.is,toArray:jn.toArray,makeMap:jn.makeMap,each:jn.each,map:jn.map,grep:jn.grep,inArray:jn.inArray,extend:jn.extend,create:jn.create,walk:jn.walk,createNS:jn.createNS,resolve:jn.resolve,explode:jn.explode,_addCacheSuffix:jn._addCacheSuffix,isOpera:Pn.opera,isWebKit:Pn.webkit,isIE:Pn.ie,isGecko:Pn.gecko,isMac:Pn.mac});qw=Gw,window.tinymce=qw,window.tinyMCE=qw,function(t){if("object"==typeof module)try{module.exports=t}catch(c){}}(Gw)}(window),function(t){"use strict";var e=function(){},n=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},r=function(t){return function(){return t}},o=function(t){return t};function i(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var a=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},u=function(t){return function(){throw new Error(t)}},c=r(!1),s=r(!0),l=tinymce.util.Tools.resolve("tinymce.ThemeManager"),f=function(){return(f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function d(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function m(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var g,h=function(){return p},p=function(){var t=function(t){return t.isNone()},n=function(t){return t()},o=function(t){return t},i={fold:function(t,e){return t()},is:c,isSome:c,isNone:s,getOr:o,getOrThunk:n,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:r(null),getOrUndefined:r(void 0),or:o,orThunk:n,map:h,each:e,bind:h,exists:c,forall:s,filter:h,equals:t,equals_:t,toArray:function(){return[]},toString:r("none()")};return Object.freeze&&Object.freeze(i),i}(),v=function(t){var e=r(t),n=function(){return i},o=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:s,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:o,exists:o,forall:o,filter:function(e){return e(t)?i:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(c,(function(e){return n(t,e)}))}};return i},b={some:v,none:h,from:function(t){return null==t?p:v(t)}},y=function(t){return{is:function(e){return t===e},isValue:s,isError:c,getOr:r(t),getOrThunk:r(t),getOrDie:r(t),or:function(e){return y(t)},orThunk:function(e){return y(t)},fold:function(e,n){return n(t)},map:function(e){return y(e(t))},mapError:function(e){return y(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return b.some(t)}}},x=function(t){return{is:c,isValue:c,isError:s,getOr:o,getOrThunk:function(t){return t()},getOrDie:function(){return u(String(t))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return x(t)},mapError:function(e){return x(e(t))},each:e,bind:function(e){return x(t)},exists:c,forall:s,toOption:b.none}},w={value:y,error:x,fromOption:function(t,e){return t.fold((function(){return x(e)}),y)}},C=function(t){return function(e){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(e)===t}},S=C("string"),k=C("object"),E=C("array"),O=C("boolean"),_=C("function"),T=C("number"),z=function(t,e){if(E(t)){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n]))return!1;return!0}return!1},A=Array.prototype.slice,N=Array.prototype.indexOf,M=Array.prototype.push,B=function(t,e){return N.call(t,e)},R=function(t,e){return B(t,e)>-1},D=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1},H=function(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=A.call(t,r,r+e);n.push(o)}return n},I=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++)r[o]=e(t[o],o);return r},P=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},L=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},F=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])}(t,(function(t){n=e(n,t)})),n},V=function(t,e,n){return P(t,(function(t){n=e(n,t)})),n},U=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return b.some(o)}return b.none()},j=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return b.some(n);return b.none()},W=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!E(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);M.apply(e,t[n])}return e},q=function(t,e){return W(I(t,e))},G=function(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0},$=function(t){var e=A.call(t,0);return e.reverse(),e},X=function(t,e){return L(t,(function(t){return!R(e,t)}))},K=function(t){return[t]},Y=function(t,e){var n=A.call(t,0);return n.sort(e),n},J=function(t){return 0===t.length?b.none():b.some(t[0])},Z=function(t){return 0===t.length?b.none():b.some(t[t.length-1])},Q=_(Array.from)?Array.from:function(t){return A.call(t)},tt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return b.none()},et=Object.keys,nt=Object.hasOwnProperty,rt=function(t,e){for(var n=et(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},ot=function(t,e){return it(t,(function(t,n){return{k:n,v:e(t,n)}}))},it=function(t,e){var n={};return rt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},at=function(t,e){var n=[];return rt(t,(function(t,r){n.push(e(t,r))})),n},ut=function(t,e){for(var n=et(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return b.some(a)}return b.none()},ct=function(t){return at(t,(function(t){return t}))},st=function(t,e){return lt(t,e)?b.from(t[e]):b.none()},lt=function(t,e){return nt.call(t,e)},ft=function(t,e){return lt(t,e)&&null!=t[e]},dt=function(e){if(!E(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var n=[],r={};return P(e,(function(o,i){var a=et(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],c=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!E(c))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];var s=function(t){var e=et(t);if(n.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+e.join(","));if(!G(n,(function(t){return R(e,t)})))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+n.join(", "));return t[u].apply(null,o)};return{fold:function(){if(arguments.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+arguments.length);var t=arguments[i];return t.apply(null,o)},match:s,log:function(e){t.console.log(e,{constructors:n,constructor:u,params:o})}}}})),r},mt=Object.prototype.hasOwnProperty,gt=function(t){return function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var a in i)mt.call(i,a)&&(r[a]=t(r[a],i[a]))}return r}},ht=gt((function(t,e){return k(t)&&k(e)?ht(t,e):e})),pt=gt((function(t,e){return e})),vt=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}};!function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"}(g||(g={}));var bt=function(t,e,n){return t.stype===g.Error?e(t.serror):n(t.svalue)},yt=function(t){return{stype:g.Value,svalue:t}},xt=function(t){return{stype:g.Error,serror:t}},wt=yt,Ct=function(t){var e=[],n=[];return P(t,(function(t){bt(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},St=xt,kt=function(t,e){return t.stype===g.Value?e(t.svalue):t},Et=function(t,e){return t.stype===g.Value?{stype:g.Value,svalue:e(t.svalue)}:t},Ot=dt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),_t=function(t){return Ot.defaultedThunk(r(t))},Tt=Ot.strict,zt=Ot.asOption,At=Ot.defaultedThunk,Nt=Ot.mergeWithThunk,Mt=function(t,e){var n;return(n={})[t]=e,n},Bt=(dt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,e){return function(t,e){var n={};return rt(t,(function(t,r){R(e,r)||(n[r]=t)})),n}(t,e)}),Rt=function(t,e){return Mt(t,e)},Dt=function(t){return function(t){var e={};return P(t,(function(t){e[t.key]=t.value})),e}(t)},Ht=function(t){return n(St,W)(t)},It=function(t){var e=Ct(t);return e.errors.length>0?Ht(e.errors):wt(e.values)},Pt=function(t){return k(t)&&et(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Lt=function(t,e){return St([{path:t,getErrorInfo:e}])},Ft=dt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),Vt=function(t,e,n){var r=st(t,e).fold((function(){return n(t)}),o);return wt(r)},Ut=function(t){return{extract:function(e,n,r){return(o=t(r,n)).stype===g.Error?function(t){return function(t,e){return Lt(t,(function(){return e}))}(e,t)}(o.serror):o;var o},toString:function(){return"val"}}},jt=function(t){var e=et(t);return L(e,(function(e){return ft(t,e)}))},Wt=function(t){var e=qt(t),n=F(t,(function(t,e){return e.fold((function(e){return ht(t,Rt(e,!0))}),r(t))}),{});return{extract:function(t,r,o){var i=O(o)?[]:jt(o),a=L(i,(function(t){return!ft(n,t)}));return 0===a.length?e.extract(t,r,o):function(t,e){return Lt(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))}(t,a)},toString:e.toString}},qt=function(t){return{extract:function(e,n,o){return function(t,e,n,o){var i,a,u=I(n,(function(n){return function(t,e,n,o){return n.fold((function(n,i,a,u){var c=function(e){var r=u.extract(t.concat([n]),o,e);return Et(r,(function(t){return Mt(i,o(t))}))},s=function(e){return e.fold((function(){var t=Mt(i,o(b.none()));return wt(t)}),(function(e){var r=u.extract(t.concat([n]),o,e);return Et(r,(function(t){return Mt(i,o(b.some(t)))}))}))};return a.fold((function(){return kt(function(t,e,n){return st(e,n).fold((function(){return function(t,e,n){return Lt(t,(function(){return'Could not find valid *strict* value for "'+e+'" in '+Pt(n)}))}(t,n,e)}),wt)}(t,e,n),c)}),(function(t){return kt(Vt(e,n,t),c)}),(function(){return kt(function(t,e){return wt(st(t,e))}(e,n),s)}),(function(t){return kt(function(t,e,n){var r=st(t,e).map((function(e){return!0===e?n(t):e}));return wt(r)}(e,n,t),s)}),(function(t){var o=t(e),i=Et(Vt(e,n,r({})),(function(t){return ht(o,t)}));return kt(i,c)}))}),(function(t,n){var r=n(e);return wt(Mt(t,o(r)))}))}(t,e,n,o)}));return i={},(a=Ct(u)).errors.length>0?Ht(a.errors):function(t,e){return wt(t.length>0?ht(e,pt.apply(void 0,t)):e)}(a.values,i)}(e,o,t,n)},toString:function(){return"obj{\n"+I(t,(function(t){return t.fold((function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))})).join("\n")+"}"}}},Gt=function(t){return{extract:function(e,n,r){var o=I(r,(function(r,o){return t.extract(e.concat(["["+o+"]"]),n,r)}));return It(o)},toString:function(){return"array("+t.toString()+")"}}},$t=r(Ut(wt)),Xt=n(Gt,qt),Kt=Ft.state,Yt=Ft.field,Jt=function(t,e){return{extract:function(n,r,o){return st(o,t).fold((function(){return function(t,e){return Lt(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))}(n,t)}),(function(t){return function(t,e,n,r,o){return st(r,o).fold((function(){return function(t,e,n){return Lt(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Pt(e)}))}(t,r,o)}),(function(r){return r.extract(t.concat(["branch: "+o]),e,n)}))}(n,r,o,e,t)}))},toString:function(){return"chooseOn("+t+"). Possible values: "+et(e)}}},Zt=Ut(wt),Qt=function(t){return Xt(t)},te=function(t){return Ut((function(e){return t(e).fold(St,wt)}))},ee=function(t,e){return function(t,e){return{extract:function(n,r,i){var a=et(i),u=function(e,n){return Gt(Ut(t)).extract(e,o,n)}(n,a);return kt(u,(function(t){var o=I(t,(function(t){return Ft.field(t,t,Tt(),e)}));return qt(o).extract(n,r,i)}))},toString:function(){return"setOf("+e.toString()+")"}}}((function(e){return t(e).fold(xt,yt)}),e)},ne=function(t,e,n){return function(t){return bt(t,w.error,w.value)}(function(t,e,n,r){return(o=e.extract([t],n,r)).stype===g.Error?{stype:g.Error,serror:(i=o.serror,{input:r,errors:i})}:o;var o,i}(t,e,o,n))},re=function(t){return t.fold((function(t){throw new Error(ie(t))}),o)},oe=function(t,e,n){return re(ne(t,e,n))},ie=function(t){return"Errors: \n"+(e=t.errors,n=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,I(n,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))).join("\n")+"\n\nInput object: "+Pt(t.input);var e,n},ae=function(t,e){return Jt(t,e)},ue=function(t,e){return Jt(t,ot(e,qt))},ce=r(Zt),se=function(t,e){return Ut((function(n){var r=typeof n;return t(n)?wt(n):St("Expected type: "+e+" but got: "+r)}))},le=se(T,"number"),fe=se(S,"string"),de=se(O,"boolean"),me=se(_,"function"),ge=function(t){var e=function(t,e){for(var n=t.next();!n.done;){if(!e(n.value))return!1;n=t.next()}return!0};if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return ge(t[e])}));case"Map":return e(t.keys(),ge)&&e(t.values(),ge);case"Set":return e(t.keys(),ge);default:return!1}},he=Ut((function(t){return ge(t)?wt(t):St("Expected value to be acceptable for sending via postMessage")})),pe=function(t){return te((function(e){return R(t,e)?w.value(e):w.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))},ve=function(t){return Yt(t,t,Tt(),$t())},be=function(t,e){return Yt(t,t,Tt(),e)},ye=function(t){return be(t,le)},xe=function(t){return be(t,fe)},we=function(t,e){return Yt(t,t,Tt(),pe(e))},Ce=function(t){return be(t,me)},Se=function(t,e){return Yt(t,t,Tt(),qt(e))},ke=function(t,e){return Yt(t,t,Tt(),Xt(e))},Ee=function(t,e){return Yt(t,t,Tt(),Gt(e))},Oe=function(t){return Yt(t,t,zt(),$t())},_e=function(t,e){return Yt(t,t,zt(),e)},Te=function(t){return _e(t,le)},ze=function(t){return _e(t,fe)},Ae=function(t){return _e(t,me)},Ne=function(t,e){return _e(t,qt(e))},Me=function(t,e){return Yt(t,t,_t(e),$t())},Be=function(t,e,n){return Yt(t,t,_t(e),n)},Re=function(t,e){return Be(t,e,le)},De=function(t,e){return Be(t,e,fe)},He=function(t,e,n){return Be(t,e,pe(n))},Ie=function(t,e){return Be(t,e,de)},Pe=function(t,e){return Be(t,e,me)},Le=function(t,e,n){return Be(t,e,qt(n))},Fe=function(t,e){return Kt(t,e)},Ve=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return Ve(n())}}},Ue=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:r(t)}},je=function(e,n){var r=(n||t.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ue(r.childNodes[0])},We=function(e,n){var r=(n||t.document).createElement(e);return Ue(r)},qe=function(e,n){var r=(n||t.document).createTextNode(e);return Ue(r)},Ge=Ue,$e=function(){return Xe(0,0)},Xe=function(t,e){return{major:t,minor:e}},Ke=function(t,e){var n=String(e).toLowerCase();return 0===t.length?$e():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Xe(r(1),r(2))}(t,n)},Ye=$e,Je=function(t,e){return function(){return e===t}},Ze=function(t){var e=t.current;return{current:e,version:t.version,isEdge:Je("Edge",e),isChrome:Je("Chrome",e),isIE:Je("IE",e),isOpera:Je("Opera",e),isFirefox:Je("Firefox",e),isSafari:Je("Safari",e)}},Qe=function(){return Ze({current:void 0,version:Ye()})},tn=Ze,en=(r("Edge"),r("Chrome"),r("IE"),r("Opera"),r("Firefox"),r("Safari"),function(t,e){return function(){return e===t}}),nn=function(t){var e=t.current;return{current:e,version:t.version,isWindows:en("Windows",e),isiOS:en("iOS",e),isAndroid:en("Android",e),isOSX:en("OSX",e),isLinux:en("Linux",e),isSolaris:en("Solaris",e),isFreeBSD:en("FreeBSD",e),isChromeOS:en("ChromeOS",e)}},rn=function(){return nn({current:void 0,version:Ye()})},on=nn,an=(r("Windows"),r("iOS"),r("Android"),r("Linux"),r("OSX"),r("Solaris"),r("FreeBSD"),r("ChromeOS"),function(t,e){var n=String(e).toLowerCase();return U(t,(function(t){return t.search(n)}))}),un=function(t,e){return-1!==t.indexOf(e)},cn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,sn=function(t){return function(e){return un(e,t)}},ln=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return un(t,"edge/")&&un(t,"chrome")&&un(t,"safari")&&un(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,cn],search:function(t){return un(t,"chrome")&&!un(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return un(t,"msie")||un(t,"trident")}},{name:"Opera",versionRegexes:[cn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:sn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:sn("firefox")},{name:"Safari",versionRegexes:[cn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(un(t,"safari")||un(t,"mobile/"))&&un(t,"applewebkit")}}],fn=[{name:"Windows",search:sn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return un(t,"iphone")||un(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:sn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:sn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:sn("linux"),versionRegexes:[]},{name:"Solaris",search:sn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:sn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:sn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],dn={browsers:r(ln),oses:r(fn)},mn=Ve(function(e,n){var o=dn.browsers(),i=dn.oses(),a=function(t,e){return an(t,e).map((function(t){var n=Ke(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,e).fold(Qe,tn),u=function(t,e){return an(t,e).map((function(t){var n=Ke(t.versionRegexes,e);return{current:t.name,version:n}}))}(i,e).fold(rn,on),c=function(t,e,n,o){var i=t.isiOS()&&!0===/ipad/i.test(n),a=t.isiOS()&&!i,u=t.isiOS()||t.isAndroid(),c=u||o("(pointer:coarse)"),s=i||!a&&u&&o("(min-device-width:768px)"),l=a||u&&!s,f=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!l&&!s&&!f;return{isiPad:r(i),isiPhone:r(a),isTablet:r(s),isPhone:r(l),isTouch:r(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:r(f),isDesktop:r(d)}}(u,a,e,(function(e){return t.window.matchMedia(e).matches}));return{browser:a,os:u,deviceType:c}}(t.navigator.userAgent)),gn=function(){return mn.get()},hn=t.Node.ELEMENT_NODE,pn=t.Node.TEXT_NODE,vn=hn,bn=t.Node.DOCUMENT_NODE,yn=function(t,e){var n=t.dom();if(n.nodeType!==vn)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},xn=function(t){return t.nodeType!==vn&&t.nodeType!==bn||0===t.childElementCount},wn=function(e,n){var r=void 0===n?t.document:n.dom();return xn(r)?[]:I(r.querySelectorAll(e),Ge)},Cn=function(t,e){return t.dom()===e.dom()},Sn=gn().browser.isIE()?function(e,n){return function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(e.dom(),n.dom(),t.Node.DOCUMENT_POSITION_CONTAINED_BY)}:function(t,e){var n=t.dom(),r=e.dom();return n!==r&&n.contains(r)},kn=function(t,e,n){for(var o=t.dom(),i=_(n)?n:r(!1);o.parentNode;){var a=Ge(o=o.parentNode),u=e(a);if(u.isSome())return u;if(i(a))break}return b.none()},En=function(t,e,n){return e(t).orThunk((function(){return n(t)?b.none():kn(t,e,n)}))},On=function(t,e){return Cn(t.element(),e.event().target())},_n=function(t){if(!ft(t,"can")&&!ft(t,"abort")&&!ft(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return oe("Extracting event.handler",Wt([Me("can",r(!0)),Me("abort",r(!1)),Me("run",e)]),t)},Tn=r("touchstart"),zn=r("touchmove"),An=r("touchend"),Nn=r("touchcancel"),Mn=r("mousedown"),Bn=r("mousemove"),Rn=r("mouseout"),Dn=r("mouseup"),Hn=r("mouseover"),In=r("focusin"),Pn=r("focusout"),Ln=r("keydown"),Fn=r("keyup"),Vn=r("input"),Un=r("change"),jn=r("click"),Wn=r("transitionend"),qn=r("selectstart"),Gn={tap:r("alloy.tap")},$n=r("alloy.focus"),Xn=r("alloy.blur.post"),Kn=r("alloy.paste.post"),Yn=r("alloy.receive"),Jn=r("alloy.execute"),Zn=r("alloy.focus.item"),Qn=Gn.tap,tr=r("alloy.longpress"),er=r("alloy.sandbox.close"),nr=r("alloy.typeahead.cancel"),rr=r("alloy.system.init"),or=r("alloy.system.touchmove"),ir=r("alloy.system.touchend"),ar=r("alloy.system.scroll"),ur=r("alloy.system.resize"),cr=r("alloy.system.attached"),sr=r("alloy.system.detached"),lr=r("alloy.system.dismissRequested"),fr=r("alloy.system.repositionRequested"),dr=r("alloy.focusmanager.shifted"),mr=r("alloy.slotcontainer.visibility"),gr=r("alloy.change.tab"),hr=r("alloy.dismiss.tab"),pr=r("alloy.highlight"),vr=r("alloy.dehighlight"),br=function(t,e){Cr(t,t.element(),e,{})},yr=function(t,e,n){Cr(t,t.element(),e,n)},xr=function(t){br(t,Jn())},wr=function(t,e,n){Cr(t,e,n,{})},Cr=function(t,e,n,o){var i=f({target:e},o);t.getSystem().triggerEvent(n,e,ot(i,r))},Sr=function(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event())},kr=function(t){return Dt(t)},Er=function(t,e){return{key:t,value:_n({abort:e})}},Or=function(t){return{key:t,value:_n({run:function(t,e){e.event().prevent()}})}},_r=function(t,e){return{key:t,value:_n({run:e})}},Tr=function(t,e,n){return{key:t,value:_n({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}},zr=function(t){return function(e){return{key:t,value:_n({run:function(t,n){On(t,n)&&e(t,n)}})}}},Ar=function(t,e,n){return function(t,e){return _r(t,(function(n,r){n.getSystem().getByUid(e).each((function(e){Sr(e,e.element(),t,r)}))}))}(t,e.partUids[n])},Nr=function(t,e){return _r(t,(function(t,n){var o=n.event(),i=t.getSystem().getByDom(o.target()).fold((function(){return En(o.target(),(function(e){return t.getSystem().getByDom(e).toOption()}),r(!1)).getOr(t)}),(function(t){return t}));e(t,i,n)}))},Mr=function(t){return _r(t,(function(t,e){e.cut()}))},Br=function(t){return _r(t,(function(t,e){e.stop()}))},Rr=function(t,e){return zr(t)(e)},Dr=zr(cr()),Hr=zr(sr()),Ir=zr(rr()),Pr=function(t){return function(e){return _r(t,e)}}(Jn()),Lr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var o={};return P(t,(function(t,n){o[t]=r(e[n])})),o}},Fr=function(t){return t.slice(0).sort()},Vr=function(t,e){if(!E(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");P(e,(function(e){if(!S(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")}))},Ur=function(t,e){var n=t.concat(e);if(0===n.length)throw new Error("You must specify at least one required or optional field.");return Vr("required",t),Vr("optional",e),function(t){var e=Fr(t);U(e,(function(t,n){return n<e.length-1&&t===e[n+1]})).each((function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")}))}(n),function(o){var i=et(o);G(t,(function(t){return R(i,t)}))||function(t,e){throw new Error("All required keys ("+Fr(t).join(", ")+") were not specified. Specified keys were: "+Fr(e).join(", ")+".")}(t,i);var a=L(i,(function(t){return!R(n,t)}));a.length>0&&function(t){throw new Error("Unsupported keys for object: "+Fr(t).join(", "))}(a);var u={};return P(t,(function(t){u[t]=r(o[t])})),P(e,(function(t){u[t]=r(Object.prototype.hasOwnProperty.call(o,t)?b.some(o[t]):b.none())})),u}},jr=function(t){return Ge(t.dom().ownerDocument)},Wr=function(t){return Ge(t.dom().ownerDocument.documentElement)},qr=function(t){return Ge(t.dom().ownerDocument.defaultView)},Gr=function(t){return b.from(t.dom().parentNode).map(Ge)},$r=function(t){return b.from(t.dom().offsetParent).map(Ge)},Xr=function(t){return I(t.dom().childNodes,Ge)},Kr=function(t,e){var n=t.dom().childNodes;return b.from(n[e]).map(Ge)},Yr=(Lr("element","offset"),function(t,e){Gr(t).each((function(n){n.dom().insertBefore(e.dom(),t.dom())}))}),Jr=function(t,e){(function(t){return b.from(t.dom().nextSibling).map(Ge)})(t).fold((function(){Gr(t).each((function(t){Qr(t,e)}))}),(function(t){Yr(t,e)}))},Zr=function(t,e){(function(t){return Kr(t,0)})(t).fold((function(){Qr(t,e)}),(function(n){t.dom().insertBefore(e.dom(),n.dom())}))},Qr=function(t,e){t.dom().appendChild(e.dom())},to=function(t,e){P(e,(function(e){Qr(t,e)}))},eo=function(t){t.dom().textContent="",P(Xr(t),(function(t){no(t)}))},no=function(t){var e=t.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},ro=function(t){var e,n=Xr(t);n.length>0&&(e=t,P(n,(function(t){Yr(e,t)}))),no(t)},oo=function(t){return t.dom().innerHTML},io=function(e,n){var r,o,i=jr(e).dom(),a=Ge(i.createDocumentFragment()),u=(r=n,(o=(i||t.document).createElement("div")).innerHTML=r,Xr(Ge(o)));to(a,u),eo(e),Qr(e,a)},ao=(void 0!==t.window||Function("return this;")(),function(t){return t.dom().nodeName.toLowerCase()}),uo=function(t){return function(e){return function(t){return t.dom().nodeType}(e)===t}},co=uo(hn),so=uo(pn),lo=function(e,n,r){if(!(S(r)||O(r)||T(r)))throw t.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,r+"")},fo=function(t,e,n){lo(t.dom(),e,n)},mo=function(t,e){var n=t.dom().getAttribute(e);return null===n?void 0:n},go=function(t,e){var n=t.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},ho=function(t,e){t.dom().removeAttribute(e)},po=function(t){return function(t){return function(t){var e=We("div"),n=Ge(t.dom().cloneNode(!0));return Qr(e,n),oo(e)}(function(t){return function(t,e){return Ge(t.dom().cloneNode(!1))}(t)}(t))}(t)},vo=kr([function(e,n){return{key:e,value:_n({can:function(e,n){var r=n.event().originator(),o=n.event().target();return!function(t,e,n){return Cn(e,t.element())&&!Cn(e,n)}(e,r,o)||(t.console.warn($n()+" did not get interpreted by the desired target. \nOriginator: "+po(r)+"\nTarget: "+po(o)+"\nCheck the "+$n()+" event handlers"),!1)}})}}($n())]),bo=Object.freeze({__proto__:null,events:vo}),yo=0,xo=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++yo+String(e)},wo=r("alloy-id-"),Co=r("data-alloy-id"),So=wo(),ko=Co(),Eo=function(t,e){Object.defineProperty(t.dom(),ko,{value:e,writable:!0})},Oo=function(t){var e=co(t)?t.dom()[ko]:null;return b.from(e)},_o=function(t){return xo(t)},To=o,zo=function(t){var e=function(e){return function(){throw new Error("The component must be in a context to send: "+e+(t?"\n"+po(t().element())+" is not in context.":""))}};return{debugInfo:r("fake"),triggerEvent:e("triggerEvent"),triggerFocus:e("triggerFocus"),triggerEscape:e("triggerEscape"),build:e("build"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),broadcast:e("broadcast"),broadcastOn:e("broadcastOn"),broadcastEvent:e("broadcastEvent"),isConnected:r(!1)}},Ao=zo(),No=function(t){return I(t,(function(t){return function(t,e,n){return!(t.length<"/*".length)&&"/*"===t.substr(n,n+"/*".length)}(e=t,0,e.length-"/*".length)?t.substring(0,t.length-"/*".length):t;var e}))},Mo=function(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:No(i)}},t},Bo=xo("alloy-premade"),Ro=function(t){return Rt(Bo,t)},Do=function(t){return function(t,e){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:No(i.slice(1))}},t}((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,[e.getApis()].concat([e].concat(n)))}),t)},Ho={init:function(){return Io({readState:function(){return"No State required"}})}},Io=function(t){return t},Po=function(t,e){var n={};return rt(t,(function(t,r){rt(t,(function(t,o){var i=st(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n},Lo=function(t){return{classes:void 0!==t.classes?t.classes:[],attributes:void 0!==t.attributes?t.attributes:{},styles:void 0!==t.styles?t.styles:{}}},Fo=function(t){return t.cHandler},Vo=function(t,e){return{name:r(t),handler:r(e)}},Uo=function(t,e){var n,o;return n={},(o=function(t){var e=[],n=[];return P(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}}(at(t,(function(t,n){return(1===t.length?w.value(t[0].handler()):function(t,e,n){var r=e[n];return r?function(t,e,n,r){try{var o=Y(n,(function(e,n){var o=e.name(),i=n.name(),a=r.indexOf(o),u=r.indexOf(i);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));return a<u?-1:u<a?1:0}));return w.value(o)}catch(i){return w.error([i])}}("Event: "+n,0,t,r).map((function(t){return function(t){var e=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return V(t,(function(t,r){return t&&e(r).apply(void 0,n)}),!0)}}(t,(function(t){return t.can})),n=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return V(t,(function(t,r){return t||e(r).apply(void 0,n)}),!1)}}(t,(function(t){return t.abort}));return _n({can:e,abort:n,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];P(t,(function(t){t.run.apply(void 0,e)}))}})}(I(t,(function(t){return t.handler()})))})):function(t,e){return w.error(["The event ("+t+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(I(e,(function(t){return t.name()})),null,2)])}(n,t)}(t,e,n)).map((function(o){var i=function(t){var e=function(t){return _(t)?{can:r(!0),abort:r(!1),run:t}:t}(t);return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[t,n].concat(r);e.abort.apply(void 0,i)?n.stop():e.can.apply(void 0,i)&&e.run.apply(void 0,i)}}(o),a=t.length>1?L(e[n],(function(e){return D(t,(function(t){return t.name()===e}))})).join(" > "):t[0].name();return Rt(n,function(t,e){return{handler:t,purpose:r(e)}}(i,a))}))})))).errors.length>0?w.error(W(o.errors)):function(t,e){return w.value(0===t.length?e:ht(e,pt.apply(void 0,t)))}(o.values,n)},jo=function(t){return t.events},Wo=function(t,e){var n=mo(t,e);return void 0===n||""===n?[]:n.split(" ")},qo=function(t){return void 0!==t.dom().classList},Go=function(t,e){qo(t)?t.dom().classList.add(e):function(t,e){!function(t,e,n){var r=Wo(t,"class").concat([n]);fo(t,"class",r.join(" "))}(t,0,e)}(t,e)},$o=function(t,e){qo(t)?t.dom().classList.remove(e):function(t,e){!function(t,e,n){var r=L(Wo(t,"class"),(function(t){return t!==n}));r.length>0?fo(t,"class",r.join(" ")):ho(t,"class")}(t,0,e)}(t,e),function(t){0===(qo(t)?t.dom().classList:function(t){return Wo(t,"class")}(t)).length&&ho(t,"class")}(t)},Xo=function(t,e){return qo(t)&&t.dom().classList.contains(e)},Ko=function(t,e){P(e,(function(e){Go(t,e)}))},Yo=function(t,e){P(e,(function(e){$o(t,e)}))},Jo=function(t){return void 0!==t.style&&_(t.style.getPropertyValue)},Zo=function(t){var e=so(t)?t.dom().parentNode:t.dom();return null!=e&&e.ownerDocument.body.contains(e)},Qo=vt((function(){return ti(Ge(t.document))})),ti=function(t){var e=t.dom().body;if(null==e)throw new Error("Body is not available yet");return Ge(e)},ei=function(e,n,r){if(!S(r))throw t.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);Jo(e)&&e.style.setProperty(n,r)},ni=function(t,e){Jo(t)&&t.style.removeProperty(e)},ri=function(t,e,n){var r=t.dom();ei(r,e,n)},oi=function(t,e){var n=t.dom();rt(e,(function(t,e){ei(n,e,t)}))},ii=function(t,e){var n=t.dom();rt(e,(function(t,e){t.fold((function(){ni(n,e)}),(function(t){ei(n,e,t)}))}))},ai=function(e,n){var r=e.dom(),o=t.window.getComputedStyle(r).getPropertyValue(n),i=""!==o||Zo(e)?o:ui(r,n);return null===i?void 0:i},ui=function(t,e){return Jo(t)?t.style.getPropertyValue(e):""},ci=function(t,e){var n=t.dom(),r=ui(n,e);return b.from(r).filter((function(t){return t.length>0}))},si=function(t){var e={},n=t.dom();if(Jo(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},li=function(t,e,n){var r=We(t);return ri(r,e,n),ci(r,e).isSome()},fi=function(t,e){var n=t.dom();ni(n,e),go(t,"style")&&""===mo(t,"style").replace(/^\s+|\s+$/g,"")&&ho(t,"style")},di=function(t){return t.dom().offsetWidth},mi=function(t){return t.dom().value},gi=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom().value=e},hi=function(t){var e,n,o=function(){return h},i=Ve(Ao),a=re(function(t){return ne("custom.definition",qt([Yt("dom","dom",Tt(),qt([ve("tag"),Me("styles",{}),Me("classes",[]),Me("attributes",{}),Oe("value"),Oe("innerHtml")])),ve("components"),ve("uid"),Me("events",{}),Me("apis",{}),Yt("eventOrder","eventOrder",(e={"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]},Ot.mergeWithThunk(r(e))),ce()),Oe("domModification")]),t);var e}(t)),u=function(t){return function(t,e){return function(t,e){var n=I(e,(function(t){return Ne(t.name(),[ve("config"),Me("state",Ho)])})),r=ne("component.behaviours",qt(n),t.behaviours).fold((function(e){throw new Error(ie(e)+"\nComplete spec:\n"+JSON.stringify(t,null,2))}),(function(t){return t}));return{list:e,data:ot(r,(function(t){var e=t.map((function(t){return{config:t.config,state:t.state.init(t.config)}}));return function(){return e}}))}}(t,e)}(t,function(t){var e=st(t,"behaviours").getOr({}),n=L(et(e),(function(t){return void 0!==e[t]}));return I(n,(function(t){return e[t].me}))}(t))}(t),c=function(t){return t.list}(u),s=function(t){return t.data}(u),l=function(t,e,n){var r,o,i,a=f(f({},(r=t).dom),{uid:r.uid,domChildren:I(r.components,(function(t){return t.element()}))}),u=function(t){return t.domModification.fold((function(){return Lo({})}),Lo)}(t);return i=e.length>0?function(t,e,n,r){var o=f({},e);P(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var i=Po(o,(function(t,e){return{name:t,modification:e}})),a=function(t){return F(t,(function(t,e){return f(f({},e.modification),t)}),{})},u=F(i.classes,(function(t,e){return e.modification.concat(t)}),[]),c=a(i.attributes),s=a(i.styles);return Lo({classes:u,attributes:c,styles:s})}(n,{"alloy.base.modification":u},e,a):u,f(f({},o=a),{attributes:f(f({},o.attributes),i.attributes),styles:f(f({},o.styles),i.styles),classes:o.classes.concat(i.classes)})}(a,c,s),d=(function(t,e){var n=t.dom();rt(e,(function(t,e){lo(n,e,t)}))}(n=We((e=l).tag),e.attributes),Ko(n,e.classes),oi(n,e.styles),e.innerHtml.each((function(t){return io(n,t)})),to(n,e.domChildren),e.value.each((function(t){gi(n,t)})),Eo(n,e.uid),n),m=function(t,e,n){var r={"alloy.base.behaviour":jo(t)};return function(t,e,n,r){var o=function(t,e,n){var r=f(f({},n),function(t,e){var n={};return P(t,(function(t){n[t.name()]=t.handlers(e)})),n}(e,t));return Po(r,Vo)}(t,n,r);return Uo(o,e)}(n,t.eventOrder,e,r).getOrDie()}(a,c,s),g=Ve(a.components),h={getSystem:i.get,config:function(e){var n=s;return(_(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(t){return _(s[t.name()])},spec:r(t),readState:function(t){return s[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},getApis:function(){return a.apis},connect:function(t){i.set(t)},disconnect:function(){i.set(zo(o))},element:r(d),syncComponents:function(){var t=Xr(d),e=q(t,(function(t){return i.get().getByDom(t).fold((function(){return[]}),(function(t){return[t]}))}));g.set(e)},components:g.get,events:r(m)};return h},pi=function(t){var e=qe(t);return vi({element:e})},vi=function(t){var n=oe("external.component",Wt([ve("element"),Oe("uid")]),t),o=Ve(zo());n.uid.each((function(t){Eo(n.element,t)}));var i={getSystem:o.get,config:b.none,hasConfigured:r(!1),connect:function(t){o.set(t)},disconnect:function(){o.set(zo((function(){return i})))},getApis:function(){return{}},element:r(n.element),spec:r(t),readState:r("No state"),syncComponents:e,components:r([]),events:r({})};return Ro(i)},bi=_o,yi=function(t){return function(t){return st(t,Bo)}(t).fold((function(){return function(t){var e=To(t),n=e.events,r=d(e,["events"]),o=function(t){var e=st(t,"components").getOr([]);return I(e,yi)}(r),i=f(f({},r),{events:f(f({},bo),n),components:o});return w.value(hi(i))}(t.hasOwnProperty("uid")?t:f({uid:bi("")},t)).getOrDie()}),(function(t){return t}))},xi=Ro;function wi(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=ai(n,t);return parseFloat(o)||0}return r},r=function(t,e){return V(e,(function(e,n){var r=ai(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!T(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom();Jo(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}}var Ci=wi("height",(function(t){var e=t.dom();return Zo(t)?e.getBoundingClientRect().height:e.offsetHeight})),Si=function(t){return Ci.get(t)},ki=function(t){return Ci.getOuter(t)},Ei=function(t,e){return{left:r(t),top:r(e),translate:function(n,r){return Ei(t+n,e+r)}}},Oi=Ei,_i=function(t,e){return void 0!==t?t:void 0!==e?e:0},Ti=function(t){var e=t.dom().ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom())return Oi(n.offsetLeft,n.offsetTop);var i=_i(r.pageYOffset,o.scrollTop),a=_i(r.pageXOffset,o.scrollLeft),u=_i(o.clientTop,n.clientTop),c=_i(o.clientLeft,n.clientLeft);return zi(t).translate(a-c,i-u)},zi=function(t){var e=t.dom(),n=e.ownerDocument.body;return n===e?Oi(n.offsetLeft,n.offsetTop):Zo(t)?function(t){var e=t.getBoundingClientRect();return Oi(e.left,e.top)}(e):Oi(0,0)},Ai=wi("width",(function(t){return t.dom().offsetWidth})),Ni=function(t){return Ai.get(t)},Mi=function(t){return Ai.getOuter(t)},Bi=function(t){var e=Ge(t.target),o=function(){t.stopPropagation()},i=function(){t.preventDefault()},a=n(i,o);return function(t,e,n,o,i,a,u){return{target:r(t),x:r(e),y:r(n),stop:o,prevent:i,kill:a,raw:r(u)}}(e,t.clientX,t.clientY,o,i,a,t)},Ri=function(t,e,n,r,o){var a=function(t,e){return function(n){t(n)&&e(Bi(n))}}(n,r);return t.dom().addEventListener(e,a,o),{unbind:i(Di,t,e,a,o)}},Di=function(t,e,n,r){t.dom().removeEventListener(e,n,r)},Hi=(gn().browser.isSafari(),function(e){var n=void 0!==e?e.dom():t.document;return Oi(n.body.scrollLeft||n.documentElement.scrollLeft,n.body.scrollTop||n.documentElement.scrollTop)}),Ii=function(e,n,r){(void 0!==r?r.dom():t.document).defaultView.scrollTo(e,n)},Pi=function(t,e,n,o){return{x:r(t),y:r(e),width:r(n),height:r(o),right:r(t+n),bottom:r(e+o)}},Li=function(e){var n=void 0===e?t.window:e,r=Hi(Ge(n.document));return function(e){return b.from((void 0===e?t.window:e).visualViewport)}(n).fold((function(){var t=n.document.documentElement,e=t.clientWidth,o=t.clientHeight;return Pi(r.left(),r.top(),e,o)}),(function(t){return Pi(Math.max(t.pageLeft,r.left()),Math.max(t.pageTop,r.top()),t.width,t.height)}))},Fi=function(t,e){return t.view(e).fold(r([]),(function(e){var n=t.owner(e),r=Fi(t,n);return[e].concat(r)}))},Vi=Object.freeze({__proto__:null,view:function(e){return(e.dom()===t.document?b.none():b.from(e.dom().defaultView.frameElement)).map(Ge)},owner:function(t){return jr(t)}}),Ui=function(e){var n=Ge(t.document),r=Hi(n);return function(t,e){var n=e.owner(t),r=Fi(e,n);return b.some(r)}(e,Vi).fold(i(Ti,e),(function(t){var n=zi(e),o=F(t,(function(t,e){var n=zi(e);return{left:t.left+n.left(),top:t.top+n.top()}}),{left:0,top:0});return Oi(o.left+n.left()+r.left(),o.top+n.top()+r.top())}))},ji=Lr("point","width","height"),Wi=Lr("x","y","width","height"),qi=function(t,e,n,o){return{x:r(t),y:r(e),width:r(n),height:r(o),right:r(t+n),bottom:r(e+o)}},Gi=function(t){var e=Ti(t),n=Mi(t),r=ki(t);return qi(e.left(),e.top(),n,r)},$i=function(t){var e=Ui(t),n=Mi(t),r=ki(t);return qi(e.left(),e.top(),n,r)},Xi=function(){return Li(t.window)};function Ki(t,e,n,r,o){return t(n,r)?b.some(n):_(o)&&o(n)?b.none():e(n,r,o)}var Yi,Ji=function(t,e,n){for(var o=t.dom(),i=_(n)?n:r(!1);o.parentNode;){var a=Ge(o=o.parentNode);if(e(a))return b.some(a);if(i(a))break}return b.none()},Zi=function(t,e,n){return Ki((function(t,e){return e(t)}),Ji,t,e,n)},Qi=function(t,e,n){return Zi(t,e,n).isSome()},ta=function(t,e,n){return Ji(t,(function(t){return yn(t,e)}),n)},ea=function(e,n){return function(e,n){var r=void 0===n?t.document:n.dom();return xn(r)?b.none():b.from(r.querySelector(e)).map(Ge)}(n,e)},na=function(t,e,n){return Ki(yn,ta,t,e,n)},ra=function(){var t=xo("aria-owns");return{id:r(t),link:function(e){fo(e,"aria-owns",t)},unlink:function(t){ho(t,"aria-owns")}}},oa=function(t,e){return Qi(e,(function(e){return Cn(e,t.element())}),r(!1))||function(t,e){return function(t){return Zi(t,(function(t){if(!co(t))return!1;var e=mo(t,"id");return void 0!==e&&e.indexOf("aria-owns")>-1})).bind((function(t){var e=mo(t,"id"),n=jr(t);return ea(n,'[aria-owns="'+e+'"]')}))}(e).exists((function(e){return oa(t,e)}))}(t,e)};!function(t){t[t.STOP=0]="STOP",t[t.NORMAL=1]="NORMAL",t[t.LOGGING=2]="LOGGING"}(Yi||(Yi={}));var ia,aa=Ve({}),ua=["alloy/data/Fields","alloy/debugging/Debugging"],ca=function(e,n,r){return function(e,n,r){switch(st(aa.get(),e).orThunk((function(){var t=et(aa.get());return tt(t,(function(t){return e.indexOf(t)>-1?b.some(aa.get()[t]):b.none()}))})).getOr(Yi.NORMAL)){case Yi.NORMAL:return r(sa());case Yi.LOGGING:var o=function(e,n){var r=[],o=(new Date).getTime();return{logEventCut:function(t,e,n){r.push({outcome:"cut",target:e,purpose:n})},logEventStopped:function(t,e,n){r.push({outcome:"stopped",target:e,purpose:n})},logNoParent:function(t,e,n){r.push({outcome:"no-parent",target:e,purpose:n})},logEventNoHandlers:function(t,e){r.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,n){r.push({outcome:"response",purpose:n,target:e})},write:function(){var i=(new Date).getTime();R(["mousemove","mouseover","mouseout",rr()],e)||t.console.log(e,{event:e,time:i-o,target:n.dom(),sequence:I(r,(function(t){return R(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+po(t.target)+")":t.outcome}))})}}}(e,n),i=r(o);return o.write(),i;case Yi.STOP:return!0}}(e,n,r)},sa=r({logEventCut:e,logEventStopped:e,logNoParent:e,logEventNoHandlers:e,logEventResponse:e,write:e}),la=r([ve("menu"),ve("selectedMenu")]),fa=r([ve("item"),ve("selectedItem")]),da=(r(qt(fa().concat(la()))),r(qt(fa()))),ma=Se("initSize",[ve("numColumns"),ve("numRows")]),ga=function(){return Se("markers",[ve("backgroundMenu")].concat(la()).concat(fa()))},ha=function(t){return Se("markers",I(t,ve))},pa=function(t,e,n){return function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");U(e,(function(t){return t.indexOf("alloy")>0&&!D(ua,(function(e){return t.indexOf(e)>-1}))})).getOr("unknown")}}(),Yt(e,e,n,te((function(t){return w.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})))},va=function(t){return pa(0,t,_t(e))},ba=function(t){return pa(0,t,_t(b.none))},ya=function(t){return pa(0,t,Tt())},xa=function(t){return pa(0,t,Tt())},wa=function(t,e){return Fe(t,r(e))},Ca=function(t){return Fe(t,o)},Sa=r(ma),ka=Lr("x","y","bubble","direction","label"),Ea=dt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Oa=Ea.southeast,_a=Ea.southwest,Ta=Ea.northeast,za=Ea.northwest,Aa=Ea.south,Na=Ea.north,Ma=Ea.east,Ba=Ea.west,Ra=function(t){return t.x()},Da=function(t,e){return t.x()+t.width()/2-e.width()/2},Ha=function(t,e){return t.x()+t.width()-e.width()},Ia=function(t,e){return t.y()-e.height()},Pa=function(t){return t.y()+t.height()},La=function(t,e){return t.y()+t.height()/2-e.height()/2},Fa=function(t,e,n){return ka(Ra(t),Pa(t),n.southeast(),Oa(),"layout-se")},Va=function(t,e,n){return ka(Ha(t,e),Pa(t),n.southwest(),_a(),"layout-sw")},Ua=function(t,e,n){return ka(Ra(t),Ia(t,e),n.northeast(),Ta(),"layout-ne")},ja=function(t,e,n){return ka(Ha(t,e),Ia(t,e),n.northwest(),za(),"layout-nw")},Wa=function(t,e,n){return ka(Da(t,e),Ia(t,e),n.north(),Na(),"layout-n")},qa=function(t,e,n){return ka(Da(t,e),Pa(t),n.south(),Aa(),"layout-s")},Ga=function(t,e,n){return ka(function(t){return t.x()+t.width()}(t),La(t,e),n.east(),Ma(),"layout-e")},$a=function(t,e,n){return ka(function(t,e){return t.x()-e.width()}(t,e),La(t,e),n.west(),Ba(),"layout-w")},Xa=function(){return[Fa,Va,Ua,ja,qa,Wa,Ga,$a]},Ka=function(){return[Va,Fa,ja,Ua,qa,Wa,Ga,$a]},Ya=function(){return[Ua,ja,Fa,Va,Wa,qa]},Ja=function(){return[Fa,Va,Ua,ja,qa,Wa]},Za=function(){return[Va,Fa,ja,Ua,qa,Wa]},Qa=function(t,e,n){return Ir((function(r,o){n(r,t,e)}))},tu=function(t){return{key:t,value:void 0}},eu=function(t,e,n,o,a,u,c){var s=function(t){return ft(t,n)?t[n]():b.none()},l=ot(a,(function(t,e){return function(t,e,n){return function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:No(a.slice(0,1).concat(a.slice(3)))}},t}((function(o){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var u=[o].concat(i);return o.config({name:r(t)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+n)}),(function(t){var n=Array.prototype.slice.call(u,1);return e.apply(void 0,[o,t.config,t.state].concat(n))}))}),n,e)}(n,t,e)})),d=ot(u,(function(t,e){return Mo(t,e)})),m=f(f(f({},d),l),{revoke:i(tu,n),config:function(e){var r=oe(n+"-config",t,e);return{key:n,value:{config:r,me:m,configAsRaw:vt((function(){return oe(n+"-config",t,e)})),initialConfig:e,state:c}}},schema:function(){return e},exhibit:function(t,e){return s(t).bind((function(t){return st(o,"exhibit").map((function(n){return n(e,t.config,t.state)}))})).getOr(Lo({}))},name:function(){return n},handlers:function(t){return s(t).map((function(t){return st(o,"events").getOr((function(){return{}}))(t.config,t.state)})).getOr({})}});return m},nu=function(t){return Dt(t)},ru=Wt([ve("fields"),ve("name"),Me("active",{}),Me("apis",{}),Me("state",Ho),Me("extra",{})]),ou=function(t){var e=oe("Creating behaviour: "+t.name,ru,t);return function(t,e,n,r,o,i){var a,u=Wt(t),c=Ne(e,[(a=t,_e("config",Wt(a)))]);return eu(u,c,e,n,r,o,i)}(e.fields,e.name,e.active,e.apis,e.extra,e.state)},iu=Wt([ve("branchKey"),ve("branches"),ve("name"),Me("active",{}),Me("apis",{}),Me("state",Ho),Me("extra",{})]),au=function(t){var e=oe("Creating behaviour: "+t.name,iu,t);return function(t,e,n,r,o,i){var a=t,u=Ne(e,[_e("config",t)]);return eu(a,u,e,n,r,o,i)}(ue(e.branchKey,e.branches),e.name,e.active,e.apis,e.extra,e.state)},uu=r(void 0),cu=Object.freeze({__proto__:null,events:function(t){return kr([_r(Yn(),(function(e,n){var r=t.channels,o=et(r),i=n,a=function(t,e){return e.universal()?t:L(t,(function(t){return R(e.channels(),t)}))}(o,i);P(a,(function(t){var n=r[t],o=n.schema,a=oe("channel["+t+"] data\nReceiver: "+po(e.element()),o,i.data());n.onReceive(e,a)}))}))])}}),su=[be("channels",ee(w.value,Wt([ya("onReceive"),Me("schema",ce())])))],lu=ou({fields:su,name:"receiving",active:cu}),fu=Object.freeze({__proto__:null,exhibit:function(t,e){return Lo({classes:[],styles:e.useFixed()?{}:{position:"relative"}})}}),du=function(t){t.dom().focus()},mu=function(e){var n=void 0!==e?e.dom():t.document;return b.from(n.activeElement).map(Ge)},gu=function(t){return mu(jr(t)).filter((function(e){return t.dom().contains(e.dom())}))},hu=function(t,n){var r=jr(n),o=mu(r).bind((function(t){var e,r,o=function(e){return Cn(t,e)};return o(n)?b.some(n):(e=o,(r=function(t){for(var n=0;n<t.childNodes.length;n++){var o=Ge(t.childNodes[n]);if(e(o))return b.some(o);var i=r(t.childNodes[n]);if(i.isSome())return i}return b.none()})(n.dom()))})),i=t(n);return o.each((function(t){mu(r).filter((function(e){return Cn(e,t)})).fold((function(){du(t)}),e)})),i},pu=Lr("position","left","top","right","bottom"),vu=function(t,e){var n=function(t){return t+"px"};ii(t,{position:b.some(e.position()),left:e.left().map(n),top:e.top().map(n),right:e.right().map(n),bottom:e.bottom().map(n)})},bu=dt([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),yu=function(t,e,n,r,o,i){var a=e.x()-n,u=e.y()-r,c=o-(a+e.width()),s=i-(u+e.height()),l=b.some(a),f=b.some(u),d=b.some(c),m=b.some(s),g=b.none();return e.direction().fold((function(){return pu(t,l,f,g,g)}),(function(){return pu(t,g,f,d,g)}),(function(){return pu(t,l,g,g,m)}),(function(){return pu(t,g,g,d,m)}),(function(){return pu(t,l,f,g,g)}),(function(){return pu(t,l,g,g,m)}),(function(){return pu(t,l,f,g,g)}),(function(){return pu(t,g,f,d,g)}))},xu=function(t,e){var n=i(Ui,e),r=t.fold(n,n,(function(){var t=Hi();return Ui(e).translate(-t.left(),-t.top())})),o=Mi(e),a=ki(e);return qi(r.left(),r.top(),o,a)},wu=function(t,e){return e.fold((function(){return t.fold(Xi,Xi,qi)}),(function(e){return t.fold(e,e,(function(){var n=e(),r=Cu(t,n.x(),n.y());return qi(r.left(),r.top(),n.width(),n.height())}))}))},Cu=function(t,e,n){var o=Oi(e,n);return t.fold(r(o),r(o),(function(){var t=Hi();return o.translate(-t.left(),-t.top())}))},Su=bu.relative,ku=bu.fixed,Eu=Lr("anchorBox","origin"),Ou=function(t,e,n,r){var o=t+e;return o>r?n:o<n?r:o},_u=function(t,e,n){return Math.min(Math.max(t,e),n)},Tu=Ur(["x","y","width","height","maxHeight","maxWidth","direction","classes","label","candidateYforTest"],[]),zu=dt([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Au=function(t,e,n,a){fi(e,"max-height"),fi(e,"max-width");var u,c={width:r(Mi(u=e)),height:r(ki(u))};return function(t,e,n,a,u){var c=n.width(),s=n.height(),l=function(t,o,i,l){return function(t,e,n,o){var i=t.x(),a=t.y(),u=t.bubble().offset().left(),c=t.bubble().offset().top(),s=o.y(),l=o.bottom(),f=o.x(),d=o.right(),m=a+c,g=function(t,e,n,r,o){var i=o.x(),a=o.y(),u=o.width(),c=o.height(),s=t>=i,l=e>=a,f=s&&l,d=t+n<=i+u&&e+r<=a+c,m=Math.abs(Math.min(n,s?i+u-t:i-(t+n))),g=Math.abs(Math.min(r,l?a+c-e:a-(e+r)));return{originInBounds:f,sizeInBounds:d,limitX:_u(t,o.x(),o.right()),limitY:_u(e,o.y(),o.bottom()),deltaW:m,deltaH:g}}(i+u,m,e,n,o),h=g.originInBounds,p=g.sizeInBounds,v=g.limitX,b=g.limitY,y=g.deltaW,x=g.deltaH,w=r(b+x-s),C=r(l-b),S=function(t,e,n,r){return t.fold(e,e,r,r,e,r,n,n)}(t.direction(),C,C,w),k=r(v+y-f),E=r(d-v),O=function(t,e,n,r){return t.fold(e,r,e,r,n,n,e,r)}(t.direction(),E,E,k),_=Tu({x:v,y:b,width:y,height:x,maxHeight:S,maxWidth:O,direction:t.direction(),classes:{on:t.bubble().classesOn(),off:t.bubble().classesOff()},label:t.label(),candidateYforTest:m});return h&&p?zu.fit(_):zu.nofit(_,y,x)}(t(e,n,a),c,s,u).fold(zu.fit,(function(t,e,n){return n>l||e>i?zu.nofit(t,e,n):zu.nofit(o,i,l)}))};return V(t,(function(t,e){var n=i(l,e);return t.fold(zu.fit,n)}),zu.nofit(Tu({x:e.x(),y:e.y(),width:n.width(),height:n.height(),maxHeight:n.height(),maxWidth:n.width(),direction:Oa(),classes:{on:[],off:[]},label:"none",candidateYforTest:e.y()}),-1,-1)).fold(o,o)}(a.preference(),t,c,n,a.bounds())},Nu=function(t,e){!function(t,e){var n=Ci.max(t,e,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);ri(t,"max-height",n+"px")}(t,Math.floor(e))},Mu=r((function(t,e){Nu(t,e),oi(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Bu=r((function(t,e){Nu(t,e)})),Ru=Ur(["bounds","origin","preference","maxHeightFunction","maxWidthFunction"],[]),Du=function(t,e,n){return void 0===t[e]?n:t[e]},Hu=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],Iu=function(t,e,n){var r=function(t){return st(n,t).getOr([])},o=function(t,e,n){var o=X(Hu,n);return{offset:function(){return Oi(t,e)},classesOn:function(){return q(n,r)},classesOff:function(){return q(o,r)}}};return{southeast:function(){return o(-t,e,["top","alignLeft"])},southwest:function(){return o(t,e,["top","alignRight"])},south:function(){return o(-t/2,e,["top","alignCentre"])},northeast:function(){return o(-t,-e,["bottom","alignLeft"])},northwest:function(){return o(t,-e,["bottom","alignRight"])},north:function(){return o(-t/2,-e,["bottom","alignCentre"])},east:function(){return o(t,-e/2,["valignCentre","left"])},west:function(){return o(-t,-e/2,["valignCentre","right"])},innerNorthwest:function(){return o(-t,e,["top","alignRight"])},innerNortheast:function(){return o(t,e,["top","alignLeft"])},innerNorth:function(){return o(-t/2,e,["top","alignCentre"])},innerSouthwest:function(){return o(-t,-e,["bottom","alignRight"])},innerSoutheast:function(){return o(t,-e,["bottom","alignLeft"])},innerSouth:function(){return o(-t/2,-e,["bottom","alignCentre"])},innerWest:function(){return o(t,-e/2,["valignCentre","right"])},innerEast:function(){return o(-t,-e/2,["valignCentre","left"])}}},Pu=function(){return Iu(0,0,{})},Lu=function(t,e){return function(n){return"rtl"===Fu(n)?e:t}},Fu=function(t){return"rtl"===ai(t,"direction")?"rtl":"ltr"};!function(t){t.TopToBottom="toptobottom",t.BottomToTop="bottomtotop"}(ia||(ia={}));var Vu,Uu="data-alloy-vertical-dir",ju=function(t){return Qi(t,(function(t){return co(t)&&mo(t,Uu)===ia.BottomToTop}))},Wu=function(){return Ne("layouts",[ve("onLtr"),ve("onRtl"),Oe("onBottomLtr"),Oe("onBottomRtl")])},qu=function(t,e,n,r,o,i,a){var u=a.map(ju).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r);return Lu(l,f)(t)},Gu=[ve("hotspot"),Oe("bubble"),Me("overrides",{}),Wu(),wa("placement",(function(t,e,n){var r=xu(n,e.hotspot.element()),o=qu(t.element(),e,Ja(),Za(),Ya(),[ja,Ua,Va,Fa,Wa,qa],b.some(e.hotspot.element()));return b.some({anchorBox:r,bubble:e.bubble.getOr(Pu()),overrides:e.overrides,layouts:o,placer:b.none()})}))],$u=[ve("x"),ve("y"),Me("height",0),Me("width",0),Me("bubble",Pu()),Me("overrides",{}),Wu(),wa("placement",(function(t,e,n){var r=Cu(n,e.x,e.y),o=qi(r.left(),r.top(),e.width,e.height),i=qu(t.element(),e,Xa(),Ka(),Xa(),Ka(),b.none());return b.some({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:b.none()})}))],Xu={create:Lr("start","soffset","finish","foffset")},Ku=(dt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),function(t){return t.fold(o,o,o)}),Yu=dt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ju={domRange:Yu.domRange,relative:Yu.relative,exact:Yu.exact,exactFromRange:function(t){return Yu.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Ge(t.startContainer)},relative:function(t,e){return Ku(t)},exact:function(t,e,n,r){return t}})}(t);return qr(e)},range:Xu.create},Zu=function(t,e,n){var r,o=t.document.createRange();return r=o,e.fold((function(t){r.setStartBefore(t.dom())}),(function(t,e){r.setStart(t.dom(),e)}),(function(t){r.setStartAfter(t.dom())})),function(t,e){e.fold((function(e){t.setEndBefore(e.dom())}),(function(e,n){t.setEnd(e.dom(),n)}),(function(e){t.setEndAfter(e.dom())}))}(o,n),o},Qu=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom(),n),i.setEnd(r.dom(),o),i},tc=function(t){return{left:r(t.left),top:r(t.top),right:r(t.right),bottom:r(t.bottom),width:r(t.width),height:r(t.height)}},ec=dt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),nc=function(t,e,n){return e(Ge(n.startContainer),n.startOffset,Ge(n.endContainer),n.endOffset)},rc=function(t,e){var n=function(e){return t(e)?b.from(e.dom().nodeValue):b.none()};return{get:function(e){if(!t(e))throw new Error("Can only get text value of a text node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw text value of a text node");e.dom().nodeValue=n}}}(so),oc=function(t){return rc.getOption(t)},ic=["img","br"],ac=function(t){return oc(t).filter((function(t){return 0!==t.trim().length||t.indexOf(" ")>-1})).isSome()||R(ic,ao(t))},uc=function(t,e){return wn(e,t)},cc=function(t){var e=Ge(t.anchorNode),n=Ge(t.focusNode);return function(t,e,n,r){var o=function(t,e,n,r){var o=jr(t).dom().createRange();return o.setStart(t.dom(),e),o.setEnd(n.dom(),r),o}(t,e,n,r),i=Cn(t,n)&&e===r;return o.collapsed&&!i}(e,t.anchorOffset,n,t.focusOffset)?b.some(Xu.create(e,t.anchorOffset,n,t.focusOffset)):function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return b.some(Xu.create(Ge(e.startContainer),e.startOffset,Ge(n.endContainer),n.endOffset))}return b.none()}(t)},sc=function(t,e){return function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?b.some(n).map(tc):b.none()}(function(t,e){return function(t,e){return n=function(t,e){return e.match({domRange:function(t){return{ltr:r(t),rtl:b.none}},relative:function(e,n){return{ltr:vt((function(){return Zu(t,e,n)})),rtl:vt((function(){return b.some(Zu(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:vt((function(){return Qu(t,e,n,r,o)})),rtl:vt((function(){return b.some(Qu(t,r,o,e,n))}))}}})}(t,e),(o=n.ltr()).collapsed?n.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return ec.rtl(Ge(t.endContainer),t.endOffset,Ge(t.startContainer),t.startOffset)})).getOrThunk((function(){return nc(0,ec.ltr,o)})):nc(0,ec.ltr,o);var n,o}(t,e).match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom(),n),i.setEnd(r.dom(),o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom(),o),i.setEnd(e.dom(),n),i}})}(t,e))},lc=Lr("element","offset"),fc=dt([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),dc=function(t){return t.fold(o,(function(t,e,n){return t.translate(-e,-n)}))},mc=function(t){return t.fold(o,o)},gc=function(t){return V(t,(function(t,e){return t.translate(e.left(),e.top())}),Oi(0,0))},hc=function(t){var e=I(t,mc);return gc(e)},pc=fc.screen,vc=fc.absolute,bc=function(t,e,n){var r=jr(t.element()),o=Hi(r),i=function(t,e,n){var r=qr(n.root).dom();return b.from(r.frameElement).map(Ge).filter((function(e){var n=jr(e),r=jr(t.element());return Cn(n,r)})).map(Ti)}(t,0,n).getOr(o);return vc(i,o.left(),o.top())},yc=function(t,e,n,r){var o=t,i=e,a=n,u=r;t<0&&(o=0,a=n+t),e<0&&(i=0,u=r+e);var c=pc(Oi(o,i));return b.some(ji(c,a,u))},xc=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point()],a=r.fold((function(){return hc(i)}),(function(){return hc(i)}),(function(){return function(t){var e=I(t,dc);return gc(e)}(i)})),u=Wi(a.left(),a.top(),t.width(),t.height()),c=n.showAbove?Ya():Ja(),s=Za(),l=qu(o,n,c,s,c,s,b.none());return{anchorBox:u,bubble:n.bubble.getOr(Pu()),overrides:n.overrides,layouts:l,placer:b.none()}}))},wc=Lr("element","offset"),Cc=function(t,e){return so(t)?wc(t,e):function(t,e){var n=Xr(t);if(0===n.length)return lc(t,e);if(e<n.length)return lc(n[e],0);var r=n[n.length-1],o=so(r)?function(t){return rc.get(t)}(r).length:Xr(r).length;return lc(r,o)}(t,e)},Sc=function(t,e){return e.getSelection.getOrThunk((function(){return function(){return function(t){return b.from(t.getSelection()).filter((function(t){return t.rangeCount>0})).bind(cc)}(t)}}))().map((function(t){var e=Cc(t.start(),t.soffset()),n=Cc(t.finish(),t.foffset());return Ju.range(e.element(),e.offset(),n.element(),n.offset())}))},kc=[Oe("getSelection"),ve("root"),Oe("bubble"),Wu(),Me("overrides",{}),Me("showAbove",!1),wa("placement",(function(t,e,n){var r=qr(e.root).dom(),o=bc(t,0,e),i=Sc(r,e).bind((function(t){return sc(r,Ju.exactFromRange(t)).orThunk((function(){var e=qe("\ufeff");return Yr(t.start(),e),sc(r,Ju.exact(e,0,e,1)).map((function(t){return no(e),t}))})).bind((function(t){return yc(t.left(),t.top(),t.width(),t.height())}))})),a=Sc(r,e).bind((function(t){return co(t.start())?b.some(t.start()):Gr(t.start())})).getOr(t.element());return xc(i,o,e,n,a)}))],Ec=[ve("node"),ve("root"),Oe("bubble"),Wu(),Me("overrides",{}),Me("showAbove",!1),wa("placement",(function(t,e,n){var r=bc(t,0,e);return e.node.bind((function(o){var i=o.dom().getBoundingClientRect(),a=yc(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element());return xc(a,r,e,n,u)}))}))],Oc=function(t){return t.x()+t.width()},_c=function(t,e){return t.x()-e.width()},Tc=function(t,e){return t.y()-e.height()+t.height()},zc=function(t){return t.y()},Ac=function(t,e,n){return ka(Oc(t),zc(t),n.southeast(),Oa(),"link-layout-se")},Nc=function(t,e,n){return ka(_c(t,e),zc(t),n.southwest(),_a(),"link-layout-sw")},Mc=function(t,e,n){return ka(Oc(t),Tc(t,e),n.northeast(),Ta(),"link-layout-ne")},Bc=function(t,e,n){return ka(_c(t,e),Tc(t,e),n.northwest(),za(),"link-layout-nw")},Rc=function(){return[Ac,Nc,Mc,Bc]},Dc=function(){return[Nc,Ac,Bc,Mc]},Hc=[ve("item"),Wu(),Me("overrides",{}),wa("placement",(function(t,e,n){var r=xu(n,e.item.element()),o=qu(t.element(),e,Rc(),Dc(),Rc(),Dc(),b.none());return b.some({anchorBox:r,bubble:Pu(),overrides:e.overrides,layouts:o,placer:b.none()})}))],Ic=ue("anchor",{selection:kc,node:Ec,hotspot:Gu,submenu:Hc,makeshift:$u}),Pc=function(t,n,r,o,i){!function(t,n,r,o,i,a){var u=Du(a,"maxHeightFunction",Mu()),c=Du(a,"maxWidthFunction",e),s=t.anchorBox(),l=t.origin();!function(t,e,n,r){var o=Au(t,e,n,r);(function(t,e,n){vu(t,function(t,e){return t.fold((function(){return pu("absolute",b.some(e.x()),b.some(e.y()),b.none(),b.none())}),(function(t,n,r,o){return yu("absolute",e,t,n,r,o)}),(function(t,n,r,o){return yu("fixed",e,t,n,r,o)}))}(n.origin(),e))})(e,o,r),function(t,e){var n=e.classes();Yo(t,n.off),Ko(t,n.on)}(e,o),function(t,e,n){n.maxHeightFunction()(t,e.maxHeight())}(e,o,r),function(t,e,n){n.maxWidthFunction()(t,e.maxWidth())}(e,o,r)}(s,n,r,Ru({bounds:wu(l,i),origin:l,preference:o,maxHeightFunction:u,maxWidthFunction:c}))}(function(t,e){return Eu(t,e)}(r.anchorBox,n),i.element(),r.bubble,r.layouts,o,r.overrides)},Lc=function(t,e,n,r,o,i){var a=i.map(Gi);return Fc(t,e,n,r,o,a)},Fc=function(e,n,o,i,a,u){var c=oe("positioning anchor.info",Ic,i);hu((function(){ri(a.element(),"position","fixed");var o=ci(a.element(),"visibility");ri(a.element(),"visibility","hidden");var i,s=n.useFixed()?ku(0,0,(i=t.document.documentElement).clientWidth,i.clientHeight):function(t){var e=Ti(t.element()),n=t.element().dom().getBoundingClientRect();return Su(e.left(),e.top(),n.width,n.height)}(e),l=c.placement,f=u.map(r).or(n.getBounds);l(e,c,s).each((function(t){t.placer.getOr(Pc)(e,s,t,f,a)})),o.fold((function(){fi(a.element(),"visibility")}),(function(t){ri(a.element(),"visibility",t)})),ci(a.element(),"left").isNone()&&ci(a.element(),"top").isNone()&&ci(a.element(),"right").isNone()&&ci(a.element(),"bottom").isNone()&&ci(a.element(),"position").is("fixed")&&fi(a.element(),"position")}),a.element())},Vc=Object.freeze({__proto__:null,position:function(t,e,n,r,o){Lc(t,e,n,r,o,b.none())},positionWithin:Lc,positionWithinBounds:Fc,getMode:function(t,e,n){return e.useFixed()?"fixed":"absolute"}}),Uc=[Me("useFixed",c),Oe("getBounds")],jc=ou({fields:Uc,name:"positioning",active:fu,apis:Vc}),Wc=function(t){br(t,sr());var e=t.components();P(e,Wc)},qc=function(t){var e=t.components();P(e,qc),br(t,cr())},Gc=function(t,e){Qr(t.element(),e.element())},$c=function(t,e){var n=t.components();!function(t){P(t.components(),(function(t){return no(t.element())})),eo(t.element()),t.syncComponents()}(t);var r=X(n,e);P(r,(function(e){Wc(e),t.getSystem().removeFromWorld(e)})),P(e,(function(e){e.getSystem().isConnected()?Gc(t,e):(t.getSystem().addToWorld(e),Gc(t,e),Zo(t.element())&&qc(e)),t.syncComponents()}))},Xc=function(t,e){Kc(t,e,Qr)},Kc=function(t,e,n){t.getSystem().addToWorld(e),n(t.element(),e.element()),Zo(t.element())&&qc(e),t.syncComponents()},Yc=function(t){Wc(t),no(t.element()),t.getSystem().removeFromWorld(t)},Jc=function(t){var e=Gr(t.element()).bind((function(e){return t.getSystem().getByDom(e).toOption()}));Yc(t),e.each((function(t){t.syncComponents()}))},Zc=function(t){var e=t.components();P(e,Yc),eo(t.element()),t.syncComponents()},Qc=function(t,e){ts(t,e,Qr)},ts=function(t,e,n){n(t,e.element());var r=Xr(e.element());P(r,(function(t){e.getByDom(t).each(qc)}))},es=function(t){var e=Xr(t.element());P(e,(function(e){t.getByDom(e).each(Wc)})),no(t.element())},ns=function(t,e,n,r){n.get().each((function(e){Zc(t)}));var o=e.getAttachPoint(t);Xc(o,t);var i=t.getSystem().build(r);return Xc(t,i),n.set(i),i},rs=function(t,e,n,r){var o=ns(t,e,n,r);return e.onOpen(t,o),o},os=function(t,e,n){n.get().each((function(r){Zc(t),Jc(t),e.onClose(t,r),n.clear()}))},is=function(t,e,n){return n.isOpen()},as=function(t,e,n){var r=e.getAttachPoint(t);ri(t.element(),"position",jc.getMode(r)),function(t,e,n,r){ci(t.element(),"visibility").fold((function(){ho(t.element(),n)}),(function(e){fo(t.element(),n,e)})),ri(t.element(),"visibility","hidden")}(t,0,e.cloakVisibilityAttr)},us=function(t,e,n){(function(t){return D(["top","left","right","bottom"],(function(e){return ci(t,e).isSome()}))})(t.element())||fi(t.element(),"position"),function(t,e,n){if(go(t.element(),n)){var r=mo(t.element(),n);ri(t.element(),"visibility",r)}else fi(t.element(),"visibility")}(t,0,e.cloakVisibilityAttr)},cs=Object.freeze({__proto__:null,cloak:as,decloak:us,open:rs,openWhileCloaked:function(t,e,n,r,o){as(t,e),rs(t,e,n,r),o(),us(t,e)},close:os,isOpen:is,isPartOf:function(t,e,n,r){return is(0,0,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},getState:function(t,e,n){return n.get()},setContent:function(t,e,n,r){return n.get().map((function(){return ns(t,e,n,r)}))}}),ss=Object.freeze({__proto__:null,events:function(t,e){return kr([_r(er(),(function(n,r){os(n,t,e)}))])}}),ls=[va("onOpen"),va("onClose"),ve("isPartOf"),ve("getAttachPoint"),Me("cloakVisibilityAttr","data-precloak-visibility")],fs=ou({fields:ls,name:"sandboxing",active:ss,apis:cs,state:Object.freeze({__proto__:null,init:function(){var t=Ve(b.none()),e=r("not-implemented");return Io({readState:e,isOpen:function(){return t.get().isSome()},clear:function(){t.set(b.none())},set:function(e){t.set(b.some(e))},get:function(){return t.get()}})}})}),ds=r("dismiss.popups"),ms=r("reposition.popups"),gs=r("mouse.released"),hs=Wt([Me("isExtraPart",r(!1)),Ne("fireEventInstead",[Me("event",lr())])]),ps=function(t){var e,n=oe("Dismissal",hs,t);return(e={})[ds()]={schema:Wt([ve("target")]),onReceive:function(t,e){fs.isOpen(t)&&(fs.isPartOf(t,e.target)||n.isExtraPart(t,e.target)||n.fireEventInstead.fold((function(){return fs.close(t)}),(function(e){return br(t,e.event)})))}},e},vs=Wt([Me("isExtraPart",r(!1)),Ne("fireEventInstead",[Me("event",fr())]),Ce("doReposition")]),bs=function(t){var e,n=oe("Reposition",vs,t);return(e={})[ms()]={onReceive:function(t){fs.isOpen(t)&&n.fireEventInstead.fold((function(){return n.doReposition(t)}),(function(e){return br(t,e.event)}))}},e},ys=function(t,e,n){e.store.manager.onLoad(t,e,n)},xs=function(t,e,n){e.store.manager.onUnload(t,e,n)},ws=Object.freeze({__proto__:null,onLoad:ys,onUnload:xs,setValue:function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},getValue:function(t,e,n){return e.store.manager.getValue(t,e,n)},getState:function(t,e,n){return n}}),Cs=Object.freeze({__proto__:null,events:function(t,e){var n=t.resetOnDom?[Dr((function(n,r){ys(n,t,e)})),Hr((function(n,r){xs(n,t,e)}))]:[Qa(t,e,ys)];return kr(n)}}),Ss=function(){var t=Ve(null);return Io({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},ks=function(){var t=Ve({}),e=Ve({});return Io({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},lookup:function(n){return st(t.get(),n).orThunk((function(){return st(e.get(),n)}))},update:function(n){var r=t.get(),o=e.get(),i={},a={};P(n,(function(t){i[t.value]=t,st(t,"meta").each((function(e){st(e,"text").each((function(e){a[e]=t}))}))})),t.set(f(f({},r),i)),e.set(f(f({},o),a))},clear:function(){t.set({}),e.set({})}})},Es=Object.freeze({__proto__:null,memory:Ss,dataset:ks,manual:function(){return Io({readState:function(){}})},init:function(t){return t.store.manager.state(t)}}),Os=function(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)},_s=[Oe("initialValue"),ve("getFallbackEntry"),ve("getDataKey"),ve("setValue"),wa("manager",{setValue:Os,getValue:function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).fold((function(){return r.getFallbackEntry(o)}),(function(t){return t}))},onLoad:function(t,e,n){e.store.initialValue.each((function(r){Os(t,e,n,r)}))},onUnload:function(t,e,n){n.clear()},state:ks})],Ts=[ve("getValue"),Me("setValue",e),Oe("initialValue"),wa("manager",{setValue:function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},getValue:function(t,e,n){return e.store.getValue(t)},onLoad:function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},onUnload:e,state:Ho.init})],zs=[Oe("initialValue"),wa("manager",{setValue:function(t,e,n,r){n.set(r),e.onSetValue(t,r)},getValue:function(t,e,n){return n.get()},onLoad:function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},onUnload:function(t,e,n){n.clear()},state:Ss})],As=[Be("store",{mode:"memory"},ue("mode",{memory:zs,manual:Ts,dataset:_s})),va("onSetValue"),Me("resetOnDom",!1)],Ns=ou({fields:As,name:"representing",active:Cs,apis:ws,extra:{setValueFrom:function(t,e){var n=Ns.getValue(e);Ns.setValue(t,n)}},state:Es}),Ms=function(t,e){return Le(t,{},I(e,(function(e){return n=e.name(),r="Cannot configure "+e.name()+" for "+t,Yt(n,n,zt(),Ut((function(t){return St("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([Fe("dump",o)]))},Bs=function(t){return t.dump},Rs=function(t,e){return f(f({},t.dump),nu(e))},Ds=Ms,Hs=Rs,Is=dt([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Ps=function(t){return lt(t,"uiType")},Ls=function(t,e,n,i){return function(t,e,n,o){return Ps(n)&&"placeholder"===n.uiType?function(t,e,n,o){return t.exists((function(t){return t!==n.owner}))?Is.single(!0,r(n)):st(o,n.name).fold((function(){throw new Error("Unknown placeholder component: "+n.name+"\nKnown: ["+et(o)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(n,null,2))}),(function(t){return t.replace()}))}(t,0,n,o):Is.single(!1,r(n))}(t,0,n,i).fold((function(r,o){var a=Ps(n)?o(e,n.config,n.validated):o(e),u=st(a,"components").getOr([]),c=q(u,(function(n){return Ls(t,e,n,i)}));return[f(f({},a),{components:c})]}),(function(t,r){if(Ps(n)){var i=r(e,n.config,n.validated);return n.validated.preprocess.getOr(o)(i)}return r(e)}))},Fs=Is.single,Vs=Is.multiple,Us=r("placeholder"),js=dt([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Ws=Me("factory",{sketch:o}),qs=Me("schema",[]),Gs=ve("name"),$s=Yt("pname","pname",At((function(t){return"<alloy."+xo(t.name)+">"})),ce()),Xs=Fe("schema",(function(){return[Oe("preprocess")]})),Ks=Me("defaults",r({})),Ys=Me("overrides",r({})),Js=qt([Ws,qs,Gs,$s,Ks,Ys]),Zs=qt([Ws,qs,Gs,Ks,Ys]),Qs=qt([Ws,qs,Gs,$s,Ks,Ys]),tl=qt([Ws,Xs,Gs,ve("unit"),$s,Ks,Ys]),el=function(t){return t.fold(b.some,b.none,b.some,b.some)},nl=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},rl=function(t,e){return function(n){var r=oe("Converting part type",e,n);return t(r)}},ol=rl(js.required,Js),il=rl(js.external,Zs),al=rl(js.optional,Qs),ul=rl(js.group,tl),cl=r("entirety"),sl=Object.freeze({__proto__:null,required:ol,external:il,optional:al,group:ul,asNamedPart:el,name:nl,asCommon:function(t){return t.fold(o,o,o,o)},original:cl}),ll=function(t,e,n,r){return ht(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},fl=function(t,e){var n={};return P(e,(function(e){el(e).each((function(e){var r=dl(t,e.pname);n[e.name]=function(n){var o=oe("Part: "+e.name+" in "+t,qt(e.schema),n);return f(f({},r),{config:n,validated:o})}}))})),n},dl=function(t,e){return{uiType:Us(),owner:t,name:e}},ml=function(t,e,n){return{uiType:Us(),owner:t,name:e,config:n,validated:{}}},gl=function(t){return q(t,(function(t){return t.fold(b.none,b.some,b.none,b.none).map((function(t){return Se(t.name,t.schema.concat([Ca(cl())]))})).toArray()}))},hl=function(t){return I(t,nl)},pl=function(t,e,n){return function(t,e,n){var o={},i={};return P(n,(function(t){t.fold((function(t){o[t.pname]=Fs(!0,(function(e,n,r){return t.factory.sketch(ll(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];i[t.name]=r(t.factory.sketch(ll(e,t,n[cl()]),n))}),(function(t){o[t.pname]=Fs(!1,(function(e,n,r){return t.factory.sketch(ll(e,t,n,r))}))}),(function(t){o[t.pname]=Vs(!0,(function(e,n,r){return I(e[t.name],(function(n){return t.factory.sketch(ht(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:r(o),externals:r(i)}}(0,e,n)},vl=function(t,e,n){return function(t,e,n,o){var i=ot(o,(function(t,e){return o=t,i=!1,{name:r(n=e),required:function(){return o.fold((function(t,e){return t}),(function(t,e){return t}))},used:function(){return i},replace:function(){if(i)throw new Error("Trying to use the same placeholder more than once: "+n);return i=!0,o}};var n,o,i})),a=function(t,e,n,r){return q(n,(function(n){return Ls(t,e,n,r)}))}(t,e,n,i);return rt(i,(function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))})),a}(b.some(t),e,e.components,n)},bl=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOption()},yl=function(t,e,n){return bl(t,e,n).getOrDie("Could not find part: "+n)},xl=function(t,e,n){var o={},i=e.partUids,a=t.getSystem();return P(n,(function(t){o[t]=r(a.getByUid(i[t]))})),o},wl=function(t,e){var n=t.getSystem();return ot(e.partUids,(function(t,e){return r(n.getByUid(t))}))},Cl=function(t){return et(t.partUids)},Sl=function(t,e,n){var o={},i=e.partUids,a=t.getSystem();return P(n,(function(t){o[t]=r(a.getByUid(i[t]).getOrDie())})),o},kl=function(t,e){var n=hl(e);return Dt(I(n,(function(e){return{key:e,value:t+"-"+e}})))},El=function(t){return Yt("partUids","partUids",Nt((function(e){return kl(e.uid,t)})),ce())},Ol=Object.freeze({__proto__:null,generate:fl,generateOne:ml,schemas:gl,names:hl,substitutes:pl,components:vl,defaultUids:kl,defaultUidsSchema:El,getAllParts:wl,getAllPartNames:Cl,getPart:bl,getPartOrDie:yl,getParts:xl,getPartsOrDie:Sl}),_l=function(t,e,n,r,o){var i=function(t,e){return(t.length>0?[Se("parts",t)]:[]).concat([ve("uid"),Me("dom",{}),Me("components",[]),Ca("originalSpec"),Me("debug.sketcher",{})]).concat(e)}(r,o);return oe(t+" [SpecSchema]",Wt(i.concat(e)),n)},Tl=function(t,e,n,r,o){var i=zl(o),a=gl(n),u=El(n),c=_l(t,e,i,a,[u]),s=pl(0,c,n);return r(c,vl(t,c,s.internals()),i,s.externals())},zl=function(t){return function(t){return lt(t,"uid")}(t)?t:f(f({},t),{uid:_o("uid")})},Al=Wt([ve("name"),ve("factory"),ve("configFields"),Me("apis",{}),Me("extraApis",{})]),Nl=Wt([ve("name"),ve("factory"),ve("configFields"),ve("partFields"),Me("apis",{}),Me("extraApis",{})]),Ml=function(t){var e=oe("Sketcher for "+t.name,Al,t),n=ot(e.apis,Do),o=ot(e.extraApis,(function(t,e){return Mo(t,e)}));return f(f({name:r(e.name),configFields:r(e.configFields),sketch:function(t){return function(t,e,n,r){var o=zl(r);return n(_l(t,e,o,[],[]),o)}(e.name,e.configFields,e.factory,t)}},n),o)},Bl=function(t){var e=oe("Sketcher for "+t.name,Nl,t),n=fl(e.name,e.partFields),o=ot(e.apis,Do),i=ot(e.extraApis,(function(t,e){return Mo(t,e)}));return f(f({name:r(e.name),partFields:r(e.partFields),configFields:r(e.configFields),sketch:function(t){return Tl(e.name,e.configFields,e.partFields,e.factory,t)},parts:r(n)},o),i)},Rl=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},Dl=function(t){return"input"===ao(t)&&"radio"!==mo(t,"type")||"textarea"===ao(t)},Hl=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),Il=[ve("find")],Pl=ou({fields:Il,name:"composing",apis:Hl}),Ll=function(t,e,n,r){var o=uc(t.element(),"."+e.highlightClass);P(o,(function(n){D(r,(function(t){return t.element()===n}))||($o(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),br(n,vr())})))}))},Fl=function(t,e,n,r){Ll(t,e,0,[r]),Vl(t,e,n,r)||(Go(r.element(),e.highlightClass),e.onHighlight(t,r),br(r,pr()))},Vl=function(t,e,n,r){return Xo(r.element(),e.highlightClass)},Ul=function(t,e,n){return ea(t.element(),"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOption()}))},jl=function(t,e,n){var r=uc(t.element(),"."+e.itemClass);return(r.length>0?b.some(r[r.length-1]):b.none()).bind((function(e){return t.getSystem().getByDom(e).toOption()}))},Wl=function(t,e,n,r){var o=uc(t.element(),"."+e.itemClass);return j(o,(function(t){return Xo(t,e.highlightClass)})).bind((function(e){var n=Ou(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOption()}))},ql=function(t,e,n){var r=uc(t.element(),"."+e.itemClass);return Rl(I(r,(function(e){return t.getSystem().getByDom(e).toOption()})))},Gl=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return Ll(t,e,0,[])},dehighlight:function(t,e,n,r){Vl(t,e,n,r)&&($o(r.element(),e.highlightClass),e.onDehighlight(t,r),br(r,vr()))},highlight:Fl,highlightFirst:function(t,e,n){Ul(t,e).each((function(r){Fl(t,e,n,r)}))},highlightLast:function(t,e,n){jl(t,e).each((function(r){Fl(t,e,n,r)}))},highlightAt:function(t,e,n,r){(function(t,e,n,r){var o=uc(t.element(),"."+e.itemClass);return b.from(o[r]).fold((function(){return w.error("No element found with index "+r)}),t.getSystem().getByDom)})(t,e,0,r).fold((function(t){throw new Error(t)}),(function(r){Fl(t,e,n,r)}))},highlightBy:function(t,e,n,r){var o=ql(t,e);U(o,r).each((function(r){Fl(t,e,n,r)}))},isHighlighted:Vl,getHighlighted:function(t,e,n){return ea(t.element(),"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOption()}))},getFirst:Ul,getLast:jl,getPrevious:function(t,e,n){return Wl(t,e,0,-1)},getNext:function(t,e,n){return Wl(t,e,0,1)},getCandidates:ql}),$l=[ve("highlightClass"),ve("itemClass"),va("onHighlight"),va("onDehighlight")],Xl=ou({fields:$l,name:"highlighting",apis:Gl}),Kl=function(t,e,n){var r=$(t.slice(0,e)),o=$(t.slice(e+1));return U(r.concat(o),n)},Yl=function(t,e,n){var r=$(t.slice(0,e));return U(r,n)},Jl=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return U(o.concat(r),n)},Zl=function(t,e,n){var r=t.slice(e+1);return U(r,n)},Ql=function(t){return function(e){var n=e.raw();return R(t,n.which)}},tf=function(t){return function(e){return G(t,(function(t){return t(e)}))}},ef=function(t){return!0===t.raw().shiftKey},nf=function(t){return!0===t.raw().ctrlKey},rf=a(ef),of=function(t,e){return{matches:t,classification:e}},af=function(t,e,n){e.exists((function(t){return n.exists((function(e){return Cn(e,t)}))}))||yr(t,dr(),{prevFocus:e,newFocus:n})},uf=function(){var t=function(t){return gu(t.element())};return{get:t,set:function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element());var o=t(e);af(e,r,o)}}},cf=function(){var t=function(t){return Xl.getHighlighted(t).map((function(t){return t.element()}))};return{get:t,set:function(n,r){var o=t(n);n.getSystem().getByDom(r).fold(e,(function(t){Xl.highlight(n,t)}));var i=t(n);af(n,o,i)}}};!function(t){t.OnFocusMode="onFocus",t.OnEnterOrSpaceMode="onEnterOrSpace",t.OnApiMode="onApi"}(Vu||(Vu={}));var sf,lf=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i,a;return(i=n(t,e,r,o),a=e.event(),U(i,(function(t){return t.matches(a)})).map((function(t){return t.classification}))).bind((function(n){return n(t,e,r,o)}))},a={schema:function(){return t.concat([Me("focusManager",uf()),Be("focusInside","onFocus",te((function(t){return R(["onFocus","onEnterOrSpace","onApi"],t)?w.value(t):w.error("Invalid value for focusInside")}))),wa("handler",a),wa("state",e),wa("sendFocusIn",o)])},processKey:i,toEvents:function(t,e){var a=t.focusInside!==Vu.OnFocusMode?b.none():o(t).map((function(n){return _r($n(),(function(r,o){n(r,t,e),o.stop()}))}));return kr(a.toArray().concat([_r(Ln(),(function(r,a){i(r,a,n,t,e).fold((function(){!function(n,r){var i=Ql([32].concat([13]))(r.event());t.focusInside===Vu.OnEnterOrSpaceMode&&i&&On(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))}(r,a)}),(function(t){a.stop()}))})),_r(Fn(),(function(n,o){i(n,o,r,t,e).each((function(t){o.stop()}))}))]))}};return a},ff=function(t){var e=[Oe("onEscape"),Oe("onEnter"),Me("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Me("firstTabstop",0),Me("useTabstopAt",r(!0)),Oe("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return na(e,t)})).getOr(e);return Si(n)>0},o=function(t,e,r){(function(t,e){var r=uc(t.element(),e.selector),o=L(r,(function(t){return n(e,t)}));return b.from(o[e.firstTabstop])})(t,e).each((function(n){e.focusManager.set(t,n)}))},a=function(t,e,r,o){var a=uc(t.element(),r.selector);return function(t,e){return e.focusManager.get(t).bind((function(t){return na(t,e.selector)}))}(t,r).bind((function(e){return j(a,i(Cn,e)).bind((function(e){return function(t,e,r,o,i){return i(e,r,(function(t){return function(t,e){return n(t,e)&&t.useTabstopAt(e)}(o,t)})).fold((function(){return o.cyclic?b.some(!0):b.none()}),(function(e){return o.focusManager.set(t,e),b.some(!0)}))}(t,a,e,r,o)}))}))},u=r([of(tf([ef,Ql([9])]),(function(t,e,n){return a(t,0,n,n.cyclic?Kl:Yl)})),of(Ql([9]),(function(t,e,n){return a(t,0,n,n.cyclic?Jl:Zl)})),of(Ql([27]),(function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))})),of(tf([rf,Ql([13])]),(function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))}))]),c=r([]);return lf(e,Ho.init,u,c,(function(){return b.some(o)}))},df=ff(Fe("cyclic",r(!1))),mf=ff(Fe("cyclic",r(!0))),gf=function(t,e,n){return Dl(n)&&Ql([32])(e.event())?b.none():function(t,e,n){return wr(t,n,Jn()),b.some(!0)}(t,0,n)},hf=function(t,e){return b.some(!0)},pf=[Me("execute",gf),Me("useSpace",!1),Me("useEnter",!0),Me("useControlEnter",!1),Me("useDown",!1)],vf=function(t,e,n){return n.execute(t,e,t.element())},bf=lf(pf,Ho.init,(function(t,e,n,r){var o=n.useSpace&&!Dl(t.element())?[32]:[],i=n.useDown?[40]:[],a=o.concat(n.useEnter?[13]:[]).concat(i);return[of(Ql(a),vf)].concat(n.useControlEnter?[of(tf([nf,Ql([13])]),vf)]:[])}),(function(t,e,n,r){return n.useSpace&&!Dl(t.element())?[of(Ql([32]),hf)]:[]}),(function(){return b.none()})),yf=function(){var t=Ve(b.none());return Io({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows()),numColumns:String(t.numColumns())}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set(b.some({numRows:r(e),numColumns:r(n)}))},getNumRows:function(){return t.get().map((function(t){return t.numRows()}))},getNumColumns:function(){return t.get().map((function(t){return t.numColumns()}))}})},xf=Object.freeze({__proto__:null,flatgrid:yf,init:function(t){return t.state(t)}}),wf=function(t){return function(e,n,r,o){var i=t(e.element());return Ef(i,e,n,r,o)}},Cf=function(t,e){var n=Lu(t,e);return wf(n)},Sf=function(t,e){var n=Lu(e,t);return wf(n)},kf=function(t){return function(e,n,r,o){return Ef(t,e,n,r,o)}},Ef=function(t,e,n,r,o){return r.focusManager.get(e).bind((function(n){return t(e.element(),n,r,o)})).map((function(t){return r.focusManager.set(e,t),!0}))},Of=kf,_f=kf,Tf=kf,zf=function(t){return!function(t){return t.offsetWidth<=0&&t.offsetHeight<=0}(t.dom())},Af=function(t,e,n){var o=uc(t,n);return function(t,n){return j(t,(function(t){return Cn(t,e)})).map((function(e){return{index:r(e),candidates:r(t)}}))}(L(o,zf))},Nf=function(t,e){return j(t,(function(t){return Cn(e,t)}))},Mf=function(t,e,n,r){return r(Math.floor(e/n),e%n).bind((function(e){var r=e.row()*n+e.column();return r>=0&&r<t.length?b.some(t[r]):b.none()}))},Bf=function(t,e,n,o,i){return Mf(t,e,o,(function(e,a){var u=Ou(a,i,0,(e===n-1?t.length-e*o:o)-1);return b.some({row:r(e),column:r(u)})}))},Rf=function(t,e,n,o,i){return Mf(t,e,o,(function(e,a){var u=Ou(e,i,0,n-1),c=_u(a,0,(u===n-1?t.length-u*o:o)-1);return b.some({row:r(u),column:r(c)})}))},Df=[ve("selector"),Me("execute",gf),ba("onEscape"),Me("captureTab",!1),Sa()],Hf=function(t,e,n){ea(t.element(),e.selector).each((function(n){e.focusManager.set(t,n)}))},If=function(t){return function(e,n,r,o){return Af(e,n,r.selector).bind((function(e){return t(e.candidates(),e.index(),o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}},Pf=function(t,e,n){return n.captureTab?b.some(!0):b.none()},Lf=If((function(t,e,n,r){return Bf(t,e,n,r,-1)})),Ff=If((function(t,e,n,r){return Bf(t,e,n,r,1)})),Vf=If((function(t,e,n,r){return Rf(t,e,n,r,-1)})),Uf=If((function(t,e,n,r){return Rf(t,e,n,r,1)})),jf=r([of(Ql([37]),Cf(Lf,Ff)),of(Ql([39]),Sf(Lf,Ff)),of(Ql([38]),Of(Vf)),of(Ql([40]),_f(Uf)),of(tf([ef,Ql([9])]),Pf),of(tf([rf,Ql([9])]),Pf),of(Ql([27]),(function(t,e,n){return n.onEscape(t,e)})),of(Ql([32].concat([13])),(function(t,e,n,r){return function(t,e){return e.focusManager.get(t).bind((function(t){return na(t,e.selector)}))}(t,n).bind((function(r){return n.execute(t,e,r)}))}))]),Wf=r([of(Ql([32]),hf)]),qf=lf(Df,yf,jf,Wf,(function(){return b.some(Hf)})),Gf=function(t,e,n,r){var o=function(t,e,n){var i,a=Ou(e,r,0,n.length-1);return a===t?b.none():"button"===ao(i=n[a])&&"disabled"===mo(i,"disabled")?o(t,a,n):b.from(n[a])};return Af(t,n,e).bind((function(t){var e=t.index(),n=t.candidates();return o(e,e,n)}))},$f=[ve("selector"),Me("getInitial",b.none),Me("execute",gf),ba("onEscape"),Me("executeOnMove",!1),Me("allowVertical",!0)],Xf=function(t,e,n){return function(t,e){return e.focusManager.get(t).bind((function(t){return na(t,e.selector)}))}(t,n).bind((function(r){return n.execute(t,e,r)}))},Kf=function(t,e,n){e.getInitial(t).orThunk((function(){return ea(t.element(),e.selector)})).each((function(n){e.focusManager.set(t,n)}))},Yf=function(t,e,n){return Gf(t,n.selector,e,-1)},Jf=function(t,e,n){return Gf(t,n.selector,e,1)},Zf=function(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?Xf(e,n,r):b.some(!0)}))}},Qf=function(t,e,n){return n.onEscape(t,e)},td=r([of(Ql([32]),hf)]),ed=lf($f,Ho.init,(function(t,e,n,r){var o=[37].concat(n.allowVertical?[38]:[]),i=[39].concat(n.allowVertical?[40]:[]);return[of(Ql(o),Zf(Cf(Yf,Jf))),of(Ql(i),Zf(Sf(Yf,Jf))),of(Ql([13]),Xf),of(Ql([32]),Xf),of(Ql([27]),Qf)]}),td,(function(){return b.some(Kf)})),nd=Ur(["rowIndex","columnIndex","cell"],[]),rd=function(t,e,n){return b.from(t[e]).bind((function(t){return b.from(t[n]).map((function(t){return nd({rowIndex:e,columnIndex:n,cell:t})}))}))},od=function(t,e,n,r){var o=Ou(n,r,0,t[e].length-1);return rd(t,e,o)},id=function(t,e,n,r){var o=Ou(n,r,0,t.length-1),i=_u(e,0,t[o].length-1);return rd(t,o,i)},ad=function(t,e,n,r){var o=_u(n+r,0,t[e].length-1);return rd(t,e,o)},ud=function(t,e,n,r){var o=_u(n+r,0,t.length-1),i=_u(e,0,t[o].length-1);return rd(t,o,i)},cd=[Se("selectors",[ve("row"),ve("cell")]),Me("cycles",!0),Me("previousSelector",b.none),Me("execute",gf)],sd=function(t,e,n){e.previousSelector(t).orThunk((function(){var n=e.selectors;return ea(t.element(),n.cell)})).each((function(n){e.focusManager.set(t,n)}))},ld=function(t,e){return function(n,r,o){var i=o.cycles?t:e;return na(r,o.selectors.row).bind((function(t){var e=uc(t,o.selectors.cell);return Nf(e,r).bind((function(e){var r=uc(n,o.selectors.row);return Nf(r,t).bind((function(t){var n=function(t,e){return I(t,(function(t){return uc(t,e.selectors.cell)}))}(r,o);return i(n,t,e).map((function(t){return t.cell()}))}))}))}))}},fd=ld((function(t,e,n){return od(t,e,n,-1)}),(function(t,e,n){return ad(t,e,n,-1)})),dd=ld((function(t,e,n){return od(t,e,n,1)}),(function(t,e,n){return ad(t,e,n,1)})),md=ld((function(t,e,n){return id(t,n,e,-1)}),(function(t,e,n){return ud(t,n,e,-1)})),gd=ld((function(t,e,n){return id(t,n,e,1)}),(function(t,e,n){return ud(t,n,e,1)})),hd=r([of(Ql([37]),Cf(fd,dd)),of(Ql([39]),Sf(fd,dd)),of(Ql([38]),Of(md)),of(Ql([40]),_f(gd)),of(Ql([32].concat([13])),(function(t,e,n){return gu(t.element()).bind((function(r){return n.execute(t,e,r)}))}))]),pd=r([of(Ql([32]),hf)]),vd=lf(cd,Ho.init,hd,pd,(function(){return b.some(sd)})),bd=[ve("selector"),Me("execute",gf),Me("moveOnTab",!1)],yd=function(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))},xd=function(t,e,n){ea(t.element(),e.selector).each((function(n){e.focusManager.set(t,n)}))},wd=function(t,e,n){return Gf(t,n.selector,e,-1)},Cd=function(t,e,n){return Gf(t,n.selector,e,1)},Sd=r([of(Ql([38]),Tf(wd)),of(Ql([40]),Tf(Cd)),of(tf([ef,Ql([9])]),(function(t,e,n,r){return n.moveOnTab?Tf(wd)(t,e,n,r):b.none()})),of(tf([rf,Ql([9])]),(function(t,e,n,r){return n.moveOnTab?Tf(Cd)(t,e,n,r):b.none()})),of(Ql([13]),yd),of(Ql([32]),yd)]),kd=r([of(Ql([32]),hf)]),Ed=lf(bd,Ho.init,Sd,kd,(function(){return b.some(xd)})),Od=[ba("onSpace"),ba("onEnter"),ba("onShiftEnter"),ba("onLeft"),ba("onRight"),ba("onTab"),ba("onShiftTab"),ba("onUp"),ba("onDown"),ba("onEscape"),Me("stopSpaceKeyup",!1),Oe("focusIn")],_d=lf(Od,Ho.init,(function(t,e,n){return[of(Ql([32]),n.onSpace),of(tf([rf,Ql([13])]),n.onEnter),of(tf([ef,Ql([13])]),n.onShiftEnter),of(tf([ef,Ql([9])]),n.onShiftTab),of(tf([rf,Ql([9])]),n.onTab),of(Ql([38]),n.onUp),of(Ql([40]),n.onDown),of(Ql([37]),n.onLeft),of(Ql([39]),n.onRight),of(Ql([32]),n.onSpace),of(Ql([27]),n.onEscape)]}),(function(t,e,n){return n.stopSpaceKeyup?[of(Ql([32]),hf)]:[]}),(function(t){return t.focusIn})),Td=df.schema(),zd=mf.schema(),Ad=ed.schema(),Nd=qf.schema(),Md=vd.schema(),Bd=bf.schema(),Rd=Ed.schema(),Dd=_d.schema(),Hd=au({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Td,cyclic:zd,flow:Ad,flatgrid:Nd,matrix:Md,execution:Bd,menu:Rd,special:Dd}),name:"keying",active:{events:function(t,e){return t.handler.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element(),t.element())}),(function(r){r(t,e,n)}))},setGridSize:function(e,n,r,o,i){!function(t){return ft(t,"setGridSize")}(r)?t.console.error("Layout does not support setGridSize"):r.setGridSize(o,i)}},state:xf}),Id=function(t,e,n,r){var o=t.getSystem().build(r);Kc(t,o,n)},Pd=function(t,e,n,r){var o=Ld(t);U(o,(function(t){return Cn(r.element(),t.element())})).each(Jc)},Ld=function(t,e){return t.components()},Fd=function(t,e,n,r,o){var i=Ld(t);return b.from(i[r]).map((function(e){return Pd(t,0,0,e),o.each((function(e){Id(t,0,(function(t,e){!function(t,e,n){Kr(t,n).fold((function(){Qr(t,e)}),(function(t){Yr(t,e)}))}(t,e,r)}),e)})),e}))},Vd=ou({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,e,n,r){Id(t,0,Qr,r)},prepend:function(t,e,n,r){Id(t,0,Zr,r)},remove:Pd,replaceAt:Fd,replaceBy:function(t,e,n,r,o){var i=Ld(t);return j(i,r).bind((function(e){return Fd(t,0,0,e,o)}))},set:function(t,e,n,r){hu((function(){var e=I(r,t.getSystem().build);$c(t,e)}),t.element())},contents:Ld})}),Ud=function(t,e){return{key:t,value:{config:{},me:function(t,e){var n=kr(e);return ou({fields:[ve("enabled")],name:t,active:{events:r(n)}})}(t,e),configAsRaw:r({}),initialConfig:{},state:Ho}}},jd=function(t,e){e.ignore||(du(t.element()),e.onFocus(t))},Wd=Object.freeze({__proto__:null,focus:jd,blur:function(t,e){e.ignore||function(t){t.dom().blur()}(t.element())},isFocused:function(t){return function(t){var e=jr(t).dom();return t.dom()===e.activeElement}(t.element())}}),qd=Object.freeze({__proto__:null,exhibit:function(t,e){return Lo(e.ignore?{}:{attributes:{tabindex:"-1"}})},events:function(t){return kr([_r($n(),(function(e,n){jd(e,t),n.stop()}))].concat(t.stopMousedown?[_r(Mn(),(function(t,e){e.event().prevent()}))]:[]))}}),Gd=[va("onFocus"),Me("stopMousedown",!1),Me("ignore",!1)],$d=ou({fields:Gd,name:"focusing",active:qd,apis:Wd}),Xd=function(t,e,n){var r=e.aria;r.update(t,r,n.get())},Kd=function(t,e,n){e.toggleClass.each((function(e){n.get()?Go(t.element(),e):$o(t.element(),e)}))},Yd=function(t,e,n){Qd(t,e,n,!n.get())},Jd=function(t,e,n){n.set(!0),Kd(t,e,n),Xd(t,e,n)},Zd=function(t,e,n){n.set(!1),Kd(t,e,n),Xd(t,e,n)},Qd=function(t,e,n,r){(r?Jd:Zd)(t,e,n)},tm=function(t,e,n){Qd(t,e,n,e.selected)},em=Object.freeze({__proto__:null,onLoad:tm,toggle:Yd,isOn:function(t,e,n){return n.get()},on:Jd,off:Zd,set:Qd}),nm=Object.freeze({__proto__:null,exhibit:function(){return Lo({})},events:function(t,e){var n,r,o,i=(n=t,r=e,o=Yd,Pr((function(t){o(t,n,r)}))),a=Qa(t,e,tm);return kr(W([t.toggleOnExecute?[i]:[],[a]]))}}),rm=function(t,e,n){fo(t.element(),"aria-expanded",n)},om=[Me("selected",!1),Oe("toggleClass"),Me("toggleOnExecute",!0),Be("aria",{mode:"none"},ue("mode",{pressed:[Me("syncWithExpanded",!1),wa("update",(function(t,e,n){fo(t.element(),"aria-pressed",n),e.syncWithExpanded&&rm(t,0,n)}))],checked:[wa("update",(function(t,e,n){fo(t.element(),"aria-checked",n)}))],expanded:[wa("update",rm)],selected:[wa("update",(function(t,e,n){fo(t.element(),"aria-selected",n)}))],none:[wa("update",e)]}))],im=ou({fields:om,name:"toggling",active:nm,apis:em,state:{init:function(){var t=Ve(!1);return{get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(!1)},readState:function(){return t.get()}}}}}),am=function(){var t=function(t,e){e.stop(),xr(t)};return[_r(jn(),t),_r(Qn(),t),Mr(Tn()),Mr(Mn())]},um=function(t){return kr(W([t.map((function(t){return Pr((function(e,n){t(e),n.stop()}))})).toArray(),am()]))},cm=function(t){(gu(t.element()).isNone()||$d.isFocused(t))&&($d.isFocused(t)||$d.focus(t),yr(t,"alloy.item-hover",{item:t}))},sm=function(t){yr(t,"alloy.item-focus",{item:t})},lm=r("alloy.item-hover"),fm=r("alloy.item-focus"),dm=[ve("data"),ve("components"),ve("dom"),Me("hasSubmenu",!1),Oe("toggling"),Ds("itemBehaviours",[im,$d,Hd,Ns]),Me("ignoreFocus",!1),Me("domModification",{}),wa("builder",(function(t){return{dom:t.dom,domModification:f(f({},t.domModification),{attributes:f(f(f({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Hs(t.itemBehaviours,[t.toggling.fold(im.revoke,(function(t){return im.config(f({aria:{mode:"checked"}},t))})),$d.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){sm(t)}}),Hd.config({mode:"execution"}),Ns.config({store:{mode:"memory",initialValue:t.data}}),Ud("item-type-events",m(am(),[_r(Hn(),cm),_r(Zn(),$d.focus)]))]),components:t.components,eventOrder:t.eventOrder}})),Me("eventOrder",{})],mm=[ve("dom"),ve("components"),wa("builder",(function(t){return{dom:t.dom,components:t.components,events:kr([Br(Zn())])}}))],gm=r([ol({name:"widget",overrides:function(t){return{behaviours:nu([Ns.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:function(){}}})])}}})]),hm=[ve("uid"),ve("data"),ve("components"),ve("dom"),Me("autofocus",!1),Me("ignoreFocus",!1),Ds("widgetBehaviours",[Ns,$d,Hd]),Me("domModification",{}),El(gm()),wa("builder",(function(t){var e=pl(0,t,gm()),n=vl("item-widget",t,e.internals()),r=function(e){return bl(e,t,"widget").map((function(t){return Hd.focusIn(t),t}))},o=function(e,n){return Dl(n.event().target())?b.none():t.autofocus?(n.setSource(e.element()),b.none()):b.none()};return{dom:t.dom,components:n,domModification:t.domModification,events:kr([Pr((function(t,e){r(t).each((function(t){e.stop()}))})),_r(Hn(),cm),_r(Zn(),(function(e,n){t.autofocus?r(e):$d.focus(e)}))]),behaviours:Hs(t.widgetBehaviours,[Ns.config({store:{mode:"memory",initialValue:t.data}}),$d.config({ignore:t.ignoreFocus,onFocus:function(t){sm(t)}}),Hd.config({mode:"special",focusIn:t.autofocus?function(t){r(t)}:uu(),onLeft:o,onRight:o,onEscape:function(e,n){return $d.isFocused(e)||t.autofocus?t.autofocus?(n.setSource(e.element()),b.none()):b.none():($d.focus(e),b.some(!0))}})])}}))],pm=ue("type",{widget:hm,item:dm,separator:mm}),vm=r([ul({factory:{sketch:function(t){var e=oe("menu.spec item",pm,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return e.hasOwnProperty("uid")?e:f(f({},e),{uid:_o("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),bm=r([ve("value"),ve("items"),ve("dom"),ve("components"),Me("eventOrder",{}),Ms("menuBehaviours",[Xl,Ns,Pl,Hd]),Be("movement",{mode:"menu",moveOnTab:!0},ue("mode",{grid:[Sa(),wa("config",(function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}}))],matrix:[wa("config",(function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}})),ve("rowSelector")],menu:[Me("moveOnTab",!0),wa("config",(function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}}))]})),be("markers",da()),Me("fakeFocus",!1),Me("focusManager",uf()),va("onHighlight")]),ym=r("alloy.menu-focus"),xm=Bl({name:"Menu",configFields:bm(),partFields:vm(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Rs(t.menuBehaviours,[Xl.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),Ns.config({store:{mode:"memory",initialValue:t.value}}),Pl.config({find:b.some}),Hd.config(t.movement.config(t,t.movement))]),events:kr([_r(fm(),(function(t,e){var n=e.event();t.getSystem().getByDom(n.target()).each((function(n){Xl.highlight(t,n),e.stop(),yr(t,ym(),{menu:t,item:n})}))})),_r(lm(),(function(t,e){var n=e.event().item();Xl.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),wm=function(t,e,n,r){return st(n,r).bind((function(r){return st(t,r).bind((function(r){var o=wm(t,e,n,r);return b.some([r].concat(o))}))})).getOr([])},Cm=function(t){return"prepared"===t.type?b.some(t.menu):b.none()},Sm=Cm,km=r("collapse-item"),Em=Ml({name:"TieredMenu",configFields:[xa("onExecute"),xa("onEscape"),ya("onOpenMenu"),ya("onOpenSubmenu"),va("onRepositionMenu"),va("onCollapseMenu"),Me("highlightImmediately",!0),Se("data",[ve("primary"),ve("menus"),ve("expansions")]),Me("fakeFocus",!1),va("onHighlight"),va("onHover"),ga(),ve("dom"),Me("navigateOnHover",!0),Me("stayInDom",!1),Ms("tmenuBehaviours",[Hd,Xl,Pl,Vd]),Me("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:function(t,e){var n,r,o,i,a,u,c,s,l,d=Ve(b.none()),m=(r=Ve({}),o=Ve({}),i=Ve({}),a=Ve(b.none()),u=Ve({}),c=function(t){return s(t).bind(Cm)},{setMenuBuilt:function(t,e){var n;o.set(f(f({},o.get()),((n={})[t]={type:"prepared",menu:e},n)))},setContents:function(t,e,n,c){a.set(b.some(t)),r.set(n),o.set(e),u.set(c);var s=function(t,e){var n={};rt(t,(function(t,e){P(t,(function(t){n[t]=e}))}));var r=e,o=it(e,(function(t,e){return{k:t,v:e}})),i=ot(o,(function(t,e){return[e].concat(wm(n,r,o,e))}));return ot(n,(function(t){return st(i,t).getOr([t])}))}(c,n);i.set(s)},expand:function(t){return st(r.get(),t).map((function(e){var n=st(i.get(),t).getOr([]);return[e].concat(n)}))},refresh:function(t){return st(i.get(),t)},collapse:function(t){return st(i.get(),t).bind((function(t){return t.length>1?b.some(t.slice(1)):b.none()}))},lookupMenu:s=function(t){return st(o.get(),t)},lookupItem:l=function(t){return st(r.get(),t)},otherMenus:function(t){var e=u.get();return X(et(e),t)},getPrimary:function(){return a.get().bind(c)},getMenus:function(){return o.get()},clear:function(){r.set({}),o.set({}),i.set({}),a.set(b.none())},isClear:function(){return a.get().isNone()},getTriggeringPath:function(t,e){var n=L(l(t).toArray(),(function(t){return c(t).isSome()}));return st(i.get(),t).bind((function(t){var o=$(n.concat(t));return function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return b.none();e.push(r.getOrDie())}return b.some(e)}(q(o,(function(t,n){return function(t,e,n){return c(t).bind((function(o){return function(t){return ut(r.get(),(function(e,n){return e===t}))}(t).bind((function(t){return e(t).map((function(t){return{triggeredMenu:o,triggeringItem:t,triggeringPath:n}}))}))}))}(t,e,o.slice(0,n+1)).fold((function(){return a.get().is(t)?[]:[b.none()]}),(function(t){return[b.some(t)]}))})))}))}}),g=function(t){return Ns.getValue(t).value},h=function(t,e){Xl.highlight(t,e),Xl.getHighlighted(e).orThunk((function(){return Xl.getFirst(e)})).each((function(e){wr(t,e.element(),Zn())}))},p=function(t,e){return Rl(I(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?b.some(t.menu):b.none()}))})))},v=function(e,n,r){var o=p(n,n.otherMenus(r));P(o,(function(n){Yo(n.element(),[t.markers.backgroundMenu]),t.stayInDom||Vd.remove(e,n)}))},y=function(e,n){var r=function(e){return d.get().getOrThunk((function(){var n={},r=uc(e.element(),"."+t.markers.item),o=L(r,(function(t){return"true"===mo(t,"aria-haspopup")}));return P(o,(function(t){e.getSystem().getByDom(t).each((function(t){var e=g(t);n[e]=t}))})),d.set(b.some(n)),n}))}(e);rt(r,(function(t,e){var r=R(n,e);fo(t.element(),"aria-expanded",r)}))},x=function(e,n,r){return b.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return b.none();var i=o.menu,a=p(n,r.slice(1));return P(a,(function(e){Go(e.element(),t.markers.backgroundMenu)})),Zo(i.element())||Vd.append(e,xi(i)),Yo(i.element(),[t.markers.backgroundMenu]),h(e,i),v(e,n,r),b.some(i)}))}))};!function(t){t[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent"}(n||(n={}));var w=function(e,r,o){void 0===o&&(o=n.HighlightSubmenu);var i=g(r);return m.expand(i).bind((function(i){return y(e,i),b.from(i[0]).bind((function(a){return m.lookupMenu(a).bind((function(u){var c=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return m.setMenuBuilt(e,r),r}return n.menu}(e,a,u);return Zo(c.element())||Vd.append(e,xi(c)),t.onOpenSubmenu(e,r,c,$(i)),o===n.HighlightSubmenu?(Xl.highlightFirst(c),x(e,m,i)):(Xl.dehighlightAll(c),b.some(r))}))}))}))},C=function(e,n){var r=g(n);return m.collapse(r).bind((function(r){return y(e,r),x(e,m,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},S=function(e){return function(n,r){return na(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOption().bind((function(t){return e(n,t).map((function(){return!0}))}))}))}},k=kr([_r(ym(),(function(t,e){var n=e.event().item();m.lookupItem(g(n)).each((function(){var n=e.event().menu();Xl.highlight(t,n);var r=g(e.event().item());m.refresh(r).each((function(e){return v(t,m,e)}))}))})),Pr((function(e,r){var o=r.event().target();e.getSystem().getByDom(o).each((function(r){0===g(r).indexOf("collapse-item")&&C(e,r),w(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),(function(){}))}))})),Dr((function(e,n){(function(e){var n=function(e,n,r){return ot(r,(function(r,o){var i=function(){return xm.sketch(f(f({dom:r.dom},r),{value:o,items:r.items,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?cf():uf()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))}(e,t.data.primary,t.data.menus),r=ot(t.data.menus,(function(t,e){return q(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}));return m.setContents(t.data.primary,n,t.data.expansions,r),m.getPrimary()})(e).each((function(n){Vd.append(e,xi(n)),t.onOpenMenu(e,n),t.highlightImmediately&&h(e,n)}))}))].concat(t.navigateOnHover?[_r(lm(),(function(e,r){var o=r.event().item();!function(t,e){var n=g(e);m.refresh(n).bind((function(e){return y(t,e),x(t,m,e)}))}(e,o),w(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),E=function(t){return Xl.getHighlighted(t).bind(Xl.getHighlighted)},O={collapseMenu:function(t){E(t).each((function(e){C(t,e)}))},highlightPrimary:function(t){m.getPrimary().each((function(e){h(t,e)}))},repositionMenus:function(e){m.getPrimary().bind((function(t){return E(e).bind((function(t){var e=g(t),n=ct(m.getMenus()),r=Rl(I(n,Sm));return m.getTriggeringPath(e,(function(t){return function(t,e,n){return tt(e,(function(t){if(!t.getSystem().isConnected())return b.none();var e=Xl.getCandidates(t);return U(e,(function(t){return g(t)===n}))}))}(0,r,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))})).fold((function(){(function(t){return b.from(t.components()[0]).filter((function(t){return"menu"===mo(t.element(),"role")}))})(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){t.onRepositionMenu(e,n.primary,n.triggeringPath)}))}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Rs(t.tmenuBehaviours,[Hd.config({mode:"special",onRight:S((function(t,e){return Dl(e.element())?b.none():w(t,e,n.HighlightSubmenu)})),onLeft:S((function(t,e){return Dl(e.element())?b.none():C(t,e)})),onEscape:S((function(e,n){return C(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))})),focusIn:function(t,e){m.getPrimary().each((function(e){wr(t,e.element(),Zn())}))}}),Xl.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),Pl.config({find:function(t){return Xl.getHighlighted(t)}}),Vd.config({})]),eventOrder:t.eventOrder,apis:O,events:k}},extraApis:{tieredData:function(t,e,n){return{primary:t,menus:e,expansions:n}},singleData:function(t,e){return{primary:t,menus:Rt(t,e),expansions:{}}},collapseItem:function(t){return{value:xo(km()),meta:{text:t}}}}}),Om=Ml({name:"InlineView",configFields:[ve("lazySink"),va("onShow"),va("onHide"),Ae("onEscape"),Ms("inlineBehaviours",[fs,Ns,lu]),Ne("fireDismissalEventInstead",[Me("event",lr())]),Ne("fireRepositionEventInstead",[Me("event",fr())]),Me("getRelated",b.none),Me("eventOrder",b.none)],factory:function(t,e){var n=function(t,e,n,r){o(t,e,n,(function(){return r.map((function(t){return Gi(t)}))}))},o=function(e,n,r,o){var i=t.lazySink(e).getOrDie();fs.openWhileCloaked(e,r,(function(){return jc.positionWithinBounds(i,n,e,o())})),Ns.setValue(e,b.some({mode:"position",anchor:n,getBounds:o}))},i=function(e,n,r,o){var i=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Ja()},onRtl:function(){return Za()}}}:{},u=function(t){return function(t){return 2===t.length}(t)?a:{}};return Em.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return fs.close(e),t.onEscape.map((function(t){return t(e)})),b.some(!0)},onExecute:function(){return b.some(!0)},onOpenMenu:function(t,e){jc.positionWithinBounds(i().getOrDie(),n,e,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();jc.position(o,f({anchor:"submenu",item:e},u(r)),n)},onRepositionMenu:function(t,e,r){var a=i().getOrDie();jc.positionWithinBounds(a,n,e,o()),P(r,(function(t){var e=u(t.triggeringPath);jc.position(a,f({anchor:"submenu",item:t.triggeringItem},e),t.triggeredMenu)}))}})}(t,e,n,r,o);fs.open(e,i),Ns.setValue(e,b.some({mode:"menu",menu:i}))},a=function(e){fs.isOpen(e)&&Ns.getValue(e).each((function(n){switch(n.mode){case"menu":fs.getState(e).each((function(t){Em.repositionMenus(t)}));break;case"position":var r=t.lazySink(e).getOrDie();jc.positionWithinBounds(r,n.anchor,e,n.getBounds())}}))},u={setContent:function(t,e){fs.setContent(t,e)},showAt:function(t,e,r){n(t,e,r,b.none())},showWithin:n,showWithinBounds:o,showMenuAt:function(t,e,n){i(t,e,n,(function(){return b.none()}))},showMenuWithinBounds:i,hide:function(t){fs.isOpen(t)&&(Ns.setValue(t,b.none()),fs.close(t))},getContent:function(t){return fs.getState(t)},reposition:a,isOpen:fs.isOpen};return{uid:t.uid,dom:t.dom,behaviours:Rs(t.inlineBehaviours,[fs.config({isPartOf:function(e,n,r){return oa(n,r)||function(e,n){return t.getRelated(e).exists((function(t){return oa(t,n)}))}(e,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),Ns.config({store:{mode:"memory",initialValue:b.none()}}),lu.config({channels:f(f({},ps(f({isExtraPart:r(!1)},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),bs(f(f({isExtraPart:r(!1)},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:a})))})]),eventOrder:t.eventOrder,apis:u}},apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),_m=function(t){return t.x()},Tm=function(t,e){return t.x()+t.width()/2-e.width()/2},zm=function(t,e){return t.x()+t.width()-e.width()},Am=function(t){return t.y()},Nm=function(t,e){return t.y()+t.height()-e.height()},Mm=function(t,e,n){return ka(_m(t),Nm(t,e),n.innerSoutheast(),Oa(),"layout-se")},Bm=function(t,e,n){return ka(zm(t,e),Nm(t,e),n.innerSouthwest(),_a(),"layout-sw")},Rm=function(t,e,n){return ka(_m(t),Am(t),n.innerNortheast(),Ta(),"layout-ne")},Dm=function(t,e,n){return ka(zm(t,e),Am(t),n.innerNorthwest(),za(),"layout-nw")},Hm=function(t,e,n){return ka(Tm(t,e),Am(t),n.innerNorth(),Na(),"layout-n")},Im=function(t,e,n){return ka(Tm(t,e),Nm(t,e),n.innerSouth(),Aa(),"layout-s")},Pm=tinymce.util.Tools.resolve("tinymce.util.Delay"),Lm=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Fm=tinymce.util.Tools.resolve("tinymce.EditorManager"),Vm=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},Um=function(t){return t.getParam("width",Lm.DOM.getStyle(t.getElement(),"width"))},jm=function(t){return b.from(t.settings.min_width).filter(T)},Wm=function(t){return b.from(t.settings.min_height).filter(T)},qm=function(t){return b.from(t.getParam("max_width")).filter(T)},Gm=function(t){return b.from(t.getParam("max_height")).filter(T)},$m=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Xm=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=S(e),o=E(e)&&e.length>0;return!Ym(t)&&(o||r||n)},Km=function(t){var e=et(t.settings),n=L(e,(function(t){return/^toolbar([1-9])$/.test(t)})),r=I(n,(function(e){return t.getParam(e,!1,"string")})),o=L(r,(function(t){return"string"==typeof t}));return o.length>0?b.some(o):b.none()},Ym=function(t){return Km(t).fold((function(){return t.getParam("toolbar",[],"string[]").length>0}),(function(){return!0}))};!function(t){t.default="wrap",t.floating="floating",t.sliding="sliding",t.scrolling="scrolling"}(sf||(sf={}));var Jm,Zm=function(t){return t.getParam("toolbar_mode","","string")};!function(t){t.top="top",t.bottom="bottom"}(Jm||(Jm={}));var Qm,tg=function(t){return t.getParam("toolbar_location",Jm.top,"string")!==Jm.bottom},eg=function(t){var e=function(t){return t.getParam("fixed_toolbar_container","","string")}(t);return e.length>0&&t.inline?ea(Qo(),e):b.none()},ng=function(t){return t.inline&&eg(t).isSome()},rg=function(t){return t.inline&&!$m(t)&&!Xm(t)&&!Ym(t)},og=function(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!ng(t)&&!rg(t)},ig=Ml({name:"Button",factory:function(t){var e=um(t.action),n=t.dom.tag,r=function(e){return st(t.dom,"attributes").bind((function(t){return st(t,e)}))};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:Hs(t.buttonBehaviours,[$d.config({}),Hd.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return f({type:t},e)}return{role:r("role").getOr("button")}}()},eventOrder:t.eventOrder}},configFields:[Me("uid",void 0),ve("dom"),Me("components",[]),Ds("buttonBehaviours",[$d,Hd]),Oe("action"),Oe("role"),Me("eventOrder",{})]}),ag=function(t){var e=function(t){return void 0!==t.uid}(t)&&ft(t,"uid")?t.uid:_o("memento");return{get:function(t){return t.getSystem().getByUid(e).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(e).toOption()},asSpec:function(){return f(f({},t),{uid:e})}}},ug=function(t){return b.from(t()["temporary-placeholder"]).getOr("!not found!")},cg=function(t,e){return b.from(e()[t]).getOrThunk((function(){return ug(e)}))},sg=function(t,e){return tt(t,(function(t){return b.from(e()[t])})).getOrThunk((function(){return ug(e)}))},lg={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},fg=Ml({name:"Notification",factory:function(t){var e=ag({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:nu([Vd.config({})])}),n=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},r=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},o=ag({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:nu([Vd.config({})])}),i={updateProgress:function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each((function(t){Vd.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])}))},updateText:function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Vd.set(r,[pi(n)])}}},a=W([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return b.from(lg[t])})).toArray()]);return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:sg(a,t.iconProvider)}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:nu([Vd.config({})])}].concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[ig.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:cg("close",t.iconProvider),attributes:{"aria-label":t.translationProvider("Close")}}}],action:function(e){t.onAction(e)}})]:[]),apis:i}},configFields:[Oe("level"),ve("progress"),ve("icon"),ve("onAction"),ve("text"),ve("iconProvider"),ve("translationProvider"),Ie("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}}),dg=function(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&t.clearTimeout(r),r=t.setTimeout((function(){e.apply(null,o),r=null}),n)}}},mg=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),gg=function(t,e,n,r,o){var i=mg(t,(function(e){return function(t,e){return t.isBlock(e)||R(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)}(t,e)}));return b.from(i.backwards(e,n,r,o))},hg=function(t){return na(t,"[data-mce-autocompleter]")},pg=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},vg=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},bg=function(t,e){return t.substring(e.length)},yg=function(t,e,n,r){return void 0===r&&(r=0),hg(Ge(e.startContainer)).fold((function(){return function(t,e,n,r){if(void 0===r&&(r=0),!(o=e).collapsed||3!==o.startContainer.nodeType)return b.none();var o,i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return gg(t,e.startContainer,e.startOffset,(function(t,e,r){return function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(vg(o))return b.none();if(o===n)break}return b.some(r)}(r,e,n).getOr(e)}),i).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return b.none();var i=pg(o);return 0!==i.lastIndexOf(n)||bg(i,n).length<r?b.none():b.some({text:bg(i,n),range:o,triggerChar:n})}))}(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom());var o=pg(r);return b.some({range:r,text:bg(o,n),triggerChar:n})}))},xg=tinymce.util.Tools.resolve("tinymce.util.Promise"),wg=function(t,e){return{container:t,offset:e}},Cg=function(e){if(function(e){return e.nodeType===t.Node.TEXT_NODE}(e))return wg(e,e.data.length);var n=e.childNodes;return n.length>0?Cg(n[n.length-1]):wg(e,n.length)},Sg=function(e,n){var r=e.childNodes;return r.length>0&&n<r.length?Sg(r[n],0):r.length>0&&function(e){return e.nodeType===t.Node.ELEMENT_NODE}(e)&&r.length===n?Cg(r[r.length-1]):wg(e,n)},kg=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng().startContainer.nodeValue,a=L(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return function(t){return function(e){var n=Sg(e.startContainer,e.startOffset);return!function(t,e){return gg(t,e.container,e.offset,(function(t,e){return 0===e?-1:e}),t.getRoot()).filter((function(t){var e=t.container.data.charAt(t.offset-1);return!vg(e)})).isSome()}(t,n)}}(t.dom)}))(n.range,i,n.text)}));if(0===a.length)return b.none();var u=xg.all(I(a,(function(t){return t.fetch(n.text,t.maxResults,r).then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction}}))})));return b.some({lookupData:u,context:n})},Eg=qt([xe("type"),ze("text")]),Og=qt([Fe("type",(function(){return"autocompleteitem"})),Fe("active",(function(){return!1})),Fe("disabled",(function(){return!1})),Me("meta",{}),xe("value"),ze("text"),ze("icon")]),_g=qt([xe("type"),xe("ch"),Re("minChars",1),Me("columns",1),Re("maxResults",10),Ae("matches"),Ce("fetch"),Ce("onAction")]),Tg=[Ie("disabled",!1),ze("text"),ze("shortcut"),Yt("value","value",At((function(){return xo("menuitem-value")})),ce()),Me("meta",{})],zg=qt([xe("type"),Pe("onSetup",(function(){return e})),Pe("onAction",e),ze("icon")].concat(Tg)),Ag=qt([xe("type"),Ce("getSubmenuItems"),Pe("onSetup",(function(){return e})),ze("icon")].concat(Tg)),Ng=qt([xe("type"),Ie("active",!1),Pe("onSetup",(function(){return e})),Ce("onAction")].concat(Tg)),Mg=qt([xe("type"),Ie("active",!1),ze("icon")].concat(Tg)),Bg=qt([xe("type"),we("fancytype",["inserttable","colorswatch"]),Pe("onAction",e)]),Rg=function(t,e,n){var r=uc(t.element(),"."+n);if(r.length>0){var o=j(r,(function(t){var n=t.dom().getBoundingClientRect().top,o=r[0].dom().getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return b.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return b.none()},Dg=function(t){return function(t,e){return nu([Ud(t,e)])}(xo("unnamed-events"),t)},Hg=[ve("lazySink"),ve("tooltipDom"),Me("exclusive",!0),Me("tooltipComponents",[]),Me("delay",300),He("mode","normal",["normal","follow-highlight"]),Me("anchor",(function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:r([qa,Wa,Fa,Ua,Va,ja]),onRtl:r([qa,Wa,Fa,Ua,Va,ja])}}})),va("onHide"),va("onShow")],Ig=Object.freeze({__proto__:null,init:function(){var e=Ve(b.none()),n=Ve(b.none()),o=function(){e.get().each((function(e){t.clearTimeout(e)}))},i=r("not-implemented");return Io({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(b.some(t))},clearTooltip:function(){n.set(b.none())},clearTimer:o,resetTimer:function(n,r){o(),e.set(b.some(t.setTimeout((function(){n()}),r)))},readState:i})}}),Pg=xo("tooltip.exclusive"),Lg=xo("tooltip.show"),Fg=xo("tooltip.hide"),Vg=function(t,e,n){t.getSystem().broadcastOn([Pg],{})},Ug=Object.freeze({__proto__:null,hideAllExclusive:Vg,setComponents:function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Vd.set(t,r)}))}}),jg=ou({fields:Hg,name:"tooltipping",active:Object.freeze({__proto__:null,events:function(t,e){var n=function(n){e.getTooltip().each((function(r){Jc(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()};return kr(W([[_r(Lg,(function(n){e.resetTimer((function(){!function(n){if(!e.isShowing()){Vg(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:kr("normal"===t.mode?[_r(Hn(),(function(t){br(n,Lg)})),_r(Rn(),(function(t){br(n,Fg)}))]:[]),behaviours:nu([Vd.config({})])});e.setTooltip(o),Xc(r,o),t.onShow(n,o),jc.position(r,t.anchor(n),o)}}(n)}),t.delay)})),_r(Fg,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),_r(Yn(),(function(t,e){R(e.channels(),Pg)&&n(t)})),Hr((function(t){n(t)}))],"normal"===t.mode?[_r(In(),(function(t){br(t,Lg)})),_r(Xn(),(function(t){br(t,Fg)})),_r(Hn(),(function(t){br(t,Lg)})),_r(Rn(),(function(t){br(t,Fg)}))]:[_r(pr(),(function(t,e){br(t,Lg)})),_r(vr(),(function(t){br(t,Fg)}))]]))}}),state:Ig,apis:Ug}),Wg=tinymce.util.Tools.resolve("tinymce.util.I18n"),qg="tox-menu-nav__js",Gg="tox-collection__item",$g={normal:qg,color:"tox-swatch"},Xg="tox-collection__item-label",Kg="tox-collection__item--active",Yg=function(t){return st($g,t).getOr(qg)},Jg=tinymce.util.Tools.resolve("tinymce.Env"),Zg=function(t){var e=Jg.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},n=t.split("+");return I(n,(function(t){var n=t.toLowerCase().trim();return lt(e,n)?e[n]:t})).join(Jg.mac?"":"+")},Qg=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:t}}},th=function(t){return{dom:{tag:"div",classes:[Xg]},components:[pi(Wg.translate(t))]}},eh=function(t,e){return{dom:{tag:"div",classes:[Xg]},components:[{dom:{tag:t.tag,styles:t.styles},components:[pi(Wg.translate(e))]}]}},nh=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:Zg(t)}}},rh=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon","tox-collection__item-checkmark"],innerHtml:cg("checkmark",t)}}},oh=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],ih=["list-bull-circle","list-bull-default","list-bull-square"],ah=function(t,e,n,r){void 0===r&&(r=b.none());var o,a=Wg.isRtl()&&t.iconContent.exists((function(t){return R(ih,t)})),u=(o=t.iconContent,o.map((function(t){return Wg.isRtl()&&R(oh,t)?t+"-rtl":t}))).map((function(t){return function(t,e,n){return b.from(e()[t]).or(n).getOrThunk((function(){return ug(e)}))}(t,e.icons,r)})),c=b.from(t.meta).fold((function(){return th}),(function(t){return lt(t,"style")?i(eh,t.style):th}));return"color"===t.presets?function(t,e,n,r){var o,i;return{dom:(o=n.getOr(""),i={tag:"div",attributes:t.map((function(t){return{title:r.translate(t)}})).getOr({}),classes:["tox-swatch"]},f(f({},i),"custom"===e?{tag:"button",classes:m(i.classes,["tox-swatches__picker-btn"]),innerHtml:o}:"remove"===e?{classes:m(i.classes,["tox-swatch--remove"]),innerHtml:o}:{attributes:f(f({},i.attributes),{"data-mce-color":e}),styles:{"background-color":e}})),optComponents:[]}}(t.ariaLabel,t.value,u,e):function(t,e,n,r,o){var i=n?t.checkMark.orThunk((function(){return e.or(b.some("")).map(Qg)})):b.none(),a=t.ariaLabel.map((function(t){return{attributes:{title:Wg.translate(t)}}})).getOr({});return{dom:f({tag:"div",classes:[qg,Gg].concat(o?["tox-collection__item-icon-rtl"]:[])},a),optComponents:[i,t.htmlContent.fold((function(){return t.textContent.map(r)}),(function(t){return b.some(function(t){return{dom:{tag:"div",classes:[Xg],innerHtml:t}}}(t))})),t.shortcutContent.map(nh),t.caret]}}(t,u,n,c,a)},uh=["input","button","textarea","select"],ch=function(t,e,n){e.disabled&&gh(t,e)},sh=function(t,e){return!0===e.useNative&&R(uh,ao(t.element()))},lh=function(t){fo(t.element(),"disabled","disabled")},fh=function(t){ho(t.element(),"disabled")},dh=function(t){fo(t.element(),"aria-disabled","true")},mh=function(t){fo(t.element(),"aria-disabled","false")},gh=function(t,e,n){e.disableClass.each((function(e){Go(t.element(),e)})),(sh(t,e)?lh:dh)(t),e.onDisabled(t)},hh=function(t,e,n){e.disableClass.each((function(e){$o(t.element(),e)})),(sh(t,e)?fh:mh)(t),e.onEnabled(t)},ph=function(t,e){return sh(t,e)?function(t){return go(t.element(),"disabled")}(t):function(t){return"true"===mo(t.element(),"aria-disabled")}(t)},vh=Object.freeze({__proto__:null,enable:hh,disable:gh,isDisabled:ph,onLoad:ch,set:function(t,e,n,r){(r?gh:hh)(t,e,n)}}),bh=Object.freeze({__proto__:null,exhibit:function(t,e){return Lo({classes:e.disabled?e.disableClass.map(K).getOr([]):[]})},events:function(t,e){return kr([Er(Jn(),(function(e,n){return ph(e,t)})),Qa(t,e,ch)])}}),yh=[Me("disabled",!1),Me("useNative",!0),Oe("disableClass"),va("onDisabled"),va("onEnabled")],xh=ou({fields:yh,name:"disabling",active:bh,apis:vh}),wh=function(t){return xh.config({disabled:t})},Ch=function(t,e){var n=t.getApi(e);return function(t){t(n)}},Sh=function(t,e){return Dr((function(n){Ch(t,n)((function(n){var r=t.onSetup(n);null!=r&&e.set(r)}))}))},kh=function(t,e){return Hr((function(n){return Ch(t,n)(e.get())}))};!function(t){t[t.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",t[t.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(Qm||(Qm={}));var Eh,Oh=Qm,_h=function(t,e){return Pr((function(n,r){Ch(t,n)(t.onAction),t.triggersSubmenu||e!==Oh.CLOSE_ON_EXECUTE||(br(n,er()),r.stop())}))},Th={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},zh=function(t){return q(t,(function(t){return t.toArray()}))},Ah=function(t,n,r){var o,i=Ve(e);return{type:"item",dom:n.dom,components:zh(n.optComponents),data:t.data,eventOrder:Th,hasSubmenu:t.triggersSubmenu,itemBehaviours:nu([Ud("item-events",[_h(t,r),Sh(t,i),kh(t,i)]),(o=t.disabled,xh.config({disabled:o,disableClass:"tox-collection__item--state-disabled"})),Vd.config({})].concat(t.itemBehaviours))}},Nh=function(t){return{value:t.value,meta:f({text:t.text.getOr("")},t.meta)}},Mh=function(t,e){return st(t,"tooltipWorker").map((function(t){return[jg.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{anchor:"submenu",item:t,overrides:{maxHeightFunction:Bu}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){jg.setComponents(e,[vi({element:Ge(t)})])}))}})]})).getOr([])},Bh=r(fl("item-widget",gm())),Rh=xo("cell-over"),Dh=xo("cell-execute"),Hh=function(t,e,n){var r,o=function(n){return yr(n,Dh,{row:t,col:e})},i=function(t,e){e.stop(),o(t)};return yi({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:nu([Ud("insert-table-picker-cell",[_r(Hn(),$d.focus),_r(Jn(),o),_r(jn(),i),_r(Qn(),i)]),im.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),$d.config({onFocus:function(n){return yr(n,Rh,{row:t,col:e})}})])})},Ih=function(t){return q(t,(function(t){return I(t,xi)}))},Ph=function(t,e){return pi(e+1+"x"+(t+1))},Lh=function(t){return{value:r(t)}},Fh=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Vh=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Uh=function(t){return Fh.test(t)||Vh.test(t)},jh=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},Wh=function(t){var e=jh(t.red())+jh(t.green())+jh(t.blue());return Lh(e)},qh=Math.min,Gh=Math.max,$h=Math.round,Xh=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Kh=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Yh=function(t,e,n,o){return{red:r(t),green:r(e),blue:r(n),alpha:r(o)}},Jh=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},Zh=function(t){var e,n,r,o=(t.hue()||0)%360,i=t.saturation()/100,a=t.value()/100;if(i=Gh(0,qh(i,1)),a=Gh(0,qh(a,1)),0===i)return e=n=r=$h(255*a),Yh(e,n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return e=$h(255*(e+l)),n=$h(255*(n+l)),r=$h(255*(r+l)),Yh(e,n,r,1)},Qh=function(t){var e,n,o=(e=function(t){var e=t.value().replace(Fh,(function(t,e,n,r){return e+e+n+n+r+r}));return{value:r(e)}}(t),null===(n=Vh.exec(e.value()))?["FFFFFF","FF","FF","FF"]:n),i=parseInt(o[1],16),a=parseInt(o[2],16),u=parseInt(o[3],16);return Yh(i,a,u,1)},tp=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return Yh(o,i,a,u)},ep=function(t){return"rgba("+t.red()+","+t.green()+","+t.blue()+","+t.alpha()+")"},np=r(Yh(255,0,0,1)),rp=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),op="choiceitem",ip=[{type:op,text:"Light Green",value:"#BFEDD2"},{type:op,text:"Light Yellow",value:"#FBEEB8"},{type:op,text:"Light Red",value:"#F8CAC6"},{type:op,text:"Light Purple",value:"#ECCAFA"},{type:op,text:"Light Blue",value:"#C2E0F4"},{type:op,text:"Green",value:"#2DC26B"},{type:op,text:"Yellow",value:"#F1C40F"},{type:op,text:"Red",value:"#E03E2D"},{type:op,text:"Purple",value:"#B96AD9"},{type:op,text:"Blue",value:"#3598DB"},{type:op,text:"Dark Turquoise",value:"#169179"},{type:op,text:"Orange",value:"#E67E23"},{type:op,text:"Dark Red",value:"#BA372A"},{type:op,text:"Dark Purple",value:"#843FA1"},{type:op,text:"Dark Blue",value:"#236FA1"},{type:op,text:"Light Gray",value:"#ECF0F1"},{type:op,text:"Medium Gray",value:"#CED4D9"},{type:op,text:"Gray",value:"#95A5A6"},{type:op,text:"Dark Gray",value:"#7E8C8D"},{type:op,text:"Navy Blue",value:"#34495E"},{type:op,text:"Black",value:"#000000"},{type:op,text:"White",value:"#ffffff"}],ap=function(t){void 0===t&&(t=10);var e,n=rp.getItem("tinymce-custom-colors"),r=S(n)?JSON.parse(n):[],o=t-(e=r).length<0?e.slice(0,t):e,i=function(t){o.splice(t,1)};return{add:function(e){(function(t,e){var n=B(t,e);return-1===n?b.none():b.some(n)})(o,e).each(i),o.unshift(e),o.length>t&&o.pop(),rp.setItem("tinymce-custom-colors",JSON.stringify(o))},state:function(){return o.slice(0)}}}(10),up=function(t){return!1!==t.getParam("custom_colors")},cp=function(e){var n=function(t){return t.getParam("color_map")}(e);return void 0!==n?function(e){var n=[],r=t.document.createElement("canvas");r.height=1,r.width=1;for(var o=r.getContext("2d"),i=function(t,e){var n=e/255;return("0"+Math.round(t*n+255*(1-n)).toString(16)).slice(-2).toUpperCase()},a=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();o.clearRect(0,0,r.width,r.height),o.fillStyle="#FFFFFF",o.fillStyle=t,o.fillRect(0,0,1,1);var e=o.getImageData(0,0,1,1).data,n=e[1],a=e[2],u=e[3];return"#"+i(e[0],u)+i(n,u)+i(a,u)},u=0;u<e.length;u+=2)n.push({text:e[u+1],value:a(e[u]),type:"choiceitem"});return n}(n):ip},sp=function(t){ap.add(t)},lp=function(t,e){return t.fire("ResizeContent",e)},fp=function(t,e){var n;return t.dom.getParents(t.selection.getStart(),(function(t){var r;(r=t.style["forecolor"===e?"color":"background-color"])&&(n=n||r)})),n},dp=function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))},mp=function(t){var e=cp(t);return function(t,e){return t.getParam("color_cols",e,"number")}(t,dp(e.length))},gp=function(t,e,n,r){"custom"===n?xp(t)((function(n){n.each((function(n){sp(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),"#000000"):"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))},hp=function(t,e){return t.concat(I(ap.state(),(function(t){return{type:op,text:t,value:t}})).concat(function(t){var e={type:"choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[e,{type:"choiceitem",text:"Custom color",icon:"color-picker",value:"custom"}]:[e]}(e)))},pp=function(t,e){return function(n){n(hp(t,e))}},vp=function(t,e,n){var r,o;t.setIconFill(r="forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",o=n),t.setIconStroke(r,o)},bp=function(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){return b.from(fp(t,n)).bind((function(t){return function(t){if("transparent"===t)return b.some(Yh(0,0,0,0));var e=Xh.exec(t);if(null!==e)return b.some(tp(e[1],e[2],e[3],"1"));var n=Kh.exec(t);return null!==n?b.some(tp(n[1],n[2],n[3],n[4])):b.none()}(t).map((function(t){var n=Wh(t).value();return un(e.toLowerCase(),n)}))})).getOr(!1)},columns:mp(t),fetch:pp(cp(t),up(t)),onAction:function(e){null!==o.get()&&gp(t,n,o.get(),(function(){}))},onItemAction:function(r,i){gp(t,n,i,(function(n){o.set(n),function(t,e){t.fire("TextColorChange",e)}(t,{name:e,color:n})}))},onSetup:function(n){null!==o.get()&&vp(n,e,o.get());var r=function(t){t.name===e&&vp(n,t.name,t.color)};return t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})},yp=function(t,n,r,o){t.ui.registry.addNestedMenuItem(n,{text:o,icon:"forecolor"===n?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(n){gp(t,r,n.value,e)}}]}})},xp=function(t){return function(e,n){var r={colorpicker:n},o=function(t){return function(e){var n=e.getData();t(b.from(n.colorpicker)),e.close()}}(e);t.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:r,onAction:function(t,e){"hex-valid"===e.name&&(e.value?t.enable("ok"):t.disable("ok"))},onSubmit:o,onClose:function(){},onCancel:function(){e(b.none())}})}},wp={register:function(t){!function(t){t.addCommand("mceApplyTextcolor",(function(e,n){!function(t,e,n){t.undoManager.transact((function(){t.focus(),t.formatter.apply(e,{value:n}),t.nodeChanged()}))}(t,e,n)})),t.addCommand("mceRemoveTextcolor",(function(e){!function(t,e){t.undoManager.transact((function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()}))}(t,e)}))}(t);var e=Ve(null),n=Ve(null);bp(t,"forecolor","forecolor","Text color",e),bp(t,"backcolor","hilitecolor","Background color",n),yp(t,"forecolor","forecolor","Text color"),yp(t,"backcolor","hilitecolor","Background color")},getColors:hp,getFetch:pp,colorPickerDialog:xp,getCurrentColor:fp,getColorCols:mp,calcCols:dp},Cp=function(t){return"color"===t?"tox-swatches":"tox-menu"},Sp=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Cp(t),tieredMenu:"tox-tiered-menu"}},kp=function(t){var e=Sp(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:Yg(t)}},Ep=function(t,e,n){var r=Sp(n);return{tag:"div",classes:W([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},Op=[xm.parts().items({})],_p=function(t,e,n){var r=Sp(n);return{dom:{tag:"div",classes:W([[r.tieredMenu]])},markers:kp(n)}},Tp=function(t,e){return function(n){var r=H(n,e);return I(r,(function(e){return{dom:t,components:e}}))}},zp=function(t,e){var n=[],r=[];return P(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],lt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),I(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},Ap=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[xm.parts().items({preprocess:function(n){return"auto"!==t&&t>1?Tp({tag:"div",classes:["tox-collection__group"]},t)(n):zp(n,(function(t,n){return"separator"===e[n].type}))}})]}},Np=function(t){return void 0!==t.icon||"togglemenuitem"===t.type||"choicemenuitem"===t.type},Mp=function(e){return t.console.error(ie(e)),t.console.log(e),b.none()},Bp=function(t,e,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[xm.parts().items({preprocess:function(t){return zp(t,(function(t,e){return"separator"===i[e].type}))}})]});return{value:t,dom:a.dom,components:a.components,items:n}},Rp=function(t,e,n,r,i){var a;return"color"===i?{value:t,dom:(a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[xm.parts().items({preprocess:"auto"!==t?Tp({tag:"div",classes:["tox-swatches__row"]},t):o})]}]}}(r)).dom,components:a.components,items:n}:"normal"===i&&"auto"===r?{value:t,dom:(a=Ap(r,n)).dom,components:a.components,items:n}:"normal"===i&&1===r?{value:t,dom:(a=Ap(1,n)).dom,components:a.components,items:n}:"normal"===i?{value:t,dom:(a=Ap(r,n)).dom,components:a.components,items:n}:"listpreview"===i&&"auto"!==r?{value:t,dom:(a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[xm.parts().items({preprocess:Tp({tag:"div",classes:["tox-collection__group"]},t)})]}}(r)).dom,components:a.components,items:n}:{value:t,dom:Ep(e,r,i),components:Op,items:n}},Dp=function(t,e,n,r,o,i,a,u){var c=D(e,Np),s=Hp(e,n,r,"color"!==o?"normal":"color",i,a,u);return Rp(t,c,s,r,o)},Hp=function(t,e,n,r,o,i,a){return Rl(I(t,(function(t){return"choiceitem"===t.type?(u=t,ne("choicemenuitem",Mg,u)).fold(Mp,(function(u){return b.some(function(t,e,n,r,o,i,a){var u=ah({presets:n,textContent:e?t.text:b.none(),htmlContent:b.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:b.none(),checkMark:e?b.some(rh(a.icons)):b.none(),caret:b.none(),value:t.value},a,!0);return ht(Ah({data:Nh(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){im.set(t,e)},isActive:function(){return im.isOn(t)},isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),function(){}},triggersSubmenu:!1,itemBehaviours:[]},u,i),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})}(u,1===n,r,e,i(t.value),o,a))})):b.none();var u})))},Ip=function(t,e){var n=kp(e);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===e?"tox-swatches__row":"tox-collection__group")}},Pp={inserttable:function(t){var e=xo("size-label"),n=function(t,e,n){for(var r=[],o=0;o<10;o++){for(var i=[],a=0;a<10;a++)i.push(Hh(o,a,t));r.push(i)}return r}(e),r=ag({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:e}},components:[pi("0x0")],behaviours:nu([Vd.config({})])});return{type:"widget",data:{value:xo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Bh().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Ih(n).concat(r.asSpec()),behaviours:nu([Ud("insert-table-picker",[Nr(Rh,(function(t,e,o){var i=o.event().row(),a=o.event().col();!function(t,e,n,r,o){for(var i=0;i<10;i++)for(var a=0;a<10;a++)im.set(t[i][a],i<=e&&a<=n)}(n,i,a),Vd.set(r.get(t),[Ph(i,a)])})),Nr(Dh,(function(e,n,r){t.onAction({numRows:r.event().row()+1,numColumns:r.event().col()+1}),br(e,er())}))]),Hd.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,e){var n=wp.getColors(e.colorinput.getColors(),e.colorinput.hasCustomColors()),r=e.colorinput.getColorCols(),o=Dp(xo("menu-value"),n,(function(e){t.onAction({value:e})}),r,"color",Oh.CLOSE_ON_EXECUTE,(function(){return!1}),e.shared.providers),i=f(f({},o),{markers:kp("color"),movement:Ip(r,"color")});return{type:"widget",data:{value:xo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Bh().widget(xm.sketch(i))]}}},Lp=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:f({tag:"div",classes:[Gg,"tox-collection__group-heading"]},e),components:[]}};!function(t){t[t.ContentFocus=0]="ContentFocus",t[t.UiFocus=1]="UiFocus"}(Eh||(Eh={}));var Fp=function(t){return void 0!==t.icon||"togglemenuitem"===t.type||"choicemenuitem"===t.type},Vp=function(t){return D(t,Fp)},Up=function(n,r,o,i,a){var u=Vp(r),c=Rl(I(r,(function(n){var r=function(n){return function(n,r,o,i,a){var u,c=o.shared.providers,s=function(t){return a?f(f({},t),{shortcut:b.none(),icon:t.text.isSome()?b.none():t.icon}):t};switch(n.type){case"menuitem":return(u=n,ne("menuitem",zg,u)).fold(Mp,(function(t){return b.some(function(t,e,n,r){void 0===r&&(r=!0);var o=ah({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:b.none(),ariaLabel:t.text,caret:b.none(),checkMark:b.none(),shortcutContent:t.shortcut},n,r);return Ah({data:Nh(t),getApi:function(t){return{isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e)}(s(t),r,c,i))}));case"nestedmenuitem":return function(t){return ne("nestedmenuitem",Ag,t)}(n).fold(Mp,(function(t){return b.some(function(t,n,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!1);var a=i?{dom:{tag:"div",classes:["tox-collection__item-caret"],innerHtml:cg("chevron-down",r.icons)}}:function(t){return{dom:{tag:"div",classes:["tox-collection__item-caret"],innerHtml:cg("chevron-right",t)}}}(r.icons),u=ah({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:b.none(),ariaLabel:t.text,caret:b.some(a),checkMark:b.none(),shortcutContent:t.shortcut},r,o);return Ah({data:Nh(t),getApi:function(t){return{isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},disabled:t.disabled,onAction:e,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,n)}(s(t),r,c,i,a))}));case"togglemenuitem":return function(t){return ne("togglemenuitem",Ng,t)}(n).fold(Mp,(function(t){return b.some(function(t,e,n){var r=ah({iconContent:b.none(),textContent:t.text,htmlContent:b.none(),ariaLabel:t.text,checkMark:b.some(rh(n.icons)),caret:b.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,!0);return ht(Ah({data:Nh(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){im.set(t,e)},isActive:function(){return im.isOn(t)},isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})}(s(t),r,c))}));case"separator":return function(t){return ne("separatormenuitem",Eg,t)}(n).fold(Mp,(function(t){return b.some(Lp(t))}));case"fancymenuitem":return function(t){return ne("fancymenuitem",Bg,t)}(n).fold(Mp,(function(t){return function(t,e){return(n=Pp,r=t.fancytype,Object.prototype.hasOwnProperty.call(n,r)?b.some(n[r]):b.none()).map((function(n){return n(t,e)}));var n,r}(s(t),o)}));default:return t.console.error("Unknown item in general menu",n),b.none()}}(n,o,i,function(t){return a?!t.hasOwnProperty("text"):u}(n),a)};return"nestedmenuitem"===n.type&&n.getSubmenuItems().length<=0?r(f(f({},n),{disabled:!0})):r(n)})));return(a?Bp:Rp)(n,u,c,1,"normal")},jp=function(t){return Em.singleData(t.value,t)},Wp=function(e,n){var r=Ve(b.none()),o=Ve(!1),i=yi(Om.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:nu([Ud("dismissAutocompleter",[_r(lr(),(function(){return c()}))])]),lazySink:n.getSink})),a=function(){return r.get().isSome()},u=function(){a()&&Om.hide(i)},c=function(){if(a()){var t=r.get().map((function(t){return t.element}));hg(t.getOr(Ge(e.selection.getNode()))).each(ro),u(),r.set(b.none()),o.set(!1)}},s=vt((function(){return function(t){var e=t.ui.registry.getAll().popups,n=ot(e,(function(t){return(e=t,ne("Autocompleter",_g,e)).fold((function(t){throw new Error(ie(t))}),(function(t){return t}));var e})),r=function(t){var e={};return P(t,(function(t){e[t]={}})),et(e)}(at(n,(function(t){return t.ch}))),o=ct(n);return{dataset:n,triggerChars:r,lookupByChar:function(t){return L(o,(function(e){return e.ch===t}))}}}(e)})),l=function(f){(function(t){return r.get().map((function(n){return yg(e.dom,e.selection.getRng(),n.triggerChar).bind((function(n){return kg(e,s,n,t)}))})).getOrThunk((function(){return function(t,e){var n=e(),r=t.selection.getRng();return function(t,e,n){return tt(n.triggerChars,(function(n){return yg(t,e,n)}))}(t.dom,r,n).bind((function(n){return kg(t,e,n)}))}(e,s)}))})(f).fold(c,(function(s){!function(t){if(!a()){var n=function(t,e){return hg(Ge(t.selection.getNode())).getOrThunk((function(){var n=je('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Qr(n,Ge(e.extractContents())),e.insertNode(n.dom()),Gr(n).each((function(t){return t.dom().normalize()})),function(t){return e=ac,(n=function(t){for(var r=Xr(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return b.some(i);var a=n(i);if(a.isSome())return a}return b.none()})(t);var e,n}(n).map((function(e){t.selection.setCursorLocation(e.dom(),function(t){return"img"===ao(t)?1:oc(t).fold((function(){return Xr(t).length}),(function(t){return t.length}))}(e))})),n}))}(e,t.range);r.set(b.some({triggerChar:t.triggerChar,element:n,matchLength:t.text.length})),o.set(!1)}}(s.context),s.lookupData.then((function(a){r.get().map((function(r){var f,d,m,g=s.context;if(r.triggerChar===g.triggerChar){var h=(f=g.triggerChar,m=tt(d=a,(function(t){return b.from(t.columns)})).getOr(1),q(d,(function(r){return function(t,e,n,r,o,i){var a=1===r,u=!a||Vp(t);return Rl(I(t,(function(t){return"separator"===t.type?(r=t,ne("Autocompleter.Separator",Eg,r)).fold(Mp,(function(t){return b.some(Lp(t))})):function(t){return ne("Autocompleter.Item",Og,t)}(t).fold(Mp,(function(t){return b.some(function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=ah({presets:r,textContent:b.none(),htmlContent:n?t.text.map((function(t){return function(t,e){var n=function(t){return Lm.DOM.encode(t)}(Wg.translate(t));if(e.length>0){var r=new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(e),"gi");return n.replace(r,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return n}(t,e)})):b.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:b.none(),checkMark:b.none(),caret:b.none(),value:t.value},a.providers,u,t.icon);return Ah({data:Nh(t),disabled:t.disabled,getApi:function(){return{}},onAction:function(e){return o(t.value,t.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:Mh(t.meta,a)},c,i)}(t,e,a,"normal",n,o,i,u))}));var r})))}(r.items,r.matchText,(function(n,i){var a=e.selection.getRng();yg(e.dom,a,f).fold((function(){return t.console.error("Lost context. Cursor probably moved")}),(function(t){var e=t.range,a={hide:function(){c()},reload:function(t){u(),l(t)}};o.set(!0),r.onAction(a,e,n,i),o.set(!1)}))}),m,Oh.BUBBLE_TO_SANDBOX,n)})));h.length>0?function(t,n,r,o){t.matchLength=n.text.length;var a=tt(r,(function(t){return b.from(t.columns)})).getOr(1);Om.showAt(i,{anchor:"node",root:Ge(e.getBody()),node:b.from(t.element)},xm.sketch(function(t,e,n,r){var o=n===Eh.ContentFocus?cf():uf(),i=Ip(e,"normal"),a=kp("normal");return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:a.selectedItem,item:a.item},movement:i,fakeFocus:n===Eh.ContentFocus,focusManager:o,menuBehaviours:Dg("auto"!==e?[]:[Dr((function(t,e){Rg(t,4,a.item).each((function(e){Hd.setGridSize(t,e.numRows,e.numColumns)}))}))])}}(Rp("autocompleter-value",!0,o,a,"normal"),a,Eh.ContentFocus))),Om.getContent(i).each(Xl.highlightFirst)}(r,g,a,h):g.text.length-r.matchLength>=10?c():u()}}))}))}))};!function(t,e){e.on("keypress compositionend",t.onKeypress.throttle),e.on("remove",t.onKeypress.cancel);var n=function(t,e){yr(t,Ln(),{raw:e})};e.on("keydown",(function(e){var r=function(){return t.getView().bind(Xl.getHighlighted)};8===e.which&&t.onKeypress.throttle(e),t.isActive()&&(27===e.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===e.which?(r().each(xr),e.preventDefault()):40===e.which?(r().fold((function(){t.getView().each(Xl.highlightFirst)}),(function(t){n(t,e)})),e.preventDefault(),e.stopImmediatePropagation()):37!==e.which&&38!==e.which&&39!==e.which||r().each((function(t){n(t,e),e.preventDefault(),e.stopImmediatePropagation()})):13!==e.which&&38!==e.which&&40!==e.which||t.cancelIfNecessary())})),e.on("NodeChange",(function(e){t.isActive()&&!t.isProcessingAction()&&hg(Ge(e.element)).isNone()&&t.cancelIfNecessary()}))}({onKeypress:dg((function(t){27!==t.which&&l()}),50),cancelIfNecessary:c,isMenuOpen:function(){return Om.isOpen(i)},isActive:a,isProcessingAction:o.get,getView:function(){return Om.getContent(i)}},e)},qp=r(!0),Gp=function(t,e,n){return function(t,e,n,r){return Ri(t,e,n,r,!1)}(t,e,qp,n)},$p=function(t,e,n){return function(t,e,n,r){return Ri(t,e,n,r,!0)}(t,e,qp,n)},Xp=Bi,Kp=function(t,e,n){return na(t,e,n).isSome()};function Yp(e,n){var r=null;return{cancel:function(){null!==r&&(t.clearTimeout(r),r=null)},schedule:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r=t.setTimeout((function(){e.apply(null,o),r=null}),n)}}}var Jp=function(t){var e=t.raw();return void 0===e.touches||1!==e.touches.length?b.none():b.some(e.touches[0])},Zp=gn().browser.isFirefox(),Qp=Wt([Ce("triggerEvent"),Me("stopBackspace",!0)]),tv=function(t,e){var n=st(t,"target").map((function(t){return t()})).getOr(e);return Ve(n)},ev=dt([{stopped:[]},{resume:["element"]},{complete:[]}]),nv=function(t,e,n,o,i,a){var u=t(e,o),c=function(t,e){var n=Ve(!1),o=Ve(!1);return{stop:function(){n.set(!0)},cut:function(){o.set(!0)},isStopped:n.get,isCut:o.get,event:r(t),setSource:e.set,getSource:e.get}}(n,i);return u.fold((function(){return a.logEventNoHandlers(e,o),ev.complete()}),(function(t){var n=t.descHandler();return Fo(n)(c),c.isStopped()?(a.logEventStopped(e,t.element(),n.purpose()),ev.stopped()):c.isCut()?(a.logEventCut(e,t.element(),n.purpose()),ev.complete()):Gr(t.element()).fold((function(){return a.logNoParent(e,t.element(),n.purpose()),ev.complete()}),(function(r){return a.logEventResponse(e,t.element(),n.purpose()),ev.resume(r)}))}))},rv=function(t,e,n,r,o,i){return nv(t,e,n,r,o,i).fold((function(){return!0}),(function(r){return rv(t,e,n,r,o,i)}),(function(){return!1}))},ov=function(t,e,n,r,o){var i=tv(n,r);return rv(t,e,n,r,i,o)},iv=Lr("element","descHandler");function av(){var t,e=(t={},{registerId:function(e,n,o){rt(o,(function(o,a){var u=void 0!==t[a]?t[a]:{};u[n]=function(t,e){return n=i.apply(void 0,[t.handler].concat(e)),o=t.purpose(),{cHandler:n,purpose:r(o)};var n,o}(o,e),t[a]=u}))},unregisterId:function(e){rt(t,(function(t,n){t.hasOwnProperty(e)&&delete t[e]}))},filterByType:function(e){return st(t,e).map((function(t){return at(t,(function(t,e){return function(t,e){return{id:r(t),descHandler:r(e)}}(e,t)}))})).getOr([])},find:function(e,n,r){var o=st(t,n);return En(r,(function(t){return function(t,e){return Oo(e).fold((function(){return b.none()}),(function(n){return t.bind((function(t){return st(t,n)})).map((function(t){return iv(e,t)}))}))}(o,t)}),e)}}),n={},o=function(t){Oo(t.element()).each((function(t){delete n[t],e.unregisterId(t)}))};return{find:function(t,n,r){return e.find(t,n,r)},filter:function(t){return e.filterByType(t)},register:function(t){var r=function(t){var e=t.element();return Oo(e).fold((function(){return function(t,e){var n=xo(So+"uid-");return Eo(e,n),n}(0,t.element())}),(function(t){return t}))}(t);ft(n,r)&&function(t,e){var r=n[e];if(r!==t)throw new Error('The tagId "'+e+'" is already used by: '+po(r.element())+"\nCannot use it for: "+po(t.element())+"\nThe conflicting element is"+(Zo(r.element())?" ":" not ")+"already in the DOM");o(t)}(t,r),e.registerId([t],r,t.events()),n[r]=t},unregister:o,getById:function(t){return st(n,t)}}}var uv=Ml({name:"Container",factory:function(t){var e=t.dom,n=e.attributes,r=d(e,["attributes"]);return{uid:t.uid,dom:f({tag:"div",attributes:f({role:"presentation"},n)},r),components:t.components,behaviours:Bs(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Me("components",[]),Ms("containerBehaviours",[]),Me("events",{}),Me("domModification",{}),Me("eventOrder",{})]}),cv=function(n){var o,i,a,c,s,l,f,d,m,g,h=function(t){return Gr(n.element()).fold((function(){return!0}),(function(e){return Cn(t,e)}))},p=av(),v=function(t,e){return p.find(h,t,e)},y=(o=n.element(),i=oe("Getting GUI events settings",Qp,{triggerEvent:function(t,e){return ca(t,e.target(),(function(n){return function(t,e,n,r){var o=n.target();return ov(t,e,n,o,r)}(v,t,e,n)}))}}),a=function(t){var e=Ve(b.none()),n=Ve(!1),o=Yp((function(e){t.triggerEvent(tr(),e),n.set(!0)}),400),i=Dt([{key:Tn(),value:function(t){return Jp(t).each((function(i){o.cancel();var a={x:r(i.clientX),y:r(i.clientY),target:t.target};o.schedule(t),n.set(!1),e.set(b.some(a))})),b.none()}},{key:zn(),value:function(t){return o.cancel(),Jp(t).each((function(t){e.get().each((function(n){(function(t,e){var n=Math.abs(t.clientX-e.x()),r=Math.abs(t.clientY-e.y());return n>5||r>5})(t,n)&&e.set(b.none())}))})),b.none()}},{key:An(),value:function(r){return o.cancel(),e.get().filter((function(t){return Cn(t.target(),r.target())})).map((function(e){return n.get()?(r.prevent(),!1):t.triggerEvent(Qn(),r)}))}}]);return{fireIfReady:function(t,e){return st(i,e).bind((function(e){return e(t)}))}}}(i),c=I(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(t){return Gp(o,t,(function(e){a.fireIfReady(e,t).each((function(t){t&&e.kill()})),i.triggerEvent(t,e)&&e.kill()}))})),s=Ve(b.none()),l=Gp(o,"paste",(function(e){a.fireIfReady(e,"paste").each((function(t){t&&e.kill()})),i.triggerEvent("paste",e)&&e.kill(),s.set(b.some(t.setTimeout((function(){i.triggerEvent(Kn(),e)}),0)))})),f=Gp(o,"keydown",(function(t){i.triggerEvent("keydown",t)?t.kill():!0===i.stopBackspace&&function(t){return 8===t.raw().which&&!R(["input","textarea"],ao(t.target()))&&!Kp(t.target(),'[contenteditable="true"]')}(t)&&t.prevent()})),d=function(t,e){return Zp?$p(t,"focus",e):Gp(t,"focusin",e)}(o,(function(t){i.triggerEvent("focusin",t)&&t.kill()})),m=Ve(b.none()),g=function(t,e){return Zp?$p(t,"blur",e):Gp(t,"focusout",e)}(o,(function(e){i.triggerEvent("focusout",e)&&e.kill(),m.set(b.some(t.setTimeout((function(){i.triggerEvent(Xn(),e)}),0)))})),{unbind:function(){P(c,(function(t){t.unbind()})),f.unbind(),d.unbind(),g.unbind(),l.unbind(),s.get().each(t.clearTimeout),m.get().each(t.clearTimeout)}}),x={debugInfo:r("real"),triggerEvent:function(t,e,n){ca(t,e,(function(r){return ov(v,t,n,e,r)}))},triggerFocus:function(t,n){Oo(t).fold((function(){du(t)}),(function(o){ca($n(),t,(function(o){return function(t,e,n,r,o){var i=tv(n,r);nv(t,e,n,r,i,o)}(v,$n(),{originator:r(n),kill:e,prevent:e,target:r(t)},t,o),!1}))}))},triggerEscape:function(t,e){x.triggerEvent("keydown",t.element(),e.event())},getByUid:function(t){return A(t)},getByDom:function(t){return N(t)},build:yi,addToGui:function(t){k(t)},removeFromGui:function(t){E(t)},addToWorld:function(t){C(t)},removeFromWorld:function(t){S(t)},broadcast:function(t){_(t)},broadcastOn:function(t,e){T(t,e)},broadcastEvent:function(t,e){z(t,e)},isConnected:r(!0)},C=function(t){t.connect(x),so(t.element())||(p.register(t),P(t.components(),C),x.triggerEvent(rr(),t.element(),{target:r(t.element())}))},S=function(t){so(t.element())||(P(t.components(),S),p.unregister(t)),t.disconnect()},k=function(t){Xc(n,t)},E=function(t){Jc(t)},O=function(t){var e=p.filter(Yn());P(e,(function(e){var n=e.descHandler();Fo(n)(t)}))},_=function(t){O({universal:r(!0),data:r(t)})},T=function(t,e){O({universal:r(!1),channels:r(t),data:r(e)})},z=function(t,n){return o=p.filter(t),i=function(t){var n=Ve(!1);return{stop:function(){n.set(!0)},cut:e,isStopped:n.get,isCut:r(!1),event:r(t),setSource:u("Cannot set source of a broadcasted event"),getSource:u("Cannot get source of a broadcasted event")}}(n),P(o,(function(t){var e=t.descHandler();Fo(e)(i)})),i.isStopped();var o,i},A=function(t){return p.getById(t).fold((function(){return w.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),w.value)},N=function(t){var e=Oo(t).getOr("not found");return A(e)};return C(n),{root:r(n),element:n.element,destroy:function(){y.unbind(),no(n.element())},add:k,remove:E,getByUid:A,getByDom:N,addToWorld:C,removeFromWorld:S,broadcast:_,broadcastOn:T,broadcastEvent:z}},sv=xo("form-component-change"),lv=xo("form-close"),fv=xo("form-cancel"),dv=xo("form-action"),mv=xo("form-submit"),gv=xo("form-block"),hv=xo("form-unblock"),pv=xo("form-tabchange"),vv=xo("form-resize"),bv=r([Me("prefix","form-field"),Ms("fieldBehaviours",[Pl,Ns])]),yv=r([al({schema:[ve("dom")],name:"label"}),al({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[ve("text")],name:"aria-descriptor"}),ol({factory:{sketch:function(t){var e=Bt(t,["factory"]);return t.factory.sketch(e)}},schema:[ve("factory")],name:"field"})]),xv=Bl({name:"FormField",configFields:bv(),partFields:yv(),factory:function(t,e,n,r){var o=Rs(t.fieldBehaviours,[Pl.config({find:function(e){return bl(e,t,"field")}}),Ns.config({store:{mode:"manual",getValue:function(t){return Pl.getCurrent(t).bind(Ns.getValue)},setValue:function(t,e){Pl.getCurrent(t).each((function(t){Ns.setValue(t,e)}))}}})]),i=kr([Dr((function(e,n){var r=xl(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=xo(t.prefix);r.label().each((function(t){fo(t.element(),"for",n),fo(e.element(),"id",n)})),r["aria-descriptor"]().each((function(n){var r=xo(t.prefix);fo(n.element(),"id",r),fo(e.element(),"aria-describedby",r)}))}))}))]);return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:{getField:function(e){return bl(e,t,"field")},getLabel:function(e){return bl(e,t,"label")}}}},apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),wv=r([Oe("data"),Me("inputAttributes",{}),Me("inputStyles",{}),Me("tag","input"),Me("inputClasses",[]),va("onSetValue"),Me("styles",{}),Me("eventOrder",{}),Ms("inputBehaviours",[Ns,$d]),Me("selectOnFocus",!0)]),Cv=function(t){return nu([$d.config({onFocus:t.selectOnFocus?function(t){var e=t.element(),n=mi(e);e.dom().setSelectionRange(0,n.length)}:e})])},Sv=function(t){return f(f({},Cv(t)),Rs(t.inputBehaviours,[Ns.config({store:f(f({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return mi(t.element())},setValue:function(t,e){mi(t.element())!==e&&gi(t.element(),e)}}),onSetValue:t.onSetValue})]))},kv=function(t){return{tag:t.tag,attributes:f({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},Ev=Ml({name:"Input",configFields:wv(),factory:function(t,e){return{uid:t.uid,dom:kv(t),components:[],behaviours:Sv(t),eventOrder:t.eventOrder}}}),Ov={},_v={exports:Ov};!function(t,e,n,r){!function(t){"object"==typeof e&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}((function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=n[a]={exports:{}};e[a][0].call(s.exports,(function(t){return o(e[a][1][t]||t)}),s,s.exports,t,e,n,r)}return n[a].exports}for(var i=!1,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&g())}function g(){if(!f){var t=c(m);f=!0;for(var e=l.length;e;){for(s=l,l=[];++d<e;)s&&s[d].run();d=-1,e=l.length}s=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function p(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new h(t,e)),1!==l.length||f||c(g)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){!function(n){var r=setTimeout;function o(){}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void f((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(a){c(t,a)}var r,o}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,u(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"==typeof t?function(e){t(e)}:function(t){r(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},c=0;function s(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new s(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new s(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"==typeof e?e:function(t){var e=c++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o((function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}))}(0,Ov,_v);var Tv,zv=_v.exports.boltExport,Av=function(e){var n=b.none(),r=[],o=function(t){i()?a(t):r.push(t)},i=function(){return n.isSome()},a=function(e){n.each((function(n){t.setTimeout((function(){e(n)}),0)}))};return e((function(t){n=b.some(t),P(r,a),r=[]})),{get:o,map:function(t){return Av((function(e){o((function(n){e(t(n))}))}))},isReady:i}},Nv={nu:Av,pure:function(t){return Av((function(e){e(t)}))}},Mv=function(e){t.setTimeout((function(){throw e}),0)},Bv=function(t){var e=function(e){t().then(e,Mv)};return{map:function(e){return Bv((function(){return t().then(e)}))},bind:function(e){return Bv((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return Bv((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return Nv.nu(e)},toCached:function(){var e=null;return Bv((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},Rv=function(t){return Bv((function(){return new zv(t)}))},Dv=function(t){return Bv((function(){return zv.resolve(t)}))},Hv=["input","textarea"],Iv=function(t){var e=ao(t);return R(Hv,e)},Pv=function(t,e){var n=e.getRoot(t).getOr(t.element());$o(n,e.invalidClass),e.notify.each((function(e){Iv(t.element())&&fo(t.element(),"aria-invalid",!1),e.getContainer(t).each((function(t){io(t,e.validHtml)})),e.onValid(t)}))},Lv=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element());Go(o,e.invalidClass),e.notify.each((function(e){Iv(t.element())&&fo(t.element(),"aria-invalid",!0),e.getContainer(t).each((function(t){io(t,r)})),e.onInvalid(t,r)}))},Fv=function(t,e,n){return e.validator.fold((function(){return Dv(w.value(!0))}),(function(e){return e.validate(t)}))},Vv=function(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),Fv(t,e).map((function(n){return t.getSystem().isConnected()?n.fold((function(n){return Lv(t,e,0,n),w.error(n)}),(function(n){return Pv(t,e),w.value(n)})):w.error("No longer in system")}))},Uv=Object.freeze({__proto__:null,markValid:Pv,markInvalid:Lv,query:Fv,run:Vv,isInvalid:function(t,e){var n=e.getRoot(t).getOr(t.element());return Xo(n,e.invalidClass)}}),jv=Object.freeze({__proto__:null,events:function(t,n){return t.validator.map((function(n){return kr([_r(n.onEvent,(function(e){Vv(e,t).get(o)}))].concat(n.validateOnLoad?[Dr((function(n){Vv(n,t).get(e)}))]:[]))})).getOr({})}}),Wv=[ve("invalidClass"),Me("getRoot",b.none),Ne("notify",[Me("aria","alert"),Me("getContainer",b.none),Me("validHtml",""),va("onValid"),va("onInvalid"),va("onValidate")]),Ne("validator",[ve("validate"),Me("onEvent","input"),Me("validateOnLoad",!0)])],qv=ou({fields:Wv,name:"invalidating",active:jv,apis:Uv,extra:{validation:function(t){return function(e){var n=Ns.getValue(e);return Dv(t(n))}}}}),Gv=Object.freeze({__proto__:null,exhibit:function(t,e){return Lo({attributes:Dt([{key:e.tabAttr,value:"true"}])})}}),$v=[Me("tabAttr","data-alloy-tabstop")],Xv=ou({fields:$v,name:"tabstopping",active:Gv}),Kv=function(t,e,n,r){var o=Yv(t,e,n,r);return xv.sketch(o)},Yv=function(t,e,n,r){return{dom:Jv(n),components:t.toArray().concat([e]),fieldBehaviours:nu(r)}},Jv=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},Zv=function(t,e){return xv.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},Qv=Object.freeze({__proto__:null,getCoupled:function(t,e,n,r){return n.getOrCreate(t,e,r)}}),tb=[be("others",ee(w.value,ce()))],eb=ou({fields:tb,name:"coupling",apis:Qv,state:Object.freeze({__proto__:null,init:function(){var t={},e=r({});return Io({readState:e,getOrCreate:function(e,n,r){var o=et(n.others);if(o)return st(t,r).getOrThunk((function(){var o=st(n.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(o);return t[r]=i,i}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),nb=r("sink"),rb=r(al({name:nb(),overrides:r({dom:{tag:"div"},behaviours:nu([jc.config({useFixed:s})]),events:kr([Mr(Ln()),Mr(Mn()),Mr(jn())])})}));!function(t){t[t.HighlightFirst=0]="HighlightFirst",t[t.HighlightNone=1]="HighlightNone"}(Tv||(Tv={}));var ob=function(t,e){var n=t.getHotspot(e).getOr(e),r=t.getAnchorOverrides();return t.layouts.fold((function(){return{anchor:"hotspot",hotspot:n,overrides:r}}),(function(t){return{anchor:"hotspot",hotspot:n,overrides:r,layouts:t}}))},ib=function(t,e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var u=function(t,e,n){return(0,t.fetch)(n).map(e)}(t,e,r),c=cb(r,t);return u.map((function(t){return t.bind((function(t){return b.from(Em.sketch(f(f({},i.menu()),{uid:_o(""),data:t,highlightImmediately:a===Tv.HighlightFirst,onOpenMenu:function(t,e){var r=c().getOrDie();jc.position(r,n,e),fs.decloak(o)},onOpenSubmenu:function(t,e,n){var r=c().getOrDie();jc.position(r,{anchor:"submenu",item:e},n),fs.decloak(o)},onRepositionMenu:function(t,e,r){var o=c().getOrDie();jc.position(o,n,e),P(r,(function(t){jc.position(o,{anchor:"submenu",item:t.triggeringItem},t.triggeredMenu)}))},onEscape:function(){return $d.focus(r),fs.close(o),b.some(!0)}})))}))}))}(t,e,ob(t,n),n,r,o,a).map((function(t){return t.fold((function(){fs.isOpen(r)&&fs.close(r)}),(function(t){fs.cloak(r),fs.open(r,t),i(r)})),r}))},ab=function(t,e,n,r,o,i,a){return fs.close(r),Dv(r)},ub=function(t,e,n,r,o,i){var a=eb.getCoupled(n,"sandbox");return(fs.isOpen(a)?ab:ib)(t,e,n,a,r,o,i)},cb=function(t,e){return t.getSystem().getByUid(e.uid+"-"+nb()).map((function(t){return function(){return w.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return w.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},sb=function(t){fs.getState(t).each((function(t){Em.repositionMenus(t)}))},lb=function(t,e,n){var o=ra(),i=cb(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:o.id(),role:"listbox"}},behaviours:Hs(t.sandboxBehaviours,[Ns.config({store:{mode:"memory",initialValue:e}}),fs.config({onOpen:function(r,i){var a=ob(t,e);o.link(e.element()),t.matchWidth&&function(t,e,n){var r=Pl.getCurrent(e).getOr(e),o=Ni(t.element());n?ri(r.element(),"min-width",o+"px"):function(t,e){Ai.set(t,e)}(r.element(),o)}(a.hotspot,i,t.useMinWidth),t.onOpen(a,r,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(r,i)},onClose:function(t,r){o.unlink(e.element()),void 0!==n&&void 0!==n.onClose&&n.onClose(t,r)},isPartOf:function(t,n,r){return oa(n,r)||oa(e,r)},getAttachPoint:function(){return i().getOrDie()}}),Pl.config({find:function(t){return fs.getState(t).bind((function(t){return Pl.getCurrent(t)}))}}),lu.config({channels:f(f({},ps({isExtraPart:r(!1)})),bs({isExtraPart:r(!1),doReposition:sb}))})])}},fb=function(t){var e=eb.getCoupled(t,"sandbox");sb(e)},db=function(){return[Me("sandboxClasses",[]),Ds("sandboxBehaviours",[Pl,lu,fs,Ns])]},mb=r([ve("dom"),ve("fetch"),va("onOpen"),ba("onExecute"),Me("getHotspot",b.some),Me("getAnchorOverrides",r({})),Wu(),Ms("dropdownBehaviours",[im,eb,Hd,$d]),ve("toggleClass"),Me("eventOrder",{}),Oe("lazySink"),Me("matchWidth",!1),Me("useMinWidth",!1),Oe("role")].concat(db())),gb=r([il({schema:[ga()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),rb()]),hb=Bl({name:"Dropdown",configFields:mb(),partFields:gb(),factory:function(t,n,r,o){var i,a=function(t){fs.getState(t).each((function(t){Em.highlightPrimary(t)}))},u={expand:function(n){im.isOn(n)||ub(t,(function(t){return t}),n,o,e,Tv.HighlightNone).get(e)},open:function(n){im.isOn(n)||ub(t,(function(t){return t}),n,o,e,Tv.HighlightFirst).get(e)},isOpen:im.isOn,close:function(n){im.isOn(n)&&ub(t,(function(t){return t}),n,o,e,Tv.HighlightFirst).get(e)},repositionMenus:function(t){im.isOn(t)&&fb(t)}},c=function(t,e){return xr(t),b.some(!0)};return{uid:t.uid,dom:t.dom,components:n,behaviours:Rs(t.dropdownBehaviours,[im.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),eb.config({others:{sandbox:function(e){return lb(t,e,{onOpen:function(){im.on(e)},onClose:function(){im.off(e)}})}}}),Hd.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,e){if(hb.isOpen(t)){var n=eb.getCoupled(t,"sandbox");a(n)}else hb.open(t);return b.some(!0)},onEscape:function(t,e){return hb.isOpen(t)?(hb.close(t),b.some(!0)):b.none()}}),$d.config({})]),events:um(b.some((function(n){ub(t,(function(t){return t}),n,o,a,Tv.HighlightFirst).get(e)}))),eventOrder:f(f({},t.eventOrder),(i={},i[Jn()]=["disabling","toggling","alloy.base.behaviour"],i)),apis:u,domModification:{attributes:f(f({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:st(t.dom,"attributes").bind((function(t){return st(t,"type")})).getOr("button")}:{})}}},apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),pb=ou({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:function(){return kr([Er(qn(),r(!0))])},exhibit:function(){return Lo({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),vb=xo("color-input-change"),bb=xo("color-swatch-change"),yb=xo("color-picker-cancel"),xb=function(t,e,n){return{hue:r(t),saturation:r(e),value:r(n)}},wb=r(xo("rgb-hex-update")),Cb=r(xo("slider-update")),Sb=r(xo("palette-update")),kb=al({schema:[ve("dom")],name:"label"}),Eb=function(t){return al({name:t+"-edge",overrides:function(e){return e.model.manager.edgeActions[t].fold((function(){return{}}),(function(t){return{events:kr([Tr(Tn(),(function(e,n,r){return t(e,r)}),[e]),Tr(Mn(),(function(e,n,r){return t(e,r)}),[e]),Tr(Bn(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})},Ob=Eb("top-left"),_b=Eb("top"),Tb=Eb("top-right"),zb=Eb("right"),Ab=Eb("bottom-right"),Nb=Eb("bottom"),Mb=Eb("bottom-left"),Bb=[kb,Eb("left"),zb,_b,Nb,Ob,Tb,Mb,Ab,ol({name:"thumb",defaults:r({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:kr([Ar(Tn(),t,"spectrum"),Ar(zn(),t,"spectrum"),Ar(An(),t,"spectrum"),Ar(Mn(),t,"spectrum"),Ar(Bn(),t,"spectrum"),Ar(Dn(),t,"spectrum")])}}}),ol({schema:[Fe("mouseIsDown",(function(){return Ve(!1)}))],name:"spectrum",overrides:function(t){var e=t.model.manager,n=function(n,r){return e.getValueFromEvent(r).map((function(r){return e.setValueFrom(n,t,r)}))};return{behaviours:nu([Hd.config({mode:"special",onLeft:function(n){return e.onLeft(n,t)},onRight:function(n){return e.onRight(n,t)},onUp:function(n){return e.onUp(n,t)},onDown:function(n){return e.onDown(n,t)}}),$d.config({})]),events:kr([_r(Tn(),n),_r(zn(),n),_r(Mn(),n),_r(Bn(),(function(e,r){t.mouseIsDown.get()&&n(e,r)}))])}}})],Rb=r("slider.change.value"),Db=function(t){var e=t.event().raw();return function(t){return-1!==t.type.indexOf("touch")}(e)?void 0!==e.touches&&1===e.touches.length?b.some(e.touches[0]).map((function(t){return Oi(t.clientX,t.clientY)})):b.none():void 0!==e.clientX?b.some(e).map((function(t){return Oi(t.clientX,t.clientY)})):b.none()},Hb=function(t){return t.model.minX},Ib=function(t){return t.model.minY},Pb=function(t){return t.model.minX-1},Lb=function(t){return t.model.minY-1},Fb=function(t){return t.model.maxX},Vb=function(t){return t.model.maxY},Ub=function(t){return t.model.maxX+1},jb=function(t){return t.model.maxY+1},Wb=function(t,e,n){return e(t)-n(t)},qb=function(t){return Wb(t,Fb,Hb)},Gb=function(t){return Wb(t,Vb,Ib)},$b=function(t){return qb(t)/2},Xb=function(t){return Gb(t)/2},Kb=function(t){return t.stepSize},Yb=function(t){return t.snapToGrid},Jb=function(t){return t.snapStart},Zb=function(t){return t.rounded},Qb=function(t,e){return void 0!==t[e+"-edge"]},ty=function(t){return Qb(t,"left")},ey=function(t){return Qb(t,"right")},ny=function(t){return Qb(t,"top")},ry=function(t){return Qb(t,"bottom")},oy=function(t){return t.model.value.get()},iy=function(t){return{x:r(t)}},ay=function(t){return{y:r(t)}},uy=function(t,e){return{x:r(t),y:r(e)}},cy=function(t,e){yr(t,Rb(),{value:e})},sy=function(t,e,n,r){return t<e?t:t>n?n:t===e?e-1:Math.max(e,t-r)},ly=function(t,e,n,r){return t>n?t:t<e?e:t===n?n+1:Math.min(n,t+r)},fy=function(t,e,n){return Math.max(e,Math.min(n,t))},dy=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,c=t.rounded,s=t.minBound,l=t.maxBound,f=t.screenRange,d=t.hasMinEdge?e-1:e,m=t.hasMaxEdge?n+1:n;if(o<s)return d;if(o>l)return m;var g=function(t,e,n){return Math.min(n,Math.max(t,e))-e}(o,s,l),h=fy(g/f*r+e,d,m);return a&&h>=e&&h<=n?function(t,e,n,r,o){return o.fold((function(){var o=Math.round((t-e)/r)*r;return fy(e+o,e-1,n+1)}),(function(e){var o=Math.round((t-e)%r/r),i=Math.floor((t-e)/r),a=Math.floor((n-e)/r),u=Math.min(a,i+o);return Math.max(e,e+u*r)}))}(h,e,n,i,u):c?Math.round(h):h},my=function(t){var e=t.min,n=t.value;return n<e?t.hasMinEdge?0:t.centerMinEdge:n>t.max?t.hasMaxEdge?t.maxBound:t.centerMaxEdge:(n-e)/t.range*t.maxOffset},gy=function(t){return t.element().dom().getBoundingClientRect()},hy=function(t,e){return t[e]},py=function(t){var e=gy(t);return hy(e,"left")},vy=function(t){var e=gy(t);return hy(e,"right")},by=function(t){var e=gy(t);return hy(e,"top")},yy=function(t){var e=gy(t);return hy(e,"bottom")},xy=function(t){var e=gy(t);return hy(e,"width")},wy=function(t){var e=gy(t);return hy(e,"height")},Cy=function(t,e,n){return(t+e)/2-n},Sy=function(t,e){var n=gy(t),r=gy(e),o=hy(n,"left"),i=hy(n,"right"),a=hy(r,"left");return Cy(o,i,a)},ky=function(t,e){var n=gy(t),r=gy(e),o=hy(n,"top"),i=hy(n,"bottom"),a=hy(r,"top");return Cy(o,i,a)},Ey=function(t,e){yr(t,Rb(),{value:e})},Oy=function(t){return{x:r(t)}},_y=function(t,e,n){var r={min:Hb(e),max:Fb(e),range:qb(e),value:n,step:Kb(e),snap:Yb(e),snapStart:Jb(e),rounded:Zb(e),hasMinEdge:ty(e),hasMaxEdge:ey(e),minBound:py(t),maxBound:vy(t),screenRange:xy(t)};return dy(r)},Ty=function(t){return function(e,n){return function(t,e,n){var r=(t>0?ly:sy)(oy(n).x(),Hb(n),Fb(n),Kb(n));return Ey(e,Oy(r)),b.some(r)}(t,e,n).map((function(){return!0}))}},zy=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=xy(t),a=r.bind((function(e){return b.some(Sy(e,t))})).getOr(0),u=o.bind((function(e){return b.some(Sy(e,t))})).getOr(i),c={min:Hb(e),max:Fb(e),range:qb(e),value:n,hasMinEdge:ty(e),hasMaxEdge:ey(e),minBound:py(t),minOffset:0,maxBound:vy(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return my(c)}(e,i,n,r,o);return py(e)-py(t)+a},Ay=Ty(-1),Ny=Ty(1),My=b.none,By=b.none,Ry={"top-left":b.none(),top:b.none(),"top-right":b.none(),right:b.some((function(t,e){cy(t,iy(Ub(e)))})),"bottom-right":b.none(),bottom:b.none(),"bottom-left":b.none(),left:b.some((function(t,e){cy(t,iy(Pb(e)))}))},Dy=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=_y(t,e,n),o=Oy(r);return Ey(t,o),r},setToMin:function(t,e){var n=Hb(e);Ey(t,Oy(n))},setToMax:function(t,e){var n=Fb(e);Ey(t,Oy(n))},findValueOfOffset:_y,getValueFromEvent:function(t){return Db(t).map((function(t){return t.left()}))},findPositionOfValue:zy,setPositionFromValue:function(t,e,n,r){var o=oy(n),i=zy(t,r.getSpectrum(t),o.x(),r.getLeftEdge(t),r.getRightEdge(t),n),a=Ni(e.element())/2;ri(e.element(),"left",i-a+"px")},onLeft:Ay,onRight:Ny,onUp:My,onDown:By,edgeActions:Ry}),Hy=function(t,e){yr(t,Rb(),{value:e})},Iy=function(t){return{y:r(t)}},Py=function(t,e,n){var r={min:Ib(e),max:Vb(e),range:Gb(e),value:n,step:Kb(e),snap:Yb(e),snapStart:Jb(e),rounded:Zb(e),hasMinEdge:ny(e),hasMaxEdge:ry(e),minBound:by(t),maxBound:yy(t),screenRange:wy(t)};return dy(r)},Ly=function(t){return function(e,n){return function(t,e,n){var r=(t>0?ly:sy)(oy(n).y(),Ib(n),Vb(n),Kb(n));return Hy(e,Iy(r)),b.some(r)}(t,e,n).map((function(){return!0}))}},Fy=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=wy(t),a=r.bind((function(e){return b.some(ky(e,t))})).getOr(0),u=o.bind((function(e){return b.some(ky(e,t))})).getOr(i),c={min:Ib(e),max:Vb(e),range:Gb(e),value:n,hasMinEdge:ny(e),hasMaxEdge:ry(e),minBound:by(t),minOffset:0,maxBound:yy(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return my(c)}(e,i,n,r,o);return by(e)-by(t)+a},Vy=b.none,Uy=b.none,jy=Ly(-1),Wy=Ly(1),qy={"top-left":b.none(),top:b.some((function(t,e){cy(t,ay(Lb(e)))})),"top-right":b.none(),right:b.none(),"bottom-right":b.none(),bottom:b.some((function(t,e){cy(t,ay(jb(e)))})),"bottom-left":b.none(),left:b.none()},Gy=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=Py(t,e,n),o=Iy(r);return Hy(t,o),r},setToMin:function(t,e){var n=Ib(e);Hy(t,Iy(n))},setToMax:function(t,e){var n=Vb(e);Hy(t,Iy(n))},findValueOfOffset:Py,getValueFromEvent:function(t){return Db(t).map((function(t){return t.top()}))},findPositionOfValue:Fy,setPositionFromValue:function(t,e,n,r){var o=oy(n),i=Fy(t,r.getSpectrum(t),o.y(),r.getTopEdge(t),r.getBottomEdge(t),n),a=Si(e.element())/2;ri(e.element(),"top",i-a+"px")},onLeft:Vy,onRight:Uy,onUp:jy,onDown:Wy,edgeActions:qy}),$y=function(t,e){yr(t,Rb(),{value:e})},Xy=function(t,e){return{x:r(t),y:r(e)}},Ky=function(t,e){return function(n,r){return function(t,e,n,r){var o=t>0?ly:sy,i=e?oy(r).x():o(oy(r).x(),Hb(r),Fb(r),Kb(r)),a=e?o(oy(r).y(),Ib(r),Vb(r),Kb(r)):oy(r).y();return $y(n,Xy(i,a)),b.some(i)}(t,e,n,r).map((function(){return!0}))}},Yy=Ky(-1,!1),Jy=Ky(1,!1),Zy=Ky(-1,!0),Qy=Ky(1,!0),tx={"top-left":b.some((function(t,e){cy(t,uy(Pb(e),Lb(e)))})),top:b.some((function(t,e){cy(t,uy($b(e),Lb(e)))})),"top-right":b.some((function(t,e){cy(t,uy(Ub(e),Lb(e)))})),right:b.some((function(t,e){cy(t,uy(Ub(e),Xb(e)))})),"bottom-right":b.some((function(t,e){cy(t,uy(Ub(e),jb(e)))})),bottom:b.some((function(t,e){cy(t,uy($b(e),jb(e)))})),"bottom-left":b.some((function(t,e){cy(t,uy(Pb(e),jb(e)))})),left:b.some((function(t,e){cy(t,uy(Pb(e),Xb(e)))}))},ex=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=_y(t,e,n.left()),o=Py(t,e,n.top()),i=Xy(r,o);return $y(t,i),i},setToMin:function(t,e){var n=Hb(e),r=Ib(e);$y(t,Xy(n,r))},setToMax:function(t,e){var n=Fb(e),r=Vb(e);$y(t,Xy(n,r))},getValueFromEvent:function(t){return Db(t)},setPositionFromValue:function(t,e,n,r){var o=oy(n),i=zy(t,r.getSpectrum(t),o.x(),r.getLeftEdge(t),r.getRightEdge(t),n),a=Fy(t,r.getSpectrum(t),o.y(),r.getTopEdge(t),r.getBottomEdge(t),n),u=Ni(e.element())/2,c=Si(e.element())/2;ri(e.element(),"left",i-u+"px"),ri(e.element(),"top",a-c+"px")},onLeft:Yy,onRight:Jy,onUp:Zy,onDown:Qy,edgeActions:tx}),nx=Bl({name:"Slider",configFields:[Me("stepSize",1),Me("onChange",e),Me("onChoose",e),Me("onInit",e),Me("onDragStart",e),Me("onDragEnd",e),Me("snapToGrid",!1),Me("rounded",!0),Oe("snapStart"),be("model",ue("mode",{x:[Me("minX",0),Me("maxX",100),Fe("value",(function(t){return Ve(t.mode.minX)})),ve("getInitialValue"),wa("manager",Dy)],y:[Me("minY",0),Me("maxY",100),Fe("value",(function(t){return Ve(t.mode.minY)})),ve("getInitialValue"),wa("manager",Gy)],xy:[Me("minX",0),Me("maxX",100),Me("minY",0),Me("maxY",100),Fe("value",(function(t){return Ve({x:r(t.mode.minX),y:r(t.mode.minY)})})),ve("getInitialValue"),wa("manager",ex)]})),Ms("sliderBehaviours",[Hd,Ns]),Fe("mouseIsDown",(function(){return Ve(!1)}))],partFields:Bb,factory:function(t,e,n,o){var i,a=function(e){return yl(e,t,"thumb")},u=function(e){return yl(e,t,"spectrum")},c=function(e){return bl(e,t,"left-edge")},s=function(e){return bl(e,t,"right-edge")},l=function(e){return bl(e,t,"top-edge")},f=function(e){return bl(e,t,"bottom-edge")},d=t.model,m=d.manager,g=function(e,n){m.setPositionFromValue(e,n,t,{getLeftEdge:c,getRightEdge:s,getTopEdge:l,getBottomEdge:f,getSpectrum:u})},h=function(e,n){d.value.set(n);var r=a(e);return g(e,r),t.onChange(e,r,n),b.some(!0)},p=function(e){var n=t.mouseIsDown.get();t.mouseIsDown.set(!1),n&&bl(e,t,"thumb").each((function(n){var r=d.value.get();t.onChoose(e,n,r)}))},v=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,a(e))},y=function(e,n){n.stop(),t.onDragEnd(e,a(e)),p(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:Rs(t.sliderBehaviours,[Hd.config({mode:"special",focusIn:function(e){return bl(e,t,"spectrum").map(Hd.focusIn).map(r(!0))}}),Ns.config({store:{mode:"manual",getValue:function(t){return d.value.get()}}}),lu.config({channels:(i={},i[gs()]={onReceive:p},i)})]),events:kr([_r(Rb(),(function(t,e){h(t,e.event().value())})),Dr((function(e,n){var r=d.getInitialValue();d.value.set(r);var o=a(e);g(e,o);var i=u(e);t.onInit(e,o,i,d.value.get())})),_r(Tn(),v),_r(An(),y),_r(Mn(),v),_r(Dn(),y)]),apis:{resetToMin:function(e){m.setToMin(e,t)},resetToMax:function(e){m.setToMax(e,t)},changeValue:h,refresh:g},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),rx=function(t,e){var n=nx.parts().spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=nx.parts().thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return nx.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:r({y:r(0)})},components:[n,o],sliderBehaviours:nu([$d.config({})]),onChange:function(t,e,n){yr(t,Cb(),{value:n})}})},ox=[Ms("formBehaviours",[Ns])],ix=function(t){return"<alloy.field."+t+">"},ax=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:Rs(t.formBehaviours,[Ns.config({store:{mode:"manual",getValue:function(e){var n=wl(e,t);return ot(n,(function(t,e){return t().bind((function(t){var n,r;return n=Pl.getCurrent(t),r=new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+po(t.element())),n.fold((function(){return w.error(r)}),w.value)})).map(Ns.getValue)}))},setValue:function(e,n){rt(n,(function(n,r){bl(e,t,r).each((function(t){Pl.getCurrent(t).each((function(t){Ns.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return bl(e,t,n).bind(Pl.getCurrent)}}}},ux={getField:Do((function(t,e,n){return t.getField(e,n)})),sketch:function(t){var e=function(){var t=[];return{field:function(e,n){return t.push(e),ml("form",ix(e),n)},record:function(){return t}}}(),n=t(e),r=e.record(),o=I(r,(function(t){return ol({name:t,pname:ix(t)})}));return Tl("form",ox,o,ax,n)}},cx=xo("valid-input"),sx=xo("invalid-input"),lx=xo("validating-input"),fx=function(t,n){return Ml({name:"ColourPicker",configFields:[ve("dom"),Me("onValidHex",e),Me("onInvalidHex",e)],factory:function(o){var i,a=function(t,n,o,i){var a=function(e,r){return qv.config({invalidClass:n("invalid"),notify:{onValidate:function(t){yr(t,lx,{type:e})},onValid:function(t){yr(t,cx,{type:e,value:Ns.getValue(t)})},onInvalid:function(t){yr(t,sx,{type:e,value:Ns.getValue(t)})}},validator:{validate:function(e){var n=Ns.getValue(e),o=r(n)?w.value(!0):w.error(t("aria.input.invalid"));return Dv(o)},validateOnLoad:!1}})},u=function(r,o,i,u,c){var s=t("colorcustom.rgb.range"),l=[xv.parts().label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":u}}}),xv.parts().field({data:c,factory:Ev,inputAttributes:f({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[n("textfield")],inputBehaviours:nu([a(o,r),Xv.config({})]),onSetValue:function(t){qv.isInvalid(t)&&qv.run(t).get(e)}})],d="hex"!==o?[xv.parts()["aria-descriptor"]({text:s})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:l.concat(d)}},c=function(t,e){var n=e.red(),r=e.green(),o=e.blue();Ns.setValue(t,{red:n,green:r,blue:o})},s=ag({dom:{tag:"div",classes:[n("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),l=function(t,e){s.getOpt(t).each((function(t){ri(t.element(),"background-color","#"+e.value())}))};return Ml({factory:function(){var e={red:r(Ve(b.some(255))),green:r(Ve(b.some(255))),blue:r(Ve(b.some(255))),hex:r(Ve(b.some("ffffff")))},a=function(t){return e[t]().get()},f=function(t,n){e[t]().set(n)},d=function(t){var e=t.red(),n=t.green(),r=t.blue();f("red",b.some(e)),f("green",b.some(n)),f("blue",b.some(r))},m=function(t,e){var n=e.event();"hex"!==n.type()?f(n.type(),b.none()):i(t)},g=function(t,e){var n=e.event();!function(t){return"hex"===t.type()}(n)?function(t,e,n){var r=parseInt(n,10);f(e,b.some(r)),a("red").bind((function(t){return a("green").bind((function(e){return a("blue").map((function(n){return Yh(t,e,n,1)}))}))})).each((function(e){var n=function(t,e){var n=Wh(e);return ux.getField(t,"hex").each((function(e){$d.isFocused(e)||Ns.setValue(t,{hex:n.value()})})),n}(t,e);l(t,n)}))}(t,n.type(),n.value()):function(t,e){o(t);var n=Lh(e);f("hex",b.some(e));var r=Qh(n);c(t,r),d(r),yr(t,wb(),{hex:n}),l(t,n)}(t,n.value())},h=function(e){return{label:t("colorcustom.rgb."+e+".label"),description:t("colorcustom.rgb."+e+".description")}},p=h("red"),v=h("green"),y=h("blue"),x=h("hex");return ht(ux.sketch((function(e){return{dom:{tag:"form",classes:[n("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[e.field("red",xv.sketch(u(Jh,"red",p.label,p.description,255))),e.field("green",xv.sketch(u(Jh,"green",v.label,v.description,255))),e.field("blue",xv.sketch(u(Jh,"blue",y.label,y.description,255))),e.field("hex",xv.sketch(u(Uh,"hex",x.label,x.description,"ffffff"))),s.asSpec()],formBehaviours:nu([qv.config({invalidClass:n("form-invalid")}),Ud("rgb-form-events",[_r(cx,g),_r(sx,m),_r(lx,m)])])}})),{apis:{updateHex:function(t,e){Ns.setValue(t,{hex:e.value()}),function(t,e){var n=Qh(e);c(t,n),d(n)}(t,e),l(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})}(t,n,o.onValidHex,o.onInvalidHex),u=function(t,e){var n=nx.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),o=nx.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"<div class="+e("sv-palette-inner-thumb")+' role="presentation"></div>'}}),i=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}};return Ml({factory:function(t){var a=r({x:r(0),y:r(0)}),u=nu([Pl.config({find:b.some}),$d.config({})]);return nx.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[n,o],onChange:function(t,e,n){yr(t,Sb(),{value:n})},onInit:function(t,e,n,r){i(n.element().dom(),ep(np()))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,e,n){!function(t,e){var n=t.components()[0].element().dom();i(n,ep(e))}(e,n)}},extraApis:{}})}(0,n),c={paletteRgba:r(Ve(np()))},s=ag(u.sketch({})),l=ag(a.sketch({})),d=function(t,e){s.getOpt(t).each((function(t){var n=Qh(e);c.paletteRgba().set(n),u.setRgba(t,n)}))},m=function(t,e){l.getOpt(t).each((function(t){a.updateHex(t,e)}))},g=function(t,e,n){P(n,(function(n){n(t,e)}))};return{uid:o.uid,dom:o.dom,components:[s.asSpec(),rx(0,n),l.asSpec()],behaviours:nu([Ud("colour-picker-events",[_r(Sb(),(i=[m],function(t,e){var n=e.event().value(),r=function(t){var e,n=0,r=0,o=t.red()/255,i=t.green()/255,a=t.blue()/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));return u===c?xb(0,0,100*(r=u)):(n=60*((n=o===u?3:a===u?1:5)-(o===u?i-a:a===u?o-i:a-o)/(c-u)),e=(c-u)/c,r=c,xb(Math.round(n),Math.round(100*e),Math.round(100*r)))}(c.paletteRgba().get()),o=xb(r.hue(),n.x(),100-n.y()),a=Zh(o),u=Wh(a);g(t,u,i)})),_r(Cb(),function(){var t=[d,m];return function(e,n){var r=function(t){var e=xb((100-t)/100*360,100,100),n=Zh(e);return Wh(n)}(n.event().value().y());g(e,r,t)}}())]),Pl.config({find:function(t){return l.getOpt(t)}}),Hd.config({mode:"acyclic"})])}}})},dx=function(){return Pl.config({find:b.some})},mx=function(t){return Pl.config({find:function(e){return Kr(e.element(),t).bind((function(t){return e.getSystem().getByDom(t).toOption()}))}})},gx={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},hx=function(t){return function(t){return gx[t]}(t)},px=tinymce.util.Tools.resolve("tinymce.Resource"),vx=qt([Me("preprocess",o),Me("postprocess",o)]),bx=function(t,e,n){return Ns.config(ht({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},yx=function(t,e){var n=oe("RepresentingConfigs.memento processors",vx,e);return Ns.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=Ns.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);Ns.setValue(i,o)}}})},xx=bx,wx=function(t){return Ns.config({store:{mode:"memory",initialValue:t}})},Cx=xo("alloy-fake-before-tabstop"),Sx=xo("alloy-fake-after-tabstop"),kx=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:nu([$d.config({ignore:!0}),Xv.config({})])}},Ex=function(t,e){yr(t,Ln(),{raw:{which:9,shiftKey:e}})},Ox=function(t){return Kp(t,["."+Cx,"."+Sx].join(","),r(!1))},_x=function(t,e){var n=e.element();Xo(n,Cx)?Ex(t,!0):Xo(n,Sx)&&Ex(t,!1)},Tx=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[kx([Cx]),t,kx([Sx])],behaviours:nu([mx(1)])}},zx=!(gn().browser.isIE()||gn().browser.isEdge());function Ax(e,n){return Bx(t.document.createElement("canvas"),e,n)}function Nx(t){var e=Ax(t.width,t.height);return Mx(e).drawImage(t,0,0),e}function Mx(t){return t.getContext("2d")}function Bx(t,e,n){return t.width=e,t.height=n,t}function Rx(t){return t.naturalWidth||t.width}function Dx(t){return t.naturalHeight||t.height}var Hx=window.Promise?window.Promise:function(){var e=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(a,this),r(u,this))},n=e.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){t.setTimeout(e,1)};function r(t,e){return function(){return t.apply(e,arguments)}}var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t){var e=this;null!==this._state?n((function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(o){return void t.reject(o)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)})):this._deferreds.push(t)}function a(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(r(e,t),r(a,this),r(u,this))}this._state=!0,this._value=t,c.call(this)}catch(n){u.call(this,n)}}function u(t){this._state=!1,this._value=t,c.call(this)}function c(){for(var t=0,e=this._deferreds;t<e.length;t++)i.call(this,e[t]);this._deferreds=[]}function s(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function l(t,e,n){var r=!1;try{t((function(t){r||(r=!0,e(t))}),(function(t){r||(r=!0,n(t))}))}catch(o){if(r)return;r=!0,n(o)}}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.then=function(t,n){var r=this;return new e((function(e,o){i.call(r,new s(t,n,e,o))}))},e.all=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Array.prototype.slice.call(1===t.length&&o(t[0])?t[0]:t);return new e((function(t,e){if(0===r.length)return t([]);var n=r.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),e)}r[i]=a,0==--n&&t(r)}catch(c){e(c)}}for(var i=0;i<r.length;i++)o(i,r[i])}))},e.resolve=function(t){return t&&"object"==typeof t&&t.constructor===e?t:new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var r=0,o=t;r<o.length;r++)o[r].then(e,n)}))},e}();function Ix(e,n,r){return n=n||"image/png",t.HTMLCanvasElement.prototype.toBlob?new Hx((function(t,o){e.toBlob((function(e){e?t(e):o()}),n,r)})):(o=e.toDataURL(n,r),new Hx((function(e,n){(function(e){var n=e.split(","),r=/data:([^;]+)/.exec(n[0]);if(!r)return b.none();for(var o=r[1],i=t.atob(n[1]),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(l+1024,a),d=new Array(f-l),m=l,g=0;m<f;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return b.some(new t.Blob(c,{type:o}))})(o).fold((function(){n("uri is not base64: "+o)}),e)})));var o}function Px(t,e,n){function o(e,n){return t.then((function(t){return function(t,e,n){return t.toDataURL(e=e||"image/png",n)}(t,e,n)}))}return{getType:r(e.type),toBlob:function(){return Hx.resolve(e)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return Ix(t,e,n)}))},toAdjustedDataURL:o,toAdjustedBase64:function(t,e){return o(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(Nx)}}}function Lx(t,e){return Ix(t,e).then((function(e){return Px(Hx.resolve(t),e,t.toDataURL())}))}function Fx(t,e,n){var r="string"==typeof t?parseFloat(t):t;return r>n?r=n:r<e&&(r=e),r}var Vx=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function Ux(t,e){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var a=0;a<5;a++)r[a]=e[a+5*i];for(a=0;a<5;a++){n=0;for(var u=0;u<5;u++)n+=t[a+5*u]*r[u];o[a+5*i]=n}}return o}function jx(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=Mx(t),o=function(t,e){for(var n,r,o,i,a=t.data,u=e[0],c=e[1],s=e[2],l=e[3],f=e[4],d=e[5],m=e[6],g=e[7],h=e[8],p=e[9],v=e[10],b=e[11],y=e[12],x=e[13],w=e[14],C=e[15],S=e[16],k=e[17],E=e[18],O=e[19],_=0;_<a.length;_+=4)a[_]=(n=a[_])*u+(r=a[_+1])*c+(o=a[_+2])*s+(i=a[_+3])*l+f,a[_+1]=n*d+r*m+o*g+i*h+p,a[_+2]=n*v+r*b+o*y+i*x+w,a[_+3]=n*C+r*S+o*k+i*E+O;return t}(r.getImageData(0,0,t.width,t.height),n);return r.putImageData(o,0,0),Lx(t,e)}(n,t.getType(),e)}))}function Wx(t){return function(e,n){return jx(e,t([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n))}}var qx,Gx,$x=function(t){return function(e){return jx(e,t)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),Xx=Wx((function(t,e){return Ux(t,[1,0,0,0,e=Fx(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])})),Kx=Wx((function(t,e){var n;return e=Fx(e,-1,1),Ux(t,[(n=(e*=100)<0?127+e/100*127:127*(n=0==(n=e%1)?Vx[e]:Vx[Math.floor(e)]*(1-n)+Vx[Math.floor(e)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),Yx=(qx=[0,-1,0,-1,5,-1,0,-1,0],function(t){return function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=Mx(t),o=r.getImageData(0,0,t.width,t.height),i=r.getImageData(0,0,t.width,t.height);return i=function(t,e,n){function r(t,e,n){return t>n?t=n:t<e&&(t=e),t}for(var o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=4*(r(l+h-i,0,s-1)*c+v),y=n[h*o+p];d+=a[b]*y,m+=a[b+1]*y,g+=a[b+2]*y}var x=4*(l*c+f);u[x]=r(d,0,255),u[x+1]=r(m,0,255),u[x+2]=r(g,0,255)}return e}(o,i,n),r.putImageData(i,0,0),Lx(t,e)}(n,t.getType(),e)}))}(t,qx)}),Jx=(Gx=function(t,e){return 255*Math.pow(t/255,1-e)},function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){for(var r=Mx(t),o=new Array(256),i=0;i<o.length;i++)o[i]=Gx(i,n);var a=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t}(r.getImageData(0,0,t.width,t.height),o);return r.putImageData(a,0,0),Lx(t,e)}(n,t.getType(),e)}))}),Zx=function(t){return $x(t)},Qx=function(t){return Yx(t)},tw=function(t,e){return Jx(t,e)},ew=function(t,e){return Xx(t,e)},nw=function(t,e){return Kx(t,e)},rw=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=Ax(t.width,t.height),o=Mx(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),Lx(r,e)}(n,t.getType(),e)}))}(t,e)},ow=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){var r=Ax(t.width,t.height),o=Mx(r),i=0,a=0;return 90!==(n=n<0?360+n:n)&&270!==n||Bx(r,r.height,r.width),90!==n&&180!==n||(i=r.width),270!==n&&180!==n||(a=r.height),o.translate(i,a),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),Lx(r,e)}(n,t.getType(),e)}))}(t,e)},iw=function(t,e){return f({dom:{tag:"span",innerHtml:t,classes:["tox-icon","tox-tbtn__icon-wrap"]}},e)},aw=function(t,e){return iw(cg(t,e),{})},uw=function(t,e){return iw(cg(t,e),{behaviours:nu([Vd.config({})])})},cw=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:nu([Vd.config({})])}},sw=xo("toolbar.button.execute"),lw={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},fw=xo("update-menu-text"),dw=xo("update-menu-icon"),mw=function(t,n,r){var o=Ve(e),i=t.text.map((function(t){return ag(cw(t,n,r.providers))})),a=t.icon.map((function(t){return ag(uw(t,r.providers.icons))})),u=function(t,e){var n=Ns.getValue(t);return $d.focus(n),yr(n,"keydown",{raw:e.event().raw()}),hb.close(n),b.some(!0)},c=t.role.fold((function(){return{}}),(function(t){return{role:t}})),s=t.tooltip.fold((function(){return{}}),(function(t){var e=r.providers.translate(t);return{title:e,"aria-label":e}}));return ag(hb.sketch(f(f({},c),{dom:{tag:"button",classes:[n,n+"--select"].concat(I(t.classes,(function(t){return n+"--"+t}))),attributes:f({},s)},components:zh([a.map((function(t){return t.asSpec()})),i.map((function(t){return t.asSpec()})),b.some({dom:{tag:"div",classes:[n+"__select-chevron"],innerHtml:cg("chevron-down",r.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:nu(m(t.dropdownBehaviours,[wh(t.disabled),pb.config({}),Vd.config({}),Ud("dropdown-events",[Sh(t,o),kh(t,o)]),Ud("menubutton-update-display-text",[_r(fw,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Vd.set(t,[pi(r.providers.translate(e.event().text()))])}))})),_r(dw,(function(t,e){a.bind((function(e){return e.getOpt(t)})).each((function(t){Vd.set(t,[uw(e.event().icon(),r.providers.icons)])}))}))])])),eventOrder:ht(lw,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:nu([Hd.config({mode:"special",onLeft:u,onRight:u})]),lazySink:r.getSink,toggleClass:n+"--active",parts:{menu:_p(0,0,t.presets)},fetch:function(){return Rv(t.fetch)}}))).asSpec()},gw=function(t){return"separator"===t.type},hw={type:"separator"},pw=function(t,e){var n=function(t,e){var n=V(t,(function(t,n){return function(t){return S(t)}(n)?""===n?t:"|"===n?t.length>0&&!gw(t[t.length-1])?t.concat([hw]):t:lt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&gw(n[n.length-1])&&n.pop(),n}(S(t)?t.split(" "):t,e);return F(n,(function(t,n){var r=function(t,e){return function(t){return lt(t,"getSubmenuItems")}(t)?function(t,e){var n=t.getSubmenuItems(),r=pw(n,e);return{item:t,menus:ht(r.menus,Rt(t.value,r.items)),expansions:ht(r.expansions,Rt(t.value,t.value))}}(t,e):{item:t,menus:{},expansions:{}}}(function(t){if(gw(t))return t;var e=st(t,"value").getOrThunk((function(){return xo("generated-menu-item")}));return ht({value:e},t)}(n),e);return{menus:ht(t.menus,r.menus),items:[r.item].concat(t.items),expansions:ht(t.expansions,r.expansions)}}),{menus:{},expansions:{},items:[]})},vw=function(t,e,n,r){var o=xo("primary-menu"),i=pw(t,n.shared.providers.menuItems());if(0===i.items.length)return b.none();var a=Up(o,i.items,e,n,r),u=ot(i.menus,(function(t,r){return Up(r,t,e,n,!1)})),c=ht(u,Rt(o,a));return b.from(Em.tieredData(o,c,i.expansions))},bw=function(t){return{isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)},setActive:function(e){var n=t.element();e?(Go(n,"tox-tbtn--enabled"),fo(n,"aria-pressed",!0)):($o(n,"tox-tbtn--enabled"),ho(n,"aria-pressed"))},isActive:function(){return Xo(t.element(),"tox-tbtn--enabled")}}},yw=function(t,e,n,r){return mw({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e){t.fetch((function(t){e(vw(t,Oh.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:bw,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Xv.config({})]},e,n.shared)},xw=function(t,e,n){var r=function(t){return function(r){var o=!r.isActive();r.setActive(o),t.storage.set(o),n.shared.getSink().each((function(n){e().getOpt(n).each((function(e){du(e.element()),yr(e,dv,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(I(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return f(f({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},ww=function(t,e,n,r,o){void 0===n&&(n=[]);var i=e.fold((function(){return{}}),(function(t){return{action:t}})),a=f({buttonBehaviours:nu([wh(t.disabled),Xv.config({}),Ud("button press",[Or("click"),Or("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},i),u=ht(a,{dom:r});return ht(u,{components:o})},Cw=function(t,e,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({})},i=t.icon.map((function(t){return aw(t,n.icons)})),a=zh([i]);return ww(t,e,r,o,a)},Sw=function(t,e,n,r){void 0===r&&(r=[]);var o=Cw(t,b.some(e),n,r);return ig.sketch(o)},kw=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return aw(t,n.icons)})):b.none(),u=a.isSome()?zh([a]):[],c=a.isSome()?{}:{innerHtml:i},s=m(t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],a.isSome()?["tox-button--icon"]:[],t.borderless?["tox-button--naked"]:[],o),l=f(f({tag:"button",classes:s},c),{attributes:{title:i}});return ww(t,e,r,l,u)},Ew=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=kw(t,b.some(e),n,r,o);return ig.sketch(i)},Ow=function(e,n){return function(r){"custom"===n?yr(r,dv,{name:e,value:{}}):"submit"===n?br(r,mv):"cancel"===n?br(r,fv):t.console.error("Unknown button type: ",n)}},_w=function(n,r,o){if(function(t,e){return"menu"===e}(0,r)){var i=n,a=f(f({},n),{onSetup:function(t){return t.setDisabled(n.disabled),e},fetch:xw(i.items,(function(){return u}),o)}),u=ag(yw(a,"tox-tbtn",o,b.none()));return u.asSpec()}if(function(t,e){return"custom"===e||"cancel"===e||"submit"===e}(0,r)){var c=Ow(n.name,r),s=f(f({},n),{borderless:!1});return Ew(s,c,o.shared.providers,[])}t.console.error("Unknown footer button type: ",r)},Tw=r([Me("field1Name","field1"),Me("field2Name","field2"),ya("onLockedChange"),ha(["lockClass"]),Me("locked",!1),Ds("coupledFieldBehaviours",[Pl,Ns])]),zw=function(t,e){return ol({factory:xv,name:t,overrides:function(t){return{fieldBehaviours:nu([Ud("coupled-input-behaviour",[_r(Vn(),(function(n){(function(t,e,n){return bl(t,e,n).bind(Pl.getCurrent)})(n,t,e).each((function(e){bl(n,t,"lock").each((function(r){im.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},Aw=r([zw("field1","field2"),zw("field2","field1"),ol({factory:ig,schema:[ve("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:nu([im.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),Nw=Bl({name:"FormCoupledInputs",configFields:Tw(),partFields:Aw(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Hs(t.coupledFieldBehaviours,[Pl.config({find:b.some}),Ns.config({store:{mode:"manual",getValue:function(e){var n,r=Sl(e,t,["field1","field2"]);return(n={})[t.field1Name]=Ns.getValue(r.field1()),n[t.field2Name]=Ns.getValue(r.field2()),n},setValue:function(e,n){var r=Sl(e,t,["field1","field2"]);ft(n,t.field1Name)&&Ns.setValue(r.field1(),n[t.field1Name]),ft(n,t.field2Name)&&Ns.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return bl(e,t,"field1")},getField2:function(e){return bl(e,t,"field2")},getLock:function(e){return bl(e,t,"lock")}}}},apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),Mw=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null!==e){var n=parseFloat(e[1]);return w.value({value:n,unit:e[2]})}return w.error(t)},Bw=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return Object.prototype.hasOwnProperty.call(n,t)};return t.unit===e?b.some(t.value):r(t.unit)&&r(e)?b.some(n[t.unit]===n[e]?t.value:t.value/n[t.unit]*n[e]):b.none()},Rw=function(t){return b.none()},Dw=function(t,e){var n=Rw,r=xo("ratio-event"),o=Nw.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:cg("lock",e.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:cg("unlock",e.icons)}}],buttonBehaviours:nu([wh(t.disabled),Xv.config({})])}),i=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},a=function(e){return xv.parts().field({factory:Ev,inputClasses:["tox-textfield"],inputBehaviours:nu([xh.config({disabled:t.disabled}),Xv.config({}),Ud("size-input-events",[_r(In(),(function(t,n){yr(t,r,{isField1:e})})),_r(Un(),(function(e,n){yr(e,sv,{name:t.name})}))])]),selectOnFocus:!1})},u=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},c=Nw.parts().field1(i([xv.parts().label(u("Width")),a(!0)])),s=Nw.parts().field2(i([xv.parts().label(u("Height")),a(!1)]));return Nw.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,i([u("&nbsp;"),o])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){Mw(Ns.getValue(t)).each((function(t){n(t).each((function(t){Ns.setValue(e,function(t){var e,n={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},r=t.value.toFixed((e=t.unit)in n?n[e]:1);return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit}(t))}))}))},coupledFieldBehaviours:nu([xh.config({disabled:t.disabled,onDisabled:function(t){Nw.getField1(t).bind(xv.getField).each(xh.disable),Nw.getField2(t).bind(xv.getField).each(xh.disable),Nw.getLock(t).each(xh.disable)},onEnabled:function(t){Nw.getField1(t).bind(xv.getField).each(xh.enable),Nw.getField2(t).bind(xv.getField).each(xh.enable),Nw.getLock(t).each(xh.enable)}}),Ud("size-input-events2",[_r(r,(function(t,e){var r,o,i,a,u=e.event().isField1(),c=u?Nw.getField1(t):Nw.getField2(t),s=u?Nw.getField2(t):Nw.getField1(t),l=c.map(Ns.getValue).getOr("");r=s.map(Ns.getValue).getOr(""),n=(o=Mw(l).toOption(),i=Mw(r).toOption(),a=function(t,e){return Bw(t,e.unit).map((function(t){return e.value/t})).map((function(t){return n=t,r=e.unit,function(t){return Bw(t,r).map((function(t){return{value:t*n,unit:r}}))};var n,r})).getOr(Rw)},o.isSome()&&i.isSome()?b.some(a(o.getOrDie(),i.getOrDie())):b.none()).getOr(Rw)}))])])})},Hw={undo:r(xo("undo")),redo:r(xo("redo")),zoom:r(xo("zoom")),back:r(xo("back")),apply:r(xo("apply")),swap:r(xo("swap")),transform:r(xo("transform")),tempTransform:r(xo("temp-transform")),transformApply:r(xo("transform-apply"))},Iw=r("save-state"),Pw=r("disable"),Lw=r("enable"),Fw={formActionEvent:dv,saveState:Iw,disable:Pw,enable:Lw},Vw=function(t,n){var o=function(t,e,r,o){return ag(Ew({name:t,text:t,disabled:r,primary:o,icon:b.none(),borderless:!1},e,n))},i=function(t,e,r,o){return ag(Sw({name:t,icon:b.some(t),tooltip:b.some(e),disabled:o,primary:!1,borderless:!1},r,n))},a=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(xh)&&xh.disable(n)}))},u=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(xh)&&xh.enable(n)}))},c={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},s=e,l=function(t,e,n){yr(t,e,n)},f=function(t){return br(t,Fw.disable())},d=function(t){return br(t,Fw.enable())},m=function(t,e){f(t),l(t,Hw.transform(),{transform:e}),d(t)},g=function(t){return function(){Q.getOpt(t).each((function(t){Vd.set(t,[J])}))}},h=function(t,e){f(t),l(t,Hw.transformApply(),{transform:e,swap:g(t)}),d(t)},p=function(){return o("Back",(function(t){return l(t,Hw.back(),{swap:g(t)})}),!1,!1)},v=function(){return ag({dom:{tag:"div",classes:["tox-spacer"]},behaviours:nu([xh.config({})])})},y=function(){return o("Apply",(function(t){return l(t,Hw.apply(),{swap:g(t)})}),!0,!0)},x=[p(),v(),o("Apply",(function(e){h(e,(function(e){var n=t.getRect();return function(t,e,n,r,o){return function(t,e,n,r,o){return t.toCanvas().then((function(i){return function(t,e,n,r,o,i){var a=Ax(o,i);return Mx(a).drawImage(t,-n,-r),Lx(a,e)}(i,t.getType(),e,n,r,o)}))}(t,e,n,r,o)}(e,n.x,n.y,n.w,n.h)})),t.hideCrop()}),!1,!0)],w=uv.sketch({dom:c,components:x.map((function(t){return t.asSpec()})),containerBehaviours:nu([Ud("image-tools-crop-buttons-events",[_r(Fw.disable(),(function(t,e){a(x,t)})),_r(Fw.enable(),(function(t,e){u(x,t)}))])])}),C=ag(Dw({name:"size",label:b.none(),constrain:!0,disabled:!1},n)),S=[p(),v(),C,v(),o("Apply",(function(t){C.getOpt(t).each((function(e){var n,r,o=Ns.getValue(e),i=(n=parseInt(o.width,10),r=parseInt(o.height,10),function(t){return function(t,e,n){return function(t,e,n){return t.toCanvas().then((function(r){return function t(e,n,r){var o=Rx(e),i=Dx(e),a=n/o,u=r/i,c=!1;(a<.5||a>2)&&(a=a<.5?.5:2,c=!0),(u<.5||u>2)&&(u=u<.5?.5:2,c=!0);var s=function(t,e,n){return new Hx((function(r){var o=Rx(t),i=Dx(t),a=Math.floor(o*e),u=Math.floor(i*n),c=Ax(a,u);Mx(c).drawImage(t,0,0,o,i,0,0,a,u),r(c)}))}(e,a,u);return c?s.then((function(e){return t(e,n,r)})):s}(r,e,n).then((function(e){return Lx(e,t.getType())}))}))}(t,e,n)}(t,n,r)});h(t,i)}))}),!1,!0)],k=uv.sketch({dom:c,components:S.map((function(t){return t.asSpec()})),containerBehaviours:nu([Ud("image-tools-resize-buttons-events",[_r(Fw.disable(),(function(t,e){a(S,t)})),_r(Fw.enable(),(function(t,e){u(S,t)}))])])}),E=function(t,e){return function(n){return t(n,e)}},O=E(rw,"h"),_=E(rw,"v"),T=E(ow,-90),z=E(ow,90),A=function(t,e){!function(t,e){f(t),l(t,Hw.tempTransform(),{transform:e}),d(t)}(t,e)},N=[p(),v(),i("flip-horizontally","Flip horizontally",(function(t){A(t,O)}),!1),i("flip-vertically","Flip vertically",(function(t){A(t,_)}),!1),i("rotate-left","Rotate counterclockwise",(function(t){A(t,T)}),!1),i("rotate-right","Rotate clockwise",(function(t){A(t,z)}),!1),v(),y()],M=uv.sketch({dom:c,components:N.map((function(t){return t.asSpec()})),containerBehaviours:nu([Ud("image-tools-fliprotate-buttons-events",[_r(Fw.disable(),(function(t,e){a(N,t)})),_r(Fw.enable(),(function(t,e){u(N,t)}))])])}),B=function(t,e,o,i,a){var u=nx.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}}),c=nx.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=nx.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return ag(nx.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:o,maxX:a,getInitialValue:r({x:r(i)})},components:[u,c,s],sliderBehaviours:nu([$d.config({})]),onChoose:e}))},R=function(t,e,n,r,o){return B(t,(function(t,n,r){var o=E(e,r.x()/100);m(t,o)}),n,r,o)},D=function(t,e,n,r,o){var i=function(t,e,n,r,o){return[p(),R(t,e,n,r,o),y()]}(t,e,n,r,o);return uv.sketch({dom:c,components:i.map((function(t){return t.asSpec()})),containerBehaviours:nu([Ud("image-tools-filter-panel-buttons-events",[_r(Fw.disable(),(function(t,e){a(i,t)})),_r(Fw.enable(),(function(t,e){u(i,t)}))])])})},H=[p(),v(),y()],I=uv.sketch({dom:c,components:H.map((function(t){return t.asSpec()}))}),P=D("Brightness",ew,-100,0,100),L=D("Contrast",nw,-100,0,100),F=D("Gamma",tw,-100,0,100),V=function(t){return B(t,(function(t,e,n){var r=U.getOpt(t),o=W.getOpt(t),i=j.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=function(t,e,n){return function(r){return function(t,e,n,r){return function(t,e,n,r){return jx(t,function(t,e,n,r){return Ux([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],[e=Fx(e,0,2),0,0,0,0,0,n=Fx(n,0,2),0,0,0,0,0,r=Fx(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}(0,e,n,r))}(t,e,n,r)}(r,t,e,n)}}(Ns.getValue(e).x()/100,Ns.getValue(r).x()/100,Ns.getValue(n).x()/100);m(t,o)}))}))}))}),0,100,200)},U=V("R"),j=V("G"),W=V("B"),q=[p(),U,j,W,y()],G=uv.sketch({dom:c,components:q.map((function(t){return t.asSpec()}))}),$=function(t,e,n){return function(r){l(r,Hw.swap(),{transform:e,swap:function(){Q.getOpt(r).each((function(e){Vd.set(e,[t]),n(e)}))}})}},X=b.some(Qx),K=b.some(Zx),Y=[i("crop","Crop",$(w,b.none(),(function(e){t.showCrop()})),!1),i("resize","Resize",$(k,b.none(),(function(e){C.getOpt(e).each((function(e){var n=t.getMeasurements();Ns.setValue(e,{width:n.width,height:n.height})}))})),!1),i("orientation","Orientation",$(M,b.none(),s),!1),i("brightness","Brightness",$(P,b.none(),s),!1),i("sharpen","Sharpen",$(I,X,s),!1),i("contrast","Contrast",$(L,b.none(),s),!1),i("color-levels","Color levels",$(G,b.none(),s),!1),i("gamma","Gamma",$(F,b.none(),s),!1),i("invert","Invert",$(I,K,s),!1)],J=uv.sketch({dom:c,components:Y.map((function(t){return t.asSpec()}))}),Z=uv.sketch({dom:{tag:"div"},components:[J],containerBehaviours:nu([Vd.config({})])}),Q=ag(Z);return{memContainer:Q,getApplyButton:function(t){return Q.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))}}},Uw=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),jw=tinymce.util.Tools.resolve("tinymce.geom.Rect"),Ww=tinymce.util.Tools.resolve("tinymce.util.Observable"),qw=tinymce.util.Tools.resolve("tinymce.util.Tools"),Gw=tinymce.util.Tools.resolve("tinymce.util.VK");function $w(t){var e,n;if(t.changedTouches)for(e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]}function Xw(e,n){var r,o,i,a,u,c,s,l=n.document||t.document,f=l.getElementById((n=n||{}).handle||e);i=function(e){var i,d,m=function(t){var e,n,r,o,i,a,u,c=Math.max;return r=c((e=t.documentElement).scrollWidth,(n=t.body).scrollWidth),o=c(e.clientWidth,n.clientWidth),i=c(e.offsetWidth,n.offsetWidth),a=c(e.scrollHeight,n.scrollHeight),u=c(e.clientHeight,n.clientHeight),{width:r<i?o:r,height:a<c(e.offsetHeight,n.offsetHeight)?u:a}}(l);$w(e),e.preventDefault(),o=e.button,i=f,c=e.screenX,s=e.screenY,d=t.window.getComputedStyle?t.window.getComputedStyle(i,null).getPropertyValue("cursor"):i.runtimeStyle.cursor,r=Uw("<div></div>").css({position:"absolute",top:0,left:0,width:m.width,height:m.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(l.body),Uw(l).on("mousemove touchmove",u).on("mouseup touchend",a),n.start(e)},u=function(t){if($w(t),t.button!==o)return a(t);t.deltaX=t.screenX-c,t.deltaY=t.screenY-s,t.preventDefault(),n.drag(t)},a=function(t){$w(t),Uw(l).off("mousemove touchmove",u).off("mouseup touchend",a),r.remove(),n.stop&&n.stop(t)},this.destroy=function(){Uw(f).off()},Uw(f).on("mousedown touchstart",i)}var Kw,Yw,Jw,Zw=0,Qw=function(t,e,n,r,o){return Sw({name:t,icon:b.some(e),disabled:n,tooltip:b.some(t),primary:!1,borderless:!1},r,o)},tC=function(t,e){e?xh.enable(t):xh.disable(t)},eC=function(n,r){var o=function(e){var n=Ve(e),r=Ve(b.none()),o=function(){var t=[],e=-1;function n(){return e>0}function r(){return-1!==e&&e<t.length-1}return{data:t,add:function(n){var r;return r=t.splice(++e),t.push(n),{state:n,removed:r}},undo:function(){if(n())return t[--e]},redo:function(){if(r())return t[++e]},canUndo:n,canRedo:r}}();o.add(e);var i=function(t){n.set(t)},a=function(e){return{blob:e,url:t.URL.createObjectURL(e)}},u=function(e){t.URL.revokeObjectURL(e.url)},c=function(){r.get().each(u),r.set(b.none())},s=function(t){var e=a(t);i(e);var n=o.add(e).removed;return qw.each(n,u),e.url};return{getBlobState:function(){return n.get()},setBlobState:i,addBlobState:s,getTempState:function(){return r.get().fold((function(){return n.get()}),(function(t){return t}))},updateTempState:function(t){var e=a(t);return c(),r.set(b.some(e)),e.url},addTempState:function(t){var e=a(t);return r.set(b.some(e)),e.url},applyTempState:function(t){return r.get().fold((function(){}),(function(e){s(e.blob),t()}))},destroyTempState:c,undo:function(){var t=o.undo();return i(t),t.url},redo:function(){var t=o.redo();return i(t),t.url},getHistoryStates:function(){return{undoEnabled:o.canUndo(),redoEnabled:o.canRedo()}}}}(n.currentState),i=function(t){var e=o.getHistoryStates();g.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),yr(t,Fw.formActionEvent,{name:Fw.saveState(),value:e.undoEnabled})},a=function(t){return t.toBlob()},u=function(t){yr(t,Fw.formActionEvent,{name:Fw.disable(),value:{}})},c=function(t){h.getApplyButton(t).each((function(t){xh.enable(t)})),yr(t,Fw.formActionEvent,{name:Fw.enable(),value:{}})},s=function(t,e){return u(t),m.updateSrc(t,e)},l=function(e,n,r,o,l){return u(e),function(e){return function(e){return function(e){return new Hx((function(n){var r=new t.FileReader;r.onloadend=function(){n(r.result)},r.readAsDataURL(e)}))}(e).then((function(n){return Px(function(e){return function(e){return new Hx((function(n,r){var o=t.URL.createObjectURL(e),i=new t.Image,a=function(){i.removeEventListener("load",u),i.removeEventListener("error",c)};function u(){a(),n(i)}function c(){a(),r("Unable to load data of type "+e.type+": "+o)}i.addEventListener("load",u),i.addEventListener("error",c),i.src=o,i.complete&&u()}))}(e).then((function(e){!function(e){t.URL.revokeObjectURL(e.src)}(e);var n=Ax(Rx(e),Dx(e));return Mx(n).drawImage(e,0,0),n}))}(e),e,n)}))}(e)}(n).then(r).then(a).then(o).then((function(t){return s(e,t).then((function(t){return i(e),l(),c(e),t}))})).catch((function(n){return t.console.log(n),c(e),n}))},f=function(t,e,n){var r=o.getBlobState().blob;l(t,r,e,(function(t){return o.updateTempState(t)}),n)},d=function(t){var e=o.getBlobState().url;return o.destroyTempState(),i(t),e},m=function(t){var e=ag({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),n=Ve(1),r=Ve(b.none()),o=Ve({x:0,y:0,w:1,h:1}),i=Ve({x:0,y:0,w:1,h:1}),a=function(t,i){s.getOpt(t).each((function(t){var a=n.get(),u=Ni(t.element()),c=Si(t.element()),s=i.dom().naturalWidth*a,l=i.dom().naturalHeight*a,f=Math.max(0,u/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};oi(i,m),e.getOpt(t).each((function(t){oi(t.element(),m)})),r.get().each((function(t){var e=o.get();t.setRect({x:e.x*a+f,y:e.y*a+d,w:e.w*a,h:e.h*a}),t.setClampRect({x:f,y:d,w:s,h:l}),t.setViewPortRect({x:0,y:0,w:u,h:c})}))}))},u=function(t,e){var r,u=We("img");return fo(u,"src",e),(r=u.dom(),new xg((function(t){var e=function(){r.removeEventListener("load",e),t(r)};r.complete?t(r):r.addEventListener("load",e)}))).then((function(){return s.getOpt(t).map((function(t){var e=vi({element:u});Vd.replaceAt(t,1,b.some(e));var r=i.get(),c={x:0,y:0,w:u.dom().naturalWidth,h:u.dom().naturalHeight};i.set(c);var l=jw.inflate(c,-20,-20);return o.set(l),r.w===c.w&&r.h===c.h||function(t,e){s.getOpt(t).each((function(t){var r=Ni(t.element()),o=Si(t.element()),i=e.dom().naturalWidth,a=e.dom().naturalHeight,u=Math.min(r/i,o/a);n.set(u>=1?1:u)}))}(t,u),a(t,u),u}))}))},c=uv.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:nu([Ud("image-panel-crop-events",[Dr((function(t){s.getOpt(t).each((function(t){var e=function(t,e,n,r,o){var i,a,u,c="tox-crid-"+Zw++,s=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}];u=["top","right","bottom","left"];var l=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}};function f(e,r,o,a){var u,c,s,f,d;u=r.x,c=r.y,s=r.w,f=r.h,(s+=o*e.deltaW)<20&&(s=20),(f+=a*e.deltaH)<20&&(f=20),d=t=jw.clamp({x:u+=o*e.deltaX,y:c+=a*e.deltaY,w:s,h:f},n,"move"===e.name),d=l(n,d),i.fire("updateRect",{rect:d}),g(d)}function d(t){function n(t,e){e.h<0&&(e.h=0),e.w<0&&(e.w=0),Uw("#"+c+"-"+t,r).css({left:e.x,top:e.y,width:e.w,height:e.h})}qw.each(s,(function(e){Uw("#"+c+"-"+e.name,r).css({left:t.w*e.xMul+t.x,top:t.h*e.yMul+t.y})})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)}function m(e){d(t=e)}function g(t){var e,r;m({x:(r=t).x+(e=n).x,y:r.y+e.y,w:r.w,h:r.h})}return Uw('<div id="'+c+'" class="tox-croprect-container" role="grid" aria-dropeffect="execute">').appendTo(r),qw.each(u,(function(t){Uw("#"+c,r).append('<div id="'+c+"-"+t+'"class="tox-croprect-block" style="display: none" data-mce-bogus="all">')})),qw.each(s,(function(t){Uw("#"+c,r).append('<div id="'+c+"-"+t.name+'" class="tox-croprect-handle tox-croprect-handle-'+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false" title="'+t.label+'">')})),a=qw.map(s,(function(e){var n;return new Xw(c,{document:r.ownerDocument,handle:c+"-"+e.name,start:function(){n=t},drag:function(t){f(e,n,t.deltaX,t.deltaY)}})})),d(t),Uw(r).on("focusin focusout",(function(t){Uw(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")})),Uw(r).on("keydown",(function(e){var n;function r(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),f(n,r,o,i)}switch(qw.each(s,(function(t){if(e.target.id===c+"-"+t.name)return n=t,!1})),e.keyCode){case Gw.LEFT:r(e,0,t,-10,0);break;case Gw.RIGHT:r(e,0,t,10,0);break;case Gw.UP:r(e,0,t,0,-10);break;case Gw.DOWN:r(e,0,t,0,10);break;case Gw.ENTER:case Gw.SPACEBAR:e.preventDefault()}})),i=qw.extend({toggleVisibility:function(t){var e;e=qw.map(s,(function(t){return"#"+c+"-"+t.name})).concat(qw.map(u,(function(t){return"#"+c+"-"+t}))).join(","),t?Uw(e,r).show():Uw(e,r).hide()},setClampRect:function(e){n=e,d(t)},setRect:m,getInnerRect:function(){return l(n,t)},setInnerRect:g,setViewPortRect:function(n){e=n,d(t)},destroy:function(){qw.each(a,(function(t){t.destroy()})),a=[]}},Ww)}({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t.element().dom());e.toggleVisibility(!1),e.on("updateRect",(function(t){var e=t.rect,r=n.get(),i={x:Math.round(e.x/r),y:Math.round(e.y/r),w:Math.round(e.w/r),h:Math.round(e.h/r)};o.set(i)})),r.set(b.some(e))}))}))])])}],containerBehaviours:nu([Vd.config({}),Ud("image-panel-events",[Dr((function(e){u(e,t)}))])])}),s=ag(c);return{memContainer:s,updateSrc:u,zoom:function(t,e){var r=n.get(),o=e>0?Math.min(2,r+.1):Math.max(.1,r-.1);n.set(o),s.getOpt(t).each((function(t){var e=t.components()[1].element();a(t,e)}))},showCrop:function(){r.get().each((function(t){t.toggleVisibility(!0)}))},hideCrop:function(){r.get().each((function(t){t.toggleVisibility(!1)}))},getRect:function(){return o.get()},getMeasurements:function(){var t=i.get();return{width:t.w,height:t.h}}}}(n.currentState.url),g=function(t){var e=ag(Qw("Undo","undo",!0,(function(t){yr(t,Hw.undo(),{direction:1})}),t)),n=ag(Qw("Redo","redo",!0,(function(t){yr(t,Hw.redo(),{direction:1})}),t));return{container:uv.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[e.asSpec(),n.asSpec(),Qw("Zoom in","zoom-in",!1,(function(t){yr(t,Hw.zoom(),{direction:1})}),t),Qw("Zoom out","zoom-out",!1,(function(t){yr(t,Hw.zoom(),{direction:-1})}),t)]}),updateButtonUndoStates:function(t,r,o){e.getOpt(t).each((function(t){tC(t,r)})),n.getOpt(t).each((function(t){tC(t,o)}))}}}(r),h=Vw(m,r);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[h.memContainer.asSpec(),m.memContainer.asSpec(),g.container],behaviours:nu([Ns.config({store:{mode:"manual",getValue:function(){return o.getBlobState()}}}),Ud("image-tools-events",[_r(Hw.undo(),(function(t,e){var n=o.undo();s(t,n).then((function(e){c(t),i(t)}))})),_r(Hw.redo(),(function(t,e){var n=o.redo();s(t,n).then((function(e){c(t),i(t)}))})),_r(Hw.zoom(),(function(t,e){var n=e.event().direction();m.zoom(t,n)})),_r(Hw.back(),(function(t,e){!function(t){var e=d(t);s(t,e).then((function(e){c(t)}))}(t),e.event().swap()(),m.hideCrop()})),_r(Hw.apply(),(function(t,e){o.applyTempState((function(){d(t),e.event().swap()()}))})),_r(Hw.transform(),(function(t,n){return f(t,n.event().transform(),e)})),_r(Hw.tempTransform(),(function(t,n){return function(t,n){var r=o.getTempState().blob;l(t,r,n,(function(t){return o.addTempState(t)}),e)}(t,n.event().transform())})),_r(Hw.transformApply(),(function(t,e){return function(t,e,n){var r=o.getBlobState().blob;l(t,r,e,(function(e){var n=o.addBlobState(e);return d(t),n}),n)}(t,e.event().transform(),e.event().swap())})),_r(Hw.swap(),(function(t,e){!function(t){g.updateButtonUndoStates(t,!1,!1)}(t);var n=e.event().transform(),r=e.event().swap();n.fold((function(){r()}),(function(e){f(t,e,r)}))}))]),dx()])}},nC=Ml({name:"HtmlSelect",configFields:[ve("options"),Ms("selectBehaviours",[$d,Ns]),Me("selectClasses",[]),Me("selectAttributes",{}),Oe("data")],factory:function(t,e){var n=I(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return Rt("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:Rs(t.selectBehaviours,[$d.config({}),Ns.config({store:f({mode:"manual",getValue:function(t){return mi(t.element())},setValue:function(e,n){U(t.options,(function(t){return t.value===n})).isSome()&&gi(e.element(),n)}},r)})])}}}),rC=function(t,e){var n=t.label.map((function(t){return Zv(t,e)})),o=[xh.config({disabled:t.disabled}),Hd.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return br(t,mv),b.some(!0)}}),Ud("textfield-change",[_r(Vn(),(function(e,n){yr(e,sv,{name:t.name})})),_r(Kn(),(function(e,n){yr(e,sv,{name:t.name})}))]),Xv.config({})],i=t.validation.map((function(t){return qv.config({getRoot:function(t){return Gr(t.element())},invalidClass:"tox-invalid",validator:{validate:function(e){var n=Ns.getValue(e),r=t.validator(n);return Dv(!0===r?w.value(n):w.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),a=t.placeholder.fold(r({}),(function(t){return{placeholder:e.translate(t)}})),u=t.inputMode.fold(r({}),(function(t){return{inputmode:t}})),c=f(f({},a),u),s=xv.parts().field({tag:!0===t.multiline?"textarea":"input",inputAttributes:c,inputClasses:[t.classname],inputBehaviours:nu(W([o,i])),selectOnFocus:!1,factory:Ev}),l=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),d=[xh.config({disabled:t.disabled,onDisabled:function(t){xv.getField(t).each(xh.disable)},onEnabled:function(t){xv.getField(t).each(xh.enable)}})];return Kv(n,s,l,d)},oC=Object.freeze({__proto__:null,events:function(t,e){var n=t.stream.streams.setup(t,e);return kr([_r(t.event,n),Hr((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[_r(t,(function(){return e.cancel()}))]})).getOr([])))}}),iC=function(t){var e=Ve(null);return Io({readState:function(){return{timer:null!==e.get()?"set":"unset"}},setTimer:function(t){e.set(t)},cancel:function(){var t=e.get();null!==t&&t.cancel()}})},aC=Object.freeze({__proto__:null,throttle:iC,init:function(t){return t.stream.streams.state(t)}}),uC=[be("stream",ue("mode",{throttle:[ve("delay"),Me("stopEvent",!0),wa("streams",{setup:function(t,e){var n=t.stream,r=dg(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},state:iC})]})),Me("event","input"),Oe("cancelEvent"),ya("onStream")],cC=ou({fields:uC,name:"streaming",active:oC,state:aC}),sC=function(t,e,n){var r=Ns.getValue(n);Ns.setValue(e,r),fC(e)},lC=function(t,e){var n=t.element(),r=mi(n),o=n.dom();"number"!==mo(n,"type")&&e(o,r)},fC=function(t){lC(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},dC=r("alloy.typeahead.itemexecute"),mC=r([Oe("lazySink"),ve("fetch"),Me("minChars",5),Me("responseTime",1e3),va("onOpen"),Me("getHotspot",b.some),Me("getAnchorOverrides",r({})),Me("layouts",b.none()),Me("eventOrder",{}),Le("model",{},[Me("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),Me("selectsOver",!0),Me("populateFromBrowse",!0)]),va("onSetValue"),ba("onExecute"),va("onItemExecute"),Me("inputClasses",[]),Me("inputAttributes",{}),Me("inputStyles",{}),Me("matchWidth",!0),Me("useMinWidth",!1),Me("dismissOnBlur",!0),ha(["openClass"]),Oe("initialData"),Ms("typeaheadBehaviours",[$d,Ns,cC,Hd,im,eb]),Fe("previewing",(function(){return Ve(!0)}))].concat(wv()).concat(db())),gC=r([il({schema:[ga()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){(function(t,e,n){if(t.selectsOver){var r=Ns.getValue(e),o=t.getDisplayText(r),i=Ns.getValue(n);return 0===t.getDisplayText(i).indexOf(o)?b.some((function(){sC(0,e,n),function(t,e){lC(t,(function(t,n){return t.setSelectionRange(e,n.length)}))}(e,o.length)})):b.none()}return b.none()})(t.model,r,n).fold((function(){return Xl.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&sC(0,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOption().map((function(t){return yr(t,dC(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&sC(0,e,n)}))}}}})]),hC=Bl({name:"Typeahead",configFields:mC(),partFields:gC(),factory:function(t,n,r,o){var i=function(n,r,i){t.previewing.set(!1);var a=eb.getCoupled(n,"sandbox");fs.isOpen(a)?Pl.getCurrent(a).each((function(t){Xl.getHighlighted(t).fold((function(){i(t)}),(function(){Sr(a,t.element(),"keydown",r)}))})):ib(t,u(n),n,a,o,(function(t){Pl.getCurrent(t).each(i)}),Tv.HighlightFirst).get(e)},a=Cv(t),u=function(t){return function(e){return e.map((function(e){var n=ct(e.menus),r=q(n,(function(t){return L(t.items,(function(t){return"item"===t.type}))}));return Ns.getState(t).update(I(r,(function(t){return t.data}))),e}))}},c=[$d.config({}),Ns.config({onSetValue:t.onSetValue,store:f({mode:"dataset",getDataKey:function(t){return mi(t.element())},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){gi(e.element(),t.model.getDisplayText(n))}},t.initialData.map((function(t){return Rt("initialValue",t)})).getOr({}))}),cC.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(n,r){var i=eb.getCoupled(n,"sandbox");if($d.isFocused(n)&&mi(n.element()).length>=t.minChars){var a=Pl.getCurrent(i).bind((function(t){return Xl.getHighlighted(t).map(Ns.getValue)}));t.previewing.set(!0),ib(t,u(n),n,i,o,(function(e){Pl.getCurrent(i).each((function(e){a.fold((function(){t.model.selectsOver&&Xl.highlightFirst(e)}),(function(t){Xl.highlightBy(e,(function(e){return Ns.getValue(e).value===t.value})),Xl.getHighlighted(e).orThunk((function(){return Xl.highlightFirst(e),b.none()}))}))}))}),Tv.HighlightFirst).get(e)}},cancelEvent:nr()}),Hd.config({mode:"special",onDown:function(t,e){return i(t,e,Xl.highlightFirst),b.some(!0)},onEscape:function(t){var e=eb.getCoupled(t,"sandbox");return fs.isOpen(e)?(fs.close(e),b.some(!0)):b.none()},onUp:function(t,e){return i(t,e,Xl.highlightLast),b.some(!0)},onEnter:function(e){var n=eb.getCoupled(e,"sandbox"),r=fs.isOpen(n);if(r&&!t.previewing.get())return Pl.getCurrent(n).bind((function(t){return Xl.getHighlighted(t)})).map((function(t){return yr(e,dC(),{item:t}),!0}));var o=Ns.getValue(e);return br(e,nr()),t.onExecute(n,e,o),r&&fs.close(n),b.some(!0)}}),im.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),eb.config({others:{sandbox:function(e){return lb(t,e,{onOpen:function(){return im.on(e)},onClose:function(){return im.off(e)}})}}}),Ud("typeaheadevents",[Pr((function(n){var r=e;ub(t,u(n),n,o,r,Tv.HighlightFirst).get(e)})),_r(dC(),(function(e,n){var r=eb.getCoupled(e,"sandbox");sC(0,e,n.event().item()),br(e,nr()),t.onItemExecute(e,r,n.event().item(),Ns.getValue(e)),fs.close(r),fC(e)}))].concat(t.dismissOnBlur?[_r(Xn(),(function(t){var e=eb.getCoupled(t,"sandbox");gu(e.element()).isNone()&&fs.close(e)}))]:[]))];return{uid:t.uid,dom:kv(ht(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:f(f({},a),Rs(t.typeaheadBehaviours,c)),eventOrder:t.eventOrder}}}),pC=function(e){return f(f({},e),{toCached:function(){return pC(e.toCached())},bindFuture:function(t){return pC(e.bind((function(e){return e.fold((function(t){return Dv(w.error(t))}),(function(e){return t(e)}))})))},bindResult:function(t){return pC(e.map((function(e){return e.bind(t)})))},mapResult:function(t){return pC(e.map((function(e){return e.map(t)})))},mapError:function(t){return pC(e.map((function(e){return e.mapError(t)})))},foldResult:function(t,n){return e.map((function(e){return e.fold(t,n)}))},withTimeout:function(n,r){return pC(Rv((function(o){var i=!1,a=t.setTimeout((function(){i=!0,o(w.error(r()))}),n);e.get((function(e){i||(t.clearTimeout(a),o(e))}))})))}})},vC={type:"separator"},bC=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:function(){}}},yC=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:function(){}}},xC=function(t,e){return function(t){return I(t,bC)}(function(t,e){return L(e,(function(e){return e.type===t}))}(t,e))},wC=function(t){return xC("header",t.targets)},CC=function(t){return xC("anchor",t.targets)},SC=function(t){return b.from(t.anchorTop).map((function(t){return yC("<top>",t)})).toArray()},kC=function(t){return b.from(t.anchorBottom).map((function(t){return yC("<bottom>",t)})).toArray()},EC=function(t,e){var n=t.toLowerCase();return L(e,(function(t){return un((void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text).toLowerCase(),n)||un(t.value.toLowerCase(),n)}))},OC=xo("aria-invalid"),_C=function(t){return function(e,n,r){return st(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}},TC={bar:_C((function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:I(t.items,e.interpreter)}}(t,e.shared)})),collection:_C((function(t,e){return function(t,e){var n,r=t.label.map((function(t){return Zv(t,e)})),i=function(t){return function(e,n){na(n.event().target(),"[data-collection-item-value]").each((function(r){t(e,n,r,mo(r,"data-collection-item-value"))}))}},a=i((function(e,n,r,o){n.stop(),yr(e,dv,{name:t.name,value:o})})),u=[_r(Hn(),i((function(t,e,n){du(n)}))),_r(jn(),a),_r(Qn(),a),_r(In(),i((function(t,e,n){ea(t.element(),"."+Kg).each((function(t){$o(t,Kg)})),Go(n,Kg)}))),_r(Pn(),i((function(t){ea(t.element(),"."+Kg).each((function(t){$o(t,Kg)}))}))),Pr(i((function(e,n,r,o){yr(e,dv,{name:t.name,value:o})})))],c=xv.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:o},behaviours:nu([Vd.config({}),Ns.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){!function(e,n){var r=I(n,(function(e){var n,r=Wg.translate(e.text),o=1===t.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+e.icon+"</div>",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(t){return a[t]}));return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+('"'===(n=e.value)?"&quot;":n)+'" title="'+u+'" aria-label="'+u+'">'+i+o+"</div>"})),o=t.columns>1&&"auto"!==t.columns?H(r,t.columns):[r],i=I(o,(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));io(e.element(),i.join(""))}(e,n),"auto"===t.columns&&Rg(e,5,"tox-collection__item").each((function(t){Hd.setGridSize(e,t.numRows,t.numColumns)})),br(e,vv)}}),Xv.config({}),Hd.config((n=t.columns,1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+Gg}})),Ud("collection-events",u)])});return Kv(r,c,["tox-form__group--collection"],[])}(t,e.shared.providers)})),alertbanner:_C((function(t,e){return function(t,e){return uv.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[ig.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:cg(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){yr(e,dv,{name:"alert-banner",value:t.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})}(t,e.shared.providers)})),input:_C((function(t,e){return function(t,e){return rC({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:b.none(),maximized:t.maximized},e)}(t,e.shared.providers)})),textarea:_C((function(t,e){return function(t,e){return rC({name:t.name,multiline:!0,label:t.label,inputMode:b.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:b.none(),maximized:t.maximized},e)}(t,e.shared.providers)})),label:_C((function(t,e){return function(t,e){var n,r,o,i={dom:{tag:"label",innerHtml:e.providers.translate(t.label),classes:["tox-label"]}},a=I(t.items,e.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[i].concat(a),behaviours:nu([dx(),Vd.config({}),(n=b.none(),r=oo,o=io,bx(n,(function(t){return r(t.element())}),(function(t,e){return o(t.element(),e)}))),Hd.config({mode:"acyclic"})])}}(t,e.shared)})),iframe:(Jw=function(t,e){return function(t,e){var n=zx&&t.sandboxed,r=f(f({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=function(t){var e=Ve("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)fo(n.element(),"srcdoc",r);else{fo(n.element(),"src","javascript:''");var o=n.element().dom().contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}}(n),i=t.label.map((function(t){return Zv(t,e)})),a=xv.parts().field({factory:{sketch:function(t){return Tx({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:nu([Xv.config({}),$d.config({}),xx(b.none(),o.getValue,o.setValue)])})}}});return Kv(i,a,["tox-form__group--stretched"],[])}(t,e.shared.providers)},function(t,e,n){var r=ht(e,{source:"dynamic"});return _C(Jw)(t,r,n)}),button:_C((function(t,e){return function(t,e){var n,r,o=Ow(t.name,"custom");return n=b.none(),r=xv.parts().field(f({factory:ig},kw(t,b.some(o),e,[wx(""),dx()]))),Kv(n,r,[],[])}(t,e.shared.providers)})),checkbox:_C((function(t,e){return function(t,e){var n=Ns.config({store:{mode:"manual",getValue:function(t){return t.element().dom().checked},setValue:function(t,e){t.element().dom().checked=e}}}),r=function(t){return t.element().dom().click(),b.some(!0)},i=xv.parts().field({factory:{sketch:o},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:nu([dx(),xh.config({disabled:t.disabled}),Xv.config({}),$d.config({}),n,Hd.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),Ud("checkbox-events",[_r(Un(),(function(e,n){yr(e,sv,{name:t.name})}))])])}),a=xv.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:nu([pb.config({})])}),u=function(t){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t],innerHtml:cg("checked"===t?"selected":"unselected",e.icons)}}},c=ag({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return xv.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[i,c.asSpec(),a],fieldBehaviours:nu([xh.config({disabled:t.disabled,disableClass:"tox-checkbox--disabled",onDisabled:function(t){xv.getField(t).each(xh.disable)},onEnabled:function(t){xv.getField(t).each(xh.enable)}})])})}(t,e.shared.providers)})),colorinput:_C((function(t,e){return function(t,e,n){var r=xv.parts().field({factory:Ev,inputClasses:["tox-textfield"],onSetValue:function(t){return qv.run(t).get((function(){}))},inputBehaviours:nu([Xv.config({}),qv.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Gr(t.element())},notify:{onValid:function(t){var e=Ns.getValue(t);yr(t,vb,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Ns.getValue(t);if(0===e.length)return Dv(w.value(!0));var n=We("span");ri(n,"background-color",e);var r=ci(n,"background-color").fold((function(){return w.error("blah")}),(function(t){return w.value(e)}));return Dv(r)}}})]),selectOnFocus:!1}),o=t.label.map((function(t){return Zv(t,e.providers)})),i=function(t,e){yr(t,bb,{value:e})},a=ag(function(t,e){return hb.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:nu([pb.config({}),Xv.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return Rv((function(e){return t.fetch(e)})).map((function(r){return b.from(jp(ht(Dp(xo("menu-value"),r,(function(e){t.onItemAction(n,e)}),t.columns,t.presets,Oh.CLOSE_ON_EXECUTE,(function(){return!1}),e.providers),{movement:Ip(t.columns,t.presets)})))}))},parts:{menu:_p(0,0,t.presets)}})}({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Fa]},onLtr:function(){return[Va]}},components:[],fetch:wp.getFetch(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:function(t,e){a.getOpt(t).each((function(t){"custom"===e?n.colorPicker((function(e){e.fold((function(){return br(t,yb)}),(function(e){i(t,e),sp(e)}))}),"#ffffff"):i(t,"remove"===e?"":e)}))}},e));return xv.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:nu([Ud("form-field-events",[_r(vb,(function(e,n){a.getOpt(e).each((function(t){ri(t.element(),"background-color",n.event().color())})),yr(e,sv,{name:t.name})})),_r(bb,(function(t,e){xv.getField(t).each((function(n){Ns.setValue(n,e.event().value()),Pl.getCurrent(t).each($d.focus)}))})),_r(yb,(function(t,e){xv.getField(t).each((function(e){Pl.getCurrent(t).each($d.focus)}))}))])])})}(t,e.shared,e.colorinput)})),colorpicker:_C((function(e){var n=function(t){return"tox-"+t},r=fx(hx,n),o=ag(r.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){yr(t,dv,{name:"hex-valid",value:!0})},onInvalidHex:function(t){yr(t,dv,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[o.asSpec()],behaviours:nu([Ns.config({store:{mode:"manual",getValue:function(t){var e=o.get(t);return Pl.getCurrent(e).bind((function(t){return Ns.getValue(t).hex})).map((function(t){return"#"+t})).getOr("")},setValue:function(e,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),i=o.get(e);Pl.getCurrent(i).fold((function(){t.console.log("Can not find form")}),(function(t){Ns.setValue(t,{hex:b.from(r[1]).getOr("")}),ux.getField(t,"hex").each((function(t){br(t,Vn())}))}))}}}),dx()])}})),dropzone:_C((function(t,e){return function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){P(t,(function(t){t(e,n)}))}},o=function(t,e){if(!xh.isDisabled(t)){var n=e.event().raw();a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event().raw().target.files;a(t,n)},a=function(e,n){Ns.setValue(e,function(t){var e=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i");return L(Q(t),(function(t){return e.test(t.name)}))}(n)),yr(e,sv,{name:t.name})},u=ag({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:nu([Ud("input-file-events",[Mr(jn()),Mr(Qn())])])}),c=t.label.map((function(t){return Zv(t,e)})),s=xv.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:nu([wx([]),dx(),xh.config({}),im.config({toggleClass:"dragenter",toggleOnExecute:!1}),Ud("dropzone-events",[_r("dragenter",r([n,im.toggle])),_r("dragleave",r([n,im.toggle])),_r("dragover",n),_r("drop",r([n,o])),_r(Un(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},ig.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){u.get(t).element().dom().click()},buttonBehaviours:nu([Xv.config({})])})]}]}}}});return Kv(c,s,["tox-form__group--stretched"],[])}(t,e.shared.providers)})),grid:_C((function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:I(t.items,e.interpreter)}}(t,e.shared)})),selectbox:_C((function(t,e){return function(t,e){var n=I(t.items,(function(t){return{text:e.translate(t.text),value:t.value}})),r=t.label.map((function(t){return Zv(t,e)})),o=xv.parts().field({dom:{},selectAttributes:{size:t.size},options:n,factory:nC,selectBehaviours:nu([xh.config({disabled:t.disabled}),Xv.config({}),Ud("selectbox-change",[_r(Un(),(function(e,n){yr(e,sv,{name:t.name})}))])])}),i=t.size>1?b.none():b.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:cg("chevron-down",e.icons)}}),a={dom:{tag:"div",classes:["tox-selectfield"]},components:W([[o],i.toArray()])};return xv.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:W([r.toArray(),[a]]),fieldBehaviours:nu([xh.config({disabled:t.disabled,onDisabled:function(t){xv.getField(t).each(xh.disable)},onEnabled:function(t){xv.getField(t).each(xh.enable)}})])})}(t,e.shared.providers)})),sizeinput:_C((function(t,e){return Dw(t,e.shared.providers)})),urlinput:_C((function(t,n){return function(t,n,r){var o,i,a,u,c=n.shared.providers,s=function(e){var n=Ns.getValue(e);r.addToHistory(n.value,t.filetype)},l=xv.parts().field({factory:hC,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":OC,type:"url"},minChars:0,responseTime:0,fetch:function(e){var o=function(t,e,n){var r=Ns.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value;return n.getLinkInformation().fold((function(){return[]}),(function(e){var r,i=EC(o,function(t){return I(t,(function(t){return yC(t,t)}))}(n.getHistory(t)));return"file"===t?(r=[i,EC(o,wC(e)),EC(o,W([SC(e),CC(e),kC(e)]))],V(r,(function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(vC,e)}),[])):i}))}(t.filetype,e,r),i=vw(o,Oh.BUBBLE_TO_SANDBOX,n,!1);return Dv(i)},getHotspot:function(t){return v.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(qv)&&qv.run(t).get(e)},typeaheadBehaviours:nu(W([r.getValidationHandler().map((function(e){return qv.config({getRoot:function(t){return Gr(t.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){m.getOpt(t).each((function(t){fo(t.element(),"title",c.translate(e))}))}},validator:{validate:function(n){var r=Ns.getValue(n);return pC(Rv((function(n){e({type:t.filetype,url:r.value},(function(t){if("invalid"===t.status){var e=w.error(t.message);n(e)}else{var r=w.value(t.message);n(r)}}))})))},validateOnLoad:!1}})})).toArray(),[xh.config({disabled:t.disabled}),Xv.config({}),Ud("urlinput-events",W(["file"===t.filetype?[_r(Vn(),(function(e){yr(e,sv,{name:t.name})}))]:[],[_r(Un(),(function(e){yr(e,sv,{name:t.name}),s(e)})),_r(Kn(),(function(e){yr(e,sv,{name:t.name}),s(e)}))]]))]])),eventOrder:(o={},o[Vn()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:n.shared.getSink,parts:{menu:_p(0,0,"normal")},onExecute:function(t,e,n){yr(e,mv,{})},onItemExecute:function(e,n,r,o){s(e),yr(e,sv,{name:t.name})}}),d=t.label.map((function(t){return Zv(t,c)})),m=ag((i=b.some(OC),void 0===(a="warning")&&(a="invalid"),void 0===u&&(u="invalid"),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-invalid"],innerHtml:cg(a,c.icons),attributes:f({title:c.translate(u),"aria-live":"polite"},i.fold((function(){return{}}),(function(t){return{id:t}})))}})),g=ag({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[m.asSpec()]}),h=r.getUrlPicker(t.filetype),p=xo("browser.url.event"),v=ag({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,g.asSpec()],behaviours:nu([xh.config({disabled:t.disabled})])}),y=ag(Ew({name:t.name,icon:b.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return br(t,p)}),c,[],["tox-browse-url"]));return xv.sketch({dom:Jv([]),components:d.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:W([[v.asSpec()],h.map((function(){return y.asSpec()})).toArray()])}]),fieldBehaviours:nu([xh.config({disabled:t.disabled,onDisabled:function(t){xv.getField(t).each(xh.disable),y.getOpt(t).each(xh.disable)},onEnabled:function(t){xv.getField(t).each(xh.enable),y.getOpt(t).each(xh.enable)}}),Ud("url-input-events",[_r(p,(function(e){Pl.getCurrent(e).each((function(n){var r=Ns.getValue(n),o=f({fieldname:t.name},r);h.each((function(r){r(o).get((function(r){Ns.setValue(n,r),yr(e,sv,{name:t.name})}))}))}))}))])])})}(t,n,n.urlinput)})),customeditor:_C((function(t){var e=Ve(b.none()),n=ag({dom:{tag:t.tag}}),r=Ve(b.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:nu([Ud("editor-foo-events",[Dr((function(o){n.getOpt(o).each((function(n){(!function(t){return Object.prototype.hasOwnProperty.call(t,"init")}(t)?px.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element().dom(),t.settings)})):t.init(n.element().dom())).then((function(t){r.get().each((function(e){t.setValue(e)})),r.set(b.none()),e.set(b.some(t))}))}))}))]),Ns.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(b.some(n))}),(function(t){return t.setValue(n)}))}}}),dx()]),components:[n.asSpec()]}})),htmlpanel:_C((function(t){return uv.sketch("presentation"===t.presets?{dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}:{dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:nu([Xv.config({}),$d.config({})])})})),imagetools:_C((function(t,e){return eC(t,e.shared.providers)})),table:_C((function(t,e){return function(t,e){var n,r,o=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=t.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:I(r,(function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}}))}]}),(n=t.cells,{dom:{tag:"tbody"},components:I(n,(function(t){return{dom:{tag:"tr"},components:I(t,o)}}))})],behaviours:nu([Xv.config({}),$d.config({})])}}(t,e.shared.providers)})),panel:_C((function(t,e){return function(t,e){return{dom:{tag:"div",classes:t.classes},components:I(t.items,e.shared.interpreter)}}(t,e)}))},zC={field:function(t,e){return e}},AC=function(t,e,n){var r=ht(n,{shared:{interpreter:function(e){return NC(t,e,r)}}});return NC(t,e,r)},NC=function(e,n,r){return st(TC,n.type).fold((function(){return t.console.error('Unknown factory type "'+n.type+'", defaulting to container: ',n),n}),(function(t){return t(e,n,r)}))},MC={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},BC=function(t,e,n){return n?function(){return{anchor:"node",root:t(),node:b.from(t()),bubble:Iu(-12,-12,MC),layouts:{onRtl:function(){return[Rm]},onLtr:function(){return[Dm]}},overrides:{maxHeightFunction:Bu()}}}:function(){return{anchor:"hotspot",hotspot:e(),bubble:Iu(-12,12,MC),layouts:{onRtl:function(){return[Fa]},onLtr:function(){return[Va]}},overrides:{maxHeightFunction:Bu()}}}},RC=function(t,e,n){return n?function(){return{anchor:"node",root:t(),node:b.from(t()),layouts:{onRtl:function(){return[Hm]},onLtr:function(){return[Hm]}}}}:function(){return{anchor:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[qa]},onLtr:function(){return[qa]}}}}},DC=function(t,e){return function(){return{anchor:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return b.some(Ju.range(Ge(e.startContainer),e.startOffset,Ge(e.endContainer),e.endOffset))}}}},HC=function(t){return function(e){return{anchor:"node",root:t(),node:e}}},IC=function(t,e){var n=function(){return Ge(t.getBody())},r=ng(t)||!tg(t);return{inlineDialog:BC(n,e,r),banner:RC(n,e,r),cursor:DC(t,n),node:HC(n)}},PC=function(t){return function(e,n){wp.colorPickerDialog(t)(e,n)}},LC=function(t){return function(){return up(t)}},FC=function(t){return function(){return cp(t)}},VC=function(t){return function(){return wp.getColorCols(t)}},UC=function(t){return{colorPicker:PC(t),hasCustomColors:LC(t),getColors:FC(t),getColorCols:VC(t)}},jC=function(t){return function(){return function(t){return t.getParam("draggable_modal",!1,"boolean")}(t)}},WC=function(t){return{isDraggableModal:jC(t)}},qC=[{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",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strike-through",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"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",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}]}],GC=function(t){return V(t,(function(t,e){if(lt(e,"items")){var n=GC(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(function(t){return lt(t,"inline")}(e)||function(t){return lt(t,"block")}(e)||function(t){return lt(t,"selector")}(e)){var r="custom-"+e.title.toLowerCase();return{customFormats:t.customFormats.concat([{name:r,format:e}]),formats:t.formats.concat([{title:e.title,format:r,icon:e.icon}])}}return f(f({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},$C=function(t){return function(t){return b.from(t.getParam("style_formats")).filter(E)}(t).map((function(e){var n=function(t,e){var n=GC(e),r=function(e){P(e,(function(e){t.formatter.has(e.name)||t.formatter.register(e.name,e.format)}))};return t.formatter?r(n.customFormats):t.on("init",(function(){r(n.customFormats)})),n.formats}(t,e);return function(t){return t.getParam("style_formats_merge",!1,"boolean")}(t)?qC.concat(n):n})).getOr(qC)},XC=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return ht(t,r)},KC=function(t,e,n,r){var o=function(e){return I(e,(function(e){var i=et(e);if(ft(e,"items")){var a=o(e.items);return ht(function(t){return ht(t,{type:"submenu"})}(e),{getStyleItems:function(){return a}})}return ft(e,"format")?function(t){return XC(t,n,r)}(e):1===i.length&&R(i,"title")?ht(e,{type:"separator"}):function(e){var o=xo(e.title),i={type:"formatter",format:o,isSelected:n(o),getStylePreview:r(o)},a=ht(e,i);return t.formatter.register(o,a),a}(e)}))};return o(e)},YC=function(t){var e=function(e){return function(){return t.formatter.match(e)}},n=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?b.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):b.none()}},r=function(t){var e=t.items;return void 0!==e&&e.length>0?q(e,r):[t.format]},o=Ve([]),i=Ve([]),a=Ve([]),u=Ve([]),c=Ve(!1);return t.on("PreInit",(function(a){var u=$C(t),c=KC(t,u,e,n);o.set(c),i.set(q(c,r))})),t.on("addStyleModifications",(function(o){var i=KC(t,o.items,e,n);a.set(i),c.set(o.replace),u.set(q(i,r))})),{getData:function(){var t=c.get()?[]:o.get(),e=a.get();return t.concat(e)},getFlattenedKeys:function(){var t=c.get()?[]:i.get(),e=u.get();return t.concat(e)}}},JC=qw.trim,ZC=function(t){return function(e){if(e&&1===e.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},QC=ZC("true"),tS=ZC("false"),eS=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},nS=function(t){return t.innerText||t.textContent},rS=function(t){return function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)}(t)&&iS(t)},oS=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},iS=function(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return QC(t)}return!1}(t)&&!tS(t)},aS=function(t){return oS(t)&&iS(t)},uS=function(t){var e=function(t){return t.id?t.id:xo("h")}(t);return eS("header",nS(t),"#"+e,function(t){return oS(t)?parseInt(t.nodeName.substr(1),10):0}(t),(function(){t.id=e}))},cS=function(t){var n=t.id||t.name,r=nS(t);return eS("anchor",r||"#"+n,"#"+n,0,e)},sS=function(t){return JC(t.title).length>0},lS="tinymce-url-history",fS=function(t){return S(t)&&/^https?/.test(t)},dS=function(t){return k(t)&&ut(t,(function(t){return!(E(e=t)&&e.length<=5&&G(e,fS));var e})).isNone()},mS=function(){var e,n=t.localStorage.getItem(lS);if(null===n)return{};try{e=JSON.parse(n)}catch(r){if(r instanceof SyntaxError)return t.console.log("Local storage "+lS+" was not valid JSON",r),{};throw r}return dS(e)?e:(t.console.log("Local storage "+lS+" was not valid format",e),{})},gS=function(t){var e=mS();return Object.prototype.hasOwnProperty.call(e,t)?e[t]:[]},hS=function(e,n){if(fS(e)){var r=mS(),o=Object.prototype.hasOwnProperty.call(r,n)?r[n]:[],i=L(o,(function(t){return t!==e}));r[n]=[e].concat(i).slice(0,5),function(e){if(!dS(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));t.localStorage.setItem(lS,JSON.stringify(e))}(r)}},pS=Object.prototype.hasOwnProperty,vS=function(t){return!!t},bS=function(t){return ot(qw.makeMap(t,/[, ]/),vS)},yS=function(t,e,n){var r,o,i=(r=t,o=e,pS.call(r,o)?b.some(r[o]):b.none()).getOr(n);return S(i)?b.some(i):b.none()},xS=function(t){return b.some(t.file_picker_callback).filter(_)},wS=function(t){return{getHistory:gS,addToHistory:hS,getLinkInformation:function(){return function(t){return!1===t.settings.typeahead_urls?b.none():b.some({targets:(e=t.getBody(),n=function(t){return I(uc(Ge(t),"h1,h2,h3,h4,h5,h6,a:not([href])"),(function(t){return t.dom()}))}(e),L(function(t){return I(L(t,aS),uS)}(n).concat(function(t){return I(L(t,rS),cS)}(n)),sS)),anchorTop:yS(t.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:yS(t.settings,"anchor_bottom","#bottom").getOrUndefined()});var e,n}(t)},getValidationHandler:function(){return function(t){return b.from(t.settings.file_picker_validator_handler).filter(_).orThunk((function(){return b.from(t.settings.filepicker_validator_handler).filter(_)}))}(t)},getUrlPicker:function(e){return function(t,e){return function(t,e){var n=function(t){var e=b.some(t.file_picker_types).filter(vS),n=b.some(t.file_browser_callback_types).filter(vS),r=e.or(n).map(bS);return xS(t).fold((function(){return!1}),(function(t){return r.fold((function(){return!0}),(function(t){return et(t).length>0&&t}))}))}(t);return O(n)?n?xS(t):b.none():n[e]?xS(t):b.none()}(t.settings,e).map((function(n){return function(r){return Rv((function(o){var i=f({filetype:e,fieldname:r.fieldname},b.from(r.meta).getOr({}));n.call(t,(function(t,e){if(!S(t))throw new Error("Expected value to be string");if(void 0!==e&&!k(e))throw new Error("Expected meta to be a object");o({value:t,meta:e})}),r.value,i)}))}}))}(t,e)}}},CS=r((function(t,e){!function(t,e){var n=Ai.max(t,e,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);ri(t,"max-width",n+"px")}(t,Math.floor(e))})),SS=r([ve("items"),ha(["itemSelector"]),Ms("tgroupBehaviours",[Hd])]),kS=r([ul({name:"items",unit:"item"})]),ES=Bl({name:"ToolbarGroup",configFields:SS(),partFields:kS(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Rs(t.tgroupBehaviours,[Hd.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),OS=r([ve("dom"),Me("shell",!0),Ms("toolbarBehaviours",[Vd])]),_S=r([al({name:"groups",overrides:function(){return{behaviours:nu([Vd.config({})])}}})]),TS=Bl({name:"Toolbar",configFields:OS(),partFields:_S(),factory:function(e,n,r,o){var i=e.shell?{behaviours:[Vd.config({})],components:[]}:{behaviours:[],components:n};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:Rs(e.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,r){var o;(o=n,e.shell?b.some(o):bl(o,e,"groups")).fold((function(){throw t.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Vd.set(t,r)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),zS=Lr("within","extra","withinWidth"),AS=function(t,e,n){var o,i=(o=function(t,e){var o=n(t);return b.some({element:r(t),start:r(e),finish:r(e+o),width:r(o)})},V(t,(function(t,e){return o(e,t.len).fold(r(t),(function(e){return{len:e.finish(),list:t.list.concat([e])}}))}),{len:0,list:[]}).list),a=L(i,(function(t){return t.finish()<=e})),u=F(a,(function(t,e){return t+e.width()}),0),c=i.slice(a.length);return{within:r(a),extra:r(c),withinWidth:r(u)}},NS=function(t){return I(t,(function(t){return t.element()}))},MS=function(t,e){var n=I(e,(function(t){return xi(t)}));TS.setGroups(t,n)},BS=function(t,e,n){var r=yl(t,e,"primary"),o=eb.getCoupled(t,"overflowGroup");ri(r.element(),"visibility","hidden");var i=e.builtGroups.get().concat([o]),a=tt(i,(function(t){return gu(t.element()).bind((function(e){return t.getSystem().getByDom(e).toOption()}))}));n([]),MS(r,i);var u,c,s,l,f,d,m,g,h=Ni(r.element()),p=(u=h,c=e.builtGroups.get(),l=o,d=(f=function(t,e,n){var r=AS(e,t,n);return 0===r.extra().length?b.some(r):b.none()}(u,c,s=function(t){return Ni(t.element())}).getOrThunk((function(){return AS(c,u-s(l),s)}))).within(),m=f.extra(),g=f.withinWidth(),1===m.length&&m[0].width()<=s(l)?function(t,e,n){var r=NS(t.concat(e));return zS(r,[],n)}(d,m,g):m.length>=1?function(t,e,n,r){var o=NS(t).concat([n]);return zS(o,NS(e),r)}(d,m,l,g):function(t,e,n){return zS(NS(t),[],n)}(d,0,g));0===p.extra().length?(Vd.remove(r,o),n([])):(MS(r,p.within()),n(p.extra())),fi(r.element(),"visibility"),di(r.element()),a.each($d.focus)},RS=r([Ms("splitToolbarBehaviours",[eb]),Fe("builtGroups",(function(){return Ve([])}))]),DS=r([ha(["overflowToggledClass"]),Ae("getOverflowBounds"),ve("lazySink"),Fe("overflowGroups",(function(){return Ve([])}))].concat(RS())),HS=r([ol({factory:TS,schema:OS(),name:"primary"}),il({schema:OS(),name:"overflow"}),il({name:"overflow-button"}),il({name:"overflow-group"})]),IS=r([ha(["toggledClass"]),ve("lazySink"),Ce("fetch"),Ae("getBounds"),Ne("fireDismissalEventInstead",[Me("event",lr())]),Wu()]),PS=r([il({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:nu([im.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),il({factory:TS,schema:OS(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:nu([Hd.config({mode:"cyclic",onEscape:function(e){return bl(e,t,"button").each($d.focus),b.none()}})])}}})]),LS=function(t,e){var n=eb.getCoupled(t,"toolbarSandbox");fs.isOpen(n)?fs.close(n):fs.open(n,e.toolbar())},FS=function(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();jc.positionWithinBounds(i,{anchor:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:CS()}},e,o)},VS=function(t,e,n,r,o){TS.setGroups(e,o),FS(t,e,n,r),im.on(t)},US=Bl({name:"FloatingToolbarButton",factory:function(t,e,n,o){return f(f({},ig.sketch(f(f({},o.button()),{action:function(t){LS(t,o)},buttonBehaviours:Hs({dump:o.button().buttonBehaviours},[eb.config({others:{toolbarSandbox:function(e){return function(t,e,n){var o=ra();return{dom:{tag:"div",attributes:{id:o.id()}},behaviours:nu([Hd.config({mode:"special",onEscape:function(t){return fs.close(t),b.some(!0)}}),fs.config({onOpen:function(r,i){n.fetch().get((function(r){VS(t,i,n,e.layouts,r),o.link(t.element()),Hd.focusIn(i)}))},onClose:function(){im.off(t),$d.focus(t),o.unlink(t.element())},isPartOf:function(e,n,r){return oa(n,r)||oa(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),lu.config({channels:f(f({},ps(f({isExtraPart:r(!1)},n.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),bs({isExtraPart:r(!1),doReposition:function(){fs.getState(eb.getCoupled(t,"toolbarSandbox")).each((function(r){FS(t,r,n,e.layouts)}))}}))})])}}(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){fs.getState(eb.getCoupled(e,"toolbarSandbox")).each((function(o){VS(e,o,t,n.layouts,r)}))},reposition:function(e){fs.getState(eb.getCoupled(e,"toolbarSandbox")).each((function(r){FS(e,r,t,n.layouts)}))},toggle:function(t){LS(t,o)},getToolbar:function(t){return fs.getState(eb.getCoupled(t,"toolbarSandbox"))}}})},configFields:IS(),partFields:PS(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)}}}),jS=function(t){return I(t,(function(t){return xi(t)}))},WS=function(t,e,n){BS(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){US.setGroups(t,jS(r))}))}))},qS=Bl({name:"SplitFloatingToolbar",configFields:DS(),partFields:HS(),factory:function(t,e,n,r){var o=ag(US.sketch({fetch:function(){return Rv((function(e){e(jS(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Va]},onRtl:function(){return[Fa]},onBottomLtr:function(){return[ja]},onBottomRtl:function(){return[Ua]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Rs(t.splitToolbarBehaviours,[eb.config({others:{overflowGroup:function(){return ES.sketch(f(f({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(I(n,e.getSystem().build)),WS(e,o,t)},refresh:function(e){return WS(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){US.toggle(t)}))},reposition:function(t){o.getOpt(t).each((function(t){US.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind((function(t){return US.getToolbar(t)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),GS=function(t,e){return e.getAnimationRoot.fold((function(){return t.element()}),(function(e){return e(t)}))},$S=function(t){return t.dimension.property},XS=function(t,e){return t.dimension.getDimension(e)},KS=function(t,e){var n=GS(t,e);Yo(n,[e.shrinkingClass,e.growingClass])},YS=function(t,e){$o(t.element(),e.openClass),Go(t.element(),e.closedClass),ri(t.element(),$S(e),"0px"),di(t.element())},JS=function(t,e){$o(t.element(),e.closedClass),Go(t.element(),e.openClass),fi(t.element(),$S(e))},ZS=function(t,e,n,r){n.setCollapsed(),ri(t.element(),$S(e),XS(e,t.element())),di(t.element()),KS(t,e),YS(t,e),e.onStartShrink(t),e.onShrunk(t)},QS=function(t,e,n,r){var o=r.getOrThunk((function(){return XS(e,t.element())}));n.setCollapsed(),ri(t.element(),$S(e),o),di(t.element());var i=GS(t,e);$o(i,e.growingClass),Go(i,e.shrinkingClass),YS(t,e),e.onStartShrink(t)},tk=function(t,e,n){var r=XS(e,t.element());("0px"===r?ZS:QS)(t,e,n,b.some(r))},ek=function(t,e,n){var r=GS(t,e),o=Xo(r,e.shrinkingClass),i=XS(e,t.element());JS(t,e);var a=XS(e,t.element());(o?function(){ri(t.element(),$S(e),i),di(t.element())}:function(){YS(t,e)})(),$o(r,e.shrinkingClass),Go(r,e.growingClass),JS(t,e),ri(t.element(),$S(e),a),n.setExpanded(),e.onStartGrow(t)},nk=function(t,e,n){var r=GS(t,e);return!0===Xo(r,e.growingClass)},rk=function(t,e,n){var r=GS(t,e);return!0===Xo(r,e.shrinkingClass)},ok=Object.freeze({__proto__:null,refresh:function(t,e,n){if(n.isExpanded()){fi(t.element(),$S(e));var r=XS(e,t.element());ri(t.element(),$S(e),r)}},grow:function(t,e,n){n.isExpanded()||ek(t,e,n)},shrink:function(t,e,n){n.isExpanded()&&tk(t,e,n)},immediateShrink:function(t,e,n){n.isExpanded()&&ZS(t,e,n,b.none())},hasGrown:function(t,e,n){return n.isExpanded()},hasShrunk:function(t,e,n){return n.isCollapsed()},isGrowing:nk,isShrinking:rk,isTransitioning:function(t,e,n){return!0===nk(t,e)||!0===rk(t,e)},toggleGrow:function(t,e,n){(n.isExpanded()?tk:ek)(t,e,n)},disableTransitions:KS}),ik=Object.freeze({__proto__:null,exhibit:function(t,e){return Lo(e.expanded?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:Rt(e.dimension.property,"0px")})},events:function(t,e){return kr([Rr(Wn(),(function(n,r){r.event().raw().propertyName===t.dimension.property&&(KS(n,t),e.isExpanded()&&fi(n.element(),t.dimension.property),(e.isExpanded()?t.onGrown:t.onShrunk)(n))}))])}}),ak=[ve("closedClass"),ve("openClass"),ve("shrinkingClass"),ve("growingClass"),Oe("getAnimationRoot"),va("onShrunk"),va("onStartShrink"),va("onGrown"),va("onStartGrow"),Me("expanded",!1),be("dimension",ue("property",{width:[wa("property","width"),wa("getDimension",(function(t){return Ni(t)+"px"}))],height:[wa("property","height"),wa("getDimension",(function(t){return Si(t)+"px"}))]}))],uk=ou({fields:ak,name:"sliding",active:ik,apis:ok,state:Object.freeze({__proto__:null,init:function(t){var e=Ve(t.expanded);return Io({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:i(e.set,!1),setExpanded:i(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),ck=r([ha(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),va("onOpened"),va("onClosed")].concat(RS())),sk=r([ol({factory:TS,schema:OS(),name:"primary"}),ol({factory:TS,schema:OS(),name:"overflow",overrides:function(t){return{toolbarBehaviours:nu([uk.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){bl(e,t,"overflow-button").each((function(t){im.off(t),$d.focus(t)})),t.onClosed(e)},onGrown:function(e){Hd.focusIn(e),t.onOpened(e)},onStartGrow:function(e){bl(e,t,"overflow-button").each(im.on)}}),Hd.config({mode:"acyclic",onEscape:function(e){return bl(e,t,"overflow-button").each($d.focus),b.some(!0)}})])}}}),il({name:"overflow-button",overrides:function(t){return{buttonBehaviours:nu([im.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),il({name:"overflow-group"})]),lk=function(t,e){bl(t,e,"overflow").each((function(n){BS(t,e,(function(t){var e=I(t,(function(t){return xi(t)}));TS.setGroups(n,e)})),bl(t,e,"overflow-button").each((function(t){uk.hasGrown(n)&&im.on(t)})),uk.refresh(n)}))},fk=Bl({name:"SplitSlidingToolbar",configFields:ck(),partFields:sk(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Rs(t.splitToolbarBehaviours,[eb.config({others:{overflowGroup:function(t){return ES.sketch(f(f({},r["overflow-group"]()),{items:[ig.sketch(f(f({},r["overflow-button"]()),{action:function(e){br(t,"alloy.toolbar.toggle")}}))]}))}}}),Ud("toolbar-toggle-events",[_r("alloy.toolbar.toggle",(function(e){bl(e,t,"overflow").each((function(n){lk(e,t),uk.toggleGrow(n)}))}))])]),apis:{setGroups:function(e,n){!function(e,n){var r=I(n,e.getSystem().build);t.builtGroups.set(r)}(e,n),lk(e,t)},refresh:function(e){return lk(e,t)},toggle:function(e){return function(t,e){bl(t,e,"overflow").each((function(n){lk(t,e),uk.toggleGrow(n)}))}(e,t)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)}}}),dk=r(xo("toolbar-height-change")),mk=qt([be("readonly",de)]),gk=function(t,e){var n=t.outerContainer;!function(t,e){var n=t.outerContainer.element();e&&(t.mothership.broadcastOn([ds()],{target:n}),t.uiMothership.broadcastOn([ds()],{target:n})),t.mothership.broadcastOn(["silver.readonly"],{readonly:e}),t.uiMothership.broadcastOn(["silver.readonly"],{readonly:e})}(t,e),wn("*",n.element()).forEach((function(t){n.getSystem().getByDom(t).each((function(t){t.hasConfigured(xh)&&xh.set(t,e)}))}))},hk=function(t,e){t.on("init",(function(){t.readonly&&gk(e,!0)})),t.on("SwitchMode",(function(){return gk(e,t.readonly)})),function(t){return t.getParam("readonly",!1,"boolean")}(t)&&t.setMode("readonly")},pk=function(t){var e;return lu.config({channels:(e={},e["silver.readonly"]={schema:mk,onReceive:function(e,n){t(e).each((function(t){!function(t,e){wn("*",t.element()).forEach((function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(xh)&&xh.set(t,e)}))}))}(t,n.readonly)}))}},e)})},vk=function(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:f({tag:"div",classes:["tox-toolbar__group"]},e),components:[ES.parts().items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:nu([Xv.config({}),$d.config({})])}},bk=function(t){return ES.sketch(vk(t))},yk=function(t,e,n){var r=Dr((function(e){var n=I(t.initGroups,bk);TS.setGroups(e,n)}));return nu([Hd.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Ud("toolbar-events",[r]),pk(n)])},xk=function(t,e){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":vk({title:b.none(),items:[]}),"overflow-button":Cw({name:"more",icon:b.some("more-drawer"),disabled:!1,tooltip:b.some("More..."),primary:!1,borderless:!1},b.none(),t.backstage.shared.providers)},splitToolbarBehaviours:yk(t,n,e)}},wk=function(t){var e=xk(t,qS.getOverflow),n=qS.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return qS.sketch(f(f({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element(),n=$i(e),r=Wr(e),o=$i(r);return qi(n.x()+4,o.y(),n.width()-8,o.height())},parts:f(f({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},Ck=function(t){var e=fk.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=fk.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=xk(t,b.none);return fk.sketch(f(f({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([dk()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([dk()],{type:"closed"})}}))},Sk=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return TS.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===sf.scrolling?["tox-toolbar--scrolling"]:[])},components:[TS.parts().groups({})],toolbarBehaviours:yk(t,e,r(b.none()))})},kk=[Ie("disabled",!1),ze("tooltip"),ze("icon"),ze("text"),Pe("onSetup",(function(){return e}))],Ek=qt([xe("type"),Ce("onAction")].concat(kk)),Ok=function(t){return ne("toolbarbutton",Ek,t)},_k=[ze("text"),ze("tooltip"),ze("icon"),Ce("fetch"),Pe("onSetup",(function(){return e}))],Tk=qt(m([xe("type")],_k)),zk=function(t){return ne("menubutton",Tk,t)},Ak=qt([xe("type"),ze("tooltip"),ze("icon"),ze("text"),Ae("select"),Ce("fetch"),Pe("onSetup",(function(){return e})),He("presets","normal",["normal","color","listpreview"]),Me("columns",1),Ce("onAction"),Ce("onItemAction")]),Nk=[Ie("active",!1)].concat(kk),Mk=qt(Nk.concat([xe("type"),Ce("onAction")])),Bk=function(t){return ne("ToggleButton",Mk,t)},Rk=qt([xe("type"),be("items",(Kw=[Qt([xe("name"),Ee("items",fe)]),fe],{extract:function(t,e,n){for(var r=[],o=0,i=Kw;o<i.length;o++){var a=i[o].extract(t,e,n);if(a.stype===g.Value)return a;r.push(a)}return It(r)},toString:function(){return"oneOf("+I(Kw,(function(t){return t.toString()})).join(", ")+")"}}))].concat(kk)),Dk=[Pe("predicate",(function(){return!1})),He("scope","node",["node","editor"]),He("position","selection",["node","selection","line"])],Hk=kk.concat([Me("type","contextformbutton"),Me("primary",!1),Ce("onAction"),Fe("original",o)]),Ik=Nk.concat([Me("type","contextformbutton"),Me("primary",!1),Ce("onAction"),Fe("original",o)]),Pk=kk.concat([Me("type","contextformbutton")]),Lk=Nk.concat([Me("type","contextformtogglebutton")]),Fk=ue("type",{contextformbutton:Hk,contextformtogglebutton:Ik}),Vk=qt([Me("type","contextform"),Pe("initValue",(function(){return""})),ze("label"),Ee("commands",Fk),_e("launch",ue("type",{contextformbutton:Pk,contextformtogglebutton:Lk}))].concat(Dk)),Uk=qt([Me("type","contexttoolbar"),xe("items")].concat(Dk)),jk=Object.freeze({__proto__:null,getState:function(t,e,n){return n}}),Wk=Object.freeze({__proto__:null,events:function(t,e){var n=function(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=t(r,e.get()),i=I(o,n.getSystem().build);$c(n,i)}))};return kr([_r(Yn(),(function(e,r){var o=r,i=t.channel;R(o.channels(),i)&&n(e,o.data())})),Dr((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])}}),qk=Object.freeze({__proto__:null,init:function(){var t=Ve(b.none());return{readState:function(){return t.get().fold((function(){return"none"}),(function(t){return t}))},get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(b.none())}}}}),Gk=[ve("channel"),Oe("renderComponents"),Oe("updateState"),Oe("initialData")],$k=ou({fields:Gk,name:"reflecting",active:Wk,apis:jk,state:qk}),Xk=r([ve("toggleClass"),ve("fetch"),ya("onExecute"),Me("getHotspot",b.some),Me("getAnchorOverrides",r({})),Wu(),ya("onItemExecute"),Oe("lazySink"),ve("dom"),va("onOpen"),Ms("splitDropdownBehaviours",[eb,Hd,$d]),Me("matchWidth",!1),Me("useMinWidth",!1),Me("eventOrder",{}),Oe("role")].concat(db())),Kk=ol({factory:ig,schema:[ve("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:nu([$d.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(xr)},buttonBehaviours:nu([im.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),Yk=ol({factory:ig,schema:[ve("dom")],name:"button",defaults:function(){return{buttonBehaviours:nu([$d.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),Jk=r([Kk,Yk,al({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[ve("text")],name:"aria-descriptor"}),il({schema:[ga()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),rb()]),Zk=Bl({name:"SplitDropdown",configFields:Xk(),partFields:Jk(),factory:function(t,n,r,o){var i=function(t){Pl.getCurrent(t).each((function(t){Xl.highlightFirst(t),Hd.focusIn(t)}))},a=function(n){ub(t,(function(t){return t}),n,o,i,Tv.HighlightFirst).get(e)},u=function(e){var n=yl(e,t,"button");return xr(n),b.some(!0)},c=f(f({},kr([Dr((function(e,n){bl(e,t,"aria-descriptor").each((function(t){var n=xo("aria");fo(t.element(),"id",n),fo(e.element(),"aria-describedby",n)}))}))])),um(b.some(a)));return{uid:t.uid,dom:t.dom,components:n,apis:{repositionMenus:function(t){im.isOn(t)&&fb(t)}},eventOrder:f(f({},t.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:c,behaviours:Rs(t.splitDropdownBehaviours,[eb.config({others:{sandbox:function(e){var n=yl(e,t,"arrow");return lb(t,e,{onOpen:function(){im.on(n),im.on(e)},onClose:function(){im.off(n),im.off(e)}})}}}),Hd.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return a(t),b.some(!0)}}),$d.config({}),im.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),Qk=function(t){return{isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},tE=function(t){return{setActive:function(e){im.set(t,e)},isActive:function(){return im.isOn(t)},isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)}}},eE=function(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},nE=xo("focus-button"),rE=["checklist","ordered-list"],oE=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],iE=function(t,e,n,r,o,i){var a,u=function(t){return Wg.isRtl()&&R(rE,t)?t+"-rtl":t},c=Wg.isRtl()&&t.exists((function(t){return R(oE,t)}));return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:eE(n,i)},components:zh([t.map((function(t){return aw(u(t),i.icons)})),e.map((function(t){return cw(t,"tox-tbtn",i)}))]),eventOrder:(a={},a[Mn()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:nu([Ud("common-button-display-events",[_r(Mn(),(function(t,e){e.event().prevent(),br(t,nE)}))])].concat(r.map((function(n){return $k.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return zh([t.icon.map((function(t){return aw(u(t),i.icons)})),t.text.map((function(t){return cw(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},aE=function(t,n,r){var o,i,a=Ve(e),u=iE(t.icon,t.text,t.tooltip,b.none(),b.none(),r);return ig.sketch({dom:u.dom,components:u.components,eventOrder:lw,buttonBehaviours:nu([Ud("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},Pr((function(t,e){Ch(o,t)((function(e){yr(t,sw,{buttonApi:e}),o.onAction(e)}))}))),Sh(n,a),kh(n,a)]),(i=t.disabled,xh.config({disabled:i,disableClass:"tox-tbtn--disabled",useNative:!1}))].concat(n.toolbarButtonBehaviours))})},uE=function(t,e,n){return aE(t,{toolbarButtonBehaviours:[].concat(n.length>0?[Ud("toolbarButtonWith",n)]:[]),getApi:Qk,onSetup:t.onSetup},e)},cE=function(t,e,n){return ht(aE(t,{toolbarButtonBehaviours:[Vd.config({}),im.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[Ud("toolbarToggleButtonWith",n)]:[]),getApi:tE,onSetup:t.onSetup},e))},sE=function(t,e,n){return function(r){return Rv((function(t){return e.fetch(t)})).map((function(o){return b.from(jp(ht(Dp(xo("menu-value"),o,(function(n){e.onItemAction(t(r),n)}),e.columns,e.presets,Oh.CLOSE_ON_EXECUTE,e.select.getOr((function(){return!1})),n),{movement:Ip(e.columns,e.presets),menuBehaviours:Dg("auto"!==e.columns?[]:[Dr((function(t,n){Rg(t,4,Yg(e.presets)).each((function(e){Hd.setGridSize(t,e.numRows,e.numColumns)}))}))])})))}))}},lE=function(t,e){return _r(sw,(function(n,r){var o=function(t){return{hide:function(){return br(t,er())},getValue:function(){return Ns.getValue(t)}}}(t.get(n));e.onAction(o,r.event().buttonApi())}))},fE=function(e){var n=Li(t.window),r=Gi(Ge(e.getContentAreaContainer())),o=$m(e)||Xm(e)||Ym(e),i=function(t,e){var n=Math.max(e.x(),t.x()),r=t.right()-n,o=e.width()-(n-e.x());return{x:n,width:Math.min(r,o)}}(r,n),a=i.x,u=i.width;if(e.inline&&!o)return qi(a,n.y(),u,n.height());var c=function(t,e,n){var r=Ge(t.getContainer()),o=ea(r,".tox-editor-header").getOr(r),i=Gi(o),a=i.y()>=e.bottom(),u=tg(t)&&!a;if(t.inline&&u)return{y:Math.max(i.bottom(),n.y()),bottom:n.bottom()};if(t.inline&&!u)return{y:n.y(),bottom:Math.min(i.y(),n.bottom())};var c=Gi(r);return u?{y:Math.max(i.bottom(),n.y()),bottom:Math.min(c.bottom(),n.bottom())}:{y:Math.max(c.y(),n.y()),bottom:Math.min(i.y(),n.bottom())}}(e,r,n),s=c.y;return qi(a,s,u,c.bottom-s)},dE=function(t,e){return tt(e,(function(e){return e.predicate(t.dom())?b.some({toolbarApi:e,elem:t}):b.none()}))},mE=xo("forward-slide"),gE=xo("backward-slide"),hE=xo("change-slide-event"),pE=function(t,e){return function(n){var r=Ve(b.none()),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive).unbind;r.set(b.some(o))};return t.initialized?o():t.on("init",o),function(){return r.get().each((function(t){return t()}))}}},vE=function(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}},bE=function(t,e,n){var r=function(t,r,i,a){var u=e.shared.providers.translate(t.title);if("separator"===t.type)return b.some({type:"separator",text:u});if("submenu"===t.type){var c=q(t.getStyleItems(),(function(t){return o(t,r,a)}));return 0===r&&c.length<=0?b.none():b.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return q(t.getStyleItems(),(function(t){return o(t,r,a)}))}})}return b.some(f({type:"togglemenuitem",text:u,active:t.isSelected(a),disabled:i,onAction:n.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},o=function(t,e,o){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:r(t,e,!1,o).toArray():r(t,e,i,o).toArray()},i=function(t){var e=n.getCurrentValue(),r=n.shouldHide?0:1;return q(t,(function(t){return o(t,r,e)}))};return{validateItems:i,getFetch:function(t,e){return function(n){var r=e(),o=i(r);n(vw(o,Oh.CLOSE_ON_EXECUTE,t,!1))}}}},yE=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return I(r.data,(function(t){return XC(t,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:bE(0,e,n),getStyleItems:o}},xE=function(t,n,r){var o=yE(0,n,r),i=o.items,a=o.getStyleItems;return mw({text:r.icon.isSome()?b.none():b.some(""),icon:r.icon,tooltip:b.from(r.tooltip),role:b.none(),fetch:i.getFetch(n,a),onSetup:function(n){return r.setInitialValue.each((function(t){return t(n.getComponent())})),r.nodeChangeHandler.map((function(e){var r=e(n.getComponent());return t.on("NodeChange",r),function(){t.off("NodeChange",r)}})).getOr(e)},getApi:function(t){return{getComponent:function(){return t}}},columns:1,presets:"normal",classes:r.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",n.shared)};!function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"}(Yw||(Yw={}));var wE,CE,SE=function(t,e,n,r){return{type:"basic",data:function(t){return I(t,(function(t){var e=t,n=t,r=t.split("=");return r.length>1&&(e=r[0],n=r[1]),{title:e,format:n}}))}(function(t,e){return e===Yw.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")}(st(t.settings,e).getOr(n),r))}},kE=[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}],EE=function(t){var e=function(e){var n=U(kE,(function(e){return t.formatter.match(e.format)})).fold((function(){return"left"}),(function(t){return t.title.toLowerCase()}));yr(e,dw,{icon:"align-"+n})},n=b.some((function(t){return function(){return e(t)}})),o=b.some((function(t){return e(t)})),i={type:"basic",data:kE};return{tooltip:"Align",icon:b.some("align-left"),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:r(b.none()),getPreviewFor:function(t){return function(){return b.none()}},onAction:vE(t),setInitialValue:o,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},OE=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],_E=function(t){var e=t.split(/\s*,\s*/);return I(e,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},TE=function(t){var e=function(){var e=function(t){return t?_E(t)[0]:""},n=t.queryCommandValue("FontName"),r=i.data,o=n?n.toLowerCase():"";return{matchOpt:U(r,(function(t){var n=t.format;return n.toLowerCase()===o||e(n).toLowerCase()===e(o).toLowerCase()})).orThunk((function(){return function(t){var e;return 0===t.indexOf("-apple-system")&&(e=_E(t.toLowerCase()),G(OE,(function(t){return e.indexOf(t.toLowerCase())>-1})))}(o)?b.from({title:"System Font",format:o}):b.none()})),font:n}},n=function(t){var n=e(),r=n.font,o=n.matchOpt.fold((function(){return r}),(function(t){return t.title}));yr(t,fw,{text:o})},r=b.some((function(t){return function(){return n(t)}})),o=b.some((function(t){return n(t)})),i=SE(t,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",Yw.SemiColon);return{tooltip:"Fonts",icon:b.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getCurrentValue:function(){return e().matchOpt},getPreviewFor:function(t){return function(){return b.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},setInitialValue:o,nodeChangeHandler:r,dataset:i,shouldHide:!1,isInvalid:function(){return!1}}},zE={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},AE=function(t){var e=function(){var e=b.none(),n=u.data,r=t.queryCommandValue("FontSize");if(r)for(var o=function(t){var o=function(t,e){return/[0-9.]+px$/.test(t)?function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}(72*parseInt(t,10)/96,e||0)+"pt":t}(r,t),i=function(t){return st(zE,t).getOr("")}(o);e=U(n,(function(t){return t.format===r||t.format===o||t.format===i}))},i=3;e.isNone()&&i>=0;i--)o(i);return{matchOpt:e,size:r}},n=r(r(b.none())),o=function(t){var n=e(),r=n.size,o=n.matchOpt.fold((function(){return r}),(function(t){return t.title}));yr(t,fw,{text:o})},i=b.some((function(t){return function(){return o(t)}})),a=b.some((function(t){return o(t)})),u=SE(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",Yw.Space);return{tooltip:"Font sizes",icon:b.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getPreviewFor:n,getCurrentValue:function(){return e().matchOpt},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},setInitialValue:a,nodeChangeHandler:i,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},NE=function(t,e,n){var r=e();return tt(n,(function(e){return U(r,(function(n){return t.formatter.matchNode(e,n.format)}))})).orThunk((function(){return t.formatter.match("p")?b.some({title:"Paragraph",format:"p"}):b.none()}))},ME=function(t){var e=t.selection.getStart(!0)||t.getBody();return t.dom.getParents(e,(function(){return!0}),t.getBody())},BE=function(t){var e=function(e,n){var r=NE(t,(function(){return i.data}),e).fold((function(){return"Paragraph"}),(function(t){return t.title}));yr(n,fw,{text:r})},n=b.some((function(t){return function(n){return e(n.parents,t)}})),o=b.some((function(n){var r=ME(t);e(r,n)})),i=SE(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",Yw.SemiColon);return{tooltip:"Blocks",icon:b.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:r(b.none()),getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return b.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},onAction:vE(t),setInitialValue:o,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},RE=function(t,e){var n=function(e,n){var r=function(t){var e=t.items;return void 0!==e&&e.length>0?q(e,r):[{title:t.title,format:t.format}]},o=q($C(t),r),i=NE(t,(function(){return o}),e).fold((function(){return"Paragraph"}),(function(t){return t.title}));yr(n,fw,{text:i})},o=b.some((function(t){return function(e){return n(e.parents,t)}})),i=b.some((function(e){var r=ME(t);n(r,e)}));return{tooltip:"Formats",icon:b.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:r(b.none()),getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return void 0!==n?b.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):b.none()}},onAction:vE(t),setInitialValue:i,nodeChangeHandler:o,shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},DE=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],HE=function(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return ie(t)})).getOrDie();return e(i,r,o)}},IE={button:HE(Ok,(function(t,e){return uE(t,e.backstage.shared.providers,[])})),togglebutton:HE(Bk,(function(t,e){return cE(t,e.backstage.shared.providers,[])})),menubutton:HE(zk,(function(t,e){return yw(t,"tox-tbtn",e.backstage,b.none())})),splitbutton:HE((function(t){return ne("SplitButton",Ak,t)}),(function(t,n){return function(t,n){var r,o=xo("channel-update-split-dropdown-display"),i=function(t){return{isDisabled:function(){return xh.isDisabled(t)},setDisabled:function(e){return xh.set(t,e)},setIconFill:function(e,n){ea(t.element(),'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){fo(t,"fill",n)}))},setIconStroke:function(e,n){ea(t.element(),'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){fo(t,"stroke",n)}))},setActive:function(e){fo(t.element(),"aria-pressed",e),ea(t.element(),"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return im.set(t,e)}))}))},isActive:function(){return ea(t.element(),"span").exists((function(e){return t.getSystem().getByDom(e).exists(im.isOn)}))}}},a=Ve(e),u={getApi:i,onSetup:t.onSetup};return Zk.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:f({"aria-pressed":!1},eE(t.tooltip,n.providers))},onExecute:function(e){t.onAction(i(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:nu([(!1,xh.config({disabled:!1,disableClass:"tox-tbtn--disabled"})),Ud("split-dropdown-events",[_r(nE,$d.focus),Sh(u,a),kh(u,a)]),pb.config({})]),eventOrder:(r={},r[cr()]=["alloy.base.behaviour","split-dropdown-events"],r),toggleClass:"tox-tbtn--enabled",lazySink:n.getSink,fetch:sE(i,t,n.providers),parts:{menu:_p(0,0,t.presets)},components:[Zk.parts().button(iE(t.icon,t.text,b.none(),b.some(o),b.some([im.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),n.providers)),Zk.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:cg("chevron-down",n.providers.icons)}}),Zk.parts()["aria-descriptor"]({text:n.providers.translate("To open the popup, press Shift+Enter")})]})}(t,n.backstage.shared)})),grouptoolbarbutton:HE((function(t){return ne("GroupToolbarButton",Rk,t)}),(function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=((r={})[Uu]=tg(n)?ia.TopToBottom:ia.BottomToTop,r);switch(Zm(n)){case sf.floating:return function(t,e,n,r){var o=e.shared;return US.sketch({lazySink:o.getSink,fetch:function(){return Rv((function(e){e(I(n(t.items),bk))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:iE(t.icon,t.text,t.tooltip,b.none(),b.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})}(t,e.backstage,(function(t){return LE(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,b.none())}),i);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(t,e){return function(t,e){var n=f({type:"advanced"},e.styleselect);return xE(t,e,RE(t,n))}(t,e.backstage)},fontsizeSelectButton:function(t,e){return function(t,e){return xE(t,e,AE(t))}(t,e.backstage)},fontSelectButton:function(t,e){return function(t,e){return xE(t,e,TE(t))}(t,e.backstage)},formatButton:function(t,e){return function(t,e){return xE(t,e,BE(t))}(t,e.backstage)},alignMenuButton:function(t,e){return function(t,e){return xE(t,e,EE(t))}(t,e.backstage)}},PE={styleselect:IE.styleSelectButton,fontsizeselect:IE.fontsizeSelectButton,fontselect:IE.fontSelectButton,formatselect:IE.formatButton,align:IE.alignMenuButton},LE=function(e,n,r,o){var i=function(e){var n,r,o,i=e.toolbar;return!1===i?[]:void 0===i||!0===i?(r=e.buttons,o=I(DE,(function(t){var e=L(t.items,(function(t){return lt(r,t)||lt(PE,t)}));return{name:t.name,items:e}})),L(o,(function(t){return t.items.length>0}))):S(i)?(n=i.split("|"),I(n,(function(t){return{items:t.trim().split(" ")}}))):function(t){return z(t,(function(t){return lt(t,"name")&&lt(t,"items")}))}(i)?i:(t.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])}(n),a=I(i,(function(i){var a=q(i.items,(function(i){return 0===i.trim().length?[]:function(e,n,r,o,i,a){return st(n,r.toLowerCase()).orThunk((function(){return a.bind((function(t){return tt(t,(function(t){return st(n,t+r.toLowerCase())}))}))})).fold((function(){return st(PE,r.toLowerCase()).map((function(t){return t(e,i)})).orThunk((function(){return b.none()}))}),(function(n){return"grouptoolbarbutton"!==n.type||o?function(e,n,r){return st(IE,e.type).fold((function(){return t.console.error("skipping button defined by",e),b.none()}),(function(t){return b.some(t(e,n,r))}))}(n,i,e):(t.console.warn("Ignoring the '"+r+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),b.none())}))}(e,n.buttons,i,n.allowToolbarGroups,r,o).toArray()}));return{title:b.from(e.translate(i.name)),items:a}}));return L(a,(function(t){return t.items.length>0}))},FE={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"]},VE={maxHeightFunction:Bu(),maxWidthFunction:CS()},UE={onLtr:function(){return[Wa,qa,Ua,Fa,ja,Va,Hm,Im,Rm,Mm,Dm,Bm]},onRtl:function(){return[Wa,qa,ja,Va,Ua,Fa,Hm,Im,Dm,Bm,Rm,Mm]}},jE={onLtr:function(){return[qa,Fa,Va,Ua,ja,Wa,Hm,Im,Rm,Mm,Dm,Bm]},onRtl:function(){return[qa,Va,Fa,ja,Ua,Wa,Hm,Im,Dm,Bm,Rm,Mm]}},WE=function(t,e,n,r){var o,i,u=gn().deviceType.isTouch,c=yi((o={sink:n,onEscape:function(){return t.focus(),b.some(!0)}},i=Ve([]),Om.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){i.set([]),Om.getContent(t).each((function(t){fi(t.element(),"visibility")})),$o(t.element(),"tox-pop--resizing"),fi(t.element(),"width")},inlineBehaviours:nu([Ud("context-toolbar-events",[Rr(Wn(),(function(t,e){Om.getContent(t).each((function(t){})),$o(t.element(),"tox-pop--resizing"),fi(t.element(),"width")})),_r(hE,(function(t,e){fi(t.element(),"width");var n=Ni(t.element());Om.setContent(t,e.event().contents()),Go(t.element(),"tox-pop--resizing");var r=Ni(t.element());ri(t.element(),"width",n+"px"),Om.getContent(t).each((function(n){e.event().focus().bind((function(e){return du(e),gu(t.element())})).orThunk((function(){return Hd.focusIn(n),mu()}))})),Pm.setTimeout((function(){ri(t.element(),"width",r+"px")}),0)})),_r(mE,(function(t,e){Om.getContent(t).each((function(t){i.set(i.get().concat([{bar:t,focus:mu()}]))})),yr(t,hE,{contents:e.event().forwardContents(),focus:b.none()})})),_r(gE,(function(t,e){Z(i.get()).each((function(e){i.set(i.get().slice(0,i.get().length-1)),yr(t,hE,{contents:xi(e.bar),focus:e.focus})}))}))]),Hd.config({mode:"special",onEscape:function(t){return Z(i.get()).fold((function(){return o.onEscape()}),(function(e){return br(t,gE),b.some(!0)}))}})]),lazySink:function(){return w.value(o.sink)}}))),s=function(){return fE(t)},l=function(){if(u()&&r.backstage.isContextMenuOpen())return!0;var e,n,o,i,a,c,l=(e=p.get().map((function(t){return t.getBoundingClientRect()})).getOrThunk((function(){return t.selection.getRng().getBoundingClientRect()})),n=t.inline?Hi().top():$i(Ge(t.getBody())).y(),{y:e.top+n,bottom:e.bottom+n}),f=s();return o=l.y,i=l.bottom,a=f.y(),c=f.bottom(),!(Math.max(o,a)<=Math.min(i,c))},m=function(){Om.hide(c)},g=function(){h.get().each((function(t){var e=c.element();fi(e,"display"),l()?ri(e,"display","none"):jc.positionWithinBounds(n,t,c,b.some(s()))}))},h=Ve(b.none()),p=Ve(b.none()),v=Ve(null),y=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:nu([Hd.config({mode:"acyclic"}),Ud("pop-dialog-wrap-events",[Dr((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Hd.focusIn(e)}))})),Hr((function(e){t.shortcuts.remove("ctrl+F9")}))])])}},x=vt((function(){return n=function(t){var e=C(t);yr(c,mE,{forwardContents:y(e)})},r={},o=[],i=[],a={},u={},s=et(t=e),P(s,(function(e){var c=t[e];"contextform"===c.type?function(t,e){var c=re(ne("ContextForm",Vk,e));r[t]=c,c.launch.map((function(r){a["form:"+t]=f(f({},e.launch),{type:"contextformtogglebutton"===r.type?"togglebutton":"button",onAction:function(){n(c)}})})),"editor"===c.scope?i.push(c):o.push(c),u[t]=c}(e,c):"contexttoolbar"===c.type&&function(t,e){var n;(n=e,ne("ContextToolbar",Uk,n)).each((function(n){"editor"===e.scope?i.push(n):o.push(n),u[t]=n}))}(e,c)})),{forms:r,inNodeScope:o,inEditorScope:i,lookupTable:u,formNavigators:a};var t,n,r,o,i,a,u,s})),C=function(e){var n,o,i=t.ui.registry.getAll().buttons,u=Zm(t)===sf.scrolling?sf.scrolling:sf.default,c=x();return"contexttoolbar"===e.type?(n=f(f({},i),c.formNavigators),o=LE(t,{buttons:n,toolbar:e.items,allowToolbarGroups:!1},r,b.some(["form:"])),Sk({type:u,uid:xo("context-toolbar"),initGroups:o,onEscape:b.none,cyclicKeying:!0})):function(t,e,n){var r=e.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),o=ag(Ev.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:r,selectOnFocus:!0,inputBehaviours:nu([Hd.config({mode:"special",onEnter:function(t){return i.findPrimary(t).map((function(t){return xr(t),!0}))},onLeft:function(t,e){return e.cut(),b.none()},onRight:function(t,e){return e.cut(),b.none()}})])})),i=function(t,e,n){var r=I(e,(function(e){return ag(function(t,e,n){var r={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===e.type?function(t,e,n){var r=d(e.original,["primary"]),o=re(Bk(f(f({},r),{type:"togglebutton",onAction:function(){}})));return cE(o,n.backstage.shared.providers,[lE(t,e)])}(t,e,r):function(t,e,n){var r=d(e.original,["primary"]),o=re(Ok(f(f({},r),{type:"button",onAction:function(){}})));return uE(o,n.backstage.shared.providers,[lE(t,e)])}(t,e,r)}(t,e,n))}));return{asSpecs:function(){return I(r,(function(t){return t.asSpec()}))},findPrimary:function(t){return tt(e,(function(e,n){return e.primary?b.from(r[n]).bind((function(e){return e.getOpt(t)})).filter(a(xh.isDisabled)):b.none()}))}}}(o,e.commands,n.shared.providers);return Sk({type:t,uid:xo("context-toolbar"),initGroups:[{title:b.none(),items:[o.asSpec()]},{title:b.none(),items:i.asSpecs()}],onEscape:b.none,cyclicKeying:!0})}(u,e,r.backstage)};t.on("contexttoolbar-show",(function(e){var n=x();st(n.lookupTable,e.toolbarKey).each((function(n){S(n,e.target===t?b.none():b.some(e)),Om.getContent(c).each(Hd.focusIn)}))}));var S=function(t,e){if(E(),!u()||!r.backstage.isContextMenuOpen()){var n=C(t),o=e.map(Ge),i=function(t,e){var n="node"===t?r.backstage.shared.anchors.node(e):r.backstage.shared.anchors.cursor();return ht(n,function(t,e){return"line"===t?{bubble:Iu(12,0,FE),layouts:{onLtr:function(){return[Ga]},onRtl:function(){return[$a]}},overrides:VE}:{bubble:Iu(0,12,FE),layouts:e?jE:UE,overrides:VE}}(t,u()))}(t.position,o);h.set(b.some(i)),p.set(e);var a=c.element();fi(a,"display"),Om.showWithinBounds(c,i,y(n),(function(){return b.some(s())})),l()&&ri(a,"display","none")}},k=function(){(function(t,e){var n=Ge(e.getBody()),r=function(t){return Cn(t,n)},o=Ge(e.selection.getNode());return Sn(o,n)?b.none():dE(o,t.inNodeScope).orThunk((function(){return dE(o,t.inEditorScope).orThunk((function(){return kn(o,(function(e){return r(e)?b.none():dE(e,t.inNodeScope)}),r)}))}))})(x(),t).fold((function(){h.set(b.none()),Om.hide(c)}),(function(t){S(t.toolbarApi,b.some(t.elem.dom()))}))},E=function(){var t=v.get();null!==t&&(Pm.clearTimeout(t),v.set(null))},O=function(t){E(),v.set(t)};t.on("init",(function(){t.on("contexttoolbar-hide",m),t.on("ScrollContent ScrollWindow longpress",g),t.on("click keyup SetContent ObjectResized ResizeEditor",(function(e){O(Pm.setEditorTimeout(t,k,0))})),t.on("focusout",(function(e){Pm.setEditorTimeout(t,(function(){gu(n.element()).isNone()&&gu(c.element()).isNone()&&(h.set(b.none()),Om.hide(c))}),0)})),t.on("SwitchMode",(function(){t.readonly&&(h.set(b.none()),Om.hide(c))})),t.on("NodeChange",(function(e){gu(c.element()).fold((function(){O(Pm.setEditorTimeout(t,k,0))}),(function(t){}))}))}))},qE=Ol,GE=sl,$E=r([Me("shell",!1),ve("makeItem"),Me("setupItem",e),Ds("listBehaviours",[Vd])]),XE=al({name:"items",overrides:function(){return{behaviours:nu([Vd.config({})])}}}),KE=r([XE]),YE=Bl({name:r("CustomList")(),configFields:$E(),partFields:KE(),factory:function(e,n,r,o){var i=e.shell?{behaviours:[Vd.config({})],components:[]}:{behaviours:[],components:n};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:Rs(e.listBehaviours,i.behaviours),apis:{setItems:function(n,r){var o;(o=n,e.shell?b.some(o):bl(o,e,"items")).fold((function(){throw t.console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(t){var o=Vd.contents(t),i=r.length,a=i-o.length,u=a>0?function(t,n){for(var r=[],o=0;o<t;o++)r.push(e.makeItem());return r}(a):[],c=o.slice(i);P(c,(function(e){return Vd.remove(t,e)})),P(u,(function(e){return Vd.append(t,e)}));var s=Vd.contents(t);P(s,(function(t,o){e.setupItem(n,t,r[o],o)}))}))}}}},apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),JE=function(t){return(ci(t,"position").is("fixed")?b.none():$r(t)).orThunk((function(){var e=We("span");return Gr(t).bind((function(t){Qr(t,e);var n=$r(e);return no(e),n}))}))},ZE=function(t){return JE(t).map(Ti).getOrThunk((function(){return Oi(0,0)}))},QE=dt([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),tO=function(t,e){var n=t.element();Go(n,e.transitionClass),$o(n,e.fadeOutClass),Go(n,e.fadeInClass),e.onShow(t)},eO=function(t,e){var n=t.element();Go(n,e.transitionClass),$o(n,e.fadeInClass),Go(n,e.fadeOutClass),e.onHide(t)},nO=function(t,e,n){return G(t,(function(t){switch(t){case"bottom":return function(t,e){return t.bottom()<=e.bottom()}(e,n);case"top":return function(t,e){return t.y()>=e.y()}(e,n)}}))},rO=function(t,e){return e.getInitialPosition().map((function(e){return qi(e.bounds.x(),e.bounds.y(),Ni(t),Si(t))}))},oO=function(t,e,n){return n.getInitialPosition().bind((function(r){switch(n.setInitialPosition(b.none()),r.position){case"static":return b.some(QE.static());case"absolute":var o=JE(t).map(Gi).getOrThunk((function(){return Gi(Qo())}));return b.some(QE.absolute(pu("absolute",st(r.style,"left").map((function(t){return e.x()-o.x()})),st(r.style,"top").map((function(t){return e.y()-o.y()})),st(r.style,"right").map((function(t){return o.right()-e.right()})),st(r.style,"bottom").map((function(t){return o.bottom()-e.bottom()})))));default:return b.none()}}))},iO=function(t,e){P(["left","right","top","bottom","position"],(function(e){return fi(t.element(),e)})),e.onUndocked(t)},aO=function(t,e,n){vu(t.element(),n),("fixed"===n.position()?e.onDocked:e.onUndocked)(t)},uO=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=function(t,e){return t.y()<e.bottom()&&t.bottom()>e.y()}(i,r);a!==n.isVisible()&&(n.setVisible(a),o&&!a?(Ko(t.element(),[e.fadeOutClass]),e.onHide(t)):(a?tO:eO)(t,e))}))}))},cO=function(t,e,n){t.getSystem().isConnected()&&function(t,e,n){var r=e.lazyViewport(t),o=n.isDocked();o&&uO(t,e,n,r),function(t,e,n,r){var o=t.element();return ci(o,"position").is("fixed")?function(t,e,n,r){return rO(t,r).filter((function(t){return nO(e.modes,t,n)})).bind((function(e){return oO(t,e,r)}))}(o,e,n,r):function(t,e,n,r){var o=Gi(t);if(nO(e.modes,o,n))return b.none();!function(t,e,n){n.setInitialPosition(b.some({style:si(t),position:ai(t,"position")||"static",bounds:e}))}(t,o,r);var i=Xi(),a=o.x()-i.x(),u=n.y()-i.y(),c=i.bottom()-n.bottom(),s=o.y()<=n.y();return b.some(QE.fixed(pu("fixed",b.some(a),s?b.some(u):b.none(),b.none(),s?b.none():b.some(c))))}(o,e,n,r)}(t,e,r,n).each((function(i){n.setDocked(!o),i.fold((function(){return iO(t,e)}),(function(n){return aO(t,e,n)}),(function(o){uO(t,e,n,r,!0),aO(t,e,o)}))}))}(t,e,n)},sO=function(t,n,r){r.isDocked()&&function(t,n,r){var o=t.element();r.setDocked(!1),function(t,e){var n=t.element();return rO(n,e).bind((function(t){return oO(n,t,e)}))}(t,r).each((function(r){r.fold((function(){return iO(t,n)}),(function(e){return aO(t,n,e)}),e)})),r.setVisible(!0),n.contextual.each((function(e){Yo(o,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)})),cO(t,n,r)}(t,n,r)},lO=Object.freeze({__proto__:null,refresh:cO,reset:sO,isDocked:function(t,e,n){return n.isDocked()}}),fO=Object.freeze({__proto__:null,events:function(t,e){return kr([Rr(Wn(),(function(n,r){t.contextual.each((function(t){Xo(n.element(),t.transitionClass)&&(Yo(n.element(),[t.transitionClass,t.fadeInClass]),(e.isVisible()?t.onShown:t.onHidden)(n)),r.stop()}))})),_r(ar(),(function(n,r){cO(n,t,e)})),_r(ur(),(function(n,r){sO(n,t,e)}))])}}),dO=[Ne("contextual",[xe("fadeInClass"),xe("fadeOutClass"),xe("transitionClass"),Ce("lazyContext"),va("onShow"),va("onShown"),va("onHide"),va("onHidden")]),Pe("lazyViewport",Xi),(CE=fe,Be("modes",["top","bottom"],Gt(CE))),va("onDocked"),va("onUndocked")],mO=ou({fields:dO,name:"docking",active:fO,apis:lO,state:Object.freeze({__proto__:null,init:function(){var t=Ve(!1),e=Ve(!0),n=Ve(b.none());return Io({isDocked:function(){return t.get()},setDocked:function(e){return t.set(e)},getInitialPosition:function(){return n.get()},setInitialPosition:function(t){return n.set(t)},isVisible:function(){return e.get()},setVisible:function(t){return e.set(t)},readState:function(){return"docked:  "+t.get()+", visible: "+e.get()}})}})}),gO={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},hO=function(t,e){var n=t.element();Gr(n).each((function(r){var o="padding-"+(e?"top":"bottom");if(mO.isDocked(t)){var i=Ni(r);ri(n,"width",i+"px"),ri(r,o,function(t){return ki(t)+(parseInt(ai(t,"margin-top"),10)||0)+(parseInt(ai(t,"margin-bottom"),10)||0)}(n)+"px")}else fi(n,"width"),fi(r,o)}))},pO=function(t,e){e?($o(t,gO.fadeOutClass),Ko(t,[gO.transitionClass,gO.fadeInClass])):($o(t,gO.fadeInClass),Ko(t,[gO.fadeOutClass,gO.transitionClass]))},vO=function(t,e){var n=Ge(t.getContainer());e?(Go(n,"tox-tinymce--toolbar-sticky-on"),$o(n,"tox-tinymce--toolbar-sticky-off")):(Go(n,"tox-tinymce--toolbar-sticky-off"),$o(n,"tox-tinymce--toolbar-sticky-on"))},bO=function(t,e){var n=Ve(b.none()),r=tg(t),o=function(t){e().each((function(e){return t(e.element())}))},i=function(n){t.inline||hO(n,r),vO(t,mO.isDocked(n)),n.getSystem().broadcastOn([ms()],{}),e().each((function(t){return t.getSystem().broadcastOn([ms()],{})}))},a=t.inline?[]:function(t){var e;return[lu.config({channels:(e={},e[dk()]={onReceive:function(e){hO(e,t)}},e)})]}(r);return m([$d.config({}),mO.config({contextual:f({lazyContext:function(e){var n=ki(e.element()),o=t.inline?t.getContentAreaContainer():t.getContainer(),i=Gi(Ge(o)),a=i.height()-n,u=i.y()+(r?0:n);return b.some(qi(i.x(),u,i.width(),a))},onShow:function(){o((function(t){return pO(t,!0)}))},onShown:function(t){o((function(t){return Yo(t,[gO.transitionClass,gO.fadeInClass])})),n.get().each((function(e){var r,o,i;r=t.element(),i=jr(o=e),mu(i).filter((function(t){return!Cn(o,t)})).filter((function(t){return Cn(t,Ge(i.dom().body))||Sn(r,t)})).each((function(){return du(o)})),n.set(b.none())}))},onHide:function(t){n.set(function(t,e){return gu(t).orThunk((function(){return e().toOption().bind((function(t){return gu(t.element())}))}))}(t.element(),e)),o((function(t){return pO(t,!1)}))},onHidden:function(){o((function(t){return Yo(t,[gO.transitionClass])}))}},gO),modes:[r?"top":"bottom"],onDocked:i,onUndocked:i})],a)},yO=Object.freeze({__proto__:null,setup:function(t,e){t.inline||(tg(t)||t.on("ResizeEditor",(function(){e().each(mO.reset)})),t.on("ResizeWindow ResizeEditor",(function(){e().each((function(e){return hO(e,tg(t))}))})),t.on("SkinLoaded",(function(){e().each((function(t){mO.isDocked(t)?mO.reset(t):mO.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){e().each(mO.reset)}))),t.on("AfterScrollIntoView",(function(t){e().each((function(e){mO.refresh(e);var n=e.element();zf(n)&&function(t,e){var n=jr(e),r=n.dom().defaultView.innerHeight,o=Hi(n),i=Ge(t.elm),a=$i(i),u=Si(i),c=a.y(),s=c+u,l=Ti(e),f=Si(e),d=l.top(),m=d+f,g=Math.abs(d-o.top())<2,h=Math.abs(m-(o.top()+r))<2;if(g&&c<m)Ii(o.left(),c-f,n);else if(h&&s>d){var p=c-r+u+f;Ii(o.left(),p,n)}}(t,n)}))})),t.on("PostRender",(function(){vO(t,!1)}))},isDocked:function(t){return t().map(mO.isDocked).getOr(!1)},getBehaviours:bO}),xO=e,wO=c,CO=r([]),SO=Object.freeze({__proto__:null,setup:xO,isDocked:wO,getBehaviours:CO}),kO=Ml({factory:function(t,e){var n={focus:Hd.focusIn,setMenus:function(t,n){var r=I(n,(function(t){var n=zk({type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}}).mapError((function(t){return ie(t)})).getOrDie();return yw(n,"tox-mbtn",e.backstage,b.some("menuitem"))}));Vd.set(t,r)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:nu([Vd.config({}),Ud("menubar-events",[Dr((function(e){t.onSetup(e)})),_r(Hn(),(function(t,e){ea(t.element(),".tox-mbtn--active").each((function(n){na(e.event().target(),".tox-mbtn").each((function(e){Cn(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){hb.expand(t),hb.close(n),$d.focus(t)}))}))}))}))})),_r(dr(),(function(t,e){e.event().prevFocus().bind((function(e){return t.getSystem().getByDom(e).toOption()})).each((function(n){e.event().newFocus().bind((function(e){return t.getSystem().getByDom(e).toOption()})).each((function(t){hb.isOpen(n)&&(hb.expand(t),hb.close(n))}))}))}))]),Hd.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),b.some(!0)}}),Xv.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[ve("dom"),ve("uid"),ve("onEscape"),ve("backstage"),Me("onSetup",e)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),EO=[Ms("slotBehaviours",[])],OO=function(t){return"<alloy.field."+t+">"},_O=function(t,e){var n,r=function(e){return Cl(t)},o=function(e,n){return function(r,o){return bl(r,t,o).map((function(t){return e(t,o)})).getOr(n)}},i=function(t,e){return"true"!==mo(t.element(),"aria-hidden")},a=o(i,!1),u=o((function(t,e){if(i(t)){var n=t.element();ri(n,"display","none"),fo(n,"aria-hidden","true"),yr(t,mr(),{name:e,visible:!1})}})),c=(n=u,function(t,e){P(e,(function(e){return n(t,e)}))}),s=o((function(t,e){if(!i(t)){var n=t.element();fi(n,"display"),ho(n,"aria-hidden"),yr(t,mr(),{name:e,visible:!0})}})),l={getSlotNames:r,getSlot:function(e,n){return bl(e,t,n)},isShowing:a,hideSlot:u,hideAllSlots:function(t){return c(t,r())},showSlot:s};return{uid:t.uid,dom:t.dom,components:e,behaviours:Bs(t.slotBehaviours),apis:l}},TO=ot({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},(function(t){return Do(t)})),zO=f(f({},TO),{sketch:function(t){var e=function(){var t=[];return{slot:function(e,n){return t.push(e),ml("container",OO(e),n)},record:function(){return t}}}(),n=t(e),r=e.record(),o=I(r,(function(t){return ol({name:t,pname:OO(t)})}));return Tl("container",EO,o,_O,n)}}),AO=qt([ze("icon"),ze("tooltip"),Pe("onShow",e),Pe("onHide",e),Pe("onSetup",(function(){return e}))]),NO=function(t){return{element:function(){return t.element().dom()}}},MO=function(t,n){var r=I(et(n),(function(t){var e=re(ne("sidebar",AO,n[t]));return{name:t,getApi:NO,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}}));return I(r,(function(n){var o=Ve(e);return t.slot(n.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Dg([Sh(n,o),kh(n,o),_r(mr(),(function(t,e){var n=e.event();U(r,(function(t){return t.name===n.name()})).each((function(e){(n.visible()?e.onShow:e.onHide)(e.getApi(t))}))}))])})}))},BO=function(t){return zO.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:MO(e,t),slotBehaviours:Dg([Dr((function(t){return zO.hideAllSlots(t)}))])}}))},RO=function(t){return Pl.getCurrent(t).bind((function(t){return uk.isGrowing(t)||uk.hasGrown(t)?Pl.getCurrent(t).bind((function(t){return U(zO.getSlotNames(t),(function(e){return zO.isShowing(t,e)}))})):b.none()}))},DO=xo("FixSizeEvent"),HO=xo("AutoSizeEvent"),IO=function(t){var e=je(t),n=Xr(e),r=function(t){var e=void 0!==t.dom().attributes?t.dom().attributes:[];return V(e,(function(t,e){var n;return"class"===e.name?t:f(f({},t),((n={})[e.name]=e.value,n))}),{})}(e),o=function(t){return Array.prototype.slice.call(t.dom().classList,0)}(e),i=0===n.length?{}:{innerHtml:oo(e)};return f({tag:ao(e),classes:o,attributes:r},i)},PO=function(t){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:IO('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:nu([Hd.config({mode:"special",onTab:function(){return b.some(!0)},onShiftTab:function(){return b.some(!0)}}),$d.config({})])}},LO=GE.optional({factory:kO,name:"menubar",schema:[ve("backstage")]}),FO=GE.optional({factory:{sketch:function(t){return YE.sketch({uid:t.uid,dom:t.dom,listBehaviours:nu([Hd.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Sk({type:t.type,uid:xo("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],onEscape:function(){return b.none()}})},setupItem:function(t,e,n,r){TS.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[ve("dom"),ve("onEscape")]}),VO=GE.optional({factory:{sketch:function(t){return function(t){return t.type===sf.sliding?Ck:t.type===sf.floating?wk:Sk}(t)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),b.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,backstage:t.backstage,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[ve("dom"),ve("onEscape"),ve("getSink")]}),UO=GE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:t.dom,components:t.components,behaviours:nu((t.sticky?bO:CO)(t.editor,t.getSink))}}},name:"header",schema:[ve("dom")]}),jO=GE.optional({name:"socket",schema:[ve("dom")]}),WO=GE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:nu([Xv.config({}),$d.config({}),uk.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){Pl.getCurrent(t).each(zO.hideAllSlots),br(t,HO)},onGrown:function(t){br(t,HO)},onStartGrow:function(t){yr(t,DO,{width:ci(t.element(),"width").getOr("")})},onStartShrink:function(t){yr(t,DO,{width:Ni(t.element())+"px"})}}),Vd.config({}),Pl.config({find:function(t){var e=Vd.contents(t);return J(e)}})])}],behaviours:nu([mx(0),Ud("sidebar-sliding-events",[_r(DO,(function(t,e){ri(t.element(),"width",e.event().width())})),_r(HO,(function(t,e){fi(t.element(),"width")}))])])}}},name:"sidebar",schema:[ve("dom")]}),qO=GE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:nu([Vd.config({})]),components:[]}}},name:"throbber",schema:[ve("dom")]}),GO=Bl({name:"OuterContainer",factory:function(t,e,n){return{uid:t.uid,dom:t.dom,components:e,apis:{getSocket:function(e){return qE.getPart(e,t,"socket")},setSidebar:function(e,n){qE.getPart(e,t,"sidebar").each((function(t){return function(t,e){Pl.getCurrent(t).each((function(t){return Vd.set(t,[BO(e)])}))}(t,n)}))},toggleSidebar:function(e,n){qE.getPart(e,t,"sidebar").each((function(t){return function(t,e){Pl.getCurrent(t).each((function(t){Pl.getCurrent(t).each((function(n){uk.hasGrown(t)?zO.isShowing(n,e)?uk.shrink(t):(zO.hideAllSlots(n),zO.showSlot(n,e)):(zO.hideAllSlots(n),zO.showSlot(n,e),uk.grow(t))}))}))}(t,n)}))},whichSidebar:function(e){return qE.getPart(e,t,"sidebar").bind(RO).getOrNull()},getHeader:function(e){return qE.getPart(e,t,"header")},getToolbar:function(e){return qE.getPart(e,t,"toolbar")},setToolbar:function(e,n){qE.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){qE.getPart(e,t,"multiple-toolbar").each((function(t){YE.setItems(t,n)}))},refreshToolbar:function(e){qE.getPart(e,t,"toolbar").each((function(t){return t.getApis().refresh(t)}))},getThrobber:function(e){return qE.getPart(e,t,"throbber")},focusToolbar:function(e){qE.getPart(e,t,"toolbar").orThunk((function(){return qE.getPart(e,t,"multiple-toolbar")})).each((function(t){Hd.focusIn(t)}))},setMenubar:function(e,n){qE.getPart(e,t,"menubar").each((function(t){kO.setMenus(t,n)}))},focusMenubar:function(e){qE.getPart(e,t,"menubar").each((function(t){kO.focus(t)}))}},behaviours:t.behaviours}},configFields:[ve("dom"),ve("behaviours")],partFields:[UO,LO,VO,FO,jO,WO,qO],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=I(n,(function(t){return bk(t)}));t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=I(n,(function(t){return I(t,bk)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),$O={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},XO=function(t){return"string"==typeof t?t.split(" "):t},KO=function(t,e){var n=f(f({},$O),e.menus),r=et(e.menus).length>0,o=XO(void 0===e.menubar||!0===e.menubar?"file edit view insert format tools table help":!1===e.menubar?"":e.menubar),i=L(o,(function(t){return r&&e.menus.hasOwnProperty(t)&&e.menus[t].hasOwnProperty("items")||$O.hasOwnProperty(t)})),a=I(i,(function(r){var o=n[r];return function(t,e,n){var r=function(t){return t.getParam("removed_menuitems","")}(n).split(/[ ,]/);return{text:t.title,getItems:function(){return q(t.items,(function(t){var n=t.toLowerCase();return 0===n.trim().length||D(r,(function(t){return t===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]}))}}}({title:o.title,items:XO(o.items)},e,t)}));return L(a,(function(t){return t.getItems().length>0&&D(t.getItems(),(function(t){return"separator"!==t.type}))}))},YO=function(t){var e=function(){t._skinLoaded=!0,function(t){t.fire("SkinLoaded")}(t)};return function(){t.initialized?e():t.on("init",e)}},JO=function(t,e){var n,r=function(t){var e=t.settings,n=e.skin,r=e.skin_url;if(!1!==n){var o=n||"oxide";r=r?t.documentBaseURI.toAbsolute(r):Fm.baseURL+"/skins/ui/"+o}return r}(e);r&&(n=r+"/skin.min.css",e.contentCSS.push(r+(t?"/content.inline":"/content")+".min.css")),!1===function(t){return!1===t.getParam("skin")}(e)&&n?Lm.DOM.styleSheetLoader.load(n,YO(e),function(t,e){return function(){return function(t,e){return t.fire("SkinLoadError",e)}(t,{message:"Skin could not be loaded"})}}(e)):YO(e)()},ZO=i(JO,!1),QO=i(JO,!0),t_=function(t,e,n,r){var o=e.outerContainer,i=n.toolbar,a=n.buttons;if(z(i,S)){var u=i.map((function(e){return LE(t,{toolbar:e,buttons:a,allowToolbarGroups:n.allowToolbarGroups},{backstage:r},b.none())}));GO.setToolbars(o,u)}else GO.setToolbar(o,LE(t,n,{backstage:r},b.none()))},e_=Lm.DOM,n_=gn(),r_=n_.os.isiOS()&&n_.os.version.major<=12,o_={render:function(e,n,r,o,i){var a=Ve(0);ZO(e),function(t,e){ts(t,e,Jr)}(Ge(i.targetNode),n.mothership),Qc(Qo(),n.uiMothership),e.on("PostRender",(function(){t_(e,n,r,o),a.set(e.getWin().innerWidth),GO.setMenubar(n.outerContainer,KO(e,r)),GO.setSidebar(n.outerContainer,r.sidebar),function(t){var e=t.getWin(),n=t.getDoc().documentElement,r=Ve(Oi(e.innerWidth,e.innerHeight)),o=Ve(Oi(n.offsetWidth,n.offsetHeight)),i=function(n){var i=t.getDoc().documentElement,a=r.get(),u=o.get();a.left()!==e.innerWidth||a.top()!==e.innerHeight?(r.set(Oi(e.innerWidth,e.innerHeight)),lp(t,n)):u.left()===i.offsetWidth&&u.top()===i.offsetHeight||(o.set(Oi(i.offsetWidth,i.offsetHeight)),lp(t,n))},a=function(e){return function(t,e){return t.fire("ScrollContent",e)}(t,e)};e_.bind(e,"resize",i),e_.bind(e,"scroll",a);var u=$p(Ge(t.getBody()),"load",i);t.on("remove",(function(){u.unbind(),e_.unbind(e,"resize",i),e_.unbind(e,"scroll",a)}))}(e)}));var u,c,s=GO.getSocket(n.outerContainer).getOrDie("Could not find expected socket element");if(!0===r_){oi(s.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=(u=function(){e.fire("ScrollContent")},c=null,{cancel:function(){null!==c&&(t.clearTimeout(c),c=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null===c&&(c=t.setTimeout((function(){u.apply(null,e),c=null}),20))}});Gp(s.element(),"scroll",l.throttle)}hk(e,n),e.addCommand("ToggleSidebar",(function(t,r){GO.toggleSidebar(n.outerContainer,r),e.fire("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(function(){return GO.whichSidebar(n.outerContainer)}));var f=Zm(e);return f!==sf.sliding&&f!==sf.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(function(){var t=e.getWin().innerWidth;t!==a.get()&&(GO.refreshToolbar(n.outerContainer),a.set(t))})),{iframeContainer:s.element().dom(),editorContainer:n.outerContainer.element().dom()}}},i_=function(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return t>e}));return r.or(o).getOr(t)},a_=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?b.some(parseInt(""+t,10)):b.none()},u_=function(t){return T(t)?t+"px":t},c_=function(t){var e=Um(t),n=jm(t),r=qm(t);return a_(e).map((function(t){return i_(t,n,r)}))},s_=function(t,e){var n=Gi(t);return e?n.y():n.bottom()},l_={render:function(t,e,n,r,o){var i,a=Lm.DOM,u=ng(t),c=og(t),s=Ge(o.targetNode),l=qm(t).or(c_(t)),f=Zm(t),d=f===sf.floating,m=f===sf.sliding||d,g=tg(t),h=Ve(s_(s,g)),p=Ve(!1);QO(t);var v=function(t){void 0===t&&(t=!1),m&&GO.refreshToolbar(e.outerContainer),u||function(t){var n=m?t.fold((function(){return 0}),(function(t){return t.components().length>1?Si(t.components()[1].element()):0})):0,r=Gi(s),o=g?r.y()-Si(i.element())+n:r.bottom();oi(e.outerContainer.element(),{position:"absolute",top:Math.round(o)+"px",left:Math.round(r.x())+"px"});var a=l.getOrThunk((function(){var t=a_(ai(Qo(),"margin-left")).getOr(0);return Ni(Qo())-r.x()+t}));ri(i.element(),"max-width",a+"px")}(GO.getToolbar(e.outerContainer)),c&&(t?mO.reset(i):mO.refresh(i)),d&&GO.getToolbar(e.outerContainer).each((function(t){qS.reposition(t)}))},b=function(){p.set(!0),ri(e.outerContainer.element(),"display","flex"),a.addClass(t.getBody(),"mce-edit-focus"),fi(e.uiMothership.element(),"display"),v()},y=function(){p.set(!1),e.outerContainer&&(ri(e.outerContainer.element(),"display","none"),a.removeClass(t.getBody(),"mce-edit-focus")),ri(e.uiMothership.element(),"display","none")},x=function(){if(i)b();else{i=GO.getHeader(e.outerContainer).getOrDie();var o=function(t){return eg(t).getOr(Qo())}(t);Qc(o,e.mothership),Qc(o,e.uiMothership),t_(t,e,n,r),GO.setMenubar(e.outerContainer,KO(t,n)),b(),t.on("activate",b),t.on("deactivate",y),t.on("SkinLoaded ResizeWindow",(function(){p.get()&&v(!0)})),t.on("NodeChange keydown",(function(){Pm.requestAnimationFrame((function(){var t=s_(s,g);p.get()&&t!==h.get()&&(v(!0),h.set(t))}))})),t.nodeChanged()}};return t.on("focus",x),t.on("blur hide",y),t.on("init",(function(){t.hasFocus()&&x()})),hk(t,e),{editorContainer:e.outerContainer.element().dom()}}},f_=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},d_=function(t,e,n){var r=function(){return!!e.undoManager&&e.undoManager[n]()},o=function(){t.setDisabled(e.readonly||!r())};return t.setDisabled(!r()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o),function(){return e.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o)}},m_=function(t,e){(function(t){qw.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,onAction:function(){return t.execCommand(e.cmd)},icon:e.icon,onSetup:pE(t,e.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",onAction:function(){return t.execCommand("JustifyNone")},icon:"align-none"})})(t),function(t){(function(t){!function(t){qw.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:pE(t,e.name),onAction:f_(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:pE(t,n),onAction:f_(t,n)})}}(t),function(t){qw.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:function(){return t.execCommand(e.action)}})}))}(t),function(t){qw.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:function(){return t.execCommand(e.action)},onSetup:pE(t,e.name)})}))}(t)})(t),function(t){qw.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:function(){return t.execCommand(e.action)}})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:f_(t,"code")})}(t)}(t),function(t,e){!function(t,e){var n=yE(0,e,EE(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=yE(0,e,TE(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=f({type:"advanced"},e.styleselect),r=yE(0,e,RE(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})}(t,e),function(t,e){var n=yE(0,e,BE(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=yE(0,e,AE(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e)}(t,e),function(t){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(e){return d_(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(e){return d_(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(t),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(e){return d_(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(e){return d_(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(t)}(t),wp.register(t),function(t){!function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return t.execCommand("mceToggleVisualAid")}})}(t),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(e){return function(t,e){t.setActive(e.hasVisual);var n=function(e){t.setActive(e.hasVisual)};return e.on("VisualAid",n),function(){return e.off("VisualAid",n)}}(e,t)},onAction:function(){t.execCommand("mceToggleVisualAid")}})}(t)}(t),function(t){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(e){return function(t,e){t.setDisabled(!e.queryCommandState("outdent"));var n=function(){t.setDisabled(!e.queryCommandState("outdent"))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}(e,t)},onAction:function(){return t.execCommand("outdent")}}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return t.execCommand("indent")}})}(t)}(t)},g_=function(t,e){return{anchor:"makeshift",x:t,y:e}},h_=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},p_=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?function(t){if(h_(t)){var e=t.touches[0];return g_(e.pageX,e.pageY)}return g_(t.pageX,t.pageY)}(e):function(t,e){var n=Lm.DOM.getPos(t);return function(t,e,n){return g_(t.x+e,t.y+n)}(e,n.x,n.y)}(t.getContentAreaContainer(),function(t){if(h_(t)){var e=t.touches[0];return g_(e.clientX,e.clientY)}return g_(t.clientX,t.clientY)}(e)):v_(t)},v_=function(t){return{anchor:"selection",root:Ge(t.selection.getNode())}},b_=function(t){return{anchor:"node",node:b.some(Ge(t.selection.getNode())),root:Ge(t.getBody())}},y_=function(t,e,n,r,o,i){var a=n(),u=function(t,e,n){return n?b_(t):p_(t,e)}(t,e,i);vw(a,Oh.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),Om.showMenuAt(o,u,{menu:{markers:kp("normal")},data:t})}))},x_={onLtr:function(){return[qa,Fa,Va,Ua,ja,Wa,Hm,Im,Rm,Mm,Dm,Bm]},onRtl:function(){return[qa,Va,Fa,ja,Ua,Wa,Hm,Im,Dm,Bm,Rm,Mm]}},w_={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"]},C_=function(t,e,n,r,o,i){var a=gn(),u=a.os.isiOS(),c=a.os.isOSX(),s=a.os.isAndroid(),l=a.deviceType.isTouch(),d=function(){var a=n();!function(t,e,n,r,o,i,a){var u=function(t,e,n){var r=e?b_(t):p_(t,n);return f({bubble:Iu(0,12,w_),layouts:x_,overrides:{maxWidthFunction:CS(),maxHeightFunction:Bu()}},r)}(t,i,e);vw(n,Oh.CLOSE_ON_EXECUTE,r,!0).map((function(n){e.preventDefault(),Om.showMenuWithinBounds(o,u,{menu:{markers:kp("normal"),highlightImmediately:a},data:n,type:"horizontal"},(function(){return b.some(fE(t))})),t.fire("contexttoolbar-hide")}))}(t,e,a,r,o,i,!(s||u||c&&l))};if(!c&&!u||i)s&&!i&&t.selection.setCursorLocation(e.target,0),d();else{var m=function(){!function(t){var e=t.selection.getRng(),n=function(){Pm.setEditorTimeout(t,(function(){t.selection.setRng(e)}),10),i()};t.once("touchend",n);var r=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",r,!0);var o=function(){return i()};t.once("longpresscancel",o);var i=function(){t.off("touchend",n),t.off("longpresscancel",o),t.off("mousedown",r)}}(t),d()};!function(t,e){var n=t.selection;if(n.isCollapsed()||e.touches.length<1)return!1;var r=e.touches[0],o=n.getRng();return sc(t.getWin(),Ju.domRange(o)).exists((function(t){return t.left()<=r.clientX&&t.right()>=r.clientX&&t.top()<=r.clientY&&t.bottom()>=r.clientY}))}(t,e)?(t.once("selectionchange",m),t.once("touchend",(function(){return t.off("selectionchange",m)}))):m()}},S_=function(t){return"string"==typeof t?t.split(/[ ,]/):t},k_=function(t){return t.settings.contextmenu_never_use_native||!1},E_=function(t){return S(t)?"|"===t:"separator"===t.type},O_={type:"separator"},__=function(t){if(S(t))return t;switch(t.type){case"separator":return O_;case"submenu":return{type:"nestedmenuitem",text:t.text,icon:t.icon,getSubmenuItems:function(){var e=t.getSubmenuItems();return S(e)?e:I(e,__)}};default:return{type:"menuitem",text:t.text,icon:t.icon,onAction:(e=t.onAction,function(){return e()})}}var e},T_=function(t,e){if(0===e.length)return t;var n=Z(t).filter((function(t){return!E_(t)})).fold((function(){return[]}),(function(t){return[O_]}));return t.concat(n).concat(e).concat([O_])},z_=function(t,e,n){var r=gn().deviceType.isTouch,o=yi(Om.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:nu([Ud("dismissContextMenu",[_r(lr(),(function(e,n){fs.close(e),t.focus()}))])])})),i=function(t){return Om.hide(o)},a=function(e){if(k_(t)&&e.preventDefault(),!function(t,e){return e.ctrlKey&&!k_(t)}(t,e)&&!function(t){return!1===t.getParam("contextmenu")}(t)){var i=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}(t,e);(r()?C_:y_)(t,e,(function(){var n=i?t.selection.getStart(!0):e.target,r=t.ui.registry.getAll(),o=function(t){return function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return st(t.settings,"contextmenu").map(S_).getOrThunk((function(){return L(S_("link linkchecker image imagetools table spellchecker configurepermanentpen"),(function(t){return lt(r,t)}))}))}(t)}(t);return function(t,e,n){var r=V(e,(function(e,r){if(lt(t,r)){var o=t[r].update(n);if(S(o))return T_(e,o.split(" "));if(o.length>0){var i=I(o,__);return T_(e,i)}return e}return e.concat([r])}),[]);return r.length>0&&E_(r[r.length-1])&&r.pop(),r}(r.contextMenus,o,n)}),n,o,i)}};t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");t.on(e,i),t.on("longpress contextmenu",a)}))},A_=dt([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),N_=function(t){return function(e){return e.translate(-t.left(),-t.top())}},M_=function(t){return function(e){return e.translate(t.left(),t.top())}},B_=function(t){return function(e,n){return V(t,(function(t,e){return e(t)}),Oi(e,n))}},R_=function(t,e,n){return t.fold(B_([M_(n),N_(e)]),B_([N_(e)]),B_([]))},D_=function(t,e,n){return t.fold(B_([M_(n)]),B_([]),B_([M_(e)]))},H_=function(t,e,n){return t.fold(B_([]),B_([N_(n)]),B_([M_(e),N_(n)]))},I_=function(t,e,n){var r=t.fold((function(t,e){return{position:b.some("absolute"),left:b.some(t+"px"),top:b.some(e+"px")}}),(function(t,e){return{position:b.some("absolute"),left:b.some(t-n.left()+"px"),top:b.some(e-n.top()+"px")}}),(function(t,e){return{position:b.some("fixed"),left:b.some(t+"px"),top:b.some(e+"px")}}));return f({right:b.none(),bottom:b.none()},r)},P_=function(t,e,n,r){var o=function(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left()),a.getOr(u.top()))}};return t.fold(o(H_,L_),o(D_,F_),o(R_,V_))},L_=A_.offset,F_=A_.absolute,V_=A_.fixed,U_=function(t,e,n,o){return tt(t,(function(t){var i=t.sensor();return function(t,e,n,r,o,i){var a=D_(t,o,i),u=D_(e,o,i);return Math.abs(a.left()-u.left())<=n&&Math.abs(a.top()-u.top())<=r}(e,i,t.range().left(),t.range().top(),n,o)?b.some({output:r(P_(t.output(),e,n,o)),extra:t.extra}):b.none()}))},j_=function(t,e,n,o,i){var a=e.getSnapPoints(t);return U_(a,n,o,i).orThunk((function(){return V(a,(function(t,e){var r=e.sensor(),a=function(t,e,n,r,o,i){var a=D_(t,o,i),u=D_(e,o,i),c=Math.abs(a.left()-u.left()),s=Math.abs(a.top()-u.top());return Oi(c,s)}(n,r,e.range().left(),e.range().top(),o,i);return t.deltas.fold((function(){return{deltas:b.some(a),snap:b.some(e)}}),(function(n){return(a.left()+a.top())/2<=(n.left()+n.top())/2?{deltas:b.some(a),snap:b.some(e)}:t}))}),{deltas:b.none(),snap:b.none()}).snap.map((function(t){return{output:r(P_(t.output(),n,o,i)),extra:t.extra}}))}))},W_=function(t,e,n,r,o){var i=e.getSnapPoints(t);return U_(i,n,r,o)},q_=Object.freeze({__proto__:null,snapTo:function(t,e,n,r){var o=e.getTarget(t.element());if(e.repositionTarget){var i=jr(t.element()),a=Hi(i),u=ZE(o),c=function(t,e,n){return{coord:P_(t.output(),t.output(),e,n),extra:t.extra()}}(r,a,u),s=I_(c.coord,0,u);ii(o,s)}}}),G_=function(t,e){t.getSystem().addToGui(e),function(t){Gr(t.element()).filter(co).each((function(e){ci(e,"z-index").each((function(t){fo(e,"data-initial-z-index",t)})),ri(e,"z-index",ai(t.element(),"z-index"))}))}(e)},$_=function(t){!function(t){Gr(t.element()).filter(co).each((function(t){var e=mo(t,"data-initial-z-index");go(t,"data-initial-z-index")?ri(t,"z-index",e):fi(t,"z-index"),ho(t,"data-initial-z-index")}))}(t),t.getSystem().removeFromGui(t)},X_=function(t,e,n){return t.getSystem().build(uv.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},K_=Ne("snaps",[ve("getSnapPoints"),va("onSensor"),ve("leftAttr"),ve("topAttr"),Me("lazyViewport",Xi),Me("mustSnap",!1)]),Y_=[Me("useFixed",c),ve("blockerClass"),Me("getTarget",o),Me("onDrag",e),Me("repositionTarget",!0),Me("onDrop",e),Pe("getBounds",Xi),K_],J_=function(t,e){return{bounds:t.getBounds(),height:ki(e.element()),width:Mi(e.element())}},Z_=function(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return J_(e,t)}));i.each((function(n){!function(t,e,n,r){var o=e.getTarget(t.element());if(e.repositionTarget){var i=jr(t.element()),a=Hi(i),u=ZE(o),c=function(t){return(e=ci(t,"left"),n=ci(t,"top"),r=ci(t,"position"),o=function(t,e,n){return("fixed"===n?V_:L_)(parseInt(t,10),parseInt(e,10))},e.isSome()&&n.isSome()&&r.isSome()?b.some(o(e.getOrDie(),n.getOrDie(),r.getOrDie())):b.none()).getOrThunk((function(){var e=Ti(t);return F_(e.left(),e.top())}));var e,n,r,o}(o),s=function(t,e,n,r,o,i,a){return function(t,e,n,r,o){var i=o.bounds,a=D_(e,n,r),u=_u(a.left(),i.x(),i.x()+i.width()-o.width),c=_u(a.top(),i.y(),i.y()+i.height()-o.height),s=F_(u,c);return e.fold((function(){var t=H_(s,n,r);return L_(t.left(),t.top())}),(function(){return s}),(function(){var t=R_(s,n,r);return V_(t.left(),t.top())}))}(0,e.fold((function(){var t,e,a,u=(t=n,e=i.left(),a=i.top(),t.fold((function(t,n){return L_(t+e,n+a)}),(function(t,n){return F_(t+e,n+a)}),(function(t,n){return V_(t+e,n+a)}))),c=R_(u,r,o);return V_(c.left(),c.top())}),(function(e){var a=function(t,e,n,r,o,i){var a=function(t,e,n,r){return function(t,e){var n=t.element(),r=parseInt(mo(n,e.leftAttr),10),o=parseInt(mo(n,e.topAttr),10);return isNaN(r)||isNaN(o)?b.none():b.some(Oi(r,o))}(t,e).fold((function(){return n}),(function(t){return V_(t.left()+r.left(),t.top()+r.top())}))}(t,e,n,r),u=e.mustSnap?j_(t,e,a,o,i):W_(t,e,a,o,i),c=R_(a,o,i);return function(t,e,n){var r=t.element();fo(r,e.leftAttr,n.left()+"px"),fo(r,e.topAttr,n.top()+"px")}(t,e,c),u.fold((function(){return{coord:V_(c.left(),c.top()),extra:b.none()}}),(function(t){return{coord:t.output(),extra:t.extra()}}))}(t,e,n,i,r,o);return a.extra.each((function(n){e.onSensor(t,n)})),a.coord})),r,o,a)}(t,e.snaps,c,a,u,r,n),l=I_(s,0,u);ii(o,l)}e.onDrag(t,o,r)}(t,e,a,n)}))},Q_=function(t,e,n,r){e.each($_),n.snaps.each((function(e){!function(t,e){!function(t,e){var n=t.element();ho(n,e.leftAttr),ho(n,e.topAttr)}(t,e)}(t,e)}));var o=n.getTarget(t.element());r.reset(),n.onDrop(t,o)},tT=function(t){return function(e,n){var r=function(t){n.setStartData(J_(e,t))};return kr(m([_r(ar(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r)))}},eT=Object.freeze({__proto__:null,getData:function(t){return b.from(Oi(t.x(),t.y()))},getDelta:function(t,e){return Oi(e.left()-t.left(),e.top()-t.top())}}),nT=function(t,e,n){return[_r(Mn(),(function(r,o){if(0===o.event().raw().button){o.stop();var i=function(){return Q_(r,b.some(u),t,e)},a=Yp(i,200),u=X_(r,t.blockerClass,(c={drop:i,delayDrop:a.schedule,forceDrop:i,move:function(n){a.cancel(),Z_(r,t,e,eT,n)}},kr([_r(Mn(),c.forceDrop),_r(Dn(),c.drop),_r(Bn(),(function(t,e){c.move(e.event())})),_r(Rn(),c.delayDrop)])));n(r),G_(r,u)}var c}))]},rT=m(Y_,[wa("dragger",{handlers:tT(nT)})]),oT=Object.freeze({__proto__:null,getData:function(t){var e=t.raw().touches;return 1===e.length?function(t){var e=t[0];return b.some(Oi(e.clientX,e.clientY))}(e):b.none()},getDelta:function(t,e){return Oi(e.left()-t.left(),e.top()-t.top())}}),iT=function(t,e,n){var r=Ve(b.none());return[_r(Tn(),(function(o,i){i.stop();var a,u=function(){Q_(o,r.get(),t,e),r.set(b.none())},c=X_(o,t.blockerClass,(a={drop:u,delayDrop:function(){},forceDrop:u,move:function(n){Z_(o,t,e,oT,n)}},kr([_r(Tn(),a.forceDrop),_r(An(),a.drop),_r(Nn(),a.drop),_r(zn(),(function(t,e){a.move(e.event())}))])));r.set(b.some(c)),n(o),G_(o,c)})),_r(zn(),(function(n,r){r.stop(),Z_(n,t,e,oT,r.event())})),_r(An(),(function(n,o){o.stop(),Q_(n,r.get(),t,e),r.set(b.none())})),_r(Nn(),(function(n){Q_(n,r.get(),t,e),r.set(b.none())}))]},aT=m(Y_,[wa("dragger",{handlers:tT(iT)})]),uT=m(Y_,[wa("dragger",{handlers:tT((function(t,e,n){return m(nT(t,e,n),iT(t,e,n))}))})]),cT=Object.freeze({__proto__:null,mouse:rT,touch:aT,mouseOrTouch:uT}),sT=Object.freeze({__proto__:null,init:function(){var t=b.none(),e=b.none(),n=r({});return Io({readState:n,reset:function(){t=b.none(),e=b.none()},update:function(e,n){return e.getData(n).bind((function(n){return function(e,n){var r=t.map((function(t){return e.getDelta(t,n)}));return t=b.some(n),r}(e,n)}))},getStartData:function(){return e},setStartData:function(t){e=b.some(t)}})}}),lT=au({branchKey:"mode",branches:cT,name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:Ur(["sensor","range","output"],["extra"])},state:sT,apis:q_}),fT=gn(),dT=function(t,e,n,r,o,i){return t.fold((function(){return lT.snap({sensor:F_(n-20,r-20),range:Oi(o,i),output:F_(b.some(n),b.some(r)),extra:{td:e}})}),(function(t){var o=n-20,i=r-20,a=t.element().dom().getBoundingClientRect();return lT.snap({sensor:F_(o,i),range:Oi(40,40),output:F_(b.some(n-a.width/2),b.some(r-a.height/2)),extra:{td:e}})}))},mT=function(t,e,n){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,r){var o=r.td;(function(t,e){return t.exists((function(t){return Cn(t,e)}))})(e.get(),o)||(e.set(b.some(o)),n(o))},mustSnap:!0}},gT=function(t){return ag(ig.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:nu([lT.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),pb.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))};!function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"}(wE||(wE={}));var hT,pT=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},vT=function(t,e){return{dom:{tag:"div",classes:["tox-statusbar"]},components:function(){var n=function(){var n,r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(function(t,e){return e.delimiter||(e.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:nu([Hd.config({mode:"flow",selector:"div[role=button]"}),Xv.config({}),Vd.config({}),Ud("elementPathEvents",[Dr((function(n,r){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Hd.focusIn(n)})),t.on("NodeChange",(function(r){var o,i,a=function(e){for(var n=[],r=e.length;r-- >0;){var o=e[r];if(1===o.nodeType&&!pT(o)){var i=t.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n}(r.parents);Vd.set(n,a.length>0?(o=I(a||[],(function(e,n){return ig.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":n,"tab-index":-1,"aria-level":n+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()}})})),i={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}},V(o.slice(1),(function(t,e){var n=t;return n.push(i),n.push(e),n}),[o[0]])):[])}))}))])]),components:[]}}(t,{})),un(t.settings.plugins,"wordcount")&&r.push(function(t,e){var n=function(t,n,r){return Vd.set(t,[pi(e.translate(["{0} "+r,n[r]]))])};return ig.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:nu([Xv.config({}),Vd.config({}),Ns.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Ud("wordcount-events",[Pr((function(t){var e=Ns.getValue(t),r="words"===e.mode?"characters":"words";Ns.setValue(t,{mode:r,count:e.count}),n(t,e.count,r)})),Dr((function(e){t.on("wordCountUpdate",(function(t){var r=Ns.getValue(e).mode;Ns.setValue(e,{mode:r,count:t.wordCount}),n(e,t.wordCount,r)}))}))])])})}(t,e)),t.getParam("branding",!0,"boolean")&&r.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(n=Wg.translate(["Powered by {0}","Tiny"]))+'">'+n+"</a>"}}),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]}(),r=function(t){var e=!un(t.settings.plugins,"autoresize"),n=t.getParam("resize",e);return!1===n?wE.None:"both"===n?wE.Both:wE.Vertical}(t);return r!==wE.None&&n.push(function(n){return{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize"),"aria-hidden":"true"},innerHtml:cg("resize-handle",e.icons)},behaviours:nu([lT.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){!function(t,e,n){var r=Ge(t.getContainer()),o=function(t,e,n,r,o){var i={};return i.height=i_(r+e.top(),Wm(t),Gm(t)),n===wE.Both&&(i.width=i_(o+e.left(),jm(t),qm(t))),i}(t,e,n,Si(r),Ni(r));rt(o,(function(t,e){return ri(r,e,u_(t))})),function(t){t.fire("ResizeEditor")}(t)}(t,o,n)},blockerClass:"tox-blocker"})])}}(r)),n}()}},bT=function(e){var n,r=e.inline,o=r?l_:o_,i=og(e)?yO:SO,a=b.none(),u=gn(),c=u.browser.isIE()?["tox-platform-ie"]:[],s=u.deviceType.isTouch()?["tox-platform-touch"]:[],l=tg(e),d=Wg.isRtl()?{attributes:{dir:"rtl"}}:{},m={attributes:(n={},n[Uu]=l?ia.TopToBottom:ia.BottomToTop,n)},g=function(){return a.bind(GO.getHeader)},h=yi({dom:f({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c).concat(s)},d),behaviours:nu([jc.config({useFixed:function(){return i.isDocked(g)}})])}),p=function(){return w.value(h)},v=ag({dom:{tag:"div",classes:["tox-anchorbar"]}}),y=function(){return a.bind((function(t){return GO.getThrobber(t)})).getOrDie("Could not find throbber element")},x=function(t,e,n){var r=Ve(!1),o={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:Wg.translate},interpreter:function(t){return function(t,e){return NC(zC,t,e)}(t,o)},anchors:IC(e,(function(){return a.bind((function(t){return v.getOpt(t)})).getOrDie("Could not find a anchor bar element")})),getSink:function(){return w.value(t)}},urlinput:wS(e),styleselect:YC(e),colorinput:UC(e),dialog:WC(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return o}(h,e),C=GO.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:x,onEscape:function(){e.focus()}}),S=Zm(e),k=GO.parts().toolbar(f({dom:{tag:"div",classes:["tox-toolbar"]},getSink:p,backstage:x,onEscape:function(){e.focus()},type:S,lazyToolbar:function(){return a.bind((function(t){return GO.getToolbar(t)})).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return g().getOrDie("Could not find header element")}},m)),E=GO.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){},type:S}),O=GO.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),_=GO.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),z=GO.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:x}),A=e.getParam("statusbar",!0,"boolean")&&!r?b.some(vT(e,x.shared.providers)):b.none(),N={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[O,_]},M=Ym(e),B=Xm(e),R=$m(e),D=GO.parts().header({dom:f({tag:"div",classes:["tox-editor-header"]},m),components:W([R?[C]:[],M?[E]:B?[k]:[],ng(e)?[]:[v.asSpec()]]),sticky:og(e),editor:e,getSink:p}),H=W([l?[D]:[],r?[]:[N],l?[]:[D]]),L=W([[{dom:{tag:"div",classes:["tox-editor-container"]},components:H}],r?[]:A.toArray(),[z]]),F=rg(e),V=f(f({role:"application"},Wg.isRtl()?{dir:"rtl"}:{}),F?{"aria-hidden":"true"}:{}),U=yi(GO.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(r?["tox-tinymce-inline"]:[]).concat(l?[]:["tox-tinymce--toolbar-bottom"]).concat(s).concat(c),styles:f({visibility:"hidden"},F?{opacity:"0",border:"0"}:{}),attributes:V},components:L,behaviours:nu([Hd.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"})])}));a=b.some(U),e.shortcuts.add("alt+F9","focus menubar",(function(){GO.focusMenubar(U)})),e.shortcuts.add("alt+F10","focus toolbar",(function(){GO.focusToolbar(U)}));var j=cv(U),q=cv(h);!function(e,n,r){var o=function(t,e){P([n,r],(function(n){n.broadcastEvent(t,e)}))},i=function(t,e){P([n,r],(function(n){n.broadcastOn([t],e)}))},a=function(t){return i(ds(),{target:t.target()})},u=Gp(Ge(t.document),"touchstart",a),c=Gp(Ge(t.document),"touchmove",(function(t){return o(or(),t)})),s=Gp(Ge(t.document),"touchend",(function(t){return o(ir(),t)})),l=Gp(Ge(t.document),"mousedown",a),f=Gp(Ge(t.document),"mouseup",(function(t){0===t.raw().button&&i(gs(),{target:t.target()})})),d=function(t){return i(ds(),{target:Ge(t.target)})},m=function(t){0===t.button&&i(gs(),{target:Ge(t.target)})},g=function(t){return o(ar(),Xp(t))},h=function(t){i(ms(),{}),o(ur(),Xp(t))},p=function(){return i(ms(),{})};e.on("PostRender",(function(){e.on("click",d),e.on("tap",d),e.on("mouseup",m),e.on("ScrollWindow",g),e.on("ResizeWindow",h),e.on("ResizeEditor",p)})),e.on("remove",(function(){e.off("click",d),e.off("tap",d),e.off("mouseup",m),e.off("ScrollWindow",g),e.off("ResizeWindow",h),e.off("ResizeEditor",p),l.unbind(),u.unbind(),c.unbind(),s.unbind(),f.unbind()})),e.on("detach",(function(){es(n),es(r),n.destroy(),r.destroy()}))}(e,j,q);return{mothership:j,uiMothership:q,backstage:x,renderUI:function(){i.setup(e,g),m_(e,x),z_(e,p,x),function(t){var e=t.ui.registry.getAll().sidebars;P(et(e),(function(n){var r=e[n],o=function(){return b.from(t.queryCommandValue("ToggleSidebar")).is(n)};t.ui.registry.addToggleButton(n,{icon:r.icon,tooltip:r.tooltip,onAction:function(e){t.execCommand("ToggleSidebar",!1,n),e.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})}))}(e),function(t,e,n){var r=Ve(!1),o=Ve(b.none()),i=function(t){t!==r.get()&&(function(t,e,n){var r=t.element();!0===e?(Vd.set(t,[PO(n)]),fi(r,"display"),ho(r,"aria-hidden")):(Vd.set(t,[]),ri(r,"display","none"),fo(r,"aria-hidden","true"))}(e(),t,n.providers),r.set(t))};t.on("ProgressState",(function(e){if(o.get().each(Pm.clearTimeout),T(e.time)){var n=Pm.setEditorTimeout(t,(function(){return i(e.state)}),e.time);o.set(b.some(n))}else i(e.state),o.set(b.none())}))}(e,y,x.shared),ot(function(t){return t.getParam("toolbar_groups",{},"object")}(e),(function(t,n){e.ui.registry.addGroupToolbarButton(n,t)}));var t=e.ui.registry.getAll(),n=t.buttons,r=t.menuItems,a=t.contextToolbars,u=t.sidebars,c=Km(e),s={menuItems:r,menus:e.settings.menu?ot(e.settings.menu,(function(t){return f(f({},t),{items:t.items})})):{},menubar:e.settings.menubar,toolbar:c.getOrThunk((function(){return e.getParam("toolbar",!0)})),allowToolbarGroups:S===sf.floating,buttons:n,sidebar:u};WE(e,a,h,{backstage:x}),function(t,e){var n=Ve([]),r=Ve([]),o=Ve(!1),i=Ve(b.none()),a=Ve(b.none()),u=function(t){var n=$i(t);return dT(f.getOpt(e),t,n.x(),n.y(),n.width(),n.height())},c=function(t){var n=$i(t);return dT(d.getOpt(e),t,n.right(),n.bottom(),n.width(),n.height())},s=mT((function(){return I(n.get(),(function(t){return u(t)}))}),i,(function(e){a.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),l=mT((function(){return I(r.get(),(function(t){return c(t)}))}),a,(function(e){i.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),f=gT(s),d=gT(l),m=yi(f.asSpec()),g=yi(d.asSpec()),h=function(e,n,r,o){var i=r(n);lT.snapTo(e,i),function(e,n,r,i){var a=n.dom().getBoundingClientRect();fi(e.element(),"display");var u=qr(Ge(t.getBody())).dom().innerHeight,c=function(t){return t[o]<0}(a),s=function(t,e){return t[o]>e}(a,u);(c||s)&&ri(e.element(),"display","none")}(e,n)},p=function(t){return h(m,t,u,"top")},v=function(t){return h(g,t,c,"bottom")};fT.deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){o.get()||(Xc(e,m),Xc(e,g),o.set(!0)),i.set(b.some(t.start)),a.set(b.some(t.finish)),t.otherCells.each((function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),p(t.start),v(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){i.get().each(p),a.get().each(v)})),t.on("TableSelectionClear",(function(){o.get()&&(Jc(m),Jc(g),o.set(!1)),i.set(b.none()),a.set(b.none())})))}(e,h);var l,d,m=e.getElement(),v=(l=u_(function(t){return function(t){var e=Vm(t),n=Wm(t),r=Gm(t);return a_(e).map((function(t){return i_(t,n,r)}))}(t).getOr(Vm(t))}(e)),d=u_(function(t){return c_(t).getOr(Um(t))}(e)),e.inline||(li("div","width",d)&&ri(U.element(),"width",d),li("div","height",l)?ri(U.element(),"height",l):ri(U.element(),"height","200px")),l);return o.render(e,{mothership:j,uiMothership:q,outerContainer:U},s,x,{targetNode:m,height:v})},getUi:function(){return{channels:{broadcastAll:q.broadcast,broadcastOn:q.broadcastOn,register:function(){}}}}}},yT=r([ve("lazySink"),Oe("dragBlockClass"),Pe("getBounds",Xi),Me("useTabstopAt",r(!0)),Me("eventOrder",{}),Ms("modalBehaviours",[Hd]),ba("onExecute"),xa("onEscape")]),xT={sketch:o},wT=r([al({name:"draghandle",overrides:function(t,e){return{behaviours:nu([lT.config({mode:"mouse",getTarget:function(t){return ta(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),ol({schema:[ve("dom")],name:"title"}),ol({factory:xT,schema:[ve("dom")],name:"close"}),ol({factory:xT,schema:[ve("dom")],name:"body"}),al({factory:xT,schema:[ve("dom")],name:"footer"}),il({factory:{sketch:function(t,e){return f(f({},t),{dom:e.dom,components:e.components})}},schema:[Me("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Me("components",[])],name:"blocker"})]),CT=Bl({name:"ModalDialog",configFields:yT(),partFields:wT(),factory:function(t,e,n,r){var i=xo("alloy.dialog.busy"),a=xo("alloy.dialog.idle"),u=nu([Hd.config({mode:"special",onTab:function(){return b.some(!0)},onShiftTab:function(){return b.some(!0)}}),$d.config({})]),c=xo("modal-events"),s=f(f({},t.eventOrder),{"alloy.system.attached":[c].concat(t.eventOrder["alloy.system.attached"]||[])});return{uid:t.uid,dom:t.dom,components:e,apis:{show:function(e){var n=t.lazySink(e).getOrDie(),o=Ve(b.none()),c=r.blocker(),s=n.getSystem().build(f(f({},c),{components:c.components.concat([xi(e)]),behaviours:nu([$d.config({}),Ud("dialog-blocker-events",[Rr(In(),(function(){Hd.focusIn(e)})),_r(a,(function(t,n){go(e.element(),"aria-busy")&&(ho(e.element(),"aria-busy"),o.get().each((function(t){return Vd.remove(e,t)})))})),_r(i,(function(t,n){fo(e.element(),"aria-busy","true");var r=n.event().getBusySpec();o.get().each((function(t){Vd.remove(e,t)}));var i=r(e,u),a=t.getSystem().build(i);o.set(b.some(a)),Vd.append(e,xi(a)),a.hasConfigured(Hd)&&Hd.focusIn(a)}))])])}));Xc(n,s),Hd.focusIn(e)},hide:function(t){Gr(t.element()).each((function(e){t.getSystem().getByDom(e).each((function(t){Jc(t)}))}))},getBody:function(e){return yl(e,t,"body")},getFooter:function(e){return yl(e,t,"footer")},setIdle:function(t){br(t,a)},setBusy:function(t,e){yr(t,i,{getBusySpec:e})}},eventOrder:s,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Rs(t.modalBehaviours,[Vd.config({}),Hd.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),Ud(c,[Dr((function(e){var n,r,i,a,u,c;a=e.element(),u=yl(e,t,"title").element(),c=b.from(mo(a,"id")).fold((function(){var t=xo("dialog-label");return fo(u,"id",t),t}),o),fo(a,"aria-labelledby",c),n=e.element(),r=yl(e,t,"body").element(),i=b.from(mo(n,"id")).fold((function(){var t=xo("dialog-describe");return fo(r,"id",t),t}),o),fo(n,"aria-describedby",i)}))])])}},apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),ST=[xe("type"),xe("text"),we("level",["info","warn","error","success"]),xe("icon"),Me("url","")],kT=qt(ST),ET=[xe("type"),xe("text"),Ie("disabled",!1),Ie("primary",!1),Yt("name","name",At((function(){return xo("button-name")})),fe),ze("icon"),Ie("borderless",!1)],OT=qt(ET),_T=[xe("type"),xe("name"),xe("label"),Ie("disabled",!1)],TT=qt(_T),zT=de,AT=[xe("type"),xe("name")],NT=AT.concat([ze("label")]),MT=qt(NT),BT=fe,RT=qt(NT),DT=fe,HT=qt(NT),IT=Gt(Zt),PT=function(t){return[xe("type"),ye("columns"),t]},LT=NT.concat([Ie("sandboxed",!0)]),FT=qt(LT),VT=fe,UT=NT.concat([ze("inputMode"),ze("placeholder"),Ie("maximized",!1),Ie("disabled",!1)]),jT=qt(UT),WT=fe,qT=NT.concat([ke("items",[xe("text"),xe("value")]),Re("size",1),Ie("disabled",!1)]),GT=qt(qT),$T=fe,XT=NT.concat([Ie("constrain",!0),Ie("disabled",!1)]),KT=qt(XT),YT=qt([xe("width"),xe("height")]),JT=NT.concat([ze("placeholder"),Ie("maximized",!1),Ie("disabled",!1)]),ZT=qt(JT),QT=fe,tz=NT.concat([He("filetype","file",["image","media","file"]),Me("disabled",!1)]),ez=qt(tz),nz=qt([xe("value"),Me("meta",{})]),rz=AT.concat([De("tag","textarea"),xe("scriptId"),xe("scriptUrl"),Be("settings",void 0,he)]),oz=AT.concat([De("tag","textarea"),Ce("init")]),iz=te((function(t){return ne("customeditor.old",Wt(oz),t).orThunk((function(){return ne("customeditor.new",Wt(rz),t)}))})),az=fe,uz=[xe("type"),xe("html"),He("presets","presentation",["presentation","document"])],cz=qt(uz),sz=NT.concat([be("currentState",qt([ve("blob"),xe("url")]))]),lz=qt(sz),fz=NT.concat([Me("columns","auto")]),dz=qt(fz),mz=Qt([xe("value"),xe("text"),xe("icon")]),gz=function(t){return[xe("type"),xe("label"),t]},hz=[xe("type"),Ee("header",fe),Ee("cells",Gt(fe))],pz=qt(hz),vz=function(t){return Yt("items","items",Tt(),Gt(te((function(e){return ne("Checking item of "+t,bz,e).fold((function(t){return w.error(ie(t))}),(function(t){return w.value(t)}))}))))},bz=(hT=function(){return ae("type",{alertbanner:kT,bar:qt((t=vz("bar"),[xe("type"),t])),button:OT,checkbox:TT,colorinput:MT,colorpicker:RT,dropzone:HT,grid:qt(PT(vz("grid"))),iframe:FT,input:jT,selectbox:GT,sizeinput:KT,textarea:ZT,urlinput:ez,customeditor:iz,htmlpanel:cz,imagetools:lz,collection:dz,label:qt(gz(vz("label"))),table:pz,panel:xz});var t},{extract:function(t,e,n){return hT().extract(t,e,n)},toString:function(){return hT().toString()}}),yz=[xe("type"),Me("classes",[]),Ee("items",bz)],xz=qt(yz),wz=[Yt("name","name",At((function(){return xo("tab-name")})),fe),xe("title"),Ee("items",bz)],Cz=[xe("type"),ke("tabs",wz)],Sz=qt(Cz),kz=qt([xe("type"),xe("name")].concat(Tg)),Ez=de,Oz=[Yt("name","name",At((function(){return xo("button-name")})),fe),ze("icon"),He("align","end",["start","end"]),Ie("primary",!1),Ie("disabled",!1)],_z=m(Oz,[xe("text")]),Tz=m([we("type",["submit","cancel","custom"])],_z),zz=m([we("type",["menu"]),ze("text"),ze("tooltip"),ze("icon"),Ee("items",kz)],Oz),Az=_z,Nz=ue("type",{submit:Tz,cancel:Tz,custom:Tz,menu:zz}),Mz=qt([xe("title"),be("body",ae("type",{panel:xz,tabpanel:Sz})),De("size","normal"),Ee("buttons",Nz),Me("initialData",{}),Pe("onAction",e),Pe("onChange",e),Pe("onSubmit",e),Pe("onClose",e),Pe("onCancel",e),Me("onTabChange",e)]),Bz=function(t){return k(t)?[t].concat(q(ct(t),Bz)):E(t)?q(t,Bz):[]},Rz=function(t){return S(t.type)&&S(t.name)},Dz={checkbox:zT,colorinput:BT,colorpicker:DT,dropzone:IT,input:WT,iframe:VT,sizeinput:YT,selectbox:$T,size:YT,textarea:QT,urlinput:nz,customeditor:az,collection:mz,togglemenuitem:Ez},Hz=function(t){var e=function(t){return L(Bz(t),Rz)}(t),n=q(e,(function(t){return function(t){return b.from(Dz[t.type])}(t).fold((function(){return[]}),(function(e){return[be(t.name,e)]}))}));return qt(n)},Iz=qt(m([we("type",["cancel","custom"])],Az)),Pz=qt([xe("title"),xe("url"),Te("height"),Te("width"),function(t,e){return _e("buttons",Gt(e))}(0,Iz),Pe("onAction",e),Pe("onCancel",e),Pe("onClose",e),Pe("onMessage",e)]),Lz=function(t){return{internalDialog:re(ne("dialog",Mz,t)),dataValidator:Hz(t),initialData:t.initialData}},Fz={open:function(t,e){var n=Lz(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(re(ne("dialog",Pz,e)))},redial:function(t){return Lz(t)}},Vz=function(t){var e=[],n={};return rt(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),e.length>0?w.error(e):w.value(n)},Uz=function(e,n){var r,o=ag(ux.sketch((function(t){return{dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:I(e.items,(function(e){return AC(t,e,n)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[o.asSpec()]}],behaviours:nu([Hd.config({mode:"acyclic",useTabstopAt:a(Ox)}),(r=o,Pl.config({find:r.getOpt})),yx(o,{postprocess:function(e){return Vz(e).fold((function(e){return t.console.error(e),{}}),(function(t){return t}))}})])}},jz=Ml({name:"TabButton",configFields:[Me("uid",void 0),ve("value"),Yt("dom","dom",Nt((function(){return{attributes:{role:"tab",id:xo("aria"),"aria-selected":"false"}}})),ce()),Oe("action"),Me("domModification",{}),Ms("tabButtonBehaviours",[$d,Hd,Ns]),ve("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:um(t.action),behaviours:Rs(t.tabButtonBehaviours,[$d.config({}),Hd.config({mode:"execution",useSpace:!0,useEnter:!0}),Ns.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),Wz=r([ve("tabs"),ve("dom"),Me("clickToDismiss",!1),Ms("tabbarBehaviours",[Xl,Hd]),ha(["tabClass","selectedClass"])]),qz=ul({factory:jz,name:"tabs",unit:"tab",overrides:function(t){var n=function(t,e){Xl.dehighlight(t,e),yr(t,hr(),{tabbar:t,button:e})},r=function(t,e){Xl.highlight(t,e),yr(t,gr(),{tabbar:t,button:e})};return{action:function(o){var i=o.getSystem().getByUid(t.uid).getOrDie(),a=Xl.isHighlighted(i,o);(a&&t.clickToDismiss?n:a?e:r)(i,o)},domModification:{classes:[t.markers.tabClass]}}}}),Gz=r([qz]),$z=Bl({name:"Tabbar",configFields:Wz(),partFields:Gz(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Rs(t.tabbarBehaviours,[Xl.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){fo(e.element(),"aria-selected","true")},onDehighlight:function(t,e){fo(e.element(),"aria-selected","false")}}),Hd.config({mode:"flow",getInitial:function(t){return Xl.getHighlighted(t).map((function(t){return t.element()}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),Xz=Ml({name:"Tabview",configFields:[Ms("tabviewBehaviours",[Vd])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:Rs(t.tabviewBehaviours,[Vd.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),Kz=r([Me("selectFirst",!0),va("onChangeTab"),va("onDismissTab"),Me("tabs",[]),Ms("tabSectionBehaviours",[])]),Yz=ol({factory:$z,schema:[ve("dom"),Se("markers",[ve("tabClass"),ve("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),Jz=ol({factory:Xz,name:"tabview"}),Zz=r([Yz,Jz]),Qz=Bl({name:"TabSection",configFields:Kz(),partFields:Zz(),factory:function(t,e,n,r){var o=function(e,n){bl(e,t,"tabbar").each((function(t){n(t).each(xr)}))};return{uid:t.uid,dom:t.dom,components:e,behaviours:Bs(t.tabSectionBehaviours),events:kr(W([t.selectFirst?[Dr((function(t,e){o(t,Xl.getFirst)}))]:[],[_r(gr(),(function(e,n){var r,o;r=n.event().button(),o=Ns.getValue(r),bl(r,t,"tabview").each((function(e){U(t.tabs,(function(t){return t.value===o})).each((function(n){var o=n.view();(function(t,e){return b.from(mo(t,"id"))})(r.element()).each((function(t){fo(e.element(),"aria-labelledby",t)})),Vd.set(e,o),t.onChangeTab(e,r,o)}))}))})),_r(hr(),(function(e,n){var r=n.event().button();t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return bl(e,t,"tabview").map((function(t){return Vd.contents(t)})).getOr([])},showTab:function(t,e){o(t,(function(t){var n=Xl.getCandidates(t);return U(n,(function(t){return Ns.getValue(t)===e})).filter((function(e){return!Xl.isHighlighted(t,e)}))}))}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),tA=function(t,e){ri(t,"height",e+"px"),gn().browser.isIE()?fi(t,"flex-basis"):ri(t,"flex-basis",e+"px")},eA=function(e,n,r){ta(e,'[role="dialog"]').each((function(e){ea(e,'[role="tablist"]').each((function(o){r.get().map((function(r){return ri(n,"height","0"),ri(n,"flex-basis","0"),Math.min(r,function(e,n,r){var o,i=Wr(e).dom(),a=ta(e,".tox-dialog-wrap").getOr(e);o="fixed"===ai(a,"position")?Math.max(i.clientHeight,t.window.innerHeight):Math.max(i.offsetHeight,i.scrollHeight);var u=Si(n),c=n.dom().offsetLeft>=r.dom().offsetLeft+Ni(r)?Math.max(Si(r),u):u,s=parseInt(ai(e,"margin-top"),10)||0,l=parseInt(ai(e,"margin-bottom"),10)||0;return o-(Si(e)+s+l-c)}(e,n,o))})).each((function(t){tA(n,t)}))}))}))},nA=function(t){return ea(t,'[role="tabpanel"]')},rA=function(t,e){var n=Ve({}),r=function(t){var e=Ns.getValue(t),r=Vz(e).getOr({}),o=n.get(),i=ht(o,r);n.set(i)},o=function(t){var e=n.get();Ns.setValue(t,e)},i=Ve(null),u=I(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[ux.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"]},components:I(t.items,(function(t){return AC(n,t,e)})),formBehaviours:nu([Hd.config({mode:"acyclic",useTabstopAt:a(Ox)}),Ud("TabView.form.events",[Dr(o),Hr(r)]),lu.config({channels:Dt([{key:"send-data-to-section",value:{onReceive:r}},{key:"send-data-to-view",value:{onReceive:o}}])})])}}))]}}})),c=function(t){var e;return{smartTabHeight:(e=Ve(b.none()),{extraEvents:[Dr((function(n){var r=n.element();nA(r).each((function(o){ri(o,"visibility","hidden"),n.getSystem().getByDom(o).toOption().each((function(n){var r,i=(r=function(t,e,n){return I(t,(function(r,o){Vd.set(n,t[o].view());var i=e.dom().getBoundingClientRect();return Vd.set(n,[]),i.height}))}(t,o,n),J(Y(r,(function(t,e){return t>e?-1:t<e?1:0}))));e.set(i)})),eA(r,o,e),fi(o,"visibility"),function(t,e){J(t).each((function(t){return Qz.showTab(e,t.value)}))}(t,n),Pm.requestAnimationFrame((function(){eA(r,o,e)}))}))})),_r(ur(),(function(t){var n=t.element();nA(n).each((function(t){eA(n,t,e)}))})),_r(vv,(function(t,n){var r=t.element();nA(r).each((function(t){var n=mu();ri(t,"visibility","hidden");var o=ci(t,"height").map((function(t){return parseInt(t,10)}));fi(t,"height"),fi(t,"flex-basis");var i=t.dom().getBoundingClientRect().height;o.forall((function(t){return i>t}))?(e.set(b.from(i)),eA(r,t,e)):o.each((function(e){tA(t,e)})),fi(t,"visibility"),n.each(du)}))}))],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}}(u).smartTabHeight;return Qz.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=Ns.getValue(e);yr(t,pv,{name:r,oldName:i.get()}),i.set(r)},tabs:u,components:[Qz.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[$z.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:nu([Xv.config({})])}),Qz.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:c.selectFirst,tabSectionBehaviours:nu([Ud("tabpanel",c.extraEvents),Hd.config({mode:"acyclic"}),Pl.config({find:function(t){return J(Qz.getViewItems(t))}}),Ns.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn(["send-data-to-section"],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn(["send-data-to-view"],{})}}})])})},oA=xo("update-dialog"),iA=xo("update-title"),aA=xo("update-body"),uA=xo("update-footer"),cA=xo("body-send-message"),sA=function(t,e,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:f(f({},e.map((function(t){return{id:t}})).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:nu([mx(0),$k.config({channel:aA,updateState:function(t,e){return b.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[rA(t.body,n)];default:return[Uz(t.body,n)]}},initialData:t})])}},lA=function(t,e){return[Nr(In(),_x),t(lv,(function(t,n){e.onClose(),n.onClose()})),t(fv,(function(t,e,n,r){e.onCancel(t),br(r,lv)})),_r(hv,(function(t,n){return e.onUnblock()})),_r(gv,(function(t,n){return e.onBlock(n.event())}))]},fA=function(t,e){var n=function(e,n){return _r(e,(function(e,o){r(e,(function(r,i){n(t(),r,o.event(),e)}))}))},r=function(t,e){$k.getState(t).get().each((function(n){e(n.internalDialog,t)}))};return m(lA(n,e),[n(mv,(function(t,e){return e.onSubmit(t)})),n(sv,(function(t,e,n){e.onChange(t,{name:n.name()})})),n(dv,(function(t,e,n,r){var o=function(){return Hd.focusIn(r)},i=mu();e.onAction(t,{name:n.name(),value:n.value()}),mu().fold((function(){o()}),(function(t){(!Sn(r.element(),t)||go(t,"disabled")||Sn(t,i.getOrNull())&&go(i.getOrDie(),"disabled"))&&o()}))})),n(pv,(function(t,e,n){e.onTabChange(t,{newTabName:n.name(),oldTabName:n.oldName()})})),Hr((function(e){var n=t();Ns.setValue(e,n.getData())}))])},dA=function(t,e){var n=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(u=a,"start"===u.align?n:r).push(a)}var u;return{pass:n,fail:r}}(e.map((function(t){return t.footerButtons})).getOr([])),r=function(t,e){return uv.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:I(e,(function(t){return t.memento.asSpec()}))})};return[r("start",n.pass),r("end",n.fail)]},mA=function(t,e){return{dom:IO('<div class="tox-dialog__footer"></div>'),components:[],behaviours:nu([$k.config({channel:uA,initialData:t,updateState:function(t,n){var r=I(n.buttons,(function(t){var n=ag(function(t,e){return _w(t,t.type,e)}(t,e));return{name:t.name,align:t.align,memento:n}}));return b.some({lookupByName:function(t,e){return function(t,e,n){return U(e,(function(t){return t.name===n})).bind((function(e){return e.memento.getOpt(t)}))}(t,r,e)},footerButtons:r})},renderComponents:dA})])}},gA=function(t,e){return CT.parts().footer(mA(t,e))},hA=function(t,e){if(t.getRoot().getSystem().isConnected()){var n=Pl.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return ux.getField(n,e).fold((function(){var r=t.getFooter();return $k.getState(r).get().bind((function(t){return t.lookupByName(n,e)}))}),(function(t){return b.some(t)}))}return b.none()},pA=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},o={getData:function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=Ns.getValue(r),i=ot(n,(function(t){return t.get()}));return f(f({},o),i)},setData:function(e){r((function(r){var i=o.getData(),a=f(f({},i),e),u=function(t,e){var n=t.getRoot();return $k.getState(n).get().map((function(t){return re(ne("data",t.dataValidator,e))})).getOr(e)}(t,a),c=t.getFormWrapper();Ns.setValue(c,u),rt(n,(function(t,e){lt(a,e)&&t.set(a[e])}))}))},disable:function(e){hA(t,e).each(xh.disable)},enable:function(e){hA(t,e).each(xh.enable)},focus:function(e){hA(t,e).each($d.focus)},block:function(t){if(!S(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){yr(e,gv,{message:t})}))},unblock:function(){r((function(t){br(t,hv)}))},showTab:function(e){r((function(n){var r=t.getBody();$k.getState(r).get().exists((function(t){return t.isTabPanel()}))&&Pl.getCurrent(r).each((function(t){Qz.showTab(t,e)}))}))},redial:function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([oA],r),n.getSystem().broadcastOn([iA],r.internalDialog),n.getSystem().broadcastOn([aA],r.internalDialog),n.getSystem().broadcastOn([uA],r.internalDialog),o.setData(r.initialData)}))},close:function(){r((function(t){br(t,lv)}))}};return o},vA=Jg.deviceType.isTouch(),bA=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},yA=function(t,e){return CT.parts().close(ig.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:nu([Xv.config({})])}))},xA=function(){return CT.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},wA=function(t,e){return CT.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:IO("<p>"+e.translate(t)+"</p>")}]}]})},CA=function(t){return CT.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},SA=function(t,e){return[uv.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),uv.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},kA=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return CT.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),b.some(!0)},useTabstopAt:function(t){return!Ox(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:f({position:"relative"},t.extraStyles)},components:m([t.header,t.body],t.footer.toArray()),parts:{blocker:{dom:IO('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:vA?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:nu(m([$d.config({}),Ud("dialog-events",t.dialogEvents.concat([Rr(In(),(function(t,e){Hd.focusIn(t)}))])),Ud("scroll-lock",[Dr((function(){Go(Qo(),i)})),Hr((function(){$o(Qo(),i)}))])],t.extraBehaviours)),eventOrder:f((e={},e[Jn()]=["dialog-events"],e[cr()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[sr()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},EA=function(t){return ig.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(t){br(t,fv)}})},OA=function(t,e,n){var r=function(t){return[pi(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:f({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:nu([$k.config({channel:iA,renderComponents:r})])}},_A=function(){return{dom:IO('<div class="tox-dialog__draghandle"></div>')}},TA=function(t,e){return function(t,e){var n=CT.parts().title(OA(t,b.none(),e)),r=CT.parts().draghandle(_A()),o=CT.parts().close(EA(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return uv.sketch({dom:IO('<div class="tox-dialog__header"></div>'),components:i})}({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},zA=function(t,e){return{onClose:function(){return e.closeWindow()},onBlock:function(e){CT.setBusy(t(),(function(t,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:IO('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}))},onUnblock:function(){CT.setIdle(t())}}},AA=function(t,e,n,r){var o;return yi(kA(f(f({},t),{lazySink:r.shared.getSink,extraBehaviours:m([$k.config({channel:oA,updateState:function(t,e){return b.some(e)},initialData:e}),wx({})],t.extraBehaviours),onEscape:function(t){br(t,fv)},dialogEvents:n,eventOrder:(o={},o[Yn()]=["reflecting","receiving"],o[cr()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],o[sr()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],o)})))},NA=function(t){return I(t,(function(t){return"menu"===t.type?function(t){var e=I(t.items,(function(t){var e=Ve(!1);return f(f({},t),{storage:e})}));return f(f({},t),{items:e})}(t):t}))},MA=function(t){return V(t,(function(t,e){return"menu"===e.type?V(e.items,(function(t,e){return t[e.name]=e.storage,t}),t):t}),{})},BA=tinymce.util.Tools.resolve("tinymce.util.URI"),RA=["insertContent","setContent","execCommand","close","block","unblock"],DA=function(t){return k(t)&&-1!==RA.indexOf(t.mceAction)},HA=function(e,n,r,o){var i,u,c,s,l,d,g,h,p=TA(e.title,o),v=(h={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[Tx({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:nu([Xv.config({}),$d.config({})])})]}],behaviours:nu([Hd.config({mode:"acyclic",useTabstopAt:a(Ox)})])},CT.parts().body(h)),y=e.buttons.bind((function(t){return 0===t.length?b.none():b.some(gA({buttons:t},o))})),x=(s=function(){return N},l=zA((function(){return A}),n),d=function(t,e){return _r(t,(function(t,n){g(t,(function(r,o){e(s(),r,n.event(),t)}))}))},g=function(t,e){$k.getState(t).get().each((function(n){e(n,t)}))},m(lA(d,l),[d(dv,(function(t,e,n){e.onAction(t,{name:n.name()})}))])),w=f(f({},e.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),e.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),C=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],E=new BA(e.url,{base_uri:new BA(t.window.location.href)}),_=E.protocol+"://"+E.host+(E.port?":"+E.port:""),T=Ve(b.none()),z=[Ud("messages",[Dr((function(){var n=Gp(Ge(t.window),"message",(function(t){if(E.isSameOrigin(new BA(t.raw().origin))){var n=t.raw().data;DA(n)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!O(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(r,N,n):function(t){return!DA(t)&&k(t)&&lt(t,"mceAction")}(n)&&e.onMessage(N,n)}}));T.set(b.some(n))})),Hr((function(){T.get().each((function(t){return t.unbind()}))}))]),lu.config({channels:(i={},i[cA]={onReceive:function(t,e){ea(t.element(),"iframe").each((function(t){t.dom().contentWindow.postMessage(e,_)}))}},i)})],A=AA({header:p,body:v,footer:y,extraClasses:C,extraBehaviours:z,extraStyles:w},e,x,o),N=(u=A,c=function(t){u.getSystem().isConnected()&&t(u)},{block:function(t){if(!S(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");c((function(e){yr(e,gv,{message:t})}))},unblock:function(){c((function(t){br(t,hv)}))},close:function(){c((function(t){br(t,lv)}))},sendMessage:function(t){c((function(e){e.getSystem().broadcastOn([cA],t)}))}});return{dialog:A,instanceApi:N}},IA=function(t,e,n){return e&&n?[]:[mO.config({contextual:{lazyContext:function(){return b.some(Gi(Ge(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},PA=function(t){var e=t.backstage,n=t.editor,r=og(n),o=tg(n),i=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(){CT.hide(c),r()},i=ag(_w({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:b.none()},"cancel",t.backstage)),a=xA(),u=yA(o,e.providers),c=yi(kA({lazySink:function(){return e.getSink()},header:bA(a,u),body:wA(n,e.providers),footer:b.some(CA(SA([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[_r(fv,o)],eventOrder:{}}));CT.show(c);var s=i.get(c);$d.focus(s)}}}(t),a=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(t){CT.hide(s),r(t)},i=ag(_w({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:b.none()},"submit",t.backstage)),a=_w({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:b.none()},"cancel",t.backstage),u=xA(),c=yA((function(){return o(!1)}),e.providers),s=yi(kA({lazySink:function(){return e.getSink()},header:bA(u,c),body:wA(n,e.providers),footer:b.some(CA(SA([],[a,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[_r(fv,(function(){return o(!1)})),_r(mv,(function(){return o(!0)}))],eventOrder:{}}));CT.show(s);var l=i.get(s);$d.focus(l)}}}(t),u=function(t,i,a,u){return Fz.open((function(t,c,s){var l,d=re(ne("data",s,c)),g=(l=Ve(b.none()),{clear:function(){l.set(b.none())},set:function(t){l.set(b.some(t))},isSet:function(){return l.get().isSome()},on:function(t){l.get().each(t)}}),h=function(){return g.on((function(t){Om.reposition(t),mO.refresh(t)}))},p=function(t,e,n,r){var o,i,a,u,c,s=xo("dialog-label"),l=xo("dialog-content"),f=ag((a={title:t.internalDialog.title,draggable:!0},u=s,c=n.shared.providers,uv.sketch({dom:IO('<div class="tox-dialog__header"></div>'),components:[OA(a,b.some(u),c),_A(),EA(c)],containerBehaviours:nu([lT.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return na(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),d=ag(function(t,e,n,r){return sA(t,b.some(e),n,r)}({body:t.internalDialog.body},l,n,r)),m=NA(t.internalDialog.buttons),g=MA(m),h=ag(function(t,e){return mA(t,e)}({buttons:m},n)),p=fA((function(){return y}),{onBlock:function(){},onUnblock:function(){},onClose:function(){return e.closeWindow()}}),v=yi({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=s,o["aria-describedby"]=""+l,o)},eventOrder:(i={},i[Yn()]=[$k.name(),lu.name()],i[Jn()]=["execute-on-form"],i[cr()]=["reflecting","execute-on-form"],i),behaviours:nu([Hd.config({mode:"cyclic",onEscape:function(t){return br(t,lv),b.some(!0)},useTabstopAt:function(t){return!Ox(t)&&("button"!==ao(t)||"disabled"!==mo(t,"disabled"))}}),$k.config({channel:oA,updateState:function(t,e){return b.some(e)},initialData:t}),$d.config({}),Ud("execute-on-form",p.concat([Rr(In(),(function(t,e){Hd.focusIn(t)}))])),wx({})]),components:[f.asSpec(),d.asSpec(),h.asSpec()]}),y=pA({getRoot:function(){return v},getFooter:function(){return h.get(v)},getBody:function(){return d.get(v)},getFormWrapper:function(){var t=d.get(v);return Pl.getCurrent(t).getOr(t)}},e.redial,g);return{dialog:v,instanceApi:y}}({dataValidator:s,initialData:d,internalDialog:t},{redial:Fz.redial,closeWindow:function(){g.on(Om.hide),n.off("ResizeEditor",h),g.clear(),a(p.instanceApi)}},e,u),v=yi(Om.sketch(f(f({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},o?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:nu(m([Ud("window-manager-inline-events",[_r(lr(),(function(t,e){br(p.dialog,fv)}))])],IA(n,r,o)))})));return g.set(v),Om.showWithin(v,i,xi(p.dialog),b.some(Qo())),r&&o||(mO.refresh(v),n.on("ResizeEditor",h)),p.instanceApi.setData(d),Hd.focusIn(p.dialog),p.instanceApi}),t)};return{open:function(t,n,r){return void 0!==n&&"toolbar"===n.inline?u(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?u(t,e.shared.anchors.cursor(),r,n.ariaAttrs):function(t,n){return Fz.open((function(t,r,o){var i=r,a=function(t,e,n){var r=TA(t.internalDialog.title,n),o=function(t,e){var n=sA(t,b.none(),e,!1);return CT.parts().body(n)}({body:t.internalDialog.body},n),i=NA(t.internalDialog.buttons),a=MA(i),u=gA({buttons:i},n),c=fA((function(){return d}),zA((function(){return f}),e)),s="normal"!==t.internalDialog.size?"large"===t.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],l={header:r,body:o,footer:b.some(u),extraClasses:s,extraBehaviours:[],extraStyles:{}},f=AA(l,t,c,n),d=pA({getRoot:function(){return f},getBody:function(){return CT.getBody(f)},getFooter:function(){return CT.getFooter(f)},getFormWrapper:function(){var t=CT.getBody(f);return Pl.getCurrent(t).getOr(t)}},e.redial,a);return{dialog:f,instanceApi:d}}({dataValidator:o,initialData:i,internalDialog:t},{redial:Fz.redial,closeWindow:function(){CT.hide(a.dialog),n(a.instanceApi)}},e);return CT.show(a.dialog),a.instanceApi.setData(i),a.instanceApi}),t)}(t,r)},openUrl:function(t,r){return function(t,r){return Fz.openUrl((function(t){var o=HA(t,{closeWindow:function(){CT.hide(o.dialog),r(o.instanceApi)}},n,e);return CT.show(o.dialog),o.instanceApi}),t)}(t,r)},alert:function(t,e){i.open(t,(function(){e()}))},close:function(t){t.close()},confirm:function(t,e){a.open(t,(function(t){e(t)}))}}};l.add("silver",(function(t){var e=bT(t),n=e.uiMothership,o=e.backstage,i=e.renderUI,a=e.getUi;Wp(t,o.shared);var u=PA({editor:t,backstage:o});return{renderUI:i,getWindowManagerImpl:r(u),getNotificationManagerImpl:function(){return function(t,e,n){var r=e.backstage,o=tg(t);return{open:function(t,i){var a=!t.closeButton&&t.timeout&&(t.timeout>0||t.timeout<0),u=function(){i(),Om.hide(s)},c=yi(fg.sketch({text:t.text,level:R(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:b.from(t.icon),closeButton:!a,onAction:u,iconProvider:r.shared.providers.icons,translationProvider:r.shared.providers.translate})),s=yi(Om.sketch(f({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:e.backstage.shared.getSink,fireDismissalEventInstead:{}},o?{}:{fireRepositionEventInstead:{}})));return n.add(s),t.timeout>0&&Pm.setTimeout((function(){u()}),t.timeout),{close:u,moveTo:function(t,e){Om.showAt(s,{anchor:"makeshift",x:t,y:e},xi(c))},moveRel:function(t,n){if("banner"!==n){var r=function(t){switch(t){case"bc-bc":return Im;case"tc-tc":return Hm;case"tc-bc":return Wa;case"bc-tc":default:return qa}}(n),o={anchor:"node",root:Qo(),node:b.some(Ge(t)),layouts:{onRtl:function(){return[r]},onLtr:function(){return[r]}}};Om.showAt(s,o,xi(c))}else Om.showAt(s,e.backstage.shared.anchors.banner(),xi(c))},text:function(t){fg.updateText(c,t)},settings:t,getEl:function(){return c.element().dom()},progressBar:{value:function(t){fg.updateProgress(c,t)}}}},close:function(t){t.close()},reposition:function(t){!function(t){P(t,(function(t){return t.moveTo(0,0)}))}(t),function(t){t.length>0&&(J(t).each((function(t){return t.moveRel(null,"banner")})),P(t,(function(e,n){n>0&&e.moveRel(t[n-1].getEl(),"bc-tc")})))}(t)},getArgs:function(t){return t.settings}}}(t,{backstage:o},n)},ui:a()}}))}(window);let backendApiUrl="",apiUrl="",domain="";function loadErroredFile(t,e){if(t.id=e,document.getElementById(t.id).style.display="none",document.getElementById(t.id).style.border="none",t.src.includes("X-Amz-Security-Token"))document.getElementById(t.id).style.display="";else{let n=new XMLHttpRequest;n.open("GET",window.origin+"/assets/config.json",!0),n.responseType="json",n.onload=function(){if(200===this.status&&this.response){backendApiUrl=this.response.backendApiUrl;const n=new FormData,r=new Object;r.fileName=e,n.append("data",JSON.stringify(r));const o=new XMLHttpRequest;apiUrl=backendApiUrl+"attachment/preverify_attachment",o.open("POST",apiUrl,!0),o.withCredentials=!0,domain=location.host,o.setRequestHeader("domain",domain),o.send(n),o.onload=function(){if(200===this.status){let t=this.response;"string"==typeof t&&(t=JSON.parse(t)),i(t)}};let i=e=>{e&&e.data&&(t&&t.src?(t.src=e.data.preSignedURL,document.getElementById(t.id).style.display=""):(t=e.data.preSignedURL,document.getElementById(t.id).style.display=""))}}},n.send()}}const convertStringToFunction=(t,e)=>{if(!document.getElementById(e)){const n=t.jsCall?t.jsCall:t,r=document.createElement("script");r.id=e,r.innerHTML=n,r.type="text/javascript",document.head.appendChild(r)}},dynamicObjectCreate=(t,[e,...n],r)=>{const o=Array.isArray(t)?[...t]:{...t};return o[e]=n.length?dynamicObjectCreate(t[e],n,r):r,o},loadScript=()=>{let t=new XMLHttpRequest;t.open("GET",window.origin+"/assets/config.json",!0),t.responseType="json",t.onload=function(){if(200===this.status&&this.response&&this.response.chatConfig&&this.response.chatConfig.moveWorkserverUrl){let t;moveWorkserverUrl=this.response.chatConfig.moveWorkserverUrl,t=document.createElement("script"),t.src=moveWorkserverUrl,document.body.appendChild(t)}},t.send()};