/*! * build: Hopaheal * copyright: Mead * time: 2022-9-23 10:41:22 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7c5c9806"],{"0112":function(t,e,n){n("4117")},"03a1":function(module,exports,__webpack_require__){(function(t,e){module.exports=e()})(0,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){var r,o=n(1),i=n(3),a=n(5),u=n(20),c=n(23),s=n(25);"undefined"!==typeof window&&(r=n(27) /*! Mock - 模拟请求 & 模拟数据 https://github.com/nuysoft/Mock 墨智 mozhi.gyy@taobao.com nuysoft@gmail.com */);var l={Handler:o,Random:a,Util:i,XHR:r,RE:u,toJSONSchema:c,valid:s,heredoc:i.heredoc,setup:function(t){return r.setup(t)},_mocked:{},version:"1.0.1-beta3"};r&&(r.Mock=l),l.mock=function(t,e,n){return 1===arguments.length?o.gen(t):(2===arguments.length&&(n=e,e=void 0),r&&(window.XMLHttpRequest=r),l._mocked[t+(e||"")]={rurl:t,rtype:e,template:n},l)},t.exports=l},function(module,exports,__webpack_require__){var Constant=__webpack_require__(2),Util=__webpack_require__(3),Parser=__webpack_require__(4),Random=__webpack_require__(5),RE=__webpack_require__(20),Handler={extend:Util.extend,gen:function(t,e,n){e=void 0==e?"":e+"",n=n||{},n={path:n.path||[Constant.GUID],templatePath:n.templatePath||[Constant.GUID++],currentContext:n.currentContext,templateCurrentContext:n.templateCurrentContext||t,root:n.root||n.currentContext,templateRoot:n.templateRoot||n.templateCurrentContext||t};var r,o=Parser.parse(e),i=Util.type(t);return Handler[i]?(r=Handler[i]({type:i,template:t,name:e,parsedName:e?e.replace(Constant.RE_KEY,"$1"):e,rule:o,context:n}),n.root||(n.root=r),r):t}};Handler.extend({array:function(t){var e,n,r=[];if(0===t.template.length)return r;if(t.rule.parameters)if(1===t.rule.min&&void 0===t.rule.max)t.context.path.push(t.name),t.context.templatePath.push(t.name),r=Random.pick(Handler.gen(t.template,void 0,{path:t.context.path,templatePath:t.context.templatePath,currentContext:r,templateCurrentContext:t.template,root:t.context.root||r,templateRoot:t.context.templateRoot||t.template})),t.context.path.pop(),t.context.templatePath.pop();else if(t.rule.parameters[2])t.template.__order_index=t.template.__order_index||0,t.context.path.push(t.name),t.context.templatePath.push(t.name),r=Handler.gen(t.template,void 0,{path:t.context.path,templatePath:t.context.templatePath,currentContext:r,templateCurrentContext:t.template,root:t.context.root||r,templateRoot:t.context.templateRoot||t.template})[t.template.__order_index%t.template.length],t.template.__order_index+=+t.rule.parameters[2],t.context.path.pop(),t.context.templatePath.pop();else for(e=0;e1)return this.getValueByKeyPath(key,options);if(templateContext&&"object"===typeof templateContext&&key in templateContext&&placeholder!==templateContext[key])return templateContext[key]=Handler.gen(templateContext[key],key,{currentContext:obj,templateCurrentContext:templateContext}),templateContext[key];if(!(key in Random)&&!(lkey in Random)&&!(okey in Random))return placeholder;for(var i=0;i1&&(o=e.context.path.slice(0),o.pop(),o=this.normalizePath(o.concat(r)));try{t=r[r.length-1];for(var i=e.context.root,a=e.context.templateRoot,u=1;u1/(t+e)*t?!n:n):Math.random()>=.5},bool:function(t,e,n){return this.boolean(t,e,n)},natural:function(t,e){return t="undefined"!==typeof t?parseInt(t,10):0,e="undefined"!==typeof e?parseInt(e,10):9007199254740992,Math.round(Math.random()*(e-t))+t},integer:function(t,e){return t="undefined"!==typeof t?parseInt(t,10):-9007199254740992,e="undefined"!==typeof e?parseInt(e,10):9007199254740992,Math.round(Math.random()*(e-t))+t},int:function(t,e){return this.integer(t,e)},float:function(t,e,n,r){n=void 0===n?0:n,n=Math.max(Math.min(n,17),0),r=void 0===r?17:r,r=Math.max(Math.min(r,17),0);for(var o=this.integer(t,e)+".",i=0,a=this.natural(n,r);i1&&r--,i=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,o[s]=255*i;return o},hsl2hsv:function(t){var e,n,r=t[0],o=t[1]/100,i=t[2]/100;return i*=2,o*=i<=1?i:2-i,n=(i+o)/2,e=2*o/(i+o),[r,100*e,100*n]},hsv2rgb:function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),a=255*r*(1-n),u=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,c,a];case 1:return[u,r,a];case 2:return[a,r,c];case 3:return[a,u,r];case 4:return[c,a,r];case 5:return[r,a,u]}},hsv2hsl:function(t){var e,n,r=t[0],o=t[1]/100,i=t[2]/100;return n=(2-o)*i,e=o*i,e/=n<=1?n:2-n,n/=2,[r,100*e,100*n]},rgb2hex:function(t,e,n){return"#"+((256+t<<8|e)<<8|n).toString(16).slice(1)},hex2rgb:function(t){return t="0x"+t.slice(1).replace(t.length>4?t:/./g,"$&$&")|0,[t>>16,t>>8&255,255&t]}}},function(t,e){t.exports={navy:{value:"#000080",nicer:"#001F3F"},blue:{value:"#0000ff",nicer:"#0074D9"},aqua:{value:"#00ffff",nicer:"#7FDBFF"},teal:{value:"#008080",nicer:"#39CCCC"},olive:{value:"#008000",nicer:"#3D9970"},green:{value:"#008000",nicer:"#2ECC40"},lime:{value:"#00ff00",nicer:"#01FF70"},yellow:{value:"#ffff00",nicer:"#FFDC00"},orange:{value:"#ffa500",nicer:"#FF851B"},red:{value:"#ff0000",nicer:"#FF4136"},maroon:{value:"#800000",nicer:"#85144B"},fuchsia:{value:"#ff00ff",nicer:"#F012BE"},purple:{value:"#800080",nicer:"#B10DC9"},silver:{value:"#c0c0c0",nicer:"#DDDDDD"},gray:{value:"#808080",nicer:"#AAAAAA"},black:{value:"#000000",nicer:"#111111"},white:{value:"#FFFFFF",nicer:"#FFFFFF"}}},function(t,e,n){var r=n(6),o=n(14);function i(t,e,n,o){return void 0===n?r.natural(t,e):void 0===o?n:r.natural(parseInt(n,10),parseInt(o,10))}t.exports={paragraph:function(t,e){for(var n=i(3,7,t,e),r=[],o=0;o1&&(e=[].slice.call(arguments,0));var n=t.options,r=n.context.templatePath.join("."),o=t.cache[r]=t.cache[r]||{index:0,array:e};return o.array[o.index++%o.array.length]}}},function(t,e){t.exports={first:function(){var t=["James","John","Robert","Michael","William","David","Richard","Charles","Joseph","Thomas","Christopher","Daniel","Paul","Mark","Donald","George","Kenneth","Steven","Edward","Brian","Ronald","Anthony","Kevin","Jason","Matthew","Gary","Timothy","Jose","Larry","Jeffrey","Frank","Scott","Eric"].concat(["Mary","Patricia","Linda","Barbara","Elizabeth","Jennifer","Maria","Susan","Margaret","Dorothy","Lisa","Nancy","Karen","Betty","Helen","Sandra","Donna","Carol","Ruth","Sharon","Michelle","Laura","Sarah","Kimberly","Deborah","Jessica","Shirley","Cynthia","Angela","Melissa","Brenda","Amy","Anna"]);return this.pick(t)},last:function(){var t=["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen"];return this.pick(t)},name:function(t){return this.first()+" "+(t?this.first()+" ":"")+this.last()},cfirst:function(){var t="王 李 张 刘 陈 杨 赵 黄 周 吴 徐 孙 胡 朱 高 林 何 郭 马 罗 梁 宋 郑 谢 韩 唐 冯 于 董 萧 程 曹 袁 邓 许 傅 沈 曾 彭 吕 苏 卢 蒋 蔡 贾 丁 魏 薛 叶 阎 余 潘 杜 戴 夏 锺 汪 田 任 姜 范 方 石 姚 谭 廖 邹 熊 金 陆 郝 孔 白 崔 康 毛 邱 秦 江 史 顾 侯 邵 孟 龙 万 段 雷 钱 汤 尹 黎 易 常 武 乔 贺 赖 龚 文".split(" ");return this.pick(t)},clast:function(){var t="伟 芳 娜 秀英 敏 静 丽 强 磊 军 洋 勇 艳 杰 娟 涛 明 超 秀兰 霞 平 刚 桂英".split(" ");return this.pick(t)},cname:function(){return this.cfirst()+this.clast()}}},function(t,e){t.exports={url:function(t,e){return(t||this.protocol())+"://"+(e||this.domain())+"/"+this.word()},protocol:function(){return this.pick("http ftp gopher mailto mid cid news nntp prospero telnet rlogin tn3270 wais".split(" "))},domain:function(t){return this.word()+"."+(t||this.tld())},tld:function(){return this.pick("com net org edu gov int mil cn com.cn net.cn gov.cn org.cn 中国 中国互联.公司 中国互联.网络 tel biz cc tv info name hk mobi asia cd travel pro museum coop aero ad ae af ag ai al am an ao aq ar as at au aw az ba bb bd be bf bg bh bi bj bm bn bo br bs bt bv bw by bz ca cc cf cg ch ci ck cl cm cn co cq cr cu cv cx cy cz de dj dk dm do dz ec ee eg eh es et ev fi fj fk fm fo fr ga gb gd ge gf gh gi gl gm gn gp gr gt gu gw gy hk hm hn hr ht hu id ie il in io iq ir is it jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc li lk lr ls lt lu lv ly ma mc md mg mh ml mm mn mo mp mq mr ms mt mv mw mx my mz na nc ne nf ng ni nl no np nr nt nu nz om qa pa pe pf pg ph pk pl pm pn pr pt pw py re ro ru rw sa sb sc sd se sg sh si sj sk sl sm sn so sr st su sy sz tc td tf tg th tj tk tm tn to tp tr tt tv tw tz ua ug uk us uy va vc ve vg vn vu wf ws ye yu za zm zr zw".split(" "))},email:function(t){return this.character("lower")+"."+this.word()+"@"+(t||this.word()+"."+this.tld())},ip:function(){return this.natural(0,255)+"."+this.natural(0,255)+"."+this.natural(0,255)+"."+this.natural(0,255)}}},function(t,e,n){var r=n(18),o=["东北","华北","华东","华中","华南","西南","西北"];t.exports={region:function(){return this.pick(o)},province:function(){return this.pick(r).name},city:function(t){var e=this.pick(r),n=this.pick(e.children);return t?[e.name,n.name].join(" "):n.name},county:function(t){var e=this.pick(r),n=this.pick(e.children),o=this.pick(n.children)||{name:"-"};return t?[e.name,n.name,o.name].join(" "):o.name},zip:function(t){for(var e="",n=0;n<(t||6);n++)e+=this.natural(0,9);return e}}},function(t,e){var n={11e4:"北京",110100:"北京市",110101:"东城区",110102:"西城区",110105:"朝阳区",110106:"丰台区",110107:"石景山区",110108:"海淀区",110109:"门头沟区",110111:"房山区",110112:"通州区",110113:"顺义区",110114:"昌平区",110115:"大兴区",110116:"怀柔区",110117:"平谷区",110228:"密云县",110229:"延庆县",110230:"其它区",12e4:"天津",120100:"天津市",120101:"和平区",120102:"河东区",120103:"河西区",120104:"南开区",120105:"河北区",120106:"红桥区",120110:"东丽区",120111:"西青区",120112:"津南区",120113:"北辰区",120114:"武清区",120115:"宝坻区",120116:"滨海新区",120221:"宁河县",120223:"静海县",120225:"蓟县",120226:"其它区",13e4:"河北省",130100:"石家庄市",130102:"长安区",130103:"桥东区",130104:"桥西区",130105:"新华区",130107:"井陉矿区",130108:"裕华区",130121:"井陉县",130123:"正定县",130124:"栾城县",130125:"行唐县",130126:"灵寿县",130127:"高邑县",130128:"深泽县",130129:"赞皇县",130130:"无极县",130131:"平山县",130132:"元氏县",130133:"赵县",130181:"辛集市",130182:"藁城市",130183:"晋州市",130184:"新乐市",130185:"鹿泉市",130186:"其它区",130200:"唐山市",130202:"路南区",130203:"路北区",130204:"古冶区",130205:"开平区",130207:"丰南区",130208:"丰润区",130223:"滦县",130224:"滦南县",130225:"乐亭县",130227:"迁西县",130229:"玉田县",130230:"曹妃甸区",130281:"遵化市",130283:"迁安市",130284:"其它区",130300:"秦皇岛市",130302:"海港区",130303:"山海关区",130304:"北戴河区",130321:"青龙满族自治县",130322:"昌黎县",130323:"抚宁县",130324:"卢龙县",130398:"其它区",130400:"邯郸市",130402:"邯山区",130403:"丛台区",130404:"复兴区",130406:"峰峰矿区",130421:"邯郸县",130423:"临漳县",130424:"成安县",130425:"大名县",130426:"涉县",130427:"磁县",130428:"肥乡县",130429:"永年县",130430:"邱县",130431:"鸡泽县",130432:"广平县",130433:"馆陶县",130434:"魏县",130435:"曲周县",130481:"武安市",130482:"其它区",130500:"邢台市",130502:"桥东区",130503:"桥西区",130521:"邢台县",130522:"临城县",130523:"内丘县",130524:"柏乡县",130525:"隆尧县",130526:"任县",130527:"南和县",130528:"宁晋县",130529:"巨鹿县",130530:"新河县",130531:"广宗县",130532:"平乡县",130533:"威县",130534:"清河县",130535:"临西县",130581:"南宫市",130582:"沙河市",130583:"其它区",130600:"保定市",130602:"新市区",130603:"北市区",130604:"南市区",130621:"满城县",130622:"清苑县",130623:"涞水县",130624:"阜平县",130625:"徐水县",130626:"定兴县",130627:"唐县",130628:"高阳县",130629:"容城县",130630:"涞源县",130631:"望都县",130632:"安新县",130633:"易县",130634:"曲阳县",130635:"蠡县",130636:"顺平县",130637:"博野县",130638:"雄县",130681:"涿州市",130682:"定州市",130683:"安国市",130684:"高碑店市",130699:"其它区",130700:"张家口市",130702:"桥东区",130703:"桥西区",130705:"宣化区",130706:"下花园区",130721:"宣化县",130722:"张北县",130723:"康保县",130724:"沽源县",130725:"尚义县",130726:"蔚县",130727:"阳原县",130728:"怀安县",130729:"万全县",130730:"怀来县",130731:"涿鹿县",130732:"赤城县",130733:"崇礼县",130734:"其它区",130800:"承德市",130802:"双桥区",130803:"双滦区",130804:"鹰手营子矿区",130821:"承德县",130822:"兴隆县",130823:"平泉县",130824:"滦平县",130825:"隆化县",130826:"丰宁满族自治县",130827:"宽城满族自治县",130828:"围场满族蒙古族自治县",130829:"其它区",130900:"沧州市",130902:"新华区",130903:"运河区",130921:"沧县",130922:"青县",130923:"东光县",130924:"海兴县",130925:"盐山县",130926:"肃宁县",130927:"南皮县",130928:"吴桥县",130929:"献县",130930:"孟村回族自治县",130981:"泊头市",130982:"任丘市",130983:"黄骅市",130984:"河间市",130985:"其它区",131e3:"廊坊市",131002:"安次区",131003:"广阳区",131022:"固安县",131023:"永清县",131024:"香河县",131025:"大城县",131026:"文安县",131028:"大厂回族自治县",131081:"霸州市",131082:"三河市",131083:"其它区",131100:"衡水市",131102:"桃城区",131121:"枣强县",131122:"武邑县",131123:"武强县",131124:"饶阳县",131125:"安平县",131126:"故城县",131127:"景县",131128:"阜城县",131181:"冀州市",131182:"深州市",131183:"其它区",14e4:"山西省",140100:"太原市",140105:"小店区",140106:"迎泽区",140107:"杏花岭区",140108:"尖草坪区",140109:"万柏林区",140110:"晋源区",140121:"清徐县",140122:"阳曲县",140123:"娄烦县",140181:"古交市",140182:"其它区",140200:"大同市",140202:"城区",140203:"矿区",140211:"南郊区",140212:"新荣区",140221:"阳高县",140222:"天镇县",140223:"广灵县",140224:"灵丘县",140225:"浑源县",140226:"左云县",140227:"大同县",140228:"其它区",140300:"阳泉市",140302:"城区",140303:"矿区",140311:"郊区",140321:"平定县",140322:"盂县",140323:"其它区",140400:"长治市",140421:"长治县",140423:"襄垣县",140424:"屯留县",140425:"平顺县",140426:"黎城县",140427:"壶关县",140428:"长子县",140429:"武乡县",140430:"沁县",140431:"沁源县",140481:"潞城市",140482:"城区",140483:"郊区",140485:"其它区",140500:"晋城市",140502:"城区",140521:"沁水县",140522:"阳城县",140524:"陵川县",140525:"泽州县",140581:"高平市",140582:"其它区",140600:"朔州市",140602:"朔城区",140603:"平鲁区",140621:"山阴县",140622:"应县",140623:"右玉县",140624:"怀仁县",140625:"其它区",140700:"晋中市",140702:"榆次区",140721:"榆社县",140722:"左权县",140723:"和顺县",140724:"昔阳县",140725:"寿阳县",140726:"太谷县",140727:"祁县",140728:"平遥县",140729:"灵石县",140781:"介休市",140782:"其它区",140800:"运城市",140802:"盐湖区",140821:"临猗县",140822:"万荣县",140823:"闻喜县",140824:"稷山县",140825:"新绛县",140826:"绛县",140827:"垣曲县",140828:"夏县",140829:"平陆县",140830:"芮城县",140881:"永济市",140882:"河津市",140883:"其它区",140900:"忻州市",140902:"忻府区",140921:"定襄县",140922:"五台县",140923:"代县",140924:"繁峙县",140925:"宁武县",140926:"静乐县",140927:"神池县",140928:"五寨县",140929:"岢岚县",140930:"河曲县",140931:"保德县",140932:"偏关县",140981:"原平市",140982:"其它区",141e3:"临汾市",141002:"尧都区",141021:"曲沃县",141022:"翼城县",141023:"襄汾县",141024:"洪洞县",141025:"古县",141026:"安泽县",141027:"浮山县",141028:"吉县",141029:"乡宁县",141030:"大宁县",141031:"隰县",141032:"永和县",141033:"蒲县",141034:"汾西县",141081:"侯马市",141082:"霍州市",141083:"其它区",141100:"吕梁市",141102:"离石区",141121:"文水县",141122:"交城县",141123:"兴县",141124:"临县",141125:"柳林县",141126:"石楼县",141127:"岚县",141128:"方山县",141129:"中阳县",141130:"交口县",141181:"孝义市",141182:"汾阳市",141183:"其它区",15e4:"内蒙古自治区",150100:"呼和浩特市",150102:"新城区",150103:"回民区",150104:"玉泉区",150105:"赛罕区",150121:"土默特左旗",150122:"托克托县",150123:"和林格尔县",150124:"清水河县",150125:"武川县",150126:"其它区",150200:"包头市",150202:"东河区",150203:"昆都仑区",150204:"青山区",150205:"石拐区",150206:"白云鄂博矿区",150207:"九原区",150221:"土默特右旗",150222:"固阳县",150223:"达尔罕茂明安联合旗",150224:"其它区",150300:"乌海市",150302:"海勃湾区",150303:"海南区",150304:"乌达区",150305:"其它区",150400:"赤峰市",150402:"红山区",150403:"元宝山区",150404:"松山区",150421:"阿鲁科尔沁旗",150422:"巴林左旗",150423:"巴林右旗",150424:"林西县",150425:"克什克腾旗",150426:"翁牛特旗",150428:"喀喇沁旗",150429:"宁城县",150430:"敖汉旗",150431:"其它区",150500:"通辽市",150502:"科尔沁区",150521:"科尔沁左翼中旗",150522:"科尔沁左翼后旗",150523:"开鲁县",150524:"库伦旗",150525:"奈曼旗",150526:"扎鲁特旗",150581:"霍林郭勒市",150582:"其它区",150600:"鄂尔多斯市",150602:"东胜区",150621:"达拉特旗",150622:"准格尔旗",150623:"鄂托克前旗",150624:"鄂托克旗",150625:"杭锦旗",150626:"乌审旗",150627:"伊金霍洛旗",150628:"其它区",150700:"呼伦贝尔市",150702:"海拉尔区",150703:"扎赉诺尔区",150721:"阿荣旗",150722:"莫力达瓦达斡尔族自治旗",150723:"鄂伦春自治旗",150724:"鄂温克族自治旗",150725:"陈巴尔虎旗",150726:"新巴尔虎左旗",150727:"新巴尔虎右旗",150781:"满洲里市",150782:"牙克石市",150783:"扎兰屯市",150784:"额尔古纳市",150785:"根河市",150786:"其它区",150800:"巴彦淖尔市",150802:"临河区",150821:"五原县",150822:"磴口县",150823:"乌拉特前旗",150824:"乌拉特中旗",150825:"乌拉特后旗",150826:"杭锦后旗",150827:"其它区",150900:"乌兰察布市",150902:"集宁区",150921:"卓资县",150922:"化德县",150923:"商都县",150924:"兴和县",150925:"凉城县",150926:"察哈尔右翼前旗",150927:"察哈尔右翼中旗",150928:"察哈尔右翼后旗",150929:"四子王旗",150981:"丰镇市",150982:"其它区",152200:"兴安盟",152201:"乌兰浩特市",152202:"阿尔山市",152221:"科尔沁右翼前旗",152222:"科尔沁右翼中旗",152223:"扎赉特旗",152224:"突泉县",152225:"其它区",152500:"锡林郭勒盟",152501:"二连浩特市",152502:"锡林浩特市",152522:"阿巴嘎旗",152523:"苏尼特左旗",152524:"苏尼特右旗",152525:"东乌珠穆沁旗",152526:"西乌珠穆沁旗",152527:"太仆寺旗",152528:"镶黄旗",152529:"正镶白旗",152530:"正蓝旗",152531:"多伦县",152532:"其它区",152900:"阿拉善盟",152921:"阿拉善左旗",152922:"阿拉善右旗",152923:"额济纳旗",152924:"其它区",21e4:"辽宁省",210100:"沈阳市",210102:"和平区",210103:"沈河区",210104:"大东区",210105:"皇姑区",210106:"铁西区",210111:"苏家屯区",210112:"东陵区",210113:"新城子区",210114:"于洪区",210122:"辽中县",210123:"康平县",210124:"法库县",210181:"新民市",210184:"沈北新区",210185:"其它区",210200:"大连市",210202:"中山区",210203:"西岗区",210204:"沙河口区",210211:"甘井子区",210212:"旅顺口区",210213:"金州区",210224:"长海县",210281:"瓦房店市",210282:"普兰店市",210283:"庄河市",210298:"其它区",210300:"鞍山市",210302:"铁东区",210303:"铁西区",210304:"立山区",210311:"千山区",210321:"台安县",210323:"岫岩满族自治县",210381:"海城市",210382:"其它区",210400:"抚顺市",210402:"新抚区",210403:"东洲区",210404:"望花区",210411:"顺城区",210421:"抚顺县",210422:"新宾满族自治县",210423:"清原满族自治县",210424:"其它区",210500:"本溪市",210502:"平山区",210503:"溪湖区",210504:"明山区",210505:"南芬区",210521:"本溪满族自治县",210522:"桓仁满族自治县",210523:"其它区",210600:"丹东市",210602:"元宝区",210603:"振兴区",210604:"振安区",210624:"宽甸满族自治县",210681:"东港市",210682:"凤城市",210683:"其它区",210700:"锦州市",210702:"古塔区",210703:"凌河区",210711:"太和区",210726:"黑山县",210727:"义县",210781:"凌海市",210782:"北镇市",210783:"其它区",210800:"营口市",210802:"站前区",210803:"西市区",210804:"鲅鱼圈区",210811:"老边区",210881:"盖州市",210882:"大石桥市",210883:"其它区",210900:"阜新市",210902:"海州区",210903:"新邱区",210904:"太平区",210905:"清河门区",210911:"细河区",210921:"阜新蒙古族自治县",210922:"彰武县",210923:"其它区",211e3:"辽阳市",211002:"白塔区",211003:"文圣区",211004:"宏伟区",211005:"弓长岭区",211011:"太子河区",211021:"辽阳县",211081:"灯塔市",211082:"其它区",211100:"盘锦市",211102:"双台子区",211103:"兴隆台区",211121:"大洼县",211122:"盘山县",211123:"其它区",211200:"铁岭市",211202:"银州区",211204:"清河区",211221:"铁岭县",211223:"西丰县",211224:"昌图县",211281:"调兵山市",211282:"开原市",211283:"其它区",211300:"朝阳市",211302:"双塔区",211303:"龙城区",211321:"朝阳县",211322:"建平县",211324:"喀喇沁左翼蒙古族自治县",211381:"北票市",211382:"凌源市",211383:"其它区",211400:"葫芦岛市",211402:"连山区",211403:"龙港区",211404:"南票区",211421:"绥中县",211422:"建昌县",211481:"兴城市",211482:"其它区",22e4:"吉林省",220100:"长春市",220102:"南关区",220103:"宽城区",220104:"朝阳区",220105:"二道区",220106:"绿园区",220112:"双阳区",220122:"农安县",220181:"九台市",220182:"榆树市",220183:"德惠市",220188:"其它区",220200:"吉林市",220202:"昌邑区",220203:"龙潭区",220204:"船营区",220211:"丰满区",220221:"永吉县",220281:"蛟河市",220282:"桦甸市",220283:"舒兰市",220284:"磐石市",220285:"其它区",220300:"四平市",220302:"铁西区",220303:"铁东区",220322:"梨树县",220323:"伊通满族自治县",220381:"公主岭市",220382:"双辽市",220383:"其它区",220400:"辽源市",220402:"龙山区",220403:"西安区",220421:"东丰县",220422:"东辽县",220423:"其它区",220500:"通化市",220502:"东昌区",220503:"二道江区",220521:"通化县",220523:"辉南县",220524:"柳河县",220581:"梅河口市",220582:"集安市",220583:"其它区",220600:"白山市",220602:"浑江区",220621:"抚松县",220622:"靖宇县",220623:"长白朝鲜族自治县",220625:"江源区",220681:"临江市",220682:"其它区",220700:"松原市",220702:"宁江区",220721:"前郭尔罗斯蒙古族自治县",220722:"长岭县",220723:"乾安县",220724:"扶余市",220725:"其它区",220800:"白城市",220802:"洮北区",220821:"镇赉县",220822:"通榆县",220881:"洮南市",220882:"大安市",220883:"其它区",222400:"延边朝鲜族自治州",222401:"延吉市",222402:"图们市",222403:"敦化市",222404:"珲春市",222405:"龙井市",222406:"和龙市",222424:"汪清县",222426:"安图县",222427:"其它区",23e4:"黑龙江省",230100:"哈尔滨市",230102:"道里区",230103:"南岗区",230104:"道外区",230106:"香坊区",230108:"平房区",230109:"松北区",230111:"呼兰区",230123:"依兰县",230124:"方正县",230125:"宾县",230126:"巴彦县",230127:"木兰县",230128:"通河县",230129:"延寿县",230181:"阿城区",230182:"双城市",230183:"尚志市",230184:"五常市",230186:"其它区",230200:"齐齐哈尔市",230202:"龙沙区",230203:"建华区",230204:"铁锋区",230205:"昂昂溪区",230206:"富拉尔基区",230207:"碾子山区",230208:"梅里斯达斡尔族区",230221:"龙江县",230223:"依安县",230224:"泰来县",230225:"甘南县",230227:"富裕县",230229:"克山县",230230:"克东县",230231:"拜泉县",230281:"讷河市",230282:"其它区",230300:"鸡西市",230302:"鸡冠区",230303:"恒山区",230304:"滴道区",230305:"梨树区",230306:"城子河区",230307:"麻山区",230321:"鸡东县",230381:"虎林市",230382:"密山市",230383:"其它区",230400:"鹤岗市",230402:"向阳区",230403:"工农区",230404:"南山区",230405:"兴安区",230406:"东山区",230407:"兴山区",230421:"萝北县",230422:"绥滨县",230423:"其它区",230500:"双鸭山市",230502:"尖山区",230503:"岭东区",230505:"四方台区",230506:"宝山区",230521:"集贤县",230522:"友谊县",230523:"宝清县",230524:"饶河县",230525:"其它区",230600:"大庆市",230602:"萨尔图区",230603:"龙凤区",230604:"让胡路区",230605:"红岗区",230606:"大同区",230621:"肇州县",230622:"肇源县",230623:"林甸县",230624:"杜尔伯特蒙古族自治县",230625:"其它区",230700:"伊春市",230702:"伊春区",230703:"南岔区",230704:"友好区",230705:"西林区",230706:"翠峦区",230707:"新青区",230708:"美溪区",230709:"金山屯区",230710:"五营区",230711:"乌马河区",230712:"汤旺河区",230713:"带岭区",230714:"乌伊岭区",230715:"红星区",230716:"上甘岭区",230722:"嘉荫县",230781:"铁力市",230782:"其它区",230800:"佳木斯市",230803:"向阳区",230804:"前进区",230805:"东风区",230811:"郊区",230822:"桦南县",230826:"桦川县",230828:"汤原县",230833:"抚远县",230881:"同江市",230882:"富锦市",230883:"其它区",230900:"七台河市",230902:"新兴区",230903:"桃山区",230904:"茄子河区",230921:"勃利县",230922:"其它区",231e3:"牡丹江市",231002:"东安区",231003:"阳明区",231004:"爱民区",231005:"西安区",231024:"东宁县",231025:"林口县",231081:"绥芬河市",231083:"海林市",231084:"宁安市",231085:"穆棱市",231086:"其它区",231100:"黑河市",231102:"爱辉区",231121:"嫩江县",231123:"逊克县",231124:"孙吴县",231181:"北安市",231182:"五大连池市",231183:"其它区",231200:"绥化市",231202:"北林区",231221:"望奎县",231222:"兰西县",231223:"青冈县",231224:"庆安县",231225:"明水县",231226:"绥棱县",231281:"安达市",231282:"肇东市",231283:"海伦市",231284:"其它区",232700:"大兴安岭地区",232702:"松岭区",232703:"新林区",232704:"呼中区",232721:"呼玛县",232722:"塔河县",232723:"漠河县",232724:"加格达奇区",232725:"其它区",31e4:"上海",310100:"上海市",310101:"黄浦区",310104:"徐汇区",310105:"长宁区",310106:"静安区",310107:"普陀区",310108:"闸北区",310109:"虹口区",310110:"杨浦区",310112:"闵行区",310113:"宝山区",310114:"嘉定区",310115:"浦东新区",310116:"金山区",310117:"松江区",310118:"青浦区",310120:"奉贤区",310230:"崇明县",310231:"其它区",32e4:"江苏省",320100:"南京市",320102:"玄武区",320104:"秦淮区",320105:"建邺区",320106:"鼓楼区",320111:"浦口区",320113:"栖霞区",320114:"雨花台区",320115:"江宁区",320116:"六合区",320124:"溧水区",320125:"高淳区",320126:"其它区",320200:"无锡市",320202:"崇安区",320203:"南长区",320204:"北塘区",320205:"锡山区",320206:"惠山区",320211:"滨湖区",320281:"江阴市",320282:"宜兴市",320297:"其它区",320300:"徐州市",320302:"鼓楼区",320303:"云龙区",320305:"贾汪区",320311:"泉山区",320321:"丰县",320322:"沛县",320323:"铜山区",320324:"睢宁县",320381:"新沂市",320382:"邳州市",320383:"其它区",320400:"常州市",320402:"天宁区",320404:"钟楼区",320405:"戚墅堰区",320411:"新北区",320412:"武进区",320481:"溧阳市",320482:"金坛市",320483:"其它区",320500:"苏州市",320505:"虎丘区",320506:"吴中区",320507:"相城区",320508:"姑苏区",320581:"常熟市",320582:"张家港市",320583:"昆山市",320584:"吴江区",320585:"太仓市",320596:"其它区",320600:"南通市",320602:"崇川区",320611:"港闸区",320612:"通州区",320621:"海安县",320623:"如东县",320681:"启东市",320682:"如皋市",320684:"海门市",320694:"其它区",320700:"连云港市",320703:"连云区",320705:"新浦区",320706:"海州区",320721:"赣榆县",320722:"东海县",320723:"灌云县",320724:"灌南县",320725:"其它区",320800:"淮安市",320802:"清河区",320803:"淮安区",320804:"淮阴区",320811:"清浦区",320826:"涟水县",320829:"洪泽县",320830:"盱眙县",320831:"金湖县",320832:"其它区",320900:"盐城市",320902:"亭湖区",320903:"盐都区",320921:"响水县",320922:"滨海县",320923:"阜宁县",320924:"射阳县",320925:"建湖县",320981:"东台市",320982:"大丰市",320983:"其它区",321e3:"扬州市",321002:"广陵区",321003:"邗江区",321023:"宝应县",321081:"仪征市",321084:"高邮市",321088:"江都区",321093:"其它区",321100:"镇江市",321102:"京口区",321111:"润州区",321112:"丹徒区",321181:"丹阳市",321182:"扬中市",321183:"句容市",321184:"其它区",321200:"泰州市",321202:"海陵区",321203:"高港区",321281:"兴化市",321282:"靖江市",321283:"泰兴市",321284:"姜堰区",321285:"其它区",321300:"宿迁市",321302:"宿城区",321311:"宿豫区",321322:"沭阳县",321323:"泗阳县",321324:"泗洪县",321325:"其它区",33e4:"浙江省",330100:"杭州市",330102:"上城区",330103:"下城区",330104:"江干区",330105:"拱墅区",330106:"西湖区",330108:"滨江区",330109:"萧山区",330110:"余杭区",330122:"桐庐县",330127:"淳安县",330182:"建德市",330183:"富阳市",330185:"临安市",330186:"其它区",330200:"宁波市",330203:"海曙区",330204:"江东区",330205:"江北区",330206:"北仑区",330211:"镇海区",330212:"鄞州区",330225:"象山县",330226:"宁海县",330281:"余姚市",330282:"慈溪市",330283:"奉化市",330284:"其它区",330300:"温州市",330302:"鹿城区",330303:"龙湾区",330304:"瓯海区",330322:"洞头县",330324:"永嘉县",330326:"平阳县",330327:"苍南县",330328:"文成县",330329:"泰顺县",330381:"瑞安市",330382:"乐清市",330383:"其它区",330400:"嘉兴市",330402:"南湖区",330411:"秀洲区",330421:"嘉善县",330424:"海盐县",330481:"海宁市",330482:"平湖市",330483:"桐乡市",330484:"其它区",330500:"湖州市",330502:"吴兴区",330503:"南浔区",330521:"德清县",330522:"长兴县",330523:"安吉县",330524:"其它区",330600:"绍兴市",330602:"越城区",330621:"绍兴县",330624:"新昌县",330681:"诸暨市",330682:"上虞市",330683:"嵊州市",330684:"其它区",330700:"金华市",330702:"婺城区",330703:"金东区",330723:"武义县",330726:"浦江县",330727:"磐安县",330781:"兰溪市",330782:"义乌市",330783:"东阳市",330784:"永康市",330785:"其它区",330800:"衢州市",330802:"柯城区",330803:"衢江区",330822:"常山县",330824:"开化县",330825:"龙游县",330881:"江山市",330882:"其它区",330900:"舟山市",330902:"定海区",330903:"普陀区",330921:"岱山县",330922:"嵊泗县",330923:"其它区",331e3:"台州市",331002:"椒江区",331003:"黄岩区",331004:"路桥区",331021:"玉环县",331022:"三门县",331023:"天台县",331024:"仙居县",331081:"温岭市",331082:"临海市",331083:"其它区",331100:"丽水市",331102:"莲都区",331121:"青田县",331122:"缙云县",331123:"遂昌县",331124:"松阳县",331125:"云和县",331126:"庆元县",331127:"景宁畲族自治县",331181:"龙泉市",331182:"其它区",34e4:"安徽省",340100:"合肥市",340102:"瑶海区",340103:"庐阳区",340104:"蜀山区",340111:"包河区",340121:"长丰县",340122:"肥东县",340123:"肥西县",340192:"其它区",340200:"芜湖市",340202:"镜湖区",340203:"弋江区",340207:"鸠江区",340208:"三山区",340221:"芜湖县",340222:"繁昌县",340223:"南陵县",340224:"其它区",340300:"蚌埠市",340302:"龙子湖区",340303:"蚌山区",340304:"禹会区",340311:"淮上区",340321:"怀远县",340322:"五河县",340323:"固镇县",340324:"其它区",340400:"淮南市",340402:"大通区",340403:"田家庵区",340404:"谢家集区",340405:"八公山区",340406:"潘集区",340421:"凤台县",340422:"其它区",340500:"马鞍山市",340503:"花山区",340504:"雨山区",340506:"博望区",340521:"当涂县",340522:"其它区",340600:"淮北市",340602:"杜集区",340603:"相山区",340604:"烈山区",340621:"濉溪县",340622:"其它区",340700:"铜陵市",340702:"铜官山区",340703:"狮子山区",340711:"郊区",340721:"铜陵县",340722:"其它区",340800:"安庆市",340802:"迎江区",340803:"大观区",340811:"宜秀区",340822:"怀宁县",340823:"枞阳县",340824:"潜山县",340825:"太湖县",340826:"宿松县",340827:"望江县",340828:"岳西县",340881:"桐城市",340882:"其它区",341e3:"黄山市",341002:"屯溪区",341003:"黄山区",341004:"徽州区",341021:"歙县",341022:"休宁县",341023:"黟县",341024:"祁门县",341025:"其它区",341100:"滁州市",341102:"琅琊区",341103:"南谯区",341122:"来安县",341124:"全椒县",341125:"定远县",341126:"凤阳县",341181:"天长市",341182:"明光市",341183:"其它区",341200:"阜阳市",341202:"颍州区",341203:"颍东区",341204:"颍泉区",341221:"临泉县",341222:"太和县",341225:"阜南县",341226:"颍上县",341282:"界首市",341283:"其它区",341300:"宿州市",341302:"埇桥区",341321:"砀山县",341322:"萧县",341323:"灵璧县",341324:"泗县",341325:"其它区",341400:"巢湖市",341421:"庐江县",341422:"无为县",341423:"含山县",341424:"和县",341500:"六安市",341502:"金安区",341503:"裕安区",341521:"寿县",341522:"霍邱县",341523:"舒城县",341524:"金寨县",341525:"霍山县",341526:"其它区",341600:"亳州市",341602:"谯城区",341621:"涡阳县",341622:"蒙城县",341623:"利辛县",341624:"其它区",341700:"池州市",341702:"贵池区",341721:"东至县",341722:"石台县",341723:"青阳县",341724:"其它区",341800:"宣城市",341802:"宣州区",341821:"郎溪县",341822:"广德县",341823:"泾县",341824:"绩溪县",341825:"旌德县",341881:"宁国市",341882:"其它区",35e4:"福建省",350100:"福州市",350102:"鼓楼区",350103:"台江区",350104:"仓山区",350105:"马尾区",350111:"晋安区",350121:"闽侯县",350122:"连江县",350123:"罗源县",350124:"闽清县",350125:"永泰县",350128:"平潭县",350181:"福清市",350182:"长乐市",350183:"其它区",350200:"厦门市",350203:"思明区",350205:"海沧区",350206:"湖里区",350211:"集美区",350212:"同安区",350213:"翔安区",350214:"其它区",350300:"莆田市",350302:"城厢区",350303:"涵江区",350304:"荔城区",350305:"秀屿区",350322:"仙游县",350323:"其它区",350400:"三明市",350402:"梅列区",350403:"三元区",350421:"明溪县",350423:"清流县",350424:"宁化县",350425:"大田县",350426:"尤溪县",350427:"沙县",350428:"将乐县",350429:"泰宁县",350430:"建宁县",350481:"永安市",350482:"其它区",350500:"泉州市",350502:"鲤城区",350503:"丰泽区",350504:"洛江区",350505:"泉港区",350521:"惠安县",350524:"安溪县",350525:"永春县",350526:"德化县",350527:"金门县",350581:"石狮市",350582:"晋江市",350583:"南安市",350584:"其它区",350600:"漳州市",350602:"芗城区",350603:"龙文区",350622:"云霄县",350623:"漳浦县",350624:"诏安县",350625:"长泰县",350626:"东山县",350627:"南靖县",350628:"平和县",350629:"华安县",350681:"龙海市",350682:"其它区",350700:"南平市",350702:"延平区",350721:"顺昌县",350722:"浦城县",350723:"光泽县",350724:"松溪县",350725:"政和县",350781:"邵武市",350782:"武夷山市",350783:"建瓯市",350784:"建阳市",350785:"其它区",350800:"龙岩市",350802:"新罗区",350821:"长汀县",350822:"永定县",350823:"上杭县",350824:"武平县",350825:"连城县",350881:"漳平市",350882:"其它区",350900:"宁德市",350902:"蕉城区",350921:"霞浦县",350922:"古田县",350923:"屏南县",350924:"寿宁县",350925:"周宁县",350926:"柘荣县",350981:"福安市",350982:"福鼎市",350983:"其它区",36e4:"江西省",360100:"南昌市",360102:"东湖区",360103:"西湖区",360104:"青云谱区",360105:"湾里区",360111:"青山湖区",360121:"南昌县",360122:"新建县",360123:"安义县",360124:"进贤县",360128:"其它区",360200:"景德镇市",360202:"昌江区",360203:"珠山区",360222:"浮梁县",360281:"乐平市",360282:"其它区",360300:"萍乡市",360302:"安源区",360313:"湘东区",360321:"莲花县",360322:"上栗县",360323:"芦溪县",360324:"其它区",360400:"九江市",360402:"庐山区",360403:"浔阳区",360421:"九江县",360423:"武宁县",360424:"修水县",360425:"永修县",360426:"德安县",360427:"星子县",360428:"都昌县",360429:"湖口县",360430:"彭泽县",360481:"瑞昌市",360482:"其它区",360483:"共青城市",360500:"新余市",360502:"渝水区",360521:"分宜县",360522:"其它区",360600:"鹰潭市",360602:"月湖区",360622:"余江县",360681:"贵溪市",360682:"其它区",360700:"赣州市",360702:"章贡区",360721:"赣县",360722:"信丰县",360723:"大余县",360724:"上犹县",360725:"崇义县",360726:"安远县",360727:"龙南县",360728:"定南县",360729:"全南县",360730:"宁都县",360731:"于都县",360732:"兴国县",360733:"会昌县",360734:"寻乌县",360735:"石城县",360781:"瑞金市",360782:"南康市",360783:"其它区",360800:"吉安市",360802:"吉州区",360803:"青原区",360821:"吉安县",360822:"吉水县",360823:"峡江县",360824:"新干县",360825:"永丰县",360826:"泰和县",360827:"遂川县",360828:"万安县",360829:"安福县",360830:"永新县",360881:"井冈山市",360882:"其它区",360900:"宜春市",360902:"袁州区",360921:"奉新县",360922:"万载县",360923:"上高县",360924:"宜丰县",360925:"靖安县",360926:"铜鼓县",360981:"丰城市",360982:"樟树市",360983:"高安市",360984:"其它区",361e3:"抚州市",361002:"临川区",361021:"南城县",361022:"黎川县",361023:"南丰县",361024:"崇仁县",361025:"乐安县",361026:"宜黄县",361027:"金溪县",361028:"资溪县",361029:"东乡县",361030:"广昌县",361031:"其它区",361100:"上饶市",361102:"信州区",361121:"上饶县",361122:"广丰县",361123:"玉山县",361124:"铅山县",361125:"横峰县",361126:"弋阳县",361127:"余干县",361128:"鄱阳县",361129:"万年县",361130:"婺源县",361181:"德兴市",361182:"其它区",37e4:"山东省",370100:"济南市",370102:"历下区",370103:"市中区",370104:"槐荫区",370105:"天桥区",370112:"历城区",370113:"长清区",370124:"平阴县",370125:"济阳县",370126:"商河县",370181:"章丘市",370182:"其它区",370200:"青岛市",370202:"市南区",370203:"市北区",370211:"黄岛区",370212:"崂山区",370213:"李沧区",370214:"城阳区",370281:"胶州市",370282:"即墨市",370283:"平度市",370285:"莱西市",370286:"其它区",370300:"淄博市",370302:"淄川区",370303:"张店区",370304:"博山区",370305:"临淄区",370306:"周村区",370321:"桓台县",370322:"高青县",370323:"沂源县",370324:"其它区",370400:"枣庄市",370402:"市中区",370403:"薛城区",370404:"峄城区",370405:"台儿庄区",370406:"山亭区",370481:"滕州市",370482:"其它区",370500:"东营市",370502:"东营区",370503:"河口区",370521:"垦利县",370522:"利津县",370523:"广饶县",370591:"其它区",370600:"烟台市",370602:"芝罘区",370611:"福山区",370612:"牟平区",370613:"莱山区",370634:"长岛县",370681:"龙口市",370682:"莱阳市",370683:"莱州市",370684:"蓬莱市",370685:"招远市",370686:"栖霞市",370687:"海阳市",370688:"其它区",370700:"潍坊市",370702:"潍城区",370703:"寒亭区",370704:"坊子区",370705:"奎文区",370724:"临朐县",370725:"昌乐县",370781:"青州市",370782:"诸城市",370783:"寿光市",370784:"安丘市",370785:"高密市",370786:"昌邑市",370787:"其它区",370800:"济宁市",370802:"市中区",370811:"任城区",370826:"微山县",370827:"鱼台县",370828:"金乡县",370829:"嘉祥县",370830:"汶上县",370831:"泗水县",370832:"梁山县",370881:"曲阜市",370882:"兖州市",370883:"邹城市",370884:"其它区",370900:"泰安市",370902:"泰山区",370903:"岱岳区",370921:"宁阳县",370923:"东平县",370982:"新泰市",370983:"肥城市",370984:"其它区",371e3:"威海市",371002:"环翠区",371081:"文登市",371082:"荣成市",371083:"乳山市",371084:"其它区",371100:"日照市",371102:"东港区",371103:"岚山区",371121:"五莲县",371122:"莒县",371123:"其它区",371200:"莱芜市",371202:"莱城区",371203:"钢城区",371204:"其它区",371300:"临沂市",371302:"兰山区",371311:"罗庄区",371312:"河东区",371321:"沂南县",371322:"郯城县",371323:"沂水县",371324:"苍山县",371325:"费县",371326:"平邑县",371327:"莒南县",371328:"蒙阴县",371329:"临沭县",371330:"其它区",371400:"德州市",371402:"德城区",371421:"陵县",371422:"宁津县",371423:"庆云县",371424:"临邑县",371425:"齐河县",371426:"平原县",371427:"夏津县",371428:"武城县",371481:"乐陵市",371482:"禹城市",371483:"其它区",371500:"聊城市",371502:"东昌府区",371521:"阳谷县",371522:"莘县",371523:"茌平县",371524:"东阿县",371525:"冠县",371526:"高唐县",371581:"临清市",371582:"其它区",371600:"滨州市",371602:"滨城区",371621:"惠民县",371622:"阳信县",371623:"无棣县",371624:"沾化县",371625:"博兴县",371626:"邹平县",371627:"其它区",371700:"菏泽市",371702:"牡丹区",371721:"曹县",371722:"单县",371723:"成武县",371724:"巨野县",371725:"郓城县",371726:"鄄城县",371727:"定陶县",371728:"东明县",371729:"其它区",41e4:"河南省",410100:"郑州市",410102:"中原区",410103:"二七区",410104:"管城回族区",410105:"金水区",410106:"上街区",410108:"惠济区",410122:"中牟县",410181:"巩义市",410182:"荥阳市",410183:"新密市",410184:"新郑市",410185:"登封市",410188:"其它区",410200:"开封市",410202:"龙亭区",410203:"顺河回族区",410204:"鼓楼区",410205:"禹王台区",410211:"金明区",410221:"杞县",410222:"通许县",410223:"尉氏县",410224:"开封县",410225:"兰考县",410226:"其它区",410300:"洛阳市",410302:"老城区",410303:"西工区",410304:"瀍河回族区",410305:"涧西区",410306:"吉利区",410307:"洛龙区",410322:"孟津县",410323:"新安县",410324:"栾川县",410325:"嵩县",410326:"汝阳县",410327:"宜阳县",410328:"洛宁县",410329:"伊川县",410381:"偃师市",410400:"平顶山市",410402:"新华区",410403:"卫东区",410404:"石龙区",410411:"湛河区",410421:"宝丰县",410422:"叶县",410423:"鲁山县",410425:"郏县",410481:"舞钢市",410482:"汝州市",410483:"其它区",410500:"安阳市",410502:"文峰区",410503:"北关区",410505:"殷都区",410506:"龙安区",410522:"安阳县",410523:"汤阴县",410526:"滑县",410527:"内黄县",410581:"林州市",410582:"其它区",410600:"鹤壁市",410602:"鹤山区",410603:"山城区",410611:"淇滨区",410621:"浚县",410622:"淇县",410623:"其它区",410700:"新乡市",410702:"红旗区",410703:"卫滨区",410704:"凤泉区",410711:"牧野区",410721:"新乡县",410724:"获嘉县",410725:"原阳县",410726:"延津县",410727:"封丘县",410728:"长垣县",410781:"卫辉市",410782:"辉县市",410783:"其它区",410800:"焦作市",410802:"解放区",410803:"中站区",410804:"马村区",410811:"山阳区",410821:"修武县",410822:"博爱县",410823:"武陟县",410825:"温县",410881:"济源市",410882:"沁阳市",410883:"孟州市",410884:"其它区",410900:"濮阳市",410902:"华龙区",410922:"清丰县",410923:"南乐县",410926:"范县",410927:"台前县",410928:"濮阳县",410929:"其它区",411e3:"许昌市",411002:"魏都区",411023:"许昌县",411024:"鄢陵县",411025:"襄城县",411081:"禹州市",411082:"长葛市",411083:"其它区",411100:"漯河市",411102:"源汇区",411103:"郾城区",411104:"召陵区",411121:"舞阳县",411122:"临颍县",411123:"其它区",411200:"三门峡市",411202:"湖滨区",411221:"渑池县",411222:"陕县",411224:"卢氏县",411281:"义马市",411282:"灵宝市",411283:"其它区",411300:"南阳市",411302:"宛城区",411303:"卧龙区",411321:"南召县",411322:"方城县",411323:"西峡县",411324:"镇平县",411325:"内乡县",411326:"淅川县",411327:"社旗县",411328:"唐河县",411329:"新野县",411330:"桐柏县",411381:"邓州市",411382:"其它区",411400:"商丘市",411402:"梁园区",411403:"睢阳区",411421:"民权县",411422:"睢县",411423:"宁陵县",411424:"柘城县",411425:"虞城县",411426:"夏邑县",411481:"永城市",411482:"其它区",411500:"信阳市",411502:"浉河区",411503:"平桥区",411521:"罗山县",411522:"光山县",411523:"新县",411524:"商城县",411525:"固始县",411526:"潢川县",411527:"淮滨县",411528:"息县",411529:"其它区",411600:"周口市",411602:"川汇区",411621:"扶沟县",411622:"西华县",411623:"商水县",411624:"沈丘县",411625:"郸城县",411626:"淮阳县",411627:"太康县",411628:"鹿邑县",411681:"项城市",411682:"其它区",411700:"驻马店市",411702:"驿城区",411721:"西平县",411722:"上蔡县",411723:"平舆县",411724:"正阳县",411725:"确山县",411726:"泌阳县",411727:"汝南县",411728:"遂平县",411729:"新蔡县",411730:"其它区",42e4:"湖北省",420100:"武汉市",420102:"江岸区",420103:"江汉区",420104:"硚口区",420105:"汉阳区",420106:"武昌区",420107:"青山区",420111:"洪山区",420112:"东西湖区",420113:"汉南区",420114:"蔡甸区",420115:"江夏区",420116:"黄陂区",420117:"新洲区",420118:"其它区",420200:"黄石市",420202:"黄石港区",420203:"西塞山区",420204:"下陆区",420205:"铁山区",420222:"阳新县",420281:"大冶市",420282:"其它区",420300:"十堰市",420302:"茅箭区",420303:"张湾区",420321:"郧县",420322:"郧西县",420323:"竹山县",420324:"竹溪县",420325:"房县",420381:"丹江口市",420383:"其它区",420500:"宜昌市",420502:"西陵区",420503:"伍家岗区",420504:"点军区",420505:"猇亭区",420506:"夷陵区",420525:"远安县",420526:"兴山县",420527:"秭归县",420528:"长阳土家族自治县",420529:"五峰土家族自治县",420581:"宜都市",420582:"当阳市",420583:"枝江市",420584:"其它区",420600:"襄阳市",420602:"襄城区",420606:"樊城区",420607:"襄州区",420624:"南漳县",420625:"谷城县",420626:"保康县",420682:"老河口市",420683:"枣阳市",420684:"宜城市",420685:"其它区",420700:"鄂州市",420702:"梁子湖区",420703:"华容区",420704:"鄂城区",420705:"其它区",420800:"荆门市",420802:"东宝区",420804:"掇刀区",420821:"京山县",420822:"沙洋县",420881:"钟祥市",420882:"其它区",420900:"孝感市",420902:"孝南区",420921:"孝昌县",420922:"大悟县",420923:"云梦县",420981:"应城市",420982:"安陆市",420984:"汉川市",420985:"其它区",421e3:"荆州市",421002:"沙市区",421003:"荆州区",421022:"公安县",421023:"监利县",421024:"江陵县",421081:"石首市",421083:"洪湖市",421087:"松滋市",421088:"其它区",421100:"黄冈市",421102:"黄州区",421121:"团风县",421122:"红安县",421123:"罗田县",421124:"英山县",421125:"浠水县",421126:"蕲春县",421127:"黄梅县",421181:"麻城市",421182:"武穴市",421183:"其它区",421200:"咸宁市",421202:"咸安区",421221:"嘉鱼县",421222:"通城县",421223:"崇阳县",421224:"通山县",421281:"赤壁市",421283:"其它区",421300:"随州市",421302:"曾都区",421321:"随县",421381:"广水市",421382:"其它区",422800:"恩施土家族苗族自治州",422801:"恩施市",422802:"利川市",422822:"建始县",422823:"巴东县",422825:"宣恩县",422826:"咸丰县",422827:"来凤县",422828:"鹤峰县",422829:"其它区",429004:"仙桃市",429005:"潜江市",429006:"天门市",429021:"神农架林区",43e4:"湖南省",430100:"长沙市",430102:"芙蓉区",430103:"天心区",430104:"岳麓区",430105:"开福区",430111:"雨花区",430121:"长沙县",430122:"望城区",430124:"宁乡县",430181:"浏阳市",430182:"其它区",430200:"株洲市",430202:"荷塘区",430203:"芦淞区",430204:"石峰区",430211:"天元区",430221:"株洲县",430223:"攸县",430224:"茶陵县",430225:"炎陵县",430281:"醴陵市",430282:"其它区",430300:"湘潭市",430302:"雨湖区",430304:"岳塘区",430321:"湘潭县",430381:"湘乡市",430382:"韶山市",430383:"其它区",430400:"衡阳市",430405:"珠晖区",430406:"雁峰区",430407:"石鼓区",430408:"蒸湘区",430412:"南岳区",430421:"衡阳县",430422:"衡南县",430423:"衡山县",430424:"衡东县",430426:"祁东县",430481:"耒阳市",430482:"常宁市",430483:"其它区",430500:"邵阳市",430502:"双清区",430503:"大祥区",430511:"北塔区",430521:"邵东县",430522:"新邵县",430523:"邵阳县",430524:"隆回县",430525:"洞口县",430527:"绥宁县",430528:"新宁县",430529:"城步苗族自治县",430581:"武冈市",430582:"其它区",430600:"岳阳市",430602:"岳阳楼区",430603:"云溪区",430611:"君山区",430621:"岳阳县",430623:"华容县",430624:"湘阴县",430626:"平江县",430681:"汨罗市",430682:"临湘市",430683:"其它区",430700:"常德市",430702:"武陵区",430703:"鼎城区",430721:"安乡县",430722:"汉寿县",430723:"澧县",430724:"临澧县",430725:"桃源县",430726:"石门县",430781:"津市市",430782:"其它区",430800:"张家界市",430802:"永定区",430811:"武陵源区",430821:"慈利县",430822:"桑植县",430823:"其它区",430900:"益阳市",430902:"资阳区",430903:"赫山区",430921:"南县",430922:"桃江县",430923:"安化县",430981:"沅江市",430982:"其它区",431e3:"郴州市",431002:"北湖区",431003:"苏仙区",431021:"桂阳县",431022:"宜章县",431023:"永兴县",431024:"嘉禾县",431025:"临武县",431026:"汝城县",431027:"桂东县",431028:"安仁县",431081:"资兴市",431082:"其它区",431100:"永州市",431102:"零陵区",431103:"冷水滩区",431121:"祁阳县",431122:"东安县",431123:"双牌县",431124:"道县",431125:"江永县",431126:"宁远县",431127:"蓝山县",431128:"新田县",431129:"江华瑶族自治县",431130:"其它区",431200:"怀化市",431202:"鹤城区",431221:"中方县",431222:"沅陵县",431223:"辰溪县",431224:"溆浦县",431225:"会同县",431226:"麻阳苗族自治县",431227:"新晃侗族自治县",431228:"芷江侗族自治县",431229:"靖州苗族侗族自治县",431230:"通道侗族自治县",431281:"洪江市",431282:"其它区",431300:"娄底市",431302:"娄星区",431321:"双峰县",431322:"新化县",431381:"冷水江市",431382:"涟源市",431383:"其它区",433100:"湘西土家族苗族自治州",433101:"吉首市",433122:"泸溪县",433123:"凤凰县",433124:"花垣县",433125:"保靖县",433126:"古丈县",433127:"永顺县",433130:"龙山县",433131:"其它区",44e4:"广东省",440100:"广州市",440103:"荔湾区",440104:"越秀区",440105:"海珠区",440106:"天河区",440111:"白云区",440112:"黄埔区",440113:"番禺区",440114:"花都区",440115:"南沙区",440116:"萝岗区",440183:"增城市",440184:"从化市",440189:"其它区",440200:"韶关市",440203:"武江区",440204:"浈江区",440205:"曲江区",440222:"始兴县",440224:"仁化县",440229:"翁源县",440232:"乳源瑶族自治县",440233:"新丰县",440281:"乐昌市",440282:"南雄市",440283:"其它区",440300:"深圳市",440303:"罗湖区",440304:"福田区",440305:"南山区",440306:"宝安区",440307:"龙岗区",440308:"盐田区",440309:"其它区",440320:"光明新区",440321:"坪山新区",440322:"大鹏新区",440323:"龙华新区",440400:"珠海市",440402:"香洲区",440403:"斗门区",440404:"金湾区",440488:"其它区",440500:"汕头市",440507:"龙湖区",440511:"金平区",440512:"濠江区",440513:"潮阳区",440514:"潮南区",440515:"澄海区",440523:"南澳县",440524:"其它区",440600:"佛山市",440604:"禅城区",440605:"南海区",440606:"顺德区",440607:"三水区",440608:"高明区",440609:"其它区",440700:"江门市",440703:"蓬江区",440704:"江海区",440705:"新会区",440781:"台山市",440783:"开平市",440784:"鹤山市",440785:"恩平市",440786:"其它区",440800:"湛江市",440802:"赤坎区",440803:"霞山区",440804:"坡头区",440811:"麻章区",440823:"遂溪县",440825:"徐闻县",440881:"廉江市",440882:"雷州市",440883:"吴川市",440884:"其它区",440900:"茂名市",440902:"茂南区",440903:"茂港区",440923:"电白县",440981:"高州市",440982:"化州市",440983:"信宜市",440984:"其它区",441200:"肇庆市",441202:"端州区",441203:"鼎湖区",441223:"广宁县",441224:"怀集县",441225:"封开县",441226:"德庆县",441283:"高要市",441284:"四会市",441285:"其它区",441300:"惠州市",441302:"惠城区",441303:"惠阳区",441322:"博罗县",441323:"惠东县",441324:"龙门县",441325:"其它区",441400:"梅州市",441402:"梅江区",441421:"梅县",441422:"大埔县",441423:"丰顺县",441424:"五华县",441426:"平远县",441427:"蕉岭县",441481:"兴宁市",441482:"其它区",441500:"汕尾市",441502:"城区",441521:"海丰县",441523:"陆河县",441581:"陆丰市",441582:"其它区",441600:"河源市",441602:"源城区",441621:"紫金县",441622:"龙川县",441623:"连平县",441624:"和平县",441625:"东源县",441626:"其它区",441700:"阳江市",441702:"江城区",441721:"阳西县",441723:"阳东县",441781:"阳春市",441782:"其它区",441800:"清远市",441802:"清城区",441821:"佛冈县",441823:"阳山县",441825:"连山壮族瑶族自治县",441826:"连南瑶族自治县",441827:"清新区",441881:"英德市",441882:"连州市",441883:"其它区",441900:"东莞市",442e3:"中山市",442101:"东沙群岛",445100:"潮州市",445102:"湘桥区",445121:"潮安区",445122:"饶平县",445186:"其它区",445200:"揭阳市",445202:"榕城区",445221:"揭东区",445222:"揭西县",445224:"惠来县",445281:"普宁市",445285:"其它区",445300:"云浮市",445302:"云城区",445321:"新兴县",445322:"郁南县",445323:"云安县",445381:"罗定市",445382:"其它区",45e4:"广西壮族自治区",450100:"南宁市",450102:"兴宁区",450103:"青秀区",450105:"江南区",450107:"西乡塘区",450108:"良庆区",450109:"邕宁区",450122:"武鸣县",450123:"隆安县",450124:"马山县",450125:"上林县",450126:"宾阳县",450127:"横县",450128:"其它区",450200:"柳州市",450202:"城中区",450203:"鱼峰区",450204:"柳南区",450205:"柳北区",450221:"柳江县",450222:"柳城县",450223:"鹿寨县",450224:"融安县",450225:"融水苗族自治县",450226:"三江侗族自治县",450227:"其它区",450300:"桂林市",450302:"秀峰区",450303:"叠彩区",450304:"象山区",450305:"七星区",450311:"雁山区",450321:"阳朔县",450322:"临桂区",450323:"灵川县",450324:"全州县",450325:"兴安县",450326:"永福县",450327:"灌阳县",450328:"龙胜各族自治县",450329:"资源县",450330:"平乐县",450331:"荔浦县",450332:"恭城瑶族自治县",450333:"其它区",450400:"梧州市",450403:"万秀区",450405:"长洲区",450406:"龙圩区",450421:"苍梧县",450422:"藤县",450423:"蒙山县",450481:"岑溪市",450482:"其它区",450500:"北海市",450502:"海城区",450503:"银海区",450512:"铁山港区",450521:"合浦县",450522:"其它区",450600:"防城港市",450602:"港口区",450603:"防城区",450621:"上思县",450681:"东兴市",450682:"其它区",450700:"钦州市",450702:"钦南区",450703:"钦北区",450721:"灵山县",450722:"浦北县",450723:"其它区",450800:"贵港市",450802:"港北区",450803:"港南区",450804:"覃塘区",450821:"平南县",450881:"桂平市",450882:"其它区",450900:"玉林市",450902:"玉州区",450903:"福绵区",450921:"容县",450922:"陆川县",450923:"博白县",450924:"兴业县",450981:"北流市",450982:"其它区",451e3:"百色市",451002:"右江区",451021:"田阳县",451022:"田东县",451023:"平果县",451024:"德保县",451025:"靖西县",451026:"那坡县",451027:"凌云县",451028:"乐业县",451029:"田林县",451030:"西林县",451031:"隆林各族自治县",451032:"其它区",451100:"贺州市",451102:"八步区",451119:"平桂管理区",451121:"昭平县",451122:"钟山县",451123:"富川瑶族自治县",451124:"其它区",451200:"河池市",451202:"金城江区",451221:"南丹县",451222:"天峨县",451223:"凤山县",451224:"东兰县",451225:"罗城仫佬族自治县",451226:"环江毛南族自治县",451227:"巴马瑶族自治县",451228:"都安瑶族自治县",451229:"大化瑶族自治县",451281:"宜州市",451282:"其它区",451300:"来宾市",451302:"兴宾区",451321:"忻城县",451322:"象州县",451323:"武宣县",451324:"金秀瑶族自治县",451381:"合山市",451382:"其它区",451400:"崇左市",451402:"江州区",451421:"扶绥县",451422:"宁明县",451423:"龙州县",451424:"大新县",451425:"天等县",451481:"凭祥市",451482:"其它区",46e4:"海南省",460100:"海口市",460105:"秀英区",460106:"龙华区",460107:"琼山区",460108:"美兰区",460109:"其它区",460200:"三亚市",460300:"三沙市",460321:"西沙群岛",460322:"南沙群岛",460323:"中沙群岛的岛礁及其海域",469001:"五指山市",469002:"琼海市",469003:"儋州市",469005:"文昌市",469006:"万宁市",469007:"东方市",469025:"定安县",469026:"屯昌县",469027:"澄迈县",469028:"临高县",469030:"白沙黎族自治县",469031:"昌江黎族自治县",469033:"乐东黎族自治县",469034:"陵水黎族自治县",469035:"保亭黎族苗族自治县",469036:"琼中黎族苗族自治县",471005:"其它区",5e5:"重庆",500100:"重庆市",500101:"万州区",500102:"涪陵区",500103:"渝中区",500104:"大渡口区",500105:"江北区",500106:"沙坪坝区",500107:"九龙坡区",500108:"南岸区",500109:"北碚区",500110:"万盛区",500111:"双桥区",500112:"渝北区",500113:"巴南区",500114:"黔江区",500115:"长寿区",500222:"綦江区",500223:"潼南县",500224:"铜梁县",500225:"大足区",500226:"荣昌县",500227:"璧山县",500228:"梁平县",500229:"城口县",500230:"丰都县",500231:"垫江县",500232:"武隆县",500233:"忠县",500234:"开县",500235:"云阳县",500236:"奉节县",500237:"巫山县",500238:"巫溪县",500240:"石柱土家族自治县",500241:"秀山土家族苗族自治县",500242:"酉阳土家族苗族自治县",500243:"彭水苗族土家族自治县",500381:"江津区",500382:"合川区",500383:"永川区",500384:"南川区",500385:"其它区",51e4:"四川省",510100:"成都市",510104:"锦江区",510105:"青羊区",510106:"金牛区",510107:"武侯区",510108:"成华区",510112:"龙泉驿区",510113:"青白江区",510114:"新都区",510115:"温江区",510121:"金堂县",510122:"双流县",510124:"郫县",510129:"大邑县",510131:"蒲江县",510132:"新津县",510181:"都江堰市",510182:"彭州市",510183:"邛崃市",510184:"崇州市",510185:"其它区",510300:"自贡市",510302:"自流井区",510303:"贡井区",510304:"大安区",510311:"沿滩区",510321:"荣县",510322:"富顺县",510323:"其它区",510400:"攀枝花市",510402:"东区",510403:"西区",510411:"仁和区",510421:"米易县",510422:"盐边县",510423:"其它区",510500:"泸州市",510502:"江阳区",510503:"纳溪区",510504:"龙马潭区",510521:"泸县",510522:"合江县",510524:"叙永县",510525:"古蔺县",510526:"其它区",510600:"德阳市",510603:"旌阳区",510623:"中江县",510626:"罗江县",510681:"广汉市",510682:"什邡市",510683:"绵竹市",510684:"其它区",510700:"绵阳市",510703:"涪城区",510704:"游仙区",510722:"三台县",510723:"盐亭县",510724:"安县",510725:"梓潼县",510726:"北川羌族自治县",510727:"平武县",510781:"江油市",510782:"其它区",510800:"广元市",510802:"利州区",510811:"昭化区",510812:"朝天区",510821:"旺苍县",510822:"青川县",510823:"剑阁县",510824:"苍溪县",510825:"其它区",510900:"遂宁市",510903:"船山区",510904:"安居区",510921:"蓬溪县",510922:"射洪县",510923:"大英县",510924:"其它区",511e3:"内江市",511002:"市中区",511011:"东兴区",511024:"威远县",511025:"资中县",511028:"隆昌县",511029:"其它区",511100:"乐山市",511102:"市中区",511111:"沙湾区",511112:"五通桥区",511113:"金口河区",511123:"犍为县",511124:"井研县",511126:"夹江县",511129:"沐川县",511132:"峨边彝族自治县",511133:"马边彝族自治县",511181:"峨眉山市",511182:"其它区",511300:"南充市",511302:"顺庆区",511303:"高坪区",511304:"嘉陵区",511321:"南部县",511322:"营山县",511323:"蓬安县",511324:"仪陇县",511325:"西充县",511381:"阆中市",511382:"其它区",511400:"眉山市",511402:"东坡区",511421:"仁寿县",511422:"彭山县",511423:"洪雅县",511424:"丹棱县",511425:"青神县",511426:"其它区",511500:"宜宾市",511502:"翠屏区",511521:"宜宾县",511522:"南溪区",511523:"江安县",511524:"长宁县",511525:"高县",511526:"珙县",511527:"筠连县",511528:"兴文县",511529:"屏山县",511530:"其它区",511600:"广安市",511602:"广安区",511603:"前锋区",511621:"岳池县",511622:"武胜县",511623:"邻水县",511681:"华蓥市",511683:"其它区",511700:"达州市",511702:"通川区",511721:"达川区",511722:"宣汉县",511723:"开江县",511724:"大竹县",511725:"渠县",511781:"万源市",511782:"其它区",511800:"雅安市",511802:"雨城区",511821:"名山区",511822:"荥经县",511823:"汉源县",511824:"石棉县",511825:"天全县",511826:"芦山县",511827:"宝兴县",511828:"其它区",511900:"巴中市",511902:"巴州区",511903:"恩阳区",511921:"通江县",511922:"南江县",511923:"平昌县",511924:"其它区",512e3:"资阳市",512002:"雁江区",512021:"安岳县",512022:"乐至县",512081:"简阳市",512082:"其它区",513200:"阿坝藏族羌族自治州",513221:"汶川县",513222:"理县",513223:"茂县",513224:"松潘县",513225:"九寨沟县",513226:"金川县",513227:"小金县",513228:"黑水县",513229:"马尔康县",513230:"壤塘县",513231:"阿坝县",513232:"若尔盖县",513233:"红原县",513234:"其它区",513300:"甘孜藏族自治州",513321:"康定县",513322:"泸定县",513323:"丹巴县",513324:"九龙县",513325:"雅江县",513326:"道孚县",513327:"炉霍县",513328:"甘孜县",513329:"新龙县",513330:"德格县",513331:"白玉县",513332:"石渠县",513333:"色达县",513334:"理塘县",513335:"巴塘县",513336:"乡城县",513337:"稻城县",513338:"得荣县",513339:"其它区",513400:"凉山彝族自治州",513401:"西昌市",513422:"木里藏族自治县",513423:"盐源县",513424:"德昌县",513425:"会理县",513426:"会东县",513427:"宁南县",513428:"普格县",513429:"布拖县",513430:"金阳县",513431:"昭觉县",513432:"喜德县",513433:"冕宁县",513434:"越西县",513435:"甘洛县",513436:"美姑县",513437:"雷波县",513438:"其它区",52e4:"贵州省",520100:"贵阳市",520102:"南明区",520103:"云岩区",520111:"花溪区",520112:"乌当区",520113:"白云区",520121:"开阳县",520122:"息烽县",520123:"修文县",520151:"观山湖区",520181:"清镇市",520182:"其它区",520200:"六盘水市",520201:"钟山区",520203:"六枝特区",520221:"水城县",520222:"盘县",520223:"其它区",520300:"遵义市",520302:"红花岗区",520303:"汇川区",520321:"遵义县",520322:"桐梓县",520323:"绥阳县",520324:"正安县",520325:"道真仡佬族苗族自治县",520326:"务川仡佬族苗族自治县",520327:"凤冈县",520328:"湄潭县",520329:"余庆县",520330:"习水县",520381:"赤水市",520382:"仁怀市",520383:"其它区",520400:"安顺市",520402:"西秀区",520421:"平坝县",520422:"普定县",520423:"镇宁布依族苗族自治县",520424:"关岭布依族苗族自治县",520425:"紫云苗族布依族自治县",520426:"其它区",522200:"铜仁市",522201:"碧江区",522222:"江口县",522223:"玉屏侗族自治县",522224:"石阡县",522225:"思南县",522226:"印江土家族苗族自治县",522227:"德江县",522228:"沿河土家族自治县",522229:"松桃苗族自治县",522230:"万山区",522231:"其它区",522300:"黔西南布依族苗族自治州",522301:"兴义市",522322:"兴仁县",522323:"普安县",522324:"晴隆县",522325:"贞丰县",522326:"望谟县",522327:"册亨县",522328:"安龙县",522329:"其它区",522400:"毕节市",522401:"七星关区",522422:"大方县",522423:"黔西县",522424:"金沙县",522425:"织金县",522426:"纳雍县",522427:"威宁彝族回族苗族自治县",522428:"赫章县",522429:"其它区",522600:"黔东南苗族侗族自治州",522601:"凯里市",522622:"黄平县",522623:"施秉县",522624:"三穗县",522625:"镇远县",522626:"岑巩县",522627:"天柱县",522628:"锦屏县",522629:"剑河县",522630:"台江县",522631:"黎平县",522632:"榕江县",522633:"从江县",522634:"雷山县",522635:"麻江县",522636:"丹寨县",522637:"其它区",522700:"黔南布依族苗族自治州",522701:"都匀市",522702:"福泉市",522722:"荔波县",522723:"贵定县",522725:"瓮安县",522726:"独山县",522727:"平塘县",522728:"罗甸县",522729:"长顺县",522730:"龙里县",522731:"惠水县",522732:"三都水族自治县",522733:"其它区",53e4:"云南省",530100:"昆明市",530102:"五华区",530103:"盘龙区",530111:"官渡区",530112:"西山区",530113:"东川区",530121:"呈贡区",530122:"晋宁县",530124:"富民县",530125:"宜良县",530126:"石林彝族自治县",530127:"嵩明县",530128:"禄劝彝族苗族自治县",530129:"寻甸回族彝族自治县",530181:"安宁市",530182:"其它区",530300:"曲靖市",530302:"麒麟区",530321:"马龙县",530322:"陆良县",530323:"师宗县",530324:"罗平县",530325:"富源县",530326:"会泽县",530328:"沾益县",530381:"宣威市",530382:"其它区",530400:"玉溪市",530402:"红塔区",530421:"江川县",530422:"澄江县",530423:"通海县",530424:"华宁县",530425:"易门县",530426:"峨山彝族自治县",530427:"新平彝族傣族自治县",530428:"元江哈尼族彝族傣族自治县",530429:"其它区",530500:"保山市",530502:"隆阳区",530521:"施甸县",530522:"腾冲县",530523:"龙陵县",530524:"昌宁县",530525:"其它区",530600:"昭通市",530602:"昭阳区",530621:"鲁甸县",530622:"巧家县",530623:"盐津县",530624:"大关县",530625:"永善县",530626:"绥江县",530627:"镇雄县",530628:"彝良县",530629:"威信县",530630:"水富县",530631:"其它区",530700:"丽江市",530702:"古城区",530721:"玉龙纳西族自治县",530722:"永胜县",530723:"华坪县",530724:"宁蒗彝族自治县",530725:"其它区",530800:"普洱市",530802:"思茅区",530821:"宁洱哈尼族彝族自治县",530822:"墨江哈尼族自治县",530823:"景东彝族自治县",530824:"景谷傣族彝族自治县",530825:"镇沅彝族哈尼族拉祜族自治县",530826:"江城哈尼族彝族自治县",530827:"孟连傣族拉祜族佤族自治县",530828:"澜沧拉祜族自治县",530829:"西盟佤族自治县",530830:"其它区",530900:"临沧市",530902:"临翔区",530921:"凤庆县",530922:"云县",530923:"永德县",530924:"镇康县",530925:"双江拉祜族佤族布朗族傣族自治县",530926:"耿马傣族佤族自治县",530927:"沧源佤族自治县",530928:"其它区",532300:"楚雄彝族自治州",532301:"楚雄市",532322:"双柏县",532323:"牟定县",532324:"南华县",532325:"姚安县",532326:"大姚县",532327:"永仁县",532328:"元谋县",532329:"武定县",532331:"禄丰县",532332:"其它区",532500:"红河哈尼族彝族自治州",532501:"个旧市",532502:"开远市",532522:"蒙自市",532523:"屏边苗族自治县",532524:"建水县",532525:"石屏县",532526:"弥勒市",532527:"泸西县",532528:"元阳县",532529:"红河县",532530:"金平苗族瑶族傣族自治县",532531:"绿春县",532532:"河口瑶族自治县",532533:"其它区",532600:"文山壮族苗族自治州",532621:"文山市",532622:"砚山县",532623:"西畴县",532624:"麻栗坡县",532625:"马关县",532626:"丘北县",532627:"广南县",532628:"富宁县",532629:"其它区",532800:"西双版纳傣族自治州",532801:"景洪市",532822:"勐海县",532823:"勐腊县",532824:"其它区",532900:"大理白族自治州",532901:"大理市",532922:"漾濞彝族自治县",532923:"祥云县",532924:"宾川县",532925:"弥渡县",532926:"南涧彝族自治县",532927:"巍山彝族回族自治县",532928:"永平县",532929:"云龙县",532930:"洱源县",532931:"剑川县",532932:"鹤庆县",532933:"其它区",533100:"德宏傣族景颇族自治州",533102:"瑞丽市",533103:"芒市",533122:"梁河县",533123:"盈江县",533124:"陇川县",533125:"其它区",533300:"怒江傈僳族自治州",533321:"泸水县",533323:"福贡县",533324:"贡山独龙族怒族自治县",533325:"兰坪白族普米族自治县",533326:"其它区",533400:"迪庆藏族自治州",533421:"香格里拉县",533422:"德钦县",533423:"维西傈僳族自治县",533424:"其它区",54e4:"西藏自治区",540100:"拉萨市",540102:"城关区",540121:"林周县",540122:"当雄县",540123:"尼木县",540124:"曲水县",540125:"堆龙德庆县",540126:"达孜县",540127:"墨竹工卡县",540128:"其它区",542100:"昌都地区",542121:"昌都县",542122:"江达县",542123:"贡觉县",542124:"类乌齐县",542125:"丁青县",542126:"察雅县",542127:"八宿县",542128:"左贡县",542129:"芒康县",542132:"洛隆县",542133:"边坝县",542134:"其它区",542200:"山南地区",542221:"乃东县",542222:"扎囊县",542223:"贡嘎县",542224:"桑日县",542225:"琼结县",542226:"曲松县",542227:"措美县",542228:"洛扎县",542229:"加查县",542231:"隆子县",542232:"错那县",542233:"浪卡子县",542234:"其它区",542300:"日喀则地区",542301:"日喀则市",542322:"南木林县",542323:"江孜县",542324:"定日县",542325:"萨迦县",542326:"拉孜县",542327:"昂仁县",542328:"谢通门县",542329:"白朗县",542330:"仁布县",542331:"康马县",542332:"定结县",542333:"仲巴县",542334:"亚东县",542335:"吉隆县",542336:"聂拉木县",542337:"萨嘎县",542338:"岗巴县",542339:"其它区",542400:"那曲地区",542421:"那曲县",542422:"嘉黎县",542423:"比如县",542424:"聂荣县",542425:"安多县",542426:"申扎县",542427:"索县",542428:"班戈县",542429:"巴青县",542430:"尼玛县",542431:"其它区",542432:"双湖县",542500:"阿里地区",542521:"普兰县",542522:"札达县",542523:"噶尔县",542524:"日土县",542525:"革吉县",542526:"改则县",542527:"措勤县",542528:"其它区",542600:"林芝地区",542621:"林芝县",542622:"工布江达县",542623:"米林县",542624:"墨脱县",542625:"波密县",542626:"察隅县",542627:"朗县",542628:"其它区",61e4:"陕西省",610100:"西安市",610102:"新城区",610103:"碑林区",610104:"莲湖区",610111:"灞桥区",610112:"未央区",610113:"雁塔区",610114:"阎良区",610115:"临潼区",610116:"长安区",610122:"蓝田县",610124:"周至县",610125:"户县",610126:"高陵县",610127:"其它区",610200:"铜川市",610202:"王益区",610203:"印台区",610204:"耀州区",610222:"宜君县",610223:"其它区",610300:"宝鸡市",610302:"渭滨区",610303:"金台区",610304:"陈仓区",610322:"凤翔县",610323:"岐山县",610324:"扶风县",610326:"眉县",610327:"陇县",610328:"千阳县",610329:"麟游县",610330:"凤县",610331:"太白县",610332:"其它区",610400:"咸阳市",610402:"秦都区",610403:"杨陵区",610404:"渭城区",610422:"三原县",610423:"泾阳县",610424:"乾县",610425:"礼泉县",610426:"永寿县",610427:"彬县",610428:"长武县",610429:"旬邑县",610430:"淳化县",610431:"武功县",610481:"兴平市",610482:"其它区",610500:"渭南市",610502:"临渭区",610521:"华县",610522:"潼关县",610523:"大荔县",610524:"合阳县",610525:"澄城县",610526:"蒲城县",610527:"白水县",610528:"富平县",610581:"韩城市",610582:"华阴市",610583:"其它区",610600:"延安市",610602:"宝塔区",610621:"延长县",610622:"延川县",610623:"子长县",610624:"安塞县",610625:"志丹县",610626:"吴起县",610627:"甘泉县",610628:"富县",610629:"洛川县",610630:"宜川县",610631:"黄龙县",610632:"黄陵县",610633:"其它区",610700:"汉中市",610702:"汉台区",610721:"南郑县",610722:"城固县",610723:"洋县",610724:"西乡县",610725:"勉县",610726:"宁强县",610727:"略阳县",610728:"镇巴县",610729:"留坝县",610730:"佛坪县",610731:"其它区",610800:"榆林市",610802:"榆阳区",610821:"神木县",610822:"府谷县",610823:"横山县",610824:"靖边县",610825:"定边县",610826:"绥德县",610827:"米脂县",610828:"佳县",610829:"吴堡县",610830:"清涧县",610831:"子洲县",610832:"其它区",610900:"安康市",610902:"汉滨区",610921:"汉阴县",610922:"石泉县",610923:"宁陕县",610924:"紫阳县",610925:"岚皋县",610926:"平利县",610927:"镇坪县",610928:"旬阳县",610929:"白河县",610930:"其它区",611e3:"商洛市",611002:"商州区",611021:"洛南县",611022:"丹凤县",611023:"商南县",611024:"山阳县",611025:"镇安县",611026:"柞水县",611027:"其它区",62e4:"甘肃省",620100:"兰州市",620102:"城关区",620103:"七里河区",620104:"西固区",620105:"安宁区",620111:"红古区",620121:"永登县",620122:"皋兰县",620123:"榆中县",620124:"其它区",620200:"嘉峪关市",620300:"金昌市",620302:"金川区",620321:"永昌县",620322:"其它区",620400:"白银市",620402:"白银区",620403:"平川区",620421:"靖远县",620422:"会宁县",620423:"景泰县",620424:"其它区",620500:"天水市",620502:"秦州区",620503:"麦积区",620521:"清水县",620522:"秦安县",620523:"甘谷县",620524:"武山县",620525:"张家川回族自治县",620526:"其它区",620600:"武威市",620602:"凉州区",620621:"民勤县",620622:"古浪县",620623:"天祝藏族自治县",620624:"其它区",620700:"张掖市",620702:"甘州区",620721:"肃南裕固族自治县",620722:"民乐县",620723:"临泽县",620724:"高台县",620725:"山丹县",620726:"其它区",620800:"平凉市",620802:"崆峒区",620821:"泾川县",620822:"灵台县",620823:"崇信县",620824:"华亭县",620825:"庄浪县",620826:"静宁县",620827:"其它区",620900:"酒泉市",620902:"肃州区",620921:"金塔县",620922:"瓜州县",620923:"肃北蒙古族自治县",620924:"阿克塞哈萨克族自治县",620981:"玉门市",620982:"敦煌市",620983:"其它区",621e3:"庆阳市",621002:"西峰区",621021:"庆城县",621022:"环县",621023:"华池县",621024:"合水县",621025:"正宁县",621026:"宁县",621027:"镇原县",621028:"其它区",621100:"定西市",621102:"安定区",621121:"通渭县",621122:"陇西县",621123:"渭源县",621124:"临洮县",621125:"漳县",621126:"岷县",621127:"其它区",621200:"陇南市",621202:"武都区",621221:"成县",621222:"文县",621223:"宕昌县",621224:"康县",621225:"西和县",621226:"礼县",621227:"徽县",621228:"两当县",621229:"其它区",622900:"临夏回族自治州",622901:"临夏市",622921:"临夏县",622922:"康乐县",622923:"永靖县",622924:"广河县",622925:"和政县",622926:"东乡族自治县",622927:"积石山保安族东乡族撒拉族自治县",622928:"其它区",623e3:"甘南藏族自治州",623001:"合作市",623021:"临潭县",623022:"卓尼县",623023:"舟曲县",623024:"迭部县",623025:"玛曲县",623026:"碌曲县",623027:"夏河县",623028:"其它区",63e4:"青海省",630100:"西宁市",630102:"城东区",630103:"城中区",630104:"城西区",630105:"城北区",630121:"大通回族土族自治县",630122:"湟中县",630123:"湟源县",630124:"其它区",632100:"海东市",632121:"平安县",632122:"民和回族土族自治县",632123:"乐都区",632126:"互助土族自治县",632127:"化隆回族自治县",632128:"循化撒拉族自治县",632129:"其它区",632200:"海北藏族自治州",632221:"门源回族自治县",632222:"祁连县",632223:"海晏县",632224:"刚察县",632225:"其它区",632300:"黄南藏族自治州",632321:"同仁县",632322:"尖扎县",632323:"泽库县",632324:"河南蒙古族自治县",632325:"其它区",632500:"海南藏族自治州",632521:"共和县",632522:"同德县",632523:"贵德县",632524:"兴海县",632525:"贵南县",632526:"其它区",632600:"果洛藏族自治州",632621:"玛沁县",632622:"班玛县",632623:"甘德县",632624:"达日县",632625:"久治县",632626:"玛多县",632627:"其它区",632700:"玉树藏族自治州",632721:"玉树市",632722:"杂多县",632723:"称多县",632724:"治多县",632725:"囊谦县",632726:"曲麻莱县",632727:"其它区",632800:"海西蒙古族藏族自治州",632801:"格尔木市",632802:"德令哈市",632821:"乌兰县",632822:"都兰县",632823:"天峻县",632824:"其它区",64e4:"宁夏回族自治区",640100:"银川市",640104:"兴庆区",640105:"西夏区",640106:"金凤区",640121:"永宁县",640122:"贺兰县",640181:"灵武市",640182:"其它区",640200:"石嘴山市",640202:"大武口区",640205:"惠农区",640221:"平罗县",640222:"其它区",640300:"吴忠市",640302:"利通区",640303:"红寺堡区",640323:"盐池县",640324:"同心县",640381:"青铜峡市",640382:"其它区",640400:"固原市",640402:"原州区",640422:"西吉县",640423:"隆德县",640424:"泾源县",640425:"彭阳县",640426:"其它区",640500:"中卫市",640502:"沙坡头区",640521:"中宁县",640522:"海原县",640523:"其它区",65e4:"新疆维吾尔自治区",650100:"乌鲁木齐市",650102:"天山区",650103:"沙依巴克区",650104:"新市区",650105:"水磨沟区",650106:"头屯河区",650107:"达坂城区",650109:"米东区",650121:"乌鲁木齐县",650122:"其它区",650200:"克拉玛依市",650202:"独山子区",650203:"克拉玛依区",650204:"白碱滩区",650205:"乌尔禾区",650206:"其它区",652100:"吐鲁番地区",652101:"吐鲁番市",652122:"鄯善县",652123:"托克逊县",652124:"其它区",652200:"哈密地区",652201:"哈密市",652222:"巴里坤哈萨克自治县",652223:"伊吾县",652224:"其它区",652300:"昌吉回族自治州",652301:"昌吉市",652302:"阜康市",652323:"呼图壁县",652324:"玛纳斯县",652325:"奇台县",652327:"吉木萨尔县",652328:"木垒哈萨克自治县",652329:"其它区",652700:"博尔塔拉蒙古自治州",652701:"博乐市",652702:"阿拉山口市",652722:"精河县",652723:"温泉县",652724:"其它区",652800:"巴音郭楞蒙古自治州",652801:"库尔勒市",652822:"轮台县",652823:"尉犁县",652824:"若羌县",652825:"且末县",652826:"焉耆回族自治县",652827:"和静县",652828:"和硕县",652829:"博湖县",652830:"其它区",652900:"阿克苏地区",652901:"阿克苏市",652922:"温宿县",652923:"库车县",652924:"沙雅县",652925:"新和县",652926:"拜城县",652927:"乌什县",652928:"阿瓦提县",652929:"柯坪县",652930:"其它区",653e3:"克孜勒苏柯尔克孜自治州",653001:"阿图什市",653022:"阿克陶县",653023:"阿合奇县",653024:"乌恰县",653025:"其它区",653100:"喀什地区",653101:"喀什市",653121:"疏附县",653122:"疏勒县",653123:"英吉沙县",653124:"泽普县",653125:"莎车县",653126:"叶城县",653127:"麦盖提县",653128:"岳普湖县",653129:"伽师县",653130:"巴楚县",653131:"塔什库尔干塔吉克自治县",653132:"其它区",653200:"和田地区",653201:"和田市",653221:"和田县",653222:"墨玉县",653223:"皮山县",653224:"洛浦县",653225:"策勒县",653226:"于田县",653227:"民丰县",653228:"其它区",654e3:"伊犁哈萨克自治州",654002:"伊宁市",654003:"奎屯市",654021:"伊宁县",654022:"察布查尔锡伯自治县",654023:"霍城县",654024:"巩留县",654025:"新源县",654026:"昭苏县",654027:"特克斯县",654028:"尼勒克县",654029:"其它区",654200:"塔城地区",654201:"塔城市",654202:"乌苏市",654221:"额敏县",654223:"沙湾县",654224:"托里县",654225:"裕民县",654226:"和布克赛尔蒙古自治县",654227:"其它区",654300:"阿勒泰地区",654301:"阿勒泰市",654321:"布尔津县",654322:"富蕴县",654323:"福海县",654324:"哈巴河县",654325:"青河县",654326:"吉木乃县",654327:"其它区",659001:"石河子市",659002:"阿拉尔市",659003:"图木舒克市",659004:"五家渠市",71e4:"台湾",710100:"台北市",710101:"中正区",710102:"大同区",710103:"中山区",710104:"松山区",710105:"大安区",710106:"万华区",710107:"信义区",710108:"士林区",710109:"北投区",710110:"内湖区",710111:"南港区",710112:"文山区",710113:"其它区",710200:"高雄市",710201:"新兴区",710202:"前金区",710203:"芩雅区",710204:"盐埕区",710205:"鼓山区",710206:"旗津区",710207:"前镇区",710208:"三民区",710209:"左营区",710210:"楠梓区",710211:"小港区",710212:"其它区",710241:"苓雅区",710242:"仁武区",710243:"大社区",710244:"冈山区",710245:"路竹区",710246:"阿莲区",710247:"田寮区",710248:"燕巢区",710249:"桥头区",710250:"梓官区",710251:"弥陀区",710252:"永安区",710253:"湖内区",710254:"凤山区",710255:"大寮区",710256:"林园区",710257:"鸟松区",710258:"大树区",710259:"旗山区",710260:"美浓区",710261:"六龟区",710262:"内门区",710263:"杉林区",710264:"甲仙区",710265:"桃源区",710266:"那玛夏区",710267:"茂林区",710268:"茄萣区",710300:"台南市",710301:"中西区",710302:"东区",710303:"南区",710304:"北区",710305:"安平区",710306:"安南区",710307:"其它区",710339:"永康区",710340:"归仁区",710341:"新化区",710342:"左镇区",710343:"玉井区",710344:"楠西区",710345:"南化区",710346:"仁德区",710347:"关庙区",710348:"龙崎区",710349:"官田区",710350:"麻豆区",710351:"佳里区",710352:"西港区",710353:"七股区",710354:"将军区",710355:"学甲区",710356:"北门区",710357:"新营区",710358:"后壁区",710359:"白河区",710360:"东山区",710361:"六甲区",710362:"下营区",710363:"柳营区",710364:"盐水区",710365:"善化区",710366:"大内区",710367:"山上区",710368:"新市区",710369:"安定区",710400:"台中市",710401:"中区",710402:"东区",710403:"南区",710404:"西区",710405:"北区",710406:"北屯区",710407:"西屯区",710408:"南屯区",710409:"其它区",710431:"太平区",710432:"大里区",710433:"雾峰区",710434:"乌日区",710435:"丰原区",710436:"后里区",710437:"石冈区",710438:"东势区",710439:"和平区",710440:"新社区",710441:"潭子区",710442:"大雅区",710443:"神冈区",710444:"大肚区",710445:"沙鹿区",710446:"龙井区",710447:"梧栖区",710448:"清水区",710449:"大甲区",710450:"外埔区",710451:"大安区",710500:"金门县",710507:"金沙镇",710508:"金湖镇",710509:"金宁乡",710510:"金城镇",710511:"烈屿乡",710512:"乌坵乡",710600:"南投县",710614:"南投市",710615:"中寮乡",710616:"草屯镇",710617:"国姓乡",710618:"埔里镇",710619:"仁爱乡",710620:"名间乡",710621:"集集镇",710622:"水里乡",710623:"鱼池乡",710624:"信义乡",710625:"竹山镇",710626:"鹿谷乡",710700:"基隆市",710701:"仁爱区",710702:"信义区",710703:"中正区",710704:"中山区",710705:"安乐区",710706:"暖暖区",710707:"七堵区",710708:"其它区",710800:"新竹市",710801:"东区",710802:"北区",710803:"香山区",710804:"其它区",710900:"嘉义市",710901:"东区",710902:"西区",710903:"其它区",711100:"新北市",711130:"万里区",711131:"金山区",711132:"板桥区",711133:"汐止区",711134:"深坑区",711135:"石碇区",711136:"瑞芳区",711137:"平溪区",711138:"双溪区",711139:"贡寮区",711140:"新店区",711141:"坪林区",711142:"乌来区",711143:"永和区",711144:"中和区",711145:"土城区",711146:"三峡区",711147:"树林区",711148:"莺歌区",711149:"三重区",711150:"新庄区",711151:"泰山区",711152:"林口区",711153:"芦洲区",711154:"五股区",711155:"八里区",711156:"淡水区",711157:"三芝区",711158:"石门区",711200:"宜兰县",711214:"宜兰市",711215:"头城镇",711216:"礁溪乡",711217:"壮围乡",711218:"员山乡",711219:"罗东镇",711220:"三星乡",711221:"大同乡",711222:"五结乡",711223:"冬山乡",711224:"苏澳镇",711225:"南澳乡",711226:"钓鱼台",711300:"新竹县",711314:"竹北市",711315:"湖口乡",711316:"新丰乡",711317:"新埔镇",711318:"关西镇",711319:"芎林乡",711320:"宝山乡",711321:"竹东镇",711322:"五峰乡",711323:"横山乡",711324:"尖石乡",711325:"北埔乡",711326:"峨眉乡",711400:"桃园县",711414:"中坜市",711415:"平镇市",711416:"龙潭乡",711417:"杨梅市",711418:"新屋乡",711419:"观音乡",711420:"桃园市",711421:"龟山乡",711422:"八德市",711423:"大溪镇",711424:"复兴乡",711425:"大园乡",711426:"芦竹乡",711500:"苗栗县",711519:"竹南镇",711520:"头份镇",711521:"三湾乡",711522:"南庄乡",711523:"狮潭乡",711524:"后龙镇",711525:"通霄镇",711526:"苑里镇",711527:"苗栗市",711528:"造桥乡",711529:"头屋乡",711530:"公馆乡",711531:"大湖乡",711532:"泰安乡",711533:"铜锣乡",711534:"三义乡",711535:"西湖乡",711536:"卓兰镇",711700:"彰化县",711727:"彰化市",711728:"芬园乡",711729:"花坛乡",711730:"秀水乡",711731:"鹿港镇",711732:"福兴乡",711733:"线西乡",711734:"和美镇",711735:"伸港乡",711736:"员林镇",711737:"社头乡",711738:"永靖乡",711739:"埔心乡",711740:"溪湖镇",711741:"大村乡",711742:"埔盐乡",711743:"田中镇",711744:"北斗镇",711745:"田尾乡",711746:"埤头乡",711747:"溪州乡",711748:"竹塘乡",711749:"二林镇",711750:"大城乡",711751:"芳苑乡",711752:"二水乡",711900:"嘉义县",711919:"番路乡",711920:"梅山乡",711921:"竹崎乡",711922:"阿里山乡",711923:"中埔乡",711924:"大埔乡",711925:"水上乡",711926:"鹿草乡",711927:"太保市",711928:"朴子市",711929:"东石乡",711930:"六脚乡",711931:"新港乡",711932:"民雄乡",711933:"大林镇",711934:"溪口乡",711935:"义竹乡",711936:"布袋镇",712100:"云林县",712121:"斗南镇",712122:"大埤乡",712123:"虎尾镇",712124:"土库镇",712125:"褒忠乡",712126:"东势乡",712127:"台西乡",712128:"仑背乡",712129:"麦寮乡",712130:"斗六市",712131:"林内乡",712132:"古坑乡",712133:"莿桐乡",712134:"西螺镇",712135:"二仑乡",712136:"北港镇",712137:"水林乡",712138:"口湖乡",712139:"四湖乡",712140:"元长乡",712400:"屏东县",712434:"屏东市",712435:"三地门乡",712436:"雾台乡",712437:"玛家乡",712438:"九如乡",712439:"里港乡",712440:"高树乡",712441:"盐埔乡",712442:"长治乡",712443:"麟洛乡",712444:"竹田乡",712445:"内埔乡",712446:"万丹乡",712447:"潮州镇",712448:"泰武乡",712449:"来义乡",712450:"万峦乡",712451:"崁顶乡",712452:"新埤乡",712453:"南州乡",712454:"林边乡",712455:"东港镇",712456:"琉球乡",712457:"佳冬乡",712458:"新园乡",712459:"枋寮乡",712460:"枋山乡",712461:"春日乡",712462:"狮子乡",712463:"车城乡",712464:"牡丹乡",712465:"恒春镇",712466:"满州乡",712500:"台东县",712517:"台东市",712518:"绿岛乡",712519:"兰屿乡",712520:"延平乡",712521:"卑南乡",712522:"鹿野乡",712523:"关山镇",712524:"海端乡",712525:"池上乡",712526:"东河乡",712527:"成功镇",712528:"长滨乡",712529:"金峰乡",712530:"大武乡",712531:"达仁乡",712532:"太麻里乡",712600:"花莲县",712615:"花莲市",712616:"新城乡",712617:"太鲁阁",712618:"秀林乡",712619:"吉安乡",712620:"寿丰乡",712621:"凤林镇",712622:"光复乡",712623:"丰滨乡",712624:"瑞穗乡",712625:"万荣乡",712626:"玉里镇",712627:"卓溪乡",712628:"富里乡",712700:"澎湖县",712707:"马公市",712708:"西屿乡",712709:"望安乡",712710:"七美乡",712711:"白沙乡",712712:"湖西乡",712800:"连江县",712805:"南竿乡",712806:"北竿乡",712807:"莒光乡",712808:"东引乡",81e4:"香港特别行政区",810100:"香港岛",810101:"中西区",810102:"湾仔",810103:"东区",810104:"南区",810200:"九龙",810201:"九龙城区",810202:"油尖旺区",810203:"深水埗区",810204:"黄大仙区",810205:"观塘区",810300:"新界",810301:"北区",810302:"大埔区",810303:"沙田区",810304:"西贡区",810305:"元朗区",810306:"屯门区",810307:"荃湾区",810308:"葵青区",810309:"离岛区",82e4:"澳门特别行政区",820100:"澳门半岛",820200:"离岛",99e4:"海外",990100:"海外"};function r(t){for(var e,n={},r=0;ro;o++)i=t.charAt(o),"\n"===i?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===i||"\u2028"===i||"\u2029"===i?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}return tr!==e&&(tr>e&&(tr=0,er={line:1,column:1,seenCR:!1}),n(er,tr,e),tr=e),er}function x(t){nr>Zn||(Zn>nr&&(nr=Zn,rr=[]),rr.push(t))}function w(t){var e=0;for(t.sort();eZn?(r=t.charAt(Zn),Zn++):(r=null,0===or&&x(An)),null!==r?(Qn=e,n=Hn(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)):(Zn=e,e=St),e}function mt(){var e,n,r;return e=Zn,92===t.charCodeAt(Zn)?(n=Dn,Zn++):(n=null,0===or&&x(Vn)),null!==n?(Bn.test(t.charAt(Zn))?(r=t.charAt(Zn),Zn++):(r=null,0===or&&x(Rn)),null!==r?(Qn=e,n=Pn(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)):(Zn=e,e=St),e}function ht(){var e,n,r,o;if(e=Zn,t.substr(Zn,2)===Ln?(n=Ln,Zn+=2):(n=null,0===or&&x(In)),null!==n){if(r=[],Fn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(Nn)),null!==o)for(;null!==o;)r.push(o),Fn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(Nn));else r=St;null!==r?(Qn=e,n=jn(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)}else Zn=e,e=St;return e}function gt(){var e,n,r,o;if(e=Zn,t.substr(Zn,2)===Un?(n=Un,Zn+=2):(n=null,0===or&&x(Wn)),null!==n){if(r=[],Gn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(qn)),null!==o)for(;null!==o;)r.push(o),Gn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(qn));else r=St;null!==r?(Qn=e,n=$n(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)}else Zn=e,e=St;return e}function pt(){var e,n,r,o;if(e=Zn,t.substr(Zn,2)===Xn?(n=Xn,Zn+=2):(n=null,0===or&&x(Kn)),null!==n){if(r=[],Gn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(qn)),null!==o)for(;null!==o;)r.push(o),Gn.test(t.charAt(Zn))?(o=t.charAt(Zn),Zn++):(o=null,0===or&&x(qn));else r=St;null!==r?(Qn=e,n=Yn(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)}else Zn=e,e=St;return e}function vt(){var e,n;return e=Zn,t.substr(Zn,2)===Ln?(n=Ln,Zn+=2):(n=null,0===or&&x(In)),null!==n&&(Qn=e,n=Jn()),null===n?(Zn=e,e=n):e=n,e}function bt(){var e,n,r;return e=Zn,92===t.charCodeAt(Zn)?(n=Dn,Zn++):(n=null,0===or&&x(Vn)),null!==n?(t.length>Zn?(r=t.charAt(Zn),Zn++):(r=null,0===or&&x(An)),null!==r?(Qn=e,n=Be(r),null===n?(Zn=e,e=n):e=n):(Zn=e,e=St)):(Zn=e,e=St),e}var yt,xt=arguments.length>1?arguments[1]:{},wt={regexp:C},Ct=C,St=null,kt="",zt="|",Ot='"|"',Mt=function(t,e){return e?new r(t,e[1]):t},_t=function(t,e,n){return new o([t].concat(e).concat([n]))},Tt="^",Et='"^"',At=function(){return new n("start")},Ht="$",Dt='"$"',Vt=function(){return new n("end")},Bt=function(t,e){return new u(t,e)},Rt="Quantifier",Pt=function(t,e){return e&&(t.greedy=!1),t},Lt="{",It='"{"',Ft=",",Nt='","',jt="}",Ut='"}"',Wt=function(t,e){return new c(t,e)},Gt=",}",qt='",}"',$t=function(t){return new c(t,1/0)},Xt=function(t){return new c(t,t)},Kt="+",Yt='"+"',Jt=function(){return new c(1,1/0)},Zt="*",Qt='"*"',te=function(){return new c(0,1/0)},ee="?",ne='"?"',re=function(){return new c(0,1)},oe=/^[0-9]/,ie="[0-9]",ae=function(t){return+t.join("")},ue="(",ce='"("',se=")",le='")"',fe=function(t){return t},de=function(t){return new a(t)},me="?:",he='"?:"',ge=function(t){return new i("non-capture-group",t)},pe="?=",ve='"?="',be=function(t){return new i("positive-lookahead",t)},ye="?!",xe='"?!"',we=function(t){return new i("negative-lookahead",t)},Ce="CharacterSet",Se="[",ke='"["',ze="]",Oe='"]"',Me=function(t,e){return new s(!!t,e)},_e="CharacterRange",Te="-",Ee='"-"',Ae=function(t,e){return new l(t,e)},He="Character",De=/^[^\\\]]/,Ve="[^\\\\\\]]",Be=function(t){return new f(t)},Re=".",Pe='"."',Le=function(){return new n("any-character")},Ie="Literal",Fe=/^[^|\\\/.[()?+*$\^]/,Ne="[^|\\\\\\/.[()?+*$\\^]",je="\\b",Ue='"\\\\b"',We=function(){return new n("backspace")},Ge=function(){return new n("word-boundary")},qe="\\B",$e='"\\\\B"',Xe=function(){return new n("non-word-boundary")},Ke="\\d",Ye='"\\\\d"',Je=function(){return new n("digit")},Ze="\\D",Qe='"\\\\D"',tn=function(){return new n("non-digit")},en="\\f",nn='"\\\\f"',rn=function(){return new n("form-feed")},on="\\n",an='"\\\\n"',un=function(){return new n("line-feed")},cn="\\r",sn='"\\\\r"',ln=function(){return new n("carriage-return")},fn="\\s",dn='"\\\\s"',mn=function(){return new n("white-space")},hn="\\S",gn='"\\\\S"',pn=function(){return new n("non-white-space")},vn="\\t",bn='"\\\\t"',yn=function(){return new n("tab")},xn="\\v",wn='"\\\\v"',Cn=function(){return new n("vertical-tab")},Sn="\\w",kn='"\\\\w"',zn=function(){return new n("word")},On="\\W",Mn='"\\\\W"',_n=function(){return new n("non-word")},Tn="\\c",En='"\\\\c"',An="any character",Hn=function(t){return new p(t)},Dn="\\",Vn='"\\\\"',Bn=/^[1-9]/,Rn="[1-9]",Pn=function(t){return new g(t)},Ln="\\0",In='"\\\\0"',Fn=/^[0-7]/,Nn="[0-7]",jn=function(t){return new h(t.join(""))},Un="\\x",Wn='"\\\\x"',Gn=/^[0-9a-fA-F]/,qn="[0-9a-fA-F]",$n=function(t){return new m(t.join(""))},Xn="\\u",Kn='"\\\\u"',Yn=function(t){return new d(t.join(""))},Jn=function(){return new n("null-character")},Zn=0,Qn=0,tr=0,er={line:1,column:1,seenCR:!1},nr=0,rr=[],or=0;if("startRule"in xt){if(!(xt.startRule in wt))throw new Error("Can't start parsing from rule \""+xt.startRule+'".');Ct=wt[xt.startRule]}if(n.offset=b,n.text=v,yt=Ct(),null!==yt&&Zn===t.length)return yt;throw w(rr),Qn=Math.max(Zn,nr),new e(rr,Qnr)return!0;var a={path:e,type:t,actual:n,expected:r,action:"is greater than",message:i};return a.message=c.message(a),o.push(a),!1},lessThan:function(t,e,n,r,o,i){if(n=r)return!0;var a={path:e,type:t,actual:n,expected:r,action:"is greater than or equal to",message:i};return a.message=c.message(a),o.push(a),!1},lessThanOrEqualTo:function(t,e,n,r,o,i){if(n<=r)return!0;var a={path:e,type:t,actual:n,expected:r,action:"is less than or equal to",message:i};return a.message=c.message(a),o.push(a),!1}};a.Diff=u,a.Assert=c,t.exports=a},function(t,e,n){t.exports=n(28)},function(t,e,n){var r=n(3);window._XMLHttpRequest=window.XMLHttpRequest,window._ActiveXObject=window.ActiveXObject;try{new window.Event("custom")}catch(m){window.Event=function(t,e,n,r){var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e,n,r),o}}var o={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i="readystatechange loadstart progress abort error load timeout loadend".split(" "),a="timeout withCredentials".split(" "),u="readyState responseURL status statusText responseType response responseText responseXML".split(" "),c={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};function s(){this.custom={events:{},requestHeaders:{},responseHeaders:{}}}function l(){var t=function(){var t=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,e=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,n=location.href,r=e.exec(n.toLowerCase())||[];return t.test(r[1])}();return window.ActiveXObject?!t&&e()||n():e();function e(){try{return new window._XMLHttpRequest}catch(t){}}function n(){try{return new window._ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}function f(t){for(var e in s.Mock._mocked){var n=s.Mock._mocked[e];if((!n.rurl||o(n.rurl,t.url))&&(!n.rtype||o(n.rtype,t.type.toLowerCase())))return n}function o(t,e){return"string"===r.type(t)?t===e:"regexp"===r.type(t)?t.test(e):void 0}}function d(t,e){return r.isFunction(t.template)?t.template(e):s.Mock.mock(t.template)}s._settings={timeout:"10-100"},s.setup=function(t){return r.extend(s._settings,t),s._settings},r.extend(s,o),r.extend(s.prototype,o),s.prototype.mock=!0,s.prototype.match=!1,r.extend(s.prototype,{open:function(t,e,n,o,c){var d=this;r.extend(this.custom,{method:t,url:e,async:"boolean"!==typeof n||n,username:o,password:c,options:{url:e,type:t}}),this.custom.timeout=function(t){if("number"===typeof t)return t;if("string"===typeof t&&!~t.indexOf("-"))return parseInt(t,10);if("string"===typeof t&&~t.indexOf("-")){var e=t.split("-"),n=parseInt(e[0],10),r=parseInt(e[1],10);return Math.round(Math.random()*(r-n))+n}}(s._settings.timeout);var m=f(this.custom.options);function h(t){for(var e=0;e-1},U=function(t,e){for(var n=0,r=t.length;n=0;n--){var r=t[n];e(r,n)}},K=function(t,e){for(var n=[],r=[],o=0,i=t.length;o=0&&e=e.length&&t.substr(n,n+e.length)===e},Ft=function(t,e){return Ut(t,e)?Lt(t,e.length):t},Nt=function(t,e){return Wt(t,e)?t:Pt(t,e)},jt=function(t,e){return-1!==t.indexOf(e)},Ut=function(t,e){return It(t,e,0)},Wt=function(t,e){return It(t,e,t.length-e.length)},Gt=function(t){return function(e){return e.replace(t,"")}},qt=Gt(/^\s+|\s+$/g),$t=function(t){return t.length>0},Xt=function(t){return!$t(t)},Kt=function(t){return void 0!==t.style&&m(t.style.getPropertyValue)},Yt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Qt(r.childNodes[0])},Jt=function(t,e){var n=e||document,r=n.createElement(t);return Qt(r)},Zt=function(t,e){var n=e||document,r=n.createTextNode(t);return Qt(r)},Qt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},te=function(t,e,n){return R.from(t.dom.elementFromPoint(e,n)).map(Qt)},ee={fromHtml:Yt,fromTag:Jt,fromText:Zt,fromDom:Qt,fromPoint:te};"undefined"!==typeof window?window:Function("return this;")();var ne,re=9,oe=11,ie=1,ae=3,ue=function(t){var e=t.dom.nodeName;return e.toLowerCase()},ce=function(t){return t.dom.nodeType},se=function(t){return function(e){return ce(e)===t}},le=se(ie),fe=se(ae),de=se(re),me=se(oe),he=function(t){var e,n=!1;return function(){for(var r=[],o=0;o0&&e0}))},tr=function(t){var e={},n=t.dom;if(Kt(n))for(var r=0;rr?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},ir=or("height",(function(t){var e=t.dom;return Rn(t)?e.getBoundingClientRect().height:e.offsetHeight})),ar=function(t){return ir.get(t)},ur=function(t){return ir.getOuter(t)},cr=function(t,e){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(t,e,n);Xn(t,"max-height",r+"px")},sr=function(t,e){var n=function(n,r){return sr(t+n,e+r)};return{left:t,top:e,translate:n}},lr=sr,fr=function(t){var e=t.getBoundingClientRect();return lr(e.left,e.top)},dr=function(t,e){return void 0!==t?t:void 0!==e?e:0},mr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return lr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=dr(o.clientTop,n.clientTop),c=dr(o.clientLeft,n.clientLeft);return hr(t).translate(a-c,i-u)},hr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?lr(r.offsetLeft,r.offsetTop):Rn(t)?fr(e):lr(0,0)},gr=or("width",(function(t){return t.dom.offsetWidth})),pr=function(t,e){return gr.set(t,e)},vr=function(t){return gr.get(t)},br=function(t){return gr.getOuter(t)},yr=function(t,e){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=gr.max(t,e,n);Xn(t,"max-width",r+"px")},xr=function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}},wr=function(t){var e=ee.fromDom(Vn(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=b(r,n);return xr(e,t.clientX,t.clientY,n,r,o,t)},Cr=function(t,e){return function(n){t(n)&&e(wr(n))}},Sr=function(t,e,n,r,o){var i=Cr(n,r);return t.dom.addEventListener(e,i,o),{unbind:S(Or,t,e,i,o)}},kr=function(t,e,n,r){return Sr(t,e,n,r,!1)},zr=function(t,e,n,r){return Sr(t,e,n,r,!0)},Or=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Mr=function(t,e){var n=vn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},_r=function(t,e){var n=xn(t);n.fold((function(){var n=vn(t);n.each((function(t){Er(t,e)}))}),(function(t){Mr(t,e)}))},Tr=function(t,e){var n=Sn(t);n.fold((function(){Er(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Er=function(t,e){t.dom.appendChild(e.dom)},Ar=function(t,e,n){Cn(t,n).fold((function(){Er(t,e)}),(function(t){Mr(t,e)}))},Hr=function(t,e){$(e,(function(e){Mr(t,e)}))},Dr=function(t,e){$(e,(function(e){Er(t,e)}))},Vr=function(t){t.dom.textContent="",$(wn(t),(function(t){Br(t)}))},Br=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Rr=function(t){var e=wn(t);e.length>0&&Hr(t,e),Br(t)},Pr=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return lr(n,r)},Lr=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Ir=function(t){var e=void 0===t?window:t;return en().browser.isFirefox()?R.none():R.from(e["visualViewport"])},Fr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Nr=function(t){var e=void 0===t?window:t,n=e.document,r=Pr(ee.fromDom(n));return Ir(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Fr(r.left,r.top,n,o)}),(function(t){return Fr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},jr=function(t,e){var n=t.view(e);return n.fold(x([]),(function(e){var n=t.owner(e),r=jr(t,n);return[e].concat(r)}))},Ur=function(t,e){var n=e.owner(t),r=jr(e,n);return R.some(r)},Wr=function(t){var e,n=t.dom===document?R.none():R.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(ee.fromDom)},Gr=function(t){return mn(t)},qr=Object.freeze({__proto__:null,view:Wr,owner:Gr}),$r=function(t){var e=ee.fromDom(document),n=Pr(e),r=Ur(t,qr);return r.fold(S(mr,t),(function(e){var r=hr(t),o=J(e,(function(t,e){var n=hr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return lr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Xr=function(t,e,n){return{point:t,width:e,height:n}},Kr=function(t,e,n,r){return{x:t,y:e,width:n,height:r}},Yr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Jr=function(t){var e=mr(t),n=br(t),r=ur(t);return Yr(e.left,e.top,n,r)},Zr=function(t){var e=$r(t),n=br(t),r=ur(t);return Yr(e.left,e.top,n,r)},Qr=function(){return Nr(window)},to=function(t){var e=function(e){return to(t)},n=function(e){return to(t)},r=function(e){return to(e(t))},o=function(e){return to(t)},i=function(e){e(t)},a=function(e){return e(t)},u=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return R.some(t)};return{isValue:M,isError:O,getOr:x(t),getOrThunk:x(t),getOrDie:x(t),or:e,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:c,forall:s,toOptional:l}},eo=function(t){var e=function(t){return t()},n=function(){return z(String(t))()},r=w,o=function(t){return t()},i=function(e){return eo(t)},a=function(e){return eo(e(t))},u=function(e){return eo(t)},c=function(e,n){return e(t)};return{isValue:O,isError:M,getOr:w,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:a,each:p,bind:u,exists:O,forall:M,toOptional:R.none}},no=function(t,e){return t.fold((function(){return eo(e)}),to)},ro={value:to,error:eo,fromOption:no};(function(t){t[t["Error"]=0]="Error",t[t["Value"]=1]="Value"})(ne||(ne={}));var oo=function(t,e,n){return t.stype===ne.Error?e(t.serror):n(t.svalue)},io=function(t){var e=[],n=[];return $(t,(function(t){oo(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},ao=function(t,e){return t.stype===ne.Error?{stype:ne.Error,serror:e(t.serror)}:t},uo=function(t,e){return t.stype===ne.Value?{stype:ne.Value,svalue:e(t.svalue)}:t},co=function(t,e){return t.stype===ne.Value?e(t.svalue):t},so=function(t,e){return t.stype===ne.Error?e(t.serror):t},lo=function(t){return{stype:ne.Value,svalue:t}},fo=function(t){return{stype:ne.Error,serror:t}},mo=function(t){return oo(t,ro.error,ro.value)},ho=function(t){return t.fold(fo,lo)},go={fromResult:ho,toResult:mo,svalue:lo,partition:io,serror:fo,bind:co,bindError:so,map:uo,mapError:ao,fold:oo},po=function(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}},vo=function(t,e){return{tag:"custom",newKey:t,instantiator:e}},bo=function(t,e,n){switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);case"custom":return n(t.newKey,t.instantiator)}},yo=function(t,e){return e},xo=function(t,e){var n=a(t)&&a(e);return n?Co(t,e):e},wo=function(t){return function(){for(var e=[],n=0;n0?go.svalue(Co(e,So.apply(void 0,t))):go.svalue(e)},Ao=function(t){return b(go.serror,nt)(t)},Ho=function(t,e){var n=go.partition(t);return n.errors.length>0?Ao(n.errors):Eo(n.values,e)},Do=function(t){var e=go.partition(t);return e.errors.length>0?Ao(e.errors):go.svalue(e.values)},Vo={consolidateObj:Ho,consolidateArr:Do},Bo=function(t){return a(t)&>(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Ro=function(t){var e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:x("... (only showing first ten failures)")}]):t;return q(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))},Po=function(t,e){return go.serror([{path:t,getErrorInfo:e}])},Lo=function(t,e,n){return Po(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+Bo(n)}))},Io=function(t,e){return Po(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))},Fo=function(t,e,n){return Po(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Bo(e)}))},No=function(t,e){return Po(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))},jo=function(t,e){return Po(t,x(e))},Uo=function(t){var e=function(e,n){return go.bindError(t(n),(function(t){return jo(e,t)}))},n=x("val");return{extract:e,toString:n}},Wo=Uo(go.svalue),Go=function(t,e,n,r){return Ot(e,n).fold((function(){return Lo(t,n,e)}),r)},qo=function(t,e,n,r){var o=Ot(t,e).getOrThunk((function(){return n(t)}));return r(o)},$o=function(t,e,n){return n(Ot(t,e))},Xo=function(t,e,n,r){var o=Ot(t,e).map((function(e){return!0===e?n(t):e}));return r(o)},Ko=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},a=function(t){return t.fold((function(){return go.svalue(R.none())}),(function(t){var n=o.extract(e.concat([r]),t);return go.map(n,R.some)}))};switch(t.tag){case"required":return Go(e,n,r,i);case"defaultedThunk":return qo(n,r,t.process,i);case"option":return $o(n,r,a);case"defaultedOptionThunk":return Xo(n,r,t.process,a);case"mergeWithThunk":return qo(n,r,x({}),(function(e){var r=Co(t.process(n),e);return i(r)}))}},Yo=function(t,e,n){for(var r={},o=[],i=0,a=n;i0?go.serror(o):go.svalue(r)},Jo=function(t){var e=function(e,n){return t().extract(e,n)},n=function(){return t().toString()};return{extract:e,toString:n}},Zo=function(t){return gt(Ct(t,d))},Qo=function(t){var e=ti(t),n=J(t,(function(t,e){return bo(e,(function(e){var n;return Co(t,(n={},n[e]=!0,n))}),x(t))}),{}),r=function(t,r){var o=s(r)?[]:Zo(r),i=Y(o,(function(t){return!_t(n,t)}));return 0===i.length?e.extract(t,r):No(t,i)};return{extract:r,toString:e.toString}},ti=function(t){var e=function(e,n){return Yo(e,n,t)},n=function(){var e=q(t,(function(t){return bo(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))}));return"obj{\n"+e.join("\n")+"}"};return{extract:e,toString:n}},ei=function(t){var e=function(e,n){var r=q(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return Vo.consolidateArr(r)},n=function(){return"array("+t.toString()+")"};return{extract:e,toString:n}},ni=function(t){var e=function(e,n){for(var r=[],o=0,i=t;o0?pa(n.errors):ga(n.values,e)},ba=function(t){return m(t)?t:O},ya=function(t,e,n){var r=t.dom,o=ba(n);while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return R.none()},xa=function(t,e,n){var r=e(t),o=ba(n);return r.orThunk((function(){return o(t)?R.none():ya(t,e,o)}))},wa=function(t,e){return sn(t.element,e.event.target)},Ca={can:M,abort:O,run:p},Sa=function(t){if(!_t(t,"can")&&!_t(t,"abort")&&!_t(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return T(T({},Ca),t)},ka=function(t,e){return function(){for(var n=[],r=0;r1?Y(e[n],(function(e){return U(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return ma(n,Vc(o,i))}))}));return va(n,{})},qc="alloy.base.behaviour",$c=ti([Oi("dom","dom",ko(),ti([Ti("tag"),Xi("styles",{}),Xi("classes",[]),Xi("attributes",{}),Fi("value"),Fi("innerHtml")])),Ti("components"),Ti("uid"),Xi("events",{}),Xi("apis",{}),Oi("eventOrder","eventOrder",To((ua={},ua[eu()]=["disabling",qc,"toggling","typeaheadevents"],ua[Ja()]=[qc,"focusing","keying"],ua[uu()]=[qc,"disabling","toggling","representing"],ua[ja()]=[qc,"representing","streaming","invalidating"],ua[mu()]=[qc,"representing","item-events","tooltipping"],ua[Da()]=["focusing",qc,"item-type-events"],ua[Ta()]=["focusing",qc,"item-type-events"],ua[Pa()]=["item-type-events","tooltipping"],ua[tu()]=["receiving","reflecting","tooltipping"],ua)),ai()),Fi("domModification")]),Xc=function(t){return xi("custom.definition",$c,t)},Kc=function(t){return T(T({},t.dom),{uid:t.uid,domChildren:q(t.components,(function(t){return t.element}))})},Yc=function(t){return t.domModification.fold((function(){return Ec({})}),Ec)},Jc=function(t){return t.events},Zc=function(t,e){var n=jn(t,e);return void 0===n||""===n?[]:n.split(" ")},Qc=function(t,e,n){var r=Zc(t,e),o=r.concat([n]);return Fn(t,e,o.join(" ")),!0},ts=function(t,e,n){var r=Y(Zc(t,e),(function(t){return t!==n}));return r.length>0?Fn(t,e,r.join(" ")):Gn(t,e),!1},es=function(t){return void 0!==t.dom.classList},ns=function(t){return Zc(t,"class")},rs=function(t,e){return Qc(t,"class",e)},os=function(t,e){return ts(t,"class",e)},is=function(t,e){es(t)?t.dom.classList.add(e):rs(t,e)},as=function(t){var e=es(t)?t.dom.classList:ns(t);0===e.length&&Gn(t,"class")},us=function(t,e){if(es(t)){var n=t.dom.classList;n.remove(e)}else os(t,e);as(t)},cs=function(t,e){return es(t)&&t.dom.classList.contains(e)},ss=function(t,e){$(e,(function(e){is(t,e)}))},ls=function(t,e){$(e,(function(e){us(t,e)}))},fs=function(t,e){return ot(e,(function(e){return cs(t,e)}))},ds=function(t){return t.dom.value},ms=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e},hs=function(t){var e=ee.fromTag(t.tag);Nn(e,t.attributes),ss(e,t.classes),Kn(e,t.styles),t.innerHtml.each((function(t){return Xu(e,t)}));var n=t.domChildren;return Dr(e,n),t.value.each((function(t){ms(e,t)})),t.uid,lc(e,t.uid),e},gs=function(t){var e=Ot(t,"behaviours").getOr({});return rt(gt(e),(function(t){var n=e[t];return d(n)?[n.me]:[]}))},ps=function(t,e){return Oc(t,e)},vs=function(t){var e=gs(t);return ps(t,e)},bs=function(t,e,n){var r=Kc(t),o=Yc(t),i={"alloy.base.modification":o},a=e.length>0?Hc(n,i,e,r):o;return Ac(r,a)},ys=function(t,e,n){var r={"alloy.base.behaviour":Jc(t)};return Nc(n,t.eventOrder,e,r).getOrDie()},xs=function(t){var e=function(){return y},n=oa(gc),r=wi(Xc(t)),o=vs(t),i=Mc(o),a=_c(o),u=bs(r,i,a),c=hs(u),s=ys(r,i,a),l=oa(r.components),f=function(t){n.set(t)},d=function(){n.set(hc(e))},h=function(){var t=wn(c),e=rt(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),ct)}));l.set(e)},g=function(e){var n=a,r=m(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))};return r()},p=function(t){return m(a[t.name()])},v=function(){return r.apis},b=function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},y={uid:t.uid,getSystem:n.get,config:g,hasConfigured:p,spec:t,readState:b,getApis:v,connect:f,disconnect:d,element:c,syncComponents:h,components:l.get,events:s};return y},ws=function(t){var e=Ot(t,"components").getOr([]);return q(e,Ms)},Cs=function(t){var e=mc(t),n=e.events,r=E(e,["events"]),o=ws(r),i=T(T({},r),{events:T(T({},nc),n),components:o});return ro.value(xs(i))},Ss=function(t){var e=ee.fromText(t);return ks({element:e})},ks=function(t){var e=Ci("external.component",Qo([Ti("element"),Fi("uid")]),t),n=oa(hc()),r=function(t){n.set(t)},o=function(){n.set(hc((function(){return a})))},i=e.uid.getOrThunk((function(){return dc("external")}));lc(e.element,i);var a={uid:i,getSystem:n.get,config:R.none,hasConfigured:O,connect:r,disconnect:o,getApis:function(){return{}},element:e.element,spec:t,readState:x("No state"),syncComponents:p,components:x([]),events:{}};return wc(a)},zs=dc,Os=function(t){return Mt(t,"uid")},Ms=function(t){return Cc(t).getOrThunk((function(){var e=Os(t)?t:T({uid:zs("")},t);return Cs(e).getOrDie()}))},_s=wc;function Ts(t,e,n,r,o){return t(n,r)?R.some(n):m(o)&&o(n)?R.none():e(n,r,o)}var Es,As=function(t,e,n){var r=t.dom,o=m(n)?n:O;while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r);if(e(i))return R.some(i);if(o(i))break}return R.none()},Hs=function(t,e,n){var r=function(t,e){return e(t)};return Ts(r,As,t,e,n)},Ds=function(t,e){var n=function(t){return e(ee.fromDom(t))},r=tt(t.dom.childNodes,n);return r.map(ee.fromDom)},Vs=function(t,e){var n=function(t){for(var r=0;r-1}));return e.bind((function(t){var e=jn(t,"id"),n=Tn(t);return Ls(n,'[aria-owns="'+e+'"]')}))},Ns=function(){var t=oc("aria-owns"),e=function(e){Fn(e,"aria-owns",t)},n=function(t){Gn(t,"aria-owns")};return{id:t,link:e,unlink:n}},js=function(t,e){return Fs(e).exists((function(e){return Us(t,e)}))},Us=function(t,e){return Bs(e,(function(e){return sn(e,t.element)}),O)||js(t,e)},Ws="unknown";(function(t){t[t["STOP"]=0]="STOP",t[t["NORMAL"]=1]="NORMAL",t[t["LOGGING"]=2]="LOGGING"})(Es||(Es={}));var Gs=oa({}),qs=function(t,e){var n=[],r=(new Date).getTime();return{logEventCut:function(t,e,r){n.push({outcome:"cut",target:e,purpose:r})},logEventStopped:function(t,e,r){n.push({outcome:"stopped",target:e,purpose:r})},logNoParent:function(t,e,r){n.push({outcome:"no-parent",target:e,purpose:r})},logEventNoHandlers:function(t,e){n.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,r){n.push({outcome:"response",purpose:r,target:e})},write:function(){var o=(new Date).getTime();j(["mousemove","mouseover","mouseout",uu()],t)||console.log(t,{event:t,time:o-r,target:e.dom,sequence:q(n,(function(t){return j(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Qu(t.target)+")":t.outcome}))})}}},$s=function(t,e,n){var r=Ot(Gs.get(),t).orThunk((function(){var e=gt(Gs.get());return ht(e,(function(e){return t.indexOf(e)>-1?R.some(Gs.get()[e]):R.none()}))})).getOr(Es.NORMAL);switch(r){case Es.NORMAL:return n(Zs());case Es.LOGGING:var o=qs(t,e),i=n(o);return o.write(),i;case Es.STOP:return!0}},Xs=["alloy/data/Fields","alloy/debugging/Debugging"],Ks=function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return tt(e,(function(t){return t.indexOf("alloy")>0&&!U(Xs,(function(e){return t.indexOf(e)>-1}))})).getOr(Ws)}return Ws},Ys={logEventCut:p,logEventStopped:p,logNoParent:p,logEventNoHandlers:p,logEventResponse:p,write:p},Js=function(t,e,n){return $s(t,e,n)},Zs=x(Ys),Qs=x([Ti("menu"),Ti("selectedMenu")]),tl=x([Ti("item"),Ti("selectedItem")]);x(ti(tl().concat(Qs())));var el=x(ti(tl())),nl=Pi("initSize",[Ti("numColumns"),Ti("numRows")]),rl=function(){return Ei("markers",el())},ol=function(){return Pi("markers",[Ti("backgroundMenu")].concat(Qs()).concat(tl()))},il=function(t){return Pi("markers",q(t,Ti))},al=function(t,e,n){return Ks(),Oi(e,e,n,vi((function(t){return ro.value((function(){for(var e=[],n=0;nr?n:o=n&&a<=o,m=u>=r&&u<=i,h=d&&m,g=c<=o&&c>=n,p=s<=i&&s>=r,v=g&&p,b=Math.min(l,a>=n?o-a:c-n),y=Math.min(f,u>=r?i-u:s-r);return{originInBounds:h,sizeInBounds:v,visibleW:b,visibleH:y}},Yf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,c=t.width,s=t.height,l=Math.max(n,o-c),f=Math.max(r,i-s),d=_l(a,n,l),m=_l(u,r,f),h=Math.min(d+c,o)-d,g=Math.min(m+s,i)-m;return Yr(d,m,h,g)},Jf=function(t,e,n){var r=x(e.bottom-n.y),o=x(n.bottom-e.y),i=vl(t,o,o,r),a=x(e.right-n.x),u=x(n.right-e.x),c=bl(t,u,u,a);return{maxWidth:c,maxHeight:i}},Zf=function(t,e,n,r){var o=t.bubble,i=o.offset,a=Al(r,t.restriction,i),u=t.x+i.left,c=t.y+i.top,s=Yr(u,c,e,n),l=Kf(s,a),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,h=l.visibleH,g=f&&d,p=g?s:Yf(s,a),v=p.width>0&&p.height>0,b=Jf(t.direction,p,r),y=b.maxWidth,x=b.maxHeight,w={rect:p,maxHeight:x,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:c};return g||t.alwaysFit?Xf.fit(w):Xf.nofit(w,m,h,v)},Qf=function(t,e,n,r,o,i){var a=r.width,u=r.height,c=function(e,c,s,l,f){var d=e(n,r,o,t,i),m=Zf(d,a,u,i);return m.fold(x(m),(function(t,e,n,r){var o=f===r?n>l||e>s:!f&&r;return o?m:Xf.nofit(c,s,l,f)}))},s=Z(e,(function(t,e){var n=S(c,e);return t.fold(x(t),n)}),Xf.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:yl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return s.fold(w,w)},td=function(t){var e=oa(R.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(R.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},a=function(t){n(),e.set(R.some(t))};return{clear:r,isSet:o,get:i,set:a}},ed=function(){return td((function(t){return t.destroy()}))},nd=function(){return td((function(t){return t.unbind()}))},rd=function(){var t=ed(),e=function(e){return t.get().each(e)};return T(T({},t),{run:e})},od=function(){var t=td(p),e=function(e){return t.get().each(e)};return T(T({},t),{on:e})},id=M,ad=function(t,e,n){return kr(t,e,id,n)},ud=function(t,e,n){return zr(t,e,id,n)},cd=wr,sd=["top","bottom","right","left"],ld="data-alloy-transition-timer",fd=function(t,e){return fs(t,e.classes)},dd=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))},md=function(t,e){var n=function(t){return parseFloat(t).toFixed(3)};return kt(e,(function(e,r){var o=t[r].map(n),i=e.map(n);return!Et(o,i)})).isSome()},hd=function(t){var e=function(e){var n=Jn(t,e),r=i(n)?n.split(/\s*,\s*/):[];return Y(r,$t)},n=function(t){if(i(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return Wt(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),o=e("transition-duration");return Z(o,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)},gd=function(t,e){var n,r=nd(),o=nd(),i=function(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return sn(e.target,t)&&Xt(r)&&j(sd,e.raw.propertyName)},a=function(a){if(f(a)||i(a)){r.clear(),o.clear();var u=null===a||void 0===a?void 0:a.raw.type;(f(u)||u===qa())&&(clearTimeout(n),Gn(t,ld),ls(t,e.classes))}},u=function(){r.set(ad(t,qa(),a)),o.set(ad(t,Ga(),a))};if("ontransitionstart"in t.dom)var c=ad(t,$a(),(function(t){i(t)&&(c.unbind(),u())}));else u();var s=hd(t);requestAnimationFrame((function(){n=setTimeout(a,s+17),Fn(t,ld,n)}))},pd=function(t,e){ss(t,e.classes),Un(t,ld).each((function(e){clearTimeout(parseInt(e,10)),Gn(t,ld)})),gd(t,e)},vd=function(t,e,n,r,o,i){var a=dd(r,o,i);if(a||fd(t,r)){Xn(t,"position",n.position);var u=Bf(e,t),c=Vf(e,T(T({},o),{rect:u})),s=ut(sd,(function(t){return c[t]}));md(n,s)&&(Yn(t,s),a&&pd(t,r),rr(t))}else ls(t,r.classes)},bd=function(t){return{width:br(t),height:ur(t)}},yd=function(t,e,n,r){nr(e,"max-height"),nr(e,"max-width");var o=bd(e);return Qf(e,r.preference,t,o,n,r.bounds)},xd=function(t,e){var n=e.classes;ls(t,n.off),ss(t,n.on)},wd=function(t,e,n){var r=n.maxHeightFunction;r(t,e.maxHeight)},Cd=function(t,e,n){var r=n.maxWidthFunction;r(t,e.maxWidth)},Sd=function(t,e,n){var r=Vf(n.origin,e);n.transition.each((function(o){vd(t,n.origin,r,o,e,n.lastPlacement)})),Af(t,r)},kd=function(t,e){Gf(t,e.placement)},zd=function(t,e){cr(t,Math.floor(e))},Od=x((function(t,e){zd(t,e),Kn(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Md=x((function(t,e){zd(t,e)})),_d=function(t,e,n){return void 0===t[e]?n:t[e]},Td=function(t,e,n,r,o,i,a,u){var c=_d(a,"maxHeightFunction",Od()),s=_d(a,"maxWidthFunction",p),l=t.anchorBox,f=t.origin,d={bounds:Rf(f,i),origin:f,preference:r,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:o,transition:u};return Ed(l,e,n,d)},Ed=function(t,e,n,r){var o=yd(t,e,n,r);return Sd(e,o,r),kd(e,o),xd(e,o),wd(e,o,r),Cd(e,o,r),{layout:o.layout,placement:o.placement}},Ad=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Hd=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,a=function(t){return Ot(n,t).getOr([])},u=function(t,e,n){var r=at(Ad,n);return{offset:lr(t,e),classesOn:rt(n,a),classesOff:rt(r,a)}};return{southeast:function(){return u(-t,e,["top","alignLeft"])},southwest:function(){return u(t,e,["top","alignRight"])},south:function(){return u(-t/2,e,["top","alignCentre"])},northeast:function(){return u(-t,-e,["bottom","alignLeft"])},northwest:function(){return u(t,-e,["bottom","alignRight"])},north:function(){return u(-t/2,-e,["bottom","alignCentre"])},east:function(){return u(t,-e/2,["valignCentre","left"])},west:function(){return u(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return u(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return u(-o,i,["top","alignRight","inset"])},insetNorth:function(){return u(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return u(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return u(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return u(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return u(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return u(o,-i/2,["valignCentre","left","inset"])}}},Dd=function(){return Hd(0,0,{})},Vd=w,Bd=function(t,e){return function(n){return"rtl"===Rd(n)?e:t}},Rd=function(t){return"rtl"===Jn(t,"direction")?"rtl":"ltr"};(function(t){t["TopToBottom"]="toptobottom",t["BottomToTop"]="bottomtotop"})(If||(If={}));var Pd="data-alloy-vertical-dir",Ld=function(t){return Bs(t,(function(t){return le(t)&&jn(t,"data-alloy-vertical-dir")===If.BottomToTop}))},Id=function(){return qi("layouts",[Ti("onLtr"),Ti("onRtl"),Fi("onBottomLtr"),Fi("onBottomRtl")])},Fd=function(t,e,n,r,o,i,a){var u=a.map(Ld).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r),d=Bd(l,f);return d(t)},Nd=function(t,e,n){var r=e.hotspot,o=Bf(n,r.element),i=Fd(t.element,e,Ql(),tf(),Jl(),Zl(),R.some(e.hotspot.element));return R.some(Vd({anchorBox:o,bubble:e.bubble.getOr(Dd()),overrides:e.overrides,layouts:i,placer:R.none()}))},jd=[Ti("hotspot"),Fi("bubble"),Xi("overrides",{}),Id(),fl("placement",Nd)],Ud=function(t,e,n){var r=Pf(n,e.x,e.y),o=Yr(r.left,r.top,e.width,e.height),i=Fd(t.element,e,Kl(),Yl(),Kl(),Yl(),R.none());return R.some(Vd({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:R.none()}))},Wd=[Ti("x"),Ti("y"),Xi("height",0),Xi("width",0),Xi("bubble",Dd()),Xi("overrides",{}),Id(),fl("placement",Ud)],Gd=aa.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),qd=function(t){return t.fold(w,(function(t,e,n){return t.translate(-e,-n)}))},$d=function(t){return t.fold(w,w)},Xd=function(t){return Z(t,(function(t,e){return t.translate(e.left,e.top)}),lr(0,0))},Kd=function(t){var e=q(t,qd);return Xd(e)},Yd=function(t){var e=q(t,$d);return Xd(e)},Jd=Gd.screen,Zd=Gd.absolute,Qd=function(t,e,n){var r=pn(n.root).dom,o=function(e){var n=mn(e),r=mn(t.element);return sn(n,r)};return R.from(r.frameElement).map(ee.fromDom).filter(o).map(mr)},tm=function(t,e,n){var r=mn(t.element),o=Pr(r),i=Qd(t,e,n).getOr(o);return Zd(i,o.left,o.top)},em=function(t,e,n,r){var o=Jd(lr(t,e));return R.some(Xr(o,n,r))},nm=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],a=Lf(r,(function(){return Yd(i)}),(function(){return Yd(i)}),(function(){return Kd(i)})),u=Kr(a.left,a.top,t.width,t.height),c=n.showAbove?Jl():Ql(),s=n.showAbove?Zl():tf(),l=Fd(o,n,c,s,c,s,R.none());return Vd({anchorBox:u,bubble:n.bubble.getOr(Dd()),overrides:n.overrides,layouts:l,placer:R.none()})}))},rm=function(t,e,n){var r=tm(t,n,e);return e.node.filter(Rn).bind((function(o){var i=o.dom.getBoundingClientRect(),a=em(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return nm(a,r,e,n,u)}))},om=[Ti("node"),Ti("root"),Fi("bubble"),Id(),Xi("overrides",{}),Xi("showAbove",!1),fl("placement",rm)],im="\ufeff",am=" ",um=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},cm={create:um},sm=aa.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),lm=function(t,e,n,r){return t.fold(e,n,r)},fm=function(t){return t.fold(w,w,w)},dm=sm.before,mm=sm.on,hm=sm.after,gm={before:dm,on:mm,after:hm,cata:lm,getStart:fm},pm=aa.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),vm=function(t){return pm.exact(t.start,t.soffset,t.finish,t.foffset)},bm=function(t){return t.match({domRange:function(t){return ee.fromDom(t.startContainer)},relative:function(t,e){return gm.getStart(t)},exact:function(t,e,n,r){return t}})},ym=pm.domRange,xm=pm.relative,wm=pm.exact,Cm=function(t){var e=bm(t);return pn(e)},Sm=cm.create,km={domRange:ym,relative:xm,exact:wm,exactFromRange:vm,getWin:Cm,range:Sm},zm=function(t,e){e.fold((function(e){t.setStartBefore(e.dom)}),(function(e,n){t.setStart(e.dom,n)}),(function(e){t.setStartAfter(e.dom)}))},Om=function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))},Mm=function(t,e,n){var r=t.document.createRange();return zm(r,e),Om(r,n),r},_m=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Tm=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Em=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?R.some(n).map(Tm):R.none()},Am=function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?R.some(e).map(Tm):R.none()},Hm=aa.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Dm=function(t,e,n){return e(ee.fromDom(n.startContainer),n.startOffset,ee.fromDom(n.endContainer),n.endOffset)},Vm=function(t,e){return e.match({domRange:function(t){return{ltr:x(t),rtl:R.none}},relative:function(e,n){return{ltr:he((function(){return Mm(t,e,n)})),rtl:he((function(){return R.some(Mm(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:he((function(){return _m(t,e,n,r,o)})),rtl:he((function(){return R.some(_m(t,r,o,e,n))}))}}})},Bm=function(t,e){var n=e.ltr();if(n.collapsed){var r=e.rtl().filter((function(t){return!1===t.collapsed}));return r.map((function(t){return Hm.rtl(ee.fromDom(t.endContainer),t.endOffset,ee.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Dm(t,Hm.ltr,n)}))}return Dm(t,Hm.ltr,n)},Rm=function(t,e){var n=Vm(t,e);return Bm(t,n)},Pm=function(t,e){var n=Rm(t,e);return n.match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};Hm.ltr,Hm.rtl;var Lm,Im=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?R.from(e.dom.nodeValue):R.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},Fm=Im(fe,"text"),Nm=function(t){return Fm.get(t)},jm=function(t){return Fm.getOption(t)},Um=function(t){return"img"===ue(t)?1:jm(t).fold((function(){return wn(t).length}),(function(t){return t.length}))},Wm=function(t){return jm(t).filter((function(t){return 0!==t.trim().length||t.indexOf(am)>-1})).isSome()},Gm=["img","br"],qm=function(t){var e=Wm(t);return e||j(Gm,ue(t))},$m=function(t){return Xm(t,qm)},Xm=function(t,e){var n=function(t){for(var r=wn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return R.some(i);var a=n(i);if(a.isSome())return a}return R.none()};return n(t)},Km=function(t,e){return un(e,t)},Ym=function(t,e,n,r){var o=mn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Jm=function(t,e,n,r){var o=Ym(t,e,n,r),i=sn(t,n)&&e===r;return o.collapsed&&!i},Zm=function(t){return R.from(t.getSelection())},Qm=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return R.some(cm.create(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(n.endContainer),n.endOffset))}return R.none()},th=function(t){if(null===t.anchorNode||null===t.focusNode)return Qm(t);var e=ee.fromDom(t.anchorNode),n=ee.fromDom(t.focusNode);return Jm(e,t.anchorOffset,n,t.focusOffset)?R.some(cm.create(e,t.anchorOffset,n,t.focusOffset)):Qm(t)},eh=function(t){return Zm(t).filter((function(t){return t.rangeCount>0})).bind(th)},nh=function(t,e){var n=Pm(t,e);return Em(n)},rh=function(t,e){var n=Pm(t,e);return Am(n)},oh=function(t,e){return{element:t,offset:e}},ih=function(t,e){var n=wn(t);if(0===n.length)return oh(t,e);if(e"})),ai()),Cp=Mi("schema",(function(){return[Fi("preprocess")]})),Sp=Xi("defaults",x({})),kp=Xi("overrides",x({})),zp=ti([bp,yp,xp,wp,Sp,kp]),Op=ti([bp,yp,xp,Sp,kp]),Mp=ti([bp,yp,xp,wp,Sp,kp]),_p=ti([bp,Cp,xp,Ti("unit"),wp,Sp,kp]),Tp=function(t){return t.fold(R.some,R.none,R.some,R.some)},Ep=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},Ap=function(t){return t.fold(w,w,w,w)},Hp=function(t,e){return function(n){var r=Ci("Converting part type",e,n);return t(r)}},Dp=Hp(vp.required,zp),Vp=Hp(vp.external,Op),Bp=Hp(vp.optional,Mp),Rp=Hp(vp.group,_p),Pp=x("entirety"),Lp=Object.freeze({__proto__:null,required:Dp,external:Vp,optional:Bp,group:Rp,asNamedPart:Tp,name:Ep,asCommon:Ap,original:Pp}),Ip=function(t,e,n,r){return Co(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},Fp=function(t,e,n){var r={},o={};return $(n,(function(t){t.fold((function(t){r[t.pname]=hp(!0,(function(e,n,r){return t.factory.sketch(Ip(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=x(t.factory.sketch(Ip(e,t,n[Pp()]),n))}),(function(t){r[t.pname]=hp(!1,(function(e,n,r){return t.factory.sketch(Ip(e,t,n,r))}))}),(function(t){r[t.pname]=gp(!0,(function(e,n,r){var o=e[t.name];return q(o,(function(n){return t.factory.sketch(Co(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:x(r),externals:x(o)}},Np=function(t,e){var n={};return $(e,(function(e){Tp(e).each((function(e){var r=jp(t,e.pname);n[e.name]=function(n){var o=Ci("Part: "+e.name+" in "+t,ti(e.schema),n);return T(T({},r),{config:n,validated:o})}}))})),n},jp=function(t,e){return{uiType:pp(),owner:t,name:e}},Up=function(t,e,n){return{uiType:pp(),owner:t,name:e,config:n,validated:{}}},Wp=function(t){return rt(t,(function(t){return t.fold(R.none,R.some,R.none,R.none).map((function(t){return Pi(t.name,t.schema.concat([dl(Pp())]))})).toArray()}))},Gp=function(t){return q(t,Ep)},qp=function(t,e,n){return Fp(t,e,n)},$p=function(t,e,n){return mp(R.some(t),e,e.components,n)},Xp=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},Kp=function(t,e,n){return Xp(t,e,n).getOrDie("Could not find part: "+n)},Yp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return $(n,(function(t){r[t]=x(i.getByUid(o[t]))})),r},Jp=function(t,e){var n=t.getSystem();return bt(e.partUids,(function(t,e){return x(n.getByUid(t))}))},Zp=function(t){return gt(t.partUids)},Qp=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return $(n,(function(t){r[t]=x(i.getByUid(o[t]).getOrDie())})),r},tv=function(t,e){var n=Gp(e);return ha(q(n,(function(e){return{key:e,value:t+"-"+e}})))},ev=function(t){return Oi("partUids","partUids",_o((function(e){return tv(e.uid,t)})),ai())},nv=Object.freeze({__proto__:null,generate:Np,generateOne:Up,schemas:Wp,names:Gp,substitutes:qp,components:$p,defaultUids:tv,defaultUidsSchema:ev,getAllParts:Jp,getAllPartNames:Zp,getPart:Xp,getPartOrDie:Kp,getParts:Yp,getPartsOrDie:Qp}),rv=function(t,e){var n=t.length>0?[Pi("parts",t)]:[];return n.concat([Ti("uid"),Xi("dom",{}),Xi("components",[]),dl("originalSpec"),Xi("debug.sketcher",{})]).concat(e)},ov=function(t,e,n,r,o){var i=rv(r,o);return Ci(t+" [SpecSchema]",Qo(i.concat(e)),n)},iv=function(t,e,n,r){var o=cv(r),i=ov(t,e,o,[],[]);return n(i,o)},av=function(t,e,n,r,o){var i=cv(o),a=Wp(n),u=ev(n),c=ov(t,e,i,a,[u]),s=qp(t,c,n),l=$p(t,c,s.internals());return r(c,l,i,s.externals())},uv=function(t){return Mt(t,"uid")},cv=function(t){return uv(t)?t:T(T({},t),{uid:dc("uid")})},sv=function(t){return void 0!==t.uid},lv=Qo([Ti("name"),Ti("factory"),Ti("configFields"),Xi("apis",{}),Xi("extraApis",{})]),fv=Qo([Ti("name"),Ti("factory"),Ti("configFields"),Ti("partFields"),Xi("apis",{}),Xi("extraApis",{})]),dv=function(t){var e=Ci("Sketcher for "+t.name,lv,t),n=function(t){return iv(e.name,e.configFields,e.factory,t)},r=bt(e.apis,Sc),o=bt(e.extraApis,(function(t,e){return bc(t,e)}));return T(T({name:e.name,configFields:e.configFields,sketch:n},r),o)},mv=function(t){var e=Ci("Sketcher for "+t.name,fv,t),n=function(t){return av(e.name,e.configFields,e.partFields,e.factory,t)},r=Np(e.name,e.partFields),o=bt(e.apis,Sc),i=bt(e.extraApis,(function(t,e){return bc(t,e)}));return T(T({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:n,parts:r},o),i)},hv=function(t){return"input"===ue(t)&&"radio"!==jn(t,"type")||"textarea"===ue(t)},gv=function(t,e,n){return e.find(t)},pv=Object.freeze({__proto__:null,getCurrent:gv}),vv=[Ti("find")],bv=gf({fields:vv,name:"composing",apis:pv}),yv=["input","button","textarea","select"],xv=function(t,e,n){var r=e.disabled()?_v:Tv;r(t,e)},wv=function(t,e){return!0===e.useNative&&j(yv,ue(t.element))},Cv=function(t){return Wn(t.element,"disabled")},Sv=function(t){Fn(t.element,"disabled","disabled")},kv=function(t){Gn(t.element,"disabled")},zv=function(t){return"true"===jn(t.element,"aria-disabled")},Ov=function(t){Fn(t.element,"aria-disabled","true")},Mv=function(t){Fn(t.element,"aria-disabled","false")},_v=function(t,e,n){e.disableClass.each((function(e){is(t.element,e)}));var r=wv(t,e)?Sv:Ov;r(t),e.onDisabled(t)},Tv=function(t,e,n){e.disableClass.each((function(e){us(t.element,e)}));var r=wv(t,e)?kv:Mv;r(t),e.onEnabled(t)},Ev=function(t,e){return wv(t,e)?Cv(t):zv(t)},Av=function(t,e,n,r){var o=r?_v:Tv;o(t,e)},Hv=Object.freeze({__proto__:null,enable:Tv,disable:_v,isDisabled:Ev,onLoad:xv,set:Av}),Dv=function(t,e){return Ec({classes:e.disabled()?e.disableClass.toArray():[]})},Vv=function(t,e){return _u([Tu(eu(),(function(e,n){return Ev(e,t)})),uf(t,e,xv)])},Bv=Object.freeze({__proto__:null,exhibit:Dv,events:Vv}),Rv=[ta("disabled",O),Xi("useNative",!0),Fi("disableClass"),ul("onDisabled"),ul("onEnabled")],Pv=gf({fields:Rv,name:"disabling",active:Bv,apis:Hv}),Lv=function(t,e,n,r){var o=Km(t.element,"."+e.highlightClass);$(o,(function(n){U(r,(function(t){return t.element===n}))||(us(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),Cu(n,wu())})))}))},Iv=function(t,e,n){return Lv(t,e,n,[])},Fv=function(t,e,n,r){qv(t,e,n,r)&&(us(r.element,e.highlightClass),e.onDehighlight(t,r),Cu(r,wu()))},Nv=function(t,e,n,r){Lv(t,e,n,[r]),qv(t,e,n,r)||(is(r.element,e.highlightClass),e.onHighlight(t,r),Cu(r,xu()))},jv=function(t,e,n){Kv(t,e).each((function(r){Nv(t,e,n,r)}))},Uv=function(t,e,n){Yv(t,e).each((function(r){Nv(t,e,n,r)}))},Wv=function(t,e,n,r){Xv(t,e,n,r).fold((function(t){throw t}),(function(r){Nv(t,e,n,r)}))},Gv=function(t,e,n,r){var o=tb(t,e),i=tt(o,r);i.each((function(r){Nv(t,e,n,r)}))},qv=function(t,e,n,r){return cs(r.element,e.highlightClass)},$v=function(t,e,n){return Ls(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Xv=function(t,e,n,r){var o=Km(t.element,"."+e.itemClass);return R.from(o[r]).fold((function(){return ro.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},Kv=function(t,e,n){return Ls(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Yv=function(t,e,n){var r=Km(t.element,"."+e.itemClass),o=r.length>0?R.some(r[r.length-1]):R.none();return o.bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Jv=function(t,e,n,r){var o=Km(t.element,"."+e.itemClass),i=et(o,(function(t){return cs(t,e.highlightClass)}));return i.bind((function(e){var n=Ml(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},Zv=function(t,e,n){return Jv(t,e,n,-1)},Qv=function(t,e,n){return Jv(t,e,n,1)},tb=function(t,e,n){var r=Km(t.element,"."+e.itemClass);return At(q(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},eb=Object.freeze({__proto__:null,dehighlightAll:Iv,dehighlight:Fv,highlight:Nv,highlightFirst:jv,highlightLast:Uv,highlightAt:Wv,highlightBy:Gv,isHighlighted:qv,getHighlighted:$v,getFirst:Kv,getLast:Yv,getPrevious:Zv,getNext:Qv,getCandidates:tb}),nb=[Ti("highlightClass"),Ti("itemClass"),ul("onHighlight"),ul("onDehighlight")],rb=gf({fields:nb,name:"highlighting",apis:eb}),ob=[8],ib=[9],ab=[13],ub=[27],cb=[32],sb=[37],lb=[38],fb=[39],db=[40],mb=function(t,e,n){var r=it(t.slice(0,e)),o=it(t.slice(e+1));return tt(r.concat(o),n)},hb=function(t,e,n){var r=it(t.slice(0,e));return tt(r,n)},gb=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return tt(o.concat(r),n)},pb=function(t,e,n){var r=t.slice(e+1);return tt(r,n)},vb=function(t){return function(e){var n=e.raw;return j(t,n.which)}},bb=function(t){return function(e){return ot(t,(function(t){return t(e)}))}},yb=function(t){var e=t.raw;return!0===e.shiftKey},xb=function(t){var e=t.raw;return!0===e.ctrlKey},wb=k(yb),Cb=function(t,e){return{matches:t,classification:e}},Sb=function(t,e){var n=tt(t,(function(t){return t.matches(e)}));return n.map((function(t){return t.classification}))},kb=function(t,e,n){var r=e.exists((function(t){return n.exists((function(e){return sn(e,t)}))}));r||Su(t,pu(),{prevFocus:e,newFocus:n})},zb=function(){var t=function(t){return Mf(t.element)},e=function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);kb(e,r,o)};return{get:t,set:e}},Ob=function(){var t=function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},e=function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(p,(function(t){rb.highlight(e,t)}));var o=t(e);kb(e,r,o)};return{get:t,set:e}};(function(t){t["OnFocusMode"]="onFocus",t["OnEnterOrSpaceMode"]="onEnterOrSpace",t["OnApiMode"]="onApi"})(Lm||(Lm={}));var Mb=function(t,e,n,r,o){var i=function(){return t.concat([Xi("focusManager",zb()),Ki("focusInside","onFocus",vi((function(t){return j(["onFocus","onEnterOrSpace","onApi"],t)?ro.value(t):ro.error("Invalid value for focusInside")}))),fl("handler",c),fl("state",e),fl("sendFocusIn",o)])},a=function(t,e,n,r,o){var i=n(t,e,r,o);return Sb(i,e.event).bind((function(n){return n(t,e,r,o)}))},u=function(t,e){var i=t.focusInside!==Lm.OnFocusMode?R.none():o(t).map((function(n){return Hu(Ja(),(function(r,o){n(r,t,e),o.stop()}))})),u=function(n,r){var i=vb(cb.concat(ab))(r.event);t.focusInside===Lm.OnEnterOrSpaceMode&&i&&wa(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))},c=[Hu(Fa(),(function(r,o){a(r,o,n,t,e).fold((function(){u(r,o)}),(function(t){o.stop()}))})),Hu(Na(),(function(n,o){a(n,o,r,t,e).each((function(t){o.stop()}))}))];return _u(i.toArray().concat(c))},c={schema:i,processKey:a,toEvents:u};return c},_b=function(t){var e=[Fi("onEscape"),Fi("onEnter"),Xi("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Xi("firstTabstop",0),Xi("useTabstopAt",M),Fi("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return Is(e,t)})).getOr(e);return ar(n)>0},r=function(t,e){var r=Km(t.element,e.selector),o=Y(r,(function(t){return n(e,t)}));return R.from(o[e.firstTabstop])},o=function(t,e){return e.focusManager.get(t).bind((function(t){return Is(t,e.selector)}))},i=function(t,e){return n(t,e)&&t.useTabstopAt(e)},a=function(t,e,n){r(t,e).each((function(n){e.focusManager.set(t,n)}))},u=function(t,e,n,r,o){return o(e,n,(function(t){return i(r,t)})).fold((function(){return r.cyclic?R.some(!0):R.none()}),(function(e){return r.focusManager.set(t,e),R.some(!0)}))},c=function(t,e,n,r){var i=Km(t.element,n.selector);return o(t,n).bind((function(e){var o=et(i,S(sn,e));return o.bind((function(e){return u(t,i,e,n,r)}))}))},s=function(t,e,n){var r=n.cyclic?mb:hb;return c(t,e,n,r)},l=function(t,e,n){var r=n.cyclic?gb:pb;return c(t,e,n,r)},f=function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))},d=function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))},m=x([Cb(bb([yb,vb(ib)]),s),Cb(vb(ib),l),Cb(vb(ub),d),Cb(bb([wb,vb(ab)]),f)]),h=x([]);return Mb(e,kc.init,m,h,(function(){return R.some(a)}))},Tb=_b(Mi("cyclic",O)),Eb=_b(Mi("cyclic",M)),Ab=function(t,e,n){return zu(t,n,eu()),R.some(!0)},Hb=function(t,e,n){var r=hv(n)&&vb(cb)(e.event);return r?R.none():Ab(t,e,n)},Db=function(t,e){return R.some(!0)},Vb=[Xi("execute",Hb),Xi("useSpace",!1),Xi("useEnter",!0),Xi("useControlEnter",!1),Xi("useDown",!1)],Bb=function(t,e,n){return n.execute(t,e,t.element)},Rb=function(t,e,n,r){var o=n.useSpace&&!hv(t.element)?cb:[],i=n.useEnter?ab:[],a=n.useDown?db:[],u=o.concat(i).concat(a);return[Cb(vb(u),Bb)].concat(n.useControlEnter?[Cb(bb([xb,vb(ab)]),Bb)]:[])},Pb=function(t,e,n,r){return n.useSpace&&!hv(t.element)?[Cb(vb(cb),Db)]:[]},Lb=Mb(Vb,kc.init,Rb,Pb,(function(){return R.none()})),Ib=function(){var t=od(),e=function(e,n){t.set({numRows:e,numColumns:n})},n=function(){return t.get().map((function(t){return t.numRows}))},r=function(){return t.get().map((function(t){return t.numColumns}))};return zc({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:e,getNumRows:n,getNumColumns:r})},Fb=function(t){return t.state(t)},Nb=Object.freeze({__proto__:null,flatgrid:Ib,init:Fb}),jb=function(t){return function(e,n,r,o){var i=t(e.element);return qb(i,e,n,r,o)}},Ub=function(t,e){var n=Bd(t,e);return jb(n)},Wb=function(t,e){var n=Bd(e,t);return jb(n)},Gb=function(t){return function(e,n,r,o){return qb(t,e,n,r,o)}},qb=function(t,e,n,r,o){var i=r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)}));return i.map((function(t){return r.focusManager.set(e,t),!0}))},$b=Gb,Xb=Gb,Kb=Gb,Yb=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Jb=function(t){return!Yb(t.dom)},Zb=function(t,e){return et(t,e).map((function(e){return{index:e,candidates:t}}))},Qb=function(t,e,n){var r=function(t){return sn(t,e)},o=Km(t,n),i=Y(o,Jb);return Zb(i,r)},ty=function(t,e){return et(t,(function(t){return sn(e,t)}))},ey=function(t,e,n,r){var o=Math.floor(e/n),i=e%n;return r(o,i).bind((function(e){var r=e.row*n+e.column;return r>=0&&r1?R.some(t.slice(1)):R.none()}))},h=function(t){return Ot(n.get(),t)},g=function(t){return p(t).bind(Gw)},p=function(t){return Ot(e.get(),t)},v=function(e){return Ot(t.get(),e)},b=function(t){var e=o.get();return at(gt(e),t)},y=function(){return r.get().bind(g)},x=function(){return e.get()};return{setMenuBuilt:u,setContents:c,expand:d,refresh:h,collapse:m,lookupMenu:p,lookupItem:v,otherMenus:b,getPrimary:y,getMenus:x,clear:i,isClear:a,getTriggeringPath:f}},Gw=function(t){return"prepared"===t.type?R.some(t.menu):R.none()},qw={init:Ww,extractPreparedMenu:Gw},$w=function(t,e){var n,r=od(),o=function(e,n,r){return bt(r,(function(r,o){var i=function(){return Fw.sketch(T(T({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Ob():zb()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))},i=qw.init(),a=function(e){var n=o(e,t.data.primary,t.data.menus),r=s();return i.setContents(t.data.primary,n,t.data.expansions,r),i.getPrimary()},u=function(t){return tp.getValue(t).value},c=function(t,e,n){return ht(e,(function(t){if(!t.getSystem().isConnected())return R.none();var e=rb.getCandidates(t);return tt(e,(function(t){return u(t)===n}))}))},s=function(e){return bt(t.data.menus,(function(t,e){return rt(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=function(t,e){rb.highlight(t,e),rb.getHighlighted(e).orThunk((function(){return rb.getFirst(e)})).each((function(e){zu(t,e.element,nu())}))},f=function(t,e){return At(q(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?R.some(t.menu):R.none()}))})))},d=function(e,n,r){var o=f(n,n.otherMenus(r));$(o,(function(n){ls(n.element,[t.markers.backgroundMenu]),t.stayInDom||Ix.remove(e,n)}))},m=function(e){return r.get().getOrThunk((function(){var n={},o=Km(e.element,"."+t.markers.item),i=Y(o,(function(t){return"true"===jn(t,"aria-haspopup")}));return $(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=u(t);n[e]=t}))})),r.set(n),n}))},h=function(t,e){var n=m(t);vt(n,(function(t,n){var r=j(e,n);Fn(t.element,"aria-expanded",r)}))},g=function(e,n,r){return R.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return R.none();var i=o.menu,a=f(n,r.slice(1));return $(a,(function(e){is(e.element,t.markers.backgroundMenu)})),Rn(i.element)||Ix.append(e,_s(i)),ls(i.element,[t.markers.backgroundMenu]),l(e,i),d(e,n,r),R.some(i)}))}))};(function(t){t[t["HighlightSubmenu"]=0]="HighlightSubmenu",t[t["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var v=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return i.setMenuBuilt(e,r),r}return n.menu},b=function(e,r,o){if(void 0===o&&(o=n.HighlightSubmenu),r.hasConfigured(Pv)&&Pv.isDisabled(r))return R.some(r);var a=u(r);return i.expand(a).bind((function(a){return h(e,a),R.from(a[0]).bind((function(u){return i.lookupMenu(u).bind((function(c){var s=v(e,u,c);return Rn(s.element)||Ix.append(e,_s(s)),t.onOpenSubmenu(e,r,s,it(a)),o===n.HighlightSubmenu?(rb.highlightFirst(s),g(e,i,a)):(rb.dehighlightAll(s),R.some(r))}))}))}))},y=function(e,n){var r=u(n);return i.collapse(r).bind((function(r){return h(e,r),g(e,i,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},x=function(t,e){var n=u(e);return i.refresh(n).bind((function(e){return h(t,e),g(t,i,e)}))},w=function(t,e){return hv(e.element)?R.none():b(t,e,n.HighlightSubmenu)},C=function(t,e){return hv(e.element)?R.none():y(t,e)},S=function(e,n){return y(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))},k=function(e){return function(n,r){return Is(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(M)}))}))}},z=_u([Hu(Lw(),(function(t,e){var n=e.event.item;i.lookupItem(u(n)).each((function(){var n=e.event.menu;rb.highlight(t,n);var r=u(e.event.item);i.refresh(r).each((function(e){return d(t,i,e)}))}))})),Gu((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){var o=u(r);0===o.indexOf("collapse-item")&&y(e,r),b(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),p)}))})),ju((function(e,n){a(e).each((function(n){Ix.append(e,_s(n)),t.onOpenMenu(e,n),t.highlightImmediately&&l(e,n)}))}))].concat(t.navigateOnHover?[Hu(Cw(),(function(e,r){var o=r.event.item;x(e,o),b(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),O=function(t){return rb.getHighlighted(t).bind(rb.getHighlighted)},_=function(t){O(t).each((function(e){y(t,e)}))},E=function(t){i.getPrimary().each((function(e){l(t,e)}))},A=function(t){return R.from(t.components()[0]).filter((function(t){return"menu"===jn(t.element,"role")}))},H=function(e){var n=i.getPrimary().bind((function(t){return O(e).bind((function(t){var n=u(t),r=zt(i.getMenus()),o=At(q(r,qw.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return c(e,o,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))}));n.fold((function(){A(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))},D={collapseMenu:_,highlightPrimary:E,repositionMenus:H};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.tmenuBehaviours,[Tx.config({mode:"special",onRight:k(w),onLeft:k(C),onEscape:k(S),focusIn:function(t,e){i.getPrimary().each((function(e){zu(t,e.element,nu())}))}}),rb.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bv.config({find:function(t){return rb.getHighlighted(t)}}),Ix.config({})]),eventOrder:t.eventOrder,apis:D,events:z}},Xw=x("collapse-item"),Kw=function(t,e,n){return{primary:t,menus:e,expansions:n}},Yw=function(t,e){return{primary:t,menus:ma(t,e),expansions:{}}},Jw=function(t){return{value:oc(Xw()),meta:{text:t}}},Zw=dv({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),sl("onOpenMenu"),sl("onOpenSubmenu"),ul("onRepositionMenu"),ul("onCollapseMenu"),Xi("highlightImmediately",!0),Pi("data",[Ti("primary"),Ti("menus"),Ti("expansions")]),Xi("fakeFocus",!1),ul("onHighlight"),ul("onHover"),ol(),Ti("dom"),Xi("navigateOnHover",!0),Xi("stayInDom",!1),ep("tmenuBehaviours",[Tx,rb,bv,Ix]),Xi("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:$w,extraApis:{tieredData:Kw,singleData:Yw,collapseItem:Jw}}),Qw=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Ql()},onRtl:function(){return tf()}}}:{},u=function(t){return 2===t.length},c=function(t){return u(t)?a:{}};return Zw.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return bg.close(e),t.onEscape.map((function(t){return t(e)})),R.some(!0)},onExecute:function(){return R.some(!0)},onOpenMenu:function(t,e){Lh.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Lh.position(o,n,{anchor:T({type:"submenu",item:e},c(r))})},onRepositionMenu:function(t,e,r){var a=i().getOrDie();Lh.positionWithinBounds(a,e,n,o()),$(r,(function(t){var e=c(t.triggeringPath);Lh.position(a,t.triggeredMenu,{anchor:T({type:"submenu",item:t.triggeringItem},e)})}))}})},tC=function(t,e){var n=function(e,n){var r=t.getRelated(e);return r.exists((function(t){return Us(t,n)}))},r=function(t,e){bg.setContent(t,e)},o=function(t,e,n){i(t,e,n,R.none())},i=function(t,e,n,r){a(t,e,n,(function(){return r.map((function(t){return Jr(t)}))}))},a=function(e,n,r,o){var i=t.lazySink(e).getOrDie();bg.openWhileCloaked(e,n,(function(){return Lh.positionWithinBounds(i,e,r,o())})),tp.setValue(e,R.some({mode:"position",config:r,getBounds:o}))},u=function(t,e,n){c(t,e,n,R.none)},c=function(e,n,r,o){var i=Qw(t,e,n,r,o);bg.open(e,i),tp.setValue(e,R.some({mode:"menu",menu:i}))},s=function(t){bg.isOpen(t)&&(tp.setValue(t,R.none()),bg.close(t))},l=function(t){return bg.getState(t)},f=function(e){bg.isOpen(e)&&tp.getValue(e).each((function(n){switch(n.mode){case"menu":bg.getState(e).each(Zw.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Lh.positionWithinBounds(r,e,n.config,n.getBounds());break}}))},d={setContent:r,showAt:o,showWithin:i,showWithinBounds:a,showMenuAt:u,showMenuWithinBounds:c,hide:s,getContent:l,reposition:f,isOpen:bg.isOpen};return{uid:t.uid,dom:t.dom,behaviours:rp(t.inlineBehaviours,[bg.config({isPartOf:function(t,e,r){return Us(e,r)||n(t,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),tp.config({store:{mode:"memory",initialValue:R.none()}}),yf.config({channels:T(T({},Sg(T({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),zg(T(T({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:f})))})]),eventOrder:t.eventOrder,apis:d}},eC=dv({name:"InlineView",configFields:[Ti("lazySink"),ul("onShow"),ul("onHide"),Wi("onEscape"),ep("inlineBehaviours",[bg,tp,yf]),qi("fireDismissalEventInstead",[Xi("event",hu())]),qi("fireRepositionEventInstead",[Xi("event",gu())]),Xi("getRelated",R.none),Xi("isExtraPart",O),Xi("eventOrder",R.none)],factory:tC,apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),nC="layout-inset",rC=function(t){return t.x},oC=function(t,e){return t.x+t.width/2-e.width/2},iC=function(t,e){return t.x+t.width-e.width},aC=function(t){return t.y},uC=function(t,e){return t.y+t.height-e.height},cC=function(t,e){return t.y+t.height/2-e.height/2},sC=function(t,e,n){return hl(iC(t,e),uC(t,e),n.insetSouthwest(),Cl(),"southwest",El(t,{right:0,bottom:3}),nC)},lC=function(t,e,n){return hl(rC(t),uC(t,e),n.insetSoutheast(),wl(),"southeast",El(t,{left:1,bottom:3}),nC)},fC=function(t,e,n){return hl(iC(t,e),aC(t),n.insetNorthwest(),xl(),"northwest",El(t,{right:0,top:2}),nC)},dC=function(t,e,n){return hl(rC(t),aC(t),n.insetNortheast(),yl(),"northeast",El(t,{left:1,top:2}),nC)},mC=function(t,e,n){return hl(oC(t,e),aC(t),n.insetNorth(),Sl(),"north",El(t,{top:2}),nC)},hC=function(t,e,n){return hl(oC(t,e),uC(t,e),n.insetSouth(),kl(),"south",El(t,{bottom:3}),nC)},gC=function(t,e,n){return hl(iC(t,e),cC(t,e),n.insetEast(),Ol(),"east",El(t,{right:0}),nC)},pC=function(t,e,n){return hl(rC(t),cC(t,e),n.insetWest(),zl(),"west",El(t,{left:1}),nC)},vC=function(t){switch(t){case"north":return mC;case"northeast":return dC;case"northwest":return fC;case"south":return hC;case"southeast":return lC;case"southwest":return sC;case"east":return gC;case"west":return pC}},bC=function(t,e,n,r,o){var i=qf(r).map(vC).getOr(mC);return i(t,e,n,r,o)},yC=function(t){switch(t){case"north":return hC;case"northeast":return lC;case"northwest":return sC;case"south":return mC;case"southeast":return dC;case"southwest":return fC;case"east":return pC;case"west":return gC}},xC=function(t,e,n,r,o){var i=qf(r).map(yC).getOr(mC);return i(t,e,n,r,o)},wC=tinymce.util.Tools.resolve("tinymce.util.Delay"),CC=function(t){var e=vw(t.action),n=t.dom.tag,r=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},o=function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return T({type:t},e)}var o=r("role").getOr("button");return{role:o}};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:op.augment(t.buttonBehaviours,[Yx.config({}),Tx.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:o()},eventOrder:t.eventOrder}},SC=dv({name:"Button",factory:CC,configFields:[Xi("uid",void 0),Ti("dom"),Xi("components",[]),op.field("buttonBehaviours",[Yx,Tx]),Fi("action"),Fi("role"),Xi("eventOrder",{})]}),kC=function(t){var e=sv(t)&&_t(t,"uid")?t.uid:dc("memento"),n=function(t){return t.getSystem().getByUid(e).getOrDie()},r=function(t){return t.getSystem().getByUid(e).toOptional()},o=function(){return T(T({},t),{uid:e})};return{get:n,getOpt:r,asSpec:o}},zC=tinymce.util.Tools.resolve("tinymce.util.I18n"),OC={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},MC="temporary-placeholder",_C=function(t){return function(){return Ot(t,MC).getOr("!not found!")}},TC=function(t,e){var n=t.toLowerCase();if(zC.isRtl()){var r=Nt(n,"-rtl");return Mt(e,r)?r:n}return n},EC=function(t,e){return Ot(e,TC(t,e))},AC=function(t,e){var n=e();return EC(t,n).getOrThunk(_C(n))},HC=function(t,e,n){var r=e();return EC(t,r).or(n).getOrThunk(_C(r))},DC=function(t){return!!zC.isRtl()&&Mt(OC,t)},VC=function(){return Nx("add-focusable",[ju((function(t){Ps(t.element,"svg").each((function(t){return Fn(t,"focusable","false")}))}))])},BC=function(t,e,n,r){var o,i,a=DC(e)?["tox-icon--flip"]:[],u=Ot(n,TC(e,n)).or(r).getOrThunk(_C(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(a),innerHtml:u},behaviours:mf(A(A([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[VC()],!1))}},RC=function(t,e,n,r){return void 0===r&&(r=R.none()),BC(e,t,n(),r)},PC=function(t,e,n){var r=n(),o=tt(t,(function(t){return Mt(r,TC(t,r))}));return BC(e,o.getOr(MC),r,R.none())},LC={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},IC=function(t){var e=kC({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:mf([Ix.config({})])}),n=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},r=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},o=kC({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:mf([Ix.config({})])}),i=function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each((function(t){Ix.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])}))},a=function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Ix.set(r,[Ss(n)])}},u={updateProgress:i,updateText:a},c=nt([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return R.from(LC[t])})).toArray()]),s=kC(SC.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[RC("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),l=PC(c,{tag:"div",classes:["tox-notification__icon"]},t.iconProvider),f={dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:mf([Ix.config({})])},d=[l,f];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:mf([Yx.config({}),Nx("notification-events",[Hu(La(),(function(t){s.getOpt(t).each(Yx.focus)}))])]),components:d.concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[s.asSpec()]:[]),apis:u}},FC=dv({name:"Notification",factory:IC,configFields:[Fi("level"),Ti("progress"),Ti("icon"),Ti("onAction"),Ti("text"),Ti("iconProvider"),Ti("translationProvider"),Qi("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function NC(t,e,n){var r=e.backstage.shared,o=function(t){switch(t){case"bc-bc":return hC;case"tc-tc":return mC;case"tc-bc":return Gl;case"bc-tc":default:return ql}},i=function(t){t.length>0&&$(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},a=function(e,i){var a=!e.closeButton&&e.timeout&&(e.timeout>0||e.timeout<0),u=function(){i(),eC.hide(s)},c=Ms(FC.sketch({text:e.text,level:j(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:R.from(e.icon),closeButton:!a,onAction:u,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),s=Ms(eC.sketch(T({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));n.add(s),e.timeout>0&&wC.setTimeout((function(){u()}),e.timeout);var l=function(){var e=Jr(ee.fromDom(t.getContentAreaContainer())),n=Qr(),r=_l(n.x,e.x,e.right),o=_l(n.y,e.y,e.bottom),i=Math.max(e.right,n.right),a=Math.max(e.bottom,n.bottom);return R.some(Yr(r,o,i-r,a-o))};return{close:u,moveTo:function(t,e){eC.showAt(s,_s(c),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n=_s(c),i={maxHeightFunction:Md()};if("banner"!==e&&d(t)){var a=o(e),u={type:"node",root:Pn(),node:R.some(ee.fromDom(t)),overrides:i,layouts:{onRtl:function(){return[a]},onLtr:function(){return[a]}}};eC.showWithinBounds(s,n,{anchor:u},l)}else{var f=T(T({},r.anchors.banner()),{overrides:i});eC.showWithinBounds(s,n,{anchor:f},l)}},text:function(t){FC.updateText(c,t)},settings:e,getEl:function(){return c.element.dom},progressBar:{value:function(t){FC.updateProgress(c,t)}}}},u=function(t){t.close()},c=function(t){return t.settings};return{open:a,close:u,reposition:i,getArgs:c}}var jC,UC=function(t,e){var n=null,r=function(){c(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o',t.getDoc());return Er(n,ee.fromDom(e.extractContents())),e.insertNode(n.dom),vn(n).each((function(t){return t.dom.normalize()})),$m(n).map((function(e){t.selection.setCursorLocation(e.dom,Um(e))})),n}))},YC=function(t){return Is(t,XC)},JC=function(t){return t.collapsed&&3===t.startContainer.nodeType},ZC=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},QC=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},tS=function(t,e){return t.substring(e.length)},eS=function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(QC(o))return R.none();if(o===n)break}return R.some(r)},nS=function(t,e,n,r){if(void 0===r&&(r=0),!JC(e))return R.none();var o=function(t,e,r){return eS(r,e,n).getOr(e)},i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return $C(t,e.startContainer,e.startOffset,o,i).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return R.none();var i=ZC(o),a=i.lastIndexOf(n);return 0!==a||tS(i,n).length0?lS(e[e.length-1]):uS(t,e.length)},fS=function(t,e){var n=t.childNodes;return n.length>0&&e0&&sS(t)&&n.length===e?lS(n[n.length-1]):uS(t,e)},dS=function(t,e){return $C(t,e.container,e.offset,(function(t,e){return 0===e?-1:e}),t.getRoot()).filter((function(t){var e=t.container.data.charAt(t.offset-1);return!QC(e)})).isSome()},mS=function(t){return function(e){var n=fS(e.startContainer,e.startOffset);return!dS(t,n)}},hS=function(t,e,n){return ht(n.triggerChars,(function(n){return rS(t,e,n)}))},gS=function(t,e){var n=e(),r=t.selection.getRng();return hS(t.dom,r,n).bind((function(n){return pS(t,e,n)}))},pS=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng(),a=i.startContainer.nodeValue,u=Y(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return mS(t.dom)}))(n.range,a,n.text)}));if(0===u.length)return R.none();var c=aS.all(q(u,(function(t){var e=t.fetch(n.text,t.maxResults,r);return e.then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return R.some({lookupData:c,context:n})},vS=ti([Hi("type"),Ui("text")]),bS=function(t){return xi("separatormenuitem",vS,t)},yS=ti([Xi("type","autocompleteitem"),Xi("active",!1),Xi("disabled",!1),Xi("meta",{}),Hi("value"),Ui("text"),Ui("icon")]),xS=ti([Hi("type"),Hi("ch"),Yi("minChars",1),Xi("columns",1),Yi("maxResults",10),Wi("matches"),Bi("fetch"),Bi("onAction"),na("highlightOn",[],si)]),wS=function(t){return xi("Autocompleter.Separator",vS,t)},CS=function(t){return xi("Autocompleter.Item",yS,t)},SS=function(t){return xi("Autocompleter",xS,t)},kS=[Qi("disabled",!1),Ui("tooltip"),Ui("icon"),Ui("text"),ta("onSetup",(function(){return p}))],zS=ti([Hi("type"),Bi("onAction")].concat(kS)),OS=function(t){return xi("toolbarbutton",zS,t)},MS=[Qi("active",!1)].concat(kS),_S=ti(MS.concat([Hi("type"),Bi("onAction")])),TS=function(t){return xi("ToggleButton",_S,t)},ES=[ta("predicate",O),Zi("scope","node",["node","editor"]),Zi("position","selection",["node","selection","line"])],AS=kS.concat([Xi("type","contextformbutton"),Xi("primary",!1),Bi("onAction"),Mi("original",w)]),HS=MS.concat([Xi("type","contextformbutton"),Xi("primary",!1),Bi("onAction"),Mi("original",w)]),DS=kS.concat([Xi("type","contextformbutton")]),VS=MS.concat([Xi("type","contextformtogglebutton")]),BS=ki("type",{contextformbutton:AS,contextformtogglebutton:HS}),RS=ti([Xi("type","contextform"),ta("initValue",x("")),Ui("label"),Ii("commands",BS),Ni("launch",ki("type",{contextformbutton:DS,contextformtogglebutton:VS}))].concat(ES)),PS=function(t){return xi("ContextForm",RS,t)},LS=ti([Xi("type","contexttoolbar"),Hi("items")].concat(ES)),IS=function(t){return xi("ContextToolbar",LS,t)},FS=function(t){var e={};return $(t,(function(t){e[t]={}})),gt(e)},NS=function(t){var e=t.ui.registry.getAll().popups,n=bt(e,(function(t){return SS(t).fold((function(t){throw new Error(Si(t))}),w)})),r=FS(St(n,(function(t){return t.ch}))),o=zt(n),i=function(t){return Y(o,(function(e){return e.ch===t}))};return{dataset:n,triggerChars:r,lookupByChar:i}};(function(t){t[t["CLOSE_ON_EXECUTE"]=0]="CLOSE_ON_EXECUTE",t[t["BUBBLE_TO_SANDBOX"]=1]="BUBBLE_TO_SANDBOX"})(jC||(jC={}));var jS,US=jC,WS="tox-menu-nav__js",GS="tox-collection__item",qS="tox-swatch",$S={normal:WS,color:qS},XS="tox-collection__item--enabled",KS="tox-collection__group-heading",YS="tox-collection__item-icon",JS="tox-collection__item-label",ZS="tox-collection__item-accessory",QS="tox-collection__item-caret",tk="tox-collection__item-checkmark",ek="tox-collection__item--active",nk="tox-collection__item-container",rk="tox-collection__item-container--column",ok="tox-collection__item-container--row",ik="tox-collection__item-container--align-right",ak="tox-collection__item-container--align-left",uk="tox-collection__item-container--valign-top",ck="tox-collection__item-container--valign-middle",sk="tox-collection__item-container--valign-bottom",lk=function(t){return Ot($S,t).getOr(WS)},fk=function(t){return"color"===t?"tox-swatches":"tox-menu"},dk=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:fk(t),tieredMenu:"tox-tiered-menu"}},mk=function(t){var e=dk(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:lk(t)}},hk=function(t,e,n){var r=dk(n);return{tag:"div",classes:nt([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},gk=[Fw.parts.items({})],pk=function(t,e,n){var r=dk(n),o={tag:"div",classes:nt([[r.tieredMenu]])};return{dom:o,markers:mk(n)}},vk=function(t,e){return function(n){var r=G(n,e);return q(r,(function(e){return{dom:t,components:e}}))}},bk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Fw.parts.items({preprocess:"auto"!==t?vk({tag:"div",classes:["tox-swatches__row"]},t):w})]}]}},yk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Fw.parts.items({preprocess:vk({tag:"div",classes:["tox-collection__group"]},t)})]}},xk=function(t,e){var n=[],r=[];return $(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],Mt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),q(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},wk=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Fw.parts.items({preprocess:function(n){return"auto"!==t&&t>1?vk({tag:"div",classes:["tox-collection__group"]},t)(n):xk(n,(function(t,n){return"separator"===e[n].type}))}})]}},Ck=function(t,e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Fw.parts.items({preprocess:function(e){return xk(e,(function(e,n){return"separator"===t[n].type}))}})]}},Sk=function(t){return U(t,(function(t){return"icon"in t&&void 0!==t.icon}))},kk=function(t){return console.error(Si(t)),console.log(t),R.none()},zk=function(t,e,n,r,o){var i=Ck(n);return{value:t,dom:i.dom,components:i.components,items:n}},Ok=function(t,e,n,r,o){if("color"===o){var i=bk(r);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&"auto"===r){i=wk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&1===r){i=wk(1,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o){i=wk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("listpreview"===o&&"auto"!==r){i=yk(r);return{value:t,dom:i.dom,components:i.components,items:n}}return{value:t,dom:hk(e,r,o),components:gk,items:n}},Mk=[Hi("type"),Hi("src"),Ui("alt"),na("classes",[],si)],_k=ti(Mk),Tk=[Hi("type"),Hi("text"),Ui("name"),na("classes",["tox-collection__item-label"],si)],Ek=ti(Tk),Ak=Jo((function(){return gi("type",{cardimage:_k,cardtext:Ek,cardcontainer:Hk})})),Hk=ti([Hi("type"),Ji("direction","horizontal"),Ji("align","left"),Ji("valign","middle"),Ii("items",Ak)]),Dk=[Qi("disabled",!1),Ui("text"),Ui("shortcut"),Oi("value","value",zo((function(){return oc("menuitem-value")})),ai()),Xi("meta",{})],Vk=ti([Hi("type"),Ui("label"),Ii("items",Ak),ta("onSetup",(function(){return p})),ta("onAction",p)].concat(Dk)),Bk=function(t){return xi("cardmenuitem",Vk,t)},Rk=ti([Hi("type"),Qi("active",!1),Ui("icon")].concat(Dk)),Pk=function(t){return xi("choicemenuitem",Rk,t)},Lk=[Hi("type"),Hi("fancytype"),ta("onAction",p)],Ik=[Xi("initData",{})].concat(Lk),Fk=[ra("initData",{},[Qi("allowCustomColors",!0),Gi("colors",ai())])].concat(Lk),Nk=ki("fancytype",{inserttable:Ik,colorswatch:Fk}),jk=function(t){return xi("fancymenuitem",Nk,t)},Uk=ti([Hi("type"),ta("onSetup",(function(){return p})),ta("onAction",p),Ui("icon")].concat(Dk)),Wk=function(t){return xi("menuitem",Uk,t)},Gk=ti([Hi("type"),Bi("getSubmenuItems"),ta("onSetup",(function(){return p})),Ui("icon")].concat(Dk)),qk=function(t){return xi("nestedmenuitem",Gk,t)},$k=ti([Hi("type"),Ui("icon"),Qi("active",!1),ta("onSetup",(function(){return p})),Bi("onAction")].concat(Dk)),Xk=function(t){return xi("togglemenuitem",$k,t)},Kk=function(t,e,n){var r=Km(t.element,"."+n);if(r.length>0){var o=et(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return R.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return R.none()},Yk=function(t,e){return mf([Nx(t,e)])},Jk=function(t){return Yk(oc("unnamed-events"),t)},Zk={namedEvents:Yk,unnamedEvents:Jk},Qk=oc("tooltip.exclusive"),tz=oc("tooltip.show"),ez=oc("tooltip.hide"),nz=function(t,e,n){t.getSystem().broadcastOn([Qk],{})},rz=function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Ix.set(t,r)}))},oz=Object.freeze({__proto__:null,hideAllExclusive:nz,setComponents:rz}),iz=function(t,e){var n=function(n){e.getTooltip().each((function(r){$h(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()},r=function(n){if(!e.isShowing()){nz(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:_u("normal"===t.mode?[Hu(Pa(),(function(t){Cu(n,tz)})),Hu(Ba(),(function(t){Cu(n,ez)}))]:[]),behaviours:mf([Ix.config({})])});e.setTooltip(o),Wh(r,o),t.onShow(n,o),Lh.position(r,o,{anchor:t.anchor(n)})}};return _u(nt([[Hu(tz,(function(n){e.resetTimer((function(){r(n)}),t.delay)})),Hu(ez,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Hu(tu(),(function(t,e){var r=e;r.universal||j(r.channels,Qk)&&n(t)})),Uu((function(t){n(t)}))],"normal"===t.mode?[Hu(La(),(function(t){Cu(t,tz)})),Hu(Za(),(function(t){Cu(t,ez)})),Hu(Pa(),(function(t){Cu(t,tz)})),Hu(Ba(),(function(t){Cu(t,ez)}))]:[Hu(xu(),(function(t,e){Cu(t,tz)})),Hu(wu(),(function(t){Cu(t,ez)}))]]))},az=Object.freeze({__proto__:null,events:iz}),uz=[Ti("lazySink"),Ti("tooltipDom"),Xi("exclusive",!0),Xi("tooltipComponents",[]),Xi("delay",300),Zi("mode","normal",["normal","follow-highlight"]),Xi("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:x([ql,Gl,Nl,Ul,jl,Wl]),onRtl:x([ql,Gl,Nl,Ul,jl,Wl])}}})),ul("onHide"),ul("onShow")],cz=function(){var t=od(),e=od(),n=function(){t.on(clearTimeout)},r=function(e,r){n(),t.set(setTimeout(e,r))},o=x("not-implemented");return zc({getTooltip:e.get,isShowing:e.isSet,setTooltip:e.set,clearTooltip:e.clear,clearTimer:n,resetTimer:r,readState:o})},sz=Object.freeze({__proto__:null,init:cz}),lz=gf({fields:uz,name:"tooltipping",active:az,state:sz,apis:oz}),fz=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},dz=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),mz=tinymce.util.Tools.resolve("tinymce.EditorManager"),hz=function(t){var e=t.getParam("skin"),n=t.getParam("skin_url");if(!1!==e){var r=e||"oxide";n=n?t.documentBaseURI.toAbsolute(n):mz.baseURL+"/skins/ui/"+r}return n},gz=function(t){return t.getParam("readonly",!1,"boolean")},pz=function(t){return!1===t.getParam("skin")},vz=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},bz=function(t){return t.getParam("width",dz.DOM.getStyle(t.getElement(),"width"))},yz=function(t){return R.from(t.getParam("min_width")).filter(h)},xz=function(t){return R.from(t.getParam("min_height")).filter(h)},wz=function(t){return R.from(t.getParam("max_width")).filter(h)},Cz=function(t){return R.from(t.getParam("max_height")).filter(h)},Sz=function(t){return R.from(t.getParam("style_formats")).filter(u)},kz=function(t){return t.getParam("style_formats_merge",!1,"boolean")},zz=function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},Oz=function(t){return t.getParam("content_langs",void 0,"array")},Mz=function(t){return t.getParam("removed_menuitems","")},_z=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Tz=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=i(e),o=u(e)&&e.length>0;return!Az(t)&&(o||r||n)},Ez=function(t){var e=W(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),n=Y(e,(function(t){return"string"===typeof t}));return n.length>0?R.some(n):R.none()},Az=function(t){return Ez(t).fold((function(){var e=t.getParam("toolbar",[],"string[]");return e.length>0}),M)};(function(t){t["default"]="wrap",t["floating"]="floating",t["sliding"]="sliding",t["scrolling"]="scrolling"})(jS||(jS={}));var Hz,Dz=function(t){return t.getParam("toolbar_mode","","string")};(function(t){t["auto"]="auto",t["top"]="top",t["bottom"]="bottom"})(Hz||(Hz={}));var Vz,Bz=function(t){return t.getParam("toolbar_groups",{},"object")},Rz=function(t){return t.getParam("toolbar_location",Hz.auto,"string")},Pz=function(t){return Rz(t)===Hz.bottom},Lz=function(t){return t.getParam("fixed_toolbar_container","","string")},Iz=function(t){return t.getParam("fixed_toolbar_container_target")},Fz=function(t){return t.getParam("toolbar_persist",!1,"boolean")},Nz=function(t){if(!t.inline)return R.none();var e=Lz(t);if(e.length>0)return Ls(Pn(),e);var n=Iz(t);return d(n)?R.some(ee.fromDom(n)):R.none()},jz=function(t){return t.inline&&Nz(t).isSome()},Uz=function(t){var e=Nz(t);return e.getOrThunk((function(){return En(Tn(ee.fromDom(t.getElement())))}))},Wz=function(t){return t.inline&&!_z(t)&&!Tz(t)&&!Az(t)},Gz=function(t){var e=t.getParam("toolbar_sticky",!1,"boolean");return(e||t.inline)&&!jz(t)&&!Wz(t)},qz=function(t){return t.getParam("toolbar_sticky_offset",0,"number")},$z=function(t){return t.getParam("draggable_modal",!1,"boolean")},Xz=function(t){var e=t.getParam("menu");return e?bt(e,(function(t){return T(T({},t),{items:t.items})})):{}},Kz=function(t){return t.getParam("menubar")},Yz=function(t){return t.getParam("toolbar",!0)},Jz=function(t){return t.getParam("file_picker_callback")},Zz=function(t){return t.getParam("file_picker_types")},Qz=function(t){return t.getParam("file_browser_callback_types")},tO=function(t){return!1===t.getParam("typeahead_urls")},eO=function(t){return t.getParam("anchor_top","#top")},nO=function(t){return t.getParam("anchor_bottom","#bottom")},rO=function(t){var e=t.getParam("file_picker_validator_handler",void 0,"function");return void 0===e?t.getParam("filepicker_validator_handler",void 0,"function"):e},oO="silver.readonly",iO=ti([Vi("readonly")]),aO=function(t,e){var n=t.outerContainer,r=n.element;e&&(t.mothership.broadcastOn([yg()],{target:r}),t.uiMothership.broadcastOn([yg()],{target:r})),t.mothership.broadcastOn([oO],{readonly:e}),t.uiMothership.broadcastOn([oO],{readonly:e})},uO=function(t,e){t.on("init",(function(){t.mode.isReadOnly()&&aO(e,!0)})),t.on("SwitchMode",(function(){return aO(e,t.mode.isReadOnly())})),gz(t)&&t.setMode("readonly")},cO=function(){var t;return yf.config({channels:(t={},t[oO]={schema:iO,onReceive:function(t,e){Pv.set(t,e.readonly)}},t)})},sO=function(t){return Pv.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},lO=function(t){return Pv.config({disabled:t})},fO=function(t){return Pv.config({disabled:t,disableClass:"tox-tbtn--disabled"})},dO=function(t){return Pv.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},mO={item:sO,button:lO,splitButton:fO,toolbarButton:dO},hO=function(t,e){var n=t.getApi(e);return function(t){t(n)}},gO=function(t,e){return ju((function(n){var r=hO(t,n);r((function(n){var r=t.onSetup(n);m(r)&&e.set(r)}))}))},pO=function(t,e){return Uu((function(n){return hO(t,n)(e.get())}))},vO=function(t,e){return Gu((function(n,r){hO(t,n)(t.onAction),t.triggersSubmenu||e!==US.CLOSE_ON_EXECUTE||(Cu(n,iu()),r.stop())}))},bO=(Vz={},Vz[eu()]=["disabling","alloy.base.behaviour","toggling","item-events"],Vz),yO=At,xO=function(t,e,n,r){var o=oa(p);return{type:"item",dom:e.dom,components:yO(e.optComponents),data:t.data,eventOrder:bO,hasSubmenu:t.triggersSubmenu,itemBehaviours:mf([Nx("item-events",[vO(t,n),gO(t,o),pO(t,o)]),mO.item((function(){return t.disabled||r.isDisabled()})),cO(),Ix.config({})].concat(t.itemBehaviours))}},wO=function(t){return{value:t.value,meta:T({text:t.text.getOr("")},t.meta)}},CO=tinymce.util.Tools.resolve("tinymce.Env"),SO=function(t){var e={alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"},n={meta:"Ctrl",access:"Shift+Alt"},r=CO.mac?e:n,o=t.split("+"),i=q(o,(function(t){var e=t.toLowerCase().trim();return Mt(r,e)?r[e]:t}));return CO.mac?i.join(""):i.join("+")},kO=function(t,e,n){return void 0===n&&(n=[YS]),RC(t,{tag:"div",classes:n},e)},zO=function(t){return{dom:{tag:"div",classes:[JS]},components:[Ss(zC.translate(t))]}},OO=function(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}},MO=function(t,e){return{dom:{tag:"div",classes:[JS]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Ss(zC.translate(e))]}]}},_O=function(t){return{dom:{tag:"div",classes:[ZS],innerHtml:SO(t)}}},TO=function(t){return kO("checkmark",t,[tk])},EO=function(t){return kO("chevron-right",t,[QS])},AO=function(t){return kO("chevron-down",t,[QS])},HO=function(t,e){var n="vertical"===t.direction?rk:ok,r="left"===t.align?ak:ik,o=function(){switch(t.valign){case"top":return uk;case"middle":return ck;case"bottom":return sk}};return{dom:{tag:"div",classes:[nk,n,r,o()]},components:e}},DO=function(t,e,n){return{dom:{tag:"img",classes:e,attributes:{src:t,alt:n.getOr("")}}}},VO=function(t,e,n){var r="custom",o="remove",i=t.ariaLabel,a=t.value,u=t.iconContent.map((function(t){return HC(t,e.icons,n)})),c=function(){var t=qS,n=u.getOr(""),c=i.map((function(t){return{title:e.translate(t)}})).getOr({}),s={tag:"div",attributes:c,classes:[t]};return T(T({},s),a===r?{tag:"button",classes:A(A([],s.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:n}:a===o?{classes:A(A([],s.classes,!0),["tox-swatch--remove"],!1),innerHtml:n}:{attributes:T(T({},s.attributes),{"data-mce-color":a}),styles:{"background-color":a}})};return{dom:c(),optComponents:[]}},BO=function(t){var e=t.map((function(t){return{attributes:{title:zC.translate(t)}}})).getOr({});return T({tag:"div",classes:[WS,GS]},e)},RO=function(t,e,n,r){var o={tag:"div",classes:[YS]},i=function(t){return RC(t,o,e.icons,r)},a=function(){return R.some({dom:o})},u=n?t.iconContent.map(i).orThunk(a):R.none(),c=t.checkMark,s=R.from(t.meta).fold((function(){return zO}),(function(t){return Mt(t,"style")?S(MO,t.style):zO})),l=t.htmlContent.fold((function(){return t.textContent.map(s)}),(function(t){return R.some(OO(t,[JS]))})),f={dom:BO(t.ariaLabel),optComponents:[u,l,t.shortcutContent.map(_O),c,t.caret]};return f},PO=function(t,e,n,r){return void 0===r&&(r=R.none()),"color"===t.presets?VO(t,e,r):RO(t,e,n,r)},LO=function(t,e){return Ot(t,"tooltipWorker").map((function(t){return[lz.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Md}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){lz.setComponents(e,[ks({element:ee.fromDom(t)})])}))}})]})).getOr([])},IO=function(t){return dz.DOM.encode(t)},FO=function(t,e){var n=zC.translate(t),r=IO(n);if(e.length>0){var o=new RegExp(fz(e),"gi");return r.replace(o,(function(t){return''+t+""}))}return r},NO=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=PO({presets:r,textContent:R.none(),htmlContent:n?t.text.map((function(t){return FO(t,e)})):R.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:R.none(),checkMark:R.none(),caret:R.none(),value:t.value},a.providers,u,t.icon);return xO({data:wO(t),disabled:t.disabled,getApi:x({}),onAction:function(e){return o(t.value,t.meta)},onSetup:x(p),triggersSubmenu:!1,itemBehaviours:LO(t.meta,a)},c,i,a.providers)},jO=function(t,e){return q(t,(function(t){switch(t.type){case"cardcontainer":return HO(t,jO(t.items,e));case"cardimage":return DO(t.src,t.classes,t.alt);case"cardtext":var n=t.name.exists((function(t){return j(e.cardText.highlightOn,t)})),r=n?R.from(e.cardText.matchText).getOr(""):"";return OO(FO(t.text,r),t.classes)}}))},UO=function(t,e,n,r){var o=function(t){return{isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){Pv.set(t,e),$(Km(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(Pv)&&Pv.set(t,e)}))}))}}},i={dom:BO(t.label),optComponents:[R.some({dom:{tag:"div",classes:[nk,ok]},components:jO(t.items,r)})]};return xO({data:wO(T({text:R.none()},t)),disabled:t.disabled,getApi:o,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:R.from(r.itemBehaviours).getOr([])},i,e,n.providers)},WO=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=function(t){return{setActive:function(e){gw.set(t,e)},isActive:function(){return gw.isOn(t)},isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){return Pv.set(t,e)}}},s=PO({presets:n,textContent:e?t.text:R.none(),htmlContent:R.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:R.none(),checkMark:e?R.some(TO(a.icons)):R.none(),caret:R.none(),value:t.value},a,u);return Co(xO({data:wO(t),disabled:t.disabled,getApi:c,onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),p},triggersSubmenu:!1,itemBehaviours:[]},s,i,a),{toggling:{toggleClass:XS,toggleOnExecute:!1,selected:t.active}})},GO=Np(_w(),Tw()),qO=function(t){return{value:t}},$O=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,XO=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,KO=function(t){return $O.test(t)||XO.test(t)},YO=function(t){return Ft(t,"#").toUpperCase()},JO=function(t){return KO(t)?R.some({value:YO(t)}):R.none()},ZO=function(t){var e=t.value.replace($O,(function(t,e,n,r){return e+e+n+n+r+r}));return{value:e}},QO=function(t){var e=ZO(t),n=XO.exec(e.value);return null===n?["FFFFFF","FF","FF","FF"]:n},tM=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},eM=function(t){var e=tM(t.red)+tM(t.green)+tM(t.blue);return qO(e)},nM=Math.min,rM=Math.max,oM=Math.round,iM=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,aM=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,uM=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},cM=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},sM=function(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;if(i=rM(0,nM(i,1)),a=rM(0,nM(a,1)),0===i)return e=n=r=oM(255*a),uM(e,n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return e=oM(255*(e+l)),n=oM(255*(n+l)),r=oM(255*(r+l)),uM(e,n,r,1)},lM=function(t){var e=QO(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return uM(n,r,o,1)},fM=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return uM(o,i,a,u)},dM=function(t){if("transparent"===t)return R.some(uM(0,0,0,0));var e=iM.exec(t);if(null!==e)return R.some(fM(e[1],e[2],e[3],"1"));var n=aM.exec(t);return null!==n?R.some(fM(n[1],n[2],n[3],n[4])):R.none()},mM=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},hM=uM(255,0,0,1),gM=function(t){return t.fire("SkinLoaded")},pM=function(t,e){return t.fire("SkinLoadError",e)},vM=function(t){return t.fire("ResizeEditor")},bM=function(t,e){return t.fire("ResizeContent",e)},yM=function(t,e){return t.fire("ScrollContent",e)},xM=function(t,e){return t.fire("TextColorChange",e)},wM=function(t,e,n){return{hue:t,saturation:e,value:n}},CM=function(t){var e=0,n=0,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));if(u===c)return r=u,wM(0,0,100*r);var s=o===u?i-a:a===u?o-i:a-o;return e=o===u?3:a===u?1:5,e=60*(e-s/(c-u)),n=(c-u)/c,r=c,wM(Math.round(e),Math.round(100*n),Math.round(100*r))},SM=function(t){return CM(lM(t))},kM=function(t){return eM(sM(t))},zM=function(t){return JO(t).orThunk((function(){return dM(t).map(eM)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return eM(uM(o,i,a,u))}))},OM=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),MM="tinymce-custom-colors";function _M(t){void 0===t&&(t=10);var e=OM.getItem(MM),n=i(e)?JSON.parse(e):[],r=function(e){var n=t-e.length;return n<0?e.slice(0,t):e},o=r(n),a=function(e){N(o,e).each(u),o.unshift(e),o.length>t&&o.pop(),OM.setItem(MM,JSON.stringify(o))},u=function(t){o.splice(t,1)},c=function(){return o.slice(0)};return{add:a,state:c}}var TM,EM="choiceitem",AM=[{type:EM,text:"Light Green",value:"#BFEDD2"},{type:EM,text:"Light Yellow",value:"#FBEEB8"},{type:EM,text:"Light Red",value:"#F8CAC6"},{type:EM,text:"Light Purple",value:"#ECCAFA"},{type:EM,text:"Light Blue",value:"#C2E0F4"},{type:EM,text:"Green",value:"#2DC26B"},{type:EM,text:"Yellow",value:"#F1C40F"},{type:EM,text:"Red",value:"#E03E2D"},{type:EM,text:"Purple",value:"#B96AD9"},{type:EM,text:"Blue",value:"#3598DB"},{type:EM,text:"Dark Turquoise",value:"#169179"},{type:EM,text:"Orange",value:"#E67E23"},{type:EM,text:"Dark Red",value:"#BA372A"},{type:EM,text:"Dark Purple",value:"#843FA1"},{type:EM,text:"Dark Blue",value:"#236FA1"},{type:EM,text:"Light Gray",value:"#ECF0F1"},{type:EM,text:"Medium Gray",value:"#CED4D9"},{type:EM,text:"Gray",value:"#95A5A6"},{type:EM,text:"Dark Gray",value:"#7E8C8D"},{type:EM,text:"Navy Blue",value:"#34495E"},{type:EM,text:"Black",value:"#000000"},{type:EM,text:"White",value:"#ffffff"}],HM=_M(10),DM=function(t){for(var e=[],n=0;n0?d(n,r,e,o):r.text.length-n.matchLength>=10?c():u()}}))}))}))},g=WC((function(t){27!==t.which&&h()}),50),p={onKeypress:g,cancelIfNecessary:c,isMenuOpen:i,isActive:a,isProcessingAction:r.get,getView:function(){return eC.getContent(o)}};!1===t.hasPlugin("rtc")&&iS.setup(p,t)},B_={register:V_},R_=function(t,e,n){return Is(t,e,n).isSome()},P_=function(t,e){var n=null,r=function(){for(var r=[],o=0;oL_||r>L_},j_=function(t){var e=od(),n=oa(!1),r=P_((function(e){t.triggerEvent(ou(),e),n.set(!0)}),I_),o=function(t){return F_(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.schedule(t),n.set(!1),e.set(i)})),R.none()},i=function(t){return r.cancel(),F_(t).each((function(t){e.on((function(n){N_(t,n)&&e.clear()}))})),R.none()},a=function(o){r.cancel();var i=function(t){return sn(t.target,o.target)};return e.get().filter(i).map((function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(ru(),o)}))},u=ha([{key:Ta(),value:o},{key:Ea(),value:i},{key:Aa(),value:a}]),c=function(t,e){return Ot(u,e).bind((function(e){return e(t)}))};return{fireIfReady:c}},U_=function(t){var e=t.raw;return e.which===ob[0]&&!j(["input","textarea"],ue(t.target))&&!R_(t.target,'[contenteditable="true"]')},W_=function(){return en().browser.isFirefox()},G_=function(t,e){return W_()?ud(t,"focus",e):ad(t,"focusin",e)},q_=function(t,e){return W_()?ud(t,"blur",e):ad(t,"focusout",e)},$_=function(t,e){var n=T({stopBackspace:!0},e),r=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],o=j_(n),i=q(r.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return ad(t,e,(function(t){o.fireIfReady(t,e).each((function(e){e&&t.kill()}));var r=n.triggerEvent(e,t);r&&t.kill()}))})),a=od(),u=ad(t,"paste",(function(t){o.fireIfReady(t,"paste").each((function(e){e&&t.kill()}));var e=n.triggerEvent("paste",t);e&&t.kill(),a.set(setTimeout((function(){n.triggerEvent(Qa(),t)}),0))})),c=ad(t,"keydown",(function(t){var e=n.triggerEvent("keydown",t);e?t.kill():n.stopBackspace&&U_(t)&&t.prevent()})),s=G_(t,(function(t){var e=n.triggerEvent("focusin",t);e&&t.kill()})),l=od(),f=q_(t,(function(t){var e=n.triggerEvent("focusout",t);e&&t.kill(),l.set(setTimeout((function(){n.triggerEvent(Za(),t)}),0))})),d=function(){$(i,(function(t){t.unbind()})),c.unbind(),s.unbind(),f.unbind(),u.unbind(),a.on(clearTimeout),l.on(clearTimeout)};return{unbind:d}},X_=function(t,e){var n=Ot(t,"target").getOr(e);return oa(n)},K_=function(t,e){var n=oa(!1),r=oa(!1),o=function(){n.set(!0)},i=function(){r.set(!0)};return{stop:o,cut:i,isStopped:n.get,isCut:r.get,event:t,setSource:e.set,getSource:e.get}},Y_=function(t){var e=oa(!1),n=function(){e.set(!0)};return{stop:n,cut:p,isStopped:e.get,isCut:O,event:t,setSource:z("Cannot set source of a broadcasted event"),getSource:z("Cannot get source of a broadcasted event")}},J_=aa.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),Z_=function(t,e,n,r,o,i){var a=t(e,r),u=K_(n,o);return a.fold((function(){return i.logEventNoHandlers(e,r),J_.complete()}),(function(t){var n=t.descHandler,r=Pc(n);return r(u),u.isStopped()?(i.logEventStopped(e,t.element,n.purpose),J_.stopped()):u.isCut()?(i.logEventCut(e,t.element,n.purpose),J_.complete()):vn(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),J_.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),J_.resume(r)}))}))},Q_=function(t,e,n,r,o,i){return Z_(t,e,n,r,o,i).fold(M,(function(r){return Q_(t,e,n,r,o,i)}),O)},tT=function(t,e,n,r,o){var i=X_(n,r);return Z_(t,e,n,r,i,o)},eT=function(t,e,n){var r=Y_(e);return $(t,(function(t){var e=t.descHandler,n=Pc(e);n(r)})),r.isStopped()},nT=function(t,e,n,r){return rT(t,e,n,n.target,r)},rT=function(t,e,n,r,o){var i=X_(n,r);return Q_(t,e,n,r,i,o)},oT=function(t,e){return{element:t,descHandler:e}},iT=function(t,e){return{id:t,descHandler:e}},aT=function(){var t={},e=function(e,n,r){vt(r,(function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=Rc(r,e),t[o]=i}))},n=function(t,e){return fc(e).bind((function(e){return Ot(t,e)})).map((function(t){return oT(e,t)}))},r=function(e){return Ot(t,e).map((function(t){return St(t,(function(t,e){return iT(e,t)}))})).getOr([])},o=function(e,r,o){return Ot(t,r).bind((function(t){return xa(o,(function(e){return n(t,e)}),e)}))},i=function(e){vt(t,(function(t,n){Mt(t,e)&&delete t[e]}))};return{registerId:e,unregisterId:i,filterByType:r,find:o}},uT=function(){var t=aT(),e={},n=function(t){var e=t.element;return fc(e).getOrThunk((function(){return sc("uid-",t.element)}))},r=function(t,n){var r=e[n];if(r!==t)throw new Error('The tagId "'+n+'" is already used by: '+Qu(r.element)+"\nCannot use it for: "+Qu(t.element)+"\nThe conflicting element is"+(Rn(r.element)?" ":" not ")+"already in the DOM");i(t)},o=function(o){var i=n(o);_t(e,i)&&r(o,i);var a=[o];t.registerId(a,i,o.events),e[i]=o},i=function(n){fc(n.element).each((function(n){delete e[n],t.unregisterId(n)}))},a=function(e){return t.filterByType(e)},u=function(e,n,r){return t.find(e,n,r)},c=function(t){return Ot(e,t)};return{find:u,filter:a,register:o,unregister:i,getById:c}},cT=function(t){var e=t.dom,n=e.attributes,r=E(e,["attributes"]);return{uid:t.uid,dom:T({tag:"div",attributes:T({role:"presentation"},n)},r),components:t.components,behaviours:np(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},sT=dv({name:"Container",factory:cT,configFields:[Xi("components",[]),ep("containerBehaviours",[]),Xi("events",{}),Xi("domModification",{}),Xi("eventOrder",{})]}),lT=function(t){var e=function(e){return vn(t.element).fold(M,(function(t){return sn(e,t)}))},n=uT(),r=function(t,r){return n.find(e,t,r)},o=$_(t.element,{triggerEvent:function(t,e){return Js(t,e.target,(function(n){return nT(r,t,e,n)}))}}),i={debugInfo:x("real"),triggerEvent:function(t,e,n){Js(t,e,(function(o){return rT(r,t,n,e,o)}))},triggerFocus:function(t,e){fc(t).fold((function(){Sf(t)}),(function(n){Js(Ja(),t,(function(n){return tT(r,Ja(),{originator:e,kill:p,prevent:p,target:t},t,n),!1}))}))},triggerEscape:function(t,e){i.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return g(t)},getByDom:function(t){return v(t)},build:Ms,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){a(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){d(t)},broadcastOn:function(t,e){m(t,e)},broadcastEvent:function(t,e){h(t,e)},isConnected:M},a=function(t){t.connect(i),fe(t.element)||(n.register(t),$(t.components(),a),i.triggerEvent(uu(),t.element,{target:t.element}))},u=function(t){fe(t.element)||($(t.components(),u),n.unregister(t)),t.disconnect()},c=function(e){Wh(t,e)},s=function(t){$h(t)},l=function(){o.unbind(),Br(t.element)},f=function(t){var e=n.filter(tu());$(e,(function(e){var n=e.descHandler,r=Pc(n);r(t)}))},d=function(t){f({universal:!0,data:t})},m=function(t,e){f({universal:!1,channels:t,data:e})},h=function(t,e){var r=n.filter(t);return eT(r,e)},g=function(t){return n.getById(t).fold((function(){return ro.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),ro.value)},v=function(t){var e=fc(t).getOr("not found");return g(e)};return a(t),{root:t,element:t.element,destroy:l,add:c,remove:s,getByUid:g,getByDom:v,addToWorld:a,removeFromWorld:u,broadcast:d,broadcastOn:m,broadcastEvent:h}},fT=function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:q(t.items,e.interpreter)}},dT=x([Xi("prefix","form-field"),ep("fieldBehaviours",[bv,tp])]),mT=x([Bp({schema:[Ti("dom")],name:"label"}),Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ti("text")],name:"aria-descriptor"}),Dp({factory:{sketch:function(t){var e=da(t,["factory"]);return t.factory.sketch(e)}},schema:[Ti("factory")],name:"field"})]),hT=function(t,e,n,r){var o=rp(t.fieldBehaviours,[bv.config({find:function(e){return Xp(e,t,"field")}}),tp.config({store:{mode:"manual",getValue:function(t){return bv.getCurrent(t).bind(tp.getValue)},setValue:function(t,e){bv.getCurrent(t).each((function(t){tp.setValue(t,e)}))}}})]),i=_u([ju((function(e,n){var r=Yp(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=oc(t.prefix);r.label().each((function(t){Fn(t.element,"for",n),Fn(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=oc(t.prefix);Fn(n.element,"id",r),Fn(e.element,"aria-describedby",r)}))}))}))]),a={getField:function(e){return Xp(e,t,"field")},getLabel:function(e){return Xp(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:a}},gT=mv({name:"FormField",configFields:dT(),partFields:mT(),factory:hT,apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),pT=function(t,e){return Ec({attributes:ha([{key:e.tabAttr,value:"true"}])})},vT=Object.freeze({__proto__:null,exhibit:pT}),bT=[Xi("tabAttr","data-alloy-tabstop")],yT=gf({fields:bT,name:"tabstopping",active:vT}),xT=tinymce.util.Tools.resolve("tinymce.html.Entities"),wT=function(t,e,n,r){var o=ST(t,e,n,r);return gT.sketch(o)},CT=function(t,e){return wT(t,e,[],[])},ST=function(t,e,n,r){return{dom:zT(n),components:t.toArray().concat([e]),fieldBehaviours:mf(r)}},kT=function(){return zT([])},zT=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},OT=function(t,e){return gT.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},MT=oc("form-component-change"),_T=oc("form-close"),TT=oc("form-cancel"),ET=oc("form-action"),AT=oc("form-submit"),HT=oc("form-block"),DT=oc("form-unblock"),VT=oc("form-tabchange"),BT=oc("form-resize"),RT=function(t,e){var n,r=t.label.map((function(t){return OT(t,e)})),o=function(t){return function(e,n){Is(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,jn(r,"data-collection-item-value"))}))}},i=function(n,r){var o=q(r,(function(n){var r=zC.translate(n.text),o=1===t.columns?'
'+r+"
":"",i='
'+n.icon+"
",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(t){return a[t]})),c=e.isDisabled()?" tox-collection__item--state-disabled":"";return'
'+i+o+"
"})),i="auto"!==t.columns&&t.columns>1?G(o,t.columns):[o],a=q(i,(function(t){return'
'+t.join("")+"
"}));Xu(n.element,a.join(""))},a=o((function(n,r,o,i){r.stop(),e.isDisabled()||Su(n,ET,{name:t.name,value:i})})),u=[Hu(Pa(),o((function(t,e,n){Sf(n)}))),Hu(Wa(),a),Hu(ru(),a),Hu(La(),o((function(t,e,n){Ls(t.element,"."+ek).each((function(t){us(t,ek)})),is(n,ek)}))),Hu(Ia(),o((function(t){Ls(t.element,"."+ek).each((function(t){us(t,ek)}))}))),Gu(o((function(e,n,r,o){Su(e,ET,{name:t.name,value:o})})))],c=function(t,e){return q(Km(t.element,".tox-collection__item"),e)},s=gT.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:w},behaviours:mf([Pv.config({disabled:e.isDisabled,onDisabled:function(t){c(t,(function(t){is(t,"tox-collection__item--state-disabled"),Fn(t,"aria-disabled",!0)}))},onEnabled:function(t){c(t,(function(t){us(t,"tox-collection__item--state-disabled"),Gn(t,"aria-disabled")}))}}),cO(),Ix.config({}),tp.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){i(e,n),"auto"===t.columns&&Kk(e,5,"tox-collection__item").each((function(t){var n=t.numRows,r=t.numColumns;Tx.setGridSize(e,n,r)})),Cu(e,BT)}}),yT.config({}),Tx.config(i_(t.columns,"normal")),Nx("collection-events",u)]),eventOrder:(n={},n[eu()]=["disabling","alloy.base.behaviour","collection-events"],n)}),l=["tox-form__group--collection"];return wT(r,s,l,[])},PT=x([Fi("data"),Xi("inputAttributes",{}),Xi("inputStyles",{}),Xi("tag","input"),Xi("inputClasses",[]),ul("onSetValue"),Xi("styles",{}),Xi("eventOrder",{}),ep("inputBehaviours",[tp,Yx]),Xi("selectOnFocus",!0)]),LT=function(t){return mf([Yx.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=ds(e);e.dom.setSelectionRange(0,n.length)}:p})])},IT=function(t){return T(T({},LT(t)),rp(t.inputBehaviours,[tp.config({store:T(T({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return ds(t.element)},setValue:function(t,e){var n=ds(t.element);n!==e&&ms(t.element,e)}}),onSetValue:t.onSetValue})]))},FT=function(t){return{tag:t.tag,attributes:T({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},NT=function(t,e){return{uid:t.uid,dom:FT(t),components:[],behaviours:IT(t),eventOrder:t.eventOrder}},jT=dv({name:"Input",configFields:PT(),factory:NT}),UT={},WT={exports:UT};(function(e,n,r,o){(function(t,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof e&&e.amd?e(o):(t="undefined"!==typeof globalThis?globalThis:t||self,t.EphoxContactWrapper=o())})(this,(function(){var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},n={exports:{}};(function(t){(function(e){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function a(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}u(e.promise,r)}else(1===t._state?u:c)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;en?n:t===e?e-1:Math.max(e,t-r)},tH=function(t,e,n,r){return t>n?t:td)return g;var p=rH(o,f,d),v=eH(p/m*r+e,h,g);return a&&v>=e&&v<=n?nH(v,e,n,i,u):c?Math.round(v):v},iH=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return on?a?u:l:(o-e)/r*c},aH="top",uH="right",cH="bottom",sH="left",lH="width",fH="height",dH=function(t){return t.element.dom.getBoundingClientRect()},mH=function(t,e){return t[e]},hH=function(t){var e=dH(t);return mH(e,sH)},gH=function(t){var e=dH(t);return mH(e,uH)},pH=function(t){var e=dH(t);return mH(e,aH)},vH=function(t){var e=dH(t);return mH(e,cH)},bH=function(t){var e=dH(t);return mH(e,lH)},yH=function(t){var e=dH(t);return mH(e,fH)},xH=function(t,e,n){return(t+e)/2-n},wH=function(t,e){var n=dH(t),r=dH(e),o=mH(n,sH),i=mH(n,uH),a=mH(r,sH);return xH(o,i,a)},CH=function(t,e){var n=dH(t),r=dH(e),o=mH(n,aH),i=mH(n,cH),a=mH(r,aH);return xH(o,i,a)},SH=function(t,e){Su(t,uA(),{value:e})},kH=function(t){return{x:t}},zH=function(t,e,n){var r={min:hA(e),max:bA(e),range:SA(e),value:n,step:MA(e),snap:_A(e),snapStart:TA(e),rounded:EA(e),hasMinEdge:HA(e),hasMaxEdge:DA(e),minBound:hH(t),maxBound:gH(t),screenRange:bH(t)};return oH(r)},OH=function(t,e,n){var r=zH(t,e,n),o=kH(r);return SH(t,o),r},MH=function(t,e){var n=hA(e);SH(t,kH(n))},_H=function(t,e){var n=bA(e);SH(t,kH(n))},TH=function(t,e,n){var r=t>0?tH:QA,o=r(RA(n).x,hA(n),bA(n),MA(n));return SH(e,kH(o)),R.some(o)},EH=function(t){return function(e,n){return TH(t,e,n).map(M)}},AH=function(t){var e=sA(t);return e.map((function(t){return t.left}))},HH=function(t,e,n,r,o){var i=0,a=bH(t),u=r.bind((function(e){return R.some(wH(e,t))})).getOr(i),c=o.bind((function(e){return R.some(wH(e,t))})).getOr(a),s={min:hA(e),max:bA(e),range:SA(e),value:n,hasMinEdge:HA(e),hasMaxEdge:DA(e),minBound:hH(t),minOffset:i,maxBound:gH(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:c};return iH(s)},DH=function(t,e,n,r,o,i){var a=HH(e,i,n,r,o);return hH(e)-hH(t)+a},VH=function(t,e,n,r){var o=RA(n),i=DH(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=vr(e.element)/2;Xn(e.element,"left",i-a+"px")},BH=EH(-1),RH=EH(1),PH=R.none,LH=R.none,IH={"top-left":R.none(),top:R.none(),"top-right":R.none(),right:R.some(GA),"bottom-right":R.none(),bottom:R.none(),"bottom-left":R.none(),left:R.some(JA)},FH=Object.freeze({__proto__:null,setValueFrom:OH,setToMin:MH,setToMax:_H,findValueOfOffset:zH,getValueFromEvent:AH,findPositionOfValue:DH,setPositionFromValue:VH,onLeft:BH,onRight:RH,onUp:PH,onDown:LH,edgeActions:IH}),NH=function(t,e){Su(t,uA(),{value:e})},jH=function(t){return{y:t}},UH=function(t,e,n){var r={min:gA(e),max:yA(e),range:kA(e),value:n,step:MA(e),snap:_A(e),snapStart:TA(e),rounded:EA(e),hasMinEdge:VA(e),hasMaxEdge:BA(e),minBound:pH(t),maxBound:vH(t),screenRange:yH(t)};return oH(r)},WH=function(t,e,n){var r=UH(t,e,n),o=jH(r);return NH(t,o),r},GH=function(t,e){var n=gA(e);NH(t,jH(n))},qH=function(t,e){var n=yA(e);NH(t,jH(n))},$H=function(t,e,n){var r=t>0?tH:QA,o=r(RA(n).y,gA(n),yA(n),MA(n));return NH(e,jH(o)),R.some(o)},XH=function(t){return function(e,n){return $H(t,e,n).map(M)}},KH=function(t){var e=sA(t);return e.map((function(t){return t.top}))},YH=function(t,e,n,r,o){var i=0,a=yH(t),u=r.bind((function(e){return R.some(CH(e,t))})).getOr(i),c=o.bind((function(e){return R.some(CH(e,t))})).getOr(a),s={min:gA(e),max:yA(e),range:kA(e),value:n,hasMinEdge:VA(e),hasMaxEdge:BA(e),minBound:pH(t),minOffset:i,maxBound:vH(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:c};return iH(s)},JH=function(t,e,n,r,o,i){var a=YH(e,i,n,r,o);return pH(e)-pH(t)+a},ZH=function(t,e,n,r){var o=RA(n),i=JH(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=ar(e.element)/2;Xn(e.element,"top",i-a+"px")},QH=R.none,tD=R.none,eD=XH(-1),nD=XH(1),rD={"top-left":R.none(),top:R.some(jA),"top-right":R.none(),right:R.none(),"bottom-right":R.none(),bottom:R.some(XA),"bottom-left":R.none(),left:R.none()},oD=Object.freeze({__proto__:null,setValueFrom:WH,setToMin:GH,setToMax:qH,findValueOfOffset:UH,getValueFromEvent:KH,findPositionOfValue:JH,setPositionFromValue:ZH,onLeft:QH,onRight:tD,onUp:eD,onDown:nD,edgeActions:rD}),iD=function(t,e){Su(t,uA(),{value:e})},aD=function(t,e){return{x:t,y:e}},uD=function(t,e,n){var r=zH(t,e,n.left),o=UH(t,e,n.top),i=aD(r,o);return iD(t,i),i},cD=function(t,e,n,r){var o=t>0?tH:QA,i=e?RA(r).x:o(RA(r).x,hA(r),bA(r),MA(r)),a=e?o(RA(r).y,gA(r),yA(r),MA(r)):RA(r).y;return iD(n,aD(i,a)),R.some(i)},sD=function(t,e){return function(n,r){return cD(t,e,n,r).map(M)}},lD=function(t,e){var n=hA(e),r=gA(e);iD(t,aD(n,r))},fD=function(t,e){var n=bA(e),r=yA(e);iD(t,aD(n,r))},dD=function(t){return sA(t)},mD=function(t,e,n,r){var o=RA(n),i=DH(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=JH(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=vr(e.element)/2,c=ar(e.element)/2;Xn(e.element,"left",i-u+"px"),Xn(e.element,"top",a-c+"px")},hD=sD(-1,!1),gD=sD(1,!1),pD=sD(-1,!0),vD=sD(1,!0),bD={"top-left":R.some(NA),top:R.some(UA),"top-right":R.some(WA),right:R.some(qA),"bottom-right":R.some($A),bottom:R.some(KA),"bottom-left":R.some(YA),left:R.some(ZA)},yD=Object.freeze({__proto__:null,setValueFrom:uD,setToMin:lD,setToMax:fD,getValueFromEvent:dD,setPositionFromValue:mD,onLeft:hD,onRight:gD,onUp:pD,onDown:vD,edgeActions:bD}),xD=[Xi("stepSize",1),Xi("onChange",p),Xi("onChoose",p),Xi("onInit",p),Xi("onDragStart",p),Xi("onDragEnd",p),Xi("snapToGrid",!1),Xi("rounded",!0),Fi("snapStart"),Ei("model",ki("mode",{x:[Xi("minX",0),Xi("maxX",100),Mi("value",(function(t){return oa(t.mode.minX)})),Ti("getInitialValue"),fl("manager",FH)],y:[Xi("minY",0),Xi("maxY",100),Mi("value",(function(t){return oa(t.mode.minY)})),Ti("getInitialValue"),fl("manager",oD)],xy:[Xi("minX",0),Xi("maxX",100),Xi("minY",0),Xi("maxY",100),Mi("value",(function(t){return oa({x:t.mode.minX,y:t.mode.minY})})),Ti("getInitialValue"),fl("manager",yD)]})),ep("sliderBehaviours",[Tx,tp]),Mi("mouseIsDown",(function(){return oa(!1)}))],wD=function(t,e,n,r){var o,i=function(e){return Kp(e,t,"thumb")},a=function(e){return Kp(e,t,"spectrum")},u=function(e){return Xp(e,t,"left-edge")},c=function(e){return Xp(e,t,"right-edge")},s=function(e){return Xp(e,t,"top-edge")},l=function(e){return Xp(e,t,"bottom-edge")},f=t.model,d=f.manager,m=function(e,n){d.setPositionFromValue(e,n,t,{getLeftEdge:u,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:a})},h=function(t,e){f.value.set(e);var n=i(t);m(t,n)},g=function(e,n){h(e,n);var r=i(e);return t.onChange(e,r,n),R.some(!0)},p=function(e){d.setToMin(e,t)},v=function(e){d.setToMax(e,t)},b=function(e){var n=function(){Xp(e,t,"thumb").each((function(n){var r=f.value.get();t.onChoose(e,n,r)}))},r=t.mouseIsDown.get();t.mouseIsDown.set(!1),r&&n()},y=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,i(e))},x=function(e,n){n.stop(),t.onDragEnd(e,i(e)),b(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.sliderBehaviours,[Tx.config({mode:"special",focusIn:function(e){return Xp(e,t,"spectrum").map(Tx.focusIn).map(M)}}),tp.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),yf.config({channels:(o={},o[wg()]={onReceive:b},o)})]),events:_u([Hu(uA(),(function(t,e){g(t,e.event.value)})),ju((function(e,n){var r=f.getInitialValue();f.value.set(r);var o=i(e);m(e,o);var u=a(e);t.onInit(e,o,u,f.value.get())})),Hu(Ta(),y),Hu(Aa(),x),Hu(Da(),y),Hu(Ra(),x)]),apis:{resetToMin:p,resetToMax:v,setValue:h,refresh:m},domModification:{styles:{position:"relative"}}}},CD=mv({name:"Slider",configFields:xD,partFields:iA,factory:wD,apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),SD=oc("rgb-hex-update"),kD=oc("slider-update"),zD=oc("palette-update"),OD=function(t,e){var n=CD.parts.spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=CD.parts.thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return CD.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:x({y:0})},components:[n,r],sliderBehaviours:mf([Yx.config({})]),onChange:function(t,e,n){Su(t,kD,{value:n})}})},MD="form",_D=[ep("formBehaviours",[tp])],TD=function(t){return""},ED=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),Up(MD,TD(e),n)};return{field:e,record:x(t)}}(),n=t(e),r=e.record(),o=q(r,(function(t){return Dp({name:t,pname:TD(t)})}));return av(MD,_D,o,HD,n)},AD=function(t,e){return t.fold((function(){return ro.error(e)}),ro.value)},HD=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.formBehaviours,[tp.config({store:{mode:"manual",getValue:function(e){var n=Jp(e,t);return bt(n,(function(t,e){return t().bind((function(t){var n=bv.getCurrent(t);return AD(n,new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Qu(t.element)))})).map(tp.getValue)}))},setValue:function(e,n){vt(n,(function(n,r){Xp(e,t,r).each((function(t){bv.getCurrent(t).each((function(t){tp.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return Xp(e,t,n).bind(bv.getCurrent)}}}},DD={getField:Sc((function(t,e,n){return t.getField(e,n)})),sketch:ED},VD=oc("valid-input"),BD=oc("invalid-input"),RD=oc("validating-input"),PD="colorcustom.rgb.",LD=function(t,e,n,r){var o=function(n,r){return dE.config({invalidClass:e("invalid"),notify:{onValidate:function(t){Su(t,RD,{type:n})},onValid:function(t){Su(t,VD,{type:n,value:tp.getValue(t)})},onInvalid:function(t){Su(t,BD,{type:n,value:tp.getValue(t)})}},validator:{validate:function(e){var n=tp.getValue(e),o=r(n)?ro.value(!0):ro.error(t("aria.input.invalid"));return tE.pure(o)},validateOnLoad:!1}})},i=function(n,r,i,a,u){var c=t(PD+"range"),s=gT.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),l=gT.parts.field({data:u,factory:jT,inputAttributes:T({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:mf([o(r,n),yT.config({})]),onSetValue:function(t){if(dE.isInvalid(t)){var e=dE.run(t);e.get(p)}}}),f=[s,l],d="hex"!==r?[gT.parts["aria-descriptor"]({text:c})]:[],m=f.concat(d);return{dom:{tag:"div",attributes:{role:"presentation"}},components:m}},a=function(t,e){var n=eM(e);return DD.getField(t,"hex").each((function(e){Yx.isFocused(e)||tp.setValue(t,{hex:n.value})})),n},u=function(t,e){var n=e.red,r=e.green,o=e.blue;tp.setValue(t,{red:n,green:r,blue:o})},c=kC({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),s=function(t,e){c.getOpt(t).each((function(t){Xn(t.element,"background-color","#"+e.value)}))},l=function(){var o={red:oa(R.some(255)),green:oa(R.some(255)),blue:oa(R.some(255)),hex:oa(R.some("ffffff"))},l=function(t,e){var n=lM(e);u(t,n),h(n)},f=function(t){return o[t].get()},d=function(t,e){o[t].set(e)},m=function(){return f("red").bind((function(t){return f("green").bind((function(e){return f("blue").map((function(n){return uM(t,e,n,1)}))}))}))},h=function(t){var e=t.red,n=t.green,r=t.blue;d("red",R.some(e)),d("green",R.some(n)),d("blue",R.some(r))},g=function(t,e){var n=e.event;"hex"!==n.type?d(n.type,R.none()):r(t)},p=function(t,e){n(t);var r=qO(e);d("hex",R.some(e));var o=lM(r);u(t,o),h(o),Su(t,SD,{hex:r}),s(t,r)},v=function(t,e,n){var r=parseInt(n,10);d(e,R.some(r)),m().each((function(e){var n=a(t,e);Su(t,SD,{hex:n}),s(t,n)}))},b=function(t){return"hex"===t.type},y=function(t,e){var n=e.event;b(n)?p(t,n.value):v(t,n.type,n.value)},x=function(e){return{label:t(PD+e+".label"),description:t(PD+e+".description")}},w=x("red"),C=x("green"),S=x("blue"),k=x("hex");return Co(DD.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",gT.sketch(i(cM,"red",w.label,w.description,255))),n.field("green",gT.sketch(i(cM,"green",C.label,C.description,255))),n.field("blue",gT.sketch(i(cM,"blue",S.label,S.description,255))),n.field("hex",gT.sketch(i(KO,"hex",k.label,k.description,"ffffff"))),c.asSpec()],formBehaviours:mf([dE.config({invalidClass:e("form-invalid")}),Nx("rgb-form-events",[Hu(VD,y),Hu(BD,g),Hu(RD,g)])])}})),{apis:{updateHex:function(t,e){tp.setValue(t,{hex:e.value}),l(t,e),s(t,e)}}})},f=dv({factory:l,name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}});return f},ID=function(t,e){var n=CD.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=CD.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"'}}),o=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}},i=function(t,e){var n=t.components()[0].element.dom,r=wM(e,100,100),i=sM(r);o(n,mM(i))},a=function(t,e){var n=CM(lM(e));CD.setValue(t,{x:n.saturation,y:100-n.value})},u=function(t){var i=x({x:0,y:0}),a=function(t,e,n){Su(t,zD,{value:n})},u=function(t,e,n,r){o(n.element.dom,mM(hM))},c=mf([bv.config({find:R.some}),Yx.config({})]);return CD.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[n,r],onChange:a,onInit:u,sliderBehaviours:c})},c=dv({factory:u,name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){i(e,n)},setThumb:function(t,e,n){a(e,n)}},extraApis:{}});return c},FD=function(t,e){var n=function(n){var r=LD(t,e,n.onValidHex,n.onInvalidHex),o=ID(t,e),i=function(t){return(100-t)/100*360},a=function(t){return 100-t/360*100},u={paletteRgba:oa(hM),paletteHue:oa(0)},c=kC(OD(t,e)),s=kC(o.sketch({})),l=kC(r.sketch({})),f=function(t,e,n){s.getOpt(t).each((function(t){o.setHue(t,n)}))},d=function(t,e){l.getOpt(t).each((function(t){r.updateHex(t,e)}))},m=function(t,e,n){c.getOpt(t).each((function(t){CD.setValue(t,{y:a(n)})}))},h=function(t,e){s.getOpt(t).each((function(t){o.setThumb(t,e)}))},g=function(t,e){var n=lM(t);u.paletteRgba.set(n),u.paletteHue.set(e)},p=function(t,e,n,r){g(e,n),$(r,(function(r){r(t,e,n)}))},v=function(){var t=[d];return function(e,n){var r=n.event.value,o=u.paletteHue.get(),i=wM(o,r.x,100-r.y),a=kM(i);p(e,a,o,t)}},b=function(){var t=[f,d];return function(e,n){var r=i(n.event.value.y),o=u.paletteRgba.get(),a=CM(o),c=wM(r,a.saturation,a.value),s=kM(c);p(e,s,r,t)}},y=function(){var t=[f,m,h];return function(e,n){var r=n.event.hex,o=SM(r);p(e,r,o.hue,t)}};return{uid:n.uid,dom:n.dom,components:[s.asSpec(),c.asSpec(),l.asSpec()],behaviours:mf([Nx("colour-picker-events",[Hu(SD,y()),Hu(zD,v()),Hu(kD,b())]),bv.config({find:function(t){return l.getOpt(t)}}),Tx.config({mode:"acyclic"})])}},r=dv({name:"ColourPicker",configFields:[Ti("dom"),Xi("onValidHex",p),Xi("onInvalidHex",p)],factory:n});return r},ND=function(){return bv.config({find:R.some})},jD=function(t){return bv.config({find:t.getOpt})},UD=function(t){return bv.config({find:function(e){return Cn(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},WD={self:ND,memento:jD,childAt:UD},GD={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},qD=function(t){return GD[t]},$D=function(t){return qD(t)},XD=function(t){var e=function(t){return"tox-"+t},n=FD($D,e),r=function(t){Su(t,ET,{name:"hex-valid",value:!0})},o=function(t){Su(t,ET,{name:"hex-valid",value:!1})},i=kC(n.sketch({dom:{tag:"div",classes:[e("color-picker-container")],attributes:{role:"presentation"}},onValidHex:r,onInvalidHex:o}));return{dom:{tag:"div"},components:[i.asSpec()],behaviours:mf([tp.config({store:{mode:"manual",getValue:function(t){var e=i.get(t),n=bv.getCurrent(e),r=n.bind((function(t){var e=tp.getValue(t);return e.hex}));return r.map((function(t){return"#"+t})).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,r=n.exec(e),o=i.get(t),a=bv.getCurrent(o);a.fold((function(){console.log("Can not find form")}),(function(t){tp.setValue(t,{hex:R.from(r[1]).getOr("")}),DD.getField(t,"hex").each((function(t){Cu(t,ja())}))}))}}}),WD.self()])}},KD=tinymce.util.Tools.resolve("tinymce.Resource"),YD=function(t){return Mt(t,"init")},JD=function(t){var e=od(),n=kC({dom:{tag:t.tag}}),r=od();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:mf([Nx("custom-editor-events",[ju((function(o){n.getOpt(o).each((function(n){(YD(t)?t.init(n.element.dom):KD.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)}))).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),tp.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),WD.self()]),components:[n.asSpec()]}},ZD=tinymce.util.Tools.resolve("tinymce.util.Tools"),QD=ti([Xi("preprocess",w),Xi("postprocess",w)]),tV=function(t,e){var n=Ci("RepresentingConfigs.memento processors",QD,e);return tp.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=tp.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);tp.setValue(i,o)}}})},eV=function(t,e,n){return tp.config(Co({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},nV=function(t,e,n){return eV(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}))},rV=function(t){return nV(t,ds,ms)},oV=function(t){return nV(t,$u,Xu)},iV=function(t){return tp.config({store:{mode:"memory",initialValue:t}})},aV={memento:tV,withElement:nV,withComp:eV,domValue:rV,domHtml:oV,memory:iV},uV="jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",cV=function(t,e){var n=ZD.explode(e.getSetting("images_file_types",uV,"string")),r=function(t){return U(n,(function(e){return Wt(t.name.toLowerCase(),"."+e.toLowerCase())}))};return Y(mt(t),r)},sV=function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){$(t,(function(t){t(e,n)}))}},o=function(t,e){if(!Pv.isDisabled(t)){var n=e.event.raw;a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event.raw.target;a(t,n.files)},a=function(n,r){tp.setValue(n,cV(r,e)),Su(n,MT,{name:t.name})},u=kC({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:mf([Nx("input-file-events",[Iu(Wa()),Iu(ru())])])}),c=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:mf([aV.memory([]),WD.self(),Pv.config({}),gw.config({toggleClass:"dragenter",toggleOnExecute:!1}),Nx("dropzone-events",[Hu("dragenter",r([n,gw.toggle])),Hu("dragleave",r([n,gw.toggle])),Hu("dragover",n),Hu("drop",r([n,o])),Hu(Ua(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},SC.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){var e=u.get(t);e.element.dom.click()},buttonBehaviours:mf([yT.config({}),mO.button(e.isDisabled),cO()])})]}]}},s=t.label.map((function(t){return OT(t,e)})),l=gT.parts.field({factory:{sketch:c}});return wT(s,l,["tox-form__group--stretched"],[])},lV=function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:q(t.items,e.interpreter)}},fV=oc("alloy-fake-before-tabstop"),dV=oc("alloy-fake-after-tabstop"),mV=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:mf([Yx.config({ignore:!0}),yT.config({})])}},hV=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[mV([fV]),t,mV([dV])],behaviours:mf([WD.childAt(1)])}},gV=function(t,e){Su(t,Fa(),{raw:{which:9,shiftKey:e}})},pV=function(t,e){var n=e.element;cs(n,fV)?gV(t,!0):cs(n,dV)&&gV(t,!1)},vV=function(t){return R_(t,["."+fV,"."+dV].join(","),O)},bV=!(en().browser.isIE()||en().browser.isEdge()),yV=function(t){var e=oa("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)Fn(n.element,"srcdoc",r);else{Fn(n.element,"src","javascript:''");var o=n.element.dom.contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}},xV=function(t,e){var n=bV&&t.sandboxed,r=T(T({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=yV(n),i=t.label.map((function(t){return OT(t,e)})),a=function(t){return hV({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:mf([yT.config({}),Yx.config({}),aV.withComp(R.none(),o.getValue,o.setValue)])})},u=gT.parts.field({factory:{sketch:a}});return wT(i,u,["tox-form__group--stretched"],[])},wV=function(t,e){return kV(document.createElement("canvas"),t,e)},CV=function(t){var e=wV(t.width,t.height),n=SV(e);return n.drawImage(t,0,0),e},SV=function(t){return t.getContext("2d")},kV=function(t,e,n){return t.width=e,t.height=n,t},zV=function(t){return t.naturalWidth||t.width},OV=function(t){return t.naturalHeight||t.height},MV=function(t){return new qT((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))},_V=function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return R.none();for(var r=n[1],o=e[1],i=1024,a=atob(o),u=a.length,c=Math.ceil(u/i),s=new Array(c),l=0;ln?r=n:rn?t=n:t2)&&(i=i<.5?.5:2,u=!0),(a<.5||a>2)&&(a=a<.5?.5:2,u=!0);var c=uB(t,i,a);return u?c.then((function(t){return aB(t,e,n)})):c},uB=function(t,e,n){return new qT((function(r){var o=zV(t),i=OV(t),a=Math.floor(o*e),u=Math.floor(i*n),c=wV(a,u),s=SV(c);s.drawImage(t,0,0,o,i,0,0,a,u),r(c)}))},cB=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},sB=function(t,e){return t.toCanvas().then((function(n){return lB(n,t.getType(),e)}))},lB=function(t,e,n){var r=n<0?360+n:n,o=r*Math.PI/180,i=t.width,a=t.height,u=Math.sin(o),c=Math.cos(o),s=cB(Math.abs(i*c)+Math.abs(a*u)),l=cB(Math.abs(i*u)+Math.abs(a*c)),f=wV(s,l),d=SV(f);return d.translate(s/2,l/2),d.rotate(o),d.drawImage(t,-i/2,-a/2),PV(f,e)},fB=function(t,e){return t.toCanvas().then((function(n){return dB(n,t.getType(),e)}))},dB=function(t,e,n){var r=wV(t.width,t.height),o=SV(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),PV(r,e)},mB=function(t,e,n,r,o){return t.toCanvas().then((function(i){return hB(i,t.getType(),e,n,r,o)}))},hB=function(t,e,n,r,o,i){var a=wV(o,i),u=SV(a);return u.drawImage(t,-n,-r),PV(a,e)},gB=function(t,e,n){return t.toCanvas().then((function(r){return aB(r,e,n).then((function(e){return PV(e,t.getType())}))}))},pB=function(t){return tB(t)},vB=function(t){return oB(t)},bB=function(t,e){return iB(t,e)},yB=function(t,e,n,r){return rB(t,e,n,r)},xB=function(t,e){return eB(t,e)},wB=function(t,e){return nB(t,e)},CB=function(t,e){return fB(t,e)},SB=function(t,e,n,r,o){return mB(t,e,n,r,o)},kB=function(t,e,n){return gB(t,e,n)},zB=function(t,e){return sB(t,e)},OB=function(t,e,n){return RC(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)},MB=function(t,e){return OB(t,e,[])},_B=function(t,e){return OB(t,e,[Ix.config({})])},TB=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:mf([Ix.config({})])}},EB=oc("toolbar.button.execute"),AB=function(t){return Gu((function(e,n){hO(t,e)((function(n){Su(e,EB,{buttonApi:n}),t.onAction(n)}))}))},HB=(wE={},wE[eu()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],wE),DB=oc("update-menu-text"),VB=oc("update-menu-icon"),BB=function(t,e,n){var r=oa(p),o=t.text.map((function(t){return kC(TB(t,e,n.providers))})),i=t.icon.map((function(t){return kC(_B(t,n.providers.icons))})),a=function(t,e){var n=tp.getValue(t);return Yx.focus(n),Su(n,"keydown",{raw:e.event.raw}),PE.close(n),R.some(!0)},u=t.role.fold((function(){return{}}),(function(t){return{role:t}})),c=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),s=RC("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons),l=kC(PE.sketch(T(T(T({},t.uid?{uid:t.uid}:{}),u),{dom:{tag:"button",classes:[e,e+"--select"].concat(q(t.classes,(function(t){return e+"--"+t}))),attributes:T({},c)},components:yO([i.map((function(t){return t.asSpec()})),o.map((function(t){return t.asSpec()})),R.some(s)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:mf(A(A([],t.dropdownBehaviours,!0),[mO.button((function(){return t.disabled||n.providers.isDisabled()})),cO(),NE.config({}),Ix.config({}),Nx("dropdown-events",[gO(t,r),pO(t,r)]),Nx("menubutton-update-display-text",[Hu(DB,(function(t,e){o.bind((function(e){return e.getOpt(t)})).each((function(t){Ix.set(t,[Ss(n.providers.translate(e.event.text))])}))})),Hu(VB,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Ix.set(t,[_B(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:Co(HB,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:mf([Tx.config({mode:"special",onLeft:a,onRight:a})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:pk(!1,t.columns,t.presets)},fetch:function(e){return tE.nu(S(t.fetch,e))}})));return l.asSpec()},RB=function(t){return i(t)},PB=function(t){return"separator"===t.type},LB=function(t){return Mt(t,"getSubmenuItems")},IB={type:"separator"},FB=function(t,e){var n=Z(t,(function(t,n){return RB(n)?""===n?t:"|"===n?t.length>0&&!PB(t[t.length-1])?t.concat([IB]):t:Mt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&PB(n[n.length-1])&&n.pop(),n},NB=function(t,e){var n=t.getSubmenuItems(),r=WB(n,e),o=Co(r.menus,ma(t.value,r.items)),i=Co(r.expansions,ma(t.value,t.value));return{item:t,menus:o,expansions:i}},jB=function(t,e){return LB(t)?NB(t,e):{item:t,menus:{},expansions:{}}},UB=function(t){if(PB(t))return t;var e=Ot(t,"value").getOrThunk((function(){return oc("generated-menu-item")}));return Co({value:e},t)},WB=function(t,e){var n=FB(i(t)?t.split(" "):t,e);return J(n,(function(t,n){var r=UB(n),o=jB(r,e);return{menus:Co(t.menus,o.menus),items:[o.item].concat(t.items),expansions:Co(t.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},GB=function(t,e,n,r){var o=oc("primary-menu"),i=WB(t,n.shared.providers.menuItems());if(0===i.items.length)return R.none();var a=A_(o,i.items,e,n,r),u=bt(i.menus,(function(t,r){return A_(r,t,e,n,!1)})),c=Co(u,ma(o,a));return R.from(Zw.tieredData(o,c,i.expansions))},qB=function(t){return{isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){return Pv.set(t,e)},setActive:function(e){var n=t.element;e?(is(n,"tox-tbtn--enabled"),Fn(n,"aria-pressed",!0)):(us(n,"tox-tbtn--enabled"),Gn(n,"aria-pressed"))},isActive:function(){return cs(t.element,"tox-tbtn--enabled")}}},$B=function(t,e,n,r){return BB({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(GB(t,US.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:qB,columns:1,presets:"normal",classes:[],dropdownBehaviours:[yT.config({})]},e,n.shared)},XB=function(t,e,n){var r=function(t){return function(r){var o=!r.isActive();r.setActive(o),t.storage.set(o),n.shared.getSink().each((function(n){e().getOpt(n).each((function(e){Sf(e.element),Su(e,ET,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(q(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return T(T({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},KB=function(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=T({buttonBehaviours:mf([mO.button((function(){return t.disabled||i.isDisabled()})),cO(),yT.config({}),Nx("button press",[Au("click"),Au("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=Co(u,{dom:r});return Co(c,{components:o})},YB=function(t,e,n,r){void 0===r&&(r=[]);var o=t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({}),i={tag:"button",classes:["tox-tbtn"],attributes:o},a=t.icon.map((function(t){return MB(t,n.icons)})),u=yO([a]);return KB(t,e,r,i,u,n)},JB=function(t,e,n,r){void 0===r&&(r=[]);var o=YB(t,R.some(e),n,r);return SC.sketch(o)},ZB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return MB(t,n.icons)})):R.none(),u=a.isSome()?yO([a]):[],c=a.isSome()?{}:{innerHtml:i},s=A(A(A(A([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0),l=T(T({tag:"button",classes:s},c),{attributes:{title:i}});return KB(t,e,r,l,u,n)},QB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=ZB(t,R.some(e),n,r,o);return SC.sketch(i)},tR=function(t,e){return function(n){"custom"===e?Su(n,ET,{name:t,value:{}}):"submit"===e?Cu(n,AT):"cancel"===e?Cu(n,TT):console.error("Unknown button type: ",e)}},eR=function(t,e){return"menu"===e},nR=function(t,e){return"custom"===e||"cancel"===e||"submit"===e},rR=function(t,e,n){if(eR(t,e)){var r=function(){return a},o=t,i=T(T({},t),{onSetup:function(e){return e.setDisabled(t.disabled),p},fetch:XB(o.items,r,n)}),a=kC($B(i,"tox-tbtn",n,R.none()));return a.asSpec()}if(nR(t,e)){var u=tR(t.name,e),c=T(T({},t),{borderless:!1});return QB(c,u,n.shared.providers,[])}console.error("Unknown footer button type: ",e)},oR=function(t,e){var n=tR(t.name,"custom");return CT(R.none(),gT.parts.field(T({factory:SC},ZB(t,R.some(n),e,[aV.memory(""),WD.self()]))))},iR=x([Xi("field1Name","field1"),Xi("field2Name","field2"),sl("onLockedChange"),il(["lockClass"]),Xi("locked",!1),op.field("coupledFieldBehaviours",[bv,tp])]),aR=function(t,e,n){return Xp(t,e,n).bind(bv.getCurrent)},uR=function(t,e){return Dp({factory:gT,name:t,overrides:function(t){return{fieldBehaviours:mf([Nx("coupled-input-behaviour",[Hu(ja(),(function(n){aR(n,t,e).each((function(e){Xp(n,t,"lock").each((function(r){gw.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},cR=x([uR("field1","field2"),uR("field2","field1"),Dp({factory:SC,schema:[Ti("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:mf([gw.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),sR=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:op.augment(t.coupledFieldBehaviours,[bv.config({find:R.some}),tp.config({store:{mode:"manual",getValue:function(e){var n,r=Qp(e,t,["field1","field2"]);return n={},n[t.field1Name]=tp.getValue(r.field1()),n[t.field2Name]=tp.getValue(r.field2()),n},setValue:function(e,n){var r=Qp(e,t,["field1","field2"]);_t(n,t.field1Name)&&tp.setValue(r.field1(),n[t.field1Name]),_t(n,t.field2Name)&&tp.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return Xp(e,t,"field1")},getField2:function(e){return Xp(e,t,"field2")},getLock:function(e){return Xp(e,t,"lock")}}}},lR=mv({name:"FormCoupledInputs",configFields:iR(),partFields:cR(),factory:sR,apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),fR=function(t){var e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},n=function(t){return t in e?e[t]:1},r=t.value.toFixed(n(t.unit));return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit},dR=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/,n=e.exec(t);if(null!==n){var r=parseFloat(n[1]),o=n[2];return ro.value({value:r,unit:o})}return ro.error(t)},mR=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return Mt(n,t)};return t.unit===e?R.some(t.value):r(t.unit)&&r(e)?n[t.unit]===n[e]?R.some(t.value):R.some(t.value/n[t.unit]*n[e]):R.none()},hR=function(t){return R.none()},gR=function(t,e){return function(n){return mR(n,e).map((function(n){return{value:n*t,unit:e}}))}},pR=function(t,e){var n=dR(t).toOptional(),r=dR(e).toOptional();return Dt(n,r,(function(t,e){return mR(t,e.unit).map((function(t){return e.value/t})).map((function(t){return gR(t,e.unit)})).getOr(hR)})).getOr(hR)},vR=function(t,e){var n=hR,r=oc("ratio-event"),o=function(t){return RC(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)},i=lR.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[o("lock"),o("unlock")],buttonBehaviours:mf([Pv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yT.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},u=function(n){return gT.parts.field({factory:jT,inputClasses:["tox-textfield"],inputBehaviours:mf([Pv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yT.config({}),Nx("size-input-events",[Hu(La(),(function(t,e){Su(t,r,{isField1:n})})),Hu(Ua(),(function(e,n){Su(e,MT,{name:t.name})}))])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},s=lR.parts.field1(a([gT.parts.label(c("Width")),u(!0)])),l=lR.parts.field2(a([gT.parts.label(c("Height")),u(!1)]));return lR.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,a([c(" "),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){dR(tp.getValue(t)).each((function(t){n(t).each((function(t){tp.setValue(e,fR(t))}))}))},coupledFieldBehaviours:mf([Pv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){lR.getField1(t).bind(gT.getField).each(Pv.disable),lR.getField2(t).bind(gT.getField).each(Pv.disable),lR.getLock(t).each(Pv.disable)},onEnabled:function(t){lR.getField1(t).bind(gT.getField).each(Pv.enable),lR.getField2(t).bind(gT.getField).each(Pv.enable),lR.getLock(t).each(Pv.enable)}}),cO(),Nx("size-input-events2",[Hu(r,(function(t,e){var r=e.event.isField1,o=r?lR.getField1(t):lR.getField2(t),i=r?lR.getField2(t):lR.getField1(t),a=o.map(tp.getValue).getOr(""),u=i.map(tp.getValue).getOr("");n=pR(a,u)}))])])})},bR=x(oc("undo")),yR=x(oc("redo")),xR=x(oc("zoom")),wR=x(oc("back")),CR=x(oc("apply")),SR=x(oc("swap")),kR=x(oc("transform")),zR=x(oc("temp-transform")),OR=x(oc("transform-apply")),MR={undo:bR,redo:yR,zoom:xR,back:wR,apply:CR,swap:SR,transform:kR,tempTransform:zR,transformApply:OR},_R=x("save-state"),TR=x("disable"),ER=x("enable"),AR={formActionEvent:ET,saveState:_R,disable:TR,enable:ER},HR=function(t,e){var n=function(t,n,r,o){return kC(QB({name:t,text:t,disabled:r,primary:o,icon:R.none(),borderless:!1},n,e))},r=function(t,n,r,o){return kC(JB({name:t,icon:R.some(t),tooltip:R.some(n),disabled:o,primary:!1,borderless:!1},r,e))},o=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Pv)&&Pv.disable(n)}))},i=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Pv)&&Pv.enable(n)}))},a={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},u=p,c=function(t,e,n){Su(t,e,n)},s=function(t){return Cu(t,AR.disable())},l=function(t){return Cu(t,AR.enable())},f=function(t,e){s(t),c(t,MR.transform(),{transform:e}),l(t)},d=function(t,e){s(t),c(t,MR.tempTransform(),{transform:e}),l(t)},m=function(t){return function(){at.getOpt(t).each((function(t){Ix.set(t,[ot])}))}},h=function(t,e){s(t),c(t,MR.transformApply(),{transform:e,swap:m(t)}),l(t)},g=function(){return n("Back",(function(t){return c(t,MR.back(),{swap:m(t)})}),!1,!1)},v=function(){return kC({dom:{tag:"div",classes:["tox-spacer"]},behaviours:mf([Pv.config({})])})},b=function(){return n("Apply",(function(t){return c(t,MR.apply(),{swap:m(t)})}),!0,!0)},y=function(){return function(e){var n=t.getRect();return SB(e,n.x,n.y,n.w,n.h)}},w=[g(),v(),n("Apply",(function(e){var n=y();h(e,n),t.hideCrop()}),!1,!0)],C=sT.sketch({dom:a,components:w.map((function(t){return t.asSpec()})),containerBehaviours:mf([Nx("image-tools-crop-buttons-events",[Hu(AR.disable(),(function(t,e){o(w,t)})),Hu(AR.enable(),(function(t,e){i(w,t)}))])])}),S=kC(vR({name:"size",label:R.none(),constrain:!0,disabled:!1},e)),k=function(t,e){return function(n){return kB(n,t,e)}},z=[g(),v(),S,v(),n("Apply",(function(t){S.getOpt(t).each((function(e){var n=tp.getValue(e),r=parseInt(n.width,10),o=parseInt(n.height,10),i=k(r,o);h(t,i)}))}),!1,!0)],O=sT.sketch({dom:a,components:z.map((function(t){return t.asSpec()})),containerBehaviours:mf([Nx("image-tools-resize-buttons-events",[Hu(AR.disable(),(function(t,e){o(z,t)})),Hu(AR.enable(),(function(t,e){i(z,t)}))])])}),M=function(t,e){return function(n){return t(n,e)}},_=M(CB,"h"),T=M(CB,"v"),E=M(zB,-90),A=M(zB,90),H=function(t,e){d(t,e)},D=[g(),v(),r("flip-horizontally","Flip horizontally",(function(t){H(t,_)}),!1),r("flip-vertically","Flip vertically",(function(t){H(t,T)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){H(t,E)}),!1),r("rotate-right","Rotate clockwise",(function(t){H(t,A)}),!1),v(),b()],V=sT.sketch({dom:a,components:D.map((function(t){return t.asSpec()})),containerBehaviours:mf([Nx("image-tools-fliprotate-buttons-events",[Hu(AR.disable(),(function(t,e){o(D,t)})),Hu(AR.enable(),(function(t,e){i(D,t)}))])])}),B=function(t,n,r,o,i){var a=CD.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=CD.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=CD.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return kC(CD.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:x({x:o})},components:[a,u,c],sliderBehaviours:mf([Yx.config({})]),onChoose:n}))},P=function(t,e,n,r,o){var i=function(t,n,r){var o=M(e,r.x/100);f(t,o)};return B(t,i,n,r,o)},L=function(t,e,n,r,o){return[g(),P(t,e,n,r,o),b()]},I=function(t,e,n,r,u){var c=L(t,e,n,r,u);return sT.sketch({dom:a,components:c.map((function(t){return t.asSpec()})),containerBehaviours:mf([Nx("image-tools-filter-panel-buttons-events",[Hu(AR.disable(),(function(t,e){o(c,t)})),Hu(AR.enable(),(function(t,e){i(c,t)}))])])})},F=[g(),v(),b()],N=sT.sketch({dom:a,components:F.map((function(t){return t.asSpec()}))}),j=I("Brightness",xB,-100,0,100),U=I("Contrast",wB,-100,0,100),W=I("Gamma",bB,-100,0,100),G=function(t,e,n){return function(r){return yB(r,t,e,n)}},q=function(t){var e=function(t,e,n){var r=$.getOpt(t),o=K.getOpt(t),i=X.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=tp.getValue(e).x/100,i=tp.getValue(r).x/100,a=tp.getValue(n).x/100,u=G(o,i,a);f(t,u)}))}))}))};return B(t,e,0,100,200)},$=q("R"),X=q("G"),K=q("B"),Y=[g(),$,X,K,b()],J=sT.sketch({dom:a,components:Y.map((function(t){return t.asSpec()}))}),Z=function(t,e,n){return function(r){var o=function(){at.getOpt(r).each((function(e){Ix.set(e,[t]),n(e)}))};c(r,MR.swap(),{transform:e,swap:o})}},Q=function(e){t.showCrop()},tt=function(e){S.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;tp.setValue(e,{width:r,height:o})}))},et=R.some(vB),nt=R.some(pB),rt=[r("crop","Crop",Z(C,R.none(),Q),!1),r("resize","Resize",Z(O,R.none(),tt),!1),r("orientation","Orientation",Z(V,R.none(),u),!1),r("brightness","Brightness",Z(j,R.none(),u),!1),r("sharpen","Sharpen",Z(N,et,u),!1),r("contrast","Contrast",Z(U,R.none(),u),!1),r("color-levels","Color levels",Z(J,R.none(),u),!1),r("gamma","Gamma",Z(W,R.none(),u),!1),r("invert","Invert",Z(N,nt,u),!1)],ot=sT.sketch({dom:a,components:rt.map((function(t){return t.asSpec()}))}),it=sT.sketch({dom:{tag:"div"},components:[ot],containerBehaviours:mf([Ix.config({})])}),at=kC(it),ut=function(t){return at.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))};return{memContainer:at,getApplyButton:ut}},DR=tinymce.util.Tools.resolve("tinymce.geom.Rect"),VR=tinymce.util.Tools.resolve("tinymce.util.Observable"),BR=tinymce.util.Tools.resolve("tinymce.util.VK"),RR=function(t){var e=Math.max,n=t.documentElement,r=t.body,o=e(n.scrollWidth,r.scrollWidth),i=e(n.clientWidth,r.clientWidth),a=e(n.offsetWidth,r.offsetWidth),u=e(n.scrollHeight,r.scrollHeight),c=e(n.clientHeight,r.clientHeight),s=e(n.offsetHeight,r.offsetHeight);return{width:o=1?n.set(1):n.set(u)}))},c=function(t,e){var n=ee.fromTag("img");return Fn(n,"src",e),UR(n.dom).then((function(){t.getSystem().isConnected()&&h.getOpt(t).map((function(t){var e=ks({element:n});Ix.replaceAt(t,1,R.some(e));var r=i.get(),c={x:0,y:0,w:n.dom.naturalWidth,h:n.dom.naturalHeight};i.set(c);var s=DR.inflate(c,-20,-20);o.set(s),r.w===c.w&&r.h===c.h||u(t,n),a(t,n)}))}))},s=function(t,e){var r=n.get(),o=e>0?Math.min(2,r+.1):Math.max(.1,r-.1);n.set(o),h.getOpt(t).each((function(t){var e=t.components()[1].element;a(t,e)}))},l=function(){r.run((function(t){t.toggleVisibility(!0)}))},f=function(){r.run((function(t){t.toggleVisibility(!1)}))},d=function(){return o.get()},m=sT.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:mf([Nx("image-panel-crop-events",[ju((function(t){h.getOpt(t).each((function(t){var e=t.element.dom,i=jR.create({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,p);i.toggleVisibility(!1),i.on("updateRect",(function(t){var e=t.rect,r=n.get(),i={x:Math.round(e.x/r),y:Math.round(e.y/r),w:Math.round(e.w/r),h:Math.round(e.h/r)};o.set(i)})),r.set(i)}))})),Uu((function(){r.clear()}))])])}],containerBehaviours:mf([Ix.config({}),Nx("image-panel-events",[ju((function(e){c(e,t)}))])])}),h=kC(m),g=function(){var t=i.get();return{width:t.w,height:t.h}};return{memContainer:h,updateSrc:c,zoom:s,showCrop:l,hideCrop:f,getRect:d,getMeasurements:g}},GR=function(t,e,n,r,o){return JB({name:t,icon:R.some(e),disabled:n,tooltip:R.some(t),primary:!1,borderless:!1},r,o)},qR=function(t,e){e?Pv.enable(t):Pv.disable(t)},$R=function(t){var e=function(t,e,o){n.getOpt(t).each((function(t){qR(t,e)})),r.getOpt(t).each((function(t){qR(t,o)}))},n=kC(GR("Undo","undo",!0,(function(t){Su(t,MR.undo(),{direction:1})}),t)),r=kC(GR("Redo","redo",!0,(function(t){Su(t,MR.redo(),{direction:1})}),t)),o=sT.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[n.asSpec(),r.asSpec(),GR("Zoom in","zoom-in",!1,(function(t){Su(t,MR.zoom(),{direction:1})}),t),GR("Zoom out","zoom-out",!1,(function(t){Su(t,MR.zoom(),{direction:-1})}),t)]});return{container:o,updateButtonUndoStates:e}};function XR(){var t=[],e=-1,n=function(n){var r=t.splice(++e);return t.push(n),{state:n,removed:r}},r=function(){if(i())return t[--e]},o=function(){if(a())return t[++e]},i=function(){return e>0},a=function(){return-1!==e&&e1?R.none():R.some(RC("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},e.icons)),a={dom:{tag:"div",classes:["tox-selectfield"]},components:nt([[o],i.toArray()])};return gT.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:nt([r.toArray(),[a]]),fieldBehaviours:mf([Pv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){gT.getField(t).each(Pv.disable)},onEnabled:function(t){gT.getField(t).each(Pv.enable)}}),cO()])})},cP=function(t,e){var n=function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}},r=function(t){return{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:q(t,n)}]}},o=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}},i=function(t){return{dom:{tag:"tr"},components:q(t,o)}},a=function(t){return{dom:{tag:"tbody"},components:q(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[r(t.header),a(t.cells)],behaviours:mf([yT.config({}),Yx.config({})])}},sP=function(t,e){var n=t.label.map((function(t){return OT(t,e)})),r=[Pv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),Tx.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return Cu(t,AT),R.some(!0)}}),Nx("textfield-change",[Hu(ja(),(function(e,n){Su(e,MT,{name:t.name})})),Hu(Qa(),(function(e,n){Su(e,MT,{name:t.name})}))]),yT.config({})],o=t.validation.map((function(t){return dE.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=tp.getValue(e),r=t.validator(n);return tE.pure(!0===r?ro.value(n):ro.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(x({}),(function(t){return{placeholder:e.translate(t)}})),a=t.inputMode.fold(x({}),(function(t){return{inputmode:t}})),u=T(T({},i),a),c=gT.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:u,inputClasses:[t.classname],inputBehaviours:mf(nt([r,o])),selectOnFocus:!1,factory:jT}),s=t.flex?["tox-form__group--stretched"]:[],l=s.concat(t.maximized?["tox-form-group--maximize"]:[]),f=[Pv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){gT.getField(t).each(Pv.disable)},onEnabled:function(t){gT.getField(t).each(Pv.enable)}}),cO()];return wT(n,c,l,f)},lP=function(t,e){return sP({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:R.none(),maximized:t.maximized},e)},fP=function(t,e){return sP({name:t.name,multiline:!0,label:t.label,inputMode:R.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:R.none(),maximized:t.maximized},e)},dP=function(t,e){var n=t.stream.streams,r=n.setup(t,e);return _u([Hu(t.event,r),Uu((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Hu(t,(function(){return e.cancel()}))]})).getOr([])))},mP=Object.freeze({__proto__:null,events:dP}),hP=function(t){var e=oa(null),n=function(){return{timer:null!==e.get()?"set":"unset"}},r=function(t){e.set(t)},o=function(){var t=e.get();null!==t&&t.cancel()};return zc({readState:n,setTimer:r,cancel:o})},gP=function(t){return t.stream.streams.state(t)},pP=Object.freeze({__proto__:null,throttle:hP,init:gP}),vP=function(t,e){var n=t.stream,r=WC(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},bP=[Ei("stream",ki("mode",{throttle:[Ti("delay"),Xi("stopEvent",!0),fl("streams",{setup:vP,state:hP})]})),Xi("event","input"),Fi("cancelEvent"),sl("onStream")],yP=gf({fields:bP,name:"streaming",active:mP,state:pP}),xP=function(t,e,n){var r=tp.getValue(n);tp.setValue(e,r),CP(e)},wP=function(t,e){var n=t.element,r=ds(n),o=n.dom;"number"!==jn(n,"type")&&e(o,r)},CP=function(t){wP(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},SP=function(t,e){wP(t,(function(t,n){return t.setSelectionRange(e,n.length)}))},kP=function(t,e,n){if(t.selectsOver){var r=tp.getValue(e),o=t.getDisplayText(r),i=tp.getValue(n),a=t.getDisplayText(i);return 0===a.indexOf(o)?R.some((function(){xP(t,e,n),SP(e,o.length)})):R.none()}return R.none()},zP=x("alloy.typeahead.itemexecute"),OP=function(t,e,n,r){var o=function(e,n,o){t.previewing.set(!1);var i=bE.getCoupled(e,"sandbox");if(bg.isOpen(i))bv.getCurrent(i).each((function(t){rb.getHighlighted(t).fold((function(){o(t)}),(function(){Mu(i,t.element,"keydown",n)}))}));else{var u=function(t){bv.getCurrent(t).each(o)};zE(t,a(e),e,i,r,u,GT.HighlightFirst).get(p)}},i=LT(t),a=function(t){return function(e){return e.map((function(e){var n=zt(e.menus),r=rt(n,(function(t){return Y(t.items,(function(t){return"item"===t.type}))})),o=tp.getState(t);return o.update(q(r,(function(t){return t.data}))),e}))}},u=[Yx.config({}),tp.config({onSetValue:t.onSetValue,store:T({mode:"dataset",getDataKey:function(t){return ds(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){ms(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return ma("initialValue",t)})).getOr({}))}),yP.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o=bE.getCoupled(e,"sandbox"),i=Yx.isFocused(e);if(i&&ds(e.element).length>=t.minChars){var u=bv.getCurrent(o).bind((function(t){return rb.getHighlighted(t).map(tp.getValue)}));t.previewing.set(!0);var c=function(e){bv.getCurrent(o).each((function(e){u.fold((function(){t.model.selectsOver&&rb.highlightFirst(e)}),(function(t){rb.highlightBy(e,(function(e){var n=tp.getValue(e);return n.value===t.value})),rb.getHighlighted(e).orThunk((function(){return rb.highlightFirst(e),R.none()}))}))}))};zE(t,a(e),e,o,r,c,GT.HighlightFirst).get(p)}},cancelEvent:au()}),Tx.config({mode:"special",onDown:function(t,e){return o(t,e,rb.highlightFirst),R.some(!0)},onEscape:function(t){var e=bE.getCoupled(t,"sandbox");return bg.isOpen(e)?(bg.close(e),R.some(!0)):R.none()},onUp:function(t,e){return o(t,e,rb.highlightLast),R.some(!0)},onEnter:function(e){var n=bE.getCoupled(e,"sandbox"),r=bg.isOpen(n);if(r&&!t.previewing.get())return bv.getCurrent(n).bind((function(t){return rb.getHighlighted(t)})).map((function(t){return Su(e,zP(),{item:t}),!0}));var o=tp.getValue(e);return Cu(e,au()),t.onExecute(n,e,o),r&&bg.close(n),R.some(!0)}}),gw.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),bE.config({others:{sandbox:function(e){return AE(t,e,{onOpen:function(){return gw.on(e)},onClose:function(){return gw.off(e)}})}}}),Nx("typeaheadevents",[Gu((function(e){var n=p;ME(t,a(e),e,r,n,GT.HighlightFirst).get(p)})),Hu(zP(),(function(e,n){var r=bE.getCoupled(e,"sandbox");xP(t.model,e,n.event.item),Cu(e,au()),t.onItemExecute(e,r,n.event.item,tp.getValue(e)),bg.close(r),CP(e)}))].concat(t.dismissOnBlur?[Hu(Za(),(function(t){var e=bE.getCoupled(t,"sandbox");Mf(e.element).isNone()&&bg.close(e)}))]:[]))];return{uid:t.uid,dom:FT(Co(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:T(T({},i),rp(t.typeaheadBehaviours,u)),eventOrder:t.eventOrder}},MP=x([Fi("lazySink"),Ti("fetch"),Xi("minChars",5),Xi("responseTime",1e3),ul("onOpen"),Xi("getHotspot",R.some),Xi("getAnchorOverrides",x({})),Xi("layouts",R.none()),Xi("eventOrder",{}),ra("model",{},[Xi("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),Xi("selectsOver",!0),Xi("populateFromBrowse",!0)]),ul("onSetValue"),cl("onExecute"),ul("onItemExecute"),Xi("inputClasses",[]),Xi("inputAttributes",{}),Xi("inputStyles",{}),Xi("matchWidth",!0),Xi("useMinWidth",!1),Xi("dismissOnBlur",!0),il(["openClass"]),Fi("initialData"),ep("typeaheadBehaviours",[Yx,tp,yP,Tx,gw,bE]),Mi("previewing",(function(){return oa(!0)}))].concat(PT()).concat(DE())),_P=x([Vp({schema:[ol()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){kP(t.model,r,n).fold((function(){return rb.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&xP(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return Su(t,zP(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&xP(t.model,e,n)}))}}}})]),TP=mv({name:"Typeahead",configFields:MP(),partFields:_P(),factory:OP}),EP=function(t){var e=function(){return EP(t.toCached())},n=function(e){return EP(t.bind((function(t){return t.fold((function(t){return tE.pure(ro.error(t))}),(function(t){return e(t)}))})))},r=function(e){return EP(t.map((function(t){return t.bind(e)})))},o=function(e){return EP(t.map((function(t){return t.map(e)})))},i=function(e){return EP(t.map((function(t){return t.mapError(e)})))},a=function(e,n){return t.map((function(t){return t.fold(e,n)}))},u=function(e,n){return EP(tE.nu((function(r){var o=!1,i=setTimeout((function(){o=!0,r(ro.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))};return T(T({},t),{toCached:e,bindFuture:n,bindResult:r,mapResult:o,mapError:i,foldResult:a,withTimeout:u})},AP=function(t){return EP(tE.nu(t))},HP=function(t){return EP(tE.pure(ro.value(t)))},DP=function(t){return EP(tE.pure(ro.error(t)))},VP=function(t){return EP(tE.pure(t))},BP=function(t){return EP(t.map(ro.value))},RP=function(t){return AP((function(e){t.then((function(t){e(ro.value(t))}),(function(t){e(ro.error(t))}))}))},PP={nu:AP,wrap:EP,pure:HP,value:HP,error:DP,fromResult:VP,fromFuture:BP,fromPromise:RP},LP={type:"separator"},IP=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:p}},FP=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:p}},NP=function(t){return q(t,IP)},jP=function(t,e){return Y(e,(function(e){return e.type===t}))},UP=function(t,e){return NP(jP(t,e))},WP=function(t){return UP("header",t.targets)},GP=function(t){return UP("anchor",t.targets)},qP=function(t){return R.from(t.anchorTop).map((function(t){return FP("",t)})).toArray()},$P=function(t){return R.from(t.anchorBottom).map((function(t){return FP("",t)})).toArray()},XP=function(t){return q(t,(function(t){return FP(t,t)}))},KP=function(t){return Z(t,(function(t,e){var n=0===t.length||0===e.length;return n?t.concat(e):t.concat(LP,e)}),[])},YP=function(t,e){var n=t.toLowerCase();return Y(e,(function(t){var e=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return jt(e.toLowerCase(),n)||jt(t.value.toLowerCase(),n)}))},JP=function(t,e,n){var r=tp.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value,i=n.getLinkInformation();return i.fold((function(){return[]}),(function(e){var r=YP(o,XP(n.getHistory(t)));return"file"===t?KP([r,YP(o,WP(e)),YP(o,nt([qP(e),GP(e),$P(e)]))]):r}))},ZP=oc("aria-invalid"),QP=function(t,e,n){var r,o=e.shared.providers,i=function(e){var r=tp.getValue(e);n.addToHistory(r.value,t.filetype)},a=gT.parts.field({factory:TP,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":ZP,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o=JP(t.filetype,r,n),i=GB(o,US.BUBBLE_TO_SANDBOX,e,!1);return tE.pure(i)},getHotspot:function(t){return m.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(dE)&&dE.run(t).get(p)},typeaheadBehaviours:mf(nt([n.getValidationHandler().map((function(e){return dE.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){s.getOpt(t).each((function(t){Fn(t.element,"title",o.translate(e))}))}},validator:{validate:function(n){var r=tp.getValue(n);return PP.nu((function(n){e({type:t.filetype,url:r.value},(function(t){if("invalid"===t.status){var e=ro.error(t.message);n(e)}else{var r=ro.value(t.message);n(r)}}))}))},validateOnLoad:!1}})})).toArray(),[Pv.config({disabled:function(){return t.disabled||o.isDisabled()}}),yT.config({}),Nx("urlinput-events",nt(["file"===t.filetype?[Hu(ja(),(function(e){Su(e,MT,{name:t.name})}))]:[],[Hu(Ua(),(function(e){Su(e,MT,{name:t.name}),i(e)})),Hu(Qa(),(function(e){Su(e,MT,{name:t.name}),i(e)}))]]))]])),eventOrder:(r={},r[ja()]=["streaming","urlinput-events","invalidating"],r),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:pk(!1,1,"normal")},onExecute:function(t,e,n){Su(e,AT,{})},onItemExecute:function(e,n,r,o){i(e),Su(e,MT,{name:t.name})}}),u=t.label.map((function(t){return OT(t,o)})),c=function(t,e,n,r){return void 0===n&&(n=t),void 0===r&&(r=t),RC(n,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],attributes:T({title:o.translate(r),"aria-live":"polite"},e.fold((function(){return{}}),(function(t){return{id:t}})))},o.icons)},s=kC(c("invalid",R.some(ZP),"warning")),l=kC({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[s.asSpec()]}),f=n.getUrlPicker(t.filetype),d=oc("browser.url.event"),m=kC({dom:{tag:"div",classes:["tox-control-wrap"]},components:[a,l.asSpec()],behaviours:mf([Pv.config({disabled:function(){return t.disabled||o.isDisabled()}})])}),h=kC(QB({name:t.name,icon:R.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return Cu(t,d)}),o,[],["tox-browse-url"])),g=function(){return{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:nt([[m.asSpec()],f.map((function(){return h.asSpec()})).toArray()])}},v=function(e){bv.getCurrent(e).each((function(n){var r=tp.getValue(n),o=T({fieldname:t.name},r);f.each((function(r){r(o).get((function(r){tp.setValue(n,r),Su(e,MT,{name:t.name})}))}))}))};return gT.sketch({dom:kT(),components:u.toArray().concat([g()]),fieldBehaviours:mf([Pv.config({disabled:function(){return t.disabled||o.isDisabled()},onDisabled:function(t){gT.getField(t).each(Pv.disable),h.getOpt(t).each(Pv.disable)},onEnabled:function(t){gT.getField(t).each(Pv.enable),h.getOpt(t).each(Pv.enable)}}),cO(),Nx("url-input-events",[Hu(d,v)])])})},tL=function(t,e){return sT.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:AC(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){Su(e,ET,{name:"alert-banner",value:t.url})},buttonBehaviours:mf([VC()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})},eL=function(t,e){var n=tp.config({store:{mode:"manual",getValue:function(t){var e=t.element.dom;return e.checked},setValue:function(t,e){var n=t.element.dom;n.checked=e}}}),r=function(t){return t.element.dom.click(),R.some(!0)},o=gT.parts.field({factory:{sketch:w},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:mf([WD.self(),Pv.config({disabled:function(){return t.disabled||e.isDisabled()}}),yT.config({}),Yx.config({}),n,Tx.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),Nx("checkbox-events",[Hu(Ua(),(function(e,n){Su(e,MT,{name:t.name})}))])])}),i=gT.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:mf([NE.config({})])}),a=function(t){var n="checked"===t?"selected":"unselected";return RC(n,{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},e.icons)},u=kC({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return gT.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,u.asSpec(),i],fieldBehaviours:mf([Pv.config({disabled:function(){return t.disabled||e.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){gT.getField(t).each(Pv.disable)},onEnabled:function(t){gT.getField(t).each(Pv.enable)}}),cO()])})},nL=function(t){return"presentation"===t.presets?sT.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):sT.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:mf([yT.config({}),Yx.config({})])})},rL=function(t){return function(e,n,r){return Ot(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}},oL=function(t){return function(e,n,r){var o=Co(n,{source:"dynamic"});return rL(t)(e,o,r)}},iL={bar:rL((function(t,e){return fT(t,e.shared)})),collection:rL((function(t,e){return RT(t,e.shared.providers)})),alertbanner:rL((function(t,e){return tL(t,e.shared.providers)})),input:rL((function(t,e){return lP(t,e.shared.providers)})),textarea:rL((function(t,e){return fP(t,e.shared.providers)})),label:rL((function(t,e){return ZR(t,e.shared)})),iframe:oL((function(t,e){return xV(t,e.shared.providers)})),button:rL((function(t,e){return oR(t,e.shared.providers)})),checkbox:rL((function(t,e){return eL(t,e.shared.providers)})),colorinput:rL((function(t,e){return qE(t,e.shared,e.colorinput)})),colorpicker:rL(XD),dropzone:rL((function(t,e){return sV(t,e.shared.providers)})),grid:rL((function(t,e){return lV(t,e.shared)})),listbox:rL((function(t,e){return rP(t,e)})),selectbox:rL((function(t,e){return uP(t,e.shared.providers)})),sizeinput:rL((function(t,e){return vR(t,e.shared.providers)})),urlinput:rL((function(t,e){return QP(t,e,e.urlinput)})),customeditor:rL(JD),htmlpanel:rL(nL),imagetools:rL((function(t,e){return JR(t,e.shared.providers)})),table:rL((function(t,e){return cP(t,e.shared.providers)})),panel:rL((function(t,e){return oP(t,e)}))},aL={field:function(t,e){return e}},uL=function(t,e,n){var r=Co(n,{shared:{interpreter:function(e){return cL(t,e,r)}}});return cL(t,e,r)},cL=function(t,e,n){return Ot(iL,e.type).fold((function(){return console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e}),(function(r){return r(t,e,n)}))},sL=function(t,e){var n=aL;return cL(n,t,e)},lL={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},fL=function(t,e,n){var r=12,o={maxHeightFunction:Md()},i=function(){return{type:"node",root:En(t()),node:R.from(t()),bubble:Hd(r,r,lL),layouts:{onRtl:function(){return[dC]},onLtr:function(){return[fC]}},overrides:o}},a=function(){return{type:"hotspot",hotspot:e(),bubble:Hd(-r,r,lL),layouts:{onRtl:function(){return[Nl]},onLtr:function(){return[jl]}},overrides:o}};return function(){return n()?i():a()}},dL=function(t,e,n){var r=function(){return{type:"node",root:En(t()),node:R.from(t()),layouts:{onRtl:function(){return[mC]},onLtr:function(){return[mC]}}}},o=function(){return{type:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[ql]},onLtr:function(){return[ql]}}}};return function(){return n()?r():o()}},mL=function(t,e){return function(){return{type:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return R.some(km.range(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(e.endContainer),e.endOffset))}}}},hL=function(t){return function(e){return{type:"node",root:t(),node:e}}},gL=function(t,e,n){var r=jz(t),o=function(){return ee.fromDom(t.getBody())},i=function(){return ee.fromDom(t.getContentAreaContainer())},a=function(){return r||!n()};return{inlineDialog:fL(i,e,a),banner:dL(i,e,a),cursor:mL(t,o),node:hL(o)}},pL=function(t){return function(e,n){var r=t_(t);r(e,n)}},vL=function(t){return function(){return BM(t)}},bL=function(t){return function(){return PM(t)}},yL=function(t){return function(){return qM(t)}},xL=function(t){return{colorPicker:pL(t),hasCustomColors:vL(t),getColors:bL(t),getColorCols:yL(t)}},wL=function(t){return function(){return $z(t)}},CL=function(t){return{isDraggableModal:wL(t)}},SL=function(t){var e=oa(Pz(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===e.get()},getDockingMode:e.get,setDockingMode:e.set}},kL=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],zL=function(t){return Mt(t,"items")},OL=function(t){return Mt(t,"block")},ML=function(t){return Mt(t,"inline")},_L=function(t){return Mt(t,"selector")},TL=function(t){return Z(t,(function(t,e){if(zL(e)){var n=TL(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(ML(e)||OL(e)||_L(e)){var r=i(e.name)?e.name:e.title.toLowerCase(),o="custom-"+r;return{customFormats:t.customFormats.concat([{name:o,format:e}]),formats:t.formats.concat([{title:e.title,format:o,icon:e.icon}])}}return T(T({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},EL=function(t,e){var n=TL(e),r=function(e){$(e,(function(e){t.formatter.has(e.name)||t.formatter.register(e.name,e.format)}))};return t.formatter?r(n.customFormats):t.on("init",(function(){r(n.customFormats)})),n.formats},AL=function(t){return Sz(t).map((function(e){var n=EL(t,e);return kz(t)?kL.concat(n):n})).getOr(kL)},HL=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return Co(t,r)},DL=function(t,e,n,r){var o=function(t){return HL(t,n,r)},a=function(t){var e={type:"submenu"};return Co(t,e)},u=function(e){var o=i(e.name)?e.name:oc(e.title),a="custom-"+o,u={type:"formatter",format:a,isSelected:n(a),getStylePreview:r(a)},c=Co(e,u);return t.formatter.register(o,c),c},c=function(t){return q(t,(function(t){var e=gt(t);if(_t(t,"items")){var n=c(t.items);return Co(a(t),{getStyleItems:x(n)})}return _t(t,"format")?o(t):1===e.length&&j(e,"title")?Co(t,{type:"separator"}):u(t)}))};return c(e)},VL=function(t){var e=function(e){return function(){return t.formatter.match(e)}},n=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?R.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):R.none()}},r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[t.format]},o=oa([]),i=oa([]),a=oa([]),u=oa([]),c=oa(!1);t.on("PreInit",(function(a){var u=AL(t),c=DL(t,u,e,n);o.set(c),i.set(rt(c,r))})),t.on("addStyleModifications",(function(o){var i=DL(t,o.items,e,n);a.set(i),c.set(o.replace),u.set(rt(i,r))}));var s=function(){var t=c.get()?[]:o.get(),e=a.get();return t.concat(e)},l=function(){var t=c.get()?[]:i.get(),e=u.get();return t.concat(e)};return{getData:s,getFlattenedKeys:l}},BL=function(t){return d(t)&&1===t.nodeType},RL=ZD.trim,PL=function(t){return function(e){if(BL(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},LL=PL("true"),IL=PL("false"),FL=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},NL=function(t){while(t=t.parentNode){var e=t.contentEditable;if(e&&"inherit"!==e)return LL(t)}return!1},jL=function(t,e){return q(Km(ee.fromDom(e),t),(function(t){return t.dom}))},UL=function(t){return t.innerText||t.textContent},WL=function(t){return t.id?t.id:oc("h")},GL=function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)},qL=function(t){return GL(t)&&XL(t)},$L=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},XL=function(t){return NL(t)&&!IL(t)},KL=function(t){return $L(t)&&XL(t)},YL=function(t){return $L(t)?parseInt(t.nodeName.substr(1),10):0},JL=function(t){var e=WL(t),n=function(){t.id=e};return FL("header",UL(t),"#"+e,YL(t),n)},ZL=function(t){var e=t.id||t.name,n=UL(t);return FL("anchor",n||"#"+e,"#"+e,0,p)},QL=function(t){return q(Y(t,KL),JL)},tI=function(t){return q(Y(t,qL),ZL)},eI=function(t){var e=jL("h1,h2,h3,h4,h5,h6,a:not([href])",t);return e},nI=function(t){return RL(t.title).length>0},rI=function(t){var e=eI(t);return Y(QL(e).concat(tI(e)),nI)},oI={find:rI},iI="tinymce-url-history",aI=5,uI=function(t){return i(t)&&/^https?/.test(t)},cI=function(t){return u(t)&&t.length<=aI&&ot(t,uI)},sI=function(t){return a(t)&&kt(t,(function(t){return!cI(t)})).isNone()},lI=function(){var t,e=OM.getItem(iI);if(null===e)return{};try{t=JSON.parse(e)}catch(n){if(n instanceof SyntaxError)return console.log("Local storage "+iI+" was not valid JSON",n),{};throw n}return sI(t)?t:(console.log("Local storage "+iI+" was not valid format",t),{})},fI=function(t){if(!sI(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));OM.setItem(iI,JSON.stringify(t))},dI=function(t){var e=lI();return Ot(e,t).getOr([])},mI=function(t,e){if(uI(t)){var n=lI(),r=Ot(n,e).getOr([]),o=Y(r,(function(e){return e!==t}));n[e]=[t].concat(o).slice(0,aI),fI(n)}},hI=function(t){return!!t},gI=function(t){return bt(ZD.makeMap(t,/[, ]/),hI)},pI=function(t){return R.from(Jz(t)).filter(m)},vI=function(t){var e=R.some(Zz(t)).filter(hI),n=R.some(Qz(t)).filter(hI),r=e.or(n).map(gI);return pI(t).fold(O,(function(t){return r.fold(M,(function(t){return gt(t).length>0&&t}))}))},bI=function(t,e){var n=vI(t);return s(n)?n?pI(t):R.none():n[e]?pI(t):R.none()},yI=function(t,e){return bI(t,e).map((function(n){return function(r){return tE.nu((function(o){var u=function(t,e){if(!i(t))throw new Error("Expected value to be string");if(void 0!==e&&!a(e))throw new Error("Expected meta to be a object");var n={value:t,meta:e};o(n)},c=T({filetype:e,fieldname:r.fieldname},R.from(r.meta).getOr({}));n.call(t,u,r.value,c)}))}}))},xI=function(t){return R.from(t).filter(i).getOrUndefined()},wI=function(t){return tO(t)?R.none():R.some({targets:oI.find(t.getBody()),anchorTop:xI(eO(t)),anchorBottom:xI(nO(t))})},CI=function(t){return R.from(rO(t))},SI=function(t){return{getHistory:dI,addToHistory:mI,getLinkInformation:function(){return wI(t)},getValidationHandler:function(){return CI(t)},getUrlPicker:function(e){return yI(t,e)}}},kI=function(t,e,n){var r=oa(!1),o=SL(e),i={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:zC.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return sL(t,i)},anchors:gL(e,n,o.isPositionedAtTop),header:o,getSink:function(){return ro.value(t)}},urlinput:SI(e),styleselect:VL(e),colorinput:xL(e),dialog:CL(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return i},zI=function(t,e,n){var r=function(t,r){$([e,n],(function(e){e.broadcastEvent(t,r)}))},o=function(t,r){$([e,n],(function(e){e.broadcastOn([t],r)}))},i=function(t){return o(yg(),{target:t.target})},a=Cf(),u=ad(a,"touchstart",i),c=ad(a,"touchmove",(function(t){return r(cu(),t)})),s=ad(a,"touchend",(function(t){return r(su(),t)})),l=ad(a,"mousedown",i),f=ad(a,"mouseup",(function(t){0===t.raw.button&&o(wg(),{target:t.target})})),d=function(t){return o(yg(),{target:ee.fromDom(t.target)})},m=function(t){0===t.button&&o(wg(),{target:ee.fromDom(t.target)})},h=function(){$(t.editorManager.get(),(function(e){t!==e&&e.fire("DismissPopups",{relatedTarget:t})}))},g=function(t){return r(lu(),cd(t))},p=function(t){o(xg(),{}),r(fu(),cd(t))},v=function(){return o(xg(),{})},b=function(e){e.state&&o(yg(),{target:ee.fromDom(t.getContainer())})},y=function(t){o(yg(),{target:ee.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",(function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("mousedown",h),t.on("ScrollWindow",g),t.on("ResizeWindow",p),t.on("ResizeEditor",v),t.on("AfterProgressState",b),t.on("DismissPopups",y)})),t.on("remove",(function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("mousedown",h),t.off("ScrollWindow",g),t.off("ResizeWindow",p),t.off("ResizeEditor",v),t.off("AfterProgressState",b),t.off("DismissPopups",y),l.unbind(),u.unbind(),c.unbind(),s.unbind(),f.unbind()})),t.on("detach",(function(){Zh(e),Zh(n),e.destroy(),n.destroy()}))},OI=nv,MI=Lp,_I=x([Xi("shell",!1),Ti("makeItem"),Xi("setupItem",p),op.field("listBehaviours",[Ix])]),TI=function(){return{behaviours:mf([Ix.config({})])}},EI=Bp({name:"items",overrides:TI}),AI=x([EI]),HI=x("CustomList"),DI=function(t,e,n,r){var o=function(e,n){a(e).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=Ix.contents(r),i=n.length,a=i-o.length,u=a>0?W(a,(function(){return t.makeItem()})):[],c=o.slice(i);$(c,(function(t){return Ix.remove(r,t)})),$(u,(function(t){return Ix.append(r,t)}));var s=Ix.contents(r);$(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))},i=t.shell?{behaviours:[Ix.config({})],components:[]}:{behaviours:[],components:e},a=function(e){return t.shell?R.some(e):Xp(e,t,"items")};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:rp(t.listBehaviours,i.behaviours),apis:{setItems:o}}},VI=mv({name:HI(),configFields:_I(),partFields:AI(),factory:DI,apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),BI=x([Ti("dom"),Xi("shell",!0),ep("toolbarBehaviours",[Ix])]),RI=function(){return{behaviours:mf([Ix.config({})])}},PI=x([Bp({name:"groups",overrides:RI})]),LI=function(t,e,n,r){var o=function(t,e){i(t).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Ix.set(t,e)}))},i=function(e){return t.shell?R.some(e):Xp(e,t,"groups")},a=t.shell?{behaviours:[Ix.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:a.components,behaviours:rp(t.toolbarBehaviours,a.behaviours),apis:{setGroups:o},domModification:{attributes:{role:"group"}}}},II=mv({name:"Toolbar",configFields:BI(),partFields:PI(),factory:LI,apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),FI=p,NI=O,jI=x([]),UI=Object.freeze({__proto__:null,setup:FI,isDocked:NI,getBehaviours:jI}),WI=function(t){var e=Tt(Qn(t,"position"),"fixed"),n=e?R.none():yn(t);return n.orThunk((function(){var e=ee.fromTag("span");return vn(t).bind((function(t){Er(t,e);var n=yn(e);return Br(e),n}))}))},GI=function(t){return WI(t).map(mr).getOrThunk((function(){return lr(0,0)}))},qI=aa.generate([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),$I=function(t,e){var n=t.element;is(n,e.transitionClass),us(n,e.fadeOutClass),is(n,e.fadeInClass),e.onShow(t)},XI=function(t,e){var n=t.element;is(n,e.transitionClass),us(n,e.fadeInClass),is(n,e.fadeOutClass),e.onHide(t)},KI=function(t,e){return t.ye.y},YI=function(t,e){return t.y>=e.y},JI=function(t,e){return t.bottom<=e.bottom},ZI=function(t,e,n){return ot(t,(function(t){switch(t){case"bottom":return JI(e,n);case"top":return YI(e,n)}}))},QI=function(t,e){return e.getInitialPos().map((function(e){return Yr(e.bounds.x,e.bounds.y,vr(t),ar(t))}))},tF=function(t,e,n){n.setInitialPos({style:tr(t),position:Jn(t,"position")||"static",bounds:e})},eF=function(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return R.some(qI.static());case"absolute":var o=WI(t).map(Jr).getOrThunk((function(){return Jr(Pn())}));return R.some(qI.absolute(Tf("absolute",Ot(r.style,"left").map((function(t){return e.x-o.x})),Ot(r.style,"top").map((function(t){return e.y-o.y})),Ot(r.style,"right").map((function(t){return o.right-e.right})),Ot(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return R.none()}}))},nF=function(t,e,n){return QI(t,n).filter((function(t){return ZI(n.getModes(),t,e)})).bind((function(e){return eF(t,e,n)}))},rF=function(t,e,n){var r=Jr(t);if(ZI(n.getModes(),r,e))return R.none();tF(t,r,n);var o=Qr(),i=r.x-o.x,a=e.y-o.y,u=o.bottom-e.bottom,c=r.y<=e.y;return R.some(qI.fixed(Tf("fixed",R.some(i),c?R.some(a):R.none(),R.none(),c?R.none():R.some(u))))},oF=function(t,e,n){var r=t.element,o=Tt(Qn(r,"position"),"fixed");return o?nF(r,e,n):rF(r,e,n)},iF=function(t,e){var n=t.element;return QI(n,e).bind((function(t){return eF(n,t,e)}))},aF=function(t,e,n){n.setDocked(!1),$(["left","right","top","bottom","position"],(function(e){return nr(t.element,e)})),e.onUndocked(t)},uF=function(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Af(t.element,r);var i=o?e.onDocked:e.onUndocked;i(t)},cF=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=KI(i,r);if(a!==n.isVisible())if(n.setVisible(a),o&&!a)ss(t.element,[e.fadeOutClass]),e.onHide(t);else{var u=a?$I:XI;u(t,e)}}))}))},sF=function(t,e,n){var r=e.lazyViewport(t),o=n.isDocked();o&&cF(t,e,n,r),oF(t,r,n).each((function(o){o.fold((function(){return aF(t,e,n)}),(function(r){return uF(t,e,n,r)}),(function(o){cF(t,e,n,r,!0),uF(t,e,n,o)}))}))},lF=function(t,e,n){var r=t.element;n.setDocked(!1),iF(t,n).each((function(r){r.fold((function(){return aF(t,e,n)}),(function(r){return uF(t,e,n,r)}),p)})),n.setVisible(!0),e.contextual.each((function(e){ls(r,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)})),fF(t,e,n)},fF=function(t,e,n){t.getSystem().isConnected()&&sF(t,e,n)},dF=function(t,e,n){n.isDocked()&&lF(t,e,n)},mF=function(t,e,n){return n.isDocked()},hF=function(t,e,n,r){return n.setModes(r)},gF=function(t,e,n){return n.getModes()},pF=Object.freeze({__proto__:null,refresh:fF,reset:dF,isDocked:mF,getModes:gF,setModes:hF}),vF=function(t,e){return _u([Nu(qa(),(function(n,r){t.contextual.each((function(t){if(cs(n.element,t.transitionClass)){ls(n.element,[t.transitionClass,t.fadeInClass]);var o=e.isVisible()?t.onShown:t.onHidden;o(n)}r.stop()}))})),Hu(lu(),(function(n,r){fF(n,t,e)})),Hu(fu(),(function(n,r){dF(n,t,e)}))])},bF=Object.freeze({__proto__:null,events:vF}),yF=[qi("contextual",[Hi("fadeInClass"),Hi("fadeOutClass"),Hi("transitionClass"),Bi("lazyContext"),ul("onShow"),ul("onShown"),ul("onHide"),ul("onHidden")]),ta("lazyViewport",Qr),na("modes",["top","bottom"],si),ul("onDocked"),ul("onUndocked")],xF=function(t){var e=oa(!1),n=oa(!0),r=od(),o=oa(t.modes),i=function(){return"docked: "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")};return zc({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:i})},wF=Object.freeze({__proto__:null,init:xF}),CF=gf({fields:yF,name:"docking",active:bF,apis:pF,state:wF}),SF=x(oc("toolbar-height-change")),kF={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},zF="tox-tinymce--toolbar-sticky-on",OF="tox-tinymce--toolbar-sticky-off",MF=function(t,e){var n=mn(e),r=n.dom.defaultView.innerHeight,o=Pr(n),i=ee.fromDom(t.elm),a=Zr(i),u=ar(i),c=a.y,s=c+u,l=mr(e),f=ar(e),d=l.top,m=d+f,h=Math.abs(d-o.top)<2,g=Math.abs(m-(o.top+r))<2;if(h&&cd){var p=c-r+u+f;Lr(o.left,p,n)}},_F=function(t,e){return j(CF.getModes(t),e)},TF=function(t){var e=function(t){return ur(t)+(parseInt(Jn(t,"margin-top"),10)||0)+(parseInt(Jn(t,"margin-bottom"),10)||0)},n=t.element;vn(n).each((function(r){var o="padding-"+CF.getModes(t)[0];if(CF.isDocked(t)){var i=vr(r);Xn(n,"width",i+"px"),Xn(r,o,e(n)+"px")}else nr(n,"width"),nr(r,o)}))},EF=function(t,e){e?(us(t,kF.fadeOutClass),ss(t,[kF.transitionClass,kF.fadeInClass])):(us(t,kF.fadeInClass),ss(t,[kF.fadeOutClass,kF.transitionClass]))},AF=function(t,e){var n=ee.fromDom(t.getContainer());e?(is(n,zF),us(n,OF)):(is(n,OF),us(n,zF))},HF=function(t,e){var n=mn(e);Of(n).filter((function(t){return!sn(e,t)})).filter((function(e){return sn(e,ee.fromDom(n.dom.body))||dn(t,e)})).each((function(){return Sf(e)}))},DF=function(t,e){return Mf(t).orThunk((function(){return e().toOptional().bind((function(t){return Mf(t.element)}))}))},VF=function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(CF.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(TF)})),t.on("SkinLoaded",(function(){n().each((function(t){CF.isDocked(t)?CF.reset(t):CF.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(CF.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){CF.refresh(e);var n=e.element;Jb(n)&&MF(t,n)}))})),t.on("PostRender",(function(){AF(t,!1)}))},BF=function(t){return t().map(CF.isDocked).getOr(!1)},RF=function(){var t;return[yf.config({channels:(t={},t[SF()]={onReceive:TF},t)})]},PF=function(t,e){var n=od(),r=e.getSink,o=function(t){r().each((function(e){return t(e.element)}))},i=function(e){t.inline||TF(e),AF(t,CF.isDocked(e)),e.getSystem().broadcastOn([xg()],{}),r().each((function(t){return t.getSystem().broadcastOn([xg()],{})}))},a=t.inline?[]:RF();return A([Yx.config({}),CF.config({contextual:T({lazyContext:function(e){var n=ur(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=Jr(ee.fromDom(r)),i=o.height-n,a=o.y+(_F(e,"top")?0:n);return R.some(Yr(o.x,a,o.width,i))},onShow:function(){o((function(t){return EF(t,!0)}))},onShown:function(t){o((function(t){return ls(t,[kF.transitionClass,kF.fadeInClass])})),n.get().each((function(e){HF(t.element,e),n.clear()}))},onHide:function(t){DF(t.element,r).fold(n.clear,n.set),o((function(t){return EF(t,!1)}))},onHidden:function(){o((function(t){return ls(t,[kF.transitionClass])}))}},kF),lazyViewport:function(e){var n=Qr(),r=qz(t),o=n.y+(_F(e,"top")?r:0),i=n.height-(_F(e,"bottom")?r:0);return Yr(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:i,onUndocked:i})],a,!0)},LF=Object.freeze({__proto__:null,setup:VF,isDocked:BF,getBehaviours:PF}),IF=function(t){var e=t.editor,n=t.sticky?PF:jI;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:mf(n(e,t.sharedBackstage))}},FF=ti([Hi("type"),Ei("items",ni([ii([Hi("name"),Ii("items",si)]),si]))].concat(kS)),NF=function(t){return xi("GroupToolbarButton",FF,t)},jF=[Ui("text"),Ui("tooltip"),Ui("icon"),Bi("fetch"),ta("onSetup",(function(){return p}))],UF=ti(A([Hi("type")],jF,!0)),WF=function(t){return xi("menubutton",UF,t)},GF=ti([Hi("type"),Ui("tooltip"),Ui("icon"),Ui("text"),Wi("select"),Bi("fetch"),ta("onSetup",(function(){return p})),Zi("presets","normal",["normal","color","listpreview"]),Xi("columns",1),Bi("onAction"),Bi("onItemAction")]),qF=function(t){return xi("SplitButton",GF,t)},$F=function(t,e){var n=function(t,n){var r=q(n,(function(t){var n={type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}},r=WF(n).mapError((function(t){return Si(t)})).getOrDie();return $B(r,"tox-mbtn",e.backstage,R.some("menuitem"))}));Ix.set(t,r)},r={focus:Tx.focusIn,setMenus:n};return{uid:t.uid,dom:t.dom,components:[],behaviours:mf([Ix.config({}),Nx("menubar-events",[ju((function(e){t.onSetup(e)})),Hu(Pa(),(function(t,e){Ls(t.element,".tox-mbtn--active").each((function(n){Is(e.event.target,".tox-mbtn").each((function(e){sn(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){PE.expand(t),PE.close(n),Yx.focus(t)}))}))}))}))})),Hu(pu(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){PE.isOpen(n)&&(PE.expand(t),PE.close(n))}))}))}))]),Tx.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),R.some(!0)}}),yT.config({})]),apis:r,domModification:{attributes:{role:"menubar"}}}},XF=dv({factory:$F,name:"silver.Menubar",configFields:[Ti("dom"),Ti("uid"),Ti("onEscape"),Ti("backstage"),Xi("onSetup",p)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),KF=function(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))},YF=function(t){return t.dimension.property},JF=function(t,e){return t.dimension.getDimension(e)},ZF=function(t,e){var n=KF(t,e);ls(n,[e.shrinkingClass,e.growingClass])},QF=function(t,e){us(t.element,e.openClass),is(t.element,e.closedClass),Xn(t.element,YF(e),"0px"),rr(t.element)},tN=function(t,e){us(t.element,e.closedClass),is(t.element,e.openClass),nr(t.element,YF(e))},eN=function(t,e,n,r){n.setCollapsed(),Xn(t.element,YF(e),JF(e,t.element)),rr(t.element),ZF(t,e),QF(t,e),e.onStartShrink(t),e.onShrunk(t)},nN=function(t,e,n,r){var o=r.getOrThunk((function(){return JF(e,t.element)}));n.setCollapsed(),Xn(t.element,YF(e),o),rr(t.element);var i=KF(t,e);us(i,e.growingClass),is(i,e.shrinkingClass),QF(t,e),e.onStartShrink(t)},rN=function(t,e,n){var r=JF(e,t.element),o="0px"===r?eN:nN;o(t,e,n,R.some(r))},oN=function(t,e,n){var r=KF(t,e),o=cs(r,e.shrinkingClass),i=JF(e,t.element);tN(t,e);var a=JF(e,t.element),u=function(){Xn(t.element,YF(e),i),rr(t.element)},c=function(){QF(t,e)},s=o?u:c;s(),us(r,e.shrinkingClass),is(r,e.growingClass),tN(t,e),Xn(t.element,YF(e),a),n.setExpanded(),e.onStartGrow(t)},iN=function(t,e,n){if(n.isExpanded()){nr(t.element,YF(e));var r=JF(e,t.element);Xn(t.element,YF(e),r)}},aN=function(t,e,n){n.isExpanded()||oN(t,e,n)},uN=function(t,e,n){n.isExpanded()&&rN(t,e,n)},cN=function(t,e,n){n.isExpanded()&&eN(t,e,n)},sN=function(t,e,n){return n.isExpanded()},lN=function(t,e,n){return n.isCollapsed()},fN=function(t,e,n){var r=KF(t,e);return!0===cs(r,e.growingClass)},dN=function(t,e,n){var r=KF(t,e);return!0===cs(r,e.shrinkingClass)},mN=function(t,e,n){return fN(t,e)||dN(t,e)},hN=function(t,e,n){var r=n.isExpanded()?rN:oN;r(t,e,n)},gN=Object.freeze({__proto__:null,refresh:iN,grow:aN,shrink:uN,immediateShrink:cN,hasGrown:sN,hasShrunk:lN,isGrowing:fN,isShrinking:dN,isTransitioning:mN,toggleGrow:hN,disableTransitions:ZF}),pN=function(t,e,n){var r=e.expanded;return Ec(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:ma(e.dimension.property,"0px")})},vN=function(t,e){return _u([Nu(qa(),(function(n,r){var o=r.event.raw;if(o.propertyName===t.dimension.property){ZF(n,t),e.isExpanded()&&nr(n.element,t.dimension.property);var i=e.isExpanded()?t.onGrown:t.onShrunk;i(n)}}))])},bN=Object.freeze({__proto__:null,exhibit:pN,events:vN}),yN=[Ti("closedClass"),Ti("openClass"),Ti("shrinkingClass"),Ti("growingClass"),Fi("getAnimationRoot"),ul("onShrunk"),ul("onStartShrink"),ul("onGrown"),ul("onStartGrow"),Xi("expanded",!1),Ei("dimension",ki("property",{width:[fl("property","width"),fl("getDimension",(function(t){return vr(t)+"px"}))],height:[fl("property","height"),fl("getDimension",(function(t){return ar(t)+"px"}))]}))],xN=function(t){var e=oa(t.expanded),n=function(){return"expanded: "+e.get()};return zc({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:S(e.set,!1),setExpanded:S(e.set,!0),readState:n})},wN=Object.freeze({__proto__:null,init:xN}),CN=gf({fields:yN,name:"sliding",active:bN,apis:gN,state:wN}),SN="container",kN=[ep("slotBehaviours",[])],zN=function(t){return""},ON=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),Up(SN,zN(e),n)};return{slot:e,record:x(t)}}(),n=t(e),r=e.record(),o=q(r,(function(t){return Dp({name:t,pname:zN(t)})}));return av(SN,kN,o,MN,n)},MN=function(t,e){var n=function(e){return Zp(t)},r=function(e,n){return Xp(e,t,n)},o=function(e,n){return function(r,o){return Xp(r,t,o).map((function(t){return e(t,o)})).getOr(n)}},i=function(t){return function(e,n){$(n,(function(n){return t(e,n)}))}},a=function(t,e){return"true"!==jn(t.element,"aria-hidden")},u=function(t,e){if(!a(t)){var n=t.element;nr(n,"display"),Gn(n,"aria-hidden"),Su(t,vu(),{name:e,visible:!0})}},c=function(t,e){if(a(t)){var n=t.element;Xn(n,"display","none"),Fn(n,"aria-hidden","true"),Su(t,vu(),{name:e,visible:!1})}},s=o(a,!1),l=o(c),f=i(l),d=function(t){return f(t,n())},m=o(u),h={getSlotNames:n,getSlot:r,isShowing:s,hideSlot:l,hideAllSlots:d,showSlot:m};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.slotBehaviours),apis:h}},_N=bt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},(function(t){return Sc(t)})),TN=T(T({},_N),{sketch:ON}),EN=ti([Ui("icon"),Ui("tooltip"),ta("onShow",p),ta("onHide",p),ta("onSetup",(function(){return p}))]),AN=function(t){return xi("sidebar",EN,t)},HN=function(t){var e=t.ui.registry.getAll().sidebars;$(gt(e),(function(n){var r=e[n],o=function(){return Tt(R.from(t.queryCommandValue("ToggleSidebar")),n)};t.ui.registry.addToggleButton(n,{icon:r.icon,tooltip:r.tooltip,onAction:function(e){t.execCommand("ToggleSidebar",!1,n),e.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})}))},DN=function(t){return{element:function(){return t.element.dom}}},VN=function(t,e){var n=q(gt(e),(function(t){var n=e[t],r=wi(AN(n));return{name:t,getApi:DN,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}}));return q(n,(function(e){var r=oa(p);return t.slot(e.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Zk.unnamedEvents([gO(e,r),pO(e,r),Hu(vu(),(function(t,e){var r=e.event,o=tt(n,(function(t){return t.name===r.name}));o.each((function(e){var n=r.visible?e.onShow:e.onHide;n(e.getApi(t))}))}))])})}))},BN=function(t){return TN.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:VN(e,t),slotBehaviours:Zk.unnamedEvents([ju((function(t){return TN.hideAllSlots(t)}))])}}))},RN=function(t,e){var n=bv.getCurrent(t);n.each((function(t){return Ix.set(t,[BN(e)])}))},PN=function(t,e){var n=bv.getCurrent(t);n.each((function(t){var n=bv.getCurrent(t);n.each((function(n){CN.hasGrown(t)?TN.isShowing(n,e)?CN.shrink(t):(TN.hideAllSlots(n),TN.showSlot(n,e)):(TN.hideAllSlots(n),TN.showSlot(n,e),CN.grow(t))}))}))},LN=function(t){var e=bv.getCurrent(t);return e.bind((function(t){var e=CN.isGrowing(t)||CN.hasGrown(t);if(e){var n=bv.getCurrent(t);return n.bind((function(t){return tt(TN.getSlotNames(t),(function(e){return TN.isShowing(t,e)}))}))}return R.none()}))},IN=oc("FixSizeEvent"),FN=oc("AutoSizeEvent"),NN=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:mf([yT.config({}),Yx.config({}),CN.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){var e=bv.getCurrent(t);e.each(TN.hideAllSlots),Cu(t,FN)},onGrown:function(t){Cu(t,FN)},onStartGrow:function(t){Su(t,IN,{width:Qn(t.element,"width").getOr("")})},onStartShrink:function(t){Su(t,IN,{width:vr(t.element)+"px"})}}),Ix.config({}),bv.config({find:function(t){var e=Ix.contents(t);return ft(e)}})])}],behaviours:mf([WD.childAt(0),Nx("sidebar-sliding-events",[Hu(IN,(function(t,e){Xn(t.element,"width",e.event.width)})),Hu(FN,(function(t,e){nr(t.element,"width")}))])])}},jN=function(t,e,n,r){Fn(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=mf([Tx.config({mode:"special",onTab:function(){return R.some(!0)},onShiftTab:function(){return R.some(!0)}}),Yx.config({})]),a=r(o,i),u=o.getSystem().build(a);Ix.append(o,_s(u)),u.hasConfigured(Tx)&&e.focus&&Tx.focusIn(u),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return Ix.remove(o,u)}))},UN=function(t,e,n){Gn(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()},WN=Object.freeze({__proto__:null,block:jN,unblock:UN}),GN=[ta("getRoot",R.none),Qi("focus",!0),ul("onBlock"),ul("onUnblock")],qN=function(){var t=ed(),e=function(e){t.set({destroy:e})};return zc({readState:t.isSet,blockWith:e,clear:t.clear,isBlocked:t.isSet})},$N=Object.freeze({__proto__:null,init:qN}),XN=gf({fields:GN,name:"blocking",apis:WN,state:$N}),KN=function(t){var e=void 0!==t.dom.attributes?t.dom.attributes:[];return Z(e,(function(t,e){var n;return"class"===e.name?t:T(T({},t),(n={},n[e.name]=e.value,n))}),{})},YN=function(t){return Array.prototype.slice.call(t.dom.classList,0)},JN=function(t){var e=ee.fromHtml(t),n=wn(e),r=KN(e),o=YN(e),i=0===n.length?{}:{innerHtml:$u(e)};return T({tag:ue(e),classes:o,attributes:r},i)},ZN=function(t){return function(e,n){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:JN('
')}]}}},QN=function(t){return bv.getCurrent(t).each((function(t){return Sf(t.element)}))},tj=function(t,e){var n="tabindex",r="data-mce-"+n;R.from(t.iframeElement).map(ee.fromDom).each((function(t){e?(Un(t,n).each((function(e){return Fn(t,r,e)})),Fn(t,n,-1)):(Gn(t,n),Un(t,r).each((function(e){Fn(t,n,e),Gn(t,r)})))}))},ej=function(t,e,n,r){var o=e.element;if(tj(t,n),n)XN.block(e,ZN(r)),nr(o,"display"),Gn(o,"aria-hidden"),t.hasFocus()&&QN(e);else{var i=bv.getCurrent(e).exists((function(t){return zf(t.element)}));XN.unblock(e),Xn(o,"display","none"),Fn(o,"aria-hidden","true"),i&&t.focus()}},nj=function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:mf([Ix.config({}),XN.config({focus:!1}),bv.config({find:function(t){return ft(t.components())}})]),components:[]}},rj=function(t){return"focusin"===t.type},oj=function(t){if(rj(t)){var e=t.composed?ft(t.composedPath()):R.from(t.target);return e.map(ee.fromDom).filter(le).exists((function(t){return cs(t,"mce-pastebin")}))}return!1},ij=function(t,e,n){var r=oa(!1),o=od(),i=function(n){r.get()&&!oj(n)&&(n.preventDefault(),QN(e()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)}))}));var a=function(o){o!==r.get()&&(r.set(o),ej(t,e(),o,n.providers),t.fire("AfterProgressState",{state:o}))};t.on("ProgressState",(function(e){if(o.on(wC.clearTimeout),h(e.time)){var n=wC.setEditorTimeout(t,(function(){return a(e.state)}),e.time);o.set(n)}else a(e.state),o.clear()}))},aj=function(t,e){var n={len:0,list:[]},r=Z(t,(function(t,n){var r=e(n,t.len);return r.fold(x(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),n);return r.list},uj=function(t,e,n){return{within:t,extra:e,withinWidth:n}},cj=function(t,e,n){var r=aj(t,(function(t,e){var r=n(t);return R.some({element:t,start:e,finish:e+r,width:r})})),o=Y(r,(function(t){return t.finish<=e})),i=J(o,(function(t,e){return t+e.width}),0),a=r.slice(o.length);return{within:o,extra:a,withinWidth:i}},sj=function(t){return q(t,(function(t){return t.element}))},lj=function(t,e,n){var r=sj(t.concat(e));return uj(r,[],n)},fj=function(t,e,n,r){var o=sj(t).concat([n]);return uj(o,sj(e),r)},dj=function(t,e,n){return uj(sj(t),[],n)},mj=function(t,e,n){var r=cj(e,t,n);return 0===r.extra.length?R.some(r):R.none()},hj=function(t,e,n,r){var o=mj(t,e,n).getOrThunk((function(){return cj(e,t-n(r),n)})),i=o.within,a=o.extra,u=o.withinWidth;return 1===a.length&&a[0].width<=n(r)?lj(i,a,u):a.length>=1?fj(i,a,r,u):dj(i,a,u)},gj=function(t,e){var n=q(e,(function(t){return _s(t)}));II.setGroups(t,n)},pj=function(t){return ht(t,(function(t){return Mf(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}))},vj=function(t,e,n){var r=e.builtGroups.get();if(0!==r.length){var o=Kp(t,e,"primary"),i=bE.getCoupled(t,"overflowGroup");Xn(o.element,"visibility","hidden");var a=r.concat([i]),u=pj(a);n([]),gj(o,a);var c=vr(o.element),s=hj(c,e.builtGroups.get(),(function(t){return vr(t.element)}),i);0===s.extra.length?(Ix.remove(o,i),n([])):(gj(o,s.within),n(s.extra)),nr(o.element,"visibility"),rr(o.element),u.each(Yx.focus)}},bj=x([ep("splitToolbarBehaviours",[bE]),Mi("builtGroups",(function(){return oa([])}))]),yj=x([il(["overflowToggledClass"]),Wi("getOverflowBounds"),Ti("lazySink"),Mi("overflowGroups",(function(){return oa([])}))].concat(bj())),xj=x([Dp({factory:II,schema:BI(),name:"primary"}),Vp({schema:BI(),name:"overflow"}),Vp({name:"overflow-button"}),Vp({name:"overflow-group"})]),wj=x((function(t,e){yr(t,Math.floor(e))})),Cj=x([il(["toggledClass"]),Ti("lazySink"),Bi("fetch"),Wi("getBounds"),qi("fireDismissalEventInstead",[Xi("event",hu())]),Id()]),Sj=x([Vp({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:mf([gw.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Vp({factory:II,schema:BI(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:mf([Tx.config({mode:"cyclic",onEscape:function(e){return Xp(e,t,"button").each(Yx.focus),R.none()}})])}}})]),kj=function(t,e){var n=bE.getCoupled(t,"toolbarSandbox");bg.isOpen(n)?bg.close(n):bg.open(n,e.toolbar())},zj=function(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();Lh.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:wj()}}},o)},Oj=function(t,e,n,r,o){II.setGroups(e,o),zj(t,e,n,r),gw.on(t)},Mj=function(t,e,n){var r=Ns(),o=function(o,i){n.fetch().get((function(o){Oj(t,i,n,e.layouts,o),r.link(t.element),Tx.focusIn(i)}))},i=function(){gw.off(t),Yx.focus(t),r.unlink(t.element)};return{dom:{tag:"div",attributes:{id:r.id}},behaviours:mf([Tx.config({mode:"special",onEscape:function(t){return bg.close(t),R.some(!0)}}),bg.config({onOpen:o,onClose:i,isPartOf:function(e,n,r){return Us(n,r)||Us(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),yf.config({channels:T(T({},Sg(T({isExtraPart:O},n.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),zg({doReposition:function(){bg.getState(bE.getCoupled(t,"toolbarSandbox")).each((function(r){zj(t,r,n,e.layouts)}))}}))})])}},_j=function(t,e,n,r){return T(T({},SC.sketch(T(T({},r.button()),{action:function(t){kj(t,r)},buttonBehaviours:op.augment({dump:r.button().buttonBehaviours},[bE.config({others:{toolbarSandbox:function(e){return Mj(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){bg.getState(bE.getCoupled(e,"toolbarSandbox")).each((function(o){Oj(e,o,t,n.layouts,r)}))},reposition:function(e){bg.getState(bE.getCoupled(e,"toolbarSandbox")).each((function(r){zj(e,r,t,n.layouts)}))},toggle:function(t){kj(t,r)},getToolbar:function(t){return bg.getState(bE.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return bg.isOpen(bE.getCoupled(t,"toolbarSandbox"))}}})},Tj=mv({name:"FloatingToolbarButton",factory:_j,configFields:Cj(),partFields:Sj(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Ej=x([Ti("items"),il(["itemSelector"]),ep("tgroupBehaviours",[Tx])]),Aj=x([Rp({name:"items",unit:"item"})]),Hj=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.tgroupBehaviours,[Tx.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}},Dj=mv({name:"ToolbarGroup",configFields:Ej(),partFields:Aj(),factory:Hj}),Vj=function(t){return q(t,(function(t){return _s(t)}))},Bj=function(t,e,n){vj(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){Tj.setGroups(t,Vj(r))}))}))},Rj=function(t,e,n,r){var o=kC(Tj.sketch({fetch:function(){return tE.nu((function(e){e(Vj(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[jl,Nl]},onRtl:function(){return[Nl,jl]},onBottomLtr:function(){return[Wl,Ul]},onBottomRtl:function(){return[Ul,Wl]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bE.config({others:{overflowGroup:function(){return Dj.sketch(T(T({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(q(n,e.getSystem().build)),Bj(e,o,t)},refresh:function(e){return Bj(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){Tj.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(Tj.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){Tj.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(Tj.getToolbar)}},domModification:{attributes:{role:"group"}}}},Pj=mv({name:"SplitFloatingToolbar",configFields:yj(),partFields:xj(),factory:Rj,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),Lj=x([il(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),ul("onOpened"),ul("onClosed")].concat(bj())),Ij=x([Dp({factory:II,schema:BI(),name:"primary"}),Dp({factory:II,schema:BI(),name:"overflow",overrides:function(t){return{toolbarBehaviours:mf([CN.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){Xp(e,t,"overflow-button").each((function(t){gw.off(t),Yx.focus(t)})),t.onClosed(e)},onGrown:function(e){Tx.focusIn(e),t.onOpened(e)},onStartGrow:function(e){Xp(e,t,"overflow-button").each(gw.on)}}),Tx.config({mode:"acyclic",onEscape:function(e){return Xp(e,t,"overflow-button").each(Yx.focus),R.some(!0)}})])}}}),Vp({name:"overflow-button",overrides:function(t){return{buttonBehaviours:mf([gw.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Vp({name:"overflow-group"})]),Fj=function(t,e){return Xp(t,e,"overflow").map(CN.hasGrown).getOr(!1)},Nj=function(t,e){Xp(t,e,"overflow-button").bind((function(){return Xp(t,e,"overflow")})).each((function(n){jj(t,e),CN.toggleGrow(n)}))},jj=function(t,e){Xp(t,e,"overflow").each((function(n){vj(t,e,(function(t){var e=q(t,(function(t){return _s(t)}));II.setGroups(n,e)})),Xp(t,e,"overflow-button").each((function(t){CN.hasGrown(n)&&gw.on(t)})),CN.refresh(n)}))},Uj=function(t,e,n,r){var o="alloy.toolbar.toggle",i=function(e,n){var r=q(n,e.getSystem().build);t.builtGroups.set(r)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bE.config({others:{overflowGroup:function(t){return Dj.sketch(T(T({},r["overflow-group"]()),{items:[SC.sketch(T(T({},r["overflow-button"]()),{action:function(e){Cu(t,o)}}))]}))}}}),Nx("toolbar-toggle-events",[Hu(o,(function(e){Nj(e,t)}))])]),apis:{setGroups:function(e,n){i(e,n),jj(e,t)},refresh:function(e){return jj(e,t)},toggle:function(e){return Nj(e,t)},isOpen:function(e){return Fj(e,t)}},domModification:{attributes:{role:"group"}}}},Wj=mv({name:"SplitSlidingToolbar",configFields:Lj(),partFields:Ij(),factory:Uj,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),Gj=function(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:T({tag:"div",classes:["tox-toolbar__group"]},e),components:[Dj.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:mf([yT.config({}),Yx.config({})])}},qj=function(t){return Dj.sketch(Gj(t))},$j=function(t,e){var n=ju((function(e){var n=q(t.initGroups,qj);II.setGroups(e,n)}));return mf([mO.toolbarButton(t.providers.isDisabled),cO(),Tx.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Nx("toolbar-events",[n])])},Xj=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":Gj({title:R.none(),items:[]}),"overflow-button":YB({name:"more",icon:R.some("more-drawer"),disabled:!1,tooltip:R.some("More..."),primary:!1,borderless:!1},R.none(),t.providers)},splitToolbarBehaviours:$j(t,e)}},Kj=function(t){var e=Xj(t),n=4,r=Pj.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return Pj.sketch(T(T({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,r=Zr(e),o=gn(e),i=Zr(o),a=Math.max(o.dom.scrollHeight,i.height);return Yr(r.x+n,i.y,r.width-2*n,a)},parts:T(T({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[r],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},Yj=function(t){var e=Wj.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=Wj.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=Xj(t);return Wj.sketch(T(T({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([SF()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([SF()],{type:"closed"})}}))},Jj=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return II.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===jS.scrolling?["tox-toolbar--scrolling"]:[])},components:[II.parts.groups({})],toolbarBehaviours:$j(t,e)})},Zj=function(t,e,n){var r={getSocket:function(e){return OI.getPart(e,t,"socket")},setSidebar:function(e,n){OI.getPart(e,t,"sidebar").each((function(t){return RN(t,n)}))},toggleSidebar:function(e,n){OI.getPart(e,t,"sidebar").each((function(t){return PN(t,n)}))},whichSidebar:function(e){return OI.getPart(e,t,"sidebar").bind(LN).getOrNull()},getHeader:function(e){return OI.getPart(e,t,"header")},getToolbar:function(e){return OI.getPart(e,t,"toolbar")},setToolbar:function(e,n){OI.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){OI.getPart(e,t,"multiple-toolbar").each((function(t){VI.setItems(t,n)}))},refreshToolbar:function(e){var n=OI.getPart(e,t,"toolbar");n.each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){OI.getPart(e,t,"toolbar").each((function(t){Bt(t.getApis().toggle,(function(e){return e(t)}))}))},isToolbarDrawerToggled:function(e){return OI.getPart(e,t,"toolbar").bind((function(t){return R.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return OI.getPart(e,t,"throbber")},focusToolbar:function(e){var n=OI.getPart(e,t,"toolbar").orThunk((function(){return OI.getPart(e,t,"multiple-toolbar")}));n.each((function(t){Tx.focusIn(t)}))},setMenubar:function(e,n){OI.getPart(e,t,"menubar").each((function(t){XF.setMenus(t,n)}))},focusMenubar:function(e){OI.getPart(e,t,"menubar").each((function(t){XF.focus(t)}))}};return{uid:t.uid,dom:t.dom,components:e,apis:r,behaviours:t.behaviours}},Qj=MI.optional({factory:XF,name:"menubar",schema:[Ti("backstage")]}),tU=function(t){return t.type===jS.sliding?Yj:t.type===jS.floating?Kj:Jj},eU=MI.optional({factory:{sketch:function(t){return VI.sketch({uid:t.uid,dom:t.dom,listBehaviours:mf([Tx.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Jj({type:t.type,uid:oc("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),R.some(!0)}})},setupItem:function(t,e,n,r){II.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[Ti("dom"),Ti("onEscape")]}),nU=MI.optional({factory:{sketch:function(t){var e=tU(t),n={type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),R.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes};return e(n)}},name:"toolbar",schema:[Ti("dom"),Ti("onEscape"),Ti("getSink")]}),rU=MI.optional({factory:{sketch:IF},name:"header",schema:[Ti("dom")]}),oU=MI.optional({name:"socket",schema:[Ti("dom")]}),iU=MI.optional({factory:{sketch:NN},name:"sidebar",schema:[Ti("dom")]}),aU=MI.optional({factory:{sketch:nj},name:"throbber",schema:[Ti("dom")]}),uU=mv({name:"OuterContainer",factory:Zj,configFields:[Ti("dom"),Ti("behaviours")],partFields:[rU,Qj,nU,eU,oU,iU,aU],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=q(n,(function(t){return qj(t)}));t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=q(n,(function(t){return q(t,qj)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),cU="file edit view insert format tools table help",sU={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},lU=function(t,e,n){var r=Mz(n).split(/[ ,]/);return{text:t.title,getItems:function(){return rt(t.items,(function(t){var n=t.toLowerCase();return 0===n.trim().length||U(r,(function(t){return t===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]}))}}},fU=function(t){return"string"===typeof t?t.split(" "):t},dU=function(t,e){var n=T(T({},sU),e.menus),r=gt(e.menus).length>0,o=void 0===e.menubar||!0===e.menubar?fU(cU):fU(!1===e.menubar?"":e.menubar),i=Y(o,(function(t){var n=Mt(sU,t);return r?n||Ot(e.menus,t).exists((function(t){return Mt(t,"items")})):n})),a=q(i,(function(r){var o=n[r];return lU({title:o.title,items:fU(o.items)},e,t)}));return Y(a,(function(t){var e=function(t){return"separator"!==t.type};return t.getItems().length>0&&U(t.getItems(),e)}))},mU=function(t){var e=function(){t._skinLoaded=!0,gM(t)};return function(){t.initialized?e():t.on("init",e)}},hU=function(t,e){return function(){return pM(t,{message:e})}},gU=function(t,e,n){return new aS((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))},pU=function(t,e){var n=e+"/skin.min.css";return gU(t,n,t.ui.styleSheetLoader)},vU=function(t,e){var n=An(ee.fromDom(t.getElement()));if(n){var r=e+"/skin.shadowdom.min.css";return gU(t,r,dz.DOM.styleSheetLoader)}return aS.resolve()},bU=function(t,e){var n=hz(e);n&&e.contentCSS.push(n+(t?"/content.inline":"/content")+".min.css"),!1===pz(e)&&i(n)?aS.all([pU(e,n),vU(e,n)]).then(mU(e),hU(e,"Skin could not be loaded")):mU(e)()},yU=S(bU,!1),xU=S(bU,!0),wU=function(t,e){return function(n){var r=nd(),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive);r.set(o)};return t.initialized?o():t.once("init",o),function(){t.off("init",o),r.clear()}}},CU=function(t,e,n){return function(r){var o=function(){return n(r)},i=function(){n(r),t.on(e,o)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}},SU=function(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}},kU=function(t,e){return function(){return t.execCommand(e)}},zU=function(t,e,n){var r=function(t,r,i,a){var u=e.shared.providers.translate(t.title);if("separator"===t.type)return R.some({type:"separator",text:u});if("submenu"===t.type){var c=rt(t.getStyleItems(),(function(t){return o(t,r,a)}));return 0===r&&c.length<=0?R.none():R.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return rt(t.getStyleItems(),(function(t){return o(t,r,a)}))}})}return R.some(T({type:"togglemenuitem",text:u,icon:t.icon,active:t.isSelected(a),disabled:i,onAction:n.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},o=function(t,e,o){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:r(t,e,!1,o).toArray():r(t,e,i,o).toArray()},i=function(t){var e=n.getCurrentValue(),r=n.shouldHide?0:1;return rt(t,(function(t){return o(t,r,e)}))},a=function(t,e){return function(n,r){var o=e(),a=i(o),u=GB(a,US.CLOSE_ON_EXECUTE,t,!1);r(u)}};return{validateItems:i,getFetch:a}},OU=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return q(r.data,(function(t){return HL(t,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:zU(t,e,n),getStyleItems:o}},MU=function(t,e,n){var r=OU(t,e,n),o=r.items,i=r.getStyleItems,a=function(t){return{getComponent:x(t)}},u=CU(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return BB({text:n.icon.isSome()?R.none():n.text,icon:n.icon,tooltip:R.from(n.tooltip),role:R.none(),fetch:o.getFetch(e,i),onSetup:u,getApi:a,columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)},_U=function(t){return q(t,(function(t){var e=t,n=t,r=t.split("=");return r.length>1&&(e=r[0],n=r[1]),{title:e,format:n}}))},TU=function(t){return{type:"basic",data:t}};(function(t){t[t["SemiColon"]=0]="SemiColon",t[t["Space"]=1]="Space"})(KR||(KR={}));var EU,AU=function(t,e){return e===KR.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")},HU=function(t,e,n,r){var o=t.getParam(e,n,"string"),i=_U(AU(o,r));return{type:"basic",data:i}},DU=[{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"}],VU=function(t){var e=function(){return tt(DU,(function(e){return t.formatter.match(e.format)}))},n=function(e){return function(){return t.formatter.match(e)}},r=function(t){return R.none},o=function(t){var n=e(),r=n.fold(x("left"),(function(t){return t.title.toLowerCase()}));Su(t,VB,{icon:"align-"+r})},i=TU(DU),a=function(e){return function(){return tt(DU,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}};return{tooltip:"Align",text:R.none(),icon:R.some("align-left"),isSelectedFor:n,getCurrentValue:R.none,getPreviewFor:r,onAction:a,updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},BU=function(t,e){return MU(t,e,VU(t))},RU=function(t,e){var n=OU(t,e,VU(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},PU="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",LU=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],IU=function(t){var e=t.split(/\s*,\s*/);return q(e,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},FU=function(t){var e=function(){var e=IU(t.toLowerCase());return ot(LU,(function(t){return e.indexOf(t.toLowerCase())>-1}))};return 0===t.indexOf("-apple-system")&&e()},NU=function(t){var e="System Font",n=function(){var n=function(t){return t?IU(t)[0]:""},r=t.queryCommandValue("FontName"),o=c.data,i=r?r.toLowerCase():"",a=tt(o,(function(t){var e=t.format;return e.toLowerCase()===i||n(e).toLowerCase()===n(i).toLowerCase()})).orThunk((function(){return Rt(FU(i),{title:e,format:i})}));return{matchOpt:a,font:r}},r=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},o=function(){var t=n().matchOpt;return t},i=function(t){return function(){return R.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},a=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},u=function(t){var e=n(),r=e.matchOpt,o=e.font,i=r.fold(x(o),(function(t){return t.title}));Su(t,DB,{text:i})},c=HU(t,"font_formats",PU,KR.SemiColon);return{tooltip:"Fonts",text:R.some(e),icon:R.none(),isSelectedFor:r,getCurrentValue:o,getPreviewFor:i,onAction:a,updateText:u,dataset:c,shouldHide:!1,isInvalid:O}},jU=function(t,e){return MU(t,e,NU(t))},UU=function(t,e){var n=OU(t,e,NU(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},WU="8pt 10pt 12pt 14pt 18pt 24pt 36pt",GU={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},qU={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},$U=function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n},XU=function(t,e){return/[0-9.]+px$/.test(t)?$U(72*parseInt(t,10)/96,e||0)+"pt":Ot(qU,t).getOr(t)},KU=function(t){return Ot(GU,t).getOr("")},YU=function(t){var e=function(){var e=R.none(),n=u.data,r=t.queryCommandValue("FontSize");if(r)for(var o=function(t){var o=XU(r,t),i=KU(o);e=tt(n,(function(t){return t.format===r||t.format===o||t.format===i}))},i=3;e.isNone()&&i>=0;i--)o(i);return{matchOpt:e,size:r}},n=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},r=function(){var t=e().matchOpt;return t},o=x(R.none),i=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},a=function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(x(o),(function(t){return t.title}));Su(t,DB,{text:i})},u=HU(t,"fontsize_formats",WU,KR.Space);return{tooltip:"Font sizes",text:R.some("12pt"),icon:R.none(),isSelectedFor:n,getPreviewFor:o,getCurrentValue:r,onAction:i,updateText:a,dataset:u,shouldHide:!1,isInvalid:O}},JU=function(t,e){return MU(t,e,YU(t))},ZU=function(t,e){var n=OU(t,e,YU(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},QU=function(t,e){var n=e(),r=q(n,(function(t){return t.format}));return R.from(t.formatter.closest(r)).bind((function(t){return tt(n,(function(e){return e.format===t}))})).orThunk((function(){return Rt(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))},tW="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",eW=function(t){var e="Paragraph",n=function(e){return function(){return t.formatter.match(e)}},r=function(e){return function(){var n=t.formatter.get(e);return R.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},o=function(n){var r=QU(t,(function(){return i.data})),o=r.fold(x(e),(function(t){return t.title}));Su(n,DB,{text:o})},i=HU(t,"block_formats",tW,KR.SemiColon);return{tooltip:"Blocks",text:R.some(e),icon:R.none(),isSelectedFor:n,getCurrentValue:R.none,getPreviewFor:r,onAction:SU(t),updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},nW=function(t,e){return MU(t,e,eW(t))},rW=function(t,e){var n=OU(t,e,eW(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},oW=function(t,e){var n="Paragraph",r=function(e){return function(){return t.formatter.match(e)}},o=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?R.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):R.none()}},i=function(e){var r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[{title:t.title,format:t.format}]},o=rt(AL(t),r),i=QU(t,x(o)),a=i.fold(x(n),(function(t){return t.title}));Su(e,DB,{text:a})};return{tooltip:"Formats",text:R.some(n),icon:R.none(),isSelectedFor:r,getCurrentValue:R.none,getPreviewFor:o,onAction:SU(t),updateText:i,shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},iW=function(t,e){var n=T({type:"advanced"},e.styleselect);return MU(t,e,oW(t,n))},aW=function(t,e){var n=T({type:"advanced"},e.styleselect),r=OU(t,e,oW(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})},uW=function(t,e){var n=function(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=t(r,e.get()),i=q(o,n.getSystem().build);Uh(n,i)}))};return _u([Hu(tu(),(function(e,r){var o=r;if(!o.universal){var i=t.channel;j(o.channels,i)&&n(e,o.data)}})),ju((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])},cW=Object.freeze({__proto__:null,events:uW}),sW=function(t,e,n){return n},lW=Object.freeze({__proto__:null,getState:sW}),fW=[Ti("channel"),Fi("renderComponents"),Fi("updateState"),Fi("initialData")],dW=function(){var t=oa(R.none()),e=function(){return t.set(R.none())},n=function(){return t.get().getOr("none")};return{readState:n,get:t.get,set:t.set,clear:e}},mW=Object.freeze({__proto__:null,init:dW}),hW=gf({fields:fW,name:"reflecting",active:cW,apis:lW,state:mW}),gW=x([Ti("toggleClass"),Ti("fetch"),sl("onExecute"),Xi("getHotspot",R.some),Xi("getAnchorOverrides",x({})),Id(),sl("onItemExecute"),Fi("lazySink"),Ti("dom"),ul("onOpen"),ep("splitDropdownBehaviours",[bE,Tx,Yx]),Xi("matchWidth",!1),Xi("useMinWidth",!1),Xi("eventOrder",{}),Fi("role")].concat(DE())),pW=Dp({factory:SC,schema:[Ti("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:mf([Yx.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(ku)},buttonBehaviours:mf([gw.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),vW=Dp({factory:SC,schema:[Ti("dom")],name:"button",defaults:function(){return{buttonBehaviours:mf([Yx.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),bW=x([pW,vW,Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ti("text")],name:"aria-descriptor"}),Vp({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),xE()]),yW=function(t,e,n,r){var o,i=function(t){bv.getCurrent(t).each((function(t){rb.highlightFirst(t),Tx.focusIn(t)}))},a=function(e){var n=i;ME(t,w,e,r,n,GT.HighlightFirst).get(p)},u=function(t){return a(t),R.some(!0)},c=function(e){var n=Kp(e,t,"button");return ku(n),R.some(!0)},s=T(T({},_u([ju((function(e,n){var r=Xp(e,t,"aria-descriptor");r.each((function(t){var n=oc("aria");Fn(t.element,"id",n),Fn(e.element,"aria-describedby",n)}))}))])),vw(R.some(a))),l={repositionMenus:function(t){gw.isOn(t)&&HE(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:l,eventOrder:T(T({},t.eventOrder),(o={},o[eu()]=["disabling","toggling","alloy.base.behaviour"],o)),events:s,behaviours:rp(t.splitDropdownBehaviours,[bE.config({others:{sandbox:function(e){var n=Kp(e,t,"arrow"),r={onOpen:function(){gw.on(n),gw.on(e)},onClose:function(){gw.off(n),gw.off(e)}};return AE(t,e,r)}}}),Tx.config({mode:"special",onSpace:c,onEnter:c,onDown:u}),Yx.config({}),gw.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},xW=mv({name:"SplitDropdown",configFields:gW(),partFields:bW(),factory:yW,apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),wW=function(t){return{isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){return Pv.set(t,e)}}},CW=function(t){return{setActive:function(e){gw.set(t,e)},isActive:function(){return gw.isOn(t)},isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){return Pv.set(t,e)}}},SW=function(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},kW=oc("focus-button"),zW=function(t,e,n,r,o,i){var a;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:SW(n,i)},components:yO([t.map((function(t){return MB(t,i.icons)})),e.map((function(t){return TB(t,"tox-tbtn",i)}))]),eventOrder:(a={},a[Da()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:mf([mO.toolbarButton(i.isDisabled),cO(),Nx("common-button-display-events",[Hu(Da(),(function(t,e){e.event.prevent(),Cu(t,kW)}))])].concat(r.map((function(n){return hW.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return yO([t.icon.map((function(t){return MB(t,i.icons)})),t.text.map((function(t){return TB(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},OW=function(t,e,n,r){var o=e.shared;return Tj.sketch({lazySink:o.getSink,fetch:function(){return tE.nu((function(e){e(q(n(t.items),qj))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:zW(t.icon,t.text,t.tooltip,R.none(),R.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})},MW=function(t,e,n){var r=oa(p),o=zW(t.icon,t.text,t.tooltip,R.none(),R.none(),n);return SC.sketch({dom:o.dom,components:o.components,eventOrder:HB,buttonBehaviours:mf([Nx("toolbar-button-events",[AB({onAction:t.onAction,getApi:e.getApi}),gO(e,r),pO(e,r)]),mO.toolbarButton((function(){return t.disabled||n.isDisabled()})),cO()].concat(e.toolbarButtonBehaviours))})},_W=function(t,e){return TW(t,e,[])},TW=function(t,e,n){return MW(t,{toolbarButtonBehaviours:[].concat(n.length>0?[Nx("toolbarButtonWith",n)]:[]),getApi:wW,onSetup:t.onSetup},e)},EW=function(t,e){return AW(t,e,[])},AW=function(t,e,n){return Co(MW(t,{toolbarButtonBehaviours:[Ix.config({}),gw.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[Nx("toolbarToggleButtonWith",n)]:[]),getApi:CW,onSetup:t.onSetup},e))},HW=function(t,e,n){return function(r){return tE.nu((function(t){return e.fetch(t)})).map((function(o){return R.from(H_(Co(n_(oc("menu-value"),o,(function(n){e.onItemAction(t(r),n)}),e.columns,e.presets,US.CLOSE_ON_EXECUTE,e.select.getOr(O),n),{movement:o_(e.columns,e.presets),menuBehaviours:Zk.unnamedEvents("auto"!==e.columns?[]:[ju((function(t,n){Kk(t,4,lk(e.presets)).each((function(e){var n=e.numRows,r=e.numColumns;Tx.setGridSize(t,n,r)}))}))])})))}))}},DW=function(t,e){var n,r=oc("channel-update-split-dropdown-display"),o=function(t){return{isDisabled:function(){return Pv.isDisabled(t)},setDisabled:function(e){return Pv.set(t,e)},setIconFill:function(e,n){Ls(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"fill",n)}))},setIconStroke:function(e,n){Ls(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"stroke",n)}))},setActive:function(e){Fn(t.element,"aria-pressed",e),Ls(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return gw.set(t,e)}))}))},isActive:function(){return Ls(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(gw.isOn)}))}}},i=oa(p),a={getApi:o,onSetup:t.onSetup};return xW.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:T({"aria-pressed":!1},SW(t.tooltip,e.providers))},onExecute:function(e){t.onAction(o(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),Nx("split-dropdown-events",[Hu(kW,Yx.focus),gO(a,i),pO(a,i)]),NE.config({})]),eventOrder:(n={},n[du()]=["alloy.base.behaviour","split-dropdown-events"],n),toggleClass:"tox-tbtn--enabled",lazySink:e.getSink,fetch:HW(o,t,e.providers),parts:{menu:pk(!1,t.columns,t.presets)},components:[xW.parts.button(zW(t.icon,t.text,R.none(),R.some(r),R.some([gw.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),e.providers)),xW.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:AC("chevron-down",e.providers.icons)},buttonBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),VC()])}),xW.parts["aria-descriptor"]({text:e.providers.translate("To open the popup, press Shift+Enter")})]})},VW=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],BW=function(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return Si(t)})).getOrDie();return e(i,r,o)}},RW={button:BW(OS,(function(t,e){return _W(t,e.backstage.shared.providers)})),togglebutton:BW(TS,(function(t,e){return EW(t,e.backstage.shared.providers)})),menubutton:BW(WF,(function(t,e){return $B(t,"tox-tbtn",e.backstage,R.none())})),splitbutton:BW(qF,(function(t,e){return DW(t,e.backstage.shared)})),grouptoolbarbutton:BW(NF,(function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=function(t){return WW(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,R.none())},a=(r={},r[Pd]=e.backstage.shared.header.isPositionedAtTop()?If.TopToBottom:If.BottomToTop,r);switch(Dz(n)){case jS.floating:return OW(t,e.backstage,i,a);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(t,e){return iW(t,e.backstage)},fontsizeSelectButton:function(t,e){return JU(t,e.backstage)},fontSelectButton:function(t,e){return jU(t,e.backstage)},formatButton:function(t,e){return nW(t,e.backstage)},alignMenuButton:function(t,e){return BU(t,e.backstage)}},PW=function(t,e,n){return Ot(RW,t.type).fold((function(){return console.error("skipping button defined by",t),R.none()}),(function(r){return R.some(r(t,e,n))}))},LW={styleselect:RW.styleSelectButton,fontsizeselect:RW.fontsizeSelectButton,fontselect:RW.fontSelectButton,formatselect:RW.formatButton,align:RW.alignMenuButton},IW=function(t){var e=q(VW,(function(e){var n=Y(e.items,(function(e){return Mt(t,e)||Mt(LW,e)}));return{name:e.name,items:n}}));return Y(e,(function(t){return t.items.length>0}))},FW=function(t){var e=t.split("|");return q(e,(function(t){return{items:t.trim().split(" ")}}))},NW=function(t){return g(t,(function(t){return Mt(t,"name")&&Mt(t,"items")}))},jW=function(t){var e=t.toolbar,n=t.buttons;return!1===e?[]:void 0===e||!0===e?IW(n):i(e)?FW(e):NW(e)?e:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},UW=function(t,e,n,r,o,i){return Ot(e,n.toLowerCase()).orThunk((function(){return i.bind((function(t){return ht(t,(function(t){return Ot(e,t+n.toLowerCase())}))}))})).fold((function(){return Ot(LW,n.toLowerCase()).map((function(e){return e(t,o)})).orThunk((function(){return R.none()}))}),(function(e){return"grouptoolbarbutton"!==e.type||r?PW(e,o,t):(console.warn("Ignoring the '"+n+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),R.none())}))},WW=function(t,e,n,r){var o=jW(e),i=q(o,(function(o){var i=rt(o.items,(function(o){return 0===o.trim().length?[]:UW(t,e.buttons,o,e.allowToolbarGroups,n,r).toArray()}));return{title:R.from(t.translate(o.name)),items:i}}));return Y(i,(function(t){return t.items.length>0}))},GW=function(t,e,n,r){var o=e.outerContainer,a=n.toolbar,u=n.buttons;if(g(a,i)){var c=a.map((function(e){var o={toolbar:e,buttons:u,allowToolbarGroups:n.allowToolbarGroups};return WW(t,o,{backstage:r},R.none())}));uU.setToolbars(o,c)}else uU.setToolbar(o,WW(t,n,{backstage:r},R.none()))},qW=en(),$W=qW.os.isiOS()&&qW.os.version.major<=12,XW=function(t,e){var n=t.dom,r=t.getWin(),o=t.getDoc().documentElement,i=oa(lr(r.innerWidth,r.innerHeight)),a=oa(lr(o.offsetWidth,o.offsetHeight)),u=function(){var e=i.get();e.left===r.innerWidth&&e.top===r.innerHeight||(i.set(lr(r.innerWidth,r.innerHeight)),bM(t))},c=function(){var e=t.getDoc().documentElement,n=a.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(a.set(lr(e.offsetWidth,e.offsetHeight)),bM(t))},s=function(e){return yM(t,e)};n.bind(r,"resize",u),n.bind(r,"scroll",s);var l=ud(ee.fromDom(t.getBody()),"load",c),f=e.uiMothership.element;t.on("hide",(function(){Xn(f,"display","none")})),t.on("show",(function(){nr(f,"display")})),t.on("NodeChange",c),t.on("remove",(function(){l.unbind(),n.unbind(r,"resize",u),n.unbind(r,"scroll",s),r=null}))},KW=function(t,e,n,r,o){var i=oa(0),a=e.outerContainer;yU(t);var u=ee.fromDom(o.targetNode),c=En(Tn(u));Yh(u,e.mothership),Kh(c,e.uiMothership),t.on("PostRender",(function(){GW(t,e,n,r),i.set(t.getWin().innerWidth),uU.setMenubar(a,dU(t,n)),uU.setSidebar(a,n.sidebar),XW(t,e)}));var s=uU.getSocket(a).getOrDie("Could not find expected socket element");if($W){Kn(s.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=UC((function(){t.fire("ScrollContent")}),20),f=ad(s.element,"scroll",l.throttle);t.on("remove",f.unbind)}uO(t,e),t.addCommand("ToggleSidebar",(function(e,n){uU.toggleSidebar(a,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return uU.whichSidebar(a)}));var d=Dz(t),m=function(){uU.refreshToolbar(e.outerContainer)};d!==jS.sliding&&d!==jS.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var e=t.getWin().innerWidth;e!==i.get()&&(m(),i.set(e))}));var h={enable:function(){aO(e,!1)},disable:function(){aO(e,!0)},isDisabled:function(){return Pv.isDisabled(a)}};return{iframeContainer:s.element.dom,editorContainer:a.element.dom,api:h}},YW=Object.freeze({__proto__:null,render:KW}),JW=function(t){var e=/^[0-9\.]+(|px)$/i;return e.test(""+t)?R.some(parseInt(""+t,10)):R.none()},ZW=function(t){return h(t)?t+"px":t},QW=function(t,e,n){var r=e.filter((function(e){return te}));return r.or(o).getOr(t)},tG=function(t){var e=vz(t),n=xz(t),r=Cz(t);return JW(e).map((function(t){return QW(t,n,r)}))},eG=function(t){var e=tG(t);return e.getOr(vz(t))},nG=function(t){var e=bz(t),n=yz(t),r=wz(t);return JW(e).map((function(t){return QW(t,n,r)}))},rG=function(t){var e=nG(t);return e.getOr(bz(t))},oG=function(t,e,n,r,o){var i=n.uiMothership,a=n.outerContainer,u=dz.DOM,c=jz(t),s=Gz(t),l=wz(t).or(nG(t)),f=r.shared.header,d=f.isPositionedAtTop,m=Dz(t),h=m===jS.sliding||m===jS.floating,g=oa(!1),p=function(){return g.get()&&!t.removed},v=function(t){return h?t.fold(x(0),(function(t){return t.components().length>1?ar(t.components()[1].element):0})):0},b=function(n){switch(Rz(t)){case Hz.auto:var r=uU.getToolbar(a),o=v(r),i=ar(n.element)-o,u=Jr(e),c=u.y>i;if(c)return"top";var s=gn(e),l=Math.max(s.dom.scrollHeight,ar(s)),f=u.bottom=n&&t.bottom-e.y>=n},wG=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=zn(ee.fromDom(t.startContainer),t.startOffset).element,r=fe(n)?vn(n):R.some(n);return r.filter(le).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e},CG=function(t){var e=t.selection.getRng(),n=wG(e);if(t.inline){var r=Pr();return Yr(r.left+n.left,r.top+n.top,n.width,n.height)}var o=Zr(ee.fromDom(t.getBody()));return Yr(o.x+n.left,o.y+n.top,n.width,n.height)},SG=function(t,e){return e.filter(Rn).map(Zr).getOrThunk((function(){return CG(t)}))},kG=function(t,e,n){var r=Math.max(t.x+n,e.x),o=Math.min(t.right-n,e.right);return{x:r,width:o-r}},zG=function(t,e,n,r,o,i){var a=ee.fromDom(t.getContainer()),u=Ls(a,".tox-editor-header").getOr(a),c=Jr(u),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?Jr(a):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}},OG=function(t,e,n,r){void 0===r&&(r=0);var o=Nr(window),i=Jr(ee.fromDom(t.getContentAreaContainer())),a=_z(t)||Tz(t)||Az(t),u=kG(i,o,r),c=u.x,s=u.width;if(t.inline&&!a)return Yr(c,o.y,s,o.height);var l=e.header.isPositionedAtTop(),f=zG(t,i,o,l,n,r),d=f.y,m=f.bottom;return Yr(c,d,s,m-d)},MG=12,_G={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},TG={maxHeightFunction:Md(),maxWidthFunction:wj()},EG=function(t,e){var n=t.selection.getRng(),r=zn(ee.fromDom(n.startContainer),n.startOffset);return n.startContainer===n.endContainer&&n.startOffset===n.endOffset-1&&sn(r.element,e)},AG=function(t,e,n){var r=Qn(t,"position");Xn(t,"position",e);var o=n(t);return r.each((function(e){return Xn(t,"position",e)})),o},HG=function(t){return"node"===t},DG=function(t,e,n,r,o){var i=CG(t),a=r.lastElement().exists((function(t){return sn(n,t)}));if(EG(t,n))return a?bC:mC;if(a)return AG(e,r.getMode(),(function(){var t=xG(i,Jr(e));return t&&!r.isReposition()?xC:bC}));var u="fixed"===r.getMode()?o.y+Pr().top:o.y,c=ar(e)+MG;return u+c<=i.y?mC:hC},VG=function(t,e,n,r){var o=function(e){return function(r,o,i,a,u){var c=DG(t,a,e,n,u),s=T(T({},r),{y:u.y,height:u.height});return T(T({},c(s,o,i,a,u)),{alwaysFit:!0})}},i=function(t){return HG(r)?[o(t)]:[]},a={onLtr:function(t){return[Gl,ql,Ul,Nl,Wl,jl].concat(i(t))},onRtl:function(t){return[Gl,ql,Wl,jl,Ul,Nl].concat(i(t))}},u={onLtr:function(t){return[ql,Nl,jl,Ul,Wl,Gl].concat(i(t))},onRtl:function(t){return[ql,jl,Nl,Wl,Ul,Gl].concat(i(t))}};return e?u:a},BG=function(t,e,n,r){return"line"===e?{bubble:Hd(MG,0,_G),layouts:{onLtr:function(){return[$l]},onRtl:function(){return[Xl]}},overrides:TG}:{bubble:Hd(0,MG,_G,1/MG),layouts:VG(t,n,r,e),overrides:TG}},RG=function(t,e){var n=Y(e,(function(e){return e.predicate(t.dom)})),r=K(n,(function(t){return"contexttoolbar"===t.type})),o=r.pass,i=r.fail;return{contextToolbars:o,contextForms:i}},PG=function(t){if(t.length<=1)return t;var e=function(e){return U(t,(function(t){return t.position===e}))},n=function(e){return Y(t,(function(t){return t.position===e}))},r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),a=q(n("selection"),(function(t){return T(T({},t),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")},LG=function(t){if(t.length<=1)return t;var e=function(e){return tt(t,(function(t){return t.position===e}))},n=e("selection").orThunk((function(){return e("node")})).orThunk((function(){return e("line")})).map((function(t){return t.position}));return n.fold((function(){return[]}),(function(e){return Y(t,(function(t){return t.position===e}))}))},IG=function(t,e,n){var r=RG(t,e);if(r.contextForms.length>0)return R.some({elem:t,toolbars:[r.contextForms[0]]});var o=RG(t,n);if(o.contextForms.length>0)return R.some({elem:t,toolbars:[o.contextForms[0]]});if(r.contextToolbars.length>0||o.contextToolbars.length>0){var i=PG(r.contextToolbars.concat(o.contextToolbars));return R.some({elem:t,toolbars:i})}return R.none()},FG=function(t,e,n){return t(e)?R.none():ya(e,(function(t){if(le(t)){var e=RG(t,n.inNodeScope),r=e.contextToolbars,o=e.contextForms,i=o.length>0?o:LG(r);return i.length>0?R.some({elem:t,toolbars:i}):R.none()}return R.none()}),t)},NG=function(t,e){var n=ee.fromDom(e.getBody()),r=function(t){return sn(t,n)},o=function(t){return!r(t)&&!dn(n,t)},i=ee.fromDom(e.selection.getNode());return o(i)?R.none():IG(i,t.inNodeScope,t.inEditorScope).orThunk((function(){return FG(r,i,t)}))},jG=function(t,e){var n={},r=[],o=[],i={},a={},u=function(t,u){var c=wi(PS(u));n[t]=c,c.launch.map((function(n){i["form:"+t]=T(T({},u.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){e(c)}})})),"editor"===c.scope?o.push(c):r.push(c),a[t]=c},c=function(t,e){IS(e).each((function(n){"editor"===e.scope?o.push(n):r.push(n),a[t]=n}))},s=gt(t);return $(s,(function(e){var n=t[e];"contextform"===n.type?u(e,n):"contexttoolbar"===n.type&&c(e,n)})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}},UG=oc("forward-slide"),WG=oc("backward-slide"),GG=oc("change-slide-event"),qG="tox-pop--resizing",$G=function(t){var e=oa([]);return eC.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){e.set([]),eC.getContent(t).each((function(t){nr(t.element,"visibility")})),us(t.element,qG),nr(t.element,"width")},inlineBehaviours:mf([Nx("context-toolbar-events",[Nu(qa(),(function(t,e){"width"===e.event.raw.propertyName&&(us(t.element,qG),nr(t.element,"width"))})),Hu(GG,(function(t,e){var n=t.element;nr(n,"width");var r=vr(n);eC.setContent(t,e.event.contents),is(n,qG);var o=vr(n);Xn(n,"width",r+"px"),eC.getContent(t).each((function(t){e.event.focus.bind((function(t){return Sf(t),Mf(n)})).orThunk((function(){return Tx.focusIn(t),Of(Tn(n))}))})),wC.setTimeout((function(){Xn(t.element,"width",o+"px")}),0)})),Hu(UG,(function(t,n){eC.getContent(t).each((function(n){e.set(e.get().concat([{bar:n,focus:Of(Tn(t.element))}]))})),Su(t,GG,{contents:n.event.forwardContents,focus:R.none()})})),Hu(WG,(function(t,n){dt(e.get()).each((function(n){e.set(e.get().slice(0,e.get().length-1)),Su(t,GG,{contents:_s(n.bar),focus:n.focus})}))}))]),Tx.config({mode:"special",onEscape:function(n){return dt(e.get()).fold((function(){return t.onEscape()}),(function(t){return Cu(n,WG),R.some(!0)}))}})]),lazySink:function(){return ro.value(t.sink)}})},XG="tox-pop--transition",KG=function(t,e,n,r){var o=r.backstage,i=o.shared,a=en().deviceType.isTouch,u=od(),c=od(),s=od(),l=Ms($G({sink:n,onEscape:function(){return t.focus(),R.some(!0)}})),f=function(){var e=s.get().getOr("node"),n=HG(e)?1:0;return OG(t,i,e,n)},d=function(){return!t.removed&&!(a()&&o.isContextMenuOpen())},m=function(t){return Tt(Dt(t,u.get(),sn),!0)},h=function(){if(d()){var e=f(),n=Tt(s.get(),"node")?SG(t,u.get()):CG(t);return e.height<=0||!xG(n,e)}return!0},g=function(){u.clear(),c.clear(),s.clear(),eC.hide(l)},v=function(){if(eC.isOpen(l)){var t=l.element;nr(t,"display"),h()?Xn(t,"display","none"):(c.set(0),eC.reposition(l))}},b=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:mf([Tx.config({mode:"acyclic"}),Nx("pop-dialog-wrap-events",[ju((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Tx.focusIn(e)}))})),Uu((function(e){t.shortcuts.remove("ctrl+F9")}))])])}},y=he((function(){return jG(e,(function(t){var e=C([t]);Su(l,UG,{forwardContents:b(e)})}))})),x=function(e,n){return WW(t,{buttons:e,toolbar:n.items,allowToolbarGroups:!1},r,R.some(["form:"]))},w=function(t,e){return yG.buildInitGroups(t,e)},C=function(e){var n=t.ui.registry.getAll().buttons,r=y(),o=T(T({},n),r.formNavigators),a=Dz(t)===jS.scrolling?jS.scrolling:jS.default,u=nt(q(e,(function(t){return"contexttoolbar"===t.type?x(o,t):w(t,i.providers)})));return Jj({type:a,uid:oc("context-toolbar"),initGroups:u,onEscape:R.none,cyclicKeying:!0,providers:i.providers})},S=function(e,r){var o="node"===e?i.anchors.node(r):i.anchors.cursor(),s=BG(t,e,a(),{lastElement:u.get,isReposition:function(){return Tt(c.get(),0)},getMode:function(){return Lh.getMode(n)}});return Co(o,s)},k=function(t,e){if(z.cancel(),d()){var r=C(t),o=t[0].position,i=S(o,e);s.set(o),c.set(1);var a=l.element;nr(a,"display"),m(e)||(us(a,XG),Lh.reset(n,l)),eC.showWithinBounds(l,b(r),{anchor:i,transition:{classes:[XG],mode:"placement"}},(function(){return R.some(f())})),e.fold(u.clear,u.set),h()&&Xn(a,"display","none")}},z=WC((function(){if(t.hasFocus()&&!t.removed)if(cs(l.element,XG))z.throttle();else{var e=y();NG(e,t).fold(g,(function(t){k(t.toolbars,R.some(t.elem))}))}}),17);t.on("init",(function(){t.on("remove",g),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",v),t.on("click keyup focus SetContent",z.throttle),t.on(lG,g),t.on(sG,(function(e){var n=y();Ot(n.lookupTable,e.toolbarKey).each((function(n){k([n],Rt(e.target!==t,e.target)),eC.getContent(l).each(Tx.focusIn)}))})),t.on("focusout",(function(e){wC.setEditorTimeout(t,(function(){Mf(n.element).isNone()&&Mf(l.element).isNone()&&g()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&g()})),t.on("AfterProgressState",(function(e){e.state?g():t.hasFocus()&&z.throttle()})),t.on("NodeChange",(function(t){Mf(l.element).fold(z.throttle,p)}))}))},YG=function(t){var e=[{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}];$(e,(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.cmd),onSetup:wU(t,e.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:kU(t,"JustifyNone")})},JG={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},ZG=function(){var t="[0-9]+",e="[+-]?"+t,n="[eE]"+e,r="\\.",o=function(t){return"(?:"+t+")?"},i=["Infinity",t+r+o(t)+o(n),r+t+o(n),t+o(n)].join("|"),a="[+-]?(?:"+i+")";return new RegExp("^("+a+")(.*)$")}(),QG=function(t,e){return U(e,(function(e){return U(JG[e],(function(e){return t===e}))}))},tq=function(t,e){var n=R.from(ZG.exec(t));return n.bind((function(t){var n=Number(t[1]),r=t[2];return QG(r,e)?R.some({value:n,unit:r}):R.none()}))},eq=function(t,e){return tq(t,e).map((function(t){var e=t.value,n=t.unit;return e+n}))},nq=function(t,e){var n=function(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=od();return q(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){var a=function(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)};a(Tt(r,e.hash(n)));var u=e.watcher(t,n,a);return function(){o.clear(),u()}},onAction:function(){return e.setCurrent(t,n)}}}))};t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})},rq={name:"lineheight",text:"Line height",icon:"line-height",getOptions:zz,hash:function(t){return eq(t,["fixed","relative","empty"]).getOr(t)},display:w,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return R.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},oq=function(t){var e=R.from(Oz(t));return e.map((function(e){return{name:"language",text:"Language",icon:"language",getOptions:x(e),hash:function(t){return l(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){var e=ee.fromDom(t.selection.getNode());return xa(e,(function(t){return R.some(t).filter(le).bind((function(t){var e=Un(t,"lang");return e.map((function(e){var n=Un(t,"data-mce-lang").getOrUndefined();return{code:e,customCode:n,title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(e){var n=nd();return e.setActive(t.formatter.match("lang",{},void 0,!0)),n.set(t.formatter.formatChanged("lang",e.setActive,!0)),n.clear}}}))},iq=function(t){nq(t,rq),oq(t).each((function(e){return nq(t,e)}))},aq=function(t,e){RU(t,e),UU(t,e),aW(t,e),rW(t,e),ZU(t,e)},uq=function(t){return CU(t,"NodeChange",(function(e){e.setDisabled(!t.queryCommandState("outdent"))}))},cq=function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:uq(t),onAction:kU(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:kU(t,"indent")})},sq=function(t){cq(t)},lq=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},fq=function(t){ZD.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:wU(t,e.name),onAction:lq(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:wU(t,n),onAction:lq(t,n)})}},dq=function(t){ZD.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.action)})}))},mq=function(t){ZD.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kU(t,e.action),onSetup:wU(t,e.name)})}))},hq=function(t){fq(t),dq(t),mq(t)},gq=function(t){ZD.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:kU(t,e.action)})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:lq(t,"code")})},pq=function(t){hq(t),gq(t)},vq=function(t,e){return CU(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))},bq=function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:vq(t,"hasUndo"),onAction:kU(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:vq(t,"hasRedo"),onAction:kU(t,"redo")})},yq=function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:vq(t,"hasUndo"),onAction:kU(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:vq(t,"hasRedo"),onAction:kU(t,"redo")})},xq=function(t){bq(t),yq(t)},wq=function(t){return CU(t,"VisualAid",(function(e){e.setActive(t.hasVisual)}))},Cq=function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:wq(t),onAction:kU(t,"mceToggleVisualAid")})},Sq=function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:kU(t,"mceToggleVisualAid")})},kq=function(t){Sq(t),Cq(t)},zq=function(t,e){YG(t),pq(t),aq(t,e),xq(t),e_(t),kq(t),sq(t),iq(t)},Oq=function(t,e){return{type:"makeshift",x:t,y:e}},Mq=function(t,e,n){return Oq(t.x+e,t.y+n)},_q=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},Tq=function(t){if(_q(t)){var e=t.touches[0];return Oq(e.pageX,e.pageY)}return Oq(t.pageX,t.pageY)},Eq=function(t){if(_q(t)){var e=t.touches[0];return Oq(e.clientX,e.clientY)}return Oq(t.clientX,t.clientY)},Aq=function(t,e){var n=dz.DOM.getPos(t);return Mq(e,n.x,n.y)},Hq=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?Tq(e):Aq(t.getContentAreaContainer(),Eq(e)):Dq(t)},Dq=function(t){return{type:"selection",root:ee.fromDom(t.selection.getNode())}},Vq=function(t){return{type:"node",node:R.some(ee.fromDom(t.selection.getNode())),root:ee.fromDom(t.getBody())}},Bq=function(t,e,n){switch(n){case"node":return Vq(t);case"point":return Hq(t,e);case"selection":return Dq(t)}},Rq=function(t,e,n,r,o,i){var a=n(),u=Bq(t,e,i);GB(a,US.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),eC.showMenuAt(o,{anchor:u},{menu:{markers:mk("normal")},data:t})}))},Pq={onLtr:function(){return[ql,Nl,jl,Ul,Wl,Gl,mC,hC,dC,lC,fC,sC]},onRtl:function(){return[ql,jl,Nl,Wl,Ul,Gl,mC,hC,fC,sC,dC,lC]}},Lq=12,Iq={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},Fq=function(t,e){var n=t.selection;if(n.isCollapsed()||e.touches.length<1)return!1;var r=e.touches[0],o=n.getRng(),i=nh(t.getWin(),km.domRange(o));return i.exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))},Nq=function(t){var e=t.selection.getRng(),n=function(){wC.setEditorTimeout(t,(function(){t.selection.setRng(e)}),10),i()};t.once("touchend",n);var r=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",r,!0);var o=function(){return i()};t.once("longpresscancel",o);var i=function(){t.off("touchend",n),t.off("longpresscancel",o),t.off("mousedown",r)}},jq=function(t,e,n){var r=Bq(t,e,n),o="point"===n?Lq:0;return T({bubble:Hd(0,o,Iq),layouts:Pq,overrides:{maxWidthFunction:wj(),maxHeightFunction:Md()}},r)},Uq=function(t,e,n,r,o,i,a){var u=jq(t,e,i);GB(n,US.CLOSE_ON_EXECUTE,r,!0).map((function(n){e.preventDefault(),eC.showMenuWithinBounds(o,{anchor:u},{menu:{markers:mk("normal"),highlightImmediately:a},data:n,type:"horizontal"},(function(){return R.some(OG(t,r.shared,"node"===i?"node":"selection"))})),t.fire(lG)}))},Wq=function(t,e,n,r,o,i){var a=en(),u=a.os.isiOS(),c=a.os.isOSX(),s=a.os.isAndroid(),l=a.deviceType.isTouch(),f=function(){return!(s||u||c&&l)},d=function(){var a=n();Uq(t,e,a,r,o,i,f())};if((c||u)&&"node"!==i){var m=function(){Nq(t),d()};Fq(t,e)?m():(t.once("selectionchange",m),t.once("touchend",(function(){return t.off("selectionchange",m)})))}else d()},Gq=function(t){return"string"===typeof t?t.split(/[ ,]/):t},qq=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},$q=function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return R.from(t.getParam(e)).map(Gq).getOrThunk((function(){return Y(Gq(n),(function(t){return Mt(r,t)}))}))},Xq=function(t){return!1===t.getParam("contextmenu")},Kq=function(t){return $q(t,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},Yq=function(t){return t.getParam("contextmenu_avoid_overlap","","string")},Jq=function(t){return i(t)?"|"===t:"separator"===t.type},Zq={type:"separator"},Qq=function(t){var e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(i(t))return t;switch(t.type){case"separator":return Zq;case"submenu":return T(T({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return i(e)?e:q(e,Qq)}});default:return T(T({type:"menuitem"},e(t)),{onAction:v(t.onAction)})}},t$=function(t,e){if(0===e.length)return t;var n=dt(t).filter((function(t){return!Jq(t)})),r=n.fold((function(){return[]}),(function(t){return[Zq]}));return t.concat(r).concat(e).concat([Zq])},e$=function(t,e,n){var r=Z(e,(function(e,r){return Ot(t,r.toLowerCase()).map((function(t){var r=t.update(n);if(i(r))return t$(e,r.split(" "));if(r.length>0){var o=q(r,Qq);return t$(e,o)}return e})).getOrThunk((function(){return e.concat([r])}))}),[]);return r.length>0&&Jq(r[r.length-1])&&r.pop(),r},n$=function(t,e){return e.ctrlKey&&!qq(t)},r$=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)},o$=function(t,e){return r$(t,e)?t.selection.getStart(!0):e.target},i$=function(t,e){var n=Yq(t),r=r$(t,e)?"selection":"point";if($t(n)){var o=o$(t,e),i=R_(ee.fromDom(o),n);return i?"node":r}return r},a$=function(t,e,n){var r=en(),o=r.deviceType.isTouch,i=Ms(eC.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:mf([Nx("dismissContextMenu",[Hu(hu(),(function(e,n){bg.close(e),t.focus()}))])])})),a=function(t){return eC.hide(i)},u=function(e){if(qq(t)&&e.preventDefault(),!n$(t,e)&&!Xq(t)){var r=i$(t,e),a=function(){var n=o$(t,e),r=t.ui.registry.getAll(),o=Kq(t);return e$(r.contextMenus,o,n)},u=o()?Wq:Rq;u(t,e,a,n,i,r)}};t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(o()?"":" ResizeWindow");t.on(e,a),t.on("longpress contextmenu",u)}))},u$=aa.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),c$=function(t){return function(e){return e.translate(-t.left,-t.top)}},s$=function(t){return function(e){return e.translate(t.left,t.top)}},l$=function(t){return function(e,n){return Z(t,(function(t,e){return e(t)}),lr(e,n))}},f$=function(t,e,n){return t.fold(l$([s$(n),c$(e)]),l$([c$(e)]),l$([]))},d$=function(t,e,n){return t.fold(l$([s$(n)]),l$([]),l$([s$(e)]))},m$=function(t,e,n){return t.fold(l$([]),l$([c$(n)]),l$([s$(e),c$(n)]))},h$=function(t,e,n,r,o,i){var a=d$(t,o,i),u=d$(e,o,i);return Math.abs(a.left-u.left)<=n&&Math.abs(a.top-u.top)<=r},g$=function(t,e,n,r,o,i){var a=d$(t,o,i),u=d$(e,o,i),c=Math.abs(a.left-u.left),s=Math.abs(a.top-u.top);return lr(c,s)},p$=function(t,e,n){var r=t.fold((function(t,e){return{position:R.some("absolute"),left:R.some(t+"px"),top:R.some(e+"px")}}),(function(t,e){return{position:R.some("absolute"),left:R.some(t-n.left+"px"),top:R.some(e-n.top+"px")}}),(function(t,e){return{position:R.some("fixed"),left:R.some(t+"px"),top:R.some(e+"px")}}));return T({right:R.none(),bottom:R.none()},r)},v$=function(t,e,n){return t.fold((function(t,r){return y$(t+e,r+n)}),(function(t,r){return x$(t+e,r+n)}),(function(t,r){return w$(t+e,r+n)}))},b$=function(t,e,n,r){var o=function(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left),a.getOr(u.top))}};return t.fold(o(m$,y$),o(d$,x$),o(f$,w$))},y$=u$.offset,x$=u$.absolute,w$=u$.fixed,C$=function(t,e){var n=jn(t,e);return l(n)?NaN:parseInt(n,10)},S$=function(t,e){var n=t.element,r=C$(n,e.leftAttr),o=C$(n,e.topAttr);return isNaN(r)||isNaN(o)?R.none():R.some(lr(r,o))},k$=function(t,e,n){var r=t.element;Fn(r,e.leftAttr,n.left+"px"),Fn(r,e.topAttr,n.top+"px")},z$=function(t,e){var n=t.element;Gn(n,e.leftAttr),Gn(n,e.topAttr)},O$=function(t,e,n,r){return S$(t,e).fold((function(){return n}),(function(t){return w$(t.left+r.left,t.top+r.top)}))},M$=function(t,e,n,r,o,i){var a=O$(t,e,n,r),u=e.mustSnap?E$(t,e,a,o,i):A$(t,e,a,o,i),c=f$(a,o,i);return k$(t,e,c),u.fold((function(){return{coord:w$(c.left,c.top),extra:R.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))},_$=function(t,e){z$(t,e)},T$=function(t,e,n,r){return ht(t,(function(t){var o=t.sensor,i=h$(e,o,t.range.left,t.range.top,n,r);return i?R.some({output:b$(t.output,e,n,r),extra:t.extra}):R.none()}))},E$=function(t,e,n,r,o){var i=e.getSnapPoints(t),a=T$(i,n,r,o);return a.orThunk((function(){var t=Z(i,(function(t,e){var i=e.sensor,a=g$(n,i,e.range.left,e.range.top,r,o);return t.deltas.fold((function(){return{deltas:R.some(a),snap:R.some(e)}}),(function(n){var r=(a.left+a.top)/2,o=(n.left+n.top)/2;return r<=o?{deltas:R.some(a),snap:R.some(e)}:t}))}),{deltas:R.none(),snap:R.none()});return t.snap.map((function(t){return{output:b$(t.output,n,r,o),extra:t.extra}}))}))},A$=function(t,e,n,r,o){var i=e.getSnapPoints(t);return T$(i,n,r,o)},H$=function(t,e,n){return{coord:b$(t.output,t.output,e,n),extra:t.extra}},D$=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),a=Pr(i),u=GI(o),c=H$(r,a,u),s=p$(c.coord,a,u);Yn(o,s)}},V$=Object.freeze({__proto__:null,snapTo:D$}),B$="data-initial-z-index",R$=function(t){vn(t.element).filter(le).each((function(t){Un(t,B$).fold((function(){return nr(t,"z-index")}),(function(e){return Xn(t,"z-index",e)})),Gn(t,B$)}))},P$=function(t){vn(t.element).filter(le).each((function(e){Qn(e,"z-index").each((function(t){Fn(e,B$,t)})),Xn(e,"z-index",Jn(t.element,"z-index"))}))},L$=function(t,e){t.getSystem().addToGui(e),P$(e)},I$=function(t){R$(t),t.getSystem().removeFromGui(t)},F$=function(t,e,n){return t.getSystem().build(sT.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},N$=qi("snaps",[Ti("getSnapPoints"),ul("onSensor"),Ti("leftAttr"),Ti("topAttr"),Xi("lazyViewport",Qr),Xi("mustSnap",!1)]),j$=[Xi("useFixed",O),Ti("blockerClass"),Xi("getTarget",w),Xi("onDrag",p),Xi("repositionTarget",!0),Xi("onDrop",p),ta("getBounds",Qr),N$],U$=function(t){return Vt(Qn(t,"left"),Qn(t,"top"),Qn(t,"position"),(function(t,e,n){var r="fixed"===n?w$:y$;return r(parseInt(t,10),parseInt(e,10))})).getOrThunk((function(){var e=mr(t);return x$(e.left,e.top)}))},W$=function(t,e,n,r,o){var i=o.bounds,a=d$(e,n,r),u=_l(a.left,i.x,i.x+i.width-o.width),c=_l(a.top,i.y,i.y+i.height-o.height),s=x$(u,c);return e.fold((function(){var t=m$(s,n,r);return y$(t.left,t.top)}),x(s),(function(){var t=f$(s,n,r);return w$(t.left,t.top)}))},G$=function(t,e,n,r,o,i,a){var u=e.fold((function(){var t=v$(n,i.left,i.top),e=f$(t,r,o);return w$(e.left,e.top)}),(function(e){var a=M$(t,e,n,i,r,o);return a.extra.each((function(n){e.onSensor(t,n)})),a.coord}));return W$(t,u,r,o,a)},q$=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),a=Pr(i),u=GI(o),c=U$(o),s=G$(t,e.snaps,c,a,u,r,n),l=p$(s,a,u);Yn(o,l)}e.onDrag(t,o,r)},$$=function(t,e){return{bounds:t.getBounds(),height:ur(e.element),width:br(e.element)}},X$=function(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return $$(e,t)}));i.each((function(n){q$(t,e,a,n)}))},K$=function(t,e,n,r){e.each(I$),n.snaps.each((function(e){_$(t,e)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)},Y$=function(t){return function(e,n){var r=function(t){n.setStartData($$(e,t))};return _u(A([Hu(lu(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}},J$=function(t){return _u([Hu(Da(),t.forceDrop),Hu(Ra(),t.drop),Hu(Va(),(function(e,n){t.move(n.event)})),Hu(Ba(),t.delayDrop)])},Z$=function(t){return R.from(lr(t.x,t.y))},Q$=function(t,e){return lr(e.left-t.left,e.top-t.top)},tX=Object.freeze({__proto__:null,getData:Z$,getDelta:Q$}),eX=function(t,e,n){return[Hu(Da(),(function(r,o){var i=o.event.raw;if(0===i.button){o.stop();var a=function(){return K$(r,R.some(s),t,e)},u=P_(a,200),c={drop:a,delayDrop:u.schedule,forceDrop:a,move:function(n){u.cancel(),X$(r,t,e,tX,n)}},s=F$(r,t.blockerClass,J$(c)),l=function(){n(r),L$(r,s)};l()}}))]},nX=A(A([],j$,!0),[fl("dragger",{handlers:Y$(eX)})],!1),rX=function(t){return _u([Hu(Ta(),t.forceDrop),Hu(Aa(),t.drop),Hu(Ha(),t.drop),Hu(Ea(),(function(e,n){t.move(n.event)}))])},oX=function(t){var e=t[0];return R.some(lr(e.clientX,e.clientY))},iX=function(t){var e=t.raw,n=e.touches;return 1===n.length?oX(n):R.none()},aX=function(t,e){return lr(e.left-t.left,e.top-t.top)},uX=Object.freeze({__proto__:null,getData:iX,getDelta:aX}),cX=function(t,e,n){var r=od(),o=function(n){K$(n,r.get(),t,e),r.clear()};return[Hu(Ta(),(function(i,a){a.stop();var u=function(){return o(i)},c={drop:u,delayDrop:p,forceDrop:u,move:function(n){X$(i,t,e,uX,n)}},s=F$(i,t.blockerClass,rX(c));r.set(s);var l=function(){n(i),L$(i,s)};l()})),Hu(Ea(),(function(n,r){r.stop(),X$(n,t,e,uX,r.event)})),Hu(Aa(),(function(t,e){e.stop(),o(t)})),Hu(Ha(),o)]},sX=A(A([],j$,!0),[fl("dragger",{handlers:Y$(cX)})],!1),lX=function(t,e,n){return A(A([],eX(t,e,n),!0),cX(t,e,n),!0)},fX=A(A([],j$,!0),[fl("dragger",{handlers:Y$(lX)})],!1),dX=nX,mX=sX,hX=fX,gX=Object.freeze({__proto__:null,mouse:dX,touch:mX,mouseOrTouch:hX}),pX=function(){var t=R.none(),e=R.none(),n=function(){t=R.none(),e=R.none()},r=function(e,n){var r=t.map((function(t){return e.getDelta(t,n)}));return t=R.some(n),r},o=function(t,e){return t.getData(e).bind((function(e){return r(t,e)}))},i=function(t){e=R.some(t)},a=function(){return e},u=x({});return zc({readState:u,reset:n,update:o,getStartData:a,setStartData:i})},vX=Object.freeze({__proto__:null,init:pX}),bX=vf({branchKey:"mode",branches:gX,name:"dragging",active:{events:function(t,e){var n=t.dragger;return n.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:R.from(t.extra)}}},state:vX,apis:V$}),yX=40,xX=yX/2,wX=function(t,e,n,r,o,i){return t.fold((function(){return bX.snap({sensor:x$(n-xX,r-xX),range:lr(o,i),output:x$(R.some(n),R.some(r)),extra:{td:e}})}),(function(t){var o=n-xX,i=r-xX,a=yX,u=yX,c=t.element.dom.getBoundingClientRect();return bX.snap({sensor:x$(o,i),range:lr(a,u),output:x$(R.some(n-c.width/2),R.some(r-c.height/2)),extra:{td:e}})}))},CX=function(t,e,n){var r=function(t,e){return t.exists((function(t){return sn(t,e)}))};return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,o){var i=o.td;r(e.get(),i)||(e.set(i),n(i))},mustSnap:!0}},SX=function(t){return kC(SC.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:mf([bX.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),NE.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},kX=function(t,e){var n=oa([]),r=oa([]),o=oa(!1),i=od(),a=od(),u=function(t){var n=Zr(t);return wX(m.getOpt(e),t,n.x,n.y,n.width,n.height)},c=function(){return q(n.get(),(function(t){return u(t)}))},s=function(t){var n=Zr(t);return wX(h.getOpt(e),t,n.right,n.bottom,n.width,n.height)},l=function(){return q(r.get(),(function(t){return s(t)}))},f=CX(c,i,(function(e){a.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),d=CX(l,a,(function(e){i.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),m=SX(f),h=SX(d),g=Ms(m.asSpec()),p=Ms(h.asSpec()),v=function(e,n,r,o){var i=n.dom.getBoundingClientRect();nr(e.element,"display");var a=pn(ee.fromDom(t.getBody())).dom.innerHeight,u=r(i),c=o(i,a);(u||c)&&Xn(e.element,"display","none")},b=function(t,e,n,r){var o=n(e);bX.snapTo(t,o);var i=function(t){return t[r]<0},a=function(t,e){return t[r]>e};v(t,e,i,a)},y=function(t){return b(g,t,u,"top")},x=function(){return i.get().each(y)},w=function(t){return b(p,t,s,"bottom")},C=function(){return a.get().each(w)};en().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){o.get()||(Wh(e,g),Wh(e,p),o.set(!0)),i.set(t.start),a.set(t.finish),t.otherCells.each((function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),y(t.start),w(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){x(),C()})),t.on("TableSelectionClear",(function(){o.get()&&($h(g),$h(p),o.set(!1)),i.clear(),a.clear()})))},zX=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},OX=function(t,e,n){e.delimiter||(e.delimiter="»");var r=function(r){var o=r||[],i=q(o,(function(e,r){return SC.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":r,"tab-index":-1,"aria-level":r+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()},buttonBehaviours:mf([mO.button(n.isDisabled),cO()])})})),a={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}};return Z(i.slice(1),(function(t,e){var n=t;return n.push(a),n.push(e),n}),[i[0]])},o=function(e){var n=[],r=e.length;while(r-- >0){var o=e[r];if(1===o.nodeType&&!zX(o)){var i=t.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:mf([Tx.config({mode:"flow",selector:"div[role=button]"}),Pv.config({disabled:n.isDisabled}),cO(),yT.config({}),Ix.config({}),Nx("elementPathEvents",[ju((function(e,n){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Tx.focusIn(e)})),t.on("NodeChange",(function(t){var n=o(t.parents);n.length>0?Ix.set(e,r(n)):Ix.set(e,[])}))}))])]),components:[]}};(function(t){t[t["None"]=0]="None",t[t["Both"]=1]="Both",t[t["Vertical"]=2]="Vertical"})(EU||(EU={}));var MX=function(t,e,n,r,o){var i={};return i.height=QW(r+e.top,xz(t),Cz(t)),n===EU.Both&&(i.width=QW(o+e.left,yz(t),wz(t))),i},_X=function(t,e,n){var r=ee.fromDom(t.getContainer()),o=MX(t,e,n,ar(r),vr(r));vt(o,(function(t,e){return Xn(r,e,ZW(t))})),vM(t)},TX=function(t){var e=!t.hasPlugin("autoresize"),n=t.getParam("resize",e);return!1===n?EU.None:"both"===n?EU.Both:EU.Vertical},EX=function(t,e,n,r){var o=20,i=lr(n*o,r*o);return _X(t,i,e),R.some(!0)},AX=function(t,e){var n=TX(t);return n===EU.None?R.none():R.some(RC("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize")},behaviours:[bX.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){return _X(t,o,n)},blockerClass:"tox-blocker"}),Tx.config({mode:"special",onLeft:function(){return EX(t,n,-1,0)},onRight:function(){return EX(t,n,1,0)},onUp:function(){return EX(t,n,0,-1)},onDown:function(){return EX(t,n,0,1)}}),yT.config({}),Yx.config({})]},e.icons))},HX=function(t,e){var n,r=function(t,n,r){return Ix.set(t,[Ss(e.translate(["{0} "+r,n[r]]))])};return SC.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:mf([mO.button(e.isDisabled),cO(),yT.config({}),Ix.config({}),tp.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Nx("wordcount-events",[Gu((function(t){var e=tp.getValue(t),n="words"===e.mode?"characters":"words";tp.setValue(t,{mode:n,count:e.count}),r(t,e.count,n)})),ju((function(e){t.on("wordCountUpdate",(function(t){var n=tp.getValue(e).mode;tp.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)}))}))])]),eventOrder:(n={},n[eu()]=["disabling","alloy.base.behaviour","wordcount-events"],n)})},DX=function(t,e){var n=function(){var t=zC.translate(["Powered by {0}","Tiny"]),e=''+t+"";return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:e}}},r=function(){var r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(OX(t,{},e)),t.hasPlugin("wordcount")&&r.push(HX(t,e)),t.getParam("branding",!0,"boolean")&&r.push(n()),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]},o=function(){var n=r(),o=AX(t,e);return n.concat(o.toArray())};return{dom:{tag:"div",classes:["tox-statusbar"]},components:o()}},VX=function(t){var e,n=t.inline,r=n?cG:YW,o=Gz(t)?LF:UI,i=R.none(),a=en(),u=a.browser.isIE(),c=u?["tox-platform-ie"]:[],s=a.deviceType.isTouch(),l="tox-platform-touch",f=s?[l]:[],d=Pz(t),m=Uz(t),h=zC.isRtl()?{attributes:{dir:"rtl"}}:{},g={attributes:(e={},e[Pd]=d?If.BottomToTop:If.TopToBottom,e)},v=function(){return i.bind(uU.getHeader)},b=function(){return o.isDocked(v)},y=function(){Xn(Z.element,"width",document.body.clientWidth+"px")},x=function(){var t=sn(Pn(),m)&&"grid"===Jn(m,"display"),e={dom:T({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c).concat(f)},h),behaviours:mf([Lh.config({useFixed:function(){return b()}})])},n={dom:{styles:{width:document.body.clientWidth+"px"}},events:_u([Hu(fu(),y)])};return Co(e,t?n:{})},w=Ms(x()),C=function(){return ro.value(w)},S=kC({dom:{tag:"div",classes:["tox-anchorbar"]}}),k=function(){return i.bind((function(t){return S.getOpt(t)})).getOrDie("Could not find a anchor bar element")},z=function(){return i.bind((function(t){return uU.getToolbar(t)})).getOrDie("Could not find more toolbar element")},O=function(){return i.bind((function(t){return uU.getThrobber(t)})).getOrDie("Could not find throbber element")},M=kI(w,t,k),_=uU.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:M,onEscape:function(){t.focus()}}),E=Dz(t),A=uU.parts.toolbar(T({dom:{tag:"div",classes:["tox-toolbar"]},getSink:C,providers:M.shared.providers,onEscape:function(){t.focus()},type:E,lazyToolbar:z,lazyHeader:function(){return v().getOrDie("Could not find header element")}},g)),H=uU.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:M.shared.providers,onEscape:function(){t.focus()},type:E}),D=uU.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),V=uU.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),B=uU.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:M}),P=t.getParam("statusbar",!0,"boolean"),L=P&&!n?R.some(DX(t,M.shared.providers)):R.none(),I={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[D,V]},F=Az(t),N=Tz(t),j=_z(t),U=function(){return F?[H]:N?[A]:[]},W=uU.parts.header({dom:T({tag:"div",classes:["tox-editor-header"]},g),components:nt([j?[_]:[],U(),jz(t)?[]:[S.asSpec()]]),sticky:Gz(t),editor:t,sharedBackstage:M.shared}),G=nt([d?[]:[W],n?[]:[I],d?[W]:[]]),q={dom:{tag:"div",classes:["tox-editor-container"]},components:G},$=nt([[q],n?[]:L.toArray(),[B]]),X=Wz(t),K=T(T({role:"application"},zC.isRtl()?{dir:"rtl"}:{}),X?{"aria-hidden":"true"}:{}),Y=Ms(uU.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(n?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(f).concat(c),styles:T({visibility:"hidden"},X?{opacity:"0",border:"0"}:{}),attributes:K},components:$,behaviours:mf([cO(),Pv.config({disableClass:"tox-tinymce--disabled"}),Tx.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));i=R.some(Y),t.shortcuts.add("alt+F9","focus menubar",(function(){uU.focusMenubar(Y)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){uU.focusToolbar(Y)})),t.addCommand("ToggleToolbarDrawer",(function(){uU.toggleToolbarDrawer(Y)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return uU.isToolbarDrawerToggled(Y)}));var J=lT(Y),Z=lT(w);zI(t,J,Z);var Q=function(){var t={broadcastAll:Z.broadcast,broadcastOn:Z.broadcastOn,register:p};return{channels:t}},tt=function(){var e=ZW(eG(t)),n=ZW(rG(t));return t.inline||(er("div","width",n)&&Xn(Y.element,"width",n),er("div","height",e)?Xn(Y.element,"height",e):Xn(Y.element,"height","200px")),e},et=function(){o.setup(t,M.shared,v),zq(t,M),a$(t,C,M),HN(t),ij(t,O,M.shared),bt(Bz(t),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var e=t.ui.registry.getAll(),n=e.buttons,i=e.menuItems,a=e.contextToolbars,u=e.sidebars,c=Ez(t),s={menuItems:i,menus:Xz(t),menubar:Kz(t),toolbar:c.getOrThunk((function(){return Yz(t)})),allowToolbarGroups:E===jS.floating,buttons:n,sidebar:u};KG(t,a,w,{backstage:M}),kX(t,w);var l=t.getElement(),f=tt(),d={mothership:J,uiMothership:Z,outerContainer:Y},m={targetNode:l,height:f};return r.render(t,d,s,M,m)};return{mothership:J,uiMothership:Z,backstage:M,renderUI:et,getUi:Q}},BX=function(t,e){var n=R.from(jn(t,"id")).fold((function(){var t=oc("dialog-describe");return Fn(e,"id",t),t}),w);Fn(t,"aria-describedby",n)},RX=function(t,e){var n=Un(t,"id").fold((function(){var t=oc("dialog-label");return Fn(e,"id",t),t}),w);Fn(t,"aria-labelledby",n)},PX=x([Ti("lazySink"),Fi("dragBlockClass"),ta("getBounds",Qr),Xi("useTabstopAt",M),Xi("eventOrder",{}),ep("modalBehaviours",[Tx]),cl("onExecute"),ll("onEscape")]),LX={sketch:w},IX=x([Bp({name:"draghandle",overrides:function(t,e){return{behaviours:mf([bX.config({mode:"mouse",getTarget:function(t){return Rs(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Dp({schema:[Ti("dom")],name:"title"}),Dp({factory:LX,schema:[Ti("dom")],name:"close"}),Dp({factory:LX,schema:[Ti("dom")],name:"body"}),Bp({factory:LX,schema:[Ti("dom")],name:"footer"}),Vp({factory:{sketch:function(t,e){return T(T({},t),{dom:e.dom,components:e.components})}},schema:[Xi("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Xi("components",[])],name:"blocker"})]),FX=function(t,e,n,r){var o,i=od(),a=function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),a=n.getSystem().build(T(T({},o),{components:o.components.concat([_s(e)]),behaviours:mf([Yx.config({}),Nx("dialog-blocker-events",[Nu(La(),(function(){Tx.focusIn(e)}))])])}));Wh(n,a),Tx.focusIn(e)},u=function(t){i.clear(),vn(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){$h(t)}))}))},c=function(e){return Kp(e,t,"body")},s=function(e){return Kp(e,t,"footer")},l=function(t,e){XN.block(t,e)},f=function(t){XN.unblock(t)},d=oc("modal-events"),m=T(T({},t.eventOrder),(o={},o[du()]=[d].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:a,hide:u,getBody:c,getFooter:s,setIdle:f,setBusy:l},eventOrder:m,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:rp(t.modalBehaviours,[Ix.config({}),Tx.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),XN.config({getRoot:i.get}),Nx(d,[ju((function(e){RX(e.element,Kp(e,t,"title").element),BX(e.element,Kp(e,t,"body").element)}))])])}},NX=mv({name:"ModalDialog",configFields:PX(),partFields:IX(),factory:FX,apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),jX=ti([Hi("type"),Hi("name")].concat(Dk)),UX=li,WX=[Oi("name","name",zo((function(){return oc("button-name")})),si),Ui("icon"),Zi("align","end",["start","end"]),Qi("primary",!1),Qi("disabled",!1)],GX=A(A([],WX,!0),[Hi("text")],!1),qX=A([Di("type",["submit","cancel","custom"])],GX,!0),$X=A([Di("type",["menu"]),Ui("text"),Ui("tooltip"),Ui("icon"),Ii("items",jX)],WX,!0),XX=ki("type",{submit:qX,cancel:qX,custom:qX,menu:$X}),KX=[Hi("type"),Hi("text"),Di("level",["info","warn","error","success"]),Hi("icon"),Xi("url","")],YX=ti(KX),JX=function(t){return[Hi("type"),t]},ZX=[Hi("type"),Hi("text"),Qi("disabled",!1),Qi("primary",!1),Oi("name","name",zo((function(){return oc("button-name")})),si),Ui("icon"),Qi("borderless",!1)],QX=ti(ZX),tK=[Hi("type"),Hi("name"),Hi("label"),Qi("disabled",!1)],eK=ti(tK),nK=li,rK=[Hi("type"),Hi("name")],oK=rK.concat([Ui("label")]),iK=oK.concat([Xi("columns","auto")]),aK=ti(iK),uK=ii([Hi("value"),Hi("text"),Hi("icon")]),cK=oK,sK=ti(cK),lK=si,fK=oK,dK=ti(fK),mK=si,hK=rK.concat([Ji("tag","textarea"),Hi("scriptId"),Hi("scriptUrl"),ea("settings",void 0)]),gK=rK.concat([Ji("tag","textarea"),Bi("init")]),pK=vi((function(t){return xi("customeditor.old",Qo(gK),t).orThunk((function(){return xi("customeditor.new",Qo(hK),t)}))})),vK=si,bK=oK,yK=ti(bK),xK=pi(),wK=function(t){return[Hi("type"),Ai("columns"),t]},CK=[Hi("type"),Hi("html"),Zi("presets","presentation",["presentation","document"])],SK=ti(CK),kK=oK.concat([Qi("sandboxed",!0)]),zK=ti(kK),OK=si,MK=oK.concat([Ei("currentState",ti([Ti("blob"),Hi("url")]))]),_K=ti(MK),TK=oK.concat([Ui("inputMode"),Ui("placeholder"),Qi("maximized",!1),Qi("disabled",!1)]),EK=ti(TK),AK=si,HK=function(t){return[Hi("type"),Hi("label"),t]},DK=[Hi("text"),Hi("value")],VK=[Hi("text"),Ii("items",zi("items",(function(){return BK})))],BK=ni([ti(DK),ti(VK)]),RK=oK.concat([Ii("items",BK),Qi("disabled",!1)]),PK=ti(RK),LK=si,IK=oK.concat([Li("items",[Hi("text"),Hi("value")]),Yi("size",1),Qi("disabled",!1)]),FK=ti(IK),NK=si,jK=oK.concat([Qi("constrain",!0),Qi("disabled",!1)]),UK=ti(jK),WK=ti([Hi("width"),Hi("height")]),GK=[Hi("type"),Ii("header",si),Ii("cells",ei(si))],qK=ti(GK),$K=oK.concat([Ui("placeholder"),Qi("maximized",!1),Qi("disabled",!1)]),XK=ti($K),KK=si,YK=oK.concat([Zi("filetype","file",["image","media","file"]),Xi("disabled",!1)]),JK=ti(YK),ZK=ti([Hi("value"),Xi("meta",{})]),QK=function(t){return Oi("items","items",ko(),ei(vi((function(e){return xi("Checking item of "+t,tY,e).fold((function(t){return ro.error(Si(t))}),(function(t){return ro.value(t)}))}))))},tY=Jo((function(){return gi("type",{alertbanner:YX,bar:ti(JX(QK("bar"))),button:QX,checkbox:eK,colorinput:sK,colorpicker:dK,dropzone:yK,grid:ti(wK(QK("grid"))),iframe:zK,input:EK,listbox:PK,selectbox:FK,sizeinput:UK,textarea:XK,urlinput:JK,customeditor:pK,htmlpanel:SK,imagetools:_K,collection:aK,label:ti(HK(QK("label"))),table:qK,panel:nY})})),eY=[Hi("type"),Xi("classes",[]),Ii("items",tY)],nY=ti(eY),rY=[Oi("name","name",zo((function(){return oc("tab-name")})),si),Hi("title"),Ii("items",tY)],oY=[Hi("type"),Li("tabs",rY)],iY=ti(oY),aY=GX,uY=XX,cY=ti([Hi("title"),Ei("body",gi("type",{panel:nY,tabpanel:iY})),Ji("size","normal"),Ii("buttons",uY),Xi("initialData",{}),ta("onAction",p),ta("onChange",p),ta("onSubmit",p),ta("onClose",p),ta("onCancel",p),Xi("onTabChange",p)]),sY=function(t){return xi("dialog",cY,t)},lY=ti(A([Di("type",["cancel","custom"])],aY,!0)),fY=ti([Hi("title"),Hi("url"),ji("height"),ji("width"),Gi("buttons",lY),ta("onAction",p),ta("onCancel",p),ta("onClose",p),ta("onMessage",p)]),dY=function(t){return xi("dialog",fY,t)},mY=function(t){return a(t)?[t].concat(rt(zt(t),mY)):u(t)?rt(t,mY):[]},hY=function(t){return i(t.type)&&i(t.name)},gY={checkbox:nK,colorinput:lK,colorpicker:mK,dropzone:xK,input:AK,iframe:OK,sizeinput:WK,selectbox:NK,listbox:LK,size:WK,textarea:KK,urlinput:ZK,customeditor:vK,collection:uK,togglemenuitem:UX},pY=function(t){return R.from(gY[t.type])},vY=function(t){return Y(mY(t),hY)},bY=function(t){var e=vY(t),n=rt(e,(function(t){return pY(t).fold((function(){return[]}),(function(e){return[Ei(t.name,e)]}))}));return ti(n)},yY=function(t){var e=wi(sY(t)),n=bY(t),r=t.initialData;return{internalDialog:e,dataValidator:n,initialData:r}},xY={open:function(t,e){var n=yY(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){var n=wi(dY(e));return t(n)},redial:function(t){return yY(t)}},wY=function(t){var e=[],n={};return vt(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),e.length>0?ro.error(e):ro.value(n)},CY=function(t,e){var n=kC(DD.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:q(t.items,(function(t){return uL(n,t,e)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:mf([Tx.config({mode:"acyclic",useTabstopAt:k(vV)}),WD.memento(n),aV.memento(n,{postprocess:function(t){return wY(t).fold((function(t){return console.error(t),{}}),w)}})])}},SY=function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:vw(t.action),behaviours:rp(t.tabButtonBehaviours,[Yx.config({}),Tx.config({mode:"execution",useSpace:!0,useEnter:!0}),tp.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}},kY=dv({name:"TabButton",configFields:[Xi("uid",void 0),Ti("value"),Oi("dom","dom",_o((function(){return{attributes:{role:"tab",id:oc("aria"),"aria-selected":"false"}}})),ai()),Fi("action"),Xi("domModification",{}),ep("tabButtonBehaviours",[Yx,Tx,tp]),Ti("view")],factory:SY}),zY=x([Ti("tabs"),Ti("dom"),Xi("clickToDismiss",!1),ep("tabbarBehaviours",[rb,Tx]),il(["tabClass","selectedClass"])]),OY=Rp({factory:kY,name:"tabs",unit:"tab",overrides:function(t){var e=function(t,e){rb.dehighlight(t,e),Su(t,yu(),{tabbar:t,button:e})},n=function(t,e){rb.highlight(t,e),Su(t,bu(),{tabbar:t,button:e})};return{action:function(r){var o=r.getSystem().getByUid(t.uid).getOrDie(),i=rb.isHighlighted(o,r),a=function(){return i&&t.clickToDismiss?e:i?p:n}();a(o,r)},domModification:{classes:[t.markers.tabClass]}}}}),MY=x([OY]),_Y=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:rp(t.tabbarBehaviours,[rb.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){Fn(e.element,"aria-selected","true")},onDehighlight:function(t,e){Fn(e.element,"aria-selected","false")}}),Tx.config({mode:"flow",getInitial:function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}},TY=mv({name:"Tabbar",configFields:zY(),partFields:MY(),factory:_Y}),EY=function(t,e){return{uid:t.uid,dom:t.dom,behaviours:rp(t.tabviewBehaviours,[Ix.config({})]),domModification:{attributes:{role:"tabpanel"}}}},AY=dv({name:"Tabview",configFields:[ep("tabviewBehaviours",[Ix])],factory:EY}),HY=x([Xi("selectFirst",!0),ul("onChangeTab"),ul("onDismissTab"),Xi("tabs",[]),ep("tabSectionBehaviours",[])]),DY=Dp({factory:TY,schema:[Ti("dom"),Pi("markers",[Ti("tabClass"),Ti("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),VY=Dp({factory:AY,name:"tabview"}),BY=x([DY,VY]),RY=function(t,e,n,r){var o=function(e){var n=tp.getValue(e);Xp(e,t,"tabview").each((function(r){var o=tt(t.tabs,(function(t){return t.value===n}));o.each((function(n){var o=n.view();Un(e.element,"id").each((function(t){Fn(r.element,"aria-labelledby",t)})),Ix.set(r,o),t.onChangeTab(r,e,o)}))}))},i=function(e,n){Xp(e,t,"tabbar").each((function(t){n(t).each(ku)}))};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.tabSectionBehaviours),events:_u(nt([t.selectFirst?[ju((function(t,e){i(t,rb.getFirst)}))]:[],[Hu(bu(),(function(t,e){var n=e.event.button;o(n)})),Hu(yu(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return Xp(e,t,"tabview").map((function(t){return Ix.contents(t)})).getOr([])},showTab:function(t,e){var n=function(t){var n=rb.getCandidates(t),r=tt(n,(function(t){return tp.getValue(t)===e}));return r.filter((function(e){return!rb.isHighlighted(t,e)}))};i(t,n)}}}},PY=mv({name:"TabSection",configFields:HY(),partFields:BY(),factory:RY,apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),LY=function(t,e,n){return q(t,(function(r,o){Ix.set(n,t[o].view());var i=e.dom.getBoundingClientRect();return Ix.set(n,[]),i.height}))},IY=function(t){return ft(st(t,(function(t,e){return t>e?-1:t=n.dom.offsetLeft+vr(n),s=c?Math.max(ar(n),u):u,l=parseInt(Jn(t,"margin-top"),10)||0,f=parseInt(Jn(t,"margin-bottom"),10)||0,d=ar(t)+l+f,m=d-s;return r-m},NY=function(t,e){ft(t).each((function(t){return PY.showTab(e,t.value)}))},jY=function(t,e){Xn(t,"height",e+"px"),en().browser.isIE()?nr(t,"flex-basis"):Xn(t,"flex-basis",e+"px")},UY=function(t,e,n){Rs(t,'[role="dialog"]').each((function(t){Ls(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return Xn(e,"height","0"),Xn(e,"flex-basis","0"),Math.min(n,FY(t,e,r))})).each((function(t){jY(e,t)}))}))}))},WY=function(t){return Ls(t,'[role="tabpanel"]')},GY=function(t){var e=function(){var e=od(),n=[ju((function(n){var r=n.element;WY(r).each((function(o){Xn(o,"visibility","hidden"),n.getSystem().getByDom(o).toOptional().each((function(n){var r=LY(t,o,n),i=IY(r);i.fold(e.clear,e.set)})),UY(r,o,e),nr(o,"visibility"),NY(t,n),wC.requestAnimationFrame((function(){UY(r,o,e)}))}))})),Hu(fu(),(function(t){var n=t.element;WY(n).each((function(t){UY(n,t,e)}))})),Hu(BT,(function(t,n){var r=t.element;WY(r).each((function(t){var n=Of(Tn(t));Xn(t,"visibility","hidden");var o=Qn(t,"height").map((function(t){return parseInt(t,10)}));nr(t,"height"),nr(t,"flex-basis");var i=t.dom.getBoundingClientRect().height,a=o.forall((function(t){return i>t}));a?(e.set(i),UY(r,t,e)):o.each((function(e){jY(t,e)})),nr(t,"visibility"),n.each(Sf)}))}))],r=!1;return{extraEvents:n,selectFirst:r}}(),n=function(){var t=[],e=!0;return{extraEvents:t,selectFirst:e}}();return{smartTabHeight:e,naiveTabHeight:n}},qY="send-data-to-section",$Y="send-data-to-view",XY=function(t,e){var n=oa({}),r=function(t){var e=tp.getValue(t),r=wY(e).getOr({}),o=n.get(),i=Co(o,r);n.set(i)},o=function(t){var e=n.get();tp.setValue(t,e)},i=oa(null),a=q(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[DD.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"]},components:q(t.items,(function(t){return uL(n,t,e)})),formBehaviours:mf([Tx.config({mode:"acyclic",useTabstopAt:k(vV)}),Nx("TabView.form.events",[ju(o),Uu(r)]),yf.config({channels:ha([{key:qY,value:{onReceive:r}},{key:$Y,value:{onReceive:o}}])})])}}))]}}})),u=GY(a).smartTabHeight;return PY.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=tp.getValue(e);Su(t,VT,{name:r,oldName:i.get()}),i.set(r)},tabs:a,components:[PY.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[TY.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:mf([yT.config({})])}),PY.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:u.selectFirst,tabSectionBehaviours:mf([Nx("tabpanel",u.extraEvents),Tx.config({mode:"acyclic"}),bv.config({find:function(t){return ft(PY.getViewItems(t))}}),tp.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([qY],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn([$Y],{})}}})])})},KY=oc("update-dialog"),YY=oc("update-title"),JY=oc("update-body"),ZY=oc("update-footer"),QY=oc("body-send-message"),tJ=function(t,e,n,r){var o=function(t){switch(t.body.type){case"tabpanel":return[XY(t.body,n)];default:return[CY(t.body,n)]}},i=function(t,e){return R.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},a={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:T(T({},e.map((function(t){return{id:t}})).getOr({})),r?a:{})},components:[],behaviours:mf([WD.childAt(0),hW.config({channel:JY,updateState:i,renderComponents:o,initialData:t})])}},eJ=function(t,e,n,r){return tJ(t,R.some(e),n,r)},nJ=function(t,e){var n=tJ(t,R.none(),e,!1);return NX.parts.body(n)},rJ=function(t){var e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[hV({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:mf([yT.config({}),Yx.config({})])})]}],behaviours:mf([Tx.config({mode:"acyclic",useTabstopAt:k(vV)})])};return NX.parts.body(e)},oJ=CO.deviceType.isTouch(),iJ=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},aJ=function(t,e){return NX.parts.close(SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:mf([yT.config({})])}))},uJ=function(){return NX.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},cJ=function(t,e){return NX.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:JN("

"+e.translate(t)+"

")}]}]})},sJ=function(t){return NX.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},lJ=function(t,e){return[sT.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),sT.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},fJ=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return NX.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),R.some(!0)},useTabstopAt:function(t){return!vV(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:T({position:"relative"},t.extraStyles)},components:A([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:JN('
'),components:[{dom:{tag:"div",classes:oJ?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:mf(A([Yx.config({}),Nx("dialog-events",t.dialogEvents.concat([Nu(La(),(function(t,e){Tx.focusIn(t)}))])),Nx("scroll-lock",[ju((function(){is(Pn(),i)})),Uu((function(){us(Pn(),i)}))])],t.extraBehaviours,!0)),eventOrder:T((e={},e[eu()]=["dialog-events"],e[du()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[mu()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},dJ=function(t){return SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[RC("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){Cu(t,TT)}})},mJ=function(t,e,n){var r=function(t){return[Ss(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:T({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:mf([hW.config({channel:YY,renderComponents:r})])}},hJ=function(){return{dom:JN('
')}},gJ=function(t,e,n){return sT.sketch({dom:JN('
'),components:[mJ(t,R.some(e),n),hJ(),dJ(n)],containerBehaviours:mf([bX.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Is(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},pJ=function(t,e){var n=NX.parts.title(mJ(t,R.none(),e)),r=NX.parts.draghandle(hJ()),o=NX.parts.close(dJ(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return sT.sketch({dom:JN('
'),components:i})},vJ=function(t,e){return pJ({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},bJ=function(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:JN('
')}]}},yJ=function(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){NX.setBusy(t(),(function(t,r){return bJ(n.message,r,e)}))},onUnblock:function(){NX.setIdle(t())}}},xJ=function(t,e,n,r){var o,i=function(t,e){return R.some(e)};return Ms(fJ(T(T({},t),{lazySink:r.shared.getSink,extraBehaviours:A([hW.config({channel:KY,updateState:i,initialData:e}),aV.memory({})],t.extraBehaviours,!0),onEscape:function(t){Cu(t,TT)},dialogEvents:n,eventOrder:(o={},o[tu()]=[hW.name(),yf.name()],o[du()]=["scroll-lock",hW.name(),"messages","dialog-events","alloy.base.behaviour"],o[mu()]=["alloy.base.behaviour","dialog-events","messages",hW.name(),"scroll-lock"],o)})))},wJ=function(t){var e=function(t){var e=q(t.items,(function(t){var e=oa(!1);return T(T({},t),{storage:e})}));return T(T({},t),{items:e})};return q(t,(function(t){return"menu"===t.type?e(t):t}))},CJ=function(t){return Z(t,(function(t,e){if("menu"===e.type){var n=e;return Z(n.items,(function(t,e){return t[e.name]=e.storage,t}),t)}return t}),{})},SJ=function(t,e){return[Lu(La(),pV),t(_T,(function(t,n){e.onClose(),n.onClose()})),t(TT,(function(t,e,n,r){e.onCancel(t),Cu(r,_T)})),Hu(DT,(function(t,n){return e.onUnblock()})),Hu(HT,(function(t,n){return e.onBlock(n.event)}))]},kJ=function(t,e){var n=function(e,n){return Hu(e,(function(e,o){r(e,(function(r,i){n(t(),r,o.event,e)}))}))},r=function(t,e){hW.getState(t).get().each((function(n){e(n,t)}))};return A(A([],SJ(n,e),!0),[n(ET,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},zJ=function(t,e,n){var r=function(e,n){return Hu(e,(function(e,r){o(e,(function(o,i){n(t(),o,r.event,e)}))}))},o=function(t,e){hW.getState(t).get().each((function(n){e(n.internalDialog,t)}))};return A(A([],SJ(r,e),!0),[r(AT,(function(t,e){return e.onSubmit(t)})),r(MT,(function(t,e,n){e.onChange(t,{name:n.name})})),r(ET,(function(t,e,r,o){var i=function(){return Tx.focusIn(o)},a=function(t){return Wn(t,"disabled")||Un(t,"aria-disabled").exists((function(t){return"true"===t}))},u=Tn(o.element),c=Of(u);e.onAction(t,{name:r.name,value:r.value}),Of(u).fold(i,(function(t){a(t)||c.exists((function(e){return dn(t,e)&&a(e)}))?i():n().toOptional().filter((function(e){return!dn(e.element,t)})).each(i)}))})),r(VT,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),Uu((function(e){var n=t();tp.setValue(e,n.getData())}))],!1)},OJ={initUrlDialog:kJ,initDialog:zJ},MJ=function(t,e){return rR(t,t.type,e)},_J=function(t,e,n){return tt(e,(function(t){return t.name===n})).bind((function(e){return e.memento.getOpt(t)}))},TJ=function(t,e){var n=e.map((function(t){return t.footerButtons})).getOr([]),r=K(n,(function(t){return"start"===t.align})),o=function(t,e){return sT.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:q(e,(function(t){return t.memento.asSpec()}))})},i=o("start",r.pass),a=o("end",r.fail);return[i,a]},EJ=function(t,e){var n=function(t,n){var r=q(n.buttons,(function(t){var n=kC(MJ(t,e));return{name:t.name,align:t.align,memento:n}})),o=function(t,e){return _J(t,r,e)};return R.some({lookupByName:o,footerButtons:r})};return{dom:JN(''),components:[],behaviours:mf([hW.config({channel:ZY,initialData:t,updateState:n,renderComponents:TJ})])}},AJ=function(t,e){return EJ(t,e)},HJ=function(t,e){return NX.parts.footer(EJ(t,e))},DJ=function(t,e){var n=t.getRoot();if(n.getSystem().isConnected()){var r=bv.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return DD.getField(r,e).fold((function(){var n=t.getFooter(),o=hW.getState(n);return o.get().bind((function(t){return t.lookupByName(r,e)}))}),(function(t){return R.some(t)}))}return R.none()},VJ=function(t,e){var n=t.getRoot();return hW.getState(n).get().map((function(t){return wi(xi("data",t.dataValidator,e))})).getOr(e)},BJ=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},o=function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=tp.getValue(r),i=bt(n,(function(t){return t.get()}));return T(T({},o),i)},a=function(e){r((function(r){var o=g.getData(),i=T(T({},o),e),a=VJ(t,i),u=t.getFormWrapper();tp.setValue(u,a),vt(n,(function(t,e){Mt(i,e)&&t.set(i[e])}))}))},u=function(e){DJ(t,e).each(Pv.disable)},c=function(e){DJ(t,e).each(Pv.enable)},s=function(e){DJ(t,e).each(Yx.focus)},l=function(t){if(!i(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){Su(e,HT,{message:t})}))},f=function(){r((function(t){Cu(t,DT)}))},d=function(e){r((function(n){var r=t.getBody(),o=hW.getState(r);o.get().exists((function(t){return t.isTabPanel()}))&&bv.getCurrent(r).each((function(t){PY.showTab(t,e)}))}))},m=function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([KY],r),n.getSystem().broadcastOn([YY],r.internalDialog),n.getSystem().broadcastOn([JY],r.internalDialog),n.getSystem().broadcastOn([ZY],r.internalDialog),g.setData(r.initialData)}))},h=function(){r((function(t){Cu(t,_T)}))},g={getData:o,setData:a,disable:u,enable:c,focus:s,block:l,unblock:f,showTab:d,redial:m,close:h};return g},RJ=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}},PJ=function(t,e,n){var r=vJ(t.internalDialog.title,n),o=nJ({body:t.internalDialog.body},n),i=wJ(t.internalDialog.buttons),a=CJ(i),u=HJ({buttons:i},n),c=OJ.initDialog((function(){return m}),yJ((function(){return f}),n.shared.providers,e),n.shared.getSink),s=RJ(t.internalDialog.size),l={header:r,body:o,footer:R.some(u),extraClasses:s,extraBehaviours:[],extraStyles:{}},f=xJ(l,t,c,n),d=function(){var t=function(){var t=NX.getBody(f);return bv.getCurrent(t).getOr(t)};return{getRoot:x(f),getBody:function(){return NX.getBody(f)},getFooter:function(){return NX.getFooter(f)},getFormWrapper:t}}(),m=BJ(d,e.redial,a);return{dialog:f,instanceApi:m}},LJ=function(t,e,n,r){var o,i,a=oc("dialog-label"),u=oc("dialog-content"),c=function(t,e){return R.some(e)},s=kC(gJ({title:t.internalDialog.title,draggable:!0},a,n.shared.providers)),l=kC(eJ({body:t.internalDialog.body},u,n,r)),f=wJ(t.internalDialog.buttons),d=CJ(f),m=kC(AJ({buttons:f},n)),h=OJ.initDialog((function(){return p}),{onBlock:function(t){XN.block(g,(function(e,r){return bJ(t.message,r,n.shared.providers)}))},onUnblock:function(){XN.unblock(g)},onClose:function(){return e.closeWindow()}},n.shared.getSink),g=Ms({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=a,o["aria-describedby"]=u,o)},eventOrder:(i={},i[tu()]=[hW.name(),yf.name()],i[eu()]=["execute-on-form"],i[du()]=["reflecting","execute-on-form"],i),behaviours:mf([Tx.config({mode:"cyclic",onEscape:function(t){return Cu(t,_T),R.some(!0)},useTabstopAt:function(t){return!vV(t)&&("button"!==ue(t)||"disabled"!==jn(t,"disabled"))}}),hW.config({channel:KY,updateState:c,initialData:t}),Yx.config({}),Nx("execute-on-form",h.concat([Nu(La(),(function(t,e){Tx.focusIn(t)}))])),XN.config({getRoot:function(){return R.some(g)}}),Ix.config({}),aV.memory({})]),components:[s.asSpec(),l.asSpec(),m.asSpec()]}),p=BJ({getRoot:x(g),getFooter:function(){return m.get(g)},getBody:function(){return l.get(g)},getFormWrapper:function(){var t=l.get(g);return bv.getCurrent(t).getOr(t)}},e.redial,d);return{dialog:g,instanceApi:p}},IJ=tinymce.util.Tools.resolve("tinymce.util.URI"),FJ=function(t){var e=function(e){t.getSystem().isConnected()&&e(t)},n=function(t){if(!i(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");e((function(e){Su(e,HT,{message:t})}))},r=function(){e((function(t){Cu(t,DT)}))},o=function(){e((function(t){Cu(t,_T)}))},a=function(t){e((function(e){e.getSystem().broadcastOn([QY],t)}))};return{block:n,unblock:r,close:o,sendMessage:a}},NJ=["insertContent","setContent","execCommand","close","block","unblock"],jJ=function(t){return a(t)&&-1!==NJ.indexOf(t.mceAction)},UJ=function(t){return!jJ(t)&&a(t)&&Mt(t,"mceAction")},WJ=function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!s(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock();break}},GJ=function(t,e,n,r){var o,i=vJ(t.title,r),a=rJ(t),u=t.buttons.bind((function(t){return 0===t.length?R.none():R.some(HJ({buttons:t},r))})),c=OJ.initUrlDialog((function(){return v}),yJ((function(){return p}),r.shared.providers,e)),s=T(T({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),l=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],f=new IJ(t.url,{base_uri:new IJ(window.location.href)}),d=f.protocol+"://"+f.host+(f.port?":"+f.port:""),m=nd(),h=[Nx("messages",[ju((function(){var e=ad(ee.fromDom(window),"message",(function(e){if(f.isSameOrigin(new IJ(e.raw.origin))){var r=e.raw.data;jJ(r)?WJ(n,v,r):UJ(r)&&t.onMessage(v,r)}}));m.set(e)})),Uu(m.clear)]),yf.config({channels:(o={},o[QY]={onReceive:function(t,e){Ls(t.element,"iframe").each((function(t){var n=t.dom.contentWindow;n.postMessage(e,d)}))}},o)})],g={header:i,body:a,footer:u,extraClasses:l,extraBehaviours:h,extraStyles:s},p=xJ(g,t,c,r),v=FJ(p);return{dialog:p,instanceApi:v}},qJ=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(){NX.hide(c),r()},i=kC(rR({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:R.none()},"cancel",t.backstage)),a=uJ(),u=aJ(o,e.providers),c=Ms(fJ({lazySink:function(){return e.getSink()},header:iJ(a,u),body:cJ(n,e.providers),footer:R.some(sJ(lJ([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Hu(TT,o)],eventOrder:{}}));NX.show(c);var s=i.get(c);Yx.focus(s)};return{open:n}},$J=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(t){NX.hide(s),r(t)},i=kC(rR({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:R.none()},"submit",t.backstage)),a=rR({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:R.none()},"cancel",t.backstage),u=uJ(),c=aJ((function(){return o(!1)}),e.providers),s=Ms(fJ({lazySink:function(){return e.getSink()},header:iJ(u,c),body:cJ(n,e.providers),footer:R.some(sJ(lJ([],[a,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Hu(TT,(function(){return o(!1)})),Hu(AT,(function(){return o(!0)}))],eventOrder:{}}));NX.show(s);var l=i.get(s);Yx.focus(l)};return{open:n}},XJ=function(t,e){return wi(xi("data",e,t))},KJ=function(t){return R_(t,".tox-alert-dialog")||R_(t,".tox-confirm-dialog")},YJ=function(t,e,n){return e&&n?[]:[CF.config({contextual:{lazyContext:function(){return R.some(Jr(ee.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},JJ=function(t){var e=t.backstage,n=t.editor,r=Gz(n),o=qJ(t),i=$J(t),a=function(t,n,r){return void 0!==n&&"toolbar"===n.inline?l(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?l(t,e.shared.anchors.cursor(),r,n.ariaAttrs):s(t,r)},u=function(t,e){return c(t,e)},c=function(t,r){var o=function(t){var o=GJ(t,{closeWindow:function(){NX.hide(o.dialog),r(o.instanceApi)}},n,e);return NX.show(o.dialog),o.instanceApi};return xY.openUrl(o,t)},s=function(t,n){var r=function(t,r,o){var i=r,a={dataValidator:o,initialData:i,internalDialog:t},u=PJ(a,{redial:xY.redial,closeWindow:function(){NX.hide(u.dialog),n(u.instanceApi)}},e);return NX.show(u.dialog),u.instanceApi.setData(i),u.instanceApi};return xY.open(r,t)},l=function(t,o,i,a){var u=function(t,u,c){var s=XJ(u,c),l=od(),f=e.shared.header.isPositionedAtTop(),d={dataValidator:c,initialData:s,internalDialog:t},m=function(){return l.on((function(t){eC.reposition(t),CF.refresh(t)}))},h=LJ(d,{redial:xY.redial,closeWindow:function(){l.on(eC.hide),n.off("ResizeEditor",m),l.clear(),i(h.instanceApi)}},e,a),g=Ms(eC.sketch(T(T({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},f?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:mf(A([Nx("window-manager-inline-events",[Hu(hu(),(function(t,e){Cu(h.dialog,TT)}))])],YJ(n,r,f),!0)),isExtraPart:function(t,e){return KJ(e)}})));return l.set(g),eC.showWithin(g,_s(h.dialog),{anchor:o},R.some(Pn())),r&&f||(CF.refresh(g),n.on("ResizeEditor",m)),h.instanceApi.setData(s),Tx.focusIn(h.dialog),h.instanceApi};return xY.open(u,t)},f=function(t,e){i.open(t,(function(t){e(t)}))},d=function(t,e){o.open(t,(function(){e()}))},m=function(t){t.close()};return{open:a,openUrl:u,alert:d,close:m,confirm:f}};function ZJ(){_.add("silver",(function(t){var e=VX(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;B_.register(t,r.shared);var a=JJ({editor:t,backstage:r});return{renderUI:o,getWindowManagerImpl:x(a),getNotificationManagerImpl:function(){return NC(t,{backstage:r},n)},ui:i()}}))}ZJ()})()}).call(this,n("2409"))},4117:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0&&e1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return W(r.childNodes[0])},j=function(t,e){var n=e||document,r=n.createElement(t);return W(r)},U=function(t,e){var n=e||document,r=n.createTextNode(t);return W(r)},W=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},G=function(t,e,n){return k.from(t.dom.elementFromPoint(e,n)).map(W)},q={fromHtml:N,fromTag:j,fromText:U,fromDom:W,fromPoint:G},$=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),X=tinymce.util.Tools.resolve("tinymce.util.Promise"),K=tinymce.util.Tools.resolve("tinymce.util.URI"),Y=tinymce.util.Tools.resolve("tinymce.util.XHR"),J=function(t){return t.getParam("image_dimensions",!0,"boolean")},Z=function(t){return t.getParam("image_advtab",!1,"boolean")},Q=function(t){return t.getParam("image_uploadtab",!0,"boolean")},tt=function(t){return t.getParam("image_prepend_url","","string")},et=function(t){return t.getParam("image_class_list")},nt=function(t){return t.getParam("image_description",!0,"boolean")},rt=function(t){return t.getParam("image_title",!1,"boolean")},ot=function(t){return t.getParam("image_caption",!1,"boolean")},it=function(t){return t.getParam("image_list",!1)},at=function(t){return d(t.getParam("images_upload_url"))},ut=function(t){return d(t.getParam("images_upload_handler"))},ct=function(t){return t.getParam("a11y_advanced_options",!1,"boolean")},st=function(t){return t.getParam("automatic_uploads",!0,"boolean")},lt=function(t,e){return Math.max(parseInt(t,10),parseInt(e,10))},ft=function(t){return new X((function(e){var n=document.createElement("img"),r=function(t){n.onload=n.onerror=null,n.parentNode&&n.parentNode.removeChild(n),e(t)};n.onload=function(){var t=lt(n.width,n.clientWidth),e=lt(n.height,n.clientHeight),o={width:t,height:e};r(X.resolve(o))},n.onerror=function(){r(X.reject("Failed to get image dimensions for: "+t))};var o=n.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(n),n.src=t}))},dt=function(t){return t&&(t=t.replace(/px$/,"")),t},mt=function(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t},ht=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},gt=function(t,e){var n=it(t);a(n)?Y.send({url:n,success:function(t){e(JSON.parse(t))}}):m(n)?n(e):e(n)},pt=function(t,e,n){var r=function(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())};n.onload=function(){e.width||e.height||!J(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r},vt=function(t){return new X((function(e,n){var r=new FileReader;r.onload=function(){e(r.result)},r.onerror=function(){n(r.error.message)},r.readAsDataURL(t)}))},bt=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},yt=function(t,e){return K.isDomSafe(e,"img",t.settings)},xt=$.DOM,wt=function(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?dt(t.style.marginLeft):""},Ct=function(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?dt(t.style.marginTop):""},St=function(t){return t.style.borderWidth?dt(t.style.borderWidth):""},kt=function(t,e){return t.hasAttribute(e)?t.getAttribute(e):""},zt=function(t,e){return t.style[e]?t.style[e]:""},Ot=function(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName},Mt=function(t,e,n){""===n?t.removeAttribute(e):t.setAttribute(e,n)},_t=function(t){var e=xt.create("figure",{class:"image"});xt.insertAfter(e,t),e.appendChild(t),e.appendChild(xt.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"},Tt=function(t){var e=t.parentNode;xt.insertAfter(t,e),xt.remove(e)},Et=function(t){Ot(t)?Tt(t):_t(t)},At=function(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");r.length>0?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")},Ht=function(t,e){return function(t,n,r){t.style[n]?(t.style[n]=mt(r),At(t,e)):Mt(t,n,r)}},Dt=function(t,e){return t.style[e]?dt(t.style[e]):kt(t,e)},Vt=function(t,e){var n=mt(e);t.style.marginLeft=n,t.style.marginRight=n},Bt=function(t,e){var n=mt(e);t.style.marginTop=n,t.style.marginBottom=n},Rt=function(t,e){var n=mt(e);t.style.borderWidth=n},Pt=function(t,e){t.style.borderStyle=e},Lt=function(t){return zt(t,"borderStyle")},It=function(t){return"FIGURE"===t.nodeName},Ft=function(t){return"IMG"===t.nodeName},Nt=function(t){return 0===xt.getAttrib(t,"alt").length&&"presentation"===xt.getAttrib(t,"role")},jt=function(t){return Nt(t)?"":kt(t,"alt")},Ut=function(){return{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},Wt=function(t,e){var n=document.createElement("img");return Mt(n,"style",e.style),(wt(n)||""!==e.hspace)&&Vt(n,e.hspace),(Ct(n)||""!==e.vspace)&&Bt(n,e.vspace),(St(n)||""!==e.border)&&Rt(n,e.border),(Lt(n)||""!==e.borderStyle)&&Pt(n,e.borderStyle),t(n.getAttribute("style"))},Gt=function(t,n){var r=document.createElement("img");if(Jt(t,e(e({},n),{caption:!1}),r),Xt(r,n.alt,n.isDecorative),n.caption){var o=xt.create("figure",{class:"image"});return o.appendChild(r),o.appendChild(xt.create("figcaption",{contentEditable:"true"},"Caption")),o.contentEditable="false",o}return r},qt=function(t,e){return{src:kt(e,"src"),alt:jt(e),title:kt(e,"title"),width:Dt(e,"width"),height:Dt(e,"height"),class:kt(e,"class"),style:t(kt(e,"style")),caption:Ot(e),hspace:wt(e),vspace:Ct(e),border:St(e),borderStyle:zt(e,"borderStyle"),isDecorative:Nt(e)}},$t=function(t,e,n,r,o){n[r]!==e[r]&&o(t,r,n[r])},Xt=function(t,e,n){if(n){xt.setAttrib(t,"role","presentation");var r=q.fromDom(t);I(r,"alt","")}else{if(s(e)){r=q.fromDom(t);F(r,"alt")}else{r=q.fromDom(t);I(r,"alt",e)}"presentation"===xt.getAttrib(t,"role")&&xt.setAttrib(t,"role","")}},Kt=function(t,e,n){n.alt===e.alt&&n.isDecorative===e.isDecorative||Xt(t,n.alt,n.isDecorative)},Yt=function(t,e){return function(n,r,o){t(n,o),At(n,e)}},Jt=function(t,e,n){var r=qt(t,n);$t(n,r,e,"caption",(function(t,e,n){return Et(t)})),$t(n,r,e,"src",Mt),$t(n,r,e,"title",Mt),$t(n,r,e,"width",Ht("width",t)),$t(n,r,e,"height",Ht("height",t)),$t(n,r,e,"class",Mt),$t(n,r,e,"style",Yt((function(t,e){return Mt(t,"style",e)}),t)),$t(n,r,e,"hspace",Yt(Vt,t)),$t(n,r,e,"vspace",Yt(Bt,t)),$t(n,r,e,"border",Yt(Rt,t)),$t(n,r,e,"borderStyle",Yt(Pt,t)),Kt(n,r,e)},Zt=function(t,e){var n=t.dom.styles.parse(e),r=ht(n),o=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(o)},Qt=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||bt(e))?null:e},te=function(t,e){var n=t.dom,r=E(t.schema.getTextBlockElements(),(function(e,n){return!t.schema.isValidChild(n,"figure")})),o=n.getParent(e.parentNode,(function(t){return H(r,t.nodeName)}),t.getBody());return o?n.split(o,e):e},ee=function(t){var e=Qt(t);return e?qt((function(e){return Zt(t,e)}),e):Ut()},ne=function(t,e){var n=Gt((function(e){return Zt(t,e)}),e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),It(r)){var o=te(t,r);t.selection.select(o)}else t.selection.select(r)},re=function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))},oe=function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}},ie=function(t,e){var n=Qt(t);if(Jt((function(e){return Zt(t,e)}),e,n),re(t,n),It(n.parentNode)){var r=n.parentNode;te(t,r),t.selection.select(n.parentNode)}else t.selection.select(n),pt(t,e,n)},ae=function(t,n){var r=n.src;return e(e({},n),{src:yt(t,r)?r:""})},ue=function(t,n){var r=Qt(t);if(r){var o=qt((function(e){return Zt(t,e)}),r),i=e(e({},o),n),a=ae(t,i);i.src?ie(t,a):oe(t,r)}else n.src&&ne(t,e(e({},Ut()),n))},ce=function(t,e){var n=u(t)&&u(e);return n?le(t,e):e},se=function(t){return function(){for(var e=[],n=0;n0},de=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),me=tinymce.util.Tools.resolve("tinymce.util.Tools"),he=function(t){return a(t.value)?t.value:""},ge=function(t){return a(t.text)?t.text:a(t.title)?t.title:""},pe=function(t,e){var n=[];return me.each(t,(function(t){var r=ge(t);if(void 0!==t.menu){var o=pe(t.menu,e);n.push({text:r,items:o})}else{var i=e(t);n.push({text:r,value:i})}})),n},ve=function(t){return void 0===t&&(t=he),function(e){return e?k.from(e).map((function(e){return pe(e,t)})):k.none()}},be=function(t){return ve(he)(t)},ye=function(t){return A(t,"items")},xe=function(t,e){return P(t,(function(t){return ye(t)?xe(t.items,e):t.value===e?k.some(t):k.none()}))},we=function(t,e){return t.bind((function(t){return xe(t,e)}))},Ce={sanitizer:ve,sanitize:be,findEntry:we},Se=function(t){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},ke={makeTab:Se},ze=function(t){var e=Ce.sanitizer((function(e){return t.convertURL(e.value||e.url,"src")})),n=new X((function(n){gt(t,(function(t){n(e(t).map((function(t){return V([[{text:"None",value:""}],t])})))}))})),r=Ce.sanitize(et(t)),o=Z(t),i=Q(t),u=at(t),c=ut(t),s=ee(t),l=nt(t),f=rt(t),d=J(t),m=ot(t),h=ct(t),g=st(t),p=k.some(tt(t)).filter((function(t){return a(t)&&t.length>0}));return n.then((function(t){return{image:s,imageList:t,classList:r,hasAdvTab:o,hasUploadTab:i,hasUploadUrl:u,hasUploadHandler:c,hasDescription:l,hasImageTitle:f,hasDimensions:d,hasImageCaption:m,prependURL:p,hasAccessibilityOptions:h,automaticUploads:g}}))},Oe=function(t){var n={name:"src",type:"urlinput",filetype:"image",label:"Source"},r=t.imageList.map((function(t){return{name:"images",type:"listbox",label:"Image list",items:t}})),o={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},i={name:"title",type:"input",label:"Image title"},a={name:"dimensions",type:"sizeinput"},u={type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]},c=t.classList.map((function(t){return{name:"classes",type:"listbox",label:"Class",items:t}})),s={type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]},l=function(t){return t?{type:"grid",columns:2}:{type:"panel"}};return V([[n],r.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[u]:[],t.hasDescription?[o]:[],t.hasImageTitle?[i]:[],t.hasDimensions?[a]:[],[e(e({},l(t.classList.isSome()&&t.hasImageCaption)),{items:V([c.toArray(),t.hasImageCaption?[s]:[]])})]])},Me=function(t){return{title:"General",name:"general",items:Oe(t)}},_e={makeTab:Me,makeItems:Oe},Te=function(t){var e=[{type:"dropzone",name:"fileinput"}];return{title:"Upload",name:"upload",items:e}},Ee={makeTab:Te},Ae=function(t){return{prevImage:Ce.findEntry(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}},He=function(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t.class,caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}},De=function(t,e){return{src:t.src.value,alt:0===t.alt.length&&e?null:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,class:t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}},Ve=function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?k.none():t.prependURL.bind((function(t){return e.substring(0,t.length)!==t?k.some(t+e):k.none()}))},Be=function(t,e){var n=e.getData();Ve(t,n.src.value).each((function(t){e.setData({src:{value:t,meta:n.src.meta}})}))},Re=function(t,e,n){t.hasDescription&&a(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&a(n.title)&&(e.title=n.title),t.hasDimensions&&(a(n.width)&&(e.dimensions.width=n.width),a(n.height)&&(e.dimensions.height=n.height)),a(n.class)&&Ce.findEntry(t.classList,n.class).each((function(t){e.classes=t.value})),t.hasImageCaption&&l(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(a(n.style)&&(e.style=n.style),a(n.vspace)&&(e.vspace=n.vspace),a(n.border)&&(e.border=n.border),a(n.hspace)&&(e.hspace=n.hspace),a(n.borderstyle)&&(e.borderstyle=n.borderstyle))},Pe=function(t,e){var n=e.getData(),r=n.src.meta;if(void 0!==r){var o=le({},n);Re(t,o,r),e.setData(o)}},Le=function(t,e,n,r){var o=r.getData(),i=o.src.value,a=o.src.meta||{};a.width||a.height||!e.hasDimensions||(fe(i)?t.imageSize(i).then((function(t){n.open&&r.setData({dimensions:t})})).catch((function(t){return console.error(t)})):r.setData({dimensions:{width:"",height:""}}))},Ie=function(t,e,n){var r=n.getData(),o=Ce.findEntry(t.imageList,r.src.value);e.prevImage=o,n.setData({images:o.map((function(t){return t.value})).getOr("")})},Fe=function(t,e,n,r){Be(e,r),Pe(e,r),Le(t,e,n,r),Ie(e,n,r)},Ne=function(t,e,n,r){var o=r.getData(),i=Ce.findEntry(e.imageList,o.images);i.each((function(t){var e=""===o.alt||n.prevImage.map((function(t){return t.text===o.alt})).getOr(!1);e?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})})),n.prevImage=i,Fe(t,e,n,r)},je=function(t){var e=t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"];return e?dt(String(t["margin-top"])):""},Ue=function(t){var e=t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"];return e?dt(String(t["margin-right"])):""},We=function(t){return t["border-width"]?dt(String(t["border-width"])):""},Ge=function(t){return t["border-style"]?String(t["border-style"]):""},qe=function(t,e,n){return e(t(e(n)))},$e=function(t,e,n){var r=ht(t(n.style)),o=le({},n);return o.vspace=je(r),o.hspace=Ue(r),o.border=We(r),o.borderstyle=Ge(r),o.style=qe(t,e,r),o},Xe=function(t,e){var n=e.getData(),r=$e(t.parseStyle,t.serializeStyle,n);e.setData(r)},Ke=function(t,e,n){var r=le(He(e.image),n.getData()),o=Wt(t.normalizeCss,De(r,!1));n.setData({style:o})},Ye=function(t,e,n,r){var o=r.getData();r.block("Uploading image"),R(o.fileinput).fold((function(){r.unblock()}),(function(o){var i=URL.createObjectURL(o),a=function(){r.unblock(),URL.revokeObjectURL(i)},u=function(o){r.setData({src:{value:o,meta:{}}}),r.showTab("general"),Fe(t,e,n,r)};vt(o).then((function(n){var c=t.createBlobCache(o,i,n);e.automaticUploads?t.uploadImage(c).then((function(t){u(t.url),a()})).catch((function(e){a(),t.alertErr(e)})):(t.addToBlobCache(c),u(c.blobUri()),r.unblock())}))}))},Je=function(t,e,n){return function(r,o){"src"===o.name?Fe(t,e,n,r):"images"===o.name?Ne(t,e,n,r):"alt"===o.name?n.prevAlt=r.getData().alt:"style"===o.name?Xe(t,r):"vspace"===o.name||"hspace"===o.name||"border"===o.name||"borderstyle"===o.name?Ke(t,e,r):"fileinput"===o.name?Ye(t,e,n,r):"isDecorative"===o.name&&(r.getData().isDecorative?r.disable("alt"):r.enable("alt"))}},Ze=function(t){return function(){t.open=!1}},Qe=function(t){if(t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler){var e={type:"tabpanel",tabs:V([[_e.makeTab(t)],t.hasAdvTab?[ke.makeTab(t)]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[Ee.makeTab(t)]:[]])};return e}var n={type:"panel",items:_e.makeItems(t)};return n},tn=function(t){return function(e){var n=Ae(e);return{title:"Insert/Edit Image",size:"normal",body:Qe(e),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:He(e.image),onSubmit:t.onSubmit(e),onChange:Je(t,e,n),onClose:Ze(n)}}},en=function(t){return function(e){return function(n){var r=le(He(e.image),n.getData());t.execCommand("mceUpdateImage",!1,De(r,e.hasAccessibilityOptions)),t.editorUpload.uploadImagesAuto(),n.close()}}},nn=function(t){return function(e){return yt(t,e)?ft(t.documentBaseURI.toAbsolute(e)).then((function(t){return{width:String(t.width),height:String(t.height)}})):X.resolve({width:"",height:""})}},rn=function(t){return function(e,n,r){return t.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:r.split(",")[1]})}},on=function(t){return function(e){t.editorUpload.blobCache.add(e)}},an=function(t){return function(e){t.windowManager.alert(e)}},un=function(t){return function(e){return Zt(t,e)}},cn=function(t){return function(e){return t.dom.parseStyle(e)}},sn=function(t){return function(e,n){return t.dom.serializeStyle(e,n)}},ln=function(t){return function(e){return de(t).upload([e],!1).then((function(t){return 0===t.length?X.reject("Failed to upload image"):!1===t[0].status?X.reject(t[0].error.message):t[0]}))}},fn=function(t){var e={onSubmit:en(t),imageSize:nn(t),addToBlobCache:on(t),createBlobCache:rn(t),alertErr:an(t),normalizeCss:un(t),parseStyle:cn(t),serializeStyle:sn(t),uploadImage:ln(t)},n=function(){ze(t).then(tn(e)).then(t.windowManager.open)};return{open:n}},dn=function(t){t.addCommand("mceImage",fn(t).open),t.addCommand("mceUpdateImage",(function(e,n){t.undoManager.transact((function(){return ue(t,n)}))}))},mn=function(t){var e=t.attr("class");return e&&/\bimage\b/.test(e)},hn=function(t){return function(e){var n=e.length,r=function(e){e.attr("contenteditable",t?"true":null)};while(n--){var o=e[n];mn(o)&&(o.attr("contenteditable",t?"false":null),me.each(o.getAll("figcaption"),r))}}},gn=function(t){t.on("PreInit",(function(){t.parser.addNodeFilter("figure",hn(!0)),t.serializer.addNodeFilter("figure",hn(!1))}))},pn=function(t){t.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:fn(t).open,onSetup:function(e){return e.setActive(d(Qt(t))),t.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),t.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:fn(t).open}),t.ui.registry.addContextMenu("image",{update:function(t){return It(t)||Ft(t)&&!bt(t)?["image"]:[]}})};function vn(){t.add("image",(function(t){gn(t),pn(t),dn(t)}))}vn()})()},"4b7e":function(t,e,n){n("934a")},"521b":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r=function(){return"undefined"!==typeof window?window:t},o=function(){var t=r();return t&&t.tinymce?t.tinymce:null}}).call(this,n("2409"))},"5c38":function(t,e){tinymce.IconManager.add("default",{icons:{"accessibility-check":'',"action-next":'',"action-prev":'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-style":'',"border-width":'',brightness:'',browse:'',cancel:'',"cell-background-color":'',"cell-border-color":'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',"cut-column":'',"cut-row":'',cut:'',"document-properties":'',drag:'',"duplicate-column":'',"duplicate-row":'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',export:'',fill:'',"flip-horizontally":'',"flip-vertically":'',"format-painter":'',format:'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',language:'',"line-height":'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"page-break":'',paragraph:'',"paste-column-after":'',"paste-column-before":'',"paste-row-after":'',"paste-row-before":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-caption":'',"table-cell-classes":'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-classes":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-numbering-rtl":'',"table-row-numbering":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',template:'',"temporary-placeholder":'',"text-color":'',toc:'',translate:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',"vertical-align":'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}})},"5d95":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},n=function(t,e){return-1!==t.indexOf(e)},r=function(t,n){return e(t,n,0)},o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(){return/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g},a=new RegExp("^"+i().source+"$","i"),u=function(t){return t.getParam("autolink_pattern",a)},c=function(t){return t.getParam("default_link_target",!1)},s=function(t){return t.getParam("link_default_protocol","http","string")},l=function(t){return/^[(\[{ \u00a0]$/.test(t)},f=function(t){return 3===t.nodeType},d=function(t){return 1===t.nodeType},m=function(t){return w(t,-1)},h=function(t){return w(t,0)},g=function(t){return w(t,-1)},p=function(t,e){if(e<0&&(e=0),f(t)){var n=t.data.length;e>n&&(e=n)}return e},v=function(t,e,n){!d(e)||e.hasChildNodes()?t.setStart(e,p(e,n)):t.setStartBefore(e)},b=function(t,e,n){!d(e)||e.hasChildNodes()?t.setEnd(e,p(e,n)):t.setEndAfter(e)},y=function(t){return/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(t)},x=function(t){return/[?!,.;:]/.test(t)},w=function(t,e){var o,i,a,d,m,h,g,p=u(t),w=c(t);if(null===t.dom.getParent(t.selection.getNode(),"a[href]")){var C=t.selection.getRng().cloneRange();if(C.startOffset<5){if(m=C.endContainer.previousSibling,!m){if(!C.endContainer.firstChild||!C.endContainer.firstChild.nextSibling)return;m=C.endContainer.firstChild.nextSibling}if(h=m.length,v(C,m,h),b(C,m,h),C.endOffset<5)return;o=C.endOffset,i=m}else{if(i=C.endContainer,!f(i)&&i.firstChild){while(!f(i)&&i.firstChild)i=i.firstChild;f(i)&&(v(C,i,0),b(C,i,i.nodeValue.length))}o=1===C.endOffset?2:C.endOffset-1-e}var S=o;do{v(C,i,o>=2?o-2:0),b(C,i,o>=1?o-1:0),o-=1,g=C.toString()}while(!l(g)&&o-2>=0);l(C.toString())?(v(C,i,o),b(C,i,S),o+=1):0===C.startOffset?(v(C,i,0),b(C,i,S)):(v(C,i,o),b(C,i,S)),d=C.toString(),x(d.charAt(d.length-1))&&b(C,i,S-1),d=C.toString().trim();var k=d.match(p),z=s(t);if(k){var O=k[0];r(O,"www.")?O=z+"://"+O:n(O,"@")&&!y(O)&&(O="mailto:"+O),a=t.selection.getBookmark(),t.selection.setRng(C),t.execCommand("createlink",!1,O),!1!==w&&t.dom.setAttrib(t.selection.getNode(),"target",w),t.selection.moveToBookmark(a),t.nodeChanged()}}},C=function(t){var e;t.on("keydown",(function(e){if(13===e.keyCode)return g(t)})),o.browser.isIE()?t.on("focus",(function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}})):(t.on("keypress",(function(e){if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return m(t)})),t.on("keyup",(function(e){if(32===e.keyCode)return h(t)})))};function S(){t.add("autolink",(function(t){C(t)}))}S()})()},6037:function(t,e,n){n("1ed3")},6872:function(t,e,n){!function(e,n){t.exports=n()}("undefined"!=typeof self&&self,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=40)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(28)("wks"),o=n(29),i=n(0).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(0),o=n(2),i=n(11),a=n(5),u=n(9),c=function(t,e,n){var s,l,f,d=t&c.F,m=t&c.G,h=t&c.S,g=t&c.P,p=t&c.B,v=t&c.W,b=m?o:o[e]||(o[e]={}),y=b.prototype,x=m?r:h?r[e]:(r[e]||{}).prototype;for(s in m&&(n=e),n)(l=!d&&x&&void 0!==x[s])&&u(b,s)||(f=l?x[s]:n[s],b[s]=m&&"function"!=typeof x[s]?n[s]:p&&l?i(f,r):v&&x[s]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):g&&"function"==typeof f?i(Function.call,f):f,g&&((b.virtual||(b.virtual={}))[s]=f,t&c.R&&y&&!y[s]&&a(y,s,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(13),o=n(31);t.exports=n(6)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(14)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(12);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(3),o=n(50),i=n(51),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(46),o=n(30);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(26),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(28)("keys"),o=n(29);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(13).f,o=n(9),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(12);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(43)),o=l(n(32)),i=l(n(79)),a=l(n(86)),u=l(n(87)),c=l(n(88)),s=l(n(89));function l(t){return t&&t.__esModule?t:{default:t}}var f="UN_READY",d="PENDING",m="READY";e.default={name:"VueUeditorWrap",data:function(){return{status:f,defaultConfig:{UEDITOR_HOME_URL:void 0!==t&&t.env.BASE_URL?t.env.BASE_URL+"UEditor/":"/static/UEditor/"}}},props:{mode:{type:String,default:"observer",validator:function(t){return-1!==["observer","listener"].indexOf(t)}},value:{type:String,default:""},config:{type:Object,default:function(){return{}}},init:{type:Function,default:function(){}},destroy:{type:Boolean,default:!0},name:{type:String,default:""},observerDebounceTime:{type:Number,default:50,validator:function(t){return t>=20}},observerOptions:{type:Object,default:function(){return{attributes:!0,attributeFilter:["src","style","type","name"],characterData:!0,childList:!0,subtree:!0}}},forceInit:{type:Boolean,default:!1},editorId:{type:String},editorDependencies:Array,editorDependenciesChecker:Function},computed:{mixedConfig:function(){return(0,i.default)({},this.defaultConfig,this.config)}},methods:{registerButton:function(t){var e=t.name,n=t.icon,r=t.tip,o=t.handler,i=t.index,a=t.UE,u=void 0===a?window.UE:a;u.registerUI(e,(function(t,e){t.registerCommand(e,{execCommand:function(){o(t,e)}});var i=new u.ui.Button({name:e,title:r,cssRules:"background-image: url("+n+") !important;background-size: cover;",onclick:function(){t.execCommand(e)}});return t.addListener("selectionchange",(function(){var n=t.queryCommandState(e);-1===n?(i.setDisabled(!0),i.setChecked(!1)):(i.setDisabled(!1),i.setChecked(n))})),i}),i,this.id)},_initEditor:function(){var t=this;this.$refs.container.id=this.id=this.editorId||"editor_"+(0,s.default)(8),this.init(),this.$emit("before-init",this.id,this.mixedConfig),this.$emit("beforeInit",this.id,this.mixedConfig),this.editor=window.UE.getEditor(this.id,this.mixedConfig),this.editor.addListener("ready",(function(){t.status===m?t.editor.setContent(t.value):(t.status=m,t.$emit("ready",t.editor),t.value&&t.editor.setContent(t.value)),"observer"===t.mode&&window.MutationObserver?t._observerChangeListener():t._normalChangeListener()}))},_loadScript:function(t){return new o.default((function(e,n){if(window.$loadEventBus.on(t,e),!1===window.$loadEventBus.listeners[t].requested){window.$loadEventBus.listeners[t].requested=!0;var r=document.createElement("script");r.src=t,r.onload=function(){window.$loadEventBus.emit(t)},r.onerror=n,document.getElementsByTagName("head")[0].appendChild(r)}}))},_loadCss:function(t){return new o.default((function(e,n){if(window.$loadEventBus.on(t,e),!1===window.$loadEventBus.listeners[t].requested){window.$loadEventBus.listeners[t].requested=!0;var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=t,r.onload=function(){window.$loadEventBus.emit(t)},r.onerror=n,document.getElementsByTagName("head")[0].appendChild(r)}}))},_loadEditorDependencies:function(){var t=this;window.$loadEventBus||(window.$loadEventBus=new a.default);var e=["ueditor.config.js","ueditor.all.min.js"];return new o.default((function(n,i){if(t.editorDependencies&&t.editorDependenciesChecker&&t.editorDependenciesChecker())n();else if(!t.editorDependencies&&window.UE&&window.UE.getEditor&&window.UEDITOR_CONFIG&&0!==(0,r.default)(window.UEDITOR_CONFIG).length)n();else{var a=(t.editorDependencies||e).reduce((function(e,n){return/^((https?:)?\/\/)?[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+\//.test(n)||(n=(t.mixedConfig.UEDITOR_HOME_URL||"")+n),".js"===n.slice(-3)?e.jsLinks.push(n):".css"===n.slice(-4)&&e.cssLinks.push(n),e}),{jsLinks:[],cssLinks:[]}),u=a.jsLinks,s=a.cssLinks;o.default.all([o.default.all(s.map((function(e){return t._loadCss(e)}))),(0,c.default)(u.map((function(e){return function(){return t._loadScript(e)}})))]).then((function(){return n()})).catch(i)}}))},_contentChangeHandler:function(){this.innerValue=this.editor.getContent(),this.$emit("input",this.innerValue)},_normalChangeListener:function(){this.editor.addListener("contentChange",this._contentChangeHandler)},_observerChangeListener:function(){var t=this;this.observer=new MutationObserver((0,u.default)((function(){t.editor.document.getElementById("baidu_pastebin")||(t.innerValue=t.editor.getContent(),t.$emit("input",t.innerValue))}),this.observerDebounceTime)),this.observer.observe(this.editor.body,this.observerOptions)}},deactivated:function(){this.editor&&this.editor.removeListener("contentChange",this._contentChangeHandler),this.observer&&this.observer.disconnect()},beforeDestroy:function(){this.destroy&&this.editor&&this.editor.destroy&&this.editor.destroy(),this.observer&&this.observer.disconnect&&this.observer.disconnect()},watch:{value:{handler:function(t){var e=this;this.status===f?(this.status=d,(this.forceInit||"undefined"!=typeof window)&&this._loadEditorDependencies().then((function(){e.$refs.container?e._initEditor():e.$nextTick((function(){return e._initEditor()}))})).catch((function(){throw new Error("[vue-ueditor-wrap] UEditor 资源加载失败!请检查资源是否存在,UEDITOR_HOME_URL 是否配置正确!")}))):this.status===m&&(t===this.innerValue||this.editor.setContent(t||""))},immediate:!0}}}}).call(e,n(42))},function(t,e,n){var r=n(10);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(19),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(2),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(21)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports={default:n(52),__esModule:!0}},function(t,e,n){"use strict";var r=n(21),o=n(4),i=n(56),a=n(5),u=n(8),c=n(57),s=n(23),l=n(60),f=n(1)("iterator"),d=!([].keys&&"next"in[].keys()),m=function(){return this};t.exports=function(t,e,n,h,g,p,v){c(n,e,h);var b,y,x,w=function(t){if(!d&&t in z)return z[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",S="values"==g,k=!1,z=t.prototype,O=z[f]||z["@@iterator"]||g&&z[g],M=O||w(g),_=g?S?w("entries"):M:void 0,T="Array"==e&&z.entries||O;if(T&&(x=l(T.call(new t)))!==Object.prototype&&x.next&&(s(x,C,!0),r||"function"==typeof x[f]||a(x,f,m)),S&&O&&"values"!==O.name&&(k=!0,M=function(){return O.call(this)}),r&&!v||!d&&!k&&z[f]||a(z,f,M),u[e]=M,u[C]=m,g)if(b={values:S?M:w("values"),keys:p?M:w("keys"),entries:_},v)for(y in b)y in z||i(z,y,b[y]);else o(o.P+o.F*(d||k),e,b);return b}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(3),o=n(12),i=n(1)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(11),u=n(71),c=n(34),s=n(22),l=n(0),f=l.process,d=l.setImmediate,m=l.clearImmediate,h=l.MessageChannel,g=l.Dispatch,p=0,v={},b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){b.call(t.data)};d&&m||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++p]=function(){u("function"==typeof t?t:Function(t),e)},r(p),p},m=function(t){delete v[t]},"process"==n(10)(f)?r=function(t){f.nextTick(a(b,t,1))}:g&&g.now?r=function(t){g.now(a(b,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=y,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",y,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:d,clear:m}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(3),o=n(7),i=n(24);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(25),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);var a=n(90),u=n(41)(o.a,a.a,!1,null,null,null);u.options.__file="src/components/vue-ueditor-wrap.vue",e.default=u.exports},function(t,e){t.exports=function(t,e,n,r,o,i){var a,u=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(a=t,u=t.default);var s,l="function"==typeof u?u.options:u;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o),i?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=s):r&&(s=r),s){var f=l.functional,d=f?l.render:l.beforeCreate;f?(l._injectStyles=s,l.render=function(t,e){return s.call(e),d(t,e)}):l.beforeCreate=d?[].concat(d,s):[s]}return{esModule:a,exports:u,options:l}}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&m())}function m(){if(!l){var t=u(d);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f1)for(var n=1;nc;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(18),o=n(27),i=n(48);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),l=i(a,s);if(t&&n!=n){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(19),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(4),o=n(2),i=n(14);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){t.exports=!n(6)&&!n(14)((function(){return 7!=Object.defineProperty(n(22)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){n(53),n(54),n(61),n(65),n(77),n(78),t.exports=n(2).Promise},function(t,e){},function(t,e,n){"use strict";var r=n(55)(!0);n(33)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(19),o=n(16);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){t.exports=n(5)},function(t,e,n){"use strict";var r=n(58),o=n(31),i=n(23),a={};n(5)(a,n(1)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(3),o=n(59),i=n(30),a=n(20)("IE_PROTO"),u=function(){},c=function(){var t,e=n(22)("iframe"),r=i.length;for(e.style.display="none",n(34).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("