File: dist/js/tool.js

Recommend this page to a friend!
  Classes of Naif Alshaye  >  Laravel Nova PHP Mailchimp Send Email  >  dist/js/tool.js  >  Download  
File: dist/js/tool.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Nova PHP Mailchimp Send Email
Send email to subscribers of lists of Mailchimp
Author: By
Last change:
Date: 1 year ago
Size: 1,037,390 bytes
 

 

Contents

Class file image Download
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(15),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(1))},function(e,t,n){var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o=n(12),i={},a=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},f=null,d="data-vue-ssr-id",m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function h(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+d+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(m){var o=c++;r=s||(s=h()),t=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=h(),t=function(e,t){var n=t.css,r=t.media,o=t.sourceMap;r&&e.setAttribute("media",r);f.ssrId&&e.setAttribute(d,t.id);o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}e.exports=function(e,t,n,r){u=n,f=r||{};var a=o(e,t);return p(a),function(t){for(var n=[],r=0;r<a.length;r++){var s=a[r];(c=i[s.id]).refs--,n.push(c)}t?p(a=o(e,t)):a=[];for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}};var v,b=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function y(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e,t,n,r,o,i){var a,s=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(a=e,s=e.default);var u,l="function"==typeof s?s.options:s;if(t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o),i?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=u):r&&(u=r),u){var f=l.functional,d=f?l.render:l.beforeCreate;f?(l._injectStyles=u,l.render=function(e,t){return u.call(t),d(e,t)}):l.beforeCreate=d?[].concat(d,u):[u]}return{esModule:a,exports:s,options:l}}},function(e,t){e.exports="/fonts/vendor/tinymce/skins/lightgray/tinymce.eot?6401227790b9e544ef6b8d749cd0a358"},function(e,t){e.exports="/fonts/vendor/tinymce/skins/lightgray/tinymce-small.eot?12d26c285b71d790f4b0c94423ef1f99"},function(e,t,n){n(8),e.exports=n(123)},function(e,t,n){Nova.booting(function(e,t){t.addRoutes([{name:"mailchimp-tool",path:"/mailchimp-tool",component:n(9)}])})},function(e,t,n){var r=n(4)(n(13),n(122),!1,function(e){n(10)},null,null);e.exports=r.exports},function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(3)("4a91d31d",r,!0,{})},function(e,t,n){(e.exports=n(0)(!1)).push([e.i,"",""])},function(e,t){e.exports=function(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=i[0],s={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(14);var r=n(17),o=n.n(r).a;t.default={components:{tinymce:o},data:function(){return{email_address:"",subject:"",body:"",tinyOptions:{height:400},subscribers:[]}},mounted:function(){var e=this;Nova.request().get("/nova-vendor/mailchimp-tool/subscribers_count").then(function(e){var t=e.data.stats.member_count,n=(e.data.stats.campaign_count,e.data.stats.unsubscribe_count);document.getElementById("member_count").innerHTML=t,document.getElementById("unsubscribe_count").innerHTML=n}),Nova.request().get("/nova-vendor/mailchimp-tool/subscribers").then(function(t){e.subscribers=t.data})},methods:{addEmail:function(){var e=this;if(!this.email_address.length)return this.$toasted.show("Please fill the email address field",{type:"error"}),!1;Nova.request().post("/nova-vendor/mailchimp-tool/add",{email_address:this.email_address}).then(function(t){"subscribed"==t.data.status?e.$toasted.show("Email added successfully!",{type:"success"}):e.$toasted.show(t.data.title,{type:"error"})}).catch(function(t){e.$toasted.show("Email failed to add :(",{type:"error"})})},deleteEmail:function(){var e=this;if(!this.email_address_delete.length)return this.$toasted.show("Please fill the email address field",{type:"error"}),!1;Nova.request().post("/nova-vendor/mailchimp-tool/delete",{email_address_delete:this.email_address_delete}).then(function(t){1==t.data?e.$toasted.show("Email deleted successfully!",{type:"success"}):"Resource Not Found"==t.data.title?e.$toasted.show("Email address not found",{type:"error"}):e.$toasted.show(t.data.title,{type:"error"})}).catch(function(t){e.$toasted.show("Email failed to add :(",{type:"error"})})},sendEmail:function(){var e=this;return this.subject.length?this.body.length?void Nova.request().post("/nova-vendor/mailchimp-tool/send",{subject:this.subject,body:this.body}).then(function(t){1==t.data?e.$toasted.show("Email sent successfully!",{type:"success"}):e.$toasted.show("Email send failed!",{type:"error"})}).catch(function(t){e.$toasted.show("Email failed to sent :(",{type:"error"})}):(this.$toasted.show("Please fill the email body content",{type:"error"}),!1):(this.$toasted.show("Please fill the email subject field",{type:"error"}),!1)},validateEmail:function(e){var t=document.getElementById(e);/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.value).toLowerCase())?t.style.border="":(t.value="",t.style.border="1px solid red")},formatDate:function(e){var t=new Date(e);return t.getFullYear()+"-"+String("00"+t.getMonth()).slice(-2)+"-"+t.getDate()}}}},function(e,t,n){"use strict";(function(t,n){var r=Object.freeze({});function o(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var u=Object.prototype.toString;function l(e){return"[object Object]"===u.call(e)}function f(e){return"[object RegExp]"===u.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function m(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var g=h("slot,component",!0),v=h("key,ref,slot,slot-scope,is");function b(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function x(e,t){return y.call(e,t)}function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var C=/-(\w)/g,k=w(function(e){return e.replace(C,function(e,t){return t?t.toUpperCase():""})}),T=w(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),_=/\B([A-Z])/g,E=w(function(e){return e.replace(_,"-$1").toLowerCase()});var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function N(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function R(e,t){for(var n in t)e[n]=t[n];return e}function A(e){for(var t={},n=0;n<e.length;n++)e[n]&&R(t,e[n]);return t}function D(e,t,n){}var O=function(e,t,n){return!1},P=function(e){return e};function I(e,t){if(e===t)return!0;var n=c(e),r=c(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every(function(e,n){return I(e,t[n])});if(o||i)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every(function(n){return I(e[n],t[n])})}catch(e){return!1}}function B(e,t){for(var n=0;n<e.length;n++)if(I(e[n],t))return n;return-1}function M(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",F=["component","directive","filter"],H=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],z={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:O,isReservedAttr:O,isUnknownElement:O,getTagNamespace:D,parsePlatformTagName:P,mustUseProp:O,_lifecycleHooks:H};function U(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function $(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var j=/[^\w.$]/;var W,q="__proto__"in{},V="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Y=G&&WXEnvironment.platform.toLowerCase(),K=V&&window.navigator.userAgent.toLowerCase(),X=K&&/msie|trident/.test(K),J=K&&K.indexOf("msie 9.0")>0,Z=K&&K.indexOf("edge/")>0,Q=(K&&K.indexOf("android"),K&&/iphone|ipad|ipod|ios/.test(K)||"ios"===Y),ee=(K&&/chrome\/\d+/.test(K),{}.watch),te=!1;if(V)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){te=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var re=function(){return void 0===W&&(W=!V&&!G&&void 0!==t&&"server"===t.process.env.VUE_ENV),W},oe=V&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ie(e){return"function"==typeof e&&/native code/.test(e.toString())}var ae,se="undefined"!=typeof Symbol&&ie(Symbol)&&"undefined"!=typeof Reflect&&ie(Reflect.ownKeys);ae="undefined"!=typeof Set&&ie(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ce=D,ue=0,le=function(){this.id=ue++,this.subs=[]};le.prototype.addSub=function(e){this.subs.push(e)},le.prototype.removeSub=function(e){b(this.subs,e)},le.prototype.depend=function(){le.target&&le.target.addDep(this)},le.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},le.target=null;var fe=[];function de(e){le.target&&fe.push(le.target),le.target=e}function me(){le.target=fe.pop()}var pe=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},he={child:{configurable:!0}};he.child.get=function(){return this.componentInstance},Object.defineProperties(pe.prototype,he);var ge=function(e){void 0===e&&(e="");var t=new pe;return t.text=e,t.isComment=!0,t};function ve(e){return new pe(void 0,void 0,void 0,String(e))}function be(e){var t=new pe(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.isCloned=!0,t}var ye=Array.prototype,xe=Object.create(ye);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ye[e];$(xe,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o,i=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i})});var we=Object.getOwnPropertyNames(xe),Ce=!0;function ke(e){Ce=e}var Te=function(e){(this.value=e,this.dep=new le,this.vmCount=0,$(e,"__ob__",this),Array.isArray(e))?((q?_e:Ee)(e,xe,we),this.observeArray(e)):this.walk(e)};function _e(e,t,n){e.__proto__=t}function Ee(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];$(e,i,t[i])}}function Se(e,t){var n;if(c(e)&&!(e instanceof pe))return x(e,"__ob__")&&e.__ob__ instanceof Te?n=e.__ob__:Ce&&!re()&&(Array.isArray(e)||l(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Te(e)),t&&n&&n.vmCount++,n}function Ne(e,t,n,r,o){var i=new le,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get;s||2!==arguments.length||(n=e[t]);var c=a&&a.set,u=!o&&Se(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return le.target&&(i.depend(),u&&(u.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||(c?c.call(e,t):n=t,u=!o&&Se(t),i.notify())}})}}function Re(e,t,n){if(Array.isArray(e)&&d(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Ne(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ae(e,t){if(Array.isArray(e)&&d(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||x(e,t)&&(delete e[t],n&&n.dep.notify())}}Te.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Ne(e,t[n])},Te.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Se(e[t])};var De=z.optionMergeStrategies;function Oe(e,t){if(!t)return e;for(var n,r,o,i=Object.keys(t),a=0;a<i.length;a++)r=e[n=i[a]],o=t[n],x(e,n)?l(r)&&l(o)&&Oe(r,o):Re(e,n,o);return e}function Pe(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,o="function"==typeof e?e.call(n,n):e;return r?Oe(r,o):o}:t?e?function(){return Oe("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Ie(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function Be(e,t,n,r){var o=Object.create(e||null);return t?R(o,t):o}De.data=function(e,t,n){return n?Pe(e,t,n):t&&"function"!=typeof t?e:Pe(e,t)},H.forEach(function(e){De[e]=Ie}),F.forEach(function(e){De[e+"s"]=Be}),De.watch=function(e,t,n,r){if(e===ee&&(e=void 0),t===ee&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var o={};for(var i in R(o,e),t){var a=o[i],s=t[i];a&&!Array.isArray(a)&&(a=[a]),o[i]=a?a.concat(s):Array.isArray(s)?s:[s]}return o},De.props=De.methods=De.inject=De.computed=function(e,t,n,r){if(!e)return t;var o=Object.create(null);return R(o,e),t&&R(o,t),o},De.provide=Pe;var Me=function(e,t){return void 0===t?e:t};function Le(e,t,n){"function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,o,i={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])&&(i[k(o)]={type:null});else if(l(n))for(var a in n)o=n[a],i[k(a)]=l(o)?o:{type:o};e.props=i}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(l(n))for(var i in n){var a=n[i];r[i]=l(a)?R({from:i},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t);var r=t.extends;if(r&&(e=Le(e,r,n)),t.mixins)for(var o=0,i=t.mixins.length;o<i;o++)e=Le(e,t.mixins[o],n);var a,s={};for(a in e)c(a);for(a in t)x(e,a)||c(a);function c(r){var o=De[r]||Me;s[r]=o(e[r],t[r],n,r)}return s}function Fe(e,t,n,r){if("string"==typeof n){var o=e[t];if(x(o,n))return o[n];var i=k(n);if(x(o,i))return o[i];var a=T(i);return x(o,a)?o[a]:o[n]||o[i]||o[a]}}function He(e,t,n,r){var o=t[e],i=!x(n,e),a=n[e],s=$e(Boolean,o.type);if(s>-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===E(e)){var c=$e(String,o.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!x(t,"default"))return;var r=t.default;0;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==ze(t.type)?r.call(e):r}(r,o,e);var u=Ce;ke(!0),Se(a),ke(u)}return a}function ze(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Ue(e,t){return ze(e)===ze(t)}function $e(e,t){if(!Array.isArray(t))return Ue(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Ue(t[n],e))return n;return-1}function je(e,t,n){if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){We(e,r,"errorCaptured hook")}}We(e,t,n)}function We(e,t,n){if(z.errorHandler)try{return z.errorHandler.call(null,e,t,n)}catch(e){qe(e,null,"config.errorHandler")}qe(e,t,n)}function qe(e,t,n){if(!V&&!G||"undefined"==typeof console)throw e;console.error(e)}var Ve,Ge,Ye=[],Ke=!1;function Xe(){Ke=!1;var e=Ye.slice(0);Ye.length=0;for(var t=0;t<e.length;t++)e[t]()}var Je=!1;if(void 0!==n&&ie(n))Ge=function(){n(Xe)};else if("undefined"==typeof MessageChannel||!ie(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Ge=function(){setTimeout(Xe,0)};else{var Ze=new MessageChannel,Qe=Ze.port2;Ze.port1.onmessage=Xe,Ge=function(){Qe.postMessage(1)}}if("undefined"!=typeof Promise&&ie(Promise)){var et=Promise.resolve();Ve=function(){et.then(Xe),Q&&setTimeout(D)}}else Ve=Ge;function tt(e,t){var n;if(Ye.push(function(){if(e)try{e.call(t)}catch(e){je(e,t,"nextTick")}else n&&n(t)}),Ke||(Ke=!0,Je?Ge():Ve()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var nt=new ae;function rt(e){!function e(t,n){var r,o;var i=Array.isArray(t);if(!i&&!c(t)||Object.isFrozen(t)||t instanceof pe)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)e(t[r],n);else for(o=Object.keys(t),r=o.length;r--;)e(t[o[r]],n)}(e,nt),nt.clear()}var ot,it=w(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function at(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),o=0;o<r.length;o++)r[o].apply(null,e)}return t.fns=e,t}function st(e,t,n,r,i){var a,s,c,u;for(a in e)s=e[a],c=t[a],u=it(a),o(s)||(o(c)?(o(s.fns)&&(s=e[a]=at(s)),n(u.name,s,u.once,u.capture,u.passive,u.params)):s!==c&&(c.fns=s,e[a]=c));for(a in t)o(e[a])&&r((u=it(a)).name,t[a],u.capture)}function ct(e,t,n){var r;e instanceof pe&&(e=e.data.hook||(e.data.hook={}));var s=e[t];function c(){n.apply(this,arguments),b(r.fns,c)}o(s)?r=at([c]):i(s.fns)&&a(s.merged)?(r=s).fns.push(c):r=at([s,c]),r.merged=!0,e[t]=r}function ut(e,t,n,r,o){if(i(t)){if(x(t,n))return e[n]=t[n],o||delete t[n],!0;if(x(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function lt(e){return s(e)?[ve(e)]:Array.isArray(e)?function e(t,n){var r=[];var c,u,l,f;for(c=0;c<t.length;c++)o(u=t[c])||"boolean"==typeof u||(l=r.length-1,f=r[l],Array.isArray(u)?u.length>0&&(ft((u=e(u,(n||"")+"_"+c))[0])&&ft(f)&&(r[l]=ve(f.text+u[0].text),u.shift()),r.push.apply(r,u)):s(u)?ft(f)?r[l]=ve(f.text+u):""!==u&&r.push(ve(u)):ft(u)&&ft(f)?r[l]=ve(f.text+u.text):(a(t._isVList)&&i(u.tag)&&o(u.key)&&i(n)&&(u.key="__vlist"+n+"_"+c+"__"),r.push(u)));return r}(e):void 0}function ft(e){return i(e)&&i(e.text)&&!1===e.isComment}function dt(e,t){return(e.__esModule||se&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function mt(e){return e.isComment&&e.asyncFactory}function pt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(i(n)&&(i(n.componentOptions)||mt(n)))return n}}function ht(e,t,n){n?ot.$once(e,t):ot.$on(e,t)}function gt(e,t){ot.$off(e,t)}function vt(e,t,n){ot=e,st(t,n||{},ht,gt),ot=void 0}function bt(e,t){var n={};if(!e)return n;for(var r=0,o=e.length;r<o;r++){var i=e[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==t&&i.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(yt)&&delete n[u];return n}function yt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function xt(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?xt(e[n],t):t[e[n].key]=e[n].fn;return t}var wt=null;function Ct(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function kt(e,t){if(t){if(e._directInactive=!1,Ct(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)kt(e.$children[n]);Tt(e,"activated")}}function Tt(e,t){de();var n=e.$options[t];if(n)for(var r=0,o=n.length;r<o;r++)try{n[r].call(e)}catch(n){je(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t),me()}var _t=[],Et=[],St={},Nt=!1,Rt=!1,At=0;function Dt(){var e,t;for(Rt=!0,_t.sort(function(e,t){return e.id-t.id}),At=0;At<_t.length;At++)t=(e=_t[At]).id,St[t]=null,e.run();var n=Et.slice(),r=_t.slice();At=_t.length=Et.length=0,St={},Nt=Rt=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,kt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&Tt(r,"updated")}}(r),oe&&z.devtools&&oe.emit("flush")}var Ot=0,Pt=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ot,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ae,this.newDepIds=new ae,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!j.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};Pt.prototype.get=function(){var e;de(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;je(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&rt(e),me(),this.cleanupDeps()}return e},Pt.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Pt.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Pt.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==St[t]){if(St[t]=!0,Rt){for(var n=_t.length-1;n>At&&_t[n].id>e.id;)n--;_t.splice(n+1,0,e)}else _t.push(e);Nt||(Nt=!0,tt(Dt))}}(this)},Pt.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){je(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Pt.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Pt.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Pt.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var It={enumerable:!0,configurable:!0,get:D,set:D};function Bt(e,t,n){It.get=function(){return this[t][n]},It.set=function(e){this[t][n]=e},Object.defineProperty(e,n,It)}function Mt(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[];e.$parent&&ke(!1);var i=function(i){o.push(i);var a=He(i,t,n,e);Ne(r,i,a),i in e||Bt(e,"_props",i)};for(var a in t)i(a);ke(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?D:S(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){de();try{return e.call(t,t)}catch(e){return je(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&x(r,i)||U(i)||Bt(e,"_data",i)}Se(t,!0)}(e):Se(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=re();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new Pt(e,a||D,D,Lt)),o in e||Ft(e,o,i)}}(e,t.computed),t.watch&&t.watch!==ee&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)zt(e,n,r[o]);else zt(e,n,r)}}(e,t.watch)}var Lt={lazy:!0};function Ft(e,t,n){var r=!re();"function"==typeof n?(It.get=r?Ht(t):n,It.set=D):(It.get=n.get?r&&!1!==n.cache?Ht(t):n.get:D,It.set=n.set?n.set:D),Object.defineProperty(e,t,It)}function Ht(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),le.target&&t.depend(),t.value}}function zt(e,t,n,r){return l(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Ut(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):Object.keys(e),o=0;o<r.length;o++){for(var i=r[o],a=e[i].from,s=t;s;){if(s._provided&&x(s._provided,a)){n[i]=s._provided[a];break}s=s.$parent}if(!s)if("default"in e[i]){var c=e[i].default;n[i]="function"==typeof c?c.call(t):c}else 0}return n}}function $t(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,o=e.length;r<o;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(c(e))for(a=Object.keys(e),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=t(e[s],s,r);return i(n)&&(n._isVList=!0),n}function jt(e,t,n,r){var o,i=this.$scopedSlots[e];if(i)n=n||{},r&&(n=R(R({},r),n)),o=i(n)||t;else{var a=this.$slots[e];a&&(a._rendered=!0),o=a||t}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function Wt(e){return Fe(this.$options,"filters",e)||P}function qt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Vt(e,t,n,r,o){var i=z.keyCodes[t]||n;return o&&r&&!z.keyCodes[t]?qt(o,r):i?qt(i,e):r?E(r)!==t:void 0}function Gt(e,t,n,r,o){if(n)if(c(n)){var i;Array.isArray(n)&&(n=A(n));var a=function(a){if("class"===a||"style"===a||v(a))i=e;else{var s=e.attrs&&e.attrs.type;i=r||z.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}a in i||(i[a]=n[a],o&&((e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}))};for(var s in n)a(s)}else;return e}function Yt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(Xt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r)}function Kt(e,t,n){return Xt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Xt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Jt(e[r],t+"_"+r,n);else Jt(e,t,n)}function Jt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Zt(e,t){if(t)if(l(t)){var n=e.on=e.on?R({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(o,i):i}}else;return e}function Qt(e){e._o=Kt,e._n=p,e._s=m,e._l=$t,e._t=jt,e._q=I,e._i=B,e._m=Yt,e._f=Wt,e._k=Vt,e._b=Gt,e._v=ve,e._e=ge,e._u=xt,e._g=Zt}function en(e,t,n,o,i){var s,c=i.options;x(o,"_uid")?(s=Object.create(o))._original=o:(s=o,o=o._original);var u=a(c._compiled),l=!u;this.data=e,this.props=t,this.children=n,this.parent=o,this.listeners=e.on||r,this.injections=Ut(c.inject,o),this.slots=function(){return bt(n,o)},u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=e.scopedSlots||r),c._scopeId?this._c=function(e,t,n,r){var i=un(s,e,t,n,r,l);return i&&!Array.isArray(i)&&(i.fnScopeId=c._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return un(s,e,t,n,r,l)}}function tn(e,t,n,r){var o=be(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function nn(e,t){for(var n in t)e[k(n)]=t[n]}Qt(en.prototype);var rn={init:function(e,t,n,r){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var o=e;rn.prepatch(o,o)}else{(e.componentInstance=function(e,t,n,r){var o={_isComponent:!0,parent:t,_parentVnode:e,_parentElm:n||null,_refElm:r||null},a=e.data.inlineTemplate;i(a)&&(o.render=a.render,o.staticRenderFns=a.staticRenderFns);return new e.componentOptions.Ctor(o)}(e,wt,n,r)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,o,i){var a=!!(i||e.$options._renderChildren||o.data.scopedSlots||e.$scopedSlots!==r);if(e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i,e.$attrs=o.data.attrs||r,e.$listeners=n||r,t&&e.$options.props){ke(!1);for(var s=e._props,c=e.$options._propKeys||[],u=0;u<c.length;u++){var l=c[u],f=e.$options.props;s[l]=He(l,f,t,e)}ke(!0),e.$options.propsData=t}n=n||r;var d=e.$options._parentListeners;e.$options._parentListeners=n,vt(e,n,d),a&&(e.$slots=bt(i,o.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Tt(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,Et.push(t)):kt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(!(n&&(t._directInactive=!0,Ct(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);Tt(t,"deactivated")}}(t,!0):t.$destroy())}},on=Object.keys(rn);function an(e,t,n,s,u){if(!o(e)){var l=n.$options._base;if(c(e)&&(e=l.extend(e)),"function"==typeof e){var f;if(o(e.cid)&&void 0===(e=function(e,t,n){if(a(e.error)&&i(e.errorComp))return e.errorComp;if(i(e.resolved))return e.resolved;if(a(e.loading)&&i(e.loadingComp))return e.loadingComp;if(!i(e.contexts)){var r=e.contexts=[n],s=!0,u=function(){for(var e=0,t=r.length;e<t;e++)r[e].$forceUpdate()},l=M(function(n){e.resolved=dt(n,t),s||u()}),f=M(function(t){i(e.errorComp)&&(e.error=!0,u())}),d=e(l,f);return c(d)&&("function"==typeof d.then?o(e.resolved)&&d.then(l,f):i(d.component)&&"function"==typeof d.component.then&&(d.component.then(l,f),i(d.error)&&(e.errorComp=dt(d.error,t)),i(d.loading)&&(e.loadingComp=dt(d.loading,t),0===d.delay?e.loading=!0:setTimeout(function(){o(e.resolved)&&o(e.error)&&(e.loading=!0,u())},d.delay||200)),i(d.timeout)&&setTimeout(function(){o(e.resolved)&&f(null)},d.timeout))),s=!1,e.loading?e.loadingComp:e.resolved}e.contexts.push(n)}(f=e,l,n)))return function(e,t,n,r,o){var i=ge();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}(f,t,n,s,u);t=t||{},fn(e),i(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var o=t.on||(t.on={});i(o[r])?o[r]=[t.model.callback].concat(o[r]):o[r]=t.model.callback}(e.options,t);var d=function(e,t,n){var r=t.options.props;if(!o(r)){var a={},s=e.attrs,c=e.props;if(i(s)||i(c))for(var u in r){var l=E(u);ut(a,c,u,l,!0)||ut(a,s,u,l,!1)}return a}}(t,e);if(a(e.options.functional))return function(e,t,n,o,a){var s=e.options,c={},u=s.props;if(i(u))for(var l in u)c[l]=He(l,u,t||r);else i(n.attrs)&&nn(c,n.attrs),i(n.props)&&nn(c,n.props);var f=new en(n,c,a,o,e),d=s.render.call(null,f._c,f);if(d instanceof pe)return tn(d,n,f.parent,s);if(Array.isArray(d)){for(var m=lt(d)||[],p=new Array(m.length),h=0;h<m.length;h++)p[h]=tn(m[h],n,f.parent,s);return p}}(e,d,t,n,s);var m=t.on;if(t.on=t.nativeOn,a(e.options.abstract)){var p=t.slot;t={},p&&(t.slot=p)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<on.length;n++){var r=on[n];t[r]=rn[r]}}(t);var h=e.options.name||u;return new pe("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:d,listeners:m,tag:u,children:s},f)}}}var sn=1,cn=2;function un(e,t,n,r,u,l){return(Array.isArray(n)||s(n))&&(u=r,r=n,n=void 0),a(l)&&(u=cn),function(e,t,n,r,s){if(i(n)&&i(n.__ob__))return ge();i(n)&&i(n.is)&&(t=n.is);if(!t)return ge();0;Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);s===cn?r=lt(r):s===sn&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var u,l;if("string"==typeof t){var f;l=e.$vnode&&e.$vnode.ns||z.getTagNamespace(t),u=z.isReservedTag(t)?new pe(z.parsePlatformTagName(t),n,r,void 0,void 0,e):i(f=Fe(e.$options,"components",t))?an(f,n,e,r,t):new pe(t,n,r,void 0,void 0,e)}else u=an(t,n,e,r);return Array.isArray(u)?u:i(u)?(i(l)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(n=void 0,r=!0);if(i(t.children))for(var s=0,c=t.children.length;s<c;s++){var u=t.children[s];i(u.tag)&&(o(u.ns)||a(r)&&"svg"!==u.tag)&&e(u,n,r)}}(u,l),i(n)&&function(e){c(e.style)&&rt(e.style);c(e.class)&&rt(e.class)}(n),u):ge()}(e,t,n,r,u)}var ln=0;function fn(e){var t=e.options;if(e.super){var n=fn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.extendOptions,o=e.sealedOptions;for(var i in n)n[i]!==o[i]&&(t||(t={}),t[i]=dn(n[i],r[i],o[i]));return t}(e);r&&R(e.extendOptions,r),(t=e.options=Le(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function dn(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var o=0;o<e.length;o++)(t.indexOf(e[o])>=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}function mn(e){this._init(e)}function pn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name;var a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=Le(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)Bt(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)Ft(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=R({},a.options),o[r]=a,a}}function hn(e){return e&&(e.Ctor.options.name||e.tag)}function gn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function vn(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=hn(a.componentOptions);s&&!t(s)&&bn(n,i,r,o)}}}function bn(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,b(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=ln++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r,n._parentElm=t._parentElm,n._refElm=t._refElm;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Le(fn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&vt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,o=n&&n.context;e.$slots=bt(t._renderChildren,o),e.$scopedSlots=r,e._c=function(t,n,r,o){return un(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return un(e,t,n,r,o,!0)};var i=n&&n.data;Ne(e,"$attrs",i&&i.attrs||r,null,!0),Ne(e,"$listeners",t._parentListeners||r,null,!0)}(t),Tt(t,"beforeCreate"),function(e){var t=Ut(e.$options.inject,e);t&&(ke(!1),Object.keys(t).forEach(function(n){Ne(e,n,t[n])}),ke(!0))}(t),Mt(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),Tt(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(mn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Re,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(l(t))return zt(this,e,t,n);(n=n||{}).user=!0;var r=new Pt(this,e,t,n);return n.immediate&&t.call(this,r.value),function(){r.teardown()}}}(mn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){if(Array.isArray(e))for(var r=0,o=e.length;r<o;r++)this.$on(e[r],n);else(this._events[e]||(this._events[e]=[])).push(n),t.test(e)&&(this._hasHookEvent=!0);return this},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,o=e.length;r<o;r++)this.$off(e[r],t);return n}var i=n._events[e];if(!i)return n;if(!t)return n._events[e]=null,n;if(t)for(var a,s=i.length;s--;)if((a=i[s])===t||a.fn===t){i.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?N(n):n;for(var r=N(arguments,1),o=0,i=n.length;o<i;o++)try{n[o].apply(t,r)}catch(n){je(n,t,'event handler for "'+e+'"')}}return t}}(mn),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&Tt(n,"beforeUpdate");var r=n.$el,o=n._vnode,i=wt;wt=n,n._vnode=e,o?n.$el=n.__patch__(o,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),wt=i,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Tt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||b(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Tt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(mn),function(e){Qt(e.prototype),e.prototype.$nextTick=function(e){return tt(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,o=n.render,i=n._parentVnode;i&&(t.$scopedSlots=i.data.scopedSlots||r),t.$vnode=i;try{e=o.call(t._renderProxy,t.$createElement)}catch(n){je(n,t,"render"),e=t._vnode}return e instanceof pe||(e=ge()),e.parent=i,e}}(mn);var yn=[String,RegExp,Array],xn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:yn,exclude:yn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)bn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){vn(e,function(e){return gn(t,e)})}),this.$watch("exclude",function(t){vn(e,function(e){return!gn(t,e)})})},render:function(){var e=this.$slots.default,t=pt(e),n=t&&t.componentOptions;if(n){var r=hn(n),o=this.include,i=this.exclude;if(o&&(!r||!gn(o,r))||i&&r&&gn(i,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,b(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&bn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return z}};Object.defineProperty(e,"config",t),e.util={warn:ce,extend:R,mergeOptions:Le,defineReactive:Ne},e.set=Re,e.delete=Ae,e.nextTick=tt,e.options=Object.create(null),F.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,R(e.options.components,xn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=N(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Le(this.options,e),this}}(e),pn(e),function(e){F.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(mn),Object.defineProperty(mn.prototype,"$isServer",{get:re}),Object.defineProperty(mn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(mn,"FunctionalRenderContext",{value:en}),mn.version="2.5.17";var wn=h("style,class"),Cn=h("input,textarea,option,select,progress"),kn=function(e,t,n){return"value"===n&&Cn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Tn=h("contenteditable,draggable,spellcheck"),_n=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),En="http://www.w3.org/1999/xlink",Sn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Nn=function(e){return Sn(e)?e.slice(6,e.length):""},Rn=function(e){return null==e||!1===e};function An(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Dn(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=Dn(t,n.data));return function(e,t){if(i(e)||i(t))return On(e,Pn(t));return""}(t.staticClass,t.class)}function Dn(e,t){return{staticClass:On(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function On(e,t){return e?t?e+" "+t:e:t||""}function Pn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r<o;r++)i(t=Pn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):c(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var In={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Bn=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Mn=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Ln=function(e){return Bn(e)||Mn(e)};function Fn(e){return Mn(e)?"svg":"math"===e?"math":void 0}var Hn=Object.create(null);var zn=h("text,number,password,search,email,tel,url");function Un(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var $n=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(In[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),jn={create:function(e,t){Wn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Wn(e,!0),Wn(t))},destroy:function(e){Wn(e,!0)}};function Wn(e,t){var n=e.data.ref;if(i(n)){var r=e.context,o=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?b(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}var qn=new pe("",{},[]),Vn=["create","activate","update","remove","destroy"];function Gn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&i(e.data)===i(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=i(n=e.data)&&i(n=n.attrs)&&n.type,o=i(n=t.data)&&i(n=n.attrs)&&n.type;return r===o||zn(r)&&zn(o)}(e,t)||a(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&o(t.asyncFactory.error))}function Yn(e,t,n){var r,o,a={};for(r=t;r<=n;++r)i(o=e[r].key)&&(a[o]=r);return a}var Kn={create:Xn,update:Xn,destroy:function(e){Xn(e,qn)}};function Xn(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,o,i=e===qn,a=t===qn,s=Zn(e.data.directives,e.context),c=Zn(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,er(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(er(o,"bind",t,e),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)er(u[n],"inserted",t,e)};i?ct(t,"insert",f):f()}l.length&&ct(t,"postpatch",function(){for(var n=0;n<l.length;n++)er(l[n],"componentUpdated",t,e)});if(!i)for(n in s)c[n]||er(s[n],"unbind",e,e,a)}(e,t)}var Jn=Object.create(null);function Zn(e,t){var n,r,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=Jn),o[Qn(r)]=r,r.def=Fe(t.$options,"directives",r.name);return o}function Qn(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function er(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){je(r,n.context,"directive "+e.name+" "+t+" hook")}}var tr=[jn,Kn];function nr(e,t){var n=t.componentOptions;if(!(i(n)&&!1===n.Ctor.options.inheritAttrs||o(e.data.attrs)&&o(t.data.attrs))){var r,a,s=t.elm,c=e.data.attrs||{},u=t.data.attrs||{};for(r in i(u.__ob__)&&(u=t.data.attrs=R({},u)),u)a=u[r],c[r]!==a&&rr(s,r,a);for(r in(X||Z)&&u.value!==c.value&&rr(s,"value",u.value),c)o(u[r])&&(Sn(r)?s.removeAttributeNS(En,Nn(r)):Tn(r)||s.removeAttribute(r))}}function rr(e,t,n){e.tagName.indexOf("-")>-1?or(e,t,n):_n(t)?Rn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Tn(t)?e.setAttribute(t,Rn(n)||"false"===n?"false":"true"):Sn(t)?Rn(n)?e.removeAttributeNS(En,Nn(t)):e.setAttributeNS(En,t,n):or(e,t,n)}function or(e,t,n){if(Rn(n))e.removeAttribute(t);else{if(X&&!J&&"TEXTAREA"===e.tagName&&"placeholder"===t&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var ir={create:nr,update:nr};function ar(e,t){var n=t.elm,r=t.data,a=e.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var s=An(t),c=n._transitionClasses;i(c)&&(s=On(s,Pn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var sr,cr,ur,lr,fr,dr,mr={create:ar,update:ar},pr=/[\w).+\-_$\]]/;function hr(e){var t,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,m=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(u)47===t&&92!==n&&(u=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||l||f||d){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===t){for(var p=r-1,h=void 0;p>=0&&" "===(h=e.charAt(p));p--);h&&pr.test(h)||(u=!0)}}else void 0===o?(m=r+1,o=e.slice(0,r).trim()):g();function g(){(i||(i=[])).push(e.slice(m,r).trim()),m=r+1}if(void 0===o?o=e.slice(0,r).trim():0!==m&&g(),i)for(r=0;r<i.length;r++)o=gr(o,i[r]);return o}function gr(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),o=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==o?","+o:o)}function vr(e){console.error("[Vue compiler]: "+e)}function br(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function yr(e,t,n){(e.props||(e.props=[])).push({name:t,value:n}),e.plain=!1}function xr(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n}),e.plain=!1}function wr(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function Cr(e,t,n,r,o,i){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:o,modifiers:i}),e.plain=!1}function kr(e,t,n,o,i,a){var s;(o=o||r).capture&&(delete o.capture,t="!"+t),o.once&&(delete o.once,t="~"+t),o.passive&&(delete o.passive,t="&"+t),"click"===t&&(o.right?(t="contextmenu",delete o.right):o.middle&&(t="mouseup")),o.native?(delete o.native,s=e.nativeEvents||(e.nativeEvents={})):s=e.events||(e.events={});var c={value:n.trim()};o!==r&&(c.modifiers=o);var u=s[t];Array.isArray(u)?i?u.unshift(c):u.push(c):s[t]=u?i?[c,u]:[u,c]:c,e.plain=!1}function Tr(e,t,n){var r=_r(e,":"+t)||_r(e,"v-bind:"+t);if(null!=r)return hr(r);if(!1!==n){var o=_r(e,t);if(null!=o)return JSON.stringify(o)}}function _r(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var o=e.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===t){o.splice(i,1);break}return n&&delete e.attrsMap[t],r}function Er(e,t,n){var r=n||{},o=r.number,i="$$v";r.trim&&(i="(typeof $$v === 'string'? $$v.trim(): $$v)"),o&&(i="_n("+i+")");var a=Sr(t,i);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+a+"}"}}function Sr(e,t){var n=function(e){if(e=e.trim(),sr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<sr-1)return(lr=e.lastIndexOf("."))>-1?{exp:e.slice(0,lr),key:'"'+e.slice(lr+1)+'"'}:{exp:e,key:null};cr=e,lr=fr=dr=0;for(;!Rr();)Ar(ur=Nr())?Or(ur):91===ur&&Dr(ur);return{exp:e.slice(0,fr),key:e.slice(fr+1,dr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Nr(){return cr.charCodeAt(++lr)}function Rr(){return lr>=sr}function Ar(e){return 34===e||39===e}function Dr(e){var t=1;for(fr=lr;!Rr();)if(Ar(e=Nr()))Or(e);else if(91===e&&t++,93===e&&t--,0===t){dr=lr;break}}function Or(e){for(var t=e;!Rr()&&(e=Nr())!==t;);}var Pr,Ir="__r",Br="__c";function Mr(e,t,n,r,o){var i;t=(i=t)._withTask||(i._withTask=function(){Je=!0;var e=i.apply(null,arguments);return Je=!1,e}),n&&(t=function(e,t,n){var r=Pr;return function o(){null!==e.apply(null,arguments)&&Lr(t,o,n,r)}}(t,e,r)),Pr.addEventListener(e,t,te?{capture:r,passive:o}:r)}function Lr(e,t,n,r){(r||Pr).removeEventListener(e,t._withTask||t,n)}function Fr(e,t){if(!o(e.data.on)||!o(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Pr=t.elm,function(e){if(i(e[Ir])){var t=X?"change":"input";e[t]=[].concat(e[Ir],e[t]||[]),delete e[Ir]}i(e[Br])&&(e.change=[].concat(e[Br],e.change||[]),delete e[Br])}(n),st(n,r,Mr,Lr,t.context),Pr=void 0}}var Hr={create:Fr,update:Fr};function zr(e,t){if(!o(e.data.domProps)||!o(t.data.domProps)){var n,r,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in i(c.__ob__)&&(c=t.data.domProps=R({},c)),s)o(c[n])&&(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=r;var u=o(r)?"":String(r);Ur(a,u)&&(a.value=u)}else a[n]=r}}}function Ur(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return p(n)!==p(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var $r={create:zr,update:zr},jr=w(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function Wr(e){var t=qr(e.style);return e.staticStyle?R(e.staticStyle,t):t}function qr(e){return Array.isArray(e)?A(e):"string"==typeof e?jr(e):e}var Vr,Gr=/^--/,Yr=/\s*!important$/,Kr=function(e,t,n){if(Gr.test(t))e.style.setProperty(t,n);else if(Yr.test(n))e.style.setProperty(t,n.replace(Yr,""),"important");else{var r=Jr(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}},Xr=["Webkit","Moz","ms"],Jr=w(function(e){if(Vr=Vr||document.createElement("div").style,"filter"!==(e=k(e))&&e in Vr)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Xr.length;n++){var r=Xr[n]+t;if(r in Vr)return r}});function Zr(e,t){var n=t.data,r=e.data;if(!(o(n.staticStyle)&&o(n.style)&&o(r.staticStyle)&&o(r.style))){var a,s,c=t.elm,u=r.staticStyle,l=r.normalizedStyle||r.style||{},f=u||l,d=qr(t.data.style)||{};t.data.normalizedStyle=i(d.__ob__)?R({},d):d;var m=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=Wr(o.data))&&R(r,n);(n=Wr(e.data))&&R(r,n);for(var i=e;i=i.parent;)i.data&&(n=Wr(i.data))&&R(r,n);return r}(t,!0);for(s in f)o(m[s])&&Kr(c,s,"");for(s in m)(a=m[s])!==f[s]&&Kr(c,s,null==a?"":a)}}var Qr={create:Zr,update:Zr};function eo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function to(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function no(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&R(t,ro(e.name||"v")),R(t,e),t}return"string"==typeof e?ro(e):void 0}}var ro=w(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),oo=V&&!J,io="transition",ao="animation",so="transition",co="transitionend",uo="animation",lo="animationend";oo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(so="WebkitTransition",co="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(uo="WebkitAnimation",lo="webkitAnimationEnd"));var fo=V?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function mo(e){fo(function(){fo(e)})}function po(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),eo(e,t))}function ho(e,t){e._transitionClasses&&b(e._transitionClasses,t),to(e,t)}function go(e,t,n){var r=bo(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===io?co:lo,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},i+1),e.addEventListener(s,l)}var vo=/\b(transform|all)(,|$)/;function bo(e,t){var n,r=window.getComputedStyle(e),o=r[so+"Delay"].split(", "),i=r[so+"Duration"].split(", "),a=yo(o,i),s=r[uo+"Delay"].split(", "),c=r[uo+"Duration"].split(", "),u=yo(s,c),l=0,f=0;return t===io?a>0&&(n=io,l=a,f=i.length):t===ao?u>0&&(n=ao,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?io:ao:null)?n===io?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===io&&vo.test(r[so+"Property"])}}function yo(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return xo(t)+xo(e[n])}))}function xo(e){return 1e3*Number(e.slice(0,-1))}function wo(e,t){var n=e.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=no(e.data.transition);if(!o(r)&&!i(n._enterCb)&&1===n.nodeType){for(var a=r.css,s=r.type,u=r.enterClass,l=r.enterToClass,f=r.enterActiveClass,d=r.appearClass,m=r.appearToClass,h=r.appearActiveClass,g=r.beforeEnter,v=r.enter,b=r.afterEnter,y=r.enterCancelled,x=r.beforeAppear,w=r.appear,C=r.afterAppear,k=r.appearCancelled,T=r.duration,_=wt,E=wt.$vnode;E&&E.parent;)_=(E=E.parent).context;var S=!_._isMounted||!e.isRootInsert;if(!S||w||""===w){var N=S&&d?d:u,R=S&&h?h:f,A=S&&m?m:l,D=S&&x||g,O=S&&"function"==typeof w?w:v,P=S&&C||b,I=S&&k||y,B=p(c(T)?T.enter:T);0;var L=!1!==a&&!J,F=To(O),H=n._enterCb=M(function(){L&&(ho(n,A),ho(n,R)),H.cancelled?(L&&ho(n,N),I&&I(n)):P&&P(n),n._enterCb=null});e.data.show||ct(e,"insert",function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,H)}),D&&D(n),L&&(po(n,N),po(n,R),mo(function(){ho(n,N),H.cancelled||(po(n,A),F||(ko(B)?setTimeout(H,B):go(n,s,H)))})),e.data.show&&(t&&t(),O&&O(n,H)),L||F||H()}}}function Co(e,t){var n=e.elm;i(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=no(e.data.transition);if(o(r)||1!==n.nodeType)return t();if(!i(n._leaveCb)){var a=r.css,s=r.type,u=r.leaveClass,l=r.leaveToClass,f=r.leaveActiveClass,d=r.beforeLeave,m=r.leave,h=r.afterLeave,g=r.leaveCancelled,v=r.delayLeave,b=r.duration,y=!1!==a&&!J,x=To(m),w=p(c(b)?b.leave:b);0;var C=n._leaveCb=M(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),y&&(ho(n,l),ho(n,f)),C.cancelled?(y&&ho(n,u),g&&g(n)):(t(),h&&h(n)),n._leaveCb=null});v?v(k):k()}function k(){C.cancelled||(e.data.show||((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),d&&d(n),y&&(po(n,u),po(n,f),mo(function(){ho(n,u),C.cancelled||(po(n,l),x||(ko(w)?setTimeout(C,w):go(n,s,C)))})),m&&m(n,C),y||x||C())}}function ko(e){return"number"==typeof e&&!isNaN(e)}function To(e){if(o(e))return!1;var t=e.fns;return i(t)?To(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function _o(e,t){!0!==t.data.show&&wo(t)}var Eo=function(e){var t,n,r={},c=e.modules,u=e.nodeOps;for(t=0;t<Vn.length;++t)for(r[Vn[t]]=[],n=0;n<c.length;++n)i(c[n][Vn[t]])&&r[Vn[t]].push(c[n][Vn[t]]);function l(e){var t=u.parentNode(e);i(t)&&u.removeChild(t,e)}function f(e,t,n,o,s,c,l){if(i(e.elm)&&i(c)&&(e=c[l]=be(e)),e.isRootInsert=!s,!function(e,t,n,o){var s=e.data;if(i(s)){var c=i(e.componentInstance)&&s.keepAlive;if(i(s=s.hook)&&i(s=s.init)&&s(e,!1,n,o),i(e.componentInstance))return d(e,t),a(c)&&function(e,t,n,o){for(var a,s=e;s.componentInstance;)if(s=s.componentInstance._vnode,i(a=s.data)&&i(a=a.transition)){for(a=0;a<r.activate.length;++a)r.activate[a](qn,s);t.push(s);break}m(n,e.elm,o)}(e,t,n,o),!0}}(e,t,n,o)){var f=e.data,h=e.children,g=e.tag;i(g)?(e.elm=e.ns?u.createElementNS(e.ns,g):u.createElement(g,e),b(e),p(e,h,t),i(f)&&v(e,t),m(n,e.elm,o)):a(e.isComment)?(e.elm=u.createComment(e.text),m(n,e.elm,o)):(e.elm=u.createTextNode(e.text),m(n,e.elm,o))}}function d(e,t){i(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,g(e)?(v(e,t),b(e)):(Wn(e),t.push(e))}function m(e,t,n){i(e)&&(i(n)?n.parentNode===e&&u.insertBefore(e,t,n):u.appendChild(e,t))}function p(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)f(t[r],n,e.elm,null,!0,t,r);else s(e.text)&&u.appendChild(e.elm,u.createTextNode(String(e.text)))}function g(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return i(e.tag)}function v(e,n){for(var o=0;o<r.create.length;++o)r.create[o](qn,e);i(t=e.data.hook)&&(i(t.create)&&t.create(qn,e),i(t.insert)&&n.push(e))}function b(e){var t;if(i(t=e.fnScopeId))u.setStyleScope(e.elm,t);else for(var n=e;n;)i(t=n.context)&&i(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t),n=n.parent;i(t=wt)&&t!==e.context&&t!==e.fnContext&&i(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t)}function y(e,t,n,r,o,i){for(;r<=o;++r)f(n[r],i,e,t,!1,n,r)}function x(e){var t,n,o=e.data;if(i(o))for(i(t=o.hook)&&i(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(i(t=e.children))for(n=0;n<e.children.length;++n)x(e.children[n])}function w(e,t,n,r){for(;n<=r;++n){var o=t[n];i(o)&&(i(o.tag)?(C(o),x(o)):l(o.elm))}}function C(e,t){if(i(t)||i(e.data)){var n,o=r.remove.length+1;for(i(t)?t.listeners+=o:t=function(e,t){function n(){0==--n.listeners&&l(e)}return n.listeners=t,n}(e.elm,o),i(n=e.componentInstance)&&i(n=n._vnode)&&i(n.data)&&C(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);i(n=e.data.hook)&&i(n=n.remove)?n(e,t):t()}else l(e.elm)}function k(e,t,n,r){for(var o=n;o<r;o++){var a=t[o];if(i(a)&&Gn(e,a))return o}}function T(e,t,n,s){if(e!==t){var c=t.elm=e.elm;if(a(e.isAsyncPlaceholder))i(t.asyncFactory.resolved)?S(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(a(t.isStatic)&&a(e.isStatic)&&t.key===e.key&&(a(t.isCloned)||a(t.isOnce)))t.componentInstance=e.componentInstance;else{var l,d=t.data;i(d)&&i(l=d.hook)&&i(l=l.prepatch)&&l(e,t);var m=e.children,p=t.children;if(i(d)&&g(t)){for(l=0;l<r.update.length;++l)r.update[l](e,t);i(l=d.hook)&&i(l=l.update)&&l(e,t)}o(t.text)?i(m)&&i(p)?m!==p&&function(e,t,n,r,a){for(var s,c,l,d=0,m=0,p=t.length-1,h=t[0],g=t[p],v=n.length-1,b=n[0],x=n[v],C=!a;d<=p&&m<=v;)o(h)?h=t[++d]:o(g)?g=t[--p]:Gn(h,b)?(T(h,b,r),h=t[++d],b=n[++m]):Gn(g,x)?(T(g,x,r),g=t[--p],x=n[--v]):Gn(h,x)?(T(h,x,r),C&&u.insertBefore(e,h.elm,u.nextSibling(g.elm)),h=t[++d],x=n[--v]):Gn(g,b)?(T(g,b,r),C&&u.insertBefore(e,g.elm,h.elm),g=t[--p],b=n[++m]):(o(s)&&(s=Yn(t,d,p)),o(c=i(b.key)?s[b.key]:k(b,t,d,p))?f(b,r,e,h.elm,!1,n,m):Gn(l=t[c],b)?(T(l,b,r),t[c]=void 0,C&&u.insertBefore(e,l.elm,h.elm)):f(b,r,e,h.elm,!1,n,m),b=n[++m]);d>p?y(e,o(n[v+1])?null:n[v+1].elm,n,m,v,r):m>v&&w(0,t,d,p)}(c,m,p,n,s):i(p)?(i(e.text)&&u.setTextContent(c,""),y(c,null,p,0,p.length-1,n)):i(m)?w(0,m,0,m.length-1):i(e.text)&&u.setTextContent(c,""):e.text!==t.text&&u.setTextContent(c,t.text),i(d)&&i(l=d.hook)&&i(l=l.postpatch)&&l(e,t)}}}function _(e,t,n){if(a(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var E=h("attrs,class,staticClass,staticStyle,key");function S(e,t,n,r){var o,s=t.tag,c=t.data,u=t.children;if(r=r||c&&c.pre,t.elm=e,a(t.isComment)&&i(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(i(c)&&(i(o=c.hook)&&i(o=o.init)&&o(t,!0),i(o=t.componentInstance)))return d(t,n),!0;if(i(s)){if(i(u))if(e.hasChildNodes())if(i(o=c)&&i(o=o.domProps)&&i(o=o.innerHTML)){if(o!==e.innerHTML)return!1}else{for(var l=!0,f=e.firstChild,m=0;m<u.length;m++){if(!f||!S(f,u[m],n,r)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else p(t,u,n);if(i(c)){var h=!1;for(var g in c)if(!E(g)){h=!0,v(t,n);break}!h&&c.class&&rt(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,s,c,l){if(!o(t)){var d,m=!1,p=[];if(o(e))m=!0,f(t,p,c,l);else{var h=i(e.nodeType);if(!h&&Gn(e,t))T(e,t,p,s);else{if(h){if(1===e.nodeType&&e.hasAttribute(L)&&(e.removeAttribute(L),n=!0),a(n)&&S(e,t,p))return _(t,p,!0),e;d=e,e=new pe(u.tagName(d).toLowerCase(),{},[],void 0,d)}var v=e.elm,b=u.parentNode(v);if(f(t,p,v._leaveCb?null:b,u.nextSibling(v)),i(t.parent))for(var y=t.parent,C=g(t);y;){for(var k=0;k<r.destroy.length;++k)r.destroy[k](y);if(y.elm=t.elm,C){for(var E=0;E<r.create.length;++E)r.create[E](qn,y);var N=y.data.hook.insert;if(N.merged)for(var R=1;R<N.fns.length;R++)N.fns[R]()}else Wn(y);y=y.parent}i(b)?w(0,[e],0,0):i(e.tag)&&x(e)}}return _(t,p,m),t.elm}i(e)&&x(e)}}({nodeOps:$n,modules:[ir,mr,Hr,$r,Qr,V?{create:_o,activate:_o,remove:function(e,t){!0!==e.data.show?Co(e,t):t()}}:{}].concat(tr)});J&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Io(e,"input")});var So={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ct(n,"postpatch",function(){So.componentUpdated(e,t,n)}):No(e,t,n.context),e._vOptions=[].map.call(e.options,Do)):("textarea"===n.tag||zn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Oo),e.addEventListener("compositionend",Po),e.addEventListener("change",Po),J&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){No(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,Do);if(o.some(function(e,t){return!I(e,r[t])}))(e.multiple?t.value.some(function(e){return Ao(e,o)}):t.value!==t.oldValue&&Ao(t.value,o))&&Io(e,"change")}}};function No(e,t,n){Ro(e,t,n),(X||Z)&&setTimeout(function(){Ro(e,t,n)},0)}function Ro(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],o)i=B(r,Do(a))>-1,a.selected!==i&&(a.selected=i);else if(I(Do(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}}function Ao(e,t){return t.every(function(t){return!I(t,e)})}function Do(e){return"_value"in e?e._value:e.value}function Oo(e){e.target.composing=!0}function Po(e){e.target.composing&&(e.target.composing=!1,Io(e.target,"input"))}function Io(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Bo(e){return!e.componentInstance||e.data&&e.data.transition?e:Bo(e.componentInstance._vnode)}var Mo={model:So,show:{bind:function(e,t,n){var r=t.value,o=(n=Bo(n)).data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,wo(n,function(){e.style.display=i})):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Bo(n)).data&&n.data.transition?(n.data.show=!0,r?wo(n,function(){e.style.display=e.__vOriginalDisplay}):Co(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}}},Lo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Fo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Fo(pt(t.children)):e}function Ho(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[k(i)]=o[i];return t}function zo(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Uo={name:"transition",props:Lo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||mt(e)})).length){0;var r=this.mode;0;var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var i=Fo(o);if(!i)return o;if(this._leaving)return zo(e,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Ho(this),u=this._vnode,l=Fo(u);if(i.data.directives&&i.data.directives.some(function(e){return"show"===e.name})&&(i.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(i,l)&&!mt(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=R({},c);if("out-in"===r)return this._leaving=!0,ct(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),zo(e,o);if("in-out"===r){if(mt(i))return u;var d,m=function(){d()};ct(c,"afterEnter",m),ct(c,"enterCancelled",m),ct(f,"delayLeave",function(e){d=e})}}return o}}},$o=R({tag:String,moveClass:String},Lo);function jo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Wo(e){e.data.newPos=e.elm.getBoundingClientRect()}function qo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete $o.mode;var Vo={Transition:Uo,TransitionGroup:{props:$o,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ho(this),s=0;s<o.length;s++){var c=o[s];if(c.tag)if(null!=c.key&&0!==String(c.key).indexOf("__vlist"))i.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a;else;}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var d=r[f];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?u.push(d):l.push(d)}this.kept=e(t,null,u),this.removed=l}return e(t,null,i)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(jo),e.forEach(Wo),e.forEach(qo),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;po(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(co,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(co,e),n._moveCb=null,ho(n,t))})}}))},methods:{hasMove:function(e,t){if(!oo)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){to(n,e)}),eo(n,t),n.style.display="none",this.$el.appendChild(n);var r=bo(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};mn.config.mustUseProp=kn,mn.config.isReservedTag=Ln,mn.config.isReservedAttr=wn,mn.config.getTagNamespace=Fn,mn.config.isUnknownElement=function(e){if(!V)return!0;if(Ln(e))return!1;if(e=e.toLowerCase(),null!=Hn[e])return Hn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Hn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Hn[e]=/HTMLUnknownElement/.test(t.toString())},R(mn.options.directives,Mo),R(mn.options.components,Vo),mn.prototype.__patch__=V?Eo:D,mn.prototype.$mount=function(e,t){return function(e,t,n){return e.$el=t,e.$options.render||(e.$options.render=ge),Tt(e,"beforeMount"),new Pt(e,function(){e._update(e._render(),n)},D,null,!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Tt(e,"mounted")),e}(this,e=e&&V?Un(e):void 0,t)},V&&setTimeout(function(){z.devtools&&oe&&oe.emit("init",mn)},0);var Go=/\{\{((?:.|\n)+?)\}\}/g,Yo=/[-.*+?^${}()|[\]\/\\]/g,Ko=w(function(e){var t=e[0].replace(Yo,"\\$&"),n=e[1].replace(Yo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});function Xo(e,t){var n=t?Ko(t):Go;if(n.test(e)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(o=r.index)>c&&(s.push(i=e.slice(c,o)),a.push(JSON.stringify(i)));var u=hr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c<e.length&&(s.push(i=e.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}var Jo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=_r(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Tr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Zo,Qo={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=_r(e,"style");n&&(e.staticStyle=JSON.stringify(jr(n)));var r=Tr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},ei=function(e){return(Zo=Zo||document.createElement("div")).innerHTML=e,Zo.textContent},ti=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ni=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ri=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),oi=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ii="[a-zA-Z_][\\w\\-\\.]*",ai="((?:"+ii+"\\:)?"+ii+")",si=new RegExp("^<"+ai),ci=/^\s*(\/?)>/,ui=new RegExp("^<\\/"+ai+"[^>]*>"),li=/^<!DOCTYPE [^>]+>/i,fi=/^<!\--/,di=/^<!\[/,mi=!1;"x".replace(/x(.)?/g,function(e,t){mi=""===t});var pi=h("script,style,textarea",!0),hi={},gi={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},vi=/&(?:lt|gt|quot|amp);/g,bi=/&(?:lt|gt|quot|amp|#10|#9);/g,yi=h("pre,textarea",!0),xi=function(e,t){return e&&yi(e)&&"\n"===t[0]};function wi(e,t){var n=t?bi:vi;return e.replace(n,function(e){return gi[e]})}var Ci,ki,Ti,_i,Ei,Si,Ni,Ri,Ai=/^@|^v-on:/,Di=/^v-|^@|^:/,Oi=/([^]*?)\s+(?:in|of)\s+([^]*)/,Pi=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ii=/^\(|\)$/g,Bi=/:(.*)$/,Mi=/^:|^v-bind:/,Li=/\.[^.]+/g,Fi=w(ei);function Hi(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}(t),parent:n,children:[]}}function zi(e,t){Ci=t.warn||vr,Si=t.isPreTag||O,Ni=t.mustUseProp||O,Ri=t.getTagNamespace||O,Ti=br(t.modules,"transformNode"),_i=br(t.modules,"preTransformNode"),Ei=br(t.modules,"postTransformNode"),ki=t.delimiters;var n,r,o=[],i=!1!==t.preserveWhitespace,a=!1,s=!1;function c(e){e.pre&&(a=!1),Si(e.tag)&&(s=!1);for(var n=0;n<Ei.length;n++)Ei[n](e,t)}return function(e,t){for(var n,r,o=[],i=t.expectHTML,a=t.isUnaryTag||O,s=t.canBeLeftOpenTag||O,c=0;e;){if(n=e,r&&pi(r)){var u=0,l=r.toLowerCase(),f=hi[l]||(hi[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),d=e.replace(f,function(e,n,r){return u=r.length,pi(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),xi(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-d.length,e=d,E(l,c-u,c)}else{var m=e.indexOf("<");if(0===m){if(fi.test(e)){var p=e.indexOf("--\x3e");if(p>=0){t.shouldKeepComment&&t.comment(e.substring(4,p)),k(p+3);continue}}if(di.test(e)){var h=e.indexOf("]>");if(h>=0){k(h+2);continue}}var g=e.match(li);if(g){k(g[0].length);continue}var v=e.match(ui);if(v){var b=c;k(v[0].length),E(v[1],b,c);continue}var y=T();if(y){_(y),xi(r,e)&&k(1);continue}}var x=void 0,w=void 0,C=void 0;if(m>=0){for(w=e.slice(m);!(ui.test(w)||si.test(w)||fi.test(w)||di.test(w)||(C=w.indexOf("<",1))<0);)m+=C,w=e.slice(m);x=e.substring(0,m),k(m)}m<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===n){t.chars&&t.chars(e);break}}function k(t){c+=t,e=e.substring(t)}function T(){var t=e.match(si);if(t){var n,r,o={tagName:t[1],attrs:[],start:c};for(k(t[0].length);!(n=e.match(ci))&&(r=e.match(oi));)k(r[0].length),o.attrs.push(r);if(n)return o.unarySlash=n[1],k(n[0].length),o.end=c,o}}function _(e){var n=e.tagName,c=e.unarySlash;i&&("p"===r&&ri(n)&&E(r),s(n)&&r===n&&E(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),d=0;d<l;d++){var m=e.attrs[d];mi&&-1===m[0].indexOf('""')&&(""===m[3]&&delete m[3],""===m[4]&&delete m[4],""===m[5]&&delete m[5]);var p=m[3]||m[4]||m[5]||"",h="a"===n&&"href"===m[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;f[d]={name:m[1],value:wi(p,h)}}u||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f}),r=n),t.start&&t.start(n,f,u,e.start,e.end)}function E(e,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),e&&(s=e.toLowerCase()),e)for(a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)t.end&&t.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,i):"p"===s&&(t.start&&t.start(e,[],!1,n,i),t.end&&t.end(e,n,i))}E()}(e,{warn:Ci,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,i,u){var l=r&&r.ns||Ri(e);X&&"svg"===l&&(i=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];qi.test(r.name)||(r.name=r.name.replace(Vi,""),t.push(r))}return t}(i));var f,d=Hi(e,i,r);l&&(d.ns=l),"style"!==(f=d).tag&&("script"!==f.tag||f.attrsMap.type&&"text/javascript"!==f.attrsMap.type)||re()||(d.forbidden=!0);for(var m=0;m<_i.length;m++)d=_i[m](d,t)||d;function p(e){0}if(a||(!function(e){null!=_r(e,"v-pre")&&(e.pre=!0)}(d),d.pre&&(a=!0)),Si(d.tag)&&(s=!0),a?function(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}(d):d.processed||($i(d),function(e){var t=_r(e,"v-if");if(t)e.if=t,ji(e,{exp:t,block:e});else{null!=_r(e,"v-else")&&(e.else=!0);var n=_r(e,"v-else-if");n&&(e.elseif=n)}}(d),function(e){null!=_r(e,"v-once")&&(e.once=!0)}(d),Ui(d,t)),n?o.length||n.if&&(d.elseif||d.else)&&(p(),ji(n,{exp:d.elseif,block:d})):(n=d,p()),r&&!d.forbidden)if(d.elseif||d.else)!function(e,t){var n=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(t.children);n&&n.if&&ji(n,{exp:e.elseif,block:e})}(d,r);else if(d.slotScope){r.plain=!1;var h=d.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[h]=d}else r.children.push(d),d.parent=r;u?c(d):(r=d,o.push(d))},end:function(){var e=o[o.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!s&&e.children.pop(),o.length-=1,r=o[o.length-1],c(e)},chars:function(e){if(r&&(!X||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var t,n,o=r.children;if(e=s||e.trim()?"script"===(t=r).tag||"style"===t.tag?e:Fi(e):i&&o.length?" ":"")!a&&" "!==e&&(n=Xo(e,ki))?o.push({type:2,expression:n.expression,tokens:n.tokens,text:e}):" "===e&&o.length&&" "===o[o.length-1].text||o.push({type:3,text:e})}},comment:function(e){r.children.push({type:3,text:e,isComment:!0})}}),n}function Ui(e,t){var n,r;(r=Tr(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.attrsList.length,function(e){var t=Tr(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){if("slot"===e.tag)e.slotName=Tr(e,"name");else{var t;"template"===e.tag?(t=_r(e,"scope"),e.slotScope=t||_r(e,"slot-scope")):(t=_r(e,"slot-scope"))&&(e.slotScope=t);var n=Tr(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||xr(e,"slot",n))}}(e),function(e){var t;(t=Tr(e,"is"))&&(e.component=t);null!=_r(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var o=0;o<Ti.length;o++)e=Ti[o](e,t)||e;!function(e){var t,n,r,o,i,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++){if(r=o=c[t].name,i=c[t].value,Di.test(r))if(e.hasBindings=!0,(a=Wi(r))&&(r=r.replace(Li,"")),Mi.test(r))r=r.replace(Mi,""),i=hr(i),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=k(r))&&(r="innerHTML")),a.camel&&(r=k(r)),a.sync&&kr(e,"update:"+k(r),Sr(i,"$event"))),s||!e.component&&Ni(e.tag,e.attrsMap.type,r)?yr(e,r,i):xr(e,r,i);else if(Ai.test(r))r=r.replace(Ai,""),kr(e,r,i,a,!1);else{var u=(r=r.replace(Di,"")).match(Bi),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),Cr(e,r,o,i,l,a)}else xr(e,r,JSON.stringify(i)),!e.component&&"muted"===r&&Ni(e.tag,e.attrsMap.type,r)&&yr(e,r,"true")}}(e)}function $i(e){var t;if(t=_r(e,"v-for")){var n=function(e){var t=e.match(Oi);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Ii,""),o=r.match(Pi);o?(n.alias=r.replace(Pi,""),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(t);n&&R(e,n)}}function ji(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function Wi(e){var t=e.match(Li);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}var qi=/^xmlns:NS\d+/,Vi=/^NS\d+:/;function Gi(e){return Hi(e.tag,e.attrsList.slice(),e.parent)}var Yi=[Jo,Qo,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Tr(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var o=_r(e,"v-if",!0),i=o?"&&("+o+")":"",a=null!=_r(e,"v-else",!0),s=_r(e,"v-else-if",!0),c=Gi(e);$i(c),wr(c,"type","checkbox"),Ui(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+i,ji(c,{exp:c.if,block:c});var u=Gi(e);_r(u,"v-for",!0),wr(u,"type","radio"),Ui(u,t),ji(c,{exp:"("+n+")==='radio'"+i,block:u});var l=Gi(e);return _r(l,"v-for",!0),wr(l,":type",n),Ui(l,t),ji(c,{exp:o,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ki,Xi,Ji={expectHTML:!0,modules:Yi,directives:{model:function(e,t,n){n;var r=t.value,o=t.modifiers,i=e.tag,a=e.attrsMap.type;if(e.component)return Er(e,r,o),!1;if("select"===i)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Sr(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),kr(e,"change",r,null,!0)}(e,r,o);else if("input"===i&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,o=Tr(e,"value")||"null",i=Tr(e,"true-value")||"true",a=Tr(e,"false-value")||"false";yr(e,"checked","Array.isArray("+t+")?_i("+t+","+o+")>-1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),kr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Sr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Sr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Sr(t,"$$c")+"}",null,!0)}(e,r,o);else if("input"===i&&"radio"===a)!function(e,t,n){var r=n&&n.number,o=Tr(e,"value")||"null";yr(e,"checked","_q("+t+","+(o=r?"_n("+o+")":o)+")"),kr(e,"change",Sr(t,o),null,!0)}(e,r,o);else if("input"===i||"textarea"===i)!function(e,t,n){var r=e.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?Ir:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Sr(t,l);c&&(f="if($event.target.composing)return;"+f),yr(e,"value","("+t+")"),kr(e,u,f,null,!0),(s||a)&&kr(e,"blur","$forceUpdate()")}(e,r,o);else if(!z.isReservedTag(i))return Er(e,r,o),!1;return!0},text:function(e,t){t.value&&yr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&yr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:ti,mustUseProp:kn,canBeLeftOpenTag:ni,isReservedTag:Ln,getTagNamespace:Fn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(Yi)},Zi=w(function(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function Qi(e,t){e&&(Ki=Zi(t.staticKeys||""),Xi=t.isReservedTag||O,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||g(e.tag)||!Xi(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Ki)))}(t);if(1===t.type){if(!Xi(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var o=t.children[n];e(o),o.static||(t.static=!1)}if(t.ifConditions)for(var i=1,a=t.ifConditions.length;i<a;i++){var s=t.ifConditions[i].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,o=t.children.length;r<o;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var i=1,a=t.ifConditions.length;i<a;i++)e(t.ifConditions[i].block,n)}}(e,!1))}var ea=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,ta=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,na={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ra={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},oa=function(e){return"if("+e+")return null;"},ia={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:oa("$event.target !== $event.currentTarget"),ctrl:oa("!$event.ctrlKey"),shift:oa("!$event.shiftKey"),alt:oa("!$event.altKey"),meta:oa("!$event.metaKey"),left:oa("'button' in $event && $event.button !== 0"),middle:oa("'button' in $event && $event.button !== 1"),right:oa("'button' in $event && $event.button !== 2")};function aa(e,t,n){var r=t?"nativeOn:{":"on:{";for(var o in e)r+='"'+o+'":'+sa(o,e[o])+",";return r.slice(0,-1)+"}"}function sa(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return sa(e,t)}).join(",")+"]";var n=ta.test(t.value),r=ea.test(t.value);if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(ia[s])i+=ia[s],na[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=oa(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(o+=function(e){return"if(!('button' in $event)&&"+e.map(ca).join("&&")+")return null;"}(a)),i&&(o+=i),"function($event){"+o+(n?"return "+t.value+"($event)":r?"return ("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function ca(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=na[e],r=ra[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ua={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:D},la=function(e){this.options=e,this.warn=e.warn||vr,this.transforms=br(e.modules,"transformCode"),this.dataGenFns=br(e.modules,"genData"),this.directives=R(R({},ua),e.directives);var t=e.isReservedTag||O;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]};function fa(e,t){var n=new la(t);return{render:"with(this){return "+(e?da(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function da(e,t){if(e.staticRoot&&!e.staticProcessed)return ma(e,t);if(e.once&&!e.onceProcessed)return pa(e,t);if(e.for&&!e.forProcessed)return function(e,t,n,r){var o=e.for,i=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";0;return e.forProcessed=!0,(r||"_l")+"(("+o+"),function("+i+a+s+"){return "+(n||da)(e,t)+"})"}(e,t);if(e.if&&!e.ifProcessed)return ha(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=ba(e,t),o="_t("+n+(r?","+r:""),i=e.attrs&&"{"+e.attrs.map(function(e){return k(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=","+i);a&&(o+=(i?"":",null")+","+a);return o+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:ba(t,n,!0);return"_c("+e+","+ga(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r=e.plain?void 0:ga(e,t),o=e.inlineTemplate?null:ba(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i<t.transforms.length;i++)n=t.transforms[i](e,n);return n}return ba(e,t)||"void 0"}function ma(e,t){return e.staticProcessed=!0,t.staticRenderFns.push("with(this){return "+da(e,t)+"}"),"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function pa(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return ha(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+da(e,t)+","+t.onceId+++","+n+")":da(e,t)}return ma(e,t)}function ha(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,o){if(!t.length)return o||"_e()";var i=t.shift();return i.exp?"("+i.exp+")?"+a(i.block)+":"+e(t,n,r,o):""+a(i.block);function a(e){return r?r(e,n):e.once?pa(e,n):da(e,n)}}(e.ifConditions.slice(),t,n,r)}function ga(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=t.directives[i.name];u&&(a=!!u(e,i,t.warn)),a&&(c=!0,s+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?',arg:"'+i.arg+'"':"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var o=0;o<t.dataGenFns.length;o++)n+=t.dataGenFns[o](e);if(e.attrs&&(n+="attrs:{"+wa(e.attrs)+"},"),e.props&&(n+="domProps:{"+wa(e.props)+"},"),e.events&&(n+=aa(e.events,!1,t.warn)+","),e.nativeEvents&&(n+=aa(e.nativeEvents,!0,t.warn)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t){return"scopedSlots:_u(["+Object.keys(e).map(function(n){return va(n,e[n],t)}).join(",")+"])"}(e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=function(e,t){var n=e.children[0];0;if(1===n.type){var r=fa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function va(e,t,n){return t.for&&!t.forProcessed?function(e,t,n){var r=t.for,o=t.alias,i=t.iterator1?","+t.iterator1:"",a=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,"_l(("+r+"),function("+o+i+a+"){return "+va(e,t,n)+"})"}(e,t,n):"{key:"+e+",fn:"+("function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?t.if+"?"+(ba(t,n)||"undefined")+":undefined":ba(t,n)||"undefined":da(t,n))+"}")+"}"}function ba(e,t,n,r,o){var i=e.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||da)(a,t);var s=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var o=e[r];if(1===o.type){if(ya(o)||o.ifConditions&&o.ifConditions.some(function(e){return ya(e.block)})){n=2;break}(t(o)||o.ifConditions&&o.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(i,t.maybeComponent):0,c=o||xa;return"["+i.map(function(e){return c(e,t)}).join(",")+"]"+(s?","+s:"")}}function ya(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function xa(e,t){return 1===e.type?da(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Ca(JSON.stringify(n.text)))+")";var n,r}function wa(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+Ca(r.value)+","}return t.slice(0,-1)}function Ca(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function ka(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),D}}var Ta,_a,Ea=(Ta=function(e,t){var n=zi(e.trim(),t);!1!==t.optimize&&Qi(n,t);var r=fa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),o=[],i=[];if(r.warn=function(e,t){(t?i:o).push(e)},n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=R(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);var s=Ta(t,r);return s.errors=o,s.tips=i,s}return{compile:t,compileToFunctions:function(e){var t=Object.create(null);return function(n,r,o){(r=R({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(t[i])return t[i];var a=e(n,r),s={},c=[];return s.render=ka(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return ka(e,c)}),t[i]=s}}(t)}})(Ji).compileToFunctions;function Sa(e){return(_a=_a||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',_a.innerHTML.indexOf("&#10;")>0}var Na=!!V&&Sa(!1),Ra=!!V&&Sa(!0),Aa=w(function(e){var t=Un(e);return t&&t.innerHTML}),Da=mn.prototype.$mount;mn.prototype.$mount=function(e,t){if((e=e&&Un(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Aa(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){0;var o=Ea(r,{shouldDecodeNewlines:Na,shouldDecodeNewlinesForHref:Ra,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Da.call(this,e,t)},mn.compile=Ea,e.exports=mn}).call(t,n(1),n(2).setImmediate)},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},d.clearImmediate=m}function m(e){delete u[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{m(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(1),n(16))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&m())}function m(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(4)(n(20),n(121),!1,function(e){n(18)},"data-v-7a7628c1",null);e.exports=r.exports},function(e,t,n){var r=n(19);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(3)("0a484413",r,!0,{})},function(e,t,n){(e.exports=n(0)(!1)).push([e.i,"",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21),o=n.n(r),i=n(22),a=(n.n(i),n(23)),s=(n.n(a),n(25)),c=(n.n(s),n(27)),u=(n.n(c),n(29)),l=(n.n(u),n(31)),f=(n.n(l),n(33)),d=(n.n(f),n(35)),m=(n.n(d),n(37)),p=(n.n(m),n(39)),h=(n.n(p),n(41)),g=(n.n(h),n(43)),v=(n.n(g),n(45)),b=(n.n(v),n(47)),y=(n.n(b),n(49)),x=(n.n(y),n(51)),w=(n.n(x),n(53)),C=(n.n(w),n(55)),k=(n.n(C),n(57)),T=(n.n(k),n(59)),_=(n.n(T),n(61)),E=(n.n(_),n(63)),S=(n.n(E),n(65)),N=(n.n(S),n(67)),R=(n.n(N),n(69)),A=(n.n(R),n(71)),D=(n.n(A),n(73)),O=(n.n(D),n(75)),P=(n.n(O),n(77)),I=(n.n(P),n(79)),B=(n.n(I),n(81)),M=(n.n(B),n(83)),L=(n.n(M),n(85)),F=(n.n(L),n(87)),H=(n.n(F),n(89)),z=(n.n(H),n(91)),U=(n.n(z),n(93)),$=(n.n(U),n(95)),j=(n.n($),n(97)),W=(n.n(j),n(99)),q=(n.n(W),n(101)),V=(n.n(q),n(103)),G=(n.n(V),n(105)),Y=(n.n(G),n(107)),K=(n.n(Y),n(109));n.n(K);t.default={name:"tinymce",props:{id:{type:String,required:!0},htmlClass:{default:"",type:String},value:{default:""},plugins:{default:function(){return["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table contextmenu directionality","template paste textcolor colorpicker textpattern imagetools toc help emoticons hr codesample"]},type:Array},toolbar1:{default:"formatselect | bold italic  strikethrough  forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat",type:String},toolbar2:{default:"",type:String},other_options:{default:function(){return{}},type:Object},readonly:{default:!1,type:Boolean}},data:function(){return{content:"",editor:null,cTinyMce:null,checkerTimeout:null,isTyping:!1}},mounted:function(){this.content=this.value,this.init()},beforeDestroy:function(){this.editor.destroy()},watch:{value:function(e){this.isTyping||(null!==this.editor?this.editor.setContent(e):this.content=e)},readonly:function(e){e?this.editor.setMode("readonly"):this.editor.setMode("design")}},methods:{init:function(){var e={selector:"#"+this.id,skin:!1,toolbar1:this.toolbar1,toolbar2:this.toolbar2,plugins:this.plugins,init_instance_callback:this.initEditor};o.a.init(this.concatAssciativeArrays(e,this.other_options))},initEditor:function(e){var t=this;this.editor=e,e.on("KeyUp",function(e){t.submitNewContent()}),e.on("Change",function(e){t.editor.getContent()!==t.value&&t.submitNewContent(),t.$emit("editorChange",e)}),e.on("init",function(n){e.setContent(t.content),t.$emit("input",t.content)}),this.readonly?this.editor.setMode("readonly"):this.editor.setMode("design"),this.$emit("editorInit",e)},concatAssciativeArrays:function(e,t){if(0===t.length)return e;if(0===e.length)return t;var n=[];for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n},submitNewContent:function(){var e=this;this.isTyping=!0,null!==this.checkerTimeout&&clearTimeout(this.checkerTimeout),this.checkerTimeout=setTimeout(function(){e.isTyping=!1},300),this.$emit("input",this.editor.getContent())}}}},function(e,t,n){(function(t){!function(){"use strict";var n,r,o,i,a,s,c,u,l,f,d,m,p,h=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},g=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,arguments))}},v=function(e){return function(){return e}},b=function(e){return e},y=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}},x=v(!1),w=v(!0),C=x,k=w,T=function(){return _},_=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e,t){return e()},is:C,isSome:C,isNone:k,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:T,ap:T,each:function(){},bind:T,flatten:T,exists:C,forall:k,filter:T,equals:e,equals_:e,toArray:function(){return[]},toString:v("none()")};return Object.freeze&&Object.freeze(r),r}(),E=function(e){var t=function(){return e},n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:k,isNone:C,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return E(t(e))},ap:function(t){return t.fold(T,function(t){return E(t(e))})},each:function(t){t(e)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(e)?o:_},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(C,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},S={some:E,none:T,from:function(e){return null===e||void 0===e?_:E(e)}},N=function(e){return function(t){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(t)===e}},R=N("string"),A=N("object"),D=N("array"),O=N("null"),P=N("boolean"),I=N("function"),B=N("number"),M=void 0===(n=Array.prototype.indexOf)?function(e,t){return V(e,t)}:function(e,t){return n.call(e,t)},L=function(e,t){return M(e,t)>-1},F=function(e,t){return q(e,t).isSome()},H=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},U=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o,e)?n:r).push(a)}return{pass:n,fail:r}},$=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},j=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},W=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return S.some(o)}return S.none()},q=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return S.some(n);return S.none()},V=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},G=Array.prototype.push,Y=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);G.apply(t,e[n])}return t}(H(e,t))},K=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n,e))return!1;return!0},X=Array.prototype.slice,J=function(e,t){return $(e,function(e){return!L(t,e)})},Z=function(e){return 0===e.length?S.none():S.some(e[0])},Q=function(e){return 0===e.length?S.none():S.some(e[e.length-1])},ee=I(Array.from)?Array.from:function(e){return X.call(e)},te="undefined"!=typeof window?window:Function("return this;")(),ne=function(e,t){return function(e,t){for(var n=void 0!==t&&null!==t?t:te,r=0;r<e.length&&void 0!==n&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},re={getOrDie:function(e,t){var n=function(e,t){return ne(e,t)}(e,t);if(void 0===n||null===n)throw e+" not available on this browser";return n}},oe=function(){return re.getOrDie("URL")},ie={createObjectURL:function(e){return oe().createObjectURL(e)},revokeObjectURL:function(e){oe().revokeObjectURL(e)}},ae=navigator,se=ae.userAgent,ce=function(e){return"matchMedia"in window&&matchMedia(e).matches};l=/Android/.test(se),o=(o=!(r=/WebKit/.test(se))&&/MSIE/gi.test(se)&&/Explorer/gi.test(ae.appName))&&/MSIE (\w+)\./.exec(se)[1],i=-1!==se.indexOf("Trident/")&&(-1!==se.indexOf("rv:")||-1!==ae.appName.indexOf("Netscape"))&&11,a=-1!==se.indexOf("Edge/")&&!o&&!i&&12,o=o||i||a,s=!r&&!i&&/Gecko/.test(se),c=-1!==se.indexOf("Mac"),u=/(iPad|iPhone)/.test(se),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!ie.createObjectURL,d=ce("only screen and (max-device-width: 480px)")&&(l||u),m=ce("only screen and (min-width: 800px)")&&(l||u),p=-1!==se.indexOf("Windows Phone"),a&&(r=!1);var ue,le,fe,de,me,pe,he,ge,ve,be,ye,xe,we,Ce,ke,Te,_e,Ee,Se,Ne={opera:!1,webkit:r,ie:o,gecko:s,mac:c,iOS:u,android:l,contentEditable:!u||f||parseInt(se.match(/AppleWebKit\/(\d*)/)[1],10)>=534,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==o,range:window.getSelection&&"Range"in window,documentMode:o&&!a?document.documentMode||7:10,fileApi:f,ceFalse:!1===o||o>8,cacheSuffix:null,container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===o||o>11,desktop:!d&&!m,windowsPhone:p},Re=window.Promise?window.Promise:function(){function e(e,t){return function(){e.apply(t,arguments)}}var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=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=[],u(t,e(a,this),e(s,this))},o=r.immediateFn||"function"==typeof t&&t||function(e){setTimeout(e,1)};function i(e){var t=this;null!==this._state?o(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)}else(t._state?e.resolve:e.reject)(t._value)}):this._deferreds.push(e)}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 n=t.then;if("function"==typeof n)return void u(e(n,t),e(a,this),e(s,this))}this._state=!0,this._value=t,c.call(this)}catch(e){s.call(this,e)}}function s(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds.length;e<t;e++)i.call(this,this._deferreds[e]);this._deferreds=null}function u(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}return r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=this;return new r(function(r,o){i.call(n,new function(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}(e,t,r,o))})},r.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&n(arguments[0])?arguments[0]:arguments);return new r(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 s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(i,e)},n)}e[i]=a,0==--r&&t(e)}catch(e){n(e)}}for(var i=0;i<e.length;i++)o(i,e[i])})},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},r}(),Ae=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},De=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},Oe=function(e,t){var n,r;return(r=function(){var r=arguments;clearTimeout(n),n=Ae(function(){e.apply(this,r)},t)}).stop=function(){clearTimeout(n)},r},Pe={requestAnimationFrame:function(e,t){ue?ue.then(e):ue=new Re(function(e){t||(t=document.body),function(e,t){var n,r=window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=window[o[n]+"RequestAnimationFrame"];r||(r=function(e){window.setTimeout(e,0)}),r(e,t)}(e,t)}).then(e)},setTimeout:Ae,setInterval:De,setEditorTimeout:function(e,t,n){return Ae(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=De(function(){e.removed?clearInterval(r):t()},n)},debounce:Oe,throttle:Oe,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},Ie=/^(?:mouse|contextmenu)|click/,Be={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1},Me=function(){return!1},Le=function(){return!0},Fe=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},He=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},ze=function(e,t){var n,r=t||{};for(n in e)Be[n]||(r[n]=e[n]);if(r.target||(r.target=r.srcElement||document),Ne.experimentalShadowDom&&(r.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&n.length>0)return n[0]}return t}(e,r.target)),e&&Ie.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var o=r.target.ownerDocument||document,i=o.documentElement,a=o.body;r.pageX=e.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i&&i.clientLeft||a&&a.clientLeft||0),r.pageY=e.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i&&i.clientTop||a&&a.clientTop||0)}return r.preventDefault=function(){r.isDefaultPrevented=Le,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},r.stopPropagation=function(){r.isPropagationStopped=Le,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=Le,r.stopPropagation()},!1===function(e){return e.isDefaultPrevented===Le||e.isDefaultPrevented===Me}(r)&&(r.isDefaultPrevented=Me,r.isPropagationStopped=Me,r.isImmediatePropagationStopped=Me),void 0===r.metaKey&&(r.metaKey=!1),r},Ue=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){n.domLoaded||(n.domLoaded=!0,t(o))},s=function(){i()&&(He(r,"readystatechange",s),a())},c=function(){try{r.documentElement.doScroll("left")}catch(e){return void Pe.setTimeout(c)}a()};!r.addEventListener||Ne.ie&&Ne.ie<11?(Fe(r,"readystatechange",s),r.documentElement.doScroll&&e.self===e.top&&c()):i()?a():Fe(e,"DOMContentLoaded",a),Fe(e,"load",a)}},$e=function(){var e,t,n,r,o,i=this,a={};t="mce-data-"+(+new Date).toString(32),r="onmouseenter"in document.documentElement,n="onfocusin"in document.documentElement,o={mouseenter:"mouseover",mouseleave:"mouseout"},e=1,i.domLoaded=!1,i.events=a;var s=function(e,t){var n,r,o,i,s=a[t];if(n=s&&s[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return};i.bind=function(c,u,l,f){var d,m,p,h,g,v,b,y=window,x=function(e){s(ze(e||y.event),d)};if(c&&3!==c.nodeType&&8!==c.nodeType){for(c[t]?d=c[t]:(d=e++,c[t]=d,a[d]={}),f=f||c,p=(u=u.split(" ")).length;p--;)v=x,g=b=!1,"DOMContentLoaded"===(h=u[p])&&(h="ready"),i.domLoaded&&"ready"===h&&"complete"===c.readyState?l.call(f,ze({type:h})):(r||(g=o[h])&&(v=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=ze(e||y.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,s(e,d))}),n||"focusin"!==h&&"focusout"!==h||(b=!0,g="focusin"===h?"focus":"blur",v=function(e){(e=ze(e||y.event)).type="focus"===e.type?"focusin":"focusout",s(e,d)}),(m=a[d][h])?"ready"===h&&i.domLoaded?l({type:h}):m.push({func:l,scope:f}):(a[d][h]=m=[{func:l,scope:f}],m.fakeName=g,m.capture=b,m.nativeHandler=v,"ready"===h?Ue(c,v,i):Fe(c,g||h,v,b)));return c=m=0,l}},i.unbind=function(e,n,r){var o,s,c,u,l,f;if(!e||3===e.nodeType||8===e.nodeType)return i;if(o=e[t]){if(f=a[o],n){for(c=(n=n.split(" ")).length;c--;)if(s=f[l=n[c]]){if(r)for(u=s.length;u--;)if(s[u].func===r){var d=s.nativeHandler,m=s.fakeName,p=s.capture;(s=s.slice(0,u).concat(s.slice(u+1))).nativeHandler=d,s.fakeName=m,s.capture=p,f[l]=s}r&&0!==s.length||(delete f[l],He(e,s.fakeName||l,s.nativeHandler,s.capture))}}else{for(l in f)s=f[l],He(e,s.fakeName||l,s.nativeHandler,s.capture);f={}}for(l in f)return i;delete a[o];try{delete e[t]}catch(n){e[t]=null}}return i},i.fire=function(e,n,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return i;(r=ze(null,r)).type=n,r.target=e;do{(o=e[t])&&s(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!r.isPropagationStopped());return i},i.clean=function(e){var n,r,o=i.unbind;if(!e||3===e.nodeType||8===e.nodeType)return i;if(e[t]&&o(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(o(e),n=(r=e.getElementsByTagName("*")).length;n--;)(e=r[n])[t]&&o(e);return i},i.destroy=function(){a={}},i.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}};$e.Event=new $e,$e.Event.bind(window,"ready",function(){});var je="sizzle"+-new Date,We=window.document,qe=0,Ve=0,Ge=Et(),Ye=Et(),Ke=Et(),Xe=function(e,t){return e===t&&(xe=!0),0},Je="undefined",Ze=1<<31,Qe={}.hasOwnProperty,et=[],tt=et.pop,nt=et.push,rt=et.push,ot=et.slice,it=et.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},at="[\\x20\\t\\r\\n\\f]",st="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ct="\\["+at+"*("+st+")(?:"+at+"*([*^$|!~]?=)"+at+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+st+"))|)"+at+"*\\]",ut=":("+st+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ct+")*)|.*)\\)|)",lt=new RegExp("^"+at+"+|((?:^|[^\\\\])(?:\\\\.)*)"+at+"+$","g"),ft=new RegExp("^"+at+"*,"+at+"*"),dt=new RegExp("^"+at+"*([>+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),pt=new RegExp(ut),ht=new RegExp("^"+st+"$"),gt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st+"|[*])"),ATTR:new RegExp("^"+ct),PSEUDO:new RegExp("^"+ut),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,bt=/^h\d$/i,yt=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,Ct=/'|\\/g,kt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Tt=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{rt.apply(et=ot.call(We.childNodes),We.childNodes),et[We.childNodes.length].nodeType}catch(e){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var _t=function(e,t,n,r){var o,i,a,s,c,u,l,f,d,m;if((t?t.ownerDocument||t:We)!==Ce&&we(t),t=t||Ce,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(Te&&!r){if(o=xt.exec(e))if(a=o[1]){if(9===s){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Se(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&fe.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(fe.qsa&&(!_e||!_e.test(e))){if(f=l=je,d=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=he(e),(l=t.getAttribute("id"))?f=l.replace(Ct,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",c=u.length;c--;)u[c]=f+It(u[c]);d=wt.test(e)&&Ot(t.parentNode)||t,m=u.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(e){}finally{l||t.removeAttribute("id")}}}return ve(e.replace(lt,"$1"),t,n,r)};function Et(){var e=[];return function t(n,r){return e.push(n+" ")>de.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function St(e){return e[je]=!0,e}function Nt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Ze)-(~e.sourceIndex||Ze);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Rt(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function At(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function Dt(e){return St(function(t){return t=+t,St(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Je&&e}for(le in fe=_t.support={},pe=_t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},we=_t.setDocument=function(e){var t,n=e?e.ownerDocument||e:We,r=n.defaultView;return n!==Ce&&9===n.nodeType&&n.documentElement?(Ce=n,ke=n.documentElement,Te=!pe(n),r&&r!==function(e){try{return e.top}catch(e){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",function(){we()},!1):r.attachEvent&&r.attachEvent("onunload",function(){we()})),fe.attributes=!0,fe.getElementsByTagName=!0,fe.getElementsByClassName=yt.test(n.getElementsByClassName),fe.getById=!0,de.find.ID=function(e,t){if(typeof t.getElementById!==Je&&Te){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},de.filter.ID=function(e){var t=e.replace(kt,Tt);return function(e){return e.getAttribute("id")===t}},de.find.TAG=fe.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Je)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},de.find.CLASS=fe.getElementsByClassName&&function(e,t){if(Te)return t.getElementsByClassName(e)},Ee=[],_e=[],fe.disconnectedMatch=!0,_e=_e.length&&new RegExp(_e.join("|")),Ee=Ee.length&&new RegExp(Ee.join("|")),t=yt.test(ke.compareDocumentPosition),Se=t||yt.test(ke.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Xe=t?function(e,t){if(e===t)return xe=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!fe.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===We&&Se(We,e)?-1:t===n||t.ownerDocument===We&&Se(We,t)?1:ye?it.call(ye,e)-it.call(ye,t):0:4&r?-1:1)}:function(e,t){if(e===t)return xe=!0,0;var r,o=0,i=e.parentNode,a=t.parentNode,s=[e],c=[t];if(!i||!a)return e===n?-1:t===n?1:i?-1:a?1:ye?it.call(ye,e)-it.call(ye,t):0;if(i===a)return Nt(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;s[o]===c[o];)o++;return o?Nt(s[o],c[o]):s[o]===We?-1:c[o]===We?1:0},n):Ce},_t.matches=function(e,t){return _t(e,null,null,t)},_t.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ce&&we(e),t=t.replace(mt,"='$1']"),fe.matchesSelector&&Te&&(!Ee||!Ee.test(t))&&(!_e||!_e.test(t)))try{var n=(void 0).call(e,t);if(n||fe.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return _t(t,Ce,null,[e]).length>0},_t.contains=function(e,t){return(e.ownerDocument||e)!==Ce&&we(e),Se(e,t)},_t.attr=function(e,t){(e.ownerDocument||e)!==Ce&&we(e);var n=de.attrHandle[t.toLowerCase()],r=n&&Qe.call(de.attrHandle,t.toLowerCase())?n(e,t,!Te):void 0;return void 0!==r?r:fe.attributes||!Te?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},_t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},_t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(xe=!fe.detectDuplicates,ye=!fe.sortStable&&e.slice(0),e.sort(Xe),xe){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return ye=null,e},me=_t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=me(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=me(t);return n},(de=_t.selectors={cacheLength:50,createPseudo:St,match:gt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(kt,Tt),e[3]=(e[3]||e[4]||e[5]||"").replace(kt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||_t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&_t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return gt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pt.test(n)&&(t=he(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(kt,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Ge[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Ge(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Je&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=_t.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var u,l,f,d,m,p,h=i!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!c&&!s;if(g){if(i){for(;h;){for(f=t;f=f[h];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&b){for(m=(u=(l=g[je]||(g[je]={}))[e]||[])[0]===qe&&u[1],d=u[0]===qe&&u[2],f=m&&g.childNodes[m];f=++m&&f&&f[h]||(d=m=0)||p.pop();)if(1===f.nodeType&&++d&&f===t){l[e]=[qe,m,d];break}}else if(b&&(u=(t[je]||(t[je]={}))[e])&&u[0]===qe)d=u[1];else for(;(f=++m&&f&&f[h]||(d=m=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[je]||(f[je]={}))[e]=[qe,d]),f!==t)););return(d-=o)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,t){var n,r=de.pseudos[e]||de.setFilters[e.toLowerCase()]||_t.error("unsupported pseudo: "+e);return r[je]?r(t):r.length>1?(n=[e,e,"",t],de.setFilters.hasOwnProperty(e.toLowerCase())?St(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=it.call(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:St(function(e){var t=[],n=[],r=ge(e.replace(lt,"$1"));return r[je]?St(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),!n.pop()}}),has:St(function(e){return function(t){return _t(e,t).length>0}}),contains:St(function(e){return e=e.replace(kt,Tt),function(t){return(t.textContent||t.innerText||me(t)).indexOf(e)>-1}}),lang:St(function(e){return ht.test(e||"")||_t.error("unsupported lang: "+e),e=e.replace(kt,Tt).toLowerCase(),function(t){var n;do{if(n=Te?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===ke},focus:function(e){return e===Ce.activeElement&&(!Ce.hasFocus||Ce.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!de.pseudos.empty(e)},header:function(e){return bt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Dt(function(){return[0]}),last:Dt(function(e,t){return[t-1]}),eq:Dt(function(e,t,n){return[n<0?n+t:n]}),even:Dt(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Dt(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Dt(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:Dt(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=de.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})de.pseudos[le]=Rt(le);for(le in{submit:!0,reset:!0})de.pseudos[le]=At(le);function Pt(){}function It(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Bt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Ve++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var s,c,u=[qe,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if((s=(c=t[je]||(t[je]={}))[r])&&s[0]===qe&&s[1]===i)return u[2]=s[2];if(c[r]=u,u[2]=e(t,n,a))return!0}}}function Mt(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Lt(e,t,n,r,o){for(var i,a=[],s=0,c=e.length,u=null!=t;s<c;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),u&&t.push(s)));return a}function Ft(e,t,n,r,o,i){return r&&!r[je]&&(r=Ft(r)),o&&!o[je]&&(o=Ft(o,i)),St(function(i,a,s,c){var u,l,f,d=[],m=[],p=a.length,h=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)_t(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!i&&t?h:Lt(h,d,e,s,c),v=n?o||(i?e:p||r)?[]:a:g;if(n&&n(g,v,s,c),r)for(u=Lt(v,m),r(u,[],s,c),l=u.length;l--;)(f=u[l])&&(v[m[l]]=!(g[m[l]]=f));if(i){if(o||e){if(o){for(u=[],l=v.length;l--;)(f=v[l])&&u.push(g[l]=f);o(null,v=[],u,c)}for(l=v.length;l--;)(f=v[l])&&(u=o?it.call(i,f):d[l])>-1&&(i[u]=!(a[u]=f))}}else v=Lt(v===a?v.splice(p,v.length):v),o?o(null,a,v,c):rt.apply(a,v)})}function Ht(e){for(var t,n,r,o=e.length,i=de.relative[e[0].type],a=i||de.relative[" "],s=i?1:0,c=Bt(function(e){return e===t},a,!0),u=Bt(function(e){return it.call(t,e)>-1},a,!0),l=[function(e,n,r){return!i&&(r||n!==be)||((t=n).nodeType?c(e,n,r):u(e,n,r))}];s<o;s++)if(n=de.relative[e[s].type])l=[Bt(Mt(l),n)];else{if((n=de.filter[e[s].type].apply(null,e[s].matches))[je]){for(r=++s;r<o&&!de.relative[e[r].type];r++);return Ft(s>1&&Mt(l),s>1&&It(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(lt,"$1"),n,s<r&&Ht(e.slice(s,r)),r<o&&Ht(e=e.slice(r)),r<o&&It(e))}l.push(n)}return Mt(l)}Pt.prototype=de.filters=de.pseudos,de.setFilters=new Pt,he=_t.tokenize=function(e,t){var n,r,o,i,a,s,c,u=Ye[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],c=de.preFilter;a;){for(i in n&&!(r=ft.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(o=[])),n=!1,(r=dt.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(lt," ")}),a=a.slice(n.length)),de.filter)!(r=gt[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?_t.error(e):Ye(e,s).slice(0)},ge=_t.compile=function(e,t){var n,r=[],o=[],i=Ke[e+" "];if(!i){for(t||(t=he(e)),n=t.length;n--;)(i=Ht(t[n]))[je]?r.push(i):o.push(i);(i=Ke(e,function(e,t){var n=t.length>0,r=e.length>0,o=function(o,i,a,s,c){var u,l,f,d=0,m="0",p=o&&[],h=[],g=be,v=o||r&&de.find.TAG("*",c),b=qe+=null==g?1:Math.random()||.1,y=v.length;for(c&&(be=i!==Ce&&i);m!==y&&null!=(u=v[m]);m++){if(r&&u){for(l=0;f=e[l++];)if(f(u,i,a)){s.push(u);break}c&&(qe=b)}n&&((u=!f&&u)&&d--,o&&p.push(u))}if(d+=m,n&&m!==d){for(l=0;f=t[l++];)f(p,h,i,a);if(o){if(d>0)for(;m--;)p[m]||h[m]||(h[m]=tt.call(s));h=Lt(h)}rt.apply(s,h),c&&!o&&h.length>0&&d+t.length>1&&_t.uniqueSort(s)}return c&&(qe=b,be=g),p};return n?St(o):o}(o,r))).selector=e}return i},ve=_t.select=function(e,t,n,r){var o,i,a,s,c,u="function"==typeof e&&e,l=!r&&he(e=u.selector||e);if(n=n||[],1===l.length){if((i=l[0]=l[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&fe.getById&&9===t.nodeType&&Te&&de.relative[i[1].type]){if(!(t=(de.find.ID(a.matches[0].replace(kt,Tt),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=gt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!de.relative[s=a.type]);)if((c=de.find[s])&&(r=c(a.matches[0].replace(kt,Tt),wt.test(i[0].type)&&Ot(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&It(i)))return rt.apply(n,r),n;break}}return(u||ge(e,l))(r,t,!Te,n,wt.test(e)&&Ot(t.parentNode)||t),n},fe.sortStable=je.split("").sort(Xe).join("")===je,fe.detectDuplicates=!!xe,we(),fe.sortDetached=!0;var zt=Array.isArray,Ut=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},$t=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},jt={isArray:zt,toArray:function(e){var t,n,r=e;if(!zt(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:Ut,map:function(e,t){var n=[];return Ut(e,function(r,o){n.push(t(r,o,e))}),n},filter:function(e,t){var n=[];return Ut(e,function(r,o){t&&!t(r,o,e)||n.push(r)}),n},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:$t,find:function(e,t,n){var r=$t(e,t,n);if(-1!==r)return e[r]},last:function(e){return e[e.length-1]}},Wt=/^\s*|\s*$/g,qt=function(e){return null===e||void 0===e?"":(""+e).replace(Wt,"")},Vt=function(e,t){return t?!("array"!==t||!jt.isArray(e))||typeof e===t:void 0!==e},Gt=function(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),jt.each(e,function(e,o){if(!1===t.call(r,e,o,n))return!1;Gt(e,t,n,r)}))},Yt={trim:qt,isArray:jt.isArray,is:Vt,toArray:jt.toArray,makeMap:function(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:jt.each,map:jt.map,grep:jt.filter,inArray:jt.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s,c=arguments;for(n=1,r=c.length;n<r;n++)for(o in t=c[n])t.hasOwnProperty(o)&&void 0!==(s=t[o])&&(e[o]=s);return e},create:function(e,t,n){var r,o,i,a,s,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=this.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],this.extend(o[i].prototype,t),e[5]&&(r=this.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],s.apply(this,arguments)},o[i].prototype[i]=o[i],this.each(r,function(e,t){o[i].prototype[t]=r[t]}),this.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),this.each(t.static,function(e,t){o[i][t]=e})}},walk:Gt,createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Vt(e,"array")?e:jt.map(e.split(t||","),qt)},_addCacheSuffix:function(e){var t=Ne.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Kt=document,Xt=Array.prototype.push,Jt=Array.prototype.slice,Zt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Qt=$e.Event,en=Yt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Kt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,yn(e[0]));else if(t.length&&!t.nodeType){if(t=pn.makeArray(t),r)for(o=t.length-1;o>=0;o--)on(e,t[o],n,r);else for(o=0;o<t.length;o++)on(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},an=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},sn=function(e,t,n){var r,o;return t=pn(t)[0],e.each(function(){n&&r===this.parentNode?o.appendChild(this):(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this),o.appendChild(this))}),e},cn=Yt.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),un=Yt.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),ln={for:"htmlFor",class:"className",readonly:"readOnly"},fn={float:"cssFloat"},dn={},mn={},pn=function(e,t){return new pn.fn.init(e,t)},hn=/^\s*|\s*$/g,gn=function(e){return null===e||void 0===e?"":(""+e).replace(hn,"")},vn=function(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},bn=function(e,t){var n=[];return vn(e,function(e,r){t(r,e)&&n.push(r)}),n},yn=function(e){return e?9===e.nodeType?e:e.ownerDocument:Kt};pn.fn=pn.prototype={constructor:pn,selector:"",context:null,length:0,init:function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(t&&t.nodeType)this.context=t;else{if(t)return pn(e).attr(t);this.context=t=document}if(nn(e)){if(this.selector=e,!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Zt.exec(e)))return pn(t).find(e);if(n[1])for(r=rn(e,yn(t)).firstChild;r;)Xt.call(this,r),r=r.nextSibling;else{if(!(r=yn(t).getElementById(n[2])))return this;if(r.id!==n[2])return this.find(e);this.length=1,this[0]=r}}else this.add(e,!1);return this},toArray:function(){return Yt.toArray(this)},add:function(e,t){var n,r;if(nn(e))return this.add(pn(e));if(!1!==t)for(n=pn.unique(this.toArray().concat(pn.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else Xt.apply(this,pn.makeArray(e));return this},attr:function(e,t){var n,r=this;if("object"==typeof e)vn(e,function(e,t){r.attr(e,t)});else{if(!tn(t)){if(r[0]&&1===r[0].nodeType){if((n=dn[e])&&n.get)return n.get(r[0],e);if(un[e])return r.prop(e)?e:void 0;null===(t=r[0].getAttribute(e,2))&&(t=void 0)}return t}this.each(function(){var n;if(1===this.nodeType){if((n=dn[e])&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=ln[e]||e))vn(e,function(e,t){n.prop(e,t)});else{if(!tn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(e,t){var n,r,o=this,i=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof e)vn(e,function(e,t){o.css(e,t)});else if(tn(t))e=i(e),"number"!=typeof t||cn[e]||(t=t.toString()+"px"),o.each(function(){var n=this.style;if((r=mn[e])&&r.set)r.set(this,t);else{try{this.style[fn[e]||e]=t}catch(e){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(a(e)):n.removeAttribute(e))}});else{if(n=o[0],(r=mn[e])&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(e)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(e))}catch(e){return}}return o},remove:function(){for(var e,t=this.length;t--;)e=this[t],Qt.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t;if(tn(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(n){pn(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(tn(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return pn(e).append(this),this},prependTo:function(e){return pn(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return sn(this,e)},wrapAll:function(e){return sn(this,e,!0)},wrapInner:function(e){return this.each(function(){pn(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){pn(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),pn(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?vn(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var o,i;(i=an(r,e))!==t&&(o=r.className,i?r.className=gn((" "+o+" ").replace(" "+e+" "," ")):r.className+=o?" "+e:e)}),n)},hasClass:function(e){return an(this[0],e)},each:function(e){return vn(this,e)},on:function(e,t){return this.each(function(){Qt.bind(this,e,t)})},off:function(e,t){return this.each(function(){Qt.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?Qt.fire(this,e.type,e):Qt.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new pn(Jt.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)pn.find(e,this[t],r);return pn(r)},filter:function(e){return pn("function"==typeof e?bn(this.toArray(),function(t,n){return e(n,t)}):pn.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof pn&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&pn(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}}),pn(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Xt,sort:[].sort,splice:[].splice},Yt.extend(pn,{extend:Yt.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:Yt.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Yt.isArray,each:vn,trim:gn,grep:bn,find:_t,expr:_t.selectors,unique:_t.uniqueSort,text:_t.getText,contains:_t.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?pn.find.matchesSelector(t[0],e)?[t[0]]:[]:pn.find.matches(e,t)}});var xn=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof pn&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&pn(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},wn=function(e,t,n,r){var o=[];for(r instanceof pn&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&pn(e).is(r))break}o.push(e)}return o},Cn=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};vn({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xn(e,"parentNode")},next:function(e){return Cn(e,"nextSibling",1)},prev:function(e){return Cn(e,"previousSibling",1)},children:function(e){return wn(e.firstChild,"nextSibling",1)},contents:function(e){return Yt.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){pn.fn[e]=function(n){var r=[];return this.each(function(){var e=t.call(r,this,n,r);e&&(pn.isArray(e)?r.push.apply(r,e):r.push(e))}),this.length>1&&(en[e]||(r=pn.unique(r)),0===e.indexOf("parents")&&(r=r.reverse())),r=pn(r),n?r.filter(n):r}}),vn({parentsUntil:function(e,t){return xn(e,"parentNode",t)},nextUntil:function(e,t){return wn(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return wn(e,"previousSibling",1,t).slice(1)}},function(e,t){pn.fn[e]=function(n,r){var o=[];return this.each(function(){var e=t.call(o,this,n,o);e&&(pn.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=pn.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=pn(o),r?o.filter(r):o}}),pn.fn.is=function(e){return!!e&&this.filter(e).length>0},pn.fn.init.prototype=pn.fn,pn.overrideDefaults=function(e){var t,n=function(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o||(o=t.context),new n.fn.init(r,o)};return pn.extend(n,this),n};var kn=function(e,t,n){vn(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})};Ne.ie&&Ne.ie<8&&(kn(dn,"get",{maxlength:function(e){var t=e.maxLength;if(2147483647!==t)return t},size:function(e){var t=e.size;if(20!==t)return t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;if(0!==t.length)return t}}),kn(dn,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),Ne.ie&&Ne.ie<9&&(fn.float="styleFloat",kn(mn,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),pn.attrHooks=dn,pn.cssHooks=mn;var Tn=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},_n=function(){return En(0,0)},En=function(e,t){return{major:e,minor:t}},Sn={nu:En,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?_n():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return En(r(1),r(2))}(e,n)},unknown:_n},Nn=function(e,t){return function(){return t===e}},Rn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Nn("Edge",t),isChrome:Nn("Chrome",t),isIE:Nn("IE",t),isOpera:Nn("Opera",t),isFirefox:Nn("Firefox",t),isSafari:Nn("Safari",t)}},An={unknown:function(){return Rn({current:void 0,version:Sn.unknown()})},nu:Rn,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v("Firefox"),safari:v("Safari")},Dn=function(e,t){return function(){return t===e}},On=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Dn("Windows",t),isiOS:Dn("iOS",t),isAndroid:Dn("Android",t),isOSX:Dn("OSX",t),isLinux:Dn("Linux",t),isSolaris:Dn("Solaris",t),isFreeBSD:Dn("FreeBSD",t)}},Pn={unknown:function(){return On({current:void 0,version:Sn.unknown()})},nu:On,windows:v("Windows"),ios:v("iOS"),android:v("Android"),linux:v("Linux"),osx:v("OSX"),solaris:v("Solaris"),freebsd:v("FreeBSD")},In=function(e,t){var n=String(t).toLowerCase();return W(e,function(e){return e.search(n)})},Bn=function(e,t){return In(e,t).map(function(e){var n=Sn.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Mn=function(e,t){return In(e,t).map(function(e){var n=Sn.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Ln=function(e,t){return-1!==e.indexOf(t)},Fn=function(e){return e.replace(/^\s+|\s+$/g,"")},Hn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,zn=function(e){return function(t){return Ln(t,e)}},Un=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Ln(e,"edge/")&&Ln(e,"chrome")&&Ln(e,"safari")&&Ln(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Hn],search:function(e){return Ln(e,"chrome")&&!Ln(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Ln(e,"msie")||Ln(e,"trident")}},{name:"Opera",versionRegexes:[Hn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:zn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:zn("firefox")},{name:"Safari",versionRegexes:[Hn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Ln(e,"safari")||Ln(e,"mobile/"))&&Ln(e,"applewebkit")}}],$n=[{name:"Windows",search:zn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Ln(e,"iphone")||Ln(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:zn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:zn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:zn("linux"),versionRegexes:[]},{name:"Solaris",search:zn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:zn("freebsd"),versionRegexes:[]}],jn={browsers:v(Un),oses:v($n)},Wn=function(e){var t=jn.browsers(),n=jn.oses(),r=Bn(t,e).fold(An.unknown,An.nu),o=Mn(n,e).fold(Pn.unknown,Pn.nu);return{browser:r,os:o,deviceType:function(e,t,n){var r=e.isiOS()&&!0===/ipad/i.test(n),o=e.isiOS()&&!r,i=e.isAndroid()&&3===e.version.major,a=e.isAndroid()&&4===e.version.major,s=r||i||a&&!0===/mobile/i.test(n),c=e.isiOS()||e.isAndroid(),u=c&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n);return{isiPad:v(r),isiPhone:v(o),isTablet:v(s),isPhone:v(u),isTouch:v(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:v(l)}}(o,r,e)}},qn={detect:Tn(function(){var e=navigator.userAgent;return Wn(e)})},Vn=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:v(e)}},Gn={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return Vn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return Vn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return Vn(n)},fromDom:Vn,fromPoint:function(e,t,n){var r=e.dom();return S.from(r.elementFromPoint(t,n)).map(Vn)}},Yn={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},Kn=function(e){return e.dom().nodeName.toLowerCase()},Xn=function(e){return e.dom().nodeType},Jn=function(e){return function(t){return Xn(t)===e}},Zn=Jn(Yn.ELEMENT),Qn=Jn(Yn.TEXT),er=Jn(Yn.DOCUMENT),tr={name:Kn,type:Xn,value:function(e){return e.dom().nodeValue},isElement:Zn,isText:Qn,isDocument:er,isComment:function(e){return Xn(e)===Yn.COMMENT||"#comment"===Kn(e)}},nr=Object.keys,rr=function(e,t){for(var n=nr(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},or=function(e,t){return ir(e,function(e,n,r){return{k:n,v:t(e,n,r)}})},ir=function(e,t){var n={};return rr(e,function(r,o){var i=t(r,o,e);n[i.k]=i.v}),n},ar=function(e,t,n){if(!(R(n)||P(n)||B(n)))throw console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},sr=function(e,t,n){ar(e.dom(),t,n)},cr=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},ur=function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},lr={clone:function(e){return j(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{})},set:sr,setAll:function(e,t){var n=e.dom();rr(t,function(e,t){ar(n,t,e)})},get:cr,has:ur,remove:function(e,t){e.dom().removeAttribute(t)},hasNone:function(e){var t=e.dom().attributes;return void 0===t||null===t||0===t.length},transfer:function(e,t,n){tr.isElement(e)&&tr.isElement(t)&&z(n,function(n){!function(e,t,n){ur(e,n)&&!ur(t,n)&&sr(t,n,cr(e,n))}(e,t,n)})}},fr=Tn(function(){return dr(Gn.fromDom(document))}),dr=function(e){var t=e.dom().body;if(null===t||void 0===t)throw"Body is not available yet";return Gn.fromDom(t)},mr={body:fr,getBody:dr,inBody:function(e){var t=tr.isText(e)?e.dom().parentNode:e.dom();return void 0!==t&&null!==t&&t.ownerDocument.body.contains(t)}},pr=function(e){return void 0!==e.style},hr=function(e,t,n){if(!R(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);pr(e)&&e.style.setProperty(t,n)},gr=function(e,t){return pr(e)?e.style.getPropertyValue(t):""},vr=function(e,t){var n=e.dom(),r=gr(n,t);return S.from(r).filter(function(e){return e.length>0})},br=function(e,t){var n=e.dom();rr(t,function(e,t){hr(n,t,e)})},yr=function(e,t){var n=e.dom(),r=window.getComputedStyle(n).getPropertyValue(t),o=""!==r||mr.inBody(e)?r:gr(n,t);return null===o?void 0:o},xr=vr,wr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return z(e,function(e,n){r[e]=v(t[n])}),r}},Cr=function(e,t){var n=[],r=function(e){return n.push(e),t(e)},o=t(e);do{o=o.bind(r)}while(o.isSome());return n},kr=function(){return re.getOrDie("Node")},Tr=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},_r=function(e,t){return Tr(e,t,kr().DOCUMENT_POSITION_CONTAINED_BY)},Er=Yn.ELEMENT,Sr=Yn.DOCUMENT,Nr=function(e){return e.nodeType!==Er&&e.nodeType!==Sr||0===e.childElementCount},Rr={all:function(e,t){var n=void 0===t?document:t.dom();return Nr(n)?[]:H(n.querySelectorAll(e),Gn.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==Er)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return Nr(n)?S.none():S.from(n.querySelector(e)).map(Gn.fromDom)}},Ar=function(e,t){return e.dom()===t.dom()},Dr=qn.detect().browser.isIE()?function(e,t){return _r(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Or={eq:Ar,isEqualNode:function(e,t){return e.dom().isEqualNode(t.dom())},member:function(e,t){return F(t,y(Ar,e))},contains:Dr,is:Rr.is},Pr=function(e){var t=e.dom();return S.from(t.parentNode).map(Gn.fromDom)},Ir=function(e){var t=e.dom();return S.from(t.previousSibling).map(Gn.fromDom)},Br=function(e){var t=e.dom();return S.from(t.nextSibling).map(Gn.fromDom)},Mr=function(e){var t=e.dom();return H(t.childNodes,Gn.fromDom)},Lr=function(e,t){var n=e.dom().childNodes;return S.from(n[t]).map(Gn.fromDom)},Fr=wr("element","offset"),Hr={owner:function(e){return Gn.fromDom(e.dom().ownerDocument)},defaultView:function(e){var t=e.dom().ownerDocument.defaultView;return Gn.fromDom(t)},documentElement:function(e){return Gn.fromDom(e.dom().ownerDocument.documentElement)},parent:Pr,findIndex:function(e){return Pr(e).bind(function(t){var n=Mr(t);return q(n,function(t){return Or.eq(e,t)})})},parents:function(e,t){for(var n=I(t)?t:v(!1),r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Gn.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},siblings:function(e){return Pr(e).map(Mr).map(function(t){return $(t,function(t){return!Or.eq(e,t)})}).getOr([])},prevSibling:Ir,offsetParent:function(e){var t=e.dom();return S.from(t.offsetParent).map(Gn.fromDom)},prevSiblings:function(e){return t=Cr(e,Ir),(n=X.call(t,0)).reverse(),n;var t,n},nextSibling:Br,nextSiblings:function(e){return Cr(e,Br)},children:Mr,child:Lr,firstChild:function(e){return Lr(e,0)},lastChild:function(e){return Lr(e,e.dom().childNodes.length-1)},childNodesCount:function(e){return e.dom().childNodes.length},hasChildNodes:function(e){return e.dom().hasChildNodes()},leaf:function(e,t){var n=Mr(e);return n.length>0&&t<n.length?Fr(n[t],0):Fr(e,t)}},zr=qn.detect().browser,Ur=function(e){return W(e,tr.isElement)},$r={getPos:function(e,t,n){var r,o,i=0,a=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===yr(Gn.fromDom(e),"position"))return{x:i=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:a=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType;)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType;)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(e){return zr.isFirefox()&&"table"===tr.name(e)?Ur(Hr.children(e)).filter(function(e){return"caption"===tr.name(e)}).bind(function(e){return Ur(Hr.nextSiblings(e)).map(function(t){var n=t.dom().offsetTop,r=e.dom().offsetTop,o=e.dom().offsetHeight;return n<=r?-o:0})}).getOr(0):0}(Gn.fromDom(t))}return{x:i,y:a}}},jr=function(e){var t=S.none(),n=[],r=function(e){o()?a(e):n.push(e)},o=function(){return t.isSome()},i=function(e){z(e,a)},a=function(e){t.each(function(t){setTimeout(function(){e(t)},0)})};return e(function(e){t=S.some(e),i(n),n=[]}),{get:r,map:function(e){return jr(function(t){r(function(n){t(e(n))})})},isReady:o}},Wr={nu:jr,pure:function(e){return jr(function(t){t(e)})}},qr=function(e){var t=function(t){var n;e((n=t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this;setTimeout(function(){n.apply(r,e)},0)}))},n=function(){return Wr.nu(t)};return{map:function(e){return qr(function(n){t(function(t){var r=e(t);n(r)})})},bind:function(e){return qr(function(n){t(function(t){e(t).get(n)})})},anonBind:function(e){return qr(function(n){t(function(t){e.get(n)})})},toLazy:n,toCached:function(){var e=null;return qr(function(t){null===e&&(e=n()),e.get(t)})},get:t}},Vr={nu:qr,pure:function(e){return qr(function(t){t(e)})}},Gr=function(e,t){return t(function(t){var n=[],r=0;0===e.length?t([]):z(e,function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=e.length&&t(n)}}(i))})})},Yr=function(e){return Gr(e,Vr.nu)},Kr=function(e){return{is:function(t){return e===t},isValue:w,isError:x,getOr:v(e),getOrThunk:v(e),getOrDie:v(e),or:function(t){return Kr(e)},orThunk:function(t){return Kr(e)},fold:function(t,n){return n(e)},map:function(t){return Kr(t(e))},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return S.some(e)}}},Xr=function(e){return{is:x,isValue:x,isError:w,getOr:b,getOrThunk:function(e){return e()},getOrDie:function(){return(t=String(e),function(){throw new Error(t)})();var t},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Xr(e)},each:h,bind:function(t){return Xr(e)},exists:x,forall:w,toOption:S.none}},Jr={value:Kr,error:Xr};function Zr(e,t){var n=e,r=function(e,n,r,o){var i,a;if(e){if(!o&&e[n])return e[n];if(e!==t){if(i=e[r])return i;for(a=e.parentNode;a&&a!==t;a=a.parentNode)if(i=a[r])return i}}};this.current=function(){return n},this.next=function(e){return n=r(n,"firstChild","nextSibling",e)},this.prev=function(e){return n=r(n,"lastChild","previousSibling",e)},this.prev2=function(e){return n=function(e,n,r,o){var i,a,s;if(e){if(i=e[r],t&&i===t)return;if(i){if(!o)for(s=i[n];s;s=s[n])if(!s[n])return s;return i}if((a=e.parentNode)&&a!==t)return a}}(n,"lastChild","previousSibling",e)}}var Qr,eo,to,no=function(e){var t;return function(n){return(t=t||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(e,v(!0))).hasOwnProperty(tr.name(n))}},ro=no(["h1","h2","h3","h4","h5","h6"]),oo=no(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),io=function(e){return tr.isElement(e)&&!oo(e)},ao=function(e){return tr.isElement(e)&&"br"===tr.name(e)},so=no(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),co=no(["ul","ol","dl"]),uo=no(["li","dd","dt"]),lo=no(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),fo=no(["thead","tbody","tfoot"]),mo=no(["td","th"]),po=no(["pre","script","textarea","style"]),ho=function(e){return function(t){return!!t&&t.nodeType===e}},go=ho(1),vo=function(e){var t=e.toLowerCase().split(" ");return function(e){var n,r;if(e&&e.nodeType)for(r=e.nodeName.toLowerCase(),n=0;n<t.length;n++)if(r===t[n])return!0;return!1}},bo=function(e){return function(t){if(go(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},yo=ho(3),xo=ho(8),wo=ho(9),Co=vo("br"),ko=bo("true"),To=bo("false"),_o={isText:yo,isElement:go,isComment:xo,isDocument:wo,isBr:Co,isContentEditableTrue:ko,isContentEditableFalse:To,matchNodeNames:vo,hasPropValue:function(e,t){return function(n){return go(n)&&n[e]===t}},hasAttribute:function(e,t){return function(t){return go(t)&&t.hasAttribute(e)}},hasAttributeValue:function(e,t){return function(n){return go(n)&&n.getAttribute(e)===t}},matchStyleValues:function(e,t){var n=t.toLowerCase().split(" ");return function(t){var r;if(go(t))for(r=0;r<n.length;r++){var o=t.ownerDocument.defaultView.getComputedStyle(t,null);if((o?o.getPropertyValue(e):null)===n[r])return!0}return!1}},isBogus:function(e){return go(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return go(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return go(e)&&"TABLE"===e.tagName}},Eo=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},So=function(e,t){var n,r=t.childNodes;if(!_o.isElement(t)||!Eo(t)){for(n=r.length-1;n>=0;n--)So(e,r[n]);if(!1===_o.isDocument(t)){if(_o.isText(t)&&t.nodeValue.length>0){var o=Yt.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||o>0)return;if(0===o&&function(e){var t=e.previousSibling&&"SPAN"===e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"===e.nextSibling.nodeName;return t&&n}(t))return}else if(_o.isElement(t)&&(1===(r=t.childNodes).length&&Eo(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||lo(Gn.fromDom(t))))return;e.remove(t)}return t}},No={trimNode:So},Ro=Yt.makeMap,Ao=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Do=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Oo=/[<>&\"\']/g,Po=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Io={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:"?"};eo={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},to={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var Bo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),eo[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};Qr=Bo("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 Mo=function(e,t){return e.replace(t?Ao:Do,function(e){return eo[e]||e})},Lo=function(e,t){return e.replace(t?Ao:Do,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":eo[e]||"&#"+e.charCodeAt(0)+";"})},Fo=function(e,t,n){return n=n||Qr,e.replace(t?Ao:Do,function(e){return eo[e]||n[e]||e})},Ho={encodeRaw:Mo,encodeAllRaw:function(e){return(""+e).replace(Oo,function(e){return eo[e]||e})},encodeNumeric:Lo,encodeNamed:Fo,getEncodeFunc:function(e,t){var n=Bo(t)||Qr,r=Ro(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Ao:Do,function(e){return void 0!==eo[e]?eo[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return Fo(e,t,n)}:Fo:r.numeric?Lo:Mo},decode:function(e){return e.replace(Po,function(e,t){return t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Io[t]||String.fromCharCode(t):to[e]||Qr[e]||(n=e,(r=Gn.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},zo={},Uo={},$o=Yt.makeMap,jo=Yt.each,Wo=Yt.extend,qo=Yt.explode,Vo=Yt.inArray,Go=function(e,t){return(e=Yt.trim(e))?e.split(t||" "):[]},Yo=function(e){var t,n,r,o,i,a,s={},c=function(e,n,r){var o,i,a,c=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(r=r||[],n=n||"","string"==typeof r&&(r=Go(r)),o=(e=Go(e)).length;o--;)a={attributes:c(i=Go([t,n].join(" "))),attributesOrder:i,children:c(r,Uo)},s[e[o]]=a},u=function(e,t){var n,r,o,i;for(n=(e=Go(e)).length,t=Go(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return zo[e]?zo[e]:(t="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="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"!==e&&(t+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(t+=" xml:lang",r=[r,a="acronym applet basefont big font strike tt"].join(" "),jo(Go(a),function(e){c(e,"",r)}),n=[n,i="center dir isindex noframes"].join(" "),o=[n,r].join(" "),jo(Go(i),function(e){c(e,"",o)})),o=o||[n,r].join(" "),c("html","manifest","head body"),c("head","","base command link meta noscript script style title"),c("title hr noscript br"),c("base","href target"),c("link","href rel media hreflang type sizes hreflang"),c("meta","name http-equiv content charset"),c("style","media type scoped"),c("script","src async defer type charset"),c("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),c("address dt dd div caption","",o),c("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","",r),c("blockquote","cite",o),c("ol","reversed start type","li"),c("ul","","li"),c("li","value",o),c("dl","","dt dd"),c("a","href target rel media hreflang type",r),c("q","cite",r),c("ins del","cite datetime",o),c("img","src sizes srcset alt usemap ismap width height"),c("iframe","src name width height",o),c("embed","src type width height"),c("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),c("param","name value"),c("map","name",[o,"area"].join(" ")),c("area","alt coords shape href target rel media hreflang type"),c("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),c("colgroup","span","col"),c("col","span"),c("tbody thead tfoot","","tr"),c("tr","","td th"),c("td","colspan rowspan headers",o),c("th","colspan rowspan headers scope abbr",o),c("form","accept-charset action autocomplete enctype method name novalidate target",o),c("fieldset","disabled form name",[o,"legend"].join(" ")),c("label","form for",r),c("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"),c("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?o:r),c("select","disabled form multiple name required size","option optgroup"),c("optgroup","disabled label","option"),c("option","disabled label selected value"),c("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),c("menu","type label",[o,"li"].join(" ")),c("noscript","",o),"html4"!==e&&(c("wbr"),c("ruby","",[r,"rt rp"].join(" ")),c("figcaption","",o),c("mark rt rp summary bdi","",r),c("canvas","width height",o),c("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),c("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),c("picture","","img source"),c("source","src srcset type media sizes"),c("track","kind src srclang label default"),c("datalist","",[r,"option"].join(" ")),c("article section nav aside header footer","",o),c("hgroup","","h1 h2 h3 h4 h5 h6"),c("figure","",[o,"figcaption"].join(" ")),c("time","datetime",r),c("dialog","open",o),c("command","type label icon disabled checked radiogroup command"),c("output","for form name",r),c("progress","value max",r),c("meter","value min max low high optimum",r),c("details","open",[o,"summary"].join(" ")),c("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(u("script","language xml:space"),u("style","xml:space"),u("object","declare classid code codebase codetype archive standby align border hspace vspace"),u("embed","align name hspace vspace"),u("param","valuetype type"),u("a","charset name rev shape coords"),u("br","clear"),u("applet","codebase archive code object alt name width height align hspace vspace"),u("img","name longdesc align border hspace vspace"),u("iframe","longdesc frameborder marginwidth marginheight scrolling align"),u("font basefont","size color face"),u("input","usemap align"),u("select","onchange"),u("textarea"),u("h1 h2 h3 h4 h5 h6 div p legend caption","align"),u("ul","type compact"),u("li","type"),u("ol dl menu dir","compact"),u("pre","width xml:space"),u("hr","align noshade size width"),u("isindex","prompt"),u("table","summary width frame rules cellspacing cellpadding align bgcolor"),u("col","width align char charoff valign"),u("colgroup","width align char charoff valign"),u("thead","align char charoff valign"),u("tr","align char charoff valign bgcolor"),u("th","axis align char charoff valign nowrap bgcolor width height"),u("form","accept"),u("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),u("tfoot","align char charoff valign"),u("tbody","align char charoff valign"),u("area","nohref"),u("body","background bgcolor text link vlink alink")),"html4"!==e&&(u("input button select textarea","autofocus"),u("input textarea","placeholder"),u("a","download"),u("link script img","crossorigin"),u("iframe","sandbox seamless allowfullscreen")),jo(Go("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,zo[e]=s,s)},Ko=function(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),jo(e,function(e,r){n[r]=n[r.toUpperCase()]="map"===t?$o(e,/[, ]/):qo(e,/[, ]/)})),n};function Xo(e){var t,n,r,o,i,a,s,c,u,l,f,d,m,p={},h={},g=[],v={},b={},y=function(t,n,r){var o=e[t];return o?o=$o(o,/[, ]/,$o(o.toUpperCase(),/[, ]/)):(o=zo[t])||(o=$o(n," ",$o(n.toUpperCase()," ")),o=Wo(o,r),zo[t]=o),o};r=Yo((e=e||{}).schema),!1===e.verify_html&&(e.valid_elements="*[*]"),t=Ko(e.valid_styles),n=Ko(e.invalid_styles,"map"),c=Ko(e.valid_classes,"map"),o=y("whitespace_elements","pre script noscript style textarea video audio iframe object code"),i=y("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=y("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=y("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=y("non_empty_elements","td th iframe video audio object script pre code",a),f=y("move_caret_before_on_enter_elements","table",l),d=y("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),u=y("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",d),m=y("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),jo((e.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){b[e]=new RegExp("</"+e+"[^>]*>","gi")});var x=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},w=function(e){var t,n,r,o,i,a,s,c,u,l,f,d,m,h,v,b,y,w,C,k=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,T=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,_=/[*?+]/;if(e)for(e=Go(e,","),p["@"]&&(b=p["@"].attributes,y=p["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=k.exec(e[t])){if(h=i[1],u=i[2],v=i[3],c=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===h&&(a.paddEmpty=!0),"-"===h&&(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=Go(c,"|")).length;r<o;r++)if(i=T.exec(c[r])){if(s={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),h=i[3],C=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),s.required=!0),"-"===f){delete d[l],m.splice(Vo(m,l),1);continue}h&&("="===h&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:C}),s.defaultValue=C),":"===h&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:C}),s.forcedValue=C),"<"===h&&(s.validValues=$o(C,"?"))),_.test(l)?(a.attributePatterns=a.attributePatterns||[],s.pattern=x(l),a.attributePatterns.push(s)):(d[l]||m.push(l),d[l]=s)}b||"@"!==u||(b=d,y=m),v&&(a.outputName=u,p[v]=a),_.test(u)?(a.pattern=x(u),g.push(a)):p[u]=a}},C=function(e){p={},g=[],w(e),jo(r,function(e,t){h[t]=e.children})},k=function(e){var t=/^(~)?(.+)$/;e&&(zo.text_block_elements=zo.block_elements=null,jo(Go(e,","),function(e){var n=t.exec(e),r="~"===n[1],o=r?"span":"div",i=n[2];if(h[i]=h[o],v[i]=o,r||(u[i.toUpperCase()]={},u[i]={}),!p[i]){var a=p[o];delete(a=Wo({},a)).removeEmptyAttrs,delete a.removeEmpty,p[i]=a}jo(h,function(e,t){e[o]&&(h[t]=e=Wo({},h[t]),e[i]=e[o])})}))},T=function(t){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;zo[e.schema]=null,t&&jo(Go(t,","),function(e){var t,r,o=n.exec(e);o&&(r=o[1],t=r?h[o[2]]:h[o[2]]={"#comment":{}},t=h[o[2]],jo(Go(o[3],"|"),function(e){"-"===r?delete t[e]:t[e]={}}))})},_=function(e){var t,n=p[e];if(n)return n;for(t=g.length;t--;)if((n=g[t]).pattern.test(e))return n};return e.valid_elements?C(e.valid_elements):(jo(r,function(e,t){p[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},h[t]=e.children}),"html5"!==e.schema&&jo(Go("strong/b em/i"),function(e){e=Go(e,"/"),p[e[1]].outputName=e[0]}),jo(Go("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){p[e]&&(p[e].removeEmpty=!0)}),jo(Go("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){p[e].paddEmpty=!0}),jo(Go("span"),function(e){p[e].removeEmptyAttrs=!0})),k(e.custom_elements),T(e.valid_children),w(e.extended_valid_elements),T("+ol[ul|ol],+ul[ul|ol]"),jo({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){p[t]&&(p[t].parentsRequired=Go(e))}),e.invalid_elements&&jo(qo(e.invalid_elements),function(e){p[e]&&delete p[e]}),_("span")||w("span[!data-mce-type|*]"),{children:h,elements:p,getValidStyles:function(){return t},getValidClasses:function(){return c},getBlockElements:function(){return u},getInvalidStyles:function(){return n},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return m},getBoolAttrs:function(){return s},getElementRule:_,getSelfClosingElements:function(){return i},getNonEmptyElements:function(){return l},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return o},getSpecialElements:function(){return b},isValidChild:function(e,t){var n=h[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=_(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return v},addValidElements:w,setValidElements:C,addCustomElements:k,addValidChildren:T}}var Jo=function(e,t,n,r){var o=function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e};return"#"+o(t)+o(n)+o(r)};function Zo(e,t){var n,r,o,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,s=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,u=/\s+$/,l={};for(e=e||{},t&&(o=t.getValidStyles(),i=t.getInvalidStyles()),r="\\\" \\' \\; \\: ; : \ufeff".split(" "),n=0;n<r.length;n++)l[r[n]]="\ufeff"+n,l["\ufeff"+n]=r[n];return{toHex:function(e){return e.replace(a,Jo)},parse:function(t){var r,o,i,f,d,m,p,h,g={},v=e.url_converter,b=e.url_converter_scope||this,y=function(e,t,r){var o,i,a,s;if((o=g[e+"-top"+t])&&(i=g[e+"-right"+t])&&(a=g[e+"-bottom"+t])&&(s=g[e+"-left"+t])){var c=[o,i,a,s];for(n=c.length-1;n--&&c[n]===c[n+1];);n>-1&&r||(g[e+t]=-1===n?c[0]:c.join(" "),delete g[e+"-top"+t],delete g[e+"-right"+t],delete g[e+"-bottom"+t],delete g[e+"-left"+t])}},x=function(e){var t,n=g[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return g[e]=n[0],!0}},w=function(e){return f=!0,l[e]},C=function(e,t){return f&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return l[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},k=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},T=function(e){return e.replace(/\\[0-9a-f]+/gi,k)},_=function(t,n,r,o,i,a){if(i=i||a)return"'"+(i=C(i)).replace(/\'/g,"\\'")+"'";if(n=C(n||r||o),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return v&&(n=v.call(b,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,w).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,w)});r=c.exec(t);)if(c.lastIndex=r.index+r[0].length,o=r[1].replace(u,"").toLowerCase(),i=r[2].replace(u,""),o&&i){if(o=T(o),i=T(i),-1!==o.indexOf("\ufeff")||-1!==o.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(i)))continue;"font-weight"===o&&"700"===i?i="bold":"color"!==o&&"background-color"!==o||(i=i.toLowerCase()),i=(i=i.replace(a,Jo)).replace(s,_),g[o]=f?C(i,!0):i}y("border","",!0),y("border","-width"),y("border","-color"),y("border","-style"),y("padding",""),y("margin",""),d="border",p="border-style",h="border-color",x(m="border-width")&&x(p)&&x(h)&&(g[d]=g[m]+" "+g[p]+" "+g[h],delete g[m],delete g[p],delete g[h]),"medium none"===g.border&&delete g.border,"none"===g["border-image"]&&delete g["border-image"]}return g},serialize:function(e,t){var n,r,a="",s=function(t){var n,r,i,s;if(n=o[t])for(r=0,i=n.length;r<i;r++)t=n[r],(s=e[t])&&(a+=(a.length>0?" ":"")+t+": "+s+";")},c=function(e,t){var n;return!((n=i["*"])&&n[e]||(n=i[t])&&n[e])};if(t&&o)s("*"),s(t);else for(n in e)!(r=e[n])||i&&!c(n,t)||(a+=(a.length>0?" ":"")+n+": "+r+";");return a}}}var Qo=Yt.each,ei=Yt.grep,ti=Ne.ie,ni=/^([a-z0-9],?)+$/i,ri=/^[ \t\r\n]*$/,oi=function(e,t,n){var r={},o=t.keep_values,i={set:function(e,r,o){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||n(),r,o,e[0])),e.attr("data-mce-"+o,r).attr(o,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}};return r={style:{set:function(e,t){null===t||"object"!=typeof t?(o&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serialize(e.parse(n),t[0].nodeName)}}},o&&(r.href=r.src=i),r},ii=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},ai=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function si(e,t){var n,r=this;void 0===t&&(t={});var o={},i=window,a={},s=0,c=function(e,t){var n,r=0,o={};n=(t=t||{}).maxLoadTime||5e3;var i=function(t){e.getElementsByTagName("head")[0].appendChild(t)},a=function(t,a,s){var c,u,l,f,d=function(){for(var e=f.passed,t=e.length;t--;)e[t]();f.status=2,f.passed=[],f.failed=[]},m=function(){for(var e=f.failed,t=e.length;t--;)e[t]();f.status=3,f.passed=[],f.failed=[]},p=function(e,t){e()||((new Date).getTime()-l<n?Pe.setTimeout(t):m())},h=function(){p(function(){for(var t,n,r=e.styleSheets,o=r.length;o--;)if((n=(t=r[o]).ownerNode?t.ownerNode:t.owningElement)&&n.id===c.id)return d(),!0},h)},g=function(){p(function(){try{var e=u.sheet.cssRules;return d(),!!e}catch(e){}},g)};if(t=Yt._addCacheSuffix(t),o[t]?f=o[t]:(f={passed:[],failed:[]},o[t]=f),a&&f.passed.push(a),s&&f.failed.push(s),1!==f.status)if(2!==f.status)if(3!==f.status){if(f.status=1,(c=e.createElement("link")).rel="stylesheet",c.type="text/css",c.id="u"+r++,c.async=!1,c.defer=!1,l=(new Date).getTime(),"onload"in c&&!((v=navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(v[1],10)<536))c.onload=h,c.onerror=m;else{if(navigator.userAgent.indexOf("Firefox")>0)return(u=e.createElement("style")).textContent='@import "'+t+'"',g(),void i(u);h()}var v;i(c),c.href=t}else m();else d()},s=function(e){return Vr.nu(function(t){a(e,g(t,v(Jr.value(e))),g(t,v(Jr.error(e))))})},c=function(e){return e.fold(b,b)};return{load:a,loadAll:function(e,t,n){Yr(H(e,s)).get(function(e){var r=U(e,function(e){return e.isValue()});r.fail.length>0?n(r.fail.map(c)):t(r.pass.map(c))})}}}(e),u=[],l=t.schema?t.schema:Xo({}),f=Zo({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),d=t.ownEvents?new $e(t.proxy):$e.Event,m=l.getBlockElements(),p=pn.overrideDefaults(function(){return{context:e,element:V.getRoot()}}),h=function(t){if(t&&e&&"string"==typeof t){var n=e.getElementById(t);return n&&n.id!==t?e.getElementsByName(t)[1]:n}return t},y=function(e){return"string"==typeof e&&(e=h(e)),p(e)},x=function(e,t,r){var o,i,a=y(e);return a.length&&(i=(o=n[t])&&o.get?o.get(a,t):a.attr(t)),void 0===i&&(i=r||""),i},w=function(e){var t=h(e);return t?t.attributes:[]},C=function(e,r,o){var i,a;""===o&&(o=null);var s=y(e);i=s.attr(r),s.length&&((a=n[r])&&a.set?a.set(s,o,r):s.attr(r,o),i!==o&&t.onSetAttrib&&t.onSetAttrib({attrElm:s,attrName:r,attrValue:o}))},k=function(){return t.root_element||e.body},T=function(t,n){return $r.getPos(e.body,h(t),n)},_=function(e,t,n){var r=y(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=Ne.ie&&Ne.ie<12?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)},E=function(e){var t,n;return e=h(e),t=_(e,"width"),n=_(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},S=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(ni.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return _t(t,i[0].ownerDocument||i[0],null,i).length>0},N=function(e,t,n,r){var o,i=[],a=h(e);for(r=void 0===r,n=n||("BODY"!==k().nodeName?k().parentNode:null),Yt.is(t,"string")&&(o=t,t="*"===t?function(e){return 1===e.nodeType}:function(e){return S(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},R=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return S(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},A=function(e,t,n){var o,i="string"==typeof e?h(e):e;if(!i)return!1;if(Yt.isArray(i)&&(i.length||0===i.length))return o=[],Qo(i,function(e,r){e&&("string"==typeof e&&(e=h(e)),o.push(t.call(n,e,r)))}),o;var a=n||r;return t.call(a,i)},D=function(e,t){y(e).each(function(e,n){Qo(t,function(e,t){C(n,t,e)})})},O=function(e,t){var n=y(e);ti?n.each(function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(e){pn("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}}):n.html(t)},P=function(t,n,r,o,i){return A(t,function(t){var a="string"==typeof n?e.createElement(n):n;return D(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&O(a,o)),i?a:t.appendChild(a)})},I=function(t,n,r){return P(e.createElement(t),t,n,r,!0)},B=Ho.decode,M=Ho.encodeAllRaw,L=function(e,t){var n=y(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),n.length>1?n.toArray():n[0]},F=function(e,t,n){y(e).toggleClass(t,n).each(function(){""===this.className&&pn(this).attr("class",null)})},z=function(e,t,n){return A(t,function(t){return Yt.is(t,"array")&&(e=e.cloneNode(!0)),n&&Qo(ei(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},$=function(){return e.createRange()},j=function(n,r,o,a){if(Yt.isArray(n)){for(var s=n.length;s--;)n[s]=j(n[s],r,o,a);return n}return!t.collect||n!==e&&n!==i||u.push([n,r,o,a]),d.bind(n,r,o,a||V)},W=function(t,n,r){var o;if(Yt.isArray(t)){for(o=t.length;o--;)t[o]=W(t[o],n,r);return t}if(u&&(t===e||t===i))for(o=u.length;o--;){var a=u[o];t!==a[0]||n&&n!==a[1]||r&&r!==a[2]||d.unbind(a[0],a[1],a[2])}return d.unbind(t,n,r)},q=function(e){if(e&&_o.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},V={doc:e,settings:t,win:i,files:a,stdMode:!0,boxModel:!0,styleSheetLoader:c,boundEvents:u,styles:f,schema:l,events:d,isBlock:function(e){if("string"==typeof e)return!!m[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!m[e.nodeName])}return!1},$:p,$$:y,root:null,clone:function(t,n){if(!ti||1!==t.nodeType||n)return t.cloneNode(n);if(!n){var r=e.createElement(t.nodeName);return Qo(w(t),function(e){C(r,e.nodeName,x(t,e.nodeName))}),r}return null},getRoot:k,getViewPort:function(e){var t=e||i,n=t.document,r=n.documentElement;return{x:t.pageXOffset||r.scrollLeft,y:t.pageYOffset||r.scrollTop,w:t.innerWidth||r.clientWidth,h:t.innerHeight||r.clientHeight}},getRect:function(e){var t,n;return e=h(e),t=T(e),n=E(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:E,getParent:function(e,t,n){var r=N(e,t,n,!1);return r&&r.length>0?r[0]:null},getParents:N,get:h,getNext:function(e,t){return R(e,t,"nextSibling")},getPrev:function(e,t){return R(e,t,"previousSibling")},select:function(n,r){return _t(n,h(r)||t.root_element||e,[])},is:S,add:P,create:I,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&void 0!==t[r]&&(o+=" "+r+'="'+M(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":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:L,setStyle:function(e,n,r){var o=y(e).css(n,r);t.update_styles&&ii(f,o)},getStyle:_,setStyles:function(e,n){var r=y(e).css(n);t.update_styles&&ii(f,r)},removeAllAttribs:function(e){return A(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:C,setAttribs:D,getAttrib:x,getPos:T,parseStyle:function(e){return f.parse(e)},serializeStyle:function(e,t){return f.serialize(e,t)},addStyle:function(t){var n,r;if(V!==si.DOM&&e===document){if(o[t])return;o[t]=!0}(r=e.getElementById("mceDefaultStyles"))||((r=e.createElement("style")).id="mceDefaultStyles",r.type="text/css",(n=e.getElementsByTagName("head")[0]).firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)),r.styleSheet?r.styleSheet.cssText+=t:r.appendChild(e.createTextNode(t))},loadCSS:function(t){var n;V===si.DOM||e!==document?(t||(t=""),n=e.getElementsByTagName("head")[0],Qo(t.split(","),function(e){var t;e=Yt._addCacheSuffix(e),a[e]||(a[e]=!0,t=I("link",{rel:"stylesheet",href:e}),n.appendChild(t))})):si.DOM.loadCSS(t)},addClass:function(e,t){y(e).addClass(t)},removeClass:function(e,t){F(e,t,!1)},hasClass:function(e,t){return y(e).hasClass(t)},toggleClass:F,show:function(e){y(e).show()},hide:function(e){y(e).hide()},isHidden:function(e){return"none"===y(e).css("display")},uniqueId:function(e){return(e||"mce_")+s++},setHTML:O,getOuterHTML:function(e){var t="string"==typeof e?h(e):e;return _o.isElement(t)?t.outerHTML:pn("<div></div>").append(pn(t).clone()).html()},setOuterHTML:function(e,t){y(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}L(pn(this).html(t),!0)})},decode:B,encode:M,insertAfter:function(e,t){var n=h(t);return A(e,function(e){var t,r;return t=n.parentNode,(r=n.nextSibling)?t.insertBefore(e,r):t.appendChild(e),e})},replace:z,rename:function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=I(t),Qo(w(e),function(t){C(n,t.nodeName,x(e,t.nodeName))}),z(n,e,!0)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return f.toHex(Yt.trim(e))},run:A,getAttribs:w,isEmpty:function(e,t){var n,r,o,i,a,s,c=0;if(e=e.firstChild){a=new Zr(e,e.parentNode),t=t||(l?l.getNonEmptyElements():null),i=l?l.getWhiteSpaceElements():{};do{if(o=e.nodeType,_o.isElement(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=a.next("all"===u);continue}if(s=e.nodeName.toLowerCase(),t&&t[s]){if("br"===s){c++,e=a.next();continue}return!1}for(n=(r=w(e)).length;n--;)if("name"===(s=r[n].nodeName)||"data-mce-bookmark"===s)return!1}if(8===o)return!1;if(3===o&&!ri.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&i[e.parentNode.nodeName]&&ri.test(e.nodeValue))return!1;e=a.next()}while(e)}return c<=1},createRng:$,nodeIndex:ai,split:function(e,t,n){var r,o,i,a=$();if(e&&t)return a.setStart(e.parentNode,ai(e)),a.setEnd(t.parentNode,ai(t)),r=a.extractContents(),(a=$()).setStart(t.parentNode,ai(t)+1),a.setEnd(e.parentNode,ai(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(No.trimNode(V,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(No.trimNode(V,o),e),L(e),n||t},bind:j,unbind:W,fire:function(e,t,n){return d.fire(e,t,n)},getContentEditable:q,getContentEditableParent:function(e){for(var t=k(),n=null;e&&e!==t&&null===(n=q(e));e=e.parentNode);return n},destroy:function(){if(u)for(var e=u.length;e--;){var t=u[e];d.unbind(t[0],t[1],t[2])}_t.setDocument&&_t.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return n=oi(f,t,function(){return V}),V}!function(e){e.DOM=e(document),e.nodeIndex=ai}(si||(si={}));var ci=si,ui=ci.DOM,li=Yt.each,fi=Yt.grep,di=function(e){return"function"==typeof e},mi=function(){var e={},t=[],n={},r=[],o=0;this.isDone=function(t){return 2===e[t]},this.markDone=function(t){e[t]=2},this.add=this.load=function(r,o,i,a){void 0===e[r]&&(t.push(r),e[r]=0),o&&(n[r]||(n[r]=[]),n[r].push({success:o,failure:a,scope:i||this}))},this.remove=function(t){delete e[t],delete n[t]},this.loadQueue=function(e,n,r){this.loadScripts(t,e,n,r)},this.loadScripts=function(t,i,a,s){var c,u=[],l=function(e,t){li(n[t],function(t){di(t[e])&&t[e].call(t.scope)}),n[t]=void 0};r.push({success:i,failure:s,scope:a||this}),(c=function(){var n=fi(t);if(t.length=0,li(n,function(t){2!==e[t]?3!==e[t]?1!==e[t]&&(e[t]=1,o++,function(e,t,n){var r,o,i=ui;o=i.uniqueId(),(r=document.createElement("script")).id=o,r.type="text/javascript",r.src=Yt._addCacheSuffix(e),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){di(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}(t,function(){e[t]=2,o--,l("success",t),c()},function(){e[t]=3,o--,u.push(t),l("failure",t),c()})):l("failure",t):l("success",t)}),!o){var i=r.slice(0);r.length=0,li(i,function(e){0===u.length?di(e.success)&&e.success.call(e.scope):di(e.failure)&&e.failure.call(e.scope,u)})}})()}};mi.ScriptLoader=new mi;var pi=Yt.each;function hi(){var e=this,t=[],n={},r={},o=[],i=function(e){var t;return r[e]&&(t=r[e].dependencies),t||[]},a=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},s=function(e,t,n,r){var o=i(e);pi(o,function(e){var n=a(t,e);c(n.resource,n,void 0,void 0)}),n&&(r?n.call(r):n.call(mi))},c=function(e,t,o,i,a){if(!n[e]){var c="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==c.indexOf("/")&&-1===c.indexOf("://")&&(c=hi.baseURL+"/"+c),n[e]=c.substring(0,c.lastIndexOf("/")),r[e]?s(e,t,o,i):mi.ScriptLoader.add(c,function(){return s(e,t,o,i)},i,a)}};return{items:t,urls:n,lookup:r,_listeners:o,get:function(e){if(r[e])return r[e].instance},dependencies:i,requireLangPack:function(e,t){var r=hi.language;if(r&&!1!==hi.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+r.substr(0,2)+","))r=r.substr(0,2);else if(-1===t.indexOf(","+r+","))return;mi.ScriptLoader.add(n[e]+"/langs/"+r+".js")}},add:function(e,n,i){t.push(n),r[e]={instance:n,dependencies:i};var a=U(o,function(t){return t.name===e});return o=a.fail,pi(a.pass,function(e){e.callback()}),n},remove:function(e){delete n[e],delete r[e]},createUrl:a,addComponents:function(t,n){var r=e.urls[t];pi(n,function(e){mi.ScriptLoader.add(r+"/"+e)})},load:c,waitFor:function(e,t){r.hasOwnProperty(e)?t():o.push({name:e,callback:t})}}}!function(e){e.PluginManager=e(),e.ThemeManager=e()}(hi||(hi={}));var gi=function(e,t){Hr.parent(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},vi=function(e,t){e.dom().appendChild(t.dom())},bi={before:gi,after:function(e,t){Hr.nextSibling(e).fold(function(){Hr.parent(e).each(function(e){vi(e,t)})},function(e){gi(e,t)})},prepend:function(e,t){Hr.firstChild(e).fold(function(){vi(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},append:vi,appendAt:function(e,t,n){Hr.child(e,n).fold(function(){vi(e,t)},function(e){gi(e,t)})},wrap:function(e,t){gi(e,t),vi(t,e)}},yi=function(e,t){z(t,function(t){bi.before(e,t)})},xi=function(e,t){z(t,function(t){bi.append(e,t)})},wi=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Ci={empty:function(e){e.dom().textContent="",z(Hr.children(e),function(e){wi(e)})},remove:wi,unwrap:function(e){var t=Hr.children(e);t.length>0&&yi(e,t),wi(e)}},ki=function(e,t){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];null===n&&(n=setTimeout(function(){e.apply(null,r),n=null},t))}}},Ti=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Ti(n())}}},_i=function(e,t){var n=lr.get(e,t);return void 0===n||""===n?[]:n.split(" ")},Ei=_i,Si=function(e,t,n){var r=_i(e,t).concat([n]);return lr.set(e,t,r.join(" ")),!0},Ni=function(e,t,n){var r=$(_i(e,t),function(e){return e!==n});return r.length>0?lr.set(e,t,r.join(" ")):lr.remove(e,t),!1},Ri=function(e){return Ei(e,"class")},Ai=function(e,t){return Si(e,"class",t)},Di=function(e,t){return Ni(e,"class",t)},Oi=Ri,Pi=Ai,Ii=Di,Bi=function(e,t){return L(Ri(e),t)?Di(e,t):Ai(e,t)},Mi=function(e){return void 0!==e.dom().classList},Li=function(e,t){return Mi(e)&&e.dom().classList.contains(t)},Fi={add:function(e,t){Mi(e)?e.dom().classList.add(t):Pi(e,t)},remove:function(e,t){Mi(e)?e.dom().classList.remove(t):Ii(e,t),function(e){0===(Mi(e)?e.dom().classList:Oi(e)).length&&lr.remove(e,"class")}(e)},toggle:function(e,t){return Mi(e)?e.dom().classList.toggle(t):Bi(e,t)},toggler:function(e,t){var n=Mi(e),r=e.dom().classList;return function(e,t,n){var r=n||!1,o=function(){t(),r=!0},i=function(){e(),r=!1};return{on:o,off:i,toggle:function(){(r?i:o)()},isOn:function(){return r}}}(function(){n?r.remove(t):Ii(e,t)},function(){n?r.add(t):Pi(e,t)},Li(e,t))},has:Li},Hi=function(e,t){return Rr.all(t,e)};function zi(e,t,n,r,o){return e(n,r)?S.some(n):I(o)&&o(n)?S.none():t(n,r,o)}var Ui=function(e,t,n){for(var r=e.dom(),o=I(n)?n:v(!1);r.parentNode;){r=r.parentNode;var i=Gn.fromDom(r);if(t(i))return S.some(i);if(o(i))break}return S.none()},$i=function(e,t){return W(e.dom().childNodes,g(t,Gn.fromDom)).map(Gn.fromDom)},ji=function(e,t){var n=function(e){for(var r=0;r<e.childNodes.length;r++){if(t(Gn.fromDom(e.childNodes[r])))return S.some(Gn.fromDom(e.childNodes[r]));var o=n(e.childNodes[r]);if(o.isSome())return o}return S.none()};return n(e.dom())},Wi={first:function(e){return ji(mr.body(),e)},ancestor:Ui,closest:function(e,t,n){return zi(function(e){return t(e)},Ui,e,t,n)},sibling:function(e,t){var n=e.dom();return n.parentNode?$i(Gn.fromDom(n.parentNode),function(n){return!Or.eq(e,n)&&t(n)}):S.none()},child:$i,descendant:ji},qi=function(e,t,n){return Wi.ancestor(e,function(e){return Rr.is(e,t)},n)},Vi=qi,Gi=function(e,t){return Rr.one(t,e)},Yi=function(e,t,n){return zi(Rr.is,qi,e,t,n)},Ki=v("mce-annotation"),Xi=v("data-mce-annotation"),Ji=v("data-mce-annotation-uid"),Zi=function(e,t){var n=e.selection.getRng(),r=Gn.fromDom(n.startContainer),o=Gn.fromDom(e.getBody()),i=t.fold(function(){return"."+Ki()},function(e){return"["+Xi()+'="'+e+'"]'}),a=Hr.child(r,n.startOffset).getOr(r),s=function(e,t){return lr.has(e,t)?S.some(lr.get(e,t)):S.none()};return Yi(a,i,function(e){return Or.eq(e,o)}).bind(function(t){return s(t,""+Ji()).bind(function(n){return s(t,""+Xi()).map(function(t){var r=Qi(e,n);return{uid:n,name:t,elements:r}})})})},Qi=function(e,t){var n=Gn.fromDom(e.getBody());return Hi(n,"["+Ji()+'="'+t+'"]')},ea=function(e,t){var n=Gn.fromDom(e.getBody()),r=Hi(n,"["+Xi()+'="'+t+'"]'),o={};return z(r,function(e){var t=lr.get(e,Ji()),n=o.hasOwnProperty(t)?o[t]:[];o[t]=n.concat([e])}),o},ta=function(e,t){var n,r,o,i=Ti({}),a=function(e,t){s(e,function(e){return t(e),e})},s=function(e,t){var n=i.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Ti(S.none())});n[e]=r,i.set(n)},c=(n=function(){var t,n,r,o=i.get(),c=(t=nr(o),(r=X.call(t,0)).sort(n),r);z(c,function(t){s(t,function(n){var r=n.previous.get();return Zi(e,S.some(t)).fold(function(){r.isSome()&&(function(e){a(e,function(t){z(t.listeners,function(t){return t(!1,e)})})}(t),n.previous.set(S.none()))},function(e){var t=e.uid,o=e.name,i=e.elements;r.is(t)||(function(e,t,n){a(e,function(r){z(r.listeners,function(r){return r(!0,e,{uid:t,nodes:H(n,function(e){return e.dom()})})})})}(o,t,i),n.previous.set(S.some(t)))}),{previous:n.previous,listeners:n.listeners}})})},r=30,o=null,{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&clearTimeout(o),o=setTimeout(function(){n.apply(null,e),o=null},r)}});return e.on("remove",function(){c.cancel()}),e.on("nodeChange",function(){c.throttle()}),{addListener:function(e,t){s(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},na=function(e,t){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(e){(function(e){return S.from(e.attributes.map[Xi()]).bind(t.lookup)})(e).each(function(t){!1===t.persistent&&e.unwrap()})})})})},ra=function(){var e={};return{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return e.hasOwnProperty(t)?S.from(e[t]).map(function(e){return e.settings}):S.none()}}},oa=0,ia=function(e,t){z(t,function(t){Fi.add(e,t)})},aa=function(e,t){return Gn.fromDom(e.dom().cloneNode(t))},sa=function(e){return aa(e,!0)},ca=function(e){return aa(e,!1)},ua=sa,la=[].slice,fa=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=la.call(arguments);return r.length-1>=e.length?e.apply(this,r.slice(1)):function(){var e=r.concat([].slice.call(arguments));return fa.apply(this,e)}},da={constant:function(e){return function(){return e}},negate:function(e){return function(t){return!e(t)}},and:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=la.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},or:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=la.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},curry:fa,compose:function(e,t){return function(n){return e(t(n))}},noop:function(){}},ma=function(e){return"\ufeff"===e},pa="\ufeff",ha=function(e){return e.replace(new RegExp("\ufeff","g"),"")},ga=_o.isElement,va=_o.isText,ba=function(e){return va(e)&&(e=e.parentNode),ga(e)&&e.hasAttribute("data-mce-caret")},ya=function(e){return va(e)&&ma(e.data)},xa=function(e){return ba(e)||ya(e)},wa=function(e){return e.firstChild!==e.lastChild||!_o.isBr(e.firstChild)},Ca=function(e){var t=e.container();return e&&_o.isText(t)&&t.data.charAt(e.offset())===pa},ka=function(e){var t=e.container();return e&&_o.isText(t)&&t.data.charAt(e.offset()-1)===pa},Ta=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},_a=function(e){return va(e)&&e.data[0]===pa},Ea=function(e){return va(e)&&e.data[e.data.length-1]===pa},Sa=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],_o.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Na=_o.isContentEditableTrue,Ra=_o.isContentEditableFalse,Aa=_o.isBr,Da=_o.isText,Oa=_o.matchNodeNames("script style textarea"),Pa=_o.matchNodeNames("img input textarea hr iframe video audio object"),Ia=_o.matchNodeNames("table"),Ba=xa,Ma=function(e){return!Ba(e)&&(Da(e)?!Oa(e.parentNode):Pa(e)||Aa(e)||Ia(e)||La(e))},La=function(e){return!1===function(e){return _o.isElement(e)&&"true"===e.getAttribute("unselectable")}(e)&&Ra(e)},Fa=function(e,t){return Ma(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(La(e))return!1;if(Na(e))return!0}return!0}(e,t)},Ha=Math.round,za=function(e){return e?{left:Ha(e.left),top:Ha(e.top),bottom:Ha(e.bottom),right:Ha(e.right),width:Ha(e.width),height:Ha(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Ua=function(e,t){return e=za(e),t?e.right=e.left:(e.left=e.left+e.width,e.right=e.left),e.width=0,e},$a=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},ja=function(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&$a(t.top-e.bottom,e,t)},Wa=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&$a(t.bottom-e.top,e,t)},qa=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Va=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},Ga=new RegExp("[?-??-??-??-???-??-???-??-???-??-??-??-???-??-??-??-??-??-??-??-??-????-???-??-?????-????-??-???-??-??-???-???-???-??-???-??????-?????-????????-??-??-??-??-???????-??-??-????-????-????-?????-??-???-??-??-??-?????-??-??-??-??-???-??-??-??-??-??-??-???-????-??-??-??-??-??-??-???-???-???-??-???-??-????-????-??-???-???-???-????-??-??-??-??-???-???-??-??-??-??-??-????-??-??-??-??-??-???-??-??-???-??-??-??-???-??-??-??-?????-???-??-??-??-???-????-??-??-??????-??-??-???-???????-??-??-?]"),Ya=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&Ga.test(e)},Ka=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return S.none();n.push(o.getOrDie())}return S.some(t.apply(null,n))},Xa=_o.isElement,Ja=Ma,Za=_o.matchStyleValues("display","block table"),Qa=_o.matchStyleValues("float","left right"),es=da.and(Xa,Ja,da.negate(Qa)),ts=da.negate(_o.matchStyleValues("white-space","pre pre-line pre-wrap")),ns=_o.isText,rs=_o.isBr,os=ci.nodeIndex,is=Va,as=function(e){return"createRange"in e?e.createRange():ci.DOM.createRng()},ss=function(e){return e&&/[\r\n\t ]/.test(e)},cs=function(e){return!!e.setStart&&!!e.setEnd},us=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(ss(e.toString())&&ts(n.parentNode)&&_o.isText(n)&&(t=n.data,ss(t[r-1])||ss(t[r+1])))},ls=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},fs=function(e){var t,n;return t=(n=e.getClientRects()).length>0?za(n[0]):za(e.getBoundingClientRect()),!cs(e)&&rs(e)&&ls(t)?function(e){var t,n=e.ownerDocument,r=as(n),o=n.createTextNode(""),i=e.parentNode;return i.insertBefore(o,e),r.setStart(o,0),r.setEnd(o,1),t=za(r.getBoundingClientRect()),i.removeChild(o),t}(e):ls(t)&&cs(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&_o.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),fs(i)}return null}(e):t},ds=function(e,t){var n=Ua(e,t);return n.width=1,n.right=n.left+1,n},ms=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(r.length>0&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=as(e.ownerDocument);if(t<e.data.length){if(Ya(e.data[t]))return r;if(Ya(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!us(n)))return o(ds(fs(n),!1)),r}t>0&&(n.setStart(e,t-1),n.setEnd(e,t),us(n)||o(ds(fs(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),us(n)||o(ds(fs(n),!0)))};if(ns(e.container()))return i(e.container(),e.offset()),r;if(Xa(e.container()))if(e.isAtEnd())n=is(e.container(),e.offset()),ns(n)&&i(n,n.data.length),es(n)&&!rs(n)&&o(ds(fs(n),!1));else{if(n=is(e.container(),e.offset()),ns(n)&&i(n,0),es(n)&&e.isAtEnd())return o(ds(fs(n),!1)),r;t=is(e.container(),e.offset()-1),es(t)&&!rs(t)&&(Za(t)||Za(n)||!es(n))&&o(ds(fs(t),!1)),es(n)&&o(ds(fs(n),!0))}return r};function ps(e,t,n){var r=function(){return n||(n=ms(ps(e,t))),n};return{container:da.constant(e),offset:da.constant(t),toRange:function(){var n;return(n=as(e.ownerDocument)).setStart(e,t),n.setEnd(e,t),n},getClientRects:r,isVisible:function(){return r().length>0},isAtStart:function(){return ns(e),0===t},isAtEnd:function(){return ns(e)?t>=e.data.length:t>=e.childNodes.length},isEqual:function(n){return n&&e===n.container()&&t===n.offset()},getNode:function(n){return is(e,n?t-1:t)}}}!function(e){e.fromRangeStart=function(t){return e(t.startContainer,t.startOffset)},e.fromRangeEnd=function(t){return e(t.endContainer,t.endOffset)},e.after=function(t){return e(t.parentNode,os(t)+1)},e.before=function(t){return e(t.parentNode,os(t))},e.isAbove=function(e,t){return Ka([Z(t.getClientRects()),Q(e.getClientRects())],ja).getOr(!1)},e.isBelow=function(e,t){return Ka([Q(t.getClientRects()),Z(e.getClientRects())],Wa).getOr(!1)},e.isAtStart=function(e){return!!e&&e.isAtStart()},e.isAtEnd=function(e){return!!e&&e.isAtEnd()},e.isTextPosition=function(e){return!!e&&_o.isText(e.container())},e.isElementPosition=function(t){return!1===e.isTextPosition(t)}}(ps||(ps={}));var hs,gs=ps,vs=_o.isText,bs=_o.isBogus,ys=ci.nodeIndex,xs=function(e){var t=e.parentNode;return bs(t)?xs(t):t},ws=function(e){return e?jt.reduce(e.childNodes,function(e,t){return bs(t)&&"BR"!==t.nodeName?e=e.concat(ws(t)):e.push(t),e},[]):[]},Cs=function(e){return function(t){return e===t}},ks=function(e){return(vs(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var t,n,r;return t=ws(xs(e)),n=jt.findIndex(t,Cs(e),e),t=t.slice(0,n+1),r=jt.reduce(t,function(e,n,r){return vs(n)&&vs(t[r-1])&&e++,e},0),t=jt.filter(t,_o.matchNodeNames(e.nodeName)),(n=jt.findIndex(t,Cs(e),e))-r}(e)+"]"},Ts=function(e,t){var n,r,o,i,a,s=[];return n=t.container(),r=t.offset(),vs(n)?o=function(e,t){for(;(e=e.previousSibling)&&vs(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),s.push(ks(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=jt.filter(a,da.negate(_o.isBogus)),(s=s.concat(jt.map(a,function(e){return ks(e)}))).reverse().join("/")+","+o},_s=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=n.length>1?n[1]:"before",(r=jt.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=ws(n),i=jt.filter(i,function(e,t){return!vs(e)||!vs(i[t-1])}),(i=jt.filter(i,_o.matchNodeNames(r)))[o]):null;var n,r,o,i},e))?vs(r)?function(e,t){for(var n,r=e,o=0;vs(r);){if(n=r.data.length,t>=o&&t<=o+n){e=r,t-=o;break}if(!vs(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return vs(e)&&t>e.data.length&&(t=e.data.length),gs(e,t)}(r,parseInt(o,10)):(o="after"===o?ys(r)+1:ys(r),gs(r.parentNode,o)):null):null},Es=_o.isContentEditableFalse,Ss=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],s=r[o?"startOffset":"endOffset"],c=[],u=0,l=e.getRoot();for(_o.isText(a)?c.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&_o.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,s):s):(s>=(i=a.childNodes).length&&i.length&&(u=1,s=Math.max(0,i.length-1)),c.push(e.nodeIndex(i[s],n)+u));a&&a!==l;a=a.parentNode)c.push(e.nodeIndex(a,n));return c},Ns=function(e){_o.isText(e)&&0===e.data.length&&e.parentNode.removeChild(e)},Rs=function(e,t,n){var r=0;return Yt.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},As=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],_o.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},Ds=function(e){return As(e,!0),As(e,!1),e},Os=function(e,t){var n;if(_o.isElement(e)&&(e=Va(e,t),Es(e)))return e;if(xa(e)){if(_o.isText(e)&&ba(e)&&(e=e.parentNode),n=e.previousSibling,Es(n))return n;if(n=e.nextSibling,Es(n))return n}},Ps=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Es(r)||"IMG"===o)return{name:o,index:Rs(n.dom,o,r)};var a=function(e){return Os(e.startContainer,e.startOffset)||Os(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Rs(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Ss(o,e,n,r,!0),t.isCollapsed()||(i.end=Ss(o,e,n,r,!1)),i}(e,n,t,i)},Is=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Bs=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),s=a.nodeName;if("IMG"===s)return{name:s,index:Rs(n,s,a)};var c=Ds(r.cloneRange());if(!i){c.collapse(!1);var u=Is(n,o+"_end",t);c.insertNode(u),Ns(u.nextSibling)}(r=Ds(r)).collapse(!0);var l=Is(n,o+"_start",t);return r.insertNode(l),Ns(l.previousSibling),Ns(l.nextSibling),e.moveToBookmark({id:o,keep:1}),{id:o}},Ms={getBookmark:function(e,t,n){return 2===t?Ps(ha,n,e):3===t?function(e){var t=e.getRng();return{start:Ts(e.dom.getRoot(),gs.fromRangeStart(t)),end:Ts(e.dom.getRoot(),gs.fromRangeEnd(t))}}(e):t?function(e){return{rng:e.getRng()}}(e):Bs(e,!1)},getUndoBookmark:y(Ps,b,!0),getPersistentBookmark:Bs},Ls=function(e){return _o.isElement(e)&&"_mce_caret"===e.id},Fs=function(e,t){for(;t&&t!==e;){if("_mce_caret"===t.id)return t;t=t.parentNode}return null},Hs=_o.isElement,zs=_o.isText,Us=function(e){var t=e.parentNode;t&&t.removeChild(e)},$s=function(e,t){0===t.length?Us(e):e.nodeValue=t},js=function(e){var t=ha(e);return{count:e.length-t.length,text:t}},Ws=function(e,t){return Gs(e),t},qs=function(e,t){var n,r,o,i=t.container(),a=(n=ee(i.childNodes),r=e,o=M(n,r),-1===o?S.none():S.some(o)).map(function(e){return e<t.offset()?gs(i,t.offset()-1):t}).getOr(t);return Gs(e),a},Vs=function(e,t){return zs(e)&&t.container()===e?function(e,t){var n=js(e.data.substr(0,t.offset())),r=js(e.data.substr(t.offset())),o=n.text+r.text;return o.length>0?($s(e,o),gs(e,t.offset()-n.count)):t}(e,t):Ws(e,t)},Gs=function(e){if(Hs(e)&&xa(e)&&(wa(e)?e.removeAttribute("data-mce-caret"):Us(e)),zs(e)){var t=ha(function(e){try{return e.nodeValue}catch(e){return""}}(e));$s(e,t)}},Ys={removeAndReposition:function(e,t){return gs.isTextPosition(t)?Vs(e,t):function(e,t){return t.container()===e.parentNode?qs(e,t):Ws(e,t)}(e,t)},remove:Gs},Ks=_o.isContentEditableTrue,Xs=_o.isContentEditableFalse,Js=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},Zs=function(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}(t)},Qs=function(e,t,n){var r=hu(1,e.getBody(),t),o=gs.fromRangeStart(r),i=o.getNode();if(Xs(i))return Js(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Xs(a))return Js(1,e,a,!1,!1);var s=e.dom.getParent(o.getNode(),function(e){return Xs(e)||Ks(e)});return Xs(s)?Js(1,e,s,!1,n):null},ec=function(e,t,n){if(!t||!t.collapsed)return t;var r=Qs(e,t,n);return r||t};!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(hs||(hs={}));var tc,nc=_o.isContentEditableFalse,rc=_o.isText,oc=_o.isElement,ic=_o.isBr,ac=Ma,sc=function(e){return Pa(e)||function(e){return!!La(e)&&!0!==jt.reduce(e.getElementsByTagName("*"),function(e,t){return e||Na(t)},!1)}(e)},cc=Fa,uc=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},lc=function(e,t){if(ru(e)){if(ac(t.previousSibling)&&!rc(t.previousSibling))return gs.before(t);if(rc(t))return gs(t,0)}if(ou(e)){if(ac(t.nextSibling)&&!rc(t.nextSibling))return gs.after(t);if(rc(t))return gs(t,t.data.length)}return ou(e)?ic(t)?gs.before(t):gs.after(t):gs.before(t)},fc=function(e,t,n){var r,o,i,a,s;if(!oc(n)||!t)return null;if(t.isEqual(gs.after(n))&&n.lastChild){if(s=gs.after(n.lastChild),ou(e)&&ac(n.lastChild)&&oc(n.lastChild))return ic(n.lastChild)?gs.before(n.lastChild):s}else s=t;var c=s.container(),u=s.offset();if(rc(c)){if(ou(e)&&u>0)return gs(c,--u);if(ru(e)&&u<c.length)return gs(c,++u);r=c}else{if(ou(e)&&u>0&&(o=uc(c,u-1),ac(o)))return!sc(o)&&(i=au(o,e,cc,o))?rc(i)?gs(i,i.data.length):gs.after(i):rc(o)?gs(o,o.data.length):gs.before(o);if(ru(e)&&u<c.childNodes.length&&(o=uc(c,u),ac(o)))return ic(o)&&n.lastChild===o?null:function(e,t){var n;return!!_o.isBr(e)&&!!(n=fc(1,gs.after(e),t))&&!cu(gs.before(e),gs.before(n),t)}(o,n)?fc(e,gs.after(o),n):!sc(o)&&(i=au(o,e,cc,o))?rc(i)?gs(i,0):gs.before(i):rc(o)?gs(o,0):gs.after(o);r=o||s.getNode()}return(ru(e)&&s.isAtEnd()||ou(e)&&s.isAtStart())&&(r=au(r,e,da.constant(!0),n,!0),cc(r,n))?lc(e,r):(o=au(r,e,cc,n),!(a=jt.last(jt.filter(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(c,n),nc)))||o&&a.contains(o)?o?lc(e,o):null:s=ru(e)?gs.after(a):gs.before(a))},dc=function(e){return{next:function(t){return fc(hs.Forwards,t,e)},prev:function(t){return fc(hs.Backwards,t,e)}}};!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(tc||(tc={}));var mc=function(e,t){return e===hs.Backwards?t.reverse():t},pc=function(e,t,n){return e===hs.Forwards?t.next(n):t.prev(n)},hc=function(e,t,n,r){return _o.isBr(r.getNode(t===hs.Forwards))?tc.Br:!1===cu(n,r)?tc.Block:tc.Wrap},gc=function(e,t,n,r){for(var o,i=dc(n),a=r,s=[];a&&(o=pc(t,i,a));){if(_o.isBr(o.getNode(!1)))return t===hs.Forwards?{positions:mc(t,s).concat([o]),breakType:tc.Br,breakAt:S.some(o)}:{positions:mc(t,s),breakType:tc.Br,breakAt:S.some(o)};if(o.isVisible()){if(e(a,o)){var c=hc(0,t,a,o);return{positions:mc(t,s),breakType:c,breakAt:S.some(o)}}s.push(o),a=o}else a=o}return{positions:mc(t,s),breakType:tc.Eol,breakAt:S.none()}},vc=function(e,t,n,r){return t(n,r).breakAt.map(function(r){var o=t(n,r).positions;return e===hs.Backwards?o.concat(r):[r].concat(o)}).getOr([])},bc=function(e,t){return j(e,function(e,n){return e.fold(function(){return S.some(n)},function(r){return Ka([Z(r.getClientRects()),Z(n.getClientRects())],function(e,o){var i=Math.abs(t-e.left);return Math.abs(t-o.left)<=i?n:r}).or(e)})},S.none())},yc=function(e,t){return Z(t.getClientRects()).bind(function(t){return bc(e,t.left)})},xc=y(gc,ps.isAbove,-1),wc=y(gc,ps.isBelow,1),Cc=y(vc,-1,xc),kc=y(vc,1,wc),Tc=function(e,t,n,r,o){var i=Hi(Gn.fromDom(n),"td,th,caption").map(function(e){return e.dom()});return function(e,t,n){return j(e,function(e,r){return e.fold(function(){return S.some(r)},function(e){var o=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),i=Math.sqrt(Math.abs(r.x-t)+Math.abs(r.y-n));return S.some(i<o?r:e)})},S.none())}($(function(e,t){return Y(t,function(t){var n=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}}(za(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})}(e,i),function(e){return t(e,o)}),r,o).map(function(e){return e.cell})},_c=y(Tc,function(e){return e.bottom},function(e,t){return e.y<t}),Ec=y(Tc,function(e){return e.top},function(e,t){return e.y>t}),Sc=function(e,t){return Z(t.getClientRects()).bind(function(t){return _c(e,t.left,t.top)}).bind(function(e){return yc((n=e,Au.lastPositionIn(n).map(function(e){return xc(n,e).positions.concat(e)}).getOr([])),t);var n})},Nc=function(e,t){return Q(t.getClientRects()).bind(function(t){return Ec(e,t.left,t.top)}).bind(function(e){return yc((n=e,Au.firstPositionIn(n).map(function(e){return[e].concat(wc(n,e).positions)}).getOr([])),t);var n})},Rc=function(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}},Ac=function(e,t,n){var r,o,i,a,s=e.dom,c=s.getRoot(),u=0;if(!function(e,t,n){var r={elm:t,alignToTop:n};return e.fire("scrollIntoView",r),r.isDefaultPrevented()}(e,t,n)&&_o.isElement(t)){if(!1===n&&(u=t.offsetHeight),"BODY"!==c.nodeName){var l=e.selection.getScrollContainer();if(l)return r=Rc(t).y-Rc(l).y+u,a=l.clientHeight,void((r<(i=l.scrollTop)||r+25>i+a)&&(l.scrollTop=r<i?r:r-a+25))}o=s.getViewPort(e.getWin()),r=s.getPos(t).y+u,i=o.y,a=o.h,(r<o.y||r+25>i+a)&&e.getWin().scrollTo(0,r<i?r:r-a+25)}},Dc=function(e,t){Z(ps.fromRangeStart(t).getClientRects()).each(function(t){var n,r,o=function(e){if(e.inline)return e.getBody().getBoundingClientRect();var t=e.getWin();return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight,width:t.innerWidth,height:t.innerHeight}}(e),i={x:function(e,t){return t.left>e.left&&t.right<e.right?0:t.left<e.left?t.left-e.left:t.right-e.right}(n=o,r=t),y:function(e,t){return t.top>e.top&&t.bottom<e.bottom?0:t.top<e.top?t.top-e.top:t.bottom-e.bottom}(n,r)};!function(e,t,n){e.inline?(e.getBody().scrollLeft+=t,e.getBody().scrollTop+=n):e.getWin().scrollBy(t,n)}(e,0!==i.x?i.x>0?i.x+4:i.x-4:0,0!==i.y?i.y>0?i.y+4:i.y-4:0)})},Oc=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},Pc={getIframeAttrs:function(e){return e.getParam("iframe_attrs",{})},getDocType:function(e){return e.getParam("doctype","<!DOCTYPE html>")},getDocumentBaseUrl:function(e){return e.getParam("document_base_url","")},getBodyId:function(e){return Oc(e,"body_id","tinymce")},getBodyClass:function(e){return Oc(e,"body_class","")},getContentSecurityPolicy:function(e){return e.getParam("content_security_policy","")},shouldPutBrInPre:function(e){return e.getParam("br_in_pre",!0)},getForcedRootBlock:function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},getForcedRootBlockAttrs:function(e){return e.getParam("forced_root_block_attrs",{})},getBrNewLineSelector:function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},getNoNewLineSelector:function(e){return e.getParam("no_newline_selector","")},shouldKeepStyles:function(e){return e.getParam("keep_styles",!0)},shouldEndContainerOnEmptyBlock:function(e){return e.getParam("end_container_on_empty_block",!1)},getFontStyleValues:function(e){return Yt.explode(e.getParam("font_size_style_values",""))},getFontSizeClasses:function(e){return Yt.explode(e.getParam("font_size_classes",""))},getImagesDataImgFilter:function(e){return e.getParam("images_dataimg_filter",v(!0),"function")},isAutomaticUploadsEnabled:function(e){return e.getParam("automatic_uploads",!0,"boolean")},shouldReuseFileName:function(e){return e.getParam("images_reuse_filename",!1,"boolean")},shouldReplaceBlobUris:function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},getImageUploadUrl:function(e){return e.getParam("images_upload_url","","string")},getImageUploadBasePath:function(e){return e.getParam("images_upload_base_path","","string")},getImagesUploadCredentials:function(e){return e.getParam("images_upload_credentials",!1,"boolean")},getImagesUploadHandler:function(e){return e.getParam("images_upload_handler",null,"function")}},Ic=qn.detect().browser,Bc=function(){return Ic.isIE()||Ic.isEdge()||Ic.isFirefox()},Mc=function(e,t){e.selection.setRng(t),Dc(e,t)},Lc=function(e,t,n){var r=e(t,n);return function(e){return e.breakType===tc.Wrap&&0===e.positions.length}(r)||!_o.isBr(n.getNode())&&function(e){return e.breakType===tc.Br&&1===e.positions.length}(r)?!function(e,t,n){return n.breakAt.map(function(n){return e(t,n).breakAt.isSome()}).getOr(!1)}(e,t,r):r.breakAt.isNone()},Fc=da.curry(Lc,xc),Hc=da.curry(Lc,wc),zc=function(e,t,n,r){var o=e.selection.getRng(),i=t?1:-1;if(Bc()&&function(e,t,n){var r=gs.fromRangeStart(t);return Au.positionIn(!e,n).map(function(e){return e.isEqual(r)}).getOr(!1)}(t,o,n)){var a=Js(i,e,n,!t,!0);return Mc(e,a),!0}return!1},Uc=function(e,t){var n=t.getNode(e);return _o.isElement(n)&&"TABLE"===n.nodeName?S.some(n):S.none()},$c=function(e,t,n){var r=Uc(!!t,n),o=!1===t;r.fold(function(){return Mc(e,n.toRange())},function(r){return Au.positionIn(o,e.getBody()).filter(function(e){return e.isEqual(n)}).fold(function(){return Mc(e,n.toRange())},function(o){return function(e,t,n,r){var o=Pc.getForcedRootBlock(t);o?t.undoManager.transact(function(){var r=Gn.fromTag(o);lr.setAll(r,Pc.getForcedRootBlockAttrs(t)),bi.append(r,Gn.fromTag("br")),e?bi.after(Gn.fromDom(n),r):bi.before(Gn.fromDom(n),r);var i=t.dom.createRng();i.setStart(r.dom(),0),i.setEnd(r.dom(),0),Mc(t,i)}):Mc(t,r.toRange())}(t,e,r,n)})})},jc=function(e,t,n,r){var o=e.selection.getRng(),i=gs.fromRangeStart(o),a=e.getBody();if(!t&&Fc(r,i)){var s=function(e,t,n){return Sc(t,n).orThunk(function(){return Z(n.getClientRects()).bind(function(n){return bc(Cc(e,gs.before(t)),n.left)})}).getOr(gs.before(t))}(a,n,i);return $c(e,t,s),!0}return!(!t||!Hc(r,i))&&(s=function(e,t,n){return Nc(t,n).orThunk(function(){return Z(n.getClientRects()).bind(function(n){return bc(kc(e,gs.after(t)),n.left)})}).getOr(gs.after(t))}(a,n,i),$c(e,t,s),!0)},Wc=function(e,t){return function(){return S.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return S.from(e.dom.getParent(n,"table")).map(function(n){return zc(e,t,n)})}).getOr(!1)}},qc=function(e,t){return function(){return S.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return S.from(e.dom.getParent(n,"table")).map(function(r){return jc(e,t,r,n)})}).getOr(!1)}},Vc=_o.isContentEditableFalse,Gc=function(e,t,n){var r,o,i,a,s,c=Ua(t.getBoundingClientRect(),n);return"BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,i=e.scrollTop||r.scrollTop):(s=e.getBoundingClientRect(),o=e.scrollLeft-s.left,i=e.scrollTop-s.top),c.left+=o,c.right+=o,c.top+=i,c.bottom+=i,c.width=1,(a=t.offsetWidth-t.clientWidth)>0&&(n&&(a*=-1),c.left+=a,c.right+=a),c},Yc=function(e,t,n){var r,o,i=Ti(S.none()),a=function(){!function(e){var t,n,r,o,i;for(t=pn("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,Ea(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,_a(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(e),o&&(Ys.remove(o),o=null),i.get().each(function(e){pn(e.caret).remove(),i.set(S.none())}),clearInterval(r)},s=function(){r=Pe.setInterval(function(){n()?pn("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):pn("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")},500)};return{show:function(n,r){var c,u,l;if(a(),l=r,_o.isElement(l)&&/^(TD|TH)$/i.test(l.tagName))return null;if(!t(r))return o=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(pa),o=e.parentNode,t){if(n=e.previousSibling,va(n)){if(xa(n))return n;if(Ea(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,va(n)){if(xa(n))return n;if(_a(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(r,n),u=r.ownerDocument.createRange(),Vc(o.nextSibling)?(u.setStart(o,0),u.setEnd(o,0)):(u.setStart(o,1),u.setEnd(o,1)),u;o=Ta("p",r,n),c=Gc(e,r,n),pn(o).css("top",c.top);var f=pn('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(c).appendTo(e)[0];return i.set(S.some({caret:f,element:r,before:n})),i.get().each(function(e){n&&pn(e.caret).addClass("mce-visual-caret-before")}),s(),(u=r.ownerDocument.createRange()).setStart(o,0),u.setEnd(o,0),u},hide:a,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(){i.get().each(function(t){var n=Gc(e,t.element,t.before);pn(t.caret).css(n)})},destroy:function(){return Pe.clearInterval(r)}}},Kc=function(e){return Vc(e)||_o.isTable(e)&&Bc()},Xc=_o.isContentEditableFalse,Jc=_o.matchStyleValues("display","block table table-cell table-caption list-item"),Zc=xa,Qc=ba,eu=da.curry,tu=_o.isElement,nu=Ma,ru=function(e){return e>0},ou=function(e){return e<0},iu=function(e,t){for(var n;n=e(t);)if(!Qc(n))return n;return null},au=function(e,t,n,r,o){var i=new Zr(e,r);if(ou(t)){if((Xc(e)||Qc(e))&&n(e=iu(i.prev,!0)))return e;for(;e=iu(i.prev,o);)if(n(e))return e}if(ru(t)){if((Xc(e)||Qc(e))&&n(e=iu(i.next,!0)))return e;for(;e=iu(i.next,o);)if(n(e))return e}return null},su=function(e,t){for(;e&&e!==t;){if(Jc(e))return e;e=e.parentNode}return null},cu=function(e,t,n){return su(e.container(),n)===su(t.container(),n)},uu=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),tu(n)?n.childNodes[r+e]:null):null},lu=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},fu=function(e,t,n){return su(t,e)===su(n,e)},du=function(e,t,n){var r,o;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],Zc(r)&&(r=r[o]),Xc(r)){if(fu(t,r,n))return r;break}if(nu(r))break;n=n.parentNode}return null},mu=eu(lu,!0),pu=eu(lu,!1),hu=function(e,t,n){var r,o,i,a,s=eu(du,!0,t),c=eu(du,!1,t);if(o=n.startContainer,i=n.startOffset,ba(o)){if(tu(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,Kc(r)))return mu(r);if("after"===a&&(r=o.previousSibling,Kc(r)))return pu(r)}if(!n.collapsed)return n;if(_o.isText(o)){if(Zc(o)){if(1===e){if(r=c(o))return mu(r);if(r=s(o))return pu(r)}if(-1===e){if(r=s(o))return pu(r);if(r=c(o))return mu(r)}return n}if(Ea(o)&&i>=o.data.length-1)return 1===e&&(r=c(o))?mu(r):n;if(_a(o)&&i<=1)return-1===e&&(r=s(o))?pu(r):n;if(i===o.data.length)return(r=c(o))?mu(r):n;if(0===i)return(r=s(o))?pu(r):n}return n},gu=function(e,t){var n=uu(e,t);return Xc(n)&&!_o.isBogusAll(n)},vu=function(e,t){return _o.isTable(uu(e,t))},bu=function(e,t){return S.from(uu(e?0:-1,t)).filter(Xc)},yu=function(e,t,n){var r=hu(e,t,n);return-1===e?ps.fromRangeStart(r):ps.fromRangeEnd(r)},xu=eu(gu,0),wu=eu(gu,-1),Cu=eu(vu,0),ku=eu(vu,-1),Tu=function(e){return gs.isTextPosition(e)?0===e.offset():Ma(e.getNode())},_u=function(e){if(gs.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Ma(e.getNode(!0))},Eu=function(e,t){return!gs.isTextPosition(e)&&!gs.isTextPosition(t)&&e.getNode()===t.getNode(!0)},Su=function(e,t,n){return e?!Eu(t,n)&&(r=t,!(!gs.isTextPosition(r)&&_o.isBr(r.getNode())))&&_u(t)&&Tu(n):!Eu(n,t)&&Tu(t)&&_u(n);var r},Nu=function(e,t,n){var r=dc(t);return S.from(e?r.next(n):r.prev(n))},Ru=function(e,t){var n,r=e?t.firstChild:t.lastChild;return _o.isText(r)?S.some(gs(r,e?0:r.data.length)):r?Ma(r)?S.some(e?gs.before(r):(n=r,_o.isBr(n)?gs.before(n):gs.after(n))):function(e,t,n){var r=e?gs.before(n):gs.after(n);return Nu(e,t,r)}(e,t,r):S.none()},Au={fromPosition:Nu,nextPosition:y(Nu,!0),prevPosition:y(Nu,!1),navigate:function(e,t,n){return Nu(e,t,n).bind(function(r){return cu(n,r,t)&&Su(e,n,r)?Nu(e,t,r):S.some(r)})},positionIn:Ru,firstPositionIn:y(Ru,!0),lastPositionIn:y(Ru,!1)},Du=function(e,t){return!e.isBlock(t)||t.innerHTML||Ne.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t},Ou=function(e,t){return Au.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},Pu=function(e,t,n){return!(!function(e){return!1===e.hasChildNodes()}(t)||!Fs(e,t)||(function(e,t){var n=e.ownerDocument.createTextNode(pa);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)}(t,n),0))},Iu=function(e,t,n,r){var o,i,a,s,c=n[t?"start":"end"],u=e.getRoot();if(c){for(a=c[0],i=u,o=c.length-1;o>=1;o--){if(s=i.childNodes,Pu(u,i,r))return!0;if(c[o]>s.length-1)return!!Pu(u,i,r)||Ou(i,r);i=s[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},Bu=function(e){return _o.isText(e)&&e.data.length>0},Mu=function(e,t,n){var r,o,i,a,s,c,u=e.get(n.id+"_"+t),l=n.keep;if(u){if(r=u.parentNode,"start"===t?(l?u.hasChildNodes()?(r=u.firstChild,o=1):Bu(u.nextSibling)?(r=u.nextSibling,o=0):Bu(u.previousSibling)?(r=u.previousSibling,o=u.previousSibling.data.length):(r=u.parentNode,o=e.nodeIndex(u)+1):o=e.nodeIndex(u),s=r,c=o):(l?u.hasChildNodes()?(r=u.firstChild,o=1):Bu(u.previousSibling)?(r=u.previousSibling,o=u.previousSibling.data.length):(r=u.parentNode,o=e.nodeIndex(u)):o=e.nodeIndex(u),s=r,c=o),!l){for(a=u.previousSibling,i=u.nextSibling,Yt.each(Yt.grep(u.childNodes),function(e){_o.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});u=e.get(n.id+"_"+t);)e.remove(u,!0);a&&i&&a.nodeType===i.nodeType&&_o.isText(a)&&!Ne.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=a,c=o)}return S.some(gs(s,c))}return S.none()},Lu=function(e,t){var n=e.dom;if(t){if(function(e){return Yt.isArray(e.start)}(t))return function(e,t){var n=e.createRng();return Iu(e,!0,t,n)&&Iu(e,!1,t,n)?S.some(n):S.none()}(n,t);if(function(e){return"string"==typeof e.start}(t))return S.some(function(e,t){var n,r;return n=e.createRng(),r=_s(e.getRoot(),t.start),n.setStart(r.container(),r.offset()),r=_s(e.getRoot(),t.end),n.setEnd(r.container(),r.offset()),n}(n,t));if(function(e){return e.hasOwnProperty("id")}(t))return function(e,t){var n,r,o=Mu(e,"start",t),i=Mu(e,"end",t);return Ka([o,(n=i,r=o,n.isSome()?n:r)],function(t,n){var r=e.createRng();return r.setStart(Du(e,t.container()),t.offset()),r.setEnd(Du(e,n.container()),n.offset()),r})}(n,t);if(function(e){return e.hasOwnProperty("name")}(t))return function(e,t){return S.from(e.select(t.name)[t.index]).map(function(t){var n=e.createRng();return n.selectNode(t),n})}(n,t);if(function(e){return e.hasOwnProperty("rng")}(t))return S.some(t.rng)}return S.none()},Fu={getBookmark:function(e,t,n){return Ms.getBookmark(e,t,n)},moveToBookmark:function(e,t){Lu(e,t).each(function(t){e.setRng(t)})},isBookmarkNode:function(e){return _o.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}},Hu=function(e){return e&&/^(IMG)$/.test(e.nodeName)},zu=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},Uu=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},$u={isInlineBlock:Hu,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,s=n.startContainer;if((n.startContainer!==n.endContainer||!Hu(n.startContainer.childNodes[n.startOffset]))&&1===s.nodeType)for(a<(i=s.childNodes).length?r=new Zr(s=i[a],e.getParent(s,e.isBlock)):(r=new Zr(s=i[i.length-1],e.getParent(s,e.isBlock))).next(!0),o=r.current();o;o=r.next())if(3===o.nodeType&&!zu(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!zu(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:zu,replaceVars:function(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e},isEq:function(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:Uu,getStyle:function(e,t,n){return Uu(e,e.getStyle(t,n),n)},getTextDecoration:function(e,t){var n;return e.getParent(t,function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},ju=Fu.isBookmarkNode,Wu=$u.getParents,qu=$u.isWhiteSpaceNode,Vu=$u.isTextBlock,Gu=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},Yu=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ku=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?-1===(o=(o=a.lastIndexOf(" ",r))>(i=a.lastIndexOf("",r))?o:i)||t||o++:(o=a.indexOf(" ",r),i=a.indexOf("",r),o=-1!==o&&(-1===i||o<i)?o:i),o},Xu=function(e,t,n,r,o,i){var a,s,c,u;if(3===n.nodeType){if(-1!==(c=Ku(o,i,n,r)))return{container:n,offset:c};u=n}for(a=new Zr(n,e.getParent(n,e.isBlock)||t);s=a[o?"prev":"next"]();)if(3!==s.nodeType||ju(s.parentNode)){if(e.isBlock(s)||$u.isEq(s,"BR"))break}else if(u=s,-1!==(c=Ku(o,i,s)))return{container:s,offset:c};if(u)return{container:u,offset:r=o?0:u.length}},Ju=function(e,t,n,r,o){var i,a,s,c;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Wu(e,r),a=0;a<i.length;a++)for(s=0;s<t.length;s++)if(!("collapsed"in(c=t[s])&&c.collapsed!==n.collapsed)&&e.is(i[a],c.selector))return i[a];return r},Zu=function(e,t,n,r){var o,i=e.dom,a=i.getRoot();if(t[0].wrapper||(o=i.getParent(n,t[0].block,a)),!o){var s=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(t){return t!==a&&Vu(e,t)},s)}if(o&&t[0].wrapper&&(o=Wu(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!$u.isEq(o,"br")););return o||n},Qu=function(e,t,n,r,o,i,a){var s,c,u,l,f,d;if(s=c=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),3===s.nodeType&&!qu(s)&&(a?r>0:i<s.nodeValue.length))return s;for(;;){if(!t[0].block_expand&&e.isBlock(c))return c;for(u=c[l];u;u=u[l])if(!ju(u)&&!qu(u)&&("BR"!==(d=u).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return c;if(c===f||c.parentNode===f){s=c;break}c=c.parentNode}return s},el=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,s=t.endContainer,c=t.endOffset,u=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=Va(i,a)).nodeType&&(a=0),1===s.nodeType&&s.hasChildNodes()&&3===(s=Va(s,t.collapsed?c:c-1)).nodeType&&(c=s.nodeValue.length),i=Yu(u,i),s=Yu(u,s),(ju(i.parentNode)||ju(i))&&(i=ju(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(ju(s.parentNode)||ju(s))&&(s=ju(s)?s:s.parentNode,3===(s=t.collapsed?s.nextSibling||s:s.previousSibling||s).nodeType&&(c=t.collapsed?0:s.length)),t.collapsed&&((o=Xu(u,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=Xu(u,e.getBody(),s,c,!1,r))&&(s=o.container,c=o.offset)),n[0].inline&&(s=r?s:function(e,t){var n=Gu(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=Gu(n.node.previousSibling);n.node&&n.offset>0&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&n.offset>1&&(e=n.node).splitText(n.offset-1)}return e}(s,c)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Qu(u,n,i,a,s,c,!0)),n[0].inline&&3===s.nodeType&&c!==s.nodeValue.length||(s=Qu(u,n,i,a,s,c,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=Ju(u,n,t,i,"previousSibling"),s=Ju(u,n,t,s,"nextSibling")),(n[0].block||n[0].selector)&&(i=Zu(e,n,i,"previousSibling"),s=Zu(e,n,s,"nextSibling"),n[0].block&&(u.isBlock(i)||(i=Qu(u,n,i,a,s,c,!0)),u.isBlock(s)||(s=Qu(u,n,i,a,s,c,!1)))),1===i.nodeType&&(a=u.nodeIndex(i),i=i.parentNode),1===s.nodeType&&(c=u.nodeIndex(s)+1,s=s.parentNode),{startContainer:i,startOffset:a,endContainer:s,endOffset:c}},tl=Yt.each,nl={walk:function(e,t,n){var r,o,i,a,s,c,u,l=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset;if((u=e.select("td[data-mce-selected],th[data-mce-selected]")).length>0)tl(u,function(e){n([e])});else{var p,h,g,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},b=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},y=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},x=function(e,t,r){var o=r?"nextSibling":"previousSibling";for(s=(a=e).parentNode;a&&a!==t;a=s)s=a.parentNode,(c=b(a===e?a:a[o],o)).length&&(r||c.reverse(),n(v(c)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(h=m,g=(p=d).childNodes,--h>g.length-1?h=g.length-1:h<0&&(h=0),d=g[h]||p),l===d)return n(v([l]));for(r=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return x(l,r,!0);if(a===r)break}for(a=d;a;a=a.parentNode){if(a===l)return x(d,r);if(a===r)break}o=y(l,r)||l,i=y(d,r)||d,x(l,o,!0),(c=b(o===l?o:o.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&n(v(c)),x(d,i)}}},rl=function(e,t){var n=function(t){return e(t)?S.from(t.dom().nodeValue):S.none()},r=qn.detect().browser,o=r.isIE()&&10===r.version.major?function(e){try{return n(e)}catch(e){return S.none()}}:n;return{get:function(n){if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:function(n,r){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom().nodeValue=r}}}(tr.isText,"text"),ol=function(e){return rl.get(e)},il=function(e,t,n,r){return Hr.parent(t).fold(function(){return"skipping"},function(o){return"br"===r||function(e){return tr.isText(e)&&"\ufeff"===ol(e)}(t)?"skipping":function(e){return tr.isElement(e)&&Fi.has(e,Ki())}(t)?"existing":Ls(t)?"caret":$u.isValid(e,n,r)&&$u.isValid(e,tr.name(o),n)?"valid":"invalid-child"})},al=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},sl=function(e,t,n,r,o){var i,a,s=o.uid,c=void 0===s?(i="mce-annotation",a=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++oa+String(a)):s,u=al(o,["uid"]),l=[],f=Gn.fromTag("span");Fi.add(f,Ki()),lr.set(f,""+Ji(),c),lr.set(f,""+Xi(),n);var d=r(c,u),m=d.attributes,p=void 0===m?{}:m,h=d.classes,g=void 0===h?[]:h;lr.setAll(f,p),ia(f,g);var v=Ti(S.none()),b=function(){v.set(S.none())},y=function(e){z(e,x)},x=function(t){switch(il(e,t,"span",tr.name(t))){case"invalid-child":b();var n=Hr.children(t);y(n),b();break;case"valid":var r=v.get().getOrThunk(function(){var e=ca(f);return l.push(e),v.set(S.some(e)),e});bi.wrap(t,r)}};return nl.walk(e.dom,t,function(e){b(),function(e){var t=H(e,Gn.fromDom);y(t)}(e)}),l},cl=function(e,t,n,r){e.undoManager.transact(function(){var o=e.selection.getRng();o.collapsed&&function(e,t){var n=el(e,t,[{inline:!0}],!1);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)}(e,o);var i=Ms.getPersistentBookmark(e.selection,!0),a=e.selection.getRng();sl(e,a,t,n.decorate,r),e.selection.moveToBookmark(i)})};function ul(e){var t=ra();na(e,t);var n=ta(e,t);return{register:function(e,n){t.register(e,n)},annotate:function(n,r){t.lookup(n).each(function(t){cl(e,n,t,r)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(t){Zi(e,S.some(t)).each(function(e){var t=e.elements;z(t,Ci.unwrap)})},getAll:function(t){var n=ea(e,t);return or(n,function(e){return H(e,function(e){return e.dom()})})}}}var ll=function(e){return Yt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},fl=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&function(e){return""===e.data||_o.isBr(e)}(e.firstChild)},dl=function(e){return e.length>0&&(!(t=e[e.length-1]).firstChild||fl(t))?e.slice(0,-1):e;var t},ml=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},pl=function(e,t){var n=gs.after(e),r=dc(t).prev(n);return r?r.toRange():null},hl=function(e,t,n){var r=e.parentNode;return Yt.each(t,function(t){r.insertBefore(t,e)}),function(e,t){var n=gs.before(e),r=dc(t).next(n);return r?r.toRange():null}(e,n)},gl=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||function(e,t){return e.getBlockElements()[t.name]&&function(e){return e.firstChild&&e.firstChild===e.lastChild}(t)&&function(e){return"br"===e.name||""===e.value}(t.firstChild)}(e,t))}(e,r)&&(r=r.prev),!(!n||n!==r||"ul"!==n.name&&"ol"!==n.name)},vl=function(e,t,n,r){var o=function(e,t,n){var r=t.serialize(n);return function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e}(e.createFragment(r))}(t,e,r),i=ml(t,n.startContainer),a=dl(ll(o.firstChild)),s=t.getRoot(),c=function(e){var r=gs.fromRangeStart(n),o=dc(t.getRoot()),a=1===e?o.prev(r):o.next(r);return!a||ml(t,a.getNode())!==i};return c(1)?hl(i,a,s):c(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),pl(t[0],n)}(i,a,s,t):function(e,t,n,r){var o=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(e,r),i=e.parentNode;return i.insertBefore(o[0],e),Yt.each(t,function(t){i.insertBefore(t,e)}),i.insertBefore(o[1],e),i.removeChild(e),pl(t[t.length-1],n)}(i,a,s,n)},bl=function(e,t){return!!ml(e,t)},yl=Yt.each,xl=function(e){this.compare=function(t,n){if(t.nodeName!==n.nodeName)return!1;var r=function(t){var n={};return yl(e.getAttribs(t),function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))}),n},o=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!(!o(r(t),r(n))||!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))||Fu.isBookmarkNode(t)||Fu.isBookmarkNode(n))}},wl=function(e){var t=Hi(e,"br"),n=$(function(e){for(var t=[],n=e.dom();n;)t.push(Gn.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),ao);t.length===n.length&&z(n,Ci.remove)},Cl=function(e){Ci.empty(e),bi.append(e,Gn.fromHtml('<br data-mce-bogus="1">'))},kl=function(e){Hr.lastChild(e).each(function(t){Hr.prevSibling(t).each(function(n){oo(e)&&ao(t)&&oo(n)&&Ci.remove(t)})})},Tl=Yt.makeMap;function _l(e){var t,n,r,o,i,a=[];return t=(e=e||{}).indent,n=Tl(e.indent_before||""),r=Tl(e.indent_after||""),o=Ho.getEncodeFunc(e.entity_encoding||"raw",e.entities),i="html"===e.element_format,{start:function(e,s,c){var u,l,f,d;if(t&&n[e]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n"),a.push("<",e),s)for(u=0,l=s.length;u<l;u++)f=s[u],a.push(" ",f.name,'="',o(f.value,!0),'"');a[a.length]=!c||i?">":" />",c&&t&&r[e]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n")},end:function(e){var n;a.push("</",e,">"),t&&r[e]&&a.length>0&&(n=a[a.length-1]).length>0&&"\n"!==n&&a.push("\n")},text:function(e,t){e.length>0&&(a[a.length]=t?e:o(e))},cdata:function(e){a.push("<![CDATA[",e,"]]>")},comment:function(e){a.push("\x3c!--",e,"--\x3e")},pi:function(e,n){n?a.push("<?",e," ",o(n),"?>"):a.push("<?",e,"?>"),t&&a.push("\n")},doctype:function(e){a.push("<!DOCTYPE",e,">",t?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}}function El(e,t){void 0===t&&(t=Xo());var n=_l(e);return(e=e||{}).validate=!("validate"in e)||e.validate,{serialize:function(r){var o,i;i=e.validate,o={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)do{a(e)}while(e=e.next)}},n.reset();var a=function(e){var r,s,c,u,l,f,d,m,p,h=o[e.type];if(h)h(e);else{if(r=e.name,s=e.shortEnded,c=e.attributes,i&&c&&c.length>1&&((f=[]).map={},p=t.getElementRule(e.name))){for(d=0,m=p.attributesOrder.length;d<m;d++)(u=p.attributesOrder[d])in c.map&&(l=c.map[u],f.map[u]=l,f.push({name:u,value:l}));for(d=0,m=c.length;d<m;d++)(u=c[d].name)in f.map||(l=c.map[u],f.map[u]=l,f.push({name:u,value:l}));c=f}if(n.start(e.name,c,s),!s){if(e=e.firstChild)do{a(e)}while(e=e.next);n.end(r)}}};return 1!==r.type||e.inner?o[11](r):a(r),n.getContent()}}}var Sl=function(e){var t=gs.fromRangeStart(e),n=gs.fromRangeEnd(e),r=e.commonAncestorContainer;return Au.fromPosition(!1,r,n).map(function(o){return!cu(t,n,r)&&cu(t,o,r)?function(e,t,n,r){var o=document.createRange();return o.setStart(e,t),o.setEnd(n,r),o}(t.container(),t.offset(),o.container(),o.offset()):e}).getOr(e)},Nl=function(e){return e.collapsed?e:Sl(e)},Rl=_o.matchNodeNames("td th"),Al=function(e,t,n){var r,o,i,a,s,c,u,l,f,d,m,p,h=e.schema.getTextInlineElements(),g=e.selection,v=e.dom;if(/^ | $/.test(t)&&(t=function(e){var t,n,r;t=g.getRng(),n=t.startContainer,r=t.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(r>0?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}(t)),r=e.parser,p=n.merge,o=El({validate:e.settings.validate},e.schema),m='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',c={content:t,format:"html",selection:!0,paste:n.paste},(c=e.fire("BeforeSetContent",c)).isDefaultPrevented())e.fire("SetContent",{content:c.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=c.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,m);var b=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),y=e.getBody();b===y&&g.isCollapsed()&&v.isBlock(y.firstChild)&&function(t){return t&&!e.schema.getShortEndedElements()[t.nodeName]}(y.firstChild)&&v.isEmpty(y.firstChild)&&((l=v.createRng()).setStart(y.firstChild,0),l.setEnd(y.firstChild,0),g.setRng(l)),g.isCollapsed()||(e.selection.setRng(Nl(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),function(){var e,n,r;n=(e=g.getRng()).startContainer,r=e.startOffset,3===n.nodeType&&e.collapsed&&(""===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(t)||(t+=" ")):""===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t)))}());var x,w={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(s=r.parse(t,w),!0===n.paste&&gl(e.schema,s)&&bl(v,i))return l=vl(o,v,e.selection.getRng(),s),e.selection.setRng(l),void e.fire("SetContent",c);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(s),"mce_marker"===(f=s.lastChild).attr("id"))for(u=f,f=f.prev;f;f=f.walk(!0))if(3===f.type||!v.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(u,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),w.invalid){for(g.setContent(m),i=g.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)i=f,f=f.parentNode;t=i===a?a.innerHTML:v.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(s)}))),i===a?v.setHTML(a,t):v.setOuterHTML(i,t)}else t=o.serialize(s),function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}}(e,t,i);!function(){if(p){var t=e.getBody(),n=new xl(v);Yt.each(v.select("*[data-mce-fragment]"),function(e){for(var r=e.parentNode;r&&r!==t;r=r.parentNode)h[e.nodeName.toLowerCase()]&&n.compare(r,e)&&v.remove(e,!0)})}}(),function(t){var n,r,o;if(t){if(g.scrollIntoView(t),n=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===e.dom.getContentEditable(t))return t;return null}(t))return v.remove(t),void g.select(n);l=v.createRng(),(f=t.previousSibling)&&3===f.nodeType?(l.setStart(f,f.nodeValue.length),Ne.ie||(d=t.nextSibling)&&3===d.nodeType&&(f.appendData(d.data),d.parentNode.removeChild(d))):(l.setStartBefore(t),l.setEndBefore(t)),r=v.getParent(t,v.isBlock),v.remove(t),r&&v.isEmpty(r)&&(e.$(r).empty(),l.setStart(r,0),l.setEnd(r,0),Rl(r)||function(e){return!!e.getAttribute("data-mce-fragment")}(r)||!(o=function(t){var n=gs.fromRangeStart(t);if(n=dc(e.getBody()).next(n))return n.toRange()}(l))?v.add(r,v.create("br",{"data-mce-bogus":"1"})):(l=o,v.remove(r))),g.setRng(l)}}(v.get("mce_marker")),x=e.getBody(),Yt.each(x.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),function(e,t){S.from(e.getParent(t,"td,th")).map(Gn.fromDom).each(kl)}(e.dom,e.selection.getStart()),e.fire("SetContent",c),e.addVisual()}},Dl={insertAtCaret:function(e,t){var n=function(e){var t;return"string"!=typeof e?(t=Yt.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}}(t);Al(e,n.content,n.details)}},Ol=wr("sections","settings"),Pl=qn.detect().deviceType.isTouch(),Il=["lists","autolink","autosave"],Bl={theme:"mobile"},Ml=function(e){var t=D(e)?e.join(" "):e,n=H(R(t)?t.split(" "):[],Fn);return $(n,function(e){return e.length>0})},Ll=function(e,t){var n,r,o,i=(n=function(t,n){return L(e,n)},r={},o={},rr(t,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o});return Ol(i.t,i.f)},Fl=function(e,t){return e.sections().hasOwnProperty(t)},Hl=function(e,t,n,r){var o=Ml(n.forced_plugins),i=Ml(r.plugins),a=function(e,t){return[].concat(Ml(e)).concat(Ml(t))}(o,e&&Fl(t,"mobile")?function(e){return $(e,y(L,Il))}(i):i);return Yt.extend(r,{plugins:a.join(" ")})},zl=function(e,t,n,r){var o=Ll(["mobile"],r),i=Yt.extend(t,n,o.settings(),function(e,t){var n=t.settings().inline;return e&&Fl(t,"mobile")&&!n}(e,o)?function(e,t,n){var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return Yt.extend({},n,o)}(o,"mobile",Bl):{},{validate:!0,content_editable:o.settings().inline,external_plugins:function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?Yt.extend({},e.external_plugins,n):n}(n,o.settings())});return Hl(e,o,n,i)},Ul=function(e,t,n){return S.from(t.settings[n]).filter(e)},$l=y(Ul,R),jl=function(e,t,n,r){var o,i=t in e.settings?e.settings[t]:n;return"hash"===r?function(e){var t={};return"string"==typeof e?z(e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(e){var n=e.split("=");n.length>1?t[Yt.trim(n[0])]=Yt.trim(n[1]):t[Yt.trim(n[0])]=Yt.trim(n)}):t=e,t}(i):"string"===r?Ul(R,e,t).getOr(n):"number"===r?Ul(B,e,t).getOr(n):"boolean"===r?Ul(P,e,t).getOr(n):"object"===r?Ul(A,e,t).getOr(n):"array"===r?Ul(D,e,t).getOr(n):"string[]"===r?Ul((o=R,function(e){return D(e)&&K(e,o)}),e,t).getOr(n):"function"===r?Ul(I,e,t).getOr(n):i},Wl=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,ql=function(e,t){var n=t.container(),r=t.offset();return e?ya(n)?_o.isText(n.nextSibling)?gs(n.nextSibling,0):gs.after(n):Ca(t)?gs(n,r+1):t:ya(n)?_o.isText(n.previousSibling)?gs(n.previousSibling,n.previousSibling.data.length):gs.before(n):ka(t)?gs(n,r-1):t},Vl={isInlineTarget:function(e,t){var n=$l(e,"inline_boundaries_selector").getOr("a[href],code");return Rr.is(Gn.fromDom(t),n)},findRootInline:function(e,t,n){var r=function(e,t,n){return $(ci.DOM.getParents(n.container(),"*",t),e)}(e,t,n);return S.from(r[r.length-1])},isRtl:function(e){return"rtl"===ci.DOM.getStyle(e,"direction",!0)||(t=e.textContent,Wl.test(t));var t},isAtZwsp:function(e){return Ca(e)||ka(e)},normalizePosition:ql,normalizeForwards:y(ql,!0),normalizeBackwards:y(ql,!1),hasSameParentBlock:function(e,t,n){var r=su(t,e),o=su(n,e);return r&&r===o}},Gl=function(e,t){return Or.contains(e,t)?Wi.closest(t,function(e){return so(e)||uo(e)},function(e){return function(t){return Or.eq(e,Gn.fromDom(t.dom().parentNode))}}(e)):S.none()},Yl=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)}(e))},Kl=function(e,t,n){return Ka([Au.firstPositionIn(n),Au.lastPositionIn(n)],function(r,o){var i=Vl.normalizePosition(!0,r),a=Vl.normalizePosition(!1,o),s=Vl.normalizePosition(!1,t);return e?Au.nextPosition(n,s).map(function(e){return e.isEqual(a)&&t.isEqual(i)}).getOr(!1):Au.prevPosition(n,s).map(function(e){return e.isEqual(i)&&t.isEqual(a)}).getOr(!1)}).getOr(!0)},Xl=function(e,t,n){return Vi(e,t,n).isSome()},Jl=function(e,t){return _o.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===function(e,t){var n=Gn.fromDom(e),r=Gn.fromDom(t);return Xl(r,"pre,code",y(Or.eq,n))}(e,t)},Zl=function(e,t){return Ma(t)&&!1===Jl(e,t)||function(e){return _o.isElement(e)&&"A"===e.nodeName&&e.hasAttribute("name")}(t)||Ql(t)},Ql=_o.hasAttribute("data-mce-bookmark"),ef=_o.hasAttribute("data-mce-bogus"),tf=_o.hasAttributeValue("data-mce-bogus","all"),nf=function(e){return function(e){var t,n,r=0;if(Zl(e,e))return!1;if(!(n=e.firstChild))return!0;t=new Zr(n,e);do{if(tf(n))n=t.next(!0);else if(ef(n))n=t.next();else if(_o.isBr(n))r++,n=t.next();else{if(Zl(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},rf=wr("block","position"),of=wr("from","to"),af=function(e,t){var n=Gn.fromDom(e),r=Gn.fromDom(t.container());return Gl(n,r).map(function(e){return rf(e,t)})},sf=function(e,t,n){var r=af(e,gs.fromRangeStart(n)),o=r.bind(function(n){return Au.fromPosition(t,e,n.position()).bind(function(n){return af(e,n).map(function(n){return function(e,t,n){return _o.isBr(n.position().getNode())&&!1===nf(n.block())?Au.positionIn(!1,n.block().dom()).bind(function(r){return r.isEqual(n.position())?Au.fromPosition(t,e,r).bind(function(t){return af(e,t)}):S.some(n)}).getOr(n):n}(e,t,n)})})});return Ka([r,o],of).filter(function(e){return function(e){return!1===Or.eq(e.from().block(),e.to().block())}(e)&&function(e){return Hr.parent(e.from().block()).bind(function(t){return Hr.parent(e.to().block()).filter(function(e){return Or.eq(t,e)})}).isSome()}(e)&&function(e){return!1===_o.isContentEditableFalse(e.from().block())&&!1===_o.isContentEditableFalse(e.to().block())}(e)})},cf=function(e,t,n){return n.collapsed?sf(e,t,n):S.none()},uf=function(e,t,n){return Or.contains(t,e)?Hr.parents(e,function(e){return n(e)||Or.eq(e,t)}).slice(0,-1):[]},lf=function(e,t){return uf(e,t,v(!1))},ff=lf,df=function(e,t){return[e].concat(lf(e,t))},mf=function(e){var t=function(e){var t=Hr.children(e);return q(t,oo).fold(function(){return t},function(e){return t.slice(0,e)})}(e);return z(t,Ci.remove),t},pf=function(e,t){var n=df(t,e);return W(n.reverse(),nf).each(Ci.remove)},hf=function(e,t,n,r){if(nf(n))return Cl(n),Au.firstPositionIn(n.dom());var o;o=r,0===$(Hr.prevSiblings(o),function(e){return!nf(e)}).length&&nf(t)&&bi.before(r,Gn.fromTag("br"));var i=Au.prevPosition(n.dom(),gs.before(r.dom()));return z(mf(t),function(e){bi.before(r,e)}),pf(e,t),i},gf=function(e,t,n){if(nf(n))return Ci.remove(n),nf(t)&&Cl(t),Au.firstPositionIn(t.dom());var r=Au.lastPositionIn(n.dom());return z(mf(t),function(e){bi.append(n,e)}),pf(e,t),r},vf=function(e,t){return Or.contains(t,e)?function(e,t){var n=df(t,e);return S.from(n[n.length-1])}(t,e):S.none()},bf=function(e,t){Au.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(Gn.fromDom).filter(ao).each(Ci.remove)},yf=function(e,t,n){return bf(!0,t),bf(!1,n),vf(t,n).fold(y(gf,e,t,n),y(hf,e,t,n))},xf=function(e,t,n,r){return t?yf(e,r,n):yf(e,n,r)},wf=function(e,t){var n,r=Gn.fromDom(e.getBody());return(n=cf(r.dom(),t,e.selection.getRng()).bind(function(e){return xf(r,t,e.from().block(),e.to().block())})).each(function(t){e.selection.setRng(t.toRange())}),n.isSome()},Cf=function(e,t){var n=Gn.fromDom(t),r=y(Or.eq,e);return Wi.ancestor(n,mo,r).isSome()},kf=function(e,t){var n=Au.prevPosition(e.dom(),gs.fromRangeStart(t)).isNone(),r=Au.nextPosition(e.dom(),gs.fromRangeEnd(t)).isNone();return!function(e,t){return Cf(e,t.startContainer)||Cf(e,t.endContainer)}(e,t)&&n&&r},Tf=function(e){var t=Gn.fromDom(e.getBody()),n=e.selection.getRng();return kf(t,n)?function(e){return e.setContent(""),e.selection.setCursorLocation(),!0}(e):function(e,t){var n=t.getRng();return Ka([Gl(e,Gn.fromDom(n.startContainer)),Gl(e,Gn.fromDom(n.endContainer))],function(r,o){return!1===Or.eq(r,o)&&(n.deleteContents(),xf(e,!0,r,o).each(function(e){t.setRng(e.toRange())}),!0)}).getOr(!1)}(t,e.selection)},_f=function(e,t){return!e.selection.isCollapsed()&&Tf(e)},Ef=function(e){if(!D(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return z(e,function(r,o){var i=nr(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!D(s))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){var n=arguments.length;if(n!==s.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+s.length+" ("+s+"), got "+n);for(var r=new Array(n),i=0;i<r.length;i++)r[i]=arguments[i];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[o].apply(null,r)},match:function(e){var n=nr(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!K(t,function(e){return L(n,e)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,r)},log:function(e){console.log(e,{constructors:t,constructor:a,params:r})}}}}),n},Sf=Ef([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Nf=function(e,t,n,r){var o=r.getNode(!1===t);return Gl(Gn.fromDom(e),Gn.fromDom(n.getNode())).map(function(e){return nf(e)?Sf.remove(e.dom()):Sf.moveToElement(o)}).orThunk(function(){return S.some(Sf.moveToElement(o))})},Rf=function(e,t,n){return Au.fromPosition(t,e,n).bind(function(r){return o=r.getNode(),mo(Gn.fromDom(o))||uo(Gn.fromDom(o))?S.none():function(e,t,n,r){var o=function(t){return io(Gn.fromDom(t))&&!cu(n,r,e)};return bu(!t,n).fold(function(){return bu(t,r).fold(v(!1),o)},o)}(e,t,n,r)?S.none():t&&_o.isContentEditableFalse(r.getNode())?Nf(e,t,n,r):!1===t&&_o.isContentEditableFalse(r.getNode(!0))?Nf(e,t,n,r):t&&wu(n)?S.some(Sf.moveToPosition(r)):!1===t&&xu(n)?S.some(Sf.moveToPosition(r)):S.none();var o})},Af=function(e,t,n){return function(e,t){var n=t.getNode(!1===e),r=e?"after":"before";return _o.isElement(n)&&n.getAttribute("data-mce-caret")===r}(t,n)?function(e,t){return e&&_o.isContentEditableFalse(t.nextSibling)?S.some(Sf.moveToElement(t.nextSibling)):!1===e&&_o.isContentEditableFalse(t.previousSibling)?S.some(Sf.moveToElement(t.previousSibling)):S.none()}(t,n.getNode(!1===t)).fold(function(){return Rf(e,t,n)},S.some):Rf(e,t,n).bind(function(t){return function(e,t,n){return n.fold(function(e){return S.some(Sf.remove(e))},function(e){return S.some(Sf.moveToElement(e))},function(n){return cu(t,n,e)?S.none():S.some(Sf.moveToPosition(n))})}(e,n,t)})},Df=function(e,t){return function(e,t){var n=e.container(),r=e.offset();return!1===gs.isTextPosition(e)&&n===t.parentNode&&r>gs.before(t).offset()}(t,e)?gs(t.container(),t.offset()-1):t},Of=function(e){return Ma(e.previousSibling)?S.some((t=e.previousSibling,_o.isText(t)?gs(t,t.data.length):gs.after(t))):e.previousSibling?Au.lastPositionIn(e.previousSibling):S.none();var t},Pf=function(e){return Ma(e.nextSibling)?S.some((t=e.nextSibling,_o.isText(t)?gs(t,0):gs.before(t))):e.nextSibling?Au.firstPositionIn(e.nextSibling):S.none();var t},If=function(e,t){return Of(t).orThunk(function(){return Pf(t)}).orThunk(function(){return function(e,t){var n=gs.before(t.previousSibling?t.previousSibling:t.parentNode);return Au.prevPosition(e,n).fold(function(){return Au.nextPosition(e,gs.after(t))},S.some)}(e,t)})},Bf=function(e,t){return Pf(t).orThunk(function(){return Of(t)}).orThunk(function(){return function(e,t){return Au.nextPosition(e,gs.after(t)).fold(function(){return Au.prevPosition(e,gs.before(t))},S.some)}(e,t)})},Mf=function(e,t,n){return function(e,t,n){return e?Bf(t,n):If(t,n)}(e,t,n).map(y(Df,n))},Lf=function(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})},Ff=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(tr.name(t))},Hf=function(e){if(nf(e)){var t=Gn.fromHtml('<br data-mce-bogus="1">');return Ci.empty(e),bi.append(e,t),S.some(gs.before(t.dom()))}return S.none()},zf=function(e,t,n){var r,o=Mf(t,e.getBody(),n.dom()),i=Wi.ancestor(n,y(Ff,e),(r=e.getBody(),function(e){return e.dom()===r})),a=function(e,t){return Ka([Hr.prevSibling(e),Hr.nextSibling(e),t],function(t,n,r){var o,i=t.dom(),a=n.dom();return _o.isText(i)&&_o.isText(a)?(o=i.data.length,i.appendData(a.data),Ci.remove(n),Ci.remove(e),r.container()===a?gs(i,o):r):(Ci.remove(e),r)}).orThunk(function(){return Ci.remove(e),t})}(n,o);e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):i.bind(Hf).fold(function(){Lf(e,t,a)},function(n){Lf(e,t,S.some(n))})},Uf=function(e,t){return function(e,t,n){var r=hu(t?1:-1,e,n),o=gs.fromRangeStart(r);return!1===t&&wu(o)?S.some(Sf.remove(o.getNode(!0))):t&&xu(o)?S.some(Sf.remove(o.getNode())):Af(e,t,o)}(e.getBody(),t,e.selection.getRng()).map(function(n){return n.fold(function(e,t){return function(n){return e._selectionOverrides.hideFakeCaret(),zf(e,t,Gn.fromDom(n)),!0}}(e,t),function(e,t){return function(n){var r=t?gs.before(n):gs.after(n);return e.selection.setRng(r.toRange()),!0}}(e,t),function(e){return function(t){return e.selection.setRng(t.toRange()),!0}}(e))}).getOr(!1)},$f=function(e,t){var n,r=e.selection.getNode();return!!_o.isContentEditableFalse(r)&&(n=Gn.fromDom(e.getBody()),z(Hi(n,".mce-offscreen-selection"),Ci.remove),zf(e,t,Gn.fromDom(e.selection.getNode())),Yl(e),!0)},jf=function(e,t){return e.selection.isCollapsed()?Uf(e,t):$f(e,t)},Wf=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(_o.isContentEditableTrue(t)||_o.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return _o.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(gs.before(t).toRange())),!0},qf=_o.isText,Vf=function(e){return qf(e)&&e.data[0]===pa},Gf=function(e){return qf(e)&&e.data[e.data.length-1]===pa},Yf=function(e){return e.ownerDocument.createTextNode(pa)},Kf=function(e,t){return e?function(e){if(qf(e.previousSibling))return Gf(e.previousSibling)?e.previousSibling:(e.previousSibling.appendData(pa),e.previousSibling);if(qf(e))return Vf(e)?e:(e.insertData(0,pa),e);var t=Yf(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(qf(e.nextSibling))return Vf(e.nextSibling)?e.nextSibling:(e.nextSibling.insertData(0,pa),e.nextSibling);if(qf(e))return Gf(e)?e:(e.appendData(pa),e);var t=Yf(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},Xf=y(Kf,!0),Jf=y(Kf,!1),Zf=function(e,t){return _o.isText(e.container())?Kf(t,e.container()):Kf(t,e.getNode())},Qf=function(e,t){var n=t.get();return n&&e.container()===n&&ya(n)},ed=function(e,t){return t.fold(function(t){Ys.remove(e.get());var n=Xf(t);return e.set(n),S.some(gs(n,n.length-1))},function(t){return Au.firstPositionIn(t).map(function(t){if(Qf(t,e))return gs(e.get(),1);Ys.remove(e.get());var n=Zf(t,!0);return e.set(n),gs(n,1)})},function(t){return Au.lastPositionIn(t).map(function(t){if(Qf(t,e))return gs(e.get(),e.get().length-1);Ys.remove(e.get());var n=Zf(t,!1);return e.set(n),gs(n,n.length-1)})},function(t){Ys.remove(e.get());var n=Jf(t);return e.set(n),S.some(gs(n,1))})},td=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return S.none()},nd=Ef([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),rd=function(e,t){var n=su(t,e);return n||e},od=function(e,t,n){var r=Vl.normalizeForwards(n),o=rd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return Au.nextPosition(o,r).bind(y(Vl.findRootInline,e,o)).map(function(e){return nd.before(e)})},S.none)},id=function(e,t){return null===Fs(e,t)},ad=function(e,t,n){return Vl.findRootInline(e,t,n).filter(y(id,t))},sd=function(e,t,n){var r=Vl.normalizeBackwards(n);return ad(e,t,r).bind(function(e){return Au.prevPosition(e,r).isNone()?S.some(nd.start(e)):S.none()})},cd=function(e,t,n){var r=Vl.normalizeForwards(n);return ad(e,t,r).bind(function(e){return Au.nextPosition(e,r).isNone()?S.some(nd.end(e)):S.none()})},ud=function(e,t,n){var r=Vl.normalizeBackwards(n),o=rd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return Au.prevPosition(o,r).bind(y(Vl.findRootInline,e,o)).map(function(e){return nd.after(e)})},S.none)},ld=function(e){return!1===Vl.isRtl(dd(e))},fd=function(e,t,n){return td([od,sd,cd,ud],[e,t,n]).filter(ld)},dd=function(e){return e.fold(b,b,b,b)},md=function(e){return e.fold(v("before"),v("start"),v("end"),v("after"))},pd=function(e){return e.fold(nd.before,nd.before,nd.after,nd.after)},hd=function(e,t,n,r,o,i){return Ka([Vl.findRootInline(t,n,r),Vl.findRootInline(t,n,o)],function(t,r){return t!==r&&Vl.hasSameParentBlock(n,t,r)?nd.after(e?t:r):i}).getOr(i)},gd=function(e,t){return e.fold(v(!0),function(e){return r=t,!(md(n=e)===md(r)&&dd(n)===dd(r));var n,r})},vd=function(e,t){return e?t.fold(g(S.some,nd.start),S.none,g(S.some,nd.after),S.none):t.fold(S.none,g(S.some,nd.before),S.none,g(S.some,nd.end))},bd=function(e,t,n,r){var o=Vl.normalizePosition(e,r),i=fd(t,n,o);return fd(t,n,o).bind(y(vd,e)).orThunk(function(){return function(e,t,n,r,o){var i=Vl.normalizePosition(e,o);return Au.fromPosition(e,n,i).map(y(Vl.normalizePosition,e)).fold(function(){return r.map(pd)},function(o){return fd(t,n,o).map(y(hd,e,t,n,i,o)).filter(y(gd,r))}).filter(ld)}(e,t,n,i,r)})},yd=fd,xd=bd,wd=(y(bd,!1),y(bd,!0),pd),Cd=function(e){return e.fold(nd.start,nd.start,nd.end,nd.end)},kd=function(e){return I(e.selection.getSel().modify)},Td=function(e,t,n){var r=e?1:-1;return t.setRng(gs(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},_d=function(e,t){var n=t.selection.getRng(),r=e?gs.fromRangeEnd(n):gs.fromRangeStart(n);return!!kd(t)&&(e&&Ca(r)?Td(!0,t.selection,r):!(e||!ka(r))&&Td(!1,t.selection,r))},Ed=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},Sd=function(e){return!1!==e.settings.inline_boundaries},Nd=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Rd=function(e,t,n){return ed(t,n).map(function(t){return Ed(e,t),n})},Ad=function(e,t,n){return function(){return!!Sd(t)&&_d(e,t)}},Dd={move:function(e,t,n){return function(){return!!Sd(e)&&function(e,t,n){var r=e.getBody(),o=gs.fromRangeStart(e.selection.getRng()),i=y(Vl.isInlineTarget,e);return xd(n,i,r,o).bind(function(n){return Rd(e,t,n)})}(e,t,n).isSome()}},moveNextWord:y(Ad,!0),movePrevWord:y(Ad,!1),setupSelectedState:function(e){var t=Ti(null),n=y(Vl.isInlineTarget,e);return e.on("NodeChange",function(r){Sd(e)&&(function(e,t,n){var r=$(t.select('*[data-mce-selected="inline-boundary"]'),e),o=$(n,e);z(J(r,o),y(Nd,!1)),z(J(o,r),y(Nd,!0))}(n,e.dom,r.parents),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=gs.fromRangeStart(e.selection.getRng());gs.isTextPosition(n)&&!1===Vl.isAtZwsp(n)&&(Ed(e,Ys.removeAndReposition(t.get(),n)),t.set(null))}}(e,t),function(e,t,n,r){if(t.selection.isCollapsed()){var o=$(r,e);z(o,function(r){var o=gs.fromRangeStart(t.selection.getRng());yd(e,t.getBody(),o).bind(function(e){return Rd(t,n,e)})})}}(n,e,t,r.parents))}),t},setCaretPosition:Ed},Od=function(e,t){return function(n){return ed(t,n).map(function(t){return Dd.setCaretPosition(e,t),!0}).getOr(!1)}},Pd=function(e,t,n,r){var o=e.getBody(),i=y(Vl.isInlineTarget,e);e.undoManager.ignore(function(){e.selection.setRng(function(e,t){var n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n}(n,r)),e.execCommand("Delete"),yd(i,o,gs.fromRangeStart(e.selection.getRng())).map(Cd).map(Od(e,t))}),e.nodeChanged()},Id=function(e,t,n,r){var o=function(e,t){var n=su(t,e);return n||e}(e.getBody(),r.container()),i=y(Vl.isInlineTarget,e),a=yd(i,o,r);return a.bind(function(e){return n?e.fold(v(S.some(Cd(e))),S.none,v(S.some(wd(e))),S.none):e.fold(S.none,v(S.some(wd(e))),S.none,v(S.some(Cd(e))))}).map(Od(e,t)).getOrThunk(function(){var s=Au.navigate(n,o,r),c=s.bind(function(e){return yd(i,o,e)});return a.isSome()&&c.isSome()?Vl.findRootInline(i,o,r).map(function(t){return!!function(e){return Ka([Au.firstPositionIn(e),Au.lastPositionIn(e)],function(t,n){var r=Vl.normalizePosition(!0,t),o=Vl.normalizePosition(!1,n);return Au.nextPosition(e,r).map(function(e){return e.isEqual(o)}).getOr(!0)}).getOr(!0)}(t)&&(zf(e,n,Gn.fromDom(t)),!0)}).getOr(!1):c.bind(function(o){return s.map(function(o){return n?Pd(e,t,r,o):Pd(e,t,o,r),!0})}).getOr(!1)})},Bd=function(e,t,n){if(e.selection.isCollapsed()&&function(e){return!1!==e.settings.inline_boundaries}(e)){var r=gs.fromRangeStart(e.selection.getRng());return Id(e,t,n,r)}return!1},Md=wr("start","end"),Ld=wr("rng","table","cells"),Fd=Ef([{removeTable:["element"]},{emptyCells:["cells"]}]),Hd=function(e,t){return Yi(Gn.fromDom(e),"td,th",t)},zd=function(e,t){return Vi(e,"table",t)},Ud=function(e){return!1===Or.eq(e.start(),e.end())},$d=function(e,t){return zd(e.start(),t).bind(function(n){return zd(e.end(),t).bind(function(e){return Or.eq(n,e)?S.some(n):S.none()})})},jd=function(e){return Hi(e,"td,th")},Wd=function(e,t){var n=Hd(t.startContainer,e),r=Hd(t.endContainer,e);return t.collapsed?S.none():Ka([n,r],Md).fold(function(){return n.fold(function(){return r.bind(function(t){return zd(t,e).bind(function(e){return Z(jd(e)).map(function(e){return Md(e,t)})})})},function(t){return zd(t,e).bind(function(e){return Q(jd(e)).map(function(e){return Md(t,e)})})})},function(t){return qd(e,t)?S.none():function(e,t){return zd(e.start(),t).bind(function(t){return Q(jd(t)).map(function(t){return Md(e.start(),t)})})}(t,e)})},qd=function(e,t){return $d(t,e).isSome()},Vd=function(e,t){var n=function(e){return y(Or.eq,e)}(e);return function(e,t){var n=Hd(e.startContainer,t),r=Hd(e.endContainer,t);return Ka([n,r],Md).filter(Ud).filter(function(e){return qd(t,e)}).orThunk(function(){return Wd(t,e)})}(t,n).bind(function(e){return function(e,t){return $d(e,t).map(function(t){return Ld(e,t,jd(t))})}(e,n)})},Gd=function(e,t){return q(e,function(e){return Or.eq(e,t)})},Yd=function(e){return function(e){return Ka([Gd(e.cells(),e.rng().start()),Gd(e.cells(),e.rng().end())],function(t,n){return e.cells().slice(t,n+1)})}(e).map(function(t){var n=e.cells();return t.length===n.length?Fd.removeTable(e.table()):Fd.emptyCells(t)})},Kd=function(e,t){return Vd(e,t).bind(Yd)},Xd=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Jd=Xd,Zd=function(e){return Y(e,function(e){var t=qa(e);return t?[Gn.fromDom(t)]:[]})},Qd=function(e){return Xd(e).length>1},em=function(e){return $(Zd(e),mo)},tm=function(e){return Hi(e,"td[data-mce-selected],th[data-mce-selected]")},nm=function(e,t){var n=tm(t),r=em(e);return n.length>0?n:r},rm=nm,om=function(e){return nm(Jd(e.selection.getSel()),Gn.fromDom(e.getBody()))},im=function(e,t){return z(t,Cl),e.selection.setCursorLocation(t[0].dom(),0),!0},am=function(e,t){return zf(e,!1,t),!0},sm=function(e,t,n,r){return um(t,r).fold(function(){return function(e,t,n){return Kd(t,n).map(function(t){return t.fold(y(am,e),y(im,e))})}(e,t,n)},function(t){return function(e,t){return lm(e,t)}(e,t)}).getOr(!1)},cm=function(e,t){return W(df(t,e),mo)},um=function(e,t){return W(df(t,e),function(e){return"caption"===tr.name(e)})},lm=function(e,t){return Cl(t),e.selection.setCursorLocation(t.dom(),0),S.some(!0)},fm=function(e,t,n,r,o){return Au.navigate(n,e.getBody(),o).bind(function(i){return function(e,t,n,r){return Au.firstPositionIn(e.dom()).bind(function(o){return Au.lastPositionIn(e.dom()).map(function(e){return t?n.isEqual(o)&&r.isEqual(e):n.isEqual(e)&&r.isEqual(o)})}).getOr(!0)}(r,n,o,i)?function(e,t){return lm(e,t)}(e,r):function(e,t,n){return um(e,Gn.fromDom(n.getNode())).map(function(e){return!1===Or.eq(e,t)})}(t,r,i)}).or(S.some(!0))},dm=function(e,t,n,r){var o=gs.fromRangeStart(e.selection.getRng());return cm(n,r).bind(function(r){return nf(r)?lm(e,r):function(e,t,n,r,o){return Au.navigate(n,e.getBody(),o).bind(function(e){return cm(t,Gn.fromDom(e.getNode())).map(function(e){return!1===Or.eq(e,r)})})}(e,n,t,r,o)})},mm=function(e,t,n){var r=Gn.fromDom(e.getBody());return um(r,n).fold(function(){return dm(e,t,r,n)},function(n){return function(e,t,n,r){var o=gs.fromRangeStart(e.selection.getRng());return nf(r)?lm(e,r):fm(e,n,t,r,o)}(e,t,r,n)}).getOr(!1)},pm=function(e,t){var n=Gn.fromDom(e.selection.getStart(!0)),r=om(e);return e.selection.isCollapsed()&&0===r.length?mm(e,t,n):function(e,t){var n=Gn.fromDom(e.getBody()),r=e.selection.getRng(),o=om(e);return 0!==o.length?im(e,o):sm(e,n,r,t)}(e,n)},hm=function(e,t){e.getDoc().execCommand(t,!1,null)},gm={deleteCommand:function(e){jf(e,!1)||Bd(e,!1)||wf(e,!1)||pm(e)||_f(e,!1)||(hm(e,"Delete"),Yl(e))},forwardDeleteCommand:function(e){jf(e,!0)||Bd(e,!0)||wf(e,!0)||pm(e)||_f(e,!0)||hm(e,"ForwardDelete")}},vm=function(e){return function(t,n){return S.from(n).map(Gn.fromDom).filter(tr.isElement).bind(function(n){return function(e,t,n){var r=function(t){return xr(t,e)};return Wi.closest(Gn.fromDom(n),function(e){return r(e).isSome()},function(e){return Or.eq(Gn.fromDom(t),e)}).bind(r)}(e,t,n.dom()).or(function(e,t){return S.from(ci.DOM.getStyle(t,e,!0))}(e,n.dom()))}).getOr("")}},bm={getFontSize:vm("font-size"),getFontFamily:g(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},vm("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}(72*parseInt(e,10)/96,t||0)+"pt":e}},ym=function(e){return Au.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return _o.isText(t)?t.parentNode:t})},xm=function(e){return S.from(e.selection.getRng()).bind(function(t){return function(e,t){return e.startContainer===t&&0===e.startOffset}(t,e.getBody())?S.none():S.from(e.selection.getStart(!0))})},wm=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(n>=1&&n<=7){var r=Pc.getFontStyleValues(e),o=Pc.getFontSizeClasses(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},Cm=function(e,t){e.formatter.toggle("fontname",{value:wm(e,t)}),e.nodeChanged()},km=function(e){return xm(e).fold(function(){return ym(e).map(function(t){return bm.getFontFamily(e.getBody(),t)}).getOr("")},function(t){return bm.getFontFamily(e.getBody(),t)})},Tm=function(e,t){e.formatter.toggle("fontsize",{value:wm(e,t)}),e.nodeChanged()},_m=function(e){return xm(e).fold(function(){return ym(e).map(function(t){return bm.getFontSize(e.getBody(),t)}).getOr("")},function(t){return bm.getFontSize(e.getBody(),t)})},Em={isEq:function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}},Sm=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},Nm=function(e,t,n){return Sm(e,t,function(e){return e.nodeName===n})},Rm=function(e){return e&&"TABLE"===e.nodeName},Am=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},Dm=function(e,t){return xa(e)&&!1===Sm(e,t,Ls)},Om=function(e,t,n){for(var r=new Zr(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(_o.isBr(t))return!0},Pm=function(e,t,n,r,o){var i,a,s,c,u=e.getRoot(),l=e.schema.getNonEmptyElements();if(s=e.getParent(o.parentNode,e.isBlock)||u,r&&_o.isBr(o)&&t&&e.isEmpty(s))return S.some(ps(o.parentNode,e.nodeIndex(o)));for(i=new Zr(o,s);c=i[r?"prev":"next"]();){if("false"===e.getContentEditableParent(c)||Dm(c,u))return S.none();if(_o.isText(c)&&c.nodeValue.length>0)return!1===Nm(c,u,"A")?S.some(ps(c,r?c.nodeValue.length:0)):S.none();if(e.isBlock(c)||l[c.nodeName.toLowerCase()])return S.none();a=c}return n&&a?S.some(ps(a,0)):S.none()},Im=function(e,t,n,r){var o,i,a,s,c,u,l,f=e.getRoot(),d=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],l=_o.isElement(o)&&i===o.childNodes.length,c=e.schema.getNonEmptyElements(),u=n,xa(o))return S.none();if(_o.isElement(o)&&i>o.childNodes.length-1&&(u=!1),_o.isDocument(o)&&(o=f,i=0),o===f){if(u&&(s=o.childNodes[i>0?i-1:0])){if(xa(s))return S.none();if(c[s.nodeName]||Rm(s))return S.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=_o.isText(o)&&l?o.data.length:0,!t&&o===f.lastChild&&Rm(o))return S.none();if(function(e,t){for(;t&&t!==e;){if(_o.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(f,o)||xa(o))return S.none();if(o.hasChildNodes()&&!1===Rm(o)){s=o,a=new Zr(o,f);do{if(_o.isContentEditableFalse(s)||xa(s)){d=!1;break}if(_o.isText(s)&&s.nodeValue.length>0){i=u?0:s.nodeValue.length,o=s,d=!0;break}if(c[s.nodeName.toLowerCase()]&&!Am(s)){i=e.nodeIndex(s),o=s.parentNode,u||i++,d=!0;break}}while(s=u?a.next():a.prev())}}}return t&&(_o.isText(o)&&0===i&&Pm(e,l,t,!0,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),_o.isElement(o)&&((s=o.childNodes[i])||(s=o.childNodes[i-1]),!s||!_o.isBr(s)||function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t}(s,"A")||Om(e,s,!1)||Om(e,s,!0)||Pm(e,l,t,!0,s).each(function(e){o=e.container(),i=e.offset(),d=!0}))),u&&!t&&_o.isText(o)&&i===o.nodeValue.length&&Pm(e,l,t,!1,o).each(function(e){o=e.container(),i=e.offset(),d=!0}),d?S.some(ps(o,i)):S.none()},Bm={normalize:function(e,t){var n=t.collapsed,r=t.cloneRange(),o=ps.fromRangeStart(t);return Im(e,n,!0,r).each(function(e){n&&ps.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||Im(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Em.isEq(t,r)?S.none():S.some(r)}},Mm=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Lm=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Fm=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Bm.normalize(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var s=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var u=s>c.childNodes.length-1;c=c.childNodes[Math.min(s,c.childNodes.length-1)]||c,s=u&&3===c.nodeType?c.nodeValue.length:0}var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=t&&t.ctrlKey;"LI"!==d||m||(l=f),c&&3===c.nodeType&&s>=c.nodeValue.length&&(function(e,t,n){for(var r,o=new Zr(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(e.schema,c,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),a.insertNode(n),Mm(i,o,n),Lm(i,o,n,r),e.undoManager.add()},Hm=function(e,t){var n=Gn.fromTag("br");bi.before(Gn.fromDom(t),n),e.undoManager.add()},zm=function(e,t){Um(e.getBody(),t)||bi.after(Gn.fromDom(t),Gn.fromTag("br"));var n=Gn.fromTag("br");bi.after(Gn.fromDom(t),n),Mm(e.dom,e.selection,n.dom()),Lm(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},Um=function(e,t){return n=gs.after(t),!!_o.isBr(n.getNode())||Au.nextPosition(e,gs.after(t)).map(function(e){return _o.isBr(e.getNode())}).getOr(!1);var n},$m=function(e){return e&&"A"===e.nodeName&&"href"in e},jm=function(e){return e.fold(v(!1),$m,$m,v(!1))},Wm=function(e,t){t.fold(h,y(Hm,e),y(zm,e),h)},qm={insert:function(e,t){var n=function(e){var t=y(Vl.isInlineTarget,e),n=gs.fromRangeStart(e.selection.getRng());return yd(t,e.getBody(),n).filter(jm)}(e);n.isSome()?n.each(y(Wm,e)):Fm(e,t)}},Vm=Ef([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Gm=(Vm.before,Vm.on,Vm.after,function(e){return e.fold(b,b,b)}),Ym=Ef([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Km=wr("start","soffset","finish","foffset"),Xm={domRange:Ym.domRange,relative:Ym.relative,exact:Ym.exact,exactFromRange:function(e){return Ym.exact(e.start(),e.soffset(),e.finish(),e.foffset())},range:Km,getWin:function(e){var t=function(e){return e.match({domRange:function(e){return Gn.fromDom(e.startContainer)},relative:function(e,t){return Gm(e)},exact:function(e,t,n,r){return e}})}(e);return Hr.defaultView(t)}},Jm=qn.detect().browser,Zm=function(e,t){var n=tr.isText(t)?ol(t).length:Hr.children(t).length+1;return e>n?n:e<0?0:e},Qm=function(e){return Xm.range(e.start(),Zm(e.soffset(),e.start()),e.finish(),Zm(e.foffset(),e.finish()))},ep=function(e,t){return Or.contains(e,t)||Or.eq(e,t)},tp=function(e){return function(t){return ep(e,t.start())&&ep(e,t.finish())}},np=function(e){return!0===e.inline||Jm.isIE()},rp=function(e){return Xm.range(Gn.fromDom(e.startContainer),e.startOffset,Gn.fromDom(e.endContainer),e.endOffset)},op=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?S.from(t.getRangeAt(0)):S.none()).map(rp)},ip=function(e){var t=Hr.defaultView(e);return op(t.dom()).filter(tp(e))},ap=function(e,t){return S.from(t).filter(tp(e)).map(Qm)},sp=function(e){var t=document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),S.some(t)}catch(e){return S.none()}},cp=function(e){return(e.bookmark?e.bookmark:S.none()).bind(y(ap,Gn.fromDom(e.getBody()))).bind(sp)},up={store:function(e){var t=np(e)?ip(Gn.fromDom(e.getBody())):S.none();e.bookmark=t.isSome()?t:e.bookmark},storeNative:function(e,t){var n=Gn.fromDom(e.getBody()),r=(np(e)?S.from(t):S.none()).map(rp).filter(tp(n));e.bookmark=r.isSome()?r:e.bookmark},readRange:op,restore:function(e){cp(e).each(function(t){e.selection.setRng(t)})},getRng:cp,getBookmark:ip,validate:ap},lp=function(e,t){var n=e.settings,r=e.dom,o=e.selection,i=e.formatter,a=/[a-z%]+$/i.exec(n.indentation)[0],s=parseInt(n.indentation,10),c=e.getParam("indent_use_margin",!1);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||(n.forced_root_block||r.getParent(o.getNode(),r.isBlock)||i.apply("div"),z(o.getSelectedBlocks(),function(e){return function(e,t,n,r,o,i){if("false"!==e.getContentEditable(i)&&"LI"!==i.nodeName){var a=n?"margin":"padding";if(a="TABLE"===i.nodeName?"margin":a,a+="rtl"===e.getStyle(i,"direction",!0)?"Right":"Left","outdent"===t){var s=Math.max(0,parseInt(i.style[a]||0,10)-r);e.setStyle(i,a,s?s+o:"")}else s=parseInt(i.style[a]||0,10)+r+o,e.setStyle(i,a,s)}}(r,t,c,s,a,e)}))},fp=Yt.each,dp=Yt.extend,mp=Yt.map,pp=Yt.inArray;function hp(e){var t,n,r,o,i={state:{},exec:{},value:{}},a=e.settings;e.on("PreInit",function(){t=e.dom,n=e.selection,a=e.settings,r=e.formatter});var s=function(t){var n;if(!e.quirks.isHidden()&&!e.removed){if(t=t.toLowerCase(),n=i.state[t])return n(t);try{return e.getDoc().queryCommandState(t)}catch(e){}return!1}},c=function(e,t){t=t||"exec",fp(e,function(e,n){fp(n.toLowerCase().split(","),function(n){i[t][n]=e})})},u=function(t,n,r){t=t.toLowerCase(),i.value[t]=function(){return n.call(r||e)}};dp(this,{execCommand:function(t,n,r,o){var a,s,c=!1;if(!e.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||o&&o.skip_focus?up.restore(e):e.focus(),(o=e.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(s=t.toLowerCase(),a=i.exec[s])return a(s,n,r),e.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(fp(e.plugins,function(o){if(o.execCommand&&o.execCommand(t,n,r))return e.fire("ExecCommand",{command:t,ui:n,value:r}),c=!0,!1}),c)return c;if(e.theme&&e.theme.execCommand&&e.theme.execCommand(t,n,r))return e.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{c=e.getDoc().execCommand(t,n,r)}catch(e){}return!!c&&(e.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},queryCommandState:s,queryCommandValue:function(t){var n;if(!e.quirks.isHidden()&&!e.removed){if(t=t.toLowerCase(),n=i.value[t])return n(t);try{return e.getDoc().queryCommandValue(t)}catch(e){}}},queryCommandSupported:function(t){if(t=t.toLowerCase(),i.exec[t])return!0;try{return e.getDoc().queryCommandSupported(t)}catch(e){}return!1},addCommands:c,addCommand:function(t,n,r){t=t.toLowerCase(),i.exec[t]=function(t,o,i,a){return n.call(r||e,o,i,a)}},addQueryStateHandler:function(t,n,r){t=t.toLowerCase(),i.state[t]=function(){return n.call(r||e)}},addQueryValueHandler:u,hasCustomCommand:function(e){return e=e.toLowerCase(),!!i.exec[e]}});var l=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=null),e.getDoc().execCommand(t,n,r)},f=function(e){return r.match(e)},d=function(t,n){r.toggle(t,n?{value:n}:void 0),e.nodeChanged()},m=function(e){o=n.getBookmark(e)},p=function(){n.moveToBookmark(o)};c({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(t){var n,r=e.getDoc();try{l(t)}catch(e){n=!0}if("paste"!==t||r.queryCommandEnabled(t)||(n=!0),n||!r.queryCommandSupported(t)){var o=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Ne.mac&&(o=o.replace(/Ctrl\+/g,"?+")),e.notificationManager.open({text:o,type:"error"})}},unlink:function(){if(n.isCollapsed()){var t=e.dom.getParent(e.selection.getStart(),"a");t&&e.dom.remove(t,!0)}else r.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),fp("left,center,right,justify".split(","),function(e){t!==e&&r.remove("align"+e)}),"none"!==t&&d("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var r,o;l(e),(r=t.getParent(n.getNode(),"ol,ul"))&&(o=r.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName)&&(m(),t.split(o,r),p()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){d(e)},"ForeColor,HiliteColor":function(e,t,n){d(e,n)},FontName:function(t,n,r){Cm(e,r)},FontSize:function(t,n,r){Tm(e,r)},RemoveFormat:function(e){r.remove(e)},mceBlockQuote:function(){d("blockquote")},FormatBlock:function(e,t,n){return d(n||"p")},mceCleanup:function(){var t=n.getBookmark();e.setContent(e.getContent()),n.moveToBookmark(t)},mceRemoveNode:function(t,r,o){var i=o||n.getNode();i!==e.getBody()&&(m(),e.dom.remove(i,!0),p())},mceSelectNodeDepth:function(r,o,i){var a=0;t.getParent(n.getNode(),function(e){if(1===e.nodeType&&a++===i)return n.select(e),!1},e.getBody())},mceSelectNode:function(e,t,r){n.select(r)},mceInsertContent:function(t,n,r){Dl.insertAtCaret(e,r)},mceInsertRawHTML:function(t,r,o){var i=e.getContent();n.setContent("tiny_mce_marker"),e.setContent(i.replace(/tiny_mce_marker/g,function(){return o}))},mceToggleFormat:function(e,t,n){d(n)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){lp(e,t)},mceRepaint:function(){},InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,r,o){e.execCommand("mceInsertContent",!1,o.replace(/\{\$selection\}/g,n.getContent({format:"text"})))},mceInsertLink:function(e,o,i){var a;"string"==typeof i&&(i={href:i}),a=t.getParent(n.getNode(),"a"),i.href=i.href.replace(" ","%20"),a&&i.href||r.remove("link"),i.href&&r.apply("link",i,a)},selectAll:function(){var e=t.getParent(n.getStart(),_o.isContentEditableTrue);if(e){var r=t.createRng();r.selectNodeContents(e),n.setRng(r)}},delete:function(){gm.deleteCommand(e)},forwardDelete:function(){gm.forwardDeleteCommand(e)},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return qm.insert(e,r),!0}});var h=function(e){return function(){var o=n.isCollapsed()?[t.getParent(n.getNode(),t.isBlock)]:n.getSelectedBlocks(),i=mp(o,function(t){return!!r.matchNode(t,e)});return-1!==pp(i,!0)}};c({JustifyLeft:h("alignleft"),JustifyCenter:h("aligncenter"),JustifyRight:h("alignright"),JustifyFull:h("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(a.inline_styles){if((e=t.getParent(n.getStart(),t.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0;if((e=t.getParent(n.getEnd(),t.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0}return s("InsertUnorderedList")||s("InsertOrderedList")||!a.inline_styles&&!!t.getParent(n.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var r=t.getParent(n.getNode(),"ul,ol");return r&&("insertunorderedlist"===e&&"UL"===r.tagName||"insertorderedlist"===e&&"OL"===r.tagName)}},"state"),c({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),u("FontName",function(){return km(e)},this),u("FontSize",function(){return _m(e)},this)}var gp=Yt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),vp=function(e){var t,n,r=this,o={},i=function(){return!1},a=function(){return!0};t=(e=e||{}).scope||r,n=e.toggleEvent||i;var s=function(e,t,a,s){var c,u,l;if(!1===t&&(t=i),t)for(t={func:t},s&&Yt.extend(t,s),l=(u=e.toLowerCase().split(" ")).length;l--;)e=u[l],(c=o[e])||(c=o[e]=[],n(e,!0)),a?c.unshift(t):c.push(t);return r},c=function(e,t){var i,a,s,c,u;if(e)for(i=(c=e.toLowerCase().split(" ")).length;i--;){if(e=c[i],a=o[e],!e){for(s in o)n(s,!1),delete o[s];return r}if(a){if(t)for(u=a.length;u--;)a[u].func===t&&(a=a.slice(0,u).concat(a.slice(u+1)),o[e]=a);else a.length=0;a.length||(n(e,!1),delete o[e])}}else{for(e in o)n(e,!1);o={}}return r};r.fire=function(n,r){var s,u,l,f;if(n=n.toLowerCase(),(r=r||{}).type=n,r.target||(r.target=t),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=a},r.stopPropagation=function(){r.isPropagationStopped=a},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=a},r.isDefaultPrevented=i,r.isPropagationStopped=i,r.isImmediatePropagationStopped=i),e.beforeFire&&e.beforeFire(r),s=o[n])for(u=0,l=s.length;u<l;u++){if((f=s[u]).once&&c(n,f.func),r.isImmediatePropagationStopped())return r.stopPropagation(),r;if(!1===f.func.call(t,r))return r.preventDefault(),r}return r},r.on=s,r.off=c,r.once=function(e,t,n){return s(e,t,n,{once:!0})},r.has=function(e){return e=e.toLowerCase(),!(!o[e]||0===o[e].length)}};vp.isNative=function(e){return!!gp[e.toLowerCase()]};var bp,yp=function(e){return e._eventDispatcher||(e._eventDispatcher=new vp({scope:e,toggleEvent:function(t,n){vp.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher},xp={fire:function(e,t,n){if(this.removed&&"remove"!==e)return t;if(t=yp(this).fire(e,t,n),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},on:function(e,t,n){return yp(this).on(e,t,n)},off:function(e,t){return yp(this).off(e,t)},once:function(e,t){return yp(this).once(e,t)},hasEventListeners:function(e){return yp(this).has(e)}},wp=function(e,t){return e.fire("PreProcess",t)},Cp=function(e,t){return e.fire("PostProcess",t)},kp=function(e){return e.fire("remove")},Tp=function(e,t){return e.fire("SwitchMode",{mode:t})},_p=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},Ep=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},Sp=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}},Np=function(e,t){!function(e,t,n){Fi.has(e,t)&&!1===n?Fi.remove(e,t):n&&Fi.add(e,t)}(Gn.fromDom(e.getBody()),"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable="false"):(e.readonly=!1,e.getBody().contentEditable="true",Sp(e,"StyleWithCSS",!1),Sp(e,"enableInlineTableEditing",!1),Sp(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())},Rp=function(e){return e.readonly?"readonly":"design"},Ap=ci.DOM,Dp=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=Ap.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},Op=function(e,t,n){!function(e){return!e.hidden&&!e.readonly}(e)?function(e){return!0===e.readonly}(e)&&n.preventDefault():e.fire(t,n)},Pp=function(e,t){var n,r;if(e.delegates||(e.delegates={}),!e.delegates[t]&&!e.removed)if(n=Dp(e,t),e.settings.event_root){if(bp||(bp={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&bp){for(t in bp)e.dom.unbind(Dp(e,t));bp=null}})),bp[t])return;r=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||Ap.isChildOf(r,a))&&Op(o[i],t,n)}},bp[t]=r,Ap.bind(n,t,r)}else r=function(n){Op(e,t,n)},Ap.bind(n,t,r),e.delegates[t]=r},Ip={bindPendingEventDelegates:function(){var e=this;Yt.each(e._pendingNativeEvents,function(t){Pp(e,t)})},toggleNativeEvent:function(e,t){"focus"!==e&&"blur"!==e&&(t?this.initialized?Pp(this,e):this._pendingNativeEvents?this._pendingNativeEvents.push(e):this._pendingNativeEvents=[e]:this.initialized&&(this.dom.unbind(Dp(this,e),e,this.delegates[e]),delete this.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this.getBody(),n=this.dom;if(this.delegates){for(e in this.delegates)this.dom.unbind(Dp(this,e),e,this.delegates[e]);delete this.delegates}!this.inline&&t&&n&&(t.onload=null,n.unbind(this.getWin()),n.unbind(this.getDoc())),n&&(n.unbind(t),n.unbind(this.getContainer()))}},Bp=Ip=Yt.extend({},xp,Ip),Mp=Yt.each,Lp=Yt.explode,Fp={f9:120,f10:121,f11:122},Hp=Yt.makeMap("alt,ctrl,shift,meta,access");function zp(e){var t={},n=[],r=function(e){var t,n,r={};for(n in Mp(Lp(e,"+"),function(e){e in Hp?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=Fp[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],Hp)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,Ne.mac?r.ctrl=!0:r.shift=!0),r.meta&&(Ne.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},o=function(t,n,o,i){var a;return(a=Yt.map(Lp(t,">"),r))[a.length-1]=Yt.extend(a[a.length-1],{func:o,scope:i||e}),Yt.extend(a[0],{desc:e.translate(n),subpatterns:a.slice(1)})},i=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},a=function(e){return e.func?e.func.call(e.scope):null};e.on("keyup keypress keydown",function(e){!function(e){return e.altKey||e.ctrlKey||e.metaKey}(e)&&!function(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}(e)||e.isDefaultPrevented()||(Mp(t,function(t){if(i(e,t))return n=t.subpatterns.slice(0),"keydown"===e.type&&a(t),!0}),i(e,n[0])&&(1===n.length&&"keydown"===e.type&&a(n[0]),n.shift()))}),this.add=function(n,r,i,a){var s;return s=i,"string"==typeof i?i=function(){e.execCommand(s,!1,null)}:Yt.isArray(s)&&(i=function(){e.execCommand(s[0],s[1],s[2])}),Mp(Lp(Yt.trim(n.toLowerCase())),function(e){var n=o(e,r,i,a);t[n.id]=n}),!0},this.remove=function(e){var n=o(e);return!!t[n.id]&&(delete t[n.id],!0)}}var Up=function(e){var t=void 0!==e?e.dom():document;return S.from(t.activeElement).map(Gn.fromDom)},$p=function(e){var t=Hr.owner(e).dom();return e.dom()===t.activeElement},jp=function(e){return Up(Hr.owner(e)).filter(function(t){return e.dom().contains(t.dom())})},Wp=function(e,t){return function(e){return e.collapsed?S.from(Va(e.startContainer,e.startOffset)).map(Gn.fromDom):S.none()}(t).bind(function(t){return fo(t)?S.some(t):!1===Or.contains(e,t)?S.some(e):S.none()})},qp=function(e,t){Wp(Gn.fromDom(e.getBody()),t).bind(function(e){return Au.firstPositionIn(e.dom())}).fold(function(){e.selection.normalize()},function(t){return e.selection.setRng(t.toRange())})},Vp=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Gp=function(e){var t,n=e.getBody();return n&&(t=Gn.fromDom(n),$p(t)||jp(t).isSome())},Yp=function(e){return e.inline?Gp(e):function(e){return e.iframeElement&&$p(Gn.fromDom(e.iframeElement))}(e)},Kp=function(e){return e.editorManager.setActive(e)},Xp=function(e,t){e.removed||(t?Kp(e):function(e){var t=e.selection,n=e.settings.content_editable,r=e.getBody(),o=t.getRng();e.quirks.refreshContentEditable();var i=function(e,t){return e.dom.getParent(t,function(t){return"true"===e.dom.getContentEditable(t)})}(e,t.getNode());if(e.$.contains(r,i))return Vp(i),qp(e,o),void Kp(e);void 0!==e.bookmark&&!1===Yp(e)&&up.getRng(e).each(function(t){e.selection.setRng(t),o=t}),n||(Ne.opera||Vp(r),e.getWin().focus()),(Ne.gecko||n)&&(Vp(r),qp(e,o)),Kp(e)}(e))},Jp=Yp,Zp=function(e,t){return t.dom()[e]},Qp=function(e,t){return parseInt(yr(t,e),10)},eh=y(Zp,"clientWidth"),th=y(Zp,"clientHeight"),nh=y(Qp,"margin-top"),rh=y(Qp,"margin-left"),oh={isXYInContentArea:function(e,t,n){var r=Gn.fromDom(e.getBody()),o=e.inline?r:Hr.documentElement(r),i=function(e,t,n,r){var o=function(e){return e.dom().getBoundingClientRect()}(t);return{x:n-(e?o.left+t.dom().clientLeft+rh(t):0),y:r-(e?o.top+t.dom().clientTop+nh(t):0)}}(e.inline,o,t,n);return function(e,t,n){var r=eh(e),o=th(e);return t>=0&&n>=0&&t<=r&&n<=o}(o,i.x,i.y)},isEditorAttachedToDom:function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,S.from(t).map(Gn.fromDom)).map(function(e){return Or.contains(Hr.owner(e),e)}).getOr(!1)}};function ih(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:t,reposition:t,getArgs:t}},r=function(){t.length>0&&n().reposition(t)},o=function(e){q(t,function(t){return t===e}).each(function(e){t.splice(e,1)})},i=function(i){if(!e.removed&&oh.isEditorAttachedToDom(e))return W(t,function(e){return t=n().getArgs(e),r=i,!(t.type!==r.type||t.text!==r.text||t.progressBar||t.timeout||r.progressBar||r.timeout);var t,r}).getOrThunk(function(){e.editorManager.setActive(e);var a=n().open(i,function(){o(a),r()});return function(e){t.push(e)}(a),r(),a})};return function(e){e.on("SkinLoaded",function(){var t=e.settings.service_message;t&&i({text:t,type:"warning",timeout:0,icon:""})}),e.on("ResizeEditor ResizeWindow",function(){Pe.requestAnimationFrame(r)}),e.on("remove",function(){z(t,function(e){n().close(e)})})}(e),{open:i,close:function(){S.from(t[0]).each(function(e){n().close(e),o(e),r()})},getNotifications:function(){return t}}}function ah(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:t=function(){throw new Error("Theme did not provide a WindowManager implementation.")},alert:t,confirm:t,close:t,getParams:t,setParams:t}},r=function(e,t){return function(){return t?t.apply(e,arguments):void 0}},o=function(n){t.push(n),function(t){e.fire("OpenWindow",{win:t})}(n)},i=function(n){q(t,function(e){return e===n}).each(function(r){t.splice(r,1),function(t){e.fire("CloseWindow",{win:t})}(n),0===t.length&&e.focus()})},a=function(){return S.from(t[t.length-1])};return e.on("remove",function(){z(t.slice(0),function(e){n().close(e)})}),{windows:t,open:function(t,r){e.editorManager.setActive(e),up.store(e);var a=n().open(t,r,i);return o(a),a},alert:function(e,t,a){var s=n().alert(e,r(a||this,t),i);o(s)},confirm:function(e,t,a){var s=n().confirm(e,r(a||this,t),i);o(s)},close:function(){a().each(function(e){n().close(e),i(e)})},getParams:function(){return a().map(n().getParams).getOr(null)},setParams:function(e){a().each(function(t){n().setParams(t,e)})},getWindows:function(){return t}}}var sh=hi.PluginManager,ch=function(e,t){var n=function(e,t){for(var n in sh.urls)if(sh.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?"Failed to load plugin: "+n+" from url "+t:"Failed to load plugin url: "+t},uh=function(e,t){e.notificationManager.open({type:"error",text:t})},lh=function(e,t){e._skinLoaded?uh(e,t):e.on("SkinLoaded",function(){uh(e,t)})},fh={pluginLoadError:function(e,t){lh(e,ch(e,t))},uploadError:function(e,t){lh(e,"Failed to upload image: "+t)},displayError:lh,initError:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))}},dh=hi.PluginManager,mh=hi.ThemeManager;function ph(){return new(re.getOrDie("XMLHttpRequest"))}function hh(e,t){var n={},r=function(e,n,r,o){var i,a;(i=new ph).open("POST",t.url),i.withCredentials=t.credentials,i.upload.onprogress=function(e){o(e.loaded/e.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,o,a;i.status<200||i.status>=300?r("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?n((o=t.basePath,a=e.location,o?o.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+i.responseText)},(a=new FormData).append("file",e.blob(),e.filename()),i.send(a)},o=function(e,t){return{url:t,blobInfo:e,status:!0}},i=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},a=function(e,t){Yt.each(n[e],function(e){e(t)}),delete n[e]},s=function(r,s){return r=Yt.grep(r,function(t){return!e.isUploaded(t.blobUri())}),Re.all(Yt.map(r,function(r){return e.isPending(r.blobUri())?function(e){var t=e.blobUri();return new Re(function(e){n[t]=n[t]||[],n[t].push(e)})}(r):function(t,n,r){return e.markPending(t.blobUri()),new Re(function(s){var c;try{var u=function(){c&&c.close()};n(t,function(n){u(),e.markUploaded(t.blobUri(),n),a(t.blobUri(),o(t,n)),s(o(t,n))},function(n){u(),e.removeFailed(t.blobUri()),a(t.blobUri(),i(t,n)),s(i(t,n))},function(e){e<0||e>100||(c||(c=r()),c.progressBar.value(e))})}catch(e){s(i(t,e.message))}})}(r,t.handler,s)}))};return!1===I(t.handler)&&(t.handler=r),{upload:function(e,n){return t.url||t.handler!==r?s(e,n):new Re(function(e){e([])})}}}var gh=function(e){return re.getOrDie("atob")(e)},vh=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},bh=function(e){return new Re(function(t){var n,r,o,i=vh(e);try{n=gh(i.data)}catch(e){return void t(new Blob([]))}for(r=new function(e){return new(re.getOrDie("Uint8Array"))(e)}(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);t(new Blob([r],{type:i.type}))})},yh=function(e){return 0===e.indexOf("blob:")?function(e){return new Re(function(t,n){var r=function(){n("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new ph;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){200===this.status?t(this.response):r()},o.onerror=r,o.send()}catch(e){r()}})}(e):0===e.indexOf("data:")?bh(e):null},xh=function(e){return new Re(function(t){var n=new function(){return new(re.getOrDie("FileReader"))};n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})},wh=vh,Ch=0,kh=function(e){return(e||"blobid")+Ch++},Th=function(e,t,n,r){var o,i;0!==t.src.indexOf("blob:")?(o=wh(t.src).data,(i=e.findFirst(function(e){return e.base64()===o}))?n({image:t,blobInfo:i}):yh(t.src).then(function(r){i=e.create(kh(),r,o),e.add(i),n({image:t,blobInfo:i})},function(e){r(e)})):(i=e.getByUri(t.src))?n({image:t,blobInfo:i}):yh(t.src).then(function(r){xh(r).then(function(a){o=wh(a).data,i=e.create(kh(),r,o),e.add(i),n({image:t,blobInfo:i})})},function(e){r(e)})},_h=function(e){return e?e.getElementsByTagName("img"):[]},Eh=0,Sh={uuid:function(e){return e+Eh+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t}};function Nh(e){var t,n,r,o,i,a,s,c,u,l,f=(t=[],n=da.constant,r=function(e){var t,r,o;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||Sh.uuid("blobid"),r=e.name||t,{id:n(t),name:n(r),filename:n(r+"."+(o=e.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[o.toLowerCase()]||"dat")),blob:n(e.blob),base64:n(e.base64),blobUri:n(e.blobUri||ie.createObjectURL(e.blob)),uri:n(e.uri)}},{create:function(e,t,n,o){if(R(e))return r({id:e,name:o,blob:t,base64:n});if(A(e))return r(e);throw new Error("Unknown input type")},add:function(e){o(e.id())||t.push(e)},get:o=function(e){return i(function(t){return t.id()===e})},getByUri:function(e){return i(function(t){return t.blobUri()===e})},findFirst:i=function(e){return jt.filter(t,e)[0]},removeByUri:function(e){t=jt.filter(t,function(t){return t.blobUri()!==e||(ie.revokeObjectURL(t.blobUri()),!1)})},destroy:function(){jt.each(t,function(e){ie.revokeObjectURL(e.blobUri())}),t=[]}}),d=(c={},u=function(e,t){return{status:e,resultUri:t}},{hasBlobUri:l=function(e){return e in c},getResultUri:function(e){var t=c[e];return t?t.resultUri:null},isPending:function(e){return!!l(e)&&1===c[e].status},isUploaded:function(e){return!!l(e)&&2===c[e].status},markPending:function(e){c[e]=u(1,null)},markUploaded:function(e,t){c[e]=u(2,t)},removeFailed:function(e){delete c[e]},destroy:function(){c={}}}),m=[],p=function(t){return function(n){return e.selection?t(n):[]}},h=function(e,t,n){var r=0;do{-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1)}while(-1!==r);return e},g=function(e,t,n){return e=h(e,'src="'+t+'"','src="'+n+'"'),e=h(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},v=function(t,n){z(e.undoManager.data,function(e){"fragmented"===e.type?e.fragments=H(e.fragments,function(e){return g(e,t,n)}):e.content=g(e.content,t,n)})},b=function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},y=function(t,n){f.removeByUri(t.src),v(t.src,n),e.$(t).attr({src:Pc.shouldReuseFileName(e)?n+"?"+(new Date).getTime():n,"data-mce-src":e.convertURL(n,"src")})},x=function(t){return a||(a=hh(d,{url:Pc.getImageUploadUrl(e),basePath:Pc.getImageUploadBasePath(e),credentials:Pc.getImagesUploadCredentials(e),handler:Pc.getImagesUploadHandler(e)})),k().then(p(function(n){var r;return r=H(n,function(e){return e.blobInfo}),a.upload(r,b).then(p(function(r){var o=H(r,function(t,r){var o=n[r].image;return t.status&&Pc.shouldReplaceBlobUris(e)?y(o,t.url):t.error&&fh.uploadError(e,t.error),{element:o,status:t.status}});return t&&t(o),o}))}))},w=function(t){if(Pc.isAutomaticUploadsEnabled(e))return x(t)},C=function(t){return!1!==K(m,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Pc.getImagesDataImgFilter(e)(t))},k=function(){return s||(s=function(e,t){var n={};return{findAll:function(r,o){var i;o||(o=da.constant(!0)),i=jt.filter(_h(r),function(t){var n=t.src;return!!Ne.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&!(!n||n===Ne.transparentSrc)&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&o(t):0===n.indexOf("data:")&&o(t))});var a=jt.map(i,function(e){if(n[e.src])return new Re(function(t){n[e.src].then(function(n){if("string"==typeof n)return n;t({image:e,blobInfo:n.blobInfo})})});var r=new Re(function(n,r){Th(t,e,n,r)}).then(function(e){return delete n[e.image.src],e}).catch(function(t){return delete n[e.src],t});return n[e.src]=r,r});return Re.all(a)}}}(d,f)),s.findAll(e.getBody(),C).then(p(function(t){return t=$(t,function(t){return"string"!=typeof t||(fh.displayError(e,t),!1)}),z(t,function(e){v(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))},T=function(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=d.getResultUri(n);if(r)return'src="'+r+'"';var o=f.getByUri(n);return o||(o=j(e.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),o?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':t})};return e.on("setContent",function(){Pc.isAutomaticUploadsEnabled(e)?w():k()}),e.on("RawSaveContent",function(e){e.content=T(e.content)}),e.on("getContent",function(e){e.source_view||"raw"===e.format||(e.content=T(e.content))}),e.on("PostRender",function(){e.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!f.getByUri(t)){var n=d.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:f,addFilter:function(e){m.push(e)},uploadImages:x,uploadImagesAuto:w,scanForImages:k,destroy:function(){f.destroy(),d.destroy(),s=a=null}}}var Rh=function(e,t){return e.hasOwnProperty(t.nodeName)},Ah=function(e,t){return!!_o.isText(t)||!!_o.isElement(t)&&!Rh(e,t)&&!Fu.isBookmarkNode(t)},Dh=function(e,t){if(_o.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||Rh(e,t.nextSibling)))return!0}return!1},Oh=function(e){var t,n,r,o,i,a,s,c,u,l,f,d=e.settings,m=e.dom,p=e.selection,h=e.schema,g=h.getBlockElements(),v=p.getStart(),b=e.getBody();if(f=d.forced_root_block,v&&_o.isElement(v)&&f&&(l=b.nodeName.toLowerCase(),h.isValidChild(l,f.toLowerCase())&&!function(e,t,n){return F(ff(Gn.fromDom(n),Gn.fromDom(t)),function(t){return Rh(e,t.dom())})}(g,b,v))){for(n=(t=p.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,u=Jp(e),v=b.firstChild;v;)if(Ah(g,v)){if(Dh(g,v)){s=v,v=v.nextSibling,m.remove(s);continue}a||(a=m.create(f,e.settings.forced_root_block_attrs),v.parentNode.insertBefore(a,v),c=!0),s=v,v=v.nextSibling,a.appendChild(s)}else a=null,v=v.nextSibling;c&&u&&(t.setStart(n,r),t.setEnd(o,i),p.setRng(t),e.nodeChanged())}},Ph=function(e){e.settings.forced_root_block&&e.on("NodeChange",y(Oh,e))},Ih=function(e){return Hr.firstChild(e).fold(v([e]),function(t){return[e].concat(Ih(t))})},Bh=function(e){return Hr.lastChild(e).fold(v([e]),function(t){return"br"===tr.name(t)?Hr.prevSibling(t).map(function(t){return[e].concat(Bh(t))}).getOr([]):[e].concat(Bh(t))})},Mh=function(e,t){return Ka([function(e){var t=e.startContainer,n=e.startOffset;return _o.isText(t)?0===n?S.some(Gn.fromDom(t)):S.none():S.from(t.childNodes[n]).map(Gn.fromDom)}(t),function(e){var t=e.endContainer,n=e.endOffset;return _o.isText(t)?n===t.data.length?S.some(Gn.fromDom(t)):S.none():S.from(t.childNodes[n-1]).map(Gn.fromDom)}(t)],function(t,n){var r=W(Ih(e),y(Or.eq,t)),o=W(Bh(e),y(Or.eq,n));return r.isSome()&&o.isSome()}).getOr(!1)},Lh=function(e,t,n,r){var o=n,i=new Zr(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Yt.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(Ne.ie&&Ne.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Fh=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0};function Hh(e){var t,n=[];"onselectionchange"in e.getDoc()||e.on("NodeChange Click MouseUp KeyUp Focus",function(n){var r,o;o={startContainer:(r=e.selection.getRng()).startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset},"nodechange"!==n.type&&Em.isEq(o,t)||e.fire("SelectionChange"),t=o}),e.on("contextmenu",function(){e.fire("SelectionChange")}),e.on("SelectionChange",function(){var t=e.selection.getStart(!0);!t||!Ne.range&&e.selection.isCollapsed()||Fh(e)&&!function(t){var r,o;if((o=e.$(t).parentsUntil(e.getBody()).add(t)).length===n.length){for(r=o.length;r>=0&&o[r]===n[r];r--);if(-1===r)return n=o,!0}return n=o,!1}(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("MouseUp",function(t){!t.isDefaultPrevented()&&Fh(e)&&("IMG"===e.selection.getNode().nodeName?Pe.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())}),this.nodeChanged=function(t){var n,r,o,i=e.selection;e.initialized&&i&&!e.settings.disable_nodechange&&!e.readonly&&(o=e.getBody(),(n=i.getStart(!0)||o).ownerDocument===e.getDoc()&&e.dom.isChildOf(n,o)||(n=o),r=[],e.dom.getParent(n,function(e){if(e===o)return!0;r.push(e)}),(t=t||{}).element=n,t.parents=r,e.fire("NodeChange",t))}}var zh,Uh=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},$h=function(e,t){return n=function(e){return e.inline?Uh(e.getBody()):{left:0,top:0}}(e),r=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}}(e),{pageX:(o=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=Uh(e.getContentAreaContainer()),r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:o}(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}return{left:t.pageX,top:t.pageY}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o},jh=_o.isContentEditableFalse,Wh=_o.isContentEditableTrue,qh=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Vh=function(e,t){return function(n){if(function(e){return 0===e.button}(n)){var r=jt.find(t.dom.getParents(n.target),da.or(jh,Wh));if(s=t.getBody(),jh(c=r)&&c!==s){var o=t.dom.getPos(r),i=t.getBody(),a=t.getDoc().documentElement;e.element=r,e.screenX=n.screenX,e.screenY=n.screenY,e.maxX=(t.inline?i.scrollWidth:a.offsetWidth)-2,e.maxY=(t.inline?i.scrollHeight:a.offsetHeight)-2,e.relX=n.pageX-o.x,e.relY=n.pageY-o.y,e.width=r.offsetWidth,e.height=r.offsetHeight,e.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(t,r,e.width,e.height)}}var s,c}},Gh=function(e,t){return function(n){if(e.dragging&&function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!jh(t)}(t,(s=t.selection,3===(c=s.getSel().getRangeAt(0).startContainer).nodeType?c.parentNode:c),e.element)){var r=(i=e.element,(a=i.cloneNode(!0)).removeAttribute("data-mce-selected"),a),o=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||(r=o.targetClone,t.undoManager.transact(function(){qh(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}var i,a,s,c;Yh(e)}},Yh=function(e){e.dragging=!1,e.element=null,qh(e.ghost)},Kh=function(e){var t,n,r,o,i,a,s={};t=ci.DOM,a=document,n=Vh(s,e),r=function(e,t){var n=Pe.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(r){var o,i,a=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(function(e){return e.element}(e)&&!e.dragging&&a>10){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var s=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}}(e,$h(t,r));o=e.ghost,i=t.getBody(),o.parentNode!==i&&i.appendChild(o),function(e,t,n,r,o,i){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(a=t.pageX+n-o),t.pageY+r>i&&(s=t.pageY+r-i),e.style.width=n-a+"px",e.style.height=r-s+"px"}(e.ghost,s,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}}}(s,e),o=Gh(s,e),i=function(e,t){return function(){e.dragging&&t.fire("dragend"),Yh(e)}}(s,e),e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},Xh=function(e){Kh(e),function(e){e.on("drop",function(t){var n=void 0!==t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(jh(n)||jh(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}(e)},Jh=function(e){return jt.reduce(e,function(e,t){return e.concat(function(e){var t=function(t){return jt.map(t,function(t){return(t=za(t)).node=e,t})};if(_o.isElement(e))return t(e.getClientRects());if(_o.isText(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}}(t))},[])};!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(zh||(zh={}));var Zh=function(e,t,n,r,o,i){var a,s,c=0,u=[],l=function(r){var i,a,l;for(l=Jh([r]),-1===e&&(l=l.reverse()),i=0;i<l.length;i++)if(a=l[i],!n(a,s)){if(u.length>0&&t(a,jt.last(u))&&c++,a.line=c,o(a))return!0;u.push(a)}};return(s=jt.last(i.getClientRects()))?(l(a=i.getNode()),function(e,t,n,r){for(;r=au(r,e,Fa,t);)if(n(r))return}(e,r,l,a),u):u},Qh=y(Zh,zh.Up,ja,Wa),eg=y(Zh,zh.Down,Wa,ja),tg=function(e){return function(t){return function(e,t){return t.line>e}(e,t)}},ng=function(e){return function(t){return function(e,t){return t.line===e}(e,t)}},rg=_o.isContentEditableFalse,og=au,ig=function(e,t){return Math.abs(e.left-t)},ag=function(e,t){return Math.abs(e.right-t)},sg=function(e,t){return e>=t.left&&e<=t.right},cg=function(e,t){return jt.reduce(e,function(e,n){var r,o;return r=Math.min(ig(e,t),ag(e,t)),o=Math.min(ig(n,t),ag(n,t)),sg(t,n)?n:sg(t,e)?e:o===r&&rg(n.node)?n:o<r?n:e})},ug=function(e,t,n,r){for(;r=og(r,e,Fa,t);)if(n(r))return},lg=function(e,t,n){var r,o=Jh(function(e){return jt.filter(jt.toArray(e.getElementsByTagName("*")),Kc)}(e)),i=jt.filter(o,function(e){return n>=e.top&&n<=e.bottom});return(r=cg(i,t))&&(r=cg(function(e,t){var n=[],r=function(e,r){var o;return o=jt.filter(Jh([r]),function(n){return!e(n,t)}),n=n.concat(o),0===o.length};return n.push(t),ug(zh.Up,e,y(r,ja),t.node),ug(zh.Down,e,y(r,Wa),t.node),n}(e,r),t))&&Kc(r.node)?function(e,t){return{node:e.node,before:ig(e,t)<ag(e,t)}}(r,t):null},fg=function(e,t,n){return!n.collapsed&&j(n.getClientRects(),function(n,r){return n||function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}(r,e,t)},!1)},dg=function(e){var t=ki(function(){if(!e.removed&&e.selection.getRng().collapsed){var t=ec(e,e.selection.getRng(),!1);e.selection.setRng(t)}},0);e.on("focus",function(){t.throttle()}),e.on("blur",function(){t.cancel()})},mg={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Ne.mac?e.metaKey:e.ctrlKey&&!e.altKey}},pg=_o.isContentEditableTrue,hg=_o.isContentEditableFalse,gg=wu,vg=xu,bg=function(e,t){for(var n=e.getBody();t&&t!==n;){if(pg(t)||hg(t))return t;t=t.parentNode}return null},yg=function(e){var t,n,r=e.getBody(),o=Yc(e.getBody(),function(t){return e.dom.isBlock(t)},function(){return Jp(e)}),i="sel-"+e.dom.uniqueId(),a=function(t){t&&e.selection.setRng(t)},s=function(){return e.selection.getRng()},c=function(t,n,r,i){return void 0===i&&(i=!0),e.fire("ShowCaret",{target:n,direction:t,before:r}).isDefaultPrevented()?null:(i&&e.selection.scrollIntoView(n,-1===t),o.show(r,n))},u=function(e,t){return t=hu(e,r,t),-1===e?gs.fromRangeStart(t):gs.fromRangeEnd(t)},l=function(e){return xa(e)||_a(e)||Ea(e)},f=function(e){return l(e.startContainer)||l(e.endContainer)},d=function(n,r){var o,a,s,l,d,m,h,g,v,b,y=e.$,x=e.dom;if(!n)return null;if(n.collapsed){if(!f(n))if(!1===r){if(g=u(-1,n),Kc(g.getNode(!0)))return c(-1,g.getNode(!0),!1,!1);if(Kc(g.getNode()))return c(-1,g.getNode(),!g.isAtEnd(),!1)}else{if(g=u(1,n),Kc(g.getNode()))return c(1,g.getNode(),!g.isAtEnd(),!1);if(Kc(g.getNode(!0)))return c(1,g.getNode(!0),!1,!1)}return null}return l=n.startContainer,d=n.startOffset,m=n.endOffset,3===l.nodeType&&0===d&&hg(l.parentNode)&&(l=l.parentNode,d=x.nodeIndex(l),l=l.parentNode),1!==l.nodeType?null:(m===d+1&&(o=l.childNodes[d]),hg(o)?(v=b=o.cloneNode(!0),(h=e.fire("ObjectSelected",{target:o,targetClone:v})).isDefaultPrevented()?null:(a=Gi(Gn.fromDom(e.getBody()),"#"+i).fold(function(){return y([])},function(e){return y([e.dom()])}),v=h.targetClone,0===a.length&&(a=y('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",i)).appendTo(e.getBody()),n=e.dom.createRng(),v===b&&Ne.ie?(a.empty().append('<p style="font-size: 0" data-mce-bogus="all"></p>').append(v),n.setStartAfter(a[0].firstChild.firstChild),n.setEndAfter(v)):(a.empty().append("").append(v).append(""),n.setStart(a[0].firstChild,1),n.setEnd(a[0].lastChild,0)),a.css({top:x.getPos(o,e.getBody()).y}),a[0].focus(),(s=e.selection.getSel()).removeAllRanges(),s.addRange(n),z(Hi(Gn.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){lr.remove(e,"data-mce-selected")}),o.setAttribute("data-mce-selected","1"),t=o,p(),n)):null)},m=function(){t&&(t.removeAttribute("data-mce-selected"),Gi(Gn.fromDom(e.getBody()),"#"+i).each(Ci.remove),t=null),Gi(Gn.fromDom(e.getBody()),"#"+i).each(Ci.remove),t=null},p=function(){o.hide()};return Ne.ceFalse&&(function(){e.on("mouseup",function(t){var n=s();n.collapsed&&oh.isXYInContentArea(e,t.clientX,t.clientY)&&a(Qs(e,n,!1))}),e.on("click",function(t){var n;(n=bg(e,t.target))&&(hg(n)&&(t.preventDefault(),e.focus()),pg(n)&&e.dom.isChildOf(n,e.selection.getNode())&&m())}),e.on("blur NewBlock",function(){m()}),e.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n=function(t,n){var r,o,i=e.dom.getParent(t,e.dom.isBlock),a=e.dom.getParent(n,e.dom.isBlock);return!(!i||!e.dom.isChildOf(i,a)||!1!==hg(bg(e,i)))||i&&(r=i,o=a,!(e.dom.getParent(r,e.dom.isBlock)===e.dom.getParent(o,e.dom.isBlock)))&&function(e){var t=dc(e);if(!e.firstChild)return!1;var n=gs.before(e.firstChild),r=t.next(n);return r&&!vg(r)&&!gg(r)}(i)};!function(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(n){var r=bg(e,n.target);hg(r)&&(t||(n.preventDefault(),d(Zs(e,r))))})}(e),e.on("mousedown",function(t){var o,i=t.target;if((i===r||"HTML"===i.nodeName||e.dom.isChildOf(i,r))&&!1!==oh.isXYInContentArea(e,t.clientX,t.clientY))if(o=bg(e,i))hg(o)?(t.preventDefault(),d(Zs(e,o))):(m(),pg(o)&&t.shiftKey||fg(t.clientX,t.clientY,e.selection.getRng())||(p(),e.selection.placeCaretAt(t.clientX,t.clientY)));else if(!1===Kc(i)){m(),p();var s=lg(r,t.clientX,t.clientY);if(s&&!n(t.target,s.node)){t.preventDefault();var u=c(1,s.node,s.before,!1);e.getBody().focus(),a(u)}}}),e.on("keypress",function(t){mg.modifierPressed(t)||(t.keyCode,hg(e.selection.getNode())&&t.preventDefault())}),e.on("getSelectionRange",function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);(n=n.cloneRange()).selectNode(t),e.range=n}}),e.on("setSelectionRange",function(e){var t;(t=d(e.range,e.forward))&&(e.range=t)}),e.on("AfterSetSelectionRange",function(t){var n,r=t.range;f(r)||"mcepastebin"===r.startContainer.parentNode.id||p(),n=r.startContainer.parentNode,e.dom.hasClass(n,"mce-offscreen-selection")||m()}),e.on("copy",function(t){var n,r=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!Ne.ie){var o=(n=e.dom.get(i))?n.getElementsByTagName("*")[0]:n;o&&(t.preventDefault(),r.clearData(),r.setData("text/html",o.outerHTML),r.setData("text/plain",o.outerText))}}),Xh(e),dg(e)}(),(n=e.contentStyles).push(o.getCss()),n.push(".mce-content-body .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}.mce-content-body *[contentEditable=false] {cursor: default;}.mce-content-body *[contentEditable=true] {cursor: text;}")),{showCaret:c,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Sa(t),a(s()),e.selection.scrollIntoView(t[0]))},hideFakeCaret:p,destroy:function(){o.destroy(),t=null}}},xg=function(e){return 0===e.indexOf("data-")||0===e.indexOf("aria-")},wg=function(e){return e.replace(/<!--|-->/g,"")},Cg=function(e,t){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?!1===e.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t))},kg=function(e,t,n){var r,o,i,a,s=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])s--;else if(!o[1]){if(o[2]in a)continue;s++}if(0===s)break}return r};function Tg(e,t){void 0===t&&(t=Xo());var n=function(){};!1!==(e=e||{}).fix_self_closing&&(e.fix_self_closing=!0);var r=e.comment?e.comment:n,o=e.cdata?e.cdata:n,i=e.text?e.text:n,a=e.start?e.start:n,s=e.end?e.end:n,c=e.pi?e.pi:n,u=e.doctype?e.doctype:n;return{parse:function(n){var l,f,d,m,p,h,g,v,b,y,x,w,C,k,T,_,E,S,N,R,A,D,O,P,I,B,M,L,F,H=0,z=[],U=0,$=Ho.decode,j=Yt.makeMap("src,href,data,background,formaction,poster,xlink:href"),W=/((java|vb)script|mhtml):/i,q=function(e){var t,n;for(t=z.length;t--&&z[t].name!==e;);if(t>=0){for(n=z.length-1;n>=t;n--)(e=z[n]).valid&&s(e.name);z.length=t}},V=function(t,n,r,o,i){var a,s;if(r=(n=n.toLowerCase())in x?n:$(r||o||i||""),C&&!v&&!1===xg(n)){if(!(a=S[n])&&N){for(s=N.length;s--&&!(a=N[s]).pattern.test(n););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(j[n]&&!e.allow_script_urls){var c=r.replace(/[\s\u0000-\u001F]+/g,"");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}if(W.test(c))return;if(Cg(e,c))return}v&&(n in j||0===n.indexOf("on"))||(m.map[n]=r,m.push({name:n,value:r}))};for(I=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),B=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,y=t.getShortEndedElements(),P=e.self_closing_elements||t.getSelfClosingElements(),x=t.getBoolAttrs(),C=e.validate,b=e.remove_internals,F=e.fix_self_closing,M=t.getSpecialElements(),O=n+">";l=I.exec(O);){if(H<l.index&&i($(n.substr(H,l.index-H))),f=l[6])":"===(f=f.toLowerCase()).charAt(0)&&(f=f.substr(1)),q(f);else if(f=l[7]){if(l.index+l[0].length>n.length){i($(n.substr(l.index))),H=l.index+l[0].length;continue}if(":"===(f=f.toLowerCase()).charAt(0)&&(f=f.substr(1)),w=f in y,F&&P[f]&&z.length>0&&z[z.length-1].name===f&&q(f),!C||(k=t.getElementRule(f))){if(T=!0,C&&(S=k.attributes,N=k.attributePatterns),(E=l[8])?((v=-1!==E.indexOf("data-mce-type"))&&b&&(T=!1),(m=[]).map={},E.replace(B,V)):(m=[]).map={},C&&!v){if(R=k.attributesRequired,A=k.attributesDefault,D=k.attributesForced,k.removeEmptyAttrs&&!m.length&&(T=!1),D)for(p=D.length;p--;)g=(_=D[p]).name,"{$uid}"===(L=_.value)&&(L="mce_"+U++),m.map[g]=L,m.push({name:g,value:L});if(A)for(p=A.length;p--;)(g=(_=A[p]).name)in m.map||("{$uid}"===(L=_.value)&&(L="mce_"+U++),m.map[g]=L,m.push({name:g,value:L}));if(R){for(p=R.length;p--&&!(R[p]in m.map););-1===p&&(T=!1)}if(_=m.map["data-mce-bogus"]){if("all"===_){H=kg(t,n,I.lastIndex),I.lastIndex=H;continue}T=!1}}T&&a(f,m,w)}else T=!1;if(d=M[f]){d.lastIndex=H=l.index+l[0].length,(l=d.exec(n))?(T&&(h=n.substr(H,l.index-H)),H=l.index+l[0].length):(h=n.substr(H),H=n.length),T&&(h.length>0&&i(h,!0),s(f)),I.lastIndex=H;continue}w||(E&&E.indexOf("/")===E.length-1?T&&s(f):z.push({name:f,valid:T}))}else(f=l[1])?(">"===f.charAt(0)&&(f=" "+f),e.allow_conditional_comments||"[if"!==f.substr(0,3).toLowerCase()||(f=" "+f),r(f)):(f=l[2])?o(wg(f)):(f=l[3])?u(f):(f=l[4])&&c(f,l[5]);H=l.index+l[0].length}for(H<n.length&&i($(n.substr(H))),p=z.length-1;p>=0;p--)(f=z[p]).valid&&s(f.name)}}}!function(e){e.findEndTag=kg}(Tg||(Tg={}));var _g=Tg,Eg=function(e,t){var n,r,o,i,a,s=t,c=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,u=e.schema;for(s=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")}(e.getTempAttrs(),s),a=u.getShortEndedElements();i=c.exec(s);)r=c.lastIndex,o=i[0].length,n=a[i[1]]?r:_g.findEndTag(u,s,r),s=s.substring(0,r-o)+s.substring(n),c.lastIndex=r-o;return ha(s)},Sg={trimExternal:Eg,trimInternal:Eg},Ng=0,Rg=2,Ag=1,Dg=function(e,t){var n=e.length+t.length+2,r=new Array(n),o=new Array(n),i=function(n,r,o,a,c){var u=s(n,r,o,a);if(null===u||u.start===r&&u.diag===r-a||u.end===n&&u.diag===n-o)for(var l=n,f=o;l<r||f<a;)l<r&&f<a&&e[l]===t[f]?(c.push([0,e[l]]),++l,++f):r-n>a-o?(c.push([2,e[l]]),++l):(c.push([1,t[f]]),++f);else{i(n,u.start,o,u.start-u.diag,c);for(var d=u.start;d<u.end;++d)c.push([0,e[d]]);i(u.end,r,u.end-u.diag,a,c)}},a=function(n,r,o,i){for(var a=n;a-r<i&&a<o&&e[a]===t[a-r];)++a;return function(e,t,n){return{start:e,end:t,diag:n}}(n,a,r)},s=function(n,i,s,c){var u=i-n,l=c-s;if(0===u||0===l)return null;var f,d,m,p,h,g=u-l,v=l+u,b=(v%2==0?v:v+1)/2;for(r[1+b]=n,o[1+b]=i+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){for(m=d+b,d===-f||d!==f&&r[m-1]<r[m+1]?r[m]=r[m+1]:r[m]=r[m-1]+1,h=(p=r[m])-n+s-d;p<i&&h<c&&e[p]===t[h];)r[m]=++p,++h;if(g%2!=0&&g-f<=d&&d<=g+f&&o[m-g]<=r[m])return a(o[m-g],d+n-s,i,c)}for(d=g-f;d<=g+f;d+=2){for(m=d+b-g,d===g-f||d!==g+f&&o[m+1]<=o[m-1]?o[m]=o[m+1]-1:o[m]=o[m-1],h=(p=o[m]-1)-n+s-d;p>=n&&h>=s&&e[p]===t[h];)o[m]=p--,h--;if(g%2==0&&-f<=d&&d<=f&&o[m]<=r[m+g])return a(o[m],d+n-s,i,c)}}},c=[];return i(0,e.length,0,t.length,c),c},Og=function(e){return _o.isElement(e)?e.outerHTML:_o.isText(e)?Ho.encodeRaw(e.data,!1):_o.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},Pg=function(e,t,n){var r=function(e){var t,n,r;for(r=document.createElement("div"),t=document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},Ig=function(e){return jt.filter(jt.map(e.childNodes,Og),function(e){return e.length>0})},Bg=function(e,t){var n=jt.map(t.childNodes,Og);return function(e,t){var n=0;jt.each(e,function(e){e[0]===Ng?n++:e[0]===Ag?(Pg(t,e[1],n),n++):e[0]===Rg&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(t,n)})}(Dg(n,e),t),t},Mg=function(e,t){var n=(t||document).createElement("div");return n.innerHTML=e,Hr.children(Gn.fromDom(n))},Lg=function(e){return e.dom().innerHTML},Fg=Lg,Hg=function(e,t){var n=Hr.owner(e).dom(),r=Gn.fromDom(n.createDocumentFragment()),o=Mg(t,n);xi(r,o),Ci.empty(e),bi.append(e,r)},zg=Ti(S.none()),Ug=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},$g=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},jg=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},Wg=function(e){var t=Gn.fromTag("body",zg.get().getOrThunk(function(){var e=document.implementation.createHTMLDocument("undo");return zg.set(S.some(e)),e}));return Hg(t,jg(e)),z(Hi(t,"*[data-mce-bogus]"),Ci.unwrap),Fg(t)},qg={createFragmentedLevel:Ug,createCompleteLevel:$g,createFromEditor:function(e){var t,n,r;return t=Ig(e.getBody()),-1!==(n=(r=Y(t,function(t){var n=Sg.trimInternal(e.serializer,t);return n.length>0?[n]:[]})).join("")).indexOf("</iframe>")?Ug(r):$g(n)},applyToEditor:function(e,t,n){"fragmented"===t.type?Bg(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},isEq:function(e,t){return!(!e||!t)&&(!!function(e,t){return jg(e)===jg(t)}(e,t)||function(e,t){return Wg(e)===Wg(t)}(e,t))}};function Vg(e){var t,n,r=this,o=0,i=[],a=0,s=function(){return 0===a},c=function(e){s()&&(r.typing=e)},u=function(t){e.setDirty(t)},l=function(e){c(!1),r.add({},e)},f=function(){r.typing&&(c(!1),r.add())};return e.on("init",function(){r.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(f(),r.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&l(e)}),e.on("ObjectResizeStart Cut",function(){r.beforeChange()}),e.on("SaveContent ObjectResized blur",l),e.on("DragEnd",l),e.on("KeyUp",function(t){var o=t.keyCode;t.isDefaultPrevented()||((o>=33&&o<=36||o>=37&&o<=40||45===o||t.ctrlKey)&&(l(),e.nodeChanged()),46!==o&&8!==o||e.nodeChanged(),n&&r.typing&&!1===qg.isEq(qg.createFromEditor(e),i[0])&&(!1===e.isDirty()&&(u(!0),e.fire("change",{level:i[0],lastLevel:null})),e.fire("TypingUndo"),n=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(t>=33&&t<=36||t>=37&&t<=40||45===t)r.typing&&l(e);else{var o=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||t>20)||224===t||91===t||r.typing||o||(r.beforeChange(),c(!0),r.add({},e),n=!0)}}),e.on("MouseDown",function(e){r.typing&&l(e)}),e.on("input",function(e){e.inputType&&("insertReplacementText"===e.inputType||function(e){return"insertText"===e.inputType&&null===e.data}(e))&&l(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),r={data:i,typing:!1,beforeChange:function(){s()&&(t=Ms.getUndoBookmark(e.selection))},add:function(n,r){var a,c,l,f=e.settings;if(l=qg.createFromEditor(e),n=n||{},n=Yt.extend(n,l),!1===s()||e.removed)return null;if(c=i[o],e.fire("BeforeAddUndo",{level:n,lastLevel:c,originalEvent:r}).isDefaultPrevented())return null;if(c&&qg.isEq(c,n))return null;if(i[o]&&(i[o].beforeBookmark=t),f.custom_undo_redo_levels&&i.length>f.custom_undo_redo_levels){for(a=0;a<i.length-1;a++)i[a]=i[a+1];i.length--,o=i.length}n.bookmark=Ms.getUndoBookmark(e.selection),o<i.length-1&&(i.length=o+1),i.push(n),o=i.length-1;var d={level:n,lastLevel:c,originalEvent:r};return e.fire("AddUndo",d),o>0&&(u(!0),e.fire("change",d)),n},undo:function(){var t;return r.typing&&(r.add(),r.typing=!1,c(!1)),o>0&&(t=i[--o],qg.applyToEditor(e,t,!0),u(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return o<i.length-1&&(t=i[++o],qg.applyToEditor(e,t,!1),u(!0),e.fire("redo",{level:t})),t},clear:function(){i=[],o=0,r.typing=!1,r.data=i,e.fire("ClearUndos")},hasUndo:function(){return o>0||r.typing&&i[0]&&!qg.isEq(qg.createFromEditor(e),i[0])},hasRedo:function(){return o<i.length-1&&!r.typing},transact:function(e){return f(),r.beforeChange(),r.ignore(e),r.add()},ignore:function(e){try{a++,e()}finally{a--}},extra:function(t,n){var a,s;r.transact(t)&&(s=i[o].bookmark,a=i[o-1],qg.applyToEditor(e,a,!0),r.transact(n)&&(i[o-1].beforeBookmark=s))}}}var Gg=$u.isEq,Yg=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},Kg=function(e,t,n,r){var o=e.dom.getRoot();return t!==o&&(t=e.dom.getParent(t,function(t){return!!Yg(e,t,n)||t.parentNode===o||!!Zg(e,t,n,r,!0)}),Zg(e,t,n,r))},Xg=function(e,t,n){return!!Gg(t,n.inline)||!!Gg(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)},Jg=function(e,t,n,r,o,i){var a,s,c,u=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(u)if(void 0===u.length){for(a in u)if(u.hasOwnProperty(a)){if(s="attributes"===r?e.getAttrib(t,a):$u.getStyle(e,t,a),o&&!s&&!n.exact)return;if((!o||n.exact)&&!Gg(s,$u.normalizeStyleValue(e,$u.replaceVars(u[a],i),a)))return}}else for(c=0;c<u.length;c++)if("attributes"===r?e.getAttrib(t,u[c]):$u.getStyle(e,t,u[c]))return n;return n},Zg=function(e,t,n,r,o){var i,a,s,c,u=e.formatter.get(n),l=e.dom;if(u&&t)for(a=0;a<u.length;a++)if(i=u[a],Xg(e.dom,t,i)&&Jg(l,t,i,"attributes",o,r)&&Jg(l,t,i,"styles",o,r)){if(c=i.classes)for(s=0;s<c.length;s++)if(!e.dom.hasClass(t,c[s]))return;return i}},Qg={matchNode:Zg,matchName:Xg,match:function(e,t,n,r){var o;return r?Kg(e,r,t,n):(r=e.selection.getNode(),!!Kg(e,r,t,n)||!((o=e.selection.getStart())===r||!Kg(e,o,t,n)))},matchAll:function(e,t,n){var r,o=[],i={};return r=e.selection.getStart(),e.dom.getParent(r,function(r){var a,s;for(a=0;a<t.length;a++)s=t[a],!i[s]&&Zg(e,r,s,n)&&(i[s]=!0,o.push(s))},e.dom.getRoot()),o},canApply:function(e,t){var n,r,o,i,a,s=e.formatter.get(t),c=e.dom;if(s)for(n=e.selection.getStart(),r=$u.getParents(c,n),i=s.length-1;i>=0;i--){if(!(a=s[i].selector)||s[i].defaultBlock)return!0;for(o=r.length-1;o>=0;o--)if(c.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:Yg},ev=function(e,t){return e.splitText(t)},tv={split:function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&_o.isText(t)?n>0&&n<t.nodeValue.length&&(t=(r=ev(t,n)).previousSibling,o>n?(t=r=ev(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(_o.isText(t)&&n>0&&n<t.nodeValue.length&&(t=ev(t,n),n=0),_o.isText(r)&&o>0&&o<r.nodeValue.length&&(o=(r=ev(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}}},nv=pa,rv=function(e){return function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==nv||e.childNodes.length>1)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length>0},ov=function(e){var t;if(e)for(e=(t=new Zr(e,e)).current();e;e=t.next())if(3===e.nodeType)return e;return null},iv=function(e){var t=Gn.fromTag("span");return lr.setAll(t,{id:"_mce_caret","data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&bi.append(t,Gn.fromText(nv)),t},av=function(e,t,n,r){var o,i,a;o=t.getRng(!0),i=e.getParent(n,e.isBlock),rv(n)?(!1!==r&&(o.setStartBefore(n),o.setEndBefore(n)),e.remove(n)):(a=function(e){var t=ov(e);return t&&t.nodeValue.charAt(0)===nv&&t.deleteData(0,1),t}(n),o.startContainer===a&&o.startOffset>0&&o.setStart(a,o.startOffset-1),o.endContainer===a&&o.endOffset>0&&o.setEnd(a,o.endOffset-1),e.remove(n,!0)),i&&e.isEmpty(i)&&Cl(Gn.fromDom(i)),t.setRng(o)},sv=function(e,t,n,r,o){if(r)av(t,n,r,o);else if(!(r=Fs(e,n.getStart())))for(;r=t.get("_mce_caret");)av(t,n,r,!1)},cv=function(e,t,n){var r=e.dom,o=r.getParent(n,da.curry($u.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(wl(Gn.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},uv=function(e,t){return e.appendChild(t),t},lv=function(e,t){var n,r,o=(n=function(e,t){return uv(e,t.cloneNode(!1))},r=t,function(e,t){for(var n=e.length-1;n>=0;n--)t(e[n],n,e)}(e,function(e){r=n(r,e)}),r);return uv(o,o.ownerDocument.createTextNode(nv))},fv=function(e){var t=e.dom,n=e.selection,r=e.getBody();e.on("mouseup keydown",function(e){!function(e,t,n,r){sv(e,t,n,null,!1),8===r&&n.isCollapsed()&&n.getStart().innerHTML===nv&&sv(e,t,n,Fs(e,n.getStart())),37!==r&&39!==r||sv(e,t,n,Fs(e,n.getStart()))}(r,t,n,e.keyCode)})},dv=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(tr.name(t))&&!Ls(t.dom())&&!_o.isBogus(t.dom())},mv={},pv=jt.filter,hv=jt.each;!function(e,t){var n=mv[e];n||(mv[e]=n=[]),mv[e].push(t)}("pre",function(e){var t,n,r=e.selection.getRng();t=_o.matchNodeNames("pre"),r.collapsed||(n=e.selection.getSelectedBlocks(),hv(pv(pv(n,t),function(e){return t(e.previousSibling)&&-1!==jt.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,pn(n=e).remove(),pn(t).append("<br><br>").append(n.childNodes)}))});var gv=function(e,t){hv(mv[e],function(e){e(t)})},vv=/^(src|href|style)$/,bv=Yt.each,yv=$u.isEq,xv=function(e){return/^(TH|TD)$/.test(e.nodeName)},wv=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],_o.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[o>i?i:o]),_o.isText(r)&&n&&o>=r.nodeValue.length&&(r=new Zr(r,e.getBody()).next()||r),_o.isText(r)&&!n&&0===o&&(r=new Zr(r,e.getBody()).prev()||r),r},Cv=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},kv=function(e,t,n,r){return!(t=$u.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Tv=function(e,t,n,r,o){var i,a,s,c=e.dom;if(!function(e,t,n){return!!yv(t,n.inline)||!!yv(t,n.block)||(n.selector?_o.isElement(t)&&e.is(t,n.selector):void 0)}(c,r,t)&&!function(e,t){return t.links&&"A"===e.tagName}(r,t))return!1;if("all"!==t.remove)for(bv(t.styles,function(e,i){e=$u.normalizeStyleValue(c,$u.replaceVars(e,n),i),"number"==typeof i&&(i=e,o=0),(t.remove_similar||!o||yv($u.getStyle(c,o,i),e))&&c.setStyle(r,i,""),s=1}),s&&""===c.getAttrib(r,"style")&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style")),bv(t.attributes,function(e,t){var i;if(e=$u.replaceVars(e,n),"number"==typeof t&&(t=e,o=0),!o||yv(c.getAttrib(o,t),e)){if("class"===t&&(e=c.getAttrib(r,t))&&(i="",bv(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)}),i))return void c.setAttrib(r,t,i);"class"===t&&r.removeAttribute("className"),vv.test(t)&&r.removeAttribute("data-mce-"+t),r.removeAttribute(t)}}),bv(t.classes,function(e){e=$u.replaceVars(e,n),o&&!c.hasClass(o,e)||c.removeClass(r,e)}),a=c.getAttribs(r),i=0;i<a.length;i++){var u=a[i].nodeName;if(0!==u.indexOf("_")&&0!==u.indexOf("data-"))return!1}return"none"!==t.remove?(function(e,t,n){var r,o=t.parentNode,i=e.dom,a=e.settings.forced_root_block;n.block&&(a?o===i.getRoot()&&(n.list_block&&yv(t,n.list_block)||bv(Yt.grep(t.childNodes),function(t){$u.isValid(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Cv(i,t,a),i.setAttribs(r,e.settings.forced_root_block_attrs)):r=0})):i.isBlock(t)&&!i.isBlock(o)&&(kv(i,t,!1)||kv(i,t.firstChild,!0,1)||t.insertBefore(i.create("br"),t.firstChild),kv(i,t,!0)||kv(i,t.lastChild,!1,1)||t.appendChild(i.create("br")))),n.selector&&n.inline&&!yv(n.inline,t)||i.remove(t,1)}(e,r,t),!0):void 0},_v={removeFormat:Tv,remove:function(e,t,n,r,o){var i,a,s=e.formatter.get(t),c=s[0],u=!0,l=e.dom,f=e.selection,d=function(r){var i=function(e,t,n,r,o){var i;return bv($u.getParents(e.dom,t.parentNode).reverse(),function(t){var a;i||"_start"===t.id||"_end"===t.id||(a=Qg.matchNode(e,t,n,r,o))&&!1!==a.split&&(i=t)}),i}(e,r,t,n,o);return function(e,t,n,r,o,i,a,s){var c,u,l,f,d,m,p=e.dom;if(n){for(m=n.parentNode,c=r.parentNode;c&&c!==m;c=c.parentNode){for(u=p.clone(c,!1),d=0;d<t.length;d++)if(Tv(e,t[d],s,u,u)){u=0;break}u&&(l&&u.appendChild(l),f||(f=u),l=u)}!i||a.mixed&&p.isBlock(n)||(r=p.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(e,s,i,r,r,!0,c,n)},m=function(t){var r,o,i,a,f;if(_o.isElement(t)&&l.getContentEditable(t)&&(a=u,u="true"===l.getContentEditable(t),f=!0),r=Yt.grep(t.childNodes),u&&!f)for(o=0,i=s.length;o<i&&!Tv(e,s[o],n,t,t);o++);if(c.deep&&r.length){for(o=0,i=r.length;o<i;o++)m(r[o]);f&&(u=a)}},p=function(e){var t=l.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return Fu.isBookmarkNode(n)&&(n=n[e?"firstChild":"lastChild"]),_o.isText(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),l.remove(t,!0),n},h=function(t){var n,r,o=t.commonAncestorContainer;if(t=el(e,t,s,!0),c.split){if(t=tv.split(t),(n=wv(e,t,!0))!==(r=wv(e,t))){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)&&xv(r)&&r.firstChild&&(r=r.firstChild||r),l.isChildOf(n,r)&&n!==r&&!l.isBlock(r)&&!xv(n)&&!xv(r)){var i=function(e,t,n,r,o){var i=(r?"next":"previous")+"Sibling",a=e.create(n,o);t.parentNode.insertBefore(a,t);for(var s=[t],c=t;c=c[i];)s.push(c);return s.forEach(function(e){return a.appendChild(e)}),a}(l,n,"span",!0,{id:"_start","data-mce-type":"bookmark"});return d(i),void(n=p(!0))}n=Cv(l,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Cv(l,r,"span",{id:"_end","data-mce-type":"bookmark"}),d(n),d(r),n=p(!0),r=p()}else n=r=d(n);t.startContainer=n.parentNode?n.parentNode:n,t.startOffset=l.nodeIndex(n),t.endContainer=r.parentNode?r.parentNode:r,t.endOffset=l.nodeIndex(r)+1}nl.walk(l,t,function(t){bv(t,function(t){m(t),_o.isElement(t)&&"underline"===e.dom.getStyle(t,"text-decoration")&&t.parentNode&&"underline"===$u.getTextDecoration(l,t.parentNode)&&Tv(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,t)})})};if(r)r.nodeType?((a=l.createRng()).setStartBefore(r),a.setEndAfter(r),h(a)):h(r);else if("false"!==l.getContentEditable(f.getNode()))f.isCollapsed()&&c.inline&&!l.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,s,c,u,l,f=e.dom,d=e.selection,m=[],p=d.getRng();for(o=p.startContainer,i=p.startOffset,c=o,3===o.nodeType&&(i!==o.nodeValue.length&&(s=!0),c=c.parentNode);c;){if(Qg.matchNode(e,c,t,n,r)){u=c;break}c.nextSibling&&(s=!0),m.push(c),c=c.parentNode}if(u)if(s){a=d.getBookmark(),p.collapse(!0);var h=el(e,p,e.formatter.get(t),!0);h=tv.split(h),e.formatter.remove(t,n,h),d.moveToBookmark(a)}else{l=Fs(e.getBody(),u);var g=iv(!1).dom(),v=lv(m,g);cv(e,g,l||u),av(f,d,l,!1),d.setCursorLocation(v,1),f.isEmpty(u)&&f.remove(u)}}(e,t,n,o):(i=Ms.getPersistentBookmark(e.selection,!0),h(f.getRng()),f.moveToBookmark(i),c.inline&&Qg.match(e,t,n,f.getStart())&&$u.moveStart(l,f,f.getRng()),e.nodeChanged());else{r=f.getNode();for(var g=0,v=s.length;g<v&&(!s[g].ceFalseOverride||!Tv(e,s[g],n,r,r));g++);}}},Ev=Yt.each,Sv=function(e){return e&&1===e.nodeType&&!Fu.isBookmarkNode(e)&&!Ls(e)&&!_o.isBogus(e)},Nv=function(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!Fu.isBookmarkNode(n))return n}return e},Rv=function(e,t,n){var r,o,i=new xl(e);if(t&&n&&(t=Nv(t,"previousSibling"),n=Nv(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)o=r,r=r.nextSibling,t.appendChild(o);return e.remove(n),Yt.each(Yt.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Av=function(e,t,n){Ev(e.childNodes,function(e){Sv(e)&&(t(e)&&n(e),e.hasChildNodes()&&Av(e,t,n))})},Dv=function(e,t){return y(function(t,n){return!(!n||!$u.getStyle(e,n,t))},t)},Ov=function(e,t,n){return y(function(t,n,r){e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Pv(e,r)},t,n)},Pv=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Iv=function(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=$u.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))},Bv=function(e,t,n,r){Ev(t,function(t){Ev(e.dom.select(t.inline,r),function(r){Sv(r)&&_v.removeFormat(e,t,n,r,t.exact?r:null)}),function(e,t,n){if(t.clear_child_styles){var r=t.links?"*:not(a)":"*";Ev(e.select(r,n),function(n){Sv(n)&&Ev(t.styles,function(t,r){e.setStyle(n,r,"")})})}}(e.dom,t,r)})},Mv=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Yt.walk(r,y(Iv,e),"childNodes"),Iv(e,r))},Lv=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Av(r,Dv(e,"fontSize"),Ov(e,"backgroundColor",$u.replaceVars(t.styles.backgroundColor,n)))},Fv=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(Av(r,Dv(e,"fontSize"),Ov(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Hv=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=Rv(e,$u.getNonWhiteSpaceSibling(r),r),r=Rv(e,r,$u.getNonWhiteSpaceSibling(r,!0)))},zv=function(e,t,n,r,o){Qg.matchNode(e,o.parentNode,n,r)&&_v.removeFormat(e,t,r,o)||t.merge_with_parents&&e.dom.getParent(o.parentNode,function(i){if(Qg.matchNode(e,i,n,r))return _v.removeFormat(e,t,r,o),!0})},Uv=Yt.each,$v=function(e,t,n,r){var o,i,a=e.formatter.get(t),s=a[0],c=!r&&e.selection.isCollapsed(),u=e.dom,l=e.selection,f=function(e,t){if(t=t||s,e){if(t.onformat&&t.onformat(e,t,n,r),Uv(t.styles,function(t,r){u.setStyle(e,r,$u.replaceVars(t,n))}),t.styles){var o=u.getAttrib(e,"style");o&&e.setAttribute("data-mce-style",o)}Uv(t.attributes,function(t,r){u.setAttrib(e,r,$u.replaceVars(t,n))}),Uv(t.classes,function(t){t=$u.replaceVars(t,n),u.hasClass(e,t)||u.addClass(e,t)})}},d=function(e,t){var n=!1;return!!s.selector&&(Uv(e,function(e){if(!("collapsed"in e&&e.collapsed!==c))return u.is(t,e.selector)&&!Ls(t)?(f(t,e),n=!0,!1):void 0}),n)},m=function(r,o,i,c){var u,l,m=[],p=!0;u=s.inline||s.block,l=r.create(u),f(l),nl.walk(r,o,function(o){var i,h=function(o){var g,v,b,y;if(y=p,g=o.nodeName.toLowerCase(),v=o.parentNode.nodeName.toLowerCase(),1===o.nodeType&&r.getContentEditable(o)&&(y=p,p="true"===r.getContentEditable(o),b=!0),$u.isEq(g,"br"))return i=0,void(s.block&&r.remove(o));if(s.wrapper&&Qg.matchNode(e,o,t,n))i=0;else{if(p&&!b&&s.block&&!s.wrapper&&$u.isTextBlock(e,g)&&$u.isValid(e,v,u))return o=r.rename(o,u),f(o),m.push(o),void(i=0);if(s.selector){var x=d(a,o);if(!s.inline||x)return void(i=0)}!p||b||!$u.isValid(e,u,g)||!$u.isValid(e,v,u)||!c&&3===o.nodeType&&1===o.nodeValue.length&&65279===o.nodeValue.charCodeAt(0)||Ls(o)||s.inline&&r.isBlock(o)?(i=0,Uv(Yt.grep(o.childNodes),h),b&&(p=y),i=0):(i||(i=r.clone(l,!1),o.parentNode.insertBefore(i,o),m.push(i)),i.appendChild(o))}};Uv(o,h)}),!0===s.links&&Uv(m,function(e){var t=function(e){"A"===e.nodeName&&f(e,s),Uv(Yt.grep(e.childNodes),t)};t(e)}),Uv(m,function(o){var i,c=function(e){var t=!1;return Uv(e.childNodes,function(e){if(function(e){return e&&1===e.nodeType&&!Fu.isBookmarkNode(e)&&!Ls(e)&&!_o.isBogus(e)}(e))return t=e,!1}),t};i=function(e){var t=0;return Uv(e.childNodes,function(e){$u.isWhiteSpaceNode(e)||Fu.isBookmarkNode(e)||t++}),t}(o),!(m.length>1)&&r.isBlock(o)||0!==i?(s.inline||s.wrapper)&&(s.exact||1!==i||(o=function(e){var t,n;return(t=c(e))&&!Fu.isBookmarkNode(t)&&Qg.matchName(r,t,s)&&(n=r.clone(t,!1),f(n),r.replace(n,e,!0),r.remove(t,1)),n||e}(o)),Bv(e,a,n,o),zv(e,s,t,n,o),Lv(r,s,n,o),Fv(r,s,n,o),Hv(r,s,n,o)):r.remove(o,1)})};if("false"!==u.getContentEditable(l.getNode())){if(s){if(r)r.nodeType?d(a,r)||((i=u.createRng()).setStartBefore(r),i.setEndAfter(r),m(u,el(e,i,a),0,!0)):m(u,r,0,!0);else if(c&&s.inline&&!u.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,s,c,u=e.selection;a=(r=u.getRng(!0)).startOffset,c=r.startContainer.nodeValue,(o=Fs(e.getBody(),u.getStart()))&&(i=ov(o));var l,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;c&&a>0&&a<c.length&&d.test(c.charAt(a))&&d.test(c.charAt(a-1))?(s=u.getBookmark(),r.collapse(!0),r=el(e,r,e.formatter.get(t)),r=tv.split(r),e.formatter.apply(t,n,r),u.moveToBookmark(s)):(o&&i.nodeValue===nv?e.formatter.apply(t,n,o):(l=e.getDoc(),f=iv(!0).dom(),i=(o=l.importNode(f,!0)).firstChild,r.insertNode(o),a=1,e.formatter.apply(t,n,o)),u.setCursorLocation(i,a))}(e,t,n);else{var p=e.selection.getNode();e.settings.forced_root_block||!a[0].defaultBlock||u.getParent(p,u.isBlock)||$v(e,a[0].defaultBlock),e.selection.setRng(Nl(e.selection.getRng())),o=Ms.getPersistentBookmark(e.selection,!0),m(u,el(e,l.getRng(),a)),s.styles&&Mv(u,s,n,p),l.moveToBookmark(o),$u.moveStart(u,l,l.getRng()),e.nodeChanged()}gv(t,e)}}else{r=l.getNode();for(var h=0,g=a.length;h<g;h++)if(a[h].ceFalseOverride&&u.is(r,a[h].selector))return void f(r,a[h])}},jv={applyFormat:$v},Wv=Yt.each,qv={formatChanged:function(e,t,n,r,o){null===t.get()&&function(e,t){var n={};e.set({}),t.on("NodeChange",function(r){var o=$u.getParents(t.dom,r.element),i={};o=Yt.grep(o,function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")}),Wv(e.get(),function(e,r){Wv(o,function(a){return t.formatter.matchNode(a,r,{},e.similar)?(n[r]||(Wv(e,function(e){e(!0,{node:a,format:r,parents:o})}),n[r]=e),i[r]=e,!1):!Qg.matchesUnInheritedFormatSelector(t,a,r)&&void 0})}),Wv(n,function(e,t){i[t]||(delete n[t],Wv(e,function(e){e(!1,{node:r.element,format:t,parents:o})}))})})}(t,e),function(e,t,n,r){var o=e.get();Wv(t.split(","),function(e){o[e]||(o[e]=[],o[e].similar=r),o[e].push(n)}),e.set(o)}(t,n,r,o)}},Vv={get:function(e){var t={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:1,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(t,n,r){Yt.each(r,function(n,r){e.setAttrib(t,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 Yt.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t}},Gv=Yt.each,Yv=ci.DOM,Kv=function(e,t){var n,r,o,i=t&&t.schema||Xo({}),a=function(e){var t;return r="string"==typeof e?{name:e,classes:[],attrs:{}}:e,function(e,t){t.classes.length&&Yv.addClass(e,t.classes.join(" ")),Yv.setAttribs(e,t.attrs)}(t=Yv.create(r.name),r),t},s=function(e,t,n){var r,o,c,u=t.length>0&&t[0],l=u&&u.name;if(c=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(t&&-1!==Yt.inArray(o,t)?t:o[0])}(e,l))l===c?(o=t[0],t=t.slice(1)):o=c;else if(u)o=t[0],t=t.slice(1);else if(!n)return e;return o&&(r=a(o)).appendChild(e),n&&(r||(r=Yv.create("div")).appendChild(e),Yt.each(n,function(t){var n=a(t);r.insertBefore(n,e)})),s(r,t,o&&o.siblings)};return e&&e.length?(r=e[0],n=a(r),(o=Yv.create("div")).appendChild(s(n,e.slice(1),r.siblings)),o):""},Xv=function(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=Yt.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==Yt.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=t||"div",n},Jv=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Yt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Yt.map(e.split(/(?:~\+|~|\+)/),Xv),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Zv={getCssText:function(e,t){var n,r,o,i,a,s,c="";if(!1===(s=e.settings.preview_styles))return"";"string"!=typeof s&&(s="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var u=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(s=t.preview)?"":(n=t.block||t.inline||"span",(i=Jv(t.selector)).length?(i[0].name||(i[0].name=n),n=t.selector,r=Kv(i,e)):r=Kv([n],e),o=Yv.select(n,r)[0]||r.firstChild,Gv(t.styles,function(e,t){(e=u(e))&&Yv.setStyle(o,t,e)}),Gv(t.attributes,function(e,t){(e=u(e))&&Yv.setAttrib(o,t,e)}),Gv(t.classes,function(e){e=u(e),Yv.hasClass(o,e)||Yv.addClass(o,e)}),e.fire("PreviewFormats"),Yv.setStyles(r,{position:"absolute",left:-65535}),e.getBody().appendChild(r),a=Yv.getStyle(e.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Gv(s.split(" "),function(t){var n=Yv.getStyle(o,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Yv.getStyle(e.getBody(),t,!0),"#ffffff"===Yv.toHex(n).toLowerCase())||"color"===t&&"#000000"===Yv.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===a)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*a+"px"}"border"===t&&n&&(c+="padding:0 2px;"),c+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),Yv.remove(r),c)},parseSelector:Jv,selectorToHtml:function(e,t){return Kv(Jv(e),t)}},Qv={toggle:function(e,t,n,r,o){var i=t.get(n);!Qg.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?jv.applyFormat(e,n,r,o):_v.remove(e,n,r,o)}},eb={setup:function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}};function tb(e){var t=function(e){var t={},n=function(e,r){e&&("string"!=typeof e?Yt.each(e,function(e,t){n(t,e)}):(r=r.length?r:[r],Yt.each(r,function(e){void 0===e.deep&&(e.deep=!e.selector),void 0===e.split&&(e.split=!e.selector||e.inline),void 0===e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),t[e]=r))};return n(Vv.get(e.dom)),n(e.settings.formats),{get:function(e){return e?t[e]:t},register:n,unregister:function(e){return e&&t[e]&&delete t[e],t}}}(e),n=Ti(null);return eb.setup(e),fv(e),{get:t.get,register:t.register,unregister:t.unregister,apply:y(jv.applyFormat,e),remove:y(_v.remove,e),toggle:y(Qv.toggle,e,t),match:y(Qg.match,e),matchAll:y(Qg.matchAll,e),matchNode:y(Qg.matchNode,e),canApply:y(Qg.canApply,e),formatChanged:y(qv.formatChanged,e,n),getCssText:y(Zv.getCssText,e)}}var nb,rb=Object.prototype.hasOwnProperty,ob=(nb=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)rb.call(o,i)&&(n[i]=nb(n[i],o[i]))}return n}),ib={register:function(e,t,n){e.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),e.addAttributeFilter("src,href,style",function(e,r){for(var o,i,a=e.length,s="data-mce-"+r,c=t.url_converter,u=t.url_converter_scope;a--;)void 0!==(i=(o=e[a]).attributes.map[s])?(o.attr(r,i.length>0?i:null),o.attr(s,null)):(i=o.attributes.map[r],"style"===r?i=n.serializeStyle(n.parseStyle(i),o.name):c&&(i=c.call(u,i,r,o.name)),o.attr(r,i.length>0?i:null))}),e.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),e.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attributes.map["data-mce-type"]||n.cleanup||r.remove()}),e.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=Ho.decode(t.value))}),e.addNodeFilter("script,style",function(e,n){for(var r,o,i,a=e.length,s=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};a--;)o=(r=e[a]).firstChild?r.firstChild.value:"","script"===n?((i=r.attr("type"))&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="// <![CDATA[\n"+s(o)+"\n// ]]>")):"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="\x3c!--\n"+s(o)+"\n--\x3e")}),e.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),e.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),e.addAttributeFilter("data-mce-type",function(t){z(t,function(t){"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())})}),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},trimTrailingBr:function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())}},ab={process:function(e,t,n){return function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events}(e,n)?function(e,t,n){var r,o,i,a=e.dom;return t=t.cloneNode(!0),(r=document.implementation).createHTMLDocument&&(o=r.createHTMLDocument(""),Yt.each("BODY"===t.nodeName?t.childNodes:[t],function(e){o.body.appendChild(o.importNode(e,!0))}),t="BODY"!==t.nodeName?o.body.firstChild:o.body,i=a.doc,a.doc=o),wp(e,ob(n,{node:t})),i&&(a.doc=i),t}(e,t,n):t}},sb=function(e,t,n){e.addNodeFilter("font",function(e){z(e,function(e){var r=t.parse(e.attr("style")),o=e.attr("color"),i=e.attr("face"),a=e.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(r)),function(e,t){z(t,function(t){e.attr(t,null)})}(e,["color","face","size"])})})},cb=function(e,t){var n=Zo();t.convert_fonts_to_spans&&sb(e,n,Yt.explode(t.font_size_legacy_values)),function(e,t){e.addNodeFilter("strike",function(e){z(e,function(e){var n=t.parse(e.attr("style"));n["text-decoration"]="line-through",e.name="span",e.attr("style",t.serialize(n))})})}(e,n)},ub={register:function(e,t){t.inline_styles&&cb(e,t)}},lb=/^[ \t\r\n]*$/,fb={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},db=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},mb=function(){function e(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r,o;if(r=new e(t,fb[t]||1),n)for(o in n)r.attr(o,n[o]);return r},e.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},e.prototype.attr=function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(void 0!==t){if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}return n.map[e]}},e.prototype.clone=function(){var t,n,r,o,i,a=new e(this.name,this.type);if(r=this.attributes){for((i=[]).map={},t=0,n=r.length;t<n;t++)"id"!==(o=r[t]).name&&(i[i.length]={name:o.name,value:o.value},i.map[o.name]=o.value);a.attributes=i}return a.value=this.value,a.shortEnded=this.shortEnded,a},e.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},e.prototype.unwrap=function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},e.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t,t&&(t.prev=null)):n.next=t,e.lastChild===this?(e.lastChild=n,n&&(n.next=null)):t.prev=n,this.parent=this.next=this.prev=null),this},e.prototype.append=function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?(t.next=e,e.prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},e.prototype.insert=function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},e.prototype.getAll=function(e){var t,n=[];for(t=this.firstChild;t;t=db(t,this))t.name===e&&n.push(t);return n},e.prototype.empty=function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=db(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},e.prototype.isEmpty=function(e,t,n){var r,o,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(e[i.name])return!1;for(r=i.attributes.length;r--;)if("name"===(o=i.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!lb.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&lb.test(i.value))return!1;if(n&&n(i))return!1}while(i=db(i,this));return!0},e.prototype.walk=function(e){return db(this,null,e)},e}(),pb=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new mb("br",1)).shortEnded=!0:r.empty().append(new mb("#text",3)).value=""},hb=function(e){return gb(e,"#text")&&""===e.firstChild.value},gb=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},vb=function(e,t,n,r){return r.isEmpty(t,n,function(t){return function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty}(e,t)})},bb=function(e,t){return e&&(t[e.name]||"br"===e.name)},yb=function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(e,r,o){var i,a,s,c,u,l,f,d,m=e.length,p=Yt.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),g=n.getNonEmptyElements();for(p.body=1,i=0;i<m;i++)if(s=(a=e[i]).parent,p[a.parent.name]&&a===s.lastChild){for(u=a.prev;u;){if("span"!==(l=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==l)break;if("br"===l){a=null;break}}u=u.prev}a&&(a.remove(),vb(n,h,g,s)&&(f=n.getElementRule(s.name))&&(f.removeEmpty?s.remove():f.paddEmpty&&pb(t,o,p,s)))}else{for(c=a;s&&s.firstChild===c&&s.lastChild===c&&(c=s,!p[s.name]);)s=s.parent;c===s&&!0!==t.padd_empty_with_br&&((d=new mb("#text",3)).value="",a.replace(d))}}),e.addAttributeFilter("href",function(e){var n,r,o,i=e.length;if(!t.allow_unsafe_link_target)for(;i--;)"a"===(n=e[i]).name&&"_blank"===n.attr("target")&&n.attr("rel",(r=n.attr("rel"),o=r?Yt.trim(r):"",/\b(noopener)\b/g.test(o)?o:function(e){return e.split(" ").filter(function(e){return e.length>0}).concat(["noopener"]).sort().join(" ")}(o)))}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href")){r=o.parent,t=o.lastChild;do{n=t.prev,r.insert(t,o),t=n}while(t)}}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new mb("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,r,o,i,a,s,c,u=e.length,l=n.getValidClasses();u--;){for(r=(t=e[u]).attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,(s=l["*"])&&s[i]&&(c=!0),s=l[t.name],!c&&s&&s[i]&&(c=!0),c&&(a&&(a+=" "),a+=i);a.length||(a=null),t.attr("class",a)}})},xb=Yt.makeMap,wb=Yt.each,Cb=Yt.explode,kb=Yt.extend;function Tb(e,t){void 0===t&&(t=Xo());var n={},r=[],o={},i={};(e=e||{}).validate=!("validate"in e)||e.validate,e.root_name=e.root_name||"body";var a=function(e){var t,a,s;a in n&&((s=o[a])?s.push(e):o[a]=[e]),t=r.length;for(;t--;)(a=r[t].name)in e.attributes.map&&((s=i[a])?s.push(e):i[a]=[e]);return e},s={schema:t,addAttributeFilter:function(e,t){wb(Cb(e),function(e){var n;for(n=0;n<r.length;n++)if(r[n].name===e)return void r[n].callbacks.push(t);r.push({name:e,callbacks:[t]})})},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(e,t){wb(Cb(e),function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)})},getNodeFilters:function(){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push({name:t,callbacks:n[t]});return e},filterNode:a,parse:function(s,c){var u,l,f,d,m,p,h,g,v,b,y,x=[];c=c||{},o={},i={},v=kb(xb("script,style,head,html,body,title,meta,param"),t.getBlockElements());var w=t.getNonEmptyElements(),C=t.children,k=e.validate,T="forced_root_block"in c?c.forced_root_block:e.forced_root_block,_=t.getWhiteSpaceElements(),E=/^[ \t\r\n]+/,S=/[ \t\r\n]+$/,N=/[ \t\r\n]+/g,R=/^[ \t\r\n]+$/;b=_.hasOwnProperty(c.context)||_.hasOwnProperty(e.root_name);var A=function(e,t){var r,i=new mb(e,t);return e in n&&((r=o[e])?r.push(i):o[e]=[i]),i},D=function(e){var n,r,o,i,a=t.getBlockElements();for(n=e.prev;n&&3===n.type;){if((o=n.value.replace(S,"")).length>0)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}};u=_g({validate:k,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(t.getSelfClosingElements()),cdata:function(e){y.append(A("#cdata",4)).value=e},text:function(e,t){var n;b||(e=e.replace(N," "),bb(y.lastChild,v)&&(e=e.replace(E,""))),0!==e.length&&((n=A("#text",3)).raw=!!t,y.append(n).value=e)},comment:function(e){y.append(A("#comment",8)).value=e},pi:function(e,t){y.append(A(e,7)).value=t,D(y)},doctype:function(e){y.append(A("#doctype",10)).value=e,D(y)},start:function(e,n,o){var a,s,c,u,l;if(c=k?t.getElementRule(e):{}){for((a=A(c.outputName||e,1)).attributes=n,a.shortEnded=o,y.append(a),(l=C[y.name])&&C[a.name]&&!l[a.name]&&x.push(a),s=r.length;s--;)(u=r[s].name)in n.map&&((h=i[u])?h.push(a):i[u]=[a]);v[e]&&D(a),o||(y=a),!b&&_[e]&&(b=!0)}},end:function(n){var r,o,i,a,s;if(o=k?t.getElementRule(n):{}){if(v[n]&&!b){if((r=y.firstChild)&&3===r.type)if((i=r.value.replace(E,"")).length>0)r.value=i,r=r.next;else for(a=r.next,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.next,(0===i.length||R.test(i))&&(r.remove(),r=a),r=a;if((r=y.lastChild)&&3===r.type)if((i=r.value.replace(S,"")).length>0)r.value=i,r=r.prev;else for(a=r.prev,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.prev,(0===i.length||R.test(i))&&(r.remove(),r=a),r=a}if(b&&_[n]&&(b=!1),o.removeEmpty&&vb(t,w,_,y)&&!y.attributes.map.name&&!y.attr("id"))return s=y.parent,v[y.name]?y.empty().remove():y.unwrap(),void(y=s);o.paddEmpty&&(hb(y)||vb(t,w,_,y))&&pb(e,c,v,y),y=y.parent}}},t);var O=y=new mb(c.context||e.root_name,11);if(u.parse(s),k&&x.length&&(c.context?c.invalid=!0:function(e){var n,r,o,i,s,c,u,l,f,d,m,p,h,g,v,b;for(p=xb("tr,td,th,tbody,thead,tfoot,table"),d=t.getNonEmptyElements(),m=t.getWhiteSpaceElements(),h=t.getTextBlockElements(),g=t.getSpecialElements(),n=0;n<e.length;n++)if((r=e[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&&!t.isValidChild(o.name,r.name)&&!p[o.name];o=o.parent)i.push(o);if(o&&i.length>1){for(i.reverse(),s=c=a(i[0].clone()),f=0;f<i.length-1;f++){for(t.isValidChild(c.name,i[f].name)?(u=a(i[f].clone()),c.append(u)):u=c,l=i[f].firstChild;l&&l!==i[f+1];)b=l.next,u.append(l),l=b;c=u}vb(t,d,m,s)?o.insert(r,i[0],!0):(o.insert(s,i[0],!0),o.insert(r,s)),o=i[0],(vb(t,d,m,o)||gb(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 mb("ul",1)));continue}t.isValidChild(r.parent.name,"div")&&t.isValidChild("div",r.name)?r.wrap(a(new mb("div",1))):g[r.name]?r.empty().remove():r.unwrap()}}}(x)),T&&("body"===O.name||c.isRootContent)&&function(){var n,r,o=O.firstChild,i=function(e){e&&((o=e.firstChild)&&3===o.type&&(o.value=o.value.replace(E,"")),(o=e.lastChild)&&3===o.type&&(o.value=o.value.replace(S,"")))};if(t.isValidChild(O.name,T.toLowerCase())){for(;o;)n=o.next,3===o.type||1===o.type&&"p"!==o.name&&!v[o.name]&&!o.attr("data-mce-type")?r?r.append(o):((r=A(T,1)).attr(e.forced_root_block_attrs),O.insert(r,o),r.append(o)):(i(r),r=null),o=n;i(r)}}(),!c.invalid){for(g in o){for(h=n[g],m=(l=o[g]).length;m--;)l[m].parent||l.splice(m,1);for(f=0,d=h.length;f<d;f++)h[f](l,g,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,p=h.callbacks.length;m<p;m++)h.callbacks[m](l,h.name,c)}}return O}};return yb(s,e),ub.register(s,e),s}var _b=function(e,t,n){-1===Yt.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},Eb=function(e,t,n){var r=ha(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||po(Gn.fromDom(t))?r:Yt.trim(r)},Sb=function(e,t,n){var r=n.selection?ob({forced_root_block:!1},n):n,o=e.parse(t,r);return ib.trimTrailingBr(o),o},Nb=function(e,t,n,r,o){return function(e,t,n){return!t.no_events&&e?Cp(e,ob(t,{content:n})).content:n}(e,o,function(e,t,n){return El(e,t).serialize(n)}(t,n,r))};function Rb(e,t){var n=function(e,t){var n,r,o,i=["data-mce-selected"];return n=t&&t.dom?t.dom:ci.DOM,r=t&&t.schema?t.schema:Xo(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs,o=Tb(e,r),ib.register(o,e,n),{schema:r,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:function(i,a){var s=ob({format:"html"},a||{}),c=ab.process(t,i,s),u=Eb(n,c,s),l=Sb(o,u,s);return"tree"===s.format?l:Nb(t,e,r,l,s)},addRules:function(e){r.addValidElements(e)},setRules:function(e){r.setValidElements(e)},addTempAttr:y(_b,o,i),getTempAttrs:function(){return i}}}(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs}}function Ab(e){return{getBookmark:y(Fu.getBookmark,e),moveToBookmark:y(Fu.moveToBookmark,e)}}!function(e){e.isBookmarkNode=Fu.isBookmarkNode}(Ab||(Ab={}));var Db=Ab,Ob=_o.isContentEditableFalse,Pb=_o.isContentEditableTrue,Ib=function(e,t){var n,r,o,i,a,s,c,u,l,f,d,m,p,h,g,v,b,y=t.dom,x=Yt.each,w=t.getDoc(),C=document,k=Math.abs,T=Math.round,_=t.getBody();i={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var E=".mce-content-body";t.contentStyles.push(E+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+E+" .mce-resizehandle:hover {background: #000}"+E+" img[data-mce-selected],"+E+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+E+" .mce-clonedresizable {position: absolute;"+(Ne.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+E+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}");var S=function(e){return e&&("IMG"===e.nodeName||t.dom.is(e,"figure.image"))},N=function(e){var n=e.target;(function(e,t){return S(e.target)&&!fg(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&(e.preventDefault(),t.selection.select(n))},R=function(e){return t.dom.is(e,"figure.image")?e.querySelector("img"):e},A=function(e){var n=t.settings.object_resizing;return!1!==n&&!Ne.iOS&&("string"!=typeof n&&(n="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&Rr.is(Gn.fromDom(e),n))},D=function(e){var i,x,w,C;i=e.screenX-s,x=e.screenY-c,h=i*a[2]+f,g=x*a[3]+d,h=h<5?5:h,g=g<5?5:g,(S(n)&&!1!==t.settings.resize_img_proportional?!mg.modifierPressed(e):mg.modifierPressed(e)||S(n)&&a[2]*a[3]!=0)&&(k(i)>k(x)?(g=T(h*m),h=T(g/m)):(h=T(g/m),g=T(h*m))),y.setStyles(R(r),{width:h,height:g}),w=a.startPos.x+i,C=a.startPos.y+x,w=w>0?w:0,C=C>0?C:0,y.setStyles(o,{left:w,top:C,display:"block"}),o.innerHTML=h+" &times; "+g,a[2]<0&&r.clientWidth<=h&&y.setStyle(r,"left",u+(f-h)),a[3]<0&&r.clientHeight<=g&&y.setStyle(r,"top",l+(d-g)),(i=_.scrollWidth-v)+(x=_.scrollHeight-b)!=0&&y.setStyles(o,{left:w-i,top:C-x}),p||(_p(t,n,f,d),p=!0)},O=function(){p=!1;var e=function(e,r){r&&(n.style[e]||!t.schema.isValid(n.nodeName.toLowerCase(),e)?y.setStyle(R(n),e,r):y.setAttrib(R(n),e,r))};e("width",h),e("height",g),y.unbind(w,"mousemove",D),y.unbind(w,"mouseup",O),C!==w&&(y.unbind(C,"mousemove",D),y.unbind(C,"mouseup",O)),y.remove(r),y.remove(o),P(n),Ep(t,n,h,g),y.setAttrib(n,"style",y.getAttrib(n,"style")),t.nodeChanged()},P=function(e){var p,k,T,E,S;I(),L(),p=y.getPos(e,_),u=p.x,l=p.y,S=e.getBoundingClientRect(),k=S.width||S.right-S.left,T=S.height||S.bottom-S.top,n!==e&&(n=e,h=g=0),E=t.fire("ObjectSelected",{target:e}),A(e)&&!E.isDefaultPrevented()?x(i,function(e,t){var i;(i=y.get("mceResizeHandle"+t))&&y.remove(i),i=y.add(_,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===Ne.ie&&(i.contentEditable=!1),y.bind(i,"mousedown",function(t){t.stopImmediatePropagation(),t.preventDefault(),function(t){s=t.screenX,c=t.screenY,f=R(n).clientWidth,d=R(n).clientHeight,m=d/f,a=e,e.startPos={x:k*e[0]+u,y:T*e[1]+l},v=_.scrollWidth,b=_.scrollHeight,r=n.cloneNode(!0),y.addClass(r,"mce-clonedresizable"),y.setAttrib(r,"data-mce-bogus","all"),r.contentEditable=!1,r.unSelectabe=!0,y.setStyles(r,{left:u,top:l,margin:0}),r.removeAttribute("data-mce-selected"),_.appendChild(r),y.bind(w,"mousemove",D),y.bind(w,"mouseup",O),C!==w&&(y.bind(C,"mousemove",D),y.bind(C,"mouseup",O)),o=y.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},f+" &times; "+d)}(t)}),e.elm=i,y.setStyles(i,{left:k*e[0]+u-i.offsetWidth/2,top:T*e[1]+l-i.offsetHeight/2})}):I(),n.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in L(),n&&n.removeAttribute("data-mce-selected"),i)(t=y.get("mceResizeHandle"+e))&&(y.unbind(t),y.remove(t))},B=function(n){var r,o=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};p||t.removed||(x(y.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"===n.type?n.target:e.getNode(),o(r=y.$(r).closest("table,img,figure.image,hr")[0],_)&&(F(),o(e.getStart(!0),r)&&o(e.getEnd(!0),r))?P(r):I())},M=function(e){return Ob(function(e,t){for(;t&&t!==e;){if(Pb(t)||Ob(t))return t;t=t.parentNode}return null}(t.getBody(),e))},L=function(){for(var e in i){var t=i[e];t.elm&&(y.unbind(t.elm),delete t.elm)}},F=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return t.on("init",function(){F(),Ne.ie&&Ne.ie>=11&&(t.on("mousedown click",function(e){var n=e.target,r=n.nodeName;p||!/^(TABLE|IMG|HR)$/.test(r)||M(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())}),t.dom.bind(_,"mscontrolselect",function(e){var n=function(e){Pe.setEditorTimeout(t,function(){t.selection.select(e)})};if(M(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))}));var e=Pe.throttle(function(e){t.composing||B(e)});t.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",e),t.on("keyup compositionend",function(t){n&&"TABLE"===n.nodeName&&e(t)}),t.on("hide blur",I),t.on("contextmenu",N)}),t.on("remove",L),{isResizable:A,showResizeRect:P,hideResizeRect:I,updateResizeRect:B,destroy:function(){n=r=null}}},Bb=function(e){return _o.isContentEditableTrue(e)||_o.isContentEditableFalse(e)},Mb={fromPoint:function(e,t,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=function(e,t,n){var r,o,i;if(r=n.elementFromPoint(e,t),o=n.body.createTextRange(),r&&"HTML"!==r.tagName||(r=n.body),o.moveToElementText(r),(i=(i=Yt.toArray(o.getClientRects())).sort(function(e,n){return(e=Math.abs(Math.max(e.top-t,e.bottom-t)))-(n=Math.abs(Math.max(n.top-t,n.bottom-t)))})).length>0){t=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,t),o.collapse(!0),o}catch(e){}}return null}(e,t,n)}return function(e,t){var n=e&&e.parentElement?e.parentElement():null;return _o.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(n,t,Bb))?null:e}(r,n.body)}return r}},Lb=function(e,t){return H(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})},Fb=function(e,t){var n=(t||document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),Gn.fromDom(n)},Hb=wr("element","width","rows"),zb=wr("element","cells"),Ub=wr("x","y"),$b=function(e,t){var n=parseInt(lr.get(e,t),10);return isNaN(n)?1:n},jb=function(e,t,n){var r=e.rows();return!!(r[n]?r[n].cells():[])[t]},Wb=function(e){return j(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},qb=function(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(Or.eq(o[i],t))return S.some(Ub(i,r));return S.none()},Vb=function(e,t,n,r,o){for(var i=[],a=e.rows(),s=n;s<=o;s++){var c=a[s].cells(),u=t<r?c.slice(t,r+1):c.slice(r,t+1);i.push(zb(a[s].element(),u))}return i},Gb=function(e){var t=Hb(ca(e),0,[]);return z(Hi(e,"tr"),function(e,n){z(Hi(e,"td,th"),function(r,o){!function(e,t,n,r,o){for(var i=$b(o,"rowspan"),a=$b(o,"colspan"),s=e.rows(),c=n;c<n+i;c++){s[c]||(s[c]=zb(ua(r),[]));for(var u=t;u<t+a;u++)s[c].cells()[u]=c===n&&u===t?o:ca(o)}}(t,function(e,t,n){for(;jb(e,t,n);)t++;return t}(t,o,n),n,e,r)})}),Hb(t.element(),Wb(t.rows()),t.rows())},Yb=function(e){return function(e,t){var n=ca(e.element()),r=Gn.fromTag("tbody");return xi(r,t),bi.append(n,r),n}(e,function(e){return H(e.rows(),function(e){var t=H(e.cells(),function(e){var t=ua(e);return lr.remove(t,"colspan"),lr.remove(t,"rowspan"),t}),n=ca(e.element());return xi(n,t),n})}(e))},Kb=function(e,t,n){return qb(e,t).bind(function(t){return qb(e,n).map(function(n){return function(e,t,n){var r=t.x(),o=t.y(),i=n.x(),a=n.y(),s=o<a?Vb(e,r,o,i,a):Vb(e,r,a,i,o);return Hb(e.element(),Wb(s),s)}(e,t,n)})})},Xb=function(e,t){return W(e,function(e){return"li"===tr.name(e)&&Mh(e,t)}).fold(v([]),function(t){return function(e){return W(e,function(e){return"ul"===tr.name(e)||"ol"===tr.name(e)})}(e).map(function(e){return[Gn.fromTag("li"),Gn.fromTag(tr.name(e))]}).getOr([])})},Jb=function(e,t){var n=Gn.fromDom(t.commonAncestorContainer),r=df(n,e),o=$(r,function(e){return io(e)||ro(e)}),i=Xb(r,t),a=o.concat(i.length?i:function(e){return uo(e)?Hr.parent(e).filter(co).fold(v([]),function(t){return[e,t]}):co(e)?[e]:[]}(n));return H(a,ca)},Zb=function(){return Fb([])},Qb=function(e,t){return n=Gn.fromDom(t.cloneContents()),r=Jb(e,t),o=j(r,function(e,t){return bi.append(t,e),t},n),r.length>0?Fb([o]):o;var n,r,o},ey=function(e,t){return(n=e,r=t[0],Vi(r,"table",y(Or.eq,n))).bind(function(e){var n=t[0],r=t[t.length-1],o=Gb(e);return Kb(o,n,r).map(function(e){return Fb([Yb(e)])})}).getOrThunk(Zb);var n,r},ty=function(e,t){var n=rm(t,e);return n.length>0?ey(e,n):function(e,t){return t.length>0&&t[0].collapsed?Zb():Qb(e,t[0])}(e,t)},ny=function(e,t){var n,r=e.selection.getRng(),o=e.dom.create("body"),i=e.selection.getSel(),a=Lb(e,Jd(i));if((t=t||{}).get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return e.selection.isCollapsed()?"":ha(r.text||(i.toString?i.toString():""));r.cloneContents?(n=t.contextual?ty(Gn.fromDom(e.getBody()),a).dom():r.cloneContents())&&o.appendChild(n):void 0!==r.item||void 0!==r.htmlText?(o.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),o.removeChild(o.firstChild)):o.innerHTML=r.toString(),t.getInner=!0;var s=e.selection.serializer.serialize(o,t);return"tree"===t.format?s:(t.content=e.selection.isCollapsed()?"":s,e.fire("GetContent",t),t.content)},ry=function(e,t,n){var r,o,i,a=e.selection.getRng(),s=e.getDoc();if((n=n||{format:"html"}).set=!0,n.selection=!0,n.content=t,n.no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){if(t=n.content,a.insertNode){t+='<span id="__caret">_</span>',a.startContainer===s&&a.endContainer===s?s.body.innerHTML=t:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=t:a.createContextualFragment?a.insertNode(a.createContextualFragment(t)):(o=s.createDocumentFragment(),i=s.createElement("div"),o.appendChild(i),i.outerHTML=t,a.insertNode(o))),r=e.dom.get("__caret"),(a=s.createRange()).setStartBefore(r),a.setEndBefore(r),e.selection.setRng(a),e.dom.remove("__caret");try{e.selection.setRng(a)}catch(e){}}else a.item&&(s.execCommand("Delete",!1,null),a=e.getRng()),/^\s+/.test(t)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+t),e.dom.remove("__mce_tmp")):a.pasteHTML(t);n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)},oy=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return S.from(i).map(Gn.fromDom).map(function(e){return r&&t.collapsed?e:Hr.child(e,o(e,a)).getOr(e)}).bind(function(e){return tr.isElement(e)?S.some(e):Hr.parent(e)}).map(function(e){return e.dom()}).getOr(e)},iy=function(e,t,n){return oy(e,t,!0,n,function(e,t){return Math.min(Hr.childNodesCount(e),t)})},ay=function(e,t,n){return oy(e,t,!1,n,function(e,t){return t>0?t-1:t})},sy=function(e,t){for(var n=e;e&&_o.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},cy=Yt.each,uy=function(e){return!!e.select},ly=function(e){return!(!e||!e.ownerDocument)&&Or.contains(Gn.fromDom(e.ownerDocument),Gn.fromDom(e))},fy=function(e,t,n,r){var o,i,a,s,c,u=function(e,t){return ry(r,e,t)},l=function(e){var t=d();t.collapse(!!e),m(t)},f=function(){return t.getSelection?t.getSelection():t.document.selection},d=function(){var n,o,i,c,u=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}};if(!t)return null;if(void 0===(c=t.document)||null===c)return null;if(void 0!==r.bookmark&&!1===Jp(r)){var l=up.getRng(r);if(l.isSome())return l.map(function(e){return Lb(r,[e])[0]}).getOr(c.createRange())}try{(n=f())&&(o=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():c.createRange())}catch(e){}return(o=Lb(r,[o])[0])||(o=c.createRange?c.createRange():c.body.createTextRange()),o.setStart&&9===o.startContainer.nodeType&&o.collapsed&&(i=e.getRoot(),o.setStart(i,0),o.setEnd(i,0)),a&&s&&(0===u(o.START_TO_START,o,a)&&0===u(o.END_TO_END,o,a)?o=s:(a=null,s=null)),o},m=function(e,t){var n,o;if(function(e){return!!e&&(!!uy(e)||ly(e.startContainer)&&ly(e.endContainer))}(e)){var i=uy(e)?e:null;if(i){s=null;try{i.select()}catch(e){}}else{if(n=f(),e=r.fire("SetSelectionRange",{range:e,forward:t}).range,n){s=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),a=n.rangeCount>0?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||Ne.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(o=e.startContainer.childNodes[e.startOffset])&&"IMG"===o.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(o,0,o,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},p=function(){var t,n,r=f();return!(r&&r.anchorNode&&r.focusNode)||((t=e.createRng()).setStart(r.anchorNode,r.anchorOffset),t.collapse(!0),(n=e.createRng()).setStart(r.focusNode,r.focusOffset),n.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,n)<=0)},h={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:r,collapse:l,setCursorLocation:function(t,n){var o=e.createRng();t?(o.setStart(t,n),o.setEnd(t,n),m(o),l(!1)):(Lh(e,o,r.getBody(),!0),m(o))},getContent:function(e){return ny(r,e)},setContent:u,getBookmark:function(e,t){return o.getBookmark(e,t)},moveToBookmark:function(e){return o.moveToBookmark(e)},select:function(t,n){return function(e,t,n){return S.from(t).map(function(t){var r=e.nodeIndex(t),o=e.createRng();return o.setStart(t.parentNode,r),o.setEnd(t.parentNode,r+1),n&&(Lh(e,o,t,!0),Lh(e,o,t,!1)),o})}(e,t,n).each(m),t},isCollapsed:function(){var e=d(),t=f();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:p,setNode:function(t){return u(e.getOuterHTML(t)),t},getNode:function(){return e=r.getBody(),(t=d())?(o=t.startContainer,i=t.endContainer,a=t.startOffset,s=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(o===i&&s-a<2&&o.hasChildNodes()&&(n=o.childNodes[a]),3===o.nodeType&&3===i.nodeType&&(o=o.length===a?sy(o.nextSibling,!0):o.parentNode,i=0===s?sy(i.previousSibling,!1):i.parentNode,o&&o===i))?o:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,o,i,a,s},getSel:f,setRng:m,getRng:d,getStart:function(e){return iy(r.getBody(),d(),e)},getEnd:function(e){return ay(r.getBody(),d(),e)},getSelectedBlocks:function(t,n){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||iy(i,t,t.collapsed),e.isBlock),r=e.getParent(r||ay(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r){o=n;for(var s=new Zr(n,i);(o=s.next())&&o!==r;)e.isBlock(o)&&a.push(o)}return r&&n!==r&&r!==i&&a.push(r),a}(e,d(),t,n)},normalize:function(){var t=d(),n=f();if(!Qd(n)&&Fh(r)){var o=Bm.normalize(e,t);return o.each(function(e){m(e,p())}),o.getOr(t)}return t},selectorChanged:function(t,n){var o;return c||(c={},o={},r.on("NodeChange",function(t){var n=t.element,r=e.getParents(n,null,e.getRoot()),i={};cy(c,function(t,n){cy(r,function(a){if(e.is(a,n))return o[n]||(cy(t,function(e){e(!0,{node:a,selector:n,parents:r})}),o[n]=t),i[n]=t,!1})}),cy(o,function(e,t){i[t]||(delete o[t],cy(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),c[t]||(c[t]=[]),c[t].push(n),h},getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){return Ac(r,e,t)},placeCaretAt:function(e,t){return m(Mb.fromPoint(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=d();return e.collapsed?gs.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=a=s=null,i.destroy()}};return o=Db(h),i=Ib(h,r),h.bookmarkManager=o,h.controlSelection=i,h},dy=_o.isContentEditableFalse,my=qa,py=wu,hy=xu,gy=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},vy=function(e,t,n,r){var o,i,a,s,c,u,l=e===hs.Forwards,f=l?hy:py;return!r.collapsed&&(o=my(r),dy(o))?Js(e,t,o,e===hs.Backwards,!0):(s=function(e){return ba(e.startContainer)}(r),f(i=yu(e,t.getBody(),r))?Zs(t,i.getNode(!l)):(i=n(i))?f(i)?Js(e,t,i.getNode(!l),l,!0):f(a=n(i))&&(!(u=cu(c=i,a))&&_o.isBr(c.getNode())||u)?Js(e,t,a.getNode(!l),l,!0):s?ec(t,i.toRange(),!0):null:s?r:null)},by=function(e,t,n,r){var o,i,a,s,c,u,l,f,d;if(d=my(r),o=yu(e,t.getBody(),r),i=n(t.getBody(),tg(1),o),a=jt.filter(i,ng(1)),c=jt.last(o.getClientRects()),(hy(o)||Cu(o))&&(d=o.getNode()),(py(o)||ku(o))&&(d=o.getNode(!0)),!c)return null;if(u=c.left,(s=cg(a,u))&&dy(s.node))return l=Math.abs(u-s.left),f=Math.abs(u-s.right),Js(e,t,s.node,l<f,!0);if(d){var m=function(e,t,n,r){var o,i,a,s,c,u,l=dc(t),f=[],d=0,m=function(e){return jt.last(e.getClientRects())};1===e?(o=l.next,i=Wa,a=ja,s=gs.after(r)):(o=l.prev,i=ja,a=Wa,s=gs.before(r)),u=m(s);do{if(s.isVisible()&&!a(c=m(s),u)){if(f.length>0&&i(c,jt.last(f))&&d++,(c=za(c)).position=s,c.line=d,n(c))return f;f.push(c)}}while(s=o(s));return f}(e,t.getBody(),tg(1),d);if(s=cg(jt.filter(m,ng(1)),u))return ec(t,s.position.toRange(),!0);if(s=jt.last(jt.filter(m,ng(0))))return ec(t,s.position.toRange(),!0)}},yy=function(e,t,n){var r,o,i=dc(e.getBody()),a=da.curry(gy,i.next),s=da.curry(gy,i.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?a(gs.fromRangeStart(n)):s(gs.fromRangeStart(n)))||(o=function(e){var t=e.dom.create(e.settings.forced_root_block);return(!Ne.ie||Ne.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}(e),1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},xy=function(e,t){return function(){var n=function(e,t){var n,r=dc(e.getBody()),o=da.curry(gy,r.next),i=da.curry(gy,r.prev),a=t?hs.Forwards:hs.Backwards,s=t?o:i,c=e.selection.getRng();return(n=vy(a,e,s,c))?n:(n=yy(e,a,c))||null}(e,t);return!!n&&(e.selection.setRng(n),!0)}},wy=function(e,t){return function(){var n=function(e,t){var n,r=t?1:-1,o=t?eg:Qh,i=e.selection.getRng();return(n=by(r,e,o,i))?n:(n=yy(e,r,i))||null}(e,t);return!!n&&(e.selection.setRng(n),!0)}},Cy=function(e,t){return Y(function(e){return H(e,function(e){return ob({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:h},e)})}(e),function(e){return function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey}(e,t)?[e]:[]})},ky=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},Ty=function(e,t){return W(Cy(e,t),function(e){return e.action()})},_y=function(e,t){e.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(e,t,n){var r=qn.detect().os;Ty([{keyCode:mg.RIGHT,action:xy(e,!0)},{keyCode:mg.LEFT,action:xy(e,!1)},{keyCode:mg.UP,action:wy(e,!1)},{keyCode:mg.DOWN,action:wy(e,!0)},{keyCode:mg.RIGHT,action:Wc(e,!0)},{keyCode:mg.LEFT,action:Wc(e,!1)},{keyCode:mg.UP,action:qc(e,!1)},{keyCode:mg.DOWN,action:qc(e,!0)},{keyCode:mg.RIGHT,action:Dd.move(e,t,!0)},{keyCode:mg.LEFT,action:Dd.move(e,t,!1)},{keyCode:mg.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:Dd.moveNextWord(e,t)},{keyCode:mg.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:Dd.movePrevWord(e,t)}],n).each(function(e){n.preventDefault()})}(e,t,n)})},Ey=function(e){return 1===Hr.children(e).length},Sy=function(e,t,n,r){var o=y(dv,t),i=H($(r,o),function(e){return e.dom()});if(0===i.length)zf(t,e,n);else{var a=function(e,t){var n=iv(!1),r=lv(t,n.dom());return bi.before(Gn.fromDom(e),n),Ci.remove(Gn.fromDom(e)),gs(r,0)}(n.dom(),i);t.selection.setRng(a.toRange())}},Ny=function(e,t){var n=Gn.fromDom(e.getBody()),r=Gn.fromDom(e.selection.getStart()),o=$(function(e,t){var n=df(t,e);return q(n,oo).fold(v(n),function(e){return n.slice(0,e)})}(n,r),Ey);return Q(o).map(function(n){var r=gs.fromRangeStart(e.selection.getRng());return!!Kl(t,r,n.dom())&&(Sy(t,e,n,o),!0)}).getOr(!1)},Ry=function(e,t){return!!e.selection.isCollapsed()&&Ny(e,t)},Ay=function(e,t){e.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(e,t,n){Ty([{keyCode:mg.BACKSPACE,action:ky(jf,e,!1)},{keyCode:mg.DELETE,action:ky(jf,e,!0)},{keyCode:mg.BACKSPACE,action:ky(Bd,e,t,!1)},{keyCode:mg.DELETE,action:ky(Bd,e,t,!0)},{keyCode:mg.BACKSPACE,action:ky(pm,e,!1)},{keyCode:mg.DELETE,action:ky(pm,e,!0)},{keyCode:mg.BACKSPACE,action:ky(_f,e,!1)},{keyCode:mg.DELETE,action:ky(_f,e,!0)},{keyCode:mg.BACKSPACE,action:ky(wf,e,!1)},{keyCode:mg.DELETE,action:ky(wf,e,!0)},{keyCode:mg.BACKSPACE,action:ky(Ry,e,!1)},{keyCode:mg.DELETE,action:ky(Ry,e,!0)}],n).each(function(e){n.preventDefault()})}(e,t,n)}),e.on("keyup",function(t){!1===t.isDefaultPrevented()&&function(e,t){Ty([{keyCode:mg.BACKSPACE,action:ky(Wf,e)},{keyCode:mg.DELETE,action:ky(Wf,e)}],t)}(e,t)})},Dy=function(e){return S.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},Oy=function(e,t){var n,r,o,i=t,a=e.dom,s=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var c=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);c&&/^(UL|OL|DL)$/.test(c.nodeName)&&t.insertBefore(a.doc.createTextNode(""),t.firstChild)}if(o=a.createRng(),t.normalize(),t.hasChildNodes()){for(n=new Zr(t,t);r=n.current();){if(_o.isText(r)){o.setStart(r,0),o.setEnd(r,0);break}if(s[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}i=r,r=n.next()}r||(o.setStart(i,0),o.setEnd(i,0))}else _o.isBr(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),a.remove(void 0),e.selection.scrollIntoView(t)}},Py=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Iy=Dy,By=function(e){return Dy(e).fold(v(""),function(e){return e.nodeName.toUpperCase()})},My=function(e){return Dy(e).filter(function(e){return uo(Gn.fromDom(e))}).isSome()},Ly=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},Fy=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},Hy=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},zy=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!_o.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},Uy=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var s;Fy(s=n)&&Fy(s.parentNode)&&(o="LI");var c=o?t(o):i.create("BR");if(zy(n,r,!0)&&zy(n,r,!1))Ly(n,"LI")?i.insertAfter(c,Hy(n)):i.replace(c,n);else if(zy(n,r,!0))Ly(n,"LI")?(i.insertAfter(c,Hy(n)),c.appendChild(i.doc.createTextNode(" ")),c.appendChild(n)):n.parentNode.insertBefore(c,n);else if(zy(n,r,!1))i.insertAfter(c,Hy(n));else{n=Hy(n);var u=a.cloneRange();u.setStartAfter(r),u.setEndAfter(n);var l=u.extractContents();"LI"===o&&function(e,t){return e.firstChild&&e.firstChild.nodeName===t}(l,"LI")?(c=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(c,n))}i.remove(r),Oy(e,c)}},$y=function(e){e.innerHTML='<br data-mce-bogus="1">'},jy=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},Wy=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},qy=function(e,t,n){return!1===_o.isText(t)?n:e?1===n&&t.data.charAt(n-1)===pa?0:n:n===t.data.length-1&&t.data.charAt(n)===pa?t.data.length:n},Vy=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Gy=function(e,t){var n=Pc.getForcedRootBlock(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,Pc.getForcedRootBlockAttrs(e))},Yy=function(e,t){var n,r,o,i,a,s,c,u,l,f,d,m,p,h=e.dom,g=e.schema,v=g.getNonEmptyElements(),b=e.selection.getRng(),y=function(t){var n,i,s,c=o,u=g.getTextInlineElements();if(t||"TABLE"===f||"HR"===f?(n=h.create(t||m),Gy(e,n)):n=a.cloneNode(!1),s=n,!1===Pc.shouldKeepStyles(e))h.setAttrib(n,"style",null),h.setAttrib(n,"class",null);else do{if(u[c.nodeName]){if(Ls(c))continue;i=c.cloneNode(!1),h.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(s=i,n.appendChild(i))}}while((c=c.parentNode)&&c!==r);return $y(s),n},x=function(e){var t,n,r,s;if(s=qy(e,o,i),_o.isText(o)&&(e?s>0:s<o.nodeValue.length))return!1;if(o.parentNode===a&&p&&!e)return!0;if(e&&_o.isElement(o)&&o===a.firstChild)return!0;if(jy(o,"TABLE")||jy(o,"HR"))return p&&!e||!p&&e;for(t=new Zr(o,a),_o.isText(o)&&(e&&0===s?t.prev():e||s!==o.nodeValue.length||t.next());n=t.current();){if(_o.isElement(n)){if(!n.getAttribute("data-mce-bogus")&&(r=n.nodeName.toLowerCase(),v[r]&&"br"!==r))return!1}else if(_o.isText(n)&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0},w=function(){c=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?y(m):y(),Pc.shouldEndContainerOnEmptyBlock(e)&&Wy(h,l)&&h.isEmpty(a)?c=h.split(l,a):h.insertAfter(c,a),Oy(e,c)};Bm.normalize(h,b).each(function(e){b.setStart(e.startContainer,e.startOffset),b.setEnd(e.endContainer,e.endOffset)}),o=b.startContainer,i=b.startOffset,m=Pc.getForcedRootBlock(e),s=t.shiftKey,_o.isElement(o)&&o.hasChildNodes()&&(p=i>o.childNodes.length-1,o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o,i=p&&_o.isText(o)?o.nodeValue.length:0),(r=Vy(h,o))&&((m&&!s||!m&&s)&&(o=function(e,t,n,r,o){var i,a,s,c,u,l,f=t||"P",d=e.dom,m=Vy(d,r);if(!(a=d.getParent(r,d.isBlock))||!Wy(d,a)){if(l=(a=a||m)===e.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),Gy(e,i),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);)s=c,c=c.previousSibling;if(s&&e.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),Gy(e,i),s.parentNode.insertBefore(i,s),c=s;c&&!d.isBlock(c);)u=c.nextSibling,i.appendChild(c),c=u;n.setStart(r,o),n.setEnd(r,o)}}return r}(e,m,b,o,i)),a=h.getParent(o,h.isBlock),l=a?h.getParent(a.parentNode,h.isBlock):null,f=a?a.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||t.ctrlKey||(a=l,l=l.parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&h.isEmpty(a)?Uy(e,y,l,a,m):m&&a===e.getBody()||(m=m||"P",ba(a)?(c=Sa(a),h.isEmpty(a)&&$y(a),Oy(e,c)):x()?w():x(!0)?(c=a.parentNode.insertBefore(y(),a),Oy(e,jy(a,"HR")?c:a)):((n=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,qy(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,qy(!1,e.endContainer,e.endOffset)),t}(b).cloneRange()).setEndAfter(a),function(e){do{_o.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}(u=n.extractContents()),c=u.firstChild,h.insertAfter(u,a),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;_o.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=o)&&"A"===a.nodeName&&0===Yt.trim(ha(a.innerText||a.textContent)).length&&e.remove(o);var a}}(h,v,c),function(e,t){var n;t.normalize(),(n=t.lastChild)&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(h,a),h.isEmpty(a)&&$y(a),c.normalize(),h.isEmpty(c)?(h.remove(c),w()):Oy(e,c)),h.setAttrib(c,"id",""),e.fire("NewBlock",{newBlock:c})))},Ky=function(e,t){return Iy(e).filter(function(e){return t.length>0&&Rr.is(Gn.fromDom(e),t)}).isSome()},Xy=function(e){return Ky(e,Pc.getBrNewLineSelector(e))},Jy=function(e){return Ky(e,Pc.getNoNewLineSelector(e))},Zy=Ef([{br:[]},{block:[]},{none:[]}]),Qy=function(e,t){return Jy(e)},ex=function(e){return function(t,n){return""===Pc.getForcedRootBlock(t)===e}},tx=function(e){return function(t,n){return My(t)===e}},nx=function(e,t){return function(n,r){return By(n)===e.toUpperCase()===t}},rx=function(e){return nx("pre",e)},ox=function(e){return function(t,n){return Pc.shouldPutBrInPre(t)===e}},ix=function(e,t){return Xy(e)},ax=function(e,t){return t},sx=function(e){var t=Pc.getForcedRootBlock(e),n=Py(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},cx=function(e,t){return function(n,r){return j(e,function(e,t){return e&&t(n,r)},!0)?S.some(t):S.none()}},ux=function(e,t){return td([cx([Qy],Zy.none()),cx([nx("summary",!0)],Zy.br()),cx([rx(!0),ox(!1),ax],Zy.br()),cx([rx(!0),ox(!1)],Zy.block()),cx([rx(!0),ox(!0),ax],Zy.block()),cx([rx(!0),ox(!0)],Zy.br()),cx([tx(!0),ax],Zy.br()),cx([tx(!0)],Zy.block()),cx([ex(!0),ax,sx],Zy.block()),cx([ex(!0)],Zy.br()),cx([ix],Zy.br()),cx([ex(!1),ax],Zy.br()),cx([sx],Zy.block())],[e,t.shiftKey]).getOr(Zy.none())},lx=function(e,t){ux(e,t).fold(function(){qm.insert(e,t)},function(){Yy(e,t)},h)},fx=function(e){e.on("keydown",function(t){t.keyCode===mg.ENTER&&function(e,t){var n;t.isDefaultPrevented()||(t.preventDefault(),(n=e.undoManager).typing&&(n.typing=!1,n.add()),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),lx(e,t)}))}(e,t)})},dx=function(e,t,n){return!!function(e,t){return mx(e)&&_o.isText(t.container())}(n,t)&&(function(e,t){var n=t.container(),r=t.offset();n.insertData(r,""),e.selection.setCursorLocation(n,r+1)}(e,t),!0)},mx=function(e){return e.fold(v(!1),v(!0),v(!0),v(!1))},px=function(e){return!!e.selection.isCollapsed()&&function(e){var t=y(Vl.isInlineTarget,e),n=gs.fromRangeStart(e.selection.getRng());return yd(t,e.getBody(),n).map(y(dx,e,n)).getOr(!1)}(e)},hx=function(e){e.on("keydown",function(t){!1===t.isDefaultPrevented()&&function(e,t){Ty([{keyCode:mg.SPACEBAR,action:ky(px,e)}],t).each(function(e){t.preventDefault()})}(e,t)})},gx=function(e,t){t.hasAttribute("data-mce-caret")&&(Sa(t),function(e){e.selection.setRng(e.selection.getRng())}(e),e.selection.scrollIntoView(t))},vx=function(e,t){var n=function(e){return Gi(Gn.fromDom(e.getBody()),"*[data-mce-caret]").fold(v(null),function(e){return e.dom()})}(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void gx(e,n)):void(wa(n)&&(gx(e,n),e.undoManager.add()))},bx=function(e){e.on("keyup compositionstart",y(vx,e))},yx=function(e){var t=Dd.setupSelectedState(e);bx(e),_y(e,t),Ay(e,t),fx(e),hx(e)};function xx(e){var t,n,r,o=Yt.each,i=mg.BACKSPACE,a=mg.DELETE,s=e.dom,c=e.selection,u=e.settings,l=e.parser,f=Ne.gecko,d=Ne.ie,m=Ne.webkit,p=d?"Text":"URL",h=function(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}},g=function(e){return e.isDefaultPrevented()},v=function(){e.shortcuts.add("meta+a",null,"SelectAll")},b=function(){e.on("keydown",function(e){if(!g(e)&&e.keyCode===i&&c.isCollapsed()&&0===c.getRng().startOffset){var t=c.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},y=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(t){var n;if("HTML"===t.target.nodeName){if(Ne.ie>11)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}}))};return e.on("keydown",function(t){var n,r,o,i,a;if(!g(t)&&t.keyCode===mg.BACKSPACE&&(r=(n=c.getRng()).startContainer,o=n.startOffset,i=s.getRoot(),a=r,n.collapsed&&0===o)){for(;a&&a.parentNode&&a.parentNode.firstChild===a&&a.parentNode!==i;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(e.formatter.toggle("blockquote",null,a),(n=s.createRng()).setStart(r,0),n.setEnd(r,0),c.setRng(n))}}),t=function(e){var t=s.create("body"),n=e.cloneContents();return t.appendChild(n),c.serializer.serialize(t,{format:"html"})},e.on("keydown",function(n){var r,o,c,u,l,f=n.keyCode;if(!g(n)&&(f===a||f===i)){if(r=e.selection.isCollapsed(),o=e.getBody(),r&&!s.isEmpty(o))return;if(!r&&(c=e.selection.getRng(),u=t(c),(l=s.createRng()).selectNode(e.getBody()),u!==t(l)))return;n.preventDefault(),e.setContent(""),o.firstChild&&s.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}}),Ne.windowsPhone||e.on("keyup focusin mouseup",function(e){mg.modifierPressed(e)||c.normalize()},!0),m&&(e.settings.content_editable||s.bind(e.getDoc(),"mousedown mouseup",function(t){var n;if(t.target===e.getDoc().documentElement)if(n=c.getRng(),e.getBody().focus(),"mousedown"===t.type){if(xa(n.startContainer))return;c.placeCaretAt(t.clientX,t.clientY)}else c.setRng(n)}),e.on("click",function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==s.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&s.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),c.select(n))}),u.forced_root_block&&e.on("init",function(){h("DefaultParagraphSeparator",u.forced_root_block)}),e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(e){e.preventDefault()})}),b(),l.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),Ne.iOS?(e.inline||e.on("keydown",function(){document.activeElement===document.body&&e.getWin().focus()}),y(),e.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):v()),Ne.ie>=11&&(y(),b()),Ne.ie&&(v(),h("AutoUrlDetect",!1),e.on("dragstart",function(t){!function(t){var n,r;t.dataTransfer&&(e.selection.isCollapsed()&&"IMG"===t.target.tagName&&c.select(t.target),(n=e.selection.getContent()).length>0&&(r="data:text/mce-internal,"+escape(e.id)+","+escape(n),t.dataTransfer.setData(p,r)))}(t)}),e.on("drop",function(t){if(!g(t)){var n=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(p))&&t.indexOf("data:text/mce-internal,")>=0?(t=t.substr("data:text/mce-internal,".length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}(t);if(n&&n.id!==e.id){t.preventDefault();var r=Mb.fromPoint(t.x,t.y,e.getDoc());c.setRng(r),o=n.html,i=!0,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):e.execCommand("mceInsertContent",!1,o)}}var o,i})),f&&(e.on("keydown",function(t){if(!g(t)&&t.keyCode===i){if(!e.getBody().getElementsByTagName("hr").length)return;if(c.isCollapsed()&&0===c.getRng().startOffset){var n=c.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return s.remove(n),void t.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(s.remove(r),t.preventDefault())}}}),Range.prototype.getClientRects||e.on("mousedown",function(t){if(!g(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),Pe.setEditorTimeout(e,function(){n.focus()})}}),n=function(){var t=s.getAttribs(c.getStart().cloneNode(!1));return function(){var n=c.getStart();n!==e.getBody()&&(s.setAttrib(n,"style",null),o(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!c.isCollapsed()&&s.getParent(c.getStart(),s.isBlock)!==s.getParent(c.getEnd(),s.isBlock)},e.on("keypress",function(t){var o;if(!g(t)&&(8===t.keyCode||46===t.keyCode)&&r())return o=n(),e.getDoc().execCommand("delete",!1,null),o(),t.preventDefault(),!1}),s.bind(e.getDoc(),"cut",function(t){var o;!g(t)&&r()&&(o=n(),Pe.setEditorTimeout(e,function(){o()}))}),u.readonly||e.on("BeforeExecCommand MouseDown",function(){h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),u.object_resizing||h("enableObjectResizing",!1)}),e.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(s.select("a"),function(e){var t=e.parentNode,n=s.getRoot();if(t.lastChild===e){for(;t&&!s.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}s.add(t,"br",{"data-mce-bogus":1})}})}),e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),Ne.mac&&e.on("keydown",function(t){!mg.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var t;return!f||e.removed?0:!(t=e.selection.getSel())||!t.rangeCount||0===t.rangeCount}}}var wx=function(e){return _o.isElement(e)&&so(Gn.fromDom(e))},Cx=function(e){e.on("click",function(t){t.detail>=3&&function(e){var t=e.selection.getRng(),n=ps.fromRangeStart(t),r=ps.fromRangeEnd(t);if(ps.isElementPosition(n)){var o=n.container();wx(o)&&Au.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}ps.isElementPosition(r)&&(o=n.container(),wx(o)&&Au.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})),e.selection.setRng(Nl(t))}(e)})},kx=function(e){!function(e){e.on("click",function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()})}(e),function(e){e.parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",R(t)?t:null),e.attr("data-mce-open",null)})})}(e)},Tx=ci.DOM,_x=function(e){e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),function(e){e.settings.auto_focus&&Pe.setEditorTimeout(e,function(){var t;(t=!0===e.settings.auto_focus?e:e.editorManager.get(e.settings.auto_focus)).destroyed||t.focus()},100)}(e)},Ex=function(e,t){var n,r,o=e.settings,i=e.getElement(),a=e.getDoc();o.inline||(e.getElement().style.visibility=e.orgVisibility),t||o.content_editable||(a.open(),a.write(e.iframeHTML),a.close()),o.content_editable&&(e.on("remove",function(){var e=this.getBody();Tx.removeClass(e,"mce-content-body"),Tx.removeClass(e,"mce-edit-focus"),Tx.setAttrib(e,"contentEditable",null)}),Tx.addClass(i,"mce-content-body"),e.contentDocument=a=o.content_document||document,e.contentWindow=o.content_window||window,e.bodyElement=i,o.content_document=o.content_window=null,o.root_name=i.nodeName.toLowerCase()),(n=e.getBody()).disabled=!0,e.readonly=o.readonly,e.readonly||(e.inline&&"static"===Tx.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=e.getParam("content_editable_state",!0)),n.disabled=!1,e.editorUpload=Nh(e),e.schema=Xo(o),e.dom=ci(a,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:!0,root_element:e.inline?e.getBody():null,collect:o.content_editable,schema:e.schema,onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=function(e){var t=Tb(e.settings,e.schema);return t.addAttributeFilter("src,href,style,tabindex",function(t,n){for(var r,o,i,a=t.length,s=e.dom;a--;)if(o=(r=t[a]).attr(n),i="data-mce-"+n,!r.attributes.map[i]){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=s.serializeStyle(s.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,e.convertURL(o,n,r.name))}}),t.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),t.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n,r=t.length,o=e.schema.getNonEmptyElements();r--;)(n=t[r]).isEmpty(o)&&0===n.getAll("br").length&&(n.append(new mb("br",1)).shortEnded=!0)}),t}(e),e.serializer=Rb(o,e),e.selection=fy(e.dom,e.getWin(),e.serializer,e),e.annotator=ul(e),e.formatter=tb(e),e.undoManager=Vg(e),e._nodeChangeDispatcher=new Hh(e),e._selectionOverrides=yg(e),kx(e),Cx(e),yx(e),Ph(e),e.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(a.body.spellcheck=!1,Tx.setAttrib(n,"spellcheck","false")),e.quirks=xx(e),e.fire("PostRender"),o.directionality&&(n.dir=o.directionality),o.nowrap&&(n.style.whiteSpace="nowrap"),o.protect&&e.on("BeforeSetContent",function(e){Yt.each(o.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type}),e.contentStyles.length>0&&(r="",Yt.each(e.contentStyles,function(e){r+=e+"\r\n"}),e.dom.addStyle(r)),function(e){return e.inline?Tx.styleSheetLoader:e.dom.styleSheetLoader}(e).loadAll(e.contentCSS,function(t){_x(e)},function(t){_x(e)}),o.content_style&&function(e,t){var n=Gn.fromDom(e.getDoc().head),r=Gn.fromTag("style");lr.set(r,"type","text/css"),bi.append(r,Gn.fromText(t)),bi.append(n,r)}(e,o.content_style)},Sx=ci.DOM,Nx=function(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),r=function(e,t,n,r){var o=Gn.fromTag("iframe");return lr.setAll(o,r),lr.setAll(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),br(o,{width:"100%",height:function(e){var t="number"==typeof e?e+"px":e;return t||""}(n),display:"block"}),o}(e.id,n,t.height,Pc.getIframeAttrs(e)).dom();r.onload=function(){r.onload=null,e.fire("load")};var o=function(e,t){if(document.domain!==window.location.hostname&&Ne.ie&&Ne.ie<12){var n=Sh.uuid("mce");e[n]=function(){Ex(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Sx.setAttrib(t,"src",r),!0}return!1}(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=function(e){var t,n,r;return r=Pc.getDocType(e)+"<html><head>",Pc.getDocumentBaseUrl(e)!==e.documentBaseUrl&&(r+='<base href="'+e.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',t=Pc.getBodyId(e),n=Pc.getBodyClass(e),Pc.getContentSecurityPolicy(e)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+Pc.getContentSecurityPolicy(e)+'" />'),r+='</head><body id="'+t+'" class="mce-content-body '+n+'" data-id="'+e.id+'"><br></body></html>'}(e),Sx.add(t.iframeContainer,r),o},Rx=function(e,t){var n=Nx(e,t);t.editorContainer&&(Sx.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Sx.isHidden(t.editorContainer)),e.getElement().style.display="none",Sx.setAttrib(e.id,"aria-hidden","true"),n||Ex(e)},Ax=ci.DOM,Dx=function(e,t,n){var r,o,i=dh.get(n);if(r=dh.urls[n]||e.documentBaseUrl.replace(/\/$/,""),n=Yt.trim(n),i&&-1===Yt.inArray(t,n)){if(Yt.each(dh.dependencies(n),function(n){Dx(e,t,n)}),e.plugins[n])return;o=new i(e,r,e.$),e.plugins[n]=o,o.init&&(o.init(e,r),t.push(n))}},Ox=function(e){return e.replace(/^\-/,"")},Px=function(e){return{editorContainer:e,iframeContainer:e}},Ix=function(e){var t=e.getElement();return e.inline?Px(null):function(e){var t=Ax.create("div");return Ax.insertAfter(t,e),Px(t)}(t)},Bx=function(e){var t=e.settings,n=e.getElement();return e.orgDisplay=n.style.display,R(t.theme)?function(e){var t,n,r,o,i,a=e.settings,s=e.getElement();return t=a.width||Ax.getStyle(s,"width")||"100%",n=a.height||Ax.getStyle(s,"height")||s.offsetHeight,r=a.min_height||100,(o=/^[0-9\.]+(|px)$/i).test(""+t)&&(t=Math.max(parseInt(t,10),100)),o.test(""+n)&&(n=Math.max(parseInt(n,10),r)),i=e.theme.renderUI({targetNode:s,width:t,height:n,deltaWidth:a.delta_width,deltaHeight:a.delta_height}),a.content_editable||(n=(i.iframeHeight||n)+("number"==typeof n?i.deltaHeight||0:""))<r&&(n=r),i.height=n,i}(e):I(t.theme)?function(e){var t,n=e.getElement();return(t=e.settings.theme(e,n)).editorContainer.nodeType&&(t.editorContainer.id=t.editorContainer.id||e.id+"_parent"),t.iframeContainer&&t.iframeContainer.nodeType&&(t.iframeContainer.id=t.iframeContainer.id||e.id+"_iframecontainer"),t.height=t.iframeHeight?t.iframeHeight:n.offsetHeight,t}(e):Ix(e)},Mx=function(e){var t,n=e.settings,r=e.getElement();return e.rtl=n.rtl_ui||e.editorManager.i18n.rtl,e.editorManager.i18n.setCode(n.language),n.aria_label=n.aria_label||Ax.getAttrib(r,"aria-label",e.getLang("aria.rich_text_area")),e.fire("ScriptsLoaded"),function(e){var t,n=e.settings.theme;R(n)?(e.settings.theme=Ox(n),t=mh.get(n),e.theme=new t(e,mh.urls[n]),e.theme.init&&e.theme.init(e,mh.urls[n]||e.documentBaseUrl.replace(/\/$/,""),e.$)):e.theme={}}(e),function(e){var t=[];Yt.each(e.settings.plugins.split(/[ ,]/),function(n){Dx(e,t,Ox(n))})}(e),t=Bx(e),e.editorContainer=t.editorContainer?t.editorContainer:null,n.content_css&&Yt.each(Yt.explode(n.content_css),function(t){e.contentCSS.push(e.documentBaseURI.toAbsolute(t))}),n.content_editable?Ex(e):Rx(e,t)},Lx=ci.DOM,Fx=function(e){return"-"===e.charAt(0)},Hx=function(e,t){var n=mi.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(R(i)){if(!Fx(i)&&!mh.urls.hasOwnProperty(i)){var a=o.theme_url;a?mh.load(i,t.documentBaseURI.toAbsolute(a)):mh.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){mh.waitFor(i,r)})}else r()}(n,e,t,function(){!function(e,t){var n=t.settings;n.language&&"en"!==n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&!t.editorManager.i18n.data[n.language]&&e.add(n.language_url)}(n,e),function(e,t){Yt.isArray(e.plugins)&&(e.plugins=e.plugins.join(" ")),Yt.each(e.external_plugins,function(t,n){dh.load(n,t),e.plugins+=" "+n}),Yt.each(e.plugins.split(/[ ,]/),function(e){if((e=Yt.trim(e))&&!dh.urls[e])if(Fx(e)){e=e.substr(1,e.length);var n=dh.dependencies(e);Yt.each(n,function(e){var n={prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"};e=dh.createUrl(n,e),dh.load(e.resource,e)})}else dh.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"})})}(e.settings,t),n.loadQueue(function(){e.removed||Mx(e)},e,function(t){fh.pluginLoadError(e,t[0]),e.removed||Mx(e)})})},zx=function(e){var t=e.settings,n=e.id,r=function(){Lx.unbind(window,"ready",r),e.render()};if($e.Event.domLoaded){if(e.getElement()&&Ne.contentEditable){t.inline?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");var o=e.getElement().form||Lx.getParent(n,"form");o&&(e.formElement=o,t.hidden_input&&!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)&&(Lx.insertAfter(Lx.create("input",{type:"hidden",name:n}),n),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},Lx.bind(o,"submit reset",e.formEventDelegate),e.on("reset",function(){e.setContent(e.startContent,{format:"raw"})}),!t.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),o._mceOldSubmit(o)})),e.windowManager=ah(e),e.notificationManager=ih(e),"xml"===t.encoding&&e.on("GetContent",function(e){e.save&&(e.content=Lx.encode(e.content))}),t.add_form_submit_trigger&&e.on("submit",function(){e.initialized&&e.save()}),t.add_unload_trigger&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),Hx(e,e.suffix)}}else Lx.bind(window,"ready",r)},Ux=function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r},$x=Yt.each,jx=Yt.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},Vx=function(e,t){var n,r,o=this;if(e=jx(e),n=(t=o.settings=t||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");0!==e.indexOf("/")||i||(e=(n&&n.protocol||"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(r=t.base_uri?t.base_uri.path:new Vx(document.location.href).directory,""==t.base_uri.protocol?e="//mce_host"+o.toAbsPath(r,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(n&&n.protocol||"http")+"://mce_host"+o.toAbsPath(r,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),$x(Wx,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),o[t]=r}),n&&(o.protocol||(o.protocol=n.protocol),o.userInfo||(o.userInfo=n.userInfo),o.port||"mce_host"!==o.host||(o.port=n.port),o.host&&"mce_host"!==o.host||(o.host=n.host),o.source=""),i&&(o.protocol="")}};Vx.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!==(e=new Vx(e,{base_uri:this})).host&&this.host!==e.host&&e.host||this.port!==e.port||this.protocol!==e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),r=e.getURI();return n===r||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===r?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new Vx(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=qx[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,o,i=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,o=e.length;r<o;r++)if(r>=n.length||e[r]!==n[r]){i=r+1;break}if(e.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.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},toAbsPath:function(e,t){var n,r,o,i=0,a=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),$x(e,function(e){e&&a.push(e)}),e=a,n=t.length-1,a=[];n>=0;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?i>0?i--:a.push(t[n]):i++);return 0!==(o=(n=e.length-i)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}},Vx.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},Vx.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t};var Gx=function(e,t,n){var r;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Yt.trim(Sg.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=ha(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);r=function(e,t){var n=Pc.getForcedRootBlock(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s||<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return t.replace(r,"")}(e,e.serializer.serialize(n,t))}return"text"===t.format||po(Gn.fromDom(n))?t.content=r:t.content=Yt.trim(r),t.no_events||e.fire("GetContent",t),t.content},Yx=function(e,t){t(e),e.firstChild&&Yx(e.firstChild,t),e.next&&Yx(e.next,t)},Kx=function(e,t,n){var r=function(e,t,n){var r={},o={},i=[];for(var a in n.firstChild&&Yx(n.firstChild,function(n){z(e,function(e){e.name===n.name&&(r[e.name]?r[e.name].nodes.push(n):r[e.name]={filter:e,nodes:[n]})}),z(t,function(e){"string"==typeof n.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(e){z(e.filter.callbacks,function(t){t(e.nodes,e.filter.name,{})})})},Xx=function(e){return e instanceof mb},Jx=function(e,t){e.dom.setHTML(e.getBody(),t),function(e){Jp(e)&&Au.firstPositionIn(e.getBody()).each(function(t){var n=t.getNode(),r=_o.isTable(n)?Au.firstPositionIn(n).getOr(t):t;e.selection.setRng(r.toRange())})}(e)},Zx=function(e,t,n){return void 0===n&&(n={}),n.format=n.format?n.format:"html",n.set=!0,n.content=Xx(t)?"":t,Xx(t)||n.no_events||(e.fire("BeforeSetContent",n),t=n.content),S.from(e.getBody()).fold(v(t),function(r){return Xx(t)?function(e,t,n,r){Kx(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=El({validate:e.validate},e.schema).serialize(n);return r.content=po(Gn.fromDom(t))?o:Yt.trim(o),Jx(e,r.content),r.no_events||e.fire("SetContent",r),n}(e,r,t,n):function(e,t,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===t.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+i+"</li>"),(o=Pc.getForcedRootBlock(e))&&e.schema.isValidChild(t.nodeName.toLowerCase(),o.toLowerCase())?(n=i,n=e.dom.createHTML(o,e.settings.forced_root_block_attrs,n)):n||(n='<br data-mce-bogus="1">'),Jx(e,n),e.fire("SetContent",r)):("raw"!==r.format&&(n=El({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=po(Gn.fromDom(t))?n:Yt.trim(n),Jx(e,r.content),r.no_events||e.fire("SetContent",r)),r.content}(e,r,t,n)})},Qx=ci.DOM,ew=function(e){return S.from(e).each(function(e){return e.destroy()})},tw=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Qx.remove(o.nextSibling),!e.inline&&r&&function(e){Qx.setStyle(e.id,"display",e.orgDisplay)}(e),kp(e),e.editorManager.remove(e),Qx.remove(e.getContainer()),ew(t),ew(n),e.destroy()}},nw=function(e,t){var n=e.selection,r=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),ew(n),ew(r)),function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),Qx.unbind(t,"submit reset",e.formEventDelegate))}(e),function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)}(e),e.destroyed=!0):e.remove())},rw=ci.DOM,ow=Yt.extend,iw=Yt.each,aw=Yt.resolve,sw=Ne.ie,cw=function(e,t,n){var r=this,o=r.documentBaseUrl=n.documentBaseURL,i=n.baseURI;t=function(e,t,n,r,o){var i=function(e,t,n){return{id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:t,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_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",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:n.convertURL,url_converter_scope:n,ie7_compat:!0}}(t,n,e);return zl(Pl,i,r,o)}(r,e,o,n.defaultSettings,t),r.settings=t,hi.language=t.language||"en",hi.languageLoad=t.language_load,hi.baseURL=n.baseURL,r.id=e,r.setDirty(!1),r.plugins={},r.documentBaseURI=new Vx(t.document_base_url,{base_uri:i}),r.baseURI=i,r.contentCSS=[],r.contentStyles=[],r.shortcuts=new zp(r),r.loadedCSS={},r.editorCommands=new hp(r),r.suffix=n.suffix,r.editorManager=n,r.inline=t.inline,r.buttons={},r.menuItems={},t.cache_suffix&&(Ne.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(Ne.overrideViewPort=!1),n.fire("SetupEditor",{editor:r}),r.execCallback("setup",r),r.$=pn.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})};ow(cw.prototype={render:function(){zx(this)},focus:function(e){Xp(this,e)},hasFocus:function(){return Jp(this)},execCallback:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?aw(r):0,o=aw(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},translate:function(e){if(e&&Yt.is(e,"string")){var t=this.settings.language||"en",n=this.editorManager.i18n;e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"})}return this.editorManager.translate(e)},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(void 0!==t?t:"{#"+e+"}")},getParam:function(e,t,n){return jl(this,e,t,n)},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.stateSelector&&void 0===t.active&&(t.active=!1),t.text||t.icon||(t.icon=e),n.buttons=n.buttons,t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return Ux(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems,n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:Sh.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(rw.show(this.getContainer()),rw.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this.getDoc();this.hidden||(sw&&e&&!this.inline&&e.execCommand("SelectAll"),this.save(),this.inline?(this.getBody().contentEditable=!1,this===this.editorManager.focusedEditor&&(this.editorManager.focusedEditor=null)):(rw.hide(this.getContainer()),rw.setStyle(this.id,"display",this.orgDisplay)),this.hidden=!0,this.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=this.setContent(void 0!==n.value?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},save:function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(o.nodeName)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=rw.getParent(r.id,"form"))&&iw(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){return Zx(this,e,t)},getContent:function(e){return function(e,t){return void 0===t&&(t={}),S.from(e.getBody()).fold(v("tree"===t.format?new mb("body",11):""),function(n){return Gx(e,t,n)})}(this,e)},insertContent:function(e,t){t&&(e=ow({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},setMode:function(e){!function(e,t){t!==Rp(e)&&(e.initialized?Np(e,"readonly"===t):e.on("init",function(){Np(e,"readonly"===t)}),Tp(e,t))}(this,e)},getContainer:function(){return this.container||(this.container=rw.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=rw.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var t,n=this,r=n.settings,o=n.dom;e=e||n.getBody(),void 0===n.hasVisual&&(n.hasVisual=r.visual),iw(o.select("table,a",e),function(e){var i;switch(e.nodeName){case"TABLE":return t=r.visual_table_class||"mce-item-table",void((i=o.getAttrib(e,"border"))&&"0"!==i||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t));case"A":return void(o.getAttrib(e,"href")||(i=o.getAttrib(e,"name")||e.id,t=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(e,t):o.removeClass(e,t)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){tw(this)},destroy:function(e){nw(this,e)},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},Bp);var uw,lw,fw,dw={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("mce-")}},mw=function(e,t){qn.detect().browser.isIE()?function(e){e.on("focusout",function(){up.store(e)})}(e):function(e,t){e.on("mouseup touchend",function(e){t.throttle()})}(e,t),e.on("keyup nodechange",function(t){(function(e){return"nodechange"===e.type&&e.selectionChange})(t)||up.store(e)})},pw=function(e){var t=ki(function(){up.store(e)},0);e.inline&&function(e,t){var n=function(){t.throttle()};ci.DOM.bind(document,"mouseup",n),e.on("remove",function(){ci.DOM.unbind(document,"mouseup",n)})}(e,t),e.on("init",function(){mw(e,t)}),e.on("remove",function(){t.cancel()})},hw=ci.DOM,gw=function(e){return dw.isEditorUIElement(e)},vw=function(e,t){var n=e?e.settings.custom_ui_selector:"";return null!==hw.getParent(t,function(t){return gw(t)||!!n&&e.dom.is(t,n)})},bw=function(e,t){var n=t.editor;pw(n),n.on("focusin",function(){var t=e.focusedEditor;t!==this&&(t&&t.fire("blur",{focusedEditor:this}),e.setActive(this),e.focusedEditor=this,this.fire("focus",{blurredEditor:t}),this.focus(!0))}),n.on("focusout",function(){var t=this;Pe.setEditorTimeout(t,function(){var n=e.focusedEditor;vw(t,function(){try{return document.activeElement}catch(e){return document.body}}())||n!==t||(t.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),uw||(uw=function(t){var n,r=e.activeEditor;n=t.target,r&&n.ownerDocument===document&&(n===document.body||vw(r,n)||e.focusedEditor!==r||(r.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},hw.bind(document,"focusin",uw))},yw=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(hw.unbind(document,"focusin",uw),uw=null)},xw=function(e){e.on("AddEditor",y(bw,e)),e.on("RemoveEditor",y(yw,e))},ww={},Cw="en",kw={setCode:function(e){e&&(Cw=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return Cw},rtl:!1,add:function(e,t){var n=ww[e];for(var r in n||(ww[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){var t=ww[Cw]||{},n=function(e){return Yt.is(e,"function")?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||Yt.is(e,"undefined")},o=function(e){return e=n(e),Yt.hasOwn(t,e)?n(t[e]):e};if(r(e))return"";if(Yt.is(e,"object")&&Yt.hasOwn(e,"raw"))return n(e.raw);if(Yt.is(e,"array")){var i=e.slice(1);e=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Yt.hasOwn(i,t)?n(i[t]):e})}return o(e).replace(/{context:\w+}$/,"")},data:ww},Tw=ci.DOM,_w=Yt.explode,Ew=Yt.each,Sw=Yt.extend,Nw=0,Rw=!1,Aw=[],Dw=[],Ow=function(e){Ew(fw.get(),function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})},Pw=function(e){e!==Rw&&(e?pn(window).on("resize scroll",Ow):pn(window).off("resize scroll",Ow),Rw=e)},Iw=function(e){var t=Dw;delete Aw[e.id];for(var n=0;n<Aw.length;n++)if(Aw[n]===e){Aw.splice(n,1);break}return Dw=$(Dw,function(t){return e!==t}),fw.activeEditor===e&&(fw.activeEditor=Dw.length>0?Dw[0]:null),fw.focusedEditor===e&&(fw.focusedEditor=null),t.length!==Dw.length};Sw(fw={defaultSettings:{},$:pn,majorVersion:"4",minorVersion:"8.3",releaseDate:"2018-09-13",editors:Aw,i18n:kw,activeEditor:null,settings:{},setup:function(){var e,t,n,r,o="";if(t=Vx.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,o=n.suffix;else{for(var i=document.getElementsByTagName("script"),a=0;a<i.length;a++){var s=(r=i[a].src).substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==s.indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!==(r=document.currentScript.src).indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/")))}this.baseURL=new Vx(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new Vx(this.baseURL),this.suffix=o,xw(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new Vx(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Vx(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e;var r=e.plugin_base_urls;for(var o in r)hi.PluginManager.urls[o]=r[o]},init:function(e){var t,n,r=this;n=Yt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var o=function(e){var t=e.id;return t||(t=(t=e.name)&&!Tw.get(t)?e.name:Tw.uniqueId(),e.setAttribute("id",t)),t},i=function(e,t){return t.constructor===RegExp?t.test(e.className):Tw.hasClass(e,t)},a=function(e){t=e},s=function(){var t,c=0,u=[],l=function(e,n,o){var i=new cw(e,n,r);u.push(i),i.on("init",function(){++c===t.length&&a(u)}),i.targetElm=i.targetElm||o,i.render()};Tw.unbind(window,"ready",s),function(t){var n=e[t];n&&n.apply(r,Array.prototype.slice.call(arguments,2))}("onpageload"),t=pn.unique(function(e){var t,n=[];if(Ne.ie&&Ne.ie<11)return fh.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(e.types)return Ew(e.types,function(e){n=n.concat(Tw.select(e.selector))}),n;if(e.selector)return Tw.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":(t=e.elements||"").length>0&&Ew(_w(t),function(e){var t;(t=Tw.get(e))?n.push(t):Ew(document.forms,function(t){Ew(t.elements,function(t){t.name===e&&(e="mce_editor_"+Nw++,Tw.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":Ew(Tw.select("textarea"),function(t){e.editor_deselector&&i(t,e.editor_deselector)||e.editor_selector&&!i(t,e.editor_selector)||n.push(t)})}return n}(e)),e.types?Ew(e.types,function(n){Yt.each(t,function(t){return!Tw.is(t,n.selector)||(l(o(t),Sw({},e,n),t),!1)})}):(Yt.each(t,function(e){var t;(t=r.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(Iw(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(t=Yt.grep(t,function(e){return!r.get(e.id)})).length?a([]):Ew(t,function(t){!function(e,t){return e.inline&&t.tagName.toLowerCase()in n}(e,t)?l(o(t),e,t):fh.initError("Could not initialize inline editor on invalid inline target element",t)}))};return r.settings=e,Tw.bind(window,"ready",s),new Re(function(e){t?e(t):a=function(t){e(t)}})},get:function(e){return 0===arguments.length?Dw.slice(0):R(e)?W(Dw,function(t){return t.id===e}).getOr(null):B(e)&&Dw[e]?Dw[e]:null},add:function(e){var t=this;return Aw[e.id]===e?e:(null===t.get(e.id)&&("length"!==e.id&&(Aw[e.id]=e),Aw.push(e),Dw.push(e)),Pw(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),lw||(lw=function(){t.fire("BeforeUnload")},Tw.bind(window,"beforeunload",lw)),e)},createEditor:function(e,t){return this.add(new cw(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!R(e))return n=e,O(r.get(n.id))?null:(Iw(n)&&r.fire("RemoveEditor",{editor:n}),0===Dw.length&&Tw.unbind(window,"beforeunload",lw),n.remove(),Pw(Dw.length>0),n);Ew(Tw.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=Dw.length-1;t>=0;t--)r.remove(Dw[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new cw(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",0,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){Ew(Dw,function(e){e.save()})},addI18n:function(e,t){kw.add(e,t)},translate:function(e){return kw.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},xp),fw.setup();var Bw=fw;function Mw(e){return{walk:function(t,n){return nl.walk(e,t,n)},split:tv.split,normalize:function(t){return Bm.normalize(e,t).fold(v(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}!function(e){e.compareRanges=Em.isEq,e.getCaretRangeFromPoint=Mb.fromPoint,e.getSelectedNode=qa,e.getNode=Va}(Mw||(Mw={}));var Lw,Fw,Hw=Mw,zw=Math.min,Uw=Math.max,$w=Math.round,jw=function(e,t,n){var r,o,i,a,s,c;return r=t.x,o=t.y,i=e.w,a=e.h,s=t.w,c=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=c),"r"===n[1]&&(r+=s),"c"===n[0]&&(o+=$w(c/2)),"c"===n[1]&&(r+=$w(s/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)),Ww(r,o,i,a)},Ww=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},qw={inflate:function(e,t,n){return Ww(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:jw,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=jw(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=Uw(e.x,t.x),r=Uw(e.y,t.y),o=zw(e.x+e.w,t.x+t.w),i=zw(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:Ww(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,s,c,u,l,f,d;return s=e.x,c=e.y,u=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=Uw(0,t.x-s),o=Uw(0,t.y-c),i=Uw(0,u-f),a=Uw(0,l-d),s+=r,c+=o,n&&(u+=r,l+=o,s-=i,c-=a),Ww(s,c,(u-=i)-s,(l-=a)-c)},create:Ww,fromClientRect:function(e){return Ww(e.left,e.top,e.width,e.height)}},Vw={},Gw={add:function(e,t){Vw[e.toLowerCase()]=t},has:function(e){return!!Vw[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=Vw.hasOwnProperty(t)?Vw[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=Vw[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},Yw=Yt.each,Kw=Yt.extend,Xw=function(){};Xw.extend=Lw=function(e){var t,n,r,o=this.prototype,i=function(){var e,t,n;if(!Fw&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},s=function(e,t){return function(){var n,r=this._super;return this._super=o[e],n=t.apply(this,arguments),this._super=r,n}};for(n in Fw=!0,t=new this,Fw=!1,e.Mixins&&(Yw(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),o.Mixins&&(e.Mixins=o.Mixins.concat(e.Mixins))),e.Methods&&Yw(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&Yw(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){return void 0!==e?(this[n]=e,this):this[n]}}),e.Statics&&Yw(e.Statics,function(e,t){i[t]=e}),e.Defaults&&o.Defaults&&(e.Defaults=Kw({},o.Defaults,e.Defaults)),e)"function"==typeof(r=e[n])&&o[n]?t[n]=s(n,r):t[n]=r;return i.prototype=t,i.constructor=i,i.extend=Lw,i};var Jw=Math.min,Zw=Math.max,Qw=Math.round,eC=function(e,t){var n,r,o,i;if(t=t||'"',null===e)return"null";if("string"==(o=typeof e))return r="\bb\tt\nn\ff\rr\"\"''\\\\",t+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,o){return'"'===t&&"'"===e?e:(n=r.indexOf(o))+1?"\\"+r.charAt(n+1):(e=o.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+t;if("object"===o){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(n=0,r="[";n<e.length;n++)r+=(n>0?",":"")+eC(e[n],t);return r+"]"}for(i in r="{",e)e.hasOwnProperty(i)&&(r+="function"!=typeof e[i]?(r.length>1?","+t:t)+i+t+":"+eC(e[i],t):"");return r+"}"}return""+e},tC={serialize:eC,parse:function(e){try{return JSON.parse(e)}catch(e){}}},nC={callbacks:{},count:0,send:function(e){var t=this,n=ci.DOM,r=void 0!==e.count?e.count:t.count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},rC={send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||n++>1e4?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e),t=null):setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",rC.fire("beforeInitialize",{settings:e}),t=new ph){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Yt.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=rC.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};Yt.extend(rC,xp);var oC,iC=Yt.extend,aC=function(e){this.settings=iC({},e),this.count=0};aC.sendRPC=function(e){return(new aC).send(e)},aC.prototype={send:function(e){var t=e.error,n=e.success;(e=iC(this.settings,e)).success=function(r,o){void 0===(r=tC.parse(r))&&(r={error:"JSON Parse error."}),r.error?t.call(e.error_scope||e.scope,r.error,o):n.call(e.success_scope||e.scope,r.result)},e.error=function(n,r){t&&t.call(e.error_scope||e.scope,n,r)},e.data=tC.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),e.content_type="application/json",rC.send(e)}};try{oC=window.localStorage}catch(e){oC=function(){return e={},t=[],n={getItem:function(t){var n=e[t];return n||null},setItem:function(n,r){t.push(n),e[n]=String(r)},key:function(e){return t[e]},removeItem:function(n){t=t.filter(function(e){return e===n}),delete e[n]},clear:function(){t=[],e={}},length:0},Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n;var e,t,n}()}var sC=Bw,cC={geom:{Rect:qw},util:{Promise:Re,Delay:Pe,Tools:Yt,VK:mg,URI:Vx,Class:Xw,EventDispatcher:vp,Observable:xp,I18n:kw,XHR:rC,JSON:tC,JSONRequest:aC,JSONP:nC,LocalStorage:oC,Color:function(e){var t={},n=0,r=0,o=0,i=function(e){var i;return"object"==typeof e?"r"in e?(n=e.r,r=e.g,o=e.b):"v"in e&&function(e,t,i){var a,s,c,u;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,i=parseInt(i,10)/100,t=Zw(0,Jw(t,1)),i=Zw(0,Jw(i,1)),0!==t){switch(a=e/60,c=(s=i*t)*(1-Math.abs(a%2-1)),u=i-s,Math.floor(a)){case 0:n=s,r=c,o=0;break;case 1:n=c,r=s,o=0;break;case 2:n=0,r=s,o=c;break;case 3:n=0,r=c,o=s;break;case 4:n=c,r=0,o=s;break;case 5:n=s,r=0,o=c;break;default:n=r=o=0}n=Qw(255*(n+u)),r=Qw(255*(r+u)),o=Qw(255*(o+u))}else n=r=o=Qw(255*i)}(e.h,e.s,e.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,t};return e&&i(e),t.toRgb=function(){return{r:n,g:r,b:o}},t.toHsv=function(){return function(e,t,n){var r,o,i,a;return o=0,(i=Jw(e/=255,Jw(t/=255,n/=255)))===(a=Zw(e,Zw(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:Qw(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/(a-i))),s:Qw(100*r),v:Qw(100*o)})}(n,r,o)},t.toHex=function(){var e=function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e};return"#"+e(n)+e(r)+e(o)},t.parse=i,t}},dom:{EventUtils:$e,Sizzle:_t,DomQuery:pn,TreeWalker:Zr,DOMUtils:ci,ScriptLoader:mi,RangeUtils:Hw,Serializer:Rb,ControlSelection:Ib,BookmarkManager:Db,Selection:fy,Event:$e.Event},html:{Styles:Zo,Entities:Ho,Node:mb,Schema:Xo,SaxParser:_g,DomParser:Tb,Writer:_l,Serializer:El},ui:{Factory:Gw},Env:Ne,AddOnManager:hi,Annotator:ul,Formatter:tb,UndoManager:Vg,EditorCommands:hp,WindowManager:ah,NotificationManager:ih,EditorObservable:Bp,Shortcuts:zp,Editor:cw,FocusManager:dw,EditorManager:Bw,DOM:ci.DOM,ScriptLoader:mi.ScriptLoader,PluginManager:hi.PluginManager,ThemeManager:hi.ThemeManager,trim:Yt.trim,isArray:Yt.isArray,is:Yt.is,toArray:Yt.toArray,makeMap:Yt.makeMap,each:Yt.each,map:Yt.map,grep:Yt.grep,inArray:Yt.inArray,extend:Yt.extend,create:Yt.create,walk:Yt.walk,createNS:Yt.createNS,resolve:Yt.resolve,explode:Yt.explode,_addCacheSuffix:Yt._addCacheSuffix,isOpera:Ne.opera,isWebKit:Ne.webkit,isIE:Ne.ie,isGecko:Ne.gecko,isMac:Ne.mac},uC=sC=Yt.extend(sC,cC);!function(e){window.tinymce=e,window.tinyMCE=e}(uC),function(t){try{e.exports=t}catch(e){}}(uC)}()}).call(t,n(2).setImmediate)},function(e,t){!function(){"use strict";var e,t=tinymce.util.Tools.resolve("tinymce.ThemeManager"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return!1!==i(e)},i=function(e){return e.getParam("menubar")},a=function(e){return e.getParam("toolbar_items_size")},s=function(e){return e.getParam("menu")},c=function(e){return!1===e.settings.skin},u=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.ui.Factory"),d=tinymce.util.Tools.resolve("tinymce.util.I18n"),m=function(e){return e.fire("SkinLoaded")},p=function(e){return e.fire("ResizeEditor")},h=function(e){return e.fire("BeforeRenderUI")},g=function(e,t){return function(){var n=e.find(t)[0];n&&n.focus(!0)}},v=function(e,t){e.shortcuts.add("Alt+F9","",g(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",g(t,"toolbar")),e.shortcuts.add("Alt+F11","",g(t,"elementpath")),t.on("cancel",function(){e.focus()})},b=tinymce.util.Tools.resolve("tinymce.geom.Rect"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),x=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},w=function(e){return function(){return e}},C=w(!1),k=w(!0),T=function(){return _},_=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e,t){return e()},is:C,isSome:C,isNone:k,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:T,ap:T,each:function(){},bind:T,flatten:T,exists:C,forall:k,filter:T,equals:e,equals_:e,toArray:function(){return[]},toString:w("none()")};return Object.freeze&&Object.freeze(r),r}(),E=function(e){var t=function(){return e},n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:k,isNone:C,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return E(t(e))},ap:function(t){return t.fold(T,function(t){return E(t(e))})},each:function(t){t(e)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(e)?o:_},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(C,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},S={some:E,none:T,from:function(e){return null===e||void 0===e?_:E(e)}},N=function(e){return e?e.getRoot().uiContainer:null},R={getUiContainerDelta:function(e){var t=N(e);if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var n=l.DOM.getPos(t),r=t.scrollLeft-n.x,o=t.scrollTop-n.y;return S.some({x:r,y:o})}return S.none()},setUiContainer:function(e,t){var n=l.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:N,inheritUiContainer:function(e,t){return t.uiContainer=N(e)}},A=function(e,t,n){var o,i=[];if(t)return r.each(t.split(/[ ,]/),function(t){var r,a=function(){var n=e.selection;t.settings.stateSelector&&n.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&n.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?o=null:(o||(o={type:"buttongroup",items:[]},i.push(o)),e.buttons[t]&&(r=t,"function"==typeof(t=e.buttons[r])&&(t=t()),t.type=t.type||"button",t.size=n,t=f.create(t),o.items.push(t),e.initialized?a():e.on("init",a)))}),{type:"toolbar",layout:"flow",items:i}},D=A,O=function(e,t){var n=[];if(r.each(function(e){var t=e.getParam("toolbar");return!1===t?[]:r.isArray(t)?r.grep(t,function(e){return e.length>0}):function(e,t){for(var n=[],r=1;r<10;r++){var o=e["toolbar"+r];if(!o)break;n.push(o)}var i=e.toolbar?[e.toolbar]:[t];return n.length>0?n:i}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image")}(e),function(r){var o;(o=r)&&n.push(A(e,o,t))}),n.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:n}},P=l.DOM,I=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},B=function(e,t){e.moveTo(t.left,t.top)},M=function(e,t,n,r,o,i){return i=I({x:t,y:n,w:i.w,h:i.h}),e&&(i=e({elementRect:I(r),contentAreaRect:I(o),panelRect:i})),i},L=function(e){var t,n=function(){return e.contextToolbars||[]},o=function(t,n){var o,i,a,s,c,u,l,f=function(e){return e.getParam("inline_toolbar_position_handler")}(e);if(!e.removed)if(t&&t.toolbar.panel){var d,m,p,h;l=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],c=t.toolbar.panel,n&&c.show(),d=t.element,m=P.getPos(e.getContentAreaContainer()),p=e.dom.getRect(d),"BODY"===(h=e.dom.getRoot()).nodeName&&(p.x-=h.ownerDocument.documentElement.scrollLeft||h.scrollLeft,p.y-=h.ownerDocument.documentElement.scrollTop||h.scrollTop),p.x+=m.x,p.y+=m.y,a=p,i=P.getRect(c.getEl()),s=P.getRect(e.getContentAreaContainer()||e.getBody());var g=R.getUiContainerDelta(c).getOr({x:0,y:0});if(a.x+=g.x,a.y+=g.y,i.x+=g.x,i.y+=g.y,s.x+=g.x,s.y+=g.y,"inline"!==P.getStyle(t.element,"display",!0)){var v=t.element.getBoundingClientRect();a.w=v.width,a.h=v.height}e.inline||(s.w=e.getDoc().documentElement.offsetWidth),e.selection.controlSelection.isResizable(t.element)&&a.w<25&&(a=b.inflate(a,0,8)),o=b.findBestRelativePosition(i,a,s,l),a=b.clamp(a,s),o?(u=b.relativePosition(i,a,o),B(c,M(f,u.x,u.y,a,s,i))):(s.h+=i.h,(a=b.intersect(s,a))?(o=b.findBestRelativePosition(i,a,s,["bc-tc","bl-tl","br-tr"]))?(u=b.relativePosition(i,a,o),B(c,M(f,u.x,u.y,a,s,i))):B(c,M(f,a.x,a.y,a,s,i)):c.hide()),function(e,t,n){t=t?t.substr(0,2):"",r.each({t:"down",b:"up"},function(r,o){e.classes.toggle("arrow-"+r,n(o,t.substr(0,1)))}),r.each({l:"left",r:"right"},function(r,o){e.classes.toggle("arrow-"+r,n(o,t.substr(1,1)))})}(c,o,function(e,t){return e===t})}else!function(e){r.each(e.contextToolbars,function(e){e.panel&&e.panel.hide()})}(e)},i=function(t){return function(){y.requestAnimationFrame(function(){e.selection&&o(c(e.selection.getNode()),t)})}},a=function(n){var r;if(n.toolbar.panel)return n.toolbar.panel.show(),void o(n);r=f.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:D(e,n.toolbar.items),oncancel:function(){e.focus()}}),R.setUiContainer(e,r),function(n){if(!t){var r=i(!0),o=R.getUiContainer(n);t=e.selection.getScrollContainer()||e.getWin(),P.bind(t,"scroll",r),P.bind(o,"scroll",r),e.on("remove",function(){P.unbind(t,"scroll",r),P.unbind(o,"scroll",r)})}}(r),n.toolbar.panel=r,r.renderTo().reflow(),o(n)},s=function(){r.each(n(),function(e){e.panel&&e.panel.hide()})},c=function(t){var r,o,i,a=n();for(r=(i=e.$(t).parents().add(t)).length-1;r>=0;r--)for(o=a.length-1;o>=0;o--)if(a[o].predicate(i[r]))return{toolbar:a[o],element:i[r]};return null};e.on("click keyup setContent ObjectResized",function(t){("setcontent"!==t.type||t.selection)&&y.setEditorTimeout(e,function(){var t;(t=c(e.selection.getNode()))?(s(),a(t)):s()})}),e.on("blur hide contextmenu",s),e.on("ObjectResizeStart",function(){var t=c(e.selection.getNode());t&&t.toolbar.panel&&t.toolbar.panel.hide()}),e.on("ResizeEditor ResizeWindow",i(!0)),e.on("nodeChange",i(!1)),e.on("remove",function(){r.each(n(),function(e){e.panel&&e.panel.remove()}),e.contextToolbars={}}),e.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var t=c(e.selection.getNode());t&&t.toolbar.panel&&t.toolbar.panel.items()[0].focus()})},F=function(e){return function(t){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(t)===e}},H=F("function"),z=F("number"),U=void 0===(e=Array.prototype.indexOf)?function(e,t){return Y(e,t)}:function(t,n){return e.call(t,n)},$=function(e,t){return G(e,t).isSome()},j=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},W=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},q=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},V=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return S.some(o)}return S.none()},G=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return S.some(n);return S.none()},Y=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},K=Array.prototype.push,X=(Array.prototype.slice,H(Array.from)&&Array.from,{file:{title:"File",items:"newdocument restoredraft | preview | print"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code"},table:{title:"Table"},help:{title:"Help"}}),J=function(e,t){return"|"===e?{name:"|",item:{text:"|"}}:t?{name:e,item:t}:null},Z=function(e){return e&&"|"===e.item.text},Q=function(e,t,n,o){var i,a,s,c;return t?(a=t[o],c=!0):a=X[o],a&&(i={text:a.title},s=[],r.each((a.items||"").split(/[ ,]/),function(t){var n=J(t,e[t]);n&&s.push(n)}),c||r.each(e,function(e,t){e.context!==o||function(e,t){return G(e,function(e){return e.name===t}).isSome()}(s,t)||("before"===e.separator&&s.push({name:"|",item:{text:"|"}}),e.prependToContext?s.unshift(J(t,e)):s.push(J(t,e)),"after"===e.separator&&s.push({name:"|",item:{text:"|"}}))}),i.menu=j(function(e,t){var n=q(e,function(e){return!1===t.hasOwnProperty(e.name)}),r=q(n,function(e,t,n){return!Z(e)||!Z(n[t-1])});return q(r,function(e,t,n){return!Z(e)||t>0&&t<n.length-1})}(s,n),function(e){return e.item}),!i.menu.length)?null:i},ee=function(e){for(var t=[],n=function(e){var t,n=[],r=s(e);if(r)for(t in r)n.push(t);else for(t in X)n.push(t);return n}(e),o=r.makeMap(function(e){return e.getParam("removed_menuitems","")}(e).split(/[ ,]/)),a=i(e),c="string"==typeof a?a.split(/[ ,]/):n,u=0;u<c.length;u++){var l=c[u],f=Q(e.menuItems,s(e),o,l);f&&t.push(f)}return t},te=l.DOM,ne=function(e){return{width:e.clientWidth,height:e.clientHeight}},re=function(e,t,n){var r,o,i,a;r=e.getContainer(),o=e.getContentAreaContainer().firstChild,i=ne(r),a=ne(o),null!==t&&(t=Math.max(function(e){return e.getParam("min_width",100,"number")}(e),t),t=Math.min(function(e){return e.getParam("max_width",65535,"number")}(e),t),te.setStyle(r,"width",t+(i.width-a.width)),te.setStyle(o,"width",t)),n=Math.max(function(e){return e.getParam("min_height",100,"number")}(e),n),n=Math.min(function(e){return e.getParam("max_height",65535,"number")}(e),n),te.setStyle(o,"height",n),p(e)},oe=re,ie=function(e,t,n){var r=e.getContentAreaContainer();re(e,r.clientWidth+t,r.clientHeight+n)},ae=tinymce.util.Tools.resolve("tinymce.Env"),se=function(e,t,n){var r,o=e.settings[n];o&&o((r=t.getEl("body"),{element:function(){return r}}))},ce=function(e,t,n){return function(o){var i=o.control,a=i.parents().filter("panel")[0],s=a.find("#"+t)[0],c=function(e,t){return r.grep(e,function(e){return e.name===t})[0]}(n,t);!function(e,t,n){r.each(n,function(n){var r=t.items().filter("#"+n.name)[0];r&&r.visible()&&n.name!==e&&(se(n,r,"onhide"),r.visible(!1))})}(t,a,n),i.parent().items().each(function(e){e.active(!1)}),s&&s.visible()?(se(c,s,"onhide"),s.hide(),i.active(!1)):(s?(s.show(),se(c,s,"onshow")):(s=f.create({type:"container",name:t,layout:"stack",classes:"sidebar-panel",html:""}),a.prepend(s),se(c,s,"onrender"),se(c,s,"onshow")),i.active(!0)),p(e)}},ue=function(e){return!(ae.ie&&!(ae.ie>=11)||!e.sidebars)&&e.sidebars.length>0},le=function(e){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:r.map(e.sidebars,function(t){var n=t.settings;return{type:"button",icon:n.icon,image:n.image,tooltip:n.tooltip,onclick:ce(e,t.name,e.sidebars)}})}]}},fe=function(e){var t=function(){e._skinLoaded=!0,m(e)};return function(){e.initialized?t():e.on("init",t)}},de=l.DOM,me=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},pe=function(e,t,n){var r,i,s;if(!1===c(e)&&n.skinUiCss?de.styleSheetLoader.load(n.skinUiCss,fe(e)):fe(e)(),r=t.panel=f.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[!1===o(e)?null:{type:"menubar",border:"0 0 1 0",items:ee(e)},O(e,a(e))]},ue(e)?function(e){return{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[me("0"),le(e)]}}(e):me("1 0 0 0")]}),R.setUiContainer(e,r),"none"!==u(e)&&(i={type:"resizehandle",direction:u(e),onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;s={width:t.clientWidth,height:t.clientHeight}},onResize:function(t){"both"===u(e)?oe(e,s.width+t.deltaX,s.height+t.deltaY):oe(e,null,s.height+t.deltaY)}}),function(e){return e.getParam("statusbar",!0,"boolean")}(e)){var l=d.translate(["Powered by {0}",'<a href="https://www.tinymce.com/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">tinymce</a>']),m=function(e){return e.getParam("branding",!0,"boolean")}(e)?{type:"label",classes:"branding",html:" "+l}:null;r.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:e},i,m]})}return h(e),e.on("SwitchMode",function(e){return function(t){e.find("*").disabled("readonly"===t.mode)}}(r)),r.renderBefore(n.targetNode).reflow(),function(e){return e.getParam("readonly",!1,"boolean")}(e)&&e.setMode("readonly"),n.width&&de.setStyle(r.getEl(),"width",n.width),e.on("remove",function(){r.remove(),r=null}),v(e,r),L(e),{iframeContainer:r.find("#iframe")[0].getEl(),editorContainer:r.getEl()}},he=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),ge=0,ve={id:function(){return"mceu_"+ge++},create:function(e,t,n){var o=document.createElement(e);return l.DOM.setAttribs(o,t),"string"==typeof n?o.innerHTML=n:r.each(n,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return l.DOM.createFragment(e)},getWindowSize:function(){return l.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return l.DOM.getPos(e,t||ve.getContainer())},getContainer:function(){return ae.container?ae.container:document.body},getViewPort:function(e){return l.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return l.DOM.addClass(e,t)},removeClass:function(e,t){return l.DOM.removeClass(e,t)},hasClass:function(e,t){return l.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return l.DOM.toggleClass(e,t,n)},css:function(e,t,n){return l.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return l.DOM.getStyle(e,t,!0)},on:function(e,t,n,r){return l.DOM.bind(e,t,n,r)},off:function(e,t,n){return l.DOM.unbind(e,t,n)},fire:function(e,t,n){return l.DOM.fire(e,t,n)},innerHtml:function(e,t){l.DOM.setHTML(e,t)}},be=function(e){return"static"===ve.getRuntimeStyle(e,"position")},ye=function(e){return e.state.get("fixed")};function xe(e,t,n){var r,o,i,a,s,c,u,l,f,d;return f=we(),i=(o=ve.getPos(t,R.getUiContainer(e))).x,a=o.y,ye(e)&&be(document.body)&&(i-=f.x,a-=f.y),r=e.getEl(),s=(d=ve.getSize(r)).width,c=d.height,u=(d=ve.getSize(t)).width,l=d.height,"b"===(n=(n||"").split(""))[0]&&(a+=l),"r"===n[1]&&(i+=u),"c"===n[0]&&(a+=Math.round(l/2)),"c"===n[1]&&(i+=Math.round(u/2)),"b"===n[3]&&(a-=c),"r"===n[4]&&(i-=s),"c"===n[3]&&(a-=Math.round(c/2)),"c"===n[4]&&(i-=Math.round(s/2)),{x:i,y:a,w:s,h:c}}var we=function(){var e=window,t=Math.max(e.pageXOffset,document.body.scrollLeft,document.documentElement.scrollLeft),n=Math.max(e.pageYOffset,document.body.scrollTop,document.documentElement.scrollTop);return{x:t,y:n,w:t+(e.innerWidth||document.documentElement.clientWidth),h:n+(e.innerHeight||document.documentElement.clientHeight)}},Ce=function(e){var t=R.getUiContainer(e);return t&&!ye(e)?function(e){return{x:0,y:0,w:e.scrollWidth-1,h:e.scrollHeight-1}}(t):we()},ke={testMoveRel:function(e,t){for(var n=Ce(this),r=0;r<t.length;r++){var o=xe(this,e,t[r]);if(ye(this)){if(o.x>0&&o.x+o.w<n.w&&o.y>0&&o.y+o.h<n.h)return t[r]}else if(o.x>n.x&&o.x+o.w<n.w&&o.y>n.y&&o.y+o.h<n.h)return t[r]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=xe(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){function n(e,t,n){return e<0?0:e+n>t&&(e=t-n)<0?0:e}if(this.settings.constrainToViewport){var r=Ce(this),o=this.layoutRect();e=n(e,r.w,o.w),t=n(t,r.h,o.h)}var i=R.getUiContainer(this);return i&&be(i)&&!ye(this)&&(e-=i.scrollLeft,t-=i.scrollTop),i&&(e+=1,t+=1),this.state.get("rendered")?this.layoutRect({x:e,y:t}).repaint():(this.settings.x=e,this.settings.y=t),this.fire("move",{x:e,y:t}),this}},Te=tinymce.util.Tools.resolve("tinymce.util.Class"),_e=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Ee=function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},Se=function(e,t){function n(t){var n=parseFloat(function(t){var n=e.ownerDocument.defaultView;if(n){var r=n.getComputedStyle(e,null);return r?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),r.getPropertyValue(t)):null}return e.currentStyle[t]}(t));return isNaN(n)?0:n}return{top:n(t+"TopWidth"),right:n(t+"RightWidth"),bottom:n(t+"BottomWidth"),left:n(t+"LeftWidth")}};function Ne(){}function Re(e){this.cls=[],this.cls._map={},this.onchange=e||Ne,this.prefix=""}r.extend(Re.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){var t=void 0;for(t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),Re.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)t>0&&(e+=" "),e+=this.prefix+this.cls[t];return e};var Ae,De,Oe,Pe=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,Ie=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Be=/^\s*|\s*$/g,Me=Te.extend({init:function(e){var t=this.match;function n(e,n,o){var i;function a(e){e&&n.push(e)}return a(function(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}((i=Pe.exec(e.replace(Be,"")))[1])),a(function(e){if(e)return function(t){return t._name===e}}(i[2])),a(function(e){if(e)return e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}}(i[3])),a(function(e,t,n){if(e)return function(r){var o=r[e]?r[e]():"";return t?"="===t?o===n:"*="===t?o.indexOf(n)>=0:"~="===t?(" "+o+" ").indexOf(" "+n+" ")>=0:"!="===t?o!==n:"^="===t?0===o.indexOf(n):"$="===t&&o.substr(o.length-n.length)===n:!!n}}(i[4],i[5],i[6])),a(function(e){var n;if(e)return(e=/(?:not\((.+)\))|(.+)/i.exec(e))[1]?(n=r(e[1],[]),function(e){return!t(e,n)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2==0:"odd"===e?n%2==1:!!t[e]&&t[e]()})}(i[7])),n.pseudo=!!i[7],n.direct=o,n}function r(e,t){var o,i,a,s=[];do{if(Ie.exec(""),(i=Ie.exec(e))&&(e=i[3],s.push(i[1]),i[2])){o=i[3];break}}while(i);for(o&&r(o,t),e=[],a=0;a<s.length;a++)">"!==s[a]&&e.push(n(s[a],[],">"===s[a-1]));return t.push(e),t}this._selectors=r(e,[])},match:function(e,t){var n,r,o,i,a,s,c,u,l,f,d,m,p;for(n=0,r=(t=t||this._selectors).length;n<r;n++){for(p=e,m=0,o=(i=(a=t[n]).length)-1;o>=0;o--)for(u=a[o];p;){if(u.pseudo)for(l=f=(d=p.parent().items()).length;l--&&d[l]!==p;);for(s=0,c=u.length;s<c;s++)if(!u[s](p,l,f)){s=c+1;break}if(s===c){m++;break}if(o===i-1)break;p=p.parent()}if(m===i)return!0}return!1},find:function(e){var t,n,r=[],o=this._selectors;function i(e,t,n){var o,a,s,c,u,l=t[n];for(o=0,a=e.length;o<a;o++){for(u=e[o],s=0,c=l.length;s<c;s++)if(!l[s](u,o,a)){s=c+1;break}if(s===c)n===t.length-1?r.push(u):u.items&&i(u.items(),t,n+1);else if(l.direct)return;u.items&&i(u.items(),t,n)}}if(e.items){for(t=0,n=o.length;t<n;t++)i(e.items(),o[t],0);n>1&&(r=function(e){for(var t,n=[],r=e.length;r--;)(t=e[r]).__checked||(n.push(t),t.__checked=1);for(r=n.length;r--;)delete n[r].__checked;return n}(r))}return Ae||(Ae=Me.Collection),new Ae(r)}}),Le=Array.prototype.push,Fe=Array.prototype.slice;Oe={length:0,init:function(e){e&&this.add(e)},add:function(e){return r.isArray(e)?Le.apply(this,e):e instanceof De?this.add(e.toArray()):Le.call(this,e),this},set:function(e){var t,n=this.length;for(this.length=0,this.add(e),t=this.length;t<n;t++)delete this[t];return this},filter:function(e){var t,n,r,o,i=[];for("string"==typeof e?(e=new Me(e),o=function(t){return e.match(t)}):o=e,t=0,n=this.length;t<n;t++)o(r=this[t])&&i.push(r);return new De(i)},slice:function(){return new De(Fe.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return r.each(this,e),this},toArray:function(){return r.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new De(r.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(e,t){var n;return void 0!==t?(this.each(function(n){n[e]&&n[e](t)}),this):(n=this[0])&&n[e]?n[e]():void 0},exec:function(e){var t=r.toArray(arguments).slice(1);return this.each(function(n){n[e]&&n[e].apply(n,t)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},r.each("fire on off show hide append prepend before after reflow".split(" "),function(e){Oe[e]=function(){var t=r.toArray(arguments);return this.each(function(n){e in n&&n[e].apply(n,t)}),this}}),r.each("text name disabled active selected checked visible parent value data".split(" "),function(e){Oe[e]=function(t){return this.prop(e,t)}}),De=Te.extend(Oe),Me.Collection=De;var He=De,ze=function(e){this.create=e.create};ze.create=function(e,t){return new ze({create:function(n,r){var o,i=function(e){n.set(r,e.value)};return n.on("change:"+r,function(n){e.set(t,n.value)}),e.on("change:"+t,i),(o=n._bindings)||(o=n._bindings=[],n.on("destroy",function(){for(var e=o.length;e--;)o[e]()})),o.push(function(){e.off("change:"+t,i)}),e.get(t)}})};var Ue=tinymce.util.Tools.resolve("tinymce.util.Observable");function $e(e){return e.nodeType>0}var je,We,qe=Te.extend({Mixins:[Ue],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof ze&&(e[t]=n.create(this,t));this.data=e},set:function(e,t){var n,o,i=this.data[e];if(t instanceof ze&&(t=t.create(this,e)),"object"==typeof e){for(n in e)this.set(n,e[n]);return this}return function e(t,n){var o,i;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(r.isArray(n)){if(t.length!==n.length)return!1;for(o=t.length;o--;)if(!e(t[o],n[o]))return!1}if($e(t)||$e(n))return t===n;for(o in i={},n){if(!e(t[o],n[o]))return!1;i[o]=!0}for(o in t)if(!i[o]&&!e(t[o],n[o]))return!1;return!0}(i,t)||(this.data[e]=t,o={target:this,name:e,value:t,oldValue:i},this.fire("change:"+e,o),this.fire("change",o)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return ze.create(this,e)},destroy:function(){this.fire("destroy")}}),Ve={},Ge={add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;Ve[t._id]||(Ve[t._id]=t),je||(je=!0,y.requestAnimationFrame(function(){var e,t;for(e in je=!1,Ve)(t=Ve[e]).state.get("rendered")&&t.reflow();Ve={}},document.body))}},remove:function(e){Ve[e._id]&&delete Ve[e._id]}},Ye="onmousewheel"in document,Ke=!1,Xe=0,Je={Statics:{classPrefix:"mce-"},isRtl:function(){return We.rtl},classPrefix:"mce-",init:function(e){var t,n,o=this;function i(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)o.classes.add(e[t])}o.settings=e=r.extend({},o.Defaults,e),o._id=e.id||"mceu_"+Xe++,o._aria={role:e.role},o._elmCache={},o.$=he,o.state=new qe({visible:!0,active:!1,disabled:!1,value:""}),o.data=new qe(e.data),o.classes=new Re(function(){o.state.get("rendered")&&(o.getEl().className=this.toString())}),o.classes.prefix=o.classPrefix,(t=e.classes)&&(o.Defaults&&(n=o.Defaults.classes)&&t!==n&&i(n),i(t)),r.each("title text name visible disabled active value".split(" "),function(t){t in e&&o[t](e[t])}),o.on("click",function(){if(o.disabled())return!1}),o.settings=e,o.borderBox=Ee(e.border),o.paddingBox=Ee(e.padding),o.marginBox=Ee(e.margin),e.hidden&&o.hide()},Properties:"parent,name",getContainerElm:function(){var e=R.getUiContainer(this);return e||ve.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,r,o,i,a,s,c,u,l=this.settings,f=this.getEl();e=this.borderBox=this.borderBox||Se(f,"border"),this.paddingBox=this.paddingBox||Se(f,"padding"),this.marginBox=this.marginBox||Se(f,"margin"),u=ve.getSize(f),s=l.minWidth,c=l.minHeight,o=s||u.width,i=c||u.height,n=l.width,r=l.height,a=void 0!==(a=l.autoResize)?a:!n&&!r,n=n||o,r=r||i;var d=e.left+e.right,m=e.top+e.bottom,p=l.maxWidth||65535,h=l.maxHeight||65535;return this._layoutRect=t={x:l.x||0,y:l.y||0,w:n,h:r,deltaW:d,deltaH:m,contentW:n-d,contentH:r-m,innerW:n-d,innerH:r-m,startMinWidth:s||0,startMinHeight:c||0,minW:Math.min(o,p),minH:Math.min(i,h),maxW:p,maxH:h,autoResize:a,scrollW:0},this._lastLayoutRect={},t},layoutRect:function(e){var t,n,r,o,i,a=this._layoutRect;return a||(a=this.initLayoutRect()),e?(r=a.deltaW,o=a.deltaH,void 0!==e.x&&(a.x=e.x),void 0!==e.y&&(a.y=e.y),void 0!==e.minW&&(a.minW=e.minW),void 0!==e.minH&&(a.minH=e.minH),void 0!==(n=e.w)&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-r),void 0!==(n=e.h)&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-o),void 0!==(n=e.innerW)&&(n=(n=n<a.minW-r?a.minW-r:n)>a.maxW-r?a.maxW-r:n,a.innerW=n,a.w=n+r),void 0!==(n=e.innerH)&&(n=(n=n<a.minH-o?a.minH-o:n)>a.maxH-o?a.maxH-o:n,a.innerH=n,a.h=n+o),void 0!==e.contentW&&(a.contentW=e.contentW),void 0!==e.contentH&&(a.contentH=e.contentH),(t=this._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((i=We.repaintControls)&&i.map&&!i.map[this._id]&&(i.push(this),i.map[this._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),this):a},repaint:function(){var e,t,n,r,o,i,a,s,c,u;c=document.createRange?function(e){return e}:Math.round,e=this.getEl().style,r=this._layoutRect,s=this._lastRepaintRect||{},i=(o=this.borderBox).left+o.right,a=o.top+o.bottom,r.x!==s.x&&(e.left=c(r.x)+"px",s.x=r.x),r.y!==s.y&&(e.top=c(r.y)+"px",s.y=r.y),r.w!==s.w&&(u=c(r.w-i),e.width=(u>=0?u:0)+"px",s.w=r.w),r.h!==s.h&&(u=c(r.h-a),e.height=(u>=0?u:0)+"px",s.h=r.h),this._hasBody&&r.innerW!==s.innerW&&(u=c(r.innerW),(n=this.getEl("body"))&&((t=n.style).width=(u>=0?u:0)+"px"),s.innerW=r.innerW),this._hasBody&&r.innerH!==s.innerH&&(u=c(r.innerH),(n=n||this.getEl("body"))&&((t=t||n.style).height=(u>=0?u:0)+"px"),s.innerH=r.innerH),this._lastRepaintRect=s,this.fire("repaint",{},!1)},updateLayoutRect:function(){this.parent()._lastRect=null,ve.css(this.getEl(),{width:"",height:""}),this._layoutRect=this._lastRepaintRect=this._lastLayoutRect=null,this.initLayoutRect()},on:function(e,t){var n=this;return Ze(n).on(e,function(e){var t,r;return"string"!=typeof e?e:function(o){return t||n.parentsAndSelf().each(function(n){var o=n.settings.callbacks;if(o&&(t=o[e]))return r=n,!1}),t?t.call(r,o):(o.action=e,void this.fire("execute",o))}}(t)),n},off:function(e,t){return Ze(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=Ze(this).fire(e,t),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},hasEventListeners:function(e){return Ze(this).has(e)},parents:function(e){var t,n=new He;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new He(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=he("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this.getEl(this.ariaTarget);return void 0===t?this._aria[e]:(this._aria[e]=t,this.state.get("rendered")&&n.setAttribute("role"===e?e:"aria-"+e,t),this)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return We.translate?We.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var e,t,n=this,r=n.getEl(),o=n.parent();if(n.items){var i=n.items().toArray();for(t=i.length;t--;)i[t].remove()}o&&o.items&&(e=[],o.items().each(function(t){t!==n&&e.push(t)}),o.items().set(e),o._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&he(r).off();var a=n.getRoot().controlIdLookup;return a&&delete a[n._id],r&&r.parentNode&&r.parentNode.removeChild(r),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return he(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return he(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,r,o,i=this,a=i.settings;for(r in i.$el=he(i.getEl()),i.state.set("rendered",!0),a)0===r.indexOf("on")&&i.on(r.substr(2),a[r]);if(i._eventsRoot){for(n=i.parent();!o&&n;n=n.parent())o=n._eventsRoot;if(o)for(r in o._nativeEvents)i._nativeEvents[r]=!0}Qe(i),a.style&&(e=i.getEl())&&(e.setAttribute("style",a.style),e.style.cssText=a.style),i.settings.border&&(t=i.borderBox,i.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var s=i.getRoot();for(var c in s.controlIdLookup||(s.controlIdLookup={}),s.controlIdLookup[i._id]=i,i._aria)i.aria(c,i._aria[c]);!1===i.state.get("visible")&&(i.getEl().style.display="none"),i.bindStates(),i.state.on("change:visible",function(e){var t,n=e.value;i.state.get("rendered")&&(i.getEl().style.display=!1===n?"none":"",i.getEl().getBoundingClientRect()),(t=i.parent())&&(t._lastRect=null),i.fire(n?"show":"hide"),Ge.add(i)}),i.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,r,o,i,a,s=this.getEl(),c=s.parentNode,u=function(e,t){var n,r,o=e;for(n=r=0;o&&o!==t&&o.nodeType;)n+=o.offsetLeft||0,r+=o.offsetTop||0,o=o.offsetParent;return{x:n,y:r}}(s,c);return t=u.x,n=u.y,r=s.offsetWidth,o=s.offsetHeight,i=c.clientWidth,a=c.clientHeight,"end"===e?(t-=i-r,n-=a-o):"center"===e&&(t-=i/2-r/2,n-=a/2-o/2),c.scrollLeft=t,c.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),e=t,t=t.parent()}e||(e=this);for(var r=n.length;r--;)n[r].rootControl=e;return e},reflow:function(){Ge.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function Ze(e){return e._eventDispatcher||(e._eventDispatcher=new _e({scope:e,toggleEvent:function(t,n){n&&_e.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&Qe(e))}})),e._eventDispatcher}function Qe(e){var t,n,r,o,i,a;function s(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function c(){var e=o._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),o._lastHoverCtrl=null)}function u(t){var n,r,i,a=e.getParentCtrl(t.target),s=o._lastHoverCtrl,c=0;if(a!==s){if(o._lastHoverCtrl=a,(r=a.parents().toArray().reverse()).push(a),s){for((i=s.parents().toArray().reverse()).push(s),c=0;c<i.length&&r[c]===i[c];c++);for(n=i.length-1;n>=c;n--)(s=i[n]).fire("mouseleave",{target:s.getEl()})}for(n=c;n<r.length;n++)(a=r[n]).fire("mouseenter",{target:a.getEl()})}}function l(t){t.preventDefault(),"mousewheel"===t.type?(t.deltaY=-.025*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-.025*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=e.fire("wheel",t)}if(i=e._nativeEvents){for((r=e.parents().toArray()).unshift(e),t=0,n=r.length;!o&&t<n;t++)o=r[t]._eventsRoot;for(o||(o=r[r.length-1]||e),e._eventsRoot=o,n=t,t=0;t<n;t++)r[t]._eventsRoot=o;var f=o._delegates;for(a in f||(f=o._delegates={}),i){if(!i)return!1;"wheel"!==a||Ke?("mouseenter"===a||"mouseleave"===a?o._hasMouseEnter||(he(o.getEl()).on("mouseleave",c).on("mouseover",u),o._hasMouseEnter=1):f[a]||(he(o.getEl()).on(a,s),f[a]=!0),i[a]=!1):Ye?he(e.getEl()).on("mousewheel",l):he(e.getEl()).on("DOMMouseScroll",l)}}}r.each("text title visible disabled active value".split(" "),function(e){Je[e]=function(t){return 0===arguments.length?this.state.get(e):(void 0!==t&&this.state.set(e,t),this)}});var et=We=Te.extend(Je),tt=function(e){return!!e.getAttribute("data-mce-tabstop")};function nt(e){var t,n,r=e.root;function o(e){return e&&1===e.nodeType}try{t=document.activeElement}catch(e){t=document.body}function i(e){return o(e=e||t)?e.getAttribute("role"):null}function a(e){for(var n,r=e||t;r=r.parentNode;)if(n=i(r))return n}function s(e){var n=t;if(o(n))return n.getAttribute("aria-"+e)}function c(e){var t=e.tagName.toUpperCase();return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}function u(e){var t=[];return function e(n){if(1===n.nodeType&&"none"!==n.style.display&&!n.disabled){(function(e){return!(!c(e)||e.hidden)||!!tt(e)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(i(e))})(n)&&t.push(n);for(var r=0;r<n.childNodes.length;r++)e(n.childNodes[r])}}(e||r.getEl()),t}function l(e){var t,r;(r=(e=e||n).parents().toArray()).unshift(e);for(var o=0;o<r.length&&!(t=r[o]).settings.ariaRoot;o++);return t}function f(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,n){var r=-1,o=l();n=n||u(o.getEl());for(var i=0;i<n.length;i++)n[i]===t&&(r=i);r+=e,o.lastAriaIndex=f(r,n)}function m(){"tablist"===a()?d(-1,u(t.parentNode)):n.parent().submenu?v():d(-1)}function p(){var e=i(),n=a();"tablist"===n?d(1,u(t.parentNode)):"menuitem"===e&&"menu"===n&&s("haspopup")?b():d(1)}function h(){d(-1)}function g(){var e=i(),t=a();"menuitem"===e&&"menubar"===t?b():"button"===e&&s("haspopup")?b({key:"down"}):d(1)}function v(){n.fire("cancel")}function b(e){e=e||{},n.fire("click",{target:t,aria:e})}return n=r.getParentCtrl(t),r.on("keydown",function(e){function r(e,n){c(t)||tt(t)||"slider"!==i(t)&&!1!==n(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:r(e,m);break;case 39:r(e,p);break;case 38:r(e,h);break;case 40:r(e,g);break;case 27:v();break;case 14:case 13:case 32:r(e,b);break;case 9:!function(e){if("tablist"===a()){var t=u(n.getEl("body"))[0];t&&t.focus()}else d(e.shiftKey?-1:1)}(e),e.preventDefault()}}),r.on("focusin",function(e){t=e.target,n=e.control}),{focusFirst:function(e){var t=l(e),n=u(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?f(t.lastAriaIndex,n):f(0,n)}}}var rt={},ot=et.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new He,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new Re(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=f.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=rt[e]=rt[e]||new Me(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,r;if(!e||!(n=this.keyboardNav||this.parents().eq(-1)[0].keyboardNav))return r=this.find("*"),this.statusbar&&r.add(this.statusbar.items()),r.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),this;n.focusFirst(this)},replace:function(e,t){for(var n,r=this.items(),o=r.length;o--;)if(r[o]===e){r[o]=t;break}o>=0&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,o=[];return r.isArray(e)||(e=[e]),r.each(e,function(e){e&&(e instanceof et||("string"==typeof e&&(e={type:e}),t=r.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=f.create(t)),o.push(e))}),o},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||((r=e.getEl("body")).hasChildNodes()&&n<=r.childNodes.length-1?he(r.childNodes[n]).before(t.renderHtml()):he(r).append(t.renderHtml()),t.postRender(),Ge.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var r,o,i;return e=this.create(e),r=this.items(),!n&&t<r.length-1&&(t+=1),t>=0&&t<r.length&&(o=r.slice(0,t).toArray(),i=r.slice(t).toArray(),r.set(o.concat(e,i))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var e={};return this.find("*").each(function(t){var n=t.name(),r=t.value();n&&void 0!==r&&(e[n]=r)}),e},renderHtml:function(){var e=this._layout,t=this.settings.role;return this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"'+(t?' role="'+this.settings.role+'"':"")+'><div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"},postRender:function(){var e;return this.items().exec("postRender"),this._super(),this._layout.postRender(this),this.state.set("rendered",!0),this.settings.style&&this.$el.css(this.settings.style),this.settings.border&&(e=this.borderBox,this.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),this.parent()||(this.keyboardNav=nt({root:this})),this},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this._layoutRect,t=this._lastRect;if(!t||t.w!==e.w||t.h!==e.h)return this._layout.recalc(this),e=this.layoutRect(),this._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var e;if(Ge.remove(this),this.visible()){for(et.repaintControls=[],et.repaintControls.map={},this.recalc(),e=et.repaintControls.length;e--;)et.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),et.repaintControls=[]}return this}});function it(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}function at(e,t){var n,r,o,i,a,s,c,u=t.document||document;t=t||{};var l=u.getElementById(t.handle||e);o=function(e){var o,f,d=function(e){var t,n,r,o,i,a,s,c,u=Math.max;return t=e.documentElement,n=e.body,r=u(t.scrollWidth,n.scrollWidth),o=u(t.clientWidth,n.clientWidth),i=u(t.offsetWidth,n.offsetWidth),a=u(t.scrollHeight,n.scrollHeight),s=u(t.clientHeight,n.clientHeight),c=u(t.offsetHeight,n.offsetHeight),{width:r<i?o:r,height:a<c?s:a}}(u);it(e),e.preventDefault(),r=e.button,o=l,s=e.screenX,c=e.screenY,f=window.getComputedStyle?window.getComputedStyle(o,null).getPropertyValue("cursor"):o.runtimeStyle.cursor,n=he("<div></div>").css({position:"absolute",top:0,left:0,width:d.width,height:d.height,zIndex:2147483647,opacity:1e-4,cursor:f}).appendTo(u.body),he(u).on("mousemove touchmove",a).on("mouseup touchend",i),t.start(e)},a=function(e){if(it(e),e.button!==r)return i(e);e.deltaX=e.screenX-s,e.deltaY=e.screenY-c,e.preventDefault(),t.drag(e)},i=function(e){it(e),he(u).off("mousemove touchmove",a).off("mouseup touchend",i),n.remove(),t.stop&&t.stop(e)},this.destroy=function(){he(l).off()},he(l).on("mousedown touchstart",o)}var st,ct,ut,lt,ft={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var e=this,t=2;function n(){var n,r,o;function i(o,i,a,s,c,u){var l,f,d,m,p,h,g,v;if(f=e.getEl("scroll"+o)){if(g=i.toLowerCase(),v=a.toLowerCase(),he(e.getEl("absend")).css(g,e.layoutRect()[s]-1),!c)return void he(f).css("display","none");he(f).css("display","block"),l=e.getEl("body"),d=e.getEl("scroll"+o+"t"),m=l["client"+a]-2*t,p=(m-=n&&r?f["client"+u]:0)/l["scroll"+a],(h={})[g]=l["offset"+i]+t,h[v]=m,he(f).css(h),(h={})[g]=l["scroll"+i]*p,h[v]=m*p,he(d).css(h)}}o=e.getEl("body"),n=o.scrollWidth>o.clientWidth,r=o.scrollHeight>o.clientHeight,i("h","Left","Width","contentW",n,"Height"),i("v","Top","Height","contentH",r,"Width")}e.settings.autoScroll&&(e._hasScroll||(e._hasScroll=!0,function(){function n(n,r,o,i,a){var s,c=e._id+"-scroll"+n,u=e.classPrefix;he(e.getEl()).append('<div id="'+c+'" class="'+u+"scrollbar "+u+"scrollbar-"+n+'"><div id="'+c+'t" class="'+u+'scrollbar-thumb"></div></div>'),e.draghelper=new at(c+"t",{start:function(){s=e.getEl("body")["scroll"+r],he("#"+c).addClass(u+"active")},drag:function(c){var u,l,f,d,m=e.layoutRect();l=m.contentW>m.innerW,f=m.contentH>m.innerH,d=e.getEl("body")["client"+o]-2*t,u=(d-=l&&f?e.getEl("scroll"+n)["client"+a]:0)/e.getEl("body")["scroll"+o],e.getEl("body")["scroll"+r]=s+c["delta"+i]/u},stop:function(){he("#"+c).removeClass(u+"active")}})}e.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}(),e.on("wheel",function(t){var r=e.getEl("body");r.scrollLeft+=10*(t.deltaX||0),r.scrollTop+=10*t.deltaY,n()}),he(e.getEl("body")).on("scroll",n)),n())}},dt=ot.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[ft],renderHtml:function(){var e=this._layout,t=this.settings.html;return this.preRender(),e.preRender(this),void 0===t?t='<div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+e.renderHtml(this)+"</div>":("function"==typeof t&&(t=t.call(this)),this._hasBody=!1),'<div id="'+this._id+'" class="'+this.classes+'" hidefocus="1" tabindex="-1" role="group">'+(this._preBodyHtml||"")+t+"</div>"}}),mt={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=ve.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},pt=[],ht=[];function gt(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function vt(){st||(st=function(e){2!==e.button&&function(e){for(var t=pt.length;t--;){var n=pt[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(gt(r,n)||n.parent()===r))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},he(document).on("click touchstart",st))}function bt(e){var t=ve.getViewPort().y;function n(t,n){for(var r,o=0;o<pt.length;o++)if(pt[o]!==e)for(r=pt[o].parent();r&&(r=r.parent());)r===e&&pt[o].fixed(t).moveBy(0,n).repaint()}e.settings.autofix&&(e.state.get("fixed")?e._autoFixY>t&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),n(!1,e._autoFixY-t)):(e._autoFixY=e.layoutRect().y,e._autoFixY<t&&(e.fixed(!0).layoutRect({y:0}).repaint(),n(!0,t-e._autoFixY))))}function yt(e,t){var n,r,o=xt.zIndex||65535;if(e)ht.push(t);else for(n=ht.length;n--;)ht[n]===t&&ht.splice(n,1);if(ht.length)for(n=0;n<ht.length;n++)ht[n].modal&&(o++,r=ht[n]),ht[n].getEl().style.zIndex=o,ht[n].zIndex=o,o++;var i=he("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];r?he(i).css("z-index",r.zIndex-1):i&&(i.parentNode.removeChild(i),lt=!1),xt.currentZIndex=o}var xt=dt.extend({Mixins:[ke,mt],init:function(e){var t=this;t._super(e),t._eventsRoot=t,t.classes.add("floatpanel"),e.autohide&&(vt(),function(){if(!ut){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;ut=function(){document.all&&t===e.clientWidth&&n===e.clientHeight||(t=e.clientWidth,n=e.clientHeight,xt.hideAll())},he(window).on("resize",ut)}}(),pt.push(t)),e.autofix&&(ct||(ct=function(){var e;for(e=pt.length;e--;)bt(pt[e])},he(window).on("scroll",ct)),t.on("move",function(){bt(this)})),t.on("postrender show",function(e){if(e.control===t){var n,r=t.classPrefix;t.modal&&!lt&&((n=he("#"+r+"modal-block",t.getContainerElm()))[0]||(n=he('<div id="'+r+'modal-block" class="'+r+"reset "+r+'fade"></div>').appendTo(t.getContainerElm())),y.setTimeout(function(){n.addClass(r+"in"),he(t.getEl()).addClass(r+"in")}),lt=!0),yt(!0,t)}}),t.on("show",function(){t.parents().each(function(e){if(e.state.get("fixed"))return t.fixed(!0),!1})}),e.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){if(this.state.get("fixed")!==e){if(this.state.get("rendered")){var t=ve.getViewPort();e?this.layoutRect().y-=t.y:this.layoutRect().y+=t.y}this.classes.toggle("fixed",e),this.state.set("fixed",e)}return this},show:function(){var e,t=this._super();for(e=pt.length;e--&&pt[e]!==this;);return-1===e&&pt.push(this),t},hide:function(){return wt(this),yt(!1,this),this._super()},hideAll:function(){xt.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),yt(!1,this)),this},remove:function(){wt(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function wt(e){var t;for(t=pt.length;t--;)pt[t]===e&&pt.splice(t,1);for(t=ht.length;t--;)ht[t]===e&&ht.splice(t,1)}xt.hideAll=function(){for(var e=pt.length;e--;){var t=pt[e];t&&t.settings.autohide&&(t.hide(),pt.splice(e,1))}};var Ct=function(e,t){return!(!e||t.settings.ui_container)},kt=function(e,t,n){var r,i,s=l.DOM,u=function(e){return e.getParam("fixed_toolbar_container")}(e);u&&(i=s.select(u)[0]);var d=function(){if(r&&r.moveRel&&r.visible()&&!r._fixed){var t=e.selection.getScrollContainer(),n=e.getBody(),o=0,i=0;if(t){var a=s.getPos(n),c=s.getPos(t);o=Math.max(0,c.x-a.x),i=Math.max(0,c.y-a.y)}r.fixed(!1).moveRel(n,e.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(o,i)}},m=function(){r&&(r.show(),d(),s.addClass(e.getBody(),"mce-edit-focus"))},p=function(){r&&(r.hide(),xt.hideAll(),s.removeClass(e.getBody(),"mce-edit-focus"))},g=function(){r?r.visible()||m():(r=t.panel=f.create({type:i?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:Ct(i,e),fixed:Ct(i,e),border:1,items:[!1===o(e)?null:{type:"menubar",border:"0 0 1 0",items:ee(e)},O(e,a(e))]}),R.setUiContainer(e,r),h(e),i?r.renderTo(i).reflow():r.renderTo().reflow(),v(e,r),m(),L(e),e.on("nodeChange",d),e.on("ResizeWindow",d),e.on("activate",m),e.on("deactivate",p),e.nodeChanged())};return e.settings.content_editable=!0,e.on("focus",function(){!1===c(e)&&n.skinUiCss?s.styleSheetLoader.load(n.skinUiCss,g,g):g()}),e.on("blur hide",p),e.on("remove",function(){r&&(r.remove(),r=null)}),!1===c(e)&&n.skinUiCss?s.styleSheetLoader.load(n.skinUiCss,fe(e)):fe(e)(),{}};function Tt(e,t){var n,r,o=this,i=et.classPrefix;o.show=function(a,s){function c(){n&&(he(e).append('<div class="'+i+"throbber"+(t?" "+i+"throbber-inline":"")+'"></div>'),s&&s())}return o.hide(),n=!0,a?r=y.setTimeout(c,a):c(),o},o.hide=function(){var t=e.lastChild;return y.clearTimeout(r),t&&-1!==t.className.indexOf("throbber")&&t.parentNode.removeChild(t),n=!1,o}}var _t=function(e,t){var n;e.on("ProgressState",function(e){n=n||new Tt(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Et=function(e,t,r){var o=function(e){var t=e.settings,r=t.skin,o=t.skin_url;if(!1!==r){var i=r||"lightgray";o=o?e.documentBaseURI.toAbsolute(o):n.baseURL+"/skins/"+i}return o}(e);return o&&(r.skinUiCss=o+"/skin.min.css",e.contentCSS.push(o+"/content"+(e.inline?".inline":"")+".min.css")),_t(e,t),function(e){return e.getParam("inline",!1,"boolean")}(e)?kt(e,t,r):pe(e,t,r)},St=et.extend({Mixins:[ke],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'" role="presentation"><div class="'+e+'tooltip-arrow"></div><div class="'+e+'tooltip-inner">'+this.encode(this.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Nt=et.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&!1!==Nt.tooltips&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control===t){var o=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"===o),r.classes.toggle("tooltip-nw","bc-tl"===o),r.classes.toggle("tooltip-ne","bc-tr"===o),r.moveRel(t.getEl(),o)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().remove(),t._tooltip=null})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new St({type:"tooltip"}),R.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var e=this.settings;this._super(),this.parent()||!e.width&&!e.height||(this.initLayoutRect(),this.repaint()),e.autofocus&&this.focus()},bindStates:function(){var e=this;function t(t){e.aria("disabled",t),e.classes.toggle("disabled",t)}function n(t){e.aria("pressed",t),e.classes.toggle("active",t)}return e.state.on("change:disabled",function(e){t(e.value)}),e.state.on("change:active",function(e){n(e.value)}),e.state.get("disabled")&&t(!0),e.state.get("active")&&n(!0),e._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),Rt=Nt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var e=this;function t(t){t=e.settings.filter(t),e.getEl().lastChild.innerHTML=t+"%",e.getEl().firstChild.firstChild.style.width=t+"%"}return e.state.on("change:value",function(e){t(e.value)}),t(e.state.get("value")),e._super()}}),At=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},Dt=et.extend({Mixins:[ke],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new Rt),t.on("click",function(e){-1!==e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e,t=this.classPrefix,n="",r="",o="";return this.icon&&(n='<i class="'+t+"ico "+t+"i-"+this.icon+'"></i>'),e=' style="max-width: '+this.maxWidth+"px;"+(this.color?"background-color: "+this.color+';"':'"'),this.closeButton&&(r='<button type="button" class="'+t+'close" aria-hidden="true"></button>'),this.progressBar&&(o=this.progressBar.renderHtml()),'<div id="'+this._id+'" class="'+this.classes+'"'+e+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+this.state.get("text")+"</div>"+o+r+'<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;" aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div></div>'},postRender:function(){var e=this;return y.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),At(e,e.state.get("text"))},100),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().firstChild.innerHTML=t.value,At(e,t.value)}),e.progressBar&&(e.progressBar.bindStates(),e.progressBar.state.on("change:value",function(t){At(e,e.state.get("text"))})),e._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}});function Ot(e){var t=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(n,o){var i,a=r.extend(n,{maxWidth:(i=t(e),ve.getSize(i).width)}),s=new Dt(a);return s.args=a,a.timeout>0&&(s.timer=setTimeout(function(){s.close(),o()},a.timeout)),s.on("close",function(){o()}),s.renderTo(),s},close:function(e){e.close()},reposition:function(n){!function(e){W(e,function(e){e.moveTo(0,0)})}(n),function(n){if(n.length>0){var r=n.slice(0,1)[0],o=t(e);r.moveRel(o,"tc-tc"),W(n,function(e,t){t>0&&e.moveRel(n[t-1].getEl(),"bc-tc")})}}(n)},getArgs:function(e){return e.args}}}var Pt=[],It="";function Bt(e){var t,n=he("meta[name=viewport]")[0];!1!==ae.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==It&&(It=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":It))}function Mt(e,t){(function(){for(var e=0;e<Pt.length;e++)if(Pt[e]._fullscreen)return!0;return!1})()&&!1===t&&he([document.documentElement,document.body]).removeClass(e+"fullscreen")}var Lt=xt.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var t=this;t._super(e),t.isRtl()&&t.classes.add("rtl"),t.classes.add("window"),t.bodyClasses.add("window-body"),t.state.set("fixed",!0),e.buttons&&(t.statusbar=new dt({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:t.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),t.statusbar.classes.add("foot"),t.statusbar.parent(t)),t.on("click",function(e){var n=t.classPrefix+"close";(ve.hasClass(e.target,n)||ve.hasClass(e.target.parentNode,n))&&t.close()}),t.on("cancel",function(){t.close()}),t.on("move",function(e){e.control===t&&xt.hideAll()}),t.aria("describedby",t.describedBy||t._id+"-none"),t.aria("label",e.title),t._fullscreen=!1},recalc:function(){var e,t,n,r,o=this.statusbar;this._fullscreen&&(this.layoutRect(ve.getWindowSize()),this.layoutRect().contentH=this.layoutRect().innerH),this._super(),e=this.layoutRect(),this.settings.title&&!this._fullscreen&&(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),this.layoutRect({w:t,x:n}),r=!0),o&&(o.layoutRect({w:this.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),this.layoutRect({w:t,x:n}),r=!0)),r&&this.recalc()},initLayoutRect:function(){var e,t=this._super(),n=0;if(this.settings.title&&!this._fullscreen){e=this.getEl("head");var r=ve.getSize(e);t.headerW=r.width,t.headerH=r.height,n+=t.headerH}this.statusbar&&(n+=this.statusbar.layoutRect().h),t.deltaH+=n,t.minH+=n,t.h+=n;var o=ve.getWindowSize();return t.x=this.settings.x||Math.max(0,o.w/2-t.w/2),t.y=this.settings.y||Math.max(0,o.h/2-t.h/2),t},renderHtml:function(){var e=this._layout,t=this._id,n=this.classPrefix,r=this.settings,o="",i="",a=r.html;return this.preRender(),e.preRender(this),r.title&&(o='<div id="'+t+'-head" class="'+n+'window-head"><div id="'+t+'-title" class="'+n+'title">'+this.encode(r.title)+'</div><div id="'+t+'-dragh" class="'+n+'dragh"></div><button type="button" class="'+n+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(a='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===a&&(a=e.renderHtml(this)),this.statusbar&&(i=this.statusbar.renderHtml()),'<div id="'+t+'" class="'+this.classes+'" hidefocus="1"><div class="'+this.classPrefix+'reset" role="application">'+o+'<div id="'+t+'-body" class="'+this.bodyClasses+'">'+a+"</div>"+i+"</div></div>"},fullscreen:function(e){var t,n,r=this,o=document.documentElement,i=r.classPrefix;if(e!==r._fullscreen)if(he(window).on("resize",function(){var e;if(r._fullscreen)if(t)r._timer||(r._timer=y.setTimeout(function(){var e=ve.getWindowSize();r.moveTo(0,0).resizeTo(e.w,e.h),r._timer=0},50));else{e=(new Date).getTime();var n=ve.getWindowSize();r.moveTo(0,0).resizeTo(n.w,n.h),(new Date).getTime()-e>50&&(t=!0)}}),n=r.layoutRect(),r._fullscreen=e,e){r._initial={x:n.x,y:n.y,w:n.w,h:n.h},r.borderBox=Ee("0"),r.getEl("head").style.display="none",n.deltaH-=n.headerH+2,he([o,document.body]).addClass(i+"fullscreen"),r.classes.add("fullscreen");var a=ve.getWindowSize();r.moveTo(0,0).resizeTo(a.w,a.h)}else r.borderBox=Ee(r.settings.border),r.getEl("head").style.display="",n.deltaH+=n.headerH,he([o,document.body]).removeClass(i+"fullscreen"),r.classes.remove("fullscreen"),r.moveTo(r._initial.x,r._initial.y).resizeTo(r._initial.w,r._initial.h);return r.reflow()},postRender:function(){var e,t=this;setTimeout(function(){t.classes.add("in"),t.fire("open")},0),t._super(),t.statusbar&&t.statusbar.postRender(),t.focus(),this.dragHelper=new at(t._id+"-dragh",{start:function(){e={x:t.layoutRect().x,y:t.layoutRect().y}},drag:function(n){t.moveTo(e.x+n.deltaX,e.y+n.deltaY)}}),t.on("submit",function(e){e.isDefaultPrevented()||t.close()}),Pt.push(t),Bt(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e;for(this.dragHelper.destroy(),this._super(),this.statusbar&&this.statusbar.remove(),Mt(this.classPrefix,!1),e=Pt.length;e--;)Pt[e]===this&&Pt.splice(e,1);Bt(Pt.length>0)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});!function(){if(!ae.desktop){var e={w:window.innerWidth,h:window.innerHeight};y.setInterval(function(){var t=window.innerWidth,n=window.innerHeight;e.w===t&&e.h===n||(e={w:t,h:n},he(window).trigger("resize"))},100)}he(window).on("resize",function(){var e,t,n=ve.getWindowSize();for(e=0;e<Pt.length;e++)t=Pt[e].layoutRect(),Pt[e].moveTo(Pt[e].settings.x||Math.max(0,n.w/2-t.w/2),Pt[e].settings.y||Math.max(0,n.h/2-t.h/2))})}();var Ft=Lt.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){var t,n=e.callback||function(){};function r(e,t,r){return{type:"button",text:e,subtype:r?"primary":"",onClick:function(e){e.control.parents()[1].close(),n(t)}}}switch(e.buttons){case Ft.OK_CANCEL:t=[r("Ok",!0,!0),r("Cancel",!1)];break;case Ft.YES_NO:case Ft.YES_NO_CANCEL:t=[r("Yes",1,!0),r("No",0)],e.buttons===Ft.YES_NO_CANCEL&&t.push(r("Cancel",-1));break;default:t=[r("Ok",!0,!0)]}return new Lt({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:t,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){n(!1)}}).renderTo(document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,Ft.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=Ft.OK_CANCEL,Ft.msgBox(e)}}}),Ht=function(e){return{renderUI:function(t){return Et(e,this,t)},resizeTo:function(t,n){return oe(e,t,n)},resizeBy:function(t,n){return ie(e,t,n)},getNotificationManagerImpl:function(){return Ot(e)},getWindowManagerImpl:function(){return{open:function(e,t,n){var r;return e.title=e.title||" ",e.url=e.url||e.file,e.url&&(e.width=parseInt(e.width||320,10),e.height=parseInt(e.height||240,10)),e.body&&(e.items={defaults:e.defaults,type:e.bodyType||"form",items:e.body,data:e.data,callbacks:e.commands}),e.url||e.buttons||(e.buttons=[{text:"Ok",subtype:"primary",onclick:function(){r.find("form")[0].submit()}},{text:"Cancel",onclick:function(){r.close()}}]),(r=new Lt(e)).on("close",function(){n(r)}),e.data&&r.on("postRender",function(){this.find("*").each(function(t){var n=t.name();n in e.data&&t.value(e.data[n])})}),r.features=e||{},r.params=t||{},r=r.renderTo(document.body).reflow()},alert:function(e,t,n){var r;return(r=Ft.alert(e,function(){t()})).on("close",function(){n(r)}),r},confirm:function(e,t,n){var r;return(r=Ft.confirm(e,function(e){t(e)})).on("close",function(){n(r)}),r},close:function(e){e.close()},getParams:function(e){return e.params},setParams:function(e,t){e.params=t}}}}},zt=Te.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=r.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,r,o,i=this.settings;t=i.firstControlClass,n=i.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(i.controlClass),e.visible()&&(r||(r=e),o=e)}),r&&r.classes.add(t),o&&o.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}}),Ut=zt.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}}),$t=Nt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this._id,r=this.classPrefix,o=this.state.get("icon"),i=this.state.get("text"),a="",s=this.settings;return(e=s.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",i&&(this.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+this.encode(i)+"</span>"),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof s.active?' aria-pressed="'+s.active+'"':"",'<div id="'+n+'" class="'+this.classes+'" tabindex="-1"'+t+'><button id="'+n+'-button" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){var e=this,t=e.$,n=e.classPrefix+"txt";function r(r){var o=t("span."+n,e.getEl());r?(o[0]||(t("button:first",e.getEl()).append('<span class="'+n+'"></span>'),o=t("span."+n,e.getEl())),o.html(e.encode(r))):o.remove(),e.classes.toggle("btn-has-text",!!r)}return e.state.on("change:text",function(e){r(e.value)}),e.state.on("change:icon",function(t){var n=t.value,o=e.classPrefix;e.settings.icon=n,n=n?o+"ico "+o+"i-"+e.settings.icon:"";var i=e.getEl().firstChild,a=i.getElementsByTagName("i")[0];n?(a&&a===i.firstChild||(a=document.createElement("i"),i.insertBefore(a,i.firstChild)),a.className=n):a&&i.removeChild(a),r(e.state.get("text"))}),e._super()}}),jt=$t.extend({init:function(e){e=r.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var e=this,t=ve.create("input",{type:"file",id:e._id+"-browse",accept:e.settings.accept});e._super(),he(t).on("change",function(t){var n=t.target.files;e.value=function(){return n.length?e.settings.multiple?n:n[0]:null},t.preventDefault(),n.length&&e.fire("change",t)}),he(t).on("click",function(e){e.stopPropagation()}),he(e.getEl("button")).on("click",function(e){e.stopPropagation(),t.click()}),e.getEl().appendChild(t)},remove:function(){he(this.getEl("button")).off(),he(this.getEl("input")).off(),this._super()}}),Wt=ot.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this._layout;return this.classes.add("btn-group"),this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"}}),qt=Nt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'" unselectable="on" aria-labelledby="'+e+'-al" tabindex="-1"><i class="'+t+"ico "+t+'i-checkbox"></i><span id="'+e+'-al" class="'+t+'label">'+this.encode(this.state.get("text"))+"</span></div>"},bindStates:function(){var e=this;function t(t){e.classes.toggle("checked",t),e.aria("checked",t)}return e.state.on("change:text",function(t){e.getEl("al").firstChild.data=e.translate(t.value)}),e.state.on("change:checked change:value",function(n){e.fire("change"),t(n.value)}),e.state.on("change:icon",function(t){var n=t.value,r=e.classPrefix;if(void 0===n)return e.settings.icon;e.settings.icon=n,n=n?r+"ico "+r+"i-"+e.settings.icon:"";var o=e.getEl().firstChild,i=o.getElementsByTagName("i")[0];n?(i&&i===o.firstChild||(i=document.createElement("i"),o.insertBefore(i,o.firstChild)),i.className=n):i&&o.removeChild(i)}),e.state.get("checked")&&t(!0),e._super()}}),Vt=tinymce.util.Tools.resolve("tinymce.util.VK"),Gt=Nt.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var r=n.target,o=t.getEl();if(he.contains(o,r)||r===o)for(;r&&r!==o;)r.id&&-1!==r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){var n;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){if("INPUT"===e.target.nodeName){var n=t.state.get("value"),r=e.target.value;r!==n&&(t.state.set("value",r),t.fire("autocomplete",e))}}),t.on("mouseover",function(e){var n=t.tooltip().moveTo(-65535);if(t.statusLevel()&&-1!==e.target.className.indexOf(t.classPrefix+"status")){var r=t.statusMessage()||"Ok",o=n.text(r).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);n.classes.toggle("tooltip-n","bc-tc"===o),n.classes.toggle("tooltip-nw","bc-tl"===o),n.classes.toggle("tooltip-ne","bc-tr"===o),n.moveRel(e.target,o)}})},statusLevel:function(e){return arguments.length>0&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return arguments.length>0&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=f.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()===t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"===e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this.getEl(),r=this.getEl("open"),o=this.layoutRect(),i=0,a=n.firstChild;this.statusLevel()&&"none"!==this.statusLevel()&&(i=parseInt(ve.getRuntimeStyle(a,"padding-right"),10)-parseInt(ve.getRuntimeStyle(a,"padding-left"),10)),e=r?o.w-ve.getSize(r).width-10:o.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(t=this.layoutRect().h-2+"px"),he(a).css({width:e-i,lineHeight:t}),this._super(),this},postRender:function(){var e=this;return he(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e,t,n,r=this._id,o=this.settings,i=this.classPrefix,a=this.state.get("value")||"",s="",c="";return"spellcheck"in o&&(c+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(c+=' maxlength="'+o.maxLength+'"'),o.size&&(c+=' size="'+o.size+'"'),o.subtype&&(c+=' type="'+o.subtype+'"'),n='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',this.disabled()&&(c+=' disabled="disabled"'),(e=o.icon)&&"caret"!==e&&(e=i+"ico "+i+"i-"+o.icon),t=this.state.get("text"),(e||t)&&(s='<div id="'+r+'-open" class="'+i+"btn "+i+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!==e?'<i class="'+e+'"></i>':'<i class="'+i+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",this.classes.add("has-open")),'<div id="'+r+'" class="'+this.classes+'"><input id="'+r+'-inp" class="'+i+'textbox" value="'+this.encode(a,!1)+'" hidefocus="1"'+c+' placeholder="'+this.encode(o.placeholder)+'" />'+n+s+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,t){var n=this;if(0!==e.length){n.menu?n.menu.items().remove():n.menu=f.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(n).renderTo(),r.each(e,function(e){var r,o;n.menu.add({text:e.title,url:e.previewUrl,match:t,classes:"menu-item-ellipsis",onclick:(r=e.value,o=e.title,function(){n.fire("selectitem",{title:o,value:r})})})}),n.menu.renderNew(),n.hideMenu(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()});var o=n.layoutRect().w;n.menu.layoutRect({w:o,minW:0,maxW:o}),n.menu.repaint(),n.menu.reflow(),n.menu.show(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else n.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var e=this;e.state.on("change:value",function(t){e.getEl("inp").value!==t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e.state.on("change:statusLevel",function(t){var n=e.getEl("status"),r=e.classPrefix,o=t.value;ve.css(n,"display","none"===o?"none":""),ve.toggleClass(n,r+"i-checkmark","ok"===o),ve.toggleClass(n,r+"i-warning","warn"===o),ve.toggleClass(n,r+"i-error","error"===o),e.classes.toggle("has-status","none"!==o),e.repaint()}),ve.on(e.getEl("status"),"mouseleave",function(){e.tooltip().hide()}),e.on("cancel",function(t){e.menu&&e.menu.visible()&&(t.stopPropagation(),e.hideMenu())});var t=function(e,t){t&&t.items().length>0&&t.items().eq(e)[0].focus()};return e.on("keydown",function(n){var r=n.keyCode;"INPUT"===n.target.nodeName&&(r===Vt.DOWN?(n.preventDefault(),e.fire("autocomplete"),t(0,e.menu)):r===Vt.UP&&(n.preventDefault(),t(-1,e.menu)))}),e._super()},remove:function(){he(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),Yt=Gt.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(e){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}}),Kt=$t.extend({showPanel:function(){var e=this,t=e.settings;if(e.classes.add("opened"),e.panel)e.panel.show();else{var n=t.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,e.panel=new xt(n).on("hide",function(){e.classes.remove("opened")}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}var r=e.panel.testMoveRel(e.getEl(),t.popoverAlign||(e.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl","tc-bc","tc-br","tc-bl"]));e.panel.classes.toggle("start","l"===r.substr(-1)),e.panel.classes.toggle("end","r"===r.substr(-1));var o="t"===r.substr(0,1);e.panel.classes.toggle("bottom",!o),e.panel.classes.toggle("top",o),e.panel.moveRel(e.getEl(),r)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),Xt=l.DOM,Jt=Kt.extend({init:function(e){this._super(e),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this._id,t=this.classPrefix,n=this.state.get("text"),r=this.settings.icon?t+"ico "+t+"i-"+this.settings.icon:"",o=this.settings.image?" style=\"background-image: url('"+this.settings.image+"')\"":"",i="";return n&&(this.classes.add("btn-has-text"),i='<span class="'+t+'txt">'+this.encode(n)+"</span>"),'<div id="'+e+'" class="'+this.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+e+'-preview" class="'+t+'preview"></span>'+i+'</button><button type="button" class="'+t+'open" hidefocus="1" tabindex="-1"> <i class="'+t+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(n){n.aria&&"down"===n.aria.key||n.control!==e||Xt.getParent(n.target,"."+e.classPrefix+"open")||(n.stopImmediatePropagation(),t.call(e,n))}),delete e.settings.onclick,e._super()}}),Zt=tinymce.util.Tools.resolve("tinymce.util.Color"),Qt=Nt.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var e,t,n,r,o,i=this,a=i.color();function s(e,t){var n,r,o=ve.getPos(e);return n=t.pageX-o.x,r=t.pageY-o.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:r=Math.max(0,Math.min(r/e.clientHeight,1))}}function c(e,t){var a=(360-e.h)/360;ve.css(n,{top:100*a+"%"}),t||ve.css(o,{left:e.s+"%",top:100-e.v+"%"}),r.style.background=Zt({s:100,v:100,h:e.h}).toHex(),i.color().parse({s:e.s,v:e.v,h:e.h})}function u(t){var n;n=s(r,t),e.s=100*n.x,e.v=100*(1-n.y),c(e),i.fire("change")}function l(n){var r;r=s(t,n),(e=a.toHsv()).h=360*(1-r.y),c(e,!0),i.fire("change")}t=i.getEl("h"),n=i.getEl("hp"),r=i.getEl("sv"),o=i.getEl("svp"),i._repaint=function(){c(e=a.toHsv())},i._super(),i._svdraghelper=new at(i._id+"-sv",{start:u,drag:u}),i._hdraghelper=new at(i._id+"-h",{start:l,drag:l}),i._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=Zt()),this._color},renderHtml:function(){var e,t=this._id,n=this.classPrefix,r="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+n+'colorpicker-h" style="background: -ms-linear-gradient(top,'+r+");background: linear-gradient(to bottom,"+r+');">'+function(){var e,t,o,i,a="";for(o="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(i=r.split(",")).length-1;e<t;e++)a+='<div class="'+n+'colorpicker-h-chunk" style="height:'+100/t+"%;"+o+i[e]+",endColorstr="+i[e+1]+");-ms-"+o+i[e]+",endColorstr="+i[e+1]+')"></div>';return a}()+'<div id="'+t+'-hp" class="'+n+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+n+'colorpicker-sv"><div class="'+n+'colorpicker-overlay1"><div class="'+n+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+n+'colorpicker-selector1"><div class="'+n+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}}),en=Nt.extend({init:function(e){e=r.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},e),this._super(e),this.classes.add("dropzone"),e.multiple&&this.classes.add("multiple")},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},t=ve.create("div",e,"<span>"+this.translate(n.text)+"</span>"),n.height&&ve.css(t,"height",n.height+"px"),n.width&&ve.css(t,"width",n.width+"px"),t.className=this.classes,t.outerHTML},postRender:function(){var e=this,t=function(t){t.preventDefault(),e.classes.toggle("dragenter"),e.getEl().className=e.classes};e._super(),e.$el.on("dragover",function(e){e.preventDefault()}),e.$el.on("dragenter",t),e.$el.on("dragleave",t),e.$el.on("drop",function(t){if(t.preventDefault(),!e.state.get("disabled")){var n=function(t){var n=e.settings.accept;if("string"!=typeof n)return t;var o=new RegExp("("+n.split(/\s*,\s*/).join("|")+")$","i");return r.grep(t,function(e){return o.test(e.name)})}(t.dataTransfer.files);e.value=function(){return n.length?e.settings.multiple?n:n[0]:null},n.length&&e.fire("change",t)}})},remove:function(){this.$el.off(),this._super()}}),tn=Nt.extend({init:function(e){var t=this;e.delimiter||(e.delimiter=""),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n;(n=e.target.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t,n,r=e||[],o="",i=this.classPrefix;for(t=0,n=r.length;t<n;t++)o+=(t>0?'<div class="'+i+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+i+"path-item"+(t===n-1?" "+i+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+r[t].name+"</div>";return o||(o='<div class="'+i+'path-item"></div>'),o}}),nn=tn.extend({postRender:function(){var e=this,t=e.settings.editor;function n(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==t.settings.elementpath&&(e.on("select",function(e){t.focus(),t.selection.select(this.row()[e.index].element),t.nodeChanged()}),t.on("nodeChange",function(r){for(var o=[],i=r.parents,a=i.length;a--;)if(1===i[a].nodeType&&!n(i[a])){var s=t.fire("ResolveName",{name:i[a].nodeName.toLowerCase(),target:i[a]});if(s.isDefaultPrevented()||o.push({name:s.name,element:i[a]}),s.isPropagationStopped())break}e.row(o)})),e._super()}}),rn=ot.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this._layout,t=this.classPrefix;return this.classes.add("formitem"),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'" hidefocus="1" tabindex="-1">'+(this.settings.title?'<div id="'+this._id+'-title" class="'+t+'title">'+this.settings.title+"</div>":"")+'<div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"}}),on=ot.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,t=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),t.each(function(t){var n,o=t.settings.label;o&&((n=new rn(r.extend({items:{type:"label",id:t._id+"-l",text:o,flex:0,forId:t._id,disabled:t.disabled()}},e.settings.formItemDefaults))).type="formitem",t.aria("labelledby",t._id+"-l"),void 0===t.settings.flex&&(t.settings.flex=1),e.replace(t,n),n.add(t))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var e=this;function t(){var t,n,r=0,o=[];if(!1!==e.settings.labelGapCalc)for(("children"===e.settings.labelGapCalc?e.find("formitem"):e.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;r=n>r?n:r,o.push(t)}),n=e.settings.labelGap||0,t=o.length;t--;)o[t].settings.minWidth=r+n}e._super(),e.on("show",t),t()}}),an=on.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this._layout,t=this.classPrefix;return this.preRender(),e.preRender(this),'<fieldset id="'+this._id+'" class="'+this.classes+'" hidefocus="1" tabindex="-1">'+(this.settings.title?'<legend id="'+this._id+'-title" class="'+t+'fieldset-title">'+this.settings.title+"</legend>":"")+'<div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></fieldset>"}}),sn=0,cn=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:w(e)}},un={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return cn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return cn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return cn(n)},fromDom:cn,fromPoint:function(e,t,n){var r=e.dom();return S.from(r.elementFromPoint(t,n)).map(cn)}},ln=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},fn={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},dn=function(e){return e.dom().nodeType},mn=function(e){return function(t){return dn(t)===e}},pn=(mn(fn.ELEMENT),mn(fn.TEXT),mn(fn.DOCUMENT),ln(function(){return pn(un.fromDom(document))}),function(e){var t=e.dom().body;if(null===t||void 0===t)throw"Body is not available yet";return un.fromDom(t)}),hn=("undefined"!=typeof window?window:Function("return this;")(),function(){return gn(0,0)}),gn=function(e,t){return{major:e,minor:t}},vn={nu:gn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?hn():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return gn(r(1),r(2))}(e,n)},unknown:hn},bn=function(e,t){return function(){return t===e}},yn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:bn("Edge",t),isChrome:bn("Chrome",t),isIE:bn("IE",t),isOpera:bn("Opera",t),isFirefox:bn("Firefox",t),isSafari:bn("Safari",t)}},xn={unknown:function(){return yn({current:void 0,version:vn.unknown()})},nu:yn,edge:w("Edge"),chrome:w("Chrome"),ie:w("IE"),opera:w("Opera"),firefox:w("Firefox"),safari:w("Safari")},wn=function(e,t){return function(){return t===e}},Cn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:wn("Windows",t),isiOS:wn("iOS",t),isAndroid:wn("Android",t),isOSX:wn("OSX",t),isLinux:wn("Linux",t),isSolaris:wn("Solaris",t),isFreeBSD:wn("FreeBSD",t)}},kn={unknown:function(){return Cn({current:void 0,version:vn.unknown()})},nu:Cn,windows:w("Windows"),ios:w("iOS"),android:w("Android"),linux:w("Linux"),osx:w("OSX"),solaris:w("Solaris"),freebsd:w("FreeBSD")},Tn=function(e,t){var n=String(t).toLowerCase();return V(e,function(e){return e.search(n)})},_n=function(e,t){return Tn(e,t).map(function(e){var n=vn.detect(e.versionRegexes,t);return{current:e.name,version:n}})},En=function(e,t){return Tn(e,t).map(function(e){var n=vn.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Sn=function(e,t){return-1!==e.indexOf(t)},Nn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Rn=function(e){return function(t){return Sn(t,e)}},An=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Sn(e,"edge/")&&Sn(e,"chrome")&&Sn(e,"safari")&&Sn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Nn],search:function(e){return Sn(e,"chrome")&&!Sn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Sn(e,"msie")||Sn(e,"trident")}},{name:"Opera",versionRegexes:[Nn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Rn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Rn("firefox")},{name:"Safari",versionRegexes:[Nn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Sn(e,"safari")||Sn(e,"mobile/"))&&Sn(e,"applewebkit")}}],Dn=[{name:"Windows",search:Rn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Sn(e,"iphone")||Sn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Rn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Rn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Rn("linux"),versionRegexes:[]},{name:"Solaris",search:Rn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Rn("freebsd"),versionRegexes:[]}],On={browsers:w(An),oses:w(Dn)},Pn=function(e){var t=On.browsers(),n=On.oses(),r=_n(t,e).fold(xn.unknown,xn.nu),o=En(n,e).fold(kn.unknown,kn.nu);return{browser:r,os:o,deviceType:function(e,t,n){var r=e.isiOS()&&!0===/ipad/i.test(n),o=e.isiOS()&&!r,i=e.isAndroid()&&3===e.version.major,a=e.isAndroid()&&4===e.version.major,s=r||i||a&&!0===/mobile/i.test(n),c=e.isiOS()||e.isAndroid(),u=c&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n);return{isiPad:w(r),isiPhone:w(o),isTablet:w(s),isPhone:w(u),isTouch:w(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:w(l)}}(o,r,e)}},In=ln(function(){var e=navigator.userAgent;return Pn(e)}),Bn=fn.ELEMENT,Mn=fn.DOCUMENT,Ln=function(e){return e.nodeType!==Bn&&e.nodeType!==Mn||0===e.childElementCount},Fn={all:function(e,t){var n=void 0===t?document:t.dom();return Ln(n)?[]:j(n.querySelectorAll(e),un.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==Bn)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return Ln(n)?S.none():S.from(n.querySelector(e)).map(un.fromDom)}},Hn=(In().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),function(e,t){return Fn.all(t,e)}),zn=r.trim,Un=function(e){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},$n=Un("true"),jn=Un("false"),Wn=function(e,t,n,r,o){return{type:e,title:t,url:n,level:r,attach:o}},qn=function(e){return e.innerText||e.textContent},Vn=function(e){return e.id?e.id:(t="h",n=(new Date).getTime(),t+"_"+Math.floor(1e9*Math.random())+ ++sn+String(n));var t,n},Gn=function(e){return function(e){return e&&"A"===e.nodeName&&(e.id||e.name)}(e)&&Kn(e)},Yn=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},Kn=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return $n(e)}return!1}(e)&&!jn(e)},Xn=function(e){return Yn(e)&&Kn(e)},Jn=function(e){var t=Vn(e);return Wn("header",qn(e),"#"+t,function(e){return Yn(e)?parseInt(e.nodeName.substr(1),10):0}(e),function(){e.id=t})},Zn=function(e){var t=e.id||e.name,n=qn(e);return Wn("anchor",n||"#"+t,"#"+t,0,x)},Qn=function(e){var t,n;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,j(Hn(un.fromDom(n),t),function(e){return e.dom()})},er=function(e){return zn(e.title).length>0},tr=function(e){var t=Qn(e);return q(function(e){return j(q(e,Xn),Jn)}(t).concat(function(e){return j(q(e,Gn),Zn)}(t)),er)},nr={},rr=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},or=function(e,t){return{title:e,value:{title:e,url:t,attach:x}}},ir=function(e,t,n){var r=t in e?e[t]:n;return!1===r?null:r},ar=function(e,t,n,o){var i,a,s,c={title:"-"},u=function(e){var o=e.hasOwnProperty(n)?e[n]:[],i=q(o,function(e){return function(e,t){return!$(t,function(t){return t.url===e})}(e,t)});return r.map(i,function(e){return{title:e,value:{title:e,url:e,attach:x}}})},l=function(e){return function(e){return r.map(e,rr)}(q(t,function(t){return t.type===e}))};return!1===o.typeahead_urls?[]:"file"===n?(i=[cr(e,u(nr)),cr(e,l("header")),cr(e,function(){var e=l("anchor"),t=ir(o,"anchor_top","#top"),n=ir(o,"anchor_bottom","#bottom");return null!==t&&e.unshift(or("<top>",t)),null!==n&&e.push(or("<bottom>",n)),e}())],a=function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(c,t)},s=[],W(i,function(e){s=a(s,e)}),s):cr(e,u(nr))},sr=function(e,t){var n,r,o,i=nr[t];/^https?/.test(e)&&(i?(n=i,r=e,o=U(n,r),-1===o?S.none():S.some(o)).isNone()&&(nr[t]=i.slice(0,5).concat(e)):nr[t]=[e])},cr=function(e,t){var n=e.toLowerCase(),o=r.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===o.length&&o[0].title===e?[]:o},ur=function(e,t,n){var r=t.filepicker_validator_handler;r&&e.state.on("change:value",function(t){var o;0!==(o=t.value).length?r({url:o,type:n},function(t){var n=function(e){var t=e.status,n=e.message;return"valid"===t?{status:"ok",message:n}:"unknown"===t?{status:"warn",message:n}:"invalid"===t?{status:"warn",message:n}:{status:"none",message:""}}(t);e.statusMessage(n.message),e.statusLevel(n.status)}):e.statusLevel("none")})},lr=Gt.extend({Statics:{clearHistory:function(){nr={}}},init:function(e){var t,o,i,a=this,s=window.tinymce?window.tinymce.activeEditor:n.activeEditor,c=s.settings,u=e.filetype;e.spellcheck=!1,(i=c.file_picker_types||c.file_browser_callback_types)&&(i=r.makeMap(i,/[, ]/)),i&&!i[u]||(!(o=c.file_picker_callback)||i&&!i[u]?!(o=c.file_browser_callback)||i&&!i[u]||(t=function(){o(a.getEl("inp").id,a.value(),u,window)}):t=function(){var e=a.fire("beforecall").meta;e=r.extend({filetype:u},e),o.call(s,function(e,t){a.value(e).fire("change",{meta:t})},a.value(),e)}),t&&(e.icon="browse",e.onaction=t),a._super(e),a.classes.add("filepicker"),function(e,t,n,r){var o=function(o){var i=tr(n),a=ar(o,i,r,t);e.showAutoComplete(a,o)};e.on("autocomplete",function(){o(e.value())}),e.on("selectitem",function(t){var n=t.value;e.value(n.url);var o=function(e){var t=e.title;return t.raw?t.raw:t}(n);"image"===r?e.fire("change",{meta:{alt:o,attach:n.attach}}):e.fire("change",{meta:{text:o,attach:n.attach}}),e.focus()}),e.on("click",function(t){0===e.value().length&&"INPUT"===t.target.nodeName&&o("")}),e.on("PostRender",function(){e.getRoot().on("submit",function(t){t.isDefaultPrevented()||sr(e.value(),r)})})}(a,c,s.getBody(),u),ur(a,c,u)}}),fr=Ut.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}}),dr=Ut.extend({recalc:function(e){var t,n,r,o,i,a,s,c,u,l,f,d,m,p,h,g,v,b,y,x,w,C,k,T,_,E,S,N,R,A,D,O,P,I,B,M,L,F=[],H=Math.max,z=Math.min;for(r=e.items().filter(":visible"),o=e.layoutRect(),i=e.paddingBox,a=e.settings,d=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,c=e.isRtl()?a.pack||"end":a.pack,u=a.spacing||0,"row-reversed"!==d&&"column-reverse"!==d||(r=r.set(r.toArray().reverse()),d=d.split("-")[0]),"column"===d?(T="y",C="h",k="minH",_="maxH",S="innerH",E="top",N="deltaH",R="contentH",I="left",O="w",A="x",D="innerW",P="minW",B="right",M="deltaW",L="contentW"):(T="x",C="w",k="minW",_="maxW",S="innerW",E="left",N="deltaW",R="contentW",I="top",O="h",A="y",D="innerH",P="minH",B="bottom",M="deltaH",L="contentH"),f=o[S]-i[E]-i[E],w=l=0,t=0,n=r.length;t<n;t++)p=(m=r[t]).layoutRect(),h=m.settings.flex,f-=t<n-1?u:0,h>0&&(l+=h,p[_]&&F.push(m),p.flex=h),f-=p[k],(g=i[I]+p[P]+i[B])>w&&(w=g);if((y={})[k]=f<0?o[k]-f+o[N]:o[S]-f+o[N],y[P]=w+o[M],y[R]=o[S]-f,y[L]=w,y.minW=z(y.minW,o.maxW),y.minH=z(y.minH,o.maxH),y.minW=H(y.minW,o.startMinWidth),y.minH=H(y.minH,o.startMinHeight),!o.autoResize||y.minW===o.minW&&y.minH===o.minH){for(b=f/l,t=0,n=F.length;t<n;t++)v=(p=(m=F[t]).layoutRect())[_],(g=p[k]+p.flex*b)>v?(f-=p[_]-p[k],l-=p.flex,p.flex=0,p.maxFlexSize=v):p.maxFlexSize=0;for(b=f/l,x=i[E],y={},0===l&&("end"===c?x=f+i[E]:"center"===c?(x=Math.round(o[S]/2-(o[S]-f)/2)+i[E])<0&&(x=i[E]):"justify"===c&&(x=i[E],u=Math.floor(f/(r.length-1)))),y[A]=i[I],t=0,n=r.length;t<n;t++)g=(p=(m=r[t]).layoutRect()).maxFlexSize||p[k],"center"===s?y[A]=Math.round(o[D]/2-p[O]/2):"stretch"===s?(y[O]=H(p[P]||0,o[D]-i[I]-i[B]),y[A]=i[I]):"end"===s&&(y[A]=o[D]-p[O]-i.top),p.flex>0&&(g+=p.flex*b),y[C]=g,y[T]=x,m.layoutRect(y),m.recalc&&m.recalc(),x+=g+u}else if(y.w=y.minW,y.h=y.minH,e.layoutRect(y),this.recalc(e),null===e._lastRect){var U=e.parent();U&&(U._lastRect=null,U.recalc())}}}),mr=zt.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}}),pr=function(e,t){return Fn.one(t,e)},hr=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},gr=function(e,t,n){var r=function(e){n(e,t)};e.formatter?e.formatter.formatChanged(t,r):e.on("init",function(){e.formatter.formatChanged(t,r)})},vr=function(e,t){return function(n){gr(e,t,function(e){n.control.active(e)})}},br=function(e){var t=["alignleft","aligncenter","alignright","alignjustify"],n=[{text:"Left",icon:"alignleft",onclick:hr(e,"alignleft")},{text:"Center",icon:"aligncenter",onclick:hr(e,"aligncenter")},{text:"Right",icon:"alignright",onclick:hr(e,"alignright")},{text:"Justify",icon:"alignjustify",onclick:hr(e,"alignjustify")}];e.addMenuItem("align",{text:"Align",menu:n}),e.addButton("align",{type:"menubutton",icon:"alignleft",menu:n,onShowMenu:function(n){var o=n.control.menu;r.each(t,function(t,n){o.items().eq(n).each(function(n){return n.active(e.formatter.match(t))})})},onPostRender:function(n){var o=n.control;r.each(t,function(t,n){gr(e,t,function(e){o.icon("alignleft"),e&&o.icon(t)})})}}),r.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{active:!1,tooltip:t[0],cmd:t[1],onPostRender:vr(e,n)})})},yr=function(e){return e?e.split(",")[0]:""},xr=function(e,t){return function(){var n=this;n.state.set("value",null),e.on("init nodeChange",function(o){var i=e.queryCommandValue("FontName"),a=function(e,t){var n,o=t?t.toLowerCase():"";return r.each(e,function(e){e.value.toLowerCase()===o&&(n=e.value)}),r.each(e,function(e){n||yr(e.value).toLowerCase()!==yr(o).toLowerCase()||(n=e.value)}),n}(t,i);n.value(a||null),!a&&i&&n.text(yr(i))})}},wr=function(e){e.addButton("fontselect",function(){var t=function(e){var t=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.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");return r.map(t,function(e){return{text:{raw:e[0]},value:e[1],textStyle:-1===e[1].indexOf("dings")?"font-family:"+e[1]:""}})}(e);return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:xr(e,t),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}})},Cr=function(e){wr(e)},kr=function(e,t){return/[0-9.]+px$/.test(e)?function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}(72*parseInt(e,10)/96,t||0)+"pt":e},Tr=function(e,t,n){var o;return r.each(e,function(e){e.value===n?o=n:e.value===t&&(o=t)}),o},_r=function(e){e.addButton("fontsizeselect",function(){var t=function(e){var t=e.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt";return r.map(t.split(" "),function(e){var t=e,n=e,r=e.split("=");return r.length>1&&(t=r[0],n=r[1]),{text:t,value:n}})}(e);return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:function(e,t){return function(){var n=this;e.on("init nodeChange",function(r){var o,i,a,s;if(o=e.queryCommandValue("FontSize"))for(a=3;!s&&a>=0;a--)i=kr(o,a),s=Tr(t,i,o);n.value(s||null),s||n.text(i)})}}(e,t),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}})},Er=function(e){_r(e)},Sr=function(e,t){var n=t.length;return r.each(t,function(t){t.menu&&(t.hidden=0===Sr(e,t.menu));var r=t.format;r&&(t.hidden=!e.formatter.canApply(r)),t.hidden&&n--}),n},Nr=function(e,t){var n=t.items().length;return t.items().each(function(t){t.menu&&t.visible(Nr(e,t.menu)>0),!t.menu&&t.settings.menu&&t.visible(Sr(e,t.settings.menu)>0);var r=t.settings.format;r&&t.visible(e.formatter.canApply(r)),t.visible()||n--}),n},Rr=function(e){var t=function(e){var t=0,n=[],o=[{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:"strikethrough",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:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],i=function(e){var o=[];if(e)return r.each(e,function(e){var r={text:e.title,icon:e.icon};if(e.items)r.menu=i(e.items);else{var a=e.format||"custom"+t++;e.format||(e.name=a,n.push(e)),r.format=a,r.cmd=e.cmd}o.push(r)}),o};return e.on("init",function(){r.each(n,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:e.settings.style_formats_merge?e.settings.style_formats?i(o.concat(e.settings.style_formats)):i(o):i(e.settings.style_formats||o),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return e.formatter.getCssText(this.settings.format)},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;(n=t.settings.format)&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),(r=t.settings.cmd)&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&hr(e,this.settings.format)(),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}(e);!function(e,t){e.addMenuItem("formats",{text:"Formats",menu:t})}(e,t),function(e,t){e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:t,onShowMenu:function(){e.settings.style_formats_autohide&&Nr(e,this.menu)}})}(e,t)},Ar=function(e,t){return function(){var n=[];return r.each(t,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:t[0][0],values:n,fixedWidth:!0,onselect:function(t){if(t.control){var n=t.control.value();hr(e,n)()}},onPostRender:function(e,t,n){return function(){var o=this;e.on("nodeChange",function(i){var a=e.formatter,s=null;r.each(i.parents,function(e){if(r.each(t,function(t){if(n?a.matchNode(e,n,{value:t.value})&&(s=t.value):a.matchNode(e,t.value)&&(s=t.value),s)return!1}),s)return!1}),o.value(s)})}}(e,n)}}},Dr=function(e){var t=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");e.addMenuItem("blockformats",{text:"Blocks",menu:function(e,t){return r.map(t,function(t){return{text:t[0],onclick:hr(e,t[1]),textStyle:function(){return e.formatter.getCssText(t[1])}}})}(e,t)}),e.addButton("formatselect",Ar(e,t))},Or=function(e,t){var n,o;if("string"==typeof t)o=t.split(" ");else if(r.isArray(t))return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);K.apply(t,e[n])}return t}(r.map(t,function(t){return Or(e,t)}));return n=r.grep(o,function(t){return"|"===t||t in e.menuItems}),r.map(n,function(t){return"|"===t?{text:"-"}:e.menuItems[t]})},Pr=function(e){return e&&"-"===e.text},Ir=function(e){var t=q(e,function(e,t,n){return!Pr(e)||!Pr(n[t-1])});return q(t,function(e,t,n){return!Pr(e)||t>0&&t<n.length-1})},Br=function(e){var t=e.settings.insert_button_items;return Ir(t?Or(e,t):function(e,t){var n=[{text:"-"}],o=r.grep(e.menuItems,function(e){return e.context===t});return r.each(o,function(e){"before"===e.separator&&n.push({text:"|"}),e.prependToContext?n.unshift(e):n.push(e),"after"===e.separator&&n.push({text:"|"})}),n}(e,"insert"))},Mr=function(e){!function(e){e.addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(Br(e)),this.menu.renderNew()}})}(e)},Lr=function(e){!function(e){r.each({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{active:!1,tooltip:t,onPostRender:vr(e,n),onclick:hr(e,n)})})}(e),function(e){r.each({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"],removeformat:["Clear formatting","RemoveFormat"],remove:["Remove","Delete"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})})}(e),function(e){r.each({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"]},function(t,n){e.addButton(n,{active:!1,tooltip:t[0],cmd:t[1],onPostRender:vr(e,n)})})}(e)},Fr=function(e){Lr(e),function(e){r.each({bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"],newdocument:["New document","mceNewDocument"],cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.addMenuItem("codeformat",{text:"Code",icon:"code",onclick:hr(e,"code")})}(e)},Hr=function(e,t){return function(){var n=this,r=function(){var n="redo"===t?"hasRedo":"hasUndo";return!!e.undoManager&&e.undoManager[n]()};n.disabled(!r()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){n.disabled(e.readonly||!r())})}},zr=function(e){!function(e){e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:Hr(e,"undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:Hr(e,"redo"),cmd:"redo"})}(e),function(e){e.addButton("undo",{tooltip:"Undo",onPostRender:Hr(e,"undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:Hr(e,"redo"),cmd:"redo"})}(e)},Ur=function(e){!function(e){e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:function(e){return function(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}}(e),cmd:"mceToggleVisualAid"})}(e)},$r={setup:function(e){!function(e){e.rtl&&(et.rtl=!0)}(e),function(e){e.on("mousedown",function(){xt.hideAll()})}(e),function(e){e.settings.ui_container&&(ae.container=pr(un.fromDom(document.body),e.settings.ui_container).fold(w(null),function(e){return e.dom()}))}(e),Nt.tooltips=!ae.iOS,et.translate=function(e){return n.translate(e)},Dr(e),br(e),Fr(e),zr(e),Er(e),Cr(e),Rr(e),Ur(e),Mr(e)}},jr=Ut.extend({recalc:function(e){var t,n,r,o,i,a,s,c,u,l,f,d,m,p,h,g,v,b,y,x,w,C,k,T,_,E,S,N,R=[],A=[];t=e.settings,o=e.items().filter(":visible"),i=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(o.length)),n=Math.ceil(o.length/r),b=t.spacingH||t.spacing||0,y=t.spacingV||t.spacing||0,x=t.alignH||t.align,w=t.alignV||t.align,g=e.paddingBox,N="reverseRows"in t?t.reverseRows:e.isRtl(),x&&"string"==typeof x&&(x=[x]),w&&"string"==typeof w&&(w=[w]);for(f=0;f<r;f++)R.push(0);for(d=0;d<n;d++)A.push(0);for(d=0;d<n;d++)for(f=0;f<r&&(l=o[d*r+f]);f++)T=(u=l.layoutRect()).minW,_=u.minH,R[f]=T>R[f]?T:R[f],A[d]=_>A[d]?_:A[d];for(E=i.innerW-g.left-g.right,C=0,f=0;f<r;f++)C+=R[f]+(f>0?b:0),E-=(f>0?b:0)+R[f];for(S=i.innerH-g.top-g.bottom,k=0,d=0;d<n;d++)k+=A[d]+(d>0?y:0),S-=(d>0?y:0)+A[d];if(C+=g.left+g.right,k+=g.top+g.bottom,(c={}).minW=C+(i.w-i.innerW),c.minH=k+(i.h-i.innerH),c.contentW=c.minW-i.deltaW,c.contentH=c.minH-i.deltaH,c.minW=Math.min(c.minW,i.maxW),c.minH=Math.min(c.minH,i.maxH),c.minW=Math.max(c.minW,i.startMinWidth),c.minH=Math.max(c.minH,i.startMinHeight),!i.autoResize||c.minW===i.minW&&c.minH===i.minH){var D;i.autoResize&&((c=e.layoutRect(c)).contentW=c.minW-i.deltaW,c.contentH=c.minH-i.deltaH),D="start"===t.packV?0:S>0?Math.floor(S/n):0;var O=0,P=t.flexWidths;if(P)for(f=0;f<P.length;f++)O+=P[f];else O=r;var I=E/O;for(f=0;f<r;f++)R[f]+=P?P[f]*I:I;for(p=g.top,d=0;d<n;d++){for(m=g.left,s=A[d]+D,f=0;f<r&&(l=o[N?d*r+r-1-f:d*r+f]);f++)h=l.settings,u=l.layoutRect(),a=Math.max(R[f],u.startMinWidth),u.x=m,u.y=p,"center"===(v=h.alignH||(x?x[f]||x[0]:null))?u.x=m+a/2-u.w/2:"right"===v?u.x=m+a-u.w:"stretch"===v&&(u.w=a),"center"===(v=h.alignV||(w?w[f]||w[0]:null))?u.y=p+s/2-u.h/2:"bottom"===v?u.y=p+s-u.h:"stretch"===v&&(u.h=s),l.layoutRect(u),m+=a+b,l.recalc&&l.recalc();p+=s+y}}else if(c.w=c.minW,c.h=c.minH,e.layoutRect(c),this.recalc(e),null===e._lastRect){var B=e.parent();B&&(B._lastRect=null,B.recalc())}}}),Wr=Nt.extend({renderHtml:function(){return this.classes.add("iframe"),this.canFocus=!1,'<iframe id="'+this._id+'" class="'+this.classes+'" tabindex="-1" src="'+(this.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):y.setTimeout(function(){n.html(e)}),this}}),qr=Nt.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+this.encode(this.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+e+"ico "+e+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),Vr=Nt.extend({init:function(e){this._super(e),this.classes.add("widget").add("label"),this.canFocus=!1,e.multiline&&this.classes.add("autoscroll"),e.strong&&this.classes.add("strong")},initLayoutRect:function(){var e=this._super();return this.settings.multiline&&(ve.getSize(this.getEl()).width>e.maxW&&(e.minW=e.maxW,this.classes.add("multiline")),this.getEl().style.width=e.minW+"px",e.startMinH=e.h=e.minH=Math.min(e.maxH,ve.getSize(this.getEl()).height)),e},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this.settings.forId,r=this.settings.html?this.settings.html:this.encode(this.state.get("text"));return!n&&(t=this.settings.forName)&&(e=this.getRoot().find("#"+t)[0])&&(n=e._id),n?'<label id="'+this._id+'" class="'+this.classes+'"'+(n?' for="'+n+'"':"")+">"+r+"</label>":'<span id="'+this._id+'" class="'+this.classes+'">'+r+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),Gr=ot.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}}),Yr=Gr.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),Kr=$t.extend({init:function(e){this._renderOpen=!0,this._super(e),e=this.settings,this.classes.add("menubtn"),e.fixedWidth&&this.classes.add("fixed-width"),this.aria("haspopup",!0),this.state.set("menu",e.menu||this.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||(t=n.state.get("menu")||[],n.classes.add("opened"),t.length?t={type:"menu",animate:!0,items:t}:(t.type=t.type||"menu",t.animate=!0),t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=f.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){e.control===n.menu&&(n.activeMenu("show"===e.type),n.classes.toggle("opened","show"===e.type)),n.aria("expanded","show"===e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this._id,n=this.classPrefix,r=this.settings.icon,o=this.state.get("text"),i="";return(e=this.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(this.classes.add("btn-has-text"),i='<span class="'+n+'txt">'+this.encode(o)+"</span>"),r=this.settings.icon?n+"ico "+n+"i-"+r:"",this.aria("role",this.parent()instanceof Yr?"menuitem":"button"),'<div id="'+t+'" class="'+this.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+i+' <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(t.target,e.getEl())&&(e.focus(),e.showMenu(!t.aria),t.aria&&e.menu.items().filter(":visible")[0].focus())}),e.on("mouseenter",function(t){var n,r=t.control,o=e.parent();r&&o&&r instanceof Kr&&r.parent()===o&&(o.items().filter("MenuButton").each(function(e){e.hideMenu&&e!==r&&(e.menu&&e.menu.visible()&&(n=!0),e.hideMenu())}),n&&(r.focus(),r.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}}),Xr=xt.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=r.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu"),e.animate&&11!==ae.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var e,t=this;function n(){t.throbber&&(t.throbber.hide(),t.throbber=null)}t.settings.itemsFactory&&(t.throbber||(t.throbber=new Tt(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",n)),t.requestTime=e=(new Date).getTime(),t.settings.itemsFactory(function(r){0!==r.length?t.requestTime===e&&(t.getEl().style.width="",t.getEl("body").style.width="",n(),t.items().remove(),t.getEl("body").innerHTML="",t.add(r),t.renderNew(),t.fire("loaded")):t.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;if(n.icon||n.image||n.selectable)return e._hasIcons=!0,!1}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e.on("show hide",function(t){t.control===e&&("show"===t.type?y.setTimeout(function(){e.classes.add("in")},0):e.classes.remove("in"))}),e._super()}}),Jr=Kr.extend({init:function(e){var t,n,r,o,i=this;i._super(e),e=i.settings,i._values=t=e.values,t&&(void 0!==e.value&&function t(o){for(var a=0;a<o.length;a++){if(n=o[a].selected||e.value===o[a].value)return r=r||o[a].text,i.state.set("value",o[a].value),!0;if(o[a].menu&&t(o[a].menu))return!0}}(t),!n&&t.length>0&&(r=t[0].text,i.state.set("value",t[0].value)),i.state.set("menu",t)),i.state.set("text",e.text||r),i.classes.add("listbox"),i.on("select",function(t){var n=t.control;o&&(t.lastControl=o),e.multiple?n.active(!n.active()):i.value(t.control.value()),o=n})},value:function(e){return 0===arguments.length?this.state.get("value"):void 0===e?this:(this.settings.values?r.grep(this.settings.values,function(t){return t.value===e}).length>0?this.state.set("value",e):null===e&&this.state.set("value",null):this.state.set("value",e),this)},bindStates:function(){var e=this;return e.on("show",function(t){var n,r;n=t.control,r=e.value(),n instanceof Xr&&n.items().each(function(e){e.hasMenus()||e.active(e.value()===r)})}),e.state.on("change:value",function(t){var n=function e(t,n){var r;if(t)for(var o=0;o<t.length;o++){if(t[o].value===n)return t[o];if(t[o].menu&&(r=e(t[o].menu,n)))return r}}(e.state.get("menu"),t.value);n?e.text(n.text):e.text(e.settings.text)}),e._super()}}),Zr=Nt.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t;this._super(e),e=this.settings,this.classes.add("menu-item"),e.menu&&this.classes.add("menu-item-expand"),e.preview&&this.classes.add("menu-item-preview"),"-"!==(t=this.state.get("text"))&&"|"!==t||(this.classes.add("menu-item-sep"),this.aria("role","separator"),this.state.set("text","-")),e.selectable&&(this.aria("role","menuitemcheckbox"),this.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||this.classes.add("menu-item-normal"),this.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&this.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e,t=this,n=t.settings,r=t.parent();if(r.items().each(function(e){e!==t&&e.hideMenu()}),n.menu){(e=t.menu)?e.show():((e=n.menu).length?e={type:"menu",items:e}:e.type=e.type||"menu",r.settings.itemDefaults&&(e.itemDefaults=r.settings.itemDefaults),(e=t.menu=f.create(e).parent(t).renderTo()).reflow(),e.on("cancel",function(n){n.stopPropagation(),t.focus(),e.hide()}),e.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),e.on("hide",function(n){n.control===e&&t.classes.remove("selected")}),e.submenu=!0),e._parentMenu=r,e.classes.add("menu-sub");var o=e.testMoveRel(t.getEl(),t.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);e.moveRel(t.getEl(),o),e.rel=o,o="menu-sub-"+o,e.classes.remove(e._lastRel).add(o),e._lastRel=o,t.classes.add("selected"),t.aria("expanded",!0)}},hideMenu:function(){return this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide(),this.aria("expanded",!1)),this},renderHtml:function(){var e,t=this._id,n=this.settings,r=this.classPrefix,o=this.state.get("text"),i=this.settings.icon,a="",s=n.shortcut,c=this.encode(n.url);function u(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){var t=n.match||"";return t?e.replace(new RegExp(u(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function f(e){return e.replace(new RegExp(u("!mce~match["),"g"),"<b>").replace(new RegExp(u("]mce~match!"),"g"),"</b>")}return i&&this.parent().classes.add("menu-has-icons"),n.image&&(a=" style=\"background-image: url('"+n.image+"')\""),s&&(s=function(e){var t,n,r={};for(r=ae.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=r[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(s)),i=r+"ico "+r+"i-"+(this.settings.icon||"none"),e="-"!==o?'<i class="'+i+'"'+a+"></i>":"",o=f(this.encode(l(o))),c=f(this.encode(l(c))),'<div id="'+t+'" class="'+this.classes+'" tabindex="-1">'+e+("-"!==o?'<span id="'+t+'-text" class="'+r+'text">'+o+"</span>":"")+(s?'<div id="'+t+'-shortcut" class="'+r+'menu-shortcut">'+s+"</div>":"")+(n.menu?'<div class="'+r+'caret"></div>':"")+(c?'<div class="'+r+'menu-item-link">'+c+"</div>":"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&(r.setAttribute("style",n),e._textStyle=n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),y.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return function(e,t){var n=e._textStyle;if(n){var r=e.getEl("text");r.setAttribute("style",n),t&&(r.style.color="",r.style.backgroundColor="")}}(this,e),void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),Qr=qt.extend({Defaults:{classes:"radio",role:"radio"}}),eo=Nt.extend({renderHtml:function(){var e=this.classPrefix;return this.classes.add("resizehandle"),"both"===this.settings.direction&&this.classes.add("resizehandle-both"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"><i class="'+e+"ico "+e+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new at(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!==e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function to(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}var no=Nt.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13===e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t="";return e=to(this._options),this.size&&(t=' size = "'+this.size+'"'),'<select id="'+this._id+'" class="'+this.classes+'"'+t+">"+e+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(t){e.getEl().innerHTML=to(t.value)}),e._super()}});function ro(e,t,n){return e<t&&(e=t),e>n&&(e=n),e}function oo(e,t,n){e.setAttribute("aria-"+t,n)}function io(e,t){var n,r,o,i,a;"v"===e.settings.orientation?(o="top",r="height",n="h"):(o="left",r="width",n="w"),a=e.getEl("handle"),i=((e.layoutRect()[n]||100)-ve.getSize(a)[r])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",a.style[o]=i,a.style.height=e.layoutRect().h+"px",oo(a,"valuenow",t),oo(a,"valuetext",""+e.settings.previewFilter(t)),oo(a,"valuemin",e._minValue),oo(a,"valuemax",e._maxValue)}var ao=Nt.extend({init:function(e){e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),this._super(e),this.classes.add("slider"),"v"===e.orientation&&this.classes.add("vertical"),this._minValue=z(e.minValue)?e.minValue:0,this._maxValue=z(e.maxValue)?e.maxValue:100,this._initValue=this.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,r,o,i,a=this;e=a._minValue,t=a._maxValue,"v"===a.settings.orientation?(n="screenY",r="top",o="height",i="h"):(n="screenX",r="left",o="width",i="w"),a._super(),function(e,t){function n(n){var r,o;r=a.value(),r=ro(r=function(e,t,n){return n*(t-e)-e}(e,t,(r+(o=e))/(t-o)+.05*n),e,t),a.value(r),a.fire("dragstart",{value:r}),a.fire("drag",{value:r}),a.fire("dragend",{value:r})}a.on("keydown",function(e){switch(e.keyCode){case 37:case 38:n(-1);break;case 39:case 40:n(1)}})}(e,t),function(e,t,s){var c,u,l,f,d;a._dragHelper=new at(a._id,{handle:a._id+"-handle",start:function(e){c=e[n],u=parseInt(a.getEl("handle").style[r],10),l=(a.layoutRect()[i]||100)-ve.getSize(s)[o],a.fire("dragstart",{value:d})},drag:function(o){var i=o[n]-c;f=ro(u+i,0,l),s.style[r]=f+"px",d=e+f/l*(t-e),a.value(d),a.tooltip().text(""+a.settings.previewFilter(d)).show().moveRel(s,"bc tc"),a.fire("drag",{value:d})},stop:function(){a.tooltip().hide(),a.fire("dragend",{value:d})}})}(e,t,a.getEl("handle"))},repaint:function(){this._super(),io(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){io(e,t.value)}),e._super()}}),so=Nt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}}),co=Kr.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),r=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,he(e).css({width:r.w-ve.getSize(t).width,height:r.h-2}),he(t).css({height:r.h-2}),this},activeMenu:function(e){he(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this._id,r=this.classPrefix,o=this.state.get("icon"),i=this.state.get("text"),a=this.settings,s="";return(e=a.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=a.icon?r+"ico "+r+"i-"+o:"",i&&(this.classes.add("btn-has-text"),s='<span class="'+r+'txt">'+this.encode(i)+"</span>"),t="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'<div id="'+n+'" class="'+this.classes+'" role="button"'+t+' tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+s+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(this._menuBtnText?(o?"":"")+this._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this.settings.onclick;return this.on("click",function(t){var n=t.target;if(t.control===this)for(;n;){if(t.aria&&"down"!==t.aria.key||"BUTTON"===n.nodeName&&-1===n.className.indexOf("open"))return t.stopImmediatePropagation(),void(e&&e.call(this,t));n=n.parentNode}}),delete this.settings.onclick,this._super()}}),uo=mr.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),lo=dt.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var t;this.activeTabId&&(t=this.getEl(this.activeTabId),he(t).removeClass(this.classPrefix+"active"),t.setAttribute("aria-selected","false")),this.activeTabId="t"+e,(t=this.getEl("t"+e)).setAttribute("aria-selected","true"),he(t).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!==n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,o){var i=e._id+"-t"+o;t.aria("role","tabpanel"),t.aria("labelledby",i),n+='<div id="'+i+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(n&&n.id===e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]===t.target&&e.activateTab(r)})},initLayoutRect:function(){var e,t,n;t=(t=ve.getSize(this.getEl("head")).width)<0?0:t,n=0,this.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),this.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=ve.getSize(this.getEl("head")).height;return this.settings.minWidth=t,this.settings.minHeight=n+r,(e=this._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),fo=Nt.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13===e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,r,o,i=0;e=this.getEl().style,t=this._layoutRect,o=this._lastRepaintRect||{};var a=document;return!this.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-i+"px"),r=(n=this.borderBox).left+n.right+8,i=n.top+n.bottom+(this.settings.multiline?8:0),t.x!==o.x&&(e.left=t.x+"px",o.x=t.x),t.y!==o.y&&(e.top=t.y+"px",o.y=t.y),t.w!==o.w&&(e.width=t.w-r+"px",o.w=t.w),t.h!==o.h&&(e.height=t.h-i+"px",o.h=t.h),this._lastRepaintRect=o,this.fire("repaint",{},!1),this},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},r.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=n[t]}),this.disabled()&&(e.disabled="disabled"),n.subtype&&(e.type=n.subtype),(t=ve.create(n.multiline?"textarea":"input",e)).value=this.state.get("value"),t.className=this.classes.toString(),t.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!==t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}}),mo=function(){return{Selector:Me,Collection:He,ReflowQueue:Ge,Control:et,Factory:f,KeyboardNavigation:nt,Container:ot,DragHelper:at,Scrollable:ft,Panel:dt,Movable:ke,Resizable:mt,FloatPanel:xt,Window:Lt,MessageBox:Ft,Tooltip:St,Widget:Nt,Progress:Rt,Notification:Dt,Layout:zt,AbsoluteLayout:Ut,Button:$t,ButtonGroup:Wt,Checkbox:qt,ComboBox:Gt,ColorBox:Yt,PanelButton:Kt,ColorButton:Jt,ColorPicker:Qt,Path:tn,ElementPath:nn,FormItem:rn,Form:on,FieldSet:an,FilePicker:lr,FitLayout:fr,FlexLayout:dr,FlowLayout:mr,FormatControls:$r,GridLayout:jr,Iframe:Wr,InfoBox:qr,Label:Vr,Toolbar:Gr,MenuBar:Yr,MenuButton:Kr,MenuItem:Zr,Throbber:Tt,Menu:Xr,ListBox:Jr,Radio:Qr,ResizeHandle:eo,SelectBox:no,Slider:ao,Spacer:so,SplitButton:co,StackLayout:uo,TabPanel:lo,TextBox:fo,DropZone:en,BrowseButton:jt}},po=function(e){e.ui?r.each(mo(),function(t,n){e.ui[n]=t}):e.ui=mo()};r.each(mo(),function(e,t){f.add(t,e)}),po(window.tinymce?window.tinymce:{}),t.add("modern",function(e){return $r.setup(e),Ht(e)})}()},function(e,t,n){n(24)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e,t,n){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";e.execCommand(r,!1,!1===n?null:{"list-style-type":n})},r=function(e){e.addCommand("ApplyUnorderedListStyle",function(t,r){n(e,"UL",r["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(t,r){n(e,"OL",r["list-style-type"])})},o=function(e){var t=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},i=function(e){var t=e.getParam("advlist_bullet_styles","default,circle,disc,square");return t?t.split(/[ ,]/):[]},a=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},s=function(e){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&function(e,t){return e.$.contains(e.getBody(),t)}(e,t)}},c=function(e){var t=e.dom.getParent(e.selection.getNode(),"ol,ul");return e.dom.getStyle(t,"listStyleType")||""},u=function(e){return t.map(e,function(e){return{text:function(e){return e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()})}(e),data:"default"===e?"":e}})},l=function(e,n){return function(r){var o=r.control;e.on("NodeChange",function(r){var i=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(r.parents,a),c=-1!==i?r.parents.slice(0,i):r.parents,u=t.grep(c,s(e));o.active(u.length>0&&u[0].nodeName===n)})}},f=function(e,t,r,o,i,a){e.addButton(t,{active:!1,type:"splitbutton",tooltip:r,menu:u(a),onPostRender:l(e,i),onshow:function(e){return function(t){var n=c(e);t.control.items().each(function(e){e.active(e.settings.data===n)})}}(e),onselect:function(t){n(e,i,t.control.settings.data)},onclick:function(){e.execCommand(o)}})},d=function(e,t,n,r,o,i){i.length>0?f(e,t,n,r,o,i):function(e,t,n,r,o,i){e.addButton(t,{active:!1,type:"button",tooltip:n,onPostRender:l(e,o),onclick:function(){e.execCommand(r)}})}(e,t,n,r,o)},m=function(e){d(e,"numlist","Numbered list","InsertOrderedList","OL",o(e)),d(e,"bullist","Bullet list","InsertUnorderedList","UL",i(e))};e.add("advlist",function(e){(function(e,n){var r=e.settings.plugins?e.settings.plugins:"";return-1!==t.inArray(r.split(/[ ,]/),n)})(e,"lists")&&(m(e),r(e))})}()},function(e,t,n){n(26)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.Env"),r="[-'\\.??????]",o="[:?????]",i="[+*/,;;????????????]",a="[0-9?-???-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-?]",s="\\r",c="\\n",u="[\v\f\u2028\u2029]",l="[?-??-??-????????-??-???-??-????-???-??-??-??-??-??-??-??-??-??-??-??-????-???-????-?????-???-????-??????-???-??-??-????-???-????-???????-??-??-???-??-??-??-?????????-??-??-????????-??-??-????????-???-?????-??-???-????-?????????-????-??-???-??-??-??-??-??-??-???-??-??-??-??????-???-???-??-??-????-??-??-???-??-??-??-??-??-??-??-??-????-??-????-??-???-??-????-?????????-????-??-??-??-??-??-??-???????-???????-?????-??-???]",f="[?-????????-??-??-?\ufeff?-?]",d="[?-????-??-??-??-??-??-?]",m="[=_??????-???-?<>]",p="[!-#%-*,-\\/:;?@\\[-\\]_{};?-?????????????????-???-??-??-??????????-??-???-????-???-???????-????-??-??-??????-??-??-??-??-?????-??-??-??-????????-????-??-??-????-?????-????-??-??-????????-????-??-????-?????-????-???????-??-??-??????-??-??-??????-?????-?]",h={characterIndices:{ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},SETS:[new RegExp("[A-Za-z---??-??-????-????-???-???-??-??-??-??-???-??-??-??-????-???????-????-??-???-?????-?????-??-????-??-??-??-????-??-???-??????-????-????-??-????????-???-??-??-??-??-????-??????-????-??-????-?????-????-??-??-?????????-??-???-??-??-??-??-???????-??-??-??-??-????????-??-??-??????-??-??-??-???-???-??-??-??-??-???-??-??-???-??-??-??-??-??-???-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-??-???-??-??-??-??-??-????-??-??-??-??-??-??-??-??-??-??-??-?????-??-??-???-??-??-??-??-??-??-????-????-???-?????-??-??-??-???-??-??-??-??-??-??-??-???-??-??-??-??-??-??-??-??-??????-??-??-??-??-??-??-????-??-??-??-??-??-????-??-??-??-??-??-??-??-???-??-??-??-???-??-??-??-??-??-??-??-??-??-??-??-??-??-???-??-??-???????-??-??-??-??-??-??-??-??-??-??-??-??-??-?]"),new RegExp(r),new RegExp(o),new RegExp(i),new RegExp(a),new RegExp(s),new RegExp(c),new RegExp(u),new RegExp(l),new RegExp(f),new RegExp(d),new RegExp(m),new RegExp("@")],EMPTY_STRING:"",PUNCTUATION:new RegExp("^"+p+"$"),WHITESPACE:/^\s+$/},g=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},v=function(e,t){var n=[];return g(e,function(r,o){n.push(t(r,o,e))}),n},b=h.SETS,y=h.characterIndices.OTHER,x=function(e){var t,n,r=y,o=b.length;for(t=0;t<o;++t)if((n=b[t])&&n.test(e)){r=t;break}return r},w=function(e){var t,n,r=(t=x,n={},function(e){if(n[e])return n[e];var r=t(e);return n[e]=r,r});return v(e.split(""),r)},C=h.characterIndices,k=function(e,t){var n,r,o=e[t],i=e[t+1];return!(t<0||t>e.length-1&&0!==t||o===C.ALETTER&&i===C.ALETTER||(r=e[t+2],o===C.ALETTER&&(i===C.MIDLETTER||i===C.MIDNUMLET||i===C.AT)&&r===C.ALETTER||(n=e[t-1],(o===C.MIDLETTER||o===C.MIDNUMLET||i===C.AT)&&i===C.ALETTER&&n===C.ALETTER||!(o!==C.NUMERIC&&o!==C.ALETTER||i!==C.NUMERIC&&i!==C.ALETTER)||(o===C.MIDNUM||o===C.MIDNUMLET)&&i===C.NUMERIC&&n===C.NUMERIC||o===C.NUMERIC&&(i===C.MIDNUM||i===C.MIDNUMLET)&&r===C.NUMERIC||o===C.EXTEND||o===C.FORMAT||n===C.EXTEND||n===C.FORMAT||i===C.EXTEND||i===C.FORMAT||o===C.CR&&i===C.LF||o!==C.NEWLINE&&o!==C.CR&&o!==C.LF&&i!==C.NEWLINE&&i!==C.CR&&i!==C.LF&&(o===C.KATAKANA&&i===C.KATAKANA||i===C.EXTENDNUMLET&&(o===C.ALETTER||o===C.NUMERIC||o===C.KATAKANA||o===C.EXTENDNUMLET)||o===C.EXTENDNUMLET&&(i===C.ALETTER||i===C.NUMERIC||i===C.KATAKANA)||o===C.AT))))},T=h.EMPTY_STRING,_=h.WHITESPACE,E=h.PUNCTUATION,S=function(e){return"http"===e||"https"===e},N=function(e,t,n){var r=function(e,t){var n;for(n=t;n<e.length;++n){var r=e.charAt(n);if(_.test(r))break}return n}(t,n+1),o=t.substring(n+1,r);return"://"===o.substr(0,3)?{word:e+o,index:r}:{word:e,index:n}},R=function(e,t){return function(e,t){var n,r,o,i=0,a=w(e),s=a.length,c=[],u=[];for(t||(t={}),t.ignoreCase&&(e=e.toLowerCase()),r=t.includePunctuation,o=t.includeWhitespace;i<s;++i)if(n=e.charAt(i),c.push(n),k(a,i)){if((c=c.join(T))&&(o||!_.test(c))&&(r||!E.test(c)))if(S(c)){var l=N(c,e,i);u.push(l.word),i=l.index}else u.push(c);c=[]}return u}(e.replace(/\ufeff/g,""),t)},A=function(e,r){return n.ie?function(e,n){for(var r=n.getBlockElements(),o=n.getShortEndedElements(),i=n.getWhiteSpaceElements(),a=function(e){return r[e.nodeName]||o[e.nodeName]||i[e.nodeName]},s="",c=new t(e,e);e=c.next();)3===e.nodeType?s+=e.data:a(e)&&(s+=" ");return s}(e,r):e.innerText},D=function(e){return R(function(e){return e.removed?"":A(e.getBody(),e.schema)}(e)).length},O=function(e){return{getCount:function(){return D(e)}}},P=tinymce.util.Tools.resolve("tinymce.util.Delay"),I=tinymce.util.Tools.resolve("tinymce.util.I18n"),B=function(e){var t=function(e){return I.translate(["{0} words",D(e)])},n=function(){e.theme.panel.find("#wordcount").text(t(e))};e.on("init",function(){var r=e.theme.panel&&e.theme.panel.find("#statusbar")[0],o=P.debounce(n,300);r&&P.setEditorTimeout(e,function(){r.insert({type:"label",name:"wordcount",text:t(e),classes:"wordcount",disabled:e.settings.readonly},0),e.on("setcontent beforeaddundo undo redo keyup",o)},0)})};e.add("wordcount",function(e){return B(e),O(e)})}()},function(e,t,n){n(28)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},r=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;t>n&&(t=n)}return t},i=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},a=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},s=function(e,t,o){var s,c,u,l,f,d,m,p,h,g,v=n(e),b=r(e);if("A"!==e.selection.getNode().tagName){if((s=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(p=s.endContainer.previousSibling)){if(!s.endContainer.firstChild||!s.endContainer.firstChild.nextSibling)return;p=s.endContainer.firstChild.nextSibling}if(h=p.length,i(s,p,h),a(s,p,h),s.endOffset<5)return;c=s.endOffset,l=p}else{if(3!==(l=s.endContainer).nodeType&&l.firstChild){for(;3!==l.nodeType&&l.firstChild;)l=l.firstChild;3===l.nodeType&&(i(s,l,0),a(s,l,l.nodeValue.length))}c=1===s.endOffset?2:s.endOffset-1-t}u=c;do{i(s,l,c>=2?c-2:0),a(s,l,c>=1?c-1:0),c-=1,g=s.toString()}while(" "!==g&&""!==g&&160!==g.charCodeAt(0)&&c-2>=0&&g!==o);!function(e,t){return e===t||" "===e||160===e.charCodeAt(0)}(s.toString(),o)?0===s.startOffset?(i(s,l,0),a(s,l,u)):(i(s,l,c),a(s,l,u)):(i(s,l,c),a(s,l,u),c+=1),"."===(d=s.toString()).charAt(d.length-1)&&a(s,l,u-1),(m=(d=s.toString().trim()).match(v))&&("www."===m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),f=e.selection.getBookmark(),e.selection.setRng(s),e.execCommand("createlink",!1,m[1]+m[2]),b&&e.dom.setAttrib(e.selection.getNode(),"target",b),e.selection.moveToBookmark(f),e.nodeChanged())}},c=function(e){var n;e.on("keydown",function(t){if(13===t.keyCode)return function(e){s(e,-1,"")}(e)}),t.ie?e.on("focus",function(){if(!n){n=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(e.on("keypress",function(t){if(41===t.keyCode)return function(e){s(e,-1,"(")}(e)}),e.on("keyup",function(t){if(32===t.keyCode)return function(e){s(e,0,"")}(e)}))};e.add("autolink",function(e){c(e)})}()},function(e,t,n){n(30)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.fire("RestoreDraft")},i=function(e){return e.fire("StoreDraft")},a=function(e){return e.fire("RemoveDraft")},s=function(e,t){return((e=/^(\d+)([ms]?)$/.exec(""+(e||t)))[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(e,10)},c=function(e){return e.getParam("autosave_ask_before_unload",!0)},u=function(e){var t=e.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return t=(t=(t=(t=t.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,e.id)},l=function(e){return s(e.settings.autosave_interval,"30s")},f=function(e){return s(e.settings.autosave_retention,"20m")},d=function(e,t){var n=e.settings.forced_root_block;return""===(t=r.trim(void 0===t?e.getBody().innerHTML:t))||new RegExp("^<"+n+"[^>]*>((|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)},m=function(e){var t=parseInt(n.getItem(u(e)+"time"),10)||0;return!((new Date).getTime()-t>f(e)&&(p(e,!1),1))},p=function(e,t){var r=u(e);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==t&&a(e)},h=function(e){var t=u(e);!d(e)&&e.isDirty()&&(n.setItem(t+"draft",e.getContent({format:"raw",no_events:!0})),n.setItem(t+"time",(new Date).getTime().toString()),i(e))},g=function(e){var t=u(e);m(e)&&(e.setContent(n.getItem(t+"draft"),{format:"raw"}),o(e))},v={isEmpty:d,hasDraft:m,removeDraft:p,storeDraft:h,restoreDraft:g,startStoreDraft:function(e,t){var n=l(e);t.get()||(setInterval(function(){e.removed||h(e)},n),t.set(!0))},restoreLastDraft:function(e){e.undoManager.transact(function(){g(e),p(e)}),e.focus()}},b=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[t].concat(n))}},y=function(e){return{hasDraft:b(v.hasDraft,e),storeDraft:b(v.storeDraft,e),restoreDraft:b(v.restoreDraft,e),removeDraft:b(v.removeDraft,e),isEmpty:b(v.isEmpty,e)}},x=tinymce.util.Tools.resolve("tinymce.EditorManager");x._beforeUnloadHandler=function(){var e;return r.each(x.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&c(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var w=function(e){window.onbeforeunload=x._beforeUnloadHandler},C=function(e,t){return function(n){var r=n.control;r.disabled(!v.hasDraft(e)),e.on("StoreDraft RestoreDraft RemoveDraft",function(){r.disabled(!v.hasDraft(e))}),v.startStoreDraft(e,t)}},k=function(e,t){e.addButton("restoredraft",{title:"Restore last draft",onclick:function(){v.restoreLastDraft(e)},onPostRender:C(e,t)}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){v.restoreLastDraft(e)},onPostRender:C(e,t),context:"file"})};t.add("autosave",function(t){var n=e(!1);return w(t),k(t,n),y(t)})}()},function(e,t,n){n(32)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,t){return e.fire("insertCustomChar",{chr:t})},n=function(e,n){var r=t(e,n).chr;e.execCommand("mceInsertContent",!1,r)},r=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.settings.charmap},i=function(e){return e.settings.charmap_append},a=r.isArray,s=function(e){return a(e)?[].concat((t=e,r.grep(t,function(e){return a(e)&&2===e.length}))):"function"==typeof e?e():[];var t},c=function(e){return function(e,t){var n=o(e);n&&(t=s(n));var r=i(e);return r?[].concat(t).concat(s(r)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},u=function(e){return{getCharMap:function(){return c(e)},insertChar:function(t){n(e,t)}}},l=function(e){var t,n,r,o=Math.min(e.length,25),i=Math.ceil(e.length/o);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',r=0;r<i;r++){for(t+="<tr>",n=0;n<o;n++){var a=r*o+n;if(a<e.length){var s=e[a],c=parseInt(s[0],10),u=s?String.fromCharCode(c):"&nbsp;";t+='<td title="'+s[1]+'"><div tabindex="-1" title="'+s[1]+'" role="button" data-chr="'+c+'">'+u+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},f=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},d=function(e){var t,r={type:"container",html:l(c(e)),onclick:function(r){var o=r.target;if(/^(TD|DIV)$/.test(o.nodeName)){var i=f(o).firstChild;if(i&&i.hasAttribute("data-chr")){var a=i.getAttribute("data-chr"),s=parseInt(a,10);isNaN(s)||n(e,String.fromCharCode(s)),r.ctrlKey||t.close()}}},onmouseover:function(e){var n=f(e.target);n&&n.firstChild?(t.find("#preview").text(n.firstChild.firstChild.data),t.find("#previewTitle").text(n.title)):(t.find("#preview").text(" "),t.find("#previewTitle").text(" "))}};t=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[r,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){t.close()}}]})},m=function(e){e.addCommand("mceShowCharmap",function(){d(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return m(e),p(e),u(e)})}()},function(e,t,n){n(34)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r=function(e){return e.settings.codesample_content_css},o=function(e){return e.settings.codesample_languages},i=function(e){return Math.min(n.DOM.getViewPort().w,e.getParam("codesample_dialog_width",800))},a=function(e){return Math.min(n.DOM.getViewPort().w,e.getParam("codesample_dialog_height",650))},s={},c=s,u=void 0!==s?s:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},l=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=u.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){switch(t.util.type(e)){case"Object":var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t.util.clone(e[r]));return n;case"Array":return e.map&&e.map(function(e){return t.util.clone(e)})}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var o in n)r[o]=n[o];return r},insertBefore:function(e,n,r,o){var i=(o=o||t.languages)[e];if(2===arguments.length){for(var a in r=arguments[1])r.hasOwnProperty(a)&&(i[a]=r[a]);return i}var s={};for(var c in i)if(i.hasOwnProperty(c)){if(c===n)for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a]);s[c]=i[c]}return t.languages.DFS(t.languages,function(t,n){n===o[e]&&t!==e&&(this[t]=s)}),o[e]=s},DFS:function(e,n,r){for(var o in e)e.hasOwnProperty(o)&&(n.call(e,o,e[o],r||o),"Object"===t.util.type(e[o])?t.languages.DFS(e[o],n):"Array"===t.util.type(e[o])&&t.languages.DFS(e[o],n,o))}},plugins:{},highlightAll:function(e,n){for(var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),o=0,i=void 0;i=r[o++];)t.highlightElement(i,!0===e,n)},highlightElement:function(n,r,o){for(var i,a,s=n;s&&!e.test(s.className);)s=s.parentNode;s&&(i=(s.className.match(e)||[,""])[1],a=t.languages[i]),n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+i,s=n.parentNode,/pre/i.test(s.nodeName)&&(s.className=s.className.replace(e,"").replace(/\s+/g," ")+" language-"+i);var c=n.textContent,l={element:n,language:i,grammar:a,code:c};if(c&&a)if(t.hooks.run("before-highlight",l),r&&u.Worker){var f=new Worker(t.filename);f.onmessage=function(e){l.highlightedCode=e.data,t.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o&&o.call(l.element),t.hooks.run("after-highlight",l),t.hooks.run("complete",l)},f.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else l.highlightedCode=t.highlight(l.code,l.grammar,l.language),t.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o&&o.call(n),t.hooks.run("after-highlight",l),t.hooks.run("complete",l);else t.hooks.run("complete",l)},highlight:function(e,r,o){var i=t.tokenize(e,r);return n.stringify(t.util.encode(i),o)},tokenize:function(e,n,r){var o=t.Token,i=[e],a=n.rest;if(a){for(var s in a)n[s]=a[s];delete n.rest}e:for(var s in n)if(n.hasOwnProperty(s)&&n[s]){var c=n[s];c="Array"===t.util.type(c)?c:[c];for(var u=0;u<c.length;++u){var l=c[u],f=l.inside,d=!!l.lookbehind,m=0,p=l.alias;l=l.pattern||l;for(var h=0;h<i.length;h++){var g=i[h];if(i.length>e.length)break e;if(!(g instanceof o)){l.lastIndex=0;var v=l.exec(g);if(v){d&&(m=v[1].length);var b=v.index-1+m,y=b+(v=v[0].slice(m)).length,x=g.slice(0,b+1),w=g.slice(y+1),C=[h,1];x&&C.push(x);var k=new o(s,f?t.tokenize(v,f):v,p);C.push(k),w&&C.push(w),Array.prototype.splice.apply(i,C)}}}}}return i},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[],r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(r&&r.length)for(var o=0,i=void 0;i=r[o++];)i(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,r,o){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,r,e)}).join("");var i={type:e.type,content:n.stringify(e.content,r,o),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:o};if("comment"===i.type&&(i.attributes.spellcheck="true"),e.alias){var a="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,a)}t.hooks.run("wrap",i);var s="";for(var c in i.attributes)s+=(s?" ":"")+c+'="'+(i.attributes[c]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+s+">"+i.content+"</"+i.tag+">"},!u.document)return u.addEventListener?(u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,o=n.code,i=n.immediateClose;u.postMessage(t.highlight(o,t.languages[r],r)),i&&u.close()},!1),u.Prism):u.Prism}();void 0!==c&&(c.Prism=l),l.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},l.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),l.languages.xml=l.languages.markup,l.languages.html=l.languages.markup,l.languages.mathml=l.languages.markup,l.languages.svg=l.languages.markup,l.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},l.languages.css.atrule.inside.rest=l.util.clone(l.languages.css),l.languages.markup&&(l.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:l.languages.markup.tag.inside},rest:l.languages.css},alias:"language-css"}}),l.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:l.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:l.languages.css}},alias:"language-css"}},l.languages.markup.tag)),l.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},l.languages.javascript=l.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),l.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),l.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:l.languages.javascript}},string:/[\s\S]+/}}}),l.languages.markup&&l.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:l.languages.markup.tag.inside},rest:l.languages.javascript},alias:"language-javascript"}}),l.languages.js=l.languages.javascript,l.languages.c=l.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),l.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete l.languages.c["class-name"],delete l.languages.c.boolean,l.languages.csharp=l.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),l.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),l.languages.cpp=l.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,boolean:/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),l.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),l.languages.java=l.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),l.languages.php=l.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),l.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),l.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),l.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),l.languages.markup&&(l.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(t){return e.tokenStack.push(t),"{{{PHP"+e.tokenStack.length+"}}}"}))}),l.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),l.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t=0,n=void 0;n=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",l.highlight(n,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),l.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),l.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:l.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),l.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,boolean:/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(l);var f={isCodeSample:function(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function(e){return function(t,n){return e(n)}}},d=function(e){var t=e.selection.getNode();return f.isCodeSample(t)?t:null},m=d,p=function(e,t,r){e.undoManager.transact(function(){var o=d(e);r=n.DOM.encode(r),o?(e.dom.setAttrib(o,"class","language-"+t),o.innerHTML=r,l.highlightElement(o),e.selection.select(o)):(e.insertContent('<pre id="__new" class="language-'+t+'">'+r+"</pre>"),e.selection.select(e.$("#__new").removeAttr("id")[0]))})},h=function(e){var t=d(e);return t?t.textContent:""},g=function(e){var t=o(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},v=function(e){var t,n=m(e);return n&&(t=n.className.match(/language-(\w+)/))?t[1]:""},b=function(e){var t=i(e),n=a(e),r=v(e),o=g(e),s=h(e);e.windowManager.open({title:"Insert/Edit code sample",minWidth:t,minHeight:n,layout:"flex",direction:"column",align:"stretch",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:r,values:o},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:s,autofocus:!0}],onSubmit:function(t){p(e,t.data.language,t.data.code)}})},y=function(e){e.addCommand("codesample",function(){var t=e.selection.getNode();e.selection.isCollapsed()||f.isCodeSample(t)?b(e):e.formatter.toggle("code")})},x=function(e){var t=e.$;e.on("PreProcess",function(e){t("pre[contenteditable=false]",e.node).filter(f.trimArg(f.isCodeSample)).each(function(e,n){var r=t(n),o=n.textContent;r.attr("class",t.trim(r.attr("class"))),r.removeAttr("contentEditable"),r.empty().append(t("<code></code>").each(function(){this.textContent=o}))})}),e.on("SetContent",function(){var n=t("pre").filter(f.trimArg(f.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});n.length&&e.undoManager.transact(function(){n.each(function(n,r){t(r).find("br").each(function(t,n){n.parentNode.replaceChild(e.getDoc().createTextNode("\n"),n)}),r.contentEditable=!1,r.innerHTML=e.dom.encode(r.textContent),l.highlightElement(r),r.className=t.trim(r.className)})})})},w=function(e,t,n,o){var i,a=r(e);e.inline&&n.get()||!e.inline&&o.get()||(e.inline?n.set(!0):o.set(!0),!1!==a&&(i=e.dom.create("link",{rel:"stylesheet",href:a||t+"/css/prism.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(i)))},C=function(e){e.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),e.addMenuItem("codesample",{cmd:"codesample",text:"Code sample",icon:"codesample"})},k=e(!1);t.add("codesample",function(t,n){var r=e(!1);x(t),C(t),y(t),t.on("init",function(){w(t,n,k,r)}),t.on("dblclick",function(e){f.isCodeSample(e.target)&&b(t)})})}()},function(e,t,n){n(36)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isContextMenuVisible:function(){return e.get()}}},r=function(e){return e.settings.contextmenu_never_use_native},o=function(e){return e.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=function(e){return i.DOM.select(e.settings.ui_container)[0]},s=function(e,t){return{x:e,y:t}},c=function(e,t,n){return s(e.x+t,e.y+n)},u=function(e,t){if(e&&"static"!==i.DOM.getStyle(e,"position",!0)){var n=i.DOM.getPos(e),r=n.x-e.scrollLeft,o=n.y-e.scrollTop;return c(t,-r,-o)}return c(t,0,0)},l=function(e,t){if(e.inline)return u(a(e),function(e){return s(e.pageX,e.pageY)}(t));var n,r,o,l=(n=e.getContentAreaContainer(),r=function(e){return s(e.clientX,e.clientY)}(t),o=i.DOM.getPos(n),c(r,o.x,o.y));return u(a(e),l)},f=tinymce.util.Tools.resolve("tinymce.ui.Factory"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(e,t,n,r){null===r.get()?r.set(function(e,t){var n,r,i=[];r=o(e),d.each(r.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var s=0;s<i.length;s++)"|"===i[s].text&&(0!==s&&s!==i.length-1||i.splice(s,1));return(n=f.create("menu",{items:i,context:"contextmenu",classes:"contextmenu"})).uiContainer=a(e),n.renderTo(a(e)),n.on("hide",function(e){e.control===this&&t.set(!1)}),e.on("remove",function(){n.remove(),n=null}),n}(e,n)):r.get().show(),r.get().moveTo(t.x,t.y),n.set(!0)},p=function(e,t,n){e.on("contextmenu",function(o){(function(e,t){return t.ctrlKey&&!r(e)})(e,o)||(o.preventDefault(),m(e,l(e,o),t,n))})};t.add("contextmenu",function(t){var r=e(null),o=e(!1);return p(t,o,r),n(o)})}()},function(e,t,n){n(38)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],r=function(e){var r;return r='<table role="list" class="mce-grid">',t.each(n,function(n){r+="<tr>",t.each(n,function(t){var n=e+"/img/smiley-"+t+".gif";r+='<td><a href="#" data-mce-url="'+n+'" data-mce-alt="'+t+'" tabindex="-1" role="option" aria-label="'+t+'"><img src="'+n+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),r+="</tr>"}),r+="</table>"},o=function(e,t){var n=r(t);e.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(function(e,t,n){e.insertContent(e.dom.createHTML("img",{src:t,alt:n}))}(e,n.getAttribute("data-mce-url"),n.getAttribute("data-mce-alt")),this.hide())}},tooltip:"Emoticons"})};e.add("emoticons",function(e,t){o(e,t)})}()},function(e,t,n){n(40)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},r=function(e,t){e.fire("FullscreenStateChanged",{state:t})},o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,i=function(e,t){var n,i,a,s,c,u,l=document.body,f=document.documentElement,d=t.get(),m=function(){var e,t,n,r;o.setStyle(a,"height",(n=window,r=document.body,r.offsetWidth&&(e=r.offsetWidth,t=r.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(i.clientHeight-a.clientHeight))},p=function(){o.unbind(window,"resize",m)};if(n=(i=e.getContainer()).style,s=(a=e.getContentAreaContainer().firstChild).style,d)s.width=d.iframeWidth,s.height=d.iframeHeight,d.containerWidth&&(n.width=d.containerWidth),d.containerHeight&&(n.height=d.containerHeight),o.removeClass(l,"mce-fullscreen"),o.removeClass(f,"mce-fullscreen"),o.removeClass(i,"mce-fullscreen"),c=d.scrollPos,window.scrollTo(c.x,c.y),o.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),t.set(null),r(e,!1);else{var h={scrollPos:(u=o.getViewPort(),{x:u.x,y:u.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:s.width,iframeHeight:s.height,resizeHandler:m,removeHandler:p};s.width=s.height="100%",n.width=n.height="",o.addClass(l,"mce-fullscreen"),o.addClass(f,"mce-fullscreen"),o.addClass(i,"mce-fullscreen"),o.bind(window,"resize",m),e.on("remove",p),m(),t.set(h),r(e,!0)}},a=function(e,t){e.addCommand("mceFullScreen",function(){i(e,t)})},s=function(e){return function(t){var n=t.control;e.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:s(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:s(e)})};t.add("fullscreen",function(t){var r=e(null);return t.settings.inline?n(r):(a(t,r),c(t),t.addShortcut("Ctrl+Shift+F","","mceFullScreen"),n(r))})}()},function(e,t,n){n(42)},function(e,t){!function(){"use strict";var e=function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")})},t=function(e){e.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(n){e(n),t(n)})}()},function(e,t,n){n(44)},function(e,t,n){(function(e){!function(){"use strict";var t=function(e){var n=e,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return t(r())}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.Tools");function o(e,t){return a(document.createElement("canvas"),e,t)}function i(e){return e.getContext("2d")}function a(e,t,n){return e.width=t,e.height=n,e}var s,c,u,l,f={create:o,clone:function(e){var t;return i(t=o(e.width,e.height)).drawImage(e,0,0),t},resize:a,get2dContext:i,get3dContext:function(e){var t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t}},d={getWidth:function(e){return e.naturalWidth||e.width},getHeight:function(e){return e.naturalHeight||e.height}},m=window.Promise?window.Promise:function(){var t=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],u(e,r(a,this),r(s,this))},n=t.immediateFn||"function"==typeof e&&e||function(e){setTimeout(e,1)};function r(e,t){return function(){e.apply(t,arguments)}}var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e){var t=this;null!==this._state?n(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)}else(t._state?e.resolve:e.reject)(t._value)}):this._deferreds.push(e)}function a(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void u(r(t,e),r(a,this),r(s,this))}this._state=!0,this._value=e,c.call(this)}catch(e){s.call(this,e)}}function s(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds.length;e<t;e++)i.call(this,this._deferreds[e]);this._deferreds=null}function u(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.then=function(e,n){var r=this;return new t(function(t,o){i.call(r,new function(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}(e,n,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&o(arguments[0])?arguments[0]:arguments);return new t(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 s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(i,e)},n)}e[i]=a,0==--r&&t(e)}catch(e){n(e)}}for(var i=0;i<e.length;i++)o(i,e[i])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},t}(),p=function(e){return function(){return e}},h=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}},g=p(!1),v=p(!0),b=function(){return y},y=(l={fold:function(e,t){return e()},is:g,isSome:g,isNone:v,getOr:u=function(e){return e},getOrThunk:c=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:u,orThunk:c,map:b,ap:b,each:function(){},bind:b,flatten:b,exists:g,forall:v,filter:b,equals:s=function(e){return e.isNone()},equals_:s,toArray:function(){return[]},toString:p("none()")},Object.freeze&&Object.freeze(l),l),x=function(e){var t=function(){return e},n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:v,isNone:g,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return x(t(e))},ap:function(t){return t.fold(b,function(t){return x(t(e))})},each:function(t){t(e)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(e)?o:y},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(g,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},w={some:x,none:b,from:function(e){return null===e||void 0===e?y:x(e)}},C="undefined"!=typeof window?window:Function("return this;")(),k=function(e,t){return function(e,t){for(var n=void 0!==t&&null!==t?t:C,r=0;r<e.length&&void 0!==n&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},T={getOrDie:function(e,t){var n=function(e,t){return k(e,t)}(e,t);if(void 0===n||null===n)throw e+" not available on this browser";return n}};function _(){return new(T.getOrDie("FileReader"))}var E={atob:function(e){return T.getOrDie("atob")(e)},requestAnimationFrame:function(e){T.getOrDie("requestAnimationFrame")(e)}};function S(e){return new m(function(t,n){var r=URL.createObjectURL(e),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",s)};function a(){i(),t(o)}function s(){i(),n("Unable to load data of type "+e.type+": "+r)}o.addEventListener("load",a),o.addEventListener("error",s),o.src=r,o.complete&&a()})}function N(e){return new m(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.onload=function(){200==this.status&&t(this.response)},r.onerror=function(){var e,t=this;n(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+t.status+" downloading image"))},r.send()})}function R(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return w.none();for(var r,o,i,a=n[1],s=t[1],c=E.atob(s),u=c.length,l=Math.ceil(u/1024),f=new Array(l),d=0;d<l;++d){for(var m=1024*d,p=Math.min(m+1024,u),h=new Array(p-m),g=m,v=0;g<p;++v,++g)h[v]=c[g].charCodeAt(0);f[d]=(r=h,new(T.getOrDie("Uint8Array"))(r))}return w.some((o=f,i={type:a},new(T.getOrDie("Blob"))(o,i)))}function A(e){return new m(function(t,n){R(e).fold(function(){n("uri is not base64: "+e)},t)})}function D(e){return new m(function(t){var n=new _;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})}var O={blobToImage:S,imageToBlob:function(e){var t=e.src;return 0===t.indexOf("data:")?A(t):N(t)},blobToArrayBuffer:function(e){return new m(function(t){var n=new _;n.onloadend=function(){t(n.result)},n.readAsArrayBuffer(e)})},blobToDataUri:D,blobToBase64:function(e){return D(e).then(function(e){return e.split(",")[1]})},dataUriToBlobSync:R,canvasToBlob:function(e,t,n){return t=t||"image/png",HTMLCanvasElement.prototype.toBlob?new m(function(r){e.toBlob(function(e){r(e)},t,n)}):A(e.toDataURL(t,n))},canvasToDataURL:function(e,t,n){return t=t||"image/png",e.then(function(e){return e.toDataURL(t,n)})},blobToCanvas:function(e){return S(e).then(function(e){var t;return function(e){URL.revokeObjectURL(e.src)}(e),t=f.create(d.getWidth(e),d.getHeight(e)),f.get2dContext(t).drawImage(e,0,0),t})},uriToBlob:function(e){return 0===e.indexOf("blob:")?N(e):0===e.indexOf("data:")?A(e):null}},P=function(e){return O.blobToImage(e)},I=function(e){return O.imageToBlob(e)};function B(e,t,n){var r=t.type;function o(t,n){return e.then(function(e){return O.canvasToDataURL(e,t,n)})}return{getType:p(r),toBlob:function(){return m.resolve(t)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then(function(e){return O.canvasToBlob(e,t,n)})},toAdjustedDataURL:o,toAdjustedBase64:function(e,t){return o(e,t).then(function(e){return e.split(",")[1]})},toCanvas:function(){return e.then(f.clone)}}}function M(e){return O.blobToDataUri(e).then(function(t){return B(O.blobToCanvas(e),e,t)})}var L={fromBlob:M,fromCanvas:function(e,t){return O.canvasToBlob(e,t).then(function(t){return B(m.resolve(e),t,e.toDataURL())})},fromImage:function(e){return O.imageToBlob(e).then(function(e){return M(e)})},fromBlobAndUrlSync:function(e,t){return B(O.blobToCanvas(e),e,t)}};function F(e,t,n){return(e=parseFloat(e))>n?e=n:e<t&&(e=t),e}var H=[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 z(e,t){var n,r,o,i,a=[],s=new Array(10);for(n=0;n<5;n++){for(r=0;r<5;r++)a[r]=t[r+5*n];for(r=0;r<5;r++){for(i=0,o=0;o<5;o++)i+=e[r+5*o]*a[o];s[r+5*n]=i}}return s}function U(e,t){return t=F(t,0,1),e.map(function(e,n){return n%6==0?e=1-(1-e)*t:e*=t,F(e,0,1)})}var $={identity:function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},adjust:U,multiply:z,adjustContrast:function(e,t){var n;return t=F(t,-1,1),z(e,[(n=(t*=100)<0?127+t/100*127:127*(n=0==(n=t%1)?H[t]:H[Math.floor(t)]*(1-n)+H[Math.floor(t)+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])},adjustBrightness:function(e,t){return z(e,[1,0,0,0,t=F(255*t,-255,255),0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])},adjustSaturation:function(e,t){var n;return z(e,[.3086*(1-(n=1+((t=F(t,-1,1))>0?3*t:t)))+n,.6094*(1-n),.082*(1-n),0,0,.3086*(1-n),.6094*(1-n)+n,.082*(1-n),0,0,.3086*(1-n),.6094*(1-n),.082*(1-n)+n,0,0,0,0,0,1,0,0,0,0,0,1])},adjustHue:function(e,t){var n,r;return t=F(t,-180,180)/180*Math.PI,z(e,[.213+.787*(n=Math.cos(t))+-.213*(r=Math.sin(t)),.715+-.715*n+-.715*r,.072+-.072*n+.928*r,0,0,.213+-.213*n+.143*r,.715+n*(1-.715)+.14*r,.072+-.072*n+-.283*r,0,0,.213+-.213*n+-.787*r,.715+-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,0,1,0,0,0,0,0,1])},adjustColors:function(e,t,n,r){return z(e,[t=F(t,0,2),0,0,0,0,0,n=F(n,0,2),0,0,0,0,0,r=F(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])},adjustSepia:function(e,t){return z(e,U([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],t=F(t,0,1)))},adjustGrayscale:function(e,t){return z(e,U([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],t=F(t,0,1)))}};function j(e,t){return e.toCanvas().then(function(n){return function(e,t,n){var r,o=f.get2dContext(e);return r=function(e,t){var n,r,o,i,a,s=e.data,c=t[0],u=t[1],l=t[2],f=t[3],d=t[4],m=t[5],p=t[6],h=t[7],g=t[8],v=t[9],b=t[10],y=t[11],x=t[12],w=t[13],C=t[14],k=t[15],T=t[16],_=t[17],E=t[18],S=t[19];for(a=0;a<s.length;a+=4)n=s[a],r=s[a+1],o=s[a+2],i=s[a+3],s[a]=n*c+r*u+o*l+i*f+d,s[a+1]=n*m+r*p+o*h+i*g+v,s[a+2]=n*b+r*y+o*x+i*w+C,s[a+3]=n*k+r*T+o*_+i*E+S;return e}(o.getImageData(0,0,e.width,e.height),n),o.putImageData(r,0,0),L.fromCanvas(e,t)}(n,e.getType(),t)})}function W(e,t){return e.toCanvas().then(function(n){return function(e,t,n){var r,o,i=f.get2dContext(e);return r=i.getImageData(0,0,e.width,e.height),o=i.getImageData(0,0,e.width,e.height),o=function(e,t,n){var r,o,i,a,s,c,u,l,f,d,m,p,h,g,v,b,y;function x(e,t,n){return e>n?e=n:e<t&&(e=t),e}for(i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),r=e.data,o=t.data,b=e.width,y=e.height,c=0;c<y;c++)for(s=0;s<b;s++){for(u=l=f=0,m=0;m<i;m++)for(d=0;d<i;d++)p=x(s+d-a,0,b-1),h=x(c+m-a,0,y-1),g=4*(h*b+p),v=n[m*i+d],u+=r[g]*v,l+=r[g+1]*v,f+=r[g+2]*v;o[g=4*(c*b+s)]=x(u,0,255),o[g+1]=x(l,0,255),o[g+2]=x(f,0,255)}return t}(r,o,n),i.putImageData(o,0,0),L.fromCanvas(e,t)}(n,e.getType(),t)})}function q(e){return function(t,n){return t.toCanvas().then(function(r){return function(t,n,r){var o,i,a=f.get2dContext(t),s=new Array(256);for(i=0;i<s.length;i++)s[i]=e(i,r);return o=function(e,t){var n,r=e.data;for(n=0;n<r.length;n+=4)r[n]=t[r[n]],r[n+1]=t[r[n+1]],r[n+2]=t[r[n+2]];return e}(a.getImageData(0,0,t.width,t.height),s),a.putImageData(o,0,0),L.fromCanvas(t,n)}(r,t.getType(),n)})}}function V(e){return function(t,n){return j(t,e($.identity(),n))}}function G(e){return function(t){return W(t,e)}}var Y,K={invert:(Y=[-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0],function(e){return j(e,Y)}),brightness:V($.adjustBrightness),hue:V($.adjustHue),saturate:V($.adjustSaturation),contrast:V($.adjustContrast),grayscale:V($.adjustGrayscale),sepia:V($.adjustSepia),colorize:function(e,t,n,r){return j(e,$.adjustColors($.identity(),t,n,r))},sharpen:G([0,-1,0,-1,5,-1,0,-1,0]),emboss:G([-2,-1,0,-1,1,1,0,1,2]),gamma:q(function(e,t){return 255*Math.pow(e/255,1-t)}),exposure:q(function(e,t){return 255*(1-Math.exp(-e/255*t))}),colorFilter:j,convoluteFilter:W},X={scale:function e(t,n,r){var o=d.getWidth(t),i=d.getHeight(t),a=n/o,s=r/i,c=!1;(a<.5||a>2)&&(a=a<.5?.5:2,c=!0),(s<.5||s>2)&&(s=s<.5?.5:2,c=!0);var u=function(e,t,n){return new m(function(r){var o=d.getWidth(e),i=d.getHeight(e),a=Math.floor(o*t),s=Math.floor(i*n),c=f.create(a,s),u=f.get2dContext(c);u.drawImage(e,0,0,o,i,0,0,a,s),r(c)})}(t,a,s);return c?u.then(function(t){return e(t,n,r)}):u}},J={rotate:function(e,t){return e.toCanvas().then(function(n){return function(e,t,n){var r=f.create(e.width,e.height),o=f.get2dContext(r),i=0,a=0;return 90!=(n=n<0?360+n:n)&&270!=n||f.resize(r,r.height,r.width),90!=n&&180!=n||(i=r.width),270!=n&&180!=n||(a=r.height),o.translate(i,a),o.rotate(n*Math.PI/180),o.drawImage(e,0,0),L.fromCanvas(r,t)}(n,e.getType(),t)})},flip:function(e,t){return e.toCanvas().then(function(n){return function(e,t,n){var r=f.create(e.width,e.height),o=f.get2dContext(r);return"v"==n?(o.scale(1,-1),o.drawImage(e,0,-r.height)):(o.scale(-1,1),o.drawImage(e,-r.width,0)),L.fromCanvas(r,t)}(n,e.getType(),t)})},crop:function(e,t,n,r,o){return e.toCanvas().then(function(i){return function(e,t,n,r,o,i){var a=f.create(o,i);return f.get2dContext(a).drawImage(e,-n,-r),L.fromCanvas(a,t)}(i,e.getType(),t,n,r,o)})},resize:function(e,t,n){return e.toCanvas().then(function(r){return X.scale(r,t,n).then(function(t){return L.fromCanvas(t,e.getType())})})}},Z=function(){function e(e){this.littleEndian=!1,this._dv=new DataView(e)}return e.prototype.readByteAt=function(e){return this._dv.getUint8(e)},e.prototype.read=function(e,t){if(e+t>this.length())return null;for(var n=this.littleEndian?0:-8*(t-1),r=0,o=0;r<t;r++)o|=this.readByteAt(e+r)<<Math.abs(n+8*r);return o},e.prototype.BYTE=function(e){return this.read(e,1)},e.prototype.SHORT=function(e){return this.read(e,2)},e.prototype.LONG=function(e){return this.read(e,4)},e.prototype.SLONG=function(e){var t=this.read(e,4);return t>2147483647?t-4294967296:t},e.prototype.CHAR=function(e){return String.fromCharCode(this.read(e,1))},e.prototype.STRING=function(e,t){return this.asArray("CHAR",e,t).join("")},e.prototype.SEGMENT=function(e,t){var n=this._dv.buffer;switch(arguments.length){case 2:return n.slice(e,e+t);case 1:return n.slice(e);default:return n}},e.prototype.asArray=function(e,t,n){for(var r=[],o=0;o<n;o++)r[o]=this[e](t+o);return r},e.prototype.length=function(){return this._dv?this._dv.byteLength:0},e}(),Q={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}},ee={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},te=function(){function e(e){if(this._offsets={tiffHeader:10,IFD0:null,IFD1:null,exifIFD:null,gpsIFD:null},this._tiffTags={},this._reader=new Z(e),this._idx=this._offsets.tiffHeader,65505!==this.SHORT(0)||"EXIF\0"!==this.STRING(4,5).toUpperCase())throw new Error("Exif data cannot be read or not available.");if(this._reader.littleEndian=18761==this.SHORT(this._idx),42!==this.SHORT(this._idx+=2))throw new Error("Invalid Exif data.");this._offsets.IFD0=this._offsets.tiffHeader+this.LONG(this._idx+=2),this._tiffTags=this.extractTags(this._offsets.IFD0,Q.tiff),"ExifIFDPointer"in this._tiffTags&&(this._offsets.exifIFD=this._offsets.tiffHeader+this._tiffTags.ExifIFDPointer,delete this._tiffTags.ExifIFDPointer),"GPSInfoIFDPointer"in this._tiffTags&&(this._offsets.gpsIFD=this._offsets.tiffHeader+this._tiffTags.GPSInfoIFDPointer,delete this._tiffTags.GPSInfoIFDPointer);var t=this.LONG(this._offsets.IFD0+12*this.SHORT(this._offsets.IFD0)+2);t&&(this._offsets.IFD1=this._offsets.tiffHeader+t)}return e.prototype.BYTE=function(e){return this._reader.BYTE(e)},e.prototype.SHORT=function(e){return this._reader.SHORT(e)},e.prototype.LONG=function(e){return this._reader.LONG(e)},e.prototype.SLONG=function(e){return this._reader.SLONG(e)},e.prototype.CHAR=function(e){return this._reader.CHAR(e)},e.prototype.STRING=function(e,t){return this._reader.STRING(e,t)},e.prototype.SEGMENT=function(e,t){return this._reader.SEGMENT(e,t)},e.prototype.asArray=function(e,t,n){for(var r=[],o=0;o<n;o++)r[o]=this[e](t+o);return r},e.prototype.length=function(){return this._reader.length()},e.prototype.UNDEFINED=function(){return this.BYTE.apply(this,arguments)},e.prototype.RATIONAL=function(e){return this.LONG(e)/this.LONG(e+4)},e.prototype.SRATIONAL=function(e){return this.SLONG(e)/this.SLONG(e+4)},e.prototype.ASCII=function(e){return this.CHAR(e)},e.prototype.TIFF=function(){return this._tiffTags},e.prototype.EXIF=function(){var e=null;if(this._offsets.exifIFD){try{e=this.extractTags(this._offsets.exifIFD,Q.exif)}catch(e){return null}if(e.ExifVersion&&Array.isArray(e.ExifVersion)){for(var t=0,n="";t<e.ExifVersion.length;t++)n+=String.fromCharCode(e.ExifVersion[t]);e.ExifVersion=n}}return e},e.prototype.GPS=function(){var e=null;if(this._offsets.gpsIFD){try{e=this.extractTags(this._offsets.gpsIFD,Q.gps)}catch(e){return null}e.GPSVersionID&&Array.isArray(e.GPSVersionID)&&(e.GPSVersionID=e.GPSVersionID.join("."))}return e},e.prototype.thumb=function(){if(this._offsets.IFD1)try{var e=this.extractTags(this._offsets.IFD1,Q.thumb);if("JPEGInterchangeFormat"in e)return this.SEGMENT(this._offsets.tiffHeader+e.JPEGInterchangeFormat,e.JPEGInterchangeFormatLength)}catch(e){}return null},e.prototype.extractTags=function(e,t){var n,r,o,i,a,s,c,u,l=[],f={},d={1:"BYTE",7:"UNDEFINED",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",9:"SLONG",10:"SRATIONAL"},m={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8};for(n=this.SHORT(e),r=0;r<n;r++)if(l=[],c=e+2+12*r,void 0!==(o=t[this.SHORT(c)])){if(i=d[this.SHORT(c+=2)],a=this.LONG(c+=2),!(s=m[i]))throw new Error("Invalid Exif data.");if(c+=4,s*a>4&&(c=this.LONG(c)+this._offsets.tiffHeader),c+s*a>=this.length())throw new Error("Invalid Exif data.");"ASCII"!==i?(l=this.asArray(i,c,a),u=1==a?l[0]:l,ee.hasOwnProperty(o)&&"object"!=typeof u?f[o]=ee[o][u]:f[o]=u):f[o]=this.STRING(c,a).replace(/\0$/,"").trim()}return f},e}(),ne=function(e){var t,n,r=[],o=0;for(t=2;t<=e.length();)if((n=e.SHORT(t))>=65488&&n<=65495)t+=2;else{if(65498===n||65497===n)break;o=e.SHORT(t+2)+2,n>=65505&&n<=65519&&r.push({hex:n,name:"APP"+(15&n),start:t,length:o,segment:e.SEGMENT(t,o)}),t+=o}return r},re=function(e){return O.blobToArrayBuffer(e).then(function(t){try{var n=new Z(t);if(65496===n.SHORT(0)){var r=ne(n),o=r.filter(function(e){return"APP1"===e.name}),i={};if(!o.length)return m.reject("Headers did not include required information");var a=new te(o[0].segment);return(i={tiff:a.TIFF(),exif:a.EXIF(),gps:a.GPS(),thumb:a.thumb()}).rawHeaders=r,i}return m.reject("Image was not a jpeg")}catch(t){return m.reject("Unsupported format or not an image: "+e.type+" (Exception: "+t.message+")")}})},oe=function(e,t){return J.rotate(e,t)},ie={invert:function(e){return K.invert(e)},sharpen:function(e){return K.sharpen(e)},emboss:function(e){return K.emboss(e)},brightness:function(e,t){return K.brightness(e,t)},hue:function(e,t){return K.hue(e,t)},saturate:function(e,t){return K.saturate(e,t)},contrast:function(e,t){return K.contrast(e,t)},grayscale:function(e,t){return K.grayscale(e,t)},sepia:function(e,t){return K.sepia(e,t)},colorize:function(e,t,n,r){return K.colorize(e,t,n,r)},gamma:function(e,t){return K.gamma(e,t)},exposure:function(e,t){return K.exposure(e,t)},flip:function(e,t){return J.flip(e,t)},crop:function(e,t,n,r,o){return J.crop(e,t,n,r,o)},resize:function(e,t,n){return J.resize(e,t,n)},rotate:oe,exifRotate:function(e){return e.toBlob().then(re).then(function(t){switch(t.tiff.Orientation){case 6:return oe(e,90);case 3:return oe(e,180);case 8:return oe(e,270);default:return e}},function(){return e})}},ae=function(e){return e.toBlob()},se={blobToImageResult:function(e){return L.fromBlob(e)},fromBlobAndUrlSync:function(e,t){return L.fromBlobAndUrlSync(e,t)},imageToImageResult:function(e){return L.fromImage(e)},imageResultToBlob:function(e,t,n){return void 0===t&&void 0===n?ae(e):e.toAdjustedBlob(t,n)},imageResultToOriginalBlob:ae,imageResultToDataURL:function(e){return e.toDataURL()}},ce=function(){return T.getOrDie("URL")},ue={createObjectURL:function(e){return ce().createObjectURL(e)},revokeObjectURL:function(e){ce().revokeObjectURL(e)}},le=tinymce.util.Tools.resolve("tinymce.util.Delay"),fe=tinymce.util.Tools.resolve("tinymce.util.Promise"),de=tinymce.util.Tools.resolve("tinymce.util.URI"),me=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),pe=tinymce.util.Tools.resolve("tinymce.ui.Factory"),he=tinymce.util.Tools.resolve("tinymce.geom.Rect"),ge=function(e){return new fe(function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)})},ve=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),be=tinymce.util.Tools.resolve("tinymce.util.Observable"),ye=tinymce.util.Tools.resolve("tinymce.util.VK"),xe=0,we={create:function(e){return new(pe.get("Control").extend({Defaults:{classes:"imagepanel"},selection:function(e){return arguments.length?(this.state.set("rect",e),this):this.state.get("rect")},imageSize:function(){var e=this.state.get("viewRect");return{w:e.w,h:e.h}},toggleCropRect:function(e){this.state.set("cropEnabled",e)},imageSrc:function(e){var t=this,n=new Image;n.src=e,ge(n).then(function(){var e,r,o=t.state.get("viewRect");if((r=t.$el.find("img"))[0])r.replaceWith(n);else{var i=document.createElement("div");i.className="mce-imagepanel-bg",t.getEl().appendChild(i),t.getEl().appendChild(n)}e={x:0,y:0,w:n.naturalWidth,h:n.naturalHeight},t.state.set("viewRect",e),t.state.set("rect",he.inflate(e,-20,-20)),o&&o.w===e.w&&o.h===e.h||t.zoomFit(),t.repaintImage(),t.fire("load")})},zoom:function(e){return arguments.length?(this.state.set("zoom",e),this):this.state.get("zoom")},postRender:function(){return this.imageSrc(this.settings.imageSrc),this._super()},zoomFit:function(){var e,t,n,r,o,i;e=this.$el.find("img"),t=this.getEl().clientWidth,n=this.getEl().clientHeight,r=e[0].naturalWidth,o=e[0].naturalHeight,(i=Math.min((t-10)/r,(n-10)/o))>=1&&(i=1),this.zoom(i)},repaintImage:function(){var e,t,n,r,o,i,a,s,c,u,l;l=this.getEl(),c=this.zoom(),u=this.state.get("rect"),a=this.$el.find("img"),s=this.$el.find(".mce-imagepanel-bg"),o=l.offsetWidth,i=l.offsetHeight,n=a[0].naturalWidth*c,r=a[0].naturalHeight*c,e=Math.max(0,o/2-n/2),t=Math.max(0,i/2-r/2),a.css({left:e,top:t,width:n,height:r}),s.css({left:e,top:t,width:n,height:r}),this.cropRect&&(this.cropRect.setRect({x:u.x*c+e,y:u.y*c+t,w:u.w*c,h:u.h*c}),this.cropRect.setClampRect({x:e,y:t,w:n,h:r}),this.cropRect.setViewPortRect({x:0,y:0,w:o,h:i}))},bindStates:function(){var e=this;function t(t){e.cropRect=function(e,t,n,o,i){var a,s,c,u,l="mce-",f=l+"crid-"+xe++;function d(e,t){return{x:t.x-e.x,y:t.y-e.y,w:t.w,h:t.h}}function m(t,r,o,i){var s,c,u,l,f;s=r.x,c=r.y,u=r.w,l=r.h,s+=o*t.deltaX,c+=i*t.deltaY,u+=o*t.deltaW,l+=i*t.deltaH,u<20&&(u=20),l<20&&(l=20),f=e=he.clamp({x:s,y:c,w:u,h:l},n,"move"===t.name),f=d(n,f),a.fire("updateRect",{rect:f}),g(f)}function p(e){function n(e,t){t.h<0&&(t.h=0),t.w<0&&(t.w=0),ve("#"+f+"-"+e,o).css({left:t.x,top:t.y,width:t.w,height:t.h})}r.each(s,function(t){ve("#"+f+"-"+t.name,o).css({left:e.w*t.xMul+e.x,top:e.h*t.yMul+e.y})}),n("top",{x:t.x,y:t.y,w:t.w,h:e.y-t.y}),n("right",{x:e.x+e.w,y:e.y,w:t.w-e.x-e.w+t.x,h:e.h}),n("bottom",{x:t.x,y:e.y+e.h,w:t.w,h:t.h-e.y-e.h+t.y}),n("left",{x:t.x,y:e.y,w:e.x-t.x,h:e.h}),n("move",e)}function h(t){p(e=t)}function g(e){var t,r;h((t=n,{x:(r=e).x+t.x,y:r.y+t.y,w:r.w,h:r.h}))}return 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"],ve('<div id="'+f+'" class="'+l+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),r.each(u,function(e){ve("#"+f,o).append('<div id="'+f+"-"+e+'"class="'+l+'croprect-block" style="display: none" data-mce-bogus="all">')}),r.each(s,function(e){ve("#"+f,o).append('<div id="'+f+"-"+e.name+'" class="'+l+"croprect-handle "+l+"croprect-handle-"+e.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+e.label+'" aria-grabbed="false">')}),c=r.map(s,function(t){var n;return new(pe.get("DragHelper"))(f,{document:o.ownerDocument,handle:f+"-"+t.name,start:function(){n=e},drag:function(e){m(t,n,e.deltaX,e.deltaY)}})}),p(e),ve(o).on("focusin focusout",function(e){ve(e.target).attr("aria-grabbed","focus"===e.type)}),ve(o).on("keydown",function(t){var n;function o(e,t,r,o,i){e.stopPropagation(),e.preventDefault(),m(n,r,o,i)}switch(r.each(s,function(e){if(t.target.id===f+"-"+e.name)return n=e,!1}),t.keyCode){case ye.LEFT:o(t,0,e,-10,0);break;case ye.RIGHT:o(t,0,e,10,0);break;case ye.UP:o(t,0,e,0,-10);break;case ye.DOWN:o(t,0,e,0,10);break;case ye.ENTER:case ye.SPACEBAR:t.preventDefault(),i()}}),a=r.extend({toggleVisibility:function(e){var t;t=r.map(s,function(e){return"#"+f+"-"+e.name}).concat(r.map(u,function(e){return"#"+f+"-"+e})).join(","),e?ve(t,o).show():ve(t,o).hide()},setClampRect:function(t){n=t,p(e)},setRect:h,getInnerRect:function(){return d(n,e)},setInnerRect:g,setViewPortRect:function(n){t=n,p(e)},destroy:function(){r.each(c,function(e){e.destroy()}),c=[]}},be)}(t,e.state.get("viewRect"),e.state.get("viewRect"),e.getEl(),function(){e.fire("crop")}),e.cropRect.on("updateRect",function(t){var n=t.rect,r=e.zoom();n={x:Math.round(n.x/r),y:Math.round(n.y/r),w:Math.round(n.w/r),h:Math.round(n.h/r)},e.state.set("rect",n)}),e.on("remove",e.cropRect.destroy)}e.state.on("change:cropEnabled",function(t){e.cropRect.toggleVisibility(t.value),e.repaintImage()}),e.state.on("change:zoom",function(){e.repaintImage()}),e.state.on("change:rect",function(n){var r=n.value;e.cropRect||t(r),e.cropRect.setRect(r)})}}))(e)}};function Ce(e){return{blob:e,url:ue.createObjectURL(e)}}function ke(e){e&&ue.revokeObjectURL(e.url)}function Te(e){r.each(e,ke)}function _e(e,t,n,o){var i,a,s,c,u,l,f,d,m,p,h,g,v,b,y,x,w,C,k,T,_,E,S,N,R,A,D,O=function(){var e=[],t=-1;function n(){return t>0}function r(){return-1!==t&&t<e.length-1}return{data:e,add:function(n){var r;return r=e.splice(++t),e.push(n),{state:n,removed:r}},undo:function(){if(n())return e[--t]},redo:function(){if(r())return e[++t]},canUndo:n,canRedo:r}}(),P=function(t){return e.rtl?t.reverse():t};function I(e){var t,n,r,o;t=i.find("#w")[0],n=i.find("#h")[0],r=parseInt(t.value(),10),o=parseInt(n.value(),10),i.find("#constrain")[0].checked()&&N&&R&&r&&o&&("w"===e.control.settings.name?(o=Math.round(r*A),n.value(o)):(r=Math.round(o*D),t.value(r))),N=r,R=o}function B(e){return Math.round(100*e)+"%"}function M(){i.find("#undo").disabled(!O.canUndo()),i.find("#redo").disabled(!O.canRedo()),i.statusbar.find("#save").disabled(!O.canUndo())}function L(){i.find("#undo").disabled(!0),i.find("#redo").disabled(!0)}function F(e){e&&d.imageSrc(e.url)}function H(e){return function(){var t=r.grep(S,function(t){return t.settings.name!==e});r.each(t,function(e){e.hide()}),e.show(),e.focus()}}function z(e){F(c=Ce(e))}function U(e){F(t=Ce(e)),Te(O.add(t).removed),M()}function $(){var e=d.selection();se.blobToImageResult(t.blob).then(function(t){ie.crop(t,e.x,e.y,e.w,e.h).then(G).then(function(e){U(e),W()})})}var j=function(e){var n=[].slice.call(arguments,1);return function(){var r=c||t;se.blobToImageResult(r.blob).then(function(t){e.apply(this,[t].concat(n)).then(G).then(z)})}};function W(){F(t),ke(c),H(a)(),M()}function q(){c?(U(c.blob),W()):function t(n,r){c?r():setTimeout(function(){n-- >0?t(n,r):e.windowManager.alert("Error: failed to apply image operation.")},10)}(100,q)}function V(e){return pe.create("Form",{layout:"flex",direction:"row",labelGap:5,border:"0 0 1 0",align:"center",pack:"center",padding:"0 10 0 10",spacing:5,flex:0,minHeight:60,defaults:{classes:"imagetool",type:"button"},items:e})}var G=function(e){return e.toBlob()};function Y(e,n){return V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:q}])).hide().on("show",function(){L(),se.blobToImageResult(t.blob).then(function(e){return n(e)}).then(G).then(function(e){var t=Ce(e);F(t),ke(c),c=t})})}function K(n,r,o,i,a){return V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{type:"slider",flex:1,ondragend:function(e){var n;n=e.value,se.blobToImageResult(t.blob).then(function(e){return r(e,n)}).then(G).then(function(e){var t=Ce(e);F(t),ke(c),c=t})},minValue:e.rtl?a:i,maxValue:e.rtl?i:a,value:o,previewFilter:B},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:q}])).hide().on("show",function(){this.find("slider").value(o),L()})}u=V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:$}])).hide().on("show hide",function(e){d.toggleCropRect("show"===e.type)}).on("show",L),l=V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{type:"textbox",name:"w",label:"Width",size:4,onkeyup:I},{type:"textbox",name:"h",label:"Height",size:4,onkeyup:I},{type:"checkbox",name:"constrain",text:"Constrain proportions",checked:!0,onchange:function(e){!0===e.control.value()&&(A=R/N,D=N/R)}},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:"submit"}])).hide().on("submit",function(e){var n=parseInt(i.find("#w").value(),10),r=parseInt(i.find("#h").value(),10);e.preventDefault(),function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=[].slice.call(arguments,1);return function(){se.blobToImageResult(t.blob).then(function(t){e.apply(this,[t].concat(o)).then(G).then(U)})}}(ie.resize,n,r)(),W()}).on("show",L),f=V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{icon:"fliph",tooltip:"Flip horizontally",onclick:j(ie.flip,"h")},{icon:"flipv",tooltip:"Flip vertically",onclick:j(ie.flip,"v")},{icon:"rotateleft",tooltip:"Rotate counterclockwise",onclick:j(ie.rotate,-90)},{icon:"rotateright",tooltip:"Rotate clockwise",onclick:j(ie.rotate,90)},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:q}])).hide().on("show",L),h=Y(0,ie.invert),k=Y(0,ie.sharpen),T=Y(0,ie.emboss),g=K(0,ie.brightness,0,-1,1),v=K(0,ie.hue,180,0,360),b=K(0,ie.saturate,0,-1,1),y=K(0,ie.contrast,0,-1,1),x=K(0,ie.grayscale,0,0,1),w=K(0,ie.sepia,0,0,1),C=function(n,r){function o(){var e,n,o;e=i.find("#r")[0].value(),n=i.find("#g")[0].value(),o=i.find("#b")[0].value(),se.blobToImageResult(t.blob).then(function(t){return r(t,e,n,o)}).then(G).then(function(e){var t=Ce(e);F(t),ke(c),c=t})}var a=e.rtl?2:0,s=e.rtl?0:2;return V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{type:"slider",label:"R",name:"r",minValue:a,value:1,maxValue:s,ondragend:o,previewFilter:B},{type:"slider",label:"G",name:"g",minValue:a,value:1,maxValue:s,ondragend:o,previewFilter:B},{type:"slider",label:"B",name:"b",minValue:a,value:1,maxValue:s,ondragend:o,previewFilter:B},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:q}])).hide().on("show",function(){i.find("#r,#g,#b").value(1),L()})}(0,ie.colorize),_=K(0,ie.gamma,0,-1,1),E=K(0,ie.exposure,1,0,2),s=V(P([{text:"Back",onclick:W},{type:"spacer",flex:1},{text:"hue",icon:"hue",onclick:H(v)},{text:"saturate",icon:"saturate",onclick:H(b)},{text:"sepia",icon:"sepia",onclick:H(w)},{text:"emboss",icon:"emboss",onclick:H(T)},{text:"exposure",icon:"exposure",onclick:H(E)},{type:"spacer",flex:1}])).hide(),a=V(P([{tooltip:"Crop",icon:"crop",onclick:H(u)},{tooltip:"Resize",icon:"resize2",onclick:H(l)},{tooltip:"Orientation",icon:"orientation",onclick:H(f)},{tooltip:"Brightness",icon:"sun",onclick:H(g)},{tooltip:"Sharpen",icon:"sharpen",onclick:H(k)},{tooltip:"Contrast",icon:"contrast",onclick:H(y)},{tooltip:"Color levels",icon:"drop",onclick:H(C)},{tooltip:"Gamma",icon:"gamma",onclick:H(_)},{tooltip:"Invert",icon:"invert",onclick:H(h)}])),d=we.create({flex:1,imageSrc:t.url}),m=pe.create("Container",{layout:"flex",direction:"column",pack:"start",border:"0 1 0 0",padding:5,spacing:5,items:[{type:"button",icon:"undo",tooltip:"Undo",name:"undo",onclick:function(){F(t=O.undo()),M()}},{type:"button",icon:"redo",tooltip:"Redo",name:"redo",onclick:function(){F(t=O.redo()),M()}},{type:"button",icon:"zoomin",tooltip:"Zoom in",onclick:function(){var e=d.zoom();e<2&&(e+=.1),d.zoom(e)}},{type:"button",icon:"zoomout",tooltip:"Zoom out",onclick:function(){var e=d.zoom();e>.1&&(e-=.1),d.zoom(e)}}]}),p=pe.create("Container",{type:"container",layout:"flex",direction:"row",align:"stretch",flex:1,items:P([m,d])}),S=[a,u,l,f,s,h,g,v,b,y,x,w,C,k,T,_,E],(i=e.windowManager.open({layout:"flex",direction:"column",align:"stretch",minWidth:Math.min(me.DOM.getViewPort().w,800),minHeight:Math.min(me.DOM.getViewPort().h,650),title:"Edit image",items:S.concat([p]),buttons:P([{text:"Save",name:"save",subtype:"primary",onclick:function(){n(t.blob),i.close()}},{text:"Cancel",onclick:"close"}])})).on("close",function(){o(),Te(O.data),O=null,c=null}),O.add(t),M(),d.on("load",function(){N=d.imageSize().w,R=d.imageSize().h,A=R/N,D=N/R,i.find("#w").value(N),i.find("#h").value(R)}),d.on("crop",$)}var Ee,Se={edit:function(e,t){return new fe(function(n,r){return t.toBlob().then(function(t){_e(e,Ce(t),n,r)})})}},Ne={getImageSize:function(e){var t,n;function r(e){return/^[0-9\.]+px$/.test(e)}return t=e.style.width,n=e.style.height,t||n?r(t)&&r(n)?{w:parseInt(t,10),h:parseInt(n,10)}:null:(t=e.width,n=e.height,t&&n?{w:parseInt(t,10),h:parseInt(n,10)}:null)},setImageSize:function(e,t){var n,r;t&&(n=e.style.width,r=e.style.height,(n||r)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,r=e.height,(n||r)&&(e.setAttribute("width",t.w),e.setAttribute("height",t.h)))},getNaturalImageSize:function(e){return{w:e.naturalWidth,h:e.naturalHeight}}},Re=(Ee="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===Ee}),Ae=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return w.some(o)}return w.none()};Array.prototype.slice;Re(Array.from)&&Array.from;var De=function(e){return null!==e&&void 0!==e},Oe={traverse:function(e,t){var n;return n=t.reduce(function(e,t){return De(e)?e[t]:void 0},e),De(n)?n:null},readBlob:function(e){return new fe(function(t){var n=new _;n.onload=function(e){var n=e.target;t(n.result)},n.readAsText(e)})},requestUrlAsBlob:function(e,t,n){return new fe(function(o){var i;(i=new function(){return new(T.getOrDie("XMLHttpRequest"))}).onreadystatechange=function(){4===i.readyState&&o({status:i.status,blob:this.response})},i.open("GET",e,!0),i.withCredentials=n,r.each(t,function(e,t){i.setRequestHeader(t,e)}),i.responseType="blob",i.send()})},parseJson:function(e){var t;try{t=JSON.parse(e)}catch(e){}return t}},Pe=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],Ie=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Be=function(e){return"ImageProxy HTTP error: "+Ae(Pe,function(t){return e===t.code}).fold(p("Unknown ImageProxy error"),function(e){return e.message})},Me=function(e){var t=Be(e);return fe.reject(t)},Le=function(e){return Ae(Ie,function(t){return t.type===e}).fold(p("Unknown service error"),function(e){return e.message})},Fe=function(e,t){return Oe.readBlob(t).then(function(e){var t=function(e){var t=Oe.parseJson(e),n=Oe.traverse(t,["error","type"]);return"ImageProxy Service error: "+(n?Le(n):"Invalid JSON in service error message")}(e);return fe.reject(t)})},He={handleServiceErrorResponse:function(e,t){return 400===(n=e)||403===n||500===n?Fe(0,t):Me(e);var n},handleHttpError:Me,getHttpErrorMsg:Be,getServiceErrorMsg:Le},ze=function(e,t){var n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return Oe.requestUrlAsBlob(function(e,t){var n=-1===e.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(e)||!t?e:e+n+"apiKey="+encodeURIComponent(t)}(e,t),n,!1).then(function(e){return e.status<200||e.status>=300?He.handleServiceErrorResponse(e.status,e.blob):fe.resolve(e.blob)})},Ue=function(e,t,n){return t?ze(e,t):function(e,t){return Oe.requestUrlAsBlob(e,{},t).then(function(e){return e.status<200||e.status>=300?He.handleHttpError(e.status):fe.resolve(e.blob)})}(e,n)},$e=0,je=function(e,t){e.notificationManager.open({text:t,type:"error"})},We=function(e){return e.selection.getNode()},qe=function(e,t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new de(n).host===e.documentBaseURI.host},Ve=function(e,t){return-1!==r.inArray(function(e){return e.getParam("imagetools_cors_hosts",[],"string[]")}(e),new de(t.src).host)},Ge=function(e,t){var n,o=t.src;return Ve(e,t)?Ue(t.src,null,function(e,t){return-1!==r.inArray(function(e){return e.getParam("imagetools_credentials_hosts",[],"string[]")}(e),new de(t.src).host)}(e,t)):qe(e,t)?I(t):(o=function(e){return e.getParam("imagetools_proxy")}(e),o+=(-1===o.indexOf("?")?"?":"&")+"url="+encodeURIComponent(t.src),n=function(e){return e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string")}(e),Ue(o,n,!1))},Ye=function(e){var t;return(t=e.editorUpload.blobCache.getByUri(We(e).src))?fe.resolve(t.blob()):Ge(e,We(e))},Ke=function(e,t){var n=le.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},function(e){return e.getParam("images_upload_timeout",3e4,"number")}(e));t.set(n)},Xe=function(e){clearTimeout(e.get())},Je=function(e,t,n,r,o){return t.toBlob().then(function(i){var a,s,c,u,l;return c=e.editorUpload.blobCache,a=(l=We(e)).src,function(e){return e.getParam("images_reuse_filename",!1,"boolean")}(e)&&((u=c.getByUri(a))?(a=u.uri(),s=u.name()):s=function(e,t){var n=t.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i);return n?e.dom.encode(n[1]):null}(e,a)),u=c.create({id:"imagetools"+$e++,blob:i,base64:t.toBase64(),uri:a,name:s}),c.add(u),e.undoManager.transact(function(){e.$(l).on("load",function t(){e.$(l).off("load",t),e.nodeChanged(),n?e.editorUpload.uploadImagesAuto():(Xe(r),Ke(e,r))}),o&&e.$(l).attr({width:o.w,height:o.h}),e.$(l).attr({src:u.blobUri()}).removeAttr("data-mce-src")}),u})},Ze=function(e,t,n,r){return function(){return e._scanForImages().then(h(Ye,e)).then(se.blobToImageResult).then(n).then(function(n){return Je(e,n,!1,t,r)},function(t){je(e,t)})}},Qe={rotate:function(e,t,n){return function(){var r=Ne.getImageSize(We(e)),o=r?{w:r.h,h:r.w}:null;return Ze(e,t,function(e){return ie.rotate(e,n)},o)()}},flip:function(e,t,n){return function(){return Ze(e,t,function(e){return ie.flip(e,n)})()}},editImageDialog:function(e,t){return function(){var n=We(e),r=Ne.getNaturalImageSize(n),o=function(e){return new fe(function(t){P(e).then(function(o){var i=Ne.getNaturalImageSize(o);r.w===i.w&&r.h===i.h||Ne.getImageSize(n)&&Ne.setImageSize(n,i),ue.revokeObjectURL(o.src),t(e)})})};Ye(e).then(se.blobToImageResult).then(h(function(e,n){return Se.edit(e,n).then(o).then(se.blobToImageResult).then(function(n){return Je(e,n,!0,t)},function(){})},e),function(t){je(e,t)})}},isEditableImage:function(e,t){return e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])")&&(qe(e,t)||Ve(e,t)||e.settings.imagetools_proxy)},cancelTimedUpload:Xe},et=function(e,t){r.each({mceImageRotateLeft:Qe.rotate(e,t,-90),mceImageRotateRight:Qe.rotate(e,t,90),mceImageFlipVertical:Qe.flip(e,t,"v"),mceImageFlipHorizontal:Qe.flip(e,t,"h"),mceEditImage:Qe.editImageDialog(e,t)},function(t,n){e.addCommand(n,t)})},tt=function(e,t,n){e.on("NodeChange",function(r){var o=n.get();o&&o.src!==r.element.src&&(Qe.cancelTimedUpload(t),e.editorUpload.uploadImagesAuto(),n.set(null)),Qe.isEditableImage(e,r.element)&&n.set(r.element)})},nt=function(e){e.addButton("rotateleft",{title:"Rotate counterclockwise",cmd:"mceImageRotateLeft"}),e.addButton("rotateright",{title:"Rotate clockwise",cmd:"mceImageRotateRight"}),e.addButton("flipv",{title:"Flip vertically",cmd:"mceImageFlipVertical"}),e.addButton("fliph",{title:"Flip horizontally",cmd:"mceImageFlipHorizontal"}),e.addButton("editimage",{title:"Edit image",cmd:"mceEditImage"}),e.addButton("imageoptions",{title:"Image options",icon:"options",cmd:"mceImage"})},rt=function(e){e.addContextToolbar(h(Qe.isEditableImage,e),function(e){return e.getParam("imagetools_toolbar","rotateleft rotateright | flipv fliph | crop editimage imageoptions")}(e))};n.add("imagetools",function(e){var n=t(0),r=t(null);et(e,n),nt(e),rt(e),tt(e,n,r)})}()}).call(t,n(2).setImmediate)},function(e,t,n){n(46)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},r=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},o=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,a=r,s=function(e){var t=r(e);return t.length>0?t[0]:n(e)},c=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},p=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(f[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(u[n.getDay()]))).replace("%%","%")},h=function(e,t){if(c(e)){var n=p(e,t),r=void 0;r=/%[HMSIp]/.test(t)?p(e,"%Y-%m-%dT%H:%M"):p(e,"%Y-%m-%d");var o=e.dom.getParent(e.selection.getStart(),"time");o?function(e,t,n,r){var o=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(o,t),e.dom.remove(t),e.selection.select(o,!0),e.selection.collapse(!1)}(e,o,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(p(e,t))},g=p,v=function(e){e.addCommand("mceInsertDate",function(){h(e,o(e))}),e.addCommand("mceInsertTime",function(){h(e,i(e))})},b=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(e,t){var n=function(e,t){var n=a(e);return b.map(n,function(n){return{text:g(e,n),onclick:function(){t.set(n),h(e,n)}}})}(e,t);e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:n,onclick:function(){var n=t.get();h(e,n||s(e))}}),e.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:n,context:"insert"})};t.add("insertdatetime",function(t){var n=e(null);v(t),y(t,n)})}()},function(e,t,n){n(48)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.VK"),n=function(e){return e.target_list},r=function(e){return e.rel_list},o=function(e){return e.link_class_list},i=function(e){return"boolean"==typeof e.link_assume_external_targets&&e.link_assume_external_targets},a=function(e){return"boolean"==typeof e.link_context_toolbar&&e.link_context_toolbar},s=function(e){return e.link_list},c=function(e){return"string"==typeof e.default_link_target},u=function(e){return e.default_link_target},l=n,f=function(e,t){e.settings.target_list=t},d=function(e){return!1!==n(e)},m=r,p=function(e){return void 0!==r(e)},h=o,g=function(e){return void 0!==o(e)},v=function(e){return!1!==e.link_title},b=function(e){return"boolean"==typeof e.allow_unsafe_link_target&&e.allow_unsafe_link_target},y=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=tinymce.util.Tools.resolve("tinymce.Env"),w=function(e){if(!x.ie||x.ie>10){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(e,t){document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)}(t,n)}else{var r=window.open("","_blank");if(r){r.opener=null;var o=r.document;o.open(),o.write('<meta http-equiv="refresh" content="0; url='+y.DOM.encode(e)+'">'),o.close()}}},C=tinymce.util.Tools.resolve("tinymce.util.Tools"),k=function(e,t){var n=["noopener"],r=e?e.split(/\s+/):[],o=function(e){return e.filter(function(e){return-1===C.inArray(n,e)})};return(r=t?function(e){return(e=o(e)).length?e.concat(n):n}(r):o(r)).length?function(e){return C.trim(e.sort().join(" "))}(r):null},T=function(e,t){return t=t||e.selection.getNode(),E(t)?e.dom.select("a[href]",t)[0]:e.dom.getParent(t,"a[href]")},_=function(e){return e&&"A"===e.nodeName&&e.href},E=function(e){return e&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className)},S=function(e,t){var n,r;(r=e.dom.select("img",t)[0])&&(n=e.dom.getParents(r,"a[href]",t)[0])&&(n.parentNode.insertBefore(r,n),e.dom.remove(n))},N=function(e,t,n){var r,o;(o=e.dom.select("img",t)[0])&&(r=e.dom.create("a",n),o.parentNode.insertBefore(r,o),r.appendChild(o))},R=function(e,t){return function(n){e.undoManager.transact(function(){var r=e.selection.getNode(),o=T(e,r),i={href:n.href,target:n.target?n.target:null,rel:n.rel?n.rel:null,class:n.class?n.class:null,title:n.title?n.title:null};p(e.settings)||!1!==b(e.settings)||(i.rel=k(i.rel,"_blank"===i.target)),n.href===t.href&&(t.attach(),t={}),o?(e.focus(),n.hasOwnProperty("text")&&("innerText"in o?o.innerText=n.text:o.textContent=n.text),e.dom.setAttribs(o,i),e.selection.select(o),e.undoManager.add()):E(r)?N(e,r,i):n.hasOwnProperty("text")?e.insertContent(e.dom.createHTML("a",i,e.dom.encode(n.text))):e.execCommand("mceInsertLink",!1,i)})}},A=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();E(t)?S(e,t):e.execCommand("unlink")})}},D=_,O=function(e){return C.grep(e,_).length>0},P=function(e){return!(/</.test(e)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(e)||-1===e.indexOf("href=")))},I=T,B=function(e,t){return function(e){return e.replace(/\uFEFF/g,"")}(t?t.innerText||t.textContent:e.getContent({format:"text"}))},M=k,L=tinymce.util.Tools.resolve("tinymce.util.Delay"),F=tinymce.util.Tools.resolve("tinymce.util.XHR"),H={},z=function(e,t,n){var r=function(e,n){return n=n||[],C.each(e,function(e){var o={text:e.text||e.title};e.menu?o.menu=r(e.menu):(o.value=e.value,t&&t(o)),n.push(o)}),n};return r(e,n||[])},U=function(e,t,n){var r=e.selection.getRng();L.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(r),n(t)})})},$=function(e,t){var n,r,o,a,s,y,x,w,k,T,_,E={},S=e.selection,N=e.dom,D=function(e){var t=o.find("#text");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),o.find("#href").value(e.control.value())},O=function(){r||!a||E.text||this.parent().parent().find("#text")[0].value(this.value())};a=P(S.getContent()),n=I(e),E.text=r=B(e.selection,n),E.href=n?N.getAttrib(n,"href"):"",n?E.target=N.getAttrib(n,"target"):c(e.settings)&&(E.target=u(e.settings)),(_=N.getAttrib(n,"rel"))&&(E.rel=_),(_=N.getAttrib(n,"class"))&&(E.class=_),(_=N.getAttrib(n,"title"))&&(E.title=_),a&&(s={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){E.text=this.value()}}),t&&(y={type:"listbox",label:"Link list",values:z(t,function(t){t.value=e.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:D,value:e.convertURL(E.href,"href"),onPostRender:function(){y=this}}),d(e.settings)&&(void 0===l(e.settings)&&f(e,[{text:"None",value:""},{text:"New window",value:"_blank"}]),w={name:"target",type:"listbox",label:"Target",values:z(l(e.settings))}),p(e.settings)&&(x={name:"rel",type:"listbox",label:"Rel",values:z(m(e.settings),function(t){!1===b(e.settings)&&(t.value=M(t.value,"_blank"===E.target))})}),g(e.settings)&&(k={name:"class",type:"listbox",label:"Class",values:z(h(e.settings),function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"a",classes:[t.value]})})})}),v(e.settings)&&(T={name:"title",type:"textbox",label:"Title",value:E.title}),o=e.windowManager.open({title:"Insert link",data:E,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var n=t.meta||{};y&&y.value(e.convertURL(this.value(),"href")),C.each(t.meta,function(e,t){var n=o.find("#"+t);"text"===t?0===r.length&&(n.value(e),E.text=e):n.value(e)}),n.attach&&(H={href:this.value(),attach:n.attach}),n.text||O.call(this)},onkeyup:O,onpaste:O,onbeforecall:function(e){e.meta=o.toJSON()}},s,T,function(t){var n=[];if(C.each(e.dom.select("a:not([href])"),function(e){var r=e.name||e.id;r&&n.push({text:r,value:"#"+r,selected:-1!==t.indexOf("#"+r)})}),n.length)return n.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:n,onselect:D}}(E.href),y,x,w,k],onSubmit:function(t){var n=i(e.settings),o=R(e,H),s=A(e),c=C.extend({},E,t.data),u=c.href;u?(a&&c.text!==r||delete c.text,u.indexOf("@")>0&&-1===u.indexOf("//")&&-1===u.indexOf("mailto:")?U(e,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(c.href="mailto:"+u),o(c)}):!0===n&&!/^\w+:/i.test(u)||!1===n&&/^\s*www[\.|\d\.]/i.test(u)?U(e,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(c.href="http://"+u),o(c)}):o(c)):s()}})},j=function(e){!function(e,t){var n=s(e.settings);"string"==typeof n?F.send({url:n,success:function(n){t(e,JSON.parse(n))}}):"function"==typeof n?n(function(n){t(e,n)}):t(e,n)}(e,$)},W=function(e,t){return e.dom.getParent(t,"a[href]")},q=function(e){return W(e,e.selection.getStart())},V=function(e,t){if(t){var n=function(e){var t=e.getAttribute("data-mce-href");return t||e.getAttribute("href")}(t);if(/^#/.test(n)){var r=e.$(n);r.length&&e.selection.scrollIntoView(r[0],!0)}else w(t.href)}},G=function(e){return function(){j(e)}},Y=function(e){return function(){V(e,q(e))}},K=function(e){return function(t){var n,r,o;return!!(a(e.settings)&&!function(e){var t=e.plugins.contextmenu;return!!t&&t.isContextMenuVisible()}(e)&&D(t)&&3===(o=(r=(n=e.selection).getRng()).startContainer).nodeType&&n.isCollapsed()&&r.startOffset>0&&r.startOffset<o.data.length)}},X=function(e){e.on("click",function(n){var r=W(e,n.target);r&&t.metaKeyPressed(n)&&(n.preventDefault(),V(e,r))}),e.on("keydown",function(t){var n=q(e);n&&13===t.keyCode&&function(e){return!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey}(t)&&(t.preventDefault(),V(e,n))})},J=function(e){return function(){var t=this;e.on("nodechange",function(n){t.active(!e.readonly&&!!I(e,n.element))})}},Z=function(e){return function(){var t=this,n=function(e){O(e.parents)?t.show():t.hide()};O(e.dom.getParents(e.selection.getStart()))||t.hide(),e.on("nodechange",n),t.on("remove",function(){e.off("nodechange",n)})}},Q=function(e){e.addCommand("mceLink",G(e))},ee=function(e){e.addShortcut("Meta+K","",G(e))},te=function(e){e.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:G(e),onpostrender:J(e)}),e.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:A(e),onpostrender:J(e)}),e.addContextToolbar&&e.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:Y(e)})},ne=function(e){e.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:Y(e),onPostRender:Z(e),prependToContext:!0}),e.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:G(e),stateSelector:"a[href]",context:"insert",prependToContext:!0}),e.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:A(e),stateSelector:"a[href]"})},re=function(e){e.addContextToolbar&&e.addContextToolbar(K(e),"openlink | link unlink")};e.add("link",function(e){te(e),ne(e),re(e),X(e),Q(e),ee(e)})}()},function(e,t,n){n(50)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.getParam("media_scripts")},o=function(e){return e.getParam("audio_template_callback")},i=function(e){return e.getParam("video_template_callback")},a=function(e){return e.getParam("media_live_embeds",!0)},s=function(e){return e.getParam("media_filter_html",!0)},c=function(e){return e.getParam("media_url_resolver")},u=function(e){return e.getParam("media_alt_source",!0)},l=function(e){return e.getParam("media_poster",!0)},f=function(e){return e.getParam("media_dimensions",!0)},d=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),m=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),p=function(e,t){if(e)for(var n=0;n<e.length;n++)if(-1!==t.indexOf(e[n].filter))return e[n]},h=function(e){return function(t){return t?t.style[e].replace(/px$/,""):""}},g=function(e){return function(t,n){t&&(t.style[e]=function(e){return/^[0-9.]+$/.test(e)?e+"px":e}(n))}},v={getMaxWidth:h("maxWidth"),getMaxHeight:h("maxHeight"),setMaxWidth:g("maxWidth"),setMaxHeight:g("maxHeight")},b=m.DOM,y=function(e){return b.getAttrib(e,"data-ephox-embed-iri")},x=function(e,t){return function(e){var t=b.createFragment(e);return""!==y(t.firstChild)}(t)?function(e){var t=b.createFragment(e).firstChild;return{type:"ephox-embed-iri",source1:y(t),source2:"",poster:"",width:v.getMaxWidth(t),height:v.getMaxHeight(t)}}(t):function(e,t){var r={};return d({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(t,o){if(r.source1||"param"!==t||(r.source1=o.map.movie),"iframe"!==t&&"object"!==t&&"embed"!==t&&"video"!==t&&"audio"!==t||(r.type||(r.type=t),r=n.extend(o.map,r)),"script"===t){var i=p(e,o.map.src);if(!i)return;r={type:"script",source1:o.map.src,width:i.width,height:i.height}}"source"===t&&(r.source1?r.source2||(r.source2=o.map.src):r.source1=o.map.src),"img"!==t||r.poster||(r.poster=o.map.src)}}).parse(t),r.source1=r.source1||r.src||r.data,r.source2=r.source2||"",r.poster=r.poster||"",r}(e,t)},w=tinymce.util.Tools.resolve("tinymce.util.Promise"),C=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},k=tinymce.util.Tools.resolve("tinymce.html.Writer"),T=tinymce.util.Tools.resolve("tinymce.html.Schema"),_=m.DOM,E=function(e,t){var n,r,o,i;for(n in t)if(o=""+t[n],e.map[n])for(r=e.length;r--;)(i=e[r]).name===n&&(o?(e.map[n]=o,i.value=o):(delete e.map[n],e.splice(r,1)));else o&&(e.push({name:n,value:o}),e.map[n]=o)},S=function(e,t){var n=_.createFragment(e).firstChild;return v.setMaxWidth(n,t.width),v.setMaxHeight(n,t.height),function(e){var t=k();return d(t).parse(e),t.getContent()}(n.outerHTML)},N=function(e,t,n){return function(e){var t=_.createFragment(e);return""!==_.getAttrib(t.firstChild,"data-ephox-embed-iri")}(e)?S(e,t):function(e,t,n){var r,o=k(),i=0;return d({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){o.comment(e)},cdata:function(e){o.cdata(e)},text:function(e,t){o.text(e,t)},start:function(e,a,s){switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&E(a,{width:t.width,height:t.height})}if(n)switch(e){case"video":E(a,{poster:t.poster,src:""}),t.source2&&E(a,{src:""});break;case"iframe":E(a,{src:t.source1});break;case"source":if(++i<=2&&(E(a,{src:t["source"+i],type:t["source"+i+"mime"]}),!t["source"+i]))return;break;case"img":if(!t.poster)return;r=!0}o.start(e,a,s)},end:function(e){if("video"===e&&n)for(var a=1;a<=2;a++)if(t["source"+a]){var s=[];s.map={},i<a&&(E(s,{src:t["source"+a],type:t["source"+a+"mime"]}),o.start("source",s,!0))}if(t.poster&&"object"===e&&n&&!r){var c=[];c.map={},E(c,{src:t.poster,width:t.width,height:t.height}),o.start("img",c,!0)}o.end(e)}},T({})).parse(e),o.getContent()}(e,t,n)},R=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],A=function(e,t){var a=n.extend({},t);if(!a.source1&&(n.extend(a,x(r(e),a.embed)),!a.source1))return"";a.source2||(a.source2=""),a.poster||(a.poster=""),a.source1=e.convertURL(a.source1,"source"),a.source2=e.convertURL(a.source2,"source"),a.source1mime=C(a.source1),a.source2mime=C(a.source2),a.poster=e.convertURL(a.poster,"poster");var s=function(e){var t=R.filter(function(t){return t.regex.test(e)});return t.length>0?n.extend({},t[0],{url:function(e,t){for(var n=e.regex.exec(t),r=e.url,o=function(e){r=r.replace("$"+e,function(){return n[e]?n[e]:""})},i=0;i<n.length;i++)o(i);return r.replace(/\?$/,"")}(t[0],e)}):null}(a.source1);if(s&&(a.source1=s.url,a.type=s.type,a.allowFullscreen=s.allowFullscreen,a.width=a.width||s.w,a.height=a.height||s.h),a.embed)return N(a.embed,a,!0);var c=p(r(e),a.source1);c&&(a.type="script",a.width=c.width,a.height=c.height);var u=o(e),l=i(e);return a.width=a.width||300,a.height=a.height||150,n.each(a,function(t,n){a[n]=e.dom.encode(t)}),"iframe"===a.type?function(e){var t=e.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source1+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}(a):"application/x-shockwave-flash"===a.source1mime?function(e){var t='<object data="'+e.source1+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+="</object>"}(a):-1!==a.source1mime.indexOf("audio")?function(e,t){return t?t(e):'<audio controls="controls" src="'+e.source1+'">'+(e.source2?'\n<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</audio>"}(a,u):"script"===a.type?function(e){return'<script src="'+e.source1+'"><\/script>'}(a):function(e,t){return t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source1+'"'+(e.source1mime?' type="'+e.source1mime+'"':"")+" />\n"+(e.source2?'<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</video>"}(a,l)},D={},O=function(e){return function(t){return A(e,t)}},P=function(e,t){var n=c(e);return n?function(e,t,n){return new w(function(r,o){var i=function(n){return n.html&&(D[e.source1]=n),r({url:e.source1,html:n.html?n.html:t(e)})};D[e.source1]?i(D[e.source1]):n({url:e.source1},i,o)})}(t,O(e),n):function(e,t){return new w(function(n){n({html:t(e),url:e.source1})})}(t,O(e))},I=function(e){return D.hasOwnProperty(e)},B=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},M=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],o=e.find("#constrain")[0];n&&r&&o&&t(n,r,o.checked())},L=function(e,t,n){var r=e.state.get("oldVal"),o=t.state.get("oldVal"),i=e.value(),a=t.value();n&&r&&o&&i&&a&&(i!==r?(a=Math.round(i/r*a),isNaN(a)||t.value(a)):(i=Math.round(a/o*i),isNaN(i)||e.value(i))),B(e,t)},F=function(e){M(e,L)},H=function(e){var t=function(){e(function(e){F(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},z=function(e){M(e,B)},U=F,$=t.ie&&t.ie<=8?"onChange":"onInput",j=function(e){return function(t){var n=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:n})}},W=function(e,t){return function(o){var i=o.html,a=e.find("#embed")[0],s=n.extend(x(r(t),i),{source1:o.url});e.fromJSON(s),a&&(a.value(i),U(e))}},q=function(e,t){var n=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var n,r,o=e.dom.select("img[data-mce-object]");for(n=0;n<t.length;n++)for(r=o.length-1;r>=0;r--)t[n]===o[r]&&o.splice(r,1);e.selection.select(o[0])}(e,n),e.nodeChanged()},V=function(e){var t,o,i=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){P(e,t.toJSON()).then(W(t,e)).catch(j(e))},1)},onchange:function(r){P(e,t.toJSON()).then(W(t,e)).catch(j(e)),function(e,t){n.each(t,function(t,n){e.find("#"+n).value(t)})}(t,r.meta)},onbeforecall:function(e){e.meta=t.toJSON()}}],a=[];if(u(e)&&a.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),l(e)&&a.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),f(e)){var s=H(function(e){e(t),o=t.toJSON(),t.find("#embed").value(N(o.embed,o))});i.push(s)}o=function(e){var t=e.selection.getNode(),n=t.getAttribute("data-ephox-embed-iri");return n?{source1:n,"data-ephox-embed-iri":n,width:v.getMaxWidth(t),height:v.getMaxHeight(t)}:t.getAttribute("data-mce-object")?x(r(e),e.serializer.serialize(t,{selection:!0})):{}}(e);var c={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()}(e),multiline:!0,rows:5,label:"Source"};c[$]=function(){o=n.extend({},x(r(e),this.value())),this.parent().parent().fromJSON(o)};var d=[{title:"General",type:"form",items:i},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},c]}];a.length>0&&d.push({title:"Advanced",type:"form",items:a}),t=e.windowManager.open({title:"Insert/edit media",data:o,bodyType:"tabpanel",body:d,onSubmit:function(){U(t),function(e,t){var n=e.toJSON();n.embed=N(n.embed,n),n.embed&&I(n.source1)?q(t,n.embed):P(t,n).then(function(e){q(t,e.html)}).catch(j(t))}(t,e)}}),z(t)},G=function(e){return{showDialog:function(){V(e)}}},Y=function(e){e.addCommand("mceMedia",function(){V(e)})},K=tinymce.util.Tools.resolve("tinymce.html.Node"),X=function(e,t){if(!1===s(e))return t;var n,r=k();return d({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){r.comment(e)},cdata:function(e){r.cdata(e)},text:function(e,t){r.text(e,t)},start:function(t,o,i){if(n=!0,"script"!==t&&"noscript"!==t){for(var a=0;a<o.length;a++){if(0===o[a].name.indexOf("on"))return;"style"===o[a].name&&(o[a].value=e.dom.serializeStyle(e.dom.parseStyle(o[a].value),t))}r.start(t,o,i),n=!1}},end:function(e){n||r.end(e)}},T({})).parse(t),r.getContent()},J=function(e,n){var r,o=n.name;return(r=new K("img",1)).shortEnded=!0,Q(e,n,r),r.attr({width:n.attr("width")||"300",height:n.attr("height")||("audio"===o?"30":"150"),style:n.attr("style"),src:t.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),r},Z=function(e,t){var n,r,o,i=t.name;return(n=new K("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":i,class:"mce-preview-object mce-object-"+i}),Q(e,t,n),(r=new K(i,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),class:t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(o=new K("span",1)).attr("class","mce-shim"),n.append(r),n.append(o),n},Q=function(e,t,n){var r,o,i,a,s;for(a=(i=t.attributes).length;a--;)r=i[a].name,o=i[a].value,"width"!==r&&"height"!==r&&"style"!==r&&("data"!==r&&"src"!==r||(o=e.convertURL(o,r)),n.attr("data-mce-p-"+r,o));(s=t.firstChild&&t.firstChild.value)&&(n.attr("data-mce-html",escape(X(e,s))),n.firstChild=null)},ee=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},te=function(e){return function(n){for(var o,i,s=n.length;s--;)(o=n[s]).parent&&(o.parent.attr("data-mce-object")||("script"!==o.name||(i=p(r(e),o.attr("src"))))&&(i&&(i.width&&o.attr("width",i.width.toString()),i.height&&o.attr("height",i.height.toString())),"iframe"===o.name&&a(e)&&t.ceFalse?ee(o)||o.replace(Z(e,o)):ee(o)||o.replace(J(e,o))))}},ne=function(e){e.on("preInit",function(){var t=e.schema.getSpecialElements();n.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=e.schema.getBoolAttrs();n.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",te(e)),e.serializer.addAttributeFilter("data-mce-object",function(t,n){for(var r,o,i,a,s,c,u,l,f=t.length;f--;)if((r=t[f]).parent){for(u=r.attr(n),o=new K(u,1),"audio"!==u&&"script"!==u&&((l=r.attr("class"))&&-1!==l.indexOf("mce-preview-object")?o.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):o.attr({width:r.attr("width"),height:r.attr("height")})),o.attr({style:r.attr("style")}),i=(a=r.attributes).length;i--;){var d=a[i].name;0===d.indexOf("data-mce-p-")&&o.attr(d.substr(11),a[i].value)}"script"===u&&o.attr("type","text/javascript"),(s=r.attr("data-mce-html"))&&((c=new K("#text",3)).raw=!0,c.value=X(e,unescape(s)),o.append(c)),r.replace(o)}})}),e.on("setContent",function(){e.$("span.mce-preview-object").each(function(t,n){var r=e.$(n);0===r.find("span.mce-shim",n).length&&r.append('<span class="mce-shim"></span>')})})},re=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},oe=function(e){e.on("click keyup",function(){var t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),e.on("objectResized",function(e){var t,n=e.target;n.getAttribute("data-mce-object")&&(t=n.getAttribute("data-mce-html"))&&(t=unescape(t),n.setAttribute("data-mce-html",escape(N(t,{width:e.width,height:e.height}))))})},ie=function(e){e.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};e.add("media",function(e){return Y(e),ie(e),re(e),ne(e),oe(e),G(e)})}()},function(e,t,n){n(52)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e){return e.getParam("noneditable_noneditable_class","mceNonEditable")},r=function(e){return e.getParam("noneditable_editable_class","mceEditable")},o=function(e){var t=e.getParam("noneditable_regexp",[]);return t&&t.constructor===RegExp?[t]:t},i=function(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}},a=function(e,t,n){return function(r){var o=arguments,i=o[o.length-2],a=i>0?t.charAt(i-1):"";if('"'===a)return r;if(">"===a){var s=t.lastIndexOf("<",i);if(-1!==s&&-1!==t.substring(s,i).indexOf('contenteditable="false"'))return r}return'<span class="'+n+'" data-mce-content="'+e.dom.encode(o[0])+'">'+e.dom.encode("string"==typeof o[1]?o[1]:o[0])+"</span>"}},s=function(e){var s,c;s=" "+t.trim(r(e))+" ",c=" "+t.trim(n(e))+" ";var u=i(s),l=i(c),f=o(e);e.on("PreInit",function(){f.length>0&&e.on("BeforeSetContent",function(t){!function(e,t,r){var o=t.length,i=r.content;if("raw"!==r.format){for(;o--;)i=i.replace(t[o],a(e,i,n(e)));r.content=i}}(e,f,t)}),e.parser.addAttributeFilter("class",function(e){for(var t,n=e.length;n--;)t=e[n],u(t)?t.attr("contenteditable","true"):l(t)&&t.attr("contenteditable","false")}),e.serializer.addAttributeFilter("contenteditable",function(e){for(var t,n=e.length;n--;)t=e[n],(u(t)||l(t))&&(f.length>0&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):t.attr("contenteditable",null))})})};e.add("noneditable",function(e){s(e)})}()},function(e,t,n){n(54)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!t.get("powerpaste")||(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},r=function(e,t){return{clipboard:e,quirks:t}},o=function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},i=function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},a=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},s=function(e,t){return e.fire("paste",{ieFake:t})},c={shouldPlainTextInform:function(e){return e.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}},u=function(e,t,n){"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),a(e,!1)):(t.pasteFormat.set("text"),a(e,!0),function(e,t){return!1===t.get()&&c.shouldPlainTextInform(e)}(e,n)&&(function(e,t){e.notificationManager.open({text:e.translate(t),type:"info"})}(e,"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),n.set(!0))),e.focus()},l=function(e,t,n){e.addCommand("mceTogglePlainTextPaste",function(){u(e,t,n)}),e.addCommand("mceInsertClipboardContent",function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)})},f=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay"),m=tinymce.util.Tools.resolve("tinymce.util.Tools"),p=tinymce.util.Tools.resolve("tinymce.util.VK"),h="\x3c!-- x-tinymce/html --\x3e",g={mark:function(e){return h+e},unmark:function(e){return e.replace(h,"")},isMarked:function(e){return-1!==e.indexOf(h)},internalHtmlMime:function(){return"x-tinymce/html"}},v=tinymce.util.Tools.resolve("tinymce.html.Entities"),b=function(e){return e.replace(/\r?\n/g,"<br>")},y=function(e,t,n){var r=e.split(/\n\n/),o=function(e,t){var n,r=[],o="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+v.encodeAllRaw(t[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(t,n),i="</"+t+">",a=m.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===a.length?a[0]:m.map(a,function(e){return o+e+i}).join("")},x={isPlainText:function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},convert:function(e,t,n){return t?y(e,t,n):b(e)},toBRs:b,toBlockElements:y},w=tinymce.util.Tools.resolve("tinymce.html.DomParser"),C=tinymce.util.Tools.resolve("tinymce.html.Node"),k=tinymce.util.Tools.resolve("tinymce.html.Schema"),T=tinymce.util.Tools.resolve("tinymce.html.Serializer");function _(e,t){return m.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var E={filter:_,innerText:function(e){var t=k(),n=w({},t),r="",o=t.getShortEndedElements(),i=m.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements();return e=_(e,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,s=t;if("br"!==n)if(o[n]&&(r+=" "),i[n])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))do{e(t)}while(t=t.next);a[n]&&s.next&&(r+="\n","p"===n&&(r+="\n"))}else r+="\n"}(n.parse(e)),r},trimHtml:function(e){return e=_(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function S(e){var t,n;return n=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),m.each(n,function(n){if(n.test(e))return t=!0,!1}),t}function N(e){var t,n,r=1;function o(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)do{t+=o(e)}while(e=e.next);return t}function i(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!i(e,t))return!1}while(e=e.next);return!0}function a(e,o,a){var s=e._listLevel||r;s!==r&&(s<r?t&&(t=t.parent.parent):(n=t,t=null)),t&&t.name===o?t.append(e):(n=n||t,t=new C(o,1),a>1&&t.attr("start",""+a),e.wrap(t)),e.name="li",s>r&&n&&n.lastChild.append(t),r=s,function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)do{e(t)}while(t=t.next)}(e),i(e,/^\u00a0+/),i(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(e,/^\u00a0+/)}for(var s=[],c=e.firstChild;void 0!==c&&null!==c;)if(s.push(c),null!==(c=c.walk()))for(;void 0!==c&&c.parent!==e;)c=c.walk();for(var u=0;u<s.length;u++)if("p"===(e=s[u]).name&&e.firstChild){var l=o(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){a(e,"ul");continue}if(S(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),a(e,"ol",d);continue}if(e._listLevel){a(e,"ul",1);continue}t=null}else n=t,t=null}function R(e,t,n,r){var o,i={},a=e.dom.parseStyle(r);return m.each(a,function(a,s){switch(s){case"mso-list":(o=/\w+ \w+([0-9]+)/i.exec(r))&&(n._listLevel=parseInt(o[1],10)),/Ignore/i.test(a)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":s="text-align";break;case"vert-align":s="vertical-align";break;case"font-color":case"mso-foreground":s="color";break;case"mso-background":case"mso-highlight":s="background";break;case"font-weight":case"font-style":return void("normal"!==a&&(i[s]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void n.remove()}0!==s.indexOf("mso-comment")?0!==s.indexOf("mso-")&&("all"===c.getRetainStyleProps(e)||t&&t[s])&&(i[s]=a):n.remove()}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new C("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new C("i",1))),(i=e.dom.serializeStyle(i,n.name))||null}var A={preProcess:function(e,t){return c.shouldUseDefaultFilters(e)?function(e,t){var n,r;(n=c.getRetainStyleProps(e))&&(r=m.makeMap(n.split(/[, ]/))),t=E.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,""],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(""):""}]]);var o=c.getWordValidElements(e),i=k({valid_elements:o,valid_children:"-li[p]"});m.each(i.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var a=w({},i);a.addAttributeFilter("style",function(t){for(var n,o=t.length;o--;)(n=t[o]).attr("style",R(e,r,n,n.attr("style"))),"span"===n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),a.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),a.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),a.addNodeFilter("a",function(e){for(var t,n,r,o=e.length;o--;)if(n=(t=e[o]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=a.parse(t);return c.shouldConvertWordFakeLists(e)&&N(s),t=T({validate:e.settings.validate},i).serialize(s)}(e,t):t},isWordContent:function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}},D=function(e,t){return{content:e,cancelled:t}},O=function(e,t,n,r){var a=o(e,t,n,r);return e.hasEventListeners("PastePostProcess")&&!a.isDefaultPrevented()?function(e,t,n,r){var o=e.dom.create("div",{style:"display:none"},t),a=i(e,o,n,r);return D(a.node.innerHTML,a.isDefaultPrevented())}(e,a.content,n,r):D(a.content,a.isDefaultPrevented())},P=function(e,t,n){var r=A.isWordContent(t),o=r?A.preProcess(e,t):t;return O(e,o,n,r)},I=function(e,t){return e.insertContent(t,{merge:c.shouldMergeFormats(e),paste:!0}),!0},B=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},M=function(e){return B(e)&&/.(gif|jpe?g|png)$/.test(e)},L=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!B(t))&&function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.execCommand("mceInsertLink",!1,t)}),!0}(e,t,n)},F=function(e,t,n){return!!M(t)&&function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.insertContent('<img src="'+t+'">')}),!0}(e,t,n)},H=function(e,t){!1===c.isSmartPasteEnabled(e)?I(e,t):function(e,t){m.each([L,F,I],function(n){return!0!==n(e,t,I)})}(e,t)},z=function(e,t,n){var r=n||g.isMarked(t),o=P(e,g.unmark(t),r);!1===o.cancelled&&H(e,o.content)},U=function(e,t){t=e.dom.encode(t).replace(/\r\n/g,"\n"),t=x.convert(t,e.settings.forced_root_block,e.settings.forced_root_block_attrs),z(e,t,!1)},$=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var o=e.types[r];try{t[o]=e.getData(o)}catch(e){t[o]=""}}}return t},j=function(e,t){return t in e&&e[t].length>0},W=function(e){return j(e,"text/html")||j(e,"text/plain")},q=E.createIdGenerator("mceclip"),V=function(e,t,n,r){t&&(e.selection.setRng(t),t=null);var o,i,a,s,c=n.result,u=-1!==(i=(o=c).indexOf(","))?o.substr(i+1):null,l=q(),f=e.settings.images_reuse_filename&&r.name?function(e,t){var n=t.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);return n?e.dom.encode(n[1]):null}(e,r.name):l,d=new Image;if(d.src=c,a=e.settings,s=d,!a.images_dataimg_filter||a.images_dataimg_filter(s)){var m,p=e.editorUpload.blobCache,h=void 0;(m=p.findFirst(function(e){return e.base64()===u}))?h=m:(h=p.create(l,r,u,f),p.add(h)),z(e,'<img src="'+h.blobUri()+'">',!1)}else z(e,'<img src="'+c+'">',!1)},G=function(e,t,n){var r="paste"===t.type?t.clipboardData:t.dataTransfer;function o(r){var o,i,a,s=!1;if(r)for(o=0;o<r.length;o++)if(i=r[o],/^image\/(jpeg|png|gif|bmp)$/.test(i.type)){var c=i.getAsFile?i.getAsFile():i;(a=new window.FileReader).onload=V.bind(null,e,n,a,c),a.readAsDataURL(c),t.preventDefault(),s=!0}return s}if(e.settings.paste_data_images&&r)return o(r.items)||o(r.files)},Y=function(e){return p.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},K=function(e,t,n){var r,o=0;function i(n,r,o,i){var a,s;j(n,"text/html")?a=n["text/html"]:(a=t.getHtml(),i=i||g.isMarked(a),t.isDefaultContent(a)&&(o=!0)),a=E.trimHtml(a),t.remove(),s=!1===i&&x.isPlainText(a),a.length&&!s||(o=!0),o&&(a=j(n,"text/plain")&&s?n["text/plain"]:E.innerText(a)),t.isDefaultContent(a)?r||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?U(e,a):z(e,a,i)}e.on("keydown",function(n){function i(e){Y(e)&&!e.isDefaultPrevented()&&t.remove()}if(Y(n)&&!n.isDefaultPrevented()){if((r=n.shiftKey&&86===n.keyCode)&&f.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(n.stopImmediatePropagation(),o=(new Date).getTime(),f.ie&&r)return n.preventDefault(),void s(e,!0);t.remove(),t.create(),e.once("keyup",i),e.once("paste",function(){e.off("keyup",i)})}}),e.on("paste",function(a){var s=(new Date).getTime(),c=function(e,t){var n=$(t.clipboardData||e.getDoc().dataTransfer);return E.isMsEdge()?m.extend(n,{"text/html":""}):n}(e,a),u=(new Date).getTime()-s,l=(new Date).getTime()-o-u<1e3,p="text"===n.get()||r,h=j(c,g.internalHtmlMime());r=!1,a.isDefaultPrevented()||function(e){var t=e.clipboardData;return-1!==navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}(a)?t.remove():W(c)||!G(e,a,t.getLastRng()||e.selection.getRng())?(l||a.preventDefault(),!f.ie||l&&!a.ieFake||j(c,"text/html")||(t.create(),e.dom.bind(t.getEl(),"paste",function(e){e.stopPropagation()}),e.getDoc().execCommand("Paste",!1,null),c["text/html"]=t.getHtml()),j(c,"text/html")?(a.preventDefault(),h||(h=g.isMarked(c["text/html"])),i(c,l,p,h)):d.setEditorTimeout(e,function(){i(c,l,p,h)},0)):t.remove()})},X=function(e){return f.ie&&e.inline?document.body:e.getBody()},J=function(e,t,n){(function(e){return X(e)!==e.getBody()})(e)&&e.dom.bind(t,"paste keyup",function(t){ee(e,n)||e.fire("paste")})},Z=function(e){return e.dom.get("mcepastebin")},Q=function(e,t){return t===e},ee=function(e,t){var n,r=Z(e);return(n=r)&&"mcepastebin"===n.id&&Q(t,r.innerHTML)},te=function(t){var n=e(null);return{create:function(){return function(e,t,n){var r,o=e.dom,i=e.getBody();t.set(e.selection.getRng()),r=e.dom.add(X(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(f.ie||f.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),J(e,r,n),r.focus(),e.selection.select(r,!0)}(t,n,"%MCEPASTEBIN%")},remove:function(){return function(e,t){if(Z(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(t,n)},getEl:function(){return Z(t)},getHtml:function(){return function(e){var t,n,r,o,i,a=function(t,n){t.appendChild(n),e.dom.remove(n,!0)};for(n=m.grep(X(e).childNodes,function(e){return"mcepastebin"===e.id}),t=n.shift(),m.each(n,function(e){a(t,e)}),r=(o=e.dom.select("div[id=mcepastebin]",t)).length-1;r>=0;r--)i=e.dom.create("div"),t.insertBefore(i,o[r]),a(i,o[r]);return t?t.innerHTML:""}(t)},getLastRng:function(){return function(e){return e.get()}(n)},isDefault:function(){return ee(t,"%MCEPASTEBIN%")},isDefaultContent:function(e){return Q("%MCEPASTEBIN%",e)}}},ne=function(e,t){var n=te(e);return e.on("preInit",function(){return function(e,t,n){var r;K(e,t,n),e.parser.addNodeFilter("img",function(t,n,o){var i=function(e){e.attr("data-mce-object")||r===f.transparentSrc||e.remove()},a=function(e){return 0===e.indexOf("webkit-fake-url")},s=function(e){return 0===e.indexOf("data:")};if(!e.settings.paste_data_images&&function(e){return e.data&&!0===e.data.paste}(o))for(var c=t.length;c--;)(r=t[c].attributes.map.src)&&(a(r)?i(t[c]):!e.settings.allow_html_data_urls&&s(r)&&i(t[c]))})}(e,n,t)}),{pasteFormat:t,pasteHtml:function(t,n){return z(e,t,n)},pasteText:function(t){return U(e,t)},pasteImageData:function(t,n){return G(e,t,n)},getDataTransferItems:$,hasHtmlOrText:W,hasContentType:j}},re=function(){},oe=function(e,t,n){if(!function(e){return!1===f.iOS&&void 0!==e&&"function"==typeof e.setData&&!0!==E.isMsEdge()}(e))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(g.internalHtmlMime(),t),!0}catch(e){return!1}},ie=function(e,t,n,r){oe(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},ae=function(e){return function(t,n){var r=g.mark(t),o=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=e.dom.create("div",{contenteditable:"true"},r);e.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),e.dom.add(e.getBody(),o);var a=e.selection.getRng();i.focus();var s=e.dom.createRng();s.selectNodeContents(i),e.selection.setRng(s),setTimeout(function(){e.selection.setRng(a),o.parentNode.removeChild(o),n()},0)}},se=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},ce=function(e){e.on("cut",function(e){return function(t){!1===e.selection.isCollapsed()&&ie(t,se(e),ae(e),function(){setTimeout(function(){e.execCommand("Delete")},0)})}}(e)),e.on("copy",function(e){return function(t){!1===e.selection.isCollapsed()&&ie(t,se(e),ae(e),re)}}(e))},ue=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),le=function(e,t){return ue.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},fe=function(e,t){e.focus(),e.selection.setRng(t)},de=function(e,t,n){c.shouldBlockDrop(e)&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),c.shouldPasteDataImages(e)||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.on("drop",function(r){var o,i;if(i=le(e,r),!r.isDefaultPrevented()&&!n.get()){o=t.getDataTransferItems(r.dataTransfer);var a,s=t.hasContentType(o,g.internalHtmlMime());if((t.hasHtmlOrText(o)&&(!(a=o["text/plain"])||0!==a.indexOf("file://"))||!t.pasteImageData(r,i))&&i&&c.shouldFilterDrop(e)){var u=o["mce-internal"]||o["text/html"]||o["text/plain"];u&&(r.preventDefault(),d.setEditorTimeout(e,function(){e.undoManager.transact(function(){o["mce-internal"]&&e.execCommand("Delete"),fe(e,i),u=E.trimHtml(u),o["text/html"]?t.pasteHtml(u,s):t.pasteText(u)})}))}}}),e.on("dragstart",function(e){n.set(!0)}),e.on("dragover dragend",function(t){c.shouldPasteDataImages(e)&&!1===n.get()&&(t.preventDefault(),fe(e,le(e,t))),"dragend"===t.type&&n.set(!1)})},me=function(e){var t=e.plugins.paste,n=c.getPreProcess(e);n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=c.getPostProcess(e);r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})};function pe(e,t){e.on("PastePreProcess",function(n){n.content=t(e,n.content,n.internal,n.wordContent)})}function he(e,t){if(!A.isWordContent(t))return t;var n=[];m.each(e.schema.getBlockElements(),function(e,t){n.push(t)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return t=E.filter(t,[[r,"$1"]]),t=E.filter(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function ge(e,t,n,r){if(r||n)return t;var o,i=c.getWebkitStyles(e);if(!1===c.shouldRemoveWebKitStyles(e)||"all"===i)return t;if(i&&(o=i.split(/[, ]/)),o){var a=e.dom,s=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var i=a.parseStyle(a.decode(n)),c={};if("none"===o)return t+r;for(var u=0;u<o.length;u++){var l=i[o[u]],f=a.getStyle(s,o[u],!0);/color/.test(o[u])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(c[o[u]]=l)}return(c=a.serializeStyle(c,"span"))?t+' style="'+c+'"'+r:t+r})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function ve(e,t){e.$("a",t).find("font,u").each(function(t,n){e.dom.remove(n,!0)})}var be=function(e){f.webkit&&pe(e,ge),f.ie&&(pe(e,he),function(e,t){e.on("PastePostProcess",function(n){t(e,n.node)})}(e,ve))},ye=function(e,t,n){var r=n.control;r.active("text"===t.pasteFormat.get()),e.on("PastePlainTextToggle",function(e){r.active(e.state)})},xe=function(e,t){var n=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}}(ye,e,t);e.addButton("pastetext",{active:!1,icon:"pastetext",tooltip:"Paste as text",cmd:"mceTogglePlainTextPaste",onPostRender:n}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:t.pasteFormat,cmd:"mceTogglePlainTextPaste",onPostRender:n})};t.add("paste",function(t){if(!1===n(t)){var o=e(!1),i=e(!1),a=e(c.isPasteAsTextEnabled(t)?"text":"html"),s=ne(t,a),u=be(t);return xe(t,s),l(t,s,o),me(t),ce(t),de(t,s,i),r(s,u)}})}()},function(e,t,n){n(56)},function(e,t){!function(){"use strict";var e=function(e){e.addCommand("mcePrint",function(){e.getWin().print()})},t=function(e){e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("print",function(n){e(n),t(n),n.addShortcut("Meta+P","","mcePrint")})}()},function(e,t,n){n(58)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");function r(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var o={findAndReplaceDOMText:function(e,t,n,o,i){var a,s,c,u,l,f,d=[],m=0;function p(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(t>0){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(c=t.ownerDocument,u=i.getBlockElements(),l=i.getWhiteSpaceElements(),f=i.getShortEndedElements(),s=function e(t){var n;if(3===t.nodeType)return t.data;if(l[t.nodeName]&&!u[t.nodeName])return"";if(n="",r(t))return"\n";if((u[t.nodeName]||f[t.nodeName])&&(n+="\n"),t=t.firstChild)do{n+=e(t)}while(t=t.nextSibling);return n}(t)){if(e.global)for(;a=e.exec(s);)d.push(p(a,o));else a=s.match(e),d.push(p(a,o));return d.length&&(m=d.length,function(e,t,n){var o,i,a,s,c=[],d=0,m=e,p=t.shift(),h=0;e:for(;;){if((u[m.nodeName]||f[m.nodeName]||r(m))&&d++,3===m.nodeType&&(!i&&m.length+d>=p[1]?(i=m,s=p[1]-d):o&&c.push(m),!o&&m.length+d>p[0]&&(o=m,a=p[0]-d),d+=m.length),o&&i){if(m=n({startNode:o,startNodeIndex:a,endNode:i,endNodeIndex:s,innerNodes:c,match:p[2],matchIndex:h}),d-=i.length-s,o=null,i=null,c=[],h++,!(p=t.shift()))break}else if(l[m.nodeName]&&!u[m.nodeName]||!m.firstChild){if(m.nextSibling){m=m.nextSibling;continue}}else if(!r(m)){m=m.firstChild;continue}for(;;){if(m.nextSibling){m=m.nextSibling;break}if(m.parentNode===e)break e;m=m.parentNode}}}(t,d,function(e){var t;if("function"!=typeof e){var n=e.nodeType?e:c.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(c.createTextNode(e)),r}}else t=e;return function(e){var n,r,o,i=e.startNode,a=e.endNode,s=e.matchIndex;if(i===a){var u=i;o=u.parentNode,e.startNodeIndex>0&&(n=c.createTextNode(u.data.substring(0,e.startNodeIndex)),o.insertBefore(n,u));var l=t(e.match[0],s);return o.insertBefore(l,u),e.endNodeIndex<u.length&&(r=c.createTextNode(u.data.substring(e.endNodeIndex)),o.insertBefore(r,u)),u.parentNode.removeChild(u),l}n=c.createTextNode(i.data.substring(0,e.startNodeIndex)),r=c.createTextNode(a.data.substring(e.endNodeIndex));for(var f=t(i.data.substring(e.startNodeIndex),s),d=[],m=0,p=e.innerNodes.length;m<p;++m){var h=e.innerNodes[m],g=t(h.data,s);h.parentNode.replaceChild(g,h),d.push(g)}var v=t(a.data.substring(0,e.endNodeIndex),s);return(o=i.parentNode).insertBefore(n,i),o.insertBefore(f,i),o.removeChild(i),(o=a.parentNode).insertBefore(v,a),o.insertBefore(r,a),o.removeChild(a),v}}(n))),m}}},i=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},a=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},s=function(e,t){var r,o=[];if((r=n.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<r.length;a++){var s=i(r[a]);null!==s&&s.length&&s===t.toString()&&o.push(r[a])}return o},c=function(e,t,n){var r=t.get(),o=e.dom;(n=!1!==n)?r++:r--,o.removeClass(s(e,t.get()),"mce-match-marker-selected");var i=s(e,r);return i.length?(o.addClass(s(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},u=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},l=function(e,t){var n=c(e,t,!0);-1!==n&&t.set(n)},f=function(e,t){var n=c(e,t,!1);-1!==n&&t.set(n)},d=function(e){var t=i(e);return null!==t&&t.length>0},m=function(e,t,r){var o,s,c,u;for(s=n.toArray(e.getBody().getElementsByTagName("span")),o=0;o<s.length;o++){var l=i(s[o]);null!==l&&l.length&&(l===t.get().toString()&&(c||(c=s[o].firstChild),u=s[o].firstChild),a(s[o]))}if(c&&u){var f=e.dom.createRng();return f.setStart(c,0),f.setEnd(u,u.data.length),!1!==r&&e.selection.setRng(f),f}},p=function(e,t){return s(e,t.get()+1).length>0},h=function(e,t){return s(e,t.get()-1).length>0},g={done:m,find:function(e,t,n,r,i){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"\\s"),n=i?"\\b"+n+"\\b":n;var a=function(e,t,n){var r,i;return(i=e.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",r=e.getBody(),m(e,t,!1),o.findAndReplaceDOMText(n,r,i,!1,e.schema)}(e,t,new RegExp(n,r?"g":"gi"));return a&&(t.set(-1),t.set(c(e,t,!0))),a},next:l,prev:f,replace:function(e,t,r,o,s){var c,m,g,v,b,y,x=t.get();for(o=!1!==o,g=e.getBody(),m=n.grep(n.toArray(g.getElementsByTagName("span")),d),c=0;c<m.length;c++){var w=i(m[c]);if(v=b=parseInt(w,10),s||v===t.get()){for(r.length?(m[c].firstChild.nodeValue=r,a(m[c])):u(e.dom,m[c]);m[++c];){if((v=parseInt(i(m[c]),10))!==b){c--;break}u(e.dom,m[c])}o&&x--}else b>t.get()&&m[c].setAttribute("data-mce-index",b-1)}return t.set(x),o?(y=p(e,t),l(e,t)):(y=h(e,t),f(e,t)),!s&&y},hasNext:p,hasPrev:h},v=function(e,t){return{done:function(n){return g.done(e,t,n)},find:function(n,r,o){return g.find(e,t,n,r,o)},next:function(){return g.next(e,t)},prev:function(){return g.prev(e,t)},replace:function(n,r,o){return g.replace(e,t,n,r,o)}}},b=function(e,t){var r,o={};function i(){s.statusbar.find("#next").disabled(!1===g.hasNext(e,t)),s.statusbar.find("#prev").disabled(!1===g.hasPrev(e,t))}function a(){e.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}e.undoManager.add(),r=n.trim(e.selection.getContent({format:"text"}));var s=e.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){e.focus(),g.done(e,t),e.undoManager.add()},onSubmit:function(n){var r,c,u,l;return n.preventDefault(),c=s.find("#case").checked(),l=s.find("#words").checked(),(u=s.find("#find").value()).length?o.text===u&&o.caseState===c&&o.wholeWord===l?g.hasNext(e,t)?(g.next(e,t),void i()):void a():((r=g.find(e,t,u,c,l))||a(),s.statusbar.items().slice(1).disabled(0===r),i(),void(o={text:u,caseState:c,wholeWord:l})):(g.done(e,t,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){g.replace(e,t,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),t.set(-1),o={})}},{text:"Replace all",disabled:!0,onclick:function(){g.replace(e,t,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),o={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){g.prev(e,t),i()}},{text:"Next",name:"next",disabled:!0,onclick:function(){g.next(e,t),i()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:r},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},y=function(e,t){e.addCommand("SearchReplace",function(){b(e,t)})},x=function(e,t){return function(){b(e,t)}},w=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:x(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:x(e,t)}),e.shortcuts.add("Meta+F","",x(e,t))};t.add("searchreplace",function(t){var n=e(-1);return y(t,n),w(t,n),v(t,n)})}()},function(e,t,n){n(60)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),s={getTabFocus:function(e){return e.getParam("tab_focus",function(e){return e.getParam("tabfocus_elements",":prev,:next")}(e))}},c=t.DOM,u=function(e){e.keyCode!==a.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},l=function(e){function t(t){var u,l,f,d;if(!(t.keyCode!==a.TAB||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented())&&(1===(f=i.explode(s.getTabFocus(e))).length&&(f[1]=f[0],f[0]=":prev"),l=t.shiftKey?":prev"===f[0]?p(-1):c.get(f[0]):":next"===f[1]?p(1):c.get(f[1]))){var m=n.get(l.id||l.name);l.id&&m?m.focus():o.setTimeout(function(){r.webkit||window.focus(),l.focus()},10),t.preventDefault()}function p(r){function o(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&n.get(t.id)&&-1!==e.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(e)}if(l=c.select(":input:enabled,*[tabindex]:not(iframe)"),i.each(l,function(t,n){if(t.id===e.id)return u=n,!1}),r>0){for(d=u+1;d<l.length;d++)if(o(l[d]))return l[d]}else for(d=u-1;d>=0;d--)if(o(l[d]))return l[d];return null}}e.on("init",function(){e.inline&&c.setAttrib(e.getBody(),"tabIndex",null),e.on("keyup",u),r.gecko?e.on("keypress keydown",t):e.on("keydown",t)})};e.add("tabfocus",function(e){l(e)})}()},function(e,t,n){n(62)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=tinymce.util.Tools.resolve("tinymce.util.XHR"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(e){return e.getParam("template_cdate_classes","cdate")},i=function(e){return e.getParam("template_mdate_classes","mdate")},a=function(e){return e.getParam("template_selected_content_classes","selcontent")},s=function(e){return e.getParam("template_preview_replace_values")},c=function(e){return e.getParam("template_replace_values")},u=function(e){return e.templates},l=function(e){return e.getParam("template_cdate_format",e.getLang("template.cdate_format"))},f=function(e){return e.getParam("template_mdate_format",e.getLang("template.mdate_format"))},d=function(e){return e.getParam("template_popup_width",600)},m=function(e){return Math.min(r.DOM.getViewPort().h,e.getParam("template_popup_height",500))},p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},h=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),a="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(a[n.getMonth()]))).replace("%b",""+e.translate(i[n.getMonth()]))).replace("%A",""+e.translate(o[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},g=function(e,n,r){return t.each(r,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},v=function(e,n){var r=e.dom,o=c(e);t.each(r.select("*",n),function(e){t.each(o,function(t,n){r.hasClass(e,n)&&"function"==typeof o[n]&&o[n](e)})})},b=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},y=function(e,t){return function(){var r=u(e);"function"!=typeof r?"string"==typeof r?n.send({url:r,success:function(e){t(JSON.parse(e))}}):t(r):r(t)}},x=g,w=v,C=function(e,n,r){var s,u,d=e.dom,m=e.selection.getContent();r=g(0,r,c(e)),s=d.create("div",null,r),(u=d.select(".mceTmpl",s))&&u.length>0&&(s=d.create("div",null)).appendChild(u[0].cloneNode(!0)),t.each(d.select("*",s),function(t){b(t,o(e).replace(/\s+/g,"|"))&&(t.innerHTML=h(e,l(e))),b(t,i(e).replace(/\s+/g,"|"))&&(t.innerHTML=h(e,f(e))),b(t,a(e).replace(/\s+/g,"|"))&&(t.innerHTML=m)}),v(e,s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()},k=function(e){e.addCommand("mceInsertTemplate",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}}(C,e))},T=function(e){e.on("PreProcess",function(n){var r=e.dom,o=f(e);t.each(r.select("div",n.node),function(n){r.hasClass(n,"mceTmpl")&&(t.each(r.select("*",n),function(t){r.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=h(e,o))}),w(e,n))})})},_=function(e,n,r){if(-1===r.indexOf("<html>")){var o="";t.each(e.contentCSS,function(t){o+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var i=e.settings.body_class||"";-1!==i.indexOf("=")&&(i=(i=e.getParam("body_class","","hash"))[e.id]||""),r="<!DOCTYPE html><html><head>"+o+'</head><body class="'+i+'">'+r+"</body></html>"}r=x(e,r,s(e));var a=n.find("iframe")[0].getEl().contentWindow.document;a.open(),a.write(r),a.close()},E=function(e,r){var o,i,a=[];if(r&&0!==r.length)t.each(r,function(e){a.push({selected:!a.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),(o=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:a,onselect:function(t){var r=t.control.value();r.url?n.send({url:r.url,success:function(t){_(e,o,i=t)}}):(i=r.content,_(e,o,i)),o.find("#description")[0].text(t.control.value().description)}}}]},{type:"label",name:"description",label:"Description",text:""},{type:"iframe",flex:1,border:1}],onsubmit:function(){C(e,!1,i)},minWidth:d(e),minHeight:m(e)})).find("listbox")[0].fire("select");else{var s=e.translate("No templates defined.");e.notificationManager.open({text:s,type:"info"})}},S=function(e){return function(t){E(e,t)}},N=function(e){e.addButton("template",{title:"Insert template",onclick:y(e.settings,S(e))}),e.addMenuItem("template",{text:"Template",onclick:y(e.settings,S(e)),icon:"template",context:"insert"})};e.add("template",function(e){N(e),k(e),T(e)})}()},function(e,t,n){n(64)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{setPatterns:function(t){e.set(t)},getPatterns:function(){return e.get()}}},r=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"***",end:"***",format:["bold","italic"]},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],o=function(e){return void 0!==e.textpattern_patterns?e.textpattern_patterns:r},i=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),s=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(e,t,n,r){return t.substr(n-e.end.length-r,e.end.length)===e.end},l=function(e,t,n){return e-t-n.end.length-n.start.length>0},f=function(e,t){for(var n=0;n<e.length;n++)if(0===t.indexOf(e[n].start)&&(!e[n].end||t.lastIndexOf(e[n].end)===t.length-e[n].end.length))return e[n]},d=function(e,t,n,r){var o,i,a=function(e){return e.sort(function(e,t){return e.start.length>t.start.length?-1:e.start.length<t.start.length?1:0})}(e);for(i=0;i<a.length;i++)if(void 0!==(o=a[i]).end&&u(o,t,n,r)&&l(n,r,o))return o},m=function(e,t,n){if(!1!==t.collapsed){var r=t.startContainer,o=r.data,i=!0===n?1:0;if(3===r.nodeType){var a=d(e,o,t.startOffset,i);if(void 0!==a){var s=o.lastIndexOf(a.end,t.startOffset-i),c=o.lastIndexOf(a.start,s-a.end.length);if(s=o.indexOf(a.end,c+a.start.length),-1!==c){var u=document.createRange();u.setStart(r,c),u.setEnd(r,s+a.end.length);var l=f(e,u.toString());if(!(void 0===a||l!==a||r.data.length<=a.start.length+a.end.length))return{pattern:a,startOffset:c,endOffset:s}}}}}},p=function(e,t,n){var r=e.selection.getRng(!0),o=m(t,r,n);if(o)return function(e,t,n,r){var o=c.isArray(n.pattern.format)?n.pattern.format:[n.pattern.format];if(0!==c.grep(o,function(t){var n=e.formatter.get(t);return n&&n[0].inline}).length)return e.undoManager.transact(function(){t=function(e,t,n,r,o){return(e=r>0?e.splitText(r):e).splitText(n-r+t.end.length),e.deleteData(0,t.start.length),e.deleteData(e.data.length-t.end.length,t.end.length),e}(t,n.pattern,n.endOffset,n.startOffset),o.forEach(function(n){e.formatter.apply(n,{},t)})}),t}(e,r.startContainer,o)},h={patternFromRng:m,applyInlineFormatSpace:function(e,t){return p(e,t,!0)},applyInlineFormatEnter:function(e,t){return p(e,t,!1)},applyBlockFormat:function(e,t){var n,r,o,i,a,u,l,d,m,p,h;if(n=e.selection,r=e.dom,n.isCollapsed()&&(l=r.getParent(n.getStart(),"p"))){for(m=new s(l,l);a=m.next();)if(3===a.nodeType){i=a;break}if(i){if(!(d=f(t,i.data)))return;if(o=(p=n.getRng(!0)).startContainer,h=p.startOffset,i===o&&(h=Math.max(0,h-d.start.length)),c.trim(i.data).length===d.start.length)return;d.format&&(u=e.formatter.get(d.format))&&u[0].block&&(i.deleteData(0,d.start.length),e.formatter.apply(d.format,{},i),p.setStart(o,h),p.collapse(!0),n.setRng(p)),d.cmd&&e.undoManager.transact(function(){i.deleteData(0,d.start.length),e.execCommand(d.cmd)})}}}},g=function(e,t,n){for(var r=0;r<e.length;r++)if(n(e[r],t))return!0},v={handleEnter:function(e,t){var n,r;(n=h.applyInlineFormatEnter(e,t))&&((r=e.dom.createRng()).setStart(n,n.data.length),r.setEnd(n,n.data.length),e.selection.setRng(r)),h.applyBlockFormat(e,t)},handleInlineKey:function(e,t){var n,r,o,i,a;(n=h.applyInlineFormatSpace(e,t))&&(a=e.dom,r=n.data.slice(-1),/[\u00a0 ]/.test(r)&&(n.deleteData(n.data.length-1,1),o=a.doc.createTextNode(r),a.insertAfter(o,n.parentNode),(i=a.createRng()).setStart(o,1),i.setEnd(o,1),e.selection.setRng(i)))},checkCharCode:function(e,t){return g(e,t,function(e,t){return e.charCodeAt(0)===t.charCode})},checkKeyCode:function(e,t){return g(e,t,function(e,t){return e===t.keyCode&&!1===a.modifierPressed(t)})}},b=function(e,t){var n=[",",".",";",":","!","?"],r=[32];e.on("keydown",function(n){13!==n.keyCode||a.modifierPressed(n)||v.handleEnter(e,t.get())},!0),e.on("keyup",function(n){v.checkKeyCode(r,n)&&v.handleInlineKey(e,t.get())}),e.on("keypress",function(r){v.checkCharCode(n,r)&&i.setEditorTimeout(e,function(){v.handleInlineKey(e,t.get())})})};t.add("textpattern",function(t){var r=e(o(t.settings));return b(t,r),n(r)})}()},function(e,t,n){n(66)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e,t){e.fire("VisualBlocks",{state:t})},r=function(e){return e.getParam("visualblocks_default_state",!1)},o=function(e){return e.settings.visualblocks_content_css},i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=i.DOM.uniqueId(),c=function(e,t){var n=a.toArray(e.getElementsByTagName("link"));if(0===a.grep(n,function(e){return e.id===s}).length){var r=i.DOM.create("link",{id:s,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(r)}},u=function(e,t,r){var i=e.dom,a=o(e);c(e.getDoc(),a||t+"/css/visualblocks.css"),i.toggleClass(e.getBody(),"mce-visualblocks"),r.set(!r.get()),n(e,r.get())},l=function(e,t,n){e.addCommand("mceVisualBlocks",function(){u(e,t,n)})},f=function(e,t,n){e.on("PreviewFormats AfterPreviewFormats",function(t){n.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),e.on("init",function(){r(e)&&u(e,t,n)}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")})},d=function(e,t){return function(n){var r=n.control;r.active(t.get()),e.on("VisualBlocks",function(e){r.active(e.state)})}},m=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:d(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:d(e,t),selectable:!0,context:"view",prependToContext:!0})};t.add("visualblocks",function(t,n){var r=e(!1);l(t,n,r),m(t,r),f(t,n,r)})}()},function(e,t,n){n(68)},function(e,t){!function(){"use strict";var e=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},t=function(e){var t=e.selection.getNode();return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")?t.id||t.name:""},n=function(e,t){var n=e.selection.getNode();"A"===n.tagName&&""===e.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=t,e.undoManager.add()):(e.focus(),e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t})))},r=function(r){var o=t(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:o},onsubmit:function(t){var o=t.data.id;(function(t,r){return e(r)?(n(t,r),!1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!0)})(r,o)&&t.preventDefault()}})},o=function(e){e.addCommand("mceAnchor",function(){r(e)})},i=function(e){return function(t){for(var n=0;n<t.length;n++)(r=t[n]).attr("href")||!r.attr("id")&&!r.attr("name")||r.firstChild||t[n].attr("contenteditable",e);var r}},a=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("a",i("false")),e.serializer.addNodeFilter("a",i(null))})},s=function(e){e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("anchor",function(e){a(e),o(e),s(e)})}()},function(e,t,n){n(70)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(e){return parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10)},i=function(e){return parseInt(e.getParam("autoresize_max_height",0),10)},a=function(e){return e.getParam("autoresize_overflow_padding",1)},s=function(e){return e.getParam("autoresize_bottom_margin",50)},c=function(e){return e.getParam("autoresize_on_init",!0)},u=function(e,t,n,o,i){r.setEditorTimeout(e,function(){f(e,t),n--?u(e,t,n,o,i):i&&i()},o)},l=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},f=function(e,t){var r,a,s,c,u,d,m,p,h,g,v,b=e.dom;if(a=e.getDoc())if(function(e){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}(e))l(e,!0);else{s=a.body,c=o(e),d=b.getStyle(s,"margin-top",!0),m=b.getStyle(s,"margin-bottom",!0),p=b.getStyle(s,"padding-top",!0),h=b.getStyle(s,"padding-bottom",!0),g=b.getStyle(s,"border-top-width",!0),v=b.getStyle(s,"border-bottom-width",!0),u=s.offsetHeight+parseInt(d,10)+parseInt(m,10)+parseInt(p,10)+parseInt(h,10)+parseInt(g,10)+parseInt(v,10),(isNaN(u)||u<=0)&&(u=n.ie?s.scrollHeight:n.webkit&&0===s.clientHeight?0:s.offsetHeight),u>o(e)&&(c=u);var y=i(e);y&&u>y?(c=y,l(e,!0)):l(e,!1),c!==t.get()&&(r=c-t.get(),b.setStyle(e.iframeElement,"height",c+"px"),t.set(c),n.webkit&&r<0&&f(e,t))}},d={setup:function(e,t){e.on("init",function(){var t,n,r=e.dom;t=a(e),n=s(e),!1!==t&&r.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t}),!1!==n&&r.setStyles(e.getBody(),{paddingBottom:n})}),e.on("nodechange setcontent keyup FullscreenStateChanged",function(n){f(e,t)}),c(e)&&e.on("init",function(){u(e,t,20,100,function(){u(e,t,5,1e3)})})},resize:f},m=function(e,t){e.addCommand("mceAutoResize",function(){d.resize(e,t)})};t.add("autoresize",function(t){if(!t.inline){var n=e(0);m(t,n),d.setup(t,n)}})}()},function(e,t,n){n(72)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e){e=t.trim(e);var n=function(t,n){e=e.replace(t,n)};return n(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),n(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),n(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),n(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),n(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),n(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),n(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),n(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),n(/<font>(.*?)<\/font>/gi,"$1"),n(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),n(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),n(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),n(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),n(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),n(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),n(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),n(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),n(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),n(/<\/(strong|b)>/gi,"[/b]"),n(/<(strong|b)>/gi,"[b]"),n(/<\/(em|i)>/gi,"[/i]"),n(/<(em|i)>/gi,"[i]"),n(/<\/u>/gi,"[/u]"),n(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),n(/<u>/gi,"[u]"),n(/<blockquote[^>]*>/gi,"[quote]"),n(/<\/blockquote>/gi,"[/quote]"),n(/<br \/>/gi,"\n"),n(/<br\/>/gi,"\n"),n(/<br>/gi,"\n"),n(/<p>/gi,""),n(/<\/p>/gi,"\n"),n(/&nbsp;|\u00a0/gi," "),n(/&quot;/gi,'"'),n(/&lt;/gi,"<"),n(/&gt;/gi,">"),n(/&amp;/gi,"&"),e},r=function(e){e=t.trim(e);var n=function(t,n){e=e.replace(t,n)};return n(/\n/gi,"<br />"),n(/\[b\]/gi,"<strong>"),n(/\[\/b\]/gi,"</strong>"),n(/\[i\]/gi,"<em>"),n(/\[\/i\]/gi,"</em>"),n(/\[u\]/gi,"<u>"),n(/\[\/u\]/gi,"</u>"),n(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),n(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),n(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),n(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),n(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),n(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),e};e.add("bbcode",function(){return{init:function(e){e.on("beforeSetContent",function(e){e.content=r(e.content)}),e.on("postProcess",function(e){e.set&&(e.content=r(e.content)),e.get&&(e.content=n(e.content))})}}})}()},function(e,t,n){n(74)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=function(e){return e.getParam("code_dialog_width",600)},r=function(e){return e.getParam("code_dialog_height",Math.min(t.DOM.getViewPort().h-200,500))},o=function(e,t){e.focus(),e.undoManager.transact(function(){e.setContent(t)}),e.selection.setCursorLocation(),e.nodeChanged()},i=function(e){return e.getContent({source_view:!0})},a=function(e){var t=n(e),a=r(e);e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:a,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){o(e,t.data.code)}}).find("#code").value(i(e))},s=function(e){e.addCommand("mceCodeEditor",function(){a(e)})},c=function(e){e.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){a(e)}}),e.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){a(e)}})};e.add("code",function(e){return s(e),c(e),{}})}()},function(e,t,n){n(76)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Color"),n=function(e,t){e.find("#preview")[0].getEl().style.background=t},r=function(e,r){var o=t(r),i=o.toRgb();e.fromJSON({r:i.r,g:i.g,b:i.b,hex:o.toHex().substr(1)}),n(e,o.toHex())},o=function(e,t,o){var i=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:o,onchange:function(){var e=this.rgb();i&&(i.find("#r").value(e.r),i.find("#g").value(e.g),i.find("#b").value(e.b),i.find("#hex").value(this.value().substr(1)),n(i,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,t,n=i.find("colorpicker")[0];if(e=this.name(),t=this.value(),"hex"===e)return r(i,t="#"+t),void n.value(t);t={r:i.find("#r").value(),g:i.find("#g").value(),b:i.find("#b").value()},n.value(t),r(i,t)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){t("#"+i.toJSON().hex)}});r(i,o)};e.add("colorpicker",function(e){e.settings.color_picker_callback||(e.settings.color_picker_callback=function(t,n){o(e,t,n)})})}()},function(e,t,n){n(78)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e,n){var r,o=e.dom,i=e.selection.getSelectedBlocks();i.length&&(r=o.getAttrib(i[0],"dir"),t.each(i,function(e){o.getParent(e.parentNode,'*[dir="'+n+'"]',o.getRoot())||o.setAttrib(e,"dir",r!==n?n:null)}),e.nodeChanged())},r=function(e){e.addCommand("mceDirectionLTR",function(){n(e,"ltr")}),e.addCommand("mceDirectionRTL",function(){n(e,"rtl")})},o=function(e){var n=[];return t.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){n.push(t+"[dir="+e+"]")}),n.join(",")},i=function(e){e.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:o("ltr")}),e.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:o("rtl")})};e.add("directionality",function(e){r(e),i(e)})}()},function(e,t,n){n(80)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=tinymce.util.Tools.resolve("tinymce.html.DomParser"),o=tinymce.util.Tools.resolve("tinymce.html.Node"),i=tinymce.util.Tools.resolve("tinymce.html.Serializer"),a=function(e){return e.getParam("fullpage_hide_in_source_view")},s=function(e){return e.getParam("fullpage_default_xml_pi")},c=function(e){return e.getParam("fullpage_default_encoding")},u=function(e){return e.getParam("fullpage_default_font_family")},l=function(e){return e.getParam("fullpage_default_font_size")},f=function(e){return e.getParam("fullpage_default_text_color")},d=function(e){return e.getParam("fullpage_default_title")},m=function(e){return e.getParam("fullpage_default_doctype","<!DOCTYPE html>")},p=function(e){return r({validate:!1,root_name:"#document"}).parse(e)},h=p,g=function(e,t){var r,o,i=p(t),a={};function s(e,t){return e.attr(t)||""}return a.fontface=u(e),a.fontsize=l(e),7===(r=i.firstChild).type&&(a.xml_pi=!0,(o=/encoding="([^"]+)"/.exec(r.value))&&(a.docencoding=o[1])),(r=i.getAll("#doctype")[0])&&(a.doctype="<!DOCTYPE"+r.value+">"),(r=i.getAll("title")[0])&&r.firstChild&&(a.title=r.firstChild.value),n.each(i.getAll("meta"),function(e){var t,n=e.attr("name"),r=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"===r&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),(r=i.getAll("html")[0])&&(a.langcode=s(r,"lang")||s(r,"xml:lang")),a.stylesheets=[],n.each(i.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),(r=i.getAll("body")[0])&&(a.langdir=s(r,"dir"),a.style=s(r,"style"),a.visited_color=s(r,"vlink"),a.link_color=s(r,"link"),a.active_color=s(r,"alink")),a},v=function(e,t,r){var a,s,c,u,l,f=e.dom;function d(e,t,n){e.attr(t,n||void 0)}function m(e){s.firstChild?s.insert(e,s.firstChild):s.append(e)}a=p(r),(s=a.getAll("head")[0])||(u=a.getAll("html")[0],s=new o("head",1),u.firstChild?u.insert(s,u.firstChild,!0):u.append(s)),u=a.firstChild,t.xml_pi?(l='version="1.0"',t.docencoding&&(l+=' encoding="'+t.docencoding+'"'),7!==u.type&&(u=new o("xml",7),a.insert(u,a.firstChild,!0)),u.value=l):u&&7===u.type&&u.remove(),u=a.getAll("#doctype")[0],t.doctype?(u||(u=new o("#doctype",10),t.xml_pi?a.insert(u,a.firstChild):m(u)),u.value=t.doctype.substring(9,t.doctype.length-1)):u&&u.remove(),u=null,n.each(a.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(u=e)}),t.docencoding?(u||((u=new o("meta",1)).attr("http-equiv","Content-Type"),u.shortEnded=!0,m(u)),u.attr("content","text/html; charset="+t.docencoding)):u&&u.remove(),u=a.getAll("title")[0],t.title?(u?u.empty():m(u=new o("title",1)),u.append(new o("#text",3)).value=t.title):u&&u.remove(),n.each("keywords,description,author,copyright,robots".split(","),function(e){var n,r,i=a.getAll("meta"),s=t[e];for(n=0;n<i.length;n++)if((r=i[n]).attr("name")===e)return void(s?r.attr("content",s):r.remove());s&&((u=new o("meta",1)).attr("name",e),u.attr("content",s),u.shortEnded=!0,m(u))});var h={};return n.each(a.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(h[e.attr("href")]=e)}),n.each(t.stylesheets,function(e){h[e]||((u=new o("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),u.shortEnded=!0,m(u)),delete h[e]}),n.each(h,function(e){e.remove()}),(u=a.getAll("body")[0])&&(d(u,"dir",t.langdir),d(u,"style",t.style),d(u,"vlink",t.visited_color),d(u,"link",t.link_color),d(u,"alink",t.active_color),f.setAttribs(e.getBody(),{style:t.style,dir:t.dir,vLink:t.visited_color,link:t.link_color,aLink:t.active_color})),(u=a.getAll("html")[0])&&(d(u,"lang",t.langcode),d(u,"xml:lang",t.langcode)),s.firstChild||s.remove(),(c=i({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(a)).substring(0,c.indexOf("</body>"))},b=function(e,t){var r=g(e,t.get());e.windowManager.open({title:"Document properties",data:r,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(o){var i=v(e,n.extend(r,o.data),t.get());t.set(i)}})},y=function(e,t){e.addCommand("mceFullPageProperties",function(){b(e,t)})},x=function(e,t){return n.each(e,function(e){t=t.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),t},w=function(e){return e.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)})},C=n.each,k=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},T=function(e){var t,n="",r="";if(s(e)){var o=c(e);n+='<?xml version="1.0" encoding="'+(o||"ISO-8859-1")+'" ?>\n'}return n+=m(e),n+="\n<html>\n<head>\n",(t=d(e))&&(n+="<title>"+t+"</title>\n"),(t=c(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=u(e))&&(r+="font-family: "+t+";"),(t=l(e))&&(r+="font-size: "+t+";"),(t=f(e))&&(r+="color: "+t+";"),n+="</head>\n<body"+(r?' style="'+r+'"':"")+">\n"},_=function(e,t,r){e.on("BeforeSetContent",function(o){!function(e,t,r,o){var i,s,c,u,l,f="",d=e.dom;if(!(o.selection||(c=x(e.settings.protect,o.content),"raw"===o.format&&t.get()||o.source_view&&a(e)))){0!==c.length||o.source_view||(c=n.trim(t.get())+"\n"+n.trim(c)+"\n"+n.trim(r.get())),-1!==(i=(c=c.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=c.indexOf(">",i),t.set(k(c.substring(0,i+1))),-1===(s=c.indexOf("</body",i))&&(s=c.length),o.content=n.trim(c.substring(i+1,s)),r.set(k(c.substring(s)))):(t.set(T(e)),r.set("\n</body>\n</html>")),u=h(t.get()),C(u.getAll("style"),function(e){e.firstChild&&(f+=e.firstChild.value)}),(l=u.getAll("body")[0])&&d.setAttribs(e.getBody(),{style:l.attr("style")||"",dir:l.attr("dir")||"",vLink:l.attr("vlink")||"",link:l.attr("link")||"",aLink:l.attr("alink")||""}),d.remove("fullpage_styles");var m=e.getDoc().getElementsByTagName("head")[0];f&&(d.add(m,"style",{id:"fullpage_styles"},f),(l=d.get("fullpage_styles")).styleSheet&&(l.styleSheet.cssText=f));var p={};n.each(m.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(p[e.href]=e)}),n.each(u.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;p[t]||"stylesheet"!==e.attr("rel")||d.add(m,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete p[t]}),n.each(p,function(e){e.parentNode.removeChild(e)})}}(e,t,r,o)}),e.on("GetContent",function(o){!function(e,t,r,o){o.selection||o.source_view&&a(e)||(o.content=w(n.trim(t)+"\n"+n.trim(o.content)+"\n"+n.trim(r)))}(e,t.get(),r.get(),o)})},E=function(e){e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"})};t.add("fullpage",function(t){var n=e(""),r=e("");y(t,n),E(t),_(t,n,r)})}()},function(e,t,n){n(82)},function(e,t){!function(){"use strict";var e,t,n,r,o,i,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(e){return function(){return e}},c=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}},u=s(!1),l=s(!0),f=function(){return d},d=(r={fold:function(e,t){return e()},is:u,isSome:u,isNone:l,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:u,forall:l,filter:f,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(r),r),m=function(e){var t=function(){return e},n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:u,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return m(t(e))},ap:function(t){return t.fold(f,function(t){return m(t(e))})},each:function(t){t(e)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(e)?o:d},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(u,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},p={some:m,none:f,from:function(e){return null===e||void 0===e?d:m(e)}},h=(o="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===o}),g=void 0===(i=Array.prototype.indexOf)?function(e,t){return y(e,t)}:function(e,t){return i.call(e,t)},v=function(e,t){return g(e,t)>-1},b=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},y=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},x=(Array.prototype.slice,h(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.I18n")),w=tinymce.util.Tools.resolve("tinymce.Env"),C=w.mac?"?":"Ctrl",k=w.mac?"Ctrl + Alt":"Shift + Alt",T={shortcuts:[{shortcut:C+" + B",action:"Bold"},{shortcut:C+" + I",action:"Italic"},{shortcut:C+" + U",action:"Underline"},{shortcut:C+" + A",action:"Select all"},{shortcut:C+" + Y or "+C+" + Shift + Z",action:"Redo"},{shortcut:C+" + Z",action:"Undo"},{shortcut:k+" + 1",action:"Header 1"},{shortcut:k+" + 2",action:"Header 2"},{shortcut:k+" + 3",action:"Header 3"},{shortcut:k+" + 4",action:"Header 4"},{shortcut:k+" + 5",action:"Header 5"},{shortcut:k+" + 6",action:"Header 6"},{shortcut:k+" + 7",action:"Paragraph"},{shortcut:k+" + 8",action:"Div"},{shortcut:k+" + 9",action:"Address"},{shortcut:"Alt + F9",action:"Focus to menubar"},{shortcut:"Alt + F10",action:"Focus to toolbar"},{shortcut:"Alt + F11",action:"Focus to element path"},{shortcut:"Ctrl + Shift + P > Ctrl + Shift + P",action:"Focus to contextual toolbar"},{shortcut:C+" + K",action:"Insert link (if link plugin activated)"},{shortcut:C+" + S",action:"Save (if save plugin activated)"},{shortcut:C+" + F",action:"Find (if searchreplace plugin activated)"}]},_=function(){var e=b(T.shortcuts,function(e){return'<tr data-mce-tabstop="1" tabindex="-1" '+function(e){return'aria-label="Action: '+e.action+", Shortcut: "+e.shortcut.replace(/Ctrl/g,"Control")+'"'}(e)+"><td>"+x.translate(e.action)+"</td><td>"+e.shortcut+"</td></tr>"}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'<div><table class="mce-table-striped"><thead><th>'+x.translate("Action")+"</th><th>"+x.translate("Shortcut")+"</th></thead>"+e+"</table></div>"}]}},E=Object.keys,S=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"compat3x",name:"3.x Compatibility"},{key:"contextmenu",name:"Context Menu"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"}],N=c(function(e,t){return e.replace(/\$\{([^{}]*)\}/g,function(e,n){var r,o=t[n];return"string"==(r=typeof o)||"number"===r?o.toString():e})},'<a href="${url}" target="_blank" rel="noopener">${name}</a>'),R=function(e,t){return function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return p.some(o)}return p.none()}(S,function(e){return e.key===t}).fold(function(){var n=e.plugins[t].getMetadata;return"function"==typeof n?N(n()):t},function(e){return N({name:e.name,url:"https://www.tinymce.com/docs/plugins/"+e.key})})},A=function(e){var t=function(e){var t,n=E(e.plugins);return void 0===e.settings.forced_plugins?n:function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n}(n,(t=c(v,e.settings.forced_plugins),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,arguments)}))}(e),n=b(t,function(t){return"<li>"+R(e,t)+"</li>"}),r=n.length,o=n.join("");return"<p><b>"+x.translate(["Plugins installed ({0}):",r])+"</b></p><ul>"+o+"</ul>"},D=function(e){return{title:"Plugins",type:"container",style:"overflow-y: auto; overflow-x: hidden;",layout:"flex",padding:10,spacing:10,items:[function(e){return{type:"container",html:'<div style="overflow-y: auto; overflow-x: hidden; max-height: 230px; height: 230px;" data-mce-tabstop="1" tabindex="-1">'+A(e)+"</div>",flex:1}}(e),{type:"container",html:'<div style="padding: 10px; background: #e3e7f4; height: 100%;" data-mce-tabstop="1" tabindex="-1"><p><b>'+x.translate("Premium plugins:")+'</b></p><ul><li>PowerPaste</li><li>Spell Checker Pro</li><li>Accessibility Checker</li><li>Advanced Code Editor</li><li>Enhanced Media Embed</li><li>Link Checker</li></ul><br /><p style="float: right;"><a href="https://www.tinymce.com/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+x.translate("Learn more...")+"</a></p></div>",flex:1}]}},O=tinymce.util.Tools.resolve("tinymce.EditorManager"),P=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=O.majorVersion,t=O.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return[{type:"label",html:x.translate(["You are using {0}",n])},{type:"spacer",flex:1},{text:"Close",onclick:function(){this.parent().parent().close()}}]},I=function(e,t){return function(){e.windowManager.open({title:"Help",bodyType:"tabpanel",layout:"flex",body:[_(),D(e)],buttons:P(),onPostRender:function(){this.getEl("title").innerHTML='<img src="'+t+'/img/logo.png" alt="TinyMCE Logo" style="display: inline-block; width: 200px; height: 50px">'}})}},B=function(e,t){e.addCommand("mceHelp",I(e,t))},M=function(e,t){e.addButton("help",{icon:"help",onclick:I(e,t)}),e.addMenuItem("help",{text:"Help",icon:"help",context:"help",onclick:I(e,t)})};a.add("help",function(e,t){M(e,t),B(e,t),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")})}()},function(e,t,n){n(84)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t={hasDimensions:function(e){return!1!==e.settings.image_dimensions},hasAdvTab:function(e){return!0===e.settings.image_advtab},getPrependUrl:function(e){return e.getParam("image_prepend_url","")},getClassList:function(e){return e.getParam("image_class_list")},hasDescription:function(e){return!1!==e.settings.image_description},hasImageTitle:function(e){return!0===e.settings.image_title},hasImageCaption:function(e){return!0===e.settings.image_caption},getImageList:function(e){return e.getParam("image_list",!1)},hasUploadUrl:function(e){return e.getParam("images_upload_url",!1)},hasUploadHandler:function(e){return e.getParam("images_upload_handler",!1)},getUploadUrl:function(e){return e.getParam("images_upload_url")},getUploadHandler:function(e){return e.getParam("images_upload_handler")},getUploadBasePath:function(e){return e.getParam("images_upload_base_path")},getUploadCredentials:function(e){return e.getParam("images_upload_credentials")}},n="undefined"!=typeof window?window:Function("return this;")(),r=function(e,t){return function(e,t){for(var r=void 0!==t&&null!==t?t:n,o=0;o<e.length&&void 0!==r&&null!==r;++o)r=r[e[o]];return r}(e.split("."),t)},o={getOrDie:function(e,t){var n=function(e,t){return r(e,t)}(e,t);if(void 0===n||null===n)throw e+" not available on this browser";return n}};function i(){return new(o.getOrDie("FileReader"))}var a,s=tinymce.util.Tools.resolve("tinymce.util.Promise"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},f={getImageSize:function(e,t){var n=document.createElement("img");function r(e,r){n.parentNode&&n.parentNode.removeChild(n),t({width:e,height:r})}n.onload=function(){r(l(n.width,n.clientWidth),l(n.height,n.clientHeight))},n.onerror=function(){r(0,0)};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=e},buildListItems:function(e,t,n){return function e(n,r){return r=r||[],c.each(n,function(n){var o={text:n.text||n.title};n.menu?o.menu=e(n.menu):(o.value=n.value,t(o)),r.push(o)}),r}(e,n||[])},removePixelSuffix:function(e){return e&&(e=e.replace(/px$/,"")),e},addPixelSuffix:function(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e},mergeMargins:function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},createImageList:function(e,n){var r=t.getImageList(e);"string"==typeof r?u.send({url:r,success:function(e){n(JSON.parse(e))}}):"function"==typeof r?r(n):n(r)},waitLoadImage:function(e,n,r){function o(){r.onload=r.onerror=null,e.selection&&(e.selection.select(r),e.nodeChanged())}r.onload=function(){n.width||n.height||!t.hasDimensions(e)||e.dom.setAttribs(r,{width:r.clientWidth,height:r.clientHeight}),o()},r.onerror=o},blobToDataUri:function(e){return new s(function(t,n){var r=new i;r.onload=function(){t(r.result)},r.onerror=function(){n(i.error.message)},r.readAsDataURL(e)})}},d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=Object.prototype.hasOwnProperty,p=(a=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)m.call(o,i)&&(n[i]=a(n[i],o[i]))}return n}),h=d.DOM,g=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?f.removePixelSuffix(e.style.marginLeft):""},v=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?f.removePixelSuffix(e.style.marginTop):""},b=function(e){return e.style.borderWidth?f.removePixelSuffix(e.style.borderWidth):""},y=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},x=function(e,t){return e.style[t]?e.style[t]:""},w=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},C=function(e,t,n){e.setAttribute(t,n)},k=function(e){w(e)?function(e){var t=e.parentNode;h.insertAfter(e,t),h.remove(t)}(e):function(e){var t=h.create("figure",{class:"image"});h.insertAfter(t,e),t.appendChild(e),t.appendChild(h.create("figcaption",{contentEditable:!0},"Caption")),t.contentEditable="false"}(e)},T=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");r.length>0?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},_=function(e,t){return function(e,n,r){e.style[n]?(e.style[n]=f.addPixelSuffix(r),T(e,t)):C(e,n,r)}},E=function(e,t){return e.style[t]?f.removePixelSuffix(e.style[t]):y(e,t)},S=function(e,t){var n=f.addPixelSuffix(t);e.style.marginLeft=n,e.style.marginRight=n},N=function(e,t){var n=f.addPixelSuffix(t);e.style.marginTop=n,e.style.marginBottom=n},R=function(e,t){var n=f.addPixelSuffix(t);e.style.borderWidth=n},A=function(e,t){e.style.borderStyle=t},D=function(e){return"FIGURE"===e.nodeName},O=function(e,t){var n=document.createElement("img");return C(n,"style",t.style),(g(n)||""!==t.hspace)&&S(n,t.hspace),(v(n)||""!==t.vspace)&&N(n,t.vspace),(b(n)||""!==t.border)&&R(n,t.border),(function(e){return x(e,"borderStyle")}(n)||""!==t.borderStyle)&&A(n,t.borderStyle),e(n.getAttribute("style"))},P=function(e,t){return{src:y(t,"src"),alt:y(t,"alt"),title:y(t,"title"),width:E(t,"width"),height:E(t,"height"),class:y(t,"class"),style:e(y(t,"style")),caption:w(t),hspace:g(t),vspace:v(t),border:b(t),borderStyle:x(t,"borderStyle")}},I=function(e,t,n,r,o){n[r]!==t[r]&&o(e,r,n[r])},B=function(e,t){return function(n,r,o){e(n,o),T(n,t)}},M=function(e,t,n){var r=P(e,n);I(n,r,t,"caption",function(e,t,n){return k(e)}),I(n,r,t,"src",C),I(n,r,t,"alt",C),I(n,r,t,"title",C),I(n,r,t,"width",_(0,e)),I(n,r,t,"height",_(0,e)),I(n,r,t,"class",C),I(n,r,t,"style",B(function(e,t){return C(e,"style",t)},e)),I(n,r,t,"hspace",B(S,e)),I(n,r,t,"vspace",B(N,e)),I(n,r,t,"border",B(R,e)),I(n,r,t,"borderStyle",B(A,e))},L=function(e,t){var n=e.dom.styles.parse(t),r=f.mergeMargins(n),o=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(o)},F=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},H=function(e,t){var n=e.dom,r=n.getParent(t.parentNode,function(t){return e.schema.getTextBlockElements()[t.nodeName]});return r?n.split(r,t):t},z=function(e){var t=F(e);return t?P(function(t){return L(e,t)},t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},U=function(e,t){var n=function(e,t){var n=document.createElement("img");if(M(e,p(t,{caption:!1}),n),C(n,"alt",t.alt),t.caption){var r=h.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(h.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(t){return L(e,t)},t);e.dom.setAttrib(n,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(n.outerHTML);var r=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(r,"data-mce-id",null),D(r)){var o=H(e,r);e.selection.select(o)}else e.selection.select(r)},$=function(e,t){var n=F(e);n?t.src?function(e,t){var n=F(e);if(M(function(t){return L(e,t)},t,n),function(e,t){e.dom.setAttrib(t,"src",t.getAttribute("src"))}(e,n),D(n.parentNode)){var r=n.parentNode;H(e,r),e.selection.select(n.parentNode)}else e.selection.select(n),f.waitLoadImage(e,t,n)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&U(e,t)},j=function(e,t){t.find("#style").each(function(n){var r=O(function(t){return L(e,t)},p({src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},t.toJSON()));n.value(r)})},W={makeTab:function(e){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:function(e){return function(n){var r=e.dom,o=n.control.rootControl;if(t.hasAdvTab(e)){var i=o.toJSON(),a=r.parseStyle(i.style);o.find("#vspace").value(""),o.find("#hspace").value(""),((a=f.mergeMargins(a))["margin-top"]&&a["margin-bottom"]||a["margin-right"]&&a["margin-left"])&&(a["margin-top"]===a["margin-bottom"]?o.find("#vspace").value(f.removePixelSuffix(a["margin-top"])):o.find("#vspace").value(""),a["margin-right"]===a["margin-left"]?o.find("#hspace").value(f.removePixelSuffix(a["margin-right"])):o.find("#hspace").value("")),a["border-width"]?o.find("#border").value(f.removePixelSuffix(a["border-width"])):o.find("#border").value(""),a["border-style"]?o.find("#borderStyle").value(a["border-style"]):o.find("#borderStyle").value(""),o.find("#style").value(r.serializeStyle(r.parseStyle(r.serializeStyle(a))))}}}(e)},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(t){j(e,t.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(t){j(e,t.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}}},q=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},V=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],o=e.find("#constrain")[0];n&&r&&o&&t(n,r,o.checked())},G=function(e,t,n){var r=e.state.get("oldVal"),o=t.state.get("oldVal"),i=e.value(),a=t.value();n&&r&&o&&i&&a&&(i!==r?(a=Math.round(i/r*a),isNaN(a)||t.value(a)):(i=Math.round(a/o*i),isNaN(i)||e.value(i))),q(e,t)},Y=function(e){V(e,G)},K={createUi:function(){var e=function(e){Y(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},syncSize:function(e){V(e,q)},updateSize:Y},X=function(e){e.meta=e.control.rootControl.toJSON()},J=function(e,n){var r=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(n){!function(e,n){var r,o,i,a=e.meta||{},s=e.control,u=s.rootControl,l=u.find("#image-list")[0];l&&l.value(n.convertURL(s.value(),"src")),c.each(a,function(e,t){u.find("#"+t).value(e)}),a.width||a.height||(r=n.convertURL(s.value(),"src"),o=t.getPrependUrl(n),i=new RegExp("^(?:[a-z]+:)?//","i"),o&&!i.test(r)&&r.substring(0,o.length)!==o&&(r=o+r),s.value(r),f.getImageSize(n.documentBaseURI.toAbsolute(s.value()),function(e){e.width&&e.height&&t.hasDimensions(n)&&(u.find("#width").value(e.width),u.find("#height").value(e.height),K.syncSize(u))}))}(n,e)},onbeforecall:X},n];return t.hasDescription(e)&&r.push({name:"alt",type:"textbox",label:"Image description"}),t.hasImageTitle(e)&&r.push({name:"title",type:"textbox",label:"Image Title"}),t.hasDimensions(e)&&r.push(K.createUi()),t.getClassList(e)&&r.push({name:"class",type:"listbox",label:"Class",values:f.buildListItems(t.getClassList(e),function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})})})}),t.hasImageCaption(e)&&r.push({name:"caption",type:"checkbox",label:"Caption"}),r},Z={makeTab:function(e,t){return{title:"General",type:"form",items:J(e,t)}},getGeneralItems:J},Q=function(){return o.getOrDie("URL")},ee=function(e){return Q().createObjectURL(e)},te=function(e){Q().revokeObjectURL(e)},ne=tinymce.util.Tools.resolve("tinymce.ui.Factory"),re=function(){},oe=function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t};function ie(e){var t=function(t,n,r,i){var a,s;(a=new function(){return new(o.getOrDie("XMLHttpRequest"))}).open("POST",e.url),a.withCredentials=e.credentials,a.upload.onprogress=function(e){i(e.loaded/e.total*100)},a.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+a.status)},a.onload=function(){var t;a.status<200||a.status>=300?r("HTTP Error: "+a.status):(t=JSON.parse(a.responseText))&&"string"==typeof t.location?n(oe(e.basePath,t.location)):r("Invalid JSON: "+a.responseText)},(s=new FormData).append("file",t.blob(),t.filename()),a.send(s)};return e=c.extend({credentials:!1,handler:t},e),{upload:function(n){return e.url||e.handler!==t?function(e,t){return new s(function(n,r){try{t(e,n,r,re)}catch(e){r(e.message)}})}(n,e.handler):s.reject("Upload url missing from the settings.")}}}var ae=function(e){return function(n){var r=ne.get("Throbber"),o=n.control.rootControl,i=new r(o.getEl()),a=n.control.value(),s=ee(a),c=ie({url:t.getUploadUrl(e),basePath:t.getUploadBasePath(e),credentials:t.getUploadCredentials(e),handler:t.getUploadHandler(e)}),u=function(){i.hide(),te(s)};return i.show(),f.blobToDataUri(a).then(function(t){var n=e.editorUpload.blobCache.create({blob:a,blobUri:s,name:a.name?a.name.replace(/\.[^\.]+$/,""):null,base64:t.split(",")[1]});return c.upload(n).then(function(e){var t=o.find("#src");return t.value(e),o.find("tabpanel")[0].activateTab(0),t.fire("change"),u(),e})}).catch(function(t){e.windowManager.alert(t),u()})}},se={makeTab:function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:".jpg,.jpeg,.png,.gif",onchange:ae(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:".jpg,.jpeg,.png,.gif",height:100,onchange:ae(e)}]}}},ce=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}},ue=function(e,t){var n=t.control.getRoot();K.updateSize(n),e.undoManager.transact(function(){var t=p(z(e),n.toJSON());$(e,t)}),e.editorUpload.uploadImagesAuto()};function le(e){function n(n){var r,o,i=z(e);if(n&&(o={type:"listbox",label:"Image list",name:"image-list",values:f.buildListItems(n,function(t){t.value=e.convertURL(t.value||t.url,"src")},[{text:"None",value:""}]),value:i.src&&e.convertURL(i.src,"src"),onselect:function(e){var t=r.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),r.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){o=this}}),t.hasAdvTab(e)||t.hasUploadUrl(e)||t.hasUploadHandler(e)){var a=[Z.makeTab(e,o)];t.hasAdvTab(e)&&a.push(W.makeTab(e)),(t.hasUploadUrl(e)||t.hasUploadHandler(e))&&a.push(se.makeTab(e)),r=e.windowManager.open({title:"Insert/edit image",data:i,bodyType:"tabpanel",body:a,onSubmit:ce(ue,e)})}else r=e.windowManager.open({title:"Insert/edit image",data:i,body:Z.getGeneralItems(e,o),onSubmit:ce(ue,e)});K.syncSize(r)}return{open:function(){f.createImageList(e,n)}}}var fe=function(e){e.addCommand("mceImage",le(e).open)},de=function(e){var t=e.attr("class");return t&&/\bimage\b/.test(t)},me=function(e){return function(t){for(var n,r=t.length,o=function(t){t.attr("contenteditable",e?"true":null)};r--;)n=t[r],de(n)&&(n.attr("contenteditable",e?"false":null),c.each(n.getAll("figcaption"),o))}},pe=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",me(!0)),e.serializer.addNodeFilter("figure",me(!1))})},he=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:le(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:le(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){pe(e),he(e),fe(e)})}()},function(e,t,n){n(86)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("importcss_merge_classes")},a=function(e){return e.getParam("importcss_exclusive")},s=function(e){return e.getParam("importcss_selector_converter")},c=function(e){return e.getParam("importcss_selector_filter")},u=function(e){return e.getParam("importcss_groups")},l=function(e){return e.getParam("importcss_append")},f=function(e){return e.getParam("importcss_file_filter")},d=function(e){var t=r.cacheSuffix;return"string"==typeof e&&(e=e.replace("?"+t,"").replace("&"+t,"")),e},m=function(e,t){var r=e.settings,o=!1!==r.skin&&(r.skin||"lightgray");return!!o&&t===(r.skin_url?e.documentBaseURI.toAbsolute(r.skin_url):n.baseURL+"/skins/"+o)+"/content"+(e.inline?".inline":"")+".min.css"},p=function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e},h=function(e,t,n){var r=[],i={};o.each(e.contentCSS,function(e){i[e]=!0}),n||(n=function(e,t){return t||i[e]});try{o.each(t.styleSheets,function(t){!function t(i,a){var s,c=i.href;if((c=d(c))&&n(c,a)&&!m(e,c)){o.each(i.imports,function(e){t(e,!0)});try{s=i.cssRules||i.rules}catch(e){}o.each(s,function(e){e.styleSheet?t(e.styleSheet,!0):e.selectorText&&o.each(e.selectorText.split(","),function(e){r.push(o.trim(e))})})}}(t)})}catch(e){}return r},g=function(e,t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var a=r[1],s=r[2].substr(1).split(".").join(" "),c=o.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[a]?n.block=a:e.schema.getBlockElements()[a]||c[a.toLowerCase()]?n.selector=a:n.inline=a):r[2]&&(n={inline:"span",title:t.substr(1),classes:s}),!1!==i(e)?n.classes=s:n.attributes={class:s},n}},v=function(e,t){return null===t||!1!==a(e)},b=g,y=function(e){e.on("renderFormatsMenu",function(n){var r={},i=p(c(e)),a=n.control,d=function(e){return o.map(e,function(e){return o.extend({},e,{original:e,selectors:{},filter:p(e.filter),item:{text:e.title,menu:[]}})})}(u(e)),m=function(n,i){if(function(e,t,n,r){return!(v(e,n)?t in r:t in n.selectors)}(e,n,i,r)){!function(e,t,n,r){v(e,n)?r[t]=!0:n.selectors[t]=!0}(e,n,i,r);var c=function(e,t,n,r){return(r&&r.selector_converter?r.selector_converter:s(e)?s(e):function(){return g(e,n)}).call(t,n,r)}(e,e.plugins.importcss,n,i);if(c){var u=c.name||t.DOM.uniqueId();return e.formatter.register(u,c),o.extend({},a.settings.itemDefaults,{text:c.title,format:u})}}return null};l(e)||a.items().remove(),o.each(h(e,n.doc||e.getDoc(),p(f(e))),function(e){if(-1===e.indexOf(".mce-")&&(!i||i(e))){var t=function(e,t){return o.grep(e,function(e){return!e.filter||e.filter(t)})}(d,e);if(t.length>0)o.each(t,function(t){var n=m(e,t);n&&t.item.menu.push(n)});else{var n=m(e,null);n&&a.add(n)}}}),o.each(d,function(e){e.item.menu.length>0&&a.add(e.item)}),n.control.renderNew()})},x=function(e){return{convertSelectorToFormat:function(t){return b(e,t)}}};e.add("importcss",function(e){return y(e),x(e)})}()},function(e,t,n){n(88)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(e){e.settings.inline_styles=!1,e.on("init",function(){!function(e){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",r=t.explode(e.settings.font_size_style_values),o=e.schema;e.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignjustify:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return t.inArray(r,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),t.each("b,i,u,strike".split(","),function(e){o.addValidElements(e+"[*]")}),o.getElementRule("font")||o.addValidElements("font[face|size|color|style]"),t.each(n.split(","),function(e){var t=o.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}(e)})},r=function(e){e.addButton("fontsizeselect",function(){var t=[],n=e.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return e.$.each(n.split(" "),function(e,n){var r=n,o=n,i=n.split("=");i.length>1&&(r=i[0],o=i[1]),t.push({text:r,value:o})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:function(){var t=this;e.on("NodeChange",function(){var n;(n=e.dom.getParent(e.selection.getNode(),"font"))?t.value(n.size):t.value("")})},onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addButton("fontselect",function(){var t=[],n=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.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");return e.$.each(n,function(e,n){t.push({text:{raw:n[0]},value:n[1],textStyle:-1===n[1].indexOf("dings")?"font-family:"+n[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:function(){var t=this;e.on("NodeChange",function(){var n;(n=e.dom.getParent(e.selection.getNode(),"font"))?t.value(n.face):t.value("")})},onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}})};e.add("legacyoutput",function(e){n(e),r(e)})}()},function(e,t,n){n(90)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),n=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),r=tinymce.util.Tools.resolve("tinymce.util.VK"),o=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(e){return e&&"BR"===e.nodeName},c=function(e){return e&&3===e.nodeType},u=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},l=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},f=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},d=s,m=function(e){return e.parentNode.firstChild===e},p=function(e){return e.parentNode.lastChild===e},h=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},g=function(e,t){return e&&e.nodeName in t},v=function(e,t){return!!s(t)&&!(!e.isBlock(t.nextSibling)||s(t.previousSibling))},b=function(e,t,n){var r=e.isEmpty(t);return!(n&&e.select("span[data-mce-type=bookmark]",t).length>0)&&r},y=function(e,t){return e.isChildOf(t,e.getRoot())},x=function(e,n){var r=t.getNode(e,n);return l(e)&&c(r)?{container:r,offset:n>=e.childNodes.length?r.data.length:0}:{container:e,offset:n}},w=function(e){var t=e.cloneRange(),n=x(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=x(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t},C=a.DOM,k=function(e){var t={},n=function(n){var r,o,i;o=e[n?"startContainer":"endContainer"],i=e[n?"startOffset":"endOffset"],1===o.nodeType&&(r=C.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),n?o.insertBefore(r,o.childNodes[i]):C.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),t[n?"startContainer":"endContainer"]=o,t[n?"startOffset":"endOffset"]=i};return n(!0),e.collapsed||n(),t},T=function(e){function t(t){var n,r,o;n=o=e[t?"startContainer":"endContainer"],r=e[t?"startOffset":"endOffset"],n&&(1===n.nodeType&&(r=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(n),n=n.parentNode,C.remove(o),!n.hasChildNodes()&&C.isBlock(n)&&n.appendChild(C.create("br"))),e[t?"startContainer":"endContainer"]=n,e[t?"startOffset":"endOffset"]=r)}t(!0),t();var n=C.createRng();return n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),w(n)},_=a.DOM,E=function(e,t){var n,r=t.parentNode;"LI"===r.nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),b(e,r)&&_.remove(r)):_.setStyle(r,"listStyleType","none")),u(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)},S=function(e,t){i.each(i.grep(e.select("ol,ul",t)),function(t){E(e,t)})},N=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),R=function(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",A(e,t))},A=function(e,t){var n=e.dom.getParents(t,"TD,TH");return n.length>0?n[0]:e.getBody()},D={getParentList:R,getSelectedSubLists:function(e){var t=R(e),n=e.selection.getSelectedBlocks();return function(e,t){return e&&1===t.length&&t[0]===e}(t,n)?function(e){return i.grep(e.querySelectorAll("ol,ul,dl"),function(e){return u(e)})}(t):i.grep(n,function(e){return u(e)&&t!==e})},getSelectedListItems:function(e){var t=e.selection.getSelectedBlocks();return i.grep(function(e,t){var n=i.map(t,function(t){var n=e.dom.getParent(t,"li,dd,dt",A(e,t));return n||t});return N.unique(n)}(e,t),function(e){return l(e)})},getClosestListRootElm:A},O=tinymce.util.Tools.resolve("tinymce.Env"),P=a.DOM,I=function(e,t,n){var r,o,i,a=P.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((o=P.create(n)).tagName===e.settings.forced_root_block&&P.setAttribs(o,e.settings.forced_root_block_attrs),g(t.firstChild,s)||a.appendChild(o)),t)for(;r=t.firstChild;){var c=r.nodeName;i||"SPAN"===c&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),g(r,s)?(a.appendChild(r),o=null):n?(o||(o=P.create(n),a.appendChild(o)),o.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?i||O.ie&&!(O.ie>10)||o.appendChild(P.create("br",{"data-mce-bogus":"1"})):a.appendChild(P.create("br")),a},B=a.DOM,M=function(e,t,n,r){var o,a,s,c,u;for(s=B.select('span[data-mce-type="bookmark"]',t),r=r||I(e,n),(o=B.createRng()).setStartAfter(n),o.setEndAfter(t),c=(a=o.extractContents()).firstChild;c;c=c.firstChild)if("LI"===c.nodeName&&e.dom.isEmpty(c)){B.remove(c);break}e.dom.isEmpty(a)||B.insertAfter(a,t),B.insertAfter(r,t),b(e.dom,n.parentNode)&&(u=n.parentNode,i.each(s,function(e){u.parentNode.insertBefore(e,n.parentNode)}),B.remove(u)),B.remove(n),b(e.dom,t)&&B.remove(t)},L=a.DOM,F=function(e,t){b(e,t)&&L.remove(t)},H=function(e,t){var n,r,o=t.parentNode;return o?(n=o.parentNode,!(o!==e.getBody()&&("DD"===t.nodeName?(L.rename(t,"DT"),0):m(t)&&p(t)?("LI"===n.nodeName?(L.insertAfter(t,n),F(e.dom,n),L.remove(o)):u(n)?L.remove(o,!0):(n.insertBefore(I(e,t),o),L.remove(o)),0):m(t)?("LI"===n.nodeName?(L.insertAfter(t,n),t.appendChild(o),F(e.dom,n)):u(n)?n.insertBefore(t,o):(n.insertBefore(I(e,t),o),L.remove(t)),0):p(t)?("LI"===n.nodeName?L.insertAfter(t,n):u(n)?L.insertAfter(t,o):(L.insertAfter(I(e,t),o),L.remove(t)),0):("LI"===n.nodeName?(o=n,r=I(e,t,"LI")):r=u(n)?I(e,t,"LI"):I(e,t),M(e,o,t,r),S(e.dom,o.parentNode),0)))):(F(e.dom,t),!0)},z=H,U=function(e){var t=D.getSelectedListItems(e);if(t.length){var n=k(e.selection.getRng()),r=void 0,o=void 0,i=D.getClosestListRootElm(e,e.selection.getStart(!0));for(r=t.length;r--;)for(var a=t[r].parentNode;a&&a!==i;){for(o=t.length;o--;)if(t[o]===a){t.splice(r,1);break}a=a.parentNode}for(r=0;r<t.length&&(H(e,t[r])||0!==r);r++);return e.selection.setRng(T(n)),e.nodeChanged(),!0}},$=function(e,t){i.each(t,function(t,n){e.setAttribute(n,t)})},j=function(e,t,n){!function(e,t,n){var r=n["list-style-type"]?n["list-style-type"]:null;e.setStyle(t,"list-style-type",r)}(e,t,n),function(e,t,n){$(t,n["list-attributes"]),i.each(e.select("li",t),function(e){$(e,n["list-item-attributes"])})}(e,t,n)},W=function(e,t,n,r){var o,i;for(o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&d(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(h(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},q=function(e,t,n){void 0===n&&(n={});var r,a=e.selection.getRng(!0),s="LI",c=D.getClosestListRootElm(e,e.selection.getStart(!0)),l=e.dom;"false"!==l.getContentEditable(e.selection.getNode())&&("DL"===(t=t.toUpperCase())&&(s="DT"),r=k(a),i.each(function(e,t,n){for(var r,a=[],s=e.dom,c=W(e,t,!0,n),u=W(e,t,!1,n),l=[],f=c;f&&(l.push(f),f!==u);f=f.nextSibling);return i.each(l,function(t){if(h(e,t))return a.push(t),void(r=null);if(s.isBlock(t)||d(t))return d(t)&&s.remove(t),void(r=null);var i=t.nextSibling;o.isBookmarkNode(t)&&(h(e,i)||!i&&t.parentNode===n)?r=null:(r||(r=s.create("p"),t.parentNode.insertBefore(r,t),a.push(r)),r.appendChild(t))}),a}(e,a,c),function(r){var o,a;(a=r.previousSibling)&&u(a)&&a.nodeName===t&&function(e,t,n){var r=e.getStyle(t,"list-style-type"),o=n?n["list-style-type"]:"";return r===(o=null===o?"":o)}(l,a,n)?(o=a,r=l.rename(r,s),a.appendChild(r)):(o=l.create(t),r.parentNode.insertBefore(o,r),o.appendChild(r),r=l.rename(r,s)),function(e,t,n){i.each(n,function(n){var r;return e.setStyle(t,((r={})[n]="",r))})}(l,r,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),j(l,o,n),Y(e.dom,o)}),e.selection.setRng(T(r)))},V=function(e){var t=k(e.selection.getRng(!0)),n=D.getClosestListRootElm(e,e.selection.getStart(!0)),r=D.getSelectedListItems(e),o=i.grep(r,function(t){return e.dom.isEmpty(t)});r=i.grep(r,function(t){return!e.dom.isEmpty(t)}),i.each(o,function(t){b(e.dom,t)&&z(e,t)}),i.each(r,function(t){var r,o;if(t.parentNode!==e.getBody()){for(r=t;r&&r!==n;r=r.parentNode)u(r)&&(o=r);M(e,o,t),S(e.dom,o.parentNode)}}),e.selection.setRng(T(t))},G=function(e,t,n){return function(e,t){return e&&t&&u(e)&&e.nodeName===t.nodeName}(t,n)&&function(e,t,n){return e.getStyle(t,"list-style-type",!0)===e.getStyle(n,"list-style-type",!0)}(e,t,n)&&(r=n,t.className===r.className);var r},Y=function(e,t){var n,r;if(n=t.nextSibling,G(e,t,n)){for(;r=n.firstChild;)t.appendChild(r);e.remove(n)}if(n=t.previousSibling,G(e,t,n)){for(;r=n.lastChild;)t.insertBefore(r,t.firstChild);e.remove(n)}},K=function(e,t,n,r,o){if(t.nodeName!==r||X(o)){var a=k(e.selection.getRng(!0));i.each([t].concat(n),function(t){!function(e,t,n,r){if(t.nodeName!==n){var o=e.rename(t,n);j(e,o,r)}else j(e,t,r)}(e.dom,t,r,o)}),e.selection.setRng(T(a))}else V(e)},X=function(e){return"list-style-type"in e},J={toggleList:function(e,t,n){var r=D.getParentList(e),o=D.getSelectedSubLists(e);n=n||{},r&&o.length>0?K(e,r,o,t,n):function(e,t,n,r){if(t!==e.getBody())if(t)if(t.nodeName!==n||X(r)){var o=k(e.selection.getRng(!0));j(e.dom,t,r),Y(e.dom,e.dom.rename(t,n)),e.selection.setRng(T(o))}else V(e);else q(e,n,r)}(e,r,t,n)},removeList:V,mergeWithAdjacentLists:Y},Z=function(e,r,o,i){var a,s,c=r.startContainer,u=r.startOffset;if(3===c.nodeType&&(o?u<c.data.length:u>0))return c;for(a=e.schema.getNonEmptyElements(),1===c.nodeType&&(c=t.getNode(c,u)),s=new n(c,i),o&&v(e.dom,c)&&s.next();c=s[o?"next":"prev2"]();){if("LI"===c.nodeName&&!c.hasChildNodes())return c;if(a[c.nodeName])return c;if(3===c.nodeType&&c.data.length>0)return c}},Q=function(e,t){var n=t.childNodes;return 1===n.length&&!u(n[0])&&e.isBlock(n[0])},ee=function(e,t,n){var r,o;if(o=Q(e,n)?n.firstChild:n,function(e,t){Q(e,t)&&e.remove(t.firstChild,!0)}(e,t),!b(e,t,!0))for(;r=t.firstChild;)o.appendChild(r)},te=function(e,t,n){var r,o,i=t.parentNode;y(e,t)&&y(e,n)&&(u(n.lastChild)&&(o=n.lastChild),i===n.lastChild&&d(i.previousSibling)&&e.remove(i.previousSibling),(r=n.lastChild)&&d(r)&&t.hasChildNodes()&&e.remove(r),b(e,n,!0)&&e.$(n).empty(),ee(e,t,n),o&&n.appendChild(o),e.remove(t),b(e,i)&&i!==e.getRoot()&&e.remove(i))},ne=function(e,t,n,r){var o=e.dom;if(o.isEmpty(r))!function(e,t,n){e.dom.$(n).empty(),te(e.dom,t,n),e.selection.setCursorLocation(n)}(e,n,r);else{var i=k(t);te(o,n,r),e.selection.setRng(T(i))}},re=function(e,t){var n,r,o,i=e.dom,a=e.selection,s=a.getStart(),c=D.getClosestListRootElm(e,s),u=i.getParent(a.getStart(),"LI",c);if(u){if((n=u.parentNode)===e.getBody()&&b(i,n))return!0;if(r=w(a.getRng(!0)),(o=i.getParent(Z(e,r,t,c),"LI",c))&&o!==u)return t?ne(e,r,o,u):function(e,t,n,r){var o=k(t);te(e.dom,n,r);var i=T(o);e.selection.setRng(i)}(e,r,u,o),!0;if(!o&&!t)return J.removeList(e),!0}return!1},oe=function(e,t){return re(e,t)||function(e,t){var n=e.dom,r=e.selection.getStart(),o=D.getClosestListRootElm(e,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){var a=w(e.selection.getRng(!0)),s=n.getParent(Z(e,a,t,o),"LI",o);if(s)return e.undoManager.transact(function(){!function(e,t,n){var r=e.getParent(t.parentNode,e.isBlock,n);e.remove(t),r&&e.isEmpty(r)&&e.remove(r)}(n,i,o),J.mergeWithAdjacentLists(n,s.parentNode),e.selection.select(s,!0),e.selection.collapse(t)}),!0}return!1}(e,t)},ie=function(e,t){return e.selection.isCollapsed()?oe(e,t):function(e){var t=e.selection.getStart(),n=D.getClosestListRootElm(e,t);return!!(e.dom.getParent(t,"LI,DT,DD",n)||D.getSelectedListItems(e).length>0)&&(e.undoManager.transact(function(){e.execCommand("Delete"),S(e.dom,e.getBody())}),!0)}(e)},ae=function(e){e.on("keydown",function(t){t.keyCode===r.BACKSPACE?ie(e,!1)&&t.preventDefault():t.keyCode===r.DELETE&&ie(e,!0)&&t.preventDefault()})},se=ie,ce=function(e){return{backspaceDelete:function(t){se(e,t)}}},ue=a.DOM,le=function(e,t){var n;if(u(e)){for(;n=e.firstChild;)t.appendChild(n);ue.remove(e)}},fe=function(e){var t,n,r,o,i=D.getSelectedListItems(e);if(i.length){for(var a=k(e.selection.getRng(!0)),s=0;s<i.length&&(t=i[s],n=void 0,r=void 0,o=void 0,("DT"===t.nodeName?(ue.rename(t,"DD"),1):(n=t.previousSibling)&&u(n)?(n.appendChild(t),1):n&&"LI"===n.nodeName&&u(n.lastChild)?(n.lastChild.appendChild(t),le(t.lastChild,n.lastChild),1):(n=t.nextSibling)&&u(n)?(n.insertBefore(t,n.firstChild),1):(n=t.previousSibling)&&"LI"===n.nodeName&&(r=ue.create(t.parentNode.nodeName),(o=ue.getStyle(t.parentNode,"listStyleType"))&&ue.setStyle(r,"listStyleType",o),n.appendChild(r),r.appendChild(t),le(t.lastChild,r),1))||0!==s);s++);return e.selection.setRng(T(a)),e.nodeChanged(),!0}},de=function(e,t){return function(){var n=e.dom.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===t}},me=function(e){e.on("BeforeExecCommand",function(t){var n,r=t.command.toLowerCase();if("indent"===r?fe(e)&&(n=!0):"outdent"===r&&U(e)&&(n=!0),n)return e.fire("ExecCommand",{command:t.command}),t.preventDefault(),!0}),e.addCommand("InsertUnorderedList",function(t,n){J.toggleList(e,"UL",n)}),e.addCommand("InsertOrderedList",function(t,n){J.toggleList(e,"OL",n)}),e.addCommand("InsertDefinitionList",function(t,n){J.toggleList(e,"DL",n)}),e.addQueryStateHandler("InsertUnorderedList",de(e,"UL")),e.addQueryStateHandler("InsertOrderedList",de(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",de(e,"DL"))},pe=function(e){return e.getParam("lists_indent_on_tab",!0)},he=function(e){pe(e)&&function(e){e.on("keydown",function(t){t.keyCode!==r.TAB||r.metaKeyPressed(t)||e.dom.getParent(e.selection.getStart(),"LI,DT,DD")&&(t.preventDefault(),t.shiftKey?U(e):fe(e))})}(e),ae(e)},ge=function(e,t){return function(n){var r=n.control;e.on("NodeChange",function(e){var n=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e.parents,f),o=-1!==n?e.parents.slice(0,n):e.parents,a=i.grep(o,u);r.active(a.length>0&&a[0].nodeName===t)})}},ve=function(e){(function(e,t){var n=e.settings.plugins?e.settings.plugins:"";return-1!==i.inArray(n.split(/[ ,]/),t)})(e,"advlist")||(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:ge(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:ge(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(e){return function(t){var n=t.control;e.on("nodechange",function(){var t=D.getSelectedListItems(e),r=t.length>0&&m(t[0]);n.disabled(r)})}}(e)})};e.add("lists",function(e){return he(e),ve(e),me(e),ce(e)})}()},function(e,t,n){n(92)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,t){var n=function(e){return!!e.plugins.visualchars&&e.plugins.visualchars.isEnabled()}(e)?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;";e.insertContent(function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}(n,t)),e.dom.setAttrib(e.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},n=function(e){e.addCommand("mceNonBreaking",function(){t(e,1)})},r=tinymce.util.Tools.resolve("tinymce.util.VK"),o=function(e){var t=e.getParam("nonbreaking_force_tab",0);return"boolean"==typeof t?!0===t?3:0:t},i=function(e){var n=o(e);n>0&&e.on("keydown",function(o){if(o.keyCode===r.TAB&&!o.isDefaultPrevented()){if(o.shiftKey)return;o.preventDefault(),o.stopImmediatePropagation(),t(e,n)}})},a=function(e){e.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),e.addMenuItem("nonbreaking",{icon:"nonbreaking",text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};e.add("nonbreaking",function(e){n(e),a(e),i(e)})}()},function(e,t,n){n(94)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},r=function(e){return e.getParam("pagebreak_split_block",!1)},o=function(){return"mce-pagebreak"},i=function(){return'<img src="'+t.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},a=function(e){var t=n(e),o=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");e.on("BeforeSetContent",function(e){e.content=e.content.replace(o,i())}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(n){for(var o,i,a=n.length;a--;)if((i=(o=n[a]).attr("class"))&&-1!==i.indexOf("mce-pagebreak")){var s=o.parent;if(e.schema.getBlockElements()[s.name]&&r(e)){s.type=3,s.value=t,s.raw=!0,o.remove();continue}o.type=3,o.value=t,o.raw=!0}})})},s=i,c=o,u=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+s()+"</p>"):e.insertContent(s())})},l=function(e){e.on("ResolveName",function(t){"IMG"===t.target.nodeName&&e.dom.hasClass(t.target,c())&&(t.name="pagebreak")})},f=function(e){e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"})};e.add("pagebreak",function(e){u(e),f(e),a(e),l(e)})}()},function(e,t,n){n(96)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return parseInt(e.getParam("plugin_preview_width","650"),10)},r=function(e){return parseInt(e.getParam("plugin_preview_height","500"),10)},o=function(e){return e.getParam("content_style","")},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(e){var t="",n=e.dom.encode,r=o(e);t+='<base href="'+n(e.documentBaseURI.getURI())+'">',r&&(t+='<style type="text/css">'+r+"</style>"),i.each(e.contentCSS,function(r){t+='<link type="text/css" rel="stylesheet" href="'+n(e.documentBaseURI.toAbsolute(r))+'">'});var a=e.settings.body_id||"tinymce";-1!==a.indexOf("=")&&(a=(a=e.getParam("body_id","","hash"))[e.id]||a);var s=e.settings.body_class||"";-1!==s.indexOf("=")&&(s=(s=e.getParam("body_class","","hash"))[e.id]||"");var c=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";return"<!DOCTYPE html><html><head>"+t+'</head><body id="'+n(a)+'" class="mce-content-body '+n(s)+'"'+n(c)+">"+e.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},s=function(e,t,n){var r=a(e);if(n)t.src="data:text/html;charset=utf-8,"+encodeURIComponent(r);else{var o=t.contentWindow.document;o.open(),o.write(r),o.close()}},c=function(e){var o=!t.ie,i='<iframe src="" frameborder="0"'+(o?' sandbox="allow-scripts"':"")+"></iframe>",a=n(e),c=r(e);e.windowManager.open({title:"Preview",width:a,height:c,html:i,buttons:{text:"Close",onclick:function(e){e.control.parent().parent().close()}},onPostRender:function(t){var n=t.control.getEl("body").firstChild;s(e,n,o)}})},u=function(e){e.addCommand("mcePreview",function(){c(e)})},l=function(e){e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};e.add("preview",function(e){u(e),l(e)})}()},function(e,t,n){n(98)},function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.getParam("save_enablewhendirty",!0)},o=function(e){return!!e.getParam("save_onsavecallback")},i=function(e){return!!e.getParam("save_oncancelcallback")},a=function(e,t){e.notificationManager.open({text:e.translate(t),type:"error"})},s=function(e){var n;if(n=t.DOM.getParent(e.id,"form"),!r(e)||e.isDirty()){if(e.save(),o(e))return e.execCallback("save_onsavecallback",e),void e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():a(e,"Error: Form submit field collision.")),e.nodeChanged()):a(e,"Error: No form element found.")}},c=function(e){var t=n.trim(e.startContent);i(e)?e.execCallback("save_oncancelcallback",e):(e.setContent(t),e.undoManager.clear(),e.nodeChanged())},u=function(e){e.addCommand("mceSave",function(){s(e)}),e.addCommand("mceCancel",function(){c(e)})},l=function(e){return function(t){var n=t.control;e.on("nodeChange dirty",function(){n.disabled(r(e)&&!e.isDirty())})}},f=function(e){e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:l(e)}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:l(e)}),e.addShortcut("Meta+S","","mceSave")};e.add("save",function(e){f(e),u(e)})}()},function(e,t,n){n(100)},function(e,t){!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!t.get("tinymcespellchecker")||(void 0!==window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},r=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},o=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},i=function(e){return e.getParam("spellchecker_rpc_url")},a=function(e){return e.getParam("spellchecker_callback")},s=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`??????]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},c=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=tinymce.util.Tools.resolve("tinymce.util.URI"),l=tinymce.util.Tools.resolve("tinymce.util.XHR"),f=function(e){return e.fire("SpellcheckStart")},d=function(e){return e.fire("SpellcheckEnd")};function m(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var p,h=function(e,t){var n,r,o,i,a,s=[],c=t.dom;function u(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function l(t){var n=e.getElementsByTagName("*"),r=[];t="number"==typeof t?""+t:null;for(var o=0;o<n.length;o++){var i=n[o],a=i.getAttribute("data-mce-index");null!==a&&a.length&&-1!==i.className.indexOf("mce-spellchecker-word")&&(a!==t&&null!==t||r.push(i))}return r}function f(e){for(var t=s.length;t--;)if(s[t]===e)return t;return-1}function d(e){for(var t=0,n=s.length;t<n&&!1!==e(s[t],t);t++);return this}function p(e){var t,n,r=l(e?f(e):null);for(t=r.length;t--;)(n=r[t]).parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n);return this}function h(e){var n=l(f(e)),r=t.dom.createRng();return r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),r}return o=t.schema.getBlockElements(),i=t.schema.getWhiteSpaceElements(),a=t.schema.getShortEndedElements(),{text:r=function e(t){var n;if(3===t.nodeType)return t.data;if(i[t.nodeName]&&!o[t.nodeName])return"";if(m(t))return"\n";if(n="",(o[t.nodeName]||a[t.nodeName])&&(n+="\n"),t=t.firstChild)do{n+=e(t)}while(t=t.nextSibling);return n}(e),matches:s,each:d,filter:function(e){var t=[];return d(function(n,r){e(n,r)&&t.push(n)}),s=t,this},reset:function(){return s.splice(0,s.length),p(),this},matchFromElement:function(e){return s[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return l(f(e))[0]},find:function(e,t){if(r&&e.global)for(;n=e.exec(r);)s.push(u(n,t));return this},add:function(e,t,n){return s.push({start:e,end:e+t,text:r.substr(e,t),data:n}),this},wrap:function(t){return s.length&&function(e,t,n){var r,s,c,u,l,f=[],d=0,p=e,h=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),l=t.shift();e:for(;;){if((o[p.nodeName]||a[p.nodeName]||m(p))&&d++,3===p.nodeType&&(!s&&p.length+d>=l.end?(s=p,u=l.end-d):r&&f.push(p),!r&&p.length+d>l.start&&(r=p,c=l.start-d),d+=p.length),r&&s){if(p=n({startNode:r,startNodeIndex:c,endNode:s,endNodeIndex:u,innerNodes:f,match:l.text,matchIndex:h}),d-=s.length-u,r=null,s=null,f=[],h++,!(l=t.shift()))break}else if(i[p.nodeName]&&!o[p.nodeName]||!p.firstChild){if(p.nextSibling){p=p.nextSibling;continue}}else if(!m(p)){p=p.firstChild;continue}for(;;){if(p.nextSibling){p=p.nextSibling;break}if(p.parentNode===e)break e;p=p.parentNode}}}(e,s,function(e){function t(t,n){var r=s[n];r.stencil||(r.stencil=e(r));var o=r.stencil.cloneNode(!1);return o.setAttribute("data-mce-index",n),t&&o.appendChild(c.doc.createTextNode(t)),o}return function(e){var n,r,o,i=e.startNode,a=e.endNode,s=e.matchIndex,u=c.doc;if(i===a){var l=i;o=l.parentNode,e.startNodeIndex>0&&(n=u.createTextNode(l.data.substring(0,e.startNodeIndex)),o.insertBefore(n,l));var f=t(e.match,s);return o.insertBefore(f,l),e.endNodeIndex<l.length&&(r=u.createTextNode(l.data.substring(e.endNodeIndex)),o.insertBefore(r,l)),l.parentNode.removeChild(l),f}n=u.createTextNode(i.data.substring(0,e.startNodeIndex)),r=u.createTextNode(a.data.substring(e.endNodeIndex));for(var d=t(i.data.substring(e.startNodeIndex),s),m=[],p=0,h=e.innerNodes.length;p<h;++p){var g=e.innerNodes[p],v=t(g.data,s);g.parentNode.replaceChild(v,g),m.push(v)}var b=t(a.data.substring(0,e.endNodeIndex),s);return(o=i.parentNode).insertBefore(n,i),o.insertBefore(d,i),o.removeChild(i),(o=a.parentNode).insertBefore(b,a),o.insertBefore(r,a),o.removeChild(a),b}}(t)),this},unwrap:p,replace:function(e,n){var r=h(e);return r.deleteContents(),n.length>0&&r.insertNode(t.dom.doc.createTextNode(n)),r},rangeFromMatch:h,indexOf:f}},g=function(e,t){if(!t.get()){var n=h(e.getBody(),e);t.set(n)}return t.get()},v=function(e,t,n,r,o,s,f){var d=a(e);(d||function(e,t,n){return function(r,o,a,s){var f={method:r,lang:n.get()},d="";f["addToDictionary"===r?"word":"text"]=o,c.each(f,function(e,t){d&&(d+="&"),d+=t+"="+encodeURIComponent(e)}),l.send({url:new u(t).toAbsolute(i(e)),type:"post",content_type:"application/x-www-form-urlencoded",data:d,success:function(t){if(t=JSON.parse(t))t.error?s(t.error):a(t);else{var n=e.translate("Server response wasn't proper JSON.");s(n)}},error:function(){var t=e.translate("The spelling service was not found: (")+i(e)+e.translate(")");s(t)}})}}(e,t,n)).call(e.plugins.spellchecker,r,o,s,f)},b=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||y(e,t,n)},y=function(e,t,n){if(g(e,n).reset(),n.set(null),t.get())return t.set(!1),d(e),!0},x=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},w=function(e,t,n,r,o){var i,a;if("string"!=typeof o&&o.words?(a=!!o.dictionary,i=o.words):i=o,e.setProgressState(!1),function(e){for(var t in e)return!1;return!0}(i)){var c=e.translate("No misspellings found.");return e.notificationManager.open({text:c,type:"info"}),void t.set(!1)}r.set({suggestions:i,hasDictionarySupport:a}),g(e,n).find(s(e)).filter(function(e){return!!i[e.text]}).wrap(function(t){return e.dom.create("span",{class:"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":t.text})}),t.set(!0),f(e)},C={spellcheck:function(e,t,n,r,o,i){y(e,n,r)||(e.setProgressState(!0),v(e,t,i,"spellcheck",g(e,r).text,function(t){w(e,n,r,o,t)},function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1),y(e,n,r)}),e.focus())},checkIfFinished:b,addToDictionary:function(e,t,n,r,o,i,a){e.setProgressState(!0),v(e,t,o,"addToDictionary",i,function(){e.setProgressState(!1),e.dom.remove(a,!0),b(e,n,r)},function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1)})},ignoreWord:function(e,t,n,r,o,i){e.selection.collapse(),i?c.each(e.dom.select("span.mce-spellchecker-word"),function(t){t.getAttribute("data-mce-word")===r&&e.dom.remove(t,!0)}):e.dom.remove(o,!0),b(e,t,n)},findSpansByIndex:function(e,t){var n,r=[];if((n=c.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=x(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},getElmIndex:x,markErrors:w},k=function(e,t,n,r,o,i){return{getTextMatcher:function(){return r.get()},getWordCharPattern:function(){return s(e)},markErrors:function(o){C.markErrors(e,t,r,n,o)},getLanguage:function(){return o.get()}}},T=function(e,t,n,r,o,i){e.addCommand("mceSpellCheck",function(){C.spellcheck(e,t,n,r,o,i)})},_=function(e,t,n,o,i,a){var s,u,l=(s=function(e){return c.map(r(e).split(","),function(e){return{name:(e=e.split("="))[0],value:e[1]}})}(e),u=[],c.each(s,function(e){u.push({selectable:!0,text:e.name,data:e.value})}),u),f=function(){C.spellcheck(e,t,n,o,a,i)},d={tooltip:"Spellcheck",onclick:f,onPostRender:function(t){var r=t.control;e.on("SpellcheckStart SpellcheckEnd",function(){r.active(n.get())})}};l.length>1&&(d.type="splitbutton",d.menu=l,d.onshow=function(e,t){return function(e){var n=t.get();e.control.items().each(function(e){e.active(e.settings.data===n)})}}(0,i),d.onselect=function(e){i.set(e.control.settings.data)}),e.addButton("spellchecker",d),e.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:f,selectable:!0,onPostRender:function(){var t=this;t.active(n.get()),e.on("SpellcheckStart SpellcheckEnd",function(){t.active(n.get())})}})},E=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.ui.Factory"),N=function(e,t,n,r,o,i){e.on("click",function(a){var s=a.target;if("mce-spellchecker-word"===s.className){a.preventDefault();var u=C.findSpansByIndex(e,C.getElmIndex(s));if(u.length>0){var l=e.dom.createRng();l.setStartBefore(u[0]),l.setEndAfter(u[u.length-1]),e.selection.setRng(l),function(e,t,n,r,o,i,a,s){var u=[],l=n.get().suggestions[a];c.each(l,function(t){u.push({text:t,onclick:function(){e.insertContent(e.dom.encode(t)),e.dom.remove(s),C.checkIfFinished(e,r,o)}})}),u.push({text:"-"}),n.get().hasDictionarySupport&&u.push({text:"Add to Dictionary",onclick:function(){C.addToDictionary(e,t,r,o,i,a,s)}}),u.push.apply(u,[{text:"Ignore",onclick:function(){C.ignoreWord(e,r,o,a,s)}},{text:"Ignore all",onclick:function(){C.ignoreWord(e,r,o,a,s,!0)}}]),(p=S.create("menu",{items:u,context:"contextmenu",onautohide:function(e){-1!==e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){p.remove(),p=null}})).renderTo(document.body);var f=E.DOM.getPos(e.getContentAreaContainer()),d=e.dom.getPos(s[0]),m=e.dom.getRoot();"BODY"===m.nodeName?(d.x-=m.ownerDocument.documentElement.scrollLeft||m.scrollLeft,d.y-=m.ownerDocument.documentElement.scrollTop||m.scrollTop):(d.x-=m.scrollLeft,d.y-=m.scrollTop),f.x+=d.x,f.y+=d.y,p.moveTo(f.x,f.y+s[0].offsetHeight)}(e,t,n,r,o,i,s.getAttribute("data-mce-word"),u)}}})};t.add("spellchecker",function(t,r){if(!1===n(t)){var i=e(!1),a=e(o(t)),s=e(null),c=e(null);return _(t,r,i,s,a,c),N(t,r,c,i,s,a),T(t,r,i,s,c,a),k(t,i,c,s,a,r)}})}()},function(e,t,n){n(102)},function(e,t){!function(){"use strict";var e,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},r=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,arguments))}},o=function(e){return function(){return e}},i=function(e){return e},a=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=new Array(arguments.length-1),o=1;o<arguments.length;o++)r[o-1]=arguments[o];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];var a=r.concat(o);return e.apply(null,a)}},s=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,arguments)}},c=function(e){return e()},u=o(!1),l=o(!0),f=u,d=l,m=function(){return p},p=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e,t){return e()},is:f,isSome:f,isNone:d,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:m,ap:m,each:function(){},bind:m,flatten:m,exists:f,forall:d,filter:m,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")};return Object.freeze&&Object.freeze(r),r}(),h=function(e){var t=function(){return e},n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:d,isNone:f,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return h(t(e))},ap:function(t){return t.fold(m,function(t){return h(t(e))})},each:function(t){t(e)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(e)?o:p},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(f,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},g={some:h,none:m,from:function(e){return null===e||void 0===e?p:h(e)}},v=function(e){return function(t){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(t)===e}},b=v("string"),y=v("array"),x=v("boolean"),w=v("function"),C=v("number"),k=void 0===(e=Array.prototype.indexOf)?function(e,t){return P(e,t)}:function(t,n){return e.call(t,n)},T=function(e,t){return k(e,t)>-1},_=function(e,t){return O(e,t).isSome()},E=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},S=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},N=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},R=function(e,t,n){return function(e,t){for(var n=e.length-1;n>=0;n--)t(e[n],n,e)}(e,function(e){n=t(n,e)}),n},A=function(e,t,n){return S(e,function(e){n=t(n,e)}),n},D=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return g.some(o)}return g.none()},O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return g.some(n);return g.none()},P=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},I=Array.prototype.push,B=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);I.apply(t,e[n])}return t},M=function(e,t){var n=E(e,t);return B(n)},L=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n,e))return!1;return!0},F=Array.prototype.slice,H=function(e){var t=F.call(e,0);return t.reverse(),t},z=(w(Array.from)&&Array.from,Object.keys),U=function(e,t){for(var n=z(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},$=function(e,t){return j(e,function(e,n,r){return{k:n,v:t(e,n,r)}})},j=function(e,t){var n={};return U(e,function(r,o){var i=t(r,o,e);n[i.k]=i.v}),n},W=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return S(e,function(e,n){r[e]=o(t[n])}),r}},q=function(e){return e.slice(0).sort()},V=function(e,t){throw new Error("All required keys ("+q(e).join(", ")+") were not specified. Specified keys were: "+q(t).join(", ")+".")},G=function(e){throw new Error("Unsupported keys for object: "+q(e).join(", "))},Y=function(e,t){if(!y(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");S(t,function(t){if(!b(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")})},K=function(e){var t=q(e);D(t,function(e,n){return n<t.length-1&&e===t[n+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")})},X=function(e,t){var n=e.concat(t);if(0===n.length)throw new Error("You must specify at least one required or optional field.");return Y("required",e),Y("optional",t),K(n),function(r){var i=z(r);L(e,function(e){return T(i,e)})||V(e,i);var a=N(i,function(e){return!T(n,e)});a.length>0&&G(a);var s={};return S(e,function(e){s[e]=o(r[e])}),S(t,function(e){s[e]=o(Object.prototype.hasOwnProperty.call(r,e)?g.some(r[e]):g.none())}),s}},J=W("width","height"),Z=W("rows","columns"),Q=W("row","column"),ee=W("x","y"),te=W("element","rowspan","colspan"),ne=W("element","rowspan","colspan","isNew"),re={dimensions:J,grid:Z,address:Q,coords:ee,extended:W("element","rowspan","colspan","row","column"),detail:te,detailnew:ne,rowdata:W("element","cells","section"),elementnew:W("element","isNew"),rowdatanew:W("element","cells","section","isNew"),rowcells:W("cells","section"),rowdetails:W("details","section"),bounds:W("startRow","startCol","finishRow","finishCol")},oe=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:o(e)}},ie={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return oe(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return oe(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return oe(n)},fromDom:oe,fromPoint:function(e,t,n){var r=e.dom();return g.from(r.elementFromPoint(t,n)).map(oe)}},ae={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},se=ae.ELEMENT,ce=ae.DOCUMENT,ue=function(e){return e.nodeType!==se&&e.nodeType!==ce||0===e.childElementCount},le={all:function(e,t){var n=void 0===t?document:t.dom();return ue(n)?[]:E(n.querySelectorAll(e),ie.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==se)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return ue(n)?g.none():g.from(n.querySelector(e)).map(ie.fromDom)}},fe=function(e,t){var n=[],r=function(e){return n.push(e),t(e)},o=t(e);do{o=o.bind(r)}while(o.isSome());return n},de="undefined"!=typeof window?window:Function("return this;")(),me=function(e,t){return function(e,t){for(var n=void 0!==t&&null!==t?t:de,r=0;r<e.length&&void 0!==n&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},pe=function(e,t){var n=function(e,t){return me(e,t)}(e,t);if(void 0===n||null===n)throw e+" not available on this browser";return n},he=function(){return pe("Node")},ge=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},ve=function(e,t){return ge(e,t,he().DOCUMENT_POSITION_CONTAINED_BY)},be=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},ye=function(){return xe(0,0)},xe=function(e,t){return{major:e,minor:t}},we={nu:xe,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?ye():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return xe(r(1),r(2))}(e,n)},unknown:ye},Ce=function(e,t){return function(){return t===e}},ke=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Ce("Edge",t),isChrome:Ce("Chrome",t),isIE:Ce("IE",t),isOpera:Ce("Opera",t),isFirefox:Ce("Firefox",t),isSafari:Ce("Safari",t)}},Te={unknown:function(){return ke({current:void 0,version:we.unknown()})},nu:ke,edge:o("Edge"),chrome:o("Chrome"),ie:o("IE"),opera:o("Opera"),firefox:o("Firefox"),safari:o("Safari")},_e=function(e,t){return function(){return t===e}},Ee=function(e){var t=e.current;return{current:t,version:e.version,isWindows:_e("Windows",t),isiOS:_e("iOS",t),isAndroid:_e("Android",t),isOSX:_e("OSX",t),isLinux:_e("Linux",t),isSolaris:_e("Solaris",t),isFreeBSD:_e("FreeBSD",t)}},Se={unknown:function(){return Ee({current:void 0,version:we.unknown()})},nu:Ee,windows:o("Windows"),ios:o("iOS"),android:o("Android"),linux:o("Linux"),osx:o("OSX"),solaris:o("Solaris"),freebsd:o("FreeBSD")},Ne=function(e,t){var n=String(t).toLowerCase();return D(e,function(e){return e.search(n)})},Re=function(e,t){return Ne(e,t).map(function(e){var n=we.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Ae=function(e,t){return Ne(e,t).map(function(e){var n=we.detect(e.versionRegexes,t);return{current:e.name,version:n}})},De=function(e,t){return-1!==e.indexOf(t)},Oe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Pe=function(e){return function(t){return De(t,e)}},Ie=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return De(e,"edge/")&&De(e,"chrome")&&De(e,"safari")&&De(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Oe],search:function(e){return De(e,"chrome")&&!De(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return De(e,"msie")||De(e,"trident")}},{name:"Opera",versionRegexes:[Oe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Pe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Pe("firefox")},{name:"Safari",versionRegexes:[Oe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(De(e,"safari")||De(e,"mobile/"))&&De(e,"applewebkit")}}],Be=[{name:"Windows",search:Pe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return De(e,"iphone")||De(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Pe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Pe("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Pe("linux"),versionRegexes:[]},{name:"Solaris",search:Pe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Pe("freebsd"),versionRegexes:[]}],Me={browsers:o(Ie),oses:o(Be)},Le=function(e){var t=Me.browsers(),n=Me.oses(),r=Re(t,e).fold(Te.unknown,Te.nu),i=Ae(n,e).fold(Se.unknown,Se.nu);return{browser:r,os:i,deviceType:function(e,t,n){var r=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!r,a=e.isAndroid()&&3===e.version.major,s=e.isAndroid()&&4===e.version.major,c=r||a||s&&!0===/mobile/i.test(n),u=e.isiOS()||e.isAndroid(),l=u&&!c,f=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n);return{isiPad:o(r),isiPhone:o(i),isTablet:o(c),isPhone:o(l),isTouch:o(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:o(f)}}(i,r,e)}},Fe={detect:be(function(){var e=navigator.userAgent;return Le(e)})},He=function(e,t){return e.dom()===t.dom()},ze=Fe.detect().browser.isIE()?function(e,t){return ve(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ue={eq:He,isEqualNode:function(e,t){return e.dom().isEqualNode(t.dom())},member:function(e,t){return _(t,a(He,e))},contains:ze,is:le.is},$e=function(e){var t=e.dom();return g.from(t.parentNode).map(ie.fromDom)},je=function(e){var t=e.dom();return g.from(t.previousSibling).map(ie.fromDom)},We=function(e){var t=e.dom();return g.from(t.nextSibling).map(ie.fromDom)},qe=function(e){var t=e.dom();return E(t.childNodes,ie.fromDom)},Ve=function(e,t){var n=e.dom().childNodes;return g.from(n[t]).map(ie.fromDom)},Ge=W("element","offset"),Ye={owner:function(e){return ie.fromDom(e.dom().ownerDocument)},defaultView:function(e){var t=e.dom().ownerDocument.defaultView;return ie.fromDom(t)},documentElement:function(e){return ie.fromDom(e.dom().ownerDocument.documentElement)},parent:$e,findIndex:function(e){return $e(e).bind(function(t){var n=qe(t);return O(n,function(t){return Ue.eq(e,t)})})},parents:function(e,t){for(var n=w(t)?t:o(!1),r=e.dom(),i=[];null!==r.parentNode&&void 0!==r.parentNode;){var a=r.parentNode,s=ie.fromDom(a);if(i.push(s),!0===n(s))break;r=a}return i},siblings:function(e){return $e(e).map(qe).map(function(t){return N(t,function(t){return!Ue.eq(e,t)})}).getOr([])},prevSibling:je,offsetParent:function(e){var t=e.dom();return g.from(t.offsetParent).map(ie.fromDom)},prevSiblings:function(e){return H(fe(e,je))},nextSibling:We,nextSiblings:function(e){return fe(e,We)},children:qe,child:Ve,firstChild:function(e){return Ve(e,0)},lastChild:function(e){return Ve(e,e.dom().childNodes.length-1)},childNodesCount:function(e){return e.dom().childNodes.length},hasChildNodes:function(e){return e.dom().hasChildNodes()},leaf:function(e,t){var n=qe(e);return n.length>0&&t<n.length?Ge(n[t],0):Ge(e,t)}},Ke=function(e,t,n){return M(Ye.children(e),function(e){return le.is(e,t)?n(e)?[e]:[]:Ke(e,t,n)})},Xe={firstLayer:function(e,t){return Ke(e,t,o(!0))},filterFirstLayer:Ke},Je=function(e){return e.dom().nodeName.toLowerCase()},Ze=function(e){return e.dom().nodeType},Qe=function(e){return function(t){return Ze(t)===e}},et=Qe(ae.ELEMENT),tt=Qe(ae.TEXT),nt=Qe(ae.DOCUMENT),rt={name:Je,type:Ze,value:function(e){return e.dom().nodeValue},isElement:et,isText:tt,isDocument:nt,isComment:function(e){return Ze(e)===ae.COMMENT||"#comment"===Je(e)}},ot=function(e,t,n){if(!(b(n)||x(n)||C(n)))throw console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},it=function(e,t,n){ot(e.dom(),t,n)},at=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},st=function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},ct={clone:function(e){return A(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{})},set:it,setAll:function(e,t){var n=e.dom();U(t,function(e,t){ot(n,t,e)})},get:at,has:st,remove:function(e,t){e.dom().removeAttribute(t)},hasNone:function(e){var t=e.dom().attributes;return void 0===t||null===t||0===t.length},transfer:function(e,t,n){rt.isElement(e)&&rt.isElement(t)&&S(n,function(n){!function(e,t,n){st(e,n)&&!st(t,n)&&it(t,n,at(e,n))}(e,t,n)})}},ut=be(function(){return lt(ie.fromDom(document))}),lt=function(e){var t=e.dom().body;if(null===t||void 0===t)throw"Body is not available yet";return ie.fromDom(t)},ft={body:ut,getBody:lt,inBody:function(e){var t=rt.isText(e)?e.dom().parentNode:e.dom();return void 0!==t&&null!==t&&t.ownerDocument.body.contains(t)}},dt=function(e,t){var n=[];return S(Ye.children(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(dt(e,t))}),n},mt={all:function(e){return dt(ft.body(),e)},ancestors:function(e,t,n){return N(Ye.parents(e,n),t)},siblings:function(e,t){return N(Ye.siblings(e),t)},children:function(e,t){return N(Ye.children(e),t)},descendants:dt},pt={all:function(e){return le.all(e)},ancestors:function(e,t,n){return mt.ancestors(e,function(e){return le.is(e,t)},n)},siblings:function(e,t){return mt.siblings(e,function(e){return le.is(e,t)})},children:function(e,t){return mt.children(e,function(e){return le.is(e,t)})},descendants:function(e,t){return le.all(t,e)}};function ht(e,t,n,r,o){return e(n,r)?g.some(n):w(o)&&o(n)?g.none():t(n,r,o)}var gt=function(e,t,n){for(var r=e.dom(),i=w(n)?n:o(!1);r.parentNode;){r=r.parentNode;var a=ie.fromDom(r);if(t(a))return g.some(a);if(i(a))break}return g.none()},vt=function(e,t){return D(e.dom().childNodes,r(t,ie.fromDom)).map(ie.fromDom)},bt=function(e,t){var n=function(e){for(var r=0;r<e.childNodes.length;r++){if(t(ie.fromDom(e.childNodes[r])))return g.some(ie.fromDom(e.childNodes[r]));var o=n(e.childNodes[r]);if(o.isSome())return o}return g.none()};return n(e.dom())},yt={first:function(e){return bt(ft.body(),e)},ancestor:gt,closest:function(e,t,n){return ht(function(e){return t(e)},gt,e,t,n)},sibling:function(e,t){var n=e.dom();return n.parentNode?vt(ie.fromDom(n.parentNode),function(n){return!Ue.eq(e,n)&&t(n)}):g.none()},child:vt,descendant:bt},xt=function(e,t,n){return yt.ancestor(e,function(e){return le.is(e,t)},n)},wt={first:function(e){return le.one(e)},ancestor:xt,sibling:function(e,t){return yt.sibling(e,function(e){return le.is(e,t)})},child:function(e,t){return yt.child(e,function(e){return le.is(e,t)})},descendant:function(e,t){return le.one(t,e)},closest:function(e,t,n){return ht(le.is,xt,e,t,n)}},Ct=function(e,t,n){var r=void 0!==n?n:o(!1);return r(t)?g.none():T(e,rt.name(t))?g.some(t):wt.ancestor(t,e.join(","),function(e){return le.is(e,"table")||r(e)})},kt=function(e,t){return Ye.parent(t).map(function(t){return pt.children(t,e)})},Tt=function(e,t){return parseInt(ct.get(e,t),10)},_t={cell:function(e,t){return Ct(["td","th"],e,t)},firstCell:function(e){return wt.descendant(e,"th,td")},cells:function(e){return Xe.firstLayer(e,"th,td")},neighbourCells:a(kt,"th,td"),table:function(e,t){return wt.closest(e,"table",t)},row:function(e,t){return Ct(["tr"],e,t)},rows:function(e){return Xe.firstLayer(e,"tr")},notCell:function(e,t){return Ct(["caption","tr","tbody","tfoot","thead"],e,t)},neighbourRows:a(kt,"tr"),attr:Tt,grid:function(e,t,n){var r=Tt(e,t),o=Tt(e,n);return re.grid(r,o)}},Et=function(e){var t=_t.rows(e);return E(t,function(e){var t=e,n=Ye.parent(t).map(function(e){var t=rt.name(e);return"tfoot"===t||"thead"===t||"tbody"===t?t:"tbody"}).getOr("tbody"),r=E(_t.cells(e),function(e){var t=ct.has(e,"rowspan")?parseInt(ct.get(e,"rowspan"),10):1,n=ct.has(e,"colspan")?parseInt(ct.get(e,"colspan"),10):1;return re.detail(e,t,n)});return re.rowdata(t,r,n)})},St=function(e,t){return E(e,function(e){var n=E(_t.cells(e),function(e){var t=ct.has(e,"rowspan")?parseInt(ct.get(e,"rowspan"),10):1,n=ct.has(e,"colspan")?parseInt(ct.get(e,"colspan"),10):1;return re.detail(e,t,n)});return re.rowdata(e,n,t.section())})},Nt=function(e,t){return e+","+t},Rt=function(e,t){var n=M(e.all(),function(e){return e.cells()});return N(n,t)},At={generate:function(e){var t={},n=[],r=e.length,i=0;S(e,function(e,r){var o=[];S(e.cells(),function(e,n){for(var a=0;void 0!==t[Nt(r,a)];)a++;for(var s=re.extended(e.element(),e.rowspan(),e.colspan(),r,a),c=0;c<e.colspan();c++)for(var u=0;u<e.rowspan();u++){var l=a+c,f=Nt(r+u,l);t[f]=s,i=Math.max(i,l+1)}o.push(s)}),n.push(re.rowdata(e.element(),o,e.section()))});var a=re.grid(r,i);return{grid:o(a),access:o(t),all:o(n)}},getAt:function(e,t,n){var r=e.access()[Nt(t,n)];return void 0!==r?g.some(r):g.none()},findItem:function(e,t,n){var r=Rt(e,function(e){return n(t,e.element())});return r.length>0?g.some(r[0]):g.none()},filterItems:Rt,justCells:function(e){var t=E(e.all(),function(e){return e.cells()});return B(t)}},Dt={isSupported:function(e){return void 0!==e.style}},Ot=function(e,t,n){if(!b(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Dt.isSupported(e)&&e.style.setProperty(t,n)},Pt=function(e,t){Dt.isSupported(e)&&e.style.removeProperty(t)},It=function(e,t,n){var r=e.dom();Ot(r,t,n)},Bt=function(e,t){return Dt.isSupported(e)?e.style.getPropertyValue(t):""},Mt=function(e,t){var n=e.dom(),r=Bt(n,t);return g.from(r).filter(function(e){return e.length>0})},Lt={copy:function(e,t){var n=e.dom(),r=t.dom();Dt.isSupported(n)&&Dt.isSupported(r)&&(r.style.cssText=n.style.cssText)},set:It,preserve:function(e,t){var n=ct.get(e,"style"),r=t(e);return(void 0===n?ct.remove:ct.set)(e,"style",n),r},setAll:function(e,t){var n=e.dom();U(t,function(e,t){Ot(n,t,e)})},setOptions:function(e,t){var n=e.dom();U(t,function(e,t){e.fold(function(){Pt(n,t)},function(e){Ot(n,t,e)})})},remove:function(e,t){var n=e.dom();Pt(n,t),ct.has(e,"style")&&""===ct.get(e,"style").replace(/^\s+|\s+$/g,"")&&ct.remove(e,"style")},get:function(e,t){var n=e.dom(),r=window.getComputedStyle(n).getPropertyValue(t),o=""!==r||ft.inBody(e)?r:Bt(n,t);return null===o?void 0:o},getRaw:Mt,getAllRaw:function(e){var t={},n=e.dom();if(Dt.isSupported(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},isValidValue:function(e,t,n){var r=ie.fromTag(e);return It(r,t,n),Mt(r,t).isSome()},reflow:function(e){return e.dom().offsetWidth},transfer:function(e,t,n){rt.isElement(e)&&rt.isElement(t)&&S(n,function(n){!function(e,t,n){Mt(e,