amis/pkg/tinymce_327be45.js

144 lines
1.3 MiB
JavaScript
Raw Normal View History

2020-08-21 14:12:34 +08:00
;/*!node_modules/tinymce/tinymce.js*/
amis.define("node_modules/tinymce/tinymce",function(e,t,n){!function(e){"use strict";function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}function r(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)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function o(){for(var e=0,t=0,n=arguments.length;n>t;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;n>t;t++)for(var i=arguments[t],a=0,u=i.length;u>a;a++,o++)r[o]=i[a];return r}function i(e){var t={},n={},r=[],o={},i={},a=function(t,n,r){var o=e[t];return o?o=eu(o,/[, ]/,eu(o.toUpperCase(),/[, ]/)):(o=Qa[t],o||(o=eu(n," ",eu(n.toUpperCase()," ")),o=nu(o,r),Qa[t]=o)),o};e=e||{};var u=au(e.schema);e.verify_html===!1&&(e.valid_elements="*[*]");var c=uu(e.valid_styles),s=uu(e.invalid_styles,"map"),f=uu(e.valid_classes,"map"),l=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=a("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),p=a("non_empty_elements","td th iframe video audio object script pre code",m),h=a("move_caret_before_on_enter_elements","table",p),v=a("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),y=a("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",v),b=a("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");tu((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){i[e]=new RegExp("</"+e+"[^>]*>","gi")});var C=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},w=function(e){var n,o,i,a,u,c,s,f,l,d,m,g,p,h,v,y,b,w,x=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,N=/[*?+]/;if(e)for(e=iu(e,","),t["@"]&&(y=t["@"].attributes,b=t["@"].attributesOrder),n=0,o=e.length;o>n;n++)if(u=x.exec(e[n])){if(h=u[1],l=u[2],v=u[3],f=u[5],g={},p=[],c={attributes:g,attributesOrder:p},"#"===h&&(c.paddEmpty=!0),"-"===h&&(c.removeEmpty=!0),"!"===u[4]&&(c.removeEmptyAttrs=!0),y&&(vn(y,function(e,t){g[t]=e}),p.push.apply(p,b)),f)for(f=iu(f,"|"),i=0,a=f.length;a>i;i++)if(u=S.exec(f[i])){if(s={},m=u[1],d=u[2].replace(/[\\:]:/g,":"),h=u[3],w=u[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(d),s.required=!0),"-"===m){delete g[d],p.splice(ou(p,d),1);continue}h&&("="===h&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:d,value:w}),s.defaultValue=w),":"===h&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:d,value:w}),s.forcedValue=w),"<"===h&&(s.validValues=eu(w,"?"))),N.test(d)?(c.attributePatterns=c.attributePatterns||[],s.pattern=C(d),c.attributePatterns.push(s)):(g[d]||p.push(d),g[d]=s)}y||"@"!==l||(y=g,b=p),v&&(c.outputName=l,t[v]=c),N.test(l)?(c.pattern=C(l),r.push(c)):t[l]=c}},x=function(e){t={},r=[],w(e),tu(u,function(e,t){n[t]=e.children})},S=function(e){var r=/^(~)?(.+)$/;e&&(Qa.text_block_elements=Qa.block_elements=null,tu(iu(e,","),function(e){var i=r.exec(e),a="~"===i[1],u=a?"span":"div",c=i[2];if(n[c]=n[u],o[c]=u,a||(y[c.toUpperCase()]={},y[c]={}),!t[c]){var s=t[u];s=nu({},s),delete s.removeEmptyAttrs,delete s.removeEmpty,t[c]=s}tu(n,function(e,t){e[u]&&(n[t]=e=nu({},n[t]),e[c]=e[u])})}))},N=function(t){var r=/^([+
})},m=function(e,r){return e=to.grep(e,function(e){return!t.isUploaded(e.blobUri())}),fs.all(to.map(e,function(e){return t.isPending(e.blobUri())?d(e):f(e,n.handler,r)}))},g=function(e,t){return!n.url&&l(n.handler)?a():m(e,t)};return Ut(n.handler)===!1&&(n.handler=i),{upload:g}}function M(){var e=1,t=2,n={},r=function(e,t){return{status:e,resultUri:t}},o=function(e){return e in n},i=function(e){var t=n[e];return t?t.resultUri:null},a=function(t){return o(t)?n[t].status===e:!1},u=function(e){return o(e)?n[e].status===t:!1},c=function(t){n[t]=r(e,null)},s=function(e,o){n[e]=r(t,o)},f=function(e){delete n[e]},l=function(){n={}};return{hasBlobUri:o,getResultUri:i,isPending:a,isUploaded:u,markPending:c,markUploaded:s,removeFailed:f,destroy:l}}function F(e){var t={},n=function(e){return e?t[e]:t},r=function(e){return _n(t,e)},o=function(e,n){e&&("string"!=typeof e?to.each(e,function(e,t){o(t,e)}):(Lt(n)||(n=[n]),to.each(n,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof 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]=n))},i=function(e){return e&&t[e]&&delete t[e],t};return o(RT(e.dom)),o(Dm(e)),{get:n,has:r,register:o,unregister:i}}function U(e){var t=function(t,n){return wh(e,t,n)},n=ww,r=function(t){return c_(e,t).fold(yt(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})};return{walk:t,split:n,normalize:r}}var z,j,H,V,q,$,W,K,X,Y,G,J,Q,Z,et,tt,nt,rt,ot=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},it=function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)},at=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},ut=function(e,t){return ct(function(n,r){return e.eq(t(n),t(r))})},ct=function(e){return{eq:e}},st=ct(function(e,t){return e===t}),ft=st,lt=function(e){return ct(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,o=0;r>o;o++)if(!e.eq(t[o],n[o]))return!1;return!0})},dt=function(e,t){return ut(lt(e),function(e){return at(e,t)})},mt=function(e){return ct(function(t,n){var r=Object.keys(t),o=Object.keys(n);if(!dt(ft).eq(r,o))return!1;for(var i=r.length,a=0;i>a;a++){var u=r[a];if(!e.eq(t[u],n[u]))return!1}return!0})},gt=ct(function(e,t){if(e===t)return!0;var n=ot(e),r=ot(t);return n!==r?!1:it(n)?e===t:"array"===n?lt(gt).eq(e,t):"object"===n?mt(gt).eq(e,t):!1}),pt=function(){},ht=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},vt=function(e,t){return function(n){return e(t(n))}},yt=function(e){return function(){return e}},bt=function(e){return e},Ct=function(e){return function(t){return!e(t)}},wt=function(e){return function(){throw new Error(e)}},xt=yt(!1),St=yt(!0),Nt=function(){return Et},Et=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e){return e()},is:xt,isSome:xt,isNone:St,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:yt(null),getOrUndefined:yt(void 0),or:n,orThunk:t,map:Nt,each:pt,bind:Nt,exists:xt,forall:St,filter:Nt,equals:e,equals_:e,toArray:function(){return[]},toString:yt("none()")};return r}(),kt=function(e){var t=yt(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:St,isNone:xt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return kt(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:Et},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:fun
for(e=iu(e),n=e.length,t=iu(t);n--;)for(r=u[e[n]],o=0,i=t.length;i>o;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return Qa[e]?Qa[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 main 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",a="acronym applet basefont big font strike tt",r=[r,a].join(" "),tu(iu(a),function(e){c(e,"",r)}),i="center dir isindex noframes",n=[n,i].join(" "),o=[n,r].join(" "),tu(iu(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 main 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 r
},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?wc(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?wc(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return zc(e).append(this),this},prependTo:function(e){return zc(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Sc(this,e)},wrapAll:function(e){return Sc(this,e,!0)},wrapInner:function(e){return this.each(function(){zc(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){zc(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),zc(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(" ")?Pc(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var o=xc(r,e);if(o!==t){var i=r.className;o?r.className=Bc((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e}}),n)},hasClass:function(e){return xc(this[0],e)},each:function(e){return Pc(this,e)},on:function(e,t){return this.each(function(){pc.bind(this,e,t)})},off:function(e,t){return this.each(function(){pc.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?pc.fire(this,e.type,e):pc.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new zc(mc.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;n>t;t++)zc.find(e,this[t],r);return zc(r)},filter:function(e){return zc("function"==typeof e?Lc(this.toArray(),function(t,n){return e(n,t)}):zc.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof zc&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&zc(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}}),zc(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(o=t.getBoundingClientRect(),i=o.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:dc,sort:Array.prototype.sort,splice:Array.prototype.splice},to.extend(Ac,{extend:to.extend,makeArray:function(e){return bc(e)||e.nodeType?[e]:to.toArray(e)},inArray:Dc,isArray:to.isArray,each:Pc,trim:Bc,grep:Lc,find:fc,expr:fc.selectors,unique:fc.uniqueSort,text:fc.getText,contains:fc.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?zc.find.matchesSelector(t[0],e)?[t[0]]:[]:zc.find.matches(e,t)}});var Mc=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof zc&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&zc(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},Fc=function(e,t,n,r){var o=[];for(r instanceof zc&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&zc(e).is(r))break}o.push(e)}return o},Uc=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};Pc({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Mc(e,"parentNode")},next:function(e){return Uc(e,"nextSibling",1)},prev:function(e){return Uc(e,"previousSibling",1)},children:function(e){return Fc(e.firstChild,"nextSibling",1)},contents:function(e){return to.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){Ac.fn[e]=function(n){var r=this,o=[];r.each(function(){var e=t.call(o,this,n,o);e&&(zc.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(hc[e]||(o=zc.unique(o)),0===e.indexOf("parents"
},dl=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},ml=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},gl=function(e,t){return e.bottom-e.height/2<t.top?!0:e.top>t.bottom?!1:ml(t.top-e.bottom,e,t)},pl=function(e,t){return e.top>t.bottom?!0:e.bottom<t.top?!1:ml(t.bottom-e.top,e,t)},hl=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},vl=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},yl=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},bl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),Cl=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&bl.test(e)},wl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}},xl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}},Sl=Hi,Nl=Vi,El=ji,kl=Mi,_l=Ti(["script","style","textarea"]),Tl=Ti(["img","input","textarea","hr","iframe","video","audio","object"]),Rl=Ti(["table"]),Al=Kf,Dl=function(e){return Al(e)?!1:kl(e)?_l(e.parentNode)?!1:!0:Tl(e)||El(e)||Rl(e)||Bl(e)},Ol=function(e){return _i(e)&&"true"===e.getAttribute("unselectable")},Bl=function(e){return Ol(e)===!1&&Nl(e)},Pl=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Bl(e))return!1;if(Sl(e))return!0}return!0},Ll=function(e){return Bl(e)?en(gn(e.getElementsByTagName("*")),function(e,t){return e||Sl(t)},!1)!==!0:!1},Il=function(e){return Tl(e)||Ll(e)},Ml=function(e,t){return Dl(e)&&Pl(e,t)},Fl=_i,Ul=Dl,zl=Ri("display","block table"),jl=Ri("float","left right"),Hl=xl(Fl,Ul,Ct(jl)),Vl=Ct(Ri("white-space","pre pre-line pre-wrap")),ql=Mi,$l=ji,Wl=Ts.nodeIndex,Kl=yl,Xl=function(e){return"createRange"in e?e.createRange():Ts.DOM.createRng()},Yl=function(e){return e&&/[\r\n\t ]/.test(e)},Gl=function(e){return!!e.setStart&&!!e.setEnd},Jl=function(e){var t,n=e.startContainer,r=e.startOffset;return Yl(e.toString())&&Vl(n.parentNode)&&Mi(n)&&(t=n.data,Yl(t[r-1])||Yl(t[r+1]))?!0:!1},Ql=function(e){var t=e.ownerDocument,n=Xl(t),r=t.createTextNode(su),o=e.parentNode;o.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=fl(n.getBoundingClientRect());return o.removeChild(r),i},Zl=function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Mi(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),td(i)}return null},ed=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},td=function(e){var t,n=e.getClientRects();return t=fl(n.length>0?n[0]:e.getBoundingClientRect()),!Gl(e)&&$l(e)&&ed(t)?Ql(e):ed(t)&&Gl(e)?Zl(e):t},nd=function(e,t){var n=ll(e,t);return n.width=1,n.right=n.left+1,n},rd=function(e){var t,n,r=[],o=function(e){0!==e.height&&(r.length>0&&dl(e,r[r.length-1]
if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Lh=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0},Ih=function(e,t){var n=Th(e);n.length>0?Yt(n,function(n){var r=n.dom(),o=e.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),t(o,!0)}):t(e.selection.getRng(),!1)},Mh=function(e,t,n){var r=Md(e,t);n(r),e.moveToBookmark(r)},Fh=_(bo,"text"),Uh=function(e){return Fh.get(e)},zh=function(e){return bo(e)&&Uh(e)===cu},jh=function(e,t,n,r){return Fo(t).fold(function(){return"skipping"},function(o){return"br"===r||zh(t)?"valid":Sf(t)?"existing":hp(t)?"caret":Xp(e,n,r)&&Xp(e,go(o),n)?"valid":"invalid-child"})},Hh=function(e,t){var n=yh(e,t,[{inline:!0}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},Vh=function(e,t,n,o){var i=t.uid,a=void 0===i?Af("mce-annotation"):i,u=r(t,["uid"]),c=uo.fromTag("span",e);cf(c,bf()),Wi(c,""+wf(),a),Wi(c,""+Cf(),n);var s=o(a,u),f=s.attributes,l=void 0===f?{}:f,d=s.classes,m=void 0===d?[]:d;return Ki(c,l),Df(c,m),c},qh=function(e,t,n,r,o){var i=[],a=Vh(e.getDoc(),o,n,r),u=Ms(Tt.none()),c=function(){u.set(Tt.none())},s=function(){return u.get().getOrThunk(function(){var e=If(a);return i.push(e),u.set(Tt.some(e)),e})},f=function(e){Yt(e,l)},l=function(t){var n=jh(e,t,"span",go(t));switch(n){case"invalid-child":c();var r=$o(t);f(r),c();break;case"valid":var o=s();ai(t,o)}},d=function(e){var t=Xt(e,uo.fromDom);f(t)};return wh(e.dom,t,function(e){c(),d(e)}),i},$h=function(e,t,n,r){e.undoManager.transact(function(){var o=e.selection,i=o.getRng(),a=Th(e).length>0;if(i.collapsed&&!a&&Hh(e,i),o.getRng().collapsed&&!a){var u=Vh(e.getDoc(),r,t,n.decorate);Pf(u,su),o.getRng().insertNode(u.dom()),o.select(u.dom())}else Mh(o,!1,function(){Ih(e,function(o){qh(e,o,t,n.decorate,r)})})})},Wh=function(e){var t=Tf();_f(e,t);var n=kf(e);return{register:function(e,n){t.register(e,n)},annotate:function(n,r){t.lookup(n).each(function(t){$h(e,n,t,r)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(t){xf(e,Tt.some(t)).each(function(e){var t=e.elements;Yt(t,li)})},getAll:function(t){var n=Ef(e,t);return yn(n,function(e){return Xt(e,function(e){return e.dom()})})}}},Kh=/^[ \t\r\n]*$/,Xh={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Yh=function(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}},Gh=function(e){if(!Kh.test(e.value))return!1;var t=e.parent;return t&&("span"!==t.name||t.attr("style"))&&/^[ ]+$/.test(e.value)?!1:!0},Jh=function(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Qh=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=new e(t,Xh[t]||1);return n&&vn(n,function(e,t){r.attr(t,e)}),r},e.prototype.replace=function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},e.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return void 0!==e&&null!==e&&vn(e,function(e,t){r.attr(t,e)}),r;if(n=r.attributes){if(void 0!==t){if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),r}return r}if(e in n.map){for(var o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}return n.map[e]}},e.prototype.clone=function(){var t,n=this,r=new e(n.name,n.type);if(t=n.attributes){var o=[];o.map={};for(var i=0,a=t.length;a>i;i++){var u=t[i];"id"!==u.name&&(o[o.length]={name:u.name,value:u.value},o.map[u.name]=u.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},e.prototype.wrap=function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},e.prototype.unwrap=function(){for(va
},rw=function(e){var t=e.getBody();return t&&tw(uo.fromDom(t))},ow=function(e){return Zb().filter(function(t){return!qC(t.dom())&&$C(e,t.dom())}).isSome()},iw=function(e){return e.inline?rw(e):nw(e)},aw=function(e){return iw(e)||ow(e)},uw=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&iw(e)===!1&&OC(e).each(function(t){e.selection.setRng(t),r=t});var o=GC(e,t.getNode());return e.$.contains(n,o)?(ew(o),ZC(e,r),void cw(e)):(e.inline||(Hr.opera||ew(n),e.getWin().focus()),(Hr.gecko||e.inline)&&(ew(n),ZC(e,r)),void cw(e))},cw=function(e){return e.editorManager.setActive(e)},sw=function(e,t){e.removed||(t?cw(e):uw(e))},fw=function(e,t){t(e),e.firstChild&&fw(e.firstChild,t),e.next&&fw(e.next,t)},lw=function(e,t,n){var r={},o={},i=[];n.firstChild&&fw(n.firstChild,function(n){Yt(e,function(e){e.name===n.name&&(r[e.name]?r[e.name].nodes.push(n):r[e.name]={filter:e,nodes:[n]})}),Yt(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]})})});for(var a in r)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i},dw=function(e,t,n){var r=lw(e,t,n);Yt(r,function(e){Yt(e.filter.callbacks,function(t){t(e.nodes,e.filter.name,{})})})},mw="html",gw=function(e){return e instanceof Qh},pw=function(e){iw(e)&&mp(e.getBody()).each(function(t){var n=t.getNode(),r=Pi(n)?mp(n).getOr(t):t;e.selection.setRng(r.toRange())})},hw=function(e,t){e.dom.setHTML(e.getBody(),t),pw(e)},vw=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=Gd(e),o&&e.schema.isValidChild(t.nodeName.toLowerCase(),o.toLowerCase())?(n=i,n=e.dom.createHTML(o,Jd(e),n)):n||(n='<br data-mce-bogus="1">'),hw(e,n),e.fire("SetContent",r)):("raw"!==r.format&&(n=tv({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=Aa(uo.fromDom(t))?n:to.trim(n),hw(e,r.content),r.no_events||e.fire("SetContent",r)),r.content},yw=function(e,t,n,r){dw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=tv({validate:e.validate},e.schema).serialize(n);return r.content=Aa(uo.fromDom(t))?o:to.trim(o),hw(e,r.content),r.no_events||e.fire("SetContent",r),n},bw=function(e,t,n){return n.format=n.format?n.format:mw,n.set=!0,n.content=gw(t)?"":t,gw(t)||n.no_events||(e.fire("BeforeSetContent",n),t=n.content),Tt.from(e.getBody()).fold(yt(t),function(r){return gw(t)?yw(e,r,t,n):vw(e,r,t,n)})},Cw=function(e,t){return e.splitText(t)},ww=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Mi(t)?n>0&&n<t.nodeValue.length&&(r=Cw(t,n),t=r.previousSibling,o>n?(o-=n,t=r=Cw(r,o).previousSibling,o=r.nodeValue.length,n=0):o=0):(Mi(t)&&n>0&&n<t.nodeValue.length&&(t=Cw(t,n),n=0),Mi(r)&&o>0&&o<r.nodeValue.length&&(r=Cw(r,o).previousSibling,o=r.nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},xw=Qp,Sw=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(r[o].inherit===!1&&e.dom.is(t,r[o].selector))return!0;return!1},Nw=function(e,t,n,r){var o=e.dom.getRoot();return t===o?!1:(t=e.dom.getParent(t,function(t){return Sw(e,t,n)?!0:t.parentNode===o||!!_w(e,t,n,r,!0)}),_w(e,t,n,r))},Ew=function(e,t,n){return xw(t,n.inline)?!0:xw(t,n.block)?!0:n.selector?1===t.nodeType&&e.is(t,n.selector):void 0},kw=function(e,t,n,r,o,i){var a,u,c,s=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(s)if("undefined"==typeof s.length){for(a in s)if(s.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):eh(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!xw(u,Zp(e,Jp(s[a],i),a)))return}}else for(c=0;c<s.length;c++)if("attributes"===r?e.getAttrib(t,s[c]):eh(e,t,s[c]))return n;return n},_w=function(e,t,n,r,o){var i,a,u,c,s=e.formatter.get(n),f=e.dom;if(s&&t)for(a=0;a<s.length;a++)if(i=s[a],Ew(e.dom,t,i)&&kw(f,t,i,"attributes",o,r)&&kw(f,t,i,"styles",o,r)){if(c=i.classes)for(u=0;u<c.length;u++)if(!e.dom.hasClass(
},jN=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},HN=function(e){return e.fire("PreInit")},VN=function(e){return e.fire("PostRender")},qN=function(e){return e.fire("Init")},$N=function(e,t){return e.fire("PlaceholderToggle",{state:t})},WN=function(e,t,n){return e.fire(t,n)},KN=Ts.DOM,XN=function(e){KN.setStyle(e.id,"display",e.orgDisplay)},YN=function(e){return Tt.from(e).each(function(e){return e.destroy()})},GN=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)},JN=function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),KN.unbind(t,"submit reset",e.formEventDelegate))},QN=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&&KN.remove(o.nextSibling),MN(e),e.editorManager.remove(e),!e.inline&&r&&XN(e),FN(e),KN.remove(e.getContainer()),YN(t),YN(n),e.destroy()}},ZN=function(e,t){var n=e.selection,r=e.dom;if(!e.destroyed){if(!t&&!e.removed)return void e.remove();t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),YN(n),YN(r)),JN(e),GN(e),e.destroyed=!0}},eE=Object.prototype.hasOwnProperty,tE=function(e,t){var n=Pt(e)&&Pt(t);return n?rE(e,t):t},nE=function(e){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var a in i)eE.call(i,a)&&(r[a]=e(r[a],i[a]))}return r}},rE=nE(tE),oE=function(e,t){return{sections:yt(e),settings:yt(t)}},iE=Br().deviceType,aE=iE.isTouch(),uE=iE.isPhone(),cE=iE.isTablet(),sE=["lists","autolink","autosave"],fE={table_grid:!1,object_resizing:!1,resize:!1},lE=function(e){var t=Lt(e)?e.join(" "):e,n=Xt(Bt(t)?t.split(" "):[],wr);return Qt(n,function(e){return e.length>0})},dE=function(e){return Qt(e,t(Wt,sE))},mE=function(e,t){var n=xn(t,function(t,n){return Wt(e,n)});return oE(n.t,n.f)},gE=function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=r.hasOwnProperty(t)?r[t]:{};return to.extend({},n,o)},pE=function(e,t){return e.sections().hasOwnProperty(t)},hE=function(e,t,n){var r=e.sections();return pE(e,t)&&r[t].theme===n},vE=function(e,t){return pE(e,t)?e.sections()[t]:{}},yE=function(e,t){return kn(e,"toolbar_mode").orThunk(function(){return kn(e,"toolbar_drawer").map(function(e){return e===!1?"wrap":e})}).getOr(t)},bE=function(e,t,n,r,o){var i={id:t,theme:"silver",toolbar_mode:yE(e,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return Fn(Fn({},i),r?fE:{})},CE=function(e,t){var n={resize:!1,toolbar_mode:yE(e,"scrolling"),toolbar_sticky:!1},r={menubar:!1};return Fn(Fn(Fn({},fE),n),t?r:{})},wE=function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?to.extend({},e.external_plugins,n):n},xE=function(e,t){return[].concat(lE(e)).concat(lE(t))},SE=function(e,t,n,r){var o=lE(n.forced_plugins),i=lE(r.plugins),a=vE(t,"mobile"),u=a.plugins?lE(a.plugins):i,c=e&&hE(t,"mo
}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,r,o,i,a,u,c,s=e.length,f=n.getValidClasses();s--;){for(t=e[s],r=t.attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],c=!1,u=f["*"],u&&u[i]&&(c=!0),u=f[t.name],!c&&u&&u[i]&&(c=!0),c&&(a&&(a+=" "),a+=i);a.length||(a=null),t.attr("class",a)}}),Q_(e,t)},eT=to.makeMap,tT=to.each,nT=to.explode,rT=to.extend,oT=function(e,t){void 0===t&&(t=i());var n={},r=[],o={},a={};e=e||{},e.validate="validate"in e?e.validate:!0,e.root_name=e.root_name||"body";var u=function(e){var n,r,o,i,a,u,s,f,l,d,m,g=eT("tr,td,th,tbody,thead,tfoot,table"),p=t.getNonEmptyElements(),h=t.getWhiteSpaceElements(),v=t.getTextBlockElements(),y=t.getSpecialElements();for(n=0;n<e.length;n++)if(r=e[n],r.parent&&!r.fixed)if(v[r.name]&&"li"===r.parent.name){for(d=r.next;d&&v[d.name];)d.name="li",d.fixed=!0,r.parent.insert(d,r.parent),d=d.next;r.unwrap(r)}else{for(i=[r],o=r.parent;o&&!t.isValidChild(o.name,r.name)&&!g[o.name];o=o.parent)i.push(o);if(o&&i.length>1){for(i.reverse(),a=u=c(i[0].clone()),l=0;l<i.length-1;l++){for(t.isValidChild(u.name,i[l].name)?(s=c(i[l].clone()),u.append(s)):s=u,f=i[l].firstChild;f&&f!==i[l+1];)m=f.next,s.append(f),f=m;u=s}K_(t,p,h,a)?o.insert(r,i[0],!0):(o.insert(a,i[0],!0),o.insert(r,a)),o=i[0],(K_(t,p,h,o)||$_(o,"br"))&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(d=r.prev,d&&("ul"===d.name||"ul"===d.name)){d.append(r);continue}if(d=r.next,d&&("ul"===d.name||"ul"===d.name)){d.insert(r,d.firstChild,!0);continue}r.wrap(c(new Qh("ul",1)));continue}t.isValidChild(r.parent.name,"div")&&t.isValidChild("div",r.name)?r.wrap(c(new Qh("div",1))):y[r.name]?r.empty().remove():r.unwrap()}}},c=function(e){var t,i,u;i=e.name,i in n&&(u=o[i],u?u.push(e):o[i]=[e]),t=r.length;for(;t--;)i=r[t].name,i in e.attributes.map&&(u=a[i],u?u.push(e):a[i]=[e]);return e},s=function(e,t){tT(nT(e),function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)})},f=function(){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push({name:t,callbacks:n[t]});return e},l=function(e,t){tT(nT(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]})})},d=function(){return[].concat(r)},m=function(i,c){var s,f,l,d,m,g,p,h,v,y=[],b=function(e){return e===!1?"":e===!0?"p":e};c=c||{},o={},a={};var C=rT(eT("script,style,head,html,body,title,meta,param"),t.getBlockElements()),w=t.getNonEmptyElements(),x=t.children,S=e.validate,N="forced_root_block"in c?c.forced_root_block:e.forced_root_block,E=b(N),k=t.getWhiteSpaceElements(),_=/^[ \t\r\n]+/,T=/[ \t\r\n]+$/,R=/[ \t\r\n]+/g,A=/^[ \t\r\n]+$/;h=k.hasOwnProperty(c.context)||k.hasOwnProperty(e.root_name);var D=function(){var n,r,o=I.firstChild,i=function(e){e&&(o=e.firstChild,o&&3===o.type&&(o.value=o.value.replace(_,"")),o=e.lastChild,o&&3===o.type&&(o.value=o.value.replace(T,"")))};if(t.isValidChild(I.name,E.toLowerCase())){for(;o;)n=o.next,3===o.type||1===o.type&&"p"!==o.name&&!C[o.name]&&!o.attr("data-mce-type")?r?r.append(o):(r=O(E,1),r.attr(e.forced_root_block_attrs),I.insert(r,o),r.append(o)):(i(r),r=null),o=n;i(r)}},O=function(e,t){var r,i=new Qh(e,t);return e in n&&(r=o[e],r?r.push(i):o[e]=[i]),i},B=function(e){var n,r,o,i,a=t.getBlockElements();for(n=e.prev;n&&3===n.type;){if(o=n.value.replace(T,""),o.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}},P=function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n},L=dv({validate:S,allow_html_data_urls:e.allow_html_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:P(t.getSelfClosingElements()),cdata:function(e){v.append(O("#cdata",4)).value=e},text:function(e,t){var n;h||(e=e.replace(R," "),X_(v.lastChild,C)&&(e=e.replace(_,""))),0!==e.length&&(n=O("#text",3),n.raw=!!t,v.append(n).value=e)},comment:function(e){v.append(O("#comment",8)).value=e},pi:function(e,t){v.a
},QR=function(e,n,r,o){var i=RR(e,o),a=HR(n,r,i);return HR(n,r,i).bind(t(JR,e)).orThunk(function(){return GR(e,n,r,a,o)})},ZR=(t(QR,!1),t(QR,!0),function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)}),eA=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},tA=function(e,t,n){return CR(t,n).map(function(t){return ZR(e,t),n})},nA=function(e,n,r){var o=e.getBody(),i=id.fromRangeStart(e.selection.getRng()),a=t(SR,e),u=QR(r,a,o,i);return u.bind(function(t){return tA(e,n,t)})},rA=function(e,n,r){var o=Xt(mf(uo.fromDom(n.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(e){return e.dom()}),i=Qt(o,e),a=Qt(r,e);Yt(sn(i,a),t(eA,!1)),Yt(sn(a,i),t(eA,!0))},oA=function(e,t){if(e.selection.isCollapsed()&&e.composing!==!0&&t.get()){var n=id.fromRangeStart(e.selection.getRng());id.isTextPosition(n)&&TR(n)===!1&&(ZR(e,ag(t.get(),n)),t.set(null))}},iA=function(e,t,n,r){if(t.selection.isCollapsed()){var o=Qt(r,e);Yt(o,function(){var r=id.fromRangeStart(t.selection.getRng());HR(e,t.getBody(),r).bind(function(e){return tA(t,n,e)})})}},aA=function(e,t,n){return function(){return Am(e)?nA(e,t,n).isSome():!1}},uA=function(e,t){return function(){return Am(t)?cR(e,t):!1}},cA=function(e){var n=Ms(null),r=t(SR,e);return e.on("NodeChange",function(t){!Am(e)||Hr.browser.isIE()&&t.initial||(rA(r,e.dom,t.parents),oA(e,n),iA(r,e,n,t.parents))}),n},sA=t(uA,!0),fA=t(uA,!1);!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(p_||(p_={}));var lA,dA=function(e,t){return e===od.Backwards?cn(t):t},mA=function(e,t,n){return e===od.Forwards?t.next(n):t.prev(n)},gA=function(e,t,n,r){return ji(r.getNode(t===od.Forwards))?p_.Br:_g(n,r)===!1?p_.Block:p_.Wrap},pA=function(e,t,n,r){for(var o,i=Zg(n),a=r,u=[];a&&(o=mA(t,i,a));){if(ji(o.getNode(!1)))return t===od.Forwards?{positions:dA(t,u).concat([o]),breakType:p_.Br,breakAt:Tt.some(o)}:{positions:dA(t,u),breakType:p_.Br,breakAt:Tt.some(o)};if(o.isVisible()){if(e(a,o)){var c=gA(n,t,a,o);return{positions:dA(t,u),breakType:c,breakAt:Tt.some(o)}}u.push(o),a=o}else a=o}return{positions:dA(t,u),breakType:p_.Eol,breakAt:Tt.none()}},hA=function(e,t,n,r){return t(n,r).breakAt.map(function(r){var o=t(n,r).positions;return e===od.Backwards?o.concat(r):[r].concat(o)}).getOr([])},vA=function(e,t){return en(e,function(e,n){return e.fold(function(){return Tt.some(n)},function(r){return al(dn(r.getClientRects()),dn(n.getClientRects()),function(e,o){var i=Math.abs(t-e.left),a=Math.abs(t-o.left);return i>=a?n:r}).or(e)})},Tt.none())},yA=function(e,t){return dn(t.getClientRects()).bind(function(t){return vA(e,t.left)})},bA=t(pA,k.isAbove,-1),CA=t(pA,k.isBelow,1),wA=function(e,t){return bA(e,t).breakAt.isNone()},xA=function(e,t){return CA(e,t).breakAt.isNone()},SA=t(hA,-1,bA),NA=t(hA,1,CA),EA=function(e){return mp(e).map(function(t){return[t].concat(CA(e,t).positions)}).getOr([])},kA=function(e){return gp(e).map(function(t){return bA(e,t).positions.concat(t)}).getOr([])},_A=function(e){var t=function(t){return Xt(t,function(t){return t=fl(t),t.node=e,t})};if(_i(e))return t(e.getClientRects());if(Mi(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},TA=function(e){return an(e,_A)};!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(lA||(lA={}));var RA,AA,DA=function(e,t,n,r){for(;r=Eg(r,e,Ml,t);)if(n(r))return},OA=function(e,t,n,r,o,i){var a=0,u=[],c=function(r){var i,c,f;for(f=TA([r]),-1===e&&(f=f.reverse()),i=0;i<f.length;i++)if(c=f[i],!n(c,s)){if(u.length>0&&t(c,Mn(u))&&a++,c.line=a,o(c))return!0;u.push(c)}},s=Mn(i.getClientRects());if(!s)return u;var f=i.getNode();return c(f),DA(e,r,c,f),u},BA=function(e,t){return t.line>e},PA=function(e,t){return t.line===e},LA=t(OA,lA.Up,gl,pl),IA=t(OA,lA.Down,pl,gl),MA=function(e,t,n,r){var o,i,a,u,c,s=Zg(t),f=[],l=0,d=function(t){return Mn(1===e?t.getClientRects():t.getClientRects())};1===e?(o=s.next,i=pl,a=gl,u=id.after(r)):(o=s.prev,i=gl,a=pl,u=id.before(r));
}else if(Mi(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?u.prev():u.next()}return!0},y=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==x?h(f):h(),tm(e)&&yP(d,c)&&d.isEmpty(i)?a=d.split(c,i):d.insertAfter(a,i),tP(e,a)};c_(d,p).each(function(e){p.setStart(e.startContainer,e.startOffset),p.setEnd(e.endContainer,e.endOffset)}),r=p.startContainer,o=p.startOffset,f=Gd(e);var b=!(!t||!t.shiftKey),C=!(!t||!t.ctrlKey);_i(r)&&r.hasChildNodes()&&(l=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=l&&Mi(r)?r.nodeValue.length:0);var w=SP(d,r);if(w){(f&&!b||!f&&b)&&(r=kP(e,f,p,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var x=c?c.nodeName.toUpperCase():"";return"LI"!==x||C||(i=c,c=c.parentNode,s=x),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?void dP(e,h,c,i,f):void(f&&i===e.getBody()||(f=f||"P",$f(i)?(a=rl(i),d.isEmpty(i)&&hP(i),EP(e,a),tP(e,a)):v()?y():v(!0)?(a=i.parentNode.insertBefore(h(),i),tP(e,vP(i,"HR")?a:i)):(n=wP(p).cloneRange(),n.setEndAfter(i),u=n.extractContents(),mP(u),xP(u),a=u.firstChild,d.insertAfter(u,i),bP(d,g,a),_P(d,i),d.isEmpty(i)&&hP(i),a.normalize(),d.isEmpty(a)?(d.remove(a),y()):(EP(e,a),tP(e,a))),d.setAttrib(a,"id",""),e.fire("NewBlock",{newBlock:a})))}},RP=function(e,t,n){for(var r,o=new jc(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0},AP=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},DP=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)},OP=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();c_(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var f=i.getParent(c,i.isBlock),l=f?i.getParent(f.parentNode,i.isBlock):null,d=l?l.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(f=l),c&&3===c.nodeType&&u>=c.nodeValue.length&&(RP(e.schema,c,f)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),sd(i,a,n),AP(i,o,n),DP(i,o,n,r),e.undoManager.add()},BP=function(e,t){var n=uo.fromTag("br");ni(uo.fromDom(t),n),e.undoManager.add()},PP=function(e,t){IP(e.getBody(),t)||ri(uo.fromDom(t),uo.fromTag("br"));var n=uo.fromTag("br");ri(uo.fromDom(t),n),AP(e.dom,e.selection,n.dom()),DP(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},LP=function(e){return ji(e.getNode())},IP=function(e,t){return LP(id.after(t))?!0:lp(e,id.after(t)).map(function(e){return ji(e.getNode())}).getOr(!1)},MP=function(e){return e&&"A"===e.nodeName&&"href"in e},FP=function(e){return e.fold(yt(!1),MP,MP,yt(!1))},UP=function(e){var n=t(SR,e),r=id.fromRangeStart(e.selection.getRng());return HR(n,e.getBody(),r).filter(FP)},zP=function(e,n){n.fold(pt,t(BP,e),t(PP,e),pt)},jP=function(e,n){var r=UP(e);r.isSome()?r.each(t(zP,e)):OP(e,n)},HP=function(e,t){return rP(e).filter(function(e){return t.length>0&&ko(uo.fromDom(e),t)}).isSome()},VP=function(e){return HP(e,Qd(e))},qP=function(e){return HP(e,Zd(e))},$P=us.generate([{br:[]},{block:[]},{none:[]}]),WP=function(e){return qP(e)},KP=function(e){return function(t){var n=""===Gd(t);return n===e}},XP=function(e){return function(t){return iP(t)===e}},YP=function(e,t){return function(n){var r=oP(n)===e.toUpperCase();return r===t}},GP=function(e){return YP("pre",e)},JP=function(){return YP("summary",!0)},QP=function(e){return function(t){return Yd(t)===e}},ZP=function(e){return VP(e)},eL=function(e,t){return t},tL=function(e){var t=Gd(e),n=nP(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t?t:"P")},nL=function(e,t){return function(n,r){var o=en(e,function(e,t){return e&&t(n,r)},!0);return o?Tt.some(t):Tt.none()}},rL=function(e,t){return OR([nL([WP],$P.none()),nL([JP()],$P.br()),nL([GP(!0),QP
u.disabled=!0,t.readonly=!!r.readonly,t.readonly||(t.inline&&"static"===FI.getStyle(u,"position",!0)&&(u.style.position="relative"),u.contentEditable=t.getParam("content_editable_state",!0)),u.disabled=!1,t.editorUpload=xT(t),t.schema=i(r),t.dom=Ts(a,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:r.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:gm(t),referrerPolicy:pm(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=qI(t),t.serializer=vT(VI(t),t),t.selection=__(t.dom,t.getWin(),t.serializer,t),t.annotator=Wh(t),t.formatter=MT(t),t.undoManager=zT(t),t._nodeChangeDispatcher=new GL(t),t._selectionOverrides=II(t),ZT(t),ZL(t),fN(t)||nI(t),YL(t),iR(t),XT(t),HN(t),lN(t).fold(function(){YI(t,!1)},function(e){t.setProgressState(!0),e.then(function(e){t.setProgressState(!1),YI(t,e)})})},JI=Ts.DOM,QI=function(t,n){if(e.document.domain!==e.window.location.hostname&&Hr.browser.isIE()){var r=CT("mce");t[r]=function(){GI(t)};var o='javascript:(function(){document.open();document.domain="'+e.document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+r+"(true);})()";return JI.setAttrib(n,"src",o),!0}return!1},ZI=function(e,t,n,r){var o=uo.fromTag("iframe");return Ki(o,r),Ki(o,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),cf(o,"tox-edit-area__iframe"),o},eM=function(e){var t=qd(e)+"<html><head>";$d(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=Wd(e),r=Kd(e);return Xd(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Xd(e)+'" />'),t+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'"><br></body></html>'},tM=function(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),r=ZI(e.id,n,t.height,Vd(e)).dom();r.onload=function(){r.onload=null,e.fire("load")};var o=QI(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=eM(e),JI.add(t.iframeContainer,r),o},nM=function(e,t){var n=tM(e,t);t.editorContainer&&(JI.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=JI.isHidden(t.editorContainer)),e.getElement().style.display="none",JI.setAttrib(e.id,"aria-hidden","true"),n||GI(e)},rM=Ts.DOM,oM=function(e,t,n){var r=$E.get(n),o=$E.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=to.trim(n),r&&-1===to.inArray(t,n)){if(to.each($E.dependencies(n),function(n){oM(e,t,n)}),e.plugins[n])return;try{var i=new r(e,o,e.$);e.plugins[n]=i,i.init&&(i.init(e,o),t.push(n))}catch(a){nk(e,n,a)}}},iM=function(e){return e.replace(/^\-/,"")},aM=function(e){var t=[];to.each(Wm(e).split(/[ ,]/),function(n){oM(e,t,iM(n))})},uM=function(e){var t=to.trim(cm(e)),n=e.ui.registry.getAll().icons,r=Fn(Fn({},OE.get("default").icons),OE.get(t).icons);vn(r,function(t,r){_n(n,r)||e.ui.registry.addIcon(r,t)})},cM=function(e){var t=Tm(e);if(Bt(t)){e.settings.theme=iM(t);var n=WE.get(t);e.theme=new n(e,WE.urls[t]),e.theme.init&&e.theme.init(e,WE.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}},sM=function(e){return e.theme.renderUI()},fM=function(e){var t=e.getElement(),n=Tm(e),r=n(e,t);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||e.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||e.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:t.offsetHeight,r},lM=function(e){return{editorContainer:e,iframeContainer:e}},dM=function(e){var t=rM.create("div");return rM.insertAfter(t,e),lM(t)},mM=function(e){var t=e.getElement();return e.inline?lM(null):dM(t)},gM=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,Bt(Tm(e))?sM(e):Ut(Tm(e))?fM(e):mM(e)},pM=function(e){e.fire("ScriptsLoaded"),uM(e),cM(e),aM(e);var t=gM(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,ak(e),e.inline?GI(e):nM(e,t)},hM=Ts.DOM,vM=function(e){return"-"
var o=this,i=DF(o);this.mode=i,this.setMode=i.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=zc.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}return e.prototype.render=function(){kM(this)},e.prototype.focus=function(e){sw(this,e)},e.prototype.hasFocus=function(){return iw(this)},e.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this,i=o.settings[e];return i?(o.callbackLookup&&(r=o.callbackLookup[e])&&(i=r.func,r=r.scope),"string"==typeof i&&(r=i.replace(/\.\w+$/,""),r=r?KF(r):0,i=KF(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[e]={func:i,scope:r}),i.apply(r||o,t)):void 0},e.prototype.translate=function(e){return Gs.translate(e)},e.prototype.getParam=function(e,t,n){return AE(this,e,t,n)},e.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},e.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},e.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},e.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},e.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},e.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},e.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},e.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},e.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},e.prototype.show=function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(qF.show(e.getContainer()),qF.hide(e.id)),e.load(),e.fire("show"))},e.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(XF&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(qF.hide(e.getContainer()),qF.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},e.prototype.isHidden=function(){return!!this.hidden},e.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},e.prototype.load=function(e){var t,n=this,r=n.getElement();if(n.removed)return"";if(r){e=e||{},e.load=!0;var o=Ii(r)?r.value:r.innerHTML;return t=n.setContent(o,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,t}},e.prototype.save=function(e){var t,n,r=this,o=r.getElement();return o&&r.initialized&&!r.removed?(e=e||{},e.save=!0,e.element=o,t=e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Ii(o)?o.value=t:((e.is_removing||!r.inline)&&(o.innerHTML=t),(n=qF.getParent(r.id,"form"))&&WF(n.elements,function(e){return e.name===r.id?(e.value=t,!1):void 0})),e.element=o=null,e.set_dirty!==!1&&r.setDirty(!1),t):void 0},e.prototype.setContent=function(e,t){return PN(this,e,t)},e.prototype.getContent=function(e){return BN(this,e)},e.prototype.insertContent=function(e,t){t&&(e=$F({content:e},t)),this.execCommand("mceInsertContent",!1,e)},e.prototype.resetContent=function(e){void 0===e?PN(this,this.startContent,{format:"raw"}):PN(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},e.prototype.isDirty=function(){return!this.isNotDirty},e.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},e.prototype.getContainer=function(){var e=this;return e.container||(e.container=qF.get(e.editorContainer||e.id+"_parent")),e.container},e.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},e.prototype.getElement=function(){return this.targetElm||(this.targetElm=qF.get(this.id)),this.targetElm},e.prototype.getWin=function(){var e,t=this;return t.contentWindow||(e=t.iframeElement,e&&(t.contentWindow=e.contentWindow)),t.contentWindow},e.prototype.getDoc=function(){var e,t=this;return t.contentDocument||(e=t.getWin(),e
;/*!node_modules/tinymce/themes/silver/theme.js*/
amis.define("node_modules/tinymce/themes/silver/theme",function(){!function(n){"use strict";function t(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var r=t.concat(e);return n.apply(null,r)}}function e(n,t){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]]);return e}function o(){for(var n=0,t=0,e=arguments.length;e>t;t++)n+=arguments[t].length;for(var o=Array(n),r=0,t=0;e>t;t++)for(var i=arguments[t],u=0,a=i.length;a>u;u++,r++)o[r]=i[u];return o}function r(n,t){var e=function(t,e){if(!Rt(e)&&!e.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+e);var o=t.dom();Ts(o)&&(o.style[n]=e+"px")},o=function(e){var o=t(e);if(0>=o||null===o){var r=Gs(e,n);return parseFloat(r)||0}return o},r=o,i=function(n,t){return Qt(t,function(t,e){var o=Gs(n,e),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r},0)},u=function(n,t,e){var o=i(n,e),r=t>o?t-o:0;return r};return{set:e,get:o,getOuter:r,aggregate:i,max:u}}function i(n,t,e,o,r){return n(e,o)?St.some(e):It(r)&&r(e)?St.none():t(e,o,r)}function u(n,t){var e=function(e){if(!n(e))throw new Error("Can only get "+t+" value of a "+t+" node");return o(e).getOr("")},o=function(t){return n(t)?St.from(t.dom().nodeValue):St.none()},r=function(e,o){if(!n(e))throw new Error("Can only set raw "+t+" value of a "+t+" node");e.dom().nodeValue=o};return{get:e,getOption:o,set:r}}function a(n){return void 0!==n.uid}function c(n,t,e){var o=t.backstage,r=function(n){switch(n){case"bc-bc":return RS;case"tc-tc":return IS;case"tc-bc":return fd;case"bc-tc":default:return ld}},i=function(n){Yt(n,function(n){return n.moveTo(0,0)})},u=function(n){n.length>0&&(se(n).each(function(n){return n.moveRel(null,"banner")}),Yt(n,function(t,e){e>0&&t.moveRel(n[e-1].getEl(),"bc-tc")}))},a=function(n){i(n),u(n)},c=function(n,i){var u=!n.closeButton&&n.timeout&&(n.timeout>0||n.timeout<0),a=function(){i(),CS.hide(s)},c=mf(XS.sketch({text:n.text,level:jt(["success","error","warning","warn","info"],n.type)?n.type:void 0,progress:n.progressBar===!0,icon:St.from(n.icon),closeButton:!u,onAction:a,iconProvider:o.shared.providers.icons,translationProvider:o.shared.providers.translate})),s=mf(CS.sketch(ht({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:t.backstage.shared.getSink,fireDismissalEventInstead:{}},o.shared.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));return e.add(s),n.timeout>0&&VS.setTimeout(function(){a()},n.timeout),{close:a,moveTo:function(n,t){CS.showAt(s,{anchor:"makeshift",x:n,y:t},gf(c))},moveRel:function(n,e){if("banner"!==e){var o=r(e),i={anchor:"node",root:Hs(),node:St.some(ni.fromDom(n)),layouts:{onRtl:function(){return[o]},onLtr:function(){return[o]}}};CS.showAt(s,i,gf(c))}else CS.showAt(s,t.backstage.shared.anchors.banner(),gf(c))},text:function(n){XS.updateText(c,n)},settings:n,getEl:function(){return c.element().dom()},progressBar:{value:function(n){XS.updateProgress(c,n)}}}},s=function(n){n.close()},f=function(n){return n.settings};return{open:c,close:s,reposition:a,getArgs:f}}function s(n){void 0===n&&(n=10);var t=fT.getItem(lT),e=Tt(t)?JSON.parse(t):[],o=function(t){var e=n-t.length;return 0>e?t.slice(0,n):t},r=o(e),i=function(t){Lt(r,t).each(u),r.unshift(t),r.length>n&&r.pop(),fT.setItem(lT,JSON.stringify(r))},u=function(n){r.splice(n,1)},a=function(){return r.slice(0)};return{add:i,state:a}}function f(n,t){var e=DT(t.colorinput.getColors(),t.colorinput.hasCustomColors()),o=t.colorinput.getColorCols(),r="color",i=PT(Sc("menu-value"),e,function(t){n.onAction({value:t})},o,r,Ak.CLOSE_ON_EXECUTE,function(){return!1},t.shared.providers),u=ht(ht({},i),{markers:qk(r),movement:zT(o,r)});return{type:"widget",data:{value:Sc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0
},oi=function(n,t){for(var e=0;e<n.length;e++){var o=n[e];if(o.test(t))return o}return void 0},ri=function(n,t){var e=oi(n,t);if(!e)return{major:0,minor:0};var o=function(n){return Number(t.replace(e,"$"+n))};return ai(o(1),o(2))},ii=function(n,t){var e=String(t).toLowerCase();return 0===n.length?ui():ri(n,e)},ui=function(){return ai(0,0)},ai=function(n,t){return{major:n,minor:t}},ci={nu:ai,detect:ii,unknown:ui},si="Edge",fi="Chrome",li="IE",di="Opera",mi="Firefox",gi="Safari",pi=function(){return vi({current:void 0,version:ci.unknown()})},vi=function(n){var t=n.current,e=n.version,o=function(n){return function(){return t===n}};return{current:t,version:e,isEdge:o(si),isChrome:o(fi),isIE:o(li),isOpera:o(di),isFirefox:o(mi),isSafari:o(gi)}},hi={unknown:pi,nu:vi,edge:ft(si),chrome:ft(fi),ie:ft(li),opera:ft(di),firefox:ft(mi),safari:ft(gi)},bi="Windows",yi="iOS",xi="Android",wi="Linux",Si="OSX",ki="Solaris",Ci="FreeBSD",Oi="ChromeOS",_i=function(){return Ti({current:void 0,version:ci.unknown()})},Ti=function(n){var t=n.current,e=n.version,o=function(n){return function(){return t===n}};return{current:t,version:e,isWindows:o(bi),isiOS:o(yi),isAndroid:o(xi),isOSX:o(Si),isLinux:o(wi),isSolaris:o(ki),isFreeBSD:o(Ci),isChromeOS:o(Oi)}},Ei={unknown:_i,nu:Ti,windows:ft(bi),ios:ft(yi),android:ft(xi),linux:ft(wi),osx:ft(Si),solaris:ft(ki),freebsd:ft(Ci),chromeos:ft(Oi)},Bi=function(n,t,e,o){var r=n.isiOS()&&/ipad/i.test(e)===!0,i=n.isiOS()&&!r,u=n.isiOS()||n.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,f=t.isSafari()&&n.isiOS()&&/safari/i.test(e)===!1,l=!s&&!c&&!f;return{isiPad:ft(r),isiPhone:ft(i),isTablet:ft(c),isPhone:ft(s),isTouch:ft(a),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:ft(f),isDesktop:ft(l)}},Di=function(n,t){var e=String(t).toLowerCase();return ne(n,function(n){return n.search(e)})},Ai=function(n,t){return Di(n,t).map(function(n){var e=ci.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Mi=function(n,t){return Di(n,t).map(function(n){var e=ci.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Fi={detectBrowser:Ai,detectOs:Mi},Ii=function(n,t,e){return""===t||n.length>=t.length&&n.substr(e,e+t.length)===t},Ri=function(n,t){return-1!==n.indexOf(t)},Vi=function(n,t){return Ii(n,t,n.length-t.length)},Pi=function(n){return function(t){return t.replace(n,"")}},Hi=Pi(/^\s+|\s+$/g),zi=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ni=function(n){return function(t){return Ri(t,n)}},Li=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Ri(n,"edge/")&&Ri(n,"chrome")&&Ri(n,"safari")&&Ri(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,zi],search:function(n){return Ri(n,"chrome")&&!Ri(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Ri(n,"msie")||Ri(n,"trident")}},{name:"Opera",versionRegexes:[zi,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ni("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ni("firefox")},{name:"Safari",versionRegexes:[zi,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Ri(n,"safari")||Ri(n,"mobile/"))&&Ri(n,"applewebkit")}}],ji=[{name:"Windows",search:Ni("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Ri(n,"iphone")||Ri(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ni("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ni("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ni("linux"),versionRegexes:[]},{name:"Solaris",search:Ni("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ni("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ni("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ui={browsers:ft(Li),oses:ft(ji)},Wi=function(n,t){var e=Ui.browsers(),o=Ui.oses(),r=Fi.detectBrowser(e,n).fold(hi.unkn
},td=function(n,t){return n.y-t.height},ed=function(n){return n.y+n.height},od=function(n,t){return n.y+n.height/2-t.height/2},rd=function(n){return n.x+n.width},id=function(n,t){return n.x-t.width},ud=function(n,t,e){return Vl(Ql(n),ed(n),e.southeast(),Ll(),Jl(n,{left:1,top:3}),"layout-se")},ad=function(n,t,e){return Vl(nd(n,t),ed(n),e.southwest(),jl(),Jl(n,{right:0,top:3}),"layout-sw")},cd=function(n,t,e){return Vl(Ql(n),td(n,t),e.northeast(),Ul(),Jl(n,{left:1,bottom:2}),"layout-ne")},sd=function(n,t,e){return Vl(nd(n,t),td(n,t),e.northwest(),Wl(),Jl(n,{right:0,bottom:2}),"layout-nw")},fd=function(n,t,e){return Vl(Zl(n,t),td(n,t),e.north(),Xl(),Jl(n,{bottom:2}),"layout-n")},ld=function(n,t,e){return Vl(Zl(n,t),ed(n),e.south(),Gl(),Jl(n,{top:3}),"layout-s")},dd=function(n,t,e){return Vl(rd(n),od(n,t),e.east(),Yl(),Jl(n,{left:0}),"layout-e")},md=function(n,t,e){return Vl(id(n,t),od(n,t),e.west(),ql(),Jl(n,{right:1}),"layout-w")},gd=function(){return[ud,ad,cd,sd,ld,fd,dd,md]},pd=function(){return[ad,ud,sd,cd,ld,fd,dd,md]},vd=function(){return[cd,sd,ud,ad,fd,ld]},hd=function(){return[sd,cd,ad,ud,fd,ld]},bd=function(){return[ud,ad,cd,sd,ld,fd]},yd=function(){return[ad,ud,sd,cd,ld,fd]},xd=function(n,t,e){return Ba(function(o){e(o,n,t)})},wd=function(n,t,e){return Ea(function(o){e(o,n,t)})},Sd=function(n,t,e,o,r,i){var u=zo(n),a=Rr(t,[Vr("config",n)]);return _d(u,a,t,e,o,r,i)},kd=function(n,t,e,o,r,i){var u=n,a=Rr(t,[Dr("config",n)]);return _d(u,a,t,e,o,r,i)},Cd=function(n,t,e){var o=function(o){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var u=[o].concat(r);return o.config({name:ft(n)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+n+". Using API: "+e)},function(n){var e=Array.prototype.slice.call(u,1);return t.apply(void 0,[o,n.config,n.state].concat(e))})};return Ic(o,e,t)},Od=function(n){return{key:n,value:void 0}},_d=function(n,e,o,r,i,u,a){var c=function(n){return je(n,o)?n[o]():St.none()},s=Me(i,function(n,t){return Cd(o,n,t)}),f=Me(u,function(n,t){return Vc(n,t)}),l=ht(ht(ht({},f),s),{revoke:t(Od,o),config:function(t){var e=ir(o+"-config",n,t);return{key:o,value:{config:e,me:l,configAsRaw:$e(function(){return ir(o+"-config",n,t)}),initialConfig:t,state:a}}},schema:function(){return e},exhibit:function(n,t){return c(n).bind(function(n){return Ne(r,"exhibit").map(function(e){return e(t,n.config,n.state)})}).getOr(qc({}))},name:function(){return o},handlers:function(n){return c(n).map(function(n){var t=Ne(r,"events").getOr(function(){return{}});return t(n.config,n.state)}).getOr({})}});return l},Td=function(n){return lo(n)},Ed=zo([br("fields"),br("name"),Pr("active",{}),Pr("apis",{}),Pr("state",jc),Pr("extra",{})]),Bd=function(n){var t=ir("Creating behaviour: "+n.name,Ed,n);return Sd(t.fields,t.name,t.active,t.apis,t.extra,t.state)},Dd=zo([br("branchKey"),br("branches"),br("name"),Pr("active",{}),Pr("apis",{}),Pr("state",jc),Pr("extra",{})]),Ad=function(n){var t=ir("Creating behaviour: "+n.name,Dd,n);return kd(cr(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Md=ft(void 0),Fd=function(n,t){return t.universal()?n:Jt(n,function(n){return jt(t.channels(),n)})},Id=function(n){return da([va(Hu(),function(t,e){var o=n.channels,r=Be(o),i=e,u=Fd(r,i);Yt(u,function(n){var e=o[n],r=e.schema,u=ir("channel["+n+"] data\nReceiver: "+hc(t.element()),r,i.data());e.onReceive(t,u)})})])},Rd=Object.freeze({__proto__:null,events:Id}),Vd=[yr("channels",tr(ve.value,zo([Al("onReceive"),Pr("schema",sr())])))],Pd=Bd({fields:Vd,name:"receiving",active:Rd}),Hd=function(n,t){return qc({classes:[],styles:t.useFixed()?{}:{position:"relative"}})},zd=Object.freeze({__proto__:null,exhibit:Hd}),Nd=function(){return ni.fromDom(n.document)},Ld=function(n){return n.dom().focus()},jd=function(n){return n.dom().blur()},Ud=function(n){var t=As(n).dom();return n.dom()===t.activeElement},Wd=function(n){return void 0===n&&(n=Nd()),St.from(n.dom().activeElement).map(ni.fromDom)},Gd=function(n){return Wd(As(n)).filter(function(t){return n.dom().contains(t.dom())})},Xd=function(n,t){var e=Pa(
return o(c,f,i,s.externals())},Gh=function(n){return Le(n,"uid")},Xh=function(n){return Gh(n)?n:ht(ht({},n),{uid:Dc("uid")})},Yh=zo([br("name"),br("factory"),br("configFields"),Pr("apis",{}),Pr("extraApis",{})]),qh=zo([br("name"),br("factory"),br("configFields"),br("partFields"),Pr("apis",{}),Pr("extraApis",{})]),Kh=function(n){var t=ir("Sketcher for "+n.name,Yh,n),e=function(n){return Uh(t.name,t.configFields,t.factory,n)},o=Me(t.apis,Lc),r=Me(t.extraApis,function(n,t){return Vc(n,t)});return ht(ht({name:ft(t.name),configFields:ft(t.configFields),sketch:e},o),r)},Jh=function(n){var t=ir("Sketcher for "+n.name,qh,n),e=function(n){return Wh(t.name,t.configFields,t.partFields,t.factory,n)},o=Oh(t.name,t.partFields),r=Me(t.apis,Lc),i=Me(t.extraApis,function(n,t){return Vc(n,t)});return ht(ht({name:ft(t.name),partFields:ft(t.partFields),configFields:ft(t.configFields),sketch:e,parts:ft(o)},r),i)},$h=function(n){for(var t=[],e=function(n){t.push(n)},o=0;o<n.length;o++)n[o].each(e);return t},Qh=function(n){for(var t=[],e=0;e<n.length;e++){var o=n[e];if(!o.isSome())return St.none();t.push(o.getOrDie())}return St.some(t)},Zh=function(n,t,e){return n.isSome()&&t.isSome()?St.some(e(n.getOrDie(),t.getOrDie())):St.none()},nb=function(n,t,e,o){return n.isSome()&&t.isSome()&&e.isSome()?St.some(o(n.getOrDie(),t.getOrDie(),e.getOrDie())):St.none()},tb=function(n){return"input"===Da(n)&&"radio"!==fc(n,"type")||"textarea"===Da(n)},eb=function(n,t){return t.find(n)},ob=Object.freeze({__proto__:null,getCurrent:eb}),rb=[br("find")],ib=Bd({fields:rb,name:"composing",apis:ob}),ub=function(n,t,e,o){var r=_g(n.element(),"."+t.highlightClass);Yt(r,function(e){Ut(o,function(n){return n.element()===e})||(ks(e,t.highlightClass),n.getSystem().getByDom(e).each(function(e){t.onDehighlight(n,e),ua(e,ia())}))})},ab=function(n,t,e){return ub(n,t,e,[])},cb=function(n,t,e,o){gb(n,t,e,o)&&(ks(o.element(),t.highlightClass),t.onDehighlight(n,o),ua(o,ia()))},sb=function(n,t,e,o){ub(n,t,e,[o]),gb(n,t,e,o)||(ws(o.element(),t.highlightClass),t.onHighlight(n,o),ua(o,ra()))},fb=function(n,t,e){hb(n,t).each(function(o){sb(n,t,e,o)})},lb=function(n,t,e){bb(n,t).each(function(o){sb(n,t,e,o)})},db=function(n,t,e,o){vb(n,t,e,o).fold(function(n){throw new Error(n)},function(o){sb(n,t,e,o)})},mb=function(n,t,e,o){var r=Sb(n,t),i=ne(r,o);i.each(function(o){sb(n,t,e,o)})},gb=function(n,t,e,o){return Cs(o.element(),t.highlightClass)},pb=function(n,t){return il(n.element(),"."+t.highlightClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},vb=function(n,t,e,o){var r=_g(n.element(),"."+t.itemClass);return St.from(r[o]).fold(function(){return ve.error("No element found with index "+o)},n.getSystem().getByDom)},hb=function(n,t){return il(n.element(),"."+t.itemClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},bb=function(n,t){var e=_g(n.element(),"."+t.itemClass),o=e.length>0?St.some(e[e.length-1]):St.none();return o.bind(function(t){return n.getSystem().getByDom(t).toOption()})},yb=function(n,t,e,o){var r=_g(n.element(),"."+t.itemClass),i=te(r,function(n){return Cs(n,t.highlightClass)});return i.bind(function(t){var e=um(t,o,0,r.length-1);return n.getSystem().getByDom(r[e]).toOption()})},xb=function(n,t,e){return yb(n,t,e,-1)},wb=function(n,t,e){return yb(n,t,e,1)},Sb=function(n,t){var e=_g(n.element(),"."+t.itemClass);return $h(Xt(e,function(t){return n.getSystem().getByDom(t).toOption()}))},kb=Object.freeze({__proto__:null,dehighlightAll:ab,dehighlight:cb,highlight:sb,highlightFirst:fb,highlightLast:lb,highlightAt:db,highlightBy:mb,isHighlighted:gb,getHighlighted:pb,getFirst:hb,getLast:bb,getPrevious:xb,getNext:wb,getCandidates:Sb}),Cb=[br("highlightClass"),br("itemClass"),Bl("onHighlight"),Bl("onDehighlight")],Ob=Bd({fields:Cb,name:"highlighting",apis:kb}),_b=function(){return[8]},Tb=function(){return[9]},Eb=function(){return[13]},Bb=function(){return[27]},Db=function(){return[32]},Ab=function(){return[37]},Mb=function(){return[38]},Fb=function(){return[39]},Ib=function(){return[40]},Rb=function(n,t,e){var o=ie(n.slice(0,t)),r=ie(n.slice
}),St.some(!0)},onExecute:function(){return St.some(!0)},onOpenMenu:function(n,t){Sp.positionWithinBounds(i().getOrDie(),e,t,r())},onOpenSubmenu:function(n,t,e,o){var r=i().getOrDie();Sp.position(r,ht({anchor:"submenu",item:t},c(o)),e)},onRepositionMenu:function(n,t,o){var u=i().getOrDie();Sp.positionWithinBounds(u,e,t,r()),Yt(o,function(n){var t=c(n.triggeringPath);Sp.position(u,ht({anchor:"submenu",item:n.triggeringItem},t),n.triggeredMenu)})}})},kS=function(n,t){var e=function(t,e){var o=n.getRelated(t);return o.exists(function(n){return fl(n,e)})},o=function(n,t){ev.setContent(n,t)},r=function(n,t,e){i(n,t,e,St.none())},i=function(n,t,e,o){u(n,t,e,function(){return o.map(function(n){return $f(n)})})},u=function(t,e,o,r){var i=n.lazySink(t).getOrDie();ev.openWhileCloaked(t,o,function(){return Sp.positionWithinBounds(i,e,t,r())}),Hv.setValue(t,St.some({mode:"position",anchor:e,getBounds:r}))},a=function(n,t,e){c(n,t,e,function(){return St.none()})},c=function(t,e,o,r){var i=SS(n,t,e,o,r);ev.open(t,i),Hv.setValue(t,St.some({mode:"menu",menu:i}))},s=function(n){ev.isOpen(n)&&(Hv.setValue(n,St.none()),ev.close(n))},f=function(n){return ev.getState(n)},l=function(t){ev.isOpen(t)&&Hv.getValue(t).each(function(e){switch(e.mode){case"menu":ev.getState(t).each(function(n){wS.repositionMenus(n)});break;case"position":var o=n.lazySink(t).getOrDie();Sp.positionWithinBounds(o,e.anchor,t,e.getBounds())}})},d={setContent:o,showAt:r,showWithin:i,showWithinBounds:u,showMenuAt:a,showMenuWithinBounds:c,hide:s,getContent:f,reposition:l,isOpen:ev.isOpen};return{uid:n.uid,dom:n.dom,behaviours:Lv(n.inlineBehaviours,[ev.config({isPartOf:function(n,t,o){return fl(t,o)||e(n,o)},getAttachPoint:function(t){return n.lazySink(t).getOrDie()},onOpen:function(t){n.onShow(t)},onClose:function(t){n.onHide(t)}}),Hv.config({store:{mode:"memory",initialValue:St.none()}}),Pd.config({channels:ht(ht({},av(ht({isExtraPart:t.isExtraPart},n.fireDismissalEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})))),sv(ht(ht({},n.fireRepositionEventInstead.map(function(n){return{fireEventInstead:{event:n.event}}}).getOr({})),{doReposition:l})))})]),eventOrder:n.eventOrder,apis:d}},CS=Kh({name:"InlineView",configFields:[br("lazySink"),Bl("onShow"),Bl("onHide"),Fr("onEscape"),zv("inlineBehaviours",[ev,Hv,Pd]),Rr("fireDismissalEventInstead",[Pr("event",Qu())]),Rr("fireRepositionEventInstead",[Pr("event",Zu())]),Pr("getRelated",St.none),Pr("isExtraPart",gt),Pr("eventOrder",St.none)],factory:kS,apis:{showAt:function(n,t,e,o){n.showAt(t,e,o)},showWithin:function(n,t,e,o,r){n.showWithin(t,e,o,r)},showWithinBounds:function(n,t,e,o,r){n.showWithinBounds(t,e,o,r)},showMenuAt:function(n,t,e,o){n.showMenuAt(t,e,o)},showMenuWithinBounds:function(n,t,e,o,r){n.showMenuWithinBounds(t,e,o,r)},hide:function(n,t){n.hide(t)},isOpen:function(n,t){return n.isOpen(t)},getContent:function(n,t){return n.getContent(t)},setContent:function(n,t,e){n.setContent(t,e)},reposition:function(n,t){n.reposition(t)}}}),OS=function(n){return n.x},_S=function(n,t){return n.x+n.width/2-t.width/2},TS=function(n,t){return n.x+n.width-t.width},ES=function(n){return n.y},BS=function(n,t){return n.y+n.height-t.height},DS=function(n,t,e){return Vl(TS(n,t),BS(n,t),e.innerSoutheast(),Wl(),Jl(n,{right:0,bottom:3}),"layout-inner-se")},AS=function(n,t,e){return Vl(OS(n),BS(n,t),e.innerSouthwest(),Ul(),Jl(n,{left:1,bottom:3}),"layout-inner-sw")},MS=function(n,t,e){return Vl(TS(n,t),ES(n),e.innerNortheast(),jl(),Jl(n,{right:0,top:2}),"layout-inner-ne")},FS=function(n,t,e){return Vl(OS(n),ES(n),e.innerNorthwest(),Ll(),Jl(n,{left:1,top:2}),"layout-inner-nw")},IS=function(n,t,e){return Vl(_S(n,t),ES(n),e.innerNorth(),Gl(),Jl(n,{top:2}),"layout-inner-n")},RS=function(n,t,e){return Vl(_S(n,t),BS(n,t),e.innerSouth(),Xl(),Jl(n,{bottom:3}),"layout-inner-s")},VS=tinymce.util.Tools.resolve("tinymce.util.Delay"),PS=function(n){var t=Nw(n.action),e=n.dom.tag,o=function(t){return Ne(n.dom,"attributes").bind(function(n){return Ne(n,t)})},r=function(){if("button"===e){var n=o("type").getOr("button"),t=o("r
});return{value:t}},j_=function(n){var t=L_(n),e=z_.exec(t.value);return null===e?["FFFFFF","FF","FF","FF"]:e},U_=function(n){var t=n.toString(16);return 1===t.length?"0"+t:t},W_=function(n){var t=U_(n.red)+U_(n.green)+U_(n.blue);return P_(t)},G_=Math.min,X_=Math.max,Y_=Math.round,q_=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,K_=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,J_=function(n,t,e,o){return{red:n,green:t,blue:e,alpha:o}},$_=function(n){var t=parseInt(n,10);return t.toString()===n&&t>=0&&255>=t},Q_=function(n){var t,e,o,r=(n.hue||0)%360,i=n.saturation/100,u=n.value/100;if(i=X_(0,G_(i,1)),u=X_(0,G_(u,1)),0===i)return t=e=o=Y_(255*u),J_(t,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:t=c,e=s,o=0;break;case 1:t=s,e=c,o=0;break;case 2:t=0,e=c,o=s;break;case 3:t=0,e=s,o=c;break;case 4:t=s,e=0,o=c;break;case 5:t=c,e=0,o=s;break;default:t=e=o=0}return t=Y_(255*(t+f)),e=Y_(255*(e+f)),o=Y_(255*(o+f)),J_(t,e,o,1)},Z_=function(n){var t=j_(n),e=parseInt(t[1],16),o=parseInt(t[2],16),r=parseInt(t[3],16);return J_(e,o,r,1)},nT=function(n,t,e,o){var r=parseInt(n,10),i=parseInt(t,10),u=parseInt(e,10),a=parseFloat(o);return J_(r,i,u,a)},tT=function(n){if("transparent"===n)return St.some(J_(0,0,0,0));var t=q_.exec(n);if(null!==t)return St.some(nT(t[1],t[2],t[3],"1"));var e=K_.exec(n);return null!==e?St.some(nT(e[1],e[2],e[3],e[4])):St.none()},eT=function(n){return"rgba("+n.red+","+n.green+","+n.blue+","+n.alpha+")"},oT=J_(255,0,0,1),rT=function(n){return n.fire("SkinLoaded")},iT=function(n,t){return n.fire("SkinLoadError",t)},uT=function(n){return n.fire("ResizeEditor")},aT=function(n,t){return n.fire("ResizeContent",t)},cT=function(n,t){return n.fire("ScrollContent",t)},sT=function(n,t){return n.fire("TextColorChange",t)},fT=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),lT="tinymce-custom-colors",dT="choiceitem",mT=[{type:dT,text:"Light Green",value:"#BFEDD2"},{type:dT,text:"Light Yellow",value:"#FBEEB8"},{type:dT,text:"Light Red",value:"#F8CAC6"},{type:dT,text:"Light Purple",value:"#ECCAFA"},{type:dT,text:"Light Blue",value:"#C2E0F4"},{type:dT,text:"Green",value:"#2DC26B"},{type:dT,text:"Yellow",value:"#F1C40F"},{type:dT,text:"Red",value:"#E03E2D"},{type:dT,text:"Purple",value:"#B96AD9"},{type:dT,text:"Blue",value:"#3598DB"},{type:dT,text:"Dark Turquoise",value:"#169179"},{type:dT,text:"Orange",value:"#E67E23"},{type:dT,text:"Dark Red",value:"#BA372A"},{type:dT,text:"Dark Purple",value:"#843FA1"},{type:dT,text:"Dark Blue",value:"#236FA1"},{type:dT,text:"Light Gray",value:"#ECF0F1"},{type:dT,text:"Medium Gray",value:"#CED4D9"},{type:dT,text:"Gray",value:"#95A5A6"},{type:dT,text:"Dark Gray",value:"#7E8C8D"},{type:dT,text:"Navy Blue",value:"#34495E"},{type:dT,text:"Black",value:"#000000"},{type:dT,text:"White",value:"#ffffff"}],gT=s(10),pT=function(t){var e=[],o=n.document.createElement("canvas");o.height=1,o.width=1;for(var r=o.getContext("2d"),i=function(n,t){var e=255,o=t/255,r=Math.round(n*o+e*(1-o));return("0"+r.toString(16)).slice(-2).toUpperCase()},u=function(n){if(/^[0-9A-Fa-f]{6}$/.test(n))return"#"+n.toUpperCase();r.clearRect(0,0,o.width,o.height),r.fillStyle="#FFFFFF",r.fillStyle=n,r.fillRect(0,0,1,1);var t=r.getImageData(0,0,1,1).data,e=t[0],u=t[1],a=t[2],c=t[3];return"#"+i(e,c)+i(u,c)+i(a,c)},a=0;a<t.length;a+=2)e.push({text:t[a+1],value:u(t[a]),type:"choiceitem"});return e},vT=function(n,t){return n.getParam("color_cols",t,"number")},hT=function(n){return n.getParam("custom_colors")!==!1},bT=function(n){return n.getParam("color_map")},yT=function(n){var t=bT(n);return void 0!==t?pT(t):mT},xT=function(){return Xt(gT.state(),function(n){return{type:dT,text:n,value:n}})},wT=function(n){gT.add(n)},ST=function(n,t){var e;return n.dom.getParents(n.selection.getStart(),function(n){var o;(o=n.style["forecolor"===t?"color":"background-color"])&&(e=e?e:o)}),e},kT=function(n,t,e){n.undoManager.transact(function(){n.focus(),n.formatter.apply(t,{value:e}),n.nodeChanged()})},CT=function(n,t){n.undoManager.transact(function(){n.focus(),n.formatter.remove(t,{value:null},null,!0),n.nodeC
})})},i=function(n){a()?s(n):o.push(n)},u=function(n){a()||(e=St.some(n),c(o),o=[])},a=function(){return e.isSome()},c=function(n){Yt(n,s)},s=function(t){e.each(function(e){n.setTimeout(function(){t(e)},0)})};return t(u),{get:i,map:r,isReady:a}},xB=function(n){return yB(function(t){t(n)})},wB={nu:yB,pure:xB},SB=function(t){n.setTimeout(function(){throw t},0)},kB=function(n){var t=function(t){n().then(t,SB)},e=function(t){return kB(function(){return n().then(t)})},o=function(t){return kB(function(){return n().then(function(n){return t(n).toPromise()})})},r=function(t){return kB(function(){return n().then(function(){return t.toPromise()})})},i=function(){return wB.nu(t)},u=function(){var t=null;return kB(function(){return null===t&&(t=n()),t})},a=n;return{map:e,bind:o,anonBind:r,toLazy:i,toCached:u,toPromise:a,get:t}},CB=function(n){return kB(function(){return new bB(n)})},OB=function(n){return kB(function(){return bB.resolve(n)})},_B={nu:CB,pure:OB},TB=["input","textarea"],EB=function(n){var t=Da(n);return jt(TB,t)},BB=function(n,t){var e=t.getRoot(n).getOr(n.element());ks(e,t.invalidClass),t.notify.each(function(t){EB(n.element())&&cc(n.element(),"aria-invalid",!1),t.getContainer(n).each(function(n){ic(n,t.validHtml)}),t.onValid(n)})},DB=function(n,t,e,o){var r=t.getRoot(n).getOr(n.element());ws(r,t.invalidClass),t.notify.each(function(t){EB(n.element())&&cc(n.element(),"aria-invalid",!0),t.getContainer(n).each(function(n){ic(n,o)}),t.onInvalid(n,o)})},AB=function(n,t){return t.validator.fold(function(){return _B.pure(ve.value(!0))},function(t){return t.validate(n)})},MB=function(n,t,e){return t.notify.each(function(t){t.onValidate(n)}),AB(n,t).map(function(o){return n.getSystem().isConnected()?o.fold(function(o){return DB(n,t,e,o),ve.error(o)},function(e){return BB(n,t),ve.value(e)}):ve.error("No longer in system")})},FB=function(n,t){var e=t.getRoot(n).getOr(n.element());return Cs(e,t.invalidClass)},IB=Object.freeze({__proto__:null,markValid:BB,markInvalid:DB,query:AB,run:MB,isInvalid:FB}),RB=function(n,t){return n.validator.map(function(e){return da([va(e.onEvent,function(e){MB(e,n,t).get(lt)})].concat(e.validateOnLoad?[_a(function(e){MB(e,n,t).get(ut)})]:[]))}).getOr({})},VB=Object.freeze({__proto__:null,events:RB}),PB=[br("invalidClass"),Pr("getRoot",St.none),Rr("notify",[Pr("aria","alert"),Pr("getContainer",St.none),Pr("validHtml",""),Bl("onValid"),Bl("onInvalid"),Bl("onValidate")]),Rr("validator",[br("validate"),Pr("onEvent","input"),Pr("validateOnLoad",!0)])],HB=Bd({fields:PB,name:"invalidating",active:VB,apis:IB,extra:{validation:function(n){return function(t){var e=Hv.getValue(t);return _B.pure(n(e))}}}}),zB=function(n,t,e,o){return e.getOrCreate(n,t,o)},NB=Object.freeze({__proto__:null,getCoupled:zB}),LB=[yr("others",tr(ve.value,sr()))],jB=function(){var n={},t=function(t,e,o){var r=Be(e.others);if(r)return Ne(n,o).getOrThunk(function(){var r=Ne(e.others,o).getOrDie("No information found for coupled component: "+o),i=r(t),u=t.getSystem().build(i);return n[o]=u,u});throw new Error("Cannot find coupled component: "+o+". Known coupled components: "+JSON.stringify(r,null,2))},e=ft({});return Uc({readState:e,getOrCreate:t})},UB=Object.freeze({__proto__:null,init:jB}),WB=Bd({fields:LB,name:"coupling",apis:NB,state:UB}),GB=ft("sink"),XB=ft(yh({name:GB(),overrides:ft({dom:{tag:"div"},behaviours:Td([Sp.config({useFixed:pt})]),events:da([ka(Tu()),ka(xu()),ka(Au())])})}));!function(n){n[n.HighlightFirst=0]="HighlightFirst",n[n.HighlightNone=1]="HighlightNone"}(hB||(hB={}));var YB,qB=function(n,t){var e=n.getHotspot(t).getOr(t),o="hotspot",r=n.getAnchorOverrides();return n.layouts.fold(function(){return{anchor:o,hotspot:e,overrides:r}},function(n){return{anchor:o,hotspot:e,overrides:r,layouts:n}})},KB=function(n,t,e){var o=n.fetch;return o(e).map(t)},JB=function(n,t,e,o,r,i,u){var a=KB(n,t,o),c=tD(o,n);return a.map(function(n){return n.bind(function(n){return St.from(wS.sketch(ht(ht({},i.menu()),{uid:Dc(""),data:n,highlightImmediately:u===hB.HighlightFirst,onOpenMenu:function(n,t){var o=c().getOrDie();Sp.position(o,e,t),
return t.hex});return o.map(function(n){return"#"+n}).getOr("")},setValue:function(t,e){var o=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,r=o.exec(e),u=i.get(t),a=ib.getCurrent(u);a.fold(function(){n.console.log("Can not find form")},function(n){Hv.setValue(n,{hex:St.from(r[1]).getOr("")}),cF.getField(n,"hex").each(function(n){ua(n,Bu())})})}}}),yF.self()])}},CF=tinymce.util.Tools.resolve("tinymce.Resource"),OF=function(n){return Object.prototype.hasOwnProperty.call(n,"init")},_F=function(n){var t=qr(St.none()),e=zS({dom:{tag:n.tag}}),o=qr(St.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Td([fw("editor-foo-events",[_a(function(r){e.getOpt(r).each(function(e){(OF(n)?n.init(e.element().dom()):CF.load(n.scriptId,n.scriptUrl).then(function(t){return t(e.element().dom(),n.settings)})).then(function(n){o.get().each(function(t){n.setValue(t)}),o.set(St.none()),t.set(St.some(n))})})})]),Hv.config({store:{mode:"manual",getValue:function(){return t.get().fold(function(){return o.get().getOr("")},function(n){return n.getValue()})},setValue:function(n,e){t.get().fold(function(){o.set(St.some(e))},function(n){return n.setValue(e)})}}}),yF.self()]),components:[e.asSpec()]}},TF=No([Pr("preprocess",lt),Pr("postprocess",lt)]),EF=function(n,t){var e=ir("RepresentingConfigs.memento processors",TF,t);return Hv.config({store:{mode:"manual",getValue:function(t){var o=n.get(t),r=Hv.getValue(o);return e.postprocess(r)},setValue:function(t,o){var r=e.preprocess(o),i=n.get(t);Hv.setValue(i,r)}}})},BF=function(n,t,e){return Hv.config(Ke({store:{mode:"manual",getValue:t,setValue:e}},n.map(function(n){return{store:{initialValue:n}}}).getOr({})))},DF=function(n,t,e){return BF(n,function(n){return t(n.element())},function(n,t){return e(n.element(),t)})},AF=function(n){return DF(n,Qs,Zs)},MF=function(n){return DF(n,rc,ic)},FF=function(n){return Hv.config({store:{mode:"memory",initialValue:n}})},IF={memento:EF,withElement:DF,withComp:BF,domValue:AF,domHtml:MF,memory:FF},RF=".jpg,.jpeg,.png,.gif",VF=function(n){var t=new RegExp("("+RF.split(/\s*,\s*/).join("|")+")$","i");return Jt(le(n),function(n){return t.test(n.name)})},PF=function(n,t){var e=function(n,t){t.stop()},o=function(n){return function(t,e){Yt(n,function(n){n(t,e)})}},r=function(n,t){if(!eO.isDisabled(n)){var e=t.event().raw();u(n,e.dataTransfer.files)}},i=function(n,t){var e=t.event().raw().target.files;u(n,e)},u=function(t,e){Hv.setValue(t,VF(e)),aa(t,ZE,{name:n.name})},a=zS({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Td([fw("input-file-events",[ka(Au()),ka(Lu())])])}),c=function(n){return{uid:n.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Td([IF.memory([]),yF.self(),eO.config({}),Hw.config({toggleClass:"dragenter",toggleOnExecute:!1}),fw("dropzone-events",[va("dragenter",o([e,Hw.toggle])),va("dragleave",o([e,Hw.toggle])),va("dragover",e),va("drop",o([e,r])),va(Du(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:t.translate("Drop an image here")}},HS.sketch({dom:{tag:"button",innerHtml:t.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[a.asSpec()],action:function(n){var t=a.get(n);t.element().dom().click()},buttonBehaviours:Td([XE.config({}),QO.button(t.isReadOnly),YO()])})]}]}},s=n.label.map(function(n){return QE(n,t)}),f=jE.parts().field({factory:{sketch:c}});return YE(s,f,["tox-form__group--stretched"],[])},HF=function(n,t){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+n.columns+"col"]},components:Xt(n.items,t.interpreter)}},zF=Sc("alloy-fake-before-tabstop"),NF=Sc("alloy-fake-after-tabstop"),LF=function(n){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:Td([yw.config({ignore:!0}),XE.config({})])}},jF=function(n){return{dom:{tag:"div",classes:["tox-navobj"]},components:[LF([zF]),n,LF([NF])],behaviours:Td([yF.childAt(1)])}},UF=function(n,t){aa(n,Tu(),{raw:{which:9,shiftKey
r.add(t);var i=function(){return e.get()},u=function(n){e.set(n)},a=function(){return o.get().fold(function(){return e.get()},function(n){return n})},c=function(n){var t=s(n);return d(),o.set(St.some(t)),t.url},s=function(t){return{blob:t,url:n.URL.createObjectURL(t)}},f=function(t){n.URL.revokeObjectURL(t.url)},l=function(n){OR.each(n,f)},d=function(){o.get().each(f),o.set(St.none())},m=function(n){var t=s(n);u(t);var e=r.add(t).removed;return l(e),t.url},g=function(n){var t=s(n);return o.set(St.some(t)),t.url},p=function(n){return o.get().fold(function(){},function(t){m(t.blob),n()})},v=function(){var n=r.undo();return u(n),n.url},h=function(){var n=r.redo();return u(n),n.url},b=function(){var n=r.canUndo(),t=r.canRedo();return{undoEnabled:n,redoEnabled:t}};return{getBlobState:i,setBlobState:u,addBlobState:m,getTempState:a,updateTempState:c,addTempState:g,applyTempState:p,destroyTempState:d,undo:v,redo:h,getHistoryStates:b}},VR=function(t,e){var o=RR(t.currentState),r=function(n,t){var e=t.event().direction();C.zoom(n,e)},i=function(n){var t=o.getHistoryStates();O.updateButtonUndoStates(n,t.undoEnabled,t.redoEnabled),aa(n,xR.formActionEvent,{name:xR.saveState(),value:t.undoEnabled})},u=function(n){O.updateButtonUndoStates(n,!1,!1)},a=function(n){var t=o.undo();d(n,t).then(function(){l(n),i(n)})},c=function(n){var t=o.redo();d(n,t).then(function(){l(n),i(n)})},s=function(n){return n.toBlob()},f=function(n){aa(n,xR.formActionEvent,{name:xR.disable(),value:{}})},l=function(n){_.getApplyButton(n).each(function(n){eO.enable(n)}),aa(n,xR.formActionEvent,{name:xR.enable(),value:{}})},d=function(n,t){return f(n),C.updateSrc(n,t)},m=function(t,e,o,r,u){return f(t),$F(e).then(o).then(s).then(r).then(function(n){return d(t,n).then(function(n){return i(t),u(),l(t),n})}).catch(function(e){return n.console.log(e),l(t),e})},g=function(n,t,e){var r=o.getBlobState().blob,i=function(n){return o.updateTempState(n)};m(n,r,t,i,e)},p=function(n,t){var e=o.getTempState().blob,r=function(n){return o.addTempState(n)};m(n,e,t,r,ut)},v=function(n,t,e){var r=o.getBlobState().blob,i=function(t){var e=o.addBlobState(t);return b(n),e};m(n,r,t,i,e)},h=function(n,t){var e=function(){b(n);var e=t.event().swap();e()};o.applyTempState(e)},b=function(n){var t=o.getBlobState().url;return o.destroyTempState(),i(n),t},y=function(n){var t=b(n);d(n,t).then(function(){l(n)})},x=function(n,t){y(n);var e=t.event().swap();e(),C.hideCrop()},w=function(n,t){return g(n,t.event().transform(),ut)},S=function(n,t){return p(n,t.event().transform())},k=function(n,t){return v(n,t.event().transform(),t.event().swap())},C=AR(t.currentState.url),O=IR(e),_=wR(C,e),T=function(n,t){u(n);var e=t.event().transform(),o=t.event().swap();e.fold(function(){o()},function(t){g(n,t,o)})};return{dom:{tag:"div",attributes:{role:"presentation"}},components:[_.memContainer.asSpec(),C.memContainer.asSpec(),O.container],behaviours:Td([Hv.config({store:{mode:"manual",getValue:function(){return o.getBlobState()}}}),fw("image-tools-events",[va(vR.undo(),a),va(vR.redo(),c),va(vR.zoom(),r),va(vR.back(),x),va(vR.apply(),h),va(vR.transform(),w),va(vR.tempTransform(),S),va(vR.transformApply(),k),va(vR.swap(),T)]),yF.self()])}},PR=function(n,t){var e={dom:{tag:"label",innerHtml:t.providers.translate(n.label),classes:["tox-label"]}},o=Xt(n.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[e].concat(o),behaviours:Td([yF.self(),cw.config({}),IF.domHtml(St.none()),Qx.config({mode:"acyclic"})])}},HR=function(n,t){return{dom:{tag:"div",classes:n.classes},components:Xt(n.items,t.shared.interpreter)}},zR=function(n){var t=Xt(n.options,function(n){return{dom:{tag:"option",value:n.value,innerHtml:n.text}}}),e=n.data.map(function(n){return fo("initialValue",n)}).getOr({});return{uid:n.uid,dom:{tag:"select",classes:n.selectClasses,attributes:n.selectAttributes},components:t,behaviours:Lv(n.selectBehaviours,[yw.config({}),Hv.config({store:ht({mode:"manual",getValue:function(n){return Qs(n.element())},setValue:function(t,e){var o=ne(n.options,function(n){return n.value===e});o.isSo
},dH=ft([yh({name:"groups",overrides:lH})]),mH=function(t,e){var o=function(t,e){r(t).fold(function(){throw n.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){cw.set(n,e)})},r=function(n){return t.shell?St.some(n):Mh(n,t,"groups")},i=t.shell?{behaviours:[cw.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Lv(t.toolbarBehaviours,i.behaviours),apis:{setGroups:o},domModification:{attributes:{role:"group"}}}},gH=Jh({name:"Toolbar",configFields:fH(),partFields:dH(),factory:mH,apis:{setGroups:function(n,t,e){n.setGroups(t,e)}}}),pH=function(n,t){var e={len:0,list:[]},o=Qt(n,function(n,e){var o=t(e,n.len);return o.fold(ft(n),function(t){return{len:t.finish(),list:n.list.concat([t])}})},e);return o.list},vH=function(n,t,e){return{within:ft(n),extra:ft(t),withinWidth:ft(e)}},hH=function(n,t,e){var o=pH(n,function(n,t){var o=e(n);return St.some({element:ft(n),start:ft(t),finish:ft(t+o),width:ft(o)})}),r=Jt(o,function(n){return n.finish()<=t}),i=$t(r,function(n,t){return n+t.width()},0),u=o.slice(r.length);return{within:ft(r),extra:ft(u),withinWidth:ft(i)}},bH=function(n){return Xt(n,function(n){return n.element()})},yH=function(n,t,e){var o=bH(n.concat(t));return vH(o,[],e)},xH=function(n,t,e,o){var r=bH(n).concat([e]);return vH(r,bH(t),o)},wH=function(n,t,e){return vH(bH(n),[],e)},SH=function(n,t,e){var o=hH(t,n,e);return 0===o.extra().length?St.some(o):St.none()},kH=function(n,t,e,o){var r=SH(n,t,e).getOrThunk(function(){return hH(t,n-e(o),e)}),i=r.within(),u=r.extra(),a=r.withinWidth();return 1===u.length&&u[0].width()<=e(o)?yH(i,u,a):u.length>=1?xH(i,u,o,a):wH(i,u,a)},CH=function(n,t){var e=Xt(t,function(n){return gf(n)});gH.setGroups(n,e)},OH=function(n){return de(n,function(n){return Gd(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()})})},_H=function(n,t,e){var o=Fh(n,t,"primary"),r=WB.getCoupled(n,"overflowGroup");js(o.element(),"visibility","hidden");var i=t.builtGroups.get().concat([r]),u=OH(i);e([]),CH(o,i);var a=Tf(o.element()),c=kH(a,t.builtGroups.get(),function(n){return Tf(n.element())},r);0===c.extra().length?(cw.remove(o,r),e([])):(CH(o,c.within()),e(c.extra())),Js(o.element(),"visibility"),$s(o.element()),u.each(yw.focus)},TH=ft([zv("splitToolbarBehaviours",[WB]),Yr("builtGroups",function(){return qr([])})]),EH=ft([Tl(["overflowToggledClass"]),Fr("getOverflowBounds"),br("lazySink"),Yr("overflowGroups",function(){return qr([])})].concat(TH())),BH=ft([hh({factory:gH,schema:fH(),name:"primary"}),bh({schema:fH(),name:"overflow"}),bh({name:"overflow-button"}),bh({name:"overflow-group"})]),DH=ft([Tl(["toggledClass"]),br("lazySink"),Cr("fetch"),Fr("getBounds"),Rr("fireDismissalEventInstead",[Pr("event",Qu())]),Fm()]),AH=ft([bh({name:"button",overrides:function(n){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Td([Hw.config({toggleClass:n.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),bh({factory:gH,schema:fH(),name:"toolbar",overrides:function(n){return{toolbarBehaviours:Td([Qx.config({mode:"cyclic",onEscape:function(t){return Mh(t,n,"button").each(yw.focus),St.none()}})])}}})]),MH=function(n,t){var e=WB.getCoupled(n,"toolbarSandbox");ev.isOpen(e)?ev.close(e):ev.open(e,t.toolbar())},FH=function(n,t,e,o){var r=e.getBounds.map(function(n){return n()}),i=e.lazySink(n).getOrDie();Sp.positionWithinBounds(i,{anchor:"hotspot",hotspot:n,layouts:o,overrides:{maxWidthFunction:oH()}},t,r)},IH=function(n,t,e,o,r){gH.setGroups(t,r),FH(n,t,e,o),Hw.on(n)},RH=function(n,t,e){var o=cl(),r=function(r,i){e.fetch().get(function(r){IH(n,i,e,t.layouts,r),o.link(n.element()),Qx.focusIn(i)})},i=function(){Hw.off(n),yw.focus(n),o.unlink(n.element())};return{dom:{tag:"div",attributes:{id:o.id}},behaviours:Td([Qx.config({mode:"special",onEscape:function(n){return ev.close(n),St.some(!0)}}),ev.config({onOpen:r,onClose:i,isPartOf:function(t
},a=function(t){return e.setInitialValue.each(function(n){return n(t.getComponent())}),e.nodeChangeHandler.map(function(e){var o=e(t.getComponent());return n.on("NodeChange",o),function(){n.off("NodeChange",o)}}).getOr(ut)};return CI({text:e.icon.isSome()?St.none():St.some(""),icon:e.icon,tooltip:St.from(e.tooltip),role:St.none(),fetch:r.getFetch(t,i),onSetup:a,getApi:u,columns:1,presets:"normal",classes:e.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)},tL=function(n){return Xt(n,function(n){var t=n,e=n,o=n.split("=");return o.length>1&&(t=o[0],e=o[1]),{title:t,format:e}})},eL=function(n){return{type:"basic",data:n}};!function(n){n[n.SemiColon=0]="SemiColon",n[n.Space=1]="Space"}(YB||(YB={}));var oL,rL=function(n,t){return t===YB.SemiColon?n.replace(/;$/,"").split(";"):n.split(" ")},iL=function(n,t,e,o){var r=n.getParam(t,e,"string"),i=tL(rL(r,o));return{type:"basic",data:i}},uL=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],aL=function(n){var t=function(){return ne(uL,function(t){return n.formatter.match(t.format)})},e=function(t){return function(){return n.formatter.match(t)}},o=function(){return function(){return St.none()}},r=function(n){var e=t(),o=e.fold(function(){return"left"},function(n){return n.title.toLowerCase()});aa(n,kI,{icon:"align-"+o})},i=St.some(function(n){return function(){return r(n)}}),u=St.some(function(n){return r(n)}),a=eL(uL),c=function(t){return function(){return ne(uL,function(n){return n.format===t.format}).each(function(t){return n.execCommand(t.command)})}};return{tooltip:"Align",icon:St.some("align-left"),isSelectedFor:e,getCurrentValue:ft(St.none()),getPreviewFor:o,onAction:c,setInitialValue:u,nodeChangeHandler:i,dataset:a,shouldHide:!1,isInvalid:function(t){return!n.formatter.canApply(t.format)}}},cL=function(n,t){return nL(n,t,aL(n))},sL=function(n,t){var e=ZN(n,t,aL(n));n.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})},fL="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",lL=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],dL=function(n){var t=n.split(/\s*,\s*/);return Xt(t,function(n){return n.replace(/^['"]+|['"]+$/g,"")})},mL=function(n){var t=function(){var t=dL(n.toLowerCase());return re(lL,function(n){return t.indexOf(n.toLowerCase())>-1})};return 0===n.indexOf("-apple-system")&&t()},gL=function(n){var t=function(){var t=function(n){return n?dL(n)[0]:""},e=n.queryCommandValue("FontName"),o=s.data,r=e?e.toLowerCase():"",i=ne(o,function(n){var e=n.format;return e.toLowerCase()===r||t(e).toLowerCase()===t(r).toLowerCase()}).orThunk(function(){return mL(r)?St.from({title:"System Font",format:r}):St.none()});return{matchOpt:i,font:e}},e=function(n){return function(t){return t.exists(function(t){return t.format===n})}},o=function(){var n=t().matchOpt;return n},r=function(n){return function(){return St.some({tag:"div",styles:-1===n.indexOf("dings")?{"font-family":n}:{}})}},i=function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("FontName",!1,t.format)})}},u=function(n){var e=t(),o=e.matchOpt,r=e.font,i=o.fold(function(){return r},function(n){return n.title});aa(n,SI,{text:i})},a=St.some(function(n){return fu
return ht({tag:Da(t),classes:r,attributes:o},i)},FU=function(n){return{dom:{tag:"div",attributes:{"aria-label":n.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:MU('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:Td([Qx.config({mode:"special",onTab:function(){return St.some(!0)},onShiftTab:function(){return St.some(!0)}}),yw.config({})])}},IU=function(n,t,e){var o=n.element();t===!0?(cw.set(n,[FU(e)]),Js(o,"display"),mc(o,"aria-hidden")):(cw.set(n,[]),js(o,"display","none"),cc(o,"aria-hidden","true"))},RU=function(n){return{uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Td([cw.config({})]),components:[]}},VU=function(n,t,e){var o=qr(!1),r=qr(St.none()),i=function(n){n!==o.get()&&(IU(t(),n,e.providers),o.set(n))};n.on("ProgressState",function(t){if(r.get().each(VS.clearTimeout),Rt(t.time)){var e=VS.setEditorTimeout(n,function(){return i(t.state)},t.time);r.set(St.some(e))}else i(t.state),r.set(St.none())})},PU=function(n,t){var e={getSocket:function(t){return tj.getPart(t,n,"socket")},setSidebar:function(t,e){tj.getPart(t,n,"sidebar").each(function(n){return CU(n,e)})},toggleSidebar:function(t,e){tj.getPart(t,n,"sidebar").each(function(n){return OU(n,e)})},whichSidebar:function(t){return tj.getPart(t,n,"sidebar").bind(_U).getOrNull()},getHeader:function(t){return tj.getPart(t,n,"header")},getToolbar:function(t){return tj.getPart(t,n,"toolbar")},setToolbar:function(t,e){tj.getPart(t,n,"toolbar").each(function(n){n.getApis().setGroups(n,e)})},setToolbars:function(t,e){tj.getPart(t,n,"multiple-toolbar").each(function(n){sj.setItems(n,e)})},refreshToolbar:function(t){var e=tj.getPart(t,n,"toolbar");e.each(function(n){return n.getApis().refresh(n)})},getThrobber:function(t){return tj.getPart(t,n,"throbber")},focusToolbar:function(t){var e=tj.getPart(t,n,"toolbar").orThunk(function(){return tj.getPart(t,n,"multiple-toolbar")});e.each(function(n){Qx.focusIn(n)})},setMenubar:function(t,e){tj.getPart(t,n,"menubar").each(function(n){fU.setMenus(n,e)})},focusMenubar:function(t){tj.getPart(t,n,"menubar").each(function(n){fU.focus(n)})}};return{uid:n.uid,dom:n.dom,components:t,apis:e,behaviours:n.behaviours}},HU=ej.optional({factory:fU,name:"menubar",schema:[br("backstage")]}),zU=function(n){return n.type===Dk.sliding?Ez:n.type===Dk.floating?Tz:Bz},NU=ej.optional({factory:{sketch:function(n){return sj.sketch({uid:n.uid,dom:n.dom,listBehaviours:Td([Qx.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Bz({type:n.type,uid:Sc("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:n.providers,onEscape:function(){return St.none()}})},setupItem:function(n,t,e){gH.setGroups(t,e)},shell:!0})}},name:"multiple-toolbar",schema:[br("dom"),br("onEscape")]}),LU=ej.optional({factory:{sketch:function(n){var t=zU(n),e={type:n.type,uid:n.uid,onEscape:function(){return n.onEscape(),St.some(!0)},cyclicKeying:!1,initGroups:[],getSink:n.getSink,providers:n.providers,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader},attributes:n.attributes};return t(e)}},name:"toolbar",schema:[br("dom"),br("onEscape"),br("getSink")]}),jU=ej.optional({factory:{sketch:cU},name:"header",schema:[br("dom")]}),UU=ej.optional({name:"socket",schema:[br("dom")]}),WU=ej.optional({factory:{sketch:BU},name:"sidebar",schema:[br("dom")]}),GU=ej.optional({factory:{sketch:RU},name:"throbber",schema:[br("dom")]}),XU=Jh({name:"OuterContainer",factory:PU,configFields:[br("dom"),br("behaviours")],partFields:[jU,HU,LU,NU,UU,WU,GU],apis:{getSocket:function(n,t){return n.getSocket(t)},setSidebar:function(n,t,e){n.setSidebar(t,e)},toggleSidebar:function(n,t,e){n.toggleSidebar(t,e)},whichSidebar:function(n,t){return n.whichSidebar(t)},getHeader:function(n,t){return n.getHeader(t)},getToolbar:function(n,t){return n.getToolbar(t)},setToolbar:function(n,t,e){var o=Xt(e,function(n){return Cz(n)});n.setToolbar(t,o)},setToolbars:function(n,t,e){var o=Xt(e,function(n){return Xt(n,Cz)
o(t.get(),i)||(t.set(St.some(i)),e(i))},mustSnap:!0}},NX=function(n){return zS(HS.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Td([RX.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:n}),mD.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},LX=function(n,t){var e=qr([]),o=qr([]),r=qr(!1),i=qr(St.none()),u=qr(St.none()),a=function(n){var e=Qf(n);return HX(m.getOpt(t),n,e.x,e.y,e.width,e.height)},c=function(){return Xt(e.get(),function(n){return a(n)})},s=function(n){var e=Qf(n);return HX(g.getOpt(t),n,e.right,e.bottom,e.width,e.height)},f=function(){return Xt(o.get(),function(n){return s(n)})},l=zX(c,i,function(t){u.get().each(function(e){n.fire("TableSelectorChange",{start:t,finish:e})})}),d=zX(f,u,function(t){i.get().each(function(e){n.fire("TableSelectorChange",{start:e,finish:t})})}),m=NX(l),g=NX(d),p=mf(m.asSpec()),v=mf(g.asSpec()),h=function(t,e,o,r){var i=e.dom().getBoundingClientRect();Js(t.element(),"display");var u=Na(ni.fromDom(n.getBody())).dom().innerHeight,a=o(i),c=r(i,u);(a||c)&&js(t.element(),"display","none")},b=function(n,t,e,o){var r=e(t);RX.snapTo(n,r);var i=function(n){return n[o]<0},u=function(n,t){return n[o]>t};h(n,t,i,u)},y=function(n){return b(p,n,a,"top")},x=function(){return i.get().each(y)},w=function(n){return b(v,n,s,"bottom")},S=function(){return u.get().each(w)};qi().deviceType.isTouch()&&(n.on("TableSelectionChange",function(n){r.get()||(Ep(t,p),Ep(t,v),r.set(!0)),i.set(St.some(n.start)),u.set(St.some(n.finish)),n.otherCells.each(function(t){e.set(t.upOrLeftCells),o.set(t.downOrRightCells),y(n.start),w(n.finish)})}),n.on("ResizeEditor ResizeWindow ScrollContent",function(){x(),S()}),n.on("TableSelectionClear",function(){r.get()&&(Ap(p),Ap(v),r.set(!1)),i.set(St.none()),u.set(St.none())}))};!function(n){n[n.None=0]="None",n[n.Both=1]="Both",n[n.Vertical=2]="Vertical"}(oL||(oL={}));var jX=function(n,t,e,o,r){var i={};return i.height=pW(o+t.top(),fO(n),dO(n)),e===oL.Both&&(i.width=pW(r+t.left(),sO(n),lO(n))),i},UX=function(n,t,e){var o=ni.fromDom(n.getContainer()),r=jX(n,t,e,vf(o),Tf(o));Ae(r,function(n,t){return js(o,t,gW(n))}),uT(n)},WX=function(n){if(1===n.nodeType){if("BR"===n.nodeName||n.getAttribute("data-mce-bogus"))return!0;if("bookmark"===n.getAttribute("data-mce-type"))return!0}return!1},GX=function(n,t,e){t.delimiter||(t.delimiter="»");var o=function(o){var r=o||[],i=Xt(r,function(t,o){return HS.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":o,"tab-index":-1,"aria-level":o+1},innerHtml:t.name},action:function(){n.focus(),n.selection.select(t.element),n.nodeChanged()},buttonBehaviours:Td([QO.button(e.isReadOnly),YO()])})}),u={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+t.delimiter+" "}};return Qt(i.slice(1),function(n,t){var e=n;return e.push(u),e.push(t),e},[i[0]])},r=function(t){for(var e=[],o=t.length;o-->0;){var r=t[o];if(1===r.nodeType&&!WX(r)){var i=n.fire("ResolveName",{name:r.nodeName.toLowerCase(),target:r});if(i.isDefaultPrevented()||e.push({name:i.name,element:r}),i.isPropagationStopped())break}}return e};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Td([Qx.config({mode:"flow",selector:"div[role=button]"}),eO.config({disabled:e.isReadOnly}),YO(),XE.config({}),cw.config({}),fw("elementPathEvents",[_a(function(t){n.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Qx.focusIn(t)}),n.on("NodeChange",function(n){var e=r(n.parents);e.length>0?cw.set(t,o(e)):cw.set(t,[])})})])]),components:[]}},XX=function(n,t){var e=function(n,e,o){return cw.set(n,[ff(t.translate(["{0} "+o,e[o]]))])};return HS.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Td([QO.button(t.isReadOnly),YO(),XE.config({}),cw.config({}),Hv.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),fw("wordcount-events",[Ba(function(n){var t=Hv.getValue(n),o="w
})})},i=r("start",o.pass),u=r("end",o.fail);return[i,u]},PK=function(n,t){var e=function(n,e){var o=Xt(e.buttons,function(n){var e=zS(IK(n,t));return{name:n.name,align:n.align,memento:e}}),r=function(n,t){return RK(n,o,t)};return St.some({lookupByName:r,footerButtons:o})};return{dom:MU('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Td([uN.config({channel:uK,initialData:n,updateState:e,renderComponents:VK})])}},HK=function(n,t){return PK(n,t)},zK=function(n,t){return tY.parts().footer(PK(n,t))},NK=function(n,t){var e=n.getRoot();if(e.getSystem().isConnected()){var o=ib.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return cF.getField(o,t).fold(function(){var e=n.getFooter(),r=uN.getState(e);return r.get().bind(function(n){return n.lookupByName(o,t)})},function(n){return St.some(n)})}return St.none()},LK=function(n,t){var e=n.getRoot();return uN.getState(e).get().map(function(n){return rr(or("data",n.dataValidator,t))}).getOr(t)},jK=function(n,t,e){var o=function(t){var e=n.getRoot();e.getSystem().isConnected()&&t(e)},r=function(){var t=n.getRoot(),o=t.getSystem().isConnected()?n.getFormWrapper():t,r=Hv.getValue(o),i=Me(e,function(n){return n.get()});return ht(ht({},r),i)},i=function(t){o(function(){var o=g.getData(),r=ht(ht({},o),t),i=LK(n,r),u=n.getFormWrapper();Hv.setValue(u,i),Ae(e,function(n,t){Le(r,t)&&n.set(r[t])})})},u=function(t){NK(n,t).each(eO.disable)},a=function(t){NK(n,t).each(eO.enable)},c=function(t){NK(n,t).each(yw.focus)},s=function(n){if(!Tt(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");o(function(t){aa(t,rB,{message:n})})},f=function(){o(function(n){ua(n,iB)})},l=function(t){o(function(){var e=n.getBody(),o=uN.getState(e);o.get().exists(function(n){return n.isTabPanel()})&&ib.getCurrent(e).each(function(n){Gq.showTab(n,t)})})},d=function(n){o(function(e){var o=t(n);e.getSystem().broadcastOn([oK],o),e.getSystem().broadcastOn([rK],o.internalDialog),e.getSystem().broadcastOn([iK],o.internalDialog),e.getSystem().broadcastOn([uK],o.internalDialog),g.setData(o.initialData)})},m=function(){o(function(n){ua(n,nB)})},g={getData:r,setData:i,disable:u,enable:a,focus:c,block:s,unblock:f,showTab:l,redial:d,close:m};return g},UK=function(n,t,e){var o=OK(n.internalDialog.title,e),r=fK({body:n.internalDialog.body},e),i=EK(n.internalDialog.buttons),u=BK(i),a=zK({buttons:i},e),c=FK.initDialog(function(){return m},_K(function(){return l},t),e.shared.getSink),s="normal"!==n.internalDialog.size?"large"===n.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],f={header:o,body:r,footer:St.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=TK(f,n,c,e),d=function(){var n=function(){var n=tY.getBody(l);return ib.getCurrent(n).getOr(n)};return{getRoot:function(){return l},getBody:function(){return tY.getBody(l)},getFooter:function(){return tY.getFooter(l)},getFormWrapper:n}}(),m=jK(d,t.redial,u);return{dialog:l,instanceApi:m}},WK=function(n,t,e,o){var r,i,u=Sc("dialog-label"),a=Sc("dialog-content"),c=function(n,t){return St.some(t)},s=zS(kK({title:n.internalDialog.title,draggable:!0},u,e.shared.providers)),f=zS(sK({body:n.internalDialog.body},a,e,o)),l=EK(n.internalDialog.buttons),d=BK(l),m=zS(HK({buttons:l},e)),g=FK.initDialog(function(){return v},{onBlock:function(){},onUnblock:function(){},onClose:function(){return t.closeWindow()}},e.shared.getSink),p=mf({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=u,r["aria-describedby"]=""+a,r)},eventOrder:(i={},i[Hu()]=[uN.name(),Pd.name()],i[zu()]=["execute-on-form"],i[Ju()]=["reflecting","execute-on-form"],i),behaviours:Td([Qx.config({mode:"cyclic",onEscape:function(n){return ua(n,nB),St.some(!0)},useTabstopAt:function(n){return!GF(n)&&("button"!==Da(n)||"disabled"!==fc(n,"disabled"))}}),uN.config({channel:oK,updateState:c,initialData:n}),yw.config({}),fw("execute-on-form",g.concat([Oa(Ou(),function(n){Qx.focusIn(n)})])),IF.memory({})]),components:[s.asSpec(),f.asSpec(),m.asSpec()]}),v=j
;/*!node_modules/tinymce/themes/silver/index.js*/
amis.define("node_modules/tinymce/themes/silver/index",function(e){e("node_modules/tinymce/themes/silver/theme")});
;/*!node_modules/tinymce/plugins/advlist/plugin.js*/
amis.define("node_modules/tinymce/plugins/advlist/plugin",function(){!function(){"use strict";function n(){t.add("advlist",function(n){var t=function(n,t){return-1!==e.inArray(n.getParam("plugins","","string").split(/[ ,]/),t)};t(n,"lists")&&(U(n),o(n))})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,e===!1?null:{"list-style-type":e})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){r(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){r(n,"OL",e["list-style-type"])})},i=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},u=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},l=function(){},c=function(n){return function(){return n}},s=c(!1),f=c(!0),a=function(){return d},d=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:s,isSome:s,isNone:f,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:e,orThunk:t,map:a,each:l,bind:a,exists:s,forall:f,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")};return r}(),m=function(n){var t=c(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:f,isNone:s,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return m(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(s,function(t){return e(n,t)})}};return o},g=function(n){return null===n||void 0===n?d:m(n)},p={some:m,none:a,from:g},v=function(n,t){return n.$.contains(n.getBody(),t)},y=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},O=function(n){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&v(n,t)}},h=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return p.from(e)},L=function(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(t(r))return e}return-1},N=function(n){return n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})},S=function(n,t,r){var o=L(t.parents,y),i=-1!==o?t.parents.slice(0,o):t.parents,u=e.grep(i,O(n));return u.length>0&&u[0].nodeName===r},T=function(n,t,o,i,u,l){n.ui.registry.addSplitButton(t,{tooltip:o,icon:"OL"===u?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){var t=e.map(l,function(n){var t="OL"===u?"num":"bull",e="disc"===n||"decimal"===n?"default":n,r="default"===n?"":n,o=N(n);return{type:"choiceitem",value:r,icon:"list-"+t+"-"+e,text:o}});n(t)},onAction:function(){return n.execCommand(i)},onItemAction:function(t,e){r(n,u,e)},select:function(t){var e=h(n);return e.map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var e=function(e){t.setActive(S(n,e,u))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}})},A=function(n,t,e,r,o){n.ui.registry.addToggleButton(t,{active:!1,tooltip:e,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:function(t){var e=function(e){t.setActive(S(n,e,o))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}},onAction:function(){return n.execCommand(r)}})},C=function(n,t,e,r,o,i){i.length>1?T(n,t,e,r,o,i):A(n,t,e,r,o)},U=function(n){C(n,"numlist","Numbered list","InsertOrderedList","OL",i(n)),C(n,"bullist","Bullet list","InsertUnorderedList","UL",u(n))};n()}()});
;/*!node_modules/tinymce/plugins/advlist/index.js*/
amis.define("node_modules/tinymce/plugins/advlist/index",function(i){i("node_modules/tinymce/plugins/advlist/plugin")});
;/*!node_modules/tinymce/plugins/autolink/plugin.js*/
amis.define("node_modules/tinymce/plugins/autolink/plugin",function(){!function(){"use strict";function t(){e.add("autolink",function(t){h(t)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i)},o=function(t){return t.getParam("default_link_target",!1)},r=function(t){return t.getParam("link_default_protocol","http","string")},a=function(t,e){return t===e||" "===t||160===t.charCodeAt(0)},d=function(t){g(t,-1,"(")},f=function(t){g(t,0,"")},s=function(t){g(t,-1,"")},l=function(t,e){if(0>e&&(e=0),3===t.nodeType){var n=t.data.length;e>n&&(e=n)}return e},u=function(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,l(e,n)):t.setStartBefore(e)},c=function(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,l(e,n)):t.setEndAfter(e)},g=function(t,e,n){var d,f,s,l,g,h,m,C=i(t),y=o(t);if("A"!==t.selection.getNode().tagName){var v=t.selection.getRng().cloneRange();if(v.startOffset<5){if(g=v.endContainer.previousSibling,!g){if(!v.endContainer.firstChild||!v.endContainer.firstChild.nextSibling)return;g=v.endContainer.firstChild.nextSibling}if(h=g.length,u(v,g,h),c(v,g,h),v.endOffset<5)return;d=v.endOffset,f=g}else{if(f=v.endContainer,3!==f.nodeType&&f.firstChild){for(;3!==f.nodeType&&f.firstChild;)f=f.firstChild;3===f.nodeType&&(u(v,f,0),c(v,f,f.nodeValue.length))}d=1===v.endOffset?2:v.endOffset-1-e}var k=d;do u(v,f,d>=2?d-2:0),c(v,f,d>=1?d-1:0),d-=1,m=v.toString();while(" "!==m&&""!==m&&160!==m.charCodeAt(0)&&d-2>=0&&m!==n);a(v.toString(),n)?(u(v,f,d),c(v,f,k),d+=1):0===v.startOffset?(u(v,f,0),c(v,f,k)):(u(v,f,d),c(v,f,k)),l=v.toString(),"."===l.charAt(l.length-1)&&c(v,f,k-1),l=v.toString().trim();var p=l.match(C),w=r(t);p&&("www."===p[1]?p[1]=w+"://www.":/@$/.test(p[1])&&!/^mailto:/.test(p[1])&&(p[1]="mailto:"+p[1]),s=t.selection.getBookmark(),t.selection.setRng(v),t.execCommand("createlink",!1,p[1]+p[2]),y!==!1&&t.dom.setAttrib(t.selection.getNode(),"target",y),t.selection.moveToBookmark(s),t.nodeChanged())}},h=function(t){var e;return t.on("keydown",function(e){return 13===e.keyCode?s(t):void 0}),n.browser.isIE()?void t.on("focus",function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}}):(t.on("keypress",function(e){return 41===e.keyCode?d(t):void 0}),void t.on("keyup",function(e){return 32===e.keyCode?f(t):void 0}))};t()}()});
;/*!node_modules/tinymce/plugins/autolink/index.js*/
amis.define("node_modules/tinymce/plugins/autolink/index",function(n){n("node_modules/tinymce/plugins/autolink/plugin")});
;/*!node_modules/tinymce/plugins/lists/plugin.js*/
amis.define("node_modules/tinymce/plugins/lists/plugin",function(){!function(n){"use strict";function e(){t.add("lists",function(n){return jo(n)===!1&&(Ko(n),Ho(n)),Vo(n),Wo(n),_o(n)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},o=function(n){return function(){return n}},i=function(n){return function(e){return!n(e)}},u=o(!1),a=o(!0),c=function(){return s},s=function(){var n=function(n){return n.isNone()},e=function(n){return n()},t=function(n){return n},i={fold:function(n){return n()},is:u,isSome:u,isNone:a,getOr:t,getOrThunk:e,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:t,orThunk:e,map:c,each:r,bind:c,exists:u,forall:a,filter:c,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")};return i}(),f=function(n){var e=o(n),t=function(){return i},r=function(e){return e(n)},i={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:a,isNone:u,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return f(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?i:s},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(u,function(e){return t(n,e)})}};return i},d=function(n){return null===n||void 0===n?s:f(n)},l={some:f,none:c,from:d},m=function(n){var e=typeof n;return null===n?"null":"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e},p=function(n){return function(e){return m(e)===n}},v=function(n){return function(e){return typeof e===n}},g=p("string"),h=p("array"),y=v("boolean"),S=v("function"),b=v("number"),C=Array.prototype.slice,N=Array.prototype.push,O=function(n,e){for(var t=n.length,r=new Array(t),o=0;t>o;o++){var i=n[o];r[o]=e(i,o)}return r},L=function(n,e){for(var t=0,r=n.length;r>t;t++){var o=n[t];e(o,t)}},w=function(n,e){for(var t=[],r=0,o=n.length;o>r;r++){var i=n[r];e(i,r)&&t.push(i)}return t},T=function(n,e){if(0===n.length)return[];for(var t=e(n[0]),r=[],o=[],i=0,u=n.length;u>i;i++){var a=n[i],c=e(a);c!==t&&(r.push(o),o=[]),t=c,o.push(a)}return 0!==o.length&&r.push(o),r},D=function(n,e,t){return L(n,function(n){t=e(t,n)}),t},k=function(n,e,t){for(var r=0,o=n.length;o>r;r++){var i=n[r];if(e(i,r))return l.some(i);if(t(i,r))break}return l.none()},x=function(n,e){return k(n,e,u)},A=function(n){for(var e=[],t=0,r=n.length;r>t;++t){if(!h(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);N.apply(e,n[t])}return e},E=function(n,e){return A(O(n,e))},B=function(n){var e=C.call(n,0);return e.reverse(),e},P=function(n){return 0===n.length?l.none():l.some(n[0])},R=function(n){return 0===n.length?l.none():l.some(n[n.length-1])},I=function(n,e,t){return 0!==(n.compareDocumentPosition(e)&t)},M=function(e,t){return I(e,t,n.Node.DOCUMENT_POSITION_CONTAINED_BY)},U=function(){return U=Object.assign||function(n){for(var e,t=1,r=arguments.length;r>t;t++){e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},U.apply(this,arguments)},_=function(n){var e,t=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t||(t=!0,e=n.apply(null,r)),e}},F=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return void 0},$=function(n,e){var t=F(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return q(r(1),r(2))},H=function(n,e){var t=String(e).toLowerCase();return 0===n.length?j():$(n,t)},j=function(){return q(0,0)},q=function(n,e){return{major:n,minor:e}},K={nu:q,detect:H,unknown:j},V="Edge",W="Chrome",Q="IE",X="Opera",z="Firefox",Y="Safari",G=function(){return J({current:void 0,version:K.unknown()})},J=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isEdge:r(V),isChrome:r(W),isIE:r(Q),
;/*!node_modules/tinymce/plugins/lists/index.js*/
amis.define("node_modules/tinymce/plugins/lists/index",function(i){i("node_modules/tinymce/plugins/lists/plugin")});
;/*!node_modules/tinymce/plugins/link/plugin.js*/
amis.define("node_modules/tinymce/plugins/link/plugin",function(){!function(n){"use strict";function t(){e.add("link",function(n){xe(n),be(n),Oe(n),we(n),he(n),ke(n),ye(n)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.VK"),o=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},i=function(n){return function(t){return o(t)===n}},u=function(n){return function(t){return typeof t===n}},a=function(n){return function(t){return n===t}},c=i("string"),l=i("array"),f=a(null),s=u("boolean"),g=u("function"),m=function(n){var t=n.getParam("link_assume_external_targets",!1);return s(t)&&t?1:!c(t)||"http"!==t&&"https"!==t?0:t},d=function(n){return n.getParam("link_context_toolbar",!1,"boolean")},h=function(n){return n.getParam("link_list")},v=function(n){return n.getParam("default_link_target")},p=function(n){return n.getParam("target_list",!0)},k=function(n){return n.getParam("rel_list",[],"array")},y=function(n){return n.getParam("link_class_list",[],"array")},x=function(n){return n.getParam("link_title",!0,"boolean")},b=function(n){return n.getParam("allow_unsafe_link_target",!1,"boolean")},O=function(n){return n.getParam("link_quicklink",!1,"boolean")},w=function(n){return n.getParam("link_default_protocol","http","string")},C=function(){},A=function(n){return function(){return n}},N=A(!1),_=A(!0),P=function(){return T},T=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:N,isSome:N,isNone:_,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:A(null),getOrUndefined:A(void 0),or:e,orThunk:t,map:P,each:C,bind:P,exists:N,forall:_,filter:P,equals:n,equals_:n,toArray:function(){return[]},toString:A("none()")};return r}(),S=function(n){var t=A(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:_,isNone:N,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return S(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(N,function(t){return e(n,t)})}};return o},D=function(n){return null===n||void 0===n?T:S(n)},L={some:S,none:P,from:D},M=Array.prototype.indexOf,R=Array.prototype.push,E=function(n,t){return M.call(n,t)},U=function(n,t){return E(n,t)>-1},q=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var i=n[o];r[o]=t(i,o)}return r},K=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];t(o,e)}},z=function(n,t,e){return K(n,function(n){e=t(e,n)}),e},I=function(n){for(var t=[],e=0,r=n.length;r>e;++e){if(!l(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);R.apply(t,n[e])}return t},j=function(n,t){return I(q(n,t))},B=function(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return L.none()},V=function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t},F=tinymce.util.Tools.resolve("tinymce.util.Tools"),W=function(n){return c(n.value)?n.value:""},$=function(n,t){var e=[];return F.each(n,function(n){var r=c(n.text)?n.text:c(n.title)?n.title:"";if(void 0!==n.menu);else{var o=t(n);e.push({text:r,value:o})}}),e},H=function(n){return void 0===n&&(n=W),function(t){return L.from(t).map(function(t){return $(t,n)})}},G=function(n){return H(W)(n)},J=function(n,t){return function(e){return{name:n,type:"selectbox",label:t,items:e}}},X={sanitize:G,sanitizeWith:H,createUi:J,getValue:W},Q=function(){return Q=Object.assign||function(n){for(var t,e=1,r=arguments.length;r>e;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},Q.apply(this,a
;/*!node_modules/tinymce/plugins/link/index.js*/
amis.define("node_modules/tinymce/plugins/link/index",function(n){n("node_modules/tinymce/plugins/link/plugin")});
;/*!node_modules/tinymce/plugins/image/plugin.js*/
amis.define("node_modules/tinymce/plugins/image/plugin",function(){!function(e){"use strict";function t(t){var n=function(n,r,i,a){var o=new e.XMLHttpRequest;o.open("POST",t.url),o.withCredentials=t.credentials,o.upload.onprogress=function(e){a(e.loaded/e.total*100)},o.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){if(o.status<200||o.status>=300)return void i("HTTP Error: "+o.status);var e=JSON.parse(o.responseText);return e&&"string"==typeof e.location?void r(fn(t.basePath,e.location)):void i("Invalid JSON: "+o.responseText)};var u=new e.FormData;u.append("file",n.blob(),n.filename()),o.send(u)},r=function(e,t){return new F(function(n,r){try{t(e,n,r,i)}catch(a){r(a.message)}})},a=function(e){return e===n},o=function(e){return!t.url&&a(t.handler)?F.reject("Upload url missing from the settings."):r(e,t.handler)};return t=rn.extend({credentials:!1,handler:n},t),{upload:o}}function n(){r.add("image",function(e){ir(e),ar(e),tr(e)})}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){},a=function(e){return function(){return e}},o=a(!1),u=a(!0),s=function(){return c},c=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},r={fold:function(e){return e()},is:o,isSome:o,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:n,orThunk:t,map:s,each:i,bind:s,exists:o,forall:u,filter:s,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")};return r}(),l=function(e){var t=a(e),n=function(){return i},r=function(t){return t(e)},i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:o,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return l(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?i:c},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(o,function(t){return n(e,t)})}};return i},m=function(e){return null===e||void 0===e?c:l(e)},d={some:l,none:s,from:m},f=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},g=function(e){return function(t){return f(t)===e}},p=function(e){return function(t){return typeof t===e}},h=function(e){return function(t){return e===t}},b=g("string"),v=g("object"),y=g("array"),w=h(null),A=p("boolean"),D=p("number"),S=Array.prototype.push,T=function(e){for(var t=[],n=0,r=e.length;r>n;++n){if(!y(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);S.apply(t,e[n])}return t},x=function(e){return 0===e.length?d.none():d.some(e[0])},C=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return d.none()},U=Object.prototype.hasOwnProperty,I=function(e,t){var n=v(e)&&v(t);return n?N(e,t):t},O=function(e){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},i=0;i<t.length;i++){var a=t[i];for(var o in a)U.call(a,o)&&(r[o]=e(r[o],a[o]))}return r}},N=O(I),P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},P.apply(this,arguments)},L=("undefined"!=typeof e.window?e.window:Function("return this;")(),function(t,n,r){if(!(b(r)||A(r)||D(r)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,r+"")}),_=function(e,t,n){L(e.dom(),t,n)},E=function(e,t){e.dom().removeAttribute(t)},k=function(t,n){var r=n||e.document,i=r.createElement("div");if(i.innerHTML=t,!i.hasChildNodes()||i.childNodes.length>1)throw e.console.
;/*!node_modules/tinymce/plugins/image/index.js*/
amis.define("node_modules/tinymce/plugins/image/index",function(e){e("node_modules/tinymce/plugins/image/plugin")});
;/*!node_modules/tinymce/plugins/charmap/plugin.js*/
amis.define("node_modules/tinymce/plugins/charmap/plugin",function(){!function(n){"use strict";function e(){r.add("charmap",function(n){var e=U(n);return G(n,e),W(n),Q(n,e[0]),D(n)})}var r=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n,e){return n.fire("insertCustomChar",{chr:e})},a=function(n,e){var r=t(n,e).chr;n.execCommand("mceInsertContent",!1,r)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n){return n.getParam("charmap")},u=function(n){return n.getParam("charmap_append")},c=function(){},s=function(n){return function(){return n}},l=s(!1),g=s(!0),f=function(){return m},m=function(){var n=function(n){return n.isNone()},e=function(n){return n()},r=function(n){return n},t={fold:function(n){return n()},is:l,isSome:l,isNone:g,getOr:r,getOrThunk:e,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(void 0),or:r,orThunk:e,map:f,each:c,bind:f,exists:l,forall:g,filter:f,equals:n,equals_:n,toArray:function(){return[]},toString:s("none()")};return t}(),h=function(n){var e=s(n),r=function(){return a},t=function(e){return e(n)},a={fold:function(e,r){return r(n)},is:function(e){return n===e},isSome:g,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:r,orThunk:r,map:function(e){return h(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:m},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,r){return e.fold(l,function(e){return r(n,e)})}};return a},p=function(n){return null===n||void 0===n?m:h(n)},d={some:h,none:f,from:p},y=function(n){var e=typeof n;return null===n?"null":"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e},v=function(n){return function(e){return y(e)===n}},w=v("array"),b=Array.prototype.push,k=function(n,e){for(var r=n.length,t=new Array(r),a=0;r>a;a++){var i=n[a];t[a]=e(i,a)}return t},C=function(n,e){for(var r=0,t=n.length;t>r;r++){var a=n[r];e(a,r)}},x=function(n,e,r){for(var t=0,a=n.length;a>t;t++){var i=n[t];if(e(i,t))return d.some(i);if(r(i,t))break}return d.none()},A=function(n,e){return x(n,e,l)},O=function(n){for(var e=[],r=0,t=n.length;t>r;++r){if(!w(n[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+n);b.apply(e,n[r])}return e},q=function(n,e){return O(k(n,e))},S=i.isArray,T="User Defined",E=function(){return[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[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"]]},{name:"Quotations",characters:[[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"
;/*!node_modules/tinymce/plugins/charmap/index.js*/
amis.define("node_modules/tinymce/plugins/charmap/index",function(n){n("node_modules/tinymce/plugins/charmap/plugin")});
;/*!node_modules/tinymce/plugins/print/plugin.js*/
amis.define("node_modules/tinymce/plugins/print/plugin",function(){!function(){"use strict";function n(){t.add("print",function(n){e(n),o(n),n.addShortcut("Meta+P","","mcePrint")})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),e=function(n){n.addCommand("mcePrint",function(){i.browser.isIE()?n.getDoc().execCommand("print",!1,null):n.getWin().print()})},o=function(n){n.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return n.execCommand("mcePrint")}}),n.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return n.execCommand("mcePrint")}})};n()}()});
;/*!node_modules/tinymce/plugins/print/index.js*/
amis.define("node_modules/tinymce/plugins/print/index",function(n){n("node_modules/tinymce/plugins/print/plugin")});
;/*!node_modules/tinymce/plugins/preview/plugin.js*/
amis.define("node_modules/tinymce/plugins/preview/plugin",function(){!function(){"use strict";function e(){t.add("preview",function(e){l(e),y(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("content_style","")},r=function(e){return e.getParam("content_css_cors",!1,"boolean")},a=function(e){var t=e.getParam("body_class","","hash");return t[e.id]||""},c=function(e){var t=e.getParam("body_class","","string");return-1===t.indexOf("=")?t:a(e)},s=function(e){var t=e.getParam("body_id","","hash");return t[e.id]||t},u=function(e){var t=e.getParam("body_id","tinymce","string");return-1===t.indexOf("=")?t:s(e)},d=function(e){var t="",a=e.dom.encode,s=o(e);t+='<base href="'+a(e.documentBaseURI.getURI())+'">',s&&(t+='<style type="text/css">'+s+"</style>");var d=r(e)?' crossorigin="anonymous"':"";i.each(e.contentCSS,function(n){t+='<link type="text/css" rel="stylesheet" href="'+a(e.documentBaseURI.toAbsolute(n))+'"'+d+">"});var m=u(e),l=c(e),y=n.mac?"e.metaKey":"e.ctrlKey && !e.altKey",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+y+")) {e.preventDefault();}}}, false);</script> ",f=e.getBody().dir,p=f?' dir="'+a(f)+'"':"",g="<!DOCTYPE html><html><head>"+t+'</head><body id="'+a(m)+'" class="mce-content-body '+a(l)+'"'+p+">"+e.getContent()+v+"</body></html>";return g},m=function(e){var t=d(e),n=e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}});n.focus("close")},l=function(e){e.addCommand("mcePreview",function(){m(e)})},y=function(e){e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return e.execCommand("mcePreview")}}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return e.execCommand("mcePreview")}})};e()}()});
;/*!node_modules/tinymce/plugins/preview/index.js*/
amis.define("node_modules/tinymce/plugins/preview/index",function(e){e("node_modules/tinymce/plugins/preview/plugin")});
;/*!node_modules/tinymce/plugins/anchor/plugin.js*/
amis.define("node_modules/tinymce/plugins/anchor/plugin",function(){!function(){"use strict";function n(){t.add("anchor",function(n){s(n),u(n),m(n)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n,t){return"A"===t.tagName&&""===n.dom.getAttrib(t,"href")},o=function(n){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)},i=function(n){var t=n.selection.getNode();return e(n,t)?t.getAttribute("id")||t.getAttribute("name"):""},r=function(n,t){var o=n.selection.getNode();e(n,o)?(o.removeAttribute("name"),o.id=t,n.undoManager.add()):(n.focus(),n.selection.collapse(!0),n.insertContent(n.dom.createHTML("a",{id:t})))},a=function(n,t){return o(t)?(r(n,t),!0):(n.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1)},c=function(n){var t=i(n);n.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(t){a(n,t.getData().id)&&t.close()}})},u=function(n){n.addCommand("mceAnchor",function(){c(n)})},d=function(n){return!n.attr("href")&&(n.attr("id")||n.attr("name"))&&!n.firstChild},l=function(n){return function(t){for(var e=0;e<t.length;e++)d(t[e])&&t[e].attr("contenteditable",n)}},s=function(n){n.on("PreInit",function(){n.parser.addNodeFilter("a",l("false")),n.serializer.addNodeFilter("a",l(null))})},m=function(n){n.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return n.execCommand("mceAnchor")},onSetup:function(t){return n.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),n.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return n.execCommand("mceAnchor")}})};n()}()});
;/*!node_modules/tinymce/plugins/anchor/index.js*/
amis.define("node_modules/tinymce/plugins/anchor/index",function(n){n("node_modules/tinymce/plugins/anchor/plugin")});
;/*!node_modules/tinymce/plugins/searchreplace/plugin.js*/
amis.define("node_modules/tinymce/plugins/searchreplace/plugin",function(){!function(e){"use strict";function n(e,n){var t=function(t){if(!e(t))throw new Error("Can only get "+n+" value of a "+n+" node");return r(t).getOr("")},r=function(n){return e(n)?p.from(n.dom().nodeValue):p.none()},o=function(t,r){if(!e(t))throw new Error("Can only set raw "+n+" value of a "+n+" node");t.dom().nodeValue=r};return{get:t,getOption:r,set:o}}function t(){o.add("searchreplace",function(e){var n=r({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return tt(e,n),ot(e,n),Yn(e,n)})}var r=function(e){var n=e,t=function(){return n},r=function(e){n=e};return{get:t,set:r}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){return i=Object.assign||function(e){for(var n,t=1,r=arguments.length;r>t;t++){n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)},a=function(){},u=function(e){return function(){return e}},c=u(!1),f=u(!0),l="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]",s=u(l),d=function(){return m},m=function(){var e=function(e){return e.isNone()},n=function(e){return e()},t=function(e){return e},r={fold:function(e){return e()},is:c,isSome:c,isNone:f,getOr:t,getOrThunk:n,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:t,orThunk:n,map:d,each:a,bind:d,exists:c,forall:f,filter:d,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")};return r}(),h=function(e){var n=u(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return h(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(c,function(n){return t(e,n)})}};return o},g=function(e){return null===e||void 0===e?m:h(e)},p={some:h,none:d,from:g},v=s,y=tinymce.util.Tools.resolve("tinymce.util.Tools"),x=function(e){var n=typeof e;return null===e?"null":"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n},w=function(e){return function(n){return x(n)===e}},b=function(e){return function(n){return typeof n===e}},O=w("string"),C=w("array"),N=b("boolean"),T=b("function"),E=b("number"),k=Array.prototype.slice,S=Array.prototype.push,A=function(e,n){for(var t=e.length,r=new Array(t),o=0;t>o;o++){var i=e[o];r[o]=n(i,o)}return r},D=function(e,n){for(var t=0,r=e.length;r>t;t++){var o=e[t];n(o,t)}},M=function(e,n){for(var t=e.length-1;t>=0;t--){var r=e[t];n(r,t)}},B=function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,a=e.length;a>i;i++){var u=e[i],c=n(u);c!==t&&(r.push(o),o=[]),t=c,o.push(u)}return 0!==o.length&&r.push(o),r},F=function(e,n,t){return D(e,function(e){t=n(t,e)}),t},I=function(e){for(var n=[],t=0,r=e.length;r>t;++t){if(!C(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);S.apply(n,e[t])}return n},P=function(e,n){return I(A(e,n))},R=function(e,n){var t=k.call(e,0);return t.sort(n),t},W=Object.hasOwnProperty,j=function(e,n){return W.call(e,n)},_=("undefined"!=typeof e.window?e.window:Function("return this;")(),9),q=11,V
;/*!node_modules/tinymce/plugins/searchreplace/index.js*/
amis.define("node_modules/tinymce/plugins/searchreplace/index",function(e){e("node_modules/tinymce/plugins/searchreplace/plugin")});
;/*!node_modules/tinymce/plugins/visualblocks/plugin.js*/
amis.define("node_modules/tinymce/plugins/visualblocks/plugin",function(){!function(){"use strict";function n(){o.add("visualblocks",function(n,o){var e=t(!1);u(n,o,e),a(n,e),s(n,o,e)})}var t=function(n){var t=n,o=function(){return t},e=function(n){t=n};return{get:o,set:e}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n,t){n.fire("VisualBlocks",{state:t})},i=function(n,t,o){var i=n.dom;i.toggleClass(n.getBody(),"mce-visualblocks"),o.set(!o.get()),e(n,o.get())},u=function(n,t,o){n.addCommand("mceVisualBlocks",function(){i(n,t,o)})},c=function(n){return n.getParam("visualblocks_default_state",!1,"boolean")},s=function(n,t,o){n.on("PreviewFormats AfterPreviewFormats",function(t){o.get()&&n.dom.toggleClass(n.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),n.on("init",function(){c(n)&&i(n,t,o)})},l=function(n,t){return function(o){o.setActive(t.get());var e=function(n){return o.setActive(n.state)};return n.on("VisualBlocks",e),function(){return n.off("VisualBlocks",e)}}},a=function(n,t){n.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return n.execCommand("mceVisualBlocks")},onSetup:l(n,t)}),n.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return n.execCommand("mceVisualBlocks")},onSetup:l(n,t)})};n()}()});
;/*!node_modules/tinymce/plugins/visualblocks/index.js*/
amis.define("node_modules/tinymce/plugins/visualblocks/index",function(i){i("node_modules/tinymce/plugins/visualblocks/plugin")});
;/*!node_modules/tinymce/plugins/code/plugin.js*/
amis.define("node_modules/tinymce/plugins/code/plugin",function(){!function(){"use strict";function e(){n.add("code",function(e){return i(e),u(e),{}})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},c=function(e){var n=o(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:n},onSubmit:function(n){t(e,n.getData().code),n.close()}})},i=function(e){e.addCommand("mceCodeEditor",function(){c(e)})},u=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return c(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return c(e)}})};e()}()});
;/*!node_modules/tinymce/plugins/code/index.js*/
amis.define("node_modules/tinymce/plugins/code/index",function(e){e("node_modules/tinymce/plugins/code/plugin")});
;/*!node_modules/tinymce/plugins/fullscreen/plugin.js*/
amis.define("node_modules/tinymce/plugins/fullscreen/plugin",function(){!function(n){"use strict";function t(){r.add("fullscreen",function(n){var t=e(null);return n.inline?o(t):(ie(n,t),fe(n,t),n.addShortcut("Meta+Shift+F","","mceFullScreen"),o(t))})}var e=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){return{isFullscreen:function(){return null!==n.get()}}},u=function(){},i=function(n,t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n(t.apply(null,e))}},c=function(n,t){return function(e){return n(t(e))}},f=function(n){return function(){return n}},l=f(!1),a=f(!0),s=function(){return d},d=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},r={fold:function(n){return n()},is:l,isSome:l,isNone:a,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:s,each:u,bind:s,exists:l,forall:a,filter:s,equals:n,equals_:n,toArray:function(){return[]},toString:f("none()")};return r}(),m=function(n){var t=f(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:a,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return m(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(l,function(t){return e(n,t)})}};return o},h=function(n){return null===n||void 0===n?d:m(n)},v={some:m,none:s,from:h},p=function(n){var t=e(v.none()),r=function(){t.get().each(n)},o=function(){r(),t.set(v.none())},u=function(n){r(),t.set(v.some(n))},i=function(){return t.get().isSome()};return{clear:o,isSet:i,set:u}},g=function(){return p(function(n){n.unbind()})},y=function(){var n=e(v.none()),t=function(){n.set(v.none())},r=function(t){n.set(v.some(t))},o=function(t){n.get().each(t)},u=function(){return n.get().isSome()};return{clear:t,set:r,isSet:u,on:o}},w=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},b=function(n){return function(t){return w(t)===n}},S=function(n){return function(t){return typeof t===n}},T=b("string"),x=b("array"),D=S("boolean"),E=function(n){return null===n||void 0===n},A=function(n){return!E(n)},N=S("function"),O=S("number"),C=Array.prototype.push,M=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var u=n[o];r[o]=t(u,o)}return r},k=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];t(o,e)}},F=function(n,t){for(var e=[],r=0,o=n.length;o>r;r++){var u=n[r];t(u,r)&&e.push(u)}return e},P=function(n){for(var t=[],e=0,r=n.length;r>e;++e){if(!x(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);C.apply(t,n[e])}return t},L=function(n,t){return P(M(n,t))},H=function(n){return 0===n.length?v.none():v.some(n[0])},q=Object.keys,V=function(n,t){for(var e=q(n),r=0,o=e.length;o>r;r++){var u=e[r],i=n[u];t(i,u)}},W=function(n){return void 0!==n.style&&N(n.style.getPropertyValue)},j=function(t,e){var r=e||n.document,o=r.createElement("div");if(o.innerHTML=t,!o.hasChildNodes()||o.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return I(o.childNodes[0])},z=function(t,e){var r=e||n.document,o=r.createElement(t);return I(o)},B=function(t,e){var r=e||n.document,o=r.createTextNode(t);return I(o)},I=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:f(n)}},R=function(n,t,e){var r=n.dom();return v.from(r.elementFromPoint(t,e)).map(I)},U={fromHtml:j,fromTag:z,fromText:B,fromDom:I,fromPoint:R},_=("undefined"!=type
;/*!node_modules/tinymce/plugins/fullscreen/index.js*/
amis.define("node_modules/tinymce/plugins/fullscreen/index",function(e){e("node_modules/tinymce/plugins/fullscreen/plugin")});
;/*!node_modules/tinymce/plugins/insertdatetime/plugin.js*/
amis.define("node_modules/tinymce/plugins/insertdatetime/plugin",function(){!function(){"use strict";function e(){t.add("insertdatetime",function(e){g(e),S(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},r=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},i=function(e){var t=a(e);return t.length>0?t[0]:r(e)},o=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),l=function(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},d=function(e,t,n){return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",l(n.getMonth()+1,2)),t=t.replace("%d",l(n.getDate(),2)),t=t.replace("%H",""+l(n.getHours(),2)),t=t.replace("%M",""+l(n.getMinutes(),2)),t=t.replace("%S",""+l(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(s[n.getMonth()])),t=t.replace("%b",""+e.translate(m[n.getMonth()])),t=t.replace("%A",""+e.translate(c[n.getDay()])),t=t.replace("%a",""+e.translate(u[n.getDay()])),t=t.replace("%%","%")},f=function(e,t,n,r){var a=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(a,t),e.dom.remove(t),e.selection.select(a,!0),e.selection.collapse(!1)},p=function(e,t){if(o(e)){var n=d(e,t),r=void 0;r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?f(e,a,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(d(e,t))},g=function(e){e.addCommand("mceInsertDate",function(){p(e,n(e))}),e.addCommand("mceInsertTime",function(){p(e,r(e))})},y=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){var t=a(e),n=y(i(e));e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===n.get()},fetch:function(n){n(M.map(t,function(t){return{type:"choiceitem",text:d(e,t),value:t}}))},onAction:function(){p(e,n.get())},onItemAction:function(t,r){n.set(r),p(e,r)}});var r=function(t){return function(){n.set(t),p(e,t)}};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(t){return{type:"menuitem",text:d(e,t),onAction:r(t)}})}})};e()}()});
;/*!node_modules/tinymce/plugins/insertdatetime/index.js*/
amis.define("node_modules/tinymce/plugins/insertdatetime/index",function(e){e("node_modules/tinymce/plugins/insertdatetime/plugin")});
;/*!node_modules/tinymce/plugins/media/plugin.js*/
amis.define("node_modules/tinymce/plugins/media/plugin",function(){!function(){"use strict";function e(){t.add("media",function(e){return Pt(e),Wt(e),It(e),Lt(e),qt(e),Ct(e)})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},r.apply(this,arguments)},n=function(){},i=function(e){return function(){return e}},o=i(!1),a=i(!0),c=function(){return u},u=function(){var e=function(e){return e.isNone()},t=function(e){return e()},r=function(e){return e},u={fold:function(e){return e()},is:o,isSome:o,isNone:a,getOr:r,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:r,orThunk:t,map:c,each:n,bind:c,exists:o,forall:a,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")};return u}(),s=function(e){var t=i(e),r=function(){return c},n=function(t){return t(e)},c={fold:function(t,r){return r(e)},is:function(t){return e===t},isSome:a,isNone:o,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:r,orThunk:r,map:function(t){return s(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?c:u},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,r){return t.fold(o,function(t){return r(e,t)})}};return c},l=function(e){return null===e||void 0===e?u:s(e)},m={some:s,none:c,from:l},d=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},f=function(e){return function(t){return d(t)===e}},h=f("string"),p=f("object"),g=f("array"),v=Array.prototype.push,w=function(e,t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i,r)}},b=function(e){for(var t=[],r=0,n=e.length;n>r;++r){if(!g(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);v.apply(t,e[r])}return t},y=function(e){var t=e,r=function(){return t},n=function(e){t=e};return{get:r,set:n}},x=Object.keys,j=Object.hasOwnProperty,O=function(e,t){for(var r=x(e),n=0,i=r.length;i>n;n++){var o=r[n],a=e[o];t(a,o)}},S=function(e,t){return _(e,t)?m.from(e[t]):m.none()},_=function(e,t){return j.call(e,t)},k=function(e){return e.getParam("media_scripts")},A=function(e){return e.getParam("audio_template_callback")},T=function(e){return e.getParam("video_template_callback")},C=function(e){return e.getParam("media_live_embeds",!0)},P=function(e){return e.getParam("media_filter_html",!0)},D=function(e){return e.getParam("media_url_resolver")},$=function(e){return e.getParam("media_alt_source",!0)},F=function(e){return e.getParam("media_poster",!0)},M=function(e){return e.getParam("media_dimensions",!0)},z=tinymce.util.Tools.resolve("tinymce.util.Tools"),N=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),E=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},R=N.DOM,L=function(e){return e.replace(/px$/,"")},I=function(e){var t=e.map.style,r=t?R.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.map["data-ephox-embed-iri"],altsource:"",poster:"",width:S(r,"max-width").map(L).getOr(""),height:S(r,"max-height").map(L).getOr("")}},q=function(e,t){var r=y(!1),n={};return U({validate:!1,allow_conditional_comments:!0,start:function(t,i){if(r.get());else if(_(i.map,"data-ephox-embed-iri"))r.set(!0),n=I(i);else{if(n.source||"param"!==t||(n.source=i.map.movie),("iframe"===t||"object"===t||"embed"===t||"video"===t||"audio"===t)&&(n.type||(n.type=t),n=z.extend(i.map,n)),"script"===t){var o=E(e,i.map.src);if(!o)return;n={type:"script",source:i.map.src,width:String(o.width),height:String(o.height)}}"source"===t&&(n.source?n.altsource||(n.altsource=i.map.src):n.source=i.map.src),"img"!==t||n.poster||(n.pos
;/*!node_modules/tinymce/plugins/media/index.js*/
amis.define("node_modules/tinymce/plugins/media/index",function(e){e("node_modules/tinymce/plugins/media/plugin")});
;/*!node_modules/tinymce/plugins/table/plugin.js*/
amis.define("node_modules/tinymce/plugins/table/plugin",function(){!function(n){"use strict";function t(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.concat(e);return n.apply(null,o)}}function e(n,t,e,r,o){return n(e,r)?D.some(e):W(o)&&o(e)?D.none():t(e,r,o)}function r(n,t){var e=function(e){if(!n(e))throw new Error("Can only get "+t+" value of a "+t+" node");return r(e).getOr("")},r=function(t){return n(t)?D.from(t.dom().nodeValue):D.none()},o=function(e,r){if(!n(e))throw new Error("Can only set raw "+t+" value of a "+t+" node");e.dom().nodeValue=r};return{get:e,getOption:r,set:o}}function o(){var n=function(n){return Qt.fromDom(n.dom().cloneNode(!1))},t=function(n){return n.dom().ownerDocument},e=function(n){return Dt(n)?"body"===xt(n)?!0:q(Bu,xt(n)):!1},r=function(n){return Dt(n)?q(["br","img","hr","input"],xt(n)):!1},o=function(n){return Dt(n)&&"false"===Mt(n,"contenteditable")},u=function(n,t){return n.dom().compareDocumentPosition(t.dom())},i=function(n,t){var e=jt(n);Et(t,e)};return{up:h({selector:ao,closest:so,predicate:oo,all:rr}),down:h({selector:ro,predicate:no}),styles:h({get:Rr,getRaw:Dr,set:xr,remove:Ar}),attrs:h({get:Mt,set:kt,remove:Wt,copyTo:i}),insert:h({before:Ir,after:Pr,afterAll:_r,append:Er,appendAll:Wr,prepend:kr,wrap:Mr}),remove:h({unwrap:Fr,remove:zr}),create:h({nu:Qt.fromTag,clone:n,text:Qt.fromText}),query:h({comparePosition:u,prevSibling:ur,nextSibling:ir}),property:h({children:cr,name:xt,parent:er,document:t,isText:At,isComment:Ot,isElement:Dt,getText:Uo,setText:$o,isBoundary:e,isEmptyTag:r,isNonEditable:o}),eq:Ge,is:Qe}}function u(n,t){var e=function(t,e){if(!j(e)&&!e.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+e);var r=t.dom();Kt(r)&&(r.style[n]=e+"px")},r=function(e){var r=t(e);if(0>=r||null===r){var o=Rr(e,n);return parseFloat(o)||0}return r},o=r,u=function(n,t){return J(t,function(t,e){var r=Rr(n,e),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o},0)},i=function(n,t,e){var r=u(n,e),o=t>r?t-r:0;return o};return{set:e,get:r,getOuter:o,aggregate:u,max:i}}function i(){var n=D.none(),t=function(){n=D.none()},e=function(t,e){var r=n.map(function(n){return t.compare(n,e)});return n=D.some(e),r},r=function(n,t){var r=t.extract(n);r.each(function(n){var r=e(t,n);r.each(function(n){o.trigger.move(n)})})},o=Aa({move:Da(["info"])});return{onEvent:r,reset:t,events:o.registry}}function c(){return{onEvent:g,reset:g}}function a(){var n=c(),t=i(),e=n,r=function(){e.reset(),e=t},o=function(){e.reset(),e=n},u=function(n,t){e.onEvent(n,t)},a=function(){return e===t};return{on:r,off:o,isOn:a,onEvent:u,events:t.events}}function l(n,t,e,r){var o=D.none(),u=function(){o=D.none()},i=function(n){r.clear(t),o=Sb(n.target(),e)},c=function(u){o.each(function(o){r.clearBeforeUpdate(t),Sb(u.target(),e).each(function(u){Hu(o,u,e).each(function(e){var i=e.boxes.getOr([]);(i.length>1||1===i.length&&!Ge(o,u))&&(r.selectRange(t,i,e.start,e.finish),n.selectContents(u))})})})},a=function(){o.each(u)};return{mousedown:i,mouseover:c,mouseup:a}}function f(n,t,e){var r=function(t,r,o){e.targets().each(function(e){var u=Ro(r);u.each(function(u){var i=_f(n),c=su(g,Qt.fromDom(n.getDoc()),i),a=$b(u,e,c);ff(n,t,r,o,a)})})},o=function(){return sf(n)},u=Vb.byAttr(fi,r,o);return n.on("init",function(){var e=n.getWin(),r=zf(n),o=Hf(n),i=function(){var t=n.selection,e=Qt.fromDom(t.getStart()),o=Qt.fromDom(t.getEnd()),i=zu(Ro,[e,o]);i.fold(function(){return u.clear(r)},g)},c=_b(e,r,o,u),a=Wb(e,r,o,u),l=jb(e,r,o,u),f=function(n){return n.raw().shiftKey===!0};n.on("TableSelectorChange",function(n){return l(n.start,n.finish)});var s=function(t,r){f(t)&&(r.kill()&&t.kill(),r.selection().each(function(t){var r=Pp.relative(t.start(),t.finish()),o=Up(e,r);n.selection.setRng(o)}))},d=function(t){var e=Xa(t);if(e.raw().shiftKey&&Db(e.raw().which)){var r=n.selection.getRng(),o=Qt.fromDom(r.startContainer),u=Qt.fromDom(r.endContainer);a.keyup(e,o,r.startOffset,u,r.endOffset).each(function(n){s(e,n)}
if(0===t.length)throw new Error("there must be at least one case");var e=[],r={};return $(t,function(o,u){var i=at(o);if(1!==i.length)throw new Error("one and only one name per case");var c=i[0],a=o[c];if(void 0!==r[c])throw new Error("duplicate key detected:"+c);if("cata"===c)throw new Error("cannot have a case named cata (sorry)");if(!E(a))throw new Error("case arguments must be an array");e.push(c),r[c]=function(){var r=arguments.length;if(r!==a.length)throw new Error("Wrong number of arguments to case "+c+". Expected "+a.length+" ("+a+"), got "+r);for(var o=new Array(r),i=0;i<o.length;i++)o[i]=arguments[i];var l=function(n){var t=at(n);if(e.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+t.join(","));var r=rt(e,function(n){return q(t,n)});if(!r)throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+e.join(", "));return n[c].apply(null,o)};return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);var n=arguments[u];return n.apply(null,o)},match:l,log:function(t){n.console.log(t,{constructors:e,constructor:c,params:o})}}}}),r},di={generate:si},mi=di.generate([{none:[]},{multiple:["elements"]},{single:["selection"]}]),gi=function(n,t,e,r){return n.fold(t,e,r)},pi=mi.none,vi=mi.multiple,hi=mi.single,bi=function(n,t){return gi(t.get(),h([]),b,h([n]))},wi=function(n,t){var e=function(n){return _t(n,"rowspan")&&parseInt(Mt(n,"rowspan"),10)>1||_t(n,"colspan")&&parseInt(Mt(n,"colspan"),10)>1},r=bi(n,t);return r.length>0&&rt(r,e)?D.some(r):D.none()},yi=function(n,t){return gi(t.get(),D.none,function(t){return 0===t.length?D.none():Xu(n,ci,li).bind(function(n){return t.length>1?D.some({bounds:h(n),cells:h(t)}):D.none()})},D.none)},Si=function(n){return{element:h(n),mergable:D.none,unmergable:D.none,selection:h([n])}},Ci=function(n,t,e){return{element:h(e),mergable:h(yi(t,n)),unmergable:h(wi(e,n)),selection:h(bi(e,n))}},xi=function(n,t,e){return{element:h(n),clipboard:h(t),generators:h(e)}},Ti=function(n,t,e,r){return{selection:h(bi(t,n)),clipboard:h(e),generators:h(r)}},Ri=function(n){return Ro(n[0]).map(ru).map(function(n){return[Ho(n,ui)]})},Oi=function(n,t){return K(t,function(t){return n.selection.serializer.serialize(t.dom(),{})}).join("")},Di=function(n){return K(n,function(n){return n.dom().innerText}).join("")},Ai=function(n,t,e,r){n.on("BeforeGetContent",function(e){var r=function(t){e.preventDefault(),Ri(t).each(function(t){e.content="text"===e.format?Di(t):Oi(n,t)})};e.selection===!0&&gi(t.get(),g,r,g)}),n.on("BeforeSetContent",function(t){if(t.selection===!0&&t.paste===!0){var o=D.from(n.dom.getParent(n.selection.getStart(),"th,td"));o.each(function(o){var u=Qt.fromDom(o);Ro(u).each(function(o){var i=X(mu(t.content),function(n){return"meta"!==xt(n)}),c=function(n){return"table"===xt(n)};if(1===i.length&&c(i[0])){t.preventDefault();var a=Qt.fromDom(n.getDoc()),l=du(a),f=xi(u,i[0],l);e.pasteCells(o,f).each(function(t){n.selection.setRng(t),n.focus(),r.clear(o)})}})})}})},Bi=function(n,t){var e=function(e,r){return Bi(n+e,t+r)};return{left:h(n),top:h(t),translate:e}},Ii=Bi,Pi=function(n){var t=n.getBoundingClientRect();return Ii(t.left,t.top)},ki=function(n,t){return void 0!==n?n:void 0!==t?t:0},Ei=function(n){var t=n.dom().ownerDocument,e=t.body,r=t.defaultView,o=t.documentElement;if(e===n.dom())return Ii(e.offsetLeft,e.offsetTop);var u=ki(r.pageYOffset,o.scrollTop),i=ki(r.pageXOffset,o.scrollLeft),c=ki(o.clientTop,e.clientTop),a=ki(o.clientLeft,e.clientLeft);return Mi(n).translate(i-a,u-c)},Mi=function(n){var t=n.dom(),e=t.ownerDocument,r=e.body;return r===t?Ii(r.offsetLeft,r.offsetTop):br(n)?Pi(t):Ii(0,0)},Ni=function(n){var t=D.from(n.dom().documentElement).map(Qt.fromDom).getOr(n);return{parent:h(t),view:h(n),origin:h(Ii(0,0))}},_i=function(n,t){var e=function(){return Ei(t)};return{parent:h(t),view:h(n),origin:e}},Wi=function(n,t){return{parent:h(t),view:h(n),origin:h(Ii(0,0))}},ji={only:Ni,detached:_i,body:
});jr(i);var c=K(t,function(n){n.isNew()&&r.push(n.element());var t=n.element();return jr(t),$(n.cells(),function(n){n.isNew()&&o.push(n.element()),Bs(n.element(),"colspan",n.colspan(),1),Bs(n.element(),"rowspan",n.rowspan(),1),Er(t,n.element())}),t});Wr(i,c)},c=function(t){lo(n,t).each(zr)},a=function(n,t){n.length>0?i(n,t):c(t)},l=[],f=[],s=[];return $(e,function(n){switch(n.section()){case"thead":l.push(n);break;case"tbody":f.push(n);break;case"tfoot":s.push(n)}}),a(l,"thead"),a(f,"tbody"),a(s,"tfoot"),{newRows:r,newCells:o}},Ps=function(n){return K(n,function(n){var t=eu(n.element());return $(n.cells(),function(n){var e=ru(n.element());Bs(e,"colspan",n.colspan(),1),Bs(e,"rowspan",n.rowspan(),1),Er(t,e)}),t})},ks=function(n,t,e){var r=n.cells(),o=r.slice(0,t),u=r.slice(t),i=o.concat([e]).concat(u);return Ms(n,i)},Es=function(n,t,e){var r=n.cells();r[t]=e},Ms=function(n,t){return Xr(t,n.section())},Ns=function(n,t){var e=n.cells(),r=K(e,t);return Xr(r,n.section())},_s=function(n,t){return n.cells()[t]},Ws=function(n,t){return _s(n,t).element()},js=function(n){return n.cells().length},zs=function(n,t){return K(n,function(n){return _s(n,t)})},Fs=function(n,t){return n[t]},Ls=function(n,t){if(0===n.length)return 0;var e=n[0],r=nt(n,function(n){return!t(e.element(),n.element())});return r.fold(function(){return n.length},function(n){return n})},Hs=function(n,t,e,r){var o=Fs(n,t).cells().slice(e),u=Ls(o,r),i=zs(n,e).slice(t),c=Ls(i,r);return{colspan:u,rowspan:c}},qs=function(n,t){var e=K(n,function(n){return K(n.cells(),function(){return!1})}),r=function(n,t,r,o){for(var u=n;n+r>u;u++)for(var i=t;t+o>i;i++)e[u][i]=!0};return K(n,function(o,u){var i=et(o.cells(),function(o,i){if(e[u][i]===!1){var c=Hs(n,u,i,t);return r(u,i,c.rowspan,c.colspan),[Vr(o.element(),c.rowspan,c.colspan,o.isNew())]}return[]});return Yr(i,o.section())})},Vs=function(n,t,e){for(var r=[],o=0;o<n.grid.rows();o++){for(var u=[],i=0;i<n.grid.columns();i++){var c=_o.getAt(n,o,i).map(function(n){return $r(n.element(),e)}).getOrThunk(function(){return $r(t.gap(),!0)});u.push(c)}var a=Xr(u,n.all[o].section());r.push(a)}return r},Us=function(n,t){return Vs(n,t,!1)},Ks=function(n,t){var e=function(n){var e=ct(n,function(n){return er(n.element()).map(function(n){var t=er(n).isNone();return $r(n,t)})});return e.getOrThunk(function(){return $r(t.row(),!0)})};return K(n,function(n){var t=e(n.details());return Gr(t.element(),n.details(),n.section(),t.isNew())})},$s=function(n,t){var e=qs(n,Ge);return Ks(e,t)},Gs=function(n,t){return ct(n.all,function(n){return Z(n.cells(),function(n){return Ge(t,n.element())})})},Xs=function(n,t,e,r,o){return function(u,i,c,a,l,f){var s=_o.fromTable(i),d=t(s,c).map(function(t){var e=Us(s,a),r=n(e,t,Ge,o(a)),u=$s(r.grid(),a);return{grid:h(u),cursor:r.cursor}});return d.fold(function(){return D.none()},function(n){var t=Is(i,n.grid()),o=D.from(f).getOrThunk(function(){return os.getTableSize(i)});return e(i,n.grid(),l,o),r(i),Xl(u,i,ec,l),D.some({cursor:n.cursor,newRows:h(t.newRows),newCells:h(t.newCells)})})}},Ys=function(n,t){return xo(t.element()).bind(function(t){return Gs(n,t)})},Js=function(n,t){return xo(t.element()).bind(function(e){return Gs(n,e).map(function(n){var e=te(te({},n),{generators:t.generators,clipboard:t.clipboard});return e})})},Qs=function(n,t){var e=K(t.selection(),function(t){return xo(t).bind(function(t){return Gs(n,t)})}),r=Ds(e);return r.length>0?D.some({cells:r,generators:t.generators,clipboard:t.clipboard}):D.none()},Zs=function(n,t){return t.mergable()},nd=function(n,t){return t.unmergable()},td=function(n,t){var e=K(t.selection(),function(t){return xo(t).bind(function(t){return Gs(n,t)})}),r=Ds(e);return r.length>0?D.some(r):D.none()},ed=function(n,t,e,r){if(0===n.length)return n;for(var o=t.startRow();o<=t.finishRow();o++)for(var u=t.startCol();u<=t.finishCol();u++)Es(n[o],u,$r(r(),!1));return n},rd=function(n,t,e,r){for(var o=!0,u=0;u<n.length;u++)for(var i=0;i<js(n[0]);i++){var c=Ws(n[u],i),a=e(c,t);a===!0&&o===!1?Es(n[u],i,$r(r(),!0)):a===!0&&(o=!1)}return n},od=function(n,t){return J(n,function(n,e)
})},op=function(n,e){var r,o=n.dom,u=Pg(n,Tf(n));e===!1?(r=o.getParent(n.selection.getStart(),"table"),r?u=kg(n,r,Tf(n)):Tf(n)&&(u.borderstyle="",u.bordercolor="",u.backgroundcolor="")):(u.cols="1",u.rows="1",Tf(n)&&(u.borderstyle="",u.bordercolor="",u.backgroundcolor=""));var i=xg(If(n));i.length>0&&u.class&&(u.class=u.class.replace(/\s*mce\-item\-table\s*/g,""));var c={type:"grid",columns:2,items:np(n,i,e)},a=function(){return{type:"panel",items:[c]}},l=function(){return{type:"tabpanel",tabs:[{title:"General",name:"general",items:[c]},Dg("table")]}},f=Tf(n)?l():a();n.windowManager.open({title:"Table Properties",size:"normal",body:f,onSubmit:t(rp,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u})},up=function(n,e,r,o,u){var i=Hf(n),c=function(){return $m(n).each(function(t){Ro(t,i).filter(w(i)).each(function(t){var e=Qt.fromText("");if(Pr(t,e),zr(t),n.dom.isEmpty(n.getBody()))n.setContent(""),n.selection.setCursorLocation();else{var r=n.dom.createRng();r.setStart(e.dom(),0),r.setEnd(e.dom(),0),n.selection.setRng(r),n.nodeChanged()}})})},a=function(t){return $m(n).each(function(e){var r=Ef(n)||kf(n)||Pf(n);r||Ro(e,i).each(function(e){"relative"!==t||ya(e)?"fixed"!==t||Sa(e)?"responsive"!==t||Ca(e)||ds(e):ss(n,e):fs(n,e),Uf(e)})})},l=function(n){return Ro(n,i)},f=function(t){return Km(n).each(function(e){l(e).each(function(u){var i=Ci(o,u,e);t(u,i).each(function(t){n.selection.setRng(t),n.focus(),r.clear(u),Uf(u)})})})},s=function(){return Km(n).map(function(t){return l(t).bind(function(e){var r=Ci(o,e,t),u=su(g,Qt.fromDom(n.getDoc()),D.none());return vg(e,r,u)})})},d=function(){return Km(n).map(function(n){return l(n).bind(function(t){var e=Ci(o,t,n);return pg(t,e)})})},m=function(t,e){return e().each(function(e){var u=K(e,function(n){return ru(n)});Km(n).each(function(e){return l(e).each(function(i){var c=du(Qt.fromDom(n.getDoc())),a=Ti(o,e,u,c);t(i,a).each(function(t){n.selection.setRng(t),n.focus(),r.clear(i)})})})})};ft({mceTableSplitCells:function(){return f(e.unmergeCells)},mceTableMergeCells:function(){return f(e.mergeCells)},mceTableInsertRowBefore:function(){return f(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return f(e.insertRowsAfter)},mceTableInsertColBefore:function(){return f(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return f(e.insertColumnsAfter)},mceTableDeleteCol:function(){return f(e.deleteColumn)},mceTableDeleteRow:function(){return f(e.deleteRow)},mceTableCutCol:function(){return d().each(function(n){u.setColumns(n),f(e.deleteColumn)})},mceTableCutRow:function(){return s().each(function(n){u.setRows(n),f(e.deleteRow)})},mceTableCopyCol:function(){return d().each(function(n){return u.setColumns(n)})},mceTableCopyRow:function(){return s().each(function(n){return u.setRows(n)})},mceTablePasteColBefore:function(){return m(e.pasteColsBefore,u.getColumns)},mceTablePasteColAfter:function(){return m(e.pasteColsAfter,u.getColumns)},mceTablePasteRowBefore:function(){return m(e.pasteRowsBefore,u.getRows)},mceTablePasteRowAfter:function(){return m(e.pasteRowsAfter,u.getRows)},mceTableDelete:c,mceTableSizingMode:function(n,t){return a(t)}},function(t,e){return n.addCommand(e,t)}),ft({mceTableCellType:function(t,r){return e.setTableCellType(n,r)},mceTableRowType:function(t,r){return e.setTableRowType(n,r)}},function(t,e){return n.addCommand(e,t)}),n.addCommand("mceTableColType",function(n,t){return vt(t,"type").each(function(n){return f("th"===n?e.makeColumnHeader:e.unmakeColumnHeader)})}),ft({mceTableProps:t(op,n,!1),mceTableRowProps:t(Qg,n),mceTableCellProps:t(Vg,n)},function(t,e){return n.addCommand(e,function(){return t()})}),n.addCommand("mceInsertTable",function(t,e){k(e)&&at(e).length>0?fg(n,e.rows,e.columns,e.options,"Invalid values for mceInsertTable - rows and columns values are required to insert a table."):op(n,!0)}),n.addCommand("mceTableApplyCellStyle",function(t,e){if(k(e)){var r=Gm(n);0!==r.length&&ft(e,function(t,e){var o="tablecell"+e.toLowerCase().replace("-","");n.formatter.has(o)&&P(t)&&$(r,f
},Jb=function(n){var t=function(t){return n.dom.is(t,"table")&&n.getBody().contains(t)},e=Mf(n);e.length>0&&n.ui.registry.addContextToolbar("table",{predicate:t,items:e,scope:"node",position:"node"})},Qb=function(n,t,e){var r=function(t){return function(){return n.execCommand(t)}},o=function(t){var e=t.numRows,r=t.numColumns;n.undoManager.transact(function(){lg(n,r,e,0,0)}),n.addVisual()},u={text:"Table properties",onSetup:t.onSetupTable,onAction:r("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,onAction:r("mceTableDelete")};n.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:r("mceTableInsertRowBefore"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:r("mceTableInsertRowAfter"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:r("mceTableDeleteRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:r("mceTableRowProps"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:t.onSetupPasteable(e.getRows)}),n.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:t.onSetupPasteable(e.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return"tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter"}};n.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:r("mceTableInsertColBefore"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:r("mceTableInsertColAfter"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:r("mceTableDeleteCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:t.onSetupPasteable(e.getColumns)}),n.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:t.onSetupPasteable(e.getColumns)});var a={type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return"tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn"}};n.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:r("mceTableCellProps"),onSetup:t.onSetupCellOrRow}),n.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:r("mceTableMergeCells"),onSetup:t.onSetupMergeable}),n.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:r("mceTableSplitCells"),onSetup:t.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return"tablecellprops tablemergecells tablesplitcells"}};Of(n)===!1?n.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:r("mceInsertTable")}):n.ui.registry.addNestedMenuItem("inserttable",{te
;/*!node_modules/tinymce/plugins/table/index.js*/
amis.define("node_modules/tinymce/plugins/table/index",function(e){e("node_modules/tinymce/plugins/table/plugin")});
;/*!node_modules/tinymce/plugins/paste/plugin.js*/
amis.define("node_modules/tinymce/plugins/paste/plugin",function(){!function(t){"use strict";function e(t,e){return X.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function n(t){function n(t){var e=t.name,r=t;if("br"===e)return void(i+="\n");if("wbr"!==e){if(a[e]&&(i+=" "),u[e])return void(i+=" ");if(3===t.type&&(i+=t.value),!t.shortEnded&&(t=t.firstChild))do n(t);while(t=t.next);s[e]&&r.next&&(i+="\n","p"===e&&(i+="\n"))}}var r=fe(),o=ue({},r),i="",a=r.getShortEndedElements(),u=X.makeMap("script noscript style textarea video audio iframe object"," "),s=r.getBlockElements();return t=e(t,[/<!\[[^\]]+\]>/g]),n(o.parse(t)),i}function r(t){function n(t,e,n){return e||n?ce:" "}return t=e(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,n],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function o(t){var e=0;return function(){return t+e++}}function i(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}function a(t){var e,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]/];return t=t.replace(/^[\u00a0 ]+/,""),X.each(n,function(n){return n.test(t)?(e=!0,!1):void 0}),e}function u(t){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(t)}function s(t){function e(t){var n="";if(3===t.type)return t.value;if(t=t.firstChild)do n+=e(t);while(t=t.next);return n}function n(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do if(!n(t,e))return!1;while(t=t.next);return!0}function r(t){if(t._listIgnore)return void t.remove();if(t=t.firstChild)do r(t);while(t=t.next)}function o(t,e,o){var a=t._listLevel||c;a!==c&&(c>a?i&&(i=i.parent.parent):(s=i,i=null)),i&&i.name===e?i.append(t):(s=s||i,i=new le(e,1),o>1&&i.attr("start",""+o),t.wrap(i)),t.name="li",a>c&&s&&s.lastChild.append(i),c=a,r(t),n(t,/^\u00a0+/),n(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),n(t,/^\u00a0+/)}for(var i,s,c=1,l=[],f=t.firstChild;"undefined"!=typeof f&&null!==f;)if(l.push(f),f=f.walk(),null!==f)for(;"undefined"!=typeof f&&f.parent!==t;)f=f.walk();for(var d=0;d<l.length;d++)if(t=l[d],"p"===t.name&&t.firstChild){var m=e(t);if(u(m)){o(t,"ul");continue}if(a(m)){var p=/([0-9]+)\./.exec(m),g=1;p&&(g=parseInt(p[1],10)),o(t,"ol",g);continue}if(t._listLevel){o(t,"ul",1);continue}i=null}else s=i,i=null}function c(t,e,n,r){var o,i={},a=t.dom.parseStyle(r);return X.each(a,function(a,u){switch(u){case"mso-list":o=/\w+ \w+([0-9]+)/i.exec(r),o&&(n._listLevel=parseInt(o[1],10)),/Ignore/i.test(a)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":u="text-align";break;case"vert-align":u="vertical-align";break;case"font-color":case"mso-foreground":u="color";break;case"mso-background":case"mso-highlight":u="background";break;case"font-weight":case"font-style":return void("normal"!==a&&(i[u]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void n.remove()}return 0===u.indexOf("mso-comment")?void n.remove():void(0!==u.indexOf("mso-")&&("all"===Pe(t)||e&&e[u])&&(i[u]=a))}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new le("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new le("i",1))),i=t.dom.serializeStyle(i,n.name),i?i:null}function l(t,e){t.on("PastePreProcess",function(n){n.content=e(t,n.content,n.internal,n.wordContent)})}function f(t,e){t.on("PastePostProcess",function(n){e(t,n.node)})}function d(t,n){if(!i(n))return n;var r=[];X.each(t.schema.getBlockElements(),function(t,e){r.push(e)});var o=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+r.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return n=
;/*!node_modules/tinymce/plugins/paste/index.js*/
amis.define("node_modules/tinymce/plugins/paste/index",function(e){e("node_modules/tinymce/plugins/paste/plugin")});
;/*!node_modules/tinymce/plugins/help/plugin.js*/
amis.define("node_modules/tinymce/plugins/help/plugin",function(){!function(){"use strict";function e(){n.add("help",function(e){var n=t({}),r=o(n),s=z(e,n);return i(e,s),a(e,s),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),r})}var t=function(e){var t=e,n=function(){return t},o=function(e){t=e};return{get:n,set:o}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){var t=function(t){var n=e.get();n[t.name]=t,e.set(n)};return{addTab:t}},a=function(e,t){e.addCommand("mceHelp",t)},i=function(e,t){e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})},r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},r.apply(this,arguments)},s=function(){},c=function(e){return function(){return e}},l=c(!1),u=c(!0),h=function(){return m},m=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},o={fold:function(e){return e()},is:l,isSome:l,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:n,orThunk:t,map:h,each:s,bind:h,exists:l,forall:u,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:c("none()")};return o}(),d=function(e){var t=c(e),n=function(){return a},o=function(t){return t(e)},a={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return d(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?a:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,function(t){return n(e,t)})}};return a},p=function(e){return null===e||void 0===e?m:d(e)},f={some:d,none:h,from:p},g=Array.prototype.indexOf,b=function(e,t){return g.call(e,t)},y=function(e,t){return b(e,t)>-1},k=function(e,t){for(var n=e.length,o=new Array(n),a=0;n>a;a++){var i=e[a];o[a]=t(i,a)}return o},v=function(e,t){for(var n=[],o=0,a=e.length;a>o;o++){var i=e[o];t(i,o)&&n.push(i)}return n},w=function(e,t,n){for(var o=0,a=e.length;a>o;o++){var i=e[o];if(t(i,o))return f.some(i);if(n(i,o))break}return f.none()},A=function(e,t){return w(e,t,l)},C=Object.keys,T=Object.hasOwnProperty,x=function(e,t){return P(e,t)?f.from(e[t]):f.none()},P=function(e,t){return T.call(e,t)},M=function(e){for(var t=[],n=function(e){t.push(e)},o=0;o<e.length;o++)e[o].each(n);return t},F=function(e){return f.from(e.getParam("help_tabs"))},O=function(e){return e.getParam("forced_plugins")},S=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from full
;/*!node_modules/tinymce/plugins/help/index.js*/
amis.define("node_modules/tinymce/plugins/help/index",function(e){e("node_modules/tinymce/plugins/help/plugin")});
;/*!node_modules/tinymce/plugins/wordcount/plugin.js*/
amis.define("node_modules/tinymce/plugins/wordcount/plugin",function(){!function(){"use strict";function t(t){void 0===t&&(t=300),n.add("wordcount",function(n){var e=X(n);return $(n,e),_(n,e,t),e})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return t},r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;r>e;e++){n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r.apply(this,arguments)},o="",u=function(t){return t.replace(/\uFEFF/g,"")},i="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]",c={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA---하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[ \f…\u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳-----------------------------------------༿-------------------ᧀᧈ
;/*!node_modules/tinymce/plugins/wordcount/index.js*/
amis.define("node_modules/tinymce/plugins/wordcount/index",function(n){n("node_modules/tinymce/plugins/wordcount/plugin")});
;/*!node_modules/tinymce/plugins/hr/plugin.js*/
amis.define("node_modules/tinymce/plugins/hr/plugin",function(){!function(){"use strict";function n(){o.add("hr",function(n){t(n),e(n)})}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},e=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};n()}()});
;/*!node_modules/tinymce/plugins/hr/index.js*/
amis.define("node_modules/tinymce/plugins/hr/index",function(n){n("node_modules/tinymce/plugins/hr/plugin")});
;/*!node_modules/tinymce/plugins/pagebreak/plugin.js*/
amis.define("node_modules/tinymce/plugins/pagebreak/plugin",function(){!function(){"use strict";function e(){n.add("pagebreak",function(e){u(e),m(e),c(e),g(e)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),t=function(e){return e.getParam("pagebreak_separator","<!-- pagebreak -->")},r=function(e){return e.getParam("pagebreak_split_block",!1)},o=function(){return"mce-pagebreak"},i=function(){return'<img src="'+a.transparentSrc+'" class="'+o()+'" data-mce-resize="false" data-mce-placeholder />'},c=function(e){var n=t(e),a=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");e.on("BeforeSetContent",function(e){e.content=e.content.replace(a,i())}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var t,o,i=a.length;i--;)if(t=a[i],o=t.attr("class"),o&&-1!==o.indexOf("mce-pagebreak")){var c=t.parent;if(e.schema.getBlockElements()[c.name]&&r(e)){c.type=3,c.value=n,c.raw=!0,t.remove();continue}t.type=3,t.value=n,t.raw=!0}})})},u=function(e){e.addCommand("mcePageBreak",function(){e.insertContent(r(e)?"<p>"+i()+"</p>":i())})},g=function(e){e.on("ResolveName",function(n){"IMG"===n.target.nodeName&&e.dom.hasClass(n.target,o())&&(n.name="pagebreak")})},m=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};e()}()});
;/*!node_modules/tinymce/plugins/pagebreak/index.js*/
amis.define("node_modules/tinymce/plugins/pagebreak/index",function(e){e("node_modules/tinymce/plugins/pagebreak/plugin")});
;/*!node_modules/tinymce/plugins/spellchecker/plugin.js*/
amis.define("node_modules/tinymce/plugins/spellchecker/plugin",function(){!function(e){"use strict";function t(e){return e&&1===e.nodeType&&"false"===e.contentEditable}function n(){o.add("spellchecker",function(e,t){if(i(e)===!1){var n=r(!1),o=r(h(e)),a=r(null),c=r(null);return D(e,t,n,a,o,c),J(e,t,c,n,a,o),E(e,t,n,a,c,o),C(e,n,c,a,o)}})}var r=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return/(^|[ ,])tinymcespellchecker([, ]|$)/.test(t.getParam("plugins"))&&o.get("tinymcespellchecker")?("undefined"!=typeof e.window.console&&e.window.console.log&&e.window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0):!1},a=Object.hasOwnProperty,c=function(e){for(var t in e)if(a.call(e,t))return!1;return!0},u=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=tinymce.util.Tools.resolve("tinymce.util.URI"),l=tinymce.util.Tools.resolve("tinymce.util.XHR"),d=function(e){return e.fire("SpellcheckStart")},f=function(e){return e.fire("SpellcheckEnd")},g=function(e){var t="English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";return e.getParam("spellchecker_languages",t)},h=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},p=function(e){return e.getParam("spellchecker_rpc_url")},m=function(e){return e.getParam("spellchecker_callback")},v=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`§©«®±¶·¸»¼½¾¿×÷¤”“„    ]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},x=function(e,n){function r(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 o(e){var n;if(3===e.nodeType)return e.data;if(A[e.nodeName]&&!T[e.nodeName])return"";if(t(e))return"\n";if(n="",(T[e.nodeName]||B[e.nodeName])&&(n+="\n"),e=e.firstChild)do n+=o(e);while(e=e.nextSibling);return n}function i(e,n,r){var o,i,a,c,u,s=[],l=0,d=e,f=0;n=n.slice(0),n.sort(function(e,t){return e.start-t.start}),u=n.shift();e:for(;;){if((T[d.nodeName]||B[d.nodeName]||t(d))&&l++,3===d.nodeType&&(!i&&d.length+l>=u.end?(i=d,c=u.end-l):o&&s.push(d),!o&&d.length+l>u.start&&(o=d,a=u.start-l),l+=d.length),o&&i){if(d=r({startNode:o,startNodeIndex:a,endNode:i,endNodeIndex:c,innerNodes:s,match:u.text,matchIndex:f}),l-=i.length-c,o=null,i=null,s=[],u=n.shift(),f++,!u)break}else if(A[d.nodeName]&&!T[d.nodeName]||!d.firstChild){if(d.nextSibling){d=d.nextSibling;continue}}else if(!t(d)){d=d.firstChild;continue}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===e)break e;d=d.parentNode}}}function a(e){function t(t,n){var r=w[n];r.stencil||(r.stencil=e(r));var o=r.stencil.cloneNode(!1);return o.setAttribute("data-mce-index",n),t&&o.appendChild(b.doc.createTextNode(t)),o}return function(e){var n,r,o,i=e.startNode,a=e.endNode,c=e.matchIndex,u=b.doc;if(i===a){var s=i;o=s.parentNode,e.startNodeIndex>0&&(n=u.createTextNode(s.data.substring(0,e.startNodeIndex)),o.insertBefore(n,s));var l=t(e.match,c);return o.insertBefore(l,s),e.endNodeIndex<s.length&&(r=u.createTextNode(s.data.substring(e.endNodeIndex)),o.insertBefore(r,s)),s.parentNode.removeChild(s),l}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),c),f=0,g=e.innerNodes.length;g>f;++f){var h=e.innerNodes[f],p=t(h.data,c);h.parentNode.replaceChild(p,h)}var m=t(a.data.substring(0,e.endNodeIndex),c);return o=i.parentNode,o.insertBefore(n,i),o.insertBefore(d,i),o.removeChild(i),o=a.parentNode,o.insertBefore(m,a),o.insertBefore(r,a),o.removeChild(a),m}}function c(e){for(var t=e.parentNode;e.childNodes.length>0;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}function u(e){return-1!==e.className.indexOf("mce-spellchecker-word")}function s(t){var n=e.getElementsByTagName("*"),r=[];t="number"==type
;/*!node_modules/tinymce/plugins/spellchecker/index.js*/
amis.define("node_modules/tinymce/plugins/spellchecker/index",function(e){e("node_modules/tinymce/plugins/spellchecker/plugin")});
;/*!node_modules/tinymce/plugins/visualchars/plugin.js*/
amis.define("node_modules/tinymce/plugins/visualchars/plugin",function(){!function(n){"use strict";function t(){o.add("visualchars",function(n){var t=r(!1);return vt(n,t),Nt(n,t),yt(n,t),wt(n,t),e(t)})}var r=function(n){var t=n,r=function(){return t},o=function(n){t=n};return{get:r,set:o}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n){var t=function(){return n.get()};return{isEnabled:t}},u=function(n,t){return n.fire("VisualChars",{state:t})},i=function(){},c=function(n){return function(){return n}},a=c(!1),f=c(!0),s=function(){return l},l=function(){var n=function(n){return n.isNone()},t=function(n){return n()},r=function(n){return n},o={fold:function(n){return n()},is:a,isSome:a,isNone:f,getOr:r,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(void 0),or:r,orThunk:t,map:s,each:i,bind:s,exists:a,forall:f,filter:s,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")};return o}(),d=function(n){var t=c(n),r=function(){return e},o=function(t){return t(n)},e={fold:function(t,r){return r(n)},is:function(t){return n===t},isSome:f,isNone:a,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:r,orThunk:r,map:function(t){return d(t(n))},each:function(t){t(n)},bind:o,exists:o,forall:o,filter:function(t){return t(n)?e:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,r){return t.fold(a,function(t){return r(n,t)})}};return e},m=function(n){return null===n||void 0===n?l:d(n)},v={some:d,none:s,from:m},g=function(n){var t=typeof n;return null===n?"null":"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t},h=function(n){return function(t){return g(t)===n}},p=function(n){return function(t){return typeof t===n}},y=h("string"),w=p("boolean"),b=p("number"),N=function(n,t){for(var r=n.length,o=new Array(r),e=0;r>e;e++){var u=n[e];o[e]=t(u,e)}return o},T=function(n,t){for(var r=0,o=n.length;o>r;r++){var e=n[r];t(e,r)}},k=function(n,t){for(var r=[],o=0,e=n.length;e>o;o++){var u=n[o];t(u,o)&&r.push(u)}return r},A=Object.keys,O=function(n,t){for(var r=A(n),o=0,e=r.length;e>o;o++){var u=r[o],i=n[u];t(i,u)}},C=("undefined"!=typeof n.window?n.window:Function("return this;")(),3),S=function(n){return n.dom().nodeType},D=function(n){return n.dom().nodeValue},E=function(n){return function(t){return S(t)===n}},L=E(C),x=function(t,r,o){if(!(y(o)||w(o)||b(o)))throw n.console.error("Invalid call to Attr.set. Key ",r,":: Value ",o,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(r,o+"")},V=function(n,t,r){x(n.dom(),t,r)},B=function(n,t){var r=n.dom().getAttribute(t);return null===r?void 0:r},P=function(n,t){n.dom().removeAttribute(t)},_=function(n,t){var r=B(n,t);return void 0===r||""===r?[]:r.split(" ")},j=function(n,t,r){var o=_(n,t),e=o.concat([r]);return V(n,t,e.join(" ")),!0},M=function(n,t,r){var o=k(_(n,t),function(n){return n!==r});return o.length>0?V(n,t,o.join(" ")):P(n,t),!1},q=function(n){return void 0!==n.dom().classList},H=function(n){return _(n,"class")},F=function(n,t){return j(n,"class",t)},I=function(n,t){return M(n,"class",t)},U=function(n,t){q(n)?n.dom().classList.add(t):F(n,t)},K=function(n){var t=q(n)?n.dom().classList:H(n);0===t.length&&P(n,"class")},R=function(n,t){if(q(n)){var r=n.dom().classList;r.remove(t)}else I(n,t);K(n)},z=function(t,r){var o=r||n.document,e=o.createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||e.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Q(e.childNodes[0])},G=function(t,r){var o=r||n.document,e=o.createElement(t);return Q(e)},J=function(t,r){var o=r||n.document,e=o.createTextNode(t);return Q(e)},Q=function(n){if(null===n||void 0===n)throw new Error("Node cannot be null or undefined");return{dom:c(n)}},W=function(n,t,r){var o=n.do
;/*!node_modules/tinymce/plugins/visualchars/index.js*/
amis.define("node_modules/tinymce/plugins/visualchars/index",function(i){i("node_modules/tinymce/plugins/visualchars/plugin")});
;/*!node_modules/tinymce/plugins/template/plugin.js*/
amis.define("node_modules/tinymce/plugins/template/plugin",function(){!function(){"use strict";function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=t.concat(n);return e.apply(null,a)}}function t(){n.add("template",function(e){j(e),P(e),w(e)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},a=function(e){return function(){return e}},o=a(!1),u=a(!0),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e){return e.getParam("template_cdate_classes","cdate")},s=function(e){return e.getParam("template_mdate_classes","mdate")},f=function(e){return e.getParam("template_selected_content_classes","selcontent")},m=function(e){return e.getParam("template_preview_replace_values")},p=function(e){return e.getParam("template_replace_values")},d=function(e){return e.getParam("templates")},g=function(e){return e.getParam("template_cdate_format",e.translate("%Y-%m-%d"))},v=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},h=function(e){var t=e.getParam("body_class","","hash");return t[e.id]||""},y=function(e){var t=e.getParam("body_class","","string");return-1===t.indexOf("=")?t:h(e)},b=function(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},M=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",b(n.getMonth()+1,2)),t=t.replace("%d",b(n.getDate(),2)),t=t.replace("%H",""+b(n.getHours(),2)),t=t.replace("%M",""+b(n.getMinutes(),2)),t=t.replace("%S",""+b(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(u[n.getMonth()])),t=t.replace("%b",""+e.translate(o[n.getMonth()])),t=t.replace("%A",""+e.translate(a[n.getDay()])),t=t.replace("%a",""+e.translate(r[n.getDay()])),t=t.replace("%%","%")},T=function(e,t){return function(){var n=d(e);return"function"==typeof n?void n(t):void("string"==typeof n?c.send({url:n,success:function(e){t(JSON.parse(e))}}):t(n))}},O=function(e,t){return i.each(t,function(t,n){"function"==typeof t&&(t=t(n)),e=e.replace(new RegExp("\\{\\$"+n+"\\}","g"),t)}),e},_=function(e,t){var n=e.dom,r=p(e);i.each(n.select("*",t),function(e){i.each(r,function(t,a){n.hasClass(e,a)&&"function"==typeof r[a]&&r[a](e)})})},x=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},S=function(e,t,n){var r,a=e.dom,o=e.selection.getContent();n=O(n,p(e)),r=a.create("div",null,n);var u=a.select(".mceTmpl",r);u&&u.length>0&&(r=a.create("div",null),r.appendChild(u[0].cloneNode(!0))),i.each(a.select("*",r),function(t){x(t,l(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,g(e))),x(t,s(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,v(e))),x(t,f(e).replace(/\s+/g,"|"))&&(t.innerHTML=o)}),_(e,r),e.execCommand("mceInsertContent",!1,r.innerHTML),e.addVisual()},P=function(t){t.addCommand("mceInsertTemplate",e(S,t))},w=function(e){e.on("PreProcess",function(t){var n=e.dom,r=v(e);i.each(n.select("div",t.node),function(t){n.hasClass(t,"mceTmpl")&&(i.each(n.select("*",t),function(t){n.hasClass(t,s(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,r))}),_(e,t))})})},D=function(){return C},C=function(){var e=function(e){return e.isNone()},t=function(e){return e()},n=function(e){return e},i={fold:function(e){return e()},is:o,isSome:o,isNone:u,getOr:n,getOrThunk:t,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:n,orThunk:t,map:D,each:r,bind:D,exists:o,forall:u,filter:D,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")};return i}(
;/*!node_modules/tinymce/plugins/template/index.js*/
amis.define("node_modules/tinymce/plugins/template/index",function(e){e("node_modules/tinymce/plugins/template/plugin")});
;/*!node_modules/tinymce/plugins/nonbreaking/plugin.js*/
amis.define("node_modules/tinymce/plugins/nonbreaking/plugin",function(){!function(){"use strict";function n(){e.add("nonbreaking",function(n){u(n),f(n),s(n)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?e===!0?3:0:e},t=function(n){return n.getParam("nonbreaking_wrap",!0,"boolean")},o=function(n,e){for(var i="",t=0;e>t;t++)i+=n;return i},r=function(n){return n.plugins.visualchars?n.plugins.visualchars.isEnabled():!1},a=function(n,e){var i=function(){return r(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"},a=function(){return'<span class="'+i()+'" contenteditable="false">'+o("&nbsp;",e)+"</span>"},u=t(n),c=u||n.plugins.visualchars?a():o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(c)})},u=function(n){n.addCommand("mceNonBreaking",function(){a(n,1)})},c=tinymce.util.Tools.resolve("tinymce.util.VK"),s=function(n){var e=i(n);e>0&&n.on("keydown",function(i){if(i.keyCode===c.TAB&&!i.isDefaultPrevented()){if(i.shiftKey)return;i.preventDefault(),i.stopImmediatePropagation(),a(n,e)}})},f=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};n()}()});
;/*!node_modules/tinymce/plugins/nonbreaking/index.js*/
amis.define("node_modules/tinymce/plugins/nonbreaking/index",function(n){n("node_modules/tinymce/plugins/nonbreaking/plugin")});
;/*!node_modules/tinymce/plugins/emoticons/plugin.js*/
amis.define("node_modules/tinymce/plugins/emoticons/plugin",function(){!function(n){"use strict";function t(){e.add("emoticons",function(n,t){var e=q(n,t),r=I(n),o=G(n,e,r);K(n,o),h(n,o)})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},o=function(n){return function(){return n}},i=o(!1),u=o(!0),a=function(){return c},c=function(){var n=function(n){return n.isNone()},t=function(n){return n()},e=function(n){return n},c={fold:function(n){return n()},is:i,isSome:i,isNone:u,getOr:e,getOrThunk:t,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:t,map:a,each:r,bind:a,exists:i,forall:u,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")};return c}(),l=function(n){var t=o(n),e=function(){return a},r=function(t){return t(n)},a={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:u,isNone:i,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return l(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?a:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(i,function(t){return e(n,t)})}};return a},s=function(n){return null===n||void 0===n?c:l(n)},f={some:l,none:a,from:s},m=function(n,t){for(var e=0,r=n.length;r>e;e++){var o=n[e];if(t(o,e))return!0}return!1},g=function(n,t){for(var e=n.length,r=new Array(e),o=0;e>o;o++){var i=n[o];r[o]=t(i,o)}return r},d=function(n,t){return-1!==n.indexOf(t)},v=function(n,t){return d(n.title.toLowerCase(),t)||m(n.keywords,function(n){return d(n.toLowerCase(),t)})},y=function(n,t,e){for(var r=[],o=t.toLowerCase(),u=e.fold(function(){return i},function(n){return function(t){return t>=n}}),a=0;a<n.length&&(0!==t.length&&!v(n[a],o)||(r.push({value:n[a].char,text:n[a].title,icon:n[a].char}),!u(r.length)));a++);return r},h=function(n,t){n.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(n,e){return t.waitForLoad().then(function(){var r=t.listAll();return y(r,n,f.some(e))})},onAction:function(t,e,r){n.selection.setRng(e),n.insertContent(r),t.hide()}})},p=function(n){var t=n,e=function(){return t},r=function(n){t=n};return{get:e,set:r}},b=function(t,e){var r=null,o=function(){null!==r&&(n.clearTimeout(r),r=null)},i=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&n.clearTimeout(r),r=n.setTimeout(function(){t.apply(null,o),r=null},e)};return{cancel:o,throttle:i}},w=function(n,t){n.insertContent(t)},O=function(){return O=Object.assign||function(n){for(var t,e=1,r=arguments.length;r>e;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},O.apply(this,arguments)},C=Object.prototype.hasOwnProperty,k=function(n,t){return t},j=function(n){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var u in i)C.call(i,u)&&(r[u]=n(r[u],i[u]))}return r}},A=j(k),T=Object.keys,_=Object.hasOwnProperty,D=function(n,t){for(var e=T(n),r=0,o=e.length;o>r;r++){var i=e[r],u=n[i];t(u,i)}},P=function(n,t){return x(n,function(n,e){return{k:e,v:t(n,e)}})},x=function(n,t){var e={};return D(n,function(n,r){var o=t(n,r);e[o.k]=o.v}),e},L=function(n,t){return _.call(n,t)},S=tinymce.util.Tools.resolve("tinymce.Resource"),N=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=tinymce.util.Tools.resolve("tinymce.util.Promise"),F="tinymce.plugins.emoticons",q=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")},I=function(n){return n.getParam("emoticons_database_id",F,"string")},M=function(n){return n.getParam("emoticons_append",{},"object")},U="All",z={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Fla
;/*!node_modules/tinymce/plugins/emoticons/index.js*/
amis.define("node_modules/tinymce/plugins/emoticons/index",function(n){n("node_modules/tinymce/plugins/emoticons/plugin")});
;/*!node_modules/tinymce/plugins/emoticons/js/emojis.js*/
amis.define("node_modules/tinymce/plugins/emoticons/js/emojis",function(){window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],"char":"😀",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],"char":"😬",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],"char":"😁",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],"char":"😂",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],"char":"🤣",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],"char":"😃",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],"char":"😄",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],"char":"😅",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],"char":"😆",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],"char":"😇",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],"char":"😉",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],"char":"😊",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],"char":"🙂",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],"char":"🙃",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],"char":"☺️",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],"char":"😋",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],"char":"😌",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],"char":"😍",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"😘",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],"char":"😗",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],"char":"😙",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],"char":"😚",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],"char":"😜",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],"char":"🤪",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],"char":"🤨",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],"char":"🧐",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],"char":"😝",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],"char":"😛",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],"char":"🤑",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],"char":"🤓",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],"char":"😎",fitzpatrick_scale:!1,category:"peo
});
;/*!src/components/Tinymce.tsx*/
amis.define("82fac39",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),i=n.__importDefault(e("node_modules/tinymce/tinymce"));e("node_modules/tinymce/themes/silver/index"),e("node_modules/tinymce/plugins/advlist/index"),e("node_modules/tinymce/plugins/autolink/index"),e("node_modules/tinymce/plugins/lists/index"),e("node_modules/tinymce/plugins/link/index"),e("node_modules/tinymce/plugins/image/index"),e("node_modules/tinymce/plugins/charmap/index"),e("node_modules/tinymce/plugins/print/index"),e("node_modules/tinymce/plugins/preview/index"),e("node_modules/tinymce/plugins/anchor/index"),e("node_modules/tinymce/plugins/searchreplace/index"),e("node_modules/tinymce/plugins/visualblocks/index"),e("node_modules/tinymce/plugins/code/index"),e("node_modules/tinymce/plugins/fullscreen/index"),e("node_modules/tinymce/plugins/insertdatetime/index"),e("node_modules/tinymce/plugins/media/index"),e("node_modules/tinymce/plugins/table/index"),e("node_modules/tinymce/plugins/paste/index"),e("node_modules/tinymce/plugins/help/index"),e("node_modules/tinymce/plugins/wordcount/index"),e("node_modules/tinymce/plugins/hr/index"),e("node_modules/tinymce/plugins/pagebreak/index"),e("node_modules/tinymce/plugins/spellchecker/index"),e("node_modules/tinymce/plugins/visualchars/index"),e("node_modules/tinymce/plugins/template/index"),e("node_modules/tinymce/plugins/nonbreaking/index"),e("node_modules/tinymce/plugins/emoticons/index"),e("node_modules/tinymce/plugins/emoticons/js/emojis");var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.default.createRef(),t}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.locale;this.config=n.__assign(n.__assign({inline:!1,skin:!1,content_css:!1,height:400,language:t&&"zh-cn"!==t?"en":"zh_CN",plugins:["advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker","searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking","table emoticons template paste help"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | help",menu:{file:{title:"File",items:"newdocument restoredraft | preview | print "},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | code wordcount"},table:{title:"Table",items:"inserttable | cell row column | tableprops deletetable"},help:{title:"Help",items:"help"}},paste_data_images:!0},this.props.config),{target:this.elementRef.current,readOnly:this.props.disabled,setup:function(t){e.editor=t,t.on("init",function(n){e.initEditor(n,t)})}}),i.default.init(this.config)},t.prototype.componentDidUpdate=function(e){var t,n=this.props;n.model!==e.model&&n.model!==this.currentContent&&(null===(t=this.editor)||void 0===t?void 0:t.setContent(n.model||""))},t.prototype.componentWillUnmount=function(){i.default.remove(this.editor)},t.prototype.initEditor=function(e,t){var n=this,o=this.props,i=o.model,r=o.onModelChange,l=o.outputFormat,a=o.onFocus,s=o.onBlur,d=i||"";t.setContent(d),r&&t.on("change keyup setcontent",function(){var e=t.getContent({format:l});e!==n.currentContent&&(n.currentContent=e,r(e))}),a&&t.on("focus",a),s&&t.on("blur",s)},t.prototype.render=function(){return o.default.createElement("textarea",{ref:this.elementRef})},t.defaultProps={ou