').append(n,i,r),a=e('
').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(t).addClass(this.options.style);this.$element.wrap(a),e.extend(this,{$toggle:this.$element.parent(),$toggleOn:n,$toggleOff:i,$toggleGroup:o}),this.$toggle.append(o);var s=this.options.width||Math.max(n.outerWidth(),i.outerWidth())+r.outerWidth()/2,c=this.options.height||Math.max(n.outerHeight(),i.outerHeight());n.addClass("toggle-on"),i.addClass("toggle-off"),this.$toggle.css({width:s,height:c}),this.options.height&&(n.css("line-height",n.height()+"px"),i.css("line-height",i.height()+"px")),this.update(!0),this.trigger(!0)},n.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},n.prototype.on=function(e){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),e||this.trigger()},n.prototype.off=function(e){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),e||this.trigger()},n.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},n.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},n.prototype.update=function(e){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(e):this.off(e)},n.prototype.trigger=function(t){this.$element.off("change.bs.toggle"),t||this.$element.change(),this.$element.on("change.bs.toggle",e.proxy(function(){this.update()},this))},n.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var i=e.fn.bootstrapToggle;e.fn.bootstrapToggle=t,e.fn.bootstrapToggle.Constructor=n,e.fn.toggle.noConflict=function(){return e.fn.bootstrapToggle=i,this},e(function(){e("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),e(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(t){e(this).find("input[type=checkbox]").bootstrapToggle("toggle"),t.preventDefault()})}(e)}).call(t,n("7t+N"))},"+uAN":function(e,t){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,o=0;o
");r.addClass("btn btn-sm btn-primary"),r.css({margin:"2px",height:"30px"}),r.attr("data-group",i),r.html(i),e(n).append(r)})},t.prototype.removeTagsFromFilter=function(){var t=e(this.selectors.classes.tagsHolder);e(t).html("")},t.prototype.removeImageByDataUniqueId=function(t){var n=this.shuffler.shuffle.items,i=null,r=null;e.each(n,function(n,o){var a=o.element;e(a).attr("data-unique-id")==t&&(i=o,r=a)}),this.shuffler.shuffle.remove([r])},t.prototype.switchToGroupAllIfGroupIsRemoved=function(){var t=this.shuffler.shuffle.group,n=e(this.selectors.classes.tagsHolder),i=e(n).find('[data-group^="'+t+'"]');r.default.doElementsExists(i)||this.shuffler.shuffle.filter("all")},t}();t.default=o}).call(t,n("7t+N"))},"/7en":function(e,t,n){var i,r;!function(o,a){i=a,void 0!==(r="function"==typeof i?i.call(t,n,t,e):i)&&(e.exports=r)}("undefined"!=typeof window&&window,function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return-1==i.indexOf(t)&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return-1!=i&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],r=0;r=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n("mypn"),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},"1Jdk":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("d4tr"),r=(n.n(i),n("4ptd"),n("qOf7")),o=(n.n(r),n("ZN5V")),a=(n.n(o),n("meHX")),s=(n.n(a),n("DdNU")),c=(n.n(s),n("+xZA")),l=(n.n(c),n("AeGE")),u=(n.n(l),n("ug5x")),d=(n.n(u),n("3qhd")),h=(n.n(d),n("vN25")),f=(n.n(h),n("Jhzl")),p=(n.n(f),n("QKz6")),m=(n.n(p),n("vGyf")),g=(n.n(m),n("asBb")),v=(n.n(g),n("aiVA")),b=(n.n(v),n("eR3q")),y=(n.n(b),n("vdcv")),x=(n.n(y),n("fAlp"));n.n(x)},"1Mm0":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("Xn7o"),r=n("NZGl"),o=n("++4R"),a=function(){function e(){}return e.getDataForWidgetId=function(e){switch(e){case o.default.widgetsIds.addContactCardWidget:return o.default.addContactCardWidget();case o.default.widgetsIds.addNote:return o.default.addNoteWidget();case o.default.widgetsIds.myFilesNewFolderWidget:return o.default.myFilesNewFolder();case o.default.widgetsIds.myFilesUploadFilesWidget:return o.default.myFilesUpload();case o.default.widgetsIds.myImagesNewFolderWidget:return o.default.myImagesNewFolder();case o.default.widgetsIds.myImagesUploadFilesWidget:return o.default.myImagesUpload();case o.default.widgetsIds.pendingIssuesCreateIssue:return o.default.pendingIssuesCreateIssue();default:return i.default.isDev()&&r.default.info("There might be an ID which was not handled upon rewriting to TS",[{widgetId:e}]),null}},e}();t.default=a},"1SaV":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("7t+N"),r=n("FWuv"),o=n("mG0f"),a=function(){function e(){}return e.init=function(){var e=i(".masonry");if(o.default.doElementsExists(e))try{new r.default(".masonry",{itemSelector:".masonry-item",columnWidth:".masonry-sizer",percentPosition:!0})}catch(e){}},e}();t.default=a},"1hos":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i=n("mG0f"),r=n("ldw6"),o=function(){function t(){}return t.isContentEditable=function(t,n){void 0===n&&(n=null);var r=!0,o=null;return null!==n&&(o=i.default.findChild(t,n),t=o),void 0!==e(t).attr("contentEditable")&&"true"==e(t).attr("contentEditable")||(r=!1),r},t.contentEditable=function(n,r,o,a,s,c){void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===c&&(c=!1);var l=null;switch(r){case t.actions.set:l="true";break;case t.actions.unset:l="false";break;default:throw{message:"This action for toggling content editable is not defined",action:r}}var u=null,d=null;if(null!==o&&(u=i.default.findChild(n,o)),null!==a){var h=[];e.each(u,function(t,n){0===e(n).find(a).length&&h.push(n)}),u=h}null!==s&&(d=i.default.findChild(u,s)),null===u&&"false"!==e(n).attr(t.dataAttributes.contentEditable)&&e(n).attr({contentEditable:l}),null!==u&&null==d&&e.each(u,function(n,i){"false"!==e(i).attr(t.dataAttributes.contentEditable)&&e(i).attr({contentEditable:l})}),null===u||null===d||c?e.each(d,function(n,i){"false"!==e(i).attr(t.dataAttributes.contentEditable)&&e(i).attr({contentEditable:l})}):(e.each(u,function(n,i){"false"!==e(i).attr(t.dataAttributes.contentEditable)&&e(i).attr({contentEditable:l})}),e.each(d,function(n,i){"false"!==e(i).attr(t.dataAttributes.contentEditable)&&e(i).attr({contentEditable:l})}))},t.isCheckbox=function(t,n){if(void 0===n&&(n=!0),"checkbox"!==e(t).attr("type")){if(n)throw{message:"This element is not a checkbox",element:t};return!1}return!0},t.setChecked=function(n){t.isCheckbox(n)&&e(n).attr("checked","checked")},t.unsetChecked=function(n){t.isCheckbox(n)&&e(n).removeAttr("checked")},t.isChecked=function(n){if(t.isCheckbox(n)){var i=e(n).attr("checked"),o=["true",!0,"checked"];return r.default.inArray(i,o)}},t.isDisabled=function(t){return e(t).hasClass("disabled")},t.setDisabled=function(t){e(t).addClass("disabled")},t.unsetDisabled=function(t){e(t).removeClass("disabled")},t.setDisplayNoneClass=function(e){e.addClass("d-none")},t.unsetDisplayNoneClass=function(e){e.removeClass("d-none")},t.hasDisplayNoneClass=function(e){return e.hasClass("d-none")},t.setErrorClass=function(t){e(t).addClass("has-error")},t.unsetErrorClass=function(t){e(t).removeClass("has-error")},t.actions={set:"set",unset:"unset"},t.dataAttributes={contentEditable:"data-content-editable"},t}();t.default=o}).call(t,n("7t+N"))},"2LoC":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.isEmptyString=function(e){return""==e||null==e||"null"==e||!1||void 0===e},e.areTheSame=function(e,t){return e===t},e}();t.default=i},"2Mnb":function(e,t,n){"use strict";/**
+ * jscolor - JavaScript Color Picker
+ *
+ * @link http://jscolor.com
+ * @license For open source use: GPLv3
+ * For commercial use: JSColor Commercial License
+ * @author Jan Odvarko - East Desire
+ * @version 2.3.3
+ *
+ * See usage examples at http://jscolor.com/examples/
+ */
+var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window.jscolor||(window.jscolor=function(){var e={initialized:!1,instances:[],triggerQueue:[],register:function(){document.addEventListener("DOMContentLoaded",e.init,!1),document.addEventListener("mousedown",e.onDocumentMouseDown,!1),document.addEventListener("keyup",e.onDocumentKeyUp,!1),window.addEventListener("resize",e.onWindowResize,!1)},init:function(){if(!e.initialized)for(e.pub.install(),e.initialized=!0;e.triggerQueue.length;){var t=e.triggerQueue.shift();e.triggerGlobal(t)}},installBySelector:function(t,n){if(!(n=n?e.node(n):document))throw new Error("Missing root node");for(var i=n.querySelectorAll(t),r=new RegExp("(^|\\s)("+e.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),o=0;o-1},isButtonEmpty:function(t){switch(e.nodeName(t)){case"input":return!t.value||""===t.value.trim();case"button":return""===t.textContent.trim()}return null},isPassiveEventSupported:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e}(),isColorAttrSupported:function(){var e=document.createElement("input");return!(!e.setAttribute||(e.setAttribute("type","color"),"color"!=e.type.toLowerCase()))}(),dataProp:"_data_jscolor",setData:function(){var t=arguments[0];if(3===arguments.length){var n=t.hasOwnProperty(e.dataProp)?t[e.dataProp]:t[e.dataProp]={},r=arguments[1],o=arguments[2];return n[r]=o,!0}if(2===arguments.length&&"object"===i(arguments[1])){var n=t.hasOwnProperty(e.dataProp)?t[e.dataProp]:t[e.dataProp]={},a=arguments[1];for(var r in a)a.hasOwnProperty(r)&&(n[r]=a[r]);return!0}throw new Error("Invalid arguments")},removeData:function(){var t=arguments[0];if(!t.hasOwnProperty(e.dataProp))return!0;for(var n=1;n=3&&(i=s[0].match(c))&&(r=s[1].match(c))&&(o=s[2].match(c)))return n.format="rgb",n.rgba=[parseFloat(i[1])||0,parseFloat(r[1])||0,parseFloat(o[1])||0,null],s.length>=4&&(a=s[3].match(c))&&(n.format="rgba",n.rgba[3]=parseFloat(a[1])||0),n}return!1},scaleCanvasForHighDPR:function(e){var t=window.devicePixelRatio||1;e.width*=t,e.height*=t,e.getContext("2d").scale(t,t)},genColorPreviewCanvas:function(t,n,i,r){var o=Math.round(e.pub.previewSeparator.length),a=e.pub.chessboardSize,s=e.pub.chessboardColor1,c=e.pub.chessboardColor2,l=i||2*a,u=2*a,d=e.createEl("canvas"),h=d.getContext("2d");d.width=l,d.height=u,r&&e.scaleCanvasForHighDPR(d),h.fillStyle=s,h.fillRect(0,0,l,u),h.fillStyle=c;for(var f=0;fc[r]&&-n[r]+t[r]+s[r]/2>c[r]/2&&t[r]+s[r]-l[r]>=0?t[r]+s[r]-l[r]:t[r],-n[o]+t[o]+s[o]+l[o]-u+u*a>c[o]?-n[o]+t[o]+s[o]/2>c[o]/2&&t[o]+s[o]-u-u*a>=0?t[o]+s[o]-u-u*a:t[o]+s[o]-u+u*a:t[o]+s[o]-u+u*a>=0?t[o]+s[o]-u+u*a:t[o]+s[o]-u-u*a];else var d=[t[r],t[o]+s[o]-u+u*a];var h=d[r],f=d[o],p=i.fixed?"fixed":"absolute",m=(d[0]+l[0]>t[0]||d[0]2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(t){var n=t.target||t.srcElement;if(n.jscolor&&n.jscolor instanceof e.pub)n.jscolor.showOnClick&&!n.disabled&&n.jscolor.show();else if(e.getData(n,"gui")){var i=e.getData(n,"control");i&&e.onControlPointerStart(t,n,e.getData(n,"control"),"mouse")}else e.picker&&e.picker.owner&&e.picker.owner.tryHide()},onDocumentKeyUp:function(t){-1!==["Tab","Escape"].indexOf(e.eventKey(t))&&e.picker&&e.picker.owner&&e.picker.owner.tryHide()},onWindowResize:function(t){e.redrawPosition()},onParentScroll:function(t){e.picker&&e.picker.owner&&e.picker.owner.tryHide()},onPickerTouchStart:function(t){var n=t.target||t.srcElement;e.getData(n,"control")&&e.onControlPointerStart(t,n,e.getData(n,"control"),"touch")},triggerCallback:function(e,t){if(e[t]){var n=null;if("string"==typeof e[t])try{n=new Function(e[t])}catch(e){console.error(e)}else n=e[t];n&&n.call(e)}},triggerGlobal:function(t){for(var n=e.getInstances(),i=0;i=0;w-=1){var C=x[w];if(C)if(e.pub.presets.hasOwnProperty(C)){for(var y in e.pub.presets[C])if(e.pub.presets[C].hasOwnProperty(y))try{r(y,e.pub.presets[C][y])}catch(e){console.warn(e)}}else console.warn("Unknown preset: %s",C)}var z=["preset"];for(var y in n)if(n.hasOwnProperty(y)&&-1===z.indexOf(y))try{r(y,n[y])}catch(e){console.warn(e)}if(this.option=function(){if(!arguments.length)throw new Error("No option specified");if(1===arguments.length&&"string"==typeof arguments[0]){try{return o(arguments[0])}catch(e){console.warn(e)}return!1}if(arguments.length>=2&&"string"==typeof arguments[0]){try{if(!r(arguments[0],arguments[1]))return!1}catch(e){return console.warn(e),!1}return this.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"===i(arguments[0])){var e=arguments[0],t=!0;for(var n in e)if(e.hasOwnProperty(n))try{r(n,e[n])||(t=!1)}catch(e){console.warn(e),t=!1}return this.redraw(),this.exposeColor(),t}throw new Error("Invalid arguments")},this.channel=function(e,t){if("string"!=typeof e)throw new Error("Invalid value for channel name: "+e);if(void 0===t)return this.channels.hasOwnProperty(e.toLowerCase())?this.channels[e.toLowerCase()]:(console.warn("Getting unknown channel: "+e),!1);var n=!1;switch(e.toLowerCase()){case"r":n=this.fromRGBA(t,null,null,null);break;case"g":n=this.fromRGBA(null,t,null,null);break;case"b":n=this.fromRGBA(null,null,t,null);break;case"h":n=this.fromHSVA(t,null,null,null);break;case"s":n=this.fromHSVA(null,t,null,null);break;case"v":n=this.fromHSVA(null,null,t,null);break;case"a":n=this.fromHSVA(null,null,null,t);break;default:return console.warn("Setting unknown channel: "+e),!1}return!!n&&(this.redraw(),!0)},this.trigger=function(t){for(var n=e.strList(t),i=0;i127.5},this.hide=function(){d()&&a()},this.show=function(){s()},this.redraw=function(){d()&&s()},this.getFormat=function(){return this._currentFormat},this.hasAlphaChannel=function(){return"auto"===this.alphaChannel?"any"===this.format.toLowerCase()||"rgba"===this.getFormat()||void 0!==this.alpha||void 0!==this.alphaElement:this.alphaChannel},this.processValueInput=function(e){this.fromString(e)||this.exposeColor()},this.processAlphaInput=function(e){this.fromHSVA(null,null,null,parseFloat(e))||this.exposeColor()},this.exposeColor=function(t){if(!(t&e.flags.leaveValue)&&this.valueElement){var n=this.toString();"hex"===this.getFormat()&&(this.uppercase||(n=n.toLowerCase()),this.hash||(n=n.replace(/^#/,""))),this.setValueElementValue(n)}if(!(t&e.flags.leaveAlpha)&&this.alphaElement){var n=Math.round(100*this.channels.a)/100;this.setAlphaElementValue(n)}if(!(t&e.flags.leavePreview)&&this.previewElement){(e.isTextInput(this.previewElement)||e.isButton(this.previewElement)&&!e.isButtonEmpty(this.previewElement))&&this.previewPosition,this.setPreviewElementBg(this.toRGBAString())}d()&&(c(),l(),u())},this.setPreviewElementBg=function(t){if(this.previewElement){var n=null,i=null;(e.isTextInput(this.previewElement)||e.isButton(this.previewElement)&&!e.isButtonEmpty(this.previewElement))&&(n=this.previewPosition,i=this.previewSize);var r=[];if(t){r.push({image:e.genColorPreviewGradient(t,n,i?i-e.pub.previewSeparator.length:null),position:"left top",size:"auto",repeat:n?"repeat-y":"repeat",origin:"padding-box"});var o=e.genColorPreviewCanvas("rgba(0,0,0,0)",n?{left:"right",right:"left"}[n]:null,i,!0);r.push({image:"url('"+o.canvas.toDataURL()+"')",position:(n||"left")+" top",size:o.width+"px "+o.height+"px",repeat:n?"repeat-y":"repeat",origin:"padding-box"})}else r.push({image:"none",position:"left top",size:"auto",repeat:"no-repeat",origin:"padding-box"});for(var a={image:[],position:[],size:[],repeat:[],origin:[]},s=0;s-1){var T=e.parseColorString(_);this._currentFormat=T?T.format:"hex"}else this._currentFormat=this.format.toLowerCase();this.processValueInput(_),void 0!==A&&this.processAlphaInput(A)}};return e.pub.className="jscolor",e.pub.activeClassName="jscolor-active",e.pub.looseJSON=!0,e.pub.presets={},e.pub.presets.default={},e.pub.presets.light={backgroundColor:"rgba(255,255,255,1)",controlBorderColor:"rgba(187,187,187,1)",buttonColor:"rgba(0,0,0,1)"},e.pub.presets.dark={backgroundColor:"rgba(51,51,51,1)",controlBorderColor:"rgba(153,153,153,1)",buttonColor:"rgba(240,240,240,1)"},e.pub.presets.small={width:101,height:101,padding:10,sliderSize:14},e.pub.presets.medium={width:181,height:101,padding:12,sliderSize:16},e.pub.presets.large={width:271,height:151,padding:12,sliderSize:24},e.pub.presets.thin={borderWidth:1,controlBorderWidth:1,pointerBorderWidth:1},e.pub.presets.thick={borderWidth:2,controlBorderWidth:2,pointerBorderWidth:2},e.pub.sliderInnerSpace=3,e.pub.chessboardSize=8,e.pub.chessboardColor1="#666666",e.pub.chessboardColor2="#999999",e.pub.previewSeparator=["rgba(255,255,255,.65)","rgba(128,128,128,.65)"],e.pub.install=function(t){var n=!0;try{e.installBySelector("[data-jscolor]",t)}catch(e){n=!1,console.warn(e)}if(e.pub.lookupClass)try{e.installBySelector("input."+e.pub.lookupClass+", button."+e.pub.lookupClass,t)}catch(e){}return n},e.pub.trigger=function(t){e.initialized?e.triggerGlobal(t):e.triggerQueue.push(t)},e.pub.hide=function(){e.picker&&e.picker.owner&&e.picker.owner.hide()},e.pub.chessboard=function(t){return t||(t="rgba(0,0,0,0)"),e.genColorPreviewCanvas(t).canvas.toDataURL()},e.pub.background=function(t){var n=[];n.push(e.genColorPreviewGradient(t));var i=e.genColorPreviewCanvas();return n.push(["url('"+i.canvas.toDataURL()+"')","left top","repeat"].join(" ")),n.join(", ")},e.pub.options={},e.pub.lookupClass="jscolor",e.pub.init=function(){return console.warn("jscolor.init() is DEPRECATED. Using jscolor.install() instead."+e.docsRef),e.pub.install()},e.pub.installByClassName=function(){return console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.'+e.docsRef),!1},e.register(),e.pub}(),window.JSColor=window.jscolor)},"2YDt":function(e,t,n){var i,r,o;!function(a,s){r=[n("/7en"),n("SdC7")],i=s,void 0!==(o="function"==typeof i?i.apply(t,r):i)&&(e.exports=o)}(window,function(e,t){"use strict";function n(e){for(var t in e)return!1;return null,!0}function i(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var r=document.documentElement.style,o="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[o],c={transform:a,transition:o,transitionDuration:o+"Duration",transitionProperty:o+"Property",transitionDelay:o+"Delay"},l=i.prototype=Object.create(e.prototype);l.constructor=i,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var n in e){t[c[n]||n]=e[n]}},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),i=e[t?"left":"right"],r=e[n?"top":"bottom"],o=parseFloat(i),a=parseFloat(r),s=this.layout.size;-1!=i.indexOf("%")&&(o=o/100*s.width),-1!=r.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},l.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),r=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[r];t[o]=this.getXValue(s),t[a]="";var c=i?"paddingTop":"paddingBottom",l=i?"top":"bottom",u=i?"bottom":"top",d=this.position.y+e[c];t[l]=this.getYValue(d),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var n=this.position.x,i=this.position.y,r=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),r&&!this.isTransitioning)return void this.layoutPosition();var o=e-n,a=t-i,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},l.getTranslate=function(e,t){var n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop");return e=n?e:-e,t=i?t:-t,"translate3d("+e+"px, "+t+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},l._nonTransition=function(e){this.css(e.to),e.isCleaning&&this._removeStyles(e.to);for(var t in e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(e);var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);if(e.from){this.css(e.from);this.element.offsetHeight;null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0};var u="opacity,"+function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}(a);l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:u,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var d={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,i=d[e.propertyName]||e.propertyName;if(delete t.ingProperties[i],n(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[i]),i in t.onEnd){t.onEnd[i].call(this),delete t.onEnd[i]}this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var h={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(h)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){if(!o||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();this.once("transitionEnd",function(){this.removeElem()}),this.hide()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},i})},"3Oml":function(e,t,n){n("Aenb")},"3X6w":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("7t+N"),r=n("HMpe"),o=n("mG0f"),a=function(){function e(){}return e.init=function(){var e=i(".scrollable");o.default.doElementsExists(e)&&e.each(function(e,t){new r.default(t)})},e}();t.default=a},"3qhd":function(e,t){e.exports="/assets/images/sort_desc_disabled.bda51e15.png"},"3va6":function(e,t,n){"use strict";(function(e){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n("Fzyu"),o=n("mG0f"),a=n("TEGQ"),s=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectors={classes:{appendForm:".append-form",removeParent:".remove-parent"}},e.formsUtils=new a.default,e}return i(n,t),n.prototype.init=function(){this.attachFormViewAppendEvent(),this.attachRemoveParentEvent(),this.attachFormElementsOnChangeValidationEvent()},n.prototype.attachFormViewAppendEvent=function(){var t=e(this.selectors.classes.appendForm),n=this;if(o.default.doElementsExists(t)){var i=function(){n.attachRemoveParentEvent()};e(t.on("click",function(){var t=e(this).attr("data-target-selector"),n=e(this).attr("data-form-name");o.default.appendFormView(n,t,i)}))}},n.prototype.attachRemoveParentEvent=function(){var t=e(this.selectors.classes.removeParent);o.default.doElementsExists(t)&&e(t.on("click",function(t){t.preventDefault();var n=e(this).attr("data-removed-selector"),i=e(this);o.default.removeClosestSelectorParentForElement(i,n)}))},n.prototype.attachFormElementsOnChangeValidationEvent=function(){var t=this;e("[data-validate-form-element='true']").on("change",function(n){var i=e(n.currentTarget);t.formsUtils.validateBetweenMinMax(i)})},n}(r.default);t.default=s}).call(t,n("7t+N"))},"437s":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"4XGs":function(e,t){},"4k0j":function(e,t){!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(Prism)},"4ptd":function(e,t,n){"use strict";n("7vH4"),n("CTqx"),n("Xt44"),n("/PFY"),n("hYC6")},"5JpE":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(){}return t.init=function(){e('[data-toggle-popover="true"]').popover()},t}();t.default=n}).call(t,n("7t+N"))},"5eDb":function(e,t,n){!function(){!function(t){"use strict";function n(e){for(var t=[],n=1;nkt.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function r(e){return e[hn]=!0,e}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||wn)-(~e.sourceIndex||wn);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return r(function(t){return t=+t,r(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function s(e){return e&&typeof e.getElementsByTagName!==xn&&e}function c(){}function l(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function h(e,t,n){for(var i=0,r=t.length;i-1&&(r[l]=!(a[l]=d))}}else y=f(y===a?y.splice(g,y.length):y),o?o(null,a,y,c):kn.apply(a,y)})}function m(e){for(var t,n,i,r=e.length,o=kt.relative[e[0].type],a=o||kt.relative[" "],s=o?1:0,c=u(function(e){return e===t},a,!0),h=u(function(e){return An.call(t,e)>-1},a,!0),f=[function(e,n,i){return!o&&(i||n!==Lt)||((t=n).nodeType?c(e,n,i):h(e,n,i))}];s1&&d(f),s>1&&l(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(Hn,"$1"),n,s0,i=e.length>0,o=function(r,o,a,s,c){var l,u,d,h=0,p="0",m=r&&[],g=[],v=Lt,b=r||i&&kt.find.TAG("*",c),y=pn+=null==v?1:Math.random()||.1,x=b.length;for(c&&(Lt=o!==Pt&&o);p!==x&&null!=(l=b[p]);p++){if(i&&l){for(u=0;d=e[u++];)if(d(l,o,a)){s.push(l);break}c&&(pn=y)}n&&((l=!d&&l)&&h--,r&&m.push(l))}if(h+=p,n&&p!==h){for(u=0;d=t[u++];)d(m,g,o,a);if(r){if(h>0)for(;p--;)m[p]||g[p]||(g[p]=Sn.call(s));g=f(g)}kn.apply(s,g),c&&!r&&g.length>0&&h+t.length>1&&qn.uniqueSort(s)}return c&&(pn=y,Lt=v),m};return n?r(o):o}function v(e,n){void 0===n&&(n={});var i,r=0,o={};i=n.maxLoadTime||5e3;var a=function(t){e.getElementsByTagName("head")[0].appendChild(t)},s=function(s,c,l){var u,d,h,f,p=function(e){f.status=e,f.passed=[],f.failed=[],u&&(u.onload=null,u.onerror=null,u=null)},m=function(){for(var e=f.passed,t=e.length;t--;)e[t]();p(2)},g=function(){for(var e=f.failed,t=e.length;t--;)e[t]();p(3)},v=function(e,t){e()||((new Date).getTime()-h0)return d=e.createElement("style"),d.textContent='@import "'+s+'"',y(),void a(d);b()}a(u),u.href=s}},c=function(e){return ta.nu(function(t){s(e,me(t,ge(sa.value(e))),me(t,ge(sa.error(e))))})},l=function(e){return e.fold(ve,ve)};return{load:s,loadAll:function(e,t,n){ia(We(e,c)).get(function(e){var i=Ye(e,function(e){return e.isValue()});i.fail.length>0?n(i.fail.map(l)):t(i.pass.map(l))})}}}function b(e){var t,n,i,r,o,a,s,c,l,u,d,h,f,p={},m={},g=[],v={},b={},y=function(t,n,i){var r=e[t];return r?r=vs(r,/[, ]/,vs(r.toUpperCase(),/[, ]/)):(r=ms[t])||(r=vs(n," ",vs(n.toUpperCase()," ")),r=ys(r,i),ms[t]=r),r};e=e||{},i=zs(e.schema),!1===e.verify_html&&(e.valid_elements="*[*]"),t=Ss(e.valid_styles),n=Ss(e.invalid_styles,"map"),c=Ss(e.valid_classes,"map"),r=y("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=y("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=y("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=y("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),u=y("non_empty_elements","td th iframe video audio object script pre code",a),d=y("move_caret_before_on_enter_elements","table",u),h=y("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=y("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",h),f=y("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),bs((e.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){b[e]=new RegExp(""+e+"[^>]*>","gi")});var x=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},w=function(e){var t,n,i,r,o,a,s,c,l,u,d,h,f,m,v,b,y,w,C,z=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(e)for(e=Cs(e,","),p["@"]&&(b=p["@"].attributes,y=p["@"].attributesOrder),t=0,n=e.length;t=0;n--)if(i[n]===r)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var o=Array.isArray(e)?e:[e];return qn(t,o[0].ownerDocument||o[0],null,o).length>0},N=function(e,t,n,i){var r,o=[],a=x(e);for(i=void 0===i,n=n||("BODY"!==k().nodeName?k().parentNode:null),bi.is(t,"string")&&(r=t,t="*"===t?function(e){return 1===e.nodeType}:function(e){return O(e,r)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!i)return[a];o.push(a)}a=a.parentNode}return i?o:null},P=function(e,t,n){var i=N(e,t,n,!1);return i&&i.length>0?i[0]:null},I=function(e,t,n){var i=t;if(e)for("string"==typeof t&&(i=function(e){return O(e,t)}),e=e[n];e;e=e[n])if("function"==typeof i&&i(e))return e;return null},V=function(e,t){return I(e,t,"nextSibling")},R=function(e,t){return I(e,t,"previousSibling")},F=function(t,i){return qn(t,x(i)||n.root_element||e,[])},B=function(e,t,n){var r,o="string"==typeof e?x(e):e;if(!o)return!1;if(bi.isArray(o)&&(o.length||0===o.length))return r=[],_s(o,function(e,i){e&&("string"==typeof e&&(e=x(e)),r.push(t.call(n,e,i)))}),r;var a=n||i;return t.call(a,o)},W=function(e,t){w(e).each(function(e,n){_s(t,function(e,t){S(n,t,e)})})},j=function(e,t){var n=w(e);Ts?n.each(function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML=" "+t,n.removeChild(n.firstChild)}catch(e){Ji("
").html(" "+t).contents().slice(1).appendTo(n)}return t}}):n.html(t)},U=function(t,n,i,r,o){return B(t,function(t){var a="string"==typeof n?e.createElement(n):n;return W(a,i),r&&("string"!=typeof r&&r.nodeType?a.appendChild(r):"string"==typeof r&&j(a,r)),o?a:t.appendChild(a)})},Y=function(t,n,i){return U(e.createElement(t),t,n,i,!0)},X=ps.decode,G=ps.encodeAllRaw,q=function(e,t,n){var i,r="";r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&void 0!==t[i]&&(r+=" "+i+'="'+G(t[i])+'"');return void 0!==n?r+">"+n+""+e+">":r+" />"},$=function(t){var n,i=e.createElement("div"),r=e.createDocumentFragment();for(t&&(i.innerHTML=t);n=i.firstChild;)r.appendChild(n);return r},Z=function(e,t){var n=w(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),n.length>1?n.toArray():n[0]},K=function(e){return B(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},J=function(e){return h.parse(e)},Q=function(e,t){return h.serialize(e,t)},ee=function(n){var i,r;if(Ae!==y.DOM&&e===t.document){if(o[n])return;o[n]=!0}r=e.getElementById("mceDefaultStyles"),r||(r=e.createElement("style"),r.id="mceDefaultStyles",r.type="text/css",i=e.getElementsByTagName("head")[0],i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(e.createTextNode(n))},te=function(n){var i;if(Ae!==y.DOM&&e===t.document)return void y.DOM.loadCSS(n);n||(n=""),i=e.getElementsByTagName("head")[0],_s(n.split(","),function(e){var t;e=bi._addCacheSuffix(e),s[e]||(s[e]=!0,t=Y("link",{rel:"stylesheet",href:e}),i.appendChild(t))})},ne=function(e,t,n){w(e).toggleClass(t,n).each(function(){""===this.className&&Ji(this).attr("class",null)})},ie=function(e,t){w(e).addClass(t)},re=function(e,t){ne(e,t,!1)},oe=function(e,t){return w(e).hasClass(t)},ae=function(e){w(e).show()},se=function(e){w(e).hide()},ce=function(e){return"none"===w(e).css("display")},le=function(e){return(e||"mce_")+c++},ue=function(e){var t="string"==typeof e?x(e):e;return ka.isElement(t)?t.outerHTML:Ji("
").append(Ji(t).clone()).html()},de=function(e,t){w(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}Z(Ji(this).html(t),!0)})},he=function(e,t){var n=x(t);return B(e,function(e){var t,i;return t=n.parentNode,i=n.nextSibling,i?t.insertBefore(e,i):t.appendChild(e),e})},fe=function(e,t,n){return B(t,function(t){return bi.is(t,"array")&&(e=e.cloneNode(!0)),n&&_s(As(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},pe=function(e,t){var n;return e.nodeName!==t.toUpperCase()&&(n=Y(t),_s(z(e),function(t){S(n,t.nodeName,C(e,t.nodeName))}),fe(n,e,!0)),n||e},me=function(e,t){for(var n,i=e;i;){for(n=t;n&&i!==n;)n=n.parentNode;if(i===n)break;i=i.parentNode}return!i&&e.ownerDocument?e.ownerDocument.documentElement:i},ge=function(e){return h.toHex(bi.trim(e))},ve=function(e,t){var n,i,r,o,a=0;if(e=e.firstChild){var s=new _a(e,e.parentNode),c=d?d.getWhiteSpaceElements():{};t=t||(d?d.getNonEmptyElements():null);do{if(r=e.nodeType,ka.isElement(e)){var l=e.getAttribute("data-mce-bogus");if(l){e=s.next("all"===l);continue}if(o=e.nodeName.toLowerCase(),t&&t[o]){if("br"===o){a++,e=s.next();continue}return!1}for(i=z(e),n=i.length;n--;)if("name"===(o=i[n].nodeName)||"data-mce-bookmark"===o)return!1}if(8===r)return!1;if(3===r&&!Es.test(e.nodeValue))return!1;if(3===r&&e.parentNode&&c[e.parentNode.nodeName]&&Es.test(e.nodeValue))return!1;e=s.next()}while(e)}return a<=1},be=function(){return e.createRange()},ye=function(e,t,n){var i,r,o,a=be();if(e&&t)return a.setStart(e.parentNode,Os(e)),a.setEnd(t.parentNode,Os(t)),i=a.extractContents(),a=be(),a.setStart(t.parentNode,Os(t)+1),a.setEnd(e.parentNode,Os(e)+1),r=a.extractContents(),o=e.parentNode,o.insertBefore(Qa.trimNode(Ae,i),e),n?o.insertBefore(n,e):o.insertBefore(t,e),o.insertBefore(Qa.trimNode(Ae,r),e),Z(e),n||t},xe=function(t,i,r,o){if(bi.isArray(t)){for(var s=t.length,c=[];s--;)c[s]=xe(t[s],i,r,o);return c}return!n.collect||t!==e&&t!==a||u.push([t,i,r,o]),f.bind(t,i,r,o||Ae)},we=function(t,n,i){var r;if(bi.isArray(t)){r=t.length;for(var o=[];r--;)o[r]=we(t[r],n,i);return o}if(u&&(t===e||t===a))for(r=u.length;r--;){var s=u[r];t!==s[0]||n&&n!==s[1]||i&&i!==s[2]||f.unbind(s[0],s[1],s[2])}return f.unbind(t,n,i)},Ce=function(e,t,n){return f.fire(e,t,n)},ze=function(e){if(e&&ka.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},Se=function(e){for(var t=k(),n=null;e&&e!==t&&null===(n=ze(e));e=e.parentNode);return n},Me=function(){if(u)for(var e=u.length;e--;){var t=u[e];f.unbind(t[0],t[1],t[2])}qn.setDocument&&qn.setDocument()},ke=function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},_e=function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},Ae={doc:e,settings:n,win:a,files:s,stdMode:!0,boxModel:!0,styleSheetLoader:l,boundEvents:u,styles:h,schema:d,events:f,isBlock:g,$:m,$$:w,root:null,clone:M,getRoot:k,getViewPort:_,getRect:H,getSize:L,getParent:P,getParents:N,get:x,getNext:V,getPrev:R,select:F,is:O,add:U,create:Y,createHTML:q,createFragment:$,remove:Z,setStyle:T,getStyle:E,setStyles:D,removeAllAttribs:K,setAttrib:S,setAttribs:W,getAttrib:C,getPos:A,parseStyle:J,serializeStyle:Q,addStyle:ee,loadCSS:te,addClass:ie,removeClass:re,hasClass:oe,toggleClass:ne,show:ae,hide:se,isHidden:ce,uniqueId:le,setHTML:j,getOuterHTML:ue,setOuterHTML:de,decode:X,encode:G,insertAfter:he,replace:fe,rename:pe,findCommonAncestor:me,toHex:ge,run:B,getAttribs:z,isEmpty:ve,createRng:be,nodeIndex:Os,split:ye,bind:xe,unbind:we,fire:Ce,getContentEditable:ze,getContentEditableParent:Se,destroy:Me,isChildOf:ke,dumpRng:_e};return r=Ls(h,n,function(){return Ae}),Ae}function x(e,t){function n(){this.constructor=e}Fs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function w(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function z(e,t){return function(n,i){t(n,i,e)}}function S(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function M(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(a,s)}c((i=i.apply(e,t||[])).next())})}function k(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(r)throw new TypeError("Generator is already executing.");for(;c;)try{if(r=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,o=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function T(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function D(){for(var e=[],t=0;t1||r(e,t)})})}function r(e,t){try{o(u[e](t))}catch(e){c(d[0][3],e)}}function o(e){e.value instanceof E?Promise.resolve(e.value.v).then(a,s):c(d[0][2],e)}function a(e){r("next",e)}function s(e){r("throw",e)}function c(e,t){e(t),d.shift(),d.length&&r(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,u=n.apply(e,t||[]),d=[];return l={},i("next"),i("throw"),i("return"),l[Symbol.asyncIterator]=function(){return this},l}function H(e){function t(t,r){n[t]=e[t]?function(n){return(i=!i)?{value:E(e[t](n)),done:"return"===t}:r?r(n):n}:r}var n,i;return n={},t("next"),t("throw",function(e){throw e}),t("return"),n[Symbol.iterator]=function(){return this},n}function O(e){function t(t){i[t]=e[t]&&function(i){return new Promise(function(r,o){i=e[t](i),n(r,o,i.done,i.value)})}}function n(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof A?A(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)}function N(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function I(e){return e&&e.__esModule?e:{default:e}}function V(){var e=this,t=[],n={},i={},r=[],o=function(e){if(i[e])return i[e].instance},a=function(e){var t;return i[e]&&(t=i[e].dependencies),t||[]},s=function(e,t){var i=ec.getCode();if(i&&!1!==V.languageLoad){if(t)if(t=","+t+",",-1!==t.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1===t.indexOf(","+i+","))return;Rs.ScriptLoader.add(n[e]+"/langs/"+i+".js")}},c=function(e,n,o){t.push(n),i[e]={instance:n,dependencies:o};var a=Ye(r,function(t){return t.name===e});return r=a.fail,tc(a.pass,function(e){e.callback()}),n},l=function(e){delete n[e],delete i[e]},u=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},d=function(t,n){var i=e.urls[t];tc(n,function(e){Rs.ScriptLoader.add(i+"/"+e)})},h=function(e,t,n,i){var r=a(e);tc(r,function(e){var n=u(t,e);f(n.resource,n,void 0,void 0)}),n&&(i?n.call(i):n.call(Rs))},f=function(e,t,r,o,a){if(!n[e]){var s="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==s.indexOf("/")&&-1===s.indexOf("://")&&(s=V.baseURL+"/"+s),n[e]=s.substring(0,s.lastIndexOf("/")),i[e]?h(e,t,r,o):Rs.ScriptLoader.add(s,function(){return h(e,t,r,o)},o,a)}};return{items:t,urls:n,lookup:i,_listeners:r,get:o,dependencies:a,requireLangPack:s,add:c,remove:l,createUrl:u,addComponents:d,load:f,waitFor:function(e,t){i.hasOwnProperty(e)?t():r.push({name:e,callback:t})}}}function R(e,t,n,i,r){return e(n,i)?Ae.some(n):Pe(r)&&r(n)?Ae.none():t(n,i,r)}function F(e,t,n){var i=function(){return ru(e),0===t},r=function(){return ru(e)?t>=e.data.length:t>=e.childNodes.length},o=function(){var n;return n=cu(e.ownerDocument),n.setStart(e,t),n.setEnd(e,t),n},a=function(){return n||(n=vu(F(e,t))),n},s=function(){return a().length>0},c=function(n){return n&&e===n.container()&&t===n.offset()},l=function(n){return su(e,n?t-1:t)};return{container:ge(e),offset:ge(t),toRange:o,getClientRects:a,isVisible:s,isAtStart:i,isAtEnd:r,isEqual:c,getNode:l}}function B(e,t){void 0===t&&(t=b());var n=function(){};e=e||{},!1!==e.fix_self_closing&&(e.fix_self_closing=!0);var i=e.comment?e.comment:n,r=e.cdata?e.cdata:n,o=e.text?e.text:n,a=e.start?e.start:n,s=e.end?e.end:n,c=e.pi?e.pi:n,l=e.doctype?e.doctype:n;return{parse:function(n){var u,d,h,f,p,m,g,v,b,y,x,w,C,z,S,M,k,_,A,T,D,E,L,H,O,N,P,I,V,R,F=0,B=[],W=0,j=ps.decode,U=bi.makeMap("src,href,data,background,formaction,poster,xlink:href"),Y=/((java|vb)script|mhtml):/i,X=function(e){var t,n;for(t=B.length;t--&&B[t].name!==e;);if(t>=0){for(n=B.length-1;n>=t;n--)e=B[n],e.valid&&s(e.name);B.length=t}},G=function(t,n,i,r,o){var a,s,c=/[\s\u0000-\u001F]+/g;if(n=n.toLowerCase(),i=n in x?n:j(i||r||o||""),C&&!v&&!1===Rf(n)){if(!(a=_[n])&&A){for(s=A.length;s--&&(a=A[s],!a.pattern.test(n)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(i in a.validValues))return}if(U[n]&&!e.allow_script_urls){var l=i.replace(c,"");try{l=decodeURIComponent(l)}catch(e){l=unescape(l)}if(Y.test(l))return;if(Bf(e,l))return}v&&(n in U||0===n.indexOf("on"))||(f.map[n]=i,f.push({name:n,value:i}))};for(N=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),P=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,y=t.getShortEndedElements(),O=e.self_closing_elements||t.getSelfClosingElements(),x=t.getBoolAttrs(),C=e.validate,b=e.remove_internals,R=e.fix_self_closing,I=t.getSpecialElements(),L=n+">";u=N.exec(L);){if(Fn.length){o(j(n.substr(u.index))),F=u.index+u[0].length;continue}d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),w=d in y,R&&O[d]&&B.length>0&&B[B.length-1].name===d&&X(d);var q=jf(P,u[8]);if(null!==q){if("all"===q){F=Wf(t,n,N.lastIndex),N.lastIndex=F;continue}S=!1}if(!C||(z=t.getElementRule(d))){if(S=!0,C&&(_=z.attributes,A=z.attributePatterns),(k=u[8])?(v=-1!==k.indexOf("data-mce-type"),v&&b&&(S=!1),f=[],f.map={},k.replace(P,G)):(f=[],f.map={}),C&&!v){if(T=z.attributesRequired,D=z.attributesDefault,E=z.attributesForced,H=z.removeEmptyAttrs,H&&!f.length&&(S=!1),E)for(p=E.length;p--;)M=E[p],g=M.name,V=M.value,"{$uid}"===V&&(V="mce_"+W++),f.map[g]=V,f.push({name:g,value:V});if(D)for(p=D.length;p--;)M=D[p],(g=M.name)in f.map||(V=M.value,"{$uid}"===V&&(V="mce_"+W++),f.map[g]=V,f.push({name:g,value:V}));if(T){for(p=T.length;p--&&!(T[p]in f.map););-1===p&&(S=!1)}if(M=f.map["data-mce-bogus"]){if("all"===M){F=Wf(t,n,N.lastIndex),N.lastIndex=F;continue}S=!1}}S&&a(d,f,w)}else S=!1;if(h=I[d]){h.lastIndex=F=u.index+u[0].length,(u=h.exec(n))?(S&&(m=n.substr(F,u.index-F)),F=u.index+u[0].length):(m=n.substr(F),F=n.length),S&&(m.length>0&&o(m,!0),s(d)),N.lastIndex=F;continue}w||(k&&k.indexOf("/")===k.length-1?S&&s(d):B.push({name:d,valid:S}))}else(d=u[1])?(">"===d.charAt(0)&&(d=" "+d),e.allow_conditional_comments||"[if"!==d.substr(0,3).toLowerCase()||(d=" "+d),i(d)):(d=u[2])?r(Ff(d)):(d=u[3])?l(d):(d=u[4])&&c(d,u[5]);F=u.index+u[0].length}for(F=0;p--)d=B[p],d.valid&&s(d.name)}}}function W(){var e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,reposition:e,getArgs:e}}function j(e){var t=[],n=function(){var t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():W()},i=function(){return Ae.from(t[0])},r=function(e,t){return!(e.type!==t.type||e.text!==t.text||e.progressBar||e.timeout||t.progressBar||t.timeout)},o=function(){t.length>0&&n().reposition(t)},a=function(e){t.push(e)},s=function(e){Ze(t,function(t){return t===e}).each(function(e){t.splice(e,1)})},c=function(i){if(!e.removed&&xg.isEditorAttachedToDom(e))return $e(t,function(e){return r(n().getArgs(e),i)}).getOrThunk(function(){e.editorManager.setActive(e);var t=n().open(i,function(){s(t),o()});return a(t),o(),t})},l=function(){i().each(function(e){n().close(e),s(e),o()})},u=function(){return t};return function(e){e.on("SkinLoaded",function(){var t=e.settings.service_message;t&&c({text:t,type:"warn",timeout:0})}),e.on("ResizeEditor ResizeWindow NodeChange",function(){Jt.requestAnimationFrame(o)}),e.on("remove",function(){je(t.slice(),function(e){n().close(e)})})}(e),{open:c,close:l,getNotifications:u}}function U(){var e=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}function Y(){return new(mt.getOrDie("XMLHttpRequest"))}function X(e,n){var i={},r=function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t},o=function(e,i,o,a){var s,c;s=Y(),s.open("POST",n.url),s.withCredentials=n.credentials,s.upload.onprogress=function(e){a(e.loaded/e.total*100)},s.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return s.status<200||s.status>=300?void o("HTTP Error: "+s.status):(e=JSON.parse(s.responseText))&&"string"==typeof e.location?void i(r(n.basePath,e.location)):void o("Invalid JSON: "+s.responseText)},c=new t.FormData,c.append("file",e.blob(),e.filename()),s.send(c)},a=function(){return new Yt(function(e){e([])})},s=function(e,t){return{url:t,blobInfo:e,status:!0}},c=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},l=function(e,t){bi.each(i[e],function(e){e(t)}),delete i[e]},u=function(t,n,i){return e.markPending(t.blobUri()),new Yt(function(r){var o,a,u=function(){};try{var d=function(){o&&(o.close(),a=u)},h=function(n){d(),e.markUploaded(t.blobUri(),n),l(t.blobUri(),s(t,n)),r(s(t,n))},f=function(n){d(),e.removeFailed(t.blobUri()),l(t.blobUri(),c(t,n)),r(c(t,n))};a=function(e){e<0||e>100||(o||(o=i()),o.progressBar.value(e))},n(t,h,f,a)}catch(e){r(c(t,e.message))}})},d=function(e){return e===o},h=function(e){var t=e.blobUri();return new Yt(function(e){i[t]=i[t]||[],i[t].push(e)})},f=function(t,i){return t=bi.grep(t,function(t){return!e.isUploaded(t.blobUri())}),Yt.all(bi.map(t,function(t){return e.isPending(t.blobUri())?h(t):u(t,n.handler,i)}))},p=function(e,t){return!n.url&&d(n.handler)?a():f(e,t)};return!1===Pe(n.handler)&&(n.handler=o),{upload:p}}function G(){return new(mt.getOrDie("FileReader"))}function q(e){return new(mt.getOrDie("Uint8Array"))(e)}function $(e,t){var n={};return{findAll:function(i,r){var o;r||(r=ge(!0)),o=Xe(qg(i),function(t){var n=t.src;return!!Ut.fileApi&&(!t.hasAttribute("data-mce-bogus")&&(!t.hasAttribute("data-mce-placeholder")&&(!(!n||n===Ut.transparentSrc)&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&r(t):0===n.indexOf("data:")&&r(t)))))});var a=We(o,function(e){if(n[e.src])return new Yt(function(t){n[e.src].then(function(n){if("string"==typeof n)return n;t({image:e,blobInfo:n.blobInfo})})});var i=new Yt(function(n,i){Gg(t,e,n,i)}).then(function(e){return delete n[e.image.src],e}).catch(function(t){return delete n[e.src],t});return n[e.src]=i,i});return Yt.all(a)}}}function Z(){var e={},t=function(e,t){return{status:e,resultUri:t}},n=function(t){return t in e};return{hasBlobUri:n,getResultUri:function(t){var n=e[t];return n?n.resultUri:null},isPending:function(t){return!!n(t)&&1===e[t].status},isUploaded:function(t){return!!n(t)&&2===e[t].status},markPending:function(n){e[n]=t(1,null)},markUploaded:function(n,i){e[n]=t(2,i)},removeFailed:function(t){delete e[t]},destroy:function(){e={}}}}function K(e){var t={},n=function(e){return e?t[e]:t},i=function(e){return Jr(t,e)},r=function(e,n){e&&("string"!=typeof e?bi.each(e,function(e,t){r(t,e)}):(He(n)||(n=[n]),bi.each(n,function(e){void 0===e.deep&&(e.deep=!e.selector),void 0===e.split&&(e.split=!e.selector||e.inline),void 0===e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),t[e]=n))},o=function(e){return e&&t[e]&&delete t[e],t};return r(Xw.get(e.dom)),r(e.settings.formats),{get:n,has:i,register:r,unregister:o}}function J(e){return{getBookmark:n(Yh.getBookmark,e),moveToBookmark:n(Yh.moveToBookmark,e)}}function Q(e,t){var n,i;return{selectorChangedWithUnbind:function(r,o){return n||(n={},i={},t.on("NodeChange",function(t){var r=t.element,o=e.getParents(r,null,e.getRoot()),a={};bi.each(n,function(t,n){bi.each(o,function(r){if(e.is(r,n))return i[n]||(bi.each(t,function(e){e(!0,{node:r,selector:n,parents:o})}),i[n]=t),a[n]=t,!1})}),bi.each(i,function(e,t){a[t]||(delete i[t],bi.each(e,function(e){e(!1,{node:r,selector:t,parents:o})}))})})),n[r]||(n[r]=[]),n[r].push(o),{unbind:function(){SS(n,r,o),SS(i,r,o)}}}}}function ee(e){return{walk:function(t,n){return Sf.walk(e,t,n)},split:By,normalize:function(t){return uS.normalize(e,t).fold(ge(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}var te,ne,ie,re,oe,ae,se,ce,le,ue,de,he,fe,pe=function(){for(var e=[],t=0;t-1},Be=function(e,t){return Ze(e,t).isSome()},We=function(e,t){for(var n=e.length,i=new Array(n),r=0;r=0;n--){t(e[n],n,e)}},Ye=function(e,t){for(var n=[],i=[],r=0,o=e.length;r=534,Ut={opera:te,webkit:ne,ie:ie,gecko:ae,mac:se,iOS:ce,android:le,contentEditable:jt,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==ie,range:t.window.getSelection&&"Range"in t.window,documentMode:ie&&!oe?t.document.documentMode||7:10,fileApi:ue,ceFalse:!1===ie||ie>8,cacheSuffix:null,container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===ie||ie>11,desktop:!de&&!he,windowsPhone:fe},Yt=window.Promise?window.Promise:function(){function e(e,t){return function(){e.apply(t,arguments)}}function n(e){var t=this;if(null===this._state)return void this._deferreds.push(e);u(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var i;try{i=n(t._value)}catch(t){return void e.reject(t)}e.resolve(i)})}function i(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(i,this),e(r,this))}this._state=!0,this._value=t,o.call(this)}catch(e){r.call(this,e)}}function r(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;e0)return n[0]}return t},ln=function(e,n){var i,r=n||{};for(i in e)tn[i]||(r[i]=e[i]);if(r.target||(r.target=r.srcElement||t.document),Ut.experimentalShadowDom&&(r.target=cn(e,r.target)),e&&en.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var o=r.target.ownerDocument||t.document,a=o.documentElement,s=o.body;r.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),r.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}return r.preventDefault=function(){r.isDefaultPrevented=on,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},r.stopPropagation=function(){r.isPropagationStopped=on,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=on,r.stopPropagation()},!1===nn(r)&&(r.isDefaultPrevented=rn,r.isPropagationStopped=rn,r.isImmediatePropagationStopped=rn),void 0===r.metaKey&&(r.metaKey=!1),r},un=function(e,t,n){var i=e.document,r={type:"ready"};if(n.domLoaded)return void t(r);var o=function(){return"complete"===i.readyState||"interactive"===i.readyState&&i.body},a=function(){sn(e,"DOMContentLoaded",a),sn(e,"load",a),n.domLoaded||(n.domLoaded=!0,t(r))},s=function(){o()&&(sn(i,"readystatechange",s),a())},c=function(){try{i.documentElement.doScroll("left")}catch(e){return void Jt.setTimeout(c)}a()};!i.addEventListener||Ut.ie&&Ut.ie<11?(an(i,"readystatechange",s),i.documentElement.doScroll&&e.self===e.top&&c()):o()?a():an(e,"DOMContentLoaded",a),an(e,"load",a)},dn=function(){function e(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Qt+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in t.document.documentElement,this.hasFocusIn="onfocusin"in t.document.documentElement,this.count=1}return e.prototype.bind=function(e,n,i,r){var o,a,s,c,l,u,d,h=this,f=t.window,p=function(e){h.executeHandlers(ln(e||f.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){e[h.expando]?o=e[h.expando]:(o=h.count++,e[h.expando]=o,h.events[o]={}),r=r||e;var m=n.split(" ");for(s=m.length;s--;)c=m[s],u=p,l=d=!1,"DOMContentLoaded"===c&&(c="ready"),h.domLoaded&&"ready"===c&&"complete"===e.readyState?i.call(r,ln({type:c})):(h.hasMouseEnterLeave||(l=h.mouseEnterLeave[c])&&(u=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||(e=ln(e||f.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,h.executeHandlers(e,o))}),h.hasFocusIn||"focusin"!==c&&"focusout"!==c||(d=!0,l="focusin"===c?"focus":"blur",u=function(e){e=ln(e||f.event),e.type="focus"===e.type?"focusin":"focusout",h.executeHandlers(e,o)}),a=h.events[o][c],a?"ready"===c&&h.domLoaded?i(ln({type:c})):a.push({func:i,scope:r}):(h.events[o][c]=a=[{func:i,scope:r}],a.fakeName=l,a.capture=d,a.nativeHandler=u,"ready"===c?un(e,u,h):an(e,l||c,u,d)));return e=a=0,i}},e.prototype.unbind=function(e,t,n){var i,r,o,a,s,c;if(!e||3===e.nodeType||8===e.nodeType)return this;if(i=e[this.expando]){if(c=this.events[i],t){var l=t.split(" ");for(o=l.length;o--;)if(s=l[o],r=c[s]){if(n)for(a=r.length;a--;)if(r[a].func===n){var u=r.nativeHandler,d=r.fakeName,h=r.capture;r=r.slice(0,a).concat(r.slice(a+1)),r.nativeHandler=u,r.fakeName=d,r.capture=h,c[s]=r}n&&0!==r.length||(delete c[s],sn(e,r.fakeName||s,r.nativeHandler,r.capture))}}else{for(s in c)r=c[s],sn(e,r.fakeName||s,r.nativeHandler,r.capture);c={}}for(s in c)return this;delete this.events[i];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this},e.prototype.fire=function(e,t,n){var i;if(!e||3===e.nodeType||8===e.nodeType)return this;var r=ln(null,n);r.type=t,r.target=e;do{i=e[this.expando],i&&this.executeHandlers(r,i),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!r.isPropagationStopped());return this},e.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[this.expando]&&this.unbind(e);return this},e.prototype.destroy=function(){this.events={}},e.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},e.prototype.executeHandlers=function(e,t){var n,i,r,o,a=this.events[t];if(n=a&&a[e.type])for(i=0,r=n.length;i+~]|"+Tn+")"+Tn+"*"),Pn=new RegExp("="+Tn+"*([^\\]'\"]*?)"+Tn+"*\\]","g"),In=new RegExp(Ln),Vn=new RegExp("^"+Dn+"$"),Rn={ID:new RegExp("^#("+Dn+")"),CLASS:new RegExp("^\\.("+Dn+")"),TAG:new RegExp("^("+Dn+"|[*])"),ATTR:new RegExp("^"+En),PSEUDO:new RegExp("^"+Ln),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Tn+"*(even|odd|(([+-]|)(\\d*)n|)"+Tn+"*(?:([+-]|)"+Tn+"*(\\d+)|))"+Tn+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+Tn+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Tn+"*((?:-\\d)?\\d*)"+Tn+"*\\)|)(?=[^-]|$)","i")},Fn=/^(?:input|select|textarea|button)$/i,Bn=/^h\d$/i,Wn=/^[^{]+\{\s*\[native \w/,jn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Un=/[+~]/,Yn=/'|\\/g,Xn=new RegExp("\\\\([\\da-f]{1,6}"+Tn+"?|("+Tn+")|.)","ig"),Gn=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{kn.apply(zn=_n.call(fn.childNodes),fn.childNodes),zn[fn.childNodes.length].nodeType}catch(e){kn={apply:zn.length?function(e,t){Mn.apply(e,_n.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}var qn=function(e,t,n,i){var r,o,a,c,u,d,h,f,p,m;if((t?t.ownerDocument||t:fn)!==Pt&&Nt(t),t=t||Pt,n=n||[],!e||"string"!=typeof e)return n;if(1!==(c=t.nodeType)&&9!==c)return[];if(Vt&&!i){if(r=jn.exec(e))if(a=r[1]){if(9===c){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&Wt(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return kn.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&Mt.getElementsByClassName)return kn.apply(n,t.getElementsByClassName(a)),n}if(Mt.qsa&&(!Rt||!Rt.test(e))){if(f=h=hn,p=t,m=9===c&&e,1===c&&"object"!==t.nodeName.toLowerCase()){for(d=Tt(e),(h=t.getAttribute("id"))?f=h.replace(Yn,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",u=d.length;u--;)d[u]=f+l(d[u]);p=Un.test(e)&&s(t.parentNode)||t,m=d.join(",")}if(m)try{return kn.apply(n,p.querySelectorAll(m)),n}catch(e){}finally{h||t.removeAttribute("id")}}}return Et(e.replace(Hn,"$1"),t,n,i)};Mt=qn.support={},At=qn.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Nt=qn.setDocument=function(e){var t,n=e?e.ownerDocument||e:fn,i=n.defaultView;return n!==Pt&&9===n.nodeType&&n.documentElement?(Pt=n,It=n.documentElement,Vt=!At(n),i&&i!==function(e){try{return e.top}catch(e){}return null}(i)&&(i.addEventListener?i.addEventListener("unload",function(){Nt()},!1):i.attachEvent&&i.attachEvent("onunload",function(){Nt()})),Mt.attributes=!0,Mt.getElementsByTagName=!0,Mt.getElementsByClassName=Wn.test(n.getElementsByClassName),Mt.getById=!0,kt.find.ID=function(e,t){if(typeof t.getElementById!==xn&&Vt){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},kt.filter.ID=function(e){var t=e.replace(Xn,Gn);return function(e){return e.getAttribute("id")===t}},kt.find.TAG=Mt.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==xn)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},kt.find.CLASS=Mt.getElementsByClassName&&function(e,t){if(Vt)return t.getElementsByClassName(e)},Ft=[],Rt=[],Mt.disconnectedMatch=!0,Rt=Rt.length&&new RegExp(Rt.join("|")),Ft=Ft.length&&new RegExp(Ft.join("|")),t=Wn.test(It.compareDocumentPosition),Wt=t||Wn.test(It.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},yn=t?function(e,t){if(e===t)return Ot=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!Mt.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===fn&&Wt(fn,e)?-1:t===n||t.ownerDocument===fn&&Wt(fn,t)?1:Ht?An.call(Ht,e)-An.call(Ht,t):0:4&i?-1:1)}:function(e,t){if(e===t)return Ot=!0,0;var i,r=0,a=e.parentNode,s=t.parentNode,c=[e],l=[t];if(!a||!s)return e===n?-1:t===n?1:a?-1:s?1:Ht?An.call(Ht,e)-An.call(Ht,t):0;if(a===s)return o(e,t);for(i=e;i=i.parentNode;)c.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;c[r]===l[r];)r++;return r?o(c[r],l[r]):c[r]===fn?-1:l[r]===fn?1:0},n):Pt},qn.matches=function(e,t){return qn(e,null,null,t)},qn.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Pt&&Nt(e),t=t.replace(Pn,"='$1']"),Mt.matchesSelector&&Vt&&(!Ft||!Ft.test(t))&&(!Rt||!Rt.test(t)))try{var n=Bt.call(e,t);if(n||Mt.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return qn(t,Pt,null,[e]).length>0},qn.contains=function(e,t){return(e.ownerDocument||e)!==Pt&&Nt(e),Wt(e,t)},qn.attr=function(e,t){(e.ownerDocument||e)!==Pt&&Nt(e);var n=kt.attrHandle[t.toLowerCase()],i=n&&Cn.call(kt.attrHandle,t.toLowerCase())?n(e,t,!Vt):void 0;return void 0!==i?i:Mt.attributes||!Vt?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},qn.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},qn.uniqueSort=function(e){var t,n=[],i=0,r=0;if(Ot=!Mt.detectDuplicates,Ht=!Mt.sortStable&&e.slice(0),e.sort(yn),Ot){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return Ht=null,e},_t=qn.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_t(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=_t(t);return n},kt=qn.selectors={cacheLength:50,createPseudo:r,match:Rn,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Xn,Gn),e[3]=(e[3]||e[4]||e[5]||"").replace(Xn,Gn),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||qn.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&qn.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Rn.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&In.test(n)&&(t=Tt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Xn,Gn).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=gn[e+" "];return t||(t=new RegExp("(^|"+Tn+")"+e+"("+Tn+"|$)"))&&gn(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==xn&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=qn.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!c&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&b){for(u=g[hn]||(g[hn]={}),l=u[e]||[],f=l[0]===pn&&l[1],h=l[0]===pn&&l[2],d=f&&g.childNodes[f];d=++f&&d&&d[m]||(h=f=0)||p.pop();)if(1===d.nodeType&&++h&&d===t){u[e]=[pn,f,h];break}}else if(b&&(l=(t[hn]||(t[hn]={}))[e])&&l[0]===pn)h=l[1];else for(;(d=++f&&d&&d[m]||(h=f=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(b&&((d[hn]||(d[hn]={}))[e]=[pn,h]),d!==t)););return(h-=r)===i||h%i==0&&h/i>=0}}},PSEUDO:function(e,t){var n,i=kt.pseudos[e]||kt.setFilters[e.toLowerCase()]||qn.error("unsupported pseudo: "+e);return i[hn]?i(t):i.length>1?(n=[e,e,"",t],kt.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=An.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:r(function(e){var t=[],n=[],i=Dt(e.replace(Hn,"$1"));return i[hn]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return qn(e,t).length>0}}),contains:r(function(e){return e=e.replace(Xn,Gn),function(t){return(t.textContent||t.innerText||_t(t)).indexOf(e)>-1}}),lang:r(function(e){return Vn.test(e||"")||qn.error("unsupported lang: "+e),e=e.replace(Xn,Gn).toLowerCase(),function(t){var n;do{if(n=Vt?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var n=t.window.location&&t.window.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===It},focus:function(e){return e===Pt.activeElement&&(!Pt.hasFocus||Pt.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!kt.pseudos.empty(e)},header:function(e){return Bn.test(e.nodeName)},input:function(e){return Fn.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:a(function(){return[0]}),last:a(function(e,t){return[t-1]}),eq:a(function(e,t,n){return[n<0?n+t:n]}),even:a(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:a(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(a=o[0]).type&&Mt.getById&&9===t.nodeType&&Vt&&kt.relative[o[1].type]){if(!(t=(kt.find.ID(a.matches[0].replace(Xn,Gn),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=Rn.needsContext.test(e)?0:o.length;r--&&(a=o[r],!kt.relative[c=a.type]);)if((u=kt.find[c])&&(i=u(a.matches[0].replace(Xn,Gn),Un.test(o[0].type)&&s(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&l(o)))return kn.apply(n,i),n;break}}return(d||Dt(e,h))(i,t,!Vt,n,Un.test(e)&&s(t.parentNode)||t),n},Mt.sortStable=hn.split("").sort(yn).join("")===hn,Mt.detectDuplicates=!!Ot,Nt(),Mt.sortDetached=!0;var $n=Array.isArray,Zn=function(e){var t,n,i=e;if(!$n(e))for(i=[],t=0,n=e.length;t)[^>]*$|#([\w\-]*)$)/,zi=dn.Event,Si=bi.makeMap("children,contents,next,prev"),Mi=function(e){return void 0!==e},ki=function(e){return"string"==typeof e},_i=function(e){return e&&e===e.window},Ai=function(e,t){var n,i,r;for(t=t||yi,r=t.createElement("div"),n=t.createDocumentFragment(),r.innerHTML=e;i=r.firstChild;)n.appendChild(i);return n},Ti=function(e,t,n,i){var r;if(ki(t))t=Ai(t,Ui(e[0]));else if(t.length&&!t.nodeType){if(t=Ji.makeArray(t),i)for(r=t.length-1;r>=0;r--)Ti(e,t[r],n,i);else for(r=0;r"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ci.exec(e)))return Ji(n).find(e);if(i[1])for(r=Ai(e,Ui(n)).firstChild;r;)xi.call(o,r),r=r.nextSibling;else{if(!(r=Ui(n).getElementById(i[2])))return o;if(r.id!==i[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return bi.toArray(this)},add:function(e,t){var n,i,r=this;if(ki(e))return r.add(Ji(e));if(!1!==t)for(n=Ji.unique(r.toArray().concat(Ji.makeArray(e))),r.length=n.length,i=0;i1&&(Si[e]||(r=Ji.unique(r)),0===e.indexOf("parents")&&(r=r.reverse()));var o=Ji(r);return n?o.filter(n):o}}),Wi({parentsUntil:function(e,t){return Yi(e,"parentNode",t)},nextUntil:function(e,t){return Xi(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Xi(e,"previousSibling",1,t).slice(1)}},function(e,t){Vi.fn[e]=function(n,i){var r=this,o=[];r.each(function(){var e=t.call(o,this,n,o);e&&(Ji.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=Ji.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse()));var a=Ji(o);return i?a.filter(i):a}}),Vi.fn.is=function(e){return!!e&&this.filter(e).length>0},Vi.fn.init.prototype=Vi.fn,Vi.overrideDefaults=function(e){var t,n=function(i,r){return t=t||e(),0===arguments.length&&(i=t.element),r||(r=t.context),new n.fn.init(i,r)};return Ji.extend(n,this),n};var qi=function(e,t,n){Wi(n,function(n,i){e[n]=e[n]||{},e[n][t]=i})};Ut.ie&&Ut.ie<8&&(qi(Pi,"get",{maxlength:function(e){var t=e.maxLength;if(2147483647!==t)return t},size:function(e){var t=e.size;if(20!==t)return t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;if(0!==t.length)return t}}),qi(Pi,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),Ut.ie&&Ut.ie<9&&(Ni.float="styleFloat",qi(Ii,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),Vi.attrHooks=Pi,Vi.cssHooks=Ii;var $i,Zi,Ki,Ji=Vi,Qi=function(e,t){for(var n=0;n1)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Or(r.childNodes[0])},Lr=function(e,n){var i=n||t.document,r=i.createElement(e);return Or(r)},Hr=function(e,n){var i=n||t.document,r=i.createTextNode(e);return Or(r)},Or=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:ge(e)}},Nr=function(e,t,n){var i=e.dom();return Ae.from(i.elementFromPoint(t,n)).map(Or)},Pr={fromHtml:Er,fromTag:Lr,fromText:Hr,fromDom:Or,fromPoint:Nr},Ir=(t.Node.ATTRIBUTE_NODE,t.Node.CDATA_SECTION_NODE,t.Node.COMMENT_NODE,t.Node.DOCUMENT_NODE),Vr=(t.Node.DOCUMENT_TYPE_NODE,t.Node.DOCUMENT_FRAGMENT_NODE,t.Node.ELEMENT_NODE),Rr=t.Node.TEXT_NODE,Fr=(t.Node.PROCESSING_INSTRUCTION_NODE,t.Node.ENTITY_REFERENCE_NODE,t.Node.ENTITY_NODE,t.Node.NOTATION_NODE,function(e){return e.dom().nodeName.toLowerCase()}),Br=function(e){return e.dom().nodeType},Wr=function(e){return function(t){return Br(t)===e}},jr=Wr(Vr),Ur=Wr(Rr),Yr=Object.keys,Xr=Object.hasOwnProperty,Gr=function(e,t){for(var n=Yr(e),i=0,r=n.length;i0})},uo=function(){for(var e=[],t=0;t=e.length&&t(n)}};0===e.length?t([]):je(e,function(e,t){e.get(r(t))})})},ia=function(e){return na(e,ta.nu)},ra=function(e){var t=function(t){return e===t},n=function(t){return ra(e)},i=function(t){return ra(e)},r=function(t){return ra(t(e))},o=function(t){return ra(e)},a=function(t){t(e)},s=function(t){return t(e)},c=function(t,n){return n(e)},l=function(t){return t(e)},u=function(t){return t(e)},d=function(){return Ae.some(e)};return{is:t,isValue:we,isError:xe,getOr:ge(e),getOrThunk:ge(e),getOrDie:ge(e),or:n,orThunk:i,fold:c,map:r,mapError:o,each:a,bind:s,exists:l,forall:u,toOption:d}},oa=function(e){var t=function(e){return e()},n=function(){return ye(String(e))()},i=function(e){return e},r=function(e){return e()},o=function(t){return oa(e)},a=function(t){return oa(t(e))},s=function(t){return oa(e)};return{is:xe,isValue:xe,isError:we,getOr:ve,getOrThunk:t,getOrDie:n,or:i,orThunk:r,fold:function(t,n){return t(e)},map:o,mapError:a,each:pe,bind:s,exists:xe,forall:we,toOption:Ae.none}},aa=function(e,t){return e.fold(function(){return oa(t)},ra)},sa={value:ra,error:oa,fromOption:aa},ca=function(e){return function(t){return!!t&&t.nodeType===e}},la=ca(1),ua=function(e){var t=e.toLowerCase().split(" ");return function(e){var n,i;if(e&&e.nodeType)for(i=e.nodeName.toLowerCase(),n=0;n=0;n--)Ja(e,i[n]);if(!1===ka.isDocument(t)){if(ka.isText(t)&&t.nodeValue.length>0){var r=bi.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||r>0)return;if(0===r&&Za(t))return}else if(ka.isElement(t)&&(i=t.childNodes,1===i.length&&Ka(i[0])&&t.parentNode.insertBefore(i[0],t),i.length||Xa(Pr.fromDom(t))))return;e.remove(t)}return t}},Qa={trimNode:Ja},es=bi.makeMap,ts=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ns=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,is=/[<>&\"\']/g,rs=/([a-z0-9]+);?|&([a-z0-9]+);/gi,os={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};Zi={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Ki={"<":"<",">":">","&":"&",""":'"',"'":"'"};var as=function(e){var t;return t=Pr.fromTag("div").dom(),t.innerHTML=e,t.textContent||t.innerText||e},ss=function(e,t){var n,i,r,o={};if(e){for(e=e.split(","),t=t||10,n=0;n1?""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Zi[e]||""+e.charCodeAt(0)+";"})},ds=function(e,t,n){return n=n||$i,e.replace(t?ts:ns,function(e){return Zi[e]||n[e]||e})},hs=function(e,t){var n=ss(t)||$i,i=function(e,t){return e.replace(t?ts:ns,function(e){return void 0!==Zi[e]?Zi[e]:void 0!==n[e]?n[e]:e.length>1?""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":""+e.charCodeAt(0)+";"})},r=function(e,t){return ds(e,t,n)},o=es(e.replace(/\+/g,","));return o.named&&o.numeric?i:o.named?t?r:ds:o.numeric?us:cs},fs=function(e){return e.replace(rs,function(e,t){return t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10),t>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):os[t]||String.fromCharCode(t)):Ki[e]||$i[e]||as(e)})},ps={encodeRaw:cs,encodeAllRaw:ls,encodeNumeric:us,encodeNamed:ds,getEncodeFunc:hs,decode:fs},ms={},gs={},vs=bi.makeMap,bs=bi.each,ys=bi.extend,xs=bi.explode,ws=bi.inArray,Cs=function(e,t){return e=bi.trim(e),e?e.split(t||" "):[]},zs=function(e){var t,n,i,r,o,a,s={},c=function(e,n,i){var r,o,a,c=function(e,t){var n,i,r={};for(n=0,i=e.length;n1?e:"0"+e};return"#"+r(t)+r(n)+r(i)},ks=function(e,t){var n,i,r,o,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,s=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,u={};for(e=e||{},t&&(r=t.getValidStyles(),o=t.getInvalidStyles()),i="\\\" \\' \\; \\: ; : \ufeff".split(" "),n=0;n-1&&i||(h[e+t]=-1===n?c[0]:c.join(" "),delete h[e+"-top"+t],delete h[e+"-right"+t],delete h[e+"-bottom"+t],delete h[e+"-left"+t])}},g=function(e){var t,n=h[e];if(n){for(n=n.split(" "),t=n.length;t--;)if(n[t]!==n[0])return!1;return h[e]=n[0],!0}},v=function(e){return d=!0,u[e]},b=function(e,t){return d&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return u[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},y=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},x=function(e){return e.replace(/\\[0-9a-f]+/gi,y)},w=function(t,n,i,r,o,a){if(o=o||a)return o=b(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=b(n||i||r),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return f&&(n=f.call(p,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,v).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,v)});i=c.exec(t);)if(c.lastIndex=i.index+i[0].length,r=i[1].replace(l,"").toLowerCase(),o=i[2].replace(l,""),r&&o){if(r=x(r),o=x(o),-1!==r.indexOf("\ufeff")||-1!==r.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===r||/expression\s*\(|\/\*|\*\//.test(o)))continue;"font-weight"===r&&"700"===o?o="bold":"color"!==r&&"background-color"!==r||(o=o.toLowerCase()),o=o.replace(a,Ms),o=o.replace(s,w),h[r]=d?b(o,!0):o}m("border","",!0),m("border","-width"),m("border","-color"),m("border","-style"),m("padding",""),m("margin",""),function(e,t,n,i){g(t)&&g(n)&&g(i)&&(h[e]=h[t]+" "+h[n]+" "+h[i],delete h[t],delete h[n],delete h[i])}("border","border-width","border-style","border-color"),"medium none"===h.border&&delete h.border,"none"===h["border-image"]&&delete h["border-image"]}return h},serialize:function(e,t){var n,i,a="",s=function(t){var n,i,o,s;if(n=r[t])for(i=0,o=n.length;i0?" ":"")+t+": "+s+";")};if(t&&r)s("*"),s(t);else for(n in e)!(i=e[n])||o&&!function(e,t){var n;return(!(n=o["*"])||!n[e])&&(!(n=o[t])||!n[e])}(n,t)||(a+=(a.length>0?" ":"")+n+": "+i+";");return a}}},_s=bi.each,As=bi.grep,Ts=Ut.ie,Ds=/^([a-z0-9],?)+$/i,Es=/^[ \t\r\n]*$/,Ls=function(e,t,n){var i=t.keep_values,r={set:function(e,i,r){t.url_converter&&(i=t.url_converter.call(t.url_converter_scope||n(),i,r,e[0])),e.attr("data-mce-"+r,i).attr(r,i)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},o={style:{set:function(e,t){if(null!==t&&"object"==typeof t)return void e.css(t);i&&e.attr("data-mce-style",t),e.attr("style",t)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serialize(e.parse(n),t[0].nodeName)}}};return i&&(o.href=o.src=r),o},Hs=function(e,t){var n=t.attr("style"),i=e.serialize(e.parse(n),t[0].nodeName);i||(i=null),t.attr("data-mce-style",i)},Os=function(e,t){var n,i,r=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!==i||i!==n&&e.nodeValue.length)&&(r++,n=i);return r};!function(e){e.DOM=e(t.document),e.nodeIndex=Os}(y||(y={}));var Ns=y,Ps=Ns.DOM,Is=bi.each,Vs=bi.grep,Rs=function(){function e(){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0}return e.prototype.loadScript=function(e,n,i){var r,o,a=Ps,s=function(){a.remove(o),r&&(r.onreadystatechange=r.onload=r=null),n()},c=function(){Pe(i)?i():void 0!==t.console&&t.console.log&&t.console.log("Failed to load script: "+e)};o=a.uniqueId(),r=t.document.createElement("script"),r.id=o,r.type="text/javascript",r.src=bi._addCacheSuffix(e),r.onload=s,r.onerror=c,(t.document.getElementsByTagName("head")[0]||t.document.body).appendChild(r)},e.prototype.isDone=function(e){return 2===this.states[e]},e.prototype.markDone=function(e){this.states[e]=2},e.prototype.add=function(e,t,n,i){void 0===this.states[e]&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:i,scope:n||this}))},e.prototype.load=function(e,t,n,i){return this.add(e,t,n,i)},e.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},e.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},e.prototype.loadScripts=function(e,t,n,i){var r,o=this,a=[],s=function(e,t){Is(o.scriptLoadedCallbacks[t],function(t){Pe(t[e])&&t[e].call(t.scope)}),o.scriptLoadedCallbacks[t]=void 0};o.queueLoadedCallbacks.push({success:t,failure:i,scope:n||this}),(r=function(){var t=Vs(e);if(e.length=0,Is(t,function(e){return 2===o.states[e]?void s("success",e):3===o.states[e]?void s("failure",e):void(1!==o.states[e]&&(o.states[e]=1,o.loading++,o.loadScript(e,function(){o.states[e]=2,o.loading--,s("success",e),r()},function(){o.states[e]=3,o.loading--,a.push(e),s("failure",e),r()})))}),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,Is(n,function(e){0===a.length?Pe(e.success)&&e.success.call(e.scope):Pe(e.failure)&&e.failure.call(e.scope,a)})}})()},e.ScriptLoader=new e,e}(),Fs=function(e,t){return(Fs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Bs=function(){return Bs=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1},Ys={},Xs=Ws("en"),Gs=function(){return qr(Ys,function(e){return Bs({},e)})},qs=function(e){e&&Xs.set(e)},$s=function(){return Xs.get()},Zs=function(e,t){var n=Ys[e];n||(Ys[e]=n={});for(var i in t)n[i.toLowerCase()]=t[i]},Ks=function(e){var t=Ys[Xs.get()]||{},n=function(e){return Pe(e)?Object.prototype.toString.call(e):i(e)?"":""+e},i=function(e){return""===e||null===e||void 0===e},r=function(e){var i=n(e),r=i.toLowerCase();return Jr(t,r)?n(t[r]):i},o=function(e){return e.replace(/{context:\w+}$/,"")},a=function(e){return e};if(i(e))return a("");if(js(e))return a(n(e.raw));if(Us(e)){var s=e.slice(1);return a(o(r(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Jr(s,t)?n(s[t]):e})))}return a(o(r(e)))},Js=function(){return Kr(Ys,Xs.get()).bind(function(e){return Kr(e,"_dir")}).exists(function(e){return"rtl"===e})},Qs=function(e){return Jr(Ys,e)},ec={getData:Gs,setCode:qs,getCode:$s,add:Zs,translate:Ks,isRtl:Js,hasCode:Qs},tc=bi.each;!function(e){e.PluginManager=e(),e.ThemeManager=e()}(V||(V={}));var nc=V,ic=function(e,t){Ho(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},rc=function(e,t){Po(e).fold(function(){Ho(e).each(function(e){ac(e,t)})},function(e){ic(e,t)})},oc=function(e,t){Bo(e).fold(function(){ac(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},ac=function(e,t){e.dom().appendChild(t.dom())},sc=function(e,t){ic(e,t),ac(t,e)},cc=function(e,t){je(t,function(t){ic(e,t)})},lc=function(e,t){je(t,function(t){ac(e,t)})},uc=function(e){e.dom().textContent="",je(Ro(e),function(e){dc(e)})},dc=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},hc=function(e){var t=Ro(e);t.length>0&&cc(e,t),dc(e)},fc=function(e,n){var i=null;return{cancel:function(){null!==i&&(t.clearTimeout(i),i=null)},throttle:function(){for(var r=[],o=0;o0?no(e,t,i.join(" ")):ao(e,t),!1},bc=function(e){return void 0!==e.dom().classList},yc=function(e){return mc(e,"class")},xc=function(e,t){return gc(e,"class",t)},wc=function(e,t){return vc(e,"class",t)},Cc=function(e,t){bc(e)?e.dom().classList.add(t):xc(e,t)},zc=function(e){0===(bc(e)?e.dom().classList:yc(e)).length&&ao(e,"class")},Sc=function(e,t){if(bc(e)){e.dom().classList.remove(t)}else wc(e,t);zc(e)},Mc=function(e,t){return bc(e)&&e.dom().classList.contains(t)},kc=function(e,t){var n=[];return je(Ro(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(kc(e,t))}),n},_c=function(e,t){return zo(t,e)},Ac=function(e,t,n){for(var i=e.dom(),r=Pe(n)?n:ge(!1);i.parentNode;){i=i.parentNode;var o=Pr.fromDom(i);if(t(o))return Ae.some(o);if(r(o))break}return Ae.none()},Tc=function(e,t,n){return R(function(e){return t(e)},Ac,e,t,n)},Dc=function(e,t,n){return Ac(e,function(e){return wo(e,t)},n)},Ec=function(e,t){return So(t,e)},Lc=function(e,t,n){return R(wo,Dc,e,t,n)},Hc=ge("mce-annotation"),Oc=ge("data-mce-annotation"),Nc=ge("data-mce-annotation-uid"),Pc=function(e,t){var n=e.selection.getRng(),i=Pr.fromDom(n.startContainer),r=Pr.fromDom(e.getBody()),o=t.fold(function(){return"."+Hc()},function(e){return"["+Oc()+'="'+e+'"]'}),a=Fo(i,n.startOffset).getOr(i),s=Lc(a,o,function(e){return Mo(e,r)}),c=function(e,t){return oo(e,t)?Ae.some(ro(e,t)):Ae.none()};return s.bind(function(t){return c(t,""+Nc()).bind(function(n){return c(t,""+Oc()).map(function(t){var i=Vc(e,n);return{uid:n,name:t,elements:i}})})})},Ic=function(e){return jr(e)&&Mc(e,Hc())},Vc=function(e,t){var n=Pr.fromDom(e.getBody());return _c(n,"["+Nc()+'="'+t+'"]')},Rc=function(e,t){var n=Pr.fromDom(e.getBody()),i=_c(n,"["+Oc()+'="'+t+'"]'),r={};return je(i,function(e){var t=ro(e,Nc()),n=r.hasOwnProperty(t)?r[t]:[];r[t]=n.concat([e])}),r},Fc=function(e,t){var n=Ws({}),i=function(){return{listeners:[],previous:Ws(Ae.none())}},r=function(e,t){o(e,function(e){return t(e),e})},o=function(e,t){var r=n.get(),o=r.hasOwnProperty(e)?r[e]:i(),a=t(o);r[e]=a,n.set(r)},a=function(e,t,n){r(e,function(i){je(i.listeners,function(i){return i(!0,e,{uid:t,nodes:We(n,function(e){return e.dom()})})})})},s=function(e){r(e,function(t){je(t.listeners,function(t){return t(!1,e)})})},c=pc(function(){var t=n.get(),i=at(Yr(t));je(i,function(t){o(t,function(n){var i=n.previous.get();return Pc(e,Ae.some(t)).fold(function(){i.isSome()&&(s(t),n.previous.set(Ae.none()))},function(e){var t=e.uid,r=e.name,o=e.elements;i.is(t)||(a(r,t,o),n.previous.set(Ae.some(t)))}),{previous:n.previous,listeners:n.listeners}})})},30);return e.on("remove",function(){c.cancel()}),e.on("NodeChange",function(){c.throttle()}),{addListener:function(e,t){o(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},Bc=function(e,t){var n=function(e){return Ae.from(e.attr(Oc())).bind(t.lookup)};e.on("init",function(){e.serializer.addNodeFilter("span",function(e){je(e,function(e){n(e).each(function(t){!1===t.persistent&&e.unwrap()})})})})},Wc=function(){var e={};return{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return e.hasOwnProperty(t)?Ae.from(e[t]).map(function(e){return e.settings}):Ae.none()}}},jc=0,Uc=function(e){var t=new Date,n=t.getTime(),i=Math.floor(1e9*Math.random());return jc++,e+"_"+i+jc+String(n)},Yc=function(e,t){je(t,function(t){Cc(e,t)})},Xc=function(e,t){return Pr.fromDom(e.dom().cloneNode(t))},Gc=function(e){return Xc(e,!1)},qc=function(e){return Xc(e,!0)},$c=function(e,n){var i=n||t.document,r=i.createElement("div");return r.innerHTML=e,Ro(Pr.fromDom(r))},Zc=function(e){return e.dom().innerHTML},Kc=function(e,t){var n=Do(e),i=n.dom(),r=Pr.fromDom(i.createDocumentFragment()),o=$c(t,i);lc(r,o),uc(e),ac(e,r)},Jc=function(e){return"\ufeff"===e},Qc=function(e){return e.replace(new RegExp("\ufeff","g"),"")},el={isZwsp:Jc,ZWSP:"\ufeff",trim:Qc},tl=ka.isElement,nl=ka.isText,il=function(e){return nl(e)&&(e=e.parentNode),tl(e)&&e.hasAttribute("data-mce-caret")},rl=function(e){return nl(e)&&el.isZwsp(e.data)},ol=function(e){return il(e)||rl(e)},al=function(e){return e.firstChild!==e.lastChild||!ka.isBr(e.firstChild)},sl=function(e,t){var n,i,r,o;if(n=e.ownerDocument,r=n.createTextNode(el.ZWSP),o=e.parentNode,t){if(i=e.previousSibling,nl(i)){if(ol(i))return i;if(fl(i))return i.splitText(i.data.length-1)}o.insertBefore(r,e)}else{if(i=e.nextSibling,nl(i)){if(ol(i))return i;if(hl(i))return i.splitText(1),i}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r},cl=function(e){var t=e.container();return!(!e||!ka.isText(t))&&(t.data.charAt(e.offset())===el.ZWSP||e.isAtStart()&&rl(t.previousSibling))},ll=function(e){var t=e.container();return!(!e||!ka.isText(t))&&(t.data.charAt(e.offset()-1)===el.ZWSP||e.isAtEnd()&&rl(t.nextSibling))},ul=function(){var e=t.document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},dl=function(e,t,n){var i,r,o;return i=t.ownerDocument,r=i.createElement(e),r.setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(ul()),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},hl=function(e){return nl(e)&&e.data[0]===el.ZWSP},fl=function(e){return nl(e)&&e.data[e.data.length-1]===el.ZWSP},pl=function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];ka.isBogus(n)&&n.parentNode.removeChild(n)},ml=function(e){return e&&e.hasAttribute("data-mce-caret")?(pl(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},gl=function(e){return il(e.startContainer)},vl=ka.isContentEditableTrue,bl=ka.isContentEditableFalse,yl=ka.isBr,xl=ka.isText,wl=ka.matchNodeNames("script style textarea"),Cl=ka.matchNodeNames("img input textarea hr iframe video audio object"),zl=ka.matchNodeNames("table"),Sl=ol,Ml=function(e){return!Sl(e)&&(xl(e)?!wl(e.parentNode):Cl(e)||yl(e)||zl(e)||_l(e))},kl=function(e){return ka.isElement(e)&&"true"===e.getAttribute("unselectable")},_l=function(e){return!1===kl(e)&&bl(e)},Al=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(_l(e))return!1;if(vl(e))return!0}return!0},Tl=function(e){return!!_l(e)&&!0!==qe(lt(e.getElementsByTagName("*")),function(e,t){return e||vl(t)},!1)},Dl=function(e){return Cl(e)||Tl(e)},El=function(e,t){return Ml(e)&&Al(e,t)},Ll=Math.round,Hl=function(e){return e?{left:Ll(e.left),top:Ll(e.top),bottom:Ll(e.bottom),right:Ll(e.right),width:Ll(e.width),height:Ll(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Ol=function(e,t){return e=Hl(e),t?e.right=e.left:(e.left=e.left+e.width,e.right=e.left),e.width=0,e},Nl=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},Pl=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},Il=function(e,t){return e.bottom-e.height/2t.bottom)&&Pl(t.top-e.bottom,e,t)},Vl=function(e,t){return e.top>t.bottom||!(e.bottom=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Fl=function(e,t){return t.left>e.left&&t.righte.top&&t.bottom=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},Yl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),Xl=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&Yl.test(e)},Gl=function(e,t){for(var n=[],i=0;i0?n[0]:e.getBoundingClientRect()),!uu(e)&&ou(e)&&pu(t)?hu(e):pu(t)&&uu(e)?fu(e):t},gu=function(e,t){var n=Ol(e,t);return n.width=1,n.right=n.left+1,n},vu=function(e){var t,n,i=[],r=function(e){0!==e.height&&(i.length>0&&Nl(e,i[i.length-1])||i.push(e))},o=function(e,t){var n=cu(e.ownerDocument);if(t0&&(n.setStart(e,t-1),n.setEnd(e,t),du(n)||r(gu(mu(n),!1))),t=o.length?(r="after",i=o.length-1):r="before",n=o[i]),s.push(Au(n)),a=Tu(e,n),a=oi.filter(a,be(ka.isBogus)),s=s.concat(oi.map(a,function(e){return Au(e)})),s.reverse().join("/")+","+r},Eu=function(e,t,n){var i=Su(e);return i=oi.filter(i,function(e,t){return!xu(e)||!xu(i[t-1])}),i=oi.filter(i,ka.matchNodeNames(t)),i[n]},Lu=function(e,t){for(var n,i=e,r=0;xu(i);){if(n=i.data.length,t>=r&&t<=r+n){e=i,t-=r;break}if(!xu(i.nextSibling)){e=i,t=n;break}r+=n,i=i.nextSibling}return xu(e)&&t>e.data.length&&(t=e.data.length),yu(e,t)},Hu=function(e,t){var n,i,r;return t?(n=t.split(","),t=n[0].split("/"),r=n.length>1?n[1]:"before",i=oi.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),Eu(e,t[1],parseInt(t[2],10))):null},e),i?xu(i)?Lu(i,parseInt(r,10)):(r="after"===r?Cu(i)+1:Cu(i),yu(i.parentNode,r)):null):null},Ou=function(e,t){ka.isText(t)&&0===t.data.length&&e.remove(t)},Nu=function(e,t,n){t.insertNode(n),Ou(e,n.previousSibling),Ou(e,n.nextSibling)},Pu=function(e,t,n){var i=Ae.from(n.firstChild),r=Ae.from(n.lastChild);t.insertNode(n),i.each(function(t){return Ou(e,t.previousSibling)}),r.each(function(t){return Ou(e,t.nextSibling)})},Iu=function(e,t,n){ka.isDocumentFragment(n)?Pu(e,t,n):Nu(e,t,n)},Vu=ka.isContentEditableFalse,Ru=function(e,t,n){var i,r;for(r=e(t.data.slice(0,n)).length,i=t.previousSibling;i&&ka.isText(i);i=i.previousSibling)r+=e(i.data).length;return r},Fu=function(e,t,n,i,r){var o,a=i[r?"startContainer":"endContainer"],s=i[r?"startOffset":"endOffset"],c=[],l=0,u=e.getRoot();for(ka.isText(a)?c.push(n?Ru(t,a,s):s):(o=a.childNodes,s>=o.length&&o.length&&(l=1,s=Math.max(0,o.length-1)),c.push(e.nodeIndex(o[s],n)+l));a&&a!==u;a=a.parentNode)c.push(e.nodeIndex(a,n));return c},Bu=function(e,t,n,i){var r=t.dom,o={};return o.start=Fu(r,e,n,i,!0),t.isCollapsed()||(o.end=Fu(r,e,n,i,!1)),o},Wu=function(e,t,n){var i=0;return bi.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void i++}),i},ju=function(e,t){var n,i,r,o=t?"start":"end";n=e[o+"Container"],i=e[o+"Offset"],ka.isElement(n)&&"TR"===n.nodeName&&(r=n.childNodes,(n=r[Math.min(t?i:i-1,r.length-1)])&&(i=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,i)))},Uu=function(e){return ju(e,!0),ju(e,!1),e},Yu=function(e,t){var n;if(ka.isElement(e)&&(e=Ul(e,t),Vu(e)))return e;if(ol(e)){if(ka.isText(e)&&il(e)&&(e=e.parentNode),n=e.previousSibling,Vu(n))return n;if(n=e.nextSibling,Vu(n))return n}},Xu=function(e){return Yu(e.startContainer,e.startOffset)||Yu(e.endContainer,e.endOffset)},Gu=function(e,t,n){var i=n.getNode(),r=i?i.nodeName:null,o=n.getRng();if(Vu(i)||"IMG"===r)return{name:r,index:Wu(n.dom,r,i)};var a=Xu(o);return a?(r=a.tagName,{name:r,index:Wu(n.dom,r,a)}):Bu(e,n,t,o)},qu=function(e){var t=e.getRng();return{start:Du(e.dom.getRoot(),yu.fromRangeStart(t)),end:Du(e.dom.getRoot(),yu.fromRangeEnd(t))}},$u=function(e){return{rng:e.getRng()}},Zu=function(e,t,n){var i={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",i,""):e.create("span",i)},Ku=function(e,t){var n=e.dom,i=e.getRng(),r=n.uniqueId(),o=e.isCollapsed(),a=e.getNode(),s=a.nodeName;if("IMG"===s)return{name:s,index:Wu(n,s,a)};var c=Uu(i.cloneRange());if(!o){c.collapse(!1);var l=Zu(n,r+"_end",t);Iu(n,c,l)}i=Uu(i),i.collapse(!0);var u=Zu(n,r+"_start",t);return Iu(n,i,u),e.moveToBookmark({id:r,keep:1}),{id:r}},Ju=function(e,t,n){return 2===t?Gu(el.trim,n,e):3===t?qu(e):t?$u(e):Ku(e,!1)},Qu={getBookmark:Ju,getUndoBookmark:n(Gu,ve,!0),getPersistentBookmark:Ku},ed=function(e){return ka.isElement(e)&&"_mce_caret"===e.id},td=function(e,t){for(;t&&t!==e;){if("_mce_caret"===t.id)return t;t=t.parentNode}return null},nd=ka.isElement,id=ka.isText,rd=function(e){var t=e.parentNode;t&&t.removeChild(e)},od=function(e){try{return e.nodeValue}catch(e){return""}},ad=function(e,t){0===t.length?rd(e):e.nodeValue=t},sd=function(e){var t=el.trim(e);return{count:e.length-t.length,text:t}},cd=function(e,t){return pd(e),t},ld=function(e,t){var n=sd(e.data.substr(0,t.offset())),i=sd(e.data.substr(t.offset())),r=n.text+i.text;return r.length>0?(ad(e,r),yu(e,t.offset()-n.count)):t},ud=function(e,t){var n=t.container(),i=Re(lt(n.childNodes),e).map(function(e){return e0&&(n&&(a*=-1),c.left+=a,c.right+=a),c},xd=function(e){var t,n,i,r,o;for(t=Ji("*[contentEditable=false]",e),r=0;r ').css(a).appendTo(e)[0];return o.set(Ae.some({caret:u,element:i,before:n})),o.get().each(function(e){n&&Ji(e.caret).addClass("mce-visual-caret-before")}),c(),l=i.ownerDocument.createRange(),l.setStart(r,0),l.setEnd(r,0),l},s=function(){xd(e),r&&(md.remove(r),r=null),o.get().each(function(e){Ji(e.caret).remove(),o.set(Ae.none())}),Jt.clearInterval(i)},c=function(){i=Jt.setInterval(function(){n()?Ji("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):Ji("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")},500)},l=function(){o.get().each(function(t){var n=yd(e,t.element,t.before);Ji(t.caret).css(Bs({},n))})},u=function(){return Jt.clearInterval(i)};return{show:a,hide:s,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:l,destroy:u}},Cd=function(){return gd.isIE()||gd.isEdge()||gd.isFirefox()},zd=function(e){return vd(e)||ka.isTable(e)&&Cd()},Sd=ka.isContentEditableFalse,Md=ka.matchStyleValues("display","block table table-cell table-caption list-item"),kd=ol,_d=il,Ad=ka.isElement,Td=Ml,Dd=function(e){return e>0},Ed=function(e){return e<0},Ld=function(e,t){for(var n;n=e(t);)if(!_d(n))return n;return null},Hd=function(e,t,n,i,r){var o=new _a(e,i);if(Ed(t)){if((Sd(e)||_d(e))&&(e=Ld(o.prev,!0),n(e)))return e;for(;e=Ld(o.prev,r);)if(n(e))return e}if(Dd(t)){if((Sd(e)||_d(e))&&(e=Ld(o.next,!0),n(e)))return e;for(;e=Ld(o.next,r);)if(n(e))return e}return null},Od=function(e,t){for(;e&&e!==t;){if(Md(e))return e;e=e.parentNode}return null},Nd=function(e,t,n){return Od(e.container(),n)===Od(t.container(),n)},Pd=function(e,t){var n,i;return t?(n=t.container(),i=t.offset(),Ad(n)?n.childNodes[i+e]:null):null},Id=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Vd=function(e,t,n){return Od(t,e)===Od(n,e)},Rd=function(e,t,n){var i,r;for(r=e?"previousSibling":"nextSibling";n&&n!==t;){if(i=n[r],kd(i)&&(i=i[r]),Sd(i)){if(Vd(t,i,n))return i;break}if(Td(i))break;n=n.parentNode}return null},Fd=n(Id,!0),Bd=n(Id,!1),Wd=function(e,t,i){var r,o,a,s,c=n(Rd,!0,t),l=n(Rd,!1,t);if(o=i.startContainer,a=i.startOffset,il(o)){if(Ad(o)||(o=o.parentNode),"before"===(s=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,zd(r)))return Fd(r);if("after"===s&&(r=o.previousSibling,zd(r)))return Bd(r)}if(!i.collapsed)return i;if(ka.isText(o)){if(kd(o)){if(1===e){if(r=l(o))return Fd(r);if(r=c(o))return Bd(r)}if(-1===e){if(r=c(o))return Bd(r);if(r=l(o))return Fd(r)}return i}if(fl(o)&&a>=o.data.length-1)return 1===e&&(r=l(o))?Fd(r):i;if(hl(o)&&a<=1)return-1===e&&(r=c(o))?Bd(r):i;if(a===o.data.length)return r=l(o),r?Fd(r):i;if(0===a)return r=c(o),r?Bd(r):i}return i},jd=function(e,t){return Ae.from(Pd(e?0:-1,t)).filter(Sd)},Ud=function(e,t,n){var i=Wd(e,t,n);return-1===e?F.fromRangeStart(i):F.fromRangeEnd(i)},Yd=function(e){return Ae.from(e.getNode()).map(Pr.fromDom)},Xd=function(e){return Ae.from(e.getNode(!0)).map(Pr.fromDom)},Gd=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},qd=function(e,t){var n=Nd(e,t);return!(n||!ka.isBr(e.getNode()))||n};!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(bu||(bu={}));var $d=ka.isContentEditableFalse,Zd=ka.isText,Kd=ka.isElement,Jd=ka.isBr,Qd=Ml,eh=Dl,th=El,nh=function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n},ih=function(e,t){return e.hasChildNodes()&&t
0)return yu(c,--l);if(Dd(e)&&l0&&(r=ih(c,l-1),Qd(r)))return!eh(r)&&(o=Hd(r,e,th,r))?Zd(o)?yu(o,o.data.length):yu.after(o):Zd(r)?yu(r,r.data.length):yu.before(r);if(Dd(e)&&l '),t},Ah=function(e,t){var n,i;return n=e.createRng(),i=Hu(e.getRoot(),t.start),n.setStart(i.container(),i.offset()),i=Hu(e.getRoot(),t.end),n.setEnd(i.container(),i.offset()),n},Th=function(e,t){var n=e.ownerDocument.createTextNode(el.ZWSP);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)},Dh=function(e){return!1===e.hasChildNodes()},Eh=function(e,t){return wh.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},Lh=function(e,t,n){return!(!Dh(t)||!td(e,t))&&(Th(t,n),!0)},Hh=function(e,t,n,i){var r,o,a,s,c=n[t?"start":"end"],l=e.getRoot();if(c){for(a=c[0],o=l,r=c.length-1;r>=1;r--){if(s=o.childNodes,Lh(l,o,i))return!0;if(c[r]>s.length-1)return!!Lh(l,o,i)||Eh(o,i);o=s[c[r]]}3===o.nodeType&&(a=Math.min(c[0],o.nodeValue.length)),1===o.nodeType&&(a=Math.min(c[0],o.childNodes.length)),t?i.setStart(o,a):i.setEnd(o,a)}return!0},Oh=function(e){return ka.isText(e)&&e.data.length>0},Nh=function(e,t,n){var i,r,o,a,s,c,l=e.get(n.id+"_"+t),u=n.keep;if(l){if(i=l.parentNode,"start"===t?(u?l.hasChildNodes()?(i=l.firstChild,r=1):Oh(l.nextSibling)?(i=l.nextSibling,r=0):Oh(l.previousSibling)?(i=l.previousSibling,r=l.previousSibling.data.length):(i=l.parentNode,r=e.nodeIndex(l)+1):r=e.nodeIndex(l),s=i,c=r):(u?l.hasChildNodes()?(i=l.firstChild,r=1):Oh(l.previousSibling)?(i=l.previousSibling,r=l.previousSibling.data.length):(i=l.parentNode,r=e.nodeIndex(l)):r=e.nodeIndex(l),s=i,c=r),!u){for(a=l.previousSibling,o=l.nextSibling,bi.each(bi.grep(l.childNodes),function(e){ka.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});l=e.get(n.id+"_"+t);)e.remove(l,!0);a&&o&&a.nodeType===o.nodeType&&ka.isText(a)&&!Ut.opera&&(r=a.nodeValue.length,a.appendData(o.nodeValue),e.remove(o),s=a,c=r)}return Ae.some(yu(s,c))}return Ae.none()},Ph=function(e,t){return e.isSome()?e:t},Ih=function(e,t){var n=e.createRng();return Hh(e,!0,t,n)&&Hh(e,!1,t,n)?Ae.some(n):Ae.none()},Vh=function(e,t){var n=Nh(e,"start",t),i=Nh(e,"end",t);return Gl([n,Ph(i,n)],function(t,n){var i=e.createRng();return i.setStart(_h(e,t.container()),t.offset()),i.setEnd(_h(e,n.container()),n.offset()),i})},Rh=function(e,t){return Ae.from(e.select(t.name)[t.index]).map(function(t){var n=e.createRng();return n.selectNode(t),n})},Fh=function(e,t){var n=e.dom;if(t){if(kh(t))return Ih(n,t);if(Ch(t))return Ae.some(Ah(n,t));if(Sh(t))return Vh(n,t);if(Mh(t))return Rh(n,t);if(zh(t))return Ae.some(t.rng)}return Ae.none()},Bh={resolve:Fh},Wh=function(e,t,n){return Qu.getBookmark(e,t,n)},jh=function(e,t){Bh.resolve(e,t).each(function(t){e.setRng(t)})},Uh=function(e){return ka.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Yh={getBookmark:Wh,moveToBookmark:jh,isBookmarkNode:Uh},Xh=function(e){return e&&/^(IMG)$/.test(e.nodeName)},Gh=function(e,t,n){var i,r,o,a=n.startOffset,s=n.startContainer;if((n.startContainer!==n.endContainer||!Xh(n.startContainer.childNodes[n.startOffset]))&&1===s.nodeType)for(o=s.childNodes,a0&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&n.offset>1&&(e=n.node,e.splitText(n.offset-1))}return e},hf=function(e){return"BR"===e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling},ff=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},pf=function(e,t,n,i){var r,o,a=n.nodeValue;return void 0===i&&(i=e?a.length:0),e?(r=a.lastIndexOf(" ",i),o=a.lastIndexOf(" ",i),-1!==(r=r>o?r:o)&&!t&&(r0:on.length-1?t=n.length-1:t<0&&(t=0),n[t]||e},zf=function(e,t,n){var i,r,o,a,s,c,l,u=t.startContainer,d=t.startOffset,h=t.endContainer,f=t.endOffset;if(l=e.select("td[data-mce-selected],th[data-mce-selected]"),l.length>0)return void wf(l,function(e){n([e])});var p=function(e){var t;return t=e[0],3===t.nodeType&&t===u&&d>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===h&&3===t.nodeType&&e.splice(e.length-1,1),e},m=function(e,t,n){for(var i=[];e&&e!==n;e=e[t])i.push(e);return i},g=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},v=function(e,t,i){var r=i?"nextSibling":"previousSibling";for(a=e,s=a.parentNode;a&&a!==t;a=s)s=a.parentNode,c=m(a===e?a:a[r],r),c.length&&(i||c.reverse(),n(p(c)))};if(1===u.nodeType&&u.hasChildNodes()&&(u=u.childNodes[d]),1===h.nodeType&&h.hasChildNodes()&&(h=Cf(h,f)),u===h)return n(p([u]));for(i=e.findCommonAncestor(u,h),a=u;a;a=a.parentNode){if(a===h)return v(u,i,!0);if(a===i)break}for(a=h;a;a=a.parentNode){if(a===u)return v(h,i);if(a===i)break}r=g(u,i)||u,o=g(h,i)||h,v(u,r,!0),c=m(r===u?r:r.nextSibling,"nextSibling",o===h?o.nextSibling:o),c.length&&n(p(c)),v(h,o)},Sf={walk:zf},Mf=function(e,t){var n=function(n){if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return a(n).getOr("")},i=function(e){try{return r(e)}catch(e){return Ae.none()}},r=function(t){return e(t)?Ae.from(t.dom().nodeValue):Ae.none()},o=Dr.detect().browser,a=o.isIE()&&10===o.version.major?i:r;return{get:n,getOption:a,set:function(n,i){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom().nodeValue=i}}}(Ur,"text"),kf=function(e){return Mf.get(e)},_f=function(e){return Ur(e)&&"\ufeff"===kf(e)},Af=function(e,t,n,i){return Ho(t).fold(function(){return"skipping"},function(r){return"br"===i||_f(t)?"valid":Ic(t)?"existing":ed(t)?"caret":of.isValid(e,n,i)&&of.isValid(e,Fr(r),n)?"valid":"invalid-child"})},Tf=function(e){return 3===e.startContainer.nodeType&&e.startContainer.nodeValue.length>=e.startOffset&&" "===e.startContainer.nodeValue[e.startOffset]},Df=function(e,t){var n=xf.expandRng(e,t,[{inline:!0}],Tf(t));t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},Ef=function(e,t,n,i){var r=t.uid,o=void 0===r?Uc("mce-annotation"):r,a=w(t,["uid"]),s=Pr.fromTag("span",e);Cc(s,Hc()),no(s,""+Nc(),o),no(s,""+Oc(),n);var c=i(o,a),l=c.attributes,u=void 0===l?{}:l,d=c.classes,h=void 0===d?[]:d;return io(s,u),Yc(s,h),s},Lf=function(e,t,n,i,r){var o=[],a=Ef(e.getDoc(),r,n,i),s=Ws(Ae.none()),c=function(){s.set(Ae.none())},l=function(){return s.get().getOrThunk(function(){var e=Gc(a);return o.push(e),s.set(Ae.some(e)),e})},u=function(e){je(e,d)},d=function(t){switch(Af(e,t,"span",Fr(t))){case"invalid-child":c();var n=Ro(t);u(n),c();break;case"valid":var i=l();sc(t,i)}},h=function(e){var t=We(e,Pr.fromDom);u(t)};return Sf.walk(e.dom,t,function(e){c(),h(e)}),o},Hf=function(e,t,n,i){e.undoManager.transact(function(){var r=e.selection.getRng();if(r.collapsed&&Df(e,r),e.selection.getRng().collapsed){var o=Ef(e.getDoc(),i,t,n.decorate);Kc(o," "),e.selection.getRng().insertNode(o.dom()),e.selection.select(o.dom())}else{var a=Qu.getPersistentBookmark(e.selection,!1),s=e.selection.getRng();Lf(e,s,t,n.decorate,i),e.selection.moveToBookmark(a)}})},Of=function(e){var t=Wc();Bc(e,t);var n=Fc(e);return{register:function(e,n){t.register(e,n)},annotate:function(n,i){t.lookup(n).each(function(t){Hf(e,n,t,i)})},annotationChanged:function(e,t){n.addListener(e,t)},remove:function(t){Pc(e,Ae.some(t)).each(function(e){var t=e.elements;je(t,hc)})},getAll:function(t){var n=Rc(e,t);return qr(n,function(e){return We(e,function(e){return e.dom()})})}}},Nf=/^[ \t\r\n]*$/,Pf={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},If=function(e,t,n){var i,r,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(i=e[a])return i;for(r=e.parent;r&&r!==t;r=r.parent)if(i=r[a])return i}},Vf=function(){function e(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var i,r;if(i=new e(t,Pf[t]||1),n)for(r in n)i.attr(r,n[r]);return i},e.prototype.replace=function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},e.prototype.attr=function(e,t){var n,i,r=this;if("string"!=typeof e){for(i in e)r.attr(i,e[i]);return r}if(n=r.attributes){if(void 0!==t){if(null===t){if(e in n.map)for(delete n.map[e],i=n.length;i--;)if(n[i].name===e)return n=n.splice(i,1),r;return r}if(e in n.map){for(i=n.length;i--;)if(n[i].name===e){n[i].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}return n.map[e]}},e.prototype.clone=function(){var t,n,i,r,o,a=this,s=new e(a.name,a.type);if(i=a.attributes){for(o=[],o.map={},t=0,n=i.length;t/g,"")},Bf=function(e,t){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?!1===e.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t))},Wf=function(e,t,n){var i,r,o,a,s=1;for(a=e.getShortEndedElements(),o=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,o.lastIndex=i=n;r=o.exec(t);){if(i=o.lastIndex,"/"===r[1])s--;else if(!r[1]){if(r[2]in a)continue;s++}if(0===s)break}return i},jf=function(e,t){var n=e.exec(t);if(n){var i=n[1],r=n[2];return"string"==typeof i&&"data-mce-bogus"===i.toLowerCase()?r:null}return null};!function(e){e.findEndTag=Wf}(B||(B={}));var Uf,Yf=B,Xf=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")},Gf=function(e,t){var n,i,r,o,a,s=t,c=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,l=e.schema;for(s=Xf(e.getTempAttrs(),s),a=l.getShortEndedElements();o=c.exec(s);)i=c.lastIndex,r=o[0].length,n=a[o[1]]?i:Yf.findEndTag(l,s,i),s=s.substring(0,i-r)+s.substring(n),c.lastIndex=i-r;return el.trim(s)},qf=Gf,$f={trimExternal:qf,trimInternal:Gf},Zf=function(e,t,n){var i=e.getParam(t,n);if(-1!==i.indexOf("=")){var r=e.getParam(t,"","hash");return r.hasOwnProperty(e.id)?r[e.id]:n}return i},Kf=function(e){return e.getParam("iframe_attrs",{})},Jf=function(e){return e.getParam("doctype","")},Qf=function(e){return e.getParam("document_base_url","")},ep=function(e){return Zf(e,"body_id","tinymce")},tp=function(e){return Zf(e,"body_class","")},np=function(e){return e.getParam("content_security_policy","")},ip=function(e){return e.getParam("br_in_pre",!0)},rp=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},op=function(e){return e.getParam("forced_root_block_attrs",{})},ap=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},sp=function(e){return e.getParam("no_newline_selector","")},cp=function(e){return e.getParam("keep_styles",!0)},lp=function(e){return e.getParam("end_container_on_empty_block",!1)},up=function(e){return bi.explode(e.getParam("font_size_style_values",""))},dp=function(e){return bi.explode(e.getParam("font_size_classes",""))},hp=function(e){return e.getParam("images_dataimg_filter",ge(!0),"function")},fp=function(e){return e.getParam("automatic_uploads",!0,"boolean")},pp=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},mp=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},gp=function(e){return e.getParam("images_upload_url","","string")},vp=function(e){return e.getParam("images_upload_base_path","","string")},bp=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},yp=function(e){return e.getParam("images_upload_handler",null,"function")},xp=function(e){return e.getParam("content_css_cors",!1,"boolean")},wp=function(e){return e.getParam("language","en","string")},Cp=function(e){return e.getParam("language_url","","string")},zp=function(e){return e.getParam("indent_use_margin",!1)},Sp=function(e){return e.getParam("indentation","40px","string")},Mp=function(e){var t=e.settings.content_css;return Ee(t)?We(t.split(","),yr):He(t)?t:!1===t||e.inline?[]:["default"]},kp=function(e){return e.getParam("directionality",ec.isRtl()?"rtl":void 0)},_p={getIframeAttrs:Kf,getDocType:Jf,getDocumentBaseUrl:Qf,getBodyId:ep,getBodyClass:tp,getContentSecurityPolicy:np,shouldPutBrInPre:ip,getForcedRootBlock:rp,getForcedRootBlockAttrs:op,getBrNewLineSelector:ap,getNoNewLineSelector:sp,shouldKeepStyles:cp,shouldEndContainerOnEmptyBlock:lp,getFontStyleValues:up,getFontSizeClasses:dp,getImagesDataImgFilter:hp,isAutomaticUploadsEnabled:fp,shouldReuseFileName:pp,shouldReplaceBlobUris:mp,getImageUploadUrl:gp,getImageUploadBasePath:vp,getImagesUploadCredentials:bp,getImagesUploadHandler:yp,shouldUseContentCssCors:xp,getLanguageCode:wp,getLanguageUrl:Cp,shouldIndentUseMargin:zp,getIndentation:Sp,getContentCss:Mp,getDirectionality:kp},Ap=function(e,t){var n=_p.getForcedRootBlock(e),i=new RegExp("^(<"+n+"[^>]*>( | |\\s| | |)<\\/"+n+">[\r\n]*| [\r\n]*)$");return t.replace(i,"")},Tp=function(e,t,n){var i;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)i=bi.trim($f.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)i=el.trim(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);i=Ap(e,e.serializer.serialize(n,t))}return"text"===t.format||$a(Pr.fromDom(n))?t.content=i:t.content=bi.trim(i),t.no_events||e.fire("GetContent",t),t.content},Dp=function(e,t){return void 0===t&&(t={}),Ae.from(e.getBody()).fold(ge("tree"===t.format?new Vf("body",11):""),function(n){return Tp(e,t,n)})},Ep=bi.makeMap,Lp=function(e){var t,n,i,r,o,a=[];return e=e||{},t=e.indent,n=Ep(e.indent_before||""),i=Ep(e.indent_after||""),r=ps.getEncodeFunc(e.entity_encoding||"raw",e.entities),o="html"===e.element_format,{start:function(e,s,c){var l,u,d,h;if(t&&n[e]&&a.length>0&&(h=a[a.length-1],h.length>0&&"\n"!==h&&a.push("\n")),a.push("<",e),s)for(l=0,u=s.length;l":" />",c&&t&&i[e]&&a.length>0&&(h=a[a.length-1],h.length>0&&"\n"!==h&&a.push("\n"))},end:function(e){var n;a.push("",e,">"),t&&i[e]&&a.length>0&&(n=a[a.length-1],n.length>0&&"\n"!==n&&a.push("\n"))},text:function(e,t){e.length>0&&(a[a.length]=t?e:r(e))},cdata:function(e){a.push("")},comment:function(e){a.push("\x3c!--",e,"--\x3e")},pi:function(e,n){n?a.push("",e," ",r(n),"?>"):a.push("",e,"?>"),t&&a.push("\n")},doctype:function(e){a.push("",t?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},Hp=function(e,t){void 0===t&&(t=b());var n=Lp(e);return e=e||{},e.validate=!("validate"in e)||e.validate,{serialize:function(i){var r,o;o=e.validate,r={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)do{a(e)}while(e=e.next)}},n.reset();var a=function(e){var i,s,c,l,u,d,h,f,p,m=r[e.type];if(m)m(e);else{if(i=e.name,s=e.shortEnded,c=e.attributes,o&&c&&c.length>1&&(d=[],d.map={},p=t.getElementRule(e.name))){for(h=0,f=p.attributesOrder.length;hn?n:e<0?0:e},Yp=function(e){return Wp(e.start(),Up(e.soffset(),e.start()),e.finish(),Up(e.foffset(),e.finish()))},Xp=function(e,t){return To(e,t)||Mo(e,t)},Gp=function(e){return function(t){return Xp(e,t.start())&&Xp(e,t.finish())}},qp=function(e){return!0===e.inline||jp.isIE()},$p=function(e){return Wp(Pr.fromDom(e.startContainer),e.startOffset,Pr.fromDom(e.endContainer),e.endOffset)},Zp=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?Ae.from(t.getRangeAt(0)):Ae.none()).map($p)},Kp=function(e){var t=Lo(e);return Zp(t.dom()).filter(Gp(e))},Jp=function(e,t){return Ae.from(t).filter(Gp(e)).map(Yp)},Qp=function(e){var n=t.document.createRange();try{return n.setStart(e.start().dom(),e.soffset()),n.setEnd(e.finish().dom(),e.foffset()),Ae.some(n)}catch(e){return Ae.none()}},em=function(e){var t=qp(e)?Kp(Pr.fromDom(e.getBody())):Ae.none();e.bookmark=t.isSome()?t:e.bookmark},tm=function(e,t){var n=Pr.fromDom(e.getBody()),i=qp(e)?Ae.from(t):Ae.none(),r=i.map($p).filter(Gp(n));e.bookmark=r.isSome()?r:e.bookmark},nm=function(e){return(e.bookmark?e.bookmark:Ae.none()).bind(n(Jp,Pr.fromDom(e.getBody()))).bind(Qp)},im=function(e){nm(e).each(function(t){e.selection.setRng(t)})},rm={store:em,storeNative:tm,readRange:Zp,restore:im,getRng:nm,getBookmark:Kp,validate:Jp},om=function(e,t){return e.dom.getParent(t,function(t){return"true"===e.dom.getContentEditable(t)})},am=function(e){return e.collapsed?Ae.from(Ul(e.startContainer,e.startOffset)).map(Pr.fromDom):Ae.none()},sm=function(e,t){return am(t).bind(function(t){return Ga(t)?Ae.some(t):!1===To(e,t)?Ae.some(e):Ae.none()})},cm=function(e,t){sm(Pr.fromDom(e.getBody()),t).bind(function(e){return wh.firstPositionIn(e.dom())}).fold(function(){e.selection.normalize()},function(t){return e.selection.setRng(t.toRange())})},lm=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},um=function(e){return Ip(e)||Rp(e).isSome()},dm=function(e){return e.iframeElement&&Ip(Pr.fromDom(e.iframeElement))},hm=function(e){var t=e.getBody();return t&&um(Pr.fromDom(t))},fm=function(e){return e.inline?hm(e):dm(e)},pm=function(e){var t=e.selection,n=e.getBody(),i=t.getRng();e.quirks.refreshContentEditable();var r=om(e,t.getNode());if(e.$.contains(n,r))return lm(r),cm(e,i),void mm(e);void 0!==e.bookmark&&!1===fm(e)&&rm.getRng(e).each(function(t){e.selection.setRng(t),i=t}),e.inline||(Ut.opera||lm(n),e.getWin().focus()),(Ut.gecko||e.inline)&&(lm(n),cm(e,i)),mm(e)},mm=function(e){return e.editorManager.setActive(e)},gm=function(e,t){e.removed||(t?mm(e):pm(e))},vm={focus:gm,hasFocus:fm},bm=function(e){return e instanceof Vf},ym=function(e){vm.hasFocus(e)&&wh.firstPositionIn(e.getBody()).each(function(t){var n=t.getNode(),i=ka.isTable(n)?wh.firstPositionIn(n).getOr(t):t;e.selection.setRng(i.toRange())})},xm=function(e,t){e.dom.setHTML(e.getBody(),t),ym(e)},wm=function(e,t,n,i){var r,o;return 0===n.length||/^\s+$/.test(n)?(o=' ',"TABLE"===t.nodeName?n=""+o+" ":/^(UL|OL)$/.test(t.nodeName)&&(n=""+o+" "),r=_p.getForcedRootBlock(e),r&&e.schema.isValidChild(t.nodeName.toLowerCase(),r.toLowerCase())?(n=o,n=e.dom.createHTML(r,e.settings.forced_root_block_attrs,n)):n||(n=' '),xm(e,n),e.fire("SetContent",i)):("raw"!==i.format&&(n=Hp({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),i.content=$a(Pr.fromDom(t))?n:bi.trim(n),xm(e,i.content),i.no_events||e.fire("SetContent",i)),i.content},Cm=function(e,t,n,i){Pp(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var r=Hp({validate:e.validate},e.schema).serialize(n);return i.content=$a(Pr.fromDom(t))?r:bi.trim(r),xm(e,i.content),i.no_events||e.fire("SetContent",i),n},zm=function(e,t,n){return void 0===n&&(n={}),n.format=n.format?n.format:"html",n.set=!0,n.content=bm(t)?"":t,bm(t)||n.no_events||(e.fire("BeforeSetContent",n),t=n.content),Ae.from(e.getBody()).fold(ge(t),function(i){return bm(t)?Cm(e,i,t,n):wm(e,i,t,n)})},Sm=function(e,t){return e.fire("PreProcess",t)},Mm=function(e,t){return e.fire("PostProcess",t)},km=function(e){return e.fire("remove")},_m=function(e){return e.fire("detach")},Am=function(e,t){return e.fire("SwitchMode",{mode:t})},Tm=function(e,t,n,i){e.fire("ObjectResizeStart",{target:t,width:n,height:i})},Dm=function(e,t,n,i){e.fire("ObjectResized",{target:t,width:n,height:i})},Em={firePreProcess:Sm,firePostProcess:Mm,fireRemove:km,fireDetach:_m,fireSwitchMode:Am,fireObjectResizeStart:Tm,fireObjectResized:Dm},Lm=Ns.DOM,Hm=function(e){Lm.setStyle(e.id,"display",e.orgDisplay)},Om=function(e){return Ae.from(e).each(function(e){return e.destroy()})},Nm=function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)},Pm=function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),Lm.unbind(t,"submit reset",e.formEventDelegate))},Im=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,i=e.getBody(),r=e.getElement();i&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&r&&Lm.remove(r.nextSibling),Em.fireRemove(e),e.editorManager.remove(e),!e.inline&&i&&Hm(e),Em.fireDetach(e),Lm.remove(e.getContainer()),Om(t),Om(n),e.destroy()}},Vm=function(e,t){var n=e.selection,i=e.dom;if(!e.destroyed){if(!t&&!e.removed)return void e.remove();t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Om(n),Om(i)),Pm(e),Nm(e),e.destroyed=!0}},Rm=uo("sections","settings"),Fm=Dr.detect(),Bm=Fm.deviceType.isTouch(),Wm=Fm.deviceType.isPhone(),jm=["lists","autolink","autosave"],Um=Wm?{theme:"mobile"}:{},Ym=function(e){var t=He(e)?e.join(" "):e,n=We(Ee(t)?t.split(" "):[],yr);return Xe(n,function(e){return e.length>0})},Xm=function(e){return Xe(e,n(Fe,jm))},Gm=function(e,t){var n=Zr(t,function(t,n){return Fe(e,n)});return Rm(n.t,n.f)},qm=function(e,t,n){var i=e.sections(),r=i.hasOwnProperty(t)?i[t]:{};return bi.extend({},n,r)},$m=function(e,t){return e.sections().hasOwnProperty(t)},Zm=function(e,t,n){return{id:e,theme:"silver",popup_css:"",plugins:"",document_base_url:t,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:n.convertURL,url_converter_scope:n,ie7_compat:!0}},Km=function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?bi.extend({},e.external_plugins,n):n},Jm=function(e,t){return[].concat(Ym(e)).concat(Ym(t))},Qm=function(e,t,n,i){var r=Ym(n.forced_plugins),o=Ym(i.plugins),a=e&&$m(t,"mobile")?Xm(o):o,s=Jm(r,a);return bi.extend(i,{plugins:s.join(" ")})},eg=function(e,t){var n=t.settings().inline;return e&&!n},tg=function(e,t,n,i){var r=Gm(["mobile"],i),o=bi.extend(t,n,r.settings(),eg(e,r)?qm(r,"mobile",Um):{},{validate:!0,external_plugins:Km(n,r.settings())});return Qm(e,r,n,o)},ng=function(e,t,n,i,r){var o=Zm(t,n,e);return tg(Bm,o,i,r)},ig=function(e,t,n){return Ae.from(t.settings[n]).filter(e)},rg=n(ig,Ee),og=function(e){var t={};return"string"==typeof e?je(e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(e){var n=e.split("=");n.length>1?t[bi.trim(n[0])]=bi.trim(n[1]):t[bi.trim(n[0])]=bi.trim(n[0])}):t=e,t},ag=function(e){return function(t){return He(t)&&tt(t,e)}},sg=function(e,t,n,i){var r=t in e.settings?e.settings[t]:n;return"hash"===i?og(r):"string"===i?ig(Ee,e,t).getOr(n):"number"===i?ig(Ie,e,t).getOr(n):"boolean"===i?ig(Ne,e,t).getOr(n):"object"===i?ig(Le,e,t).getOr(n):"array"===i?ig(He,e,t).getOr(n):"string[]"===i?ig(ag(Ee),e,t).getOr(n):"function"===i?ig(Pe,e,t).getOr(n):r},cg=function(e,t){return t.dom()[e]},lg=function(e,t){return parseInt(so(t,e),10)},ug=n(cg,"clientWidth"),dg=n(cg,"clientHeight"),hg=n(lg,"margin-top"),fg=n(lg,"margin-left"),pg=function(e){return e.dom().getBoundingClientRect()},mg=function(e,t,n){var i=ug(e),r=dg(e);return t>=0&&n>=0&&t<=i&&n<=r},gg=function(e,t,n,i){var r=pg(t);return{x:n-(e?r.left+t.dom().clientLeft+fg(t):0),y:i-(e?r.top+t.dom().clientTop+hg(t):0)}},vg=function(e,t,n){var i=Pr.fromDom(e.getBody()),r=e.inline?i:Eo(i),o=gg(e.inline,r,t,n);return mg(r,o.x,o.y)},bg=function(e){return Ae.from(e).map(Pr.fromDom)},yg=function(e){var t=e.inline?e.getBody():e.getContentAreaContainer();return bg(t).map(function(e){return To(Do(e),e)}).getOr(!1)},xg={isXYInContentArea:vg,isEditorAttachedToDom:yg},wg=function(e){var t=[],n=function(){var t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():U()},i=function(e,t){return function(){return t?t.apply(e,arguments):void 0}},r=function(t){e.fire("OpenWindow",{dialog:t})},o=function(t){e.fire("CloseWindow",{dialog:t})},a=function(e){t.push(e),r(e)},s=function(n){o(n),t=Xe(t,function(e){return e!==n}),0===t.length&&e.focus()},c=function(){return Ae.from(t[t.length-1])},l=function(t){e.editorManager.setActive(e),rm.store(e);var n=t();return a(n),n},u=function(e,t){return l(function(){return n().open(e,t,s)})},d=function(e){return l(function(){return n().openUrl(e,s)})},h=function(e,t,r){n().alert(e,i(r||this,t))},f=function(e,t,r){n().confirm(e,i(r||this,t))},p=function(){c().each(function(e){n().close(e),s(e)})};return e.on("remove",function(){je(t,function(e){n().close(e)})}),{open:u,openUrl:d,alert:h,confirm:f,close:p}},Cg=nc.PluginManager,zg=function(e,t){for(var n in Cg.urls){if(Cg.urls[n]+"/plugin"+t+".js"===e)return n}return null},Sg=function(e,t){var n=zg(t,e.suffix);return n?ec.translate(["Failed to load plugin: {0} from url {1}",n,t]):ec.translate(["Failed to load plugin url: {0}",t])},Mg=function(e,t){e.notificationManager.open({type:"error",text:t})},kg=function(e,t){e._skinLoaded?Mg(e,t):e.on("SkinLoaded",function(){Mg(e,t)})},_g=function(e,t){kg(e,ec.translate(["Failed to upload image: {0}",t]))},Ag=function(e,t){kg(e,Sg(e,t))},Tg=function(e,t,n){var i=ec.translate(["Failed to initialize plugin: {0}",t]);Dg(i,n),kg(e,i)},Dg=function(e){for(var n=[],i=1;i ',"align-center":' ',"align-justify":' ',"align-left":' ',"align-none":' ',"align-right":' ',"arrow-left":' ',"arrow-right":' ',bold:' ',bookmark:' ',"border-width":' ',brightness:' ',browse:' ',cancel:' ',"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:' ',"document-properties":' ',drag:' ',duplicate:' ',"edit-block":' ',"edit-image":' ',"embed-page":' ',embed:' ',emoji:' ',fill:' ',"flip-horizontally":' ',"flip-vertically":' ',"format-painter":' ',fullscreen:' ',gallery:' ',gamma:' ',help:' ',"highlight-bg-color":' ',home:' ',"horizontal-rule":' ',"image-options":' ',image:' ',indent:' ',info:' ',"insert-character":' ',"insert-time":' ',invert:' ',italic:' ',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-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-cell-properties":' ',"table-cell-select-all":' ',"table-cell-select-inner":' ',"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-properties":' ',"table-split-cells":' ',"table-top-header":' ',table:' ',template:' ',"temporary-placeholder":' ',"text-color":' ',toc:' ',translate:' ',underline:' ',undo:' ',unlink:' ',unlock:' ',"unordered-list":' ',unselected:' ',upload:' ',user:' ',warning:' ',"zoom-in":' ',"zoom-out":' '}},Hg=function(){var e={};return{add:function(t,n){e[t]=n},get:function(t){return e[t]?e[t]:{icons:{}}},has:function(t){return Jr(e,t)}}}(),Og=nc.PluginManager,Ng=nc.ThemeManager,Pg=function(e){mt.getOrDie("requestAnimationFrame")(e)},Ig=function(e){return mt.getOrDie("atob")(e)},Vg={atob:Ig,requestAnimationFrame:Pg},Rg=function(e){return new Yt(function(t,n){var i=function(){n("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")};try{var r=Y();r.open("GET",e,!0),r.responseType="blob",r.onload=function(){200===this.status?t(this.response):i()},r.onerror=i,r.send()}catch(e){i()}})},Fg=function(e){var t,n,i=decodeURIComponent(e).split(",");return n=/data:([^;]+)/.exec(i[0]),n&&(t=n[1]),{type:t,data:i[1]}},Bg=function(e){return new Yt(function(n){var i,r,o,a=Fg(e);try{i=Vg.atob(a.data)}catch(e){return void n(new t.Blob([]))}for(r=q(i.length),o=0;o0},Cv=function(){function e(e){this.lastPath=[],this.editor=e;var t,n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",function(n){var i,r;i=e.selection.getRng(),r={startContainer:i.startContainer,startOffset:i.startOffset,endContainer:i.endContainer,endOffset:i.endOffset},"nodechange"!==n.type&&pv.isEq(r,t)||e.fire("SelectionChange"),t=r}),e.on("contextmenu",function(){e.fire("SelectionChange")}),e.on("SelectionChange",function(){var t=e.selection.getStart(!0);!t||!Ut.range&&e.selection.isCollapsed()||wv(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",function(t){!t.isDefaultPrevented()&&wv(e)&&("IMG"===e.selection.getNode().nodeName?Jt.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())})}return e.prototype.nodeChanged=function(e){var t,n,i,r=this.editor.selection;this.editor.initialized&&r&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(i=this.editor.getBody(),t=r.getStart(!0)||i,t.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,i)||(t=i),n=[],this.editor.dom.getParent(t,function(e){if(e===i)return!0;n.push(e)}),e=e||{},e.element=t,e.parents=n,this.editor.fire("NodeChange",e))},e.prototype.isSameElementPath=function(e){var t,n;if(n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e),n.length===this.lastPath.length){for(t=n.length;t>=0&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},e}(),zv=function(e){var t,n,i,r;return r=e.getBoundingClientRect(),t=e.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}},Sv=function(e){return e.inline?zv(e.getBody()):{left:0,top:0}},Mv=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},kv=function(e){var t=e.getBody(),n=e.getDoc().documentElement,i={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?i:r},_v=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=zv(e.getContentAreaContainer()),i=kv(e);return{left:t.pageX-n.left+i.left,top:t.pageY-n.top+i.top}}return{left:t.pageX,top:t.pageY}},Av=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}},Tv=function(e,t){return Av(Sv(e),Mv(e),_v(e,t))},Dv={calc:Tv},Ev=ka.isContentEditableFalse,Lv=ka.isContentEditableTrue,Hv=function(e,t){return Ev(t)&&t!==e},Ov=function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!Ev(t)},Nv=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},Pv=function(e,t,n,i){var r=t.cloneNode(!0);e.dom.setStyles(r,{width:n,height:i}),e.dom.setAttrib(r,"data-mce-selected",null);var o=e.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:i}),e.dom.setStyles(r,{margin:0,boxSizing:"border-box"}),o.appendChild(r),o},Iv=function(e,t){e.parentNode!==t&&t.appendChild(e)},Vv=function(e,t,n,i,r,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>r&&(a=t.pageX+n-r),t.pageY+i>o&&(s=t.pageY+i-o),e.style.width=n-a+"px",e.style.height=i-s+"px"},Rv=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Fv=function(e){return 0===e.button},Bv=function(e){return e.element},Wv=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},jv=function(e,t){return function(n){if(Fv(n)){var i=$e(t.dom.getParents(n.target),Kl.or(Ev,Lv)).getOr(null);if(Hv(t.getBody(),i)){var r=t.dom.getPos(i),o=t.getBody(),a=t.getDoc().documentElement;e.element=i,e.screenX=n.screenX,e.screenY=n.screenY,e.maxX=(t.inline?o.scrollWidth:a.offsetWidth)-2,e.maxY=(t.inline?o.scrollHeight:a.offsetHeight)-2,e.relX=n.pageX-r.x,e.relY=n.pageY-r.y,e.width=i.offsetWidth,e.height=i.offsetHeight,e.ghost=Pv(t,i,e.width,e.height)}}}},Uv=function(e,t){var n=Jt.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(i){var r=Math.max(Math.abs(i.screenX-e.screenX),Math.abs(i.screenY-e.screenY));if(Bv(e)&&!e.dragging&&r>10){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var o=Wv(e,Dv.calc(t,i));Iv(e.ghost,t.getBody()),Vv(e.ghost,o,e.width,e.height,e.maxX,e.maxY),n(i.clientX,i.clientY)}}},Yv=function(e){var t=e.getSel().getRangeAt(0),n=t.startContainer;return 3===n.nodeType?n.parentNode:n},Xv=function(e,t){return function(n){if(e.dragging&&Ov(t,Yv(t.selection),e.element)){var i=Nv(e.element),r=t.fire("drop",{targetClone:i,clientX:n.clientX,clientY:n.clientY});r.isDefaultPrevented()||(i=r.targetClone,t.undoManager.transact(function(){Rv(e.element),t.insertContent(t.dom.getOuterHTML(i)),t._selectionOverrides.hideFakeCaret()}))}qv(e)}},Gv=function(e,t){return function(){e.dragging&&t.fire("dragend"),qv(e)}},qv=function(e){e.dragging=!1,e.element=null,Rv(e.ghost)},$v=function(e){var n,i,r,o,a,s,c={};n=Ns.DOM,s=t.document,i=jv(c,e),r=Uv(c,e),o=Xv(c,e),a=Gv(c,e),e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o),n.bind(s,"mousemove",r),n.bind(s,"mouseup",a),e.on("remove",function(){n.unbind(s,"mousemove",r),n.unbind(s,"mouseup",a)})},Zv=function(e){e.on("drop",function(t){var n=void 0!==t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(Ev(n)||Ev(e.dom.getContentEditableParent(n)))&&t.preventDefault()})},Kv=function(e){$v(e),Zv(e)},Jv={init:Kv},Qv=function(e){var t=function(t){return We(t,function(t){return t=Hl(t),t.node=e,t})};if(ka.isElement(e))return t(e.getClientRects());if(ka.isText(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},eb=function(e){return qe(e,function(e,t){return e.concat(Qv(t))},[])};!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(Uf||(Uf={}));var tb=function(e,t,n,i){for(;i=Hd(i,e,El,t);)if(n(i))return},nb=function(e,t,n,i,r,o){var a,s,c=0,l=[],u=function(i){var o,a,u;for(u=eb([i]),-1===e&&(u=u.reverse()),o=0;o0&&t(a,oi.last(l))&&c++,a.line=c,r(a))return!0;l.push(a)}};return(s=oi.last(o.getClientRects()))?(a=o.getNode(),u(a),tb(e,i,u,a),l):l},ib=function(e,t){return t.line>e},rb=function(e,t){return t.line===e},ob=n(nb,Uf.Up,Il,Vl),ab=n(nb,Uf.Down,Vl,Il),sb=function(e,t,n,i){var r,o,a,s,c,l,u=sh(t),d=[],h=0,f=function(e){return oi.last(e.getClientRects())};1===e?(r=u.next,o=Vl,a=Il,s=yu.after(i)):(r=u.prev,o=Il,a=Vl,s=yu.before(i)),l=f(s);do{if(s.isVisible()&&(c=f(s),!a(c,l))){if(d.length>0&&o(c,oi.last(d))&&h++,c=Hl(c),c.position=s,c.line=h,n(c))return d;d.push(c)}}while(s=r(s));return d},cb=function(e){return function(t){return ib(e,t)}},lb=function(e){return function(t){return rb(e,t)}},ub=ka.isContentEditableFalse,db=Hd,hb=function(e,t){return Math.abs(e.left-t)},fb=function(e,t){return Math.abs(e.right-t)},pb=function(e,t){return e>=t.left&&e<=t.right},mb=function(e,t){return oi.reduce(e,function(e,n){var i,r;return i=Math.min(hb(e,t),fb(e,t)),r=Math.min(hb(n,t),fb(n,t)),pb(t,n)?n:pb(t,e)?e:r===i&&ub(n.node)?n:r=e.top&&n<=e.bottom});return i=mb(o,t),i&&(i=mb(vb(e,i),t))&&zd(i.node)?yb(i,t):null},wb=function(e,t,n){return!n.collapsed&&qe(n.getClientRects(),function(n,i){return n||Rl(i,e,t)},!1)},Cb={isXYWithinRange:wb},zb=ka.isContentEditableTrue,Sb=ka.isContentEditableFalse,Mb=function(e,t,n,i,r){return t._selectionOverrides.showCaret(e,n,i,r)},kb=function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t},_b=function(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:kb(t)},Ab=function(e,t,n){var i=Wd(1,e.getBody(),t),r=yu.fromRangeStart(i),o=r.getNode();if(Sb(o))return Mb(1,e,o,!r.isAtEnd(),!1);var a=r.getNode(!0);if(Sb(a))return Mb(1,e,a,!1,!1);var s=e.dom.getParent(r.getNode(),function(e){return Sb(e)||zb(e)});return Sb(s)?Mb(1,e,s,!1,n):null},Tb=function(e,t,n){if(!t||!t.collapsed)return t;var i=Ab(e,t,n);return i||t},Db=function(e){var n=fc(function(){if(!e.removed&&e.getBody().contains(t.document.activeElement)){if(e.selection.getRng().collapsed){var n=Tb(e,e.selection.getRng(),!1);e.selection.setRng(n)}}},0);e.on("focus",function(){n.throttle()}),e.on("blur",function(){n.cancel()})},Eb={setup:Db},Lb={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Ut.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Hb=function(e){return function(t){return e===t}}(" "),Ob=function(e){return/^[\r\n\t ]$/.test(e)},Nb=function(e){return!Ob(e)&&!Hb(e)},Pb=function(e,t,n){return Ae.from(n.container()).filter(ka.isText).exists(function(i){var r=e?0:-1;return t(i.data.charAt(n.offset()+r))})},Ib=n(Pb,!0,Ob),Vb=n(Pb,!1,Ob),Rb=function(e){var t=e.container();return ka.isText(t)&&0===t.data.length},Fb=function(e,t){return function(n){return Ae.from(Pd(e?0:-1,n)).filter(t).isSome()}},Bb=function(e){return"IMG"===e.nodeName&&"block"===so(Pr.fromDom(e),"display")},Wb=function(e){return ka.isContentEditableFalse(e)&&!ka.isBogusAll(e)},jb=Fb(!0,Bb),Ub=Fb(!1,Bb),Yb=Fb(!0,ka.isTable),Xb=Fb(!1,ka.isTable),Gb=Fb(!0,Wb),qb=Fb(!1,Wb),$b=ka.isContentEditableTrue,Zb=ka.isContentEditableFalse,Kb=function(e,t){for(var n=e.getBody();t&&t!==n;){if($b(t)||Zb(t))return t;t=t.parentNode}return null},Jb=function(e){var t,n=function(t){return e.dom.isBlock(t)},i=e.getBody(),r=wd(e.getBody(),n,function(){return vm.hasFocus(e)}),o="sel-"+e.dom.uniqueId(),a=function(t){return e.dom.hasClass(t,"mce-offscreen-selection")},s=function(){var t=e.dom.get(o);return t?t.getElementsByTagName("*")[0]:t},c=function(t){t&&e.selection.setRng(t)},l=function(){return e.selection.getRng()},u=function(t,n,i,o){void 0===o&&(o=!0);var a;return a=e.fire("ShowCaret",{target:n,direction:t,before:i}),a.isDefaultPrevented()?null:(o&&e.selection.scrollIntoView(n,-1===t),r.show(i,n))},d=function(e,t){return t=Wd(e,i,t),-1===e?yu.fromRangeStart(t):yu.fromRangeEnd(t)},h=function(t){t.hasAttribute("data-mce-caret")&&(ml(t),c(l()),e.selection.scrollIntoView(t[0]))},f=function(e){return ol(e)||hl(e)||fl(e)},p=function(e){return f(e.startContainer)||f(e.endContainer)},m=function(n,i){var r,a,s,c,l,h,f,m,g,v,y=e.$,x=e.dom;if(!n)return null;if(n.collapsed){if(!p(n))if(!1===i){if(m=d(-1,n),zd(m.getNode(!0)))return u(-1,m.getNode(!0),!1,!1);if(zd(m.getNode()))return u(-1,m.getNode(),!m.isAtEnd(),!1)}else{if(m=d(1,n),zd(m.getNode()))return u(1,m.getNode(),!m.isAtEnd(),!1);if(zd(m.getNode(!0)))return u(1,m.getNode(!0),!1,!1)}return null}return c=n.startContainer,l=n.startOffset,h=n.endOffset,3===c.nodeType&&0===l&&Zb(c.parentNode)&&(c=c.parentNode,l=x.nodeIndex(c),c=c.parentNode),1!==c.nodeType?null:(h===l+1&&(r=c.childNodes[l]),Zb(r)?(g=v=r.cloneNode(!0),f=e.fire("ObjectSelected",{target:r,targetClone:g}),f.isDefaultPrevented()?null:(a=Ec(Pr.fromDom(e.getBody()),"#"+o).fold(function(){return y([])},function(e){return y([e.dom()])}),g=f.targetClone,0===a.length&&(a=y('
').attr("id",o),a.appendTo(e.getBody())),n=e.dom.createRng(),g===v&&Ut.ie?(a.empty().append('
').append(g),n.setStartAfter(a[0].firstChild.firstChild),n.setEndAfter(g)):(a.empty().append(" ").append(g).append(" "),n.setStart(a[0].firstChild,1),n.setEnd(a[0].lastChild,0)),a.css({top:x.getPos(r,e.getBody()).y}),a[0].focus(),s=e.selection.getSel(),s.removeAllRanges(),s.addRange(n),je(_c(Pr.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){ao(e,"data-mce-selected")}),r.setAttribute("data-mce-selected","1"),t=r,b(),n)):null)},g=function(){t&&(t.removeAttribute("data-mce-selected"),Ec(Pr.fromDom(e.getBody()),"#"+o).each(dc),t=null),Ec(Pr.fromDom(e.getBody()),"#"+o).each(dc),t=null},v=function(){r.destroy(),t=null},b=function(){r.hide()};return Ut.ceFalse&&function(){e.on("mouseup",function(t){var n=l();n.collapsed&&xg.isXYInContentArea(e,t.clientX,t.clientY)&&c(Ab(e,n,!1))}),e.on("click",function(t){var n;(n=Kb(e,t.target))&&(Zb(n)&&(t.preventDefault(),e.focus()),$b(n)&&e.dom.isChildOf(n,e.selection.getNode())&&g())}),e.on("blur NewBlock",function(){g()}),e.on("ResizeWindow FullscreenStateChanged",function(){return r.reposition()});var n=function(e){var t=sh(e);if(!e.firstChild)return!1;var n=yu.before(e.firstChild),i=t.next(n);return i&&!Gb(i)&&!qb(i)},o=function(t,n){return e.dom.getParent(t,e.dom.isBlock)===e.dom.getParent(n,e.dom.isBlock)},d=function(t,i){var r=e.dom.getParent(t,e.dom.isBlock),a=e.dom.getParent(i,e.dom.isBlock);return!(!r||!e.dom.isChildOf(r,a)||!1!==Zb(Kb(e,r)))||r&&!o(r,a)&&n(r)};!function(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(n){var i=Kb(e,n.target);Zb(i)&&(t||(n.preventDefault(),m(_b(e,i))))})}(e),e.on("mousedown",function(t){var n,r=t.target;if((r===i||"HTML"===r.nodeName||e.dom.isChildOf(r,i))&&!1!==xg.isXYInContentArea(e,t.clientX,t.clientY))if(n=Kb(e,r))Zb(n)?(t.preventDefault(),m(_b(e,n))):(g(),$b(n)&&t.shiftKey||Cb.isXYWithinRange(t.clientX,t.clientY,e.selection.getRng())||(b(),e.selection.placeCaretAt(t.clientX,t.clientY)));else if(!1===zd(r)){g(),b();var o=xb(i,t.clientX,t.clientY);if(o&&!d(t.target,o.node)){t.preventDefault();var a=u(1,o.node,o.before,!1);e.getBody().focus(),c(a)}}}),e.on("keypress",function(t){Lb.modifierPressed(t)||(t.keyCode,Zb(e.selection.getNode())&&t.preventDefault())}),e.on("GetSelectionRange",function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);n=n.cloneRange(),n.selectNode(t),e.range=n}}),e.on("SetSelectionRange",function(e){var t;(t=m(e.range,e.forward))&&(e.range=t)});var h=function(e){return"mcepastebin"===e.id};e.on("AfterSetSelectionRange",function(e){var t=e.range;p(t)||h(t.startContainer.parentNode)||b(),a(t.startContainer.parentNode)||g()}),e.on("copy",function(e){var t=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Ut.ie){var n=s();n&&(e.preventDefault(),t.clearData(),t.setData("text/html",n.outerHTML),t.setData("text/plain",n.outerText))}}),Jv.init(e),Eb.setup(e)}(),{showCaret:u,showBlockCaretContainer:h,hideFakeCaret:b,destroy:v}},Qb=function(e,t){var n=e.length+t.length+2,i=new Array(n),r=new Array(n),o=function(e,t,n){return{start:e,end:t,diag:n}},a=function(n,i,r,o,s){var l=c(n,i,r,o);if(null===l||l.start===i&&l.diag===i-o||l.end===n&&l.diag===n-r)for(var u=n,d=r;uo-r?(s.push([2,e[u]]),++u):(s.push([1,t[d]]),++d);else{a(n,l.start,r,l.start-l.diag,s);for(var h=l.start;h=n&&b>=a&&e[v]===t[b];)r[g]=v--,b--;if(d%2==0&&-p<=m&&m<=p&&r[g]<=i[g+d])return s(r[g],m+n-a,o,c)}}},l=[];return a(0,e.length,0,t.length,l),l},ey={KEEP:0,DELETE:2,INSERT:1,diff:Qb},ty=function(e){return ka.isElement(e)?e.outerHTML:ka.isText(e)?ps.encodeRaw(e.data,!1):ka.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},ny=function(e){var n,i,r;for(r=t.document.createElement("div"),n=t.document.createDocumentFragment(),e&&(r.innerHTML=e);i=r.firstChild;)n.appendChild(i);return n},iy=function(e,t,n){var i=ny(t);if(e.hasChildNodes()&&n0})},sy=function(e,t){var n=We(lt(t.childNodes),ty);return oy(ey.diff(n,e),t),t},cy={read:ay,write:sy},ly=Ws(Ae.none()),uy=function(){return ly.get().getOrThunk(function(){var e=t.document.implementation.createHTMLDocument("undo");return ly.set(Ae.some(e)),e})},dy=function(e){return-1!==e.indexOf("")},hy=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},fy=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},py=function(e){var t,n,i;return t=cy.read(e.getBody()),i=et(t,function(t){var n=$f.trimInternal(e.serializer,t);return n.length>0?[n]:[]}),n=i.join(""),dy(n)?hy(i):fy(n)},my=function(e,t,n){"fragmented"===t.type?cy.write(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},gy=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},vy=function(e){var t=Pr.fromTag("body",uy());return Kc(t,gy(e)),je(_c(t,"*[data-mce-bogus]"),hc),Zc(t)},by=function(e,t){return gy(e)===gy(t)},yy=function(e,t){return vy(e)===vy(t)},xy=function(e,t){return!(!e||!t)&&(!!by(e,t)||yy(e,t))},wy={createFragmentedLevel:hy,createCompleteLevel:fy,createFromEditor:py,applyToEditor:my,isEq:xy},Cy=function(e){var t,n,i=this,r=0,o=[],a=0,s=function(){return 0===a},c=function(e){s()&&(i.typing=e)},l=function(t){e.setDirty(t)},u=function(e){c(!1),i.add({},e)},d=function(){i.typing&&(c(!1),i.add())};e.on("init",function(){i.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(d(),i.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&u(e)}),e.on("ObjectResizeStart cut",function(){i.beforeChange()}),e.on("SaveContent ObjectResized blur",u),e.on("dragend",u),e.on("keyup",function(t){var r=t.keyCode;t.isDefaultPrevented()||((r>=33&&r<=36||r>=37&&r<=40||45===r||t.ctrlKey)&&(u(),e.nodeChanged()),46!==r&&8!==r||e.nodeChanged(),n&&i.typing&&!1===wy.isEq(wy.createFromEditor(e),o[0])&&(!1===e.isDirty()&&(l(!0),e.fire("change",{level:o[0],lastLevel:null})),e.fire("TypingUndo"),n=!1,e.nodeChanged()))}),e.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&t<=36||t>=37&&t<=40||45===t)return void(i.typing&&u(e));var r=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||t>20)||224===t||91===t||i.typing||r||(i.beforeChange(),c(!0),i.add({},e),n=!0)}}),e.on("mousedown",function(e){i.typing&&u(e)});var h=function(e){return"insertReplacementText"===e.inputType},f=function(e){return"insertText"===e.inputType&&null===e.data};return e.on("input",function(e){e.inputType&&(h(e)||f(e))&&u(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),i={data:o,typing:!1,beforeChange:function(){s()&&(t=Qu.getUndoBookmark(e.selection))},add:function(n,i){var a,c,u,d=e.settings;if(u=wy.createFromEditor(e),n=n||{},n=bi.extend(n,u),!1===s()||e.removed)return null;if(c=o[r],e.fire("BeforeAddUndo",{level:n,lastLevel:c,originalEvent:i}).isDefaultPrevented())return null;if(c&&wy.isEq(c,n))return null;if(o[r]&&(o[r].beforeBookmark=t),d.custom_undo_redo_levels&&o.length>d.custom_undo_redo_levels){for(a=0;a0&&(l(!0),e.fire("change",h)),n},undo:function(){var t;return i.typing&&(i.add(),i.typing=!1,c(!1)),r>0&&(t=o[--r],wy.applyToEditor(e,t,!0),l(!0),e.fire("Undo",{level:t})),t},redo:function(){var t;return r0||i.typing&&o[0]&&!wy.isEq(wy.createFromEditor(e),o[0])},hasRedo:function(){return r'))},ky=function(e){return Ur(e)?" "===kf(e):Wa(e)},_y=function(e){return 1===Xe(Ro(e),ky).length},Ay=function(e){Wo(e).each(function(t){No(t).each(function(n){Ra(e)&&Wa(t)&&Ra(n)&&dc(t)})})},Ty={removeTrailingBr:Sy,fillWithPaddingBr:My,isPaddedElement:_y,trimBlockTrailingBr:Ay},Dy=of.isEq,Ey=function(e,t,n){var i=e.formatter.get(n);if(i)for(var r=0;r=0;o--){if(!(a=s[o].selector)||s[o].defaultBlock)return!0;for(r=i.length-1;r>=0;r--)if(c.is(i[r],a))return!0}return!1},Ry={matchNode:Ny,matchName:Hy,match:Py,matchAll:Iy,canApply:Vy,matchesUnInheritedFormatSelector:Ey},Fy=function(e,t){return e.splitText(t)},By=function(e){var t=e.startContainer,n=e.startOffset,i=e.endContainer,r=e.endOffset;return t===i&&ka.isText(t)?n>0&&nn?(r-=n,t=i=Fy(i,r).previousSibling,r=i.nodeValue.length,n=0):r=0):(ka.isText(t)&&n>0&&n0&&r=e.data.length,o=0===t;e.replaceData(t,n,jy(i,o,r))}},Yy=function(e,t){var n=e.data.slice(t),i=n.length-xr(n).length;return Uy(e,t,i)},Xy=function(e,t){var n=e.data.slice(0,t),i=n.length-wr(n).length;return Uy(e,t-i,i)},Gy=function(e,t,n){var i=wr(e.data).length;return e.appendData(t.data),dc(Pr.fromDom(t)),n&&Yy(e,i),e},qy=function(e,t,n){return Dc(e,t,n).isSome()},$y=function(e,t){var i=Pr.fromDom(e),r=Pr.fromDom(t);return qy(r,"pre,code",n(Mo,i))},Zy=function(e,t){return ka.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===$y(e,t)},Ky=function(e){return ka.isElement(e)&&"A"===e.nodeName&&e.hasAttribute("name")},Jy=function(e,t){return Ml(t)&&!1===Zy(e,t)||Ky(t)||Qy(t)},Qy=ka.hasAttribute("data-mce-bookmark"),ex=ka.hasAttribute("data-mce-bogus"),tx=ka.hasAttributeValue("data-mce-bogus","all"),nx=function(e){var t,n=0;if(Jy(e,e))return!1;if(!(t=e.firstChild))return!0;var i=new _a(t,e);do{if(tx(t))t=i.next(!0);else if(ex(t))t=i.next();else if(ka.isBr(t))n++,t=i.next();else{if(Jy(e,t))return!1;t=i.next()}}while(t);return n<=1},ix=function(e){return nx(e.dom())},rx={isEmpty:ix},ox=function(e,t){var n=e.container(),i=e.offset();return!1===yu.isTextPosition(e)&&n===t.parentNode&&i>yu.before(t).offset()},ax=function(e,t){return ox(t,e)?yu(t.container(),t.offset()-1):t},sx=function(e){return ka.isText(e)?yu(e,0):yu.before(e)},cx=function(e){return ka.isText(e)?yu(e,e.data.length):yu.after(e)},lx=function(e){return Ml(e.previousSibling)?Ae.some(cx(e.previousSibling)):e.previousSibling?wh.lastPositionIn(e.previousSibling):Ae.none()},ux=function(e){return Ml(e.nextSibling)?Ae.some(sx(e.nextSibling)):e.nextSibling?wh.firstPositionIn(e.nextSibling):Ae.none()},dx=function(e,t){var n=yu.before(t.previousSibling?t.previousSibling:t.parentNode);return wh.prevPosition(e,n).fold(function(){return wh.nextPosition(e,yu.after(t))},Ae.some)},hx=function(e,t){return wh.nextPosition(e,yu.after(t)).fold(function(){return wh.prevPosition(e,yu.before(t))},Ae.some)},fx=function(e,t){return lx(t).orThunk(function(){return ux(t)}).orThunk(function(){return dx(e,t)})},px=function(e,t){return ux(t).orThunk(function(){return lx(t)}).orThunk(function(){return hx(e,t)})},mx=function(e,t,n){return e?px(t,n):fx(t,n)},gx=function(e,t,i){return mx(e,t,i).map(n(ax,i))},vx=function(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})},bx=function(e){return function(t){return t.dom()===e}},yx=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(Fr(t))},xx=function(e){if(rx.isEmpty(e)){var t=Pr.fromHtml(' ');return uc(e),ac(e,t),Ae.some(yu.before(t.dom()))}return Ae.none()},wx=function(e,t,n){var i=No(e).filter(function(e){return ka.isText(e.dom())}),r=Po(e).filter(function(e){return ka.isText(e.dom())});return dc(e),Gl([i,r,t],function(e,t,i){var r=e.dom(),o=t.dom(),a=r.data.length;return Gy(r,o,n),i.container()===o?yu(r,a):i}).orThunk(function(){return n&&(i.each(function(e){return Xy(e.dom(),e.dom().length)}),r.each(function(e){return Yy(e.dom(),0)})),t})},Cx=function(e,t){return Jr(e.schema.getTextInlineElements(),Fr(t))},zx=function(e,t,i,r){void 0===r&&(r=!0);var o=gx(t,e.getBody(),i.dom()),a=Ac(i,n(yx,e),bx(e.getBody())),s=wx(i,o,Cx(e,i));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind(xx).fold(function(){r&&vx(e,t,s)},function(n){r&&vx(e,t,Ae.some(n))})},Sx={deleteElement:zx},Mx=el.ZWSP,kx=function(e,t){return e.importNode(t,!0)},_x=function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Mx||e.childNodes.length>1)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t},Ax=function(e){return _x(e).length>0},Tx=function(e){if(e){var t=new _a(e,e);for(e=t.current();e;e=t.next())if(3===e.nodeType)return e}return null},Dx=function(e){var t=Pr.fromTag("span");return io(t,{id:"_mce_caret","data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&ac(t,Pr.fromText(Mx)),t},Ex=function(e){var t=Tx(e);return t&&t.nodeValue.charAt(0)===Mx&&t.deleteData(0,1),t},Lx=function(e,t,n){void 0===n&&(n=!0);var i=e.dom,r=e.selection;if(Ax(t))Sx.deleteElement(e,!1,Pr.fromDom(t),n);else{var o=r.getRng(),a=i.getParent(t,i.isBlock),s=Ex(t);o.startContainer===s&&o.startOffset>0&&o.setStart(s,o.startOffset-1),o.endContainer===s&&o.endOffset>0&&o.setEnd(s,o.endOffset-1),i.remove(t,!0),a&&i.isEmpty(a)&&Ty.fillWithPaddingBr(Pr.fromDom(a)),r.setRng(o)}},Hx=function(e,t,n){void 0===n&&(n=!0);var i=e.dom,r=e.selection;if(t)Lx(e,t,n);else if(!(t=td(e.getBody(),r.getStart())))for(;t=i.get("_mce_caret");)Lx(e,t,!1)},Ox=function(e,t,i){var r=e.dom,o=r.getParent(i,n(of.isTextBlock,e));o&&r.isEmpty(o)?i.parentNode.replaceChild(t,i):(Ty.removeTrailingBr(Pr.fromDom(i)),r.isEmpty(i)?i.parentNode.replaceChild(t,i):r.insertAfter(t,i))},Nx=function(e,t){return e.appendChild(t),t},Px=function(e,t){var n=Ge(e,function(e,t){return Nx(e,t.cloneNode(!1))},t);return Nx(n,n.ownerDocument.createTextNode(Mx))},Ix=function(e,t,n){var i,r,o,a,s,c,l,u=e.selection;i=u.getRng(),a=i.startOffset,c=i.startContainer,l=c.nodeValue,(r=td(e.getBody(),u.getStart()))&&(o=Tx(r));var d=/[^\s\u00a0\u00ad\u200b\ufeff]/;l&&a>0&&a ").append(t.childNodes)};t=ka.matchNodeNames("pre"),i.collapsed||(n=e.selection.getSelectedBlocks(),Xx(Yx(Yx(n,t),r),function(e){o(e.previousSibling,e)}))});var qx={postProcess:Gx},$x=bi.each,Zx=function(e){this.compare=function(t,n){if(t.nodeName!==n.nodeName)return!1;var i=function(t){var n={};return $x(e.getAttribs(t),function(i){var r=i.nodeName.toLowerCase();0!==r.indexOf("_")&&"style"!==r&&0!==r.indexOf("data-")&&(n[r]=e.getAttrib(t,r))}),n},r=function(e,t){var n,i;for(i in e)if(e.hasOwnProperty(i)){if(void 0===(n=t[i]))return!1;if(e[i]!==n)return!1;delete t[i]}for(i in t)if(t.hasOwnProperty(i))return!1;return!0};return!!r(i(t),i(n))&&(!!r(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))&&(!Yh.isBookmarkNode(t)&&!Yh.isBookmarkNode(n)))}},Kx=/^(src|href|style)$/,Jx=bi.each,Qx=of.isEq,ew=function(e){return/^(TH|TD)$/.test(e.nodeName)},tw=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},nw=function(e,t,n){var i,r,o;return i=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"],ka.isElement(i)&&(o=i.childNodes.length-1,!n&&r&&r--,i=i.childNodes[r>o?o:r]),ka.isText(i)&&n&&r>=i.nodeValue.length&&(i=new _a(i,e.getBody()).next()||i),ka.isText(i)&&!n&&0===r&&(i=new _a(i,e.getBody()).prev()||i),i},iw=function(e,t,n,i){var r=e.create(n,i);return t.parentNode.insertBefore(r,t),r.appendChild(t),r},rw=function(e,t,n,i,r){var o=Pr.fromDom(t),a=Pr.fromDom(e.create(i,r)),s=n?Vo(o):Io(o);return lc(a,s),n?(ic(o,a),oc(a,o)):(rc(o,a),ac(a,o)),a.dom()},ow=function(e,t,n){return!!Qx(t,n.inline)||(!!Qx(t,n.block)||(n.selector?ka.isElement(t)&&e.is(t,n.selector):void 0))},aw=function(e,t){return t.links&&"A"===e.tagName},sw=function(e,t,n,i){return!(t=of.getNonWhiteSpaceSibling(t,n,i))||"BR"===t.nodeName||e.isBlock(t)},cw=function(e,t,n){var i,r=t.parentNode,o=e.dom,a=_p.getForcedRootBlock(e);n.block&&(a?r===o.getRoot()&&(n.list_block&&Qx(t,n.list_block)||Jx(bi.grep(t.childNodes),function(t){of.isValid(e,a,t.nodeName.toLowerCase())?i?i.appendChild(t):(i=iw(o,t,a),o.setAttribs(i,e.settings.forced_root_block_attrs)):i=0})):o.isBlock(t)&&!o.isBlock(r)&&(sw(o,t,!1)||sw(o,t.firstChild,!0,1)||t.insertBefore(o.create("br"),t.firstChild),sw(o,t,!0)||sw(o,t.lastChild,!1,1)||t.appendChild(o.create("br")))),n.selector&&n.inline&&!Qx(n.inline,t)||o.remove(t,1)},lw=function(e,t,n,i,r){var o,a,s,c=e.dom;if(!ow(c,i,t)&&!aw(i,t))return!1;if("all"!==t.remove)for(Jx(t.styles,function(e,o){e=of.normalizeStyleValue(c,of.replaceVars(e,n),o),"number"==typeof o&&(o=e,r=0),(t.remove_similar||!r||Qx(of.getStyle(c,r,o),e))&&c.setStyle(i,o,""),s=1}),s&&""===c.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),Jx(t.attributes,function(e,t){var o;if(e=of.replaceVars(e,n),"number"==typeof t&&(t=e,r=0),!r||Qx(c.getAttrib(r,t),e)){if("class"===t&&(e=c.getAttrib(i,t))&&(o="",Jx(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o))return void c.setAttrib(i,t,o);"class"===t&&i.removeAttribute("className"),Kx.test(t)&&i.removeAttribute("data-mce-"+t),i.removeAttribute(t)}}),Jx(t.classes,function(e){e=of.replaceVars(e,n),r&&!c.hasClass(r,e)||c.removeClass(i,e)}),a=c.getAttribs(i),o=0;o1||!i.isBlock(r))&&0===o)return void i.remove(r,1);(s.inline||s.wrapper)&&(s.exact||1!==o||(r=function(e){var t,n;return t=c(e),t&&!Yh.isBookmarkNode(t)&&Ry.matchName(i,t,s)&&(n=i.clone(t,!1),d(n),i.replace(n,e,!0),i.remove(t,1)),n||e}(r)),Dw.mergeWithChildren(e,a,n,r),Dw.mergeWithParents(e,s,t,n,r),Dw.mergeBackgroundColorAndFontSize(i,s,n,r),Dw.mergeSubSup(i,s,n,r),Dw.mergeSiblings(i,s,n,r))})};if("false"!==l.getContentEditable(u.getNode())){if(s){if(i)i.nodeType?h(a,i)||(o=l.createRng(),o.setStartBefore(i),o.setEndAfter(i),f(l,xf.expandRng(e,o,a),0,!0)):f(l,i,0,!0);else if(c&&s.inline&&!l.select("td[data-mce-selected],th[data-mce-selected]").length)Ix(e,t,n);else{var p=e.selection.getNode();e.settings.forced_root_block||!a[0].defaultBlock||l.getParent(p,l.isBlock)||Iw(e,a[0].defaultBlock),e.selection.setRng(Ow.normalize(e.selection.getRng())),r=Qu.getPersistentBookmark(e.selection,!0),f(l,xf.expandRng(e,u.getRng(),a)),s.styles&&Dw.mergeUnderlineAndColor(l,s,n,p),u.moveToBookmark(r),of.moveStart(l,u,u.getRng()),e.nodeChanged()}qx.postProcess(t,e)}}else{i=u.getNode();for(var m=0,g=a.length;m0&&t[0],u=a&&a.name;if(o=c(e,u))u===o?(r=t[0],t=t.slice(1)):r=o;else if(a)r=t[0],t=t.slice(1);else if(!n)return e;return r&&(i=s(r),i.appendChild(e)),n&&(i||(i=qw.create("div"),i.appendChild(e)),bi.each(n,function(t){var n=s(t);i.insertBefore(n,e)})),l(i,t,r&&r.siblings)};return e&&e.length?(i=e[0],n=s(i),r=qw.create("div"),r.appendChild(l(n,e.slice(1),i.siblings)),r):""},Zw=function(e,t){return $w(Jw(e),t)},Kw=function(e){var t,n={classes:[],attrs:{}};return e=n.selector=bi.trim(e),"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,i,r,o){switch(t){case"#":n.attrs.id=i;break;case".":n.classes.push(i);break;case":":-1!==bi.inArray("checked disabled enabled read-only required".split(" "),i)&&(n.attrs[i]=i)}if("["===r){var a=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""})),n.name=t||"div",n},Jw=function(e){return e&&"string"==typeof e?(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),bi.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=bi.map(e.split(/(?:~\+|~|\+)/),Kw),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Qw=function(e,t){var n,i,r,o,a,s,c="";if(!1===(s=e.settings.preview_styles))return"";"string"!=typeof s&&(s="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var l=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(s=t.preview)?"":(n=t.block||t.inline||"span",o=Jw(t.selector),o.length?(o[0].name||(o[0].name=n),n=t.selector,i=$w(o,e)):i=$w([n],e),r=qw.select(n,i)[0]||i.firstChild,Gw(t.styles,function(e,t){(e=l(e))&&qw.setStyle(r,t,e)}),Gw(t.attributes,function(e,t){(e=l(e))&&qw.setAttrib(r,t,e)}),Gw(t.classes,function(e){e=l(e),qw.hasClass(r,e)||qw.addClass(r,e)}),e.fire("PreviewFormats"),qw.setStyles(i,{position:"absolute",left:-65535}),e.getBody().appendChild(i),a=qw.getStyle(e.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Gw(s.split(" "),function(t){var n=qw.getStyle(r,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=qw.getStyle(e.getBody(),t,!0),"#ffffff"===qw.toHex(n).toLowerCase())||"color"===t&&"#000000"===qw.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===a)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*a+"px"}"border"===t&&n&&(c+="padding:0 2px;"),c+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),qw.remove(i),c)},eC={getCssText:Qw,parseSelector:Jw,selectorToHtml:Zw},tC=function(e,t,n,i,r){var o=t.get(n);!Ry.match(e,n,i,r)||"toggle"in o[0]&&!o[0].toggle?Vw.applyFormat(e,n,i,r):fw.remove(e,n,i,r)},nC={toggle:tC},iC=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},rC={setup:iC},oC=function(e){var t=K(e),i=Ws(null);return rC.setup(e),Fx(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:n(Vw.applyFormat,e),remove:n(fw.remove,e),toggle:n(nC.toggle,e,t),match:n(Ry.match,e),matchAll:n(Ry.matchAll,e),matchNode:n(Ry.matchNode,e),canApply:n(Ry.canApply,e),formatChanged:n(Uw,e,i),getCssText:n(eC.getCssText,e)}},aC=Object.prototype.hasOwnProperty,sC=function(e,t){return t},cC=function(e){return function(){for(var t=new Array(arguments.length),n=0;n0?o:null),r.attr(s,null)):(o=r.attr(i),"style"===i?o=n.serializeStyle(n.parseStyle(o),r.name):c&&(o=c.call(l,o,i,r.name)),r.attr(i,o.length>0?o:null))}),e.addAttributeFilter("class",function(e){for(var t,n,i=e.length;i--;)t=e[i],(n=t.attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),e.addAttributeFilter("data-mce-type",function(e,t,n){for(var i,r=e.length;r--;)if(i=e[r],"bookmark"===i.attr("data-mce-type")&&!n.cleanup){var o=Ae.from(i.firstChild).exists(function(e){return!el.isZwsp(e.value)});o?i.unwrap():i.remove()}}),e.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ps.decode(t.value))}),e.addNodeFilter("script,style",function(e,n){for(var i,r,o,a=e.length,s=function(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};a--;)i=e[a],r=i.firstChild?i.firstChild.value:"","script"===n?(o=i.attr("type"),o&&i.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===t.element_format&&r.length>0&&(i.firstChild.value="// ")):"xhtml"===t.element_format&&r.length>0&&(i.firstChild.value="\x3c!--\n"+s(r)+"\n--\x3e")}),e.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)t=e[n],0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),e.addNodeFilter("xml:namespace,input",function(e,t){for(var n,i=e.length;i--;)n=e[i],7===n.type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}),e.addAttributeFilter("data-mce-type",function(t){je(t,function(t){"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())})}),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},uC=function(e){var t,n,i=function(e){return e&&"br"===e.name};t=e.lastChild,i(t)&&(n=t.prev,i(n)&&(t.remove(),n.remove()))},dC={register:lC,trimTrailingBr:uC},hC=function(e,n,i){var r,o,a,s=e.dom;return n=n.cloneNode(!0),r=t.document.implementation,r.createHTMLDocument&&(o=r.createHTMLDocument(""),bi.each("BODY"===n.nodeName?n.childNodes:[n],function(e){o.body.appendChild(o.importNode(e,!0))}),n="BODY"!==n.nodeName?o.body.firstChild:o.body,a=s.doc,s.doc=o),Em.firePreProcess(e,cC(i,{node:n})),a&&(s.doc=a),n},fC=function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events},pC=function(e,t,n){return fC(e,n)?hC(e,t,n):t},mC={process:pC},gC=function(e,t){je(t,function(t){e.attr(t,null)})},vC=function(e,t,n){e.addNodeFilter("font",function(e){je(e,function(e){var i=t.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),a=e.attr("size");r&&(i.color=r),o&&(i["font-family"]=o),a&&(i["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(i)),gC(e,["color","face","size"])})})},bC=function(e,t){e.addNodeFilter("strike",function(e){je(e,function(e){var n=t.parse(e.attr("style"));n["text-decoration"]="line-through",e.name="span",e.attr("style",t.serialize(n))})})},yC=function(e,t){var n=ks();t.convert_fonts_to_spans&&vC(e,n,bi.explode(t.font_size_legacy_values)),bC(e,n)},xC=function(e,t){t.inline_styles&&yC(e,t)},wC={register:xC},CC=function(e,t,n,i){(e.padd_empty_with_br||t.insert)&&n[i.name]?i.empty().append(new Vf("br",1)).shortEnded=!0:i.empty().append(new Vf("#text",3)).value=" "},zC=function(e){return SC(e,"#text")&&" "===e.firstChild.value},SC=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},MC=function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty},kC=function(e,t,n,i){return i.isEmpty(t,n,function(t){return MC(e,t)})},_C=function(e,t){return e&&(t[e.name]||"br"===e.name)},AC=function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(e,i,r){var o,a,s,c,l,u,d,h,f=e.length,p=bi.extend({},n.getBlockElements()),m=n.getNonEmptyElements(),g=n.getNonEmptyElements();for(p.body=1,o=0;o0}).concat(["noopener"]).sort().join(" ")};if(!t.allow_unsafe_link_target)for(;i--;)n=e[i],"a"===n.name&&"_blank"===n.attr("target")&&n.attr("rel",function(e){var t=e?bi.trim(e):"";return/\b(noopener)\b/g.test(t)?t:r(t)}(n.attr("rel")))}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,i,r,o=e.length;o--;)if(r=e[o],"a"===r.name&&r.firstChild&&!r.attr("href")){i=r.parent,t=r.lastChild;do{n=t.prev,i.insert(t,r),t=n}while(t)}}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,i=e.length;i--;)if(t=e[i],n=t.parent,"ul"===n.name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var r=new Vf("li",1);r.attr("style","list-style-type: none"),t.wrap(r)}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,i,r,o,a,s,c,l=e.length,u=n.getValidClasses();l--;){for(t=e[l],i=t.attr("class").split(" "),a="",r=0;r1){for(o.reverse(),a=c=s(o[0].clone()),d=0;d0)return void(n.value=r);if(i=n.next){if(3===i.type&&i.value.length){n=n.prev;continue}if(!a[i.name]&&"script"!==i.name&&"style"!==i.name){n=n.prev;continue}}o=n.prev,n.remove(),n=o}};l=Yf({validate:z,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(t.getSelfClosingElements()),cdata:function(e){y.append(E("#cdata",4)).value=e},text:function(e,t){var n;b||(e=e.replace(T," "),_C(y.lastChild,v)&&(e=e.replace(_,""))),0!==e.length&&(n=E("#text",3),n.raw=!!t,y.append(n).value=e)},comment:function(e){y.append(E("#comment",8)).value=e},pi:function(e,t){y.append(E(e,7)).value=t,L(y)},doctype:function(e){var t;t=y.append(E("#doctype",10)),t.value=e,L(y)},start:function(e,n,r){var a,s,c,l,u;if(c=z?t.getElementRule(e):{}){for(a=E(c.outputName||e,1),a.attributes=n,a.shortEnded=r,y.append(a),u=C[y.name],u&&C[a.name]&&!u[a.name]&&x.push(a),s=i.length;s--;)(l=i[s].name)in n.map&&(m=o[l],m?m.push(a):o[l]=[a]);v[e]&&L(a),r||(y=a),!b&&k[e]&&(b=!0)}},end:function(n){var i,r,o,a,s;if(r=z?t.getElementRule(n):{}){if(v[n]&&!b){if((i=y.firstChild)&&3===i.type)if(o=i.value.replace(_,""),o.length>0)i.value=o,i=i.next;else for(a=i.next,i.remove(),i=a;i&&3===i.type;)o=i.value,a=i.next,(0===o.length||D.test(o))&&(i.remove(),i=a),i=a;if((i=y.lastChild)&&3===i.type)if(o=i.value.replace(A,""),o.length>0)i.value=o,i=i.prev;else for(a=i.prev,i.remove(),i=a;i&&3===i.type;)o=i.value,a=i.prev,(0===o.length||D.test(o))&&(i.remove(),i=a),i=a}if(b&&k[n]&&(b=!1),r.removeEmpty&&kC(t,w,k,y)&&!y.attr("name")&&!y.attr("id"))return s=y.parent,v[y.name]?y.empty().remove():y.unwrap(),void(y=s);r.paddEmpty&&(zC(y)||kC(t,w,k,y))&&CC(e,c,v,y),y=y.parent}}},t);var H=y=new Vf(c.context||e.root_name,11);if(l.parse(s),z&&x.length&&(c.context?c.invalid=!0:a(x)),M&&("body"===H.name||c.isRootContent)&&function(){var n,i,r=H.firstChild,o=function(e){e&&(r=e.firstChild,r&&3===r.type&&(r.value=r.value.replace(_,"")),(r=e.lastChild)&&3===r.type&&(r.value=r.value.replace(A,"")))};if(t.isValidChild(H.name,M.toLowerCase())){for(;r;)n=r.next,3===r.type||1===r.type&&"p"!==r.name&&!v[r.name]&&!r.attr("data-mce-type")?i?i.append(r):(i=E(M,1),i.attr(e.forced_root_block_attrs),H.insert(i,r),i.append(r)):(o(i),i=null),r=n;o(i)}}(),!c.invalid){for(g in r)if(r.hasOwnProperty(g)){for(m=n[g],u=r[g],f=u.length;f--;)u[f].parent||u.splice(f,1);for(d=0,h=m.length;dS(a)?(v=M(g*p),g=M(v/p)):(g=M(v/p),v=M(g*p))),x.setStyles(D(r),{width:g,height:v}),C=s.startPos.x+t,z=s.startPos.y+a,C=C>0?C:0,z=z>0?z:0,x.setStyles(o,{left:C,top:z,display:"block"}),o.innerHTML=g+" × "+v,s[2]<0&&r.clientWidth<=g&&x.setStyle(r,"left",u+(h-g)),s[3]<0&&r.clientHeight<=v&&x.setStyle(r,"top",d+(f-v)),t=k.scrollWidth-b,a=k.scrollHeight-y,t+a!==0&&x.setStyles(o,{left:C-t,top:z-a}),m||(Em.fireObjectResizeStart(n,i,h,f),m=!0)},H=function(){m=!1;var e=function(e,t){t&&(i.style[e]||!n.schema.isValid(i.nodeName.toLowerCase(),e)?x.setStyle(D(i),e,t):x.setAttrib(D(i),e,t))};e("width",g),e("height",v),x.unbind(C,"mousemove",L),x.unbind(C,"mouseup",H),z!==C&&(x.unbind(z,"mousemove",L),x.unbind(z,"mouseup",H)),x.remove(r),x.remove(o),O(i),Em.fireObjectResized(n,i,g,v),x.setAttrib(i,"style",x.getAttrib(i,"style")),n.nodeChanged()},O=function(e){var t,m,S,M,_;N(),V(),t=x.getPos(e,k),u=t.x,d=t.y,_=e.getBoundingClientRect(),m=_.width||_.right-_.left,S=_.height||_.bottom-_.top,i!==e&&(i=e,g=v=0),M=n.fire("ObjectSelected",{target:e}),E(e)&&!M.isDefaultPrevented()?w(a,function(e,t){var n,a=function(t){c=t.screenX,l=t.screenY,h=D(i).clientWidth,f=D(i).clientHeight,p=f/h,s=e,e.startPos={x:m*e[0]+u,y:S*e[1]+d},b=k.scrollWidth,y=k.scrollHeight,r=i.cloneNode(!0),x.addClass(r,"mce-clonedresizable"),x.setAttrib(r,"data-mce-bogus","all"),r.contentEditable=!1,r.unSelectabe=!0,x.setStyles(r,{left:u,top:d,margin:0}),r.removeAttribute("data-mce-selected"),k.appendChild(r),x.bind(C,"mousemove",L),x.bind(C,"mouseup",H),z!==C&&(x.bind(z,"mousemove",L),x.bind(z,"mouseup",H)),o=x.add(k,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},h+" × "+f)};n=x.get("mceResizeHandle"+t),n&&x.remove(n),n=x.add(k,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===Ut.ie&&(n.contentEditable=!1),x.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),a(e)}),e.elm=n,x.setStyles(n,{left:m*e[0]+u-n.offsetWidth/2,top:S*e[1]+d-n.offsetHeight/2})}):N(),i.setAttribute("data-mce-selected","1")},N=function(){var e,t;V(),i&&i.removeAttribute("data-mce-selected");for(e in a)(t=x.get("mceResizeHandle"+e))&&(x.unbind(t),x.remove(t))},P=function(t){var i,r,o=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};if(!m&&!n.removed){if(w(x.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"===t.type?t.target:e.getNode(),r=x.$(r).closest("table,img,figure.image,hr")[0],o(r,k)&&(R(),i=e.getStart(!0),o(i,r)&&o(e.getEnd(!0),r)))return void O(r);N()}},I=function(e){return UC(XC(n.getBody(),e))},V=function(){for(var e in a){var t=a[e];t.elm&&(x.unbind(t.elm),delete t.elm)}},R=function(){try{n.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return n.on("init",function(){R(),Ut.ie&&Ut.ie>=11&&(n.on("mousedown click",function(e){var t=e.target,i=t.nodeName;m||!/^(TABLE|IMG|HR)$/.test(i)||I(t)||(2!==e.button&&n.selection.select(t,"TABLE"===i),"mousedown"===e.type&&n.nodeChanged())}),n.dom.bind(k,"mscontrolselect",function(e){var t=function(e){Jt.setEditorTimeout(n,function(){n.selection.select(e)})};if(I(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var e=Jt.throttle(function(e){n.composing||P(e)});n.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",e),n.on("keyup compositionend",function(t){i&&"TABLE"===i.nodeName&&e(t)}),n.on("hide blur",N),n.on("contextmenu",T)}),n.on("remove",V),{isResizable:E,showResizeRect:O,hideResizeRect:N,updateResizeRect:P,destroy:function(){i=r=null}}},qC=function(e){for(var t=0,n=0,i=e;i&&i.nodeType;)t+=i.offsetLeft||0,n+=i.offsetTop||0,i=i.offsetParent;return{x:t,y:n}},$C=function(e,t,n){var i={elm:t,alignToTop:n};return e.fire("ScrollIntoView",i),i.isDefaultPrevented()},ZC=function(e,t,n){var i,r,o,a,s=e.dom,c=s.getRoot(),l=0;if(!$C(e,t,n)&&ka.isElement(t)){if(!1===n&&(l=t.offsetHeight),"BODY"!==c.nodeName){var u=e.selection.getScrollContainer();if(u)return i=qC(t).y-qC(u).y+l,a=u.clientHeight,o=u.scrollTop,void((io+a)&&(u.scrollTop=io+a)&&e.getWin().scrollTo(0,i0?i.x+4:i.x-4,o=i.y>0?i.y+4:i.y-4;JC(e,0!==i.x?r:0,0!==i.y?o:0)})},ez={scrollElementIntoView:ZC,scrollRangeIntoView:QC},tz=function(e){return ka.isContentEditableTrue(e)||ka.isContentEditableFalse(e)},nz=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},iz=function(e,t,n){var i,r,o;if(i=n.elementFromPoint(e,t),r=n.body.createTextRange(),i&&"HTML"!==i.tagName||(i=n.body),r.moveToElementText(i),o=bi.toArray(r.getClientRects()),o=o.sort(function(e,n){return e=Math.abs(Math.max(e.top-t,e.bottom-t)),n=Math.abs(Math.max(n.top-t,n.bottom-t)),e-n}),o.length>0){t=(o[0].bottom+o[0].top)/2;try{return r.moveToPoint(e,t),r.collapse(!0),r}catch(e){}}return null},rz=function(e,t){var n=e&&e.parentElement?e.parentElement():null;return ka.isContentEditableFalse(nz(n,t,tz))?null:e},oz=function(e,t,n){var i,r,o=n;if(o.caretPositionFromPoint)(r=o.caretPositionFromPoint(e,t))&&(i=n.createRange(),i.setStart(r.offsetNode,r.offset),i.collapse(!0));else if(n.caretRangeFromPoint)i=n.caretRangeFromPoint(e,t);else if(o.body.createTextRange){i=o.body.createTextRange();try{i.moveToPoint(e,t),i.collapse(!0)}catch(r){i=iz(e,t,n)}return rz(i,n.body)}return i},az={fromPoint:oz},sz=function(e,t){return We(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})},cz={processRanges:sz},lz=function(e,n){var i=n||t.document,r=i.createDocumentFragment();return je(e,function(e){r.appendChild(e.dom())}),Pr.fromDom(r)},uz=uo("element","width","rows"),dz=uo("element","cells"),hz=uo("x","y"),fz=function(e,t){var n=parseInt(ro(e,t),10);return isNaN(n)?1:n},pz=function(e,t,n,i,r){for(var o=fz(r,"rowspan"),a=fz(r,"colspan"),s=e.rows(),c=n;ce?t.cells().length:e},0)},bz=function(e,t){for(var n=e.rows(),i=0;i1},Dz={getRanges:_z,getSelectedNodes:Az,hasMultipleRanges:Tz},Ez=function(e){return Xe(Dz.getSelectedNodes(e),qa)},Lz=function(e){return _c(e,"td[data-mce-selected],th[data-mce-selected]")},Hz=function(e,t){var n=Lz(t),i=Ez(e);return n.length>0?n:i},Oz=function(e){return Hz(Dz.getRanges(e.selection.getSel()),Pr.fromDom(e.getBody()))},Nz={getCellsFromRanges:Ez,getCellsFromElement:Lz,getCellsFromElementOrRanges:Hz,getCellsFromEditor:Oz},Pz=function(e){return $e(e,function(e){return"ul"===Fr(e)||"ol"===Fr(e)})},Iz=function(e,t){return $e(e,function(e){return"li"===Fr(e)&&yv(e,t)}).fold(ge([]),function(t){return Pz(e).map(function(e){return[Pr.fromTag("li"),Pr.fromTag(Fr(e))]}).getOr([])})},Vz=function(e,t){var n=qe(t,function(e,t){return ac(t,e),t},e);return t.length>0?lz([n]):n},Rz=function(e){return Ya(e)?Ho(e).filter(Ua).fold(ge([]),function(t){return[e,t]}):Ua(e)?[e]:[]},Fz=function(e,t){var n=Pr.fromDom(t.commonAncestorContainer),i=ov.parentsAndSelf(n,e),r=Xe(i,function(e){return Ba(e)||Va(e)}),o=Iz(i,t),a=r.concat(o.length?o:Rz(n));return We(a,Gc)},Bz=function(){return lz([])},Wz=function(e,t){return Vz(Pr.fromDom(t.cloneContents()),Fz(e,t))},jz=function(e,t){return Dc(t,"table",n(Mo,e))},Uz=function(e,t){return jz(e,t[0]).bind(function(e){var n=t[0],i=t[t.length-1],r=kz.fromDom(e);return kz.subsection(r,n,i).map(function(e){return lz([kz.toDom(e)])})}).getOrThunk(Bz)},Yz=function(e,t){return t.length>0&&t[0].collapsed?Bz():Wz(e,t[0])},Xz=function(e,t){var n=Nz.getCellsFromElementOrRanges(t,e);return n.length>0?Uz(e,n):Yz(e,t)},Gz={read:Xz},qz=function(e){return Ae.from(e.selection.getRng()).map(function(t){var n=e.dom.add(e.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),i=el.trim(n.innerText);return e.dom.remove(n),i}).getOr("")},$z=function(e,t){var n,i=e.selection.getRng(),r=e.dom.create("body"),o=e.selection.getSel(),a=cz.processRanges(e,Dz.getRanges(o));return n=t.contextual?Gz.read(Pr.fromDom(e.getBody()),a).dom():i.cloneContents(),n&&r.appendChild(n),e.selection.serializer.serialize(r,t)},Zz=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,t=e.fire("BeforeGetContent",t),t.isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return qz(e);t.getInner=!0;var n=$z(e,t);return"tree"===t.format?n:(t.content=e.selection.isCollapsed()?"":n,e.fire("GetContent",t),t.content)},Kz={getContent:Zz},Jz=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},Qz=function(e,t,n){return null!==Jz(e,t,n)},eS=function(e,t,n){return Qz(e,t,function(e){return e.nodeName===n})},tS=function(e){return e&&"TABLE"===e.nodeName},nS=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},iS=function(e,t){return ol(e)&&!1===Qz(e,t,ed)},rS=function(e,t,n){for(var i=new _a(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=i[n?"prev":"next"]();)if(ka.isBr(t))return!0},oS=function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t},aS=function(e,t){for(;t&&t!==e;){if(ka.isContentEditableFalse(t))return!0;t=t.parentNode}return!1},sS=function(e,t,n,i,r){var o,a,s=e.getRoot(),c=e.schema.getNonEmptyElements(),l=e.getParent(r.parentNode,e.isBlock)||s;if(i&&ka.isBr(r)&&t&&e.isEmpty(l))return Ae.some(F(r.parentNode,e.nodeIndex(r)));for(var u=new _a(r,l);a=u[i?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||iS(a,s))return Ae.none();if(ka.isText(a)&&a.nodeValue.length>0)return!1===eS(a,s,"A")?Ae.some(F(a,i?a.nodeValue.length:0)):Ae.none();if(e.isBlock(a)||c[a.nodeName.toLowerCase()])return Ae.none();o=a}return n&&o?Ae.some(F(o,0)):Ae.none()},cS=function(e,t,n,i){var r,o,a,s,c,l,u=e.getRoot(),d=!1;if(r=i[(n?"start":"end")+"Container"],o=i[(n?"start":"end")+"Offset"],l=ka.isElement(r)&&o===r.childNodes.length,s=e.schema.getNonEmptyElements(),c=n,ol(r))return Ae.none();if(ka.isElement(r)&&o>r.childNodes.length-1&&(c=!1),ka.isDocument(r)&&(r=u,o=0),r===u){if(c&&(a=r.childNodes[o>0?o-1:0])){if(ol(a))return Ae.none();if(s[a.nodeName]||tS(a))return Ae.none()}if(r.hasChildNodes()){if(o=Math.min(!c&&o>0?o-1:o,r.childNodes.length-1),r=r.childNodes[o],o=ka.isText(r)&&l?r.data.length:0,!t&&r===u.lastChild&&tS(r))return Ae.none();if(aS(u,r)||ol(r))return Ae.none();if(r.hasChildNodes()&&!1===tS(r)){a=r;var h=new _a(r,u);do{if(ka.isContentEditableFalse(a)||ol(a)){d=!1;break}if(ka.isText(a)&&a.nodeValue.length>0){o=c?0:a.nodeValue.length,r=a,d=!0;break}if(s[a.nodeName.toLowerCase()]&&!nS(a)){o=e.nodeIndex(a),r=a.parentNode,c||o++,d=!0;break}}while(a=c?h.next():h.prev())}}}return t&&(ka.isText(r)&&0===o&&sS(e,l,t,!0,r).each(function(e){r=e.container(),o=e.offset(),d=!0}),ka.isElement(r)&&(a=r.childNodes[o],a||(a=r.childNodes[o-1]),!a||!ka.isBr(a)||oS(a,"A")||rS(e,a,!1)||rS(e,a,!0)||sS(e,l,t,!0,a).each(function(e){r=e.container(),o=e.offset(),d=!0}))),c&&!t&&ka.isText(r)&&o===r.nodeValue.length&&sS(e,l,t,!1,r).each(function(e){r=e.container(),o=e.offset(),d=!0}),d?Ae.some(F(r,o)):Ae.none()},lS=function(e,t){var n=t.collapsed,i=t.cloneRange(),r=F.fromRangeStart(t);return cS(e,n,!0,i).each(function(e){n&&F.isAbove(r,e)||i.setStart(e.container(),e.offset())}),n||cS(e,n,!1,i).each(function(e){i.setEnd(e.container(),e.offset())}),n&&i.collapse(!0),pv.isEq(t,i)?Ae.none():Ae.some(i)},uS={normalize:lS},dS=function(e,t){e.insertData(0,t)},hS=function(e){return 0===e.dom().length?(dc(e),Ae.none()):Ae.some(e)},fS=function(e,t){var n=Ae.from(t.firstChild).map(Pr.fromDom),i=Ae.from(t.lastChild).map(Pr.fromDom);e.deleteContents(),e.insertNode(t);var r=n.bind(No).filter(Ur).bind(hS),o=i.bind(Po).filter(Ur).bind(hS);Gl([r,n.filter(Ur)],function(e,t){dS(t.dom(),e.dom().data),dc(e)}),Gl([o,i.filter(Ur)],function(t,n){var i=n.dom().length;n.dom().appendData(t.dom().data),e.setEnd(n.dom(),i),dc(t)}),e.collapse(!1)},pS=function(e,t){return e=e||{format:"html"},e.set=!0,e.selection=!0,e.content=t,e},mS=function(e,t,n){if(n=pS(n,t),!n.no_events&&(n=e.fire("BeforeSetContent",n),n.isDefaultPrevented()))return void e.fire("SetContent",n);var i=e.selection.getRng();fS(i,i.createContextualFragment(n.content)),e.selection.setRng(i),ez.scrollRangeIntoView(e,i),n.no_events||e.fire("SetContent",n)},gS={setContent:mS},vS=function(e,t,n,i,r){var o=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return Ae.from(o).map(Pr.fromDom).map(function(e){return i&&t.collapsed?e:Fo(e,r(e,a)).getOr(e)}).bind(function(e){return jr(e)?Ae.some(e):Ho(e)}).map(function(e){return e.dom()}).getOr(e)},bS=function(e,t,n){return vS(e,t,!0,n,function(e,t){return Math.min(jo(e),t)})},yS=function(e,t,n){return vS(e,t,!1,n,function(e,t){return t>0?t-1:t})},xS=function(e,t){for(var n=e;e&&ka.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},wS=function(e,t){var n,i,r,o,a;return t?(i=t.startContainer,r=t.endContainer,o=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(i===r&&a-o<2&&i.hasChildNodes()&&(n=i.childNodes[o]),3===i.nodeType&&3===r.nodeType&&(i=i.length===o?xS(i.nextSibling,!0):i.parentNode,r=0===a?xS(r.previousSibling,!1):r.parentNode,i&&i===r))?i:n&&3===n.nodeType?n.parentNode:n):e},CS=function(e,t,n,i){var r,o,a=[];if(o=e.getRoot(),n=e.getParent(n||bS(o,t,t.collapsed),e.isBlock),i=e.getParent(i||yS(o,t,t.collapsed),e.isBlock),n&&n!==o&&a.push(n),n&&i&&n!==i){r=n;for(var s=new _a(n,o);(r=s.next())&&r!==i;)e.isBlock(r)&&a.push(r)}return i&&n!==i&&i!==o&&a.push(i),a},zS=function(e,t,n){return Ae.from(t).map(function(t){var i=e.nodeIndex(t),r=e.createRng();return r.setStart(t.parentNode,i),r.setEnd(t.parentNode,i+1),n&&(xv(e,r,t,!0),xv(e,r,t,!1)),r})},SS=function(e,t,n){if(e&&e.hasOwnProperty(t)){var i=Xe(e[t],function(e){return e!==n});0===i.length?delete e[t]:e[t]=i}},MS=function(e){return!!e.select},kS=function(e){return!(!e||!e.ownerDocument)&&To(Pr.fromDom(e.ownerDocument),Pr.fromDom(e))},_S=function(e){return!!e&&(!!MS(e)||kS(e.startContainer)&&kS(e.endContainer))},AS=function(e,t,n,i){var r,o,a,s,c=Q(e,i).selectorChangedWithUnbind,l=function(t,n){var r=e.createRng();t?(r.setStart(t,n),r.setEnd(t,n),w(r),b(!1)):(xv(e,r,i.getBody(),!0),w(r))},u=function(e){return Kz.getContent(i,e)},d=function(e,t){return gS.setContent(i,e,t)},h=function(e){return bS(i.getBody(),x(),e)},f=function(e){return yS(i.getBody(),x(),e)},p=function(e,t){return r.getBookmark(e,t)},m=function(e){return r.moveToBookmark(e)},g=function(t,n){return zS(e,t,n).each(w),t},v=function(){var e=x(),t=y();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},b=function(e){var t=x();t.collapse(!!e),w(t)},y=function(){return t.getSelection?t.getSelection():t.document.selection},x=function(){var n,r,o,c,l=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}};if(!t)return null;if(void 0===(c=t.document)||null===c)return null;if(void 0!==i.bookmark&&!1===vm.hasFocus(i)){var u=rm.getRng(i);if(u.isSome())return u.map(function(e){return cz.processRanges(i,[e])[0]}).getOr(c.createRange())}try{(n=y())&&(r=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():c.createRange())}catch(e){}return r=cz.processRanges(i,[r])[0],r||(r=c.createRange?c.createRange():c.body.createTextRange()),r.setStart&&9===r.startContainer.nodeType&&r.collapsed&&(o=e.getRoot(),r.setStart(o,0),r.setEnd(o,0)),a&&s&&(0===l(r.START_TO_START,r,a)&&0===l(r.END_TO_END,r,a)?r=s:(a=null,s=null)),r},w=function(e,t){var n,r,o;if(_S(e)){var c=MS(e)?e:null;if(c){s=null;try{c.select()}catch(e){}}else{if(n=y(),o=i.fire("SetSelectionRange",{range:e,forward:t}),e=o.range,n){s=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),a=n.rangeCount>0?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||Ut.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),i.fire("AfterSetSelectionRange",{range:e,forward:t})}}},C=function(t){return d(e.getOuterHTML(t)),t},z=function(){return wS(i.getBody(),x())},S=function(t,n){return CS(e,x(),t,n)},M=function(){var t,n,i=y();return!(i&&i.anchorNode&&i.focusNode)||(t=e.createRng(),t.setStart(i.anchorNode,i.anchorOffset),t.collapse(!0),n=e.createRng(),n.setStart(i.focusNode,i.focusOffset),n.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,n)<=0)},k=function(){var t=x(),n=y();if(!Dz.hasMultipleRanges(n)&&wv(i)){var r=uS.normalize(e,t);return r.each(function(e){w(e,M())}),r.getOr(t)}return t},_=function(e,t){return c(e,t),H},A=function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},T=function(e,t){return ez.scrollElementIntoView(i,e,t)},D=function(e,t){return w(az.fromPoint(e,t,i.getDoc()))},E=function(){var e=x();return e.collapsed?yu.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},L=function(){t=a=s=null,o.destroy()},H={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:i,collapse:b,setCursorLocation:l,getContent:u,setContent:d,getBookmark:p,moveToBookmark:m,select:g,isCollapsed:v,isForward:M,setNode:C,getNode:z,getSel:y,setRng:w,getRng:x,getStart:h,getEnd:f,getSelectedBlocks:S,normalize:k,selectorChanged:_,selectorChangedWithUnbind:c,getScrollContainer:A,scrollIntoView:T,placeCaretAt:D,getBoundingClientRect:E,destroy:L};return r=jC(H),o=GC(H,i),H.bookmarkManager=r,H.controlSelection=o,H},TS=ka.isText,DS=function(e){return TS(e)&&e.data[0]===el.ZWSP},ES=function(e){return TS(e)&&e.data[e.data.length-1]===el.ZWSP},LS=function(e){return e.ownerDocument.createTextNode(el.ZWSP)},HS=function(e){if(TS(e.previousSibling))return ES(e.previousSibling)?e.previousSibling:(e.previousSibling.appendData(el.ZWSP),e.previousSibling);if(TS(e))return DS(e)?e:(e.insertData(0,el.ZWSP),e);var t=LS(e);return e.parentNode.insertBefore(t,e),t},OS=function(e){if(TS(e.nextSibling))return DS(e.nextSibling)?e.nextSibling:(e.nextSibling.insertData(0,el.ZWSP),e.nextSibling);if(TS(e))return ES(e)?e:(e.appendData(el.ZWSP),e);var t=LS(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t},NS=function(e,t){return e?HS(t):OS(t)},PS=n(NS,!0),IS=n(NS,!1),VS=function(e,t){return ka.isText(e.container())?NS(t,e.container()):NS(t,e.getNode())},RS=function(e,t){var n=t.get();return n&&e.container()===n&&rl(n)},FS=function(e,t){return t.fold(function(t){md.remove(e.get());var n=PS(t);return e.set(n),Ae.some(yu(n,n.length-1))},function(t){return wh.firstPositionIn(t).map(function(t){if(RS(t,e))return yu(e.get(),1);md.remove(e.get());var n=VS(t,!0);return e.set(n),yu(n,1)})},function(t){return wh.lastPositionIn(t).map(function(t){if(RS(t,e))return yu(e.get(),e.get().length-1);md.remove(e.get());var n=VS(t,!1);return e.set(n),yu(n,n.length-1)})},function(t){md.remove(e.get());var n=IS(t);return e.set(n),Ae.some(yu(n,1))})},BS={renderCaret:FS},WS=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,jS=function(e){return WS.test(e)},US=function(e,t){var n=rg(e,"inline_boundaries_selector").getOr("a[href],code");return wo(Pr.fromDom(t),n)},YS=function(e){return"rtl"===Ns.DOM.getStyle(e,"direction",!0)||jS(e.textContent)},XS=function(e,t,n){return Xe(Ns.DOM.getParents(n.container(),"*",t),e)},GS=function(e,t,n){var i=XS(e,t,n);return Ae.from(i[i.length-1])},qS=function(e,t,n){var i=Od(t,e),r=Od(n,e);return i&&i===r},$S=function(e){return cl(e)||ll(e)},ZS=function(e,t){if(!t)return t;var n=t.container(),i=t.offset();return e?rl(n)?ka.isText(n.nextSibling)?yu(n.nextSibling,0):yu.after(n):cl(t)?yu(n,i+1):t:rl(n)?ka.isText(n.previousSibling)?yu(n.previousSibling,n.previousSibling.data.length):yu.before(n):ll(t)?yu(n,i-1):t},KS=n(ZS,!0),JS=n(ZS,!1),QS={isInlineTarget:US,findRootInline:GS,isRtl:YS,isAtZwsp:$S,normalizePosition:ZS,normalizeForwards:KS,normalizeBackwards:JS,hasSameParentBlock:qS},eM=function(e,t){for(var n=0;n=11)&&(t.innerHTML=' '),t},uk=function(e,t,i){var r,o,a,s=sh(e.getBody()),c=n(Gd,s.next),l=n(Gd,s.prev);if(i.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(i.startContainer,"PRE")))return;o=1===t?c(yu.fromRangeStart(i)):l(yu.fromRangeStart(i)),o||(a=lk(e),1===t?e.$(r).after(a):e.$(r).before(a),e.selection.select(a,!0),e.selection.collapse())}},dk=function(e,t){var i,r=sh(e.getBody()),o=n(Gd,r.next),a=n(Gd,r.prev),s=t?bu.Forwards:bu.Backwards,c=t?o:a,l=e.selection.getRng();return(i=sk(s,e,c,l))?i:(i=uk(e,s,l))||null},hk=function(e,t){var n,i=t?1:-1,r=t?ab:ob,o=e.selection.getRng();return(n=ck(i,e,r,o))?n:(n=uk(e,i,o))||null},fk=function(e,t){return function(){var n=dk(e,t);return!!n&&(e.selection.setRng(n),!0)}},pk=function(e,t){return function(){var n=hk(e,t);return!!n&&(e.selection.setRng(n),!0)}},mk=function(e){return function(t){return e?qb(t):Gb(t)}},gk=function(e,t){return function(){var n=t?yu.fromRangeEnd(e.selection.getRng()):yu.fromRangeStart(e.selection.getRng()),i=t?JM(e.getBody(),n):KM(e.getBody(),n);return(t?ct(i.positions):st(i.positions)).filter(mk(t)).fold(ge(!1),function(t){return e.selection.setRng(t.toRange()),!0})}},vk=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}},bk=function(e,t){return et(t,function(t){var n=vk(Hl(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})},yk=function(e,t,n){return qe(e,function(e,i){return e.fold(function(){return Ae.some(i)},function(e){var r=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),o=Math.sqrt(Math.abs(i.x-t)+Math.abs(i.y-n));return Ae.some(ot},Mk=n(xk,wk,zk),kk=n(xk,Ck,Sk),_k=function(e,t){return st(t.getClientRects()).bind(function(t){return Mk(e,t.left,t.top)}).bind(function(e){return ZM(rk(e),t)})},Ak=function(e,t){return ct(t.getClientRects()).bind(function(t){return kk(e,t.left,t.top)}).bind(function(e){return ZM(ik(e),t)})},Tk=function(e,t){e.selection.setRng(t),ez.scrollRangeIntoView(e,t)},Dk=function(e,t,n){return n.breakAt.map(function(n){return e(t,n).breakAt.isSome()}).getOr(!1)},Ek=function(e){return e.breakType===WC.Wrap&&0===e.positions.length},Lk=function(e){return e.breakType===WC.Br&&1===e.positions.length},Hk=function(e,t,n){var i=e(t,n);return Ek(i)||!ka.isBr(n.getNode())&&Lk(i)?!Dk(e,t,i):i.breakAt.isNone()},Ok=n(Hk,KM),Nk=n(Hk,JM),Pk=function(e,t,n){var i=yu.fromRangeStart(t);return wh.positionIn(!e,n).map(function(e){return e.isEqual(i)}).getOr(!1)},Ik=function(e,t,n,i){var r=e.selection.getRng(),o=t?1:-1;if(Cd()&&Pk(t,r,n)){var a=Mb(o,e,n,!t,!0);return Tk(e,a),!0}return!1},Vk=function(e,t,n){return _k(t,n).orThunk(function(){return st(n.getClientRects()).bind(function(n){return $M(tk(e,yu.before(t)),n.left)})}).getOr(yu.before(t))},Rk=function(e,t,n){return Ak(t,n).orThunk(function(){return st(n.getClientRects()).bind(function(n){return $M(nk(e,yu.after(t)),n.left)})}).getOr(yu.after(t))},Fk=function(e,t){var n=t.getNode(e);return ka.isElement(n)&&"TABLE"===n.nodeName?Ae.some(n):Ae.none()},Bk=function(e,t,n,i){var r=_p.getForcedRootBlock(t);r?t.undoManager.transact(function(){var i=Pr.fromTag(r);io(i,_p.getForcedRootBlockAttrs(t)),ac(i,Pr.fromTag("br")),e?rc(Pr.fromDom(n),i):ic(Pr.fromDom(n),i);var o=t.dom.createRng();o.setStart(i.dom(),0),o.setEnd(i.dom(),0),Tk(t,o)}):Tk(t,i.toRange())},Wk=function(e,t,n){var i=!1===t;(t?Fk(!0,n):Fk(!1,n)).fold(function(){return Tk(e,n.toRange())},function(r){return wh.positionIn(i,e.getBody()).filter(function(e){return e.isEqual(n)}).fold(function(){return Tk(e,n.toRange())},function(i){return Bk(t,e,r,n)})})},jk=function(e,t,n,i){var r=e.selection.getRng(),o=yu.fromRangeStart(r),a=e.getBody();if(!t&&Ok(i,o)){var s=Vk(a,n,o);return Wk(e,t,s),!0}if(t&&Nk(i,o)){var s=Rk(a,n,o);return Wk(e,t,s),!0}return!1},Uk=function(e,t){return function(){return Ae.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return Ae.from(e.dom.getParent(n,"table")).map(function(n){return Ik(e,t,n)})}).getOr(!1)}},Yk=function(e,t){return function(){return Ae.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(n){return Ae.from(e.dom.getParent(n,"table")).map(function(i){return jk(e,t,i,n)})}).getOr(!1)}},Xk=function(e){return Fe(["figcaption"],Fr(e))},Gk=function(e){var n=t.document.createRange();return n.setStartBefore(e.dom()),n.setEndBefore(e.dom()),n},qk=function(e,t,n){n?ac(e,t):oc(e,t)},$k=function(e,t){var n=Pr.fromTag("br");return qk(e,n,t),Gk(n)},Zk=function(e,t,n,i){var r=Pr.fromTag(n),o=Pr.fromTag("br");return io(r,i),ac(r,o),qk(e,r,t),Gk(o)},Kk=function(e,t,n,i){return""===t?$k(e,i):Zk(e,i,t,n)},Jk=function(e,t){var i=n(Mo,t);return Tc(Pr.fromDom(e.container()),Ra,i).filter(Xk)},Qk=function(e,t,n){return t?ek(e.dom(),n):QM(e.dom(),n)},e_=function(e,t){var n=Pr.fromDom(e.getBody()),i=yu.fromRangeStart(e.selection.getRng()),r=_p.getForcedRootBlock(e),o=_p.getForcedRootBlockAttrs(e);return Jk(i,n).exists(function(){if(Qk(n,t,i)){var a=Kk(n,r,o,t);return e.selection.setRng(a),!0}return!1})},t_=function(e,t){return function(){return!!e.selection.isCollapsed()&&e_(e,t)}},n_=function(e){return We(e,function(e){return cC({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:pe},e)})},i_=function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey},r_=function(e,t){return et(n_(e),function(e){return i_(e,t)?[e]:[]})},o_=function(e){for(var t=[],n=1;n'},tD=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},nD=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},iD=function(e,t,n){var i,r=n,o=[];if(r){for(;r=r.firstChild;){if(e.isBlock(r))return;ka.isElement(r)&&!t[r.nodeName.toLowerCase()]&&o.push(r)}for(i=o.length;i--;)r=o[i],!r.hasChildNodes()||r.firstChild===r.lastChild&&""===r.firstChild.nodeValue?e.remove(r):JT(e,r)&&e.remove(r)}},rD=function(e,t,n){return!1===ka.isText(t)?n:e?1===n&&t.data.charAt(n-1)===el.ZWSP?0:n:n===t.data.length-1&&t.data.charAt(n)===el.ZWSP?t.data.length:n},oD=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,rD(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,rD(!1,e.endContainer,e.endOffset)),t},aD=function(e){do{ka.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)},sD=function(e,t){var n,i,r=e.getRoot();for(n=t;n!==r&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(i=n),n=n.parentNode;return n!==r?i:r},cD=function(e,t){var n=_p.getForcedRootBlock(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,_p.getForcedRootBlockAttrs(e))},lD=function(e,t,n,i,r){var o,a,s,c,l,u,d=t||"P",h=e.dom,f=sD(h,i);if(!(a=h.getParent(i,h.isBlock))||!nD(h,a)){if(a=a||f,u=a===e.getBody()||QT(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return o=h.create(d),cD(e,o),a.appendChild(o),n.setStart(o,0),n.setEnd(o,0),o;for(c=i;c.parentNode!==a;)c=c.parentNode;for(;c&&!h.isBlock(c);)s=c,c=c.previousSibling;if(s&&e.schema.isValidChild(u,d.toLowerCase())){for(o=h.create(d),cD(e,o),s.parentNode.insertBefore(o,s),c=s;c&&!h.isBlock(c);)l=c.nextSibling,o.appendChild(c),c=l;n.setStart(i,r),n.setEnd(i,r)}}return i},uD=function(e,t){var n;t.normalize(),(n=t.lastChild)&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")},dD=function(e,t){var n,i,r,o,a,s,c,l,u,d,h,f,p,m=e.dom,g=e.schema,v=g.getNonEmptyElements(),b=e.selection.getRng(),y=function(t){var n,o,s,c=r,l=g.getTextInlineElements();if(t||"TABLE"===d||"HR"===d?(n=m.create(t||f),cD(e,n)):n=a.cloneNode(!1),s=n,!1===_p.shouldKeepStyles(e))m.setAttrib(n,"style",null),m.setAttrib(n,"class",null);else do{if(l[c.nodeName]){if(ed(c)||Yh.isBookmarkNode(c))continue;o=c.cloneNode(!1),m.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(s=o,n.appendChild(o))}}while((c=c.parentNode)&&c!==i);return eD(s),n},x=function(e){var t,n,i=rD(e,r,o);if(ka.isText(r)&&(e?i>0:ir.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=p&&ka.isText(r)?r.nodeValue.length:0),i=sD(m,r)){if((f&&!s||!f&&s)&&(r=lD(e,f,b,r,o)),a=m.getParent(r,m.isBlock),u=a?m.getParent(a.parentNode,m.isBlock):null,d=a?a.nodeName.toUpperCase():"",h=u?u.nodeName.toUpperCase():"","LI"!==h||C||(a=u,u=u.parentNode,d=h),/^(LI|DT|DD)$/.test(d)&&m.isEmpty(a))return void ZT.insert(e,y,u,a,f);f&&a===e.getBody()||(f=f||"P",il(a)?(c=ml(a),m.isEmpty(a)&&eD(a),WT.moveToCaretPosition(e,c)):x()?w():x(!0)?(c=a.parentNode.insertBefore(y(),a),WT.moveToCaretPosition(e,tD(a,"HR")?c:a)):(n=oD(b).cloneRange(),n.setEndAfter(a),l=n.extractContents(),KT(l),aD(l),c=l.firstChild,m.insertAfter(l,a),iD(m,v,c),uD(m,a),m.isEmpty(a)&&eD(a),c.normalize(),m.isEmpty(c)?(m.remove(c),w()):WT.moveToCaretPosition(e,c)),m.setAttrib(c,"id",""),e.fire("NewBlock",{newBlock:c}))}},hD={insert:dD},fD=function(e,t,n){for(var i,r=new _a(t,n),o=e.getNonEmptyElements();i=r.next();)if(o[i.nodeName.toLowerCase()]||i.length>0)return!0},pD=function(e,t,n){var i=e.create("span",{}," ");n.parentNode.insertBefore(i,n),t.scrollIntoView(i),e.remove(i)},mD=function(e,t,n,i){var r=e.createRng();i?(r.setStartBefore(n),r.setEndBefore(n)):(r.setStartAfter(n),r.setEndAfter(n)),t.setRng(r)},gD=function(e,t){var n,i,r=e.selection,o=e.dom,a=r.getRng();uS.normalize(o,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var s=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var l=s>c.childNodes.length-1;c=c.childNodes[Math.min(s,c.childNodes.length-1)]||c,s=l&&3===c.nodeType?c.nodeValue.length:0}var u=o.getParent(c,o.isBlock),d=u?o.getParent(u.parentNode,o.isBlock):null,h=d?d.nodeName.toUpperCase():"",f=!(!t||!t.ctrlKey);"LI"!==h||f||(u=d),c&&3===c.nodeType&&s>=c.nodeValue.length&&(fD(e.schema,c,u)||(n=o.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),i=!0)),n=o.create("br"),Iu(o,a,n),pD(o,r,n),mD(o,r,n,i),e.undoManager.add()},vD=function(e,t){var n=Pr.fromTag("br");ic(Pr.fromDom(t),n),e.undoManager.add()},bD=function(e,t){xD(e.getBody(),t)||rc(Pr.fromDom(t),Pr.fromTag("br"));var n=Pr.fromTag("br");rc(Pr.fromDom(t),n),pD(e.dom,e.selection,n.dom()),mD(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},yD=function(e){return ka.isBr(e.getNode())},xD=function(e,t){return!!yD(yu.after(t))||wh.nextPosition(e,yu.after(t)).map(function(e){return ka.isBr(e.getNode())}).getOr(!1)},wD=function(e){return e&&"A"===e.nodeName&&"href"in e},CD=function(e){return e.fold(ge(!1),wD,wD,ge(!1))},zD=function(e){var t=n(QS.isInlineTarget,e),i=yu.fromRangeStart(e.selection.getRng());return CM.readLocation(t,e.getBody(),i).filter(CD)},SD=function(e,t){t.fold(pe,n(vD,e),n(bD,e),pe)},MD=function(e,t){var i=zD(e);i.isSome()?i.each(n(SD,e)):gD(e,t)},kD={insert:MD},_D=function(e,t){return WT.getParentBlock(e).filter(function(e){return t.length>0&&wo(Pr.fromDom(e),t)}).isSome()},AD=function(e){return _D(e,_p.getBrNewLineSelector(e))},TD=function(e){return _D(e,_p.getNoNewLineSelector(e))},DD={shouldInsertBr:AD,shouldBlockNewLine:TD},ED=Bp.generate([{br:[]},{block:[]},{none:[]}]),LD=function(e,t){return DD.shouldBlockNewLine(e)},HD=function(e){return function(t,n){return""===_p.getForcedRootBlock(t)===e}},OD=function(e){return function(t,n){return WT.isListItemParentBlock(t)===e}},ND=function(e,t){return function(n,i){return WT.getParentBlockName(n)===e.toUpperCase()===t}},PD=function(e){return ND("pre",e)},ID=function(){return ND("summary",!0)},VD=function(e){return function(t,n){return _p.shouldPutBrInPre(t)===e}},RD=function(e,t){return DD.shouldInsertBr(e)},FD=function(e,t){return t},BD=function(e){var t=_p.getForcedRootBlock(e),n=WT.getEditableRoot(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},WD=function(e,t){return function(n,i){return qe(e,function(e,t){return e&&t(n,i)},!0)?Ae.some(t):Ae.none()}},jD=function(e,t){return tM.evaluateUntil([WD([LD],ED.none()),WD([ID()],ED.br()),WD([PD(!0),VD(!1),FD],ED.br()),WD([PD(!0),VD(!1)],ED.block()),WD([PD(!0),VD(!0),FD],ED.block()),WD([PD(!0),VD(!0)],ED.br()),WD([OD(!0),FD],ED.br()),WD([OD(!0)],ED.block()),WD([HD(!0),FD,BD],ED.block()),WD([HD(!0)],ED.br()),WD([RD],ED.br()),WD([HD(!1),FD],ED.br()),WD([BD],ED.block())],[e,!(!t||!t.shiftKey)]).getOr(ED.none())},UD={getAction:jD},YD=function(e,t){UD.getAction(e,t).fold(function(){kD.insert(e,t)},function(){hD.insert(e,t)},pe)},XD={insert:YD},GD=function(e){e.typing&&(e.typing=!1,e.add())},qD=function(e,t){t.isDefaultPrevented()||(t.preventDefault(),GD(e.undoManager),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),XD.insert(e,t)}))},$D=function(e){e.on("keydown",function(t){t.keyCode===Lb.ENTER&&qD(e,t)})},ZD={setup:$D},KD=function(e,t){var n=t.container(),i=t.offset();return ka.isText(n)?(n.insertData(i,e),Ae.some(F(n,i+e.length))):Yd(t).map(function(n){var i=Pr.fromText(e);return t.isAtEnd()?rc(n,i):ic(n,i),F(i.dom(),e.length)})},JD=n(KD," "),QD=n(KD," "),eE=function(e,t,n){return wh.navigateIgnore(e,t,n,Rb)},tE=function(e,t,n){var i=Xe(ov.parentsAndSelf(Pr.fromDom(n.container()),t),Ra);return st(i).fold(function(){return eE(e,t.dom(),n).forall(function(e){return!1===Nd(e,n,t.dom())})},function(t){return eE(e,t.dom(),n).isNone()})},nE=n(tE,!1),iE=n(tE,!0),rE=function(e){return F.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},oE=function(e,t){var n=Xe(ov.parentsAndSelf(Pr.fromDom(t.container()),e),Ra);return st(n).getOr(e)},aE=function(e,t){return rE(t)?Vb(t):Vb(t)||wh.prevPosition(oE(e,t).dom(),t).exists(Vb)},sE=function(e,t){return rE(t)?Ib(t):Ib(t)||wh.nextPosition(oE(e,t).dom(),t).exists(Ib)},cE=function(e){return Fe(["pre","pre-line","pre-wrap"],e)},lE=function(e){return Yd(e).bind(function(e){return Tc(e,jr)}).exists(function(e){return cE(so(e,"white-space"))})},uE=function(e,t){return wh.prevPosition(e.dom(),t).isNone()},dE=function(e,t){return wh.nextPosition(e.dom(),t).isNone()},hE=function(e,t){return uE(e,t)||dE(e,t)||nE(e,t)||iE(e,t)||J_(e,t)||K_(e,t)},fE=function(e,t){return!lE(t)&&(hE(e,t)||aE(e,t)||sE(e,t))},pE=function(e,t){return!lE(t)&&(nE(e,t)||J_(e,t)||aE(e,t))},mE=function(e){var t=e.container(),n=e.offset();return ka.isText(t)&&n0&&t0&&(i="data:text/mce-internal,"+escape(e.id)+","+escape(n),t.dataTransfer.setData(h,i)))},g=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(h))&&t.indexOf("data:text/mce-internal,")>=0?(t=t.substr("data:text/mce-internal,".length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null},v=function(t,n){e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:t,internal:n}):e.execCommand("mceInsertContent",!1,t)},b=function(){e.shortcuts.add("meta+a",null,"SelectAll")},y=function(){e.on("keydown",function(e){if(!p(e)&&e.keyCode===i&&a.isCollapsed()&&0===a.getRng().startOffset){var t=a.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},x=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(t){var n;if("HTML"===t.target.nodeName){if(Ut.ie>11)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}}))},w=function(){},C=function(){var t;return!(!l||e.removed)&&(!(t=e.selection.getSel())||!t.rangeCount||0===t.rangeCount)};return function(){e.on("keydown",function(t){var n,i,r,s,c;if(!p(t)&&t.keyCode===Lb.BACKSPACE&&(n=a.getRng(),i=n.startContainer,r=n.startOffset,s=o.getRoot(),c=i,n.collapsed&&0===r)){for(;c&&c.parentNode&&c.parentNode.firstChild===c&&c.parentNode!==s;)c=c.parentNode;"BLOCKQUOTE"===c.tagName&&(e.formatter.toggle("blockquote",null,c),n=o.createRng(),n.setStart(i,0),n.setEnd(i,0),a.setRng(n))}})}(),function(){var t=function(e){var t=o.create("body"),n=e.cloneContents();return t.appendChild(n),a.serializer.serialize(t,{format:"html"})},n=function(n){var i=t(n),r=o.createRng();return r.selectNode(e.getBody()),i===t(r)};e.on("keydown",function(t){var a,s,c=t.keyCode;if(!p(t)&&(c===r||c===i)){if(a=e.selection.isCollapsed(),s=e.getBody(),a&&!o.isEmpty(s))return;if(!a&&!n(e.selection.getRng()))return;t.preventDefault(),e.setContent(""),s.firstChild&&o.isBlock(s.firstChild)?e.selection.setCursorLocation(s.firstChild,0):e.selection.setCursorLocation(s,0),e.nodeChanged()}})}(),Ut.windowsPhone||function(){e.on("keyup focusin mouseup",function(e){Lb.modifierPressed(e)||a.normalize()},!0)}(),d&&(function(){e.inline||o.bind(e.getDoc(),"mousedown mouseup",function(t){var n;if(t.target===e.getDoc().documentElement)if(n=a.getRng(),e.getBody().focus(),"mousedown"===t.type){if(ol(n.startContainer))return;a.placeCaretAt(t.clientX,t.clientY)}else a.setRng(n)})}(),function(){e.on("click",function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==o.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&o.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),a.select(n))})}(),function(){s.forced_root_block&&e.on("init",function(){f("DefaultParagraphSeparator",_p.getForcedRootBlock(e))})}(),function(){e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(e){e.preventDefault()})})}(),y(),function(){c.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})}(),Ut.iOS?(function(){e.inline||e.on("keydown",function(){t.document.activeElement===t.document.body&&e.getWin().focus()})}(),x(),function(){e.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}()):b()),Ut.ie>=11&&(x(),y()),Ut.ie&&(b(),function(){f("AutoUrlDetect",!1)}(),function(){e.on("dragstart",function(e){m(e)}),e.on("drop",function(t){if(!p(t)){var n=g(t);if(n&&n.id!==e.id){t.preventDefault();var i=az.fromPoint(t.x,t.y,e.getDoc());a.setRng(i),v(n.html,!0)}}})}()),l&&(!function(){e.on("keydown",function(t){if(!p(t)&&t.keyCode===i){if(!e.getBody().getElementsByTagName("hr").length)return;if(a.isCollapsed()&&0===a.getRng().startOffset){var n=a.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return o.remove(n),void t.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(o.remove(r),t.preventDefault())}}})}(),function(){t.Range.prototype.getClientRects||e.on("mousedown",function(t){if(!p(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),Jt.setEditorTimeout(e,function(){n.focus()})}})}(),function(){var t=function(){var t=o.getAttribs(a.getStart().cloneNode(!1));return function(){var i=a.getStart();i!==e.getBody()&&(o.setAttrib(i,"style",null),n(t,function(e){i.setAttributeNode(e.cloneNode(!0))}))}},i=function(){return!a.isCollapsed()&&o.getParent(a.getStart(),o.isBlock)!==o.getParent(a.getEnd(),o.isBlock)};e.on("keypress",function(n){var r;if(!p(n)&&(8===n.keyCode||46===n.keyCode)&&i())return r=t(),e.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1}),o.bind(e.getDoc(),"cut",function(n){var r;!p(n)&&i()&&(r=t(),Jt.setEditorTimeout(e,function(){r()}))})}(),function(){var t=function(){f("StyleWithCSS",!1),f("enableInlineTableEditing",!1),s.object_resizing||f("enableObjectResizing",!1)};s.readonly||e.on("BeforeExecCommand mousedown",t)}(),function(){var t=function(){n(o.select("a"),function(e){var t=e.parentNode,n=o.getRoot();if(t.lastChild===e){for(;t&&!o.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}o.add(t,"br",{"data-mce-bogus":1})}})};e.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||t()})}(),function(){e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}(),function(){Ut.mac&&e.on("keydown",function(t){if(Lb.metaKeyPressed(t)&&!t.shiftKey&&(37===t.keyCode||39===t.keyCode)){t.preventDefault();e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary")}})}(),y()),{refreshContentEditable:w,isHidden:C}},qE=function(e){return ka.isElement(e)&&ja(Pr.fromDom(e))},$E=function(e){var t=e.selection.getRng(),n=F.fromRangeStart(t),i=F.fromRangeEnd(t);if(F.isElementPosition(n)){var r=n.container();qE(r)&&wh.firstPositionIn(r).each(function(e){return t.setStart(e.container(),e.offset())})}if(F.isElementPosition(i)){var r=n.container();qE(r)&&wh.lastPositionIn(r).each(function(e){return t.setEnd(e.container(),e.offset())})}e.selection.setRng(Ow.normalize(t))},ZE=function(e){e.on("click",function(t){t.detail>=3&&$E(e)})},KE=function(e){e.on("click",function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()})},JE=function(e){e.parser.addNodeFilter("details",function(e){je(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){je(e,function(e){var t=e.attr("data-mce-open");e.attr("open",Ee(t)?t:null),e.attr("data-mce-open",null)})})},QE=function(e){KE(e),JE(e)},eL=Ns.DOM,tL=function(e,t){var n=Pr.fromDom(e.getDoc().head),i=Pr.fromTag("style");no(i,"type","text/css"),ac(i,Pr.fromText(t)),ac(n,i)},nL=function(e){var t=HC(e.settings,e.schema);return t.addAttributeFilter("src,href,style,tabindex",function(t,n){for(var i,r,o,a=t.length,s=e.dom;a--;)if(i=t[a],r=i.attr(n),o="data-mce-"+n,!i.attr(o)){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===n?(r=s.serializeStyle(s.parseStyle(r),i.name),r.length||(r=null),i.attr(o,r),i.attr(n,r)):"tabindex"===n?(i.attr(o,r),i.attr(n,null)):i.attr(o,e.convertURL(r,n,i.name))}}),t.addNodeFilter("script",function(e){for(var t,n,i=e.length;i--;)t=e[i],n=t.attr("type")||"no/type",0!==n.indexOf("mce-")&&t.attr("type","mce-"+n)}),t.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)t=e[n],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n,i=t.length,r=e.schema.getNonEmptyElements();i--;)n=t[i],n.isEmpty(r)&&0===n.getAll("br").length&&(n.append(new Vf("br",1)).shortEnded=!0)}),t},iL=function(e){e.settings.auto_focus&&Jt.setEditorTimeout(e,function(){var t;t=!0===e.settings.auto_focus?e:e.editorManager.get(e.settings.auto_focus),t.destroyed||t.focus()},100)},rL=function(e){e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),iL(e)},oL=function(e){return e.inline?eL.styleSheetLoader:e.dom.styleSheetLoader},aL=function(e,n){var i,r,o=e.settings,a=e.getElement(),s=e.getDoc();o.inline||(e.getElement().style.visibility=e.orgVisibility),n||e.inline||(s.open(),s.write(e.iframeHTML),s.close()),e.inline&&(e.on("remove",function(){var e=this.getBody();eL.removeClass(e,"mce-content-body"),eL.removeClass(e,"mce-edit-focus"),eL.setAttrib(e,"contentEditable",null)}),eL.addClass(a,"mce-content-body"),e.contentDocument=s=o.content_document||t.document,e.contentWindow=o.content_window||t.window,e.bodyElement=a,e.contentAreaContainer=a,o.content_document=o.content_window=null,o.root_name=a.nodeName.toLowerCase()),i=e.getBody(),i.disabled=!0,e.readonly=o.readonly,e.readonly||(e.inline&&"static"===eL.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=e.getParam("content_editable_state",!0)),i.disabled=!1,e.editorUpload=ev(e),e.schema=b(o),e.dom=Ns(s,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:o.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:_p.shouldUseContentCssCors(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=nL(e),e.serializer=BC(o,e),e.selection=AS(e.dom,e.getWin(),e.serializer,e),e.annotator=Of(e),e.formatter=oC(e),e.undoManager=Cy(e),e._nodeChangeDispatcher=new Cv(e),e._selectionOverrides=Jb(e),QE(e),ZE(e),XE.setup(e),hv.setup(e),e.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(s.body.spellcheck=!1,eL.setAttrib(i,"spellcheck","false")),e.quirks=GE(e),e.fire("PostRender");var c=_p.getDirectionality(e);void 0!==c&&(i.dir=c),o.protect&&e.on("BeforeSetContent",function(e){bi.each(o.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type}),e.contentStyles.length>0&&(r="",bi.each(e.contentStyles,function(e){r+=e+"\r\n"}),e.dom.addStyle(r)),oL(e).loadAll(e.contentCSS,function(t){rL(e)},function(t){rL(e)}),o.content_style&&tL(e,o.content_style)},sL={initContentBody:aL},cL=Ns.DOM,lL=function(e,n){if(t.document.domain!==t.window.location.hostname&&Ut.ie&&Ut.ie<12){var i=Jg.uuid("mce");e[i]=function(){sL.initContentBody(e)};var r='javascript:(function(){document.open();document.domain="'+t.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+i+"(true);})()";return cL.setAttrib(n,"src",r),!0}return!1},uL=function(e,t,n,i){var r=Pr.fromTag("iframe");return io(r,i),io(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),Cc(r,"tox-edit-area__iframe"),r},dL=function(e){var t,n,i;return i=_p.getDocType(e)+"",_p.getDocumentBaseUrl(e)!==e.documentBaseUrl&&(i+=' '),i+=' ',t=_p.getBodyId(e),n=_p.getBodyClass(e),_p.getContentSecurityPolicy(e)&&(i+=' '),i+=' '},hL=function(e,t){var n=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),i=uL(e.id,n,t.height,_p.getIframeAttrs(e)).dom();i.onload=function(){i.onload=null,e.fire("load")};var r=lL(e,i);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=i,e.iframeHTML=dL(e),cL.add(t.iframeContainer,i),r},fL=function(e,t){var n=hL(e,t);t.editorContainer&&(cL.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=cL.isHidden(t.editorContainer)),e.getElement().style.display="none",cL.setAttrib(e.id,"aria-hidden","true"),n||sL.initContentBody(e)},pL={init:fL},mL=function(e){return/^[a-z0-9\-]+$/i.test(e)},gL=function(e){var t=_p.getContentCss(e),n=e.editorManager.baseURL+"/skins/content",i=e.editorManager.suffix,r="content"+i+".css",o=!0===e.inline;return We(t,function(t){return mL(t)&&!o?n+"/"+t+"/"+r:e.documentBaseURI.toAbsolute(t)})},vL=function(e){e.contentCSS=e.contentCSS.concat(gL(e))},bL=Ns.DOM,yL=function(e,t,n){var i=Og.get(n),r=Og.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=bi.trim(n),i&&-1===bi.inArray(t,n)){if(bi.each(Og.dependencies(n),function(n){yL(e,t,n)}),e.plugins[n])return;try{var o=new i(e,r,e.$);e.plugins[n]=o,o.init&&(o.init(e,r),t.push(n))}catch(t){Eg.pluginInitError(e,n,t)}}},xL=function(e){return e.replace(/^\-/,"")},wL=function(e){var t=[];bi.each(e.settings.plugins.split(/[ ,]/),function(n){yL(e,t,xL(n))})},CL=function(e){var t=bi.trim(e.settings.icons),n=e.ui.registry.getAll().icons,i=Lg(),r=Bs({},i,Hg.get(t).icons);Gr(r,function(t,i){Jr(n,i)||e.ui.registry.addIcon(i,t)})},zL=function(e){var t=e.settings.theme;if(Ee(t)){e.settings.theme=xL(t);var n=Ng.get(t);e.theme=new n(e,Ng.urls[t]),e.theme.init&&e.theme.init(e,Ng.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}},SL=function(e){return e.theme.renderUI()},ML=function(e){var t=e.getElement(),n=e.settings.theme,i=n(e,t);return i.editorContainer.nodeType&&(i.editorContainer.id=i.editorContainer.id||e.id+"_parent"),i.iframeContainer&&i.iframeContainer.nodeType&&(i.iframeContainer.id=i.iframeContainer.id||e.id+"_iframecontainer"),i.height=i.iframeHeight?i.iframeHeight:t.offsetHeight,i},kL=function(e){return{editorContainer:e,iframeContainer:e}},_L=function(e){var t=bL.create("div");return bL.insertAfter(t,e),kL(t)},AL=function(e){var t=e.getElement();return e.inline?kL(null):_L(t)},TL=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,Ee(e.settings.theme)?SL(e):Pe(e.settings.theme)?ML(e):AL(e)},DL=function(e){e.fire("ScriptsLoaded"),CL(e),zL(e),wL(e);var t=TL(e);return e.editorContainer=t.editorContainer?t.editorContainer:null,vL(e),e.inline?sL.initContentBody(e):pL.init(e,t)},EL={init:DL},LL=Ns.DOM,HL=function(e){return"-"===e.charAt(0)},OL=function(e,t){var n=_p.getLanguageCode(t),i=_p.getLanguageUrl(t);!1===ec.hasCode(n)&&"en"!==n&&(""!==i?e.add(i):e.add(t.editorManager.baseURL+"/langs/"+n+".js"))},NL=function(e,t,n,i){var r=t.settings,o=r.theme;if(Ee(o)){if(!HL(o)&&!Ng.urls.hasOwnProperty(o)){var a=r.theme_url;a?Ng.load(o,t.documentBaseURI.toAbsolute(a)):Ng.load(o,"themes/"+o+"/theme"+n+".js")}e.loadQueue(function(){Ng.waitFor(o,i)})}else i()},PL=function(e){var t=bi.trim(e.getParam("icons","","string"));if(t.length>0&&!Hg.has(t)){var n=e.editorManager.baseURL+"/icons/"+t+"/icons.js";Rs.ScriptLoader.add(n)}},IL=function(e,t){bi.isArray(e.plugins)&&(e.plugins=e.plugins.join(" ")),bi.each(e.external_plugins,function(t,n){Og.load(n,t),e.plugins+=" "+n}),bi.each(e.plugins.split(/[ ,]/),function(e){if((e=bi.trim(e))&&!Og.urls[e])if(HL(e)){e=e.substr(1,e.length);var n=Og.dependencies(e);bi.each(n,function(e){var n={prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"};e=Og.createUrl(n,e),Og.load(e.resource,e)})}else Og.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+t+".js"})})},VL=function(e,t){var n=Rs.ScriptLoader;NL(n,e,t,function(){OL(n,e),PL(e),IL(e.settings,t),n.loadQueue(function(){e.removed||EL.init(e)},e,function(t){Eg.pluginLoadError(e,t[0]),e.removed||EL.init(e)})})},RL=function(e){var n=e.settings,i=e.id;ec.setCode(_p.getLanguageCode(e));var r=function(){LL.unbind(t.window,"ready",r),e.render()};if(!dn.Event.domLoaded)return void LL.bind(t.window,"ready",r);if(e.getElement()&&Ut.contentEditable){n.inline?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");var o=e.getElement().form||LL.getParent(i,"form");o&&(e.formElement=o,n.hidden_input&&!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)&&(LL.insertAfter(LL.create("input",{type:"hidden",name:i}),i),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},LL.bind(o,"submit reset",e.formEventDelegate),e.on("reset",function(){e.resetContent()}),!n.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),o._mceOldSubmit(o)})),e.windowManager=wg(e),e.notificationManager=j(e),"xml"===n.encoding&&e.on("GetContent",function(e){e.save&&(e.content=LL.encode(e.content))}),n.add_form_submit_trigger&&e.on("submit",function(){e.initialized&&e.save()}),n.add_unload_trigger&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),VL(e,e.suffix)}},FL={render:RL},BL=function(e,t,n){Mc(e,t)&&!1===n?Sc(e,t):n&&Cc(e,t)},WL=function(e){var n="design",i=["design","readonly"],r={design:{activate:pe,deactivate:pe,editorReadOnly:!1},readonly:{activate:pe,deactivate:pe,editorReadOnly:!0}},o=function(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}},a=function(t){BL(Pr.fromDom(e.getBody()),"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable="false"):(e.readonly=!1,e.getBody().contentEditable="true",o("StyleWithCSS",!1),o("enableInlineTableEditing",!1),o("enableObjectResizing",!1),e.focus(),e.nodeChanged())},s=function(i){var o=r[n],s=r[i];try{s.activate()}catch(e){return void t.console.error("problem while activating editor mode "+i+":",e)}o.deactivate(),o.editorReadOnly!==s.editorReadOnly&&a(s.editorReadOnly),n=i,Em.fireSwitchMode(e,i)},c=function(t){if(t!==n){if(!Jr(r,t))throw new Error("Editor mode '"+t+"' is invalid");e.initialized?s(t):e.on("init",function(){return s(t)})}},l=function(){return n};return{isReadOnly:function(){return!0===e.readonly},set:c,get:l,register:function(e,n){if(Fe(i,e))throw new Error("Cannot override default mode "+e);r[e]=Bs({},n,{deactivate:function(){try{n.deactivate()}catch(n){t.console.error("problem while deactivating editor mode "+e+":"),t.console.error(n)}}})}}},jL=function(e){return e.firstChild&&e.firstChild===e.lastChild},UL=function(e){return"br"===e.name||" "===e.value},YL=function(e,t){return e.getBlockElements()[t.name]&&jL(t)&&UL(t.firstChild)},XL=function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||YL(e,t))},GL=function(e,t){var n=t.firstChild,i=t.lastChild;return n&&"meta"===n.name&&(n=n.next),i&&"mce_marker"===i.attr("id")&&(i=i.prev),XL(e,i)&&(i=i.prev),!(!n||n!==i)&&("ul"===n.name||"ol"===n.name)},qL=function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e},$L=function(e,t,n){var i=t.serialize(n),r=e.createFragment(i);return qL(r)},ZL=function(e){return bi.grep(e.childNodes,function(e){return"LI"===e.nodeName})},KL=function(e){return" "===e.data||ka.isBr(e)},JL=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&KL(e.firstChild)},QL=function(e){return!e.firstChild||JL(e)},eH=function(e){return e.length>0&&QL(e[e.length-1])?e.slice(0,-1):e},tH=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},nH=function(e,t){return!!tH(e,t)},iH=function(e,t){var n=t.cloneRange(),i=t.cloneRange();return n.setStartBefore(e),i.setEndAfter(e),[n.cloneContents(),i.cloneContents()]},rH=function(e,t){var n=yu.before(e),i=sh(t),r=i.next(n);return r?r.toRange():null},oH=function(e,t){var n=yu.after(e),i=sh(t),r=i.prev(n);return r?r.toRange():null},aH=function(e,t,n,i){var r=iH(e,i),o=e.parentNode;return o.insertBefore(r[0],e),bi.each(t,function(t){o.insertBefore(t,e)}),o.insertBefore(r[1],e),o.removeChild(e),oH(t[t.length-1],n)},sH=function(e,t,n){var i=e.parentNode;return bi.each(t,function(t){i.insertBefore(t,e)}),rH(e,n)},cH=function(e,t,n,i){return i.insertAfter(t.reverse(),e),oH(t[0],n)},lH=function(e,t,n,i){var r=$L(t,e,i),o=tH(t,n.startContainer),a=eH(ZL(r.firstChild)),s=t.getRoot(),c=function(e){var i=yu.fromRangeStart(n),r=sh(t.getRoot()),a=1===e?r.prev(i):r.next(i);return!a||tH(t,a.getNode())!==o};return c(1)?sH(o,a,s):c(2)?cH(o,a,s,t):aH(o,a,s,n)},uH={isListFragment:GL,insertAtCaret:lH,isParentBlockLi:nH,trimListItems:eH,listItems:ZL},dH=function(e,t){return ka.isText(e)&&" "===e.nodeValue[t-1]},hH=function(e,t){var n,i;n=e.startContainer,i=e.startOffset;var r=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(i>0?t=t.replace(/^ /," "):r("previousSibling")||(t=t.replace(/^ /," ")),i|)$/," "):r("nextSibling")||(t=t.replace(/( | )( |)$/," "))),t},fH=function(e,t){var n,i;return n=e.startContainer,i=e.startOffset,3===n.nodeType&&e.collapsed&&(" "===n.data[i]?(n.deleteData(i,1),/[\u00a0| ]$/.test(t)||(t+=" ")):" "===n.data[i-1]&&(n.deleteData(i-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))),t},pH=ka.matchNodeNames("td th"),mH=function(e,t){var n=e.selection.getRng(),i=n.startContainer,r=n.startOffset;n.collapsed&&dH(i,r)&&ka.isText(i)&&(i.insertData(r-1," "),i.deleteData(r,1),n.setStart(i,r),n.setEnd(i,r),e.selection.setRng(n)),e.selection.setContent(t)},gH=function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var i=n.firstChild,r=n.lastChild;!i||i===r&&"BR"===i.nodeName?e.dom.setHTML(n,t):mH(e,t)}},vH=function(e,t){Ae.from(e.getParent(t,"td,th")).map(Pr.fromDom).each(Ty.trimBlockTrailingBr)},bH=function(e,t){var n=e.schema.getTextInlineElements(),i=e.dom;if(t){var r=e.getBody(),o=new Zx(i);bi.each(i.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==r;t=t.parentNode)n[e.nodeName.toLowerCase()]&&o.compare(t,e)&&i.remove(e,!0)})}},yH=function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")},xH=function(e){bi.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})},wH=function(e){return!!e.getAttribute("data-mce-fragment")},CH=function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]},zH=function(e,t){var n,i,r,o,a,s=e.dom,c=e.selection;if(t){if(e.selection.scrollIntoView(t),n=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===e.dom.getContentEditable(t))return t;return null}(t))return s.remove(t),void c.select(n);var l=s.createRng();o=t.previousSibling,o&&3===o.nodeType?(l.setStart(o,o.nodeValue.length),Ut.ie||(a=t.nextSibling)&&3===a.nodeType&&(o.appendData(a.data),a.parentNode.removeChild(a))):(l.setStartBefore(t),l.setEndBefore(t));i=s.getParent(t,s.isBlock),s.remove(t),i&&s.isEmpty(i)&&(e.$(i).empty(),l.setStart(i,0),l.setEnd(i,0),pH(i)||wH(i)||!(r=function(t){var n=yu.fromRangeStart(t);if(n=sh(e.getBody()).next(n))return n.toRange()}(l))?s.add(i,s.create("br",{"data-mce-bogus":"1"})):(l=r,s.remove(i))),c.setRng(l)}},SH=function(e,t,n){var i,r,o,a,s,c,l,u,d,h,f,p=e.selection,m=e.dom;if(/^ | $/.test(t)&&(t=hH(p.getRng(),t)),i=e.parser,f=n.merge,r=Hp({validate:e.settings.validate},e.schema),h=' ',c={content:t,format:"html",selection:!0,paste:n.paste},c=e.fire("BeforeSetContent",c),c.isDefaultPrevented())return void e.fire("SetContent",{content:c.content,format:"html",selection:!0,paste:n.paste});t=c.content,-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,h),u=p.getRng();var g=u.startContainer||(u.parentElement?u.parentElement():null),v=e.getBody();g===v&&p.isCollapsed()&&m.isBlock(v.firstChild)&&CH(e,v.firstChild)&&m.isEmpty(v.firstChild)&&(u=m.createRng(),u.setStart(v.firstChild,0),u.setEnd(v.firstChild,0),p.setRng(u)),p.isCollapsed()||(e.selection.setRng(Ow.normalize(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),t=fH(e.selection.getRng(),t)),o=p.getNode();var b={context:o.nodeName.toLowerCase(),data:n.data,insert:!0};if(s=i.parse(t,b),!0===n.paste&&uH.isListFragment(e.schema,s)&&uH.isParentBlockLi(m,o))return u=uH.insertAtCaret(r,m,e.selection.getRng(),s),e.selection.setRng(u),void e.fire("SetContent",c);if(yH(s),d=s.lastChild,"mce_marker"===d.attr("id"))for(l=d,d=d.prev;d;d=d.walk(!0))if(3===d.type||!m.isBlock(d.name)){e.schema.isValidChild(d.parent.name,"span")&&d.parent.insert(l,d,"br"===d.name);break}if(e._selectionOverrides.showBlockCaretContainer(o),b.invalid){for(mH(e,h),o=p.getNode(),a=e.getBody(),9===o.nodeType?o=d=a:d=o;d!==a;)o=d,d=d.parentNode;t=o===a?a.innerHTML:m.getOuterHTML(o),t=r.serialize(i.parse(t.replace(//i,function(){return r.serialize(s)}))),o===a?m.setHTML(a,t):m.setOuterHTML(o,t)}else t=r.serialize(s),gH(e,t,o);bH(e,f),zH(e,m.get("mce_marker")),xH(e.getBody()),vH(e.dom,e.selection.getStart()),e.fire("SetContent",c),e.addVisual()},MH=function(e){var t;return"string"!=typeof e?(t=bi.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}},kH=function(e,t){var n=MH(t);SH(e,n.content,n.details)},_H={insertAtCaret:kH},AH=function(e,t){e.getDoc().execCommand(t,!1,null)},TH=function(e){xA.backspaceDelete(e,!1)||MA.backspaceDelete(e,!1)||OA.backspaceDelete(e,!1)||F_.backspaceDelete(e,!1)||AT.backspaceDelete(e)||q_.backspaceDelete(e,!1)||FA.backspaceDelete(e,!1)||(AH(e,"Delete"),g_.paddEmptyBody(e))},DH=function(e){xA.backspaceDelete(e,!0)||MA.backspaceDelete(e,!0)||OA.backspaceDelete(e,!0)||F_.backspaceDelete(e,!0)||AT.backspaceDelete(e)||q_.backspaceDelete(e,!0)||FA.backspaceDelete(e,!0)||AH(e,"ForwardDelete")},EH={deleteCommand:TH,forwardDeleteCommand:DH},LH=function(e,t,n){var i=function(t){return lo(t,e)},r=function(e){return Mo(Pr.fromDom(t),e)};return Tc(Pr.fromDom(n),function(e){return i(e).isSome()},r).bind(i)},HH=function(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n},OH=function(e,t){return/[0-9.]+px$/.test(e)?HH(72*parseInt(e,10)/96,t||0)+"pt":e},NH=function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},PH=function(e,t){return Ae.from(Ns.DOM.getStyle(t,e,!0))},IH=function(e){return function(t,n){return Ae.from(n).map(Pr.fromDom).filter(jr).bind(function(n){return LH(e,t,n.dom()).or(PH(e,n.dom()))}).getOr("")}},VH={getFontSize:IH("font-size"),getFontFamily:me(NH,IH("font-family")),toPt:OH},RH=function(e){return wh.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return ka.isText(t)?t.parentNode:t})},FH=function(e,t){return e.startContainer===t&&0===e.startOffset},BH=function(e){return Ae.from(e.selection.getRng()).bind(function(t){var n=e.getBody();return FH(t,n)?Ae.none():Ae.from(e.selection.getStart(!0))})},WH=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(n>=1&&n<=7){var i=_p.getFontStyleValues(e),r=_p.getFontSizeClasses(e);return r?r[n-1]||t:i[n-1]||t}return t}return t},jH=function(e,t){e.formatter.toggle("fontname",{value:WH(e,t)}),e.nodeChanged()},UH=function(e){return BH(e).fold(function(){return RH(e).map(function(t){return VH.getFontFamily(e.getBody(),t)}).getOr("")},function(t){return VH.getFontFamily(e.getBody(),t)})},YH=function(e,t){e.formatter.toggle("fontsize",{value:WH(e,t)}),e.nodeChanged()},XH=function(e){return BH(e).fold(function(){return RH(e).map(function(t){return VH.getFontSize(e.getBody(),t)}).getOr("")},function(t){return VH.getFontSize(e.getBody(),t)})},GH=function(e){return Tc(e,function(e){return ka.isContentEditableTrue(e.dom())||ka.isContentEditableFalse(e.dom())}).exists(function(e){return ka.isContentEditableTrue(e.dom())})},qH=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},$H=function(e,t){return(e||Fa(t)?"margin":"padding")+("rtl"===so(t,"direction")?"-right":"-left")},ZH=function(e,t,n,i,r,o){var a=$H(n,Pr.fromDom(o));if("outdent"===t){var s=Math.max(0,qH(o.style[a])-i);e.setStyle(o,a,s?s+r:"")}else{var s=qH(o.style[a])+i+r;e.setStyle(o,a,s)}},KH=function(e,t){return tt(t,function(t){var n=$H(_p.shouldIndentUseMargin(e),t),i=lo(t,n).map(qH).getOr(0);return"false"!==e.dom.getContentEditable(t.dom())&&i>0})},JH=function(e){var t=tO(e);return!0!==e.readonly&&(t.length>1||KH(e,t))},QH=function(e){return Ua(e)||Ya(e)},eO=function(e){return Ho(e).map(QH).getOr(!1)},tO=function(e){return Xe(We(e.selection.getSelectedBlocks(),Pr.fromDom),function(e){return!QH(e)&&!eO(e)&&GH(e)})},nO=function(e,t){var n=e.dom,i=e.selection,r=e.formatter,o=_p.getIndentation(e),a=/[a-z%]+$/i.exec(o)[0],s=parseInt(o,10),c=_p.shouldIndentUseMargin(e),l=_p.getForcedRootBlock(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==l||n.getParent(i.getNode(),n.isBlock)||r.apply("div"),je(tO(e),function(e){ZH(n,t,c,s,a,e.dom())})},iO=bi.each,rO=bi.map,oO=bi.inArray,aO=function(){function e(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}return e.prototype.execCommand=function(e,t,n,i){var r,o,a=!1,s=this;if(!s.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus?rm.restore(s.editor):s.editor.focus(),i=s.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n}),i.isDefaultPrevented())return!1;if(o=e.toLowerCase(),r=s.commands.exec[o])return r(o,t,n),s.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(iO(this.editor.plugins,function(i){if(i.execCommand&&i.execCommand(e,t,n))return s.editor.fire("ExecCommand",{command:e,ui:t,value:n}),a=!0,!1}),a)return a;if(s.editor.theme&&s.editor.theme.execCommand&&s.editor.theme.execCommand(e,t,n))return s.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{a=s.editor.getDoc().execCommand(e,t,n)}catch(e){}return!!a&&(s.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0)}},e.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(e){}return!1}},e.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(e){}}},e.prototype.addCommands=function(e,t){var n=this;t=t||"exec",iO(e,function(e,i){iO(i.toLowerCase().split(","),function(i){n.commands[t][i]=e})})},e.prototype.addCommand=function(e,t,n){var i=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,r,o,a){return t.call(n||i.editor,r,o,a)}},e.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(e){}return!1},e.prototype.addQueryStateHandler=function(e,t,n){var i=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||i.editor)}},e.prototype.addQueryValueHandler=function(e,t,n){var i=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||i.editor)}},e.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},e.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},e.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},e.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:void 0),this.editor.nodeChanged()},e.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},e.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},e.prototype.setupCommands=function(e){var t=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(n){var i,r=e.getDoc();try{t.execNativeCommand(n)}catch(e){i=!0}if("paste"!==n||r.queryCommandEnabled(n)||(i=!0),i||!r.queryCommandSupported(n)){var o=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Ut.mac&&(o=o.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:o,type:"error"})}},unlink:function(){if(e.selection.isCollapsed()){var t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var i=n.substring(7);"full"===i&&(i="justify"),iO("left,center,right,justify".split(","),function(t){i!==t&&e.formatter.remove("align"+t)}),"none"!==i&&t.toggleFormat("align"+i)},"InsertUnorderedList,InsertOrderedList":function(n){var i,r;t.execNativeCommand(n),(i=e.dom.getParent(e.selection.getNode(),"ol,ul"))&&(r=i.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(t.storeSelection(),e.dom.split(r,i),t.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){t.toggleFormat(e)},"ForeColor,HiliteColor":function(e,n,i){t.toggleFormat(e,i)},FontName:function(t,n,i){jH(e,i)},FontSize:function(t,n,i){YH(e,i)},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){t.toggleFormat("blockquote")},FormatBlock:function(e,n,i){return t.toggleFormat(i||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(n,i,r){var o=r||e.selection.getNode();o!==e.getBody()&&(t.storeSelection(),e.dom.remove(o,!0),t.restoreSelection())},mceSelectNodeDepth:function(t,n,i){var r=0;e.dom.getParent(e.selection.getNode(),function(t){if(1===t.nodeType&&r++===i)return e.selection.select(t),!1},e.getBody())},mceSelectNode:function(t,n,i){e.selection.select(i)},mceInsertContent:function(t,n,i){_H.insertAtCaret(e,i)},mceInsertRawHTML:function(t,n,i){e.selection.setContent("tiny_mce_marker");var r=e.getContent();e.setContent(r.replace(/tiny_mce_marker/g,function(){return i}))},mceInsertNewLine:function(t,n,i){XD.insert(e,i)},mceToggleFormat:function(e,n,i){t.toggleFormat(i)},mceSetContent:function(t,n,i){e.setContent(i)},"Indent,Outdent":function(t){nO(e,t)},mceRepaint:function(){},InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1," ")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,n,i){e.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceInsertLink:function(t,n,i){var r;"string"==typeof i&&(i={href:i}),r=e.dom.getParent(e.selection.getNode(),"a"),i.href=i.href.replace(" ","%20"),r&&i.href||e.formatter.remove("link"),i.href&&e.formatter.apply("link",i,r)},selectAll:function(){var t=e.dom.getParent(e.selection.getStart(),ka.isContentEditableTrue);if(t){var n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}},delete:function(){EH.deleteCommand(e)},forwardDelete:function(){EH.forwardDeleteCommand(e)},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,i){return kD.insert(e,i),!0}});var n=function(t){return function(){var n=e.selection.isCollapsed()?[e.dom.getParent(e.selection.getNode(),e.dom.isBlock)]:e.selection.getSelectedBlocks(),i=rO(n,function(n){return!!e.formatter.matchNode(n,t)});return-1!==oO(i,!0)}};t.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return t.isFormatMatch(e)},mceBlockQuote:function(){return t.isFormatMatch("blockquote")},Outdent:function(){return JH(e)},"InsertUnorderedList,InsertOrderedList":function(t){var n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state"),t.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),t.addQueryValueHandler("FontName",function(){return UH(e)},this),t.addQueryValueHandler("FontSize",function(){return XH(e)},this)},e}(),sO=bi.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),cO=function(){return!1},lO=function(){return!0},uO=function(){function e(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||cO}return e.isNative=function(e){return!!sO[e.toLowerCase()]},e.prototype.fire=function(e,t){var n,i,r,o;if(e=e.toLowerCase(),t=t||{},t.type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=lO},t.stopPropagation=function(){t.isPropagationStopped=lO},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=lO},t.isDefaultPrevented=cO,t.isPropagationStopped=cO,t.isImmediatePropagationStopped=cO),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(i=0,r=n.length;i"),this.parseShortcut),r[r.length-1]=bi.extend(r[r.length-1],{func:n,scope:i||this.editor}),bi.extend(r[0],{desc:this.editor.translate(t),subpatterns:r.slice(1)})},e.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},e.prototype.isFunctionKey=function(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123},e.prototype.matchShortcut=function(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))},e.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},e}(),SO=bi.each,MO=bi.trim,kO="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),_O={ftp:21,http:80,https:443,mailto:25},AO=function(){function e(n,i){n=MO(n),this.settings=i||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(n)||/^\s*#/.test(n))return void(o.source=n);var a=0===n.indexOf("//");if(0!==n.indexOf("/")||a||(n=(r?r.protocol||"http":"http")+"://mce_host"+n),!/^[\w\-]*:?\/\//.test(n)){var s=this.settings.base_uri?this.settings.base_uri.path:new e(t.document.location.href).directory;if(""==this.settings.base_uri.protocol)n="//mce_host"+o.toAbsPath(s,n);else{var c=/([^#?]*)([#?]?.*)/.exec(n);n=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(s,c[1])+c[2]}}n=n.replace(/@@/g,"(mce_at)");var l=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(n);SO(kO,function(e,t){var n=l[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n}),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),a&&(o.protocol="")}return e.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),i=/data:([^;]+)/.exec(n[0]);return i&&(t=i[1]),{type:t,data:n[1]}},e.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},e.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},e.prototype.toRelative=function(t){var n;if("./"===t)return t;var i=new e(t,{base_uri:this});if("mce_host"!==i.host&&this.host!==i.host&&i.host||this.port!==i.port||this.protocol!==i.protocol&&""!==i.protocol)return i.getURI();var r=this.getURI(),o=i.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(n=this.toRelPath(this.path,i.path),i.query&&(n+="?"+i.query),i.anchor&&(n+="#"+i.anchor),n)},e.prototype.toAbsolute=function(t,n){var i=new e(t,{base_uri:this});return i.getURI(n&&this.isSameOrigin(i))},e.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=_O[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},e.prototype.toRelPath=function(e,t){var n,i,r,o=0,a="",s=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),s.length>=n.length)for(i=0,r=s.length;i=n.length||s[i]!==n[i]){o=i+1;break}if(s.length=s.length||s[i]!==n[i]){o=i+1;break}if(1===o)return t;for(i=0,r=s.length-(o-1);i=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:a.push(c[n]):o++);return n=s.length-o,r=n<=0?a.reverse().join("/"):s.slice(0,n).join("/")+"/"+a.reverse().join("/"),0!==r.indexOf("/")&&(r="/"+r),i&&r.lastIndexOf("/")!==r.length-1&&(r+=i),r},e.prototype.getURI=function(e){void 0===e&&(e=!1);var t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},e}(),TO=function(){var e={},t={},n={},i={},r={},o={},a={},s=function(e,t){return function(n,i){return e[n.toLowerCase()]=cC({type:t},i)}},c=function(e,t){return i[e.toLowerCase()]=t};return{addButton:s(e,"button"),addToggleButton:s(e,"togglebutton"),addMenuButton:s(e,"menubutton"),addSplitButton:s(e,"splitbutton"),addMenuItem:s(t,"menuitem"),addNestedMenuItem:s(t,"nestedmenuitem"),addToggleMenuItem:s(t,"togglemenuitem"),addAutocompleter:s(n,"autocompleter"),addContextMenu:s(r,"contextmenu"),addContextToolbar:s(o,"contexttoolbar"),addContextForm:s(o,"contextform"),addSidebar:s(a,"sidebar"),addIcon:c,getAll:function(){return{buttons:e,menuItems:t,icons:i,popups:n,contextMenus:r,contextToolbars:o,sidebars:a}}}},DO=function(){var e=TO();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}},EO=Ns.DOM,LO=bi.extend,HO=bi.each,OO=bi.resolve,NO=Ut.ie,PO=function(){function e(e,t,n){var i=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,this.baseUri=n.baseURI,LO(this,bO),this.settings=ng(this,e,this.documentBaseUrl,n.defaultSettings,t),nc.languageLoad=this.settings.language_load,nc.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new AO(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=this.settings.inline,this.suffix=n.suffix,this.shortcuts=new zO(this),this.editorCommands=new aO(this),this.settings.cache_suffix&&(Ut.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),!1===this.settings.override_viewport&&(Ut.overrideViewPort=!1),this.ui={registry:DO()};var r=this,o=WL(r);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ji.overrideDefaults(function(){return{context:i.inline?i.getBody():i.getDoc(),element:i.getBody()}})}return e.prototype.render=function(){FL.render(this)},e.prototype.focus=function(e){vm.focus(this,e)},e.prototype.hasFocus=function(){return vm.hasFocus(this)},e.prototype.execCallback=function(e){for(var t=[],n=1;n0?sN[0]:null),fN.focusedEditor===e&&(fN.focusedEditor=null),t.length!==sN.length},hN=function(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(dN(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e},fN=Bs({},hO,{_beforeUnloadHandler:null,baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ji,majorVersion:"5",minorVersion:"0.5",releaseDate:"2019-05-09",editors:aN,i18n:ec,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,n,i,r,o=this,a="";if(n=AO.getDocumentBaseUrl(t.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),i=window.tinymce||window.tinyMCEPreInit)e=i.base||i.baseURL,a=i.suffix;else{for(var s=t.document.getElementsByTagName("script"),c=0;c0&&nN(tN(n),function(e){var n;(n=eN.get(e))?i.push(n):nN(t.document.forms,function(t){nN(t.elements,function(t){t.name===e&&(e="mce_editor_"+rN++,eN.setAttrib(t,"id",e),i.push(t))})})});break;case"textareas":case"specific_textareas":nN(eN.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||i.push(t)})}return i},u=function(e){n=e},d=function(){var t,n=0,i=[],c=function(e,o,a){var s=new PO(e,o,r);i.push(s),s.on("init",function(){++n===t.length&&u(i)}),s.targetElm=s.targetElm||a,s.render()};if(eN.unbind(window,"ready",d),s("onpageload"),t=Ji.unique(l(e)),e.types)return void nN(e.types,function(n){bi.each(t,function(t){return!eN.is(t,n.selector)||(c(a(t),iN({},e,n),t),!1)})});bi.each(t,function(e){hN(r.get(e.id))}),t=bi.grep(t,function(e){return!r.get(e.id)}),0===t.length?u([]):nN(t,function(t){o(e,t)?Eg.initError("Could not initialize inline editor on invalid inline target element",t):c(a(t),e,t)})};return r.settings=e,eN.bind(window,"ready",d),new Yt(function(e){n?e(n):u=function(t){e(t)}})},get:function(e){return 0===arguments.length?sN.slice(0):Ee(e)?$e(sN,function(t){return t.id===e}).getOr(null):Ie(e)&&sN[e]?sN[e]:null},add:function(e){var t=this;return aN[e.id]===e?e:(null===t.get(e.id)&&(cN(e.id)&&(aN[e.id]=e),aN.push(e),sN.push(e)),uN(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),jM||(jM=function(){t.fire("BeforeUnload")},eN.bind(window,"beforeunload",jM)),e)},createEditor:function(e,t){return this.add(new PO(e,t,this))},remove:function(e){var t,n,i=this;if(e)return Ee(e)?void nN(eN.select(e),function(e){(n=i.get(e.id))&&i.remove(n)}):(n=e,Oe(i.get(n.id))?null:(dN(n)&&i.fire("RemoveEditor",{editor:n}),0===sN.length&&eN.unbind(window,"beforeunload",jM),n.remove(),uN(sN.length>0),n));for(t=sN.length-1;t>=0;t--)i.remove(sN[t])},execCommand:function(e,t,n){var i=this,r=i.get(n);switch(e){case"mceAddEditor":return i.get(n)||new PO(n,i.settings,i).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(i.execCommand("mceAddEditor",0,n),!0)}return!!i.activeEditor&&i.activeEditor.execCommand(e,t,n)},triggerSave:function(){nN(sN,function(e){e.save()})},addI18n:function(e,t){ec.add(e,t)},translate:function(e){return ec.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}});fN.setup(),function(e){e.compareRanges=pv.isEq,e.getCaretRangeFromPoint=az.fromPoint,e.getSelectedNode=jl,e.getNode=Ul}(ee||(ee={}));var pN,mN,gN=ee,vN=Math.min,bN=Math.max,yN=Math.round,xN=function(e,t,n){var i,r,o,a,s,c;return i=t.x,r=t.y,o=e.w,a=e.h,s=t.w,c=t.h,n=(n||"").split(""),"b"===n[0]&&(r+=c),"r"===n[1]&&(i+=s),"c"===n[0]&&(r+=yN(c/2)),"c"===n[1]&&(i+=yN(s/2)),"b"===n[3]&&(r-=a),"r"===n[4]&&(i-=o),"c"===n[3]&&(r-=yN(a/2)),"c"===n[4]&&(i-=yN(o/2)),MN(i,r,o,a)},wN=function(e,t,n,i){var r,o;for(o=0;o=n.x&&r.x+r.w<=n.w+n.x&&r.y>=n.y&&r.y+r.h<=n.h+n.y)return i[o];return null},CN=function(e,t,n){return MN(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},zN=function(e,t){var n,i,r,o;return n=bN(e.x,t.x),i=bN(e.y,t.y),r=vN(e.x+e.w,t.x+t.w),o=vN(e.y+e.h,t.y+t.h),r-n<0||o-i<0?null:MN(n,i,r-n,o-i)},SN=function(e,t,n){var i,r,o,a,s,c,l,u,d,h;return s=e.x,c=e.y,l=e.x+e.w,u=e.y+e.h,d=t.x+t.w,h=t.y+t.h,i=bN(0,t.x-s),r=bN(0,t.y-c),o=bN(0,l-d),a=bN(0,u-h),s+=i,c+=r,n&&(l+=i,u+=r,s-=o,c-=a),l-=o,u-=a,MN(s,c,l-s,u-c)},MN=function(e,t,n,i){return{x:e,y:t,w:n,h:i}},kN=function(e){return MN(e.left,e.top,e.width,e.height)},_N={inflate:CN,relativePosition:xN,findBestRelativePosition:wN,intersect:zN,clamp:SN,create:MN,fromClientRect:kN},AN=bi.each,TN=bi.extend,DN=function(){};DN.extend=pN=function(e){var t,n,i,r=this,o=r.prototype,a=function(){var e,t,n,i=this;if(!mN&&(i.init&&i.init.apply(i,arguments),t=i.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(i,arguments)},s=function(){return this};mN=!0,t=new r,mN=!1,e.Mixins&&(AN(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),o.Mixins&&(e.Mixins=o.Mixins.concat(e.Mixins))),e.Methods&&AN(e.Methods.split(","),function(t){e[t]=s}),e.Properties&&AN(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this;return void 0!==e?(t[n]=e,t):t[n]}}),e.Statics&&AN(e.Statics,function(e,t){a[t]=e}),e.Defaults&&o.Defaults&&(e.Defaults=TN({},o.Defaults,e.Defaults));for(n in e)i=e[n],"function"==typeof i&&o[n]?t[n]=function(e,t){return function(){var n,i=this,r=i._super;return i._super=o[e],n=t.apply(i,arguments),i._super=r,n}}(n,i):t[n]=i;return a.prototype=t,a.constructor=a,a.extend=pN,a};var EN,LN=Math.min,HN=Math.max,ON=Math.round,NN=function(e){var t={},n=0,i=0,r=0,o=function(e,t,n){var i,r,o,a,s,c;return i=0,r=0,o=0,e/=255,t/=255,n/=255,s=LN(e,LN(t,n)),c=HN(e,HN(t,n)),s===c?(o=s,{h:0,s:0,v:100*o}):(a=e===s?t-n:n===s?e-t:n-e,i=e===s?3:n===s?1:5,i=60*(i-a/(c-s)),r=(c-s)/c,o=c,{h:ON(i),s:ON(100*r),v:ON(100*o)})},a=function(e,t,o){var a,s,c,l;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,o=parseInt(o,10)/100,t=HN(0,LN(t,1)),o=HN(0,LN(o,1)),0===t)return void(n=i=r=ON(255*o));switch(a=e/60,s=o*t,c=s*(1-Math.abs(a%2-1)),l=o-s,Math.floor(a)){case 0:n=s,i=c,r=0;break;case 1:n=c,i=s,r=0;break;case 2:n=0,i=s,r=c;break;case 3:n=0,i=c,r=s;break;case 4:n=c,i=0,r=s;break;case 5:n=s,i=0,r=c;break;default:n=i=r=0}n=ON(255*(n+l)),i=ON(255*(i+l)),r=ON(255*(r+l))},s=function(){var e=function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e};return"#"+e(n)+e(i)+e(r)},c=function(){return{r:n,g:i,b:r}},l=function(){return o(n,i,r)},u=function(e){var o;return"object"==typeof e?"r"in e?(n=e.r,i=e.g,r=e.b):"v"in e&&a(e.h,e.s,e.v):(o=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(o[1],10),i=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(o[1],16),i=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(o[1]+o[1],16),i=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16)),n=n<0?0:n>255?255:n,i=i<0?0:i>255?255:i,r=r<0?0:r>255?255:r,t};return e&&u(e),t.toRgb=c,t.toHsv=l,t.toHex=s,t.parse=u,t},PN=function(e){var t=JSON.stringify(e);return Ee(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},IN={serialize:PN,parse:function(e){try{return JSON.parse(e)}catch(e){}}},VN={callbacks:{},count:0,send:function(e){var t=this,n=Ns.DOM,i=void 0!==e.count?e.count:t.count,r="tinymce_jsonp_"+i;t.callbacks[i]=function(o){n.remove(r),delete t.callbacks[i],e.callback(o)},n.add(n.doc.body,"script",{id:r,src:e.url,type:"text/javascript"}),t.count++}},RN=Bs({},hO,{send:function(e){var t,n=0,i=function(){!e.async||4===t.readyState||n++>1e4?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e),t=null):Jt.setTimeout(i,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",RN.fire("beforeInitialize",{settings:e}),t=Y()){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&bi.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t=RN.fire("beforeSend",{xhr:t,settings:e}).xhr,t.send(e.data),!e.async)return i();Jt.setTimeout(i,10)}}}),FN=bi.extend,BN=function(){function e(e){this.settings=FN({},e),this.count=0}return e.sendRPC=function(t){return(new e).send(t)},e.prototype.send=function(e){var t=e.error,n=e.success,i=FN(this.settings,e);i.success=function(e,r){e=IN.parse(e),void 0===e&&(e={error:"JSON Parse error."}),e.error?t.call(i.error_scope||i.scope,e.error,r):n.call(i.success_scope||i.scope,e.result)},i.error=function(e,n){t&&t.call(i.error_scope||i.scope,e,n)},i.data=IN.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),i.content_type="application/json",RN.send(i)},e}();try{EN=t.window.localStorage}catch(e){EN=function(){return function(){var e={},t=[],n={getItem:function(t){var n=e[t];return n||null},setItem:function(n,i){t.push(n),e[n]=String(i)},key:function(e){return t[e]},removeItem:function(n){t=t.filter(function(e){return e===n}),delete e[n]},clear:function(){t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n}()}()}var WN=EN,jN={geom:{Rect:_N},util:{Promise:Yt,Delay:Jt,Tools:bi,VK:Lb,URI:AO,Class:DN,EventDispatcher:uO,Observable:hO,I18n:ec,XHR:RN,JSON:IN,JSONRequest:BN,JSONP:VN,LocalStorage:WN,Color:NN},dom:{EventUtils:dn,Sizzle:qn,DomQuery:Ji,TreeWalker:_a,DOMUtils:Ns,ScriptLoader:Rs,RangeUtils:gN,Serializer:BC,ControlSelection:GC,BookmarkManager:jC,Selection:AS,Event:dn.Event},html:{Styles:ks,Entities:ps,Node:Vf,Schema:b,SaxParser:Yf,DomParser:HC,Writer:Lp,Serializer:Hp},Env:Ut,AddOnManager:nc,Annotator:Of,Formatter:oC,UndoManager:Cy,EditorCommands:aO,WindowManager:wg,NotificationManager:j,EditorObservable:bO,Shortcuts:zO,Editor:PO,FocusManager:VO,EditorManager:fN,DOM:Ns.DOM,ScriptLoader:Rs.ScriptLoader,PluginManager:nc.PluginManager,ThemeManager:nc.ThemeManager,IconManager:Hg,trim:bi.trim,isArray:bi.isArray,is:bi.is,toArray:bi.toArray,makeMap:bi.makeMap,each:bi.each,map:bi.map,grep:bi.grep,inArray:bi.inArray,extend:bi.extend,create:bi.create,walk:bi.walk,createNS:bi.createNS,resolve:bi.resolve,explode:bi.explode,_addCacheSuffix:bi._addCacheSuffix,isOpera:Ut.opera,isWebKit:Ut.webkit,isIE:Ut.ie,isGecko:Ut.gecko,isMac:Ut.mac},UN=bi.extend(fN,jN);!function(e){window.tinymce=e,window.tinyMCE=e}(UN),function(t){try{e.exports=t}catch(e){}}(UN)}(window)}()},"5hTp":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("0R1d"),r=n("Ya48"),o=n("1hos"),a=n("/6TF"),s=n("AvCe"),c=n("yAY6"),l=n("mG0f"),u=n("2LoC"),d=n("UOgp"),h=n("gI2M"),f=n("Imkd"),p=(n("Zb8v"),n("7t+N"));n("htGZ"),n("kZW0"),n("syaN"),n("DAVf"),n("HvZG");var m=n("UKNz"),g=n("0W3Y"),v=function(){function e(){this.selectors={ids:{lightboxGallery:"#aniimated-thumbnials",trashButton:"#lightgallery_trash_button",pencilButton:"#lightgallery_pencil_button",saveButton:"#lightgallery_save_button",transferButton:"#lightgallery_transfer_button",downloadButton:"#lg-download",fileTransferButton:"#lightgallery_transfer_button",tagsManageButton:"#lightgallery_manage_tags_button"},classes:{upperToolbar:".lg-toolbar",thumbnails:".lg-thumb",nextButton:".lg-next ",downloadButton:".lg-download",currentViewedImage:".lg-current",imagePreviewWrapper:".lg-inner",currentViewedFilename:".lg-sub-html",galleryMainWrapper:".lg",textHolderCaption:".caption-text-holder",massActionRemoveButton:".mass-action-lightgallery-remove-images",massActionTransferButton:".mass-action-lightgallery-transfer-images",massActionButtons:".mass-action-lightgallery-button"},other:{checkboxForImage:".checkbox-circle input",checkboxForImageWrapper:".checkbox-circle"}},this.messages={imageRemovalConfirmation:"Do You want to remove this image/s?",imageNameEditConfirmation:"Do You want to rename this image?"},this.apiUrls={fileRemoval:"/files/action/remove-file",fileRename:"/files/action/rename-file"},this.keys={KEY_FILE_FULL_PATH:"file_full_path"},this.vars={currentFileName:"",moduleRoute:"modules_my_images"},this.bootstrapNotify=new i.default,this.shuffler=new a.default,this.ajax=new s.default,this.ajaxEvents=new g.default,this.dataTransferDialogs=new d.default,this.tagManagementDialogs=new h.default}return e.prototype.init=function(){this.shuffler.init(),this.initGallery(),this.addPlugins(),this.preventCheckboxEventTriggering(),this.handleWidgets(),this.handleGalleryEvents(),this.handleCheckboxForImageInGalleryView(),this.preventSettingMasonryGalleryAsAbsolute()},e.prototype.initGallery=function(){var e=p(this.selectors.ids.lightboxGallery);l.default.doElementsExists(e)&&e.lightGallery({thumbnail:!0})},e.prototype.reinitGallery=function(){var e=p(this.selectors.ids.lightboxGallery);l.default.doElementsExists(e)&&(e.data("lightGallery").destroy(!0),this.initGallery())},e.prototype.addPlugins=function(){this.addPluginRemoveFile(),this.addPluginRenameFile(),this.addPluginTransferFile(),this.addPluginManageFileTags()},e.prototype.handleWidgets=function(){var e=p(this.selectors.classes.massActionRemoveButton),t=p(this.selectors.classes.massActionTransferButton);if(void 0!==c.default.getCurrentRoute()&&c.default.getCurrentRoute()===this.vars.moduleRoute){if(!l.default.doElementsExists(e))throw{message:"Mass action remove button (widget) was not found"};if(!l.default.doElementsExists(t))throw{message:"Mass action transfer button (widget) was not found"};this.handleWidgetMassActionRemove(e),this.handleWidgetMassActionTransfer(t)}},e.prototype.addPluginRemoveFile=function(){var e=p(this.selectors.ids.lightboxGallery),t=this;e.on("onAfterOpen.lg",function(){p(t.selectors.classes.upperToolbar).append(' ');var e=p(t.selectors.ids.trashButton),n=p(t.selectors.ids.downloadButton),i=p(n).attr("href"),r=function(){t.removeImageWithMiniature(i),t.handleClosingGalleryIfThereAreNoMoreImages()};p(e).click(function(){f.default.mainLogic.confirm({message:t.messages.imageRemovalConfirmation,backdrop:!0,callback:function(e){e&&t.callAjaxFileRemovalForImageLink(i,r)}})})})},e.prototype.callAjaxFileRemovalForImageLink=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var i=this,o=0===e.indexOf("/")?e.replace("/",""):e,a={file_full_path:o};r.default.showLoader(),p.ajax({method:s.default.REQUEST_TYPE_POST,url:i.apiUrls.fileRemoval,data:a,async:n}).always(function(e){r.default.hideLoader();var n=m.default.fromArray(e);if(!n.isSuccessCode())return void i.bootstrapNotify.showRedNotification(n.message);i.bootstrapNotify.showGreenNotification(n.message),p.isFunction(t)&&t()})},e.prototype.addPluginRenameFile=function(){var e=p(this.selectors.ids.lightboxGallery),t=this;e.on("onAfterOpen.lg",function(e){p(t.selectors.classes.upperToolbar).append(' '),p(t.selectors.classes.upperToolbar).append(' ');var n=p(t.selectors.ids.pencilButton),i=p(t.selectors.ids.saveButton),a=p(t.selectors.ids.downloadButton);p(i).click(function(){f.default.mainLogic.confirm({message:t.messages.imageNameEditConfirmation,backdrop:!0,callback:function(e){if(e){var n=p(a).attr("href"),i=p(t.selectors.classes.currentViewedFilename).text(),o={file_new_name:i,file_full_path:n.replace("/","")};r.default.toggleLoader(),p.ajax({method:s.default.REQUEST_TYPE_POST,url:t.apiUrls.fileRename,data:o,success:function(e){if(!u.default.areTheSame(t.vars.currentFileName,i)){var r=n.replace(t.vars.currentFileName,i),o=p("[href^='"+n+"']"),a=p("[src^='"+n+"']");p(a).attr("src",r),p(a).attr("alt",i),p(o).attr("href",r),t.handleGalleryCaptionOnFileRename(t.vars.currentFileName,i),t.vars.currentFileName=p(t.selectors.classes.currentViewedFilename).text()}t.bootstrapNotify.showGreenNotification(e)}}).fail(function(e){t.bootstrapNotify.showRedNotification(e.responseText)}).always(function(){r.default.toggleLoader()})}}})}),p(n).click(function(){t.vars.currentFileName=p(t.selectors.classes.currentViewedFilename).text();var e=p(".lg"),r=p(".lg *"),a=p(t.selectors.classes.currentViewedFilename),s=!1,c=[a,n,i,t.selectors.classes.upperToolbar],l=[t.selectors.classes.imagePreviewWrapper,t.selectors.classes.thumbnails];p.each(r,function(e,t){p(t).toggleClass("disabled")}),p(e).toggleClass("blurred"),p.each(c,function(e,t){o.default.unsetDisabled(p(t))}),p(e).hasClass("blurred")?(p.each(l,function(e,t){p(t).css({filter:"blur(3px)"})}),p(i).removeClass("d-none"),s=!0):(p.each(l,function(e,t){p(t).css({filter:"blur(0px)"})}),p(i).addClass("d-none"),s=!1),s?p(a).attr("contenteditable","true"):p(a).removeAttr("contenteditable")})})},e.prototype.addPluginTransferFile=function(){var e=p(this.selectors.ids.lightboxGallery),t=this;e.on("onAfterOpen.lg",function(e){p(t.selectors.classes.upperToolbar).append(' '),t.attachCallDialogForDataTransfer()})},e.prototype.addPluginManageFileTags=function(){var e=p(this.selectors.ids.lightboxGallery),t=this;e.on("onAfterOpen.lg",function(e){p(t.selectors.classes.upperToolbar).append(' '),t.attachCallDialogForTagsManagement()})},e.prototype.attachCallDialogForDataTransfer=function(){var e=p(this.selectors.ids.fileTransferButton),t=this;l.default.doElementsExists(e)&&p(e).on("click",function(e){var n=p(e.target),i=p(n).closest(t.selectors.classes.upperToolbar),r=p(i).find(t.selectors.classes.downloadButton).attr("href"),o=function(){t.removeImageWithMiniature(r),t.handleClosingGalleryIfThereAreNoMoreImages(),f.default.mainLogic.hideAll()},a=0===r.indexOf("/")?r.replace("/",""):r;t.dataTransferDialogs.buildDataTransferDialog([a],"My Images",o)})},e.prototype.attachCallDialogForTagsManagement=function(){var e=p(this.selectors.ids.tagsManageButton),t=this;l.default.doElementsExists(e)&&p(e).on("click",function(e){var n=p(e.target),i=p(n).closest(t.selectors.classes.upperToolbar),r=p(i).find(t.selectors.classes.downloadButton).attr("href"),o=function(e){var n=p(t.selectors.ids.lightboxGallery),i=p(n).find('[data-src^="'+r+'"]'),o=e.split(","),a=JSON.stringify(o);l.default.doElementsExists(i)&&p(i).attr("data-groups",a);var s=t.shuffler.buildTagsArrayFromTagsForImages();t.shuffler.removeTagsFromFilter(),t.shuffler.appendTagsToFilter(s),t.shuffler.addTagsButtonsEvents()};t.tagManagementDialogs.buildTagManagementDialog(r,"My Images",o)})},e.prototype.removeImageWithMiniature=function(e){var t=p(this.selectors.classes.thumbnails),n=p(t).find("[src^='"+e+"']"),i=p(this.selectors.classes.nextButton),r=p(this.selectors.classes.currentViewedImage),o=p(this.selectors.ids.lightboxGallery);p(n).parent("div").remove(),p(r).remove(),p(i).click(),this.initGallery();var a=p(o).find('[data-src^="'+e+'"]'),s=p(a).attr("data-unique-id");this.shuffler.removeImageByDataUniqueId(s);var c=this.shuffler.buildTagsArrayFromTagsForImages();this.shuffler.removeTagsFromFilter(),this.shuffler.appendTagsToFilter(c),this.shuffler.addTagsButtonsEvents(),this.shuffler.switchToGroupAllIfGroupIsRemoved()},e.prototype.handleGalleryCaptionOnFileRename=function(e,t){var n=p(this.selectors.classes.textHolderCaption+"[data-filename^='"+e+"']");n.text(t),n.attr("data-alt",t)},e.prototype.handleGalleryEvents=function(){var e=this,t=p(this.selectors.ids.lightboxGallery);t.on("onAfterSlide.lg",function(){e.handleMovingBetweenImagesAfterImageRemoval(t)}),t.on("onCloseAfter.lg",function(){e.handleRebuildingEntireGalleryWhenClosingIt(t)})},e.prototype.handleMovingBetweenImagesAfterImageRemoval=function(e){var t=p(this.selectors.ids.downloadButton),n=p(t).attr("href"),i=this;e.find("[src^='"+n+"']").length>0||p(".lg-next").click();var r=p("button.lg-prev");p(r).on("click",function(){var t=p(i.selectors.ids.downloadButton);p(t).attr("href")===n&&e.data("lightGallery").goToPrevSlide()})},e.prototype.handleRebuildingEntireGalleryWhenClosingIt=function(e){this.reinitGallery()},e.prototype.handleClosingGalleryIfThereAreNoMoreImages=function(){var e=p(this.selectors.ids.lightboxGallery),t=p(e).find("img"),n=p(".lg-close");l.default.doElementsExists(t)||p(n).click()},e.prototype.preventCheckboxEventTriggering=function(){var e=p(this.selectors.ids.lightboxGallery),t=p(e.find(this.selectors.other.checkboxForImageWrapper)),n=p(e.find(this.selectors.other.checkboxForImage));p(t).on("click",function(e){e.stopImmediatePropagation();var t=e.currentTarget;if(!o.default.isCheckbox(t,!1)){var n=p(t).find("input");if(o.default.isChecked(n))return o.default.unsetChecked(n),p(n).trigger("click"),!1;o.default.setChecked(n),p(n).trigger("click")}}),n.on("click",function(e){e.stopImmediatePropagation()})},e.prototype.handleCheckboxForImageInGalleryView=function(){var e=this,t=this,n=p(this.selectors.ids.lightboxGallery),i=n.find(this.selectors.other.checkboxForImage);p(i).on("change",function(){var i=n.find(e.selectors.other.checkboxForImage+":checked"),r=p(t.selectors.classes.massActionButtons);if(l.default.doElementsExists(i))return o.default.unsetDisabled(r),!1;o.default.setDisabled(r)})},e.prototype.handleWidgetMassActionRemove=function(e){var t=this,n=p(this.selectors.ids.lightboxGallery),i=this;p(e).off("click"),p(e).on("click",function(e){if(o.default.isDisabled(t))return!1;var a=p(i.selectors.classes.massActionButtons),s=n.find(t.selectors.other.checkboxForImage+":checked");f.default.mainLogic.confirm({message:i.messages.imageRemovalConfirmation,backdrop:!0,callback:function(e){e&&(r.default.showLoader(),setTimeout(function(){p.each(s,function(e,t){o.default.isCheckbox(t);var n=p(t).closest(".shuffle-item"),r=p(n).attr("data-src"),a=function(){i.removeImageWithMiniature(r)};i.callAjaxFileRemovalForImageLink(r,a,!1)}),o.default.unsetChecked(s),o.default.setDisabled(a),i.reinitGallery(),f.default.mainLogic.hideAll()},500))}})})},e.prototype.handleWidgetMassActionTransfer=function(e){var t=this,n=p(this.selectors.ids.lightboxGallery),i=this;p(e).off("click"),p(e).on("click",function(e){if(o.default.isDisabled(t))return!1;var r=n.find(t.selectors.other.checkboxForImage+":checked"),a=p(r).closest(".shuffle-item"),s=[];p.each(a,function(e,t){var n=p(t).attr("data-src"),i=0===n.indexOf("/")?n.replace("/",""):n;s.push(i)});var l=function(){i.ajaxEvents.loadModuleContentByUrl(c.default.getCurrentUri()),i.reinitGallery(),f.default.mainLogic.hideAll()};t.dataTransferDialogs.buildDataTransferDialog(s,"My Files",l)})},e.prototype.preventSettingMasonryGalleryAsAbsolute=function(){document.addEventListener("DOMContentLoaded",function(){var e=p(".lightgallery .my-gallery"),t=p("#aniimated-thumbnials");l.default.doElementsExists(e)&&l.default.doElementsExists(t)&&(e.attr("style",""),t.attr("style",""))})},e}();t.default=v},"5noz":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i=n("ktHB"),r=n("qOZp"),o=function(){function t(){this.lockedResourceAjaxCall=new r.default,this.elements={"saved-element-class":".save-parent"},this.attributes={dataToggleResourcesLockForSystem:"data-toggle-resources-lock-for-system",dataSetResourcesLockForSystem:"data-set-resources-lock-password-for-system"},this.systemLockDialogs=new i.default}return t.prototype.init=function(){this.attachToggleRecordLockOnActionLockRecord(),this.attachEventsOnToggleResourcesLockForSystem(),this.attachEventsOnLockCreatePasswordForSystem()},t.prototype.attachToggleRecordLockOnActionLockRecord=function(){var t=this,n=e(".action-lock-record");e(n).off("click"),e(n).on("click",function(){var e=this.closest(t.elements["saved-element-class"]);t.lockedResourceAjaxCall.ajaxToggleLockRecord(e)})},t.prototype.attachEventsOnToggleResourcesLockForSystem=function(){var t=this,n=e("["+this.attributes.dataToggleResourcesLockForSystem+"= true]");n.off("click"),n.on("click",function(){var e=n.find("svg"),i=e.hasClass("text-success");if(i)return void r.default.ajaxToggleSystemLock("",i);t.systemLockDialogs.buildSystemToggleLockDialog(null,i)})},t.prototype.attachEventsOnLockCreatePasswordForSystem=function(){var t=this,n=e("["+this.attributes.dataSetResourcesLockForSystem+"= true]");n.off("click"),n.on("click",function(){t.systemLockDialogs.buildCreateLockPasswordForSystemDialog()})},t}();t.default=o}).call(t,n("7t+N"))},"77Hq":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i=n("1hos"),r=n("k6IS");n("4XGs"),n("+a3j");var o=function(){function t(){this.updateAction=new r.default}return t.prototype.init=function(){var t=this,n=e('[data-toggle-bootstrap-toggle="true"]');e.each(n,function(t,n){var r=e(this).attr("data-toggle-class"),o=e(n);void 0===r&&(r=""),o.bootstrapToggle("destroy"),o.bootstrapToggle({size:"small",onstyle:"success",offstyle:"info",style:r});var a=e(n).closest(".toggle");e(a).on("click",function(){i.default.isChecked(o)?i.default.unsetChecked(o):i.default.setChecked(o)})}),t.updateAction.attachContentSaveEventOnSaveIcon()},t}();t.default=o}).call(t,n("7t+N"))},"7t+N":function(e,t,n){var i,r;/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
@@ -30,7 +29,7 @@
*
* Date: 2018-01-20T17:24Z
*/
-!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function a(e,t,n){t=t||ce;var i,r=t.createElement("script");if(r.text=e,n)for(i in ke)n[i]&&(r[i]=n[i]);t.head.appendChild(r).parentNode.removeChild(r)}function s(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ge[ve.call(e)]||"object":typeof e}function l(e){var t=!!e&&"length"in e&&e.length,n=s(e);return!we(e)&&!Me(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return we(t)?Se.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?Se.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Se.grep(e,function(e){return me.call(t,e)>-1!==n}):Se.filter(t,e,n)}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function h(e){var t={};return Se.each(e.match(He)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function p(e){throw e}function m(e,t,n,i){var r;try{e&&we(r=e.promise)?r.call(e).done(t).fail(n):e&&we(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function g(){ce.removeEventListener("DOMContentLoaded",g),n.removeEventListener("load",g),Se.ready()}function v(e,t){return t.toUpperCase()}function y(e){return e.replace(ze,"ms-").replace(je,v)}function b(){this.expando=Se.expando+b.uid++}function _(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ue.test(e)?JSON.parse(e):e)}function x(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Xe,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=_(n)}catch(e){}Ve.set(e,t,n)}else n=void 0;return n}function w(e,t,n,i){var r,o,a=20,s=i?function(){return i.cur()}:function(){return Se.css(e,t,"")},l=s(),u=n&&n[3]||(Se.cssNumber[t]?"":"px"),c=(Se.cssNumber[t]||"px"!==u&&+l)&&qe.exec(Se.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)Se.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,Se.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function M(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ke[i];return r||(t=n.body.appendChild(n.createElement(i)),r=Se.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ke[i]=r,r)}function k(e,t){for(var n,i,r=[],o=0,a=e.length;o-1)r&&r.push(o);else if(c=Se.contains(o.ownerDocument,o),a=S(h.appendChild(o),"script"),c&&D(a),n)for(d=0;o=a[d++];)tt.test(o.type||"")&&n.push(o);return h}function T(){return!0}function L(){return!1}function A(){try{return ce.activeElement}catch(e){}}function E(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)E(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=L;else if(!r)return e;return 1===o&&(a=r,r=function(e){return Se().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=Se.guid++)),e.each(function(){Se.event.add(this,t,r,i,n)})}function Y(e,t){return u(e,"table")&&u(11!==t.nodeType?t:t.firstChild,"tr")?Se(e).children("tbody")[0]||e:e}function O(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function I(e,t){var n,i,r,o,a,s,l,u;if(1===t.nodeType){if(We.hasData(e)&&(o=We.access(e),a=We.set(t,o),u=o.events)){delete a.handle,a.events={};for(r in u)for(n=0,i=u[r].length;n1&&"string"==typeof p&&!xe.checkClone&&ct.test(p))return e.each(function(r){var o=e.eq(r);m&&(t[0]=p.call(this,r,o.html())),R(o,t,n,i)});if(h&&(r=C(t,e[0].ownerDocument,!1,e,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=Se.map(S(r,"script"),O),l=s.length;d=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))),l}function U(e,t,n){var i=ft(e),r=F(e,t,i),o="border-box"===Se.css(e,"boxSizing",!1,i),a=o;if(ht.test(r)){if(!n)return r;r="auto"}return a=a&&(xe.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===Se.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(r=parseFloat(r)||0)+V(e,t,n||(o?"border":"content"),a,i,r)+"px"}function X(e,t,n,i,r){return new X.prototype.init(e,t,n,i,r)}function G(){wt&&(!1===ce.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(G):n.setTimeout(G,Se.fx.interval),Se.fx.tick())}function q(){return n.setTimeout(function(){xt=void 0}),xt=Date.now()}function $(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=$e[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function J(e,t,n){for(var i,r=(Q.tweeners[t]||[]).concat(Q.tweeners["*"]),o=0,a=r.length;o=0&&n0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function u(e,t,n){return Ce(t)?Me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?Me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Me.grep(e,function(e){return me.call(t,e)>-1!==n}):Me.filter(t,e,n)}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function h(e){var t={};return Me.each(e.match(Pe)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function p(e){throw e}function m(e,t,n,i){var r;try{e&&Ce(r=e.promise)?r.call(e).done(t).fail(n):e&&Ce(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function g(){ue.removeEventListener("DOMContentLoaded",g),n.removeEventListener("load",g),Me.ready()}function v(e,t){return t.toUpperCase()}function b(e){return e.replace(Fe,"ms-").replace(Be,v)}function y(){this.expando=Me.expando+y.uid++}function x(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ye.test(e)?JSON.parse(e):e)}function w(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Xe,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=x(n)}catch(e){}Ue.set(e,t,n)}else n=void 0;return n}function C(e,t,n,i){var r,o,a=20,s=i?function(){return i.cur()}:function(){return Me.css(e,t,"")},c=s(),l=n&&n[3]||(Me.cssNumber[t]?"":"px"),u=(Me.cssNumber[t]||"px"!==l&&+c)&&qe.exec(Me.css(e,t));if(u&&u[3]!==l){for(c/=2,l=l||u[3],u=+c||1;a--;)Me.style(e,t,u+l),(1-o)*(1-(o=s()/c||.5))<=0&&(a=0),u/=o;u*=2,Me.style(e,t,u+l),n=n||[]}return n&&(u=+u||+c||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=u,i.end=r)),r}function z(e){var t,n=e.ownerDocument,i=e.nodeName,r=Je[i];return r||(t=n.body.appendChild(n.createElement(i)),r=Me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Je[i]=r,r)}function S(e,t){for(var n,i,r=[],o=0,a=e.length;o-1)r&&r.push(o);else if(u=Me.contains(o.ownerDocument,o),a=M(h.appendChild(o),"script"),u&&k(a),n)for(d=0;o=a[d++];)tt.test(o.type||"")&&n.push(o);return h}function A(){return!0}function T(){return!1}function D(){try{return ue.activeElement}catch(e){}}function E(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)E(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=T;else if(!r)return e;return 1===o&&(a=r,r=function(e){return Me().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=Me.guid++)),e.each(function(){Me.event.add(this,t,r,i,n)})}function L(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?Me(e).children("tbody")[0]||e:e}function H(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function O(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function N(e,t){var n,i,r,o,a,s,c,l;if(1===t.nodeType){if(je.hasData(e)&&(o=je.access(e),a=je.set(t,o),l=o.events)){delete a.handle,a.events={};for(r in l)for(n=0,i=l[r].length;n1&&"string"==typeof p&&!we.checkClone&&ut.test(p))return e.each(function(r){var o=e.eq(r);m&&(t[0]=p.call(this,r,o.html())),I(o,t,n,i)});if(h&&(r=_(t,e[0].ownerDocument,!1,e,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=Me.map(M(r,"script"),H),c=s.length;d=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-c-s-.5))),c}function Y(e,t,n){var i=ft(e),r=R(e,t,i),o="border-box"===Me.css(e,"boxSizing",!1,i),a=o;if(ht.test(r)){if(!n)return r;r="auto"}return a=a&&(we.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===Me.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(r=parseFloat(r)||0)+U(e,t,n||(o?"border":"content"),a,i,r)+"px"}function X(e,t,n,i,r){return new X.prototype.init(e,t,n,i,r)}function G(){Ct&&(!1===ue.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(G):n.setTimeout(G,Me.fx.interval),Me.fx.tick())}function q(){return n.setTimeout(function(){wt=void 0}),wt=Date.now()}function $(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=$e[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function Z(e,t,n){for(var i,r=(Q.tweeners[t]||[]).concat(Q.tweeners["*"]),o=0,a=r.length;o=0&&nx.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[N]=!0,e}function r(e){var t=E.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)x.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&we(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function d(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function p(e,n,i){for(var r=0,o=n.length;r-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(g,b.length):b),o?o(null,a,b,l):J.apply(a,b)})}function v(e){for(var t,n,i,r=e.length,o=x.relative[e[0].type],a=o||x.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,i){var r=!o&&(i||n!==C)||((t=n).nodeType?l(e,n,i):u(e,n,i));return t=null,r}];s1&&f(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s0,o=e.length>0,a=function(i,a,s,l,u){var c,d,h,f=0,p="0",g=i&&[],v=[],y=C,b=i||o&&x.find.TAG("*",u),_=z+=null==y?1:Math.random()||.1,w=b.length;for(u&&(C=a===E||a||u);p!==w&&null!=(c=b[p]);p++){if(o&&c){for(d=0,a||c.ownerDocument===E||(A(c),s=!O);h=e[d++];)if(h(c,a||E,s)){l.push(c);break}u&&(z=_)}r&&((c=!h&&c)&&f--,i&&g.push(c))}if(f+=p,r&&p!==f){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=q.call(l));v=m(v)}J.apply(l,v),u&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return u&&(z=_,C=y),g};return r?i(a):a}var b,_,x,w,M,k,S,D,C,T,L,A,E,Y,O,P,I,H,R,N="sizzle"+1*new Date,F=e.document,z=0,j=0,B=n(),W=n(),V=n(),U=function(e,t){return e===t&&(L=!0),0},X={}.hasOwnProperty,G=[],q=G.pop,$=G.push,J=G.push,Z=G.slice,K=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(ie),ce=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,pe=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},be=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_e=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},xe=function(){A()},we=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{J.apply(G=Z.call(F.childNodes),F.childNodes),G[F.childNodes.length].nodeType}catch(e){J={apply:G.length?function(e,t){$.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=t.support={},M=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:F;return i!==E&&9===i.nodeType&&i.documentElement?(E=i,Y=E.documentElement,O=!M(E),F!==E&&(n=E.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",xe,!1):n.attachEvent&&n.attachEvent("onunload",xe)),_.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=r(function(e){return e.appendChild(E.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=pe.test(E.getElementsByClassName),_.getById=r(function(e){return Y.appendChild(e).id=N,!E.getElementsByName||!E.getElementsByName(N).length}),_.getById?(x.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},x.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),x.find.TAG=_.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},x.find.CLASS=_.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&O)return t.getElementsByClassName(e)},I=[],P=[],(_.qsa=pe.test(E.querySelectorAll))&&(r(function(e){Y.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ee+"*(?:value|"+Q+")"),e.querySelectorAll("[id~="+N+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||P.push(".#.+[+~]")}),r(function(e){e.innerHTML=" ";var t=E.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),Y.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(_.matchesSelector=pe.test(H=Y.matches||Y.webkitMatchesSelector||Y.mozMatchesSelector||Y.oMatchesSelector||Y.msMatchesSelector))&&r(function(e){_.disconnectedMatch=H.call(e,"*"),H.call(e,"[s!='']:x"),I.push("!=",ie)}),P=P.length&&new RegExp(P.join("|")),I=I.length&&new RegExp(I.join("|")),t=pe.test(Y.compareDocumentPosition),R=t||pe.test(Y.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return L=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===E||e.ownerDocument===F&&R(F,e)?-1:t===E||t.ownerDocument===F&&R(F,t)?1:T?K(T,e)-K(T,t):0:4&n?-1:1)}:function(e,t){if(e===t)return L=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!r||!o)return e===E?-1:t===E?1:r?-1:o?1:T?K(T,e)-K(T,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===F?-1:l[i]===F?1:0},E):E},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==E&&A(e),n=n.replace(le,"='$1']"),_.matchesSelector&&O&&!V[n+" "]&&(!I||!I.test(n))&&(!P||!P.test(n)))try{var i=H.call(e,n);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,E,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==E&&A(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==E&&A(e);var n=x.attrHandle[t.toLowerCase()],i=n&&X.call(x.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==i?i:_.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(be,_e)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(L=!_.detectDuplicates,T=!_.sortStable&&e.slice(0),e.sort(U),L){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return T=null,e},w=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=w(t);return n},x=t.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(h=g,d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[e]||[],f=u[0]===z&&u[1],b=f&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[z,f,b];break}}else if(y&&(h=t,d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[e]||[],f=u[0]===z&&u[1],b=f),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),c[e]=[z,b]),h!==t)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var r,o=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[N]?o(n):o.length>1?(r=[e,e,"",n],x.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=K(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(oe,"$1"));return r[N]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:i(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===Y},focus:function(e){return e===E.activeElement&&(!E.hasFocus||E.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(a=o[0]).type&&9===t.nodeType&&O&&x.relative[o[1].type]){if(!(t=(x.find.ID(a.matches[0].replace(ve,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(a=o[r],!x.relative[s=a.type]);)if((l=x.find[s])&&(i=l(a.matches[0].replace(ve,ye),ge.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&d(o)))return J.apply(n,i),n;break}}return(c||S(e,h))(i,t,!O,n,!t||ge.test(e)&&u(t.parentNode)||t),n},_.sortStable=N.split("").sort(U).join("")===N,_.detectDuplicates=!!L,A(),_.sortDetached=r(function(e){return 1&e.compareDocumentPosition(E.createElement("fieldset"))}),r(function(e){return e.innerHTML=" ","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&r(function(e){return e.innerHTML=" ",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(Q,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);Se.find=Ce,Se.expr=Ce.selectors,Se.expr[":"]=Se.expr.pseudos,Se.uniqueSort=Se.unique=Ce.uniqueSort,Se.text=Ce.getText,Se.isXMLDoc=Ce.isXML,Se.contains=Ce.contains,Se.escapeSelector=Ce.escape;var Te=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&Se(e).is(n))break;i.push(e)}return i},Le=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ae=Se.expr.match.needsContext,Ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Se.find.matchesSelector(i,e)?[i]:[]:Se.find.matches(e,Se.grep(t,function(e){return 1===e.nodeType}))},Se.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(Se(e).filter(function(){for(t=0;t1?Se.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&Ae.test(e)?Se(e):e||[],!1).length}});var Ye,Oe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Se.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ye,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Oe.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof Se?t[0]:t,Se.merge(this,Se.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ce,!0)),Ee.test(i[1])&&Se.isPlainObject(t))for(i in t)we(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ce.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):we(e)?void 0!==n.ready?n.ready(e):e(Se):Se.makeArray(e,this)}).prototype=Se.fn,Ye=Se(ce);var Pe=/^(?:parents|prev(?:Until|All))/,Ie={children:!0,contents:!0,next:!0,prev:!0};Se.fn.extend({has:function(e){var t=Se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&Se.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Se.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?me.call(Se(e),this[0]):me.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Se.uniqueSort(Se.merge(this.get(),Se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return Le((e.parentNode||{}).firstChild,e)},children:function(e){return Le(e.firstChild)},contents:function(e){return u(e,"iframe")?e.contentDocument:(u(e,"template")&&(e=e.content||e),Se.merge([],e.childNodes))}},function(e,t){Se.fn[e]=function(n,i){var r=Se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Se.filter(i,r)),this.length>1&&(Ie[e]||Se.uniqueSort(r),Pe.test(e)&&r.reverse()),this.pushStack(r)}});var He=/[^\x20\t\r\n\f]+/g;Se.Callbacks=function(e){e="string"==typeof e?h(e):Se.extend({},e);var t,n,i,r,o=[],a=[],l=-1,u=function(){for(r=r||e.once,i=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?Se.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},Se.extend({Deferred:function(e){var t=[["notify","progress",Se.Callbacks("memory"),Se.Callbacks("memory"),2],["resolve","done",Se.Callbacks("once memory"),Se.Callbacks("once memory"),0,"resolved"],["reject","fail",Se.Callbacks("once memory"),Se.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return Se.Deferred(function(n){Se.each(t,function(t,i){var r=we(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&we(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){function o(e,t,i,r){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=a&&(i!==p&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(Se.Deferred.getStackHook&&(c.stackTrace=Se.Deferred.getStackHook()),n.setTimeout(c))}}var a=0;return Se.Deferred(function(n){t[0][3].add(o(0,n,we(r)?r:f,n.notifyWith)),t[1][3].add(o(0,n,we(e)?e:f)),t[2][3].add(o(0,n,we(i)?i:p))}).promise()},promise:function(e){return null!=e?Se.extend(e,r):r}},o={};return Se.each(t,function(e,n){var a=n[2],s=n[5];r[n[1]]=a.add,s&&a.add(function(){i=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=he.call(arguments),o=Se.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?he.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(m(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||we(r[n]&&r[n].then)))return o.then();for(;n--;)m(r[n],a(n),o.reject);return o.promise()}});var Re=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Se.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Re.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Se.readyException=function(e){n.setTimeout(function(){throw e})};var Ne=Se.Deferred();Se.fn.ready=function(e){return Ne.then(e).catch(function(e){Se.readyException(e)}),this},Se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Se.readyWait:Se.isReady)||(Se.isReady=!0,!0!==e&&--Se.readyWait>0||Ne.resolveWith(ce,[Se]))}}),Se.ready.then=Ne.then,"complete"===ce.readyState||"loading"!==ce.readyState&&!ce.documentElement.doScroll?n.setTimeout(Se.ready):(ce.addEventListener("DOMContentLoaded",g),n.addEventListener("load",g));var Fe=function(e,t,n,i,r,o,a){var l=0,u=e.length,c=null==n;if("object"===s(n)){r=!0;for(l in n)Fe(e,t,l,n[l],!0,o,a)}else if(void 0!==i&&(r=!0,we(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Se(e),n)})),t))for(;l1,null,!0)},removeData:function(e){return this.each(function(){Ve.remove(this,e)})}}),Se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=We.get(e,t),n&&(!i||Array.isArray(n)?i=We.access(e,t,Se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=Se.queue(e,t),i=n.length,r=n.shift(),o=Se._queueHooks(e,t),a=function(){Se.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return We.get(e,n)||We.access(e,n,{empty:Se.Callbacks("once memory").add(function(){We.remove(e,[t+"queue",n])})})}}),Se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,tt=/^$|^module$|\/(?:java|ecma)script/i,nt={option:[1,""," "],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};nt.optgroup=nt.option,nt.tbody=nt.tfoot=nt.colgroup=nt.caption=nt.thead,nt.th=nt.td;var it=/<|?\w+;/;!function(){var e=ce.createDocumentFragment(),t=e.appendChild(ce.createElement("div")),n=ce.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),xe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",xe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var rt=ce.documentElement,ot=/^key/,at=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,st=/^([^.]*)(?:\.(.+)|)/;Se.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=We.get(e);if(g)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&Se.find.matchesSelector(rt,r),n.guid||(n.guid=Se.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==Se&&Se.event.triggered!==t.type?Se.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(He)||[""],u=t.length;u--;)s=st.exec(t[u])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f&&(d=Se.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=Se.event.special[f]||{},c=Se.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Se.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),Se.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=We.hasData(e)&&We.get(e);if(g&&(l=g.events)){for(t=(t||"").match(He)||[""],u=t.length;u--;)if(s=st.exec(t[u])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=Se.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||Se.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)Se.event.remove(e,f+t[u],n,i,!0);Se.isEmptyObject(l)&&We.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,a,s=Se.event.fix(e),l=new Array(arguments.length),u=(We.get(this,"events")||{})[s.type]||[],c=Se.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:Se.find(r,this,null,[u]).length),a[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,ut=/