mailtrain/client/static/mosaico/rs/mosaico-libs-and-tinymce.min.js
Tomas Bures 2e9d44c705 Added ability to make a conditional block in MJML Mosaico.
Mosaico switched from master to v0.17.5
Added workaround for Chrome - after save, images in Mosaico disappear
2019-05-19 01:42:26 +02:00

13 lines
No EOL
905 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* Bundle package for the following libraries:
* jQuery | (c) JS Foundation and other contributors | jquery.org/license
* jQuery Migrate v3.0.1 | (c) jQuery Foundation and other contributors | jquery.org/license
* Knockout | (c) The Knockout.js team | License: MIT (http://www.opensource.org/licenses/mit-license.php)
* jQuery UI | Copyright 2015 jQuery Foundation and other contributors; Licensed MIT
* jQuery UI Touch Punch | Copyright 2011-2014, Dave Furfero | Dual licensed under the MIT or GPL Version 2 licenses.
* jQuery File Upload Plugin + dependencies | Copyright 2010, Sebastian Tschan | Licensed under the MIT license: https://opensource.org/licenses/MIT
* knockout-jqueryui | Copyright (c) 2016 Vas Gabor <gvas.munka@gmail.com> Licensed MIT
* TinyMCE + Plugins | Copyright (c) 1999-2017 Ephox Corp. | Released under LGPL License. http://www.tinymce.com/license
*/
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],k=C.document,i=Object.getPrototypeOf,a=t.slice,m=t.concat,l=t.push,r=t.indexOf,n={},o=n.toString,g=n.hasOwnProperty,s=g.toString,c=s.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},u={type:!0,src:!0,noModule:!0};function _(e,t,n){var i,r=(t=t||k).createElement("script");if(r.text=e,n)for(i in u)n[i]&&(r[i]=n[i]);t.head.appendChild(r).parentNode.removeChild(r)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var d="3.3.1",T=function(e,t){return new T.fn.init(e,t)},h=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function f(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!y(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}T.fn=T.prototype={jquery:d,constructor:T,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(n){return this.pushStack(T.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:t.sort,splice:t.splice},T.extend=T.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||y(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(i=e[t])&&(c&&i&&(T.isPlainObject(i)||(r=Array.isArray(i)))?(o=r?(r=!1,n&&Array.isArray(n)?n:[]):n&&T.isPlainObject(n)?n:{},s[t]=T.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},T.extend({expando:"jQuery"+(d+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=i(e))||"function"==typeof(n=g.call(t,"constructor")&&t.constructor)&&s.call(n)===c)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){_(e)},each:function(e,t){var n,i=0;if(f(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(h,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(f(Object(e))?T.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:r.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,o=0,s=[];if(f(e))for(i=e.length;o<i;o++)null!=(r=t(e[o],o,n))&&s.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&s.push(r);return m.apply([],s)},guid:1,support:v}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=t[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var p=function(n){var e,f,_,o,r,p,d,m,x,l,c,w,C,s,k,g,a,u,v,T="sizzle"+1*new Date,y=n.document,S=0,i=0,h=se(),b=se(),E=se(),N=function(e,t){return e===t&&(c=!0),0},D={}.hasOwnProperty,t=[],R=t.pop,A=t.push,P=t.push,M=t.slice,I=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",H="\\["+B+"*("+L+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+B+"*\\]",F=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp(B+"+","g"),j=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),W=new RegExp("^"+B+"*,"+B+"*"),U=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),q=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),V=new RegExp(F),$=new RegExp("^"+L+"$"),K={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),ee=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)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){w()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{P.apply(t=M.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){P={apply:t.length?function(e,t){A.apply(e,M.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function oe(e,t,n,i){var r,o,s,a,l,c,u,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&((t?t.ownerDocument||t:y)!==C&&w(t),t=t||C,k)){if(11!==h&&(l=Q.exec(e)))if(r=l[1]){if(9===h){if(!(s=t.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(d&&(s=d.getElementById(r))&&v(t,s)&&s.id===r)return n.push(s),n}else{if(l[2])return P.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&f.getElementsByClassName&&t.getElementsByClassName)return P.apply(n,t.getElementsByClassName(r)),n}if(f.qsa&&!E[e+" "]&&(!g||!g.test(e))){if(1!==h)d=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(te,ne):t.setAttribute("id",a=T),o=(c=p(e)).length;o--;)c[o]="#"+a+" "+ve(c[o]);u=c.join(","),d=G.test(e)&&me(t.parentNode)||t}if(u)try{return P.apply(n,d.querySelectorAll(u)),n}catch(e){}finally{a===T&&t.removeAttribute("id")}}}return m(e.replace(j,"$1"),t,n,i)}function se(){var i=[];return function e(t,n){return i.push(t+" ")>_.cacheLength&&delete e[i.shift()],e[t+" "]=n}}function ae(e){return e[T]=!0,e}function le(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)_.attrHandle[n[i]]=t}function ue(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 de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&re(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(s){return ae(function(o){return o=+o,ae(function(e,t){for(var n,i=s([],e.length,o),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=oe.support={},r=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=oe.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:y;return i!==C&&9===i.nodeType&&i.documentElement&&(s=(C=i).documentElement,k=!r(C),y!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ie,!1):n.attachEvent&&n.attachEvent("onunload",ie)),f.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=le(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=X.test(C.getElementsByClassName),f.getById=le(function(e){return s.appendChild(e).id=T,!C.getElementsByName||!C.getElementsByName(T).length}),f.getById?(_.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},_.find.ID=function(e,t){if(void 0!==t.getElementById&&k){var n=t.getElementById(e);return n?[n]:[]}}):(_.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},_.find.ID=function(e,t){if(void 0!==t.getElementById&&k){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[]}}),_.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},_.find.CLASS=f.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&k)return t.getElementsByClassName(e)},a=[],g=[],(f.qsa=X.test(C.querySelectorAll))&&(le(function(e){s.appendChild(e).innerHTML="<a id='"+T+"'></a><select id='"+T+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+B+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+B+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(f.matchesSelector=X.test(u=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&le(function(e){f.disconnectedMatch=u.call(e,"*"),u.call(e,"[s!='']:x"),a.push("!=",F)}),g=g.length&&new RegExp(g.join("|")),a=a.length&&new RegExp(a.join("|")),t=X.test(s.compareDocumentPosition),v=t||X.test(s.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},N=t?function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===y&&v(y,e)?-1:t===C||t.ownerDocument===y&&v(y,t)?1:l?I(l,e)-I(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===C?-1:t===C?1:r?-1:o?1:l?I(l,e)-I(l,t):0;if(r===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ue(s[i],a[i]):s[i]===y?-1:a[i]===y?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&w(e),t=t.replace(q,"='$1']"),f.matchesSelector&&k&&!E[t+" "]&&(!a||!a.test(t))&&(!g||!g.test(t)))try{var n=u.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,C,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==C&&w(e),v(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==C&&w(e);var n=_.attrHandle[t.toLowerCase()],i=n&&D.call(_.attrHandle,t.toLowerCase())?n(e,t,!k):void 0;return void 0!==i?i:f.attributes||!k?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],i=0,r=0;if(c=!f.detectDuplicates,l=!f.sortStable&&e.slice(0),e.sort(N),c){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return l=null,e},o=oe.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+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=o(t);return n},(_=oe.selectors={cacheLength:50,createPseudo:ae,match:K,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=p(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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=h[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&h(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(e){var t=oe.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===r:"!="===i?t!==r:"^="===i?r&&0===t.indexOf(r):"*="===i?r&&-1<t.indexOf(r):"$="===i?r&&t.slice(-r.length)===r:"~="===i?-1<(" "+t.replace(z," ")+" ").indexOf(r):"|="===i&&(t===r||t.slice(0,r.length+1)===r+"-"))}},CHILD:function(p,e,t,m,g){var v="nth"!==p.slice(0,3),y="last"!==p.slice(-4),b="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var i,r,o,s,a,l,c=v!==y?"nextSibling":"previousSibling",u=e.parentNode,d=b&&e.nodeName.toLowerCase(),h=!n&&!b,f=!1;if(u){if(v){for(;c;){for(s=e;s=s[c];)if(b?s.nodeName.toLowerCase()===d:1===s.nodeType)return!1;l=c="only"===p&&!l&&"nextSibling"}return!0}if(l=[y?u.firstChild:u.lastChild],y&&h){for(f=(a=(i=(r=(o=(s=u)[T]||(s[T]={}))[s.uniqueID]||(o[s.uniqueID]={}))[p]||[])[0]===S&&i[1])&&i[2],s=a&&u.childNodes[a];s=++a&&s&&s[c]||(f=a=0)||l.pop();)if(1===s.nodeType&&++f&&s===e){r[p]=[S,a,f];break}}else if(h&&(f=a=(i=(r=(o=(s=e)[T]||(s[T]={}))[s.uniqueID]||(o[s.uniqueID]={}))[p]||[])[0]===S&&i[1]),!1===f)for(;(s=++a&&s&&s[c]||(f=a=0)||l.pop())&&((b?s.nodeName.toLowerCase()!==d:1!==s.nodeType)||!++f||(h&&((r=(o=s[T]||(s[T]={}))[s.uniqueID]||(o[s.uniqueID]={}))[p]=[S,f]),s!==e)););return(f-=g)===m||f%m==0&&0<=f/m}}},PSEUDO:function(e,o){var t,s=_.pseudos[e]||_.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return s[T]?s(o):1<s.length?(t=[e,e,"",o],_.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,t){for(var n,i=s(e,o),r=i.length;r--;)e[n=I(e,i[r])]=!(t[n]=i[r])}):function(e){return s(e,0,t)}):s}},pseudos:{not:ae(function(e){var i=[],r=[],a=d(e.replace(j,"$1"));return a[T]?ae(function(e,t,n,i){for(var r,o=a(e,null,i,[]),s=e.length;s--;)(r=o[s])&&(e[s]=!(t[s]=r))}):function(e,t,n){return i[0]=e,a(i,null,n,r),i[0]=null,!r.pop()}}),has:ae(function(t){return function(e){return 0<oe(t,e).length}}),contains:ae(function(t){return t=t.replace(Z,ee),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:ae(function(n){return $.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(Z,ee).toLowerCase(),function(e){var t;do{if(t=k?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!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!_.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.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:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var i=n<0?n+t:n;0<=--i;)e.push(i);return e}),gt:pe(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=_.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})_.pseudos[e]=he(e);function ge(){}function ve(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function ye(a,e,t){var l=e.dir,c=e.next,u=c||l,d=t&&"parentNode"===u,h=i++;return e.first?function(e,t,n){for(;e=e[l];)if(1===e.nodeType||d)return a(e,t,n);return!1}:function(e,t,n){var i,r,o,s=[S,h];if(n){for(;e=e[l];)if((1===e.nodeType||d)&&a(e,t,n))return!0}else for(;e=e[l];)if(1===e.nodeType||d)if(r=(o=e[T]||(e[T]={}))[e.uniqueID]||(o[e.uniqueID]={}),c&&c===e.nodeName.toLowerCase())e=e[l]||e;else{if((i=r[u])&&i[0]===S&&i[1]===h)return s[2]=i[2];if((r[u]=s)[2]=a(e,t,n))return!0}return!1}}function be(r){return 1<r.length?function(e,t,n){for(var i=r.length;i--;)if(!r[i](e,t,n))return!1;return!0}:r[0]}function _e(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function xe(f,p,m,g,v,e){return g&&!g[T]&&(g=xe(g)),v&&!v[T]&&(v=xe(v,e)),ae(function(e,t,n,i){var r,o,s,a=[],l=[],c=t.length,u=e||function(e,t,n){for(var i=0,r=t.length;i<r;i++)oe(e,t[i],n);return n}(p||"*",n.nodeType?[n]:n,[]),d=!f||!e&&p?u:_e(u,a,f,n,i),h=m?v||(e?f:c||g)?[]:t:d;if(m&&m(d,h,n,i),g)for(r=_e(h,l),g(r,[],n,i),o=r.length;o--;)(s=r[o])&&(h[l[o]]=!(d[l[o]]=s));if(e){if(v||f){if(v){for(r=[],o=h.length;o--;)(s=h[o])&&r.push(d[o]=s);v(null,h=[],r,i)}for(o=h.length;o--;)(s=h[o])&&-1<(r=v?I(e,s):a[o])&&(e[r]=!(t[r]=s))}}else h=_e(h===t?h.splice(c,h.length):h),v?v(null,t,h,i):P.apply(t,h)})}function we(e){for(var r,t,n,i=e.length,o=_.relative[e[0].type],s=o||_.relative[" "],a=o?1:0,l=ye(function(e){return e===r},s,!0),c=ye(function(e){return-1<I(r,e)},s,!0),u=[function(e,t,n){var i=!o&&(n||t!==x)||((r=t).nodeType?l(e,t,n):c(e,t,n));return r=null,i}];a<i;a++)if(t=_.relative[e[a].type])u=[ye(be(u),t)];else{if((t=_.filter[e[a].type].apply(null,e[a].matches))[T]){for(n=++a;n<i&&!_.relative[e[n].type];n++);return xe(1<a&&be(u),1<a&&ve(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(j,"$1"),t,a<n&&we(e.slice(a,n)),n<i&&we(e=e.slice(n)),n<i&&ve(e))}u.push(t)}return be(u)}return ge.prototype=_.filters=_.pseudos,_.setFilters=new ge,p=oe.tokenize=function(e,t){var n,i,r,o,s,a,l,c=b[e+" "];if(c)return t?0:c.slice(0);for(s=e,a=[],l=_.preFilter;s;){for(o in n&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),a.push(r=[])),n=!1,(i=U.exec(s))&&(n=i.shift(),r.push({value:n,type:i[0].replace(j," ")}),s=s.slice(n.length)),_.filter)!(i=K[o].exec(s))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):b(e,a).slice(0)},d=oe.compile=function(e,t){var n,g,v,y,b,i,r=[],o=[],s=E[e+" "];if(!s){for(t||(t=p(e)),n=t.length;n--;)(s=we(t[n]))[T]?r.push(s):o.push(s);(s=E(e,(g=o,y=0<(v=r).length,b=0<g.length,i=function(e,t,n,i,r){var o,s,a,l=0,c="0",u=e&&[],d=[],h=x,f=e||b&&_.find.TAG("*",r),p=S+=null==h?1:Math.random()||.1,m=f.length;for(r&&(x=t===C||t||r);c!==m&&null!=(o=f[c]);c++){if(b&&o){for(s=0,t||o.ownerDocument===C||(w(o),n=!k);a=g[s++];)if(a(o,t||C,n)){i.push(o);break}r&&(S=p)}y&&((o=!a&&o)&&l--,e&&u.push(o))}if(l+=c,y&&c!==l){for(s=0;a=v[s++];)a(u,d,t,n);if(e){if(0<l)for(;c--;)u[c]||d[c]||(d[c]=R.call(i));d=_e(d)}P.apply(i,d),r&&!e&&0<d.length&&1<l+v.length&&oe.uniqueSort(i)}return r&&(S=p,x=h),u},y?ae(i):i))).selector=e}return s},m=oe.select=function(e,t,n,i){var r,o,s,a,l,c="function"==typeof e&&e,u=!i&&p(e=c.selector||e);if(n=n||[],1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(s=o[0]).type&&9===t.nodeType&&k&&_.relative[o[1].type]){if(!(t=(_.find.ID(s.matches[0].replace(Z,ee),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=K.needsContext.test(e)?0:o.length;r--&&(s=o[r],!_.relative[a=s.type]);)if((l=_.find[a])&&(i=l(s.matches[0].replace(Z,ee),G.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&ve(o)))return P.apply(n,i),n;break}}return(c||d(e,u))(i,t,!k,n,!t||G.test(e)&&me(t.parentNode)||t),n},f.sortStable=T.split("").sort(N).join("")===T,f.detectDuplicates=!!c,w(),f.sortDetached=le(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),le(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),f.attributes&&le(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),le(function(e){return null==e.getAttribute("disabled")})||ce(O,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),oe}(C);T.find=p,T.expr=p.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=p.uniqueSort,T.text=p.getText,T.isXMLDoc=p.isXML,T.contains=p.contains,T.escapeSelector=p.escape;var w=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&T(e).is(n))break;i.push(e)}return i},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=T.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(e,n,i){return y(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==i}):n.nodeType?T.grep(e,function(e){return e===n!==i}):"string"!=typeof n?T.grep(e,function(e){return-1<r.call(n,e)!==i}):T.filter(n,e,i)}T.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?T.find.matchesSelector(i,e)?[i]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<i;t++)if(T.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)T.find(e,r[t],n);return 1<i?T.uniqueSort(n):n},filter:function(e){return this.pushStack(R(this,e||[],!1))},not:function(e){return this.pushStack(R(this,e||[],!0))},is:function(e){return!!R(this,"string"==typeof e&&E.test(e)?T(e):e||[],!1).length}});var A,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||A,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:P.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 T?t[0]:t,T.merge(this,T.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:k,!0)),D.test(i[1])&&T.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=k.getElementById(i[2]))&&(this[0]=r,this.length=1),this}).prototype=T.fn,A=T(k);var M=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&T(e);if(!E.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?r.call(T(e),this[0]):r.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return w(e,"parentNode")},parentsUntil:function(e,t,n){return w(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return w(e,"nextSibling")},prevAll:function(e){return w(e,"previousSibling")},nextUntil:function(e,t,n){return w(e,"nextSibling",n)},prevUntil:function(e,t,n){return w(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(i,r){T.fn[i]=function(e,t){var n=T.map(this,r,e);return"Until"!==i.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=T.filter(t,n)),1<this.length&&(I[i]||T.uniqueSort(n),M.test(i)&&n.reverse()),this.pushStack(n)}});var B=/[^\x20\t\r\n\f]+/g;function L(e){return e}function H(e){throw e}function F(e,t,n,i){var r;try{e&&y(r=e.promise)?r.call(e).done(t).fail(n):e&&y(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(i){var e,n;i="string"==typeof i?(e=i,n={},T.each(e.match(B)||[],function(e,t){n[t]=!0}),n):T.extend({},i);var r,t,o,s,a=[],l=[],c=-1,u=function(){for(s=s||i.once,o=r=!0;l.length;c=-1)for(t=l.shift();++c<a.length;)!1===a[c].apply(t[0],t[1])&&i.stopOnFalse&&(c=a.length,t=!1);i.memory||(t=!1),r=!1,s&&(a=t?[]:"")},d={add:function(){return a&&(t&&!r&&(c=a.length-1,l.push(t)),function n(e){T.each(e,function(e,t){y(t)?i.unique&&d.has(t)||a.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!r&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;-1<(n=T.inArray(t,a,n));)a.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<T.inArray(e,a):0<a.length},empty:function(){return a&&(a=[]),this},disable:function(){return s=l=[],a=t="",this},disabled:function(){return!a},lock:function(){return s=l=[],t||r||(a=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),r||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},T.extend({Deferred:function(e){var o=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",s={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},pipe:function(){var r=arguments;return T.Deferred(function(i){T.each(o,function(e,t){var n=y(r[t[4]])&&r[t[4]];a[t[1]](function(){var e=n&&n.apply(this,arguments);e&&y(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[t[0]+"With"](this,n?[e]:arguments)})}),r=null}).promise()},then:function(t,n,i){var l=0;function c(r,o,s,a){return function(){var n=this,i=arguments,e=function(){var e,t;if(!(r<l)){if((e=s.apply(n,i))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,y(t)?a?t.call(e,c(l,o,L,a),c(l,o,H,a)):(l++,t.call(e,c(l,o,L,a),c(l,o,H,a),c(l,o,L,o.notifyWith))):(s!==L&&(n=void 0,i=[e]),(a||o.resolveWith)(n,i))}},t=a?e:function(){try{e()}catch(e){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(e,t.stackTrace),l<=r+1&&(s!==H&&(n=void 0,i=[e]),o.rejectWith(n,i))}};r?t():(T.Deferred.getStackHook&&(t.stackTrace=T.Deferred.getStackHook()),C.setTimeout(t))}}return T.Deferred(function(e){o[0][3].add(c(0,e,y(i)?i:L,e.notifyWith)),o[1][3].add(c(0,e,y(t)?t:L)),o[2][3].add(c(0,e,y(n)?n:H))}).promise()},promise:function(e){return null!=e?T.extend(e,s):s}},a={};return T.each(o,function(e,t){var n=t[2],i=t[5];s[t[1]]=n.add,i&&n.add(function(){r=i},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=n.fireWith}),s.promise(a),e&&e.call(a,a),a},when:function(e){var n=arguments.length,t=n,i=Array(t),r=a.call(arguments),o=T.Deferred(),s=function(t){return function(e){i[t]=this,r[t]=1<arguments.length?a.call(arguments):e,--n||o.resolveWith(i,r)}};if(n<=1&&(F(e,o.done(s(t)).resolve,o.reject,!n),"pending"===o.state()||y(r[t]&&r[t].then)))return o.then();for(;t--;)F(r[t],s(t),o.reject);return o.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&z.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){C.setTimeout(function(){throw e})};var j=T.Deferred();function W(){k.removeEventListener("DOMContentLoaded",W),C.removeEventListener("load",W),T.ready()}T.fn.ready=function(e){return j.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0)!==e&&0<--T.readyWait||j.resolveWith(k,[T])}}),T.ready.then=j.then,"complete"===k.readyState||"loading"!==k.readyState&&!k.documentElement.doScroll?C.setTimeout(T.ready):(k.addEventListener("DOMContentLoaded",W),C.addEventListener("load",W));var U=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===x(n))for(a in r=!0,n)U(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,y(i)||(s=!0),c&&(t=s?(t.call(e,i),null):(c=t,function(e,t,n){return c.call(T(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},q=/^-ms-/,V=/-([a-z])/g;function $(e,t){return t.toUpperCase()}function K(e){return e.replace(q,"ms-").replace(V,$)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=T.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[K(t)]=n;else for(i in t)r[K(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in i?[t]:t.match(B)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||T.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var X=new Y,Q=new Y,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var i,r;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===(r=n)||"false"!==r&&("null"===r?null:r===+r+""?+r:G.test(r)?JSON.parse(r):r)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return Q.hasData(e)||X.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),T.fn.extend({data:function(n,e){var t,i,r,o=this[0],s=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){Q.set(this,n)}):U(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(r=Q.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(t=s.length;t--;)s[t]&&0===(i=s[t].name).indexOf("data-")&&(i=K(i.slice(5)),ee(o,i,r[i]));X.set(o,"hasDataAttrs",!0)}return r},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),T.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=X.get(e,t),n&&(!i||Array.isArray(n)?i=X.access(e,t,T.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),i=n.length,r=n.shift(),o=T._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){T.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:T.Callbacks("once memory").add(function(){X.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?T.queue(this[0],t):void 0===n?this:this.each(function(){var e=T.queue(this,t,n);T._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&T.dequeue(this,t)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=T.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=X.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],re=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&T.contains(e.ownerDocument,e)&&"none"===T.css(e,"display")},oe=function(e,t,n,i){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in r=n.apply(e,i||[]),t)e.style[o]=s[o];return r};function se(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return T.css(e,t,"")},l=a(),c=n&&n[3]||(T.cssNumber[t]?"":"px"),u=(T.cssNumber[t]||"px"!==c&&+l)&&ne.exec(T.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)T.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,T.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}var ae={};function le(e,t){for(var n,i,r,o,s,a,l,c=[],u=0,d=e.length;u<d;u++)(i=e[u]).style&&(n=i.style.display,t?("none"===n&&(c[u]=X.get(i,"display")||null,c[u]||(i.style.display="")),""===i.style.display&&re(i)&&(c[u]=(l=s=o=void 0,s=(r=i).ownerDocument,a=r.nodeName,(l=ae[a])||(o=s.body.appendChild(s.createElement(a)),l=T.css(o,"display"),o.parentNode.removeChild(o),"none"===l&&(l="block"),ae[a]=l)))):"none"!==n&&(c[u]="none",X.set(i,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}T.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){re(this)?T(this).show():T(this).hide()})}});var ce=/^(?:checkbox|radio)$/i,ue=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,de=/^$|^module$|\/(?:java|ecma)script/i,he={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?T.merge([e],n):n}function pe(e,t){for(var n=0,i=e.length;n<i;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}he.optgroup=he.option,he.tbody=he.tfoot=he.colgroup=he.caption=he.thead,he.th=he.td;var me,ge,ve=/<|&#?\w+;/;function ye(e,t,n,i,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===x(o))T.merge(h,o.nodeType?[o]:o);else if(ve.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(ue.exec(o)||["",""])[1].toLowerCase(),l=he[a]||he._default,s.innerHTML=l[1]+T.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;T.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&-1<T.inArray(o,i))r&&r.push(o);else if(c=T.contains(o.ownerDocument,o),s=fe(d.appendChild(o),"script"),c&&pe(s),n)for(u=0;o=s[u++];)de.test(o.type||"")&&n.push(o);return d}me=k.createDocumentFragment().appendChild(k.createElement("div")),(ge=k.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),me.appendChild(ge),v.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var be=k.documentElement,_e=/^key/,xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,we=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function ke(){return!1}function Te(){try{return k.activeElement}catch(e){}}function Se(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Se(e,a,n,i,t[a],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=ke;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return T().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),e.each(function(){T.event.add(this,t,r,i,n)})}T.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=X.get(t);if(g)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&T.find.matchesSelector(be,r),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(B)||[""]).length;c--;)f=m=(a=we.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=T.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=T.event.special[f]||{},u=T.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&T.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),T.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=X.hasData(e)&&X.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(B)||[""]).length;c--;)if(f=m=(a=we.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=T.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||T.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)T.event.remove(e,f+t[c],n,i,!0);T.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=T.event.fix(e),l=new Array(arguments.length),c=(X.get(this,"events")||{})[a.type]||[],u=T.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=T.event.handlers.call(this,a,c),t=0;(r=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(i=((T.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?-1<T(r,this).index(c):T.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(t,e){Object.defineProperty(T.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Te()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Te()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&_e.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&xe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},T.event.addProp),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,r){T.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,n=e.relatedTarget,i=e.handleObj;return n&&(n===this||T.contains(this,n))||(e.type=i.origType,t=i.handler.apply(this,arguments),e.type=r),t}}}),T.fn.extend({on:function(e,t,n,i){return Se(this,e,t,n,i)},one:function(e,t,n,i){return Se(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,T(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){T.event.remove(this,e,n,t)});for(r in e)this.off(r,t,e[r]);return this}});var Ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ae(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Me(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,i,r,o,s,a,l,c;if(1===t.nodeType){if(X.hasData(e)&&(o=X.access(e),s=X.set(t,o),c=o.events))for(r in delete s.handle,s.events={},c)for(n=0,i=c[r].length;n<i;n++)T.event.add(t,r,c[r][n]);Q.hasData(e)&&(a=Q.access(e),l=T.extend({},a),Q.set(t,l))}}function Oe(n,i,r,o){i=m.apply([],i);var e,t,s,a,l,c,u=0,d=n.length,h=d-1,f=i[0],p=y(f);if(p||1<d&&"string"==typeof f&&!v.checkClone&&De.test(f))return n.each(function(e){var t=n.eq(e);p&&(i[0]=f.call(this,e,t.html())),Oe(t,i,r,o)});if(d&&(t=(e=ye(i,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(s=T.map(fe(e,"script"),Pe)).length;u<d;u++)l=e,u!==h&&(l=T.clone(l,!0,!0),a&&T.merge(s,fe(l,"script"))),r.call(n[u],l,u);if(a)for(c=s[s.length-1].ownerDocument,T.map(s,Me),u=0;u<a;u++)l=s[u],de.test(l.type||"")&&!X.access(l,"globalEval")&&T.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?T._evalUrl&&T._evalUrl(l.src):_(l.textContent.replace(Re,""),c,l))}return n}function Be(e,t,n){for(var i,r=t?T.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||T.cleanData(fe(i)),i.parentNode&&(n&&T.contains(i.ownerDocument,i)&&pe(fe(i,"script")),i.parentNode.removeChild(i));return e}T.extend({htmlPrefilter:function(e){return e.replace(Ee,"<$1></$2>")},clone:function(e,t,n){var i,r,o,s,a,l,c,u=e.cloneNode(!0),d=T.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(s=fe(u),i=0,r=(o=fe(e)).length;i<r;i++)a=o[i],l=s[i],void 0,"input"===(c=l.nodeName.toLowerCase())&&ce.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(t)if(n)for(o=o||fe(e),s=s||fe(u),i=0,r=o.length;i<r;i++)Ie(o[i],s[i]);else Ie(e,u);return 0<(s=fe(u,"script")).length&&pe(s,!d&&fe(e,"script")),u},cleanData:function(e){for(var t,n,i,r=T.event.special,o=0;void 0!==(n=e[o]);o++)if(J(n)){if(t=n[X.expando]){if(t.events)for(i in t.events)r[i]?T.event.remove(n,i):T.removeEvent(n,i,t.handle);n[X.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),T.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return U(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Oe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ae(this,e).appendChild(e)})},prepend:function(){return Oe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ae(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Oe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Oe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(fe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!he[(ue.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(fe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Oe(this,arguments,function(e){var t=this.parentNode;T.inArray(this,n)<0&&(T.cleanData(fe(this)),t&&t.replaceChild(e,this))},n)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,s){T.fn[e]=function(e){for(var t,n=[],i=T(e),r=i.length-1,o=0;o<=r;o++)t=o===r?this:this.clone(!0),T(i[o])[s](t),l.apply(n,t.get());return this.pushStack(n)}});var Le=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),He=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Fe=new RegExp(ie.join("|"),"i");function ze(e,t,n){var i,r,o,s,a=e.style;return(n=n||He(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||T.contains(e.ownerDocument,e)||(s=T.style(e,t)),!v.pixelBoxStyles()&&Le.test(s)&&Fe.test(t)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){a.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(a).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),i=36===t(e.width),l.style.position="absolute",r=36===l.offsetWidth||"absolute",be.removeChild(a),l=null}}function t(e){return Math.round(parseFloat(e))}var n,i,r,o,s,a=k.createElement("div"),l=k.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,T.extend(v,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),r}}))}();var We=/^(none|table(?!-c[ea]).+)/,Ue=/^--/,qe={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},$e=["Webkit","Moz","ms"],Ke=k.createElement("div").style;function Je(e){var t=T.cssProps[e];return t||(t=T.cssProps[e]=function(e){if(e in Ke)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=$e.length;n--;)if((e=$e[n]+t)in Ke)return e}(e)||e),t}function Ye(e,t,n){var i=ne.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function Xe(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=T.css(e,n+ie[s],!0,r)),i?("content"===n&&(l-=T.css(e,"padding"+ie[s],!0,r)),"margin"!==n&&(l-=T.css(e,"border"+ie[s]+"Width",!0,r))):(l+=T.css(e,"padding"+ie[s],!0,r),"padding"!==n?l+=T.css(e,"border"+ie[s]+"Width",!0,r):a+=T.css(e,"border"+ie[s]+"Width",!0,r));return!i&&0<=o&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))),l}function Qe(e,t,n){var i=He(e),r=ze(e,t,i),o="border-box"===T.css(e,"boxSizing",!1,i),s=o;if(Le.test(r)){if(!n)return r;r="auto"}return s=s&&(v.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===T.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),(r=parseFloat(r)||0)+Xe(e,t,n||(o?"border":"content"),s,i,r)+"px"}function Ge(e,t,n,i,r){return new Ge.prototype.init(e,t,n,i,r)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=K(t),l=Ue.test(t),c=e.style;if(l||(t=Je(a)),s=T.cssHooks[t]||T.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];"string"===(o=typeof n)&&(r=ne.exec(n))&&r[1]&&(n=se(e,t,r),o="number"),null!=n&&n==n&&("number"===o&&(n+=r&&r[3]||(T.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=K(t);return Ue.test(t)||(t=Je(a)),(s=T.cssHooks[t]||T.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=ze(e,t,i)),"normal"===r&&t in Ve&&(r=Ve[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),T.each(["height","width"],function(e,a){T.cssHooks[a]={get:function(e,t,n){if(t)return!We.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Qe(e,a,n):oe(e,qe,function(){return Qe(e,a,n)})},set:function(e,t,n){var i,r=He(e),o="border-box"===T.css(e,"boxSizing",!1,r),s=n&&Xe(e,a,n,o,r);return o&&v.scrollboxSize()===r.position&&(s-=Math.ceil(e["offset"+a[0].toUpperCase()+a.slice(1)]-parseFloat(r[a])-Xe(e,a,"border",!1,r)-.5)),s&&(i=ne.exec(t))&&"px"!==(i[3]||"px")&&(e.style[a]=t,t=T.css(e,a)),Ye(0,t,s)}}}),T.cssHooks.marginLeft=je(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-oe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(r,o){T.cssHooks[r+o]={expand:function(e){for(var t=0,n={},i="string"==typeof e?e.split(" "):[e];t<4;t++)n[r+ie[t]+o]=i[t]||i[t-2]||i[0];return n}},"margin"!==r&&(T.cssHooks[r+o].set=Ye)}),T.fn.extend({css:function(e,t){return U(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=He(e),r=t.length;s<r;s++)o[t[s]]=T.css(e,t[s],!1,i);return o}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,1<arguments.length)}}),((T.Tween=Ge).prototype={constructor:Ge,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=Ge.propHooks[this.prop];return e&&e.get?e.get(this):Ge.propHooks._default.get(this)},run:function(e){var t,n=Ge.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ge.propHooks._default.set(this),this}}).init.prototype=Ge.prototype,(Ge.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[T.cssProps[e.prop]]&&!T.cssHooks[e.prop]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ge.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=Ge.prototype.init,T.fx.step={};var Ze,et,tt,nt,it=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function ot(){et&&(!1===k.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,T.fx.interval),T.fx.tick())}function st(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function at(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=ie[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function lt(e,t,n){for(var i,r=(ct.tweeners[t]||[]).concat(ct.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function ct(o,e,t){var n,s,i=0,r=ct.prefilters.length,a=T.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=Ze||st(),t=Math.max(0,c.startTime+c.duration-e),n=1-(t/c.duration||0),i=0,r=c.tweens.length;i<r;i++)c.tweens[i].run(n);return a.notifyWith(o,[c,n,t]),n<1&&r?t:(r||a.notifyWith(o,[c,1,0]),a.resolveWith(o,[c]),!1)},c=a.promise({elem:o,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||st(),duration:t.duration,tweens:[],createTween:function(e,t){var n=T.Tween(o,c.opts,e,t,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var t=0,n=e?c.tweens.length:0;if(s)return this;for(s=!0;t<n;t++)c.tweens[t].run(1);return e?(a.notifyWith(o,[c,1,0]),a.resolveWith(o,[c,e])):a.rejectWith(o,[c,e]),this}}),u=c.props;for(!function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=K(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=T.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(u,c.opts.specialEasing);i<r;i++)if(n=ct.prefilters[i].call(c,o,u,c.opts))return y(n.stop)&&(T._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return T.map(u,lt,c),y(c.opts.start)&&c.opts.start.call(o,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),T.fx.timer(T.extend(l,{elem:o,anim:c,queue:c.opts.queue})),c}T.Animation=T.extend(ct,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){for(var n,i=0,r=(e=y(e)?(t=e,["*"]):e.match(B)).length;i<r;i++)n=e[i],ct.tweeners[n]=ct.tweeners[n]||[],ct.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&re(e),g=X.get(e,"fxshow");for(i in n.queue||(null==(s=T._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always(function(){h.always(function(){s.unqueued--,T.queue(e,"fx").length||s.empty.fire()})})),t)if(r=t[i],it.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||T.style(e,i)}if((l=!T.isEmptyObject(t))||!T.isEmptyObject(f))for(i in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=X.get(e,"display")),"none"===(u=T.css(e,"display"))&&(c?u=c:(le([e],!0),c=e.style.display||c,u=T.css(e,"display"),le([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===T.css(e,"float")&&(l||(h.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=X.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&le([e],!0),h.done(function(){for(i in m||le([e]),X.remove(e,"fxshow"),f)T.style(e,i,f[i])})),l=lt(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ct.prefilters.unshift(e):ct.prefilters.push(e)}}),T.speed=function(e,t,n){var i=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return T.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in T.fx.speeds?i.duration=T.fx.speeds[i.duration]:i.duration=T.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){y(i.old)&&i.old.call(this),i.queue&&T.dequeue(this,i.queue)},i},T.fn.extend({fadeTo:function(e,t,n,i){return this.filter(re).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(t,e,n,i){var r=T.isEmptyObject(t),o=T.speed(e,n,i),s=function(){var e=ct(this,T.extend({},t),o);(r||X.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(r,e,o){var s=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof r&&(o=e,e=r,r=void 0),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",n=T.timers,i=X.get(this);if(t)i[t]&&i[t].stop&&s(i[t]);else for(t in i)i[t]&&i[t].stop&&rt.test(t)&&s(i[t]);for(t=n.length;t--;)n[t].elem!==this||null!=r&&n[t].queue!==r||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||T.dequeue(this,r)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var e,t=X.get(this),n=t[s+"queue"],i=t[s+"queueHooks"],r=T.timers,o=n?n.length:0;for(t.finish=!0,T.queue(this,s,[]),i&&i.stop&&i.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===s&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),T.each(["toggle","show","hide"],function(e,i){var r=T.fn[i];T.fn[i]=function(e,t,n){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(at(i,!0),e,t,n)}}),T.each({slideDown:at("show"),slideUp:at("hide"),slideToggle:at("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,i){T.fn[e]=function(e,t,n){return this.animate(i,e,t,n)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),Ze=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.interval=13,T.fx.start=function(){et||(et=!0,ot())},T.fx.stop=function(){et=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(i,e){return i=T.fx&&T.fx.speeds[i]||i,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,i);t.stop=function(){C.clearTimeout(n)}})},tt=k.createElement("input"),nt=k.createElement("select").appendChild(k.createElement("option")),tt.type="checkbox",v.checkOn=""!==tt.value,v.optSelected=nt.selected,(tt=k.createElement("input")).value="t",tt.type="radio",v.radioValue="t"===tt.value;var ut,dt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return U(this,T.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(r=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?ut:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=T.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(B);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),ut={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var s=dt[t]||T.find.attr;dt[t]=function(e,t,n){var i,r,o=t.toLowerCase();return n||(r=dt[o],dt[o]=i,i=null!=s(e,t,n)?o:null,dt[o]=r),i}});var ht=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;function pt(e){return(e.match(B)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}T.fn.extend({prop:function(e,t){return U(this,T.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,r=T.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,l=0;if(y(t))return this.each(function(e){T(this).addClass(t.call(this,e,mt(this)))});if((e=gt(t)).length)for(;n=this[l++];)if(r=mt(n),i=1===n.nodeType&&" "+pt(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=pt(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,l=0;if(y(t))return this.each(function(e){T(this).removeClass(t.call(this,e,mt(this)))});if(!arguments.length)return this.attr("class","");if((e=gt(t)).length)for(;n=this[l++];)if(r=mt(n),i=1===n.nodeType&&" "+pt(r)+" "){for(s=0;o=e[s++];)for(;-1<i.indexOf(" "+o+" ");)i=i.replace(" "+o+" "," ");r!==(a=pt(i))&&n.setAttribute("class",a)}return this},toggleClass:function(r,t){var o=typeof r,s="string"===o||Array.isArray(r);return"boolean"==typeof t&&s?t?this.addClass(r):this.removeClass(r):y(r)?this.each(function(e){T(this).toggleClass(r.call(this,e,mt(this),t),t)}):this.each(function(){var e,t,n,i;if(s)for(t=0,n=T(this),i=gt(r);e=i[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==r&&"boolean"!==o||((e=mt(this))&&X.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===r?"":X.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+pt(mt(n))+" ").indexOf(t))return!0;return!1}});var vt=/\r/g;T.fn.extend({val:function(n){var i,e,r,t=this[0];return arguments.length?(r=y(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=r?n.call(this,e,T(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=T.map(t,function(e){return null==e?"":e+""})),(i=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&void 0!==i.set(this,t,"value")||(this.value=t))})):t?(i=T.valHooks[t.type]||T.valHooks[t.nodeName.toLowerCase()])&&"get"in i&&void 0!==(e=i.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(vt,""):null==e?"":e:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:pt(T.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=T(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=T.makeArray(t),s=r.length;s--;)((i=r[s]).selected=-1<T.inArray(T.valHooks.option.get(i),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<T.inArray(T(e).val(),t)}},v.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var yt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,n,i){var r,o,s,a,l,c,u,d,h=[n||k],f=g.call(e,"type")?e.type:e,p=g.call(e,"namespace")?e.namespace.split("."):[];if(o=d=s=n=n||k,3!==n.nodeType&&8!==n.nodeType&&!yt.test(f+T.event.triggered)&&(-1<f.indexOf(".")&&(f=(p=f.split(".")).shift(),p.sort()),l=f.indexOf(":")<0&&"on"+f,(e=e[T.expando]?e:new T.Event(f,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:T.makeArray(t,[e]),u=T.event.special[f]||{},i||!u.trigger||!1!==u.trigger.apply(n,t))){if(!i&&!u.noBubble&&!b(n)){for(a=u.delegateType||f,yt.test(a+f)||(o=o.parentNode);o;o=o.parentNode)h.push(o),s=o;s===(n.ownerDocument||k)&&h.push(s.defaultView||s.parentWindow||C)}for(r=0;(o=h[r++])&&!e.isPropagationStopped();)d=o,e.type=1<r?a:u.bindType||f,(c=(X.get(o,"events")||{})[e.type]&&X.get(o,"handle"))&&c.apply(o,t),(c=l&&o[l])&&c.apply&&J(o)&&(e.result=c.apply(o,t),!1===e.result&&e.preventDefault());return e.type=f,i||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(h.pop(),t)||!J(n)||l&&y(n[f])&&!b(n)&&((s=n[l])&&(n[l]=null),T.event.triggered=f,e.isPropagationStopped()&&d.addEventListener(f,bt),n[f](),e.isPropagationStopped()&&d.removeEventListener(f,bt),T.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var i=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(i,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),v.focusin||T.each({focus:"focusin",blur:"focusout"},function(n,i){var r=function(e){T.event.simulate(i,e.target,T.event.fix(e))};T.event.special[i]={setup:function(){var e=this.ownerDocument||this,t=X.access(e,i);t||e.addEventListener(n,r,!0),X.access(e,i,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=X.access(e,i)-1;t?X.access(e,i,t):(e.removeEventListener(n,r,!0),X.remove(e,i))}}});var _t=C.location,xt=Date.now(),wt=/\?/;T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var Ct=/\[\]$/,kt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function Et(n,e,i,r){var t;if(Array.isArray(e))T.each(e,function(e,t){i||Ct.test(n)?r(n,t):Et(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,r)});else if(i||"object"!==x(e))r(n,e);else for(t in e)Et(n+"["+t+"]",e[t],i,r)}T.param=function(e,t){var n,i=[],r=function(e,t){var n=y(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){r(this.name,this.value)});else for(n in e)Et(n,e[n],t,r);return i.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&St.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!ce.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Nt=/%20/g,Dt=/#.*$/,Rt=/([?&])_=[^&]*/,At=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Ot={},Bt="*/".concat("*"),Lt=k.createElement("a");function Ht(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,i=0,r=e.toLowerCase().match(B)||[];if(y(t))for(;n=r[i++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Ft(t,r,o,s){var a={},l=t===Ot;function c(e){var i;return a[e]=!0,T.each(t[e]||[],function(e,t){var n=t(r,o,s);return"string"!=typeof n||l||a[n]?l?!(i=n):void 0:(r.dataTypes.unshift(n),c(n),!1)}),i}return c(r.dataTypes[0])||!a["*"]&&c("*")}function zt(e,t){var n,i,r=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&T.extend(!0,e,i),e}Lt.href=_t.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,T.ajaxSettings),t):zt(T.ajaxSettings,e)},ajaxPrefilter:Ht(It),ajaxTransport:Ht(Ot),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var u,d,h,n,f,i,p,m,r,o,g=T.ajaxSetup({},t),v=g.context||g,y=g.context&&(v.nodeType||v.jquery)?T(v):T.event,b=T.Deferred(),_=T.Callbacks("once memory"),x=g.statusCode||{},s={},a={},l="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(p){if(!n)for(n={};t=At.exec(h);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return p?h:null},setRequestHeader:function(e,t){return null==p&&(e=a[e.toLowerCase()]=a[e.toLowerCase()]||e,s[e]=t),this},overrideMimeType:function(e){return null==p&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(p)w.always(e[w.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||l;return u&&u.abort(t),c(0,t),this}};if(b.promise(w),g.url=((e||g.url||_t.href)+"").replace(Mt,_t.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(B)||[""],null==g.crossDomain){i=k.createElement("a");try{i.href=g.url,i.href=i.href,g.crossDomain=Lt.protocol+"//"+Lt.host!=i.protocol+"//"+i.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=T.param(g.data,g.traditional)),Ft(It,g,t,w),p)return w;for(r in(m=T.event&&g.global)&&0==T.active++&&T.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Pt.test(g.type),d=g.url.replace(Dt,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Nt,"+")):(o=g.url.slice(d.length),g.data&&(g.processData||"string"==typeof g.data)&&(d+=(wt.test(d)?"&":"?")+g.data,delete g.data),!1===g.cache&&(d=d.replace(Rt,"$1"),o=(wt.test(d)?"&":"?")+"_="+xt+++o),g.url=d+o),g.ifModified&&(T.lastModified[d]&&w.setRequestHeader("If-Modified-Since",T.lastModified[d]),T.etag[d]&&w.setRequestHeader("If-None-Match",T.etag[d])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&w.setRequestHeader("Content-Type",g.contentType),w.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Bt+"; q=0.01":""):g.accepts["*"]),g.headers)w.setRequestHeader(r,g.headers[r]);if(g.beforeSend&&(!1===g.beforeSend.call(v,w,g)||p))return w.abort();if(l="abort",_.add(g.complete),w.done(g.success),w.fail(g.error),u=Ft(Ot,g,t,w)){if(w.readyState=1,m&&y.trigger("ajaxSend",[w,g]),p)return w;g.async&&0<g.timeout&&(f=C.setTimeout(function(){w.abort("timeout")},g.timeout));try{p=!1,u.send(s,c)}catch(e){if(p)throw e;c(-1,e)}}else c(-1,"No Transport");function c(e,t,n,i){var r,o,s,a,l,c=t;p||(p=!0,f&&C.clearTimeout(f),u=void 0,h=i||"",w.readyState=0<e?4:0,r=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(g,w,n)),a=function(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(g,a,w,r),r?(g.ifModified&&((l=w.getResponseHeader("Last-Modified"))&&(T.lastModified[d]=l),(l=w.getResponseHeader("etag"))&&(T.etag[d]=l)),204===e||"HEAD"===g.type?c="nocontent":304===e?c="notmodified":(c=a.state,o=a.data,r=!(s=a.error))):(s=c,!e&&c||(c="error",e<0&&(e=0))),w.status=e,w.statusText=(t||c)+"",r?b.resolveWith(v,[o,c,w]):b.rejectWith(v,[w,c,s]),w.statusCode(x),x=void 0,m&&y.trigger(r?"ajaxSuccess":"ajaxError",[w,g,r?o:s]),_.fireWith(v,[w,c]),m&&(y.trigger("ajaxComplete",[w,g]),--T.active||T.event.trigger("ajaxStop")))}return w},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,r){T[r]=function(e,t,n,i){return y(t)&&(i=i||n,n=t,t=void 0),T.ajax(T.extend({url:e,type:r,dataType:i,data:t,success:n},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return y(n)?this.each(function(e){T(this).wrapInner(n.call(this,e))}):this.each(function(){var e=T(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=y(t);return this.each(function(e){T(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var jt={0:200,1223:204},Wt=T.ajaxSettings.xhr();v.cors=!!Wt&&"withCredentials"in Wt,v.ajax=Wt=!!Wt,T.ajaxTransport(function(r){var o,s;if(v.cors||Wt&&!r.crossDomain)return{send:function(e,t){var n,i=r.xhr();if(i.open(r.type,r.url,r.async,r.username,r.password),r.xhrFields)for(n in r.xhrFields)i[n]=r.xhrFields[n];for(n in r.mimeType&&i.overrideMimeType&&i.overrideMimeType(r.mimeType),r.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)i.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=s=i.onload=i.onerror=i.onabort=i.ontimeout=i.onreadystatechange=null,"abort"===e?i.abort():"error"===e?"number"!=typeof i.status?t(0,"error"):t(i.status,i.statusText):t(jt[i.status]||i.status,i.statusText,"text"!==(i.responseType||"text")||"string"!=typeof i.responseText?{binary:i.response}:{text:i.responseText},i.getAllResponseHeaders()))}},i.onload=o(),s=i.onerror=i.ontimeout=o("error"),void 0!==i.onabort?i.onabort=s:i.onreadystatechange=function(){4===i.readyState&&C.setTimeout(function(){o&&s()})},o=o("abort");try{i.send(r.hasContent&&r.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(n){var i,r;if(n.crossDomain)return{send:function(e,t){i=T("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(e){i.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),k.head.appendChild(i[0])},abort:function(){r&&r()}}});var Ut,qt=[],Vt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||T.expando+"_"+xt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,o,s=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Vt,"$1"+i):!1!==e.jsonp&&(e.url+=(wt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||T.error(i+" was not called"),o[0]},e.dataTypes[0]="json",r=C[i],C[i]=function(){o=arguments},n.always(function(){void 0===r?T(C).removeProp(i):C[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,qt.push(i)),o&&y(r)&&r(o[0]),o=r=void 0}),"script"}),v.createHTMLDocument=((Ut=k.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((i=(t=k.implementation.createHTMLDocument("")).createElement("base")).href=k.location.href,t.head.appendChild(i)):t=k),o=!n&&[],(r=D.exec(e))?[t.createElement(r[1])]:(r=ye([e],t,o),o&&o.length&&T(o).remove(),T.merge([],r.childNodes)));var i,r,o},T.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return-1<a&&(i=pt(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),0<s.length&&T.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(i?T("<div>").append(T.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=T.css(e,"position"),u=T(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=T.css(e,"top"),l=T.css(e,"left"),r=("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(s=(i=u.position()).top,i.left):(s=parseFloat(o)||0,parseFloat(l)||0),y(t)&&(t=t.call(e,n,T.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):u.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===T.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),r.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-T.css(i,"marginTop",!0),left:t.left-r.left-T.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||be})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o="pageYOffset"===r;T.fn[t]=function(e){return U(this,function(e,t,n){var i;if(b(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===n)return i?i[r]:e[t];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=je(v.pixelPosition,function(e,t){if(t)return t=ze(e,n),Le.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(s,a){T.each({padding:"inner"+s,content:a,"":"outer"+s},function(i,o){T.fn[o]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return U(this,function(e,t,n){var i;return b(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+s],i["scroll"+s],e.body["offset"+s],i["offset"+s],i["client"+s])):void 0===n?T.css(e,t,r):T.style(e,t,n,r)},a,n?e:void 0,n)}})}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){T.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),T.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return i=a.call(arguments,2),(r=function(){return e.apply(t||this,i.concat(a.call(arguments)))}).guid=e.guid=e.guid||T.guid++,r},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=N,T.isFunction=y,T.isWindow=b,T.camelCase=K,T.type=x,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var $t=C.jQuery,Kt=C.$;return T.noConflict=function(e){return C.$===T&&(C.$=Kt),e&&C.jQuery===T&&(C.jQuery=$t),T},e||(C.jQuery=C.$=T),T}),void 0===jQuery.migrateMute&&(jQuery.migrateMute=!0),function(e){"function"==typeof define&&define.amd?define(["jquery"],window,e):"object"==typeof module&&module.exports?module.exports=e(require("jquery"),window):e(jQuery,window)}(function(a,i){"use strict";function l(e){var t=i.console;n[e]||(n[e]=!0,a.migrateWarnings.push(e),t&&t.warn&&!a.migrateMute&&(t.warn("JQMIGRATE: "+e),a.migrateTrace&&t.trace&&t.trace()))}function e(e,t,n,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return l(i),n},set:function(e){l(i),n=e}})}function t(e,t,n,i){e[t]=function(){return l(i),n.apply(this,arguments)}}a.migrateVersion="3.0.1",i.console&&i.console.log&&(a&&!/^[12]\./.test(a.fn.jquery)||i.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&i.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),i.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion));var n={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){n={},a.migrateWarnings.length=0},"BackCompat"===i.document.compatMode&&l("jQuery is not compatible with Quirks Mode");var r,o=a.fn.init,s=a.isNumeric,c=a.find,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,d=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(r in a.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(l("jQuery( '#' ) is not a valid selector"),t[0]=[]),o.apply(this,t)},a.fn.init.prototype=a.fn,a.find=function(t){var n=Array.prototype.slice.call(arguments);if("string"==typeof t&&u.test(t))try{i.document.querySelector(t)}catch(e){t=t.replace(d,function(e,t,n,i){return"["+t+n+'"'+i+'"]'});try{i.document.querySelector(t),l("Attribute selector with '#' must be quoted: "+n[0]),n[0]=t}catch(t){l("Attribute selector with '#' was not fixed: "+n[0])}}return c.apply(this,n)},c)Object.prototype.hasOwnProperty.call(c,r)&&(a.find[r]=c[r]);a.fn.size=function(){return l("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length},a.parseJSON=function(){return l("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(e){var t,n,i=s(e),r=(n=(t=e)&&t.toString(),!a.isArray(t)&&0<=n-parseFloat(n)+1);return i!==r&&l("jQuery.isNumeric() should not be called on constructed objects"),r},t(a,"holdReady",a.holdReady,"jQuery.holdReady is deprecated"),t(a,"unique",a.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),e(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),e(a.expr,":",a.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos");var h=a.ajax;a.ajax=function(){var e=h.apply(this,arguments);return e.promise&&(t(e,"success",e.done,"jQXHR.success is deprecated and removed"),t(e,"error",e.fail,"jQXHR.error is deprecated and removed"),t(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e};var f=a.fn.removeAttr,p=a.fn.toggleClass,m=/\S+/g;a.fn.removeAttr=function(e){var n=this;return a.each(e.match(m),function(e,t){a.expr.match.bool.test(t)&&(l("jQuery.fn.removeAttr no longer sets boolean properties: "+t),n.prop(t,!1))}),f.apply(this,arguments)};var g=!(a.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?p.apply(this,arguments):(l("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&a.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":a.data(this,"__className__")||"")}))});a.swap&&a.each(["height","width","reliableMarginRight"],function(e,t){var n=a.cssHooks[t]&&a.cssHooks[t].get;n&&(a.cssHooks[t].get=function(){var e;return g=!0,e=n.apply(this,arguments),g=!1,e})}),a.swap=function(e,t,n,i){var r,o,s={};for(o in g||l("jQuery.swap() is undocumented and deprecated"),t)s[o]=e.style[o],e.style[o]=t[o];for(o in r=n.apply(e,i||[]),t)e.style[o]=s[o];return r};var v=a.data;a.data=function(e,t,n){var i;if(t&&"object"==typeof t&&2===arguments.length){i=a.hasData(e)&&v.call(this,e);var r={};for(var o in t)o!==a.camelCase(o)?(l("jQuery.data() always sets/gets camelCased names: "+o),i[o]=t[o]):r[o]=t[o];return v.call(this,e,r),t}return t&&"string"==typeof t&&t!==a.camelCase(t)&&(i=a.hasData(e)&&v.call(this,e))&&t in i?(l("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(i[t]=n),i[t]):v.apply(this,arguments)};var y=a.Tween.prototype.run,b=function(e){return e};a.Tween.prototype.run=function(){1<a.easing[this.easing].length&&(l("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),a.easing[this.easing]=b),y.apply(this,arguments)},a.fx.interval=a.fx.interval||13,i.requestAnimationFrame&&e(a.fx,"interval",a.fx.interval,"jQuery.fx.interval is deprecated");var _=a.fn.load,x=a.event.add,w=a.event.fix;a.event.props=[],a.event.fixHooks={},e(a.event.props,"concat",a.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),a.event.fix=function(e){var t,n=e.type,i=this.fixHooks[n],r=a.event.props;if(r.length)for(l("jQuery.event.props are deprecated and removed: "+r.join());r.length;)a.event.addProp(r.pop());if(i&&!i._migrated_&&(i._migrated_=!0,l("jQuery.event.fixHooks are deprecated and removed: "+n),(r=i.props)&&r.length))for(;r.length;)a.event.addProp(r.pop());return t=w.call(this,e),i&&i.filter?i.filter(t,e):t},a.event.add=function(e,t){return e===i&&"load"===t&&"complete"===i.document.readyState&&l("jQuery(window).on('load'...) called after load event occurred"),x.apply(this,arguments)},a.each(["load","unload","error"],function(e,t){a.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?_.apply(this,e):(l("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),a.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){a.fn[n]=function(e,t){return l("jQuery.fn."+n+"() event shorthand is deprecated"),0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),a(function(){a(i.document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===i.document&&l("'ready' event is deprecated")}},a.fn.extend({bind:function(e,t,n){return l("jQuery.fn.bind() is deprecated"),this.on(e,null,t,n)},unbind:function(e,t){return l("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,n,i){return l("jQuery.fn.delegate() is deprecated"),this.on(t,e,n,i)},undelegate:function(e,t,n){return l("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return l("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});var C=a.fn.offset;a.fn.offset=function(){var e,t=this[0],n={top:0,left:0};return t&&t.nodeType?(e=(t.ownerDocument||i.document).documentElement,a.contains(e,t)?C.apply(this,arguments):(l("jQuery.fn.offset() requires an element connected to a document"),n)):(l("jQuery.fn.offset() requires a valid DOM element"),n)};var k=a.param;a.param=function(e,t){var n=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===t&&n&&(l("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=n),k.call(this,e,t)};var T=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return l("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),T.apply(this,arguments)};var S=a.Deferred,E=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];return a.Deferred=function(e){var o=S(),s=o.promise();return o.pipe=s.pipe=function(){var r=arguments;return l("deferred.pipe() is deprecated"),a.Deferred(function(i){a.each(E,function(e,t){var n=a.isFunction(r[e])&&r[e];o[t[1]](function(){var e=n&&n.apply(this,arguments);e&&a.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[t[0]+"With"](this===s?i.promise():this,n?[e]:arguments)})}),r=null}).promise()},e&&e.call(o,o),o},a.Deferred.exceptionHook=S.exceptionHook,a}),function(KJ){var QJ,LJ=this||eval("this"),MJ=LJ.document,NJ=LJ.navigator,OJ=LJ.jQuery,PJ=LJ.JSON;QJ=function(e,i){function n(e,t){return(null===e||typeof e in g)&&e===t}function o(e,t){var n;return function(){n||(n=T.a.setTimeout(function(){n=KJ,e()},t))}}function s(e,t){var n;return function(){clearTimeout(n),n=T.a.setTimeout(e,t)}}function l(e,t){t&&t!==v?"beforeChange"===t?this.Ob(e):this.Ja(e,t):this.Pb(e)}function r(e,t){null!==t&&t.k&&t.k()}function a(e,t){var n=this.Mc,i=n[w];i.T||(this.ob&&this.Oa[t]?(n.Sb(t,e,this.Oa[t]),this.Oa[t]=null,--this.ob):i.s[t]||n.Sb(t,e,i.t?{$:e}:n.yc(e)),e.Ha&&e.Hc())}function t(e,l,c,u){T.d[e]={init:function(i,r,e,t,o){var s,a;return T.m(function(){var e=r(),t=T.a.c(e),n=(t=!c!=!t,!a);(n||l||t!==s)&&(n&&T.xa.Ca()&&(a=T.a.wa(T.f.childNodes(i),!0)),t?(n||T.f.fa(i,T.a.wa(a)),T.hb(u?u(o,e):o,i)):T.f.za(i),s=t)},null,{i:i}),{controlsDescendantBindings:!0}}},T.h.va[e]=!1,T.f.aa[e]=!0}var c,u,d,h,f,p,m,T=void 0!==e?e:{};T.b=function(e,t){for(var n=e.split("."),i=T,r=0;r<n.length-1;r++)i=i[n[r]];i[n[n.length-1]]=t},T.H=function(e,t,n){e[t]=n},T.version="3.4.2",T.b("version",T.version),T.options={deferUpdates:!1,useOnlyNativeEvents:!1},T.a=function(){function d(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}function e(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function t(e,t){return e.__proto__=t,e}function r(e,t,n,i){var r=e[t].match(c)||[];T.a.r(n.match(c),function(e){T.a.ra(r,e,i)}),e[t]=r.join(" ")}var n={__proto__:[]}instanceof Array,i="function"==typeof Symbol,o={},s={};o[NJ&&/Firefox\/2/i.test(NJ.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],o.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),d(o,function(e,t){if(t.length)for(var n=0,i=t.length;n<i;n++)s[t[n]]=e});var a={propertychange:!0},l=MJ&&function(){for(var e=3,t=MJ.createElement("div"),n=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e",n[0];);return 4<e?e:KJ}(),c=/\S+/g;return{gc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],r:function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},o:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},Vb:function(e,t,n){for(var i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i))return e[i];return null},Na:function(e,t){var n=T.a.o(e,t);0<n?e.splice(n,1):0===n&&e.shift()},Wb:function(e){for(var t=[],n=0,i=(e=e||[]).length;n<i;n++)T.a.o(t,e[n])<0&&t.push(e[n]);return t},ib:function(e,t){for(var n=[],i=0,r=(e=e||[]).length;i<r;i++)n.push(t(e[i],i));return n},Ma:function(e,t){for(var n=[],i=0,r=(e=e||[]).length;i<r;i++)t(e[i],i)&&n.push(e[i]);return n},ta:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var n=0,i=t.length;n<i;n++)e.push(t[n]);return e},ra:function(e,t,n){var i=T.a.o(T.a.Bb(e),t);i<0?n&&e.push(t):n||e.splice(i,1)},la:n,extend:e,$a:t,ab:n?t:e,D:d,Ea:function(e,t){if(!e)return e;var n,i={};for(n in e)e.hasOwnProperty(n)&&(i[n]=t(e[n],n,e));return i},rb:function(e){for(;e.firstChild;)T.removeNode(e.firstChild)},nc:function(e){for(var t=((e=T.a.W(e))[0]&&e[0].ownerDocument||MJ).createElement("div"),n=0,i=e.length;n<i;n++)t.appendChild(T.ba(e[n]));return t},wa:function(e,t){for(var n=0,i=e.length,r=[];n<i;n++){var o=e[n].cloneNode(!0);r.push(t?T.ba(o):o)}return r},fa:function(e,t){if(T.a.rb(e),t)for(var n=0,i=t.length;n<i;n++)e.appendChild(t[n])},uc:function(e,t){var n=e.nodeType?[e]:e;if(0<n.length){for(var i=n[0],r=i.parentNode,o=0,s=t.length;o<s;o++)r.insertBefore(t[o],i);for(o=0,s=n.length;o<s;o++)T.removeNode(n[o])}},Ba:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var n=e[0],i=e[e.length-1];for(e.length=0;n!==i;)e.push(n),n=n.nextSibling;e.push(i)}}return e},wc:function(e,t){l<7?e.setAttribute("selected",t):e.selected=t},cb:function(e){return null===e||e===KJ?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},sd:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},Rc:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},qb:function(e){return T.a.Rc(e,e.ownerDocument.documentElement)},Tb:function(e){return!!T.a.Vb(e,T.a.qb)},A:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Zb:function(e){return T.onError?function(){try{return e.apply(this,arguments)}catch(e){throw T.onError&&T.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(T.a.Zb(e),t)},dc:function(e){setTimeout(function(){throw T.onError&&T.onError(e),e},0)},q:function(t,e,n){var i=T.a.Zb(n);if(n=l&&a[e],T.options.useOnlyNativeEvents||n||!OJ)if(n||"function"!=typeof t.addEventListener){if(void 0===t.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var r=function(e){i.call(t,e)},o="on"+e;t.attachEvent(o,r),T.a.G.qa(t,function(){t.detachEvent(o,r)})}else t.addEventListener(e,i,!1);else OJ(t).bind(e,i)},Fa:function(e,t){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var n;if(n=!("input"!==T.a.A(e)||!e.type||"click"!=t.toLowerCase()||"checkbox"!=(n=e.type)&&"radio"!=n),T.options.useOnlyNativeEvents||!OJ||n)if("function"==typeof MJ.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(n=MJ.createEvent(s[t]||"HTMLEvents")).initEvent(t,!0,!0,LJ,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(n)}else if(n&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+t)}else OJ(e).trigger(t)},c:function(e){return T.I(e)?e():e},Bb:function(e){return T.I(e)?e.p():e},fb:function(t,e,n){var i;e&&("object"==typeof t.classList?(i=t.classList[n?"add":"remove"],T.a.r(e.match(c),function(e){i.call(t.classList,e)})):"string"==typeof t.className.baseVal?r(t.className,"baseVal",e,n):r(t,"className",e,n))},bb:function(e,t){var n=T.a.c(t);null!==n&&n!==KJ||(n="");var i=T.f.firstChild(e);!i||3!=i.nodeType||T.f.nextSibling(i)?T.f.fa(e,[e.ownerDocument.createTextNode(n)]):i.data=n,T.a.Wc(e)},vc:function(e,t){if(e.name=t,l<=7)try{e.mergeAttributes(MJ.createElement("<input name='"+e.name+"'/>"),!1)}catch(e){}},Wc:function(e){9<=l&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},Sc:function(e){if(l){var t=e.style.width;e.style.width=0,e.style.width=t}},nd:function(e,t){e=T.a.c(e),t=T.a.c(t);for(var n=[],i=e;i<=t;i++)n.push(i);return n},W:function(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(e[n]);return t},bc:function(e){return i?Symbol(e):e},xd:6===l,yd:7===l,C:l,ic:function(e,t){for(var n=T.a.W(e.getElementsByTagName("input")).concat(T.a.W(e.getElementsByTagName("textarea"))),i="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=n.length-1;0<=o;o--)i(n[o])&&r.push(n[o]);return r},kd:function(e){return"string"==typeof e&&(e=T.a.cb(e))?PJ&&PJ.parse?PJ.parse(e):new Function("return "+e)():null},Gb:function(e,t,n){if(!PJ||!PJ.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return PJ.stringify(T.a.c(e),t,n)},ld:function(e,t,n){var i=(n=n||{}).params||{},r=n.includeFields||this.gc,o=e;if("object"==typeof e&&"form"===T.a.A(e)){o=e.action;for(var s=r.length-1;0<=s;s--)for(var a=T.a.ic(e,r[s]),l=a.length-1;0<=l;l--)i[a[l].name]=a[l].value}t=T.a.c(t);var c=MJ.createElement("form");for(var u in c.style.display="none",c.action=o,c.method="post",t)(e=MJ.createElement("input")).type="hidden",e.name=u,e.value=T.a.Gb(T.a.c(t[u])),c.appendChild(e);d(i,function(e,t){var n=MJ.createElement("input");n.type="hidden",n.name=e,n.value=t,c.appendChild(n)}),MJ.body.appendChild(c),n.submitter?n.submitter(c):c.submit(),setTimeout(function(){c.parentNode.removeChild(c)},0)}}}(),T.b("utils",T.a),T.b("utils.arrayForEach",T.a.r),T.b("utils.arrayFirst",T.a.Vb),T.b("utils.arrayFilter",T.a.Ma),T.b("utils.arrayGetDistinctValues",T.a.Wb),T.b("utils.arrayIndexOf",T.a.o),T.b("utils.arrayMap",T.a.ib),T.b("utils.arrayPushAll",T.a.ta),T.b("utils.arrayRemoveItem",T.a.Na),T.b("utils.extend",T.a.extend),T.b("utils.fieldsIncludedWithJsonPost",T.a.gc),T.b("utils.getFormFields",T.a.ic),T.b("utils.peekObservable",T.a.Bb),T.b("utils.postJson",T.a.ld),T.b("utils.parseJson",T.a.kd),T.b("utils.registerEventHandler",T.a.q),T.b("utils.stringifyJson",T.a.Gb),T.b("utils.range",T.a.nd),T.b("utils.toggleDomNodeCssClass",T.a.fb),T.b("utils.triggerEvent",T.a.Fa),T.b("utils.unwrapObservable",T.a.c),T.b("utils.objectForEach",T.a.D),T.b("utils.addOrRemoveItem",T.a.ra),T.b("utils.setTextContent",T.a.bb),T.b("unwrap",T.a.c),Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(1===arguments.length)return function(){return n.apply(t,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var e=i.slice(0);return e.push.apply(e,arguments),n.apply(t,e)}}),T.a.e=new function(){function i(e,t){var n=e[o];if(!n||"null"===n||!s[n]){if(!t)return KJ;n=e[o]="ko"+r++,s[n]={}}return s[n]}var r=0,o="__ko__"+(new Date).getTime(),s={};return{get:function(e,t){var n=i(e,!1);return n===KJ?KJ:n[t]},set:function(e,t,n){n===KJ&&i(e,!1)===KJ||(i(e,!0)[t]=n)},clear:function(e){var t=e[o];return!(!t||(delete s[t],e[o]=null))},J:function(){return r+++o}}},T.b("utils.domData",T.a.e),T.b("utils.domData.clear",T.a.e.clear),T.a.G=new function(){function i(e,t){var n=T.a.e.get(e,o);return n===KJ&&t&&(n=[],T.a.e.set(e,o,n)),n}function r(e){if(t=i(e,!1))for(var t=t.slice(0),n=0;n<t.length;n++)t[n](e);if(T.a.e.clear(e),T.a.G.cleanExternalData(e),a[e.nodeType])for(t=e.firstChild;e=t;)t=e.nextSibling,8===e.nodeType&&r(e)}var o=T.a.e.J(),s={1:!0,8:!0,9:!0},a={1:!0,9:!0};return{qa:function(e,t){if("function"!=typeof t)throw Error("Callback must be a function");i(e,!0).push(t)},tc:function(e,t){var n=i(e,!1);n&&(T.a.Na(n,t),0==n.length&&T.a.e.set(e,o,KJ))},ba:function(e){if(s[e.nodeType]&&(r(e),a[e.nodeType])){var t=[];T.a.ta(t,e.getElementsByTagName("*"));for(var n=0,i=t.length;n<i;n++)r(t[n])}return e},removeNode:function(e){T.ba(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){OJ&&"function"==typeof OJ.cleanData&&OJ.cleanData([e])}}},T.ba=T.a.G.ba,T.removeNode=T.a.G.removeNode,T.b("cleanNode",T.ba),T.b("removeNode",T.removeNode),T.b("utils.domNodeDisposal",T.a.G),T.b("utils.domNodeDisposal.addDisposeCallback",T.a.G.qa),T.b("utils.domNodeDisposal.removeDisposeCallback",T.a.G.tc),c=[0,"",""],f={thead:u=[1,"<table>","</table>"],tbody:u,tfoot:u,tr:[2,"<table><tbody>","</tbody></table>"],td:d=[3,"<table><tbody><tr>","</tr></tbody></table>"],th:d,option:h=[1,"<select multiple='multiple'>","</select>"],optgroup:h},p=T.a.C<=8,T.a.na=function(e,t){var n;if(OJ){if(OJ.parseHTML)n=OJ.parseHTML(e,t)||[];else if((n=OJ.clean([e],t))&&n[0]){for(var i=n[0];i.parentNode&&11!==i.parentNode.nodeType;)i=i.parentNode;i.parentNode&&i.parentNode.removeChild(i)}}else{(n=t)||(n=MJ),i=n.parentWindow||n.defaultView||LJ;var r,o=T.a.cb(e).toLowerCase(),s=n.createElement("div");for(o=(r=(o=o.match(/^<([a-z]+)[ >]/))&&f[o[1]]||c)[0],r="ignored<div>"+r[1]+e+r[2]+"</div>","function"==typeof i.innerShiv?s.appendChild(i.innerShiv(r)):(p&&n.appendChild(s),s.innerHTML=r,p&&s.parentNode.removeChild(s));o--;)s=s.lastChild;n=T.a.W(s.lastChild.childNodes)}return n},T.a.Eb=function(e,t){if(T.a.rb(e),null!==(t=T.a.c(t))&&t!==KJ)if("string"!=typeof t&&(t=t.toString()),OJ)OJ(e).html(t);else for(var n=T.a.na(t,e.ownerDocument),i=0;i<n.length;i++)e.appendChild(n[i])},T.b("utils.parseHtmlFragment",T.a.na),T.b("utils.setHtml",T.a.Eb),T.N=(m={},{yb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return m[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},Bc:function(e,t){var n=m[e];if(n===KJ)throw Error("Couldn't find any memo with ID "+e+". Perhaps it's already been unmemoized.");try{return n.apply(null,t||[]),!0}finally{delete m[e]}},Cc:function(e,t){var n=[];!function e(t,n){if(t)if(8==t.nodeType)null!=(i=T.N.pc(t.nodeValue))&&n.push({Qc:t,hd:i});else if(1==t.nodeType)for(var i=0,r=t.childNodes,o=r.length;i<o;i++)e(r[i],n)}(e,n);for(var i=0,r=n.length;i<r;i++){var o=n[i].Qc,s=[o];t&&T.a.ta(s,t),T.N.Bc(n[i].hd,s),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}},pc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}),T.b("memoization",T.N),T.b("memoization.memoize",T.N.yb),T.b("memoization.unmemoize",T.N.Bc),T.b("memoization.parseMemoText",T.N.pc),T.b("memoization.unmemoizeDomNodeAndDescendants",T.N.Cc),T.Z=function(){function e(){if(o)for(var e,t=o,n=0;a<o;)if(e=r[a++]){if(t<a){if(5e3<=++n){a=o,T.a.dc(Error("'Too much recursion' after processing "+n+" task groups."));break}t=o}try{e()}catch(e){T.a.dc(e)}}}function t(){e(),a=o=r.length=0}var n,i,r=[],o=0,s=1,a=0;return{scheduler:LJ.MutationObserver?(n=t,i=MJ.createElement("div"),new MutationObserver(n).observe(i,{attributes:!0}),function(){i.classList.toggle("foo")}):MJ&&"onreadystatechange"in MJ.createElement("script")?function(e){var t=MJ.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,MJ.documentElement.removeChild(t),t=null,e()},MJ.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},Za:function(e){return o||T.Z.scheduler(t),r[o++]=e,s++},cancel:function(e){a<=(e-=s-o)&&e<o&&(r[e]=null)},resetForTesting:function(){var e=o-a;return a=o=r.length=0,e},rd:e}}(),T.b("tasks",T.Z),T.b("tasks.schedule",T.Z.Za),T.b("tasks.runEarly",T.Z.rd),T.Aa={throttle:function(t,n){t.throttleEvaluation=n;var i=null;return T.B({read:t,write:function(e){clearTimeout(i),i=T.a.setTimeout(function(){t(e)},n)}})},rateLimit:function(e,t){var n,i,r;"number"==typeof t?n=t:(n=t.timeout,i=t.method),e.gb=!1,r="notifyWhenChangesStop"==i?s:o,e.Wa(function(e){return r(e,n)})},deferred:function(i,e){if(!0!==e)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");i.gb||(i.gb=!0,i.Wa(function(e){var t,n=!1;return function(){if(!n){T.Z.cancel(t),t=T.Z.Za(e);try{n=!0,i.notifySubscribers(KJ,"dirty")}finally{n=!1}}}}))},notify:function(e,t){e.equalityComparer="always"==t?null:n}};var g={undefined:1,boolean:1,number:1,string:1};T.b("extenders",T.Aa),T.zc=function(e,t,n){this.$=e,this.jb=t,this.Pc=n,this.T=!1,T.H(this,"dispose",this.k)},T.zc.prototype.k=function(){this.T=!0,this.Pc()},T.K=function(){T.a.ab(this,y),y.ub(this)};var v="change",y={ub:function(e){e.F={change:[]},e.Qb=1},Y:function(e,t,n){var i=this;n=n||v;var r=new T.zc(i,t?e.bind(t):e,function(){T.a.Na(i.F[n],r),i.Ka&&i.Ka(n)});return i.ua&&i.ua(n),i.F[n]||(i.F[n]=[]),i.F[n].push(r),r},notifySubscribers:function(e,t){if((t=t||v)===v&&this.Kb(),this.Ra(t)){var n=t===v&&this.Fc||this.F[t].slice(0);try{T.l.Xb();for(var i,r=0;i=n[r];++r)i.T||i.jb(e)}finally{T.l.end()}}},Pa:function(){return this.Qb},Zc:function(e){return this.Pa()!==e},Kb:function(){++this.Qb},Wa:function(e){var t,n,i,r,o=this,s=T.I(o);o.Ja||(o.Ja=o.notifySubscribers,o.notifySubscribers=l);var a=e(function(){o.Ha=!1,s&&r===o&&(r=o.Mb?o.Mb():o());var e=n||o.Ua(i,r);n=t=!1,e&&o.Ja(i=r)});o.Pb=function(e){o.Fc=o.F[v].slice(0),o.Ha=t=!0,r=e,a()},o.Ob=function(e){t||(i=e,o.Ja(e,"beforeChange"))},o.Hc=function(){o.Ua(i,o.p(!0))&&(n=!0)}},Ra:function(e){return this.F[e]&&this.F[e].length},Xc:function(e){if(e)return this.F[e]&&this.F[e].length||0;var n=0;return T.a.D(this.F,function(e,t){"dirty"!==e&&(n+=t.length)}),n},Ua:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},extend:function(e){var i=this;return e&&T.a.D(e,function(e,t){var n=T.Aa[e];"function"==typeof n&&(i=n(i,t)||i)}),i}};T.H(y,"subscribe",y.Y),T.H(y,"extend",y.extend),T.H(y,"getSubscriptionsCount",y.Xc),T.a.la&&T.a.$a(y,Function.prototype),T.K.fn=y,T.lc=function(e){return null!=e&&"function"==typeof e.Y&&"function"==typeof e.notifySubscribers},T.b("subscribable",T.K),T.b("isSubscribable",T.lc),T.xa=T.l=function(){function i(e){n.push(t),t=e}function r(){t=n.pop()}var t,n=[],o=0;return{Xb:i,end:r,sc:function(e){if(t){if(!T.lc(e))throw Error("Only subscribable things can act as dependencies");t.jb.call(t.Lc,e,e.Gc||(e.Gc=++o))}},w:function(e,t,n){try{return i(),e.apply(t,n||[])}finally{r()}},Ca:function(){if(t)return t.m.Ca()},Va:function(){if(t)return t.Va}}}(),T.b("computedContext",T.xa),T.b("computedContext.getDependenciesCount",T.xa.Ca),T.b("computedContext.isInitial",T.xa.Va),T.b("ignoreDependencies",T.wd=T.l.w);var b=T.a.bc("_latestValue");T.O=function(e){function t(){return 0<arguments.length?(t.Ua(t[b],arguments[0])&&(t.ia(),t[b]=arguments[0],t.ha()),this):(T.l.sc(t),t[b])}return t[b]=e,T.a.la||T.a.extend(t,T.K.fn),T.K.fn.ub(t),T.a.ab(t,_),T.options.deferUpdates&&T.Aa.deferred(t,!0),t};var _={equalityComparer:n,p:function(){return this[b]},ha:function(){this.notifySubscribers(this[b])},ia:function(){this.notifySubscribers(this[b],"beforeChange")}};T.a.la&&T.a.$a(_,T.K.fn);var x=T.O.md="__ko_proto__";_[x]=T.O,T.Qa=function(e,t){return null!==e&&e!==KJ&&e[x]!==KJ&&(e[x]===t||T.Qa(e[x],t))},T.I=function(e){return T.Qa(e,T.O)},T.Da=function(e){return!!("function"==typeof e&&e[x]===T.O||"function"==typeof e&&e[x]===T.B&&e.$c)},T.b("observable",T.O),T.b("isObservable",T.I),T.b("isWriteableObservable",T.Da),T.b("isWritableObservable",T.Da),T.b("observable.fn",_),T.H(_,"peek",_.p),T.H(_,"valueHasMutated",_.ha),T.H(_,"valueWillMutate",_.ia),T.ma=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=T.O(e),T.a.ab(e,T.ma.fn),e.extend({trackArrayChanges:!0})},T.ma.fn={remove:function(t){for(var e=this.p(),n=[],i="function"!=typeof t||T.I(t)?function(e){return e===t}:t,r=0;r<e.length;r++){var o=e[r];i(o)&&(0===n.length&&this.ia(),n.push(o),e.splice(r,1),r--)}return n.length&&this.ha(),n},removeAll:function(t){if(t!==KJ)return t?this.remove(function(e){return 0<=T.a.o(t,e)}):[];var e=this.p(),n=e.slice(0);return this.ia(),e.splice(0,e.length),this.ha(),n},destroy:function(t){var e=this.p(),n="function"!=typeof t||T.I(t)?function(e){return e===t}:t;this.ia();for(var i=e.length-1;0<=i;i--)n(e[i])&&(e[i]._destroy=!0);this.ha()},destroyAll:function(t){return t===KJ?this.destroy(function(){return!0}):t?this.destroy(function(e){return 0<=T.a.o(t,e)}):[]},indexOf:function(e){var t=this();return T.a.o(t,e)},replace:function(e,t){var n=this.indexOf(e);0<=n&&(this.ia(),this.p()[n]=t,this.ha())}},T.a.la&&T.a.$a(T.ma.fn,T.O.fn),T.a.r("pop push reverse shift sort splice unshift".split(" "),function(n){T.ma.fn[n]=function(){var e=this.p();this.ia(),this.Yb(e,n,arguments);var t=e[n].apply(e,arguments);return this.ha(),t===e?this:t}}),T.a.r(["slice"],function(t){T.ma.fn[t]=function(){var e=this();return e[t].apply(e,arguments)}}),T.b("observableArray",T.ma),T.Aa.trackArrayChanges=function(i,e){if(i.kb={},e&&"object"==typeof e&&T.a.extend(i.kb,e),i.kb.sparse=!0,!i.Yb){var t,r,d=!1,h=null,f=0,n=i.ua,o=i.Ka;i.ua=function(e){n&&n.call(i,e),"arrayChange"===e&&function(){if(!d){d=!0,r=i.notifySubscribers,i.notifySubscribers=function(e,t){return t&&t!==v||++f,r.apply(this,arguments)};var n=[].concat(i.p()||[]);h=null,t=i.Y(function(e){var t;e=[].concat(e||[]),i.Ra("arrayChange")&&((!h||1<f)&&(h=T.a.lb(n,e,i.kb)),t=h),n=e,h=null,f=0,t&&t.length&&i.notifySubscribers(t,"arrayChange")})}}()},i.Ka=function(e){o&&o.call(i,e),"arrayChange"!==e||i.Ra("arrayChange")||(r&&(i.notifySubscribers=r,r=KJ),t.k(),d=!1)},i.Yb=function(e,t,n){function i(e,t,n){return r[r.length]={status:e,value:t,index:n}}if(d&&!f){var r=[],o=e.length,s=n.length,a=0;switch(t){case"push":a=o;case"unshift":for(t=0;t<s;t++)i("added",n[t],a+t);break;case"pop":a=o-1;case"shift":o&&i("deleted",e[a],a);break;case"splice":t=Math.min(Math.max(0,n[0]<0?o+n[0]:n[0]),o),o=1===s?o:Math.min(t+(n[1]||0),o),s=t+s-2,a=Math.max(o,s);for(var l=[],c=[],u=2;t<a;++t,++u)t<o&&c.push(i("deleted",e[t],t)),t<s&&l.push(i("added",n[u],t));T.a.hc(c,l);break;default:return}h=r}}}};var w=T.a.bc("_state");T.m=T.B=function(e,t,n){function i(){if(0<arguments.length){if("function"!=typeof r)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return r.apply(o.sb,arguments),this}return T.l.sc(i),(o.V||o.t&&i.Sa())&&i.U(),o.M}if("object"==typeof e?n=e:(n=n||{},e&&(n.read=e)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var r=n.write,o={M:KJ,da:!0,V:!0,Ta:!1,Hb:!1,T:!1,Ya:!1,t:!1,od:n.read,sb:t||n.owner,i:n.disposeWhenNodeIsRemoved||n.i||null,ya:n.disposeWhen||n.ya,pb:null,s:{},L:0,fc:null};return i[w]=o,i.$c="function"==typeof r,T.a.la||T.a.extend(i,T.K.fn),T.K.fn.ub(i),T.a.ab(i,C),n.pure?(o.Ya=!0,o.t=!0,T.a.extend(i,k)):n.deferEvaluation&&T.a.extend(i,S),T.options.deferUpdates&&T.Aa.deferred(i,!0),o.i&&(o.Hb=!0,o.i.nodeType||(o.i=null)),o.t||n.deferEvaluation||i.U(),o.i&&i.ca()&&T.a.G.qa(o.i,o.pb=function(){i.k()}),i};var C={equalityComparer:n,Ca:function(){return this[w].L},Sb:function(e,t,n){if(this[w].Ya&&t===this)throw Error("A 'pure' computed must not be called recursively");(this[w].s[e]=n).Ia=this[w].L++,n.pa=t.Pa()},Sa:function(){var e,t,n=this[w].s;for(e in n)if(n.hasOwnProperty(e)&&(t=n[e],this.oa&&t.$.Ha||t.$.Zc(t.pa)))return!0},gd:function(){this.oa&&!this[w].Ta&&this.oa(!1)},ca:function(){var e=this[w];return e.V||0<e.L},qd:function(){this.Ha?this[w].V&&(this[w].da=!0):this.ec()},yc:function(e){if(!e.gb||this[w].i)return e.Y(this.ec,this);var t=e.Y(this.gd,this,"dirty"),n=e.Y(this.qd,this);return{$:e,k:function(){t.k(),n.k()}}},ec:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[w].fc),this[w].fc=T.a.setTimeout(function(){e.U(!0)},t)):e.oa?e.oa(!0):e.U(!0)},U:function(e){var t=this[w],n=t.ya,i=!1;if(!t.Ta&&!t.T){if(t.i&&!T.a.qb(t.i)||n&&n()){if(!t.Hb)return void this.k()}else t.Hb=!1;t.Ta=!0;try{i=this.Vc(e)}finally{t.Ta=!1}return t.L||this.k(),i}},Vc:function(e){var t=this[w],n=!1,i=t.Ya?KJ:!t.L,r={Mc:this,Oa:t.s,ob:t.L};return T.l.Xb({Lc:r,jb:a,m:this,Va:i}),t.s={},t.L=0,r=this.Uc(t,r),this.Ua(t.M,r)&&(t.t||this.notifySubscribers(t.M,"beforeChange"),t.M=r,t.t?this.Kb():e&&this.notifySubscribers(t.M),n=!0),i&&this.notifySubscribers(t.M,"awake"),n},Uc:function(e,t){try{var n=e.od;return e.sb?n.call(e.sb):n()}finally{T.l.end(),t.ob&&!e.t&&T.a.D(t.Oa,r),e.da=e.V=!1}},p:function(e){var t=this[w];return(t.V&&(e||!t.L)||t.t&&this.Sa())&&this.U(),t.M},Wa:function(e){T.K.fn.Wa.call(this,e),this.Mb=function(){return this[w].da?this.U():this[w].V=!1,this[w].M},this.oa=function(e){this.Ob(this[w].M),this[w].V=!0,e&&(this[w].da=!0),this.Pb(this)}},k:function(){var e=this[w];!e.t&&e.s&&T.a.D(e.s,function(e,t){t.k&&t.k()}),e.i&&e.pb&&T.a.G.tc(e.i,e.pb),e.s=null,e.L=0,e.T=!0,e.da=!1,e.V=!1,e.t=!1,e.i=null}},k={ua:function(e){var r=this,o=r[w];if(!o.T&&o.t&&"change"==e){if(o.t=!1,o.da||r.Sa())o.s=null,o.L=0,r.U()&&r.Kb();else{var n=[];T.a.D(o.s,function(e,t){n[t.Ia]=e}),T.a.r(n,function(e,t){var n=o.s[e],i=r.yc(n.$);i.Ia=t,i.pa=n.pa,o.s[e]=i})}o.T||r.notifySubscribers(o.M,"awake")}},Ka:function(e){var n=this[w];n.T||"change"!=e||this.Ra("change")||(T.a.D(n.s,function(e,t){t.k&&(n.s[e]={$:t.$,Ia:t.Ia,pa:t.pa},t.k())}),n.t=!0,this.notifySubscribers(KJ,"asleep"))},Pa:function(){var e=this[w];return e.t&&(e.da||this.Sa())&&this.U(),T.K.fn.Pa.call(this)}},S={ua:function(e){"change"!=e&&"beforeChange"!=e||this.p()}};T.a.la&&T.a.$a(C,T.K.fn);var E,N=T.O.md;T.m[N]=T.O,C[N]=T.m,T.bd=function(e){return T.Qa(e,T.m)},T.cd=function(e){return T.Qa(e,T.m)&&e[w]&&e[w].Ya},T.b("computed",T.m),T.b("dependentObservable",T.m),T.b("isComputed",T.bd),T.b("isPureComputed",T.cd),T.b("computed.fn",C),T.H(C,"peek",C.p),T.H(C,"dispose",C.k),T.H(C,"isActive",C.ca),T.H(C,"getDependenciesCount",C.Ca),T.rc=function(e,t){return"function"==typeof e?T.m(e,t,{pure:!0}):((e=T.a.extend({},e)).pure=!0,T.m(e,t))},T.b("pureComputed",T.rc),function(){function a(i,r,o){if(o=o||new e,"object"!=typeof(i=r(i))||null===i||i===KJ||i instanceof RegExp||i instanceof Date||i instanceof String||i instanceof Number||i instanceof Boolean)return i;var s=i instanceof Array?[]:{};return o.save(i,s),function(e,t){if(e instanceof Array){for(var n=0;n<e.length;n++)t(n);"function"==typeof e.toJSON&&t("toJSON")}else for(n in e)t(n)}(i,function(e){var t=r(i[e]);switch(typeof t){case"boolean":case"number":case"string":case"function":s[e]=t;break;case"object":case"undefined":var n=o.get(t);s[e]=n!==KJ?n:a(t,r,o)}}),s}function e(){this.keys=[],this.Lb=[]}T.Ac=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return a(e,function(e){for(var t=0;T.I(e)&&t<10;t++)e=e();return e})},T.toJSON=function(e,t,n){return e=T.Ac(e),T.a.Gb(e,t,n)},e.prototype={save:function(e,t){var n=T.a.o(this.keys,e);0<=n?this.Lb[n]=t:(this.keys.push(e),this.Lb.push(t))},get:function(e){return 0<=(e=T.a.o(this.keys,e))?this.Lb[e]:KJ}}}(),T.b("toJS",T.Ac),T.b("toJSON",T.toJSON),T.j={u:function(e){switch(T.a.A(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?T.a.e.get(e,T.d.options.zb):T.a.C<=7?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?T.j.u(e.options[e.selectedIndex]):KJ;default:return e.value}},ja:function(e,t,n){switch(T.a.A(e)){case"option":switch(typeof t){case"string":T.a.e.set(e,T.d.options.zb,KJ),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t;break;default:T.a.e.set(e,T.d.options.zb,t),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof t?t:""}break;case"select":""!==t&&null!==t||(t=KJ);for(var i,r=-1,o=0,s=e.options.length;o<s;++o)if((i=T.j.u(e.options[o]))==t||""==i&&t===KJ){r=o;break}(n||0<=r||t===KJ&&1<e.size)&&(e.selectedIndex=r);break;default:null!==t&&t!==KJ||(t=""),e.value=t}}},T.b("selectExtensions",T.j),T.b("selectExtensions.readValue",T.j.u),T.b("selectExtensions.writeValue",T.j.ja),T.h=function(){function i(e){123===(e=T.a.cb(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,n=[],i=e.match(d),r=[],o=0;if(i){i.push(",");for(var s,a=0;s=i[a];++a){var l=s.charCodeAt(0);if(44===l){if(o<=0){n.push(t&&r.length?{key:t,value:r.join("")}:{unknown:t||r.join("")}),t=o=0,r=[];continue}}else if(58===l){if(!o&&!t&&1===r.length){t=r.pop();continue}}else 47===l&&a&&1<s.length?(l=i[a-1].match(h))&&!f[l[0]]&&((i=(e=e.substr(e.indexOf(s)+1)).match(d)).push(","),a=-1,s="/"):40===l||123===l||91===l?++o:41===l||125===l||93===l?--o:t||r.length||34!==l&&39!==l||(s=s.slice(1,-1));r.push(s)}}return n}var c=["true","false","null","undefined"],u=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,d=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),h=/[\])"'A-Za-z0-9_$]+$/,f={in:1,return:1,typeof:1},p={};return{va:[],ga:p,Ab:i,Xa:function(e,t){function r(e,t){var n;if(!l){var i=T.getBindingHandler(e);if(i&&i.preprocess&&!(t=i.preprocess(t,e,r)))return;(i=p[e])&&(n=t,i=n=!(0<=T.a.o(c,n))&&null!==(i=n.match(u))&&(i[1]?"Object("+i[1]+")"+i[2]:n)),i&&s.push("'"+e+"':function(_z){"+n+"=_z}")}a&&(t="function(){return "+t+" }"),o.push("'"+e+"':"+t)}var o=[],s=[],a=(t=t||{}).valueAccessors,l=t.bindingParams,n="string"==typeof e?i(e):e;return T.a.r(n,function(e){r(e.key||e.unknown,e.value)}),s.length&&r("_ko_property_writers","{"+s.join(",")+" }"),o.join(",")},fd:function(e,t){for(var n=0;n<e.length;n++)if(e[n].key==t)return!0;return!1},Ga:function(e,t,n,i,r){e&&T.I(e)?!T.Da(e)||r&&e.p()===i||e(i):(e=t.get("_ko_property_writers"))&&e[n]&&e[n](i)}}}(),T.b("expressionRewriting",T.h),T.b("expressionRewriting.bindingRewriteValidators",T.h.va),T.b("expressionRewriting.parseObjectLiteral",T.h.Ab),T.b("expressionRewriting.preProcessBindings",T.h.Xa),T.b("expressionRewriting._twoWayBindings",T.h.ga),T.b("jsonExpressionRewriting",T.h),T.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",T.h.Xa),function(){function o(e){return 8==e.nodeType&&n.test(t?e.text:e.nodeValue)}function s(e){return 8==e.nodeType&&r.test(t?e.text:e.nodeValue)}function i(e,t){for(var n=e,i=1,r=[];n=n.nextSibling;){if(s(n)&&0==--i)return r;r.push(n),o(n)&&i++}if(!t)throw Error("Cannot find closing comment tag to match: "+e.nodeValue);return null}function a(e,t){var n=i(e,t);return n?0<n.length?n[n.length-1].nextSibling:e.nextSibling:null}var t=MJ&&"\x3c!--test--\x3e"===MJ.createComment("test").text,n=t?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,r=t?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};T.f={aa:{},childNodes:function(e){return o(e)?i(e):e.childNodes},za:function(e){if(o(e))for(var t=0,n=(e=T.f.childNodes(e)).length;t<n;t++)T.removeNode(e[t]);else T.a.rb(e)},fa:function(e,t){if(o(e)){T.f.za(e);for(var n=e.nextSibling,i=0,r=t.length;i<r;i++)n.parentNode.insertBefore(t[i],n)}else T.a.fa(e,t)},qc:function(e,t){o(e)?e.parentNode.insertBefore(t,e.nextSibling):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},kc:function(e,t,n){n?o(e)?e.parentNode.insertBefore(t,n.nextSibling):n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):T.f.qc(e,t)},firstChild:function(e){return o(e)?!e.nextSibling||s(e.nextSibling)?null:e.nextSibling:e.firstChild},nextSibling:function(e){return o(e)&&(e=a(e)),e.nextSibling&&s(e.nextSibling)?null:e.nextSibling},Yc:o,vd:function(e){return(e=(t?e.text:e.nodeValue).match(n))?e[1]:null},oc:function(e){if(l[T.a.A(e)]){var t=e.firstChild;if(t)do{if(1===t.nodeType){var n,i=null;if(n=t.firstChild)do{if(i)i.push(n);else if(o(n)){var r=a(n,!0);r?n=r:i=[n]}else s(n)&&(i=[n])}while(n=n.nextSibling);if(n=i)for(i=t.nextSibling,r=0;r<n.length;r++)i?e.insertBefore(n[r],i):e.appendChild(n[r])}}while(t=t.nextSibling)}}}}(),T.b("virtualElements",T.f),T.b("virtualElements.allowedBindings",T.f.aa),T.b("virtualElements.emptyNode",T.f.za),T.b("virtualElements.insertAfter",T.f.kc),T.b("virtualElements.prepend",T.f.qc),T.b("virtualElements.setDomNodeChildren",T.f.fa),T.S=function(){this.Kc={}},T.a.extend(T.S.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||T.g.getComponentNameForNode(e);case 8:return T.f.Yc(e);default:return!1}},getBindings:function(e,t){var n=(n=this.getBindingsString(e,t))?this.parseBindingsString(n,t,e):null;return T.g.Rb(n,e,t,!1)},getBindingAccessors:function(e,t){var n=(n=this.getBindingsString(e,t))?this.parseBindingsString(n,t,e,{valueAccessors:!0}):null;return T.g.Rb(n,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return T.f.vd(e);default:return null}},parseBindingsString:function(t,e,n,i){try{var r,o=this.Kc,s=t+(i&&i.valueAccessors||"");if(!(r=o[s])){var a,l="with($context){with($data||{}){return{"+T.h.Xa(t,i)+"}}}";a=new Function("$context","$element",l),r=o[s]=a}return r(e,n)}catch(e){throw e.message="Unable to parse bindings.\nBindings value: "+t+"\nMessage: "+e.message,e}}}),T.S.instance=new T.S,T.b("bindingProvider",T.S),function(){function s(e){return function(){return e}}function g(e){return e()}function a(n){return T.a.Ea(T.l.w(n),function(e,t){return function(){return n()[t]}})}function v(e,t){return a(this.getBindings.bind(this,e,t))}function o(e,t,n){var i,r=T.f.firstChild(t),o=T.S.instance,s=o.preprocessNode;if(s){for(;i=r;)r=T.f.nextSibling(i),s.call(o,i);r=T.f.firstChild(t)}for(;i=r;)r=T.f.nextSibling(i),l(e,i,n)}function l(e,t,n){var i=!0,r=1===t.nodeType;r&&T.f.oc(t),(r&&n||T.S.instance.nodeHasBindings(t))&&(i=c(t,null,e,n).shouldBindDescendants),i&&!d[T.a.A(t)]&&o(e,t,!r)}function c(r,e,o,t){var s,a,i,l,c,u,n=T.a.e.get(r,y);if(!e){if(n)throw Error("You cannot apply bindings multiple times to the same element.");T.a.e.set(r,y,!0)}if(!n&&t&&T.xc(r,o),e&&"function"!=typeof e)s=e;else{var d=T.S.instance,h=d.getBindingAccessors||v,f=T.B(function(){return(s=e?e(o,r):h.call(d,r,o))&&o.Q&&o.Q(),s},null,{i:r});s&&f.ca()||(f=null)}if(s){var p=f?function(e){return function(){return g(f()[e])}}:function(e){return s[e]},m=function(){return T.a.Ea(f?f():s,g)};m.get=function(e){return s[e]&&g(p(e))},m.has=function(e){return e in s},i=s,l=[],c={},u=[],T.a.D(i,function t(e){if(!c[e]){var n=T.getBindingHandler(e);n&&(n.after&&(u.push(e),T.a.r(n.after,function(e){if(i[e]){if(-1!==T.a.o(u,e))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+u.join(", "));t(e)}}),u.length--),l.push({key:e,jc:n})),c[e]=!0}}),t=l,T.a.r(t,function(e){var t=e.jc.init,n=e.jc.update,i=e.key;if(8===r.nodeType&&!T.f.aa[i])throw Error("The binding '"+i+"' cannot be used with virtual elements");try{"function"==typeof t&&T.l.w(function(){var e=t(r,p(i),m,o.$data,o);if(e&&e.controlsDescendantBindings){if(a!==KJ)throw Error("Multiple bindings ("+a+" and "+i+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");a=i}}),"function"==typeof n&&T.B(function(){n(r,p(i),m,o.$data,o)},null,{i:r})}catch(e){throw e.message='Unable to process binding "'+i+": "+s[i]+'"\nMessage: '+e.message,e}})}return{shouldBindDescendants:a===KJ}}function u(e){return e&&e instanceof T.R?e:new T.R(e)}T.d={};var d={script:!0,textarea:!0,template:!0};T.getBindingHandler=function(e){return T.d[e]},T.R=function(n,i,r,o,e){function t(){var e=c?n():n,t=T.a.c(e);return i?(i.Q&&i.Q(),T.a.extend(l,i),l.Q=a):(l.$parents=[],l.$root=t,l.ko=T),l.$rawData=e,l.$data=t,r&&(l[r]=t),o&&o(l,i,t),l.$data}var s,a,l=this,c="function"==typeof n&&!T.I(n);e&&e.exportDependencies?t():(a=T.B(t,null,{ya:function(){return s&&!T.a.Tb(s)},i:!0})).ca()&&((l.Q=a).equalityComparer=null,s=[],a.Dc=function(e){s.push(e),T.a.G.qa(e,function(e){T.a.Na(s,e),s.length||(a.k(),l.Q=a=KJ)})})},T.R.prototype.createChildContext=function(e,t,n,i){return new T.R(e,this,t,function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),n&&n(e)},i)},T.R.prototype.extend=function(n){return new T.R(this.Q||this.$data,this,null,function(e,t){e.$rawData=t.$rawData,T.a.extend(e,"function"==typeof n?n():n)})},T.R.prototype.ac=function(e,t){return this.createChildContext(e,t,null,{exportDependencies:!0})};var y=T.a.e.J(),n=T.a.e.J();T.xc=function(e,t){if(2!=arguments.length)return T.a.e.get(e,n);T.a.e.set(e,n,t),t.Q&&t.Q.Dc(e)},T.La=function(e,t,n){return 1===e.nodeType&&T.f.oc(e),c(e,t,u(n),!0)},T.Ic=function(e,t,n){return n=u(n),T.La(e,(r=n,o=e,"function"==typeof(i=t)?a(i.bind(null,r,o)):T.a.Ea(i,s)),n);var i,r,o},T.hb=function(e,t){1!==t.nodeType&&8!==t.nodeType||o(u(e),t,!0)},T.Ub=function(e,t){if(!OJ&&LJ.jQuery&&(OJ=LJ.jQuery),t&&1!==t.nodeType&&8!==t.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");t=t||LJ.document.body,l(u(e),t,!0)},T.nb=function(e){switch(e.nodeType){case 1:case 8:var t=T.xc(e);if(t)return t;if(e.parentNode)return T.nb(e.parentNode)}return KJ},T.Oc=function(e){return(e=T.nb(e))?e.$data:KJ},T.b("bindingHandlers",T.d),T.b("applyBindings",T.Ub),T.b("applyBindingsToDescendants",T.hb),T.b("applyBindingAccessorsToNode",T.La),T.b("applyBindingsToNode",T.Ic),T.b("contextFor",T.nb),T.b("dataFor",T.Oc)}(),function(a){function i(i,e){var r,n,o,s=c.hasOwnProperty(i)?c[i]:a;s?s.Y(e):((s=c[i]=new T.K).Y(e),o=function(e,t){var n=!(!t||!t.synchronous);u[i]={definition:e,dd:n},delete c[i],r||n?s.notifySubscribers(e):T.Z.Za(function(){s.notifySubscribers(e)})},l("getConfig",[n=i],function(t){t?l("loadComponent",[n,t],function(e){o(e,t)}):o(null,null)}),r=!0)}function l(t,n,i,r){r||(r=T.g.loaders.slice(0));var e=r.shift();if(e){var o=e[t];if(o){var s=!1;if(o.apply(e,n.concat(function(e){s?i(null):null!==e?i(e):l(t,n,i,r)}))!==a&&(s=!0,!e.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else l(t,n,i,r)}else i(null)}var c={},u={};T.g={get:function(e,t){var n=u.hasOwnProperty(e)?u[e]:a;n?n.dd?T.l.w(function(){t(n.definition)}):T.Z.Za(function(){t(n.definition)}):i(e,t)},$b:function(e){delete u[e]},Nb:l},T.g.loaders=[],T.b("components",T.g),T.b("components.get",T.g.get),T.b("components.clearCachedDefinition",T.g.$b)}(),function(){function r(e){switch(T.a.A(e)){case"script":return T.a.na(e.text);case"textarea":return T.a.na(e.value);case"template":if(o(e.content))return T.a.wa(e.content.childNodes)}return T.a.wa(e.childNodes)}function o(e){return LJ.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function l(e,t,n){"string"==typeof t.require?i||LJ.require?(i||LJ.require)([t.require],n):e("Uses require, but no AMD loader is present"):n(t)}function s(t){return function(e){throw Error("Component '"+t+"': "+e)}}var n={};T.g.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(T.g.wb(e))throw Error("Component "+e+" is already registered");n[e]=t},T.g.wb=function(e){return n.hasOwnProperty(e)},T.g.ud=function(e){delete n[e],T.g.$b(e)},T.g.cc={getConfig:function(e,t){t(n.hasOwnProperty(e)?n[e]:null)},loadComponent:function(t,e,n){var i=s(t);l(i,e,function(e){!function(t,e,n,i){function r(){0==--s&&i(o)}var o={},s=2,a=n.template;n=n.viewModel,a?l(e,a,function(e){T.g.Nb("loadTemplate",[t,e],function(e){o.template=e,r()})}):r(),n?l(e,n,function(e){T.g.Nb("loadViewModel",[t,e],function(e){o[c]=e,r()})}):r()}(t,i,e,n)})},loadTemplate:function(e,t,n){if(e=s(e),"string"==typeof t)n(T.a.na(t));else if(t instanceof Array)n(t);else if(o(t))n(T.a.W(t.childNodes));else if(t.element)if(t=t.element,LJ.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)n(r(t));else if("string"==typeof t){var i=MJ.getElementById(t);i?n(r(i)):e("Cannot find element with ID "+t)}else e("Unknown element type: "+t);else e("Unknown template value: "+t)},loadViewModel:function(e,t,n){!function e(t,n,i){if("function"==typeof n)i(function(e){return new n(e)});else if("function"==typeof n[c])i(n[c]);else if("instance"in n){var r=n.instance;i(function(){return r})}else"viewModel"in n?e(t,n.viewModel,i):t("Unknown viewModel value: "+n)}(s(e),t,n)}};var c="createViewModel";T.b("components.register",T.g.register),T.b("components.isRegistered",T.g.wb),T.b("components.unregister",T.g.ud),T.b("components.defaultLoader",T.g.cc),T.g.loaders.push(T.g.cc),T.g.Ec=n}(),function(){T.g.getComponentNameForNode=function(e){var t=T.a.A(e);if(T.g.wb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||T.a.C<=8&&e.tagName===t))return t},T.g.Rb=function(e,t,n,i){if(1===t.nodeType){var r=T.g.getComponentNameForNode(t);if(r){if((e=e||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var o={name:r,params:function(n,e){if(t=n.getAttribute("params")){var t=s.parseBindingsString(t,e,n,{valueAccessors:!0,bindingParams:!0}),i=(t=T.a.Ea(t,function(e){return T.m(e,null,{i:n})}),T.a.Ea(t,function(t){var e=t.p();return t.ca()?T.m({read:function(){return T.a.c(t())},write:T.Da(e)&&function(e){t()(e)},i:n}):e}));return i.hasOwnProperty("$raw")||(i.$raw=t),i}return{$raw:{}}}(t,n)};e.component=i?function(){return o}:o}}return e};var i,t,s=new T.S;T.a.C<9&&(T.g.register=(t=T.g.register,function(e){return MJ.createElement(e),t.apply(this,arguments)}),MJ.createDocumentFragment=(i=MJ.createDocumentFragment,function(){var e,t=i(),n=T.g.Ec;for(e in n)n.hasOwnProperty(e)&&t.createElement(e);return t}))}(),E=0,T.d.component={init:function(u,t,e,n,d){function h(){var e=f&&f.dispose;"function"==typeof e&&e.call(f),p=f=null}var f,p,m=T.a.W(T.f.childNodes(u));return T.a.G.qa(u,h),T.m(function(){var a,l,e=T.a.c(t());if("string"==typeof e?a=e:(a=T.a.c(e.name),l=T.a.c(e.params)),!a)throw Error("No component name specified");var c=p=++E;T.g.get(a,function(e){if(p===c){if(h(),!e)throw Error("Unknown component '"+a+"'");!function(e,t,n){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=T.a.wa(t),T.f.fa(n,e)}(a,e,u);var t=(i=u,r=m,o=l,(s=(n=e).createViewModel)?s.call(n,o,{element:i,templateNodes:r}):o);e=d.createChildContext(t,void 0,function(e){e.$component=t,e.$componentTemplateNodes=m}),f=t,T.hb(e,u)}var n,i,r,o,s})},null,{i:u}),{controlsDescendantBindings:!0}}},T.f.aa.component=!0;var D={class:"className",for:"htmlFor"};T.d.attr={update:function(i,e){var t=T.a.c(e())||{};T.a.D(t,function(e,t){var n=!1===(t=T.a.c(t))||null===t||t===KJ;n&&i.removeAttribute(e),T.a.C<=8&&e in D?(e=D[e],n?i.removeAttribute(e):i[e]=t):n||i.setAttribute(e,t.toString()),"name"===e&&T.a.vc(i,n?"":t.toString())})}},T.d.checked={after:["value","attr"],init:function(r,o,s){function e(){var e=r.checked,t=h?a():e;if(!T.xa.Va()&&(!l||e)){var n=T.l.w(o);if(c){var i=u?n.p():n;d!==t?(e&&(T.a.ra(i,t,!0),T.a.ra(i,d,!1)),d=t):T.a.ra(i,t,e),u&&T.Da(n)&&n(i)}else T.h.Ga(n,s,"checked",t,!0)}}var a=T.rc(function(){return s.has("checkedValue")?T.a.c(s.get("checkedValue")):s.has("value")?T.a.c(s.get("value")):r.value}),t="checkbox"==r.type,l="radio"==r.type;if(t||l){var n=o(),c=t&&T.a.c(n)instanceof Array,u=!(c&&n.push&&n.splice),d=c?a():KJ,h=l||c;l&&!r.name&&T.d.uniqueName.init(r,function(){return!0}),T.m(e,null,{i:r}),T.a.q(r,"click",e),T.m(function(){var e=T.a.c(o());r.checked=c?0<=T.a.o(e,a()):t?e:a()===e},null,{i:r}),n=KJ}}},T.h.ga.checked=!0,T.d.checkedValue={update:function(e,t){e.value=T.a.c(t())}},T.d.css={update:function(n,e){var t=T.a.c(e());null!==t&&"object"==typeof t?T.a.D(t,function(e,t){t=T.a.c(t),T.a.fb(n,e,t)}):(t=T.a.cb(String(t||"")),T.a.fb(n,n.__ko__cssValue,!1),n.__ko__cssValue=t,T.a.fb(n,t,!0))}},T.d.enable={update:function(e,t){var n=T.a.c(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},T.d.disable={update:function(e,t){T.d.enable.update(e,function(){return!T.a.c(t())})}},T.d.event={init:function(e,o,s,a,l){var t=o()||{};T.a.D(t,function(r){"string"==typeof r&&T.a.q(e,r,function(e){var t,n=o()[r];if(n){try{var i=T.a.W(arguments);a=l.$data,i.unshift(a),t=n.apply(a,i)}finally{!0!==t&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===s.get(r+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},T.d.foreach={mc:function(n){return function(){var e=n(),t=T.a.Bb(e);return t&&"number"!=typeof t.length?(T.a.c(e),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:T.X.vb}):{foreach:e,templateEngine:T.X.vb}}},init:function(e,t){return T.d.template.init(e,T.d.foreach.mc(t))},update:function(e,t,n,i,r){return T.d.template.update(e,T.d.foreach.mc(t),n,i,r)}},T.h.va.foreach=!1,T.f.aa.foreach=!0,T.d.hasfocus={init:function(i,r,o){function e(e){i.__ko_hasfocusUpdating=!0;var t=i.ownerDocument;if("activeElement"in t){var n;try{n=t.activeElement}catch(e){n=t.body}e=n===i}t=r(),T.h.Ga(t,o,"hasfocus",e,!0),i.__ko_hasfocusLastValue=e,i.__ko_hasfocusUpdating=!1}var t=e.bind(null,!0),n=e.bind(null,!1);T.a.q(i,"focus",t),T.a.q(i,"focusin",t),T.a.q(i,"blur",n),T.a.q(i,"focusout",n)},update:function(e,t){var n=!!T.a.c(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),T.l.w(T.a.Fa,null,[e,n?"focusin":"focusout"]))}},T.h.ga.hasfocus=!0,T.d.hasFocus=T.d.hasfocus,T.h.ga.hasFocus=!0,T.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){T.a.Eb(e,t())}},t("if"),t("ifnot",!1,!0),t("with",!0,!1,function(e,t){return e.ac(t)});var R={};T.d.options={init:function(e){if("select"!==T.a.A(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(i,e,r){function t(){return T.a.Ma(i.options,function(e){return e.selected})}function o(e,t,n){var i=typeof t;return"function"==i?t(e):"string"==i?e[t]:n}function n(e,t){if(f&&c)T.j.ja(i,T.a.c(r.get("value")),!0);else if(h.length){var n=0<=T.a.o(h,T.j.u(t[0]));T.a.wc(t[0],n),f&&!n&&T.l.w(T.a.Fa,null,[i,"change"])}}var s=i.multiple,a=0!=i.length&&s?i.scrollTop:null,l=T.a.c(e()),c=r.get("valueAllowUnset")&&r.has("value"),u=r.get("optionsIncludeDestroyed");e={};var d,h=[];c||(s?h=T.a.ib(t(),T.j.u):0<=i.selectedIndex&&h.push(T.j.u(i.options[i.selectedIndex]))),l&&(void 0===l.length&&(l=[l]),d=T.a.Ma(l,function(e){return u||e===KJ||null===e||!T.a.c(e._destroy)}),r.has("optionsCaption")&&null!==(l=T.a.c(r.get("optionsCaption")))&&l!==KJ&&d.unshift(R));var f=!1;e.beforeRemove=function(e){i.removeChild(e)},l=n,r.has("optionsAfterRender")&&"function"==typeof r.get("optionsAfterRender")&&(l=function(e,t){n(0,t),T.l.w(r.get("optionsAfterRender"),null,[t[0],e!==R?e:KJ])}),T.a.Db(i,d,function(e,t,n){return n.length&&(h=!c&&n[0].selected?[T.j.u(n[0])]:[],f=!0),t=i.ownerDocument.createElement("option"),e===R?(T.a.bb(t,r.get("optionsCaption")),T.j.ja(t,KJ)):(n=o(e,r.get("optionsValue"),e),T.j.ja(t,T.a.c(n)),e=o(e,r.get("optionsText"),n),T.a.bb(t,e)),[t]},e,l),T.l.w(function(){c?T.j.ja(i,T.a.c(r.get("value")),!0):(s?h.length&&t().length<h.length:h.length&&0<=i.selectedIndex?T.j.u(i.options[i.selectedIndex])!==h[0]:h.length||0<=i.selectedIndex)&&T.a.Fa(i,"change")}),T.a.Sc(i),a&&20<Math.abs(a-i.scrollTop)&&(i.scrollTop=a)}},T.d.options.zb=T.a.e.J(),T.d.selectedOptions={after:["options","foreach"],init:function(n,i,r){T.a.q(n,"change",function(){var e=i(),t=[];T.a.r(n.getElementsByTagName("option"),function(e){e.selected&&t.push(T.j.u(e))}),T.h.Ga(e,r,"selectedOptions",t)})},update:function(e,t){if("select"!=T.a.A(e))throw Error("values binding applies only to SELECT elements");var n=T.a.c(t()),i=e.scrollTop;n&&"number"==typeof n.length&&T.a.r(e.getElementsByTagName("option"),function(e){var t=0<=T.a.o(n,T.j.u(e));e.selected!=t&&T.a.wc(e,t)}),e.scrollTop=i}},T.h.ga.selectedOptions=!0,T.d.style={update:function(n,e){var t=T.a.c(e()||{});T.a.D(t,function(e,t){null!==(t=T.a.c(t))&&t!==KJ&&!1!==t||(t=""),n.style[e]=t})}},T.d.submit={init:function(i,r,e,t,o){if("function"!=typeof r())throw Error("The value for a submit binding must be a function");T.a.q(i,"submit",function(e){var t,n=r();try{t=n.call(o.$data,i)}finally{!0!==t&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}})}},T.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){T.a.bb(e,t())}},T.f.aa.text=!0,function(){if(LJ&&LJ.navigator)var e=function(e){if(e)return parseFloat(e[1])},u=LJ.opera&&LJ.opera.version&&parseInt(LJ.opera.version()),t=LJ.navigator.userAgent,d=e(t.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),h=e(t.match(/Firefox\/([^ ]*)/));if(T.a.C<10)var i=T.a.e.J(),r=T.a.e.J(),o=function(e){var t=this.activeElement;(t=t&&T.a.e.get(t,r))&&t(e)},f=function(e,t){var n=e.ownerDocument;T.a.e.get(n,i)||(T.a.e.set(n,i,!0),T.a.q(n,"selectionchange",o)),T.a.e.set(e,r,t)};T.d.textInput={init:function(n,i,t){function e(e,t){T.a.q(n,e,t)}function r(){s||(a=n.value,s=T.a.setTimeout(o,4))}function o(){clearTimeout(s),a=s=KJ;var e=n.value;l!==e&&(l=e,T.h.Ga(i(),t,"textInput",e))}var s,a,l=n.value,c=9==T.a.C?r:o;T.a.C<10?(e("propertychange",function(e){"value"===e.propertyName&&c(e)}),8==T.a.C&&(e("keyup",o),e("keydown",o)),8<=T.a.C&&(f(n,c),e("dragend",r))):(e("input",o),d<5&&"textarea"===T.a.A(n)?(e("keydown",r),e("paste",r),e("cut",r)):u<11?e("keydown",r):h<4&&(e("DOMAutoComplete",o),e("dragdrop",o),e("drop",o))),e("change",o),T.m(function e(){var t=T.a.c(i());null!==t&&t!==KJ||(t=""),a!==KJ&&t===a?T.a.setTimeout(e,4):n.value!==t&&(l=t,n.value=t)},null,{i:n})}},T.h.ga.textInput=!0,T.d.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),T.d.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++T.d.uniqueName.Nc;T.a.vc(e,n)}}},T.d.uniqueName.Nc=0,T.d.value={after:["options","foreach"],init:function(i,r,o){if("input"!=i.tagName.toLowerCase()||"checkbox"!=i.type&&"radio"!=i.type){var e=["change"],t=o.get("valueUpdate"),n=!1,s=null;t&&("string"==typeof t&&(t=[t]),T.a.ta(e,t),e=T.a.Wb(e));var a=function(){s=null,n=!1;var e=r(),t=T.j.u(i);T.h.Ga(e,o,"value",t)};!T.a.C||"input"!=i.tagName.toLowerCase()||"text"!=i.type||"off"==i.autocomplete||i.form&&"off"==i.form.autocomplete||-1!=T.a.o(e,"propertychange")||(T.a.q(i,"propertychange",function(){n=!0}),T.a.q(i,"focus",function(){n=!1}),T.a.q(i,"blur",function(){n&&a()})),T.a.r(e,function(e){var t=a;T.a.sd(e,"after")&&(t=function(){s=T.j.u(i),T.a.setTimeout(a,0)},e=e.substring(5)),T.a.q(i,e,t)});var l=function(){var e=T.a.c(r()),t=T.j.u(i);if(null!==s&&e===s)T.a.setTimeout(l,0);else if(e!==t)if("select"===T.a.A(i)){var n=o.get("valueAllowUnset");(t=function(){T.j.ja(i,e,n)})(),n||e===T.j.u(i)?T.a.setTimeout(t,0):T.l.w(T.a.Fa,null,[i,"change"])}else T.j.ja(i,e)};T.m(l,null,{i:i})}else T.La(i,{checkedValue:r})},update:function(){}},T.h.ga.value=!0,T.d.visible={update:function(e,t){var n=T.a.c(t()),i="none"!=e.style.display;n&&!i?e.style.display="":!n&&i&&(e.style.display="none")}},T.d.click={init:function(e,t,n,i,r){return T.d.event.init.call(this,e,function(){var e={};return e.click=t(),e},n,i,r)}},T.P=function(){},T.P.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},T.P.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},T.P.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||MJ).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new T.v.n(n)}if(1==e.nodeType||8==e.nodeType)return new T.v.sa(e);throw Error("Unknown template type: "+e)},T.P.prototype.renderTemplate=function(e,t,n,i){return e=this.makeTemplateSource(e,i),this.renderTemplateSource(e,t,n,i)},T.P.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},T.P.prototype.rewriteTemplate=function(e,t,n){t=t((e=this.makeTemplateSource(e,n)).text()),e.text(t),e.data("isRewritten",!0)},T.b("templateEngine",T.P),T.Ib=function(){function s(e,t,n,i){e=T.h.Ab(e);for(var r=T.h.va,o=0;o<e.length;o++){var s=e[o].key;if(r.hasOwnProperty(s)){var a=r[s];if("function"==typeof a){if(s=a(e[o].value))throw Error(s)}else if(!a)throw Error("This template engine does not support the '"+s+"' binding within its templates")}}return n="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+T.h.Xa(e,{valueAccessors:!0})+" } })()},'"+n.toLowerCase()+"')",i.createJavaScriptEvaluatorBlock(n)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Tc:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,function(e){return T.Ib.jd(e,t)},n)},jd:function(e,o){return e.replace(t,function(e,t,n,i,r){return s(r,t,n,o)}).replace(n,function(e,t){return s(t,"\x3c!-- ko --\x3e","#comment",o)})},Jc:function(i,r){return T.N.yb(function(e,t){var n=e.nextSibling;n&&n.nodeName.toLowerCase()===r&&T.La(n,i,t)})}}}(),T.b("__tr_ambtns",T.Ib.Jc),function(){T.v={},T.v.n=function(e){if(this.n=e){var t=T.a.A(e);this.eb="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},T.v.n.prototype.text=function(){var e=1===this.eb?"text":2===this.eb?"value":"innerHTML";if(0==arguments.length)return this.n[e];var t=arguments[0];"innerHTML"===e?T.a.Eb(this.n,t):this.n[e]=t};var t=T.a.e.J()+"_";T.v.n.prototype.data=function(e){if(1===arguments.length)return T.a.e.get(this.n,t+e);T.a.e.set(this.n,t+e,arguments[1])};var n=T.a.e.J();T.v.n.prototype.nodes=function(){var e=this.n;if(0==arguments.length)return(T.a.e.get(e,n)||{}).mb||(3===this.eb?e.content:4===this.eb?e:KJ);T.a.e.set(e,n,{mb:arguments[0]})},T.v.sa=function(e){this.n=e},T.v.sa.prototype=new T.v.n,T.v.sa.prototype.text=function(){if(0==arguments.length){var e=T.a.e.get(this.n,n)||{};return e.Jb===KJ&&e.mb&&(e.Jb=e.mb.innerHTML),e.Jb}T.a.e.set(this.n,n,{Jb:arguments[0]})},T.b("templateSources",T.v),T.b("templateSources.domElement",T.v.n),T.b("templateSources.anonymousTemplate",T.v.sa)}(),function(){function i(e,t,n){var i;for(t=T.f.nextSibling(t);e&&(i=e)!==t;)n(i,e=T.f.nextSibling(i))}function c(e,t){if(e.length){var r=e[0],o=e[e.length-1],n=r.parentNode,s=T.S.instance,a=s.preprocessNode;if(a){if(i(r,o,function(e,t){var n=e.previousSibling,i=a.call(s,e);i&&(e===r&&(r=i[0]||t),e===o&&(o=i[i.length-1]||n))}),e.length=0,!r)return;r===o?e.push(r):(e.push(r,o),T.a.Ba(e,n))}i(r,o,function(e){1!==e.nodeType&&8!==e.nodeType||T.Ub(t,e)}),i(r,o,function(e){1!==e.nodeType&&8!==e.nodeType||T.N.Cc(e,[t])}),T.a.Ba(e,n)}}function l(e){return e.nodeType?e:0<e.length?e[0]:null}function u(e,t,n,i,r){r=r||{};var o=(e&&l(e)||n||{}).ownerDocument,s=r.templateEngine||h;if(T.Ib.Tc(n,s,o),"number"!=typeof(n=s.renderTemplate(n,i,r,o)).length||0<n.length&&"number"!=typeof n[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(o=!1,t){case"replaceChildren":T.f.fa(e,n),o=!0;break;case"replaceNode":T.a.uc(e,n),o=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return o&&(c(n,i),r.afterRender&&T.l.w(r.afterRender,null,[n,i.$data])),n}function d(e,t,n){return T.I(e)?e():"function"==typeof e?e(t,n):e}var h;T.Fb=function(e){if(e!=KJ&&!(e instanceof T.P))throw Error("templateEngine must inherit from ko.templateEngine");h=e},T.Cb=function(n,i,r,o,s){if(((r=r||{}).templateEngine||h)==KJ)throw Error("Set a template engine before calling renderTemplate");if(s=s||"replaceChildren",o){var a=l(o);return T.B(function(){var e=i&&i instanceof T.R?i:new T.R(i,null,null,null,{exportDependencies:!0}),t=d(n,e.$data,e);e=u(o,s,t,e,r),"replaceNode"==s&&(a=l(o=e))},null,{ya:function(){return!a||!T.a.qb(a)},i:a&&"replaceNode"==s?a.parentNode:a})}return T.N.yb(function(e){T.Cb(n,i,r,e,"replaceNode")})},T.pd=function(n,t,i,r,o){function s(e,t){c(t,l),i.afterRender&&i.afterRender(t,e),l=null}function a(e,t){return l=o.createChildContext(e,i.as,function(e){e.$index=t}),u(null,"ignoreTargetNode",d(n,e,l),l,i)}var l;return T.B(function(){var e=T.a.c(t)||[];void 0===e.length&&(e=[e]),e=T.a.Ma(e,function(e){return i.includeDestroyed||e===KJ||null===e||!T.a.c(e._destroy)}),T.l.w(T.a.Db,null,[r,e,a,i,s])},null,{i:r})};var s=T.a.e.J();T.d.template={init:function(e,t){var n=T.a.c(t());if("string"==typeof n||n.name)T.f.za(e);else{if("nodes"in n){if(n=n.nodes||[],T.I(n))throw Error('The "nodes" option must be a plain, non-observable array.')}else n=T.f.childNodes(e);n=T.a.nc(n),new T.v.sa(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(e,t,n,i,r){var o=t();n=!0,i=null,"string"==typeof(t=T.a.c(o))?t={}:(o=t.name,"if"in t&&(n=T.a.c(t.if)),n&&"ifnot"in t&&(n=!T.a.c(t.ifnot))),"foreach"in t?i=T.pd(o||e,n&&t.foreach||[],t,e,r):n?(r="data"in t?r.ac(t.data,t.as):r,i=T.Cb(o||e,r,t,e)):T.f.za(e),r=i,(t=T.a.e.get(e,s))&&"function"==typeof t.k&&t.k(),T.a.e.set(e,s,r&&r.ca()?r:KJ)}},T.h.va.template=function(e){return 1==(e=T.h.Ab(e)).length&&e[0].unknown||T.h.fd(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},T.f.aa.template=!0}(),T.b("setTemplateEngine",T.Fb),T.b("renderTemplate",T.Cb),T.a.hc=function(e,t,n){var i,r,o,s,a;if(e.length&&t.length)for(i=r=0;(!n||i<n)&&(s=e[r]);++r){for(o=0;a=t[o];++o)if(s.value===a.value){s.moved=a.index,a.moved=s.index,t.splice(o,1),i=o=0;break}i+=o}},T.a.lb=function(){function i(e,t,n,i,r){var o,s,a,l,c,u=Math.min,d=Math.max,h=[],f=e.length,p=t.length,m=p-f||1,g=f+p+1;for(o=0;o<=f;o++)for(l=a,h.push(a=[]),c=u(p,o+m),s=d(0,o-1);s<=c;s++)a[s]=s?o?e[o-1]===t[s-1]?l[s-1]:u(l[s]||g,a[s-1]||g)+1:s+1:o+1;for(u=[],d=[],m=[],o=f,s=p;o||s;)p=h[o][s]-1,s&&p===h[o][s-1]?d.push(u[u.length]={status:n,value:t[--s],index:s}):o&&p===h[o-1][s]?m.push(u[u.length]={status:i,value:e[--o],index:o}):(--s,--o,r.sparse||u.push({status:"retained",value:t[s]}));return T.a.hc(m,d,!r.dontLimitMoves&&10*f),u.reverse()}return function(e,t,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},t=t||[],(e=e||[]).length<t.length?i(e,t,"added","deleted",n):i(t,e,"deleted","added",n)}}(),T.b("utils.compareArrays",T.a.lb),function(){function w(t,n,i,r,o){var s=[],e=T.B(function(){var e=n(i,o,T.a.Ba(s,t))||[];0<s.length&&(T.a.uc(s,e),r&&T.l.w(r,null,[i,e,o])),s.length=0,T.a.ta(s,e)},null,{i:t,ya:function(){return!T.a.Tb(s)}});return{ea:s,B:e.ca()?e:KJ}}var C=T.a.e.J(),k=T.a.e.J();T.a.Db=function(n,e,t,i,r){function o(e,t){v=c[t],p!==t&&(_[e]=v),v.tb(p++),T.a.Ba(v.ea,n),h.push(v),g.push(v)}function s(t,n){if(t)for(var i=0,e=n.length;i<e;i++)n[i]&&T.a.r(n[i].ea,function(e){t(e,i,n[i].ka)})}e=e||[],i=i||{};var a,l=T.a.e.get(n,C)===KJ,c=T.a.e.get(n,C)||[],u=T.a.ib(c,function(e){return e.ka}),d=T.a.lb(u,e,i.dontLimitMoves),h=[],f=0,p=0,m=[],g=[];e=[];for(var v,y,b,_=[],x=(u=[],0);y=d[x];x++)switch(b=y.moved,y.status){case"deleted":b===KJ&&((v=c[f]).B&&(v.B.k(),v.B=KJ),T.a.Ba(v.ea,n).length&&(i.beforeRemove&&(h.push(v),g.push(v),v.ka===k?v=null:e[x]=v),v&&m.push.apply(m,v.ea))),f++;break;case"retained":o(x,f++);break;case"added":b!==KJ?o(x,b):(v={ka:y.value,tb:T.O(p++)},h.push(v),g.push(v),l||(u[x]=v))}for(T.a.e.set(n,C,h),s(i.beforeMove,_),T.a.r(m,i.beforeRemove?T.ba:T.removeNode),x=0,l=T.f.firstChild(n);v=g[x];x++){for(v.ea||T.a.extend(v,w(n,t,v.ka,r,v.tb)),f=0;d=v.ea[f];l=d.nextSibling,a=d,f++)d!==l&&T.f.kc(n,d,a);!v.ad&&r&&(r(v.ka,v.ea,v.tb),v.ad=!0)}for(s(i.beforeRemove,e),x=0;x<e.length;++x)e[x]&&(e[x].ka=k);s(i.afterMove,_),s(i.afterAdd,u)}}(),T.b("utils.setDomNodeChildrenFromArrayMapping",T.a.Db),T.X=function(){this.allowTemplateRewriting=!1},T.X.prototype=new T.P,T.X.prototype.renderTemplateSource=function(e,t,n,i){return(t=T.a.C<9||!e.nodes?null:e.nodes())?T.a.W(t.cloneNode(!0).childNodes):(e=e.text(),T.a.na(e,i))},T.X.vb=new T.X,T.Fb(T.X.vb),T.b("nativeTemplateEngine",T.X),function(){T.xb=function(){var o=this.ed=function(){if(!OJ||!OJ.tmpl)return 0;try{if(0<=OJ.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(e,t,n,i){if(i=i||MJ,n=n||{},o<2)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var r=e.data("precompiled");return r||(r=e.text()||"",r=OJ.template(null,"{{ko_with $item.koBindingContext}}"+r+"{{/ko_with}}"),e.data("precompiled",r)),e=[t.$data],t=OJ.extend({koBindingContext:t},n.templateOptions),(t=OJ.tmpl(r,e,t)).appendTo(i.createElement("div")),OJ.fragments={},t},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){MJ.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<o&&(OJ.tmpl.tag.ko_code={open:"__.push($1 || '');"},OJ.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},T.xb.prototype=new T.P;var e=new T.xb;0<e.ed&&T.Fb(e),T.b("jqueryTmplTemplateEngine",T.xb)}()},"function"==typeof define&&define.amd?define(["exports","require"],QJ):"object"==typeof exports&&"object"==typeof module?QJ(module.exports||exports):QJ(LJ.ko={})}(),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(N){var e,t,n,i;function r(e,t){var n,i,r,o=e.nodeName.toLowerCase();return"area"===o?(i=(n=e.parentNode).name,!(!e.href||!i||"map"!==n.nodeName.toLowerCase())&&(!!(r=N("img[usemap='#"+i+"']")[0])&&s(r))):(/^(input|select|textarea|button|object)$/.test(o)?!e.disabled:"a"===o&&e.href||t)&&s(e)}function s(e){return N.expr.filters.visible(e)&&!N(e).parents().addBack().filter(function(){return"hidden"===N.css(this,"visibility")}).length}N.ui=N.ui||{},N.extend(N.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),N.fn.extend({scrollParent:function(e){var t=this.css("position"),n="absolute"===t,i=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=N(this);return(!n||"static"!==e.css("position"))&&i.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&r.length?r:N(this[0].ownerDocument||document)},uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&N(this).removeAttr("id")})}}),N.extend(N.expr[":"],{data:N.expr.createPseudo?N.expr.createPseudo(function(t){return function(e){return!!N.data(e,t)}}):function(e,t,n){return!!N.data(e,n[3])},focusable:function(e){return r(e,!isNaN(N.attr(e,"tabindex")))},tabbable:function(e){var t=N.attr(e,"tabindex"),n=isNaN(t);return(n||0<=t)&&r(e,!n)}}),N("<a>").outerWidth(1).jquery||N.each(["Width","Height"],function(e,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:N.fn.innerWidth,innerHeight:N.fn.innerHeight,outerWidth:N.fn.outerWidth,outerHeight:N.fn.outerHeight};function s(e,t,n,i){return N.each(r,function(){t-=parseFloat(N.css(e,"padding"+this))||0,n&&(t-=parseFloat(N.css(e,"border"+this+"Width"))||0),i&&(t-=parseFloat(N.css(e,"margin"+this))||0)}),t}N.fn["inner"+n]=function(e){return void 0===e?o["inner"+n].call(this):this.each(function(){N(this).css(i,s(this,e)+"px")})},N.fn["outer"+n]=function(e,t){return"number"!=typeof e?o["outer"+n].call(this,e):this.each(function(){N(this).css(i,s(this,e,!0,t)+"px")})}}),N.fn.addBack||(N.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),N("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(N.fn.removeData=(t=N.fn.removeData,function(e){return arguments.length?t.call(this,N.camelCase(e)):t.call(this)})),N.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),N.fn.extend({focus:(i=N.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){N(e).focus(),n&&n.call(e)},t)}):i.apply(this,arguments)}),disableSelection:(n="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(n+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var t,n,i=N(this[0]);i.length&&i[0]!==document;){if(("absolute"===(t=i.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(i.css("zIndex"),10),!isNaN(n)&&0!==n))return n;i=i.parent()}return 0}}),N.ui.plugin={add:function(e,t,n){var i,r=N.ui[e].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([t,n[i]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}};var o,a=0,l=Array.prototype.slice;N.cleanData=(o=N.cleanData,function(e){var t,n,i;for(i=0;null!=(n=e[i]);i++)try{(t=N._data(n,"events"))&&t.remove&&N(n).triggerHandler("remove")}catch(e){}o(e)}),N.widget=function(e,n,t){var i,r,o,s,a={},l=e.split(".")[0];return e=e.split(".")[1],i=l+"-"+e,t||(t=n,n=N.Widget),N.expr[":"][i.toLowerCase()]=function(e){return!!N.data(e,i)},N[l]=N[l]||{},r=N[l][e],o=N[l][e]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},N.extend(o,r,{version:t.version,_proto:N.extend({},t),_childConstructors:[]}),(s=new n).options=N.widget.extend({},s.options),N.each(t,function(t,i){var r,o;N.isFunction(i)?a[t]=(r=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=r,this._superApply=o,e=i.apply(this,arguments),this._super=t,this._superApply=n,e}):a[t]=i}),o.prototype=N.widget.extend(s,{widgetEventPrefix:r&&s.widgetEventPrefix||e},a,{constructor:o,namespace:l,widgetName:e,widgetFullName:i}),r?(N.each(r._childConstructors,function(e,t){var n=t.prototype;N.widget(n.namespace+"."+n.widgetName,o,t._proto)}),delete r._childConstructors):n._childConstructors.push(o),N.widget.bridge(e,o),o},N.widget.extend=function(e){for(var t,n,i=l.call(arguments,1),r=0,o=i.length;r<o;r++)for(t in i[r])n=i[r][t],i[r].hasOwnProperty(t)&&void 0!==n&&(N.isPlainObject(n)?e[t]=N.isPlainObject(e[t])?N.widget.extend({},e[t],n):N.widget.extend({},n):e[t]=n);return e},N.widget.bridge=function(o,t){var s=t.prototype.widgetFullName||o;N.fn[o]=function(n){var e="string"==typeof n,i=l.call(arguments,1),r=this;return e?this.each(function(){var e,t=N.data(this,s);return"instance"===n?(r=t,!1):t?N.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,i))!==t&&void 0!==e?(r=e&&e.jquery?r.pushStack(e.get()):e,!1):void 0:N.error("no such method '"+n+"' for "+o+" widget instance"):N.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):(i.length&&(n=N.widget.extend.apply(null,[n].concat(i))),this.each(function(){var e=N.data(this,s);e?(e.option(n||{}),e._init&&e._init()):N.data(this,s,new t(n,this))})),r}},N.Widget=function(){},N.Widget._childConstructors=[],N.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,t){t=N(t||this.defaultElement||this)[0],this.element=N(t),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=N(),this.hoverable=N(),this.focusable=N(),t!==this&&(N.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=N(t.style?t.ownerDocument:t.document||t),this.window=N(this.document[0].defaultView||this.document[0].parentWindow)),this.options=N.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:N.noop,_getCreateEventData:N.noop,_create:N.noop,_init:N.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(N.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:N.noop,widget:function(){return this.element},option:function(e,t){var n,i,r,o=e;if(0===arguments.length)return N.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(i=o[e]=N.widget.extend({},this.options[e]),r=0;r<n.length-1;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(e=n.pop(),1===arguments.length)return void 0===i[e]?null:i[e];i[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];o[e]=t}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(s,a,e){var l,c=this;"boolean"!=typeof s&&(e=a,a=s,s=!1),e?(a=l=N(a),this.bindings=this.bindings.add(a)):(e=a,a=this.element,l=this.widget()),N.each(e,function(e,t){function n(){if(s||!0!==c.options.disabled&&!N(this).hasClass("ui-state-disabled"))return("string"==typeof t?c[t]:t).apply(c,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||N.guid++);var i=e.match(/^([\w:-]*)\s*(.*)$/),r=i[1]+c.eventNamespace,o=i[2];o?l.delegate(o,r,n):a.bind(r,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t),this.bindings=N(this.bindings.not(e).get()),this.focusable=N(this.focusable.not(e).get()),this.hoverable=N(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){N(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){N(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){N(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){N(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,t,n){var i,r,o=this.options[e];if(n=n||{},(t=N.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],r=t.originalEvent)for(i in r)i in t||(t[i]=r[i]);return this.element.trigger(t,n),!(N.isFunction(o)&&!1===o.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},N.each({show:"fadeIn",hide:"fadeOut"},function(o,s){N.Widget.prototype["_"+o]=function(t,e,n){"string"==typeof e&&(e={effect:e});var i,r=e?!0===e||"number"==typeof e?s:e.effect||s:o;"number"==typeof(e=e||{})&&(e={duration:e}),i=!N.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),i&&N.effects&&N.effects.effect[r]?t[o](e):r!==o&&t[r]?t[r](e.duration,e.easing,n):t.queue(function(e){N(this)[o](),n&&n.call(t[0]),e()})}});N.widget;var c=!1;N(document).mouseup(function(){c=!1});N.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(!0===N.data(e.target,t.widgetName+".preventClickEvent"))return N.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,n=1===e.which,i=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&N(e.target).closest(this.options.cancel).length;return!(n&&!i&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===N.data(e.target,this.widgetName+".preventClickEvent")&&N.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0))}},_mouseMove:function(e){if(this._mouseMoved){if(N.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&N.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),c=!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){N.ui=N.ui||{};var r,w,C=Math.max,k=Math.abs,T=Math.round,i=/left|center|right/,o=/top|center|bottom/,s=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,l=/%$/,c=N.fn.position;function S(e,t,n){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?n/100:1)]}function E(e,t){return parseInt(N.css(e,t),10)||0}N.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,t,n=N("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=n.children()[0];return N("body").append(n),e=i.offsetWidth,n.css("overflow","scroll"),e===(t=i.offsetWidth)&&(t=n[0].clientWidth),n.remove(),r=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),i="scroll"===t||"auto"===t&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?N.position.scrollbarWidth():0,height:i?N.position.scrollbarWidth():0}},getWithinInfo:function(e){var t=N(e||window),n=N.isWindow(t[0]),i=!!t[0]&&9===t[0].nodeType;return{element:t,isWindow:n,isDocument:i,offset:t.offset()||{left:0,top:0},scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),width:n||i?t.width():t.outerWidth(),height:n||i?t.height():t.outerHeight()}}},N.fn.position=function(d){if(!d||!d.of)return c.apply(this,arguments);d=N.extend({},d);var h,f,p,m,g,e,t,n,v=N(d.of),y=N.position.getWithinInfo(d.within),b=N.position.getScrollInfo(y),_=(d.collision||"flip").split(" "),x={};return e=9===(n=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(d.at="left top"),f=e.width,p=e.height,m=e.offset,g=N.extend({},m),N.each(["my","at"],function(){var e,t,n=(d[this]||"").split(" ");1===n.length&&(n=i.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]),n[0]=i.test(n[0])?n[0]:"center",n[1]=o.test(n[1])?n[1]:"center",e=s.exec(n[0]),t=s.exec(n[1]),x[this]=[e?e[0]:0,t?t[0]:0],d[this]=[a.exec(n[0])[0],a.exec(n[1])[0]]}),1===_.length&&(_[1]=_[0]),"right"===d.at[0]?g.left+=f:"center"===d.at[0]&&(g.left+=f/2),"bottom"===d.at[1]?g.top+=p:"center"===d.at[1]&&(g.top+=p/2),h=S(x.at,f,p),g.left+=h[0],g.top+=h[1],this.each(function(){var n,e,s=N(this),a=s.outerWidth(),l=s.outerHeight(),t=E(this,"marginLeft"),i=E(this,"marginTop"),r=a+t+E(this,"marginRight")+b.width,o=l+i+E(this,"marginBottom")+b.height,c=N.extend({},g),u=S(x.my,s.outerWidth(),s.outerHeight());"right"===d.my[0]?c.left-=a:"center"===d.my[0]&&(c.left-=a/2),"bottom"===d.my[1]?c.top-=l:"center"===d.my[1]&&(c.top-=l/2),c.left+=u[0],c.top+=u[1],w||(c.left=T(c.left),c.top=T(c.top)),n={marginLeft:t,marginTop:i},N.each(["left","top"],function(e,t){N.ui.position[_[e]]&&N.ui.position[_[e]][t](c,{targetWidth:f,targetHeight:p,elemWidth:a,elemHeight:l,collisionPosition:n,collisionWidth:r,collisionHeight:o,offset:[h[0]+u[0],h[1]+u[1]],my:d.my,at:d.at,within:y,elem:s})}),d.using&&(e=function(e){var t=m.left-c.left,n=t+f-a,i=m.top-c.top,r=i+p-l,o={target:{element:v,left:m.left,top:m.top,width:f,height:p},element:{element:s,left:c.left,top:c.top,width:a,height:l},horizontal:n<0?"left":0<t?"right":"center",vertical:r<0?"top":0<i?"bottom":"middle"};f<a&&k(t+n)<f&&(o.horizontal="center"),p<l&&k(i+r)<p&&(o.vertical="middle"),C(k(t),k(n))>C(k(i),k(r))?o.important="horizontal":o.important="vertical",d.using.call(this,e,o)}),s.offset(N.extend(c,{using:e}))})},N.ui.position={fit:{left:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=e.left-t.collisionPosition.marginLeft,a=r-s,l=s+t.collisionWidth-o-r;t.collisionWidth>o?0<a&&l<=0?(n=e.left+a+t.collisionWidth-o-r,e.left+=a-n):e.left=0<l&&a<=0?r:l<a?r+o-t.collisionWidth:r:0<a?e.left+=a:0<l?e.left-=l:e.left=C(e.left-s,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,s=e.top-t.collisionPosition.marginTop,a=r-s,l=s+t.collisionHeight-o-r;t.collisionHeight>o?0<a&&l<=0?(n=e.top+a+t.collisionHeight-o-r,e.top+=a-n):e.top=0<l&&a<=0?r:l<a?r+o-t.collisionHeight:r:0<a?e.top+=a:0<l?e.top-=l:e.top=C(e.top-s,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,s=r.width,a=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-t.collisionPosition.marginLeft,c=l-a,u=l+t.collisionWidth-s-a,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?((n=e.left+d+h+f+t.collisionWidth-s-o)<0||n<k(c))&&(e.left+=d+h+f):0<u&&(0<(i=e.left-t.collisionPosition.marginLeft+d+h+f-a)||k(i)<u)&&(e.left+=d+h+f)},top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,s=r.height,a=r.isWindow?r.scrollTop:r.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-a,u=l+t.collisionHeight-s-a,d="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,f=-2*t.offset[1];c<0?((i=e.top+d+h+f+t.collisionHeight-s-o)<0||i<k(c))&&(e.top+=d+h+f):0<u&&(0<(n=e.top-t.collisionPosition.marginTop+d+h+f-a)||k(n)<u)&&(e.top+=d+h+f)}},flipfit:{left:function(){N.ui.position.flip.left.apply(this,arguments),N.ui.position.fit.left.apply(this,arguments)},top:function(){N.ui.position.flip.top.apply(this,arguments),N.ui.position.fit.top.apply(this,arguments)}}},function(){var e,t,n,i,r,o=document.getElementsByTagName("body")[0],s=document.createElement("div");for(r in e=document.createElement(o?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&N.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"}),n)e.style[r]=n[r];e.appendChild(s),(t=o||document.documentElement).insertBefore(e,t.firstChild),s.style.cssText="position: absolute; left: 10.7432222px;",i=N(s).offset().left,w=10<i&&i<11,e.innerHTML="",t.removeChild(e)}()}();N.ui.position,N.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=N(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():N()}},_createIcons:function(){var e=this.options.icons;e&&(N("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))):this._activate(t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=N.ui.keyCode,n=this.headers.length,i=this.headers.index(e.target),r=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:r=this.headers[(i+1)%n];break;case t.LEFT:case t.UP:r=this.headers[(i-1+n)%n];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:r=this.headers[0];break;case t.END:r=this.headers[n-1]}r&&(N(e.target).attr("tabIndex",-1),N(r).attr("tabIndex",0),r.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===N.ui.keyCode.UP&&e.ctrlKey&&N(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=N()):!1===e.active?this._activate(0):this.active.length&&!N.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=N()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var n,e=this.options,t=e.heightStyle,i=this.element.parent();this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=N(this),t=e.uniqueId().attr("id"),n=e.next(),i=n.uniqueId().attr("id");e.attr("aria-controls",i),n.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(n=i.height(),this.element.siblings(":visible").each(function(){var e=N(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.headers.each(function(){n-=N(this).outerHeight(!0)}),this.headers.next().each(function(){N(this).height(Math.max(0,n-N(this).innerHeight()+N(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.headers.next().each(function(){n=Math.max(n,N(this).css("height","").height())}).height(n))},_activate:function(e){var t=this._findActive(e)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:N.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):N()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&N.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,n=this.active,i=N(e.currentTarget),r=i[0]===n[0],o=r&&t.collapsible,s=o?N():i.next(),a=n.next(),l={oldHeader:n,oldPanel:a,newHeader:o?N():i,newPanel:s};e.preventDefault(),r&&!t.collapsible||!1===this._trigger("beforeActivate",e,l)||(t.active=!o&&this.headers.index(i),this.active=r?N():i,this._toggle(l),n.removeClass("ui-accordion-header-active ui-state-active"),t.icons&&n.children(".ui-accordion-header-icon").removeClass(t.icons.activeHeader).addClass(t.icons.header),r||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),t.icons&&i.children(".ui-accordion-header-icon").removeClass(t.icons.header).addClass(t.icons.activeHeader),i.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=n,this.options.animate?this._animate(t,n,e):(n.hide(),t.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(N(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,n,t){var i,r,o,s=this,a=0,l=e.css("box-sizing"),c=e.length&&(!n.length||e.index()<n.index()),u=this.options.animate||{},d=c&&u.down||u,h=function(){s._toggleComplete(t)};return"number"==typeof d&&(o=d),"string"==typeof d&&(r=d),r=r||d.easing||u.easing,o=o||d.duration||u.duration,n.length?e.length?(i=e.show().outerHeight(),n.animate(this.hideProps,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:o,easing:r,complete:h,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===l&&(a+=t.now):"content"!==s.options.heightStyle&&(t.now=Math.round(i-n.outerHeight()-a),a=0)}})):n.animate(this.hideProps,o,r,h):e.animate(this.showProps,o,r,h)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),N.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=N(e.target);!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&N(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=N(e.currentTarget);t.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,t)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(e){this._delay(function(){N.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=N(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var t,n,i,r,o=!0;switch(e.keyCode){case N.ui.keyCode.PAGE_UP:this.previousPage(e);break;case N.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case N.ui.keyCode.HOME:this._move("first","first",e);break;case N.ui.keyCode.END:this._move("last","last",e);break;case N.ui.keyCode.UP:this.previous(e);break;case N.ui.keyCode.DOWN:this.next(e);break;case N.ui.keyCode.LEFT:this.collapse(e);break;case N.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case N.ui.keyCode.ENTER:case N.ui.keyCode.SPACE:this._activate(e);break;case N.ui.keyCode.ESCAPE:this.collapse(e);break;default:o=!1,n=this.previousFilter||"",i=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),i===n?r=!0:i=n+i,t=this._filterMenuItems(i),(t=r&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&e.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var e,t=this,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=N(this),t=e.parent(),n=N("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);t.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",t.attr("id"))}),(e=n.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=N(this);t._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),e.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!N.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var n,i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,n,i,r,o,s;this._hasScroll()&&(t=parseFloat(N.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(N.css(this.activeMenu[0],"paddingTop"))||0,i=e.offset().top-this.activeMenu.offset().top-t-n,r=this.activeMenu.scrollTop(),o=this.activeMenu.height(),s=e.outerHeight(),i<0?this.activeMenu.scrollTop(r+i):o<i+s&&this.activeMenu.scrollTop(r+i-o+s))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=N.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var e=n?this.element:N(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this.activeMenu=e},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!N(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(e){var t,n,i;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=N(this)).offset().top-n-i<0}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,n,i;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=N(this)).offset().top-n+i}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||N(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var t=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(N.trim(N(this).text()))})}});N.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,i,r,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,o="input"===e;this.isMultiLine=!!t||!o&&this.element.prop("isContentEditable"),this.valueMethod=this.element[t||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))i=r=n=!0;else{i=r=n=!1;var t=N.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:n=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:n=!0,this._move("nextPage",e);break;case t.UP:n=!0,this._keyEvent("previous",e);break;case t.DOWN:n=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(n=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:i=!0,this._searchTimeout(e)}}},keypress:function(e){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!i){var t=N.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(r)return r=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=N("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];N(e.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(e){e.target===t.element[0]||e.target===n||N.contains(n,e.target)||t.close()})})},menufocus:function(e,t){var n,i;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){N(e.target).trigger(e.originalEvent)});i=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:i})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(i.value),(n=t.item.attr("aria-label")||i.value)&&N.trim(n).length&&(this.liveRegion.children().hide(),N("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=N("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?N(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var n,i,r=this;N.isArray(this.options.source)?(n=this.options.source,this.source=function(e,t){t(N.ui.autocomplete.filter(n,e.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,t){r.xhr&&r.xhr.abort(),r.xhr=N.ajax({url:i,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(i){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),n=i.altKey||i.ctrlKey||i.metaKey||i.shiftKey;e&&(!e||t||n)||(this.selectedItem=null,this.search(null,i))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return N.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:N.map(e,function(e){return"string"==typeof e?{label:e,value:e}:N.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(N.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,e){var i=this;N.each(e,function(e,t){i._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return N("<li>").text(t.label).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),N.extend(N.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var n=new RegExp(N.ui.autocomplete.escapeRegex(t),"i");return N.grep(e,function(e){return n.test(e.label||e.value||e)})}}),N.widget("ui.autocomplete",N.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),N("<div>").text(t).appendTo(this.liveRegion))}});N.ui.autocomplete;var u,d="ui-button ui-widget ui-state-default ui-corner-all",h="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var e=N(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},p=function(e){var t=e.name,n=e.form,i=N([]);return t&&(t=t.replace(/'/g,"\\'"),i=n?N(n).find("[name='"+t+"'][type=radio]"):N("[name='"+t+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),i};N.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,n=this.options,e="checkbox"===this.type||"radio"===this.type,i=e?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(d).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===u&&N(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||N(this).removeClass(i)}).bind("click"+this.eventNamespace,function(e){n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),e&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;N(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var e=t.element[0];p(e).not(e).map(function(){return N(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(n.disabled)return!1;N(this).addClass("ui-state-active"),u=this,t.document.one("mouseup",function(){u=null})}).bind("mouseup"+this.eventNamespace,function(){if(n.disabled)return!1;N(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){if(n.disabled)return!1;e.keyCode!==N.ui.keyCode.SPACE&&e.keyCode!==N.ui.keyCode.ENTER||N(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){N(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===N.ui.keyCode.SPACE&&N(this).click()})),this._setOption("disabled",n.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),(n=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(d+" ui-state-active "+h).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){if(this._super(e,t),"disabled"===e)return this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),void(t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")));this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?p(this.element[0]).each(function(){N(this).is(":checked")?N(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):N(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"!==this.type){var e=this.buttonElement.removeClass(h),t=N("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,i=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(i?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",N.trim(t)))):r.push("ui-button-text-only"),e.addClass(r.join(" "))}else this.options.label&&this.element.val(this.options.label)}}),N.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var e="rtl"===this.element.css("direction"),t=this.element.find(this.options.items),n=t.filter(":ui-button");t.not(":ui-button").button(),n.button("refresh"),this.buttons=t.map(function(){return N(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return N(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});var m;N.ui.button;function g(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},N.extend(this._defaults,this.regional[""]),this.regional.en=N.extend(!0,{},this.regional[""]),this.regional["en-US"]=N.extend(!0,{},this.regional.en),this.dpDiv=v(N("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function v(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){N(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&N(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&N(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",y)}function y(){N.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(N(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),N(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&N(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&N(this).addClass("ui-datepicker-next-hover"))}function b(e,t){for(var n in N.extend(e,t),t)null==t[n]&&(e[n]=t[n]);return e}N.extend(N.ui,{datepicker:{version:"1.11.4"}}),N.extend(g.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return b(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var n,i,r;i="div"===(n=e.nodeName.toLowerCase())||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(r=this._newInst(N(e),i)).settings=N.extend({},t||{}),"input"===n?this._connectDatepicker(e,r):i&&this._inlineDatepicker(e,r)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?v(N("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var n=N(e);t.append=N([]),t.trigger=N([]),n.hasClass(this.markerClassName)||(this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),N.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var n,i,r,o=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),o&&(t.append=N("<span class='"+this._appendClass+"'>"+o+"</span>"),e[s?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(n=this._get(t,"showOn"))&&"both"!==n||e.focus(this._showDatepicker),"button"!==n&&"both"!==n||(i=this._get(t,"buttonText"),r=this._get(t,"buttonImage"),t.trigger=N(this._get(t,"buttonImageOnly")?N("<img/>").addClass(this._triggerClass).attr({src:r,alt:i,title:i}):N("<button type='button'></button>").addClass(this._triggerClass).html(r?N("<img/>").attr({src:r,alt:i,title:i}):i)),e[s?"before":"after"](t.trigger),t.trigger.click(function(){return N.datepicker._datepickerShowing&&N.datepicker._lastInput===e[0]?N.datepicker._hideDatepicker():(N.datepicker._datepickerShowing&&N.datepicker._lastInput!==e[0]&&N.datepicker._hideDatepicker(),N.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,i,r,o=new Date(2009,11,20),s=this._get(e,"dateFormat");s.match(/[DM]/)&&(t=function(e){for(r=i=n=0;r<e.length;r++)e[r].length>n&&(n=e[r].length,i=r);return i},o.setMonth(t(this._get(e,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(e,t){var n=N(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(t.dpDiv),N.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,n,i,r){var o,s,a,l,c,u=this._dialogInst;return u||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=N("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),N("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},N.data(this._dialogInput[0],"datepicker",u)),b(u.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(u,t):t,this._dialogInput.val(t),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(s=document.documentElement.clientWidth,a=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+l,a/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),N.blockUI&&N.blockUI(this.dpDiv),N.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(e){var t,n=N(e),i=N.data(e,"datepicker");n.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),N.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||n.removeClass(this.markerClassName).empty(),m===i&&(m=null))},_enableDatepicker:function(t){var e,n,i=N(t),r=N.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((n=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=N.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,n,i=N(t),r=N.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((n=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=N.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return N.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var i,r,o,s,a=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?N.extend({},N.datepicker._defaults):a?"all"===t?N.extend({},a.settings):this._get(a,t):null;i=t||{},"string"==typeof t&&((i={})[t]=n),a&&(this._curInst===a&&this._hideDatepicker(),r=this._getDateDatepicker(e,!0),o=this._getMinMaxDate(a,"min"),s=this._getMinMaxDate(a,"max"),b(a.settings,i),null!==o&&void 0!==i.dateFormat&&void 0===i.minDate&&(a.settings.minDate=this._formatDate(a,o)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(a.settings.maxDate=this._formatDate(a,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(N(e),a),this._autoSize(a),this._setDate(a,r),this._updateAlternate(a),this._updateDatepicker(a))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t,n,i,r=N.datepicker._getInst(e.target),o=!0,s=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,N.datepicker._datepickerShowing)switch(e.keyCode){case 9:N.datepicker._hideDatepicker(),o=!1;break;case 13:return(i=N("td."+N.datepicker._dayOverClass+":not(."+N.datepicker._currentClass+")",r.dpDiv))[0]&&N.datepicker._selectDay(e.target,r.selectedMonth,r.selectedYear,i[0]),(t=N.datepicker._get(r,"onSelect"))?(n=N.datepicker._formatDate(r),t.apply(r.input?r.input[0]:null,[n,r])):N.datepicker._hideDatepicker(),!1;case 27:N.datepicker._hideDatepicker();break;case 33:N.datepicker._adjustDate(e.target,e.ctrlKey?-N.datepicker._get(r,"stepBigMonths"):-N.datepicker._get(r,"stepMonths"),"M");break;case 34:N.datepicker._adjustDate(e.target,e.ctrlKey?+N.datepicker._get(r,"stepBigMonths"):+N.datepicker._get(r,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&N.datepicker._clearDate(e.target),o=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&N.datepicker._gotoToday(e.target),o=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&N.datepicker._adjustDate(e.target,s?1:-1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&N.datepicker._adjustDate(e.target,e.ctrlKey?-N.datepicker._get(r,"stepBigMonths"):-N.datepicker._get(r,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&N.datepicker._adjustDate(e.target,-7,"D"),o=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&N.datepicker._adjustDate(e.target,s?-1:1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&N.datepicker._adjustDate(e.target,e.ctrlKey?+N.datepicker._get(r,"stepBigMonths"):+N.datepicker._get(r,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&N.datepicker._adjustDate(e.target,7,"D"),o=e.ctrlKey||e.metaKey;break;default:o=!1}else 36===e.keyCode&&e.ctrlKey?N.datepicker._showDatepicker(this):o=!1;o&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,n,i=N.datepicker._getInst(e.target);if(N.datepicker._get(i,"constrainInput"))return t=N.datepicker._possibleChars(N.datepicker._get(i,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!t||-1<t.indexOf(n)},_doKeyUp:function(e){var t=N.datepicker._getInst(e.target);if(t.input.val()!==t.lastVal)try{N.datepicker.parseDate(N.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,N.datepicker._getFormatConfig(t))&&(N.datepicker._setDateFromField(t),N.datepicker._updateAlternate(t),N.datepicker._updateDatepicker(t))}catch(e){}return!0},_showDatepicker:function(e){var t,n,i,r,o,s,a;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=N("input",e.parentNode)[0]),N.datepicker._isDisabledDatepicker(e)||N.datepicker._lastInput===e)||(t=N.datepicker._getInst(e),N.datepicker._curInst&&N.datepicker._curInst!==t&&(N.datepicker._curInst.dpDiv.stop(!0,!0),t&&N.datepicker._datepickerShowing&&N.datepicker._hideDatepicker(N.datepicker._curInst.input[0])),!1!==(i=(n=N.datepicker._get(t,"beforeShow"))?n.apply(e,[e,t]):{})&&(b(t.settings,i),t.lastVal=null,N.datepicker._lastInput=e,N.datepicker._setDateFromField(t),N.datepicker._inDialog&&(e.value=""),N.datepicker._pos||(N.datepicker._pos=N.datepicker._findPos(e),N.datepicker._pos[1]+=e.offsetHeight),r=!1,N(e).parents().each(function(){return!(r|="fixed"===N(this).css("position"))}),o={left:N.datepicker._pos[0],top:N.datepicker._pos[1]},N.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),N.datepicker._updateDatepicker(t),o=N.datepicker._checkOffset(t,o,r),t.dpDiv.css({position:N.datepicker._inDialog&&N.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),t.inline||(s=N.datepicker._get(t,"showAnim"),a=N.datepicker._get(t,"duration"),t.dpDiv.css("z-index",function(e){for(var t,n;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}(N(e))+1),N.datepicker._datepickerShowing=!0,N.effects&&N.effects.effect[s]?t.dpDiv.show(s,N.datepicker._get(t,"showOptions"),a):t.dpDiv[s||"show"](s?a:null),N.datepicker._shouldFocusInput(t)&&t.input.focus(),N.datepicker._curInst=t)))},_updateDatepicker:function(e){this.maxRows=4,(m=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,n=this._getNumberOfMonths(e),i=n[1],r=e.dpDiv.find("."+this._dayOverClass+" a");0<r.length&&y.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===N.datepicker._curInst&&N.datepicker._datepickerShowing&&N.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,n){var i=e.dpDiv.outerWidth(),r=e.dpDiv.outerHeight(),o=e.input?e.input.outerWidth():0,s=e.input?e.input.outerHeight():0,a=document.documentElement.clientWidth+(n?0:N(document).scrollLeft()),l=document.documentElement.clientHeight+(n?0:N(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-o:0,t.left-=n&&t.left===e.input.offset().left?N(document).scrollLeft():0,t.top-=n&&t.top===e.input.offset().top+s?N(document).scrollTop():0,t.left-=Math.min(t.left,t.left+i>a&&i<a?Math.abs(t.left+i-a):0),t.top-=Math.min(t.top,t.top+r>l&&r<l?Math.abs(r+s):0),t},_findPos:function(e){for(var t,n=this._getInst(e),i=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||N.expr.filters.hidden(e));)e=e[i?"previousSibling":"nextSibling"];return[(t=N(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,n,i,r,o=this._curInst;!o||e&&o!==N.data(e,"datepicker")||this._datepickerShowing&&(t=this._get(o,"showAnim"),n=this._get(o,"duration"),i=function(){N.datepicker._tidyDialog(o)},N.effects&&(N.effects.effect[t]||N.effects[t])?o.dpDiv.hide(t,N.datepicker._get(o,"showOptions"),n,i):o.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?n:null,i),t||i(),this._datepickerShowing=!1,(r=this._get(o,"onClose"))&&r.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),N.blockUI&&(N.unblockUI(),N("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(N.datepicker._curInst){var t=N(e.target),n=N.datepicker._getInst(t[0]);(t[0].id===N.datepicker._mainDivId||0!==t.parents("#"+N.datepicker._mainDivId).length||t.hasClass(N.datepicker.markerClassName)||t.closest("."+N.datepicker._triggerClass).length||!N.datepicker._datepickerShowing||N.datepicker._inDialog&&N.blockUI)&&(!t.hasClass(N.datepicker.markerClassName)||N.datepicker._curInst===n)||N.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var i=N(e),r=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(r,t+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(e){var t,n=N(e),i=this._getInst(n[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(n)},_selectMonthYear:function(e,t,n){var i=N(e),r=this._getInst(i[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(i)},_selectDay:function(e,t,n,i){var r,o=N(e);N(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||((r=this._getInst(o[0])).selectedDay=r.currentDay=N("a",i).html(),r.selectedMonth=r.currentMonth=t,r.selectedYear=r.currentYear=n,this._selectDate(e,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(e){var t=N(e);this._selectDate(t,"")},_selectDate:function(e,t){var n,i=N(e),r=this._getInst(i[0]);t=null!=t?t:this._formatDate(r),r.input&&r.input.val(t),this._updateAlternate(r),(n=this._get(r,"onSelect"))?n.apply(r.input?r.input[0]:null,[t,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t,n,i,r=this._get(e,"altField");r&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),i=this.formatDate(t,n,this._getFormatConfig(e)),N(r).each(function(){N(this).val(i)}))},noWeekends:function(e){var t=e.getDay();return[0<t&&t<6,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(n,o,e){if(null==n||null==o)throw"Invalid arguments";if(""===(o="object"==typeof o?o.toString():o+""))return null;var i,t,r,s,a=0,l=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,d=(e?e.dayNames:null)||this._defaults.dayNames,h=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,f=(e?e.monthNames:null)||this._defaults.monthNames,p=-1,m=-1,g=-1,v=-1,y=!1,b=function(e){var t=i+1<n.length&&n.charAt(i+1)===e;return t&&i++,t},_=function(e){var t=b(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,i=new RegExp("^\\d{"+("y"===e?n:1)+","+n+"}"),r=o.substring(a).match(i);if(!r)throw"Missing number at position "+a;return a+=r[0].length,parseInt(r[0],10)},x=function(e,t,n){var i=-1,r=N.map(b(e)?n:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(N.each(r,function(e,t){var n=t[1];if(o.substr(a,n.length).toLowerCase()===n.toLowerCase())return i=t[0],a+=n.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+a},w=function(){if(o.charAt(a)!==n.charAt(i))throw"Unexpected literal at position "+a;a++};for(i=0;i<n.length;i++)if(y)"'"!==n.charAt(i)||b("'")?w():y=!1;else switch(n.charAt(i)){case"d":g=_("d");break;case"D":x("D",u,d);break;case"o":v=_("o");break;case"m":m=_("m");break;case"M":m=x("M",h,f);break;case"y":p=_("y");break;case"@":p=(s=new Date(_("@"))).getFullYear(),m=s.getMonth()+1,g=s.getDate();break;case"!":p=(s=new Date((_("!")-this._ticksTo1970)/1e4)).getFullYear(),m=s.getMonth()+1,g=s.getDate();break;case"'":b("'")?w():y=!0;break;default:w()}if(a<o.length&&(r=o.substr(a),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=c?0:-100)),-1<v)for(m=1,g=v;;){if(g<=(t=this._getDaysInMonth(p,m-1)))break;m++,g-=t}if((s=this._daylightSavingAdjust(new Date(p,m-1,g))).getFullYear()!==p||s.getMonth()+1!==m||s.getDate()!==g)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(n,e,t){if(!e)return"";var i,r=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,o=(t?t.dayNames:null)||this._defaults.dayNames,s=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,a=(t?t.monthNames:null)||this._defaults.monthNames,l=function(e){var t=i+1<n.length&&n.charAt(i+1)===e;return t&&i++,t},c=function(e,t,n){var i=""+t;if(l(e))for(;i.length<n;)i="0"+i;return i},u=function(e,t,n,i){return l(e)?i[t]:n[t]},d="",h=!1;if(e)for(i=0;i<n.length;i++)if(h)"'"!==n.charAt(i)||l("'")?d+=n.charAt(i):h=!1;else switch(n.charAt(i)){case"d":d+=c("d",e.getDate(),2);break;case"D":d+=u("D",e.getDay(),r,o);break;case"o":d+=c("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=c("m",e.getMonth()+1,2);break;case"M":d+=u("M",e.getMonth(),s,a);break;case"y":d+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":d+=e.getTime();break;case"!":d+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=n.charAt(i)}return d},_possibleChars:function(n){var i,e="",t=!1,r=function(e){var t=i+1<n.length&&n.charAt(i+1)===e;return t&&i++,t};for(i=0;i<n.length;i++)if(t)"'"!==n.charAt(i)||r("'")?e+=n.charAt(i):t=!1;else switch(n.charAt(i)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":r("'")?e+="'":t=!0;break;default:e+=n.charAt(i)}return e},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,r=this._getDefaultDate(e),o=r,s=this._getFormatConfig(e);try{o=this.parseDate(n,i,s)||r}catch(e){i=t?"":i}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=i?o.getDate():0,e.currentMonth=i?o.getMonth():0,e.currentYear=i?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(a,e,t){var n,i,r=null==e||""===e?t:"string"==typeof e?function(e){try{return N.datepicker.parseDate(N.datepicker._get(a,"dateFormat"),e,N.datepicker._getFormatConfig(a))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?N.datepicker._getDate(a):null)||new Date,n=t.getFullYear(),i=t.getMonth(),r=t.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,s=o.exec(e);s;){switch(s[2]||"d"){case"d":case"D":r+=parseInt(s[1],10);break;case"w":case"W":r+=7*parseInt(s[1],10);break;case"m":case"M":i+=parseInt(s[1],10),r=Math.min(r,N.datepicker._getDaysInMonth(n,i));break;case"y":case"Y":n+=parseInt(s[1],10),r=Math.min(r,N.datepicker._getDaysInMonth(n,i))}s=o.exec(e)}return new Date(n,i,r)}(e):"number"==typeof e?isNaN(e)?t:(n=e,(i=new Date).setDate(i.getDate()+n),i):new Date(e.getTime());return(r=r&&"Invalid Date"===r.toString()?t:r)&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,r=e.selectedMonth,o=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),r===e.selectedMonth&&o===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){N.datepicker._adjustDate(n,-t,"M")},next:function(){N.datepicker._adjustDate(n,+t,"M")},hide:function(){N.datepicker._hideDatepicker()},today:function(){N.datepicker._gotoToday(n)},selectDay:function(){return N.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return N.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return N.datepicker._selectMonthYear(n,this,"Y"),!1}};N(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,_,x,w,C,k,T,S,E,N,D,R,A,P,M,I,O,B,L,H,F,z=new Date,j=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth(),z.getDate())),W=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),q=this._get(e,"hideIfNoPrevNext"),V=this._get(e,"navigationAsDateFormat"),$=this._getNumberOfMonths(e),K=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Y=1!==$[0]||1!==$[1],X=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),G=this._getMinMaxDate(e,"max"),Z=e.drawMonth-K,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),G)for(t=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth()-$[0]*$[1]+1,G.getDate())),t=Q&&t<Q?Q:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)--Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,n=this._get(e,"prevText"),n=V?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,Z-J,1)),this._getFormatConfig(e)):n,i=this._canAdjustMonth(e,-1,ee,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+n+"</span></a>",r=this._get(e,"nextText"),r=V?this.formatDate(r,this._daylightSavingAdjust(new Date(ee,Z+J,1)),this._getFormatConfig(e)):r,o=this._canAdjustMonth(e,1,ee,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+r+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+r+"</span></a>",s=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?X:j,s=V?this.formatDate(s,a,this._getFormatConfig(e)):s,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(W?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(W?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),f=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;w<$[0];w++){for(C="",this.maxRows=4,k=0;k<$[1];k++){if(T=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),S=" ui-corner-all",E="",Y){if(E+="<div class='ui-datepicker-group",1<$[1])switch(k){case 0:E+=" ui-datepicker-group-first",S=" ui-corner-"+(W?"right":"left");break;case $[1]-1:E+=" ui-datepicker-group-last",S=" ui-corner-"+(W?"left":"right");break;default:E+=" ui-datepicker-group-middle",S=""}E+="'>"}for(E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?W?o:i:"")+(/all|right/.test(S)&&0===w?W?i:o:"")+this._generateMonthYearHeader(e,Z,ee,Q,G,0<w||0<k,p,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",N=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;x<7;x++)N+="<th scope='col'"+(5<=(x+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+h[D=(x+u)%7]+"'>"+f[D]+"</span></th>";for(E+=N+"</tr></thead><tbody>",R=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,R)),A=(this._getFirstDayOfMonth(ee,Z)-u+7)%7,P=Math.ceil((A+R)/7),M=Y&&this.maxRows>P?this.maxRows:P,this.maxRows=M,I=this._daylightSavingAdjust(new Date(ee,Z,1-A)),O=0;O<M;O++){for(E+="<tr>",B=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(I)+"</td>":"",x=0;x<7;x++)L=g?g.apply(e.input?e.input[0]:null,[I]):[!0,""],F=(H=I.getMonth()!==Z)&&!y||!L[0]||Q&&I<Q||G&&G<I,B+="<td class='"+(5<=(x+u+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(I.getTime()===T.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===I.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!v?"":" "+L[1]+(I.getTime()===X.getTime()?" "+this._currentClass:"")+(I.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(H&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(H&&!v?"&#xa0;":F?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===j.getTime()?" ui-state-highlight":"")+(I.getTime()===X.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);E+=B+"</tr>"}11<++Z&&(Z=0,ee++),C+=E+="</tbody></table>"+(Y?"</div>"+(0<$[0]&&k===$[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}_+=C}return _+=c,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,n,i,r,o,s,a){var l,c,u,d,h,f,p,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(o||!g)_+="<span class='ui-datepicker-month'>"+s[t]+"</span>";else{for(l=i&&i.getFullYear()===n,c=r&&r.getFullYear()===n,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=i.getMonth())&&(!c||u<=r.getMonth())&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+a[u]+"</option>");_+="</select>"}if(y||(b+=_+(!o&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=(f=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t})(d[0]),m=Math.max(p,f(d[1]||"")),p=i?Math.max(p,i.getFullYear()):p,m=r?Math.min(m,r.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=m;p++)e.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!o&&g&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,n){var i=e.drawYear+("Y"===n?t:0),r=e.drawMonth+("M"===n?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(i,r))+("D"===n?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,r,o)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),r=n&&t<n?n:t;return i&&i<r?i:r},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var r=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(n,i+(t<0?t:r[0]*r[1]),1));return t<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var n,i,r=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),s=null,a=null,l=this._get(e,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),s=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(s+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!r||t.getTime()>=r.getTime())&&(!o||t.getTime()<=o.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),N.fn.datepicker=function(e){if(!this.length)return this;N.datepicker.initialized||(N(document).mousedown(N.datepicker._checkExternalClick),N.datepicker.initialized=!0),0===N("#"+N.datepicker._mainDivId).length&&N("body").append(N.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?N.datepicker["_"+e+"Datepicker"].apply(N.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?N.datepicker["_"+e+"Datepicker"].apply(N.datepicker,[this].concat(t)):N.datepicker._attachDatepicker(this,e)}):N.datepicker["_"+e+"Datepicker"].apply(N.datepicker,[this[0]].concat(t))},N.datepicker=new g,N.datepicker.initialized=!1,N.datepicker.uuid=(new Date).getTime(),N.datepicker.version="1.11.4";N.datepicker;N.widget("ui.draggable",N.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var t=this.options;return this._blurActiveElement(e),!(this.helper||t.disabled||0<N(e.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=N(this);return N("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=this.document[0];if(this.handleElement.is(e.target))try{t.activeElement&&"body"!==t.activeElement.nodeName.toLowerCase()&&N(t.activeElement).blur()}catch(e){}},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),N.ui.ddmanager&&(N.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===N(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),N.ui.ddmanager&&!t.dropBehaviour&&N.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),N.ui.ddmanager&&N.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp({}),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",N.ui.ddmanager&&N.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return N.ui.ddmanager&&!this.options.dropBehaviour&&(n=N.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||N.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?N(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),N.ui.ddmanager&&N.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),N.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!N(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var t=this.options,n=N.isFunction(t.helper),i=n?N(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),N.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&N.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,i=this.options,r=this.document[0];this.relativeContainer=null,i.containment?"window"!==i.containment?"document"!==i.containment?i.containment.constructor!==Array?("parent"===i.containment&&(i.containment=this.helper[0].parentNode),(n=(t=N(i.containment))[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)):this.containment=i.containment:this.containment=[0,0,N(r).width()-this.helperProportions.width-this.margins.left,(N(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[N(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,N(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,N(window).scrollLeft()+N(window).width()-this.helperProportions.width-this.margins.left,N(window).scrollTop()+(N(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(n=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,t,n){return n=n||this._uiHash(),N.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),N.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),N.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,n){var i=N.extend({},e,{item:n.element});n.sortables=[],N(n.options.connectToSortable).each(function(){var e=N(this).sortable("instance");e&&!e.options.disabled&&(n.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,i))})},stop:function(t,e,n){var i=N.extend({},e,{item:n.element});n.cancelHelperRemoval=!1,N.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,i))})},drag:function(n,i,r){N.each(r.sortables,function(){var e=!1,t=this;t.positionAbs=r.positionAbs,t.helperProportions=r.helperProportions,t.offset.click=r.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,N.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&N.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,r._parent=i.helper.parent(),t.currentItem=i.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return i.helper[0]},n.target=t.currentItem[0],t._mouseCapture(n,!0),t._mouseStart(n,!0,!0),t.offset.click.top=r.offset.click.top,t.offset.click.left=r.offset.click.left,t.offset.parent.left-=r.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=r.offset.parent.top-t.offset.parent.top,r._trigger("toSortable",n),r.dropped=t.element,N.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,t.fromOutside=r),t.currentItem&&(t._mouseDrag(n),i.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",n,t._uiHash(t)),t._mouseStop(n,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(n),i.position=r._generatePosition(n,!0),r._trigger("fromSortable",n),r.dropped=!1,N.each(r.sortables,function(){this.refreshPositions()}))})}}),N.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var i=N("body"),r=n.options;i.css("cursor")&&(r._cursor=i.css("cursor")),i.css("cursor",r.cursor)},stop:function(e,t,n){var i=n.options;i._cursor&&N("body").css("cursor",i._cursor)}}),N.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var i=N(t.helper),r=n.options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(e,t,n){var i=n.options;i._opacity&&N(t.helper).css("opacity",i._opacity)}}),N.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var i=n.options,r=!1,o=n.scrollParentNotHidden[0],s=n.document[0];o!==s&&"HTML"!==o.tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+o.offsetHeight-e.pageY<i.scrollSensitivity?o.scrollTop=r=o.scrollTop+i.scrollSpeed:e.pageY-n.overflowOffset.top<i.scrollSensitivity&&(o.scrollTop=r=o.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(n.overflowOffset.left+o.offsetWidth-e.pageX<i.scrollSensitivity?o.scrollLeft=r=o.scrollLeft+i.scrollSpeed:e.pageX-n.overflowOffset.left<i.scrollSensitivity&&(o.scrollLeft=r=o.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(e.pageY-N(s).scrollTop()<i.scrollSensitivity?r=N(s).scrollTop(N(s).scrollTop()-i.scrollSpeed):N(window).height()-(e.pageY-N(s).scrollTop())<i.scrollSensitivity&&(r=N(s).scrollTop(N(s).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(e.pageX-N(s).scrollLeft()<i.scrollSensitivity?r=N(s).scrollLeft(N(s).scrollLeft()-i.scrollSpeed):N(window).width()-(e.pageX-N(s).scrollLeft())<i.scrollSensitivity&&(r=N(s).scrollLeft(N(s).scrollLeft()+i.scrollSpeed)))),!1!==r&&N.ui.ddmanager&&!i.dropBehaviour&&N.ui.ddmanager.prepareOffsets(n,e)}}),N.ui.plugin.add("draggable","snap",{start:function(e,t,n){var i=n.options;n.snapElements=[],N(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var e=N(this),t=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:t.top,left:t.left})})},drag:function(e,t,n){var i,r,o,s,a,l,c,u,d,h,f=n.options,p=f.snapTolerance,m=t.offset.left,g=m+n.helperProportions.width,v=t.offset.top,y=v+n.helperProportions.height;for(d=n.snapElements.length-1;0<=d;d--)l=(a=n.snapElements[d].left-n.margins.left)+n.snapElements[d].width,u=(c=n.snapElements[d].top-n.margins.top)+n.snapElements[d].height,g<a-p||l+p<m||y<c-p||u+p<v||!N.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,N.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(c-y)<=p,r=Math.abs(u-v)<=p,o=Math.abs(a-g)<=p,s=Math.abs(l-m)<=p,i&&(t.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:a-n.helperProportions.width}).left),s&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),h=i||r||o||s,"outer"!==f.snapMode&&(i=Math.abs(c-v)<=p,r=Math.abs(u-y)<=p,o=Math.abs(a-m)<=p,s=Math.abs(l-g)<=p,i&&(t.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:a}).left),s&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(i||r||o||s||h)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,N.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=i||r||o||s||h)}}),N.ui.plugin.add("draggable","stack",{start:function(e,t,n){var i,r=n.options,o=N.makeArray(N(r.stack)).sort(function(e,t){return(parseInt(N(e).css("zIndex"),10)||0)-(parseInt(N(t).css("zIndex"),10)||0)});o.length&&(i=parseInt(N(o[0]).css("zIndex"),10)||0,N(o).each(function(e){N(this).css("zIndex",i+e)}),this.css("zIndex",i+o.length))}}),N.ui.plugin.add("draggable","zIndex",{start:function(e,t,n){var i=N(t.helper),r=n.options;i.css("zIndex")&&(r._zIndex=i.css("zIndex")),i.css("zIndex",r.zIndex)},stop:function(e,t,n){var i=n.options;i._zIndex&&N(t.helper).css("zIndex",i._zIndex)}});N.ui.draggable;N.widget("ui.resizable",N.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(e,t){if("hidden"===N(e).css("overflow"))return!1;var n,i=t&&"left"===t?"scrollLeft":"scrollTop";return 0<e[i]||(e[i]=1,n=0<e[i],e[i]=0,n)},_create:function(){var e,t,n,i,o=this,r=this.options;if(this.element.addClass("ui-resizable"),N.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(N("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(N(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=N(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},t=0;t<e.length;t++)n=N.trim(e[t]),(i=N("<div class='ui-resizable-handle "+("ui-resizable-"+n)+"'></div>")).css({zIndex:r.zIndex}),"se"===n&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(i);this._renderAxis=function(e){var t,n,i,r;for(t in e=e||this.element,this.handles)this.handles[t].constructor===String?this.handles[t]=this.element.children(this.handles[t]).first().show():(this.handles[t].jquery||this.handles[t].nodeType)&&(this.handles[t]=N(this.handles[t]),this._on(this.handles[t],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=N(this.handles[t],this.element),r=/sw|ne|nw|se|n|s/.test(t)?n.outerHeight():n.outerWidth(),i=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join(""),e.css(i,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[t])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=i&&i[1]?i[1]:"se")}),r.autoHide&&(this._handles.hide(),N(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(N(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(N(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){N(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(e){var t,n,i=!1;for(t in this.handles)((n=N(this.handles[t])[0])===e.target||N.contains(n,e.target))&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(e){var t,n,i,r=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),t=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(t+=N(r.containment).scrollLeft()||0,n+=N(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:t,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:t,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,i=N(".ui-resizable-"+this.axis).css("cursor"),N("body").css("cursor","auto"===i?this.axis+"-resize":i),o.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var t,n,i=this.originalMousePosition,r=this.axis,o=e.pageX-i.left||0,s=e.pageY-i.top||0,a=this._change[r];return this._updatePrevProperties(),a&&(t=a.apply(this,[e,o,s]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(t=this._updateRatio(t,e)),t=this._respectSize(t,e),this._updateCache(t),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),N.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,n,i,r,o,s,a,l=this.options,c=this;return this._helper&&(i=(n=(t=this._proportionallyResizeElements).length&&/textarea/i.test(t[0].nodeName))&&this._hasScroll(t[0],"left")?0:c.sizeDiff.height,r=n?0:c.sizeDiff.width,o={width:c.helper.width()-r,height:c.helper.height()-i},s=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,a=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(N.extend(o,{top:a,left:s})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),N("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,i,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,i=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===i&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===i&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,i=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,r=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,s=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),s&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),r&&(e.height=t.maxHeight),o&&c&&(e.left=a-t.minWidth),i&&c&&(e.left=a-t.maxWidth),s&&u&&(e.top=l-t.minHeight),r&&u&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],r=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseInt(i[t],10)||0,n[t]+=parseInt(r[t],10)||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,t=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||N("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(e,t,n){return N.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},sw:function(e,t,n){return N.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,n]))},ne:function(e,t,n){return N.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},nw:function(e,t,n){return N.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,n]))}},_propagate:function(e,t){N.ui.plugin.call(this,e,[t,this.ui()]),"resize"!==e&&this._trigger(e,t,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),N.ui.plugin.add("resizable","animate",{stop:function(t){var n=N(this).resizable("instance"),e=n.options,i=n._proportionallyResizeElements,r=i.length&&/textarea/i.test(i[0].nodeName),o=r&&n._hasScroll(i[0],"left")?0:n.sizeDiff.height,s=r?0:n.sizeDiff.width,a={width:n.size.width-s,height:n.size.height-o},l=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,c=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(N.extend(a,c&&l?{top:c,left:l}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};i&&i.length&&N(i[0]).css({width:e.width,height:e.height}),n._updateCache(e),n._propagate("resize",t)}})}}),N.ui.plugin.add("resizable","containment",{start:function(){var n,i,e,t,r,o,s,a=N(this).resizable("instance"),l=a.options,c=a.element,u=l.containment,d=u instanceof N?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(a.containerElement=N(d),/document/.test(u)||u===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:N(document),left:0,top:0,width:N(document).width(),height:N(document).height()||document.body.parentNode.scrollHeight}):(n=N(d),i=[],N(["Top","Right","Left","Bottom"]).each(function(e,t){i[e]=a._num(n.css("padding"+t))}),a.containerOffset=n.offset(),a.containerPosition=n.position(),a.containerSize={height:n.innerHeight()-i[3],width:n.innerWidth()-i[1]},e=a.containerOffset,t=a.containerSize.height,r=a.containerSize.width,o=a._hasScroll(d,"left")?d.scrollWidth:r,s=a._hasScroll(d)?d.scrollHeight:t,a.parentData={element:d,left:e.left,top:e.top,width:o,height:s}))},resize:function(e){var t,n,i,r,o=N(this).resizable("instance"),s=o.options,a=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement,h=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=a),l.left<(o._helper?a.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-a.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio,h=!1),o.position.left=s.helper?a.left:0),l.top<(o._helper?a.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-a.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio,h=!1),o.position.top=o._helper?a.top:0),i=o.containerElement.get(0)===o.element.parent().get(0),r=/relative|absolute/.test(o.containerElement.css("position")),o.offset.top=i&&r?(o.offset.left=o.parentData.left+o.position.left,o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.element.offset().top),t=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-u.left:o.offset.left-a.left)),n=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-u.top:o.offset.top-a.top)),t+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-t,c&&(o.size.height=o.size.width/o.aspectRatio,h=!1)),n+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-n,c&&(o.size.width=o.size.height*o.aspectRatio,h=!1)),h||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var e=N(this).resizable("instance"),t=e.options,n=e.containerOffset,i=e.containerPosition,r=e.containerElement,o=N(e.helper),s=o.offset(),a=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(r.css("position"))&&N(this).css({left:s.left-i.left-n.left,width:a,height:l}),e._helper&&!t.animate&&/static/.test(r.css("position"))&&N(this).css({left:s.left-i.left-n.left,width:a,height:l})}}),N.ui.plugin.add("resizable","alsoResize",{start:function(){var e=N(this).resizable("instance").options;N(e.alsoResize).each(function(){var e=N(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,n){var t=N(this).resizable("instance"),i=t.options,r=t.originalSize,o=t.originalPosition,s={height:t.size.height-r.height||0,width:t.size.width-r.width||0,top:t.position.top-o.top||0,left:t.position.left-o.left||0};N(i.alsoResize).each(function(){var e=N(this),i=N(this).data("ui-resizable-alsoresize"),r={},t=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];N.each(t,function(e,t){var n=(i[t]||0)+(s[t]||0);n&&0<=n&&(r[t]=n||null)}),e.css(r)})},stop:function(){N(this).removeData("resizable-alsoresize")}}),N.ui.plugin.add("resizable","ghost",{start:function(){var e=N(this).resizable("instance"),t=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof t.ghost?t.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=N(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=N(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),N.ui.plugin.add("resizable","grid",{resize:function(){var e,t=N(this).resizable("instance"),n=t.options,i=t.size,r=t.originalSize,o=t.originalPosition,s=t.axis,a="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=a[0]||1,c=a[1]||1,u=Math.round((i.width-r.width)/l)*l,d=Math.round((i.height-r.height)/c)*c,h=r.width+u,f=r.height+d,p=n.maxWidth&&n.maxWidth<h,m=n.maxHeight&&n.maxHeight<f,g=n.minWidth&&n.minWidth>h,v=n.minHeight&&n.minHeight>f;n.grid=a,g&&(h+=l),v&&(f+=c),p&&(h-=l),m&&(f-=c),/^(se|s|e)$/.test(s)?(t.size.width=h,t.size.height=f):/^(ne)$/.test(s)?(t.size.width=h,t.size.height=f,t.position.top=o.top-d):/^(sw)$/.test(s)?(t.size.width=h,t.size.height=f,t.position.left=o.left-u):((f-c<=0||h-l<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),t.position.top=0<f-c?(t.size.height=f,o.top-d):(f=c-e.height,t.size.height=f,o.top+r.height-f),t.position.left=0<h-l?(t.size.width=h,o.left-u):(h=l-e.width,t.size.width=h,o.left+r.width-h))}});N.ui.resizable,N.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var t=N(this).css(e).offset().top;t<0&&N(this).css("top",e.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&N.fn.draggable&&this._makeDraggable(),this.options.resizable&&N.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?N(e):this.document.find(e||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:N.noop,enable:N.noop,close:function(e){var t,n=this;if(this._isOpen&&!1!==this._trigger("beforeClose",e)){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{(t=this.document[0].activeElement)&&"body"!==t.nodeName.toLowerCase()&&N(t).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var n=!1,i=this.uiDialog.siblings(".ui-front:visible").map(function(){return+N(this).css("z-index")}).get(),r=Math.max.apply(null,i);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!t&&this._trigger("focus",e),n},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=N(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(e){function t(){var e=this.document[0].activeElement;this.uiDialog[0]===e||N.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),t.call(this),this._delay(t)},_createWrapper:function(){this.uiDialog=N("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===N.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===N.ui.keyCode.TAB&&!e.isDefaultPrevented()){var t=this.uiDialog.find(":tabbable"),n=t.filter(":first"),i=t.filter(":last");e.target!==i[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){i.focus()}),e.preventDefault()):(this._delay(function(){n.focus()}),e.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=N("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){N(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=N("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),e=N("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=N("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=N("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var r=this,e=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),N.isEmptyObject(e)||N.isArray(e)&&!e.length?this.uiDialog.removeClass("ui-dialog-buttons"):(N.each(e,function(e,t){var n,i;t=N.isFunction(t)?{click:t,text:e}:t,t=N.extend({type:"button"},t),n=t.click,t.click=function(){n.apply(r.element[0],arguments)},i={icons:t.icons,text:t.showText},delete t.icons,delete t.showText,N("<button></button>",t).button(i).appendTo(r.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var r=this,o=this.options;function s(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,t){N(this).addClass("ui-dialog-dragging"),r._blockFrames(),r._trigger("dragStart",e,s(t))},drag:function(e,t){r._trigger("drag",e,s(t))},stop:function(e,t){var n=t.offset.left-r.document.scrollLeft(),i=t.offset.top-r.document.scrollTop();o.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=i?"+":"")+i,of:r.window},N(this).removeClass("ui-dialog-dragging"),r._unblockFrames(),r._trigger("dragStop",e,s(t))}})},_makeResizable:function(){var o=this,s=this.options,e=s.resizable,t=this.uiDialog.css("position"),n="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";function a(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:n,start:function(e,t){N(this).addClass("ui-dialog-resizing"),o._blockFrames(),o._trigger("resizeStart",e,a(t))},resize:function(e,t){o._trigger("resize",e,a(t))},stop:function(e,t){var n=o.uiDialog.offset(),i=n.left-o.document.scrollLeft(),r=n.top-o.document.scrollTop();s.height=o.uiDialog.height(),s.width=o.uiDialog.width(),s.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=r?"+":"")+r,of:o.window},N(this).removeClass("ui-dialog-resizing"),o._unblockFrames(),o._trigger("resizeStop",e,a(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=N(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),t=N.inArray(this,e);-1!==t&&e.splice(t,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(e){var n=this,i=!1,r={};N.each(e,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(r[e]=t)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var n,i,r=this.uiDialog;"dialogClass"===e&&r.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&((n=r.is(":data(ui-draggable)"))&&!t&&r.draggable("destroy"),!n&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((i=r.is(":data(ui-resizable)"))&&!t&&r.resizable("destroy"),i&&"string"==typeof t&&r.resizable("option","handles",t),i||!1===t||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=N(this);return N("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!N(e.target).closest(".ui-dialog").length||!!N(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=N("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}});N.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept=N.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){N.ui.ddmanager.droppables[e]=N.ui.ddmanager.droppables[e]||[],N.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=N.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,t){if("accept"===e)this.accept=N.isFunction(t)?t:function(e){return e.is(t)};else if("scope"===e){var n=N.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(t)}this._super(e,t)},_activate:function(e){var t=N.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=N.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=N.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=N.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var n=e||N.ui.ddmanager.current,i=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=N(this).droppable("instance");if(e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&N.ui.intersect(n,N.extend(e,{offset:e.element.offset()}),e.options.tolerance,t))return!(i=!0)}),!i&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),N.ui.intersect=function(){function h(e,t,n){return t<=e&&e<t+n}return function(e,t,n,i){if(!t.offset)return!1;var r=(e.positionAbs||e.position.absolute).left+e.margins.left,o=(e.positionAbs||e.position.absolute).top+e.margins.top,s=r+e.helperProportions.width,a=o+e.helperProportions.height,l=t.offset.left,c=t.offset.top,u=l+t.proportions().width,d=c+t.proportions().height;switch(n){case"fit":return l<=r&&s<=u&&c<=o&&a<=d;case"intersect":return l<r+e.helperProportions.width/2&&s-e.helperProportions.width/2<u&&c<o+e.helperProportions.height/2&&a-e.helperProportions.height/2<d;case"pointer":return h(i.pageY,c,t.proportions().height)&&h(i.pageX,l,t.proportions().width);case"touch":return(c<=o&&o<=d||c<=a&&a<=d||o<c&&d<a)&&(l<=r&&r<=u||l<=s&&s<=u||r<l&&u<s);default:return!1}}}(),N.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var n,i,r=N.ui.ddmanager.droppables[e.options.scope]||[],o=t?t.type:null,s=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||e&&!r[n].accept.call(r[n].element[0],e.currentItem||e.element))){for(i=0;i<s.length;i++)if(s[i]===r[n].element[0]){r[n].proportions().height=0;continue e}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===o&&r[n]._activate.call(r[n],t),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(e,t){var n=!1;return N.each((N.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&N.ui.intersect(e,this,this.options.tolerance,t)&&(n=this._drop.call(this,t)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t)))}),n},dragStart:function(e,t){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||N.ui.ddmanager.prepareOffsets(e,t)})},drag:function(o,s){o.options.refreshPositions&&N.ui.ddmanager.prepareOffsets(o,s),N.each(N.ui.ddmanager.droppables[o.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e,t,n,i=N.ui.intersect(o,this,this.options.tolerance,s),r=!i&&this.isover?"isout":i&&!this.isover?"isover":null;r&&(this.options.greedy&&(t=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return N(this).droppable("instance").options.scope===t})).length&&((e=N(n[0]).droppable("instance")).greedyChild="isover"===r)),e&&"isover"===r&&(e.isover=!1,e.isout=!0,e._out.call(e,s)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,s),e&&"isout"===r&&(e.isout=!1,e.isover=!0,e._over.call(e,s)))}})},dragStop:function(e,t){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||N.ui.ddmanager.prepareOffsets(e,t)}};N.ui.droppable;var _,x="ui-effects-",w=N;N.effects={effect:{}},function(u,d){var c,h=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],f=u.Color=function(e,t,n,i){return new u.Color.fn.parse(e,t,n,i)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},m={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},s=f.support={},t=u("<p>")[0],g=u.each;function v(e,t,n){var i=m[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:e<0?0:i.max<e?i.max:e)}function a(s){var a=f(),l=a._rgba=[];return s=s.toLowerCase(),g(e,function(e,t){var n,i=t.re.exec(s),r=i&&t.parse(i),o=t.space||"rgba";if(r)return n=a[o](r),a[p[o].cache]=n[p[o].cache],l=a._rgba=n._rgba,!1}),l.length?("0,0,0,0"===l.join()&&u.extend(l,c.transparent),a):c[s]}function l(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}t.style.cssText="background-color:rgba(1,1,1,.5)",s.rgba=-1<t.style.backgroundColor.indexOf("rgba"),g(p,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),f.fn=u.extend(f.prototype,{parse:function(r,e,t,n){if(r===d)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=u(r).css(e),e=d);var o=this,i=u.type(r),s=this._rgba=[];return e!==d&&(r=[r,e,t,n],i="array"),"string"===i?this.parse(a(r)||c._default):"array"===i?(g(p.rgba.props,function(e,t){s[t.idx]=v(r[t.idx],t)}),this):"object"===i?(g(p,r instanceof f?function(e,t){r[t.cache]&&(o[t.cache]=r[t.cache].slice())}:function(e,n){var i=n.cache;g(n.props,function(e,t){if(!o[i]&&n.to){if("alpha"===e||null==r[e])return;o[i]=n.to(o._rgba)}o[i][t.idx]=v(r[e],t,!0)}),o[i]&&u.inArray(null,o[i].slice(0,3))<0&&(o[i][3]=1,n.from&&(o._rgba=n.from(o[i])))}),this):void 0},is:function(e){var r=f(e),o=!0,s=this;return g(p,function(e,t){var n,i=r[t.cache];return i&&(n=s[t.cache]||t.to&&t.to(s._rgba)||[],g(t.props,function(e,t){if(null!=i[t.idx])return o=i[t.idx]===n[t.idx]})),o}),o},_space:function(){var n=[],i=this;return g(p,function(e,t){i[t.cache]&&n.push(e)}),n.pop()},transition:function(e,s){var a=f(e),t=a._space(),n=p[t],i=0===this.alpha()?f("transparent"):this,l=i[n.cache]||n.to(i._rgba),c=l.slice();return a=a[n.cache],g(n.props,function(e,t){var n=t.idx,i=l[n],r=a[n],o=m[t.type]||{};null!==r&&(c[n]=null===i?r:(o.mod&&(r-i>o.mod/2?i+=o.mod:i-r>o.mod/2&&(i-=o.mod)),v((r-i)*s+i,t)))}),this[t](c)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),n=t.pop(),i=f(e)._rgba;return f(u.map(t,function(e,t){return(1-n)*i[t]+n*e}))},toRgbaString:function(){var e="rgba(",t=u.map(this._rgba,function(e,t){return null==e?2<t?1:0:e});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=u.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),n=t.pop();return e&&t.push(~~(255*n)),"#"+u.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,p.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,r=e[1]/255,o=e[2]/255,s=e[3],a=Math.max(i,r,o),l=Math.min(i,r,o),c=a-l,u=a+l,d=.5*u;return t=l===a?0:i===a?60*(r-o)/c+360:r===a?60*(o-i)/c+120:60*(i-r)/c+240,n=0===c?0:d<=.5?c/u:c/(2-u),[Math.round(t)%360,n,d,null==s?1:s]},p.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],r=e[3],o=i<=.5?i*(1+n):i+n-i*n,s=2*i-o;return[Math.round(255*l(s,o,t+1/3)),Math.round(255*l(s,o,t)),Math.round(255*l(s,o,t-1/3)),r]},g(p,function(l,e){var n=e.props,s=e.cache,a=e.to,c=e.from;f.fn[l]=function(e){if(a&&!this[s]&&(this[s]=a(this._rgba)),e===d)return this[s].slice();var t,i=u.type(e),r="array"===i||"object"===i?e:arguments,o=this[s].slice();return g(n,function(e,t){var n=r["object"===i?e:t.idx];null==n&&(n=o[t.idx]),o[t.idx]=v(n,t)}),c?((t=f(c(o)))[s]=o,t):f(o)},g(n,function(s,a){f.fn[s]||(f.fn[s]=function(e){var t,n=u.type(e),i="alpha"===s?this._hsla?"hsla":"rgba":l,r=this[i](),o=r[a.idx];return"undefined"===n?o:("function"===n&&(e=e.call(this,o),n=u.type(e)),null==e&&a.empty?this:("string"===n&&(t=h.exec(e))&&(e=o+parseFloat(t[2])*("+"===t[1]?1:-1)),r[a.idx]=e,this[i](r)))})})}),f.hook=function(e){var t=e.split(" ");g(t,function(e,o){u.cssHooks[o]={set:function(e,t){var n,i,r="";if("transparent"!==t&&("string"!==u.type(t)||(n=a(t)))){if(t=f(n||t),!s.rgba&&1!==t._rgba[3]){for(i="backgroundColor"===o?e.parentNode:e;(""===r||"transparent"===r)&&i&&i.style;)try{r=u.css(i,"backgroundColor"),i=i.parentNode}catch(e){}t=t.blend(r&&"transparent"!==r?r:"_default")}t=t.toRgbaString()}try{e.style[o]=t}catch(e){}}},u.fx.step[o]=function(e){e.colorInit||(e.start=f(e.elem,o),e.end=f(e.end),e.colorInit=!0),u.cssHooks[o].set(e.elem,e.start.transition(e.end,e.pos))}})},f.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(n){var i={};return g(["Top","Right","Bottom","Left"],function(e,t){i["border"+t+"Color"]=n}),i}},c=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(w),function(){var o,r,s,a=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function c(e){var t,n,i=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(i&&i.length&&i[0]&&i[i[0]])for(n=i.length;n--;)"string"==typeof i[t=i[n]]&&(r[N.camelCase(t)]=i[t]);else for(t in i)"string"==typeof i[t]&&(r[t]=i[t]);return r}N.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,t){N.fx.step[t]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(w.style(e.elem,t,e.end),e.setAttr=!0)}}),N.fn.addBack||(N.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),N.effects.animateClass=function(r,e,t,n){var o=N.speed(e,t,n);return this.queue(function(){var e,n=N(this),t=n.attr("class")||"",i=o.children?n.find("*").addBack():n;i=i.map(function(){return{el:N(this),start:c(this)}}),(e=function(){N.each(a,function(e,t){r[t]&&n[t+"Class"](r[t])})})(),i=i.map(function(){return this.end=c(this.el[0]),this.diff=function(e,t){var n,i,r={};for(n in t)i=t[n],e[n]!==i&&(l[n]||!N.fx.step[n]&&isNaN(parseFloat(i))||(r[n]=i));return r}(this.start,this.end),this}),n.attr("class",t),i=i.map(function(){var e=this,t=N.Deferred(),n=N.extend({},o,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,n),t.promise()}),N.when.apply(N,i.get()).done(function(){e(),N.each(arguments,function(){var t=this.el;N.each(this.diff,function(e){t.css(e,"")})}),o.complete.call(n[0])})})},N.fn.extend({addClass:(s=N.fn.addClass,function(e,t,n,i){return t?N.effects.animateClass.call(this,{add:e},t,n,i):s.apply(this,arguments)}),removeClass:(r=N.fn.removeClass,function(e,t,n,i){return 1<arguments.length?N.effects.animateClass.call(this,{remove:e},t,n,i):r.apply(this,arguments)}),toggleClass:(o=N.fn.toggleClass,function(e,t,n,i,r){return"boolean"==typeof t||void 0===t?n?N.effects.animateClass.call(this,t?{add:e}:{remove:e},n,i,r):o.apply(this,arguments):N.effects.animateClass.call(this,{toggle:e},t,n,i)}),switchClass:function(e,t,n,i,r){return N.effects.animateClass.call(this,{add:t,remove:e},n,i,r)}})}(),function(){function i(e,t,n,i){return N.isPlainObject(e)&&(e=(t=e).effect),e={effect:e},null==t&&(t={}),N.isFunction(t)&&(i=t,n=null,t={}),("number"==typeof t||N.fx.speeds[t])&&(i=n,n=t,t={}),N.isFunction(n)&&(i=n,n=null),t&&N.extend(e,t),n=n||t.duration,e.duration=N.fx.off?0:"number"==typeof n?n:n in N.fx.speeds?N.fx.speeds[n]:N.fx.speeds._default,e.complete=i||t.complete,e}function n(e){return!(e&&"number"!=typeof e&&!N.fx.speeds[e])||("string"==typeof e&&!N.effects.effect[e]||(!!N.isFunction(e)||"object"==typeof e&&!e.effect))}var r,o,s;N.extend(N.effects,{version:"1.11.4",save:function(e,t){for(var n=0;n<t.length;n++)null!==t[n]&&e.data(x+t[n],e[0].style[t[n]])},restore:function(e,t){var n,i;for(i=0;i<t.length;i++)null!==t[i]&&(void 0===(n=e.data(x+t[i]))&&(n=""),e.css(t[i],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var i={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},e=N("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:n.width(),height:n.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return n.wrap(e),(n[0]===r||N.contains(n[0],r))&&N(r).focus(),e=n.parent(),"static"===n.css("position")?(e.css({position:"relative"}),n.css({position:"relative"})):(N.extend(i,{position:n.css("position"),zIndex:n.css("z-index")}),N.each(["top","left","bottom","right"],function(e,t){i[t]=n.css(t),isNaN(parseInt(i[t],10))&&(i[t]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(t),e.css(i).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||N.contains(e[0],t))&&N(t).focus()),e},setTransition:function(i,e,r,o){return o=o||{},N.each(e,function(e,t){var n=i.cssUnit(t);0<n[0]&&(o[t]=n[0]*r+n[1])}),o}}),N.fn.extend({effect:function(){var o=i.apply(this,arguments),e=o.mode,t=o.queue,s=N.effects.effect[o.effect];if(N.fx.off||!s)return e?this[e](o.duration,o.complete):this.each(function(){o.complete&&o.complete.call(this)});function n(e){var t=N(this),n=o.complete,i=o.mode;function r(){N.isFunction(n)&&n.call(t[0]),N.isFunction(e)&&e()}(t.is(":hidden")?"hide"===i:"show"===i)?(t[i](),r()):s.call(t[0],o,r)}return!1===t?this.each(n):this.queue(t||"fx",n)},show:(s=N.fn.show,function(e){if(n(e))return s.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(o=N.fn.hide,function(e){if(n(e))return o.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(r=N.fn.toggle,function(e){if(n(e)||"boolean"==typeof e)return r.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(e){var n=this.css(e),i=[];return N.each(["em","px","%","pt"],function(e,t){0<n.indexOf(t)&&(i=[parseFloat(n),t])}),i}})}(),_={},N.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){_[e]=function(e){return Math.pow(e,t+2)}}),N.extend(_,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),N.each(_,function(e,t){N.easing["easeIn"+e]=t,N.easing["easeOut"+e]=function(e){return 1-t(1-e)},N.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}});N.effects,N.effects.effect.blind=function(e,t){var n,i,r,o=N(this),s=["position","top","bottom","left","right","height","width"],a=N.effects.setMode(o,e.mode||"hide"),l=e.direction||"up",c=/up|down|vertical/.test(l),u=c?"height":"width",d=c?"top":"left",h=/up|left|vertical|horizontal/.test(l),f={},p="show"===a;o.parent().is(".ui-effects-wrapper")?N.effects.save(o.parent(),s):N.effects.save(o,s),o.show(),i=(n=N.effects.createWrapper(o).css({overflow:"hidden"}))[u](),r=parseFloat(n.css(d))||0,f[u]=p?i:0,h||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),f[d]=p?r:i+r),p&&(n.css(u,0),h||n.css(d,r+i)),n.animate(f,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===a&&o.hide(),N.effects.restore(o,s),N.effects.removeWrapper(o),t()}})},N.effects.effect.bounce=function(e,t){var n,i,r,o=N(this),s=["position","top","bottom","left","right","height","width"],a=N.effects.setMode(o,e.mode||"effect"),l="hide"===a,c="show"===a,u=e.direction||"up",d=e.distance,h=e.times||5,f=2*h+(c||l?1:0),p=e.duration/f,m=e.easing,g="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,y=o.queue(),b=y.length;for((c||l)&&s.push("opacity"),N.effects.save(o,s),o.show(),N.effects.createWrapper(o),d||(d=o["top"===g?"outerHeight":"outerWidth"]()/3),c&&((r={opacity:1})[g]=0,o.css("opacity",0).css(g,v?2*-d:2*d).animate(r,p,m)),l&&(d/=Math.pow(2,h-1)),n=(r={})[g]=0;n<h;n++)(i={})[g]=(v?"-=":"+=")+d,o.animate(i,p,m).animate(r,p,m),d=l?2*d:d/2;l&&((i={opacity:0})[g]=(v?"-=":"+=")+d,o.animate(i,p,m)),o.queue(function(){l&&o.hide(),N.effects.restore(o,s),N.effects.removeWrapper(o),t()}),1<b&&y.splice.apply(y,[1,0].concat(y.splice(b,f+1))),o.dequeue()},N.effects.effect.clip=function(e,t){var n,i,r,o=N(this),s=["position","top","bottom","left","right","height","width"],a="show"===N.effects.setMode(o,e.mode||"hide"),l="vertical"===(e.direction||"vertical"),c=l?"height":"width",u=l?"top":"left",d={};N.effects.save(o,s),o.show(),n=N.effects.createWrapper(o).css({overflow:"hidden"}),r=(i="IMG"===o[0].tagName?n:o)[c](),a&&(i.css(c,0),i.css(u,r/2)),d[c]=a?r:0,d[u]=a?0:r/2,i.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){a||o.hide(),N.effects.restore(o,s),N.effects.removeWrapper(o),t()}})},N.effects.effect.drop=function(e,t){var n,i=N(this),r=["position","top","bottom","left","right","opacity","height","width"],o=N.effects.setMode(i,e.mode||"hide"),s="show"===o,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",c="up"===a||"left"===a?"pos":"neg",u={opacity:s?1:0};N.effects.save(i,r),i.show(),N.effects.createWrapper(i),n=e.distance||i["top"===l?"outerHeight":"outerWidth"](!0)/2,s&&i.css("opacity",0).css(l,"pos"===c?-n:n),u[l]=(s?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+n,i.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&i.hide(),N.effects.restore(i,r),N.effects.removeWrapper(i),t()}})},N.effects.effect.explode=function(e,t){var n,i,r,o,s,a,l=e.pieces?Math.round(Math.sqrt(e.pieces)):3,c=l,u=N(this),d="show"===N.effects.setMode(u,e.mode||"hide"),h=u.show().css("visibility","hidden").offset(),f=Math.ceil(u.outerWidth()/c),p=Math.ceil(u.outerHeight()/l),m=[];function g(){m.push(this),m.length===l*c&&function(){u.css({visibility:"visible"}),N(m).remove(),d||u.hide();t()}()}for(n=0;n<l;n++)for(o=h.top+n*p,a=n-(l-1)/2,i=0;i<c;i++)r=h.left+i*f,s=i-(c-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-i*f,top:-n*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:p,left:r+(d?s*f:0),top:o+(d?a*p:0),opacity:d?0:1}).animate({left:r+(d?0:s*f),top:o+(d?0:a*p),opacity:d?1:0},e.duration||500,e.easing,g)},N.effects.effect.fade=function(e,t){var n=N(this),i=N.effects.setMode(n,e.mode||"toggle");n.animate({opacity:i},{queue:!1,duration:e.duration,easing:e.easing,complete:t})},N.effects.effect.fold=function(e,t){var n,i,r=N(this),o=["position","top","bottom","left","right","height","width"],s=N.effects.setMode(r,e.mode||"hide"),a="show"===s,l="hide"===s,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,h=a!==d,f=h?["width","height"]:["height","width"],p=e.duration/2,m={},g={};N.effects.save(r,o),r.show(),n=N.effects.createWrapper(r).css({overflow:"hidden"}),i=h?[n.width(),n.height()]:[n.height(),n.width()],u&&(c=parseInt(u[1],10)/100*i[l?0:1]),a&&n.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=a?i[0]:c,g[f[1]]=a?i[1]:0,n.animate(m,p,e.easing).animate(g,p,e.easing,function(){l&&r.hide(),N.effects.restore(r,o),N.effects.removeWrapper(r),t()})},N.effects.effect.highlight=function(e,t){var n=N(this),i=["backgroundImage","backgroundColor","opacity"],r=N.effects.setMode(n,e.mode||"show"),o={backgroundColor:n.css("backgroundColor")};"hide"===r&&(o.opacity=0),N.effects.save(n,i),n.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===r&&n.hide(),N.effects.restore(n,i),t()}})},N.effects.effect.size=function(o,e){var t,n,s,a=N(this),i=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["width","height","overflow"],r=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],d=N.effects.setMode(a,o.mode||"effect"),h=o.restore||"effect"!==d,f=o.scale||"both",p=o.origin||["middle","center"],m=a.css("position"),g=h?i:["position","top","bottom","left","right","overflow","opacity"],v={height:0,width:0,outerHeight:0,outerWidth:0};"show"===d&&a.show(),t={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===o.mode&&"show"===d?(a.from=o.to||v,a.to=o.from||t):(a.from=o.from||("show"===d?v:t),a.to=o.to||("hide"===d?v:t)),s={from:{y:a.from.height/t.height,x:a.from.width/t.width},to:{y:a.to.height/t.height,x:a.to.width/t.width}},"box"!==f&&"both"!==f||(s.from.y!==s.to.y&&(g=g.concat(c),a.from=N.effects.setTransition(a,c,s.from.y,a.from),a.to=N.effects.setTransition(a,c,s.to.y,a.to)),s.from.x!==s.to.x&&(g=g.concat(u),a.from=N.effects.setTransition(a,u,s.from.x,a.from),a.to=N.effects.setTransition(a,u,s.to.x,a.to))),"content"!==f&&"both"!==f||s.from.y!==s.to.y&&(g=g.concat(r).concat(l),a.from=N.effects.setTransition(a,r,s.from.y,a.from),a.to=N.effects.setTransition(a,r,s.to.y,a.to)),N.effects.save(a,g),a.show(),N.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),p&&(n=N.effects.getBaseline(p,t),a.from.top=(t.outerHeight-a.outerHeight())*n.y,a.from.left=(t.outerWidth-a.outerWidth())*n.x,a.to.top=(t.outerHeight-a.to.outerHeight)*n.y,a.to.left=(t.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),"content"!==f&&"both"!==f||(c=c.concat(["marginTop","marginBottom"]).concat(r),u=u.concat(["marginLeft","marginRight"]),l=i.concat(c).concat(u),a.find("*[width]").each(function(){var e=N(this),t=e.height(),n=e.width(),i=e.outerHeight(),r=e.outerWidth();h&&N.effects.save(e,l),e.from={height:t*s.from.y,width:n*s.from.x,outerHeight:i*s.from.y,outerWidth:r*s.from.x},e.to={height:t*s.to.y,width:n*s.to.x,outerHeight:t*s.to.y,outerWidth:n*s.to.x},s.from.y!==s.to.y&&(e.from=N.effects.setTransition(e,c,s.from.y,e.from),e.to=N.effects.setTransition(e,c,s.to.y,e.to)),s.from.x!==s.to.x&&(e.from=N.effects.setTransition(e,u,s.from.x,e.from),e.to=N.effects.setTransition(e,u,s.to.x,e.to)),e.css(e.from),e.animate(e.to,o.duration,o.easing,function(){h&&N.effects.restore(e,l)})})),a.animate(a.to,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===d&&a.hide(),N.effects.restore(a,g),h||("static"===m?a.css({position:"relative",top:a.to.top,left:a.to.left}):N.each(["top","left"],function(r,e){a.css(e,function(e,t){var n=parseInt(t,10),i=r?a.to.left:a.to.top;return"auto"===t?i+"px":n+i+"px"})})),N.effects.removeWrapper(a),e()}})},N.effects.effect.scale=function(e,t){var n=N(this),i=N.extend(!0,{},e),r=N.effects.setMode(n,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===r?0:100),s=e.direction||"both",a=e.origin,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},c="horizontal"!==s?o/100:1,u="vertical"!==s?o/100:1;i.effect="size",i.queue=!1,i.complete=t,"effect"!==r&&(i.origin=a||["middle","center"],i.restore=!0),i.from=e.from||("show"===r?{height:0,width:0,outerHeight:0,outerWidth:0}:l),i.to={height:l.height*c,width:l.width*u,outerHeight:l.outerHeight*c,outerWidth:l.outerWidth*u},i.fade&&("show"===r&&(i.from.opacity=0,i.to.opacity=1),"hide"===r&&(i.from.opacity=1,i.to.opacity=0)),n.effect(i)},N.effects.effect.puff=function(e,t){var n=N(this),i=N.effects.setMode(n,e.mode||"hide"),r="hide"===i,o=parseInt(e.percent,10)||150,s=o/100,a={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};N.extend(e,{effect:"scale",queue:!1,fade:!0,mode:i,complete:t,percent:r?o:100,from:r?a:{height:a.height*s,width:a.width*s,outerHeight:a.outerHeight*s,outerWidth:a.outerWidth*s}}),n.effect(e)},N.effects.effect.pulsate=function(e,t){var n,i=N(this),r=N.effects.setMode(i,e.mode||"show"),o="show"===r,s="hide"===r,a=o||"hide"===r,l=2*(e.times||5)+(a?1:0),c=e.duration/l,u=0,d=i.queue(),h=d.length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),u=1),n=1;n<l;n++)i.animate({opacity:u},c,e.easing),u=1-u;i.animate({opacity:u},c,e.easing),i.queue(function(){s&&i.hide(),t()}),1<h&&d.splice.apply(d,[1,0].concat(d.splice(h,l+1))),i.dequeue()},N.effects.effect.shake=function(e,t){var n,i=N(this),r=["position","top","bottom","left","right","height","width"],o=N.effects.setMode(i,e.mode||"effect"),s=e.direction||"left",a=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===s||"down"===s?"top":"left",h="up"===s||"left"===s,f={},p={},m={},g=i.queue(),v=g.length;for(N.effects.save(i,r),i.show(),N.effects.createWrapper(i),f[d]=(h?"-=":"+=")+a,p[d]=(h?"+=":"-=")+2*a,m[d]=(h?"-=":"+=")+2*a,i.animate(f,u,e.easing),n=1;n<l;n++)i.animate(p,u,e.easing).animate(m,u,e.easing);i.animate(p,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&i.hide(),N.effects.restore(i,r),N.effects.removeWrapper(i),t()}),1<v&&g.splice.apply(g,[1,0].concat(g.splice(v,c+1))),i.dequeue()},N.effects.effect.slide=function(e,t){var n,i=N(this),r=["position","top","bottom","left","right","width","height"],o=N.effects.setMode(i,e.mode||"show"),s="show"===o,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",c="up"===a||"left"===a,u={};N.effects.save(i,r),i.show(),n=e.distance||i["top"===l?"outerHeight":"outerWidth"](!0),N.effects.createWrapper(i).css({overflow:"hidden"}),s&&i.css(l,c?isNaN(n)?"-"+n:-n:n),u[l]=(s?c?"+=":"-=":c?"-=":"+=")+n,i.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&i.hide(),N.effects.restore(i,r),N.effects.removeWrapper(i),t()}})},N.effects.effect.transfer=function(e,t){var n=N(this),i=N(e.to),r="fixed"===i.css("position"),o=N("body"),s=r?o.scrollTop():0,a=r?o.scrollLeft():0,l=i.offset(),c={top:l.top-s,left:l.left-a,height:i.innerHeight(),width:i.innerWidth()},u=n.offset(),d=N("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-s,left:u.left-a,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t()})},N.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=N("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,t=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=N("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),N.widget("ui.selectable",N.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,t=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){(e=N(t.options.filter,t.element[0])).addClass("ui-selectee"),e.each(function(){var e=N(this),t=e.offset();N.data(this,"selectable-item",{element:this,$element:e,left:t.left,top:t.top,right:t.left+e.outerWidth(),bottom:t.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=N("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(n){var i=this,e=this.options;this.opos=[n.pageX,n.pageY],this.options.disabled||(this.selectees=N(e.filter,this.element[0]),this._trigger("start",n),N(e.appendTo).append(this.helper),this.helper.css({left:n.pageX,top:n.pageY,width:0,height:0}),e.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=N.data(this,"selectable-item");e.startselected=!0,n.metaKey||n.ctrlKey||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,i._trigger("unselecting",n,{unselecting:e.element}))}),N(n.target).parents().addBack().each(function(){var e,t=N.data(this,"selectable-item");if(t)return e=!n.metaKey&&!n.ctrlKey||!t.$element.hasClass("ui-selected"),t.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),t.unselecting=!e,t.selecting=e,(t.selected=e)?i._trigger("selecting",n,{selecting:t.element}):i._trigger("unselecting",n,{unselecting:t.element}),!1}))},_mouseDrag:function(n){if(this.dragged=!0,!this.options.disabled){var e,i=this,r=this.options,o=this.opos[0],s=this.opos[1],a=n.pageX,l=n.pageY;return a<o&&(e=a,a=o,o=e),l<s&&(e=l,l=s,s=e),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var e=N.data(this,"selectable-item"),t=!1;e&&e.element!==i.element[0]&&("touch"===r.tolerance?t=!(e.left>a||e.right<o||e.top>l||e.bottom<s):"fit"===r.tolerance&&(t=e.left>o&&e.right<a&&e.top>s&&e.bottom<l),t?(e.selected&&(e.$element.removeClass("ui-selected"),e.selected=!1),e.unselecting&&(e.$element.removeClass("ui-unselecting"),e.unselecting=!1),e.selecting||(e.$element.addClass("ui-selecting"),e.selecting=!0,i._trigger("selecting",n,{selecting:e.element}))):(e.selecting&&((n.metaKey||n.ctrlKey)&&e.startselected?(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.$element.addClass("ui-selected"),e.selected=!0):(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.startselected&&(e.$element.addClass("ui-unselecting"),e.unselecting=!0),i._trigger("unselecting",n,{unselecting:e.element}))),e.selected&&(n.metaKey||n.ctrlKey||e.startselected||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,i._trigger("unselecting",n,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,N(".ui-unselecting",this.element[0]).each(function(){var e=N.data(this,"selectable-item");e.$element.removeClass("ui-unselecting"),e.unselecting=!1,e.startselected=!1,n._trigger("unselected",t,{unselected:e.element})}),N(".ui-selecting",this.element[0]).each(function(){var e=N.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected"),e.selecting=!1,e.selected=!0,e.startselected=!0,n._trigger("selected",t,{selected:e.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),N.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=N("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=N("<span>",{class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),N("<span>",{class:"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=N("<span>",{class:"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var i=this;this.menu=N("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=N("<div>",{class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,t){e.preventDefault(),i._setSelection(),i._select(t.item.data("ui-selectmenu-item"),e)},focus:function(e,t){var n=t.item.data("ui-selectmenu-item");null!=i.focusIndex&&n.index!==i.focusIndex&&(i._trigger("focus",e,{item:n}),i.isOpen||i._select(n,e)),i.focusIndex=n.index,i.button.attr("aria-activedescendant",i.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(N.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(n,e){var i=this,r="";N.each(e,function(e,t){t.optgroup!==r&&(N("<li>",{class:"ui-selectmenu-optgroup ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:t.optgroup}).appendTo(n),r=t.optgroup),i._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(e,t){var n=N("<li>");return t.disabled&&n.addClass("ui-state-disabled"),this._setText(n,t.label),n.appendTo(e)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),r+=":not(.ui-state-disabled)"),(i="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](r).eq(-1):n[e+"All"](r).eq(0)).length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(N(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(e){var t=!0;switch(e.keyCode){case N.ui.keyCode.TAB:case N.ui.keyCode.ESCAPE:this.close(e),t=!1;break;case N.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case N.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case N.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case N.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case N.ui.keyCode.LEFT:this._move("prev",e);break;case N.ui.keyCode.RIGHT:this._move("next",e);break;case N.ui.keyCode.HOME:case N.ui.keyCode.PAGE_UP:this._move("first",e);break;case N.ui.keyCode.END:case N.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),t=!1}t&&e.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?N(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var r=[];e.each(function(e,t){var n=N(t),i=n.parent("optgroup");r.push({element:n,index:e,value:n.val(),label:n.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||n.prop("disabled")})}),this.items=r},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),N.widget("ui.slider",N.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t,n=this.options,i=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),r=[];for(t=n.values&&n.values.length||1,i.length>t&&(i.slice(t).remove(),i=i.slice(0,t)),e=i.length;e<t;e++)r.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>");this.handles=i.add(N(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){N(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,t="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:N.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=N("<div></div>").appendTo(this.element),t="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(t+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var t,n,i,r,o,s,a,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(n-l.values(e));(t<i||i===t&&(e===l._lastChangedValue||l.values(e)===c.min))&&(i=t,r=N(this),o=e)}),!1!==this._start(e,o)&&(this._mouseSliding=!0,this._handleIndex=o,r.addClass("ui-state-active").focus(),s=r.offset(),a=!N(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:e.pageX-s.left-r.width()/2,top:e.pageY-s.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,n),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,r;return 1<(n=("horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/t)&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),i=this._valueMax()-this._valueMin(),r=this._valueMin()+n*i,this._trimAlignValue(r)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var i,r,o;this.options.values&&this.options.values.length?(i=this.values(t?0:1),2===this.options.values.length&&!0===this.options.range&&(0===t&&i<n||1===t&&n<i)&&(n=i),n!==this.values(t)&&((r=this.values())[t]=n,o=this._trigger("slide",e,{handle:this.handles[t],value:n,values:r}),i=this.values(t?0:1),!1!==o&&this.values(t,n))):n!==this.value()&&!1!==(o=this._trigger("slide",e,{handle:this.handles[t],value:n}))&&this.value(n)},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,n)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var n,i,r;if(1<arguments.length)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!N.isArray(e))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,i=e,r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(i[r]),this._change(null,r);this._refreshValue()},_setOption:function(e,t){var n,i=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),N.isArray(this.options.values)&&(i=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t),this._super(e,t),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<i;n+=1)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=0<this.options.step?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=0<n?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;e=Math.floor(+(e-t).toFixed(this._precision())/n)*n+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,n,e,i,r,o=this.options.range,s=this.options,a=this,l=!this._animateOff&&s.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(e){n=(a.values(e)-a._valueMin())/(a._valueMax()-a._valueMin())*100,c["horizontal"===a.orientation?"left":"bottom"]=n+"%",N(this).stop(1,1)[l?"animate":"css"](c,s.animate),!0===a.options.range&&("horizontal"===a.orientation?(0===e&&a.range.stop(1,1)[l?"animate":"css"]({left:n+"%"},s.animate),1===e&&a.range[l?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:s.animate})):(0===e&&a.range.stop(1,1)[l?"animate":"css"]({bottom:n+"%"},s.animate),1===e&&a.range[l?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:s.animate}))),t=n}):(e=this.value(),i=this._valueMin(),r=this._valueMax(),n=r!==i?(e-i)/(r-i)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[l?"animate":"css"](c,s.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:n+"%"},s.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:s.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:n+"%"},s.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:s.animate}))},_handleEvents:{keydown:function(e){var t,n,i,r=N(e.target).data("ui-slider-handle-index");switch(e.keyCode){case N.ui.keyCode.HOME:case N.ui.keyCode.END:case N.ui.keyCode.PAGE_UP:case N.ui.keyCode.PAGE_DOWN:case N.ui.keyCode.UP:case N.ui.keyCode.RIGHT:case N.ui.keyCode.DOWN:case N.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,N(e.target).addClass("ui-state-active"),!1===this._start(e,r)))return}switch(i=this.options.step,t=n=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case N.ui.keyCode.HOME:n=this._valueMin();break;case N.ui.keyCode.END:n=this._valueMax();break;case N.ui.keyCode.PAGE_UP:n=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case N.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case N.ui.keyCode.UP:case N.ui.keyCode.RIGHT:if(t===this._valueMax())return;n=this._trimAlignValue(t+i);break;case N.ui.keyCode.DOWN:case N.ui.keyCode.LEFT:if(t===this._valueMin())return;n=this._trimAlignValue(t-i)}this._slide(e,r,n)},keyup:function(e){var t=N(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),N(e.target).removeClass("ui-state-active"))}}}),N.widget("ui.sortable",N.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return t<=e&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),N.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;0<=e;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,t){var n=null,i=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),N(e.target).parents().each(function(){if(N.data(this,r.widgetName+"-item")===r)return n=N(this),!1}),N.data(e.target,r.widgetName+"-item")===r&&(n=N(e.target)),!!n&&(!(this.options.handle&&!t&&(N(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(i=!0)}),!i))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,t,n){var i,r,o=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},N.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",o.cursor),this.storedStylesheet=N("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(r)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(i=this.containers.length-1;0<=i;i--)this.containers[i]._trigger("activate",e,this._uiHash(this));return N.ui.ddmanager&&(N.ui.ddmanager.current=this),N.ui.ddmanager&&!o.dropBehaviour&&N.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,n,i,r,o=this.options,s=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-this.document.scrollTop()<o.scrollSensitivity?s=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<o.scrollSensitivity&&(s=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),e.pageX-this.document.scrollLeft()<o.scrollSensitivity?s=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(s=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==s&&N.ui.ddmanager&&!o.dropBehaviour&&N.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t=this.items.length-1;0<=t;t--)if(i=(n=this.items[t]).item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===i||N.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&N.contains(this.element[0],i))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),N.ui.ddmanager&&N.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,t){if(e){if(N.ui.ddmanager&&!this.options.dropBehaviour&&N.ui.ddmanager.drop(this,e),this.options.revert){var n=this,i=this.placeholder.offset(),r=this.options.axis,o={};r&&"x"!==r||(o.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(o.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,N(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,t);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),N.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?N(this.domPosition.prev).after(this.currentItem):N(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var e=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},N(e).each(function(){var e=(N(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);e&&n.push((t.key||e[1]+"[]")+"="+(t.key&&t.expression?e[1]:e[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(e){var t=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t.each(function(){n.push(N(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||a<i+c&&i+c<l,h="y"===this.options.axis||o<t+u&&t+u<s,f=d&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!i&&(this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(0<e?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(0<e?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(e){var t,n,i,r,o=[],s=[],a=this._connectWith();if(a&&e)for(t=a.length-1;0<=t;t--)for(n=(i=N(a[t],this.document[0])).length-1;0<=n;n--)(r=N.data(i[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&s.push([N.isFunction(r.options.items)?r.options.items.call(r.element):N(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);function l(){o.push(this)}for(s.push([N.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):N(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),t=s.length-1;0<=t;t--)s[t][0].each(l);return N(o)},_removeCurrentsFromItems:function(){var n=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=N.grep(this.items,function(e){for(var t=0;t<n.length;t++)if(n[t]===e.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var t,n,i,r,o,s,a,l,c=this.items,u=[[N.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):N(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(t=d.length-1;0<=t;t--)for(n=(i=N(d[t],this.document[0])).length-1;0<=n;n--)(r=N.data(i[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push([N.isFunction(r.options.items)?r.options.items.call(r.element[0],e,{item:this.currentItem}):N(r.options.items,r.element),r]),this.containers.push(r));for(t=u.length-1;0<=t;t--)for(o=u[t][1],n=0,l=(s=u[t][0]).length;n<l;n++)(a=N(s[n])).data(this.widgetName+"-item",o),c.push({item:a,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var t,n,i,r;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),t=this.items.length-1;0<=t;t--)(n=this.items[t]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?N(this.options.toleranceElement,n.item):n.item,e||(n.width=i.outerWidth(),n.height=i.outerHeight()),r=i.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;0<=t;t--)r=this.containers[t].element.offset(),this.containers[t].containerCache.left=r.left,this.containers[t].containerCache.top=r.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(n){var i,r=(n=n||this).options;r.placeholder&&r.placeholder.constructor!==String||(i=r.placeholder,r.placeholder={element:function(){var e=n.currentItem[0].nodeName.toLowerCase(),t=N("<"+e+">",n.document[0]).addClass(i||n.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===e?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),N("<tr>",n.document[0]).appendTo(t)):"tr"===e?n._createTrPlaceholder(n.currentItem,t):"img"===e&&t.attr("src",n.currentItem.attr("src")),i||t.css("visibility","hidden"),t},update:function(e,t){i&&!r.forcePlaceholderSize||(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=N(r.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),r.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(e,t){var n=this;e.children().each(function(){N("<td>&#160;</td>",n.document[0]).attr("colspan",N(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,n,i,r,o,s,a,l,c,u,d=null,h=null;for(t=this.containers.length-1;0<=t;t--)if(!N.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(d&&N.contains(this.containers[t].element[0],d.element[0]))continue;d=this.containers[t],h=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1);else{for(i=1e4,r=null,o=(c=d.floating||this._isFloating(this.currentItem))?"left":"top",s=c?"width":"height",u=c?"clientX":"clientY",n=this.items.length-1;0<=n;n--)N.contains(this.containers[h].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(a=this.items[n].item.offset()[o],l=!1,e[u]-a>this.items[n][s]/2&&(l=!0),Math.abs(e[u]-a)<i&&(i=Math.abs(e[u]-a),r=this.items[n],this.direction=l?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[h])return void(this.currentContainer.containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[h].element,!0),this._trigger("change",e,this._uiHash()),this.containers[h]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[h],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1}},_createHelper:function(e){var t=this.options,n=N.isFunction(t.helper)?N(t.helper.apply(this.element[0],[e,this.currentItem])):"clone"===t.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||N("parent"!==t.appendTo?t.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!t.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!t.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),N.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&N.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&N.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(e=N(i.containment)[0],t=N(i.containment).offset(),n="hidden"!==N(e).css("overflow"),this.containment=[t.left+(parseInt(N(e).css("borderLeftWidth"),10)||0)+(parseInt(N(e).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(N(e).css("borderTopWidth"),10)||0)+(parseInt(N(e).css("paddingTop"),10)||0)-this.margins.top,t.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(N(e).css("borderLeftWidth"),10)||0)-(parseInt(N(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(N(e).css("borderTopWidth"),10)||0)-(parseInt(N(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&N.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(i[0].tagName);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:i.scrollTop())*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:i.scrollLeft())*n}},_generatePosition:function(e){var t,n,i=this.options,r=e.pageX,o=e.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&N.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(s[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(t=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-i.grid[1]:t+i.grid[1]:t,n=this.originalPageX+Math.round((r-this.originalPageX)/i.grid[0])*i.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-i.grid[0]:n+i.grid[0]:n)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:s.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:s.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();function r(t,n,i){return function(e){i._trigger(t,e,n._uiHash(n))}}for(this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)t||i.push(r("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(r("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<i.length;n++)i[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===N.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var t=e||this;return{helper:t.helper,placeholder:t.placeholder||N([]),position:t.position,originalPosition:t.originalPosition,offset:t.positionAbs,item:t.currentItem,sender:e?e.element:null}}});function C(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}var k;N.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var i={},r=this.element;return N.each(["min","max","step"],function(e,t){var n=r.attr(t);void 0!==n&&n.length&&(i[t]=n)}),i},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((0<t?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(e){var t;function n(){this.element[0]===this.document[0].activeElement||(this.element.focus(),this.previous=t,this._delay(function(){this.previous=t}))}t=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(e)&&this._repeat(null,N(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(N(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,N(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&0<e.height()&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(e){var t=this.options,n=N.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,t.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-t.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:n})||(this._value(n),this.counter++)},_increment:function(e){var t=this.options.incremental;return t?N.isFunction(t)?t(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,i=this.options;return n=e-(t=null!==i.min?i.min:0),e=t+(n=Math.round(n/i.step)*i.step),e=parseFloat(e.toFixed(this._precision())),null!==i.max&&e>i.max?i.max:null!==i.min&&e<i.min?i.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var n=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(n))}"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:C(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&null!==(n=this._parse(e))&&(t||(n=this._adjustValue(n)),e=this._format(n)),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:C(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:C(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:C(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:C(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());C(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),N.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(k=/#.*$/,function(e){var t,n;t=(e=e.cloneNode(!1)).href.replace(k,""),n=location.href.replace(k,"");try{t=decodeURIComponent(t)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return 1<e.hash.length&&t===n}),_create:function(){var t=this,e=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",e.collapsible),this._processTabs(),e.active=this._initialActive(),N.isArray(e.disabled)&&(e.disabled=N.unique(e.disabled.concat(N.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(e.active):this.active=N(),this._refresh(),this.active.length&&this.load(e.active)},_initialActive:function(){var n=this.options.active,e=this.options.collapsible,i=location.hash.substring(1);return null===n&&(i&&this.tabs.each(function(e,t){if(N(t).attr("aria-controls")===i)return n=e,!1}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==n&&-1!==n||(n=!!this.tabs.length&&0)),!1!==n&&-1===(n=this.tabs.index(this.tabs.eq(n)))&&(n=!e&&0),!e&&!1===n&&this.anchors.length&&(n=0),n},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):N()}},_tabKeydown:function(e){var t=N(this.document[0].activeElement).closest("li"),n=this.tabs.index(t),i=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case N.ui.keyCode.RIGHT:case N.ui.keyCode.DOWN:n++;break;case N.ui.keyCode.UP:case N.ui.keyCode.LEFT:i=!1,n--;break;case N.ui.keyCode.END:n=this.anchors.length-1;break;case N.ui.keyCode.HOME:n=0;break;case N.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case N.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,i),e.ctrlKey||e.metaKey||(t.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===N.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===N.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===N.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,t){var n=this.tabs.length-1;for(;-1!==N.inArray((n<e&&(e=0),e<0&&(e=n),e),this.options.disabled);)e=t?e+1:e-1;return e},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){"active"!==e?"disabled"!==e?(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._setupDisabled(t):this._activate(t)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,t=this.tablist.children(":has(a[href])");e.disabled=N.map(t.filter(".ui-state-disabled"),function(e){return t.index(e)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!N.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=N()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=N()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,e=this.tabs,t=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){N(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){N(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return N("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=N(),this.anchors.each(function(e,t){var n,i,r,o=N(t).uniqueId().attr("id"),s=N(t).closest("li"),a=s.attr("aria-controls");l._isLocal(t)?(r=(n=t.hash).substring(1),i=l.element.find(l._sanitizeSelector(n))):(n="#"+(r=s.attr("aria-controls")||N({}).uniqueId()[0].id),(i=l.element.find(n)).length||(i=l._createPanel(r)).insertAfter(l.panels[e-1]||l.tablist),i.attr("aria-live","polite")),i.length&&(l.panels=l.panels.add(i)),a&&s.data("ui-tabs-aria-controls",a),s.attr({"aria-controls":r,"aria-labelledby":o}),i.attr("aria-labelledby",o)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),e&&(this._off(e.not(this.tabs)),this._off(t.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return N("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){N.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var t,n=0;t=this.tabs[n];n++)!0===e||-1!==N.inArray(n,e)?N(t).addClass("ui-state-disabled").attr("aria-disabled","true"):N(t).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var n={};e&&N.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var n,t=this.element.parent();"fill"===e?(n=t.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=N(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=N(this).outerHeight(!0)}),this.panels.each(function(){N(this).height(Math.max(0,n-N(this).innerHeight()+N(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.panels.each(function(){n=Math.max(n,N(this).height("").height())}).height(n))},_eventHandler:function(e){var t=this.options,n=this.active,i=N(e.currentTarget).closest("li"),r=i[0]===n[0],o=r&&t.collapsible,s=o?N():this._getPanelForTab(i),a=n.length?this._getPanelForTab(n):N(),l={oldTab:n,oldPanel:a,newTab:o?N():i,newPanel:s};e.preventDefault(),i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||r&&!t.collapsible||!1===this._trigger("beforeActivate",e,l)||(t.active=!o&&this.tabs.index(i),this.active=r?N():i,this.xhr&&this.xhr.abort(),a.length||s.length||N.error("jQuery UI Tabs: Mismatching fragment identifier."),s.length&&this.load(this.tabs.index(i),e),this._toggle(e,l))},_toggle:function(e,t){var n=this,i=t.newPanel,r=t.oldPanel;function o(){n.running=!1,n._trigger("activate",e,t)}function s(){t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&n.options.show?n._show(i,n.options.show,o):(i.show(),o())}this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),s()),r.attr("aria-hidden","true"),t.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&r.length?t.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return 0===N(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false"),t.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var t,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),t=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:N.noop}))},_findActive:function(e){return!1===e?N():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){N.data(this,"ui-tabs-destroy")?N(this).remove():N(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=N(this),t=e.data("ui-tabs-aria-controls");t?e.attr("aria-controls",t).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var e=this.options.disabled;!1!==e&&(e=void 0!==n&&(n=this._getIndex(n),N.isArray(e)?N.map(e,function(e){return e!==n?e:null}):N.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(e))},disable:function(e){var t=this.options.disabled;if(!0!==t){if(void 0===e)t=!0;else{if(e=this._getIndex(e),-1!==N.inArray(e,t))return;t=N.isArray(t)?N.merge([e],t).sort():[e]}this._setupDisabled(t)}},load:function(e,i){e=this._getIndex(e);var r=this,n=this.tabs.eq(e),t=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),s={tab:n,panel:o},a=function(e,t){"abort"===t&&r.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr};this._isLocal(t[0])||(this.xhr=N.ajax(this._ajaxSettings(t,i,s)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),r._trigger("load",i,s),a(n,t)},1)}).fail(function(e,t){setTimeout(function(){a(e,t)},1)})))},_ajaxSettings:function(e,n,i){var r=this;return{url:e.attr("href"),beforeSend:function(e,t){return r._trigger("beforeLoad",n,N.extend({jqXHR:e,ajaxSettings:t},i))}}},_getPanelForTab:function(e){var t=N(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),N.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var e=N(this).attr("title")||"";return N("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(e,t){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(t),e.data("ui-tooltip-id",t).attr("aria-describedby",N.trim(n.join(" ")))},_removeDescribedBy:function(e){var t=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),i=N.inArray(t,n);-1!==i&&n.splice(i,1),e.removeData("ui-tooltip-id"),(n=N.trim(n.join(" ")))?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=N("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,t){var n=this;if("disabled"===e)return this[t?"_disable":"_enable"](),void(this.options[e]=t);this._super(e,t),"content"===e&&N.each(this.tooltips,function(e,t){n._updateContent(t.element)})},_disable:function(){var i=this;N.each(this.tooltips,function(e,t){var n=N.Event("blur");n.target=n.currentTarget=t.element[0],i.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=N(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=N(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var n=this,t=N(e?e.target:this.element).closest(this.options.items);t.length&&!t.data("ui-tooltip-id")&&(t.attr("title")&&t.data("ui-tooltip-title",t.attr("title")),t.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&t.parents().each(function(){var e,t=N(this);t.data("ui-tooltip-open")&&((e=N.Event("blur")).target=e.currentTarget=this,n.close(e,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._registerCloseHandlers(e,t),this._updateContent(t,e))},_updateContent:function(t,n){var e,i=this.options.content,r=this,o=n?n.type:null;if("string"==typeof i)return this._open(n,t,i);(e=i.call(t[0],function(e){r._delay(function(){t.data("ui-tooltip-open")&&(n&&(n.type=o),this._open(n,t,e))})}))&&this._open(n,t,e)},_open:function(e,t,n){var i,r,o,s,a=N.extend({},this.options.position);function l(e){a.of=e,r.is(":hidden")||r.position(a)}n&&((i=this._find(t))?i.tooltip.find(".ui-tooltip-content").html(n):(t.is("[title]")&&(e&&"mouseover"===e.type?t.attr("title",""):t.removeAttr("title")),i=this._tooltip(t),r=i.tooltip,this._addDescribedBy(t,r.attr("id")),r.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),n.clone?(s=n.clone()).removeAttr("id").find("[id]").removeAttr("id"):s=n,N("<div>").html(s).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:l}),l(e)):r.position(N.extend({of:t},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){r.is(":visible")&&(l(a.of),clearInterval(o))},N.fx.interval)),this._trigger("open",e,{tooltip:r})))},_registerCloseHandlers:function(e,n){var t={keyup:function(e){if(e.keyCode===N.ui.keyCode.ESCAPE){var t=N.Event(e);t.currentTarget=n[0],this.close(t,!0)}}};n[0]!==this.element[0]&&(t.remove=function(){this._removeTooltip(this._find(n).tooltip)}),e&&"mouseover"!==e.type||(t.mouseleave="close"),e&&"focusin"!==e.type||(t.focusout="close"),this._on(!0,n,t)},close:function(e){var t,n=this,i=N(e?e.currentTarget:this.element),r=this._find(i);r?(t=r.tooltip,r.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&!i.attr("title")&&i.attr("title",i.data("ui-tooltip-title")),this._removeDescribedBy(i),r.hiding=!0,t.stop(!0),this._hide(t,this.options.hide,function(){n._removeTooltip(N(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&N.each(this.parents,function(e,t){N(t.element).attr("title",t.title),delete n.parents[e]}),r.closing=!0,this._trigger("close",e,{tooltip:t}),r.hiding||(r.closing=!1))):i.removeData("ui-tooltip-open")},_tooltip:function(e){var t=N("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),n=t.uniqueId().attr("id");return N("<div>").addClass("ui-tooltip-content").appendTo(t),t.appendTo(this.document[0].body),this.tooltips[n]={element:e,tooltip:t}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var r=this;N.each(this.tooltips,function(e,t){var n=N.Event("blur"),i=t.element;n.target=n.currentTarget=i[0],r.close(n,!0),N("#"+e).remove(),i.data("ui-tooltip-title")&&(i.attr("title")||i.attr("title",i.data("ui-tooltip-title")),i.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),function(e){if(e.support.touch="ontouchend"in document,e.support.touch){var t,n=e.ui.mouse.prototype,i=n._mouseInit,r=n._mouseDestroy;n._touchStart=function(e){!t&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(t=!0,this._touchMoved=!1,o(e,"mouseover"),o(e,"mousemove"),o(e,"mousedown"))},n._touchMove=function(e){t&&(this._touchMoved=!0,o(e,"mousemove"))},n._touchEnd=function(e){t&&(o(e,"mouseup"),o(e,"mouseout"),this._touchMoved||o(e,"click"),t=!1)},n._mouseInit=function(){this.element.bind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),i.call(this)},n._mouseDestroy=function(){this.element.unbind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),r.call(this)}}function o(e,t){if(!(1<e.originalEvent.touches.length)){e.preventDefault();var n=e.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}}}(jQuery),function(n){function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var r={};i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,n){"use strict";var c,u="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},i=n(1),d=!0,h=!1,f=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if((0,i.eventListenerOptionsSupported)()){var r=EventTarget.prototype.addEventListener;c=r,EventTarget.prototype.addEventListener=function(e,t,n){var i,r,o,s,a="object"===(void 0===n?"undefined":u(n))&&null!==n,l=a?n.capture:n;(n=a?(o=n,(s=Object.getOwnPropertyDescriptor(o,"passive"))&&!0!==s.writable&&void 0===s.set?Object.assign({},o):o):{}).passive=(i=n.passive,r=e,void 0!==i?i:-1!==f.indexOf(r)&&d),n.capture=void 0===l?h:l,c.call(this,e,t,n)},EventTarget.prototype.addEventListener._original=c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventListenerOptionsSupported=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}}]),function(e){"use strict";var r=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,u=e.Blob&&function(){try{return Boolean(new Blob)}catch(e){return!1}}(),d=u&&e.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}}(),h=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,f=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,o=(u||h)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(e){var t,n,i,r,o,s,a,l,c;if(!(t=e.match(f)))throw new Error("invalid data URI");for(n=t[2]?t[1]:"text/plain"+(t[3]||";charset=US-ASCII"),i=!!t[4],r=e.slice(t[0].length),o=i?atob(r):decodeURIComponent(r),s=new ArrayBuffer(o.length),a=new Uint8Array(s),l=0;l<o.length;l+=1)a[l]=o.charCodeAt(l);return u?new Blob([d?a:s],{type:n}):((c=new h).append(s),c.getBlob(n))};e.HTMLCanvasElement&&!r.toBlob&&(r.mozGetAsFile?r.toBlob=function(e,t,n){var i=this;setTimeout(function(){n&&r.toDataURL&&o?e(o(i.toDataURL(t,n))):e(i.mozGetAsFile("blob",t))})}:r.toDataURL&&o&&(r.toBlob=function(e,t,n){var i=this;setTimeout(function(){e(o(i.toDataURL(t,n)))})})),"function"==typeof define&&define.amd?define(function(){return o}):"object"==typeof module&&module.exports?module.exports=o:e.dataURLtoBlob=o}(window),function(r){"use strict";function s(t,n,i){var r,o=document.createElement("img");return o.onerror=function(e){return s.onerror(o,e,t,n,i)},o.onload=function(e){return s.onload(o,e,t,n,i)},"string"==typeof t?(s.fetchBlob(t,function(e){e?r=s.createObjectURL(t=e):(r=t,i&&i.crossOrigin&&(o.crossOrigin=i.crossOrigin)),o.src=r},i),o):s.isInstanceOf("Blob",t)||s.isInstanceOf("File",t)?(r=o._objectURL=s.createObjectURL(t))?(o.src=r,o):s.readFile(t,function(e){var t=e.target;t&&t.result?o.src=t.result:n&&n(e)}):void 0}function o(e,t){!e._objectURL||t&&t.noRevoke||(s.revokeObjectURL(e._objectURL),delete e._objectURL)}var t=r.createObjectURL&&r||r.URL&&URL.revokeObjectURL&&URL||r.webkitURL&&webkitURL;s.fetchBlob=function(e,t,n){t()},s.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},s.transform=function(e,t,n,i,r){n(e,r)},s.onerror=function(e,t,n,i,r){o(e,r),i&&i.call(e,t)},s.onload=function(e,t,n,i,r){o(e,r),i&&s.transform(e,r,i,n,{})},s.createObjectURL=function(e){return!!t&&t.createObjectURL(e)},s.revokeObjectURL=function(e){return!!t&&t.revokeObjectURL(e)},s.readFile=function(e,t,n){if(r.FileReader){var i=new FileReader;if(i.onload=i.onerror=t,i[n=n||"readAsDataURL"])return i[n](e),i}return!1},"function"==typeof define&&define.amd?define(function(){return s}):"object"==typeof module&&module.exports?module.exports=s:r.loadImage=s}("undefined"!=typeof window&&window||this),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],e):e("object"==typeof module&&module.exports?require("./load-image"):window.loadImage)}(function(w){"use strict";var o=w.transform;w.transform=function(e,t,n,i,r){o.call(w,w.scale(e,t,r),t,n,i,r)},w.transformCoordinates=function(){},w.getTransformedOptions=function(e,t){var n,i,r,o,s=t.aspectRatio;if(!s)return t;for(i in n={},t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n.crop=!0,r=e.naturalWidth||e.width,o=e.naturalHeight||e.height,n.maxHeight=s<r/o?(n.maxWidth=o*s,o):(n.maxWidth=r)/s,n},w.renderImageToCanvas=function(e,t,n,i,r,o,s,a,l,c){return e.getContext("2d").drawImage(t,n,i,r,o,s,a,l,c),e},w.hasCanvasOption=function(e){return e.canvas||e.crop||!!e.aspectRatio},w.scale=function(e,t,n){function i(){var e=Math.max((a||_)/_,(l||x)/x);1<e&&(_*=e,x*=e)}function r(){var e=Math.min((o||_)/_,(s||x)/x);e<1&&(_*=e,x*=e)}t=t||{};var o,s,a,l,c,u,d,h,f,p,m,g=document.createElement("canvas"),v=e.getContext||w.hasCanvasOption(t)&&g.getContext,y=e.naturalWidth||e.width,b=e.naturalHeight||e.height,_=y,x=b;if(v&&(d=(t=w.getTransformedOptions(e,t,n)).left||0,h=t.top||0,t.sourceWidth?(c=t.sourceWidth,void 0!==t.right&&void 0===t.left&&(d=y-c-t.right)):c=y-d-(t.right||0),t.sourceHeight?(u=t.sourceHeight,void 0!==t.bottom&&void 0===t.top&&(h=b-u-t.bottom)):u=b-h-(t.bottom||0),_=c,x=u),o=t.maxWidth,s=t.maxHeight,a=t.minWidth,l=t.minHeight,v&&o&&s&&t.crop?(m=c/u-(_=o)/(x=s))<0?(u=s*c/o,void 0===t.top&&void 0===t.bottom&&(h=(b-u)/2)):0<m&&(c=o*u/s,void 0===t.left&&void 0===t.right&&(d=(y-c)/2)):((t.contain||t.cover)&&(a=o=o||a,l=s=s||l),t.cover?(r(),i()):(i(),r())),v){if(1<(f=t.pixelRatio)&&(g.style.width=_+"px",g.style.height=x+"px",_*=f,x*=f,g.getContext("2d").scale(f,f)),0<(p=t.downsamplingRatio)&&p<1&&_<c&&x<u)for(;_<c*p;)g.width=c*p,g.height=u*p,w.renderImageToCanvas(g,e,d,h,c,u,0,0,g.width,g.height),h=d=0,c=g.width,u=g.height,(e=document.createElement("canvas")).width=c,e.height=u,w.renderImageToCanvas(e,g,0,0,c,u,0,0,c,u);return g.width=_,g.height=x,w.transformCoordinates(g,t),w.renderImageToCanvas(g,e,d,h,c,u,0,0,_,x)}return e.width=_,e.height=x,e}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],e):e("object"==typeof module&&module.exports?require("./load-image"):window.loadImage)}(function(p){"use strict";var e="undefined"!=typeof Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);p.blobSlice=e&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},p.metaDataParsers={jpeg:{65505:[],65517:[]}},p.parseMetaData=function(e,u,d,h){h=h||{};var f=this,t=(d=d||{}).maxMetaDataSize||262144;"undefined"!=typeof DataView&&e&&12<=e.size&&"image/jpeg"===e.type&&p.blobSlice&&p.readFile(p.blobSlice.call(e,0,t),function(e){if(e.target.error)return console.log(e.target.error),void u(h);var t,n,i,r,o=e.target.result,s=new DataView(o),a=2,l=s.byteLength-4,c=a;if(65496===s.getUint16(0)){for(;a<l&&(65504<=(t=s.getUint16(a))&&t<=65519||65534===t);){if(a+(n=s.getUint16(a+2)+2)>s.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(i=p.metaDataParsers.jpeg[t])for(r=0;r<i.length;r+=1)i[r].call(f,s,a,n,h,d);c=a+=n}!d.disableImageHead&&6<c&&(o.slice?h.imageHead=o.slice(0,c):h.imageHead=new Uint8Array(o).subarray(0,c))}else console.log("Invalid JPEG file: Missing JPEG marker.");u(h)},"readAsArrayBuffer")||u(h)},p.hasMetaOption=function(e){return e&&e.meta};var o=p.transform;p.transform=function(t,n,i,r,e){p.hasMetaOption(n)?p.parseMetaData(r,function(e){o.call(p,t,n,i,r,e)},n,e):o.apply(p,arguments)}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-meta")):e(window.loadImage)}(function(i){"use strict";"undefined"!=typeof fetch&&"undefined"!=typeof Request&&(i.fetchBlob=function(e,t,n){if(i.hasMetaOption(n))return fetch(new Request(e,n)).then(function(e){return e.blob()}).then(t).catch(function(e){console.log(e),t()});t()})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-scale","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-scale"),require("./load-image-meta")):e(window.loadImage)}(function(l){"use strict";var t=l.hasCanvasOption,n=l.hasMetaOption,c=l.transformCoordinates,a=l.getTransformedOptions;l.hasCanvasOption=function(e){return!!e.orientation||t.call(l,e)},l.hasMetaOption=function(e){return e&&!0===e.orientation||n.call(l,e)},l.transformCoordinates=function(e,t){c.call(l,e,t);var n=e.getContext("2d"),i=e.width,r=e.height,o=e.style.width,s=e.style.height,a=t.orientation;if(a&&!(8<a))switch(4<a&&(e.width=r,e.height=i,e.style.width=s,e.style.height=o),a){case 2:n.translate(i,0),n.scale(-1,1);break;case 3:n.translate(i,r),n.rotate(Math.PI);break;case 4:n.translate(0,r),n.scale(1,-1);break;case 5:n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:n.rotate(.5*Math.PI),n.translate(0,-r);break;case 7:n.rotate(.5*Math.PI),n.translate(i,-r),n.scale(-1,1);break;case 8:n.rotate(-.5*Math.PI),n.translate(-i,0)}},l.getTransformedOptions=function(e,t,n){var i,r,o=a.call(l,e,t),s=o.orientation;if(!0===s&&n&&n.exif&&(s=n.exif.get("Orientation")),!s||8<s||1===s)return o;for(r in i={},o)o.hasOwnProperty(r)&&(i[r]=o[r]);switch(i.orientation=s){case 2:i.left=o.right,i.right=o.left;break;case 3:i.left=o.right,i.top=o.bottom,i.right=o.left,i.bottom=o.top;break;case 4:i.top=o.bottom,i.bottom=o.top;break;case 5:i.left=o.top,i.top=o.left,i.right=o.bottom,i.bottom=o.right;break;case 6:i.left=o.top,i.top=o.right,i.right=o.bottom,i.bottom=o.left;break;case 7:i.left=o.bottom,i.top=o.right,i.right=o.top,i.bottom=o.left;break;case 8:i.left=o.bottom,i.top=o.left,i.right=o.top,i.bottom=o.right}return 4<i.orientation&&(i.maxWidth=o.maxHeight,i.maxHeight=o.maxWidth,i.minWidth=o.minHeight,i.minHeight=o.minWidth,i.sourceWidth=o.sourceHeight,i.sourceHeight=o.sourceWidth),i}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-meta")):e(window.loadImage)}(function(f){"use strict";f.ExifMap=function(){return this},f.ExifMap.prototype.map={Orientation:274},f.ExifMap.prototype.get=function(e){return this[e]||this[this.map[e]]},f.getExifThumbnail=function(e,t,n){if(n&&!(t+n>e.byteLength))return f.createObjectURL(new Blob([e.buffer.slice(t,t+n)]));console.log("Invalid Exif data: Invalid thumbnail data.")},f.exifTagTypes={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,n){return e.getUint16(t,n)},size:2},4:{getValue:function(e,t,n){return e.getUint32(t,n)},size:4},5:{getValue:function(e,t,n){return e.getUint32(t,n)/e.getUint32(t+4,n)},size:8},9:{getValue:function(e,t,n){return e.getInt32(t,n)},size:4},10:{getValue:function(e,t,n){return e.getInt32(t,n)/e.getInt32(t+4,n)},size:8}},f.exifTagTypes[7]=f.exifTagTypes[1],f.getExifValue=function(e,t,n,i,r,o){var s,a,l,c,u,d,h=f.exifTagTypes[i];if(h){if(!((a=4<(s=h.size*r)?t+e.getUint32(n+8,o):n+8)+s>e.byteLength)){if(1===r)return h.getValue(e,a,o);for(l=[],c=0;c<r;c+=1)l[c]=h.getValue(e,a+c*h.size,o);if(h.ascii){for(u="",c=0;c<l.length&&"\0"!==(d=l[c]);c+=1)u+=d;return u}return l}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")},f.parseExifTag=function(e,t,n,i,r){var o=e.getUint16(n,i);r.exif[o]=f.getExifValue(e,t,n,e.getUint16(n+2,i),e.getUint32(n+4,i),i)},f.parseExifTags=function(e,t,n,i,r){var o,s,a;if(n+6>e.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((s=n+2+12*(o=e.getUint16(n,i)))+4>e.byteLength)){for(a=0;a<o;a+=1)this.parseExifTag(e,t,n+2+12*a,i,r);return e.getUint32(s,i)}console.log("Invalid Exif data: Invalid directory size.")}},f.parseExifData=function(e,t,n,i,r){if(!r.disableExif){var o,s,a,l=t+10;if(1165519206===e.getUint32(t+4))if(l+8>e.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(0===e.getUint16(t+8)){switch(e.getUint16(l)){case 18761:o=!0;break;case 19789:o=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}42===e.getUint16(l+2,o)?(s=e.getUint32(l+4,o),i.exif=new f.ExifMap,(s=f.parseExifTags(e,l,l+s,o,i))&&!r.disableExifThumbnail&&(a={exif:{}},s=f.parseExifTags(e,l,l+s,o,a),a.exif[513]&&(i.exif.Thumbnail=f.getExifThumbnail(e,l+a.exif[513],a.exif[514]))),i.exif[34665]&&!r.disableExifSub&&f.parseExifTags(e,l,l+i.exif[34665],o,i),i.exif[34853]&&!r.disableExifGps&&f.parseExifTags(e,l,l+i.exif[34853],o,i)):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},f.metaDataParsers.jpeg[65505].push(f.parseExifData)}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-exif"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-exif")):e(window.loadImage)}(function(e){"use strict";e.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},e.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},e.ExifMap.prototype.getText=function(e){var t=this.get(e);switch(e){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[e][t];case"ExifVersion":case"FlashpixVersion":if(!t)return;return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":if(!t)return;return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case"GPSVersionID":if(!t)return;return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},function(e){var t,n=e.tags,i=e.map;for(t in n)n.hasOwnProperty(t)&&(i[n[t]]=t)}(e.ExifMap.prototype),e.ExifMap.prototype.getAll=function(){var e,t,n={};for(e in this)this.hasOwnProperty(e)&&(t=this.tags[e])&&(n[t]=this.getText(t));return n}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-meta")):e(window.loadImage)}(function(d){"use strict";d.IptcMap=function(){return this},d.IptcMap.prototype.map={ObjectName:5},d.IptcMap.prototype.get=function(e){return this[e]||this[this.map[e]]},d.parseIptcTags=function(e,t,n,i){for(var r,o,s=t;s<t+n;)28===e.getUint8(s)&&2===e.getUint8(s+1)&&(o=e.getUint8(s+2))in i.iptc.tags&&(r=function(e,t,n){for(var i="",r=t;r<t+n;r++)i+=String.fromCharCode(e.getUint8(r));return i}(e,s+5,e.getInt16(s+3)),i.iptc.hasOwnProperty(o)?i.iptc[o]instanceof Array?i.iptc[o].push(r):i.iptc[o]=[i.iptc[o],r]:i.iptc[o]=r),s++},d.parseIptcData=function(e,t,n,i,r){if(!r.disableIptc){for(var o=t+n;t+8<o;){if(u=t,943868237===(c=e).getUint32(u)&&1028===c.getUint16(u+4)){var s=e.getUint8(t+7);s%2!=0&&(s+=1),0===s&&(s=4);var a=t+8+s;if(o<a){console.log("Invalid IPTC data: Invalid segment offset.");break}var l=e.getUint16(t+6+s);if(o<t+l){console.log("Invalid IPTC data: Invalid segment size.");break}return i.iptc=new d.IptcMap,d.parseIptcTags(e,a,l,i)}t++}console.log("No IPTC data at this offset - could be XMP")}var c,u},d.metaDataParsers.jpeg[65517].push(d.parseIptcData)}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-iptc"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-iptc")):e(window.loadImage)}(function(e){"use strict";e.IptcMap.prototype.tags={3:"ObjectType",4:"ObjectAttribute",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectRef",15:"Category",20:"SupplCategory",22:"FixtureID",25:"Keywords",26:"ContentLocCode",27:"ContentLocName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"RefService",47:"RefDate",50:"RefNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"CountryName",103:"OrigTransRef",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",122:"WriterEditor",130:"ImageType",131:"ImageOrientation",135:"LanguageID"},e.IptcMap.prototype.getText=function(e){var t=this.get(e);return String(t)},function(e){var t,n=e.tags,i=e.map||{};for(t in n)n.hasOwnProperty(t)&&(i[n[t]]=t)}(e.IptcMap.prototype),e.IptcMap.prototype.getAll=function(){var e,t,n={};for(e in this)this.hasOwnProperty(e)&&(t=this.tags[e])&&(n[t]=this.getText(t));return n}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(v){"use strict";function e(n){var i="dragover"===n;return function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var t=e.dataTransfer;t&&-1!==v.inArray("Files",t.types)&&!1!==this._trigger(n,v.Event(n,{delegatedEvent:e}))&&(e.preventDefault(),i&&(t.dropEffect="copy"))}}v.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||v('<input type="file"/>').prop("disabled")),v.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),v.support.xhrFormDataFileUpload=!!window.FormData,v.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),v.widget("blueimp.fileupload",{options:{dropZone:v(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(n,e){return n=this.messages[n]||n.toString(),e&&v.each(e,function(e,t){n=n.replace("{"+e+"}",t)}),n},formData:function(e){return e.serializeArray()},add:function(e,t){if(e.isDefaultPrevented())return!1;(t.autoUpload||!1!==t.autoUpload&&v(this).fileupload("option","autoUpload"))&&t.process().done(function(){t.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:v.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,n){var i=e-this.timestamp;return(!this.bitrate||!n||n<i)&&(this.bitrate=(t-this.loaded)*(1e3/i)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&v.support.xhrFileUpload||v.support.xhrFormDataFileUpload)},_getFormData:function(e){var n;return"function"===v.type(e.formData)?e.formData(e.form):v.isArray(e.formData)?e.formData:"object"===v.type(e.formData)?(n=[],v.each(e.formData,function(e,t){n.push({name:e,value:t})}),n):[]},_getTotal:function(e){var n=0;return v.each(e,function(e,t){n+=t.size||1}),n},_initProgressObject:function(e){var t={loaded:0,total:0,bitrate:0};e._progress?v.extend(e._progress,t):e._progress=t},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(e,t){if(e.lengthComputable){var n,i=Date.now?Date.now():(new Date).getTime();if(t._time&&t.progressInterval&&i-t._time<t.progressInterval&&e.loaded!==e.total)return;t._time=i,n=Math.floor(e.loaded/e.total*(t.chunkSize||t._progress.total))+(t.uploadedBytes||0),this._progress.loaded+=n-t._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(i,this._progress.loaded,t.bitrateInterval),t._progress.loaded=t.loaded=n,t._progress.bitrate=t.bitrate=t._bitrateTimer.getBitrate(i,n,t.bitrateInterval),this._trigger("progress",v.Event("progress",{delegatedEvent:e}),t),this._trigger("progressall",v.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(n){var i=this,e=n.xhr?n.xhr():v.ajaxSettings.xhr();e.upload&&(v(e.upload).bind("progress",function(e){var t=e.originalEvent;e.lengthComputable=t.lengthComputable,e.loaded=t.loaded,e.total=t.total,i._onProgress(e,n)}),n.xhr=function(){return e})},_deinitProgressListener:function(e){var t=e.xhr?e.xhr():v.ajaxSettings.xhr();t.upload&&v(t.upload).unbind("progress")},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_initXHRData:function(n){var i,r=this,e=n.files[0],t=n.multipart||!v.support.xhrFileUpload,o="array"===v.type(n.paramName)?n.paramName[0]:n.paramName;n.headers=v.extend({},n.headers),n.contentRange&&(n.headers["Content-Range"]=n.contentRange),t&&!n.blob&&this._isInstanceOf("File",e)||(n.headers["Content-Disposition"]='attachment; filename="'+encodeURI(e.uploadName||e.name)+'"'),t?v.support.xhrFormDataFileUpload&&(n.postMessage?(i=this._getFormData(n),n.blob?i.push({name:o,value:n.blob}):v.each(n.files,function(e,t){i.push({name:"array"===v.type(n.paramName)&&n.paramName[e]||o,value:t})})):(r._isInstanceOf("FormData",n.formData)?i=n.formData:(i=new FormData,v.each(this._getFormData(n),function(e,t){i.append(t.name,t.value)})),n.blob?i.append(o,n.blob,e.uploadName||e.name):v.each(n.files,function(e,t){(r._isInstanceOf("File",t)||r._isInstanceOf("Blob",t))&&i.append("array"===v.type(n.paramName)&&n.paramName[e]||o,t,t.uploadName||t.name)})),n.data=i):(n.contentType=e.type||"application/octet-stream",n.data=n.blob||e),n.blob=null},_initIframeSettings:function(e){var t=v("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&t&&t!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(e){var t=v(e.fileInput),i=e.paramName;return i?v.isArray(i)||(i=[i]):(i=[],t.each(function(){for(var e=v(this),t=e.prop("name")||"files[]",n=(e.prop("files")||[1]).length;n;)i.push(t),n-=1}),i.length||(i=[t.prop("name")||"files[]"])),i},_initFormSettings:function(e){e.form&&e.form.length||(e.form=v(e.fileInput.prop("form")),e.form.length||(e.form=v(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===v.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var t=v.extend({},this.options,e);return this._initFormSettings(t),this._initDataSettings(t),t},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(e,t,n){var i=v.Deferred(),r=i.promise();return t=t||this.options.context||r,!0===e?i.resolveWith(t,n):!1===e&&i.rejectWith(t,n),r.abort=i.promise,this._enhancePromise(r)},_addConvenienceMethods:function(e,n){var i=this,r=function(e){return v.Deferred().resolveWith(i,e).promise()};n.process=function(e,t){return(e||t)&&(n._processQueue=this._processQueue=(this._processQueue||r([this])).then(function(){return n.errorThrown?v.Deferred().rejectWith(i,[n]).promise():r(arguments)}).then(e,t)),this._processQueue||r([this])},n.submit=function(){return"pending"!==this.state()&&(n.jqXHR=this.jqXHR=!1!==i._trigger("submit",v.Event("submit",{delegatedEvent:e}),this)&&i._onSend(e,this)),this.jqXHR||i._getXHRPromise()},n.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",i._trigger("fail",null,this),i._getXHRPromise(!1))},n.state=function(){return this.jqXHR?i._getDeferredState(this.jqXHR):this._processQueue?i._getDeferredState(this._processQueue):void 0},n.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===i._getDeferredState(this._processQueue)},n.progress=function(){return this._progress},n.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),n=t&&t.split("-"),i=n&&1<n.length&&parseInt(n[1],10);return i&&i+1},_chunkedUpload:function(o,e){o.uploadedBytes=o.uploadedBytes||0;var t,s,a=this,n=o.files[0],l=n.size,c=o.uploadedBytes,u=o.maxChunkSize||l,d=this._blobSlice,h=v.Deferred(),i=h.promise();return!(!(this._isXHRUpload(o)&&d&&(c||("function"===v.type(u)?u(o):u)<l))||o.data)&&(!!e||(l<=c?(n.error=o.i18n("uploadedBytes"),this._getXHRPromise(!1,o.context,[null,"error",n.error])):(s=function(){var i=v.extend({},o),r=i._progress.loaded;i.blob=d.call(n,c,c+("function"===v.type(u)?u(i):u),n.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+c+"-"+(c+i.chunkSize-1)+"/"+l,a._trigger("chunkbeforesend",null,i),a._initXHRData(i),a._initProgressListener(i),t=(!1!==a._trigger("chunksend",null,i)&&v.ajax(i)||a._getXHRPromise(!1,i.context)).done(function(e,t,n){c=a._getUploadedBytes(n)||c+i.chunkSize,r+i.chunkSize-i._progress.loaded&&a._onProgress(v.Event("progress",{lengthComputable:!0,loaded:c-i.uploadedBytes,total:c-i.uploadedBytes}),i),o.uploadedBytes=i.uploadedBytes=c,i.result=e,i.textStatus=t,i.jqXHR=n,a._trigger("chunkdone",null,i),a._trigger("chunkalways",null,i),c<l?s():h.resolveWith(i.context,[e,t,n])}).fail(function(e,t,n){i.jqXHR=e,i.textStatus=t,i.errorThrown=n,a._trigger("chunkfail",null,i),a._trigger("chunkalways",null,i),h.rejectWith(i.context,[e,t,n])}).always(function(){a._deinitProgressListener(i)})},this._enhancePromise(i),i.abort=function(){return t.abort()},s(),i)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(e,t,n,i){var r=i._progress.total,o=i._response;i._progress.loaded<r&&this._onProgress(v.Event("progress",{lengthComputable:!0,loaded:r,total:r}),i),o.result=i.result=e,o.textStatus=i.textStatus=t,o.jqXHR=i.jqXHR=n,this._trigger("done",null,i)},_onFail:function(e,t,n,i){var r=i._response;i.recalculateProgress&&(this._progress.loaded-=i._progress.loaded,this._progress.total-=i._progress.total),r.jqXHR=i.jqXHR=e,r.textStatus=i.textStatus=t,r.errorThrown=i.errorThrown=n,this._trigger("fail",null,i)},_onAlways:function(e,t,n,i){this._trigger("always",null,i)},_onSend:function(e,t){t.submit||this._addConvenienceMethods(e,t);var n,i,r,o,s=this,a=s._getAJAXSettings(t),l=function(){return s._sending+=1,a._bitrateTimer=new s._BitrateTimer,n=n||((i||!1===s._trigger("send",v.Event("send",{delegatedEvent:e}),a))&&s._getXHRPromise(!1,a.context,i)||s._chunkedUpload(a)||v.ajax(a)).done(function(e,t,n){s._onDone(e,t,n,a)}).fail(function(e,t,n){s._onFail(e,t,n,a)}).always(function(e,t,n){if(s._deinitProgressListener(a),s._onAlways(e,t,n,a),s._sending-=1,s._active-=1,a.limitConcurrentUploads&&a.limitConcurrentUploads>s._sending)for(var i=s._slots.shift();i;){if("pending"===s._getDeferredState(i)){i.resolve();break}i=s._slots.shift()}0===s._active&&s._trigger("stop")})};return this._beforeSend(e,a),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?((o=1<this.options.limitConcurrentUploads?(r=v.Deferred(),this._slots.push(r),r.then(l)):(this._sequence=this._sequence.then(l,l),this._sequence)).abort=function(){return i=[void 0,"abort","abort"],n?n.abort():(r&&r.rejectWith(a.context,i),l())},this._enhancePromise(o)):l()},_onAdd:function(i,r){var o,e,s,t,a=this,l=!0,n=v.extend({},this.options,r),c=r.files,u=c.length,d=n.limitMultiFileUploads,h=n.limitMultiFileUploadSize,f=n.limitMultiFileUploadSizeOverhead,p=0,m=this._getParamName(n),g=0;if(!u)return!1;if(h&&void 0===c[0].size&&(h=void 0),(n.singleFileUploads||d||h)&&this._isXHRUpload(n))if(n.singleFileUploads||h||!d)if(!n.singleFileUploads&&h)for(s=[],o=[],t=0;t<u;t+=1)p+=c[t].size+f,(t+1===u||p+c[t+1].size+f>h||d&&d<=t+1-g)&&(s.push(c.slice(g,t+1)),(e=m.slice(g,t+1)).length||(e=m),o.push(e),g=t+1,p=0);else o=m;else for(s=[],o=[],t=0;t<u;t+=d)s.push(c.slice(t,t+d)),(e=m.slice(t,t+d)).length||(e=m),o.push(e);else s=[c],o=[m];return r.originalFiles=c,v.each(s||c,function(e,t){var n=v.extend({},r);return n.files=s?t:[t],n.paramName=o[e],a._initResponseObject(n),a._initProgressObject(n),a._addConvenienceMethods(i,n),l=a._trigger("add",v.Event("add",{delegatedEvent:i}),n)}),l},_replaceFileInput:function(e){var n=e.fileInput,i=n.clone(!0),t=n.is(document.activeElement);e.fileInputClone=i,v("<form></form>").append(i)[0].reset(),n.after(i).detach(),t&&i.focus(),v.cleanData(n.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===n[0]?i[0]:t}),n[0]===this.element[0]&&(this.element=i)},_handleFileTreeEntry:function(n,i){var e,r=this,o=v.Deferred(),s=[],a=function(e){e&&!e.entry&&(e.entry=n),o.resolve([e])},l=function(){e.readEntries(function(e){var t;e.length?(s=s.concat(e),l()):(t=s,r._handleFileTreeEntries(t,i+n.name+"/").done(function(e){o.resolve(e)}).fail(a))},a)};return i=i||"",n.isFile?n._file?(n._file.relativePath=i,o.resolve(n._file)):n.file(function(e){e.relativePath=i,o.resolve(e)},a):n.isDirectory?(e=n.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,t){var n=this;return v.when.apply(v,v.map(e,function(e){return n._handleFileTreeEntry(e,t)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var t=(e=e||{}).items;return t&&t.length&&(t[0].webkitGetAsEntry||t[0].getAsEntry)?this._handleFileTreeEntries(v.map(t,function(e){var t;return e.webkitGetAsEntry?((t=e.webkitGetAsEntry())&&(t._file=e.getAsFile()),t):e.getAsEntry()})):v.Deferred().resolve(v.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var t,n,i=(e=v(e)).prop("webkitEntries")||e.prop("entries");if(i&&i.length)return this._handleFileTreeEntries(i);if((t=v.makeArray(e.prop("files"))).length)void 0===t[0].name&&t[0].fileName&&v.each(t,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(n=e.prop("value")))return v.Deferred().resolve([]).promise();t=[{name:n.replace(/^.*\\/,"")}]}return v.Deferred().resolve(t).promise()},_getFileInputFiles:function(e){return e instanceof v&&1!==e.length?v.when.apply(v,v.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(t){var n=this,i={fileInput:v(t.target),form:v(t.target.form)};this._getFileInputFiles(i.fileInput).always(function(e){i.files=e,n.options.replaceFileInput&&n._replaceFileInput(i),!1!==n._trigger("change",v.Event("change",{delegatedEvent:t}),i)&&n._onAdd(t,i)})},_onPaste:function(e){var t=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,i={files:[]};t&&t.length&&(v.each(t,function(e,t){var n=t.getAsFile&&t.getAsFile();n&&i.files.push(n)}),!1!==this._trigger("paste",v.Event("paste",{delegatedEvent:e}),i)&&this._onAdd(e,i))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=this,e=t.dataTransfer,i={};e&&e.files&&e.files.length&&(t.preventDefault(),this._getDroppedFiles(e).always(function(e){i.files=e,!1!==n._trigger("drop",v.Event("drop",{delegatedEvent:t}),i)&&n._onAdd(t,i)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),v.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,t){var n=-1!==v.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,t),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof v||(e.fileInput=v(e.fileInput)),e.dropZone instanceof v||(e.dropZone=v(e.dropZone)),e.pasteZone instanceof v||(e.pasteZone=v(e.pasteZone))},_getRegExp:function(e){var t=e.split("/"),n=t.pop();return t.shift(),new RegExp(t.join("/"),n)},_isRegExpOption:function(e,t){return"url"!==e&&"string"===v.type(t)&&/^\/.*\/[igm]{0,3}$/.test(t)},_initDataAttributes:function(){var r=this,o=this.options,s=this.element.data();v.each(this.element[0].attributes,function(e,t){var n,i=t.name.toLowerCase();/^data-/.test(i)&&(i=i.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),n=s[i],r._isRegExpOption(i,n)&&(n=r._getRegExp(n)),o[i]=n)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var n=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,n._onAdd(null,t)}):(t.files=v.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var n,i,r=this,o=v.Deferred(),e=o.promise();return e.abort=function(){return i=!0,n?n.abort():(o.reject(null,"abort","abort"),e)},this._getFileInputFiles(t.fileInput).always(function(e){i||(e.length?(t.files=e,(n=r._onSend(null,t)).then(function(e,t,n){o.resolve(e,t,n)},function(e,t,n){o.reject(e,t,n)})):o.reject())}),this._enhancePromise(e)}if(t.files=v.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload"],e):"object"==typeof exports?e(require("jquery"),require("./jquery.fileupload")):e(window.jQuery)}(function(s){"use strict";var i=s.blueimp.fileupload.prototype.options.add;s.widget("blueimp.fileupload",s.blueimp.fileupload,{options:{processQueue:[],add:function(e,t){var n=s(this);t.process(function(){return n.fileupload("process",t)}),i.call(this,e,t)}},processActions:{},_processFile:function(e,i){var r=this,o=s.Deferred().resolveWith(r,[e]).promise();return this._trigger("process",null,e),s.each(e.processQueue,function(e,t){var n=function(e){return i.errorThrown?s.Deferred().rejectWith(r,[i]).promise():r.processActions[t.action].call(r,e,t)};o=o.then(n,t.always&&n)}),o.done(function(){r._trigger("processdone",null,e),r._trigger("processalways",null,e)}).fail(function(){r._trigger("processfail",null,e),r._trigger("processalways",null,e)}),o},_transformProcessQueue:function(r){var t=[];s.each(r.processQueue,function(){var n={},e=this.action,i=!0===this.prefix?e:this.prefix;s.each(this,function(e,t){"string"===s.type(t)&&"@"===t.charAt(0)?n[e]=r[t.slice(1)||(i?i+e.charAt(0).toUpperCase()+e.slice(1):e)]:n[e]=t}),t.push(n)}),r.processQueue=t},processing:function(){return this._processing},process:function(i){var r=this,o=s.extend({},this.options,i);return o.processQueue&&o.processQueue.length&&(this._transformProcessQueue(o),0===this._processing&&this._trigger("processstart"),s.each(i.files,function(e){var t=e?s.extend({},o):o,n=function(){return i.errorThrown?s.Deferred().rejectWith(r,[i]).promise():r._processFile(t,i)};t.index=e,r._processing+=1,r._processingQueue=r._processingQueue.then(n,n).always(function(){r._processing-=1,0===r._processing&&r._trigger("processstop")})})),this._processingQueue},_create:function(){this._super(),this._processing=0,this._processingQueue=s.Deferred().resolveWith(this).promise()}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","load-image-meta","load-image-scale","load-image-exif","canvas-to-blob","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("blueimp-load-image/js/load-image"),require("blueimp-load-image/js/load-image-meta"),require("blueimp-load-image/js/load-image-scale"),require("blueimp-load-image/js/load-image-exif"),require("blueimp-canvas-to-blob"),require("./jquery.fileupload-process")):e(window.jQuery,window.loadImage)}(function(a,l){"use strict";a.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadImageMetaData",disableImageHead:"@",disableExif:"@",disableExifThumbnail:"@",disableExifSub:"@",disableExifGps:"@",disabled:"@disableImageMetaDataLoad"},{action:"loadImage",prefix:!0,fileTypes:"@",maxFileSize:"@",noRevoke:"@",disabled:"@disableImageLoad"},{action:"resizeImage",prefix:"image",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",forceResize:"@",disabled:"@disableImageResize"},{action:"saveImage",quality:"@imageQuality",type:"@imageType",disabled:"@disableImageResize"},{action:"saveImageMetaData",disabled:"@disableImageMetaDataSave"},{action:"resizeImage",prefix:"preview",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",thumbnail:"@",canvas:"@",disabled:"@disableImagePreview"},{action:"setImage",name:"@imagePreviewName",disabled:"@disableImagePreview"},{action:"deleteImageReferences",disabled:"@disableImageReferencesDeletion"}),a.widget("blueimp.fileupload",a.blueimp.fileupload,{options:{loadImageFileTypes:/^image\/(gif|jpeg|png|svg\+xml)$/,loadImageMaxFileSize:1e7,imageMaxWidth:1920,imageMaxHeight:1080,imageOrientation:!1,imageCrop:!1,disableImageResize:!0,previewMaxWidth:80,previewMaxHeight:80,previewOrientation:!0,previewThumbnail:!0,previewCrop:!1,previewCanvas:!0},processActions:{loadImage:function(t,e){if(e.disabled)return t;var n=this,i=t.files[t.index],r=a.Deferred();return"number"===a.type(e.maxFileSize)&&i.size>e.maxFileSize||e.fileTypes&&!e.fileTypes.test(i.type)||!l(i,function(e){e.src&&(t.img=e),r.resolveWith(n,[t])},e)?t:r.promise()},resizeImage:function(t,n){if(n.disabled||!t.canvas&&!t.img)return t;n=a.extend({canvas:!0},n);var e,i=this,r=a.Deferred(),o=n.canvas&&t.canvas||t.img,s=function(e){e&&(e.width!==o.width||e.height!==o.height||n.forceResize)&&(t[e.getContext?"canvas":"img"]=e),t.preview=e,r.resolveWith(i,[t])};if(t.exif){if(!0===n.orientation&&(n.orientation=t.exif.get("Orientation")),n.thumbnail&&(e=t.exif.get("Thumbnail")))return l(e,s,n),r.promise();t.orientation?delete n.orientation:t.orientation=n.orientation}return o?(s(l.scale(o,n)),r.promise()):t},saveImage:function(t,e){if(!t.canvas||e.disabled)return t;var n=this,i=t.files[t.index],r=a.Deferred();return t.canvas.toBlob?(t.canvas.toBlob(function(e){e.name||(i.type===e.type?e.name=i.name:i.name&&(e.name=i.name.replace(/\.\w+$/,"."+e.type.substr(6)))),i.type!==e.type&&delete t.imageHead,t.files[t.index]=e,r.resolveWith(n,[t])},e.type||i.type,e.quality),r.promise()):t},loadImageMetaData:function(t,e){if(e.disabled)return t;var n=this,i=a.Deferred();return l.parseMetaData(t.files[t.index],function(e){a.extend(t,e),i.resolveWith(n,[t])},e),i.promise()},saveImageMetaData:function(e,t){if(!(e.imageHead&&e.canvas&&e.canvas.toBlob)||t.disabled)return e;var n=e.files[e.index],i=new Blob([e.imageHead,this._blobSlice.call(n,20)],{type:n.type});return i.name=n.name,e.files[e.index]=i,e},setImage:function(e,t){return e.preview&&!t.disabled&&(e.files[e.index][t.name||"preview"]=e.preview),e},deleteImageReferences:function(e,t){return t.disabled||(delete e.img,delete e.canvas,delete e.preview,delete e.imageHead),e}}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("./jquery.fileupload-process")):e(window.jQuery)}(function(s){"use strict";s.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),s.widget("blueimp.fileupload",s.blueimp.fileupload,{options:{getNumberOfFiles:s.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(e,t){if(t.disabled)return e;var n,i=s.Deferred(),r=this.options,o=e.files[e.index];return(t.minFileSize||t.maxFileSize)&&(n=o.size),"number"===s.type(t.maxNumberOfFiles)&&(r.getNumberOfFiles()||0)+e.files.length>t.maxNumberOfFiles?o.error=r.i18n("maxNumberOfFiles"):!t.acceptFileTypes||t.acceptFileTypes.test(o.type)||t.acceptFileTypes.test(o.name)?n>t.maxFileSize?o.error=r.i18n("maxFileSize"):"number"===s.type(n)&&n<t.minFileSize?o.error=r.i18n("minFileSize"):delete o.error:o.error=r.i18n("acceptFileTypes"),o.error||e.files.error?(e.files.error=!0,i.rejectWith(this,[e])):i.resolveWith(this,[e]),i.promise()}}})}),window.kojqui={version:"2.2.2"},function(e,t){"use strict";e.kojqui.utils=function(e,n){var t,i,r,o,s;i=(t=(e.ui.version||"").match(/^(\d)\.(\d+)/))?{major:parseInt(t[1],10),minor:parseInt(t[2],10)}:null;return r=["foreach","if","ifnot","with","html","text","options"],o=Object.create||function(e){function t(){}return t.prototype=e,new t},s=function(e){var t=new e;n.bindingHandlers[t.widgetName]={after:n.utils.arrayGetDistinctValues(r.concat(t.after||[])),init:t.init.bind(t),update:t.update.bind(t)}},{uiVersion:i,descendantControllingBindings:r,createObject:o,register:s}}(e.jQuery,e.ko,e.jQuery.ui.core)}(this),function(e,t){"use strict";var u,d,h,f,p,m,n;e.kojqui.BindingHandler=(u=e.jQuery,d=e.ko,h=e.kojqui.utils,e.jQuery.ui.widget,f="__kojqui_options",p=function(t,e){var n={};return d.utils.arrayForEach(e,function(e){void 0!==t[e]&&(n[e]=d.utils.unwrapObservable(t[e]))}),n},m=function(e,t,n){d.isObservable(n.refreshOn)&&d.computed({read:function(){n.refreshOn(),u(t)[e]("refresh")},disposeWhenNodeIsRemoved:t})},(n=function(e){this.widgetName=e,this.widgetEventPrefix=e,this.options=[],this.events=[],this.after=[],this.hasRefresh=!1}).prototype.init=function(e,t,n,i,r){var o,s,a,l,c;return o=this.widgetName,s=t(),a=p(s,this.options),l=p(s,this.events),(c=!d.utils.arrayFirst(h.descendantControllingBindings,function(e){return this.hasOwnProperty(e)},n()))&&d.applyBindingsToDescendants(r,e),d.utils.domData.set(e,f,a),u.each(l,function(e,t){l[e]=t.bind(i)}),u(e)[o](d.utils.extend(a,l)),this.hasRefresh&&m(o,e,s),d.isWriteableObservable(s.widget)&&s.widget(u(e)),d.utils.domNodeDisposal.addDisposeCallback(e,function(){u(e)[o]("destroy")}),{controlsDescendantBindings:c}},n.prototype.update=function(n,e){var i,t,r,o;i=this.widgetName,t=e(),r=d.utils.domData.get(n,f),o=p(t,this.options),u.each(o,function(e,t){t!==r[e]&&u(n)[i]("option",e,o[e])}),d.utils.domData.set(n,f,o)},n.prototype.on=function(e,t,n){var i;i=[(i=t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),".",this.widgetName].join(""),u(e).on(i,n),d.utils.domNodeDisposal.addDisposeCallback(e,function(){u(e).off(i)})},n)}(this),function(e,t){"use strict";var o,s,n,a,i;e.kojqui.Accordion=(o=e.jQuery,s=e.ko,n=e.kojqui.utils,a=e.kojqui.BindingHandler,e.jQuery.ui.accordion,(((i=function(){a.call(this,"accordion"),1===n.uiVersion.major&&8===n.uiVersion.minor?(this.options=["active","animated","autoHeight","clearStyle","collapsible","disabled","event","fillSpace","header","icons","navigation","navigationFilter"],this.events=["change","changestart","create"],this.hasRefresh=!1,this.eventToWatch="change"):(this.options=["active","animate","collapsible","disabled","event","header","heightStyle","icons"],this.events=["activate","beforeActivate","create"],this.hasRefresh=!0,this.eventToWatch="activate")}).prototype=n.createObject(a.prototype)).constructor=i).prototype.init=function(e,t){var n,i,r;return n=this.widgetName,i=t(),r=a.prototype.init.apply(this,arguments),s.isWriteableObservable(i.active)&&this.on(e,this.eventToWatch,function(){i.active(o(e)[n]("option","active"))}),r},n.register(i),i)}(this),function(e,t){"use strict";var n,i,r;e.kojqui.Autocomplete=(n=e.kojqui.BindingHandler,i=e.kojqui.utils,e.jQuery.ui.autocomplete,((r=function(){n.call(this,"autocomplete"),this.options=["appendTo","autoFocus","delay","disabled","minLength","position","source"],1===i.uiVersion.major&&8===i.uiVersion.minor?this.events=["change","close","create","focus","open","search","select"]:(this.options.push("messages"),this.events=["change","close","create","focus","open","response","search","select"])}).prototype=i.createObject(n.prototype)).constructor=r,i.register(r),r)}(this),function(e,t){"use strict";var n,i,r;e.kojqui.Button=(n=e.kojqui.BindingHandler,i=e.kojqui.utils,e.jQuery.ui.button,((r=function(){n.call(this,"button"),this.options=["disabled","icons","label","text"],this.events=["create"],this.hasRefresh=!0}).prototype=i.createObject(n.prototype)).constructor=r,i.register(r),r)}(this),function(e,t){"use strict";var n,i,r;e.kojqui.Buttonset=(n=e.kojqui.BindingHandler,i=e.kojqui.utils,e.jQuery.ui.button,((r=function(){n.call(this,"buttonset"),this.options=["items","disabled"],this.events=["create"],this.hasRefresh=!0}).prototype=i.createObject(n.prototype)).constructor=r,i.register(r),r)}(this),function(e,t){"use strict";var l,c,u,n,i;e.kojqui.Datepicker=(l=e.jQuery,c=e.ko,u=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.datepicker,(((i=function(){u.call(this,"datepicker"),this.options=["altField","altFormat","appendText","autoSize","buttonImage","buttonImageOnly","buttonText","calculateWeek","changeMonth","changeYear","closeText","constrainInput","currentText","dateFormat","dayNames","dayNamesMin","dayNamesShort","defaultDate","duration","firstDay","gotoCurrent","hideIfNoPrevNext","isRTL","maxDate","minDate","monthNames","monthNamesShort","navigationAsDateFormat","nextText","numberOfMonths","prevText","selectOtherMonths","shortYearCutoff","showAnim","showButtonPanel","showCurrentAtPos","showMonthAfterYear","showOn","showOptions","showOtherMonths","showWeek","stepMonths","weekHeader","yearRange","yearSuffix","beforeShow","beforeShowDay","onChangeMonthYear","onClose","onSelect"],this.hasRefresh=!0}).prototype=n.createObject(u.prototype)).constructor=i).prototype.init=function(i,e){var t,r,o,n,s,a;return t=u.prototype.init.apply(this,arguments),r=this.widgetName,o=e(),(n=c.utils.unwrapObservable(o.value))&&l(i)[r]("setDate",n),l(i).change(function(e){var t,n;t=l(i)[r]("option","dateFormat"),n=l.datepicker.parseDate(t,l(this).val()),o.value(n)}),c.isObservable(o.value)&&(s=o.value.subscribe(function(e){l(i)[r]("setDate",e)}),c.utils.domNodeDisposal.addDisposeCallback(i,function(){s.dispose()})),c.isWriteableObservable(o.value)&&(a=l(i)[r]("option","onSelect"),l(i)[r]("option","onSelect",function(e){var t,n;t=l(i)[r]("option","dateFormat"),n=l.datepicker.parseDate(t,e),o.value(n),"function"==typeof a&&a.apply(this,Array.prototype.slice.call(arguments))})),t},n.register(i),i)}(this),function(e,t){"use strict";var o,s,a,n,i;e.kojqui.Dialog=(o=e.jQuery,s=e.ko,a=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.dialog,(((i=function(){a.call(this,"dialog"),1===n.uiVersion.major&&8===n.uiVersion.minor?this.options=["autoOpen","buttons","closeOnEscape","closeText","dialogClass","disabled","draggable","height","maxHeight","maxWidth","minHeight","minWidth","modal","position","resizable","show","stack","title","width","zIndex"]:1===n.uiVersion.major&&9===n.uiVersion.minor?this.options=["autoOpen","buttons","closeOnEscape","closeText","dialogClass","draggable","height","hide","maxHeight","maxWidth","minHeight","minWidth","modal","position","resizable","show","stack","title","width","zIndex"]:this.options=["appendTo","autoOpen","buttons","closeOnEscape","closeText","dialogClass","draggable","height","hide","maxHeight","maxWidth","minHeight","minWidth","modal","position","resizable","show","title","width"],this.events=["beforeClose","create","open","focus","dragStart","drag","dragStop","resizeStart","resize","resizeStop","close"]}).prototype=n.createObject(a.prototype)).constructor=i).prototype.init=function(e,t){var n,i,r;return(n=document.createElement("DIV")).style.display="none",e.parentNode.insertBefore(n,e),s.utils.domNodeDisposal.addDisposeCallback(n,function(){s.removeNode(e)}),i=a.prototype.init.apply(this,arguments),(r=t()).isOpen&&s.computed({read:function(){s.utils.unwrapObservable(r.isOpen)?o(e)[this.widgetName]("open"):o(e)[this.widgetName]("close")},disposeWhenNodeIsRemoved:e,owner:this}),s.isWriteableObservable(r.isOpen)&&(this.on(e,"open",function(){r.isOpen(!0)}),this.on(e,"close",function(){r.isOpen(!1)})),s.isWriteableObservable(r.width)&&this.on(e,"resizestop",function(e,t){r.width(Math.round(t.size.width))}),s.isWriteableObservable(r.height)&&this.on(e,"resizestop",function(e,t){r.height(Math.round(t.size.height))}),i},n.register(i),i)}(this),function(e,t){"use strict";var n,i,r;e.kojqui.Menu=(n=e.kojqui.BindingHandler,i=e.kojqui.utils,e.jQuery.ui.menu,((r=function(){n.call(this,"menu"),1===i.uiVersion.major&&i.uiVersion.minor<11?this.options=["disabled","icons","menus","position","role"]:this.options=["disabled","icons","items","menus","position","role"],this.events=["blur","create","focus","select"],this.hasRefresh=!0}).prototype=i.createObject(n.prototype)).constructor=r,i.register(r),r)}(this),function(e,t){"use strict";var n,i,r;e.kojqui.Progressbar=(n=e.kojqui.BindingHandler,i=e.kojqui.utils,e.jQuery.ui.progressbar,((r=function(){n.call(this,"progressbar"),this.events=["change","create","complete"],this.hasRefresh=!0,1===i.uiVersion.major&&8===i.uiVersion.minor?this.options=["disabled","value"]:this.options=["disabled","max","value"]}).prototype=i.createObject(n.prototype)).constructor=r,i.register(r),r)}(this),function(e,t){"use strict";var r,o,s,n,i;e.kojqui.Selectmenu=(r=e.jQuery,o=e.ko,s=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.selectmenu,(((i=function(){s.call(this,"selectmenu"),this.after=["value"],this.options=["appendTo","disabled","icons","position","width"],this.events=["change","close","create","focus","open","select"],this.hasRefresh=!0}).prototype=n.createObject(s.prototype)).constructor=i).prototype.init=function(e,t){var n,i;return n=t(),i=s.prototype.init.apply(this,arguments),n.hasOwnProperty("isOpen")&&o.computed({read:function(){o.utils.unwrapObservable(n.isOpen)?r(e)[this.widgetName]("open"):r(e)[this.widgetName]("close")},disposeWhenNodeIsRemoved:e,owner:this}),o.isWriteableObservable(n.isOpen)&&(this.on(e,"open",function(){n.isOpen(!0)}),this.on(e,"close",function(){n.isOpen(!1)})),this.on(e,"change",function(){r(e).trigger("change")}),i},i.prototype.update=function(e,t,n){s.prototype.update.apply(this,arguments),n().hasOwnProperty("value")&&o.utils.domData.get(e,"__kojqui_selectmenu_value")!==o.utils.unwrapObservable(n().value)&&r(e).selectmenu("refresh")},n.register(i),i)}(this),function(e,t){"use strict";var o,s,a,n,l,i;e.kojqui.Slider=(o=e.jQuery,s=e.ko,a=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.slider,l="__kojqui_options",(((i=function(){a.call(this,"slider"),this.widgetEventPrefix="slide",this.options=["animate","disabled","max","min","orientation","range","step","value","values"],this.events=["create","start","slide","change","stop"]}).prototype=n.createObject(a.prototype)).constructor=i).prototype.init=function(n,e){var t,i,r;return t=a.prototype.init.apply(this,arguments),r=(i=e()).realtime?"slide":"change",s.isWriteableObservable(i.value)&&this.on(n,r,function(e,t){0===o(n).find(".ui-slider-handle").index(t.handle)&&(s.utils.domData.get(n,l).value=t.value,i.value(t.value))}),s.isWriteableObservable(i.values)&&this.on(n,r,function(e,t){s.utils.domData.get(n,l).value=t.values,i.values(t.values)}),t},n.register(i),i)}(this),function(e,t){"use strict";var o,s,a,n,i;e.kojqui.Spinner=(o=e.jQuery,s=e.ko,a=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.spinner,(((i=function(){a.call(this,"spinner"),this.widgetEventPrefix="spin",this.options=["culture","disabled","icons","incremental","max","min","numberFormat","page","step"],this.events=["create","start","spin","stop","change"]}).prototype=n.createObject(a.prototype)).constructor=i).prototype.init=function(e,t){var n,i,r;return n=a.prototype.init.apply(this,arguments),i=this.widgetName,(r=t()).value&&s.computed({read:function(){o(e)[i]("value",s.utils.unwrapObservable(r.value))},disposeWhenNodeIsRemoved:e}),s.isWriteableObservable(r.value)&&(this.on(e,"spin",function(e,t){r.value(t.value)}),this.on(e,"change",function(){r.value(o(e)[i]("value"))})),n},n.register(i),i)}(this),function(e,t){"use strict";var r,o,i,n,s,a,l;e.kojqui.Tabs=(r=e.jQuery,o=e.ko,i=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.tabs,s=function(n,e){var i=e();o.isWriteableObservable(i.selected)&&this.on(n,"show",function(e,t){r(n)[0]===e.target&&i.selected(t.index)})},a=function(n,e){var i=e();o.isWriteableObservable(i.active)&&this.on(n,"activate",function(e,t){r(n)[0]===e.target&&i.active(t.newTab.index())})},(((l=function(){i.call(this,"tabs"),this.version=n.uiVersion,1===this.version.major&&8===this.version.minor?(this.options=["ajaxOptions","cache","collapsible","cookie","disabled","event","fx","idPrefix","panelTemplate","selected","spinner","tabTemplate"],this.events=["add","create","disable","enable","load","remove","select","show"],this.hasRefresh=!1):(this.options=["active","collapsible","disabled","event","heightStyle","hide","show"],this.events=["activate","beforeActivate","beforeLoad","create","load"],this.hasRefresh=!0)}).prototype=n.createObject(i.prototype)).constructor=l).prototype.init=function(e,t){var n=i.prototype.init.apply(this,arguments);return 1===this.version.major&&8===this.version.minor?s.call(this,e,t):a.call(this,e,t),n},n.register(l),l)}(this),function(e,t){"use strict";var r,o,s,n,i;e.kojqui.Tooltip=(r=e.jQuery,o=e.ko,s=e.kojqui.BindingHandler,n=e.kojqui.utils,e.jQuery.ui.tooltip,(((i=function(){s.call(this,"tooltip"),this.options=["content","disabled","hide","items","position","show","tooltipClass","track"],this.events=["create","open","close"]}).prototype=n.createObject(s.prototype)).constructor=i).prototype.init=function(e,t){var n,i;return n=t(),i=s.prototype.init.apply(this,arguments),n.isOpen&&o.computed({read:function(){o.utils.unwrapObservable(n.isOpen)?r(e)[this.widgetName]("open"):r(e)[this.widgetName]("close")},disposeWhenNodeIsRemoved:e,owner:this}),o.isWriteableObservable(n.isOpen)&&(this.on(e,"open",function(){n.isOpen(!0)}),this.on(e,"close",function(){n.isOpen(!1)})),i},n.register(i),i)}(this),function(a,ye){"use strict";var l={};function e(e,t,n){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(t===ye)throw"invalid module definition, dependencies must be specified";if(n===ye)throw"invalid module definition, definition function must be specified";!function(e,t){for(var n,i=[],r=0;r<e.length;++r){if(!(n=l[e[r]]||o(e[r])))throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}(t,function(){l[e]=n.apply(null,arguments)})}function o(e){for(var t=a,n=e.split(/[.\/]/),i=0;i<n.length;++i){if(!t[n[i]])return;t=t[n[i]]}return t}e("tinymce/geom/Rect",[],function(){var s=Math.min,f=Math.max,c=Math.round;function a(e,t,n){var i,r,o,s,a,l;return i=t.x,r=t.y,o=e.w,s=e.h,a=t.w,l=t.h,"b"===(n=(n||"").split(""))[0]&&(r+=l),"r"===n[1]&&(i+=a),"c"===n[0]&&(r+=c(l/2)),"c"===n[1]&&(i+=c(a/2)),"b"===n[3]&&(r-=s),"r"===n[4]&&(i-=o),"c"===n[3]&&(r-=c(s/2)),"c"===n[4]&&(i-=c(o/2)),p(i,r,o,s)}function p(e,t,n,i){return{x:e,y:t,w:n,h:i}}return{inflate:function(e,t,n){return p(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:a,findBestRelativePosition:function(e,t,n,i){var r,o;for(o=0;o<i.length;o++)if((r=a(e,t,i[o])).x>=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},intersect:function(e,t){var n,i,r,o;return n=f(e.x,t.x),i=f(e.y,t.y),r=s(e.x+e.w,t.x+t.w),o=s(e.y+e.h,t.y+t.h),r-n<0||o-i<0?null:p(n,i,r-n,o-i)},clamp:function(e,t,n){var i,r,o,s,a,l,c,u,d,h;return a=e.x,l=e.y,c=e.x+e.w,u=e.y+e.h,d=t.x+t.w,h=t.y+t.h,i=f(0,t.x-a),r=f(0,t.y-l),o=f(0,c-d),s=f(0,u-h),a+=i,l+=r,n&&(c+=i,u+=r,a-=o,l-=s),p(a,l,(c-=o)-a,(u-=s)-l)},create:p,fromClientRect:function(e){return p(e.left,e.top,e.width,e.height)}}}),e("tinymce/util/Promise",[],function(){if(window.Promise)return window.Promise;var e=o.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)};function n(e,t){return function(){e.apply(t,arguments)}}var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],c(e,n(i,this),n(r,this))}function s(n){var i=this;null!==this._state?e(function(){var e=i._state?n.onFulfilled:n.onRejected;if(null!==e){var t;try{t=e(i._value)}catch(e){return void n.reject(e)}n.resolve(t)}else(i._state?n.resolve:n.reject)(i._value)}):this._deferreds.push(n)}function i(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void c(n(t,e),n(i,this),n(r,this))}this._state=!0,this._value=e,a.call(this)}catch(e){r.call(this,e)}}function r(e){this._state=!1,this._value=e,a.call(this)}function a(){for(var e=0,t=this._deferreds.length;e<t;e++)s.call(this,this._deferreds[e]);this._deferreds=null}function l(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function c(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(e){if(i)return;i=!0,n(e)}}return o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(n,i){var r=this;return new o(function(e,t){s.call(r,new l(n,i,e,t))})},o.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&t(arguments[0])?arguments[0]:arguments);return new o(function(i,r){if(0===a.length)return i([]);var o=a.length;function s(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){s(t,e)},r)}a[t]=e,0==--o&&i(a)}catch(e){r(e)}}for(var e=0;e<a.length;e++)s(e,a[e])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(n){return new o(function(e,t){t(n)})},o.race=function(r){return new o(function(e,t){for(var n=0,i=r.length;n<i;n++)r[n].then(e,t)})},o}),e("tinymce/util/Delay",["tinymce/util/Promise"],function(n){var i;function r(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function o(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function e(t,n){var i,e;return(e=function(){var e=arguments;clearTimeout(i),i=r(function(){t.apply(this,e)},n)}).stop=function(){clearTimeout(i)},e}return{requestAnimationFrame:function(e,t){i?i.then(e):i=new n(function(e){t||(t=document.body),function(e,t){var n,i=window.requestAnimationFrame,r=["ms","moz","webkit"];for(n=0;n<r.length&&!i;n++)i=window[r[n]+"RequestAnimationFrame"];i||(i=function(e){window.setTimeout(e,0)}),i(e,t)}(e,t)}).then(e)},setTimeout:r,setInterval:o,setEditorTimeout:function(e,t,n){return r(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var i;return i=o(function(){e.removed?clearInterval(i):t()},n)},debounce:e,throttle:e,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}}}),e("tinymce/Env",[],function(){var e,t,n,i,r,o,s,a,l,c,u,d,h,f=navigator,p=f.userAgent;function m(e){return"matchMedia"in window&&matchMedia(e).matches}return e=window.opera&&window.opera.buildNumber,l=/Android/.test(p),n=(n=!(t=/WebKit/.test(p))&&!e&&/MSIE/gi.test(p)&&/Explorer/gi.test(f.appName))&&/MSIE (\w+)\./.exec(p)[1],i=-1!=p.indexOf("Trident/")&&(-1!=p.indexOf("rv:")||-1!=f.appName.indexOf("Netscape"))&&11,r=-1!=p.indexOf("Edge/")&&!n&&!i&&12,n=n||i||r,o=!t&&!i&&/Gecko/.test(p),s=-1!=p.indexOf("Mac"),a=/(iPad|iPhone)/.test(p),c="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,u=m("only screen and (max-device-width: 480px)")&&(l||a),d=m("only screen and (min-width: 800px)")&&(l||a),h=-1!=p.indexOf("Windows Phone"),r&&(t=!1),{opera:e,webkit:t,ie:n,gecko:o,mac:s,iOS:a,android:l,contentEditable:!a||c||534<=p.match(/AppleWebKit\/(\d*)/)[1],transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=n,range:window.getSelection&&"Range"in window,documentMode:n&&!r?document.documentMode||7:10,fileApi:c,ceFalse:!1===n||8<n,canHaveCSP:!1===n||11<n,desktop:!u&&!d,windowsPhone:h}}),e("tinymce/dom/EventUtils",["tinymce/util/Delay","tinymce/Env"],function(s,f){var p=/^(?:mouse|contextmenu)|click/,m={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};function x(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function h(e,t,n,i){e.removeEventListener?e.removeEventListener(t,n,i||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function w(e,t){var n,i,r,o,s,a=t||{};function l(){return!1}function c(){return!0}for(n in e)m[n]||(a[n]=e[n]);if(a.target||(a.target=a.srcElement||document),f.experimentalShadowDom&&(a.target=(i=e,r=a.target,s=r,(o=i.path)&&0<o.length&&(s=o[0]),i.deepPath&&(o=i.deepPath())&&0<o.length&&(s=o[0]),s)),e&&p.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var u=a.target.ownerDocument||document,d=u.documentElement,h=u.body;a.pageX=e.clientX+(d&&d.scrollLeft||h&&h.scrollLeft||0)-(d&&d.clientLeft||h&&h.clientLeft||0),a.pageY=e.clientY+(d&&d.scrollTop||h&&h.scrollTop||0)-(d&&d.clientTop||h&&h.clientTop||0)}return a.preventDefault=function(){a.isDefaultPrevented=c,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},a.stopPropagation=function(){a.isPropagationStopped=c,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},a.stopImmediatePropagation=function(){a.isImmediatePropagationStopped=c,a.stopPropagation()},a.isDefaultPrevented||(a.isDefaultPrevented=l,a.isPropagationStopped=l,a.isImmediatePropagationStopped=l),void 0===a.metaKey&&(a.metaKey=!1),a}function C(e,t,n){var i=e.document,r={type:"ready"};function o(){n.domLoaded||(n.domLoaded=!0,t(r))}n.domLoaded?t(r):(i.addEventListener?"complete"===i.readyState?o():x(e,"DOMContentLoaded",o):(x(i,"readystatechange",function e(){("complete"===i.readyState||"interactive"===i.readyState&&i.body)&&(h(i,"readystatechange",e),o())}),i.documentElement.doScroll&&e.self===e.top&&function t(){try{i.documentElement.doScroll("left")}catch(e){return void s.setTimeout(t)}o()}()),x(e,"load",o))}function e(){var f,p,m,g,v,y=this,b={};function _(e,t){var n,i,r,o,s=b[t];if(n=s&&s[e.type])for(i=0,r=n.length;i<r;i++)if((o=n[i])&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}p="mce-data-"+(+new Date).toString(32),g="onmouseenter"in document.documentElement,m="onfocusin"in document.documentElement,v={mouseenter:"mouseover",mouseleave:"mouseout"},f=1,y.domLoaded=!1,y.events=b,y.bind=function(e,t,n,i){var r,o,s,a,l,c,u,d=window;function h(e){_(w(e||d.event),r)}if(e&&3!==e.nodeType&&8!==e.nodeType){for(e[p]?r=e[p]:(r=f++,e[p]=r,b[r]={}),i=i||e,s=(t=t.split(" ")).length;s--;)c=h,l=u=!1,"DOMContentLoaded"===(a=t[s])&&(a="ready"),y.domLoaded&&"ready"===a&&"complete"==e.readyState?n.call(i,w({type:a})):(g||(l=v[a])&&(c=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=w(e||d.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,_(e,r))}),m||"focusin"!==a&&"focusout"!==a||(u=!0,l="focusin"===a?"focus":"blur",c=function(e){(e=w(e||d.event)).type="focus"===e.type?"focusin":"focusout",_(e,r)}),(o=b[r][a])?"ready"===a&&y.domLoaded?n({type:a}):o.push({func:n,scope:i}):(b[r][a]=o=[{func:n,scope:i}],o.fakeName=l,o.capture=u,o.nativeHandler=c,"ready"===a?C(e,c,y):x(e,l||a,c,u)));return e=o=0,n}},y.unbind=function(t,e,n){var i,r,o,s,a,l;if(!t||3===t.nodeType||8===t.nodeType)return y;if(i=t[p]){if(l=b[i],e){for(o=(e=e.split(" ")).length;o--;)if(r=l[a=e[o]]){if(n)for(s=r.length;s--;)if(r[s].func===n){var c=r.nativeHandler,u=r.fakeName,d=r.capture;(r=r.slice(0,s).concat(r.slice(s+1))).nativeHandler=c,r.fakeName=u,r.capture=d,l[a]=r}n&&0!==r.length||(delete l[a],h(t,r.fakeName||a,r.nativeHandler,r.capture))}}else{for(a in l)h(t,(r=l[a]).fakeName||a,r.nativeHandler,r.capture);l={}}for(a in l)return y;delete b[i];try{delete t[p]}catch(e){t[p]=null}}return y},y.fire=function(e,t,n){var i;if(!e||3===e.nodeType||8===e.nodeType)return y;for((n=w(null,n)).type=t,n.target=e;(i=e[p])&&_(n,i),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!n.isPropagationStopped(););return y},y.clean=function(e){var t,n,i=y.unbind;if(!e||3===e.nodeType||8===e.nodeType)return y;if(e[p]&&i(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(i(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[p]&&i(e);return y},y.destroy=function(){b={}},y.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}return(e.Event=new e).bind(window,"ready",function(){}),e}),e("tinymce/dom/Sizzle",[],function(){var e,p,_,o,i,m,d,g,x,c,u,v,w,r,y,b,s,a,C,k="sizzle"+-new Date,T=window.document,S=0,n=0,l=ne(),h=ne(),f=ne(),E=function(e,t){return e===t&&(u=!0),0},N=typeof ye,D={}.hasOwnProperty,t=[],R=t.pop,A=t.push,P=t.push,M=t.slice,I=t.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",H="\\["+B+"*("+L+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+B+"*\\]",F=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),j=new RegExp("^"+B+"*,"+B+"*"),W=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),U=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),q=new RegExp(F),V=new RegExp("^"+L+"$"),$={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,G=/'|\\/g,Z=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),ee=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{P.apply(t=M.call(T.childNodes),T.childNodes),t[T.childNodes.length].nodeType}catch(e){P={apply:t.length?function(e,t){A.apply(e,M.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function te(e,t,n,i){var r,o,s,a,l,c,u,d,h,f;if((t?t.ownerDocument||t:T)!==w&&v(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=(t=t||w).nodeType)&&9!==a)return[];if(y&&!i){if(r=X.exec(e))if(s=r[1]){if(9===a){if(!(o=t.getElementById(s))||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&C(t,o)&&o.id===s)return n.push(o),n}else{if(r[2])return P.apply(n,t.getElementsByTagName(e)),n;if((s=r[3])&&p.getElementsByClassName)return P.apply(n,t.getElementsByClassName(s)),n}if(p.qsa&&(!b||!b.test(e))){if(d=u=k,h=t,f=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=m(e),(u=t.getAttribute("id"))?d=u.replace(G,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",l=c.length;l--;)c[l]=d+he(c[l]);h=Q.test(e)&&ue(t.parentNode)||t,f=c.join(",")}if(f)try{return P.apply(n,h.querySelectorAll(f)),n}catch(e){}finally{u||t.removeAttribute("id")}}}return g(e.replace(z,"$1"),t,n,i)}function ne(){var i=[];return function e(t,n){return i.push(t+" ")>_.cacheLength&&delete e[i.shift()],e[t+" "]=n}}function ie(e){return e[k]=!0,e}function re(e){var t=w.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function oe(e,t){for(var n=e.split("|"),i=e.length;i--;)_.attrHandle[n[i]]=t}function se(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ae(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function le(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ce(s){return ie(function(o){return o=+o,ie(function(e,t){for(var n,i=s([],e.length,o),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}function ue(e){return e&&typeof e.getElementsByTagName!==N&&e}for(e in p=te.support={},i=te.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},v=te.setDocument=function(e){var t,l=e?e.ownerDocument||e:T,n=l.defaultView;return l!==w&&9===l.nodeType&&l.documentElement?(r=(w=l).documentElement,y=!i(l),n&&n!==function(e){try{return e.top}catch(e){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){v()},!1):n.attachEvent&&n.attachEvent("onunload",function(){v()})),p.attributes=re(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=re(function(e){return e.appendChild(l.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=Y.test(l.getElementsByClassName),p.getById=re(function(e){return r.appendChild(e).id=k,!l.getElementsByName||!l.getElementsByName(k).length}),p.getById?(_.find.ID=function(e,t){if(typeof t.getElementById!==N&&y){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}}):(delete _.find.ID,_.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=typeof e.getAttributeNode!==N&&e.getAttributeNode("id");return t&&t.value===n}}),_.find.TAG=p.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==N)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},_.find.CLASS=p.getElementsByClassName&&function(e,t){if(y)return t.getElementsByClassName(e)},s=[],b=[],(p.qsa=Y.test(l.querySelectorAll))&&(re(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&b.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||b.push("\\["+B+"*(?:value|"+O+")"),e.querySelectorAll(":checked").length||b.push(":checked")}),re(function(e){var t=l.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&b.push("name"+B+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||b.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),b.push(",.*:")})),(p.matchesSelector=Y.test(a=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.msMatchesSelector))&&re(function(e){p.disconnectedMatch=a.call(e,"div"),a.call(e,"[s!='']:x"),s.push("!=",F)}),b=b.length&&new RegExp(b.join("|")),s=s.length&&new RegExp(s.join("|")),t=Y.test(r.compareDocumentPosition),C=t||Y.test(r.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},E=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument===T&&C(T,e)?-1:t===l||t.ownerDocument===T&&C(T,t)?1:c?I.call(c,e)-I.call(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===l?-1:t===l?1:r?-1:o?1:c?I.call(c,e)-I.call(c,t):0;if(r===o)return se(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?se(s[i],a[i]):s[i]===T?-1:a[i]===T?1:0},l):w},te.matches=function(e,t){return te(e,null,null,t)},te.matchesSelector=function(e,t){if((e.ownerDocument||e)!==w&&v(e),t=t.replace(U,"='$1']"),p.matchesSelector&&y&&(!s||!s.test(t))&&(!b||!b.test(t)))try{var n=a.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<te(t,w,null,[e]).length},te.contains=function(e,t){return(e.ownerDocument||e)!==w&&v(e),C(e,t)},te.attr=function(e,t){(e.ownerDocument||e)!==w&&v(e);var n=_.attrHandle[t.toLowerCase()],i=n&&D.call(_.attrHandle,t.toLowerCase())?n(e,t,!y):ye;return i!==ye?i:p.attributes||!y?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},te.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},te.uniqueSort=function(e){var t,n=[],i=0,r=0;if(u=!p.detectDuplicates,c=!p.sortStable&&e.slice(0),e.sort(E),u){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return c=null,e},o=te.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+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=o(t);return n},(_=te.selectors={cacheLength:50,createPseudo:ie,match:$,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||te.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]&&te.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=m(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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=l[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&l(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==N&&e.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(e){var t=te.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===r:"!="===i?t!==r:"^="===i?r&&0===t.indexOf(r):"*="===i?r&&-1<t.indexOf(r):"$="===i?r&&t.slice(-r.length)===r:"~="===i?-1<(" "+t+" ").indexOf(r):"|="===i&&(t===r||t.slice(0,r.length+1)===r+"-"))}},CHILD:function(f,e,t,p,m){var g="nth"!==f.slice(0,3),v="last"!==f.slice(-4),y="of-type"===e;return 1===p&&0===m?function(e){return!!e.parentNode}:function(e,t,n){var i,r,o,s,a,l,c=g!==v?"nextSibling":"previousSibling",u=e.parentNode,d=y&&e.nodeName.toLowerCase(),h=!n&&!y;if(u){if(g){for(;c;){for(o=e;o=o[c];)if(y?o.nodeName.toLowerCase()===d:1===o.nodeType)return!1;l=c="only"===f&&!l&&"nextSibling"}return!0}if(l=[v?u.firstChild:u.lastChild],v&&h){for(a=(i=(r=u[k]||(u[k]={}))[f]||[])[0]===S&&i[1],s=i[0]===S&&i[2],o=a&&u.childNodes[a];o=++a&&o&&o[c]||(s=a=0)||l.pop();)if(1===o.nodeType&&++s&&o===e){r[f]=[S,a,s];break}}else if(h&&(i=(e[k]||(e[k]={}))[f])&&i[0]===S)s=i[1];else for(;(o=++a&&o&&o[c]||(s=a=0)||l.pop())&&((y?o.nodeName.toLowerCase()!==d:1!==o.nodeType)||!++s||(h&&((o[k]||(o[k]={}))[f]=[S,s]),o!==e)););return(s-=m)===p||s%p==0&&0<=s/p}}},PSEUDO:function(e,o){var t,s=_.pseudos[e]||_.setFilters[e.toLowerCase()]||te.error("unsupported pseudo: "+e);return s[k]?s(o):1<s.length?(t=[e,e,"",o],_.setFilters.hasOwnProperty(e.toLowerCase())?ie(function(e,t){for(var n,i=s(e,o),r=i.length;r--;)e[n=I.call(e,i[r])]=!(t[n]=i[r])}):function(e){return s(e,0,t)}):s}},pseudos:{not:ie(function(e){var i=[],r=[],a=d(e.replace(z,"$1"));return a[k]?ie(function(e,t,n,i){for(var r,o=a(e,null,i,[]),s=e.length;s--;)(r=o[s])&&(e[s]=!(t[s]=r))}):function(e,t,n){return i[0]=e,a(i,null,n,r),!r.pop()}}),has:ie(function(t){return function(e){return 0<te(t,e).length}}),contains:ie(function(t){return t=t.replace(Z,ee),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:ie(function(n){return V.test(n||"")||te.error("unsupported lang: "+n),n=n.replace(Z,ee).toLowerCase(),function(e){var t;do{if(t=y?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===w.activeElement&&(!w.hasFocus||w.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!_.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return K.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:ce(function(){return[0]}),last:ce(function(e,t){return[t-1]}),eq:ce(function(e,t,n){return[n<0?n+t:n]}),even:ce(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ce(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ce(function(e,t,n){for(var i=n<0?n+t:n;0<=--i;)e.push(i);return e}),gt:ce(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=_.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[e]=ae(e);for(e in{submit:!0,reset:!0})_.pseudos[e]=le(e);function de(){}function he(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function fe(s,e,t){var a=e.dir,l=t&&"parentNode"===a,c=n++;return e.first?function(e,t,n){for(;e=e[a];)if(1===e.nodeType||l)return s(e,t,n)}:function(e,t,n){var i,r,o=[S,c];if(n){for(;e=e[a];)if((1===e.nodeType||l)&&s(e,t,n))return!0}else for(;e=e[a];)if(1===e.nodeType||l){if((i=(r=e[k]||(e[k]={}))[a])&&i[0]===S&&i[1]===c)return o[2]=i[2];if((r[a]=o)[2]=s(e,t,n))return!0}}}function pe(r){return 1<r.length?function(e,t,n){for(var i=r.length;i--;)if(!r[i](e,t,n))return!1;return!0}:r[0]}function me(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function ge(f,p,m,g,v,e){return g&&!g[k]&&(g=ge(g)),v&&!v[k]&&(v=ge(v,e)),ie(function(e,t,n,i){var r,o,s,a=[],l=[],c=t.length,u=e||function(e,t,n){for(var i=0,r=t.length;i<r;i++)te(e,t[i],n);return n}(p||"*",n.nodeType?[n]:n,[]),d=!f||!e&&p?u:me(u,a,f,n,i),h=m?v||(e?f:c||g)?[]:t:d;if(m&&m(d,h,n,i),g)for(r=me(h,l),g(r,[],n,i),o=r.length;o--;)(s=r[o])&&(h[l[o]]=!(d[l[o]]=s));if(e){if(v||f){if(v){for(r=[],o=h.length;o--;)(s=h[o])&&r.push(d[o]=s);v(null,h=[],r,i)}for(o=h.length;o--;)(s=h[o])&&-1<(r=v?I.call(e,s):a[o])&&(e[r]=!(t[r]=s))}}else h=me(h===t?h.splice(c,h.length):h),v?v(null,t,h,i):P.apply(t,h)})}function ve(e){for(var i,t,n,r=e.length,o=_.relative[e[0].type],s=o||_.relative[" "],a=o?1:0,l=fe(function(e){return e===i},s,!0),c=fe(function(e){return-1<I.call(i,e)},s,!0),u=[function(e,t,n){return!o&&(n||t!==x)||((i=t).nodeType?l(e,t,n):c(e,t,n))}];a<r;a++)if(t=_.relative[e[a].type])u=[fe(pe(u),t)];else{if((t=_.filter[e[a].type].apply(null,e[a].matches))[k]){for(n=++a;n<r&&!_.relative[e[n].type];n++);return ge(1<a&&pe(u),1<a&&he(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),t,a<n&&ve(e.slice(a,n)),n<r&&ve(e=e.slice(n)),n<r&&he(e))}u.push(t)}return pe(u)}return de.prototype=_.filters=_.pseudos,_.setFilters=new de,m=te.tokenize=function(e,t){var n,i,r,o,s,a,l,c=h[e+" "];if(c)return t?0:c.slice(0);for(s=e,a=[],l=_.preFilter;s;){for(o in n&&!(i=j.exec(s))||(i&&(s=s.slice(i[0].length)||s),a.push(r=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),r.push({value:n,type:i[0].replace(z," ")}),s=s.slice(n.length)),_.filter)!(i=$[o].exec(s))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?te.error(e):h(e,a).slice(0)},d=te.compile=function(e,t){var n,g,v,y,b,i,r=[],o=[],s=f[e+" "];if(!s){for(t||(t=m(e)),n=t.length;n--;)(s=ve(t[n]))[k]?r.push(s):o.push(s);(s=f(e,(g=o,y=0<(v=r).length,b=0<g.length,i=function(e,t,n,i,r){var o,s,a,l=0,c="0",u=e&&[],d=[],h=x,f=e||b&&_.find.TAG("*",r),p=S+=null==h?1:Math.random()||.1,m=f.length;for(r&&(x=t!==w&&t);c!==m&&null!=(o=f[c]);c++){if(b&&o){for(s=0;a=g[s++];)if(a(o,t,n)){i.push(o);break}r&&(S=p)}y&&((o=!a&&o)&&l--,e&&u.push(o))}if(l+=c,y&&c!==l){for(s=0;a=v[s++];)a(u,d,t,n);if(e){if(0<l)for(;c--;)u[c]||d[c]||(d[c]=R.call(i));d=me(d)}P.apply(i,d),r&&!e&&0<d.length&&1<l+v.length&&te.uniqueSort(i)}return r&&(S=p,x=h),u},y?ie(i):i))).selector=e}return s},g=te.select=function(e,t,n,i){var r,o,s,a,l,c="function"==typeof e&&e,u=!i&&m(e=c.selector||e);if(n=n||[],1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(s=o[0]).type&&p.getById&&9===t.nodeType&&y&&_.relative[o[1].type]){if(!(t=(_.find.ID(s.matches[0].replace(Z,ee),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=$.needsContext.test(e)?0:o.length;r--&&(s=o[r],!_.relative[a=s.type]);)if((l=_.find[a])&&(i=l(s.matches[0].replace(Z,ee),Q.test(o[0].type)&&ue(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&he(o)))return P.apply(n,i),n;break}}return(c||d(e,u))(i,t,!y,n,Q.test(e)&&ue(t.parentNode)||t),n},p.sortStable=k.split("").sort(E).join("")===k,p.detectDuplicates=!!u,v(),p.sortDetached=re(function(e){return 1&e.compareDocumentPosition(w.createElement("div"))}),re(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||oe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),p.attributes&&re(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||oe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),re(function(e){return null==e.getAttribute("disabled")})||oe(O,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),te}),e("tinymce/util/Arr",[],function(){var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function e(e,t,n){var i,r;if(!e)return 0;if(n=n||e,e.length!==ye){for(i=0,r=e.length;i<r;i++)if(!1===t.call(n,e[i],i,e))return 0}else for(i in e)if(e.hasOwnProperty(i)&&!1===t.call(n,e[i],i,e))return 0;return 1}function o(e,t,n){var i,r;for(i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return i;return-1}return{isArray:r,toArray:function(e){var t,n,i=e;if(!r(e))for(i=[],t=0,n=e.length;t<n;t++)i[t]=e[t];return i},each:e,map:function(n,i){var r=[];return e(n,function(e,t){r.push(i(e,t,n))}),r},filter:function(n,i){var r=[];return e(n,function(e,t){i&&!i(e,t,n)||r.push(e)}),r},indexOf:function(e,t){var n,i;if(e)for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,i){var r=0;for(arguments.length<3&&(n=e[0]);r<e.length;r++)n=t.call(i,n,e[r],r);return n},findIndex:o,find:function(e,t,n){var i=o(e,t,n);return-1!==i?e[i]:ye},last:function(e){return e[e.length-1]}}}),e("tinymce/util/Tools",["tinymce/Env","tinymce/util/Arr"],function(n,s){var t=/^\s*|\s*$/g;function i(e){return null===e||e===ye?"":(""+e).replace(t,"")}function r(e,t){return t?!("array"!=t||!s.isArray(e))||typeof e==t:e!==ye}return{trim:i,isArray:s.isArray,is:r,toArray:s.toArray,makeMap:function(e,t,n){var i;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},i=e.length;i--;)n[e[i]]={};return n},each:s.each,map:s.map,grep:s.filter,inArray:s.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){var n,i,r,o,s=arguments;for(n=1,i=s.length;n<i;n++)for(r in t=s[n])t.hasOwnProperty(r)&&(o=t[r])!==ye&&(e[r]=o);return e},create:function(e,t,n){var i,r,o,s,a,l=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),o=e[3].match(/(^|\.)(\w+)$/i)[2],!(r=this.createNS(e[3].replace(/\.\w+$/,""),n))[o]){if("static"==e[2])return r[o]=t,void(this.onCreate&&this.onCreate(e[2],e[3],r[o]));t[o]||(t[o]=function(){},l=1),r[o]=t[o],this.extend(r[o].prototype,t),e[5]&&(i=this.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],a=r[o],r[o]=l?function(){return i[s].apply(this,arguments)}:function(){return this.parent=i[s],a.apply(this,arguments)},r[o].prototype[o]=r[o],this.each(i,function(e,t){r[o].prototype[t]=i[t]}),this.each(t,function(e,t){i[t]?r[o].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=o&&(r[o].prototype[t]=e)})),this.each(t.static,function(e,t){r[o][t]=e})}},walk:function n(e,i,r,o){o=o||this,e&&(r&&(e=e[r]),s.each(e,function(e,t){if(!1===i.call(o,e,t,r))return!1;n(e,i,r,o)}))},createNS:function(e,t){var n,i;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[i=e[n]]||(t[i]={}),t=t[i];return t},resolve:function(e,t){var n,i;for(t=t||window,n=0,i=(e=e.split(".")).length;n<i&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||r(e,"array")?e:s.map(e.split(t||","),i)},_addCacheSuffix:function(e){var t=n.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}}}),e("tinymce/dom/DomQuery",["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/Env"],function(e,t,n,i){var a,o=document,s=Array.prototype.push,r=Array.prototype.slice,l=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,c=e.Event,u=n.makeMap("children,contents,next,prev");function d(e){return void 0!==e}function h(e){return"string"==typeof e}function f(e,t){var n,i,r;for(r=(t=t||o).createElement("div"),n=t.createDocumentFragment(),r.innerHTML=e;i=r.firstChild;)n.appendChild(i);return n}function p(e,t,n,i){var r;if(h(t))t=f(t,N(e[0]));else if(t.length&&!t.nodeType){if(t=C.makeArray(t),i)for(r=t.length-1;0<=r;r--)p(e,t[r],n,i);else for(r=0;r<t.length;r++)p(e,t[r],n,i);return e}if(t.nodeType)for(r=e.length;r--;)n.call(e[r],t);return e}function m(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function g(e,t,n){var i,r;return t=C(t)[0],e.each(function(){n&&i==this.parentNode||(i=this.parentNode,r=t.cloneNode(!1),this.parentNode.insertBefore(r,this)),r.appendChild(this)}),e}var v=n.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),y=n.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),b={for:"htmlFor",class:"className",readonly:"readOnly"},_={float:"cssFloat"},x={},w={};function C(e,t){return new C.fn.init(e,t)}var k=/^\s*|\s*$/g;function T(e){return null===e||e===a?"":(""+e).replace(k,"")}function S(e,t){var n,i,r,o;if(e)if(void 0===(n=e.length)){for(i in e)if(e.hasOwnProperty(i)&&(o=e[i],!1===t.call(o,i,o)))break}else for(r=0;r<n&&(o=e[r],!1!==t.call(o,r,o));r++);return e}function E(e,n){var i=[];return S(e,function(e,t){n(t,e)&&i.push(t)}),i}function N(e){return e?9==e.nodeType?e:e.ownerDocument:o}function D(e,t,n){var i=[],r=e[t];for("string"!=typeof n&&n instanceof C&&(n=n[0]);r&&9!==r.nodeType;){if(n!==ye){if(r===n)break;if("string"==typeof n&&C(r).is(n))break}1===r.nodeType&&i.push(r),r=r[t]}return i}function R(e,t,n,i){var r=[];for(i instanceof C&&(i=i[0]);e;e=e[t])if(!n||e.nodeType===n){if(i!==ye){if(e===i)break;if("string"==typeof i&&C(e).is(i))break}r.push(e)}return r}function A(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function P(n,i,e){S(e,function(e,t){n[e]=n[e]||{},n[e][i]=t})}return C.fn=C.prototype={constructor:C,selector:"",context:null,length:0,init:function(e,t){var n,i,r=this;if(!e)return r;if(e.nodeType)return r.context=r[0]=e,r.length=1,r;if(t&&t.nodeType)r.context=t;else{if(t)return C(e).attr(t);r.context=t=document}if(h(e)){if(!(n="<"===(r.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:l.exec(e)))return C(t).find(e);if(n[1])for(i=f(e,N(t)).firstChild;i;)s.call(r,i),i=i.nextSibling;else{if(!(i=N(t).getElementById(n[2])))return r;if(i.id!==n[2])return r.find(e);r.length=1,r[0]=i}}else this.add(e,!1);return r},toArray:function(){return n.toArray(this)},add:function(e,t){var n,i;if(h(e))return this.add(C(e));if(!1!==t)for(n=C.unique(this.toArray().concat(C.makeArray(e))),this.length=n.length,i=0;i<n.length;i++)this[i]=n[i];else s.apply(this,C.makeArray(e));return this},attr:function(t,n){var e,i=this;if("object"==typeof t)S(t,function(e,t){i.attr(e,t)});else{if(!d(n)){if(i[0]&&1===i[0].nodeType){if((e=x[t])&&e.get)return e.get(i[0],t);if(y[t])return i.prop(t)?t:a;null===(n=i[0].getAttribute(t,2))&&(n=a)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=x[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return i},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=b[e]||e))S(e,function(e,t){n.prop(e,t)});else{if(!d(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(t,n){var e,i,r=this;function o(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function s(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}if("object"==typeof t)S(t,function(e,t){r.css(e,t)});else if(d(n))t=o(t),"number"!=typeof n||v[t]||(n+="px"),r.each(function(){var e=this.style;if((i=w[t])&&i.set)i.set(this,n);else{try{this.style[_[t]||t]=n}catch(e){}null!==n&&""!==n||(e.removeProperty?e.removeProperty(s(t)):e.removeAttribute(t))}});else{if(e=r[0],(i=w[t])&&i.get)return i.get(e);if(e.ownerDocument.defaultView)try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(s(t))}catch(e){return a}else if(e.currentStyle)return e.currentStyle[o(t)]}return r},remove:function(){for(var e,t=this.length;t--;)e=this[t],c.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(t){var n,i=this;if(d(t)){n=i.length;try{for(;n--;)i[n].innerHTML=t}catch(e){C(i[n]).empty().append(t)}return i}return i[0]?i[0].innerHTML:""},text:function(e){var t;if(d(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return p(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return p(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?p(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?p(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return C(e).append(this),this},prependTo:function(e){return C(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return g(this,e)},wrapAll:function(e){return g(this,e,!0)},wrapInner:function(e){return this.each(function(){C(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){C(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),C(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(r,o){var e=this;return"string"!=typeof r||(-1!==r.indexOf(" ")?S(r.split(" "),function(){e.toggleClass(this,o)}):e.each(function(e,t){var n,i;(i=m(t,r))!==o&&(n=t.className,i?t.className=T((" "+n+" ").replace(" "+r+" "," ")):t.className+=n?" "+r:r)})),e},hasClass:function(e){return m(this[0],e)},each:function(e){return S(this,e)},on:function(e,t){return this.each(function(){c.bind(this,e,t)})},off:function(e,t){return this.each(function(){c.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?c.fire(this,e.type,e):c.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new C(r.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,i=[];for(t=0,n=this.length;t<n;t++)C.find(e,this[t],i);return C(i)},filter:function(n){return C("function"==typeof n?E(this.toArray(),function(e,t){return n(t,e)}):C.filter(n,this.toArray()))},closest:function(n){var i=[];return n instanceof C&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&C(t).is(n)){i.push(t);break}if(t==n){i.push(t);break}t=t.parentNode}}),C(i)},offset:function(e){var t,n,i,r,o=0,s=0;return e?this.css(e):((t=this[0])&&(i=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(o=(r=t.getBoundingClientRect()).left+(i.scrollLeft||n.body.scrollLeft)-i.clientLeft,s=r.top+(i.scrollTop||n.body.scrollTop)-i.clientTop)),{left:o,top:s})},push:s,sort:[].sort,splice:[].splice},n.extend(C,{extend:n.extend,makeArray:function(e){return(t=e)&&t==t.window||e.nodeType?[e]:n.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:n.isArray,each:S,trim:T,grep:E,find:t,expr:t.selectors,unique:t.uniqueSort,text:t.getText,contains:t.contains,filter:function(e,t,n){var i=t.length;for(n&&(e=":not("+e+")");i--;)1!=t[i].nodeType&&t.splice(i,1);return t=1===t.length?C.find.matchesSelector(t[0],e)?[t[0]]:[]:C.find.matches(e,t)}}),S({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},next:function(e){return A(e,"nextSibling",1)},prev:function(e){return A(e,"previousSibling",1)},children:function(e){return R(e.firstChild,"nextSibling",1)},contents:function(e){return n.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,i){C.fn[e]=function(t){var n=[];return this.each(function(){var e=i.call(n,this,t,n);e&&(C.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(u[e]||(n=C.unique(n)),0===e.indexOf("parents")&&(n=n.reverse())),n=C(n),t?n.filter(t):n}}),S({parentsUntil:function(e,t){return D(e,"parentNode",t)},nextUntil:function(e,t){return R(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return R(e,"previousSibling",1,t).slice(1)}},function(i,r){C.fn[i]=function(t,e){var n=[];return this.each(function(){var e=r.call(n,this,t,n);e&&(C.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=C.unique(n),0!==i.indexOf("parents")&&"prevUntil"!==i||(n=n.reverse())),n=C(n),e?n.filter(e):n}}),C.fn.is=function(e){return!!e&&0<this.filter(e).length},C.fn.init.prototype=C.fn,C.overrideDefaults=function(n){var i;function r(e,t){return i=i||n(),0===arguments.length&&(e=i.element),t||(t=i.context),new r.fn.init(e,t)}return C.extend(r,this),r},i.ie&&i.ie<8&&(P(x,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?a:t},size:function(e){var t=e.size;return 20===t?a:t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?a:t}}),P(x,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(_.float="styleFloat",P(w,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),C.attrHooks=x,C.cssHooks=w,C}),e("tinymce/html/Styles",[],function(){return function(b,e){var _,t,c,u,x=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,w=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,C=/\s*([^:]+):\s*([^;]+);?/g,k=/\s+$/,T={},S="\ufeff";for(b=b||{},e&&(c=e.getValidStyles(),u=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+S).split(" "),_=0;_<t.length;_++)T[t[_]]=S+_,T[S+_]=t[_];function E(e,t,n,i){function r(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+r(t)+r(n)+r(i)}return{toHex:function(e){return e.replace(x,E)},parse:function(e){var t,n,i,r,o,s,a,l,c={},u=b.url_converter,d=b.url_converter_scope||this;function h(e,t,n){var i,r,o,s;if((i=c[e+"-top"+t])&&(r=c[e+"-right"+t])&&(o=c[e+"-bottom"+t])&&(s=c[e+"-left"+t])){var a=[i,r,o,s];for(_=a.length-1;_--&&a[_]===a[_+1];);-1<_&&n||(c[e+t]=-1==_?a[0]:a.join(" "),delete c[e+"-top"+t],delete c[e+"-right"+t],delete c[e+"-bottom"+t],delete c[e+"-left"+t])}}function f(e){var t,n=c[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return c[e]=n[0],!0}}function p(e){return r=!0,T[e]}function m(e,t){return r&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return T[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function g(e){return String.fromCharCode(parseInt(e.slice(1),16))}function v(e){return e.replace(/\\[0-9a-f]+/gi,g)}function y(e,t,n,i,r,o){if(r=r||o)return"'"+(r=m(r)).replace(/\'/g,"\\'")+"'";if(t=m(t||n||i),!b.allow_script_urls){var s=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return u&&(t=u.call(d,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"}if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,p)});t=C.exec(e);)if(C.lastIndex=t.index+t[0].length,n=t[1].replace(k,"").toLowerCase(),i=t[2].replace(k,""),n&&i){if(n=v(n),i=v(i),-1!==n.indexOf(S)||-1!==n.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"==n||/expression\s*\(|\/\*|\*\//.test(i)))continue;"font-weight"===n&&"700"===i?i="bold":"color"!==n&&"background-color"!==n||(i=i.toLowerCase()),i=(i=i.replace(x,E)).replace(w,y),c[n]=r?m(i,!0):i}h("border","",!0),h("border","-width"),h("border","-color"),h("border","-style"),h("padding",""),h("margin",""),o="border",a="border-style",l="border-color",f(s="border-width")&&f(a)&&f(l)&&(c[o]=c[s]+" "+c[a]+" "+c[l],delete c[s],delete c[a],delete c[l]),"medium none"===c.border&&delete c.border,"none"===c["border-image"]&&delete c["border-image"]}return c},serialize:function(o,e){var t,n,i,r,s,a="";function l(e){var t,n,i,r;if(t=c[e])for(n=0,i=t.length;n<i;n++)e=t[n],(r=o[e])&&(a+=(0<a.length?" ":"")+e+": "+r+";")}if(e&&c)l("*"),l(e);else for(t in o)!(n=o[t])||u&&(i=t,r=e,s=void 0,(s=u["*"])&&s[i]||(s=u[r])&&s[i])||(a+=(0<a.length?" ":"")+t+": "+n+";");return a}}}}),e("tinymce/dom/TreeWalker",[],function(){return function(e,a){var t=e;function n(e,t,n,i){var r,o;if(e){if(!i&&e[t])return e[t];if(e!=a){if(r=e[n])return r;for(o=e.parentNode;o&&o!=a;o=o.parentNode)if(r=o[n])return r}}}this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,i){var r,o,s;if(e){if(r=e[n],a&&r===a)return;if(r){if(!i)for(s=r[t];s;s=s[t])if(!s[t])return s;return r}if((o=e.parentNode)&&o!==a)return o}}(t,"lastChild","previousSibling",e)}}}),e("tinymce/dom/Range",["tinymce/util/Tools"],function(R){function A(u){var d=this,h=u.doc,e=0,f=1,p=2,m=!0,c=!1,g="startOffset",v="startContainer",y="endContainer",b="endOffset",t=R.extend,_=u.nodeIndex;function x(){return h.createDocumentFragment()}function n(e,t){a(m,e,t)}function i(e,t){a(c,e,t)}function r(e){n(e.parentNode,_(e))}function o(e){i(e.parentNode,_(e)+1)}function s(){return l(f)}function w(e,t){var n;if(3==e.nodeType)return e;if(t<0)return e;for(n=e.firstChild;n&&0<t;)--t,n=n.nextSibling;return n||e}function C(e,t,n,i){var r,o,s,a,l,c;if(e==n)return t==i?0:t<i?-1:1;for(r=n;r&&r.parentNode!=e;)r=r.parentNode;if(r){for(o=0,s=e.firstChild;s!=r&&o<t;)o++,s=s.nextSibling;return t<=o?-1:1}for(r=e;r&&r.parentNode!=n;)r=r.parentNode;if(r){for(o=0,s=n.firstChild;s!=r&&o<i;)o++,s=s.nextSibling;return o<i?-1:1}for(a=u.findCommonAncestor(e,n),l=e;l&&l.parentNode!=a;)l=l.parentNode;for(l||(l=a),c=n;c&&c.parentNode!=a;)c=c.parentNode;if(c||(c=a),l==c)return 0;for(s=a.firstChild;s;){if(s==l)return-1;if(s==c)return 1;s=s.nextSibling}}function a(e,t,n){var i,r;for(e?(d[v]=t,d[g]=n):(d[y]=t,d[b]=n),i=d[y];i.parentNode;)i=i.parentNode;for(r=d[v];r.parentNode;)r=r.parentNode;r==i?0<C(d[v],d[g],d[y],d[b])&&d.collapse(e):d.collapse(e),d.collapsed=d[v]==d[y]&&d[g]==d[b],d.commonAncestorContainer=u.findCommonAncestor(d[v],d[y])}function l(e){var t,n,i,r,o,s,a,l=0,c=0;if(d[v]==d[y])return function(e){var t,n,i,r,o,s,a,l,c;e!=p&&(t=x());if(d[g]==d[b])return t;if(3==d[v].nodeType){if(n=d[v].nodeValue,i=n.substring(d[g],d[b]),e!=f&&(r=d[v],l=d[g],c=d[b]-d[g],0===l&&c>=r.nodeValue.length-1?r.parentNode.removeChild(r):r.deleteData(l,c),d.collapse(m)),e==p)return;return 0<i.length&&t.appendChild(h.createTextNode(i)),t}r=w(d[v],d[g]),o=d[b]-d[g];for(;r&&0<o;)s=r.nextSibling,a=D(r,e),t&&t.appendChild(a),--o,r=s;e!=f&&d.collapse(m);return t}(e);for(n=(t=d[y]).parentNode;n;n=(t=n).parentNode){if(n==d[v])return k(t,e);++l}for(n=(t=d[v]).parentNode;n;n=(t=n).parentNode){if(n==d[y])return T(t,e);++c}for(i=c-l,r=d[v];0<i;)r=r.parentNode,i--;for(o=d[y];i<0;)o=o.parentNode,i++;for(s=r.parentNode,a=o.parentNode;s!=a;s=s.parentNode,a=a.parentNode)r=s,o=a;return function(e,t,n){var i,r,o,s,a,l,c;n!=p&&(r=x());i=E(e,n),r&&r.appendChild(i);o=_(e),s=_(t),a=s-++o,l=e.nextSibling;for(;0<a;)c=l.nextSibling,i=D(l,n),r&&r.appendChild(i),l=c,--a;i=S(t,n),r&&r.appendChild(i);n!=f&&(d.setStartAfter(e),d.collapse(m));return r}(r,o,e)}function k(e,t){var n,i,r,o,s;if(t!=p&&(n=x()),i=S(e,t),n&&n.appendChild(i),(r=_(e)-d[g])<=0)return t!=f&&(d.setEndBefore(e),d.collapse(c)),n;for(i=e.previousSibling;0<r;)o=i.previousSibling,s=D(i,t),n&&n.insertBefore(s,n.firstChild),--r,i=o;return t!=f&&(d.setEndBefore(e),d.collapse(c)),n}function T(e,t){var n,i,r,o,s,a;for(t!=p&&(n=x()),r=E(e,t),n&&n.appendChild(r),i=_(e),++i,o=d[b]-i,r=e.nextSibling;r&&0<o;)s=r.nextSibling,a=D(r,t),n&&n.appendChild(a),--o,r=s;return t!=f&&(d.setStartAfter(e),d.collapse(m)),n}function S(e,t){var n,i,r,o,s,a=w(d[y],d[b]-1),l=a!=d[y];if(a==e)return N(a,l,c,t);for(i=N(n=a.parentNode,c,c,t);n;){for(;a;)r=a.previousSibling,o=N(a,l,c,t),t!=p&&i.insertBefore(o,i.firstChild),l=m,a=r;if(n==e)return i;a=n.previousSibling,s=N(n=n.parentNode,c,c,t),t!=p&&s.appendChild(i),i=s}}function E(e,t){var n,i,r,o,s,a=w(d[v],d[g]),l=a!=d[v];if(a==e)return N(a,l,m,t);for(i=N(n=a.parentNode,c,m,t);n;){for(;a;)r=a.nextSibling,o=N(a,l,m,t),t!=p&&i.appendChild(o),l=m,a=r;if(n==e)return i;a=n.nextSibling,s=N(n=n.parentNode,c,m,t),t!=p&&s.appendChild(i),i=s}}function N(e,t,n,i){var r,o,s,a,l;return t?D(e,i):3!=e.nodeType?i!=p?u.clone(e,c):void 0:(r=e.nodeValue,s=n?(a=d[g],o=r.substring(a),r.substring(0,a)):(a=d[b],o=r.substring(0,a),r.substring(a)),i!=f&&(e.nodeValue=s),i!=p?((l=u.clone(e,c)).nodeValue=o,l):void 0)}function D(e,t){if(t!=p)return t==f?u.clone(e,m):e;e.parentNode.removeChild(e)}return t(d,{startContainer:h,startOffset:0,endContainer:h,endOffset:0,collapsed:m,commonAncestorContainer:h,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:n,setEnd:i,setStartBefore:r,setStartAfter:function(e){n(e.parentNode,_(e)+1)},setEndBefore:function(e){i(e.parentNode,_(e))},setEndAfter:o,collapse:function(e){e?(d[y]=d[v],d[b]=d[g]):(d[v]=d[y],d[g]=d[b]),d.collapsed=m},selectNode:function(e){r(e),o(e)},selectNodeContents:function(e){n(e,0),i(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)},compareBoundaryPoints:function(e,t){var n=d[v],i=d[g],r=d[y],o=d[b],s=t.startContainer,a=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?C(n,i,s,a):1===e?C(r,o,s,a):2===e?C(r,o,l,c):3===e?C(n,i,l,c):void 0},deleteContents:function(){l(p)},extractContents:function(){return l(e)},cloneContents:s,insertNode:function(e){var t,n,i=this[v],r=this[g];3!==i.nodeType&&4!==i.nodeType||!i.nodeValue?(0<i.childNodes.length&&(n=i.childNodes[r]),n?i.insertBefore(e,n):3==i.nodeType?u.insertAfter(e,i):i.appendChild(e)):r?r>=i.nodeValue.length?u.insertAfter(e,i):(t=i.splitText(r),i.parentNode.insertBefore(e,t)):i.parentNode.insertBefore(e,i)},surroundContents:function(e){var t=d.extractContents();d.insertNode(e),e.appendChild(t),d.selectNode(e)},cloneRange:function(){return t(new A(u),{startContainer:d[v],startOffset:d[g],endContainer:d[y],endOffset:d[b],collapsed:d.collapsed,commonAncestorContainer:d.commonAncestorContainer})},toStringIE:function(){return u.create("body",null,s()).outerText}}),d}return A.prototype.toString=function(){return this.toStringIE()},A}),e("tinymce/html/Entities",["tinymce/util/Tools"],function(e){var r,s,o,t=e.makeMap,i=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n=/[<>&\"\']/g,l=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,c={128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"};function u(e,t){var n,i,r,o={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)i=String.fromCharCode(parseInt(e[n],t)),s[i]||(r="&"+e[n+1]+";",o[i]=r,o[r]=i);return o}}s={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},o={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},r=u("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var d={encodeRaw:function(e,t){return e.replace(t?i:a,function(e){return s[e]||e})},encodeAllRaw:function(e){return(""+e).replace(n,function(e){return s[e]||e})},encodeNumeric:function(e,t){return e.replace(t?i:a,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":s[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||r,e.replace(t?i:a,function(e){return s[e]||n[e]||e})},getEncodeFunc:function(e,n){return n=u(n)||r,(e=t(e.replace(/\+/g,","))).named&&e.numeric?function(e,t){return e.replace(t?i:a,function(e){return s[e]||n[e]||"&#"+e.charCodeAt(0)+";"||e})}:e.named?n?function(e,t){return d.encodeNamed(e,t,n)}:d.encodeNamed:e.numeric?d.encodeNumeric:d.encodeRaw},decode:function(e){return e.replace(l,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):c[t]||String.fromCharCode(t):o[e]||r[e]||(n=e,(i=document.createElement("div")).innerHTML=n,i.textContent||i.innerText||n);var n,i})}};return d}),e("tinymce/dom/StyleSheetLoader",["tinymce/util/Tools","tinymce/util/Delay"],function(v,y){return function(h,e){var f,p=0,m={};function g(e){h.getElementsByTagName("head")[0].appendChild(e)}f=(e=e||{}).maxLoadTime||5e3,this.load=function(e,t,n){var r,i,o,s;function a(){for(var e=s.passed,t=e.length;t--;)e[t]();s.status=2,s.passed=[],s.failed=[]}function l(){for(var e=s.failed,t=e.length;t--;)e[t]();s.status=3,s.passed=[],s.failed=[]}function c(e,t){e()||((new Date).getTime()-o<f?y.setTimeout(t):l())}function u(){c(function(){for(var e,t,n=h.styleSheets,i=n.length;i--;)if((t=(e=n[i]).ownerNode?e.ownerNode:e.owningElement)&&t.id===r.id)return a(),!0},u)}if(e=v._addCacheSuffix(e),m[e]?s=m[e]:(s={passed:[],failed:[]},m[e]=s),t&&s.passed.push(t),n&&s.failed.push(n),1!=s.status)if(2!=s.status)if(3!=s.status){if(s.status=1,(r=h.createElement("link")).rel="stylesheet",r.type="text/css",r.id="u"+p++,r.async=!1,r.defer=!1,o=(new Date).getTime(),"onload"in r&&!((d=navigator.userAgent.match(/WebKit\/(\d*)/))&&d[1]<536))r.onload=u,r.onerror=l;else{if(0<navigator.userAgent.indexOf("Firefox"))return(i=h.createElement("style")).textContent='@import "'+e+'"',function e(){c(function(){try{var e=i.sheet.cssRules;return a(),!!e}catch(e){}},e)}(),void g(i);u()}var d;g(r),r.href=e}else l();else a()}}}),e("tinymce/dom/DOMUtils",["tinymce/dom/Sizzle","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/EventUtils","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/dom/StyleSheetLoader"],function(r,c,u,d,h,t,e,i,o,f){var s=o.each,a=o.is,l=o.grep,p=o.trim,m=i.ie,g=/^([a-z0-9],?)+$/i,v=/^[ \t\r\n]*$/;function y(e,t){var n=t.attr("style");(n=e.serializeStyle(e.parseStyle(n),t[0].nodeName))||(n=null),t.attr("data-mce-style",n)}function n(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 b(e,t){var n,i,r,o,s,a,l=this;l.doc=e,l.win=window,l.files={},l.counter=0,l.stdMode=!m||8<=e.documentMode,l.boxModel=!m||"CSS1Compat"==e.compatMode||l.stdMode,l.styleSheetLoader=new f(e),l.boundEvents=[],l.settings=t=t||{},l.schema=t.schema,l.styles=new u({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),l.fixDoc(e),l.events=t.ownEvents?new d(t.proxy):d.Event,l.attrHooks=(i=l,s={},a=(r=t).keep_values,o={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||i,t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},s={style:{set:function(e,t){null===t||"object"!=typeof t?(a&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=i.serializeStyle(i.parseStyle(t),e[0].nodeName)}}},a&&(s.href=s.src=o),s),n=t.schema?t.schema.getBlockElements():{},l.$=c.overrideDefaults(function(){return{context:e,element:l.getRoot()}}),l.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!n[e.nodeName]):!!n[e]}}return b.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(t){var e,n=this.settings;if(m&&n.schema)for(e in"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(e){t.createElement(e)}),n.schema.getCustomElements())t.createElement(e)},clone:function(t,e){var n,i,r=this;return!m||1!==t.nodeType||e?t.cloneNode(e):(i=r.doc,e?n.firstChild:(n=i.createElement(t.nodeName),s(r.getAttribs(t),function(e){r.setAttrib(n,e.nodeName,r.getAttrib(t,e.nodeName))}),n))},getRoot:function(){return this.settings.root_element||this.doc.body},getViewPort:function(e){var t,n;return t=(e=e||this.win).document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=this.get(e),t=this.getPos(e),n=this.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n;return e=this.get(e),t=this.getStyle(e,"width"),n=this.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,n,i){var r,o=this,s=[];for(e=o.get(e),i=i===ye,n=n||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),a(t,"string")&&(t="*"===(r=t)?function(e){return 1==e.nodeType}:function(e){return o.is(e,r)});e&&e!=n&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(e))&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(e,t){return r(e,this.get(t)||this.settings.root_element||this.doc,[])},is:function(e,t){var n;if(e.length===ye){if("*"===t)return 1==e.nodeType;if(g.test(t)){for(t=t.toLowerCase().split(/,/),e=e.nodeName.toLowerCase(),n=t.length-1;0<=n;n--)if(t[n]==e)return!0;return!1}}if(e.nodeType&&1!=e.nodeType)return!1;var i=e.nodeType?[e]:e;return 0<r(t,i[0].ownerDocument||i[0],null,i).length},add:function(e,n,i,r,o){var s=this;return this.run(e,function(e){var t;return t=a(n,"string")?s.doc.createElement(n):n,s.setAttribs(t,i),r&&(r.nodeType?t.appendChild(r):s.setHTML(t,r)),o?t:e.appendChild(t)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var i,r="";for(i in r+="<"+e,t)t.hasOwnProperty(i)&&null!==t[i]&&void 0!==t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return void 0!==n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,i,r=this.doc;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),1<e.length?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&y(this,e)},getStyle:function(e,t,n){return e=this.$$(e),n?e.css(t):("float"==(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=i.ie&&i.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[t]:ye)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&y(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var i,r,o=this.settings;""===n&&(n=null),i=(e=this.$$(e)).attr(t),e.length&&((r=this.attrHooks[t])&&r.set?r.set(e,n,t):e.attr(t,n),i!=n&&o.onSetAttrib&&o.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var i=this;i.$$(e).each(function(e,n){s(t,function(e,t){i.setAttrib(n,t,e)})})},getAttrib:function(e,t,n){var i,r;return(e=this.$$(e)).length&&(r=(i=this.attrHooks[t])&&i.get?i.get(e,t):e.attr(t)),void 0===r&&(r=n||""),r},getPos:function(e,t){var n,i,r=0,o=0,s=this.doc,a=s.body;if(t=t||a,e=this.get(e)){if(t===a&&e.getBoundingClientRect&&"static"===c(a).css("position"))return i=e.getBoundingClientRect(),t=this.boxModel?s.documentElement:a,{x:r=i.left+(s.documentElement.scrollLeft||a.scrollLeft)-t.clientLeft,y:o=i.top+(s.documentElement.scrollTop||a.scrollTop)-t.clientTop};for(n=e;n&&n!=t&&n.nodeType;)r+=n.offsetLeft||0,o+=n.offsetTop||0,n=n.offsetParent;for(n=e.parentNode;n&&n!=t&&n.nodeType;)r-=n.scrollLeft||0,o-=n.scrollTop||0,n=n.parentNode}return{x:r,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,i=this.doc;if(this!==b.DOM&&i===document){var r=b.DOM.addedStyles;if((r=r||[])[e])return;r[e]=!0,b.DOM.addedStyles=r}(n=i.getElementById("mceDefaultStyles"))||((n=i.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=i.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(i.createTextNode(e))},loadCSS:function(e){var n,i=this,r=i.doc;i===b.DOM||r!==document?(e||(e=""),n=r.getElementsByTagName("head")[0],s(e.split(","),function(e){var t;e=o._addCacheSuffix(e),i.files[e]||(i.files[e]=!0,t=i.create("link",{rel:"stylesheet",href:e}),m&&r.documentMode&&r.recalc&&(t.onload=function(){r.recalc&&r.recalc(),t.onload=null}),n.appendChild(t))})):b.DOM.loadCSS(e)},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,n){this.$$(e).toggleClass(t,n).each(function(){""===this.className&&c(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,n){e=this.$$(e),m?e.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+n,t.removeChild(t.firstChild)}catch(e){c("<div></div>").html("<br>"+n).contents().slice(1).appendTo(t)}return n}}):e.html(n)},getOuterHTML:function(e){return 1==(e=this.get(e)).nodeType&&"outerHTML"in e?e.outerHTML:c("<div></div>").append(c(e).clone()).html()},setOuterHTML:function(e,t){var n=this;n.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}n.remove(c(this).html(t),!0)})},decode:e.decode,encode:e.encodeAllRaw,insertAfter:function(e,i){return i=this.get(i),this.run(e,function(e){var t,n;return t=i.parentNode,(n=i.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:function(t,e,n){return this.run(e,function(e){return a(e,"array")&&(t=t.cloneNode(!0)),n&&s(l(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},rename:function(t,e){var n,i=this;return t.nodeName!=e.toUpperCase()&&(n=i.create(e),s(i.getAttribs(t),function(e){i.setAttrib(n,e.nodeName,i.getAttrib(t,e.nodeName))}),i.replace(n,t,1)),n||t},findCommonAncestor: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},toHex:function(e){return this.styles.toHex(o.trim(e))},run:function(e,n,i){var r,o=this;return"string"==typeof e&&(e=o.get(e)),!!e&&(i=i||this,e.nodeType||!e.length&&0!==e.length?n.call(i,e):(r=[],s(e,function(e,t){e&&("string"==typeof e&&(e=o.get(e)),r.push(n.call(i,e,t)))}),r))},getAttribs:function(e){var t;if(!(e=this.get(e)))return[];if(m){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});return e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n,i,r,o,s,a,l=0;if(e=e.firstChild){s=new h(e,e.parentNode),t=t||(this.schema?this.schema.getNonEmptyElements():null),o=this.schema?this.schema.getWhiteSpaceElements():{};do{if(1===(r=e.nodeType)){var c=e.getAttribute("data-mce-bogus");if(c){e=s.next("all"===c);continue}if(a=e.nodeName.toLowerCase(),t&&t[a]){if("br"!==a)return!1;l++,e=s.next();continue}for(n=(i=this.getAttribs(e)).length;n--;)if("name"===(a=i[n].nodeName)||"data-mce-bookmark"===a)return!1}if(8==r)return!1;if(3===r&&!v.test(e.nodeValue))return!1;if(3===r&&e.parentNode&&o[e.parentNode.nodeName]&&v.test(e.nodeValue))return!1;e=s.next()}while(e)}return l<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new t(this)},nodeIndex:n,split:function(e,t,n){var i,r,o,l=this,s=l.createRng();function c(e){var t,n=e.childNodes,i=e.nodeType;if(1!=i||"bookmark"!=e.getAttribute("data-mce-type")){for(t=n.length-1;0<=t;t--)c(n[t]);if(9!=i){if(3==i&&0<e.nodeValue.length){var r=p(e.nodeValue).length;if(!l.isBlock(e.parentNode)||0<r||0===r&&(s=(o=e).previousSibling&&"SPAN"==o.previousSibling.nodeName,a=o.nextSibling&&"SPAN"==o.nextSibling.nodeName,s&&a))return}else if(1==i&&(1==(n=e.childNodes).length&&n[0]&&1==n[0].nodeType&&"bookmark"==n[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(n[0],e),n.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;l.remove(e)}var o,s,a;return e}}if(e&&t)return s.setStart(e.parentNode,l.nodeIndex(e)),s.setEnd(t.parentNode,l.nodeIndex(t)),i=s.extractContents(),(s=l.createRng()).setStart(t.parentNode,l.nodeIndex(t)+1),s.setEnd(e.parentNode,l.nodeIndex(e)+1),r=s.extractContents(),(o=e.parentNode).insertBefore(c(i),e),n?o.insertBefore(n,e):o.insertBefore(t,e),o.insertBefore(c(r),e),l.remove(e),n||t},bind:function(e,t,n,i){if(o.isArray(e)){for(var r=e.length;r--;)e[r]=this.bind(e[r],t,n,i);return e}return!this.settings.collect||e!==this.doc&&e!==this.win||this.boundEvents.push([e,t,n,i]),this.events.bind(e,t,n,i||this)},unbind:function(e,t,n){var i;if(o.isArray(e)){for(i=e.length;i--;)e[i]=this.unbind(e[i],t,n);return e}if(this.boundEvents&&(e===this.doc||e===this.win))for(i=this.boundEvents.length;i--;){var r=this.boundEvents[i];e!=r[0]||t&&t!=r[1]||n&&n!=r[2]||this.events.unbind(r[0],r[1],r[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){if(this.boundEvents){for(var e=this.boundEvents.length;e--;){var t=this.boundEvents[e];this.events.unbind(t[0],t[1],t[2])}this.boundEvents=null}r.setDocument&&r.setDocument(),this.win=this.doc=this.root=this.events=this.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var i=this,r=t;if(e)for("string"==typeof r&&(r=function(e){return i.is(e,t)}),e=e[n];e;e=e[n])if(r(e))return e;return null}},b.DOM=new b(document),b.nodeIndex=n,b}),e("tinymce/dom/ScriptLoader",["tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,d){var h=e.DOM,f=d.each,p=d.grep,m=function(e){return"function"==typeof e};function t(){var a={},r=[],l={},c=[],u=0;this.isDone=function(e){return 2==a[e]},this.markDone=function(e){a[e]=2},this.add=this.load=function(e,t,n,i){null==a[e]&&(r.push(e),a[e]=0),t&&(l[e]||(l[e]=[]),l[e].push({success:t,failure:i,scope:n||this}))},this.remove=function(e){delete a[e],delete l[e]},this.loadQueue=function(e,t,n){this.loadScripts(r,e,t,n)},this.loadScripts=function(t,e,n,i){var r,o=[];function s(t,e){f(l[e],function(e){m(e[t])&&e[t].call(e.scope)}),l[e]=void 0}c.push({success:e,failure:i,scope:n||this}),(r=function(){var e=p(t);t.length=0,f(e,function(e){2!==a[e]?3!==a[e]?1!==a[e]&&(a[e]=1,u++,function(e,t,n){var i,r,o=h;function s(){o.remove(r),i&&(i.onreadystatechange=i.onload=i=null),t()}r=o.uniqueId(),(i=document.createElement("script")).id=r,i.type="text/javascript",i.src=d._addCacheSuffix(e),"onreadystatechange"in i?i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&s()}:i.onload=s,i.onerror=function(){m(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(i)}(e,function(){a[e]=2,u--,s("success",e),r()},function(){a[e]=3,u--,o.push(e),s("failure",e),r()})):s("failure",e):s("success",e)}),u||(f(c,function(e){0===o.length?m(e.success)&&e.success.call(e.scope):m(e.failure)&&e.failure.call(e.scope,o)}),c.length=0)})()}}return t.ScriptLoader=new t,t}),e("tinymce/AddOnManager",["tinymce/dom/ScriptLoader","tinymce/util/Tools"],function(l,e){var c=e.each;function u(){this.items=[],this.urls={},this.lookup={}}return u.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:ye},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(e,t){var n=u.language;if(n&&!1!==u.languageLoad){if(t)if(-1!=(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1==t.indexOf(","+n+","))return;l.ScriptLoader.add(this.urls[e]+"/langs/"+n+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(e,t){var n=this.urls[e];c(t,function(e){l.ScriptLoader.add(n+"/"+e)})},load:function(t,n,i,r,e){var o=this,s=n;function a(){var e=o.dependencies(t);c(e,function(e){var t=o.createUrl(n,e);o.load(t.resource,t,ye,ye)}),i&&(r?i.call(r):i.call(l))}o.urls[t]||("object"==typeof n&&(s=n.prefix+n.resource+n.suffix),0!==s.indexOf("/")&&-1==s.indexOf("://")&&(s=u.baseURL+"/"+s),o.urls[t]=s.substring(0,s.lastIndexOf("/")),o.lookup[t]?a():l.ScriptLoader.add(s,a,r,e))}},u.PluginManager=new u,u.ThemeManager=new u,u}),e("tinymce/dom/NodeType",[],function(){function e(t){return function(e){return!!e&&e.nodeType==t}}var r=e(1);function t(i){return i=i.toLowerCase().split(" "),function(e){var t,n;if(e&&e.nodeType)for(n=e.nodeName.toLowerCase(),t=0;t<i.length;t++)if(n===i[t])return!0;return!1}}function n(t){return function(e){if(r(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}return{isText:e(3),isElement:r,isComment:e(8),isBr:t("br"),isContentEditableTrue:n("true"),isContentEditableFalse:n("false"),matchNodeNames:t,hasPropValue:function(t,n){return function(e){return r(e)&&e[t]===n}},hasAttributeValue:function(t,n){return function(e){return r(e)&&e.getAttribute(t)===n}},matchStyleValues:function(n,i){return i=i.toLowerCase().split(" "),function(e){var t;if(r(e))for(t=0;t<i.length;t++)if(getComputedStyle(e,null).getPropertyValue(n)===i[t])return!0;return!1}},isBogus:function(e){return r(e)&&e.hasAttribute("data-mce-bogus")}}}),e("tinymce/text/Zwsp",[],function(){var t="\ufeff";return{isZwsp:function(e){return e==t},ZWSP:t,trim:function(e){return e.replace(new RegExp(t,"g"),"")}}}),e("tinymce/caret/CaretContainer",["tinymce/dom/NodeType","tinymce/text/Zwsp"],function(i,o){var r=i.isElement,s=i.isText;function t(e){return s(e)&&(e=e.parentNode),r(e)&&e.hasAttribute("data-mce-caret")}function n(e){return s(e)&&o.isZwsp(e.data)}function a(e){return t(e)||n(e)}function l(e){var t=e.parentNode;t&&t.removeChild(e)}function c(e){return e.firstChild!==e.lastChild||!i.isBr(e.firstChild)}function u(e){return s(e)&&e.data[0]==o.ZWSP}function d(e){return s(e)&&e.data[e.data.length-1]==o.ZWSP}return{isCaretContainer:a,isCaretContainerBlock:t,isCaretContainerInline:n,showCaretContainerBlock:function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],i.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},insertInline:function(e,t){var n,i,r;if(i=e.ownerDocument.createTextNode(o.ZWSP),r=e.parentNode,t){if(n=e.previousSibling,s(n)){if(a(n))return n;if(d(n))return n.splitText(n.data.length-1)}r.insertBefore(i,e)}else{if(n=e.nextSibling,s(n)){if(a(n))return n;if(u(n))return n.splitText(1),n}e.nextSibling?r.insertBefore(i,e.nextSibling):r.appendChild(i)}return i},insertBlock:function(e,t,n){var i,r,o;return(i=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),i.setAttribute("data-mce-bogus","all"),i.appendChild(((o=document.createElement("br")).setAttribute("data-mce-bogus","1"),o)),r=t.parentNode,n?r.insertBefore(i,t):t.nextSibling?r.insertBefore(i,t.nextSibling):r.appendChild(i),i},hasContent:c,remove:function(e){if(r(e)&&a(e)&&(c(e)?e.removeAttribute("data-mce-caret"):l(e)),s(e)){var t=o.trim(function(e){try{return e.nodeValue}catch(e){return""}}(e));n=e,0===(i=t).length?l(n):n.nodeValue=i}var n,i},startsWithCaretContainer:u,endsWithCaretContainer:d}}),e("tinymce/dom/RangeUtils",["tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/dom/Range","tinymce/caret/CaretContainer"],function(l,v,e,t,n){var x=l.each,i=e.isContentEditableTrue,y=e.isContentEditableFalse,b=n.isCaretContainer;function c(e){return i(e)||y(e)}function u(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}function r(e){return"_mce_caret"===e.id}function w(e,t){return b(e)&&!1==(null!==u(e,t,r))}function o(_){this.walk=function(e,r){var t,n,i,o,s,a,l,c=e.startContainer,u=e.startOffset,d=e.endContainer,h=e.endOffset;if(0<(l=_.select("td[data-mce-selected],th[data-mce-selected]")).length)x(l,function(e){r([e])});else{var f,p,m;if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(p=h,m=(f=d).childNodes,--p>m.length-1?p=m.length-1:p<0&&(p=0),d=m[p]||f),c==d)return r(g([c]));for(t=_.findCommonAncestor(c,d),o=c;o;o=o.parentNode){if(o===d)return b(c,t,!0);if(o===t)break}for(o=d;o;o=o.parentNode){if(o===c)return b(d,t);if(o===t)break}n=y(c,t)||c,i=y(d,t)||d,b(c,n,!0),(a=v(n==c?n:n.nextSibling,"nextSibling",i==d?i.nextSibling:i)).length&&r(g(a)),b(d,i)}function g(e){var t;return 3===(t=e[0]).nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===h&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function v(e,t,n){for(var i=[];e&&e!=n;e=e[t])i.push(e);return i}function y(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function b(e,t,n){var i=n?"nextSibling":"previousSibling";for(s=(o=e).parentNode;o&&o!=t;o=s)s=o.parentNode,(a=v(o==e?o:o[i],i)).length&&(n||a.reverse(),r(g(a)))}},this.split=function(e){var t=e.startContainer,n=e.startOffset,i=e.endContainer,r=e.endOffset;function o(e,t){return e.splitText(t)}return t==i&&3==t.nodeType?0<n&&n<t.nodeValue.length&&(t=(i=o(t,n)).previousSibling,n<r?(t=i=o(i,r-=n).previousSibling,r=i.nodeValue.length,n=0):r=0):(3==t.nodeType&&0<n&&n<t.nodeValue.length&&(t=o(t,n),n=0),3==i.nodeType&&0<r&&r<i.nodeValue.length&&(r=(i=o(i,r).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:i,endOffset:r}},this.normalize=function(p){var m,g;function e(e){var o,s,t,a,l,n,c,u=_.getRoot();function i(e,t){for(var n=new v(e,_.getParent(e.parentNode,_.isBlock)||u);e=n[t?"prev":"next"]();)if("BR"===e.nodeName)return!0}function r(e,t){var n,i,r;if(t=t||o,r=_.getParent(t.parentNode,_.isBlock)||u,e&&"BR"==t.nodeName&&c&&_.isEmpty(r))return o=t.parentNode,s=_.nodeIndex(t),void(m=!0);for(n=new v(t,r);a=n[e?"prev":"next"]();){if("false"===_.getContentEditableParent(a)||w(a,_.getRoot()))return;if(3===a.nodeType&&0<a.nodeValue.length)return o=a,s=e?a.nodeValue.length:0,void(m=!0);if(_.isBlock(a)||l[a.nodeName.toLowerCase()])return;i=a}g&&i&&(o=i,m=!0,s=0)}if(o=p[(e?"start":"end")+"Container"],s=p[(e?"start":"end")+"Offset"],c=1==o.nodeType&&s===o.childNodes.length,l=_.schema.getNonEmptyElements(),n=e,!b(o)){if(1==o.nodeType&&s>o.childNodes.length-1&&(n=!1),9===o.nodeType&&(o=_.getRoot(),s=0),o===u){if(n&&(a=o.childNodes[0<s?s-1:0])){if(b(a))return;if(l[a.nodeName]||"TABLE"==a.nodeName)return}if(o.hasChildNodes()){if(s=Math.min(!n&&0<s?s-1:s,o.childNodes.length-1),o=o.childNodes[s],s=0,!g&&o===u.lastChild&&"TABLE"===o.nodeName)return;if(function(e){for(;e&&e!=u;){if(y(e))return!0;e=e.parentNode}return!1}(o)||b(o))return;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){t=new v(a=o,u);do{if(y(a)||b(a)){m=!1;break}if(3===a.nodeType&&0<a.nodeValue.length){s=n?0:a.nodeValue.length,o=a,m=!0;break}if(l[a.nodeName.toLowerCase()]&&(!(d=a)||!/^(TD|TH|CAPTION)$/.test(d.nodeName))){s=_.nodeIndex(a),o=a.parentNode,"IMG"!=a.nodeName||n||s++,m=!0;break}}while(a=n?t.next():t.prev())}}}var d,h,f;g&&(3===o.nodeType&&0===s&&r(!0),1===o.nodeType&&((a=o.childNodes[s])||(a=o.childNodes[s-1]),!a||"BR"!==a.nodeName||(f="A",(h=a).previousSibling&&h.previousSibling.nodeName==f)||i(a)||i(a,!0)||r(!0,a))),n&&!g&&3===o.nodeType&&s===o.nodeValue.length&&r(!1),m&&p["set"+(e?"Start":"End")](o,s)}}return g=p.collapsed,e(!0),g||e(),m&&g&&p.collapse(!0),m}}return o.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},o.getCaretRangeFromPoint=function(t,n,i){var r,e,o,s,a;if(i.caretPositionFromPoint)e=i.caretPositionFromPoint(t,n),(r=i.createRange()).setStart(e.offsetNode,e.offset),r.collapse(!0);else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(t,n);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,n),r.collapse(!0)}catch(e){r=function(e,n,t){var i,r,o;if(i=t.elementFromPoint(e,n),r=t.body.createTextRange(),i&&"HTML"!=i.tagName||(i=t.body),r.moveToElementText(i),0<(o=(o=l.toArray(r.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(o[0].bottom+o[0].top)/2;try{return r.moveToPoint(e,n),r.collapse(!0),r}catch(e){}}return null}(t,n,i)}return o=r,s=i.body,a=o&&o.parentElement?o.parentElement():null,y(u(a,s,c))?null:o}return r},o.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},o.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},o}),e("tinymce/NodeChange",["tinymce/dom/RangeUtils","tinymce/Env","tinymce/util/Delay"],function(s,t,n){return function(o){var i,r=[];"onselectionchange"in o.getDoc()||o.on("NodeChange Click MouseUp KeyUp Focus",function(e){var t,n;n={startContainer:(t=o.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!=e.type&&s.compareRanges(n,i)||o.fire("SelectionChange"),i=n}),o.on("contextmenu",function(){o.fire("SelectionChange")}),o.on("SelectionChange",function(){var e=o.selection.getStart(!0);!t.range&&o.selection.isCollapsed()||!function(e){var t,n;if((n=o.$(e).parentsUntil(o.getBody()).add(e)).length===r.length){for(t=n.length;0<=t&&n[t]===r[t];t--);if(-1===t)return r=n,!0}return r=n,!1}(e)&&o.dom.isChildOf(e,o.getBody())&&o.nodeChanged({selectionChange:!0})}),o.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==o.selection.getNode().nodeName?n.setEditorTimeout(o,function(){o.nodeChanged()}):o.nodeChanged())}),this.nodeChanged=function(e){var t,n,i,r=o.selection;o.initialized&&r&&!o.settings.disable_nodechange&&!o.readonly&&(i=o.getBody(),(t=r.getStart()||i).ownerDocument==o.getDoc()&&o.dom.isChildOf(t,i)||(t=i),"IMG"==t.nodeName&&r.isCollapsed()&&(t=t.parentNode),n=[],o.dom.getParent(t,function(e){if(e===i)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,o.fire("NodeChange",e))}}}),e("tinymce/html/Node",[],function(){var o=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function s(e,t,n){var i,r,o=n?"lastChild":"firstChild",s=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(i=e[s])return i;for(r=e.parent;r&&r!==t;r=r.parent)if(i=r[s])return i}}function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}return a.prototype={replace:function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},attr:function(e,t){var n,i;if("string"!=typeof e){for(i in e)this.attr(i,e[i]);return this}if(n=this.attributes){if(void 0===t)return n.map[e];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),this;return this}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,this}},clone:function(){var e,t,n,i,r,o=new a(this.name,this.type);if(n=this.attributes){for((r=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(i=n[e]).name&&(r[r.length]={name:i.name,value:i.value},r.map[i.name]=i.value);o.attributes=r}return o.value=this.value,o.shortEnded=this.shortEnded,o},wrap:function(e){return this.parent.insert(e,this),e.append(this),this},unwrap:function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},remove:function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},append:function(e){var t;return e.parent&&e.remove(),t=this.lastChild,this.lastChild=t?((t.next=e).prev=t,e):this.firstChild=e,e.parent=this,e},insert:function(e,t,n){var i;return e.parent&&e.remove(),i=t.parent||this,n?(t===i.firstChild?i.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===i.lastChild?i.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=i,e},getAll:function(e){var t,n=[];for(t=this.firstChild;t;t=s(t,this))t.name===e&&n.push(t);return n},empty:function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=s(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},isEmpty:function(e,t){var n,i,r=this.firstChild;if(t=t||{},r)do{if(1===r.type){if(r.attributes.map["data-mce-bogus"])continue;if(e[r.name])return!1;for(n=r.attributes.length;n--;)if("name"===(i=r.attributes[n].name)||0===i.indexOf("data-mce-bookmark"))return!1}if(8===r.type)return!1;if(3===r.type&&!o.test(r.value))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&o.test(r.value))return!1}while(r=s(r,this));return!0},walk:function(e){return s(this,null,e)}},a.create=function(e,t){var n,i;if(n=new a(e,r[e]||1),t)for(i in t)n.attr(i,t[i]);return n},a}),e("tinymce/html/Schema",["tinymce/util/Tools"],function(n){var E={},N={},D=n.makeMap,R=n.each,A=n.extend,P=n.explode,M=n.inArray;function I(e,t){return(e=n.trim(e))?e.split(t||" "):[]}function O(e,n){var i;return e&&(i={},"string"==typeof e&&(e={"*":e}),R(e,function(e,t){i[t]=i[t.toUpperCase()]="map"==n?D(e,/[, ]/):P(e,/[, ]/)})),i}return function(o){var e,t,n,i,r,s,a,l,c,u,d,h,f,p=this,C={},m={},k=[],g={},v={};function y(e,t,n){var i=o[e];return i?i=D(i,/[, ]/,D(i.toUpperCase(),/[, ]/)):(i=E[e])||(i=D(t," ",D(t.toUpperCase()," ")),i=A(i,n),E[e]=i),i}function T(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function b(e){var t,n,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,_=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,x=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=I(e,","),C["@"]&&(g=C["@"].attributes,v=C["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(o=_.exec(e[t])){if(p=o[1],c=o[2],m=o[3],l=o[5],s={attributes:h={},attributesOrder:f=[]},"#"===p&&(s.paddEmpty=!0),"-"===p&&(s.removeEmpty=!0),"!"===o[4]&&(s.removeEmptyAttrs=!0),g){for(y in g)h[y]=g[y];f.push.apply(f,v)}if(l)for(i=0,r=(l=I(l,"|")).length;i<r;i++)if(o=x.exec(l[i])){if(a={},d=o[1],u=o[2].replace(/::/g,":"),p=o[3],b=o[4],"!"===d&&(s.attributesRequired=s.attributesRequired||[],s.attributesRequired.push(u),a.required=!0),"-"===d){delete h[u],f.splice(M(f,u),1);continue}p&&("="===p&&(s.attributesDefault=s.attributesDefault||[],s.attributesDefault.push({name:u,value:b}),a.defaultValue=b),":"===p&&(s.attributesForced=s.attributesForced||[],s.attributesForced.push({name:u,value:b}),a.forcedValue=b),"<"===p&&(a.validValues=D(b,"?"))),w.test(u)?(s.attributePatterns=s.attributePatterns||[],a.pattern=T(u),s.attributePatterns.push(a)):(h[u]||f.push(u),h[u]=a)}g||"@"!=c||(g=h,v=f),m&&(s.outputName=c,C[m]=s),w.test(c)?(s.pattern=T(c),k.push(s)):C[c]=s}}function _(e){C={},k=[],b(e),R(n,function(e,t){m[t]=e.children})}function x(e){var s=/^(~)?(.+)$/;e&&(E.text_block_elements=E.block_elements=null,R(I(e,","),function(e){var t=s.exec(e),n="~"===t[1],i=n?"span":"div",r=t[2];if(m[r]=m[i],g[r]=i,n||(c[r.toUpperCase()]={},c[r]={}),!C[r]){var o=C[i];delete(o=A({},o)).removeEmptyAttrs,delete o.removeEmpty,C[r]=o}R(m,function(e,t){e[i]&&(m[t]=e=A({},m[t]),e[r]=e[i])})}))}function w(e){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;E[o.schema]=null,e&&R(I(e,","),function(e){var t,n,i=r.exec(e);i&&(n=i[1],t=n?m[i[2]]:m[i[2]]={"#comment":{}},t=m[i[2]],R(I(i[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})}function S(e){var t,n=C[e];if(n)return n;for(t=k.length;t--;)if((n=k[t]).pattern.test(e))return n}n=function(e){var a,t,n,i,r,o,l={};function s(e,t,n){var i,r,o;function s(e,t){var n,i,r={};for(n=0,i=e.length;n<i;n++)r[e[n]]=t||{};return r}for(t=t||"","string"==typeof(n=n||[])&&(n=I(n)),i=(e=I(e)).length;i--;)o={attributes:s(r=I([a,t].join(" "))),attributesOrder:r,children:s(n,N)},l[e[i]]=o}function c(e,t){var n,i,r,o;for(n=(e=I(e)).length,t=I(t);n--;)for(i=l[e[n]],r=0,o=t.length;r<o;r++)i.attributes[t[r]]={},i.attributesOrder.push(t[r])}return E[e]?E[e]:(a="id accesskey class dir lang style tabindex title",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!=e&&(a+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!=e&&(a+=" xml:lang",n=[n,o="acronym applet basefont big font strike tt"].join(" "),R(I(o),function(e){s(e,"",n)}),t=[t,r="center dir isindex noframes"].join(" "),i=[t,n].join(" "),R(I(r),function(e){s(e,"",i)})),i=i||[t,n].join(" "),s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),s("address dt dd div caption","",i),s("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),s("blockquote","cite",i),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",i),s("dl","","dt dd"),s("a","href target rel media hreflang type",n),s("q","cite",n),s("ins del","cite datetime",i),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",i),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),s("param","name value"),s("map","name",[i,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",i),s("th","colspan rowspan headers scope abbr",i),s("form","accept-charset action autocomplete enctype method name novalidate target",i),s("fieldset","disabled form name",[i,"legend"].join(" ")),s("label","form for",n),s("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?i:n),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[i,"li"].join(" ")),s("noscript","",i),"html4"!=e&&(s("wbr"),s("ruby","",[n,"rt rp"].join(" ")),s("figcaption","",i),s("mark rt rp summary bdi","",n),s("canvas","width height",i),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[n,"option"].join(" ")),s("article section nav aside header footer","",i),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[i,"figcaption"].join(" ")),s("time","datetime",n),s("dialog","open",i),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",n),s("progress","value max",n),s("meter","value min max low high optimum",n),s("details","open",[i,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(c("script","language xml:space"),c("style","xml:space"),c("object","declare classid code codebase codetype archive standby align border hspace vspace"),c("embed","align name hspace vspace"),c("param","valuetype type"),c("a","charset name rev shape coords"),c("br","clear"),c("applet","codebase archive code object alt name width height align hspace vspace"),c("img","name longdesc align border hspace vspace"),c("iframe","longdesc frameborder marginwidth marginheight scrolling align"),c("font basefont","size color face"),c("input","usemap align"),c("select","onchange"),c("textarea"),c("h1 h2 h3 h4 h5 h6 div p legend caption","align"),c("ul","type compact"),c("li","type"),c("ol dl menu dir","compact"),c("pre","width xml:space"),c("hr","align noshade size width"),c("isindex","prompt"),c("table","summary width frame rules cellspacing cellpadding align bgcolor"),c("col","width align char charoff valign"),c("colgroup","width align char charoff valign"),c("thead","align char charoff valign"),c("tr","align char charoff valign bgcolor"),c("th","axis align char charoff valign nowrap bgcolor width height"),c("form","accept"),c("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),c("tfoot","align char charoff valign"),c("tbody","align char charoff valign"),c("area","nohref"),c("body","background bgcolor text link vlink alink")),"html4"!=e&&(c("input button select textarea","autofocus"),c("input textarea","placeholder"),c("a","download"),c("link script img","crossorigin"),c("iframe","sandbox seamless allowfullscreen")),R(I("a form meter progress dfn"),function(e){l[e]&&delete l[e].children[e]}),delete l.caption.children.table,delete l.script,E[e]=l)}((o=o||{}).schema),!1===o.verify_html&&(o.valid_elements="*[*]"),e=O(o.valid_styles),t=O(o.invalid_styles,"map"),l=O(o.valid_classes,"map"),i=y("whitespace_elements","pre script noscript style textarea video audio iframe object code"),r=y("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),s=y("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),a=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",s),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 nav figure"),c=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",h),f=y("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),R((o.special||"script noscript style textarea").split(" "),function(e){v[e]=new RegExp("</"+e+"[^>]*>","gi")}),o.valid_elements?_(o.valid_elements):(R(n,function(e,t){C[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},m[t]=e.children}),"html5"!=o.schema&&R(I("strong/b em/i"),function(e){e=I(e,"/"),C[e[1]].outputName=e[0]}),R(I("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){C[e]&&(C[e].removeEmpty=!0)}),R(I("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){C[e].paddEmpty=!0}),R(I("span"),function(e){C[e].removeEmptyAttrs=!0})),x(o.custom_elements),w(o.valid_children),b(o.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),R({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){C[t]&&(C[t].parentsRequired=I(e))}),o.invalid_elements&&R(P(o.invalid_elements),function(e){C[e]&&delete C[e]}),S("span")||b("span[!data-mce-type|*]"),p.children=m,p.getValidStyles=function(){return e},p.getInvalidStyles=function(){return t},p.getValidClasses=function(){return l},p.getBoolAttrs=function(){return a},p.getBlockElements=function(){return c},p.getTextBlockElements=function(){return h},p.getTextInlineElements=function(){return f},p.getShortEndedElements=function(){return s},p.getSelfClosingElements=function(){return r},p.getNonEmptyElements=function(){return u},p.getMoveCaretBeforeOnEnterElements=function(){return d},p.getWhiteSpaceElements=function(){return i},p.getSpecialElements=function(){return v},p.isValidChild=function(e,t){var n=m[e];return!(!n||!n[t])},p.isValid=function(e,t){var n,i,r=S(e);if(r){if(!t)return!0;if(r.attributes[t])return!0;if(n=r.attributePatterns)for(i=n.length;i--;)if(n[i].pattern.test(e))return!0}return!1},p.getElementRule=S,p.getCustomElements=function(){return g},p.addValidElements=b,p.setValidElements=_,p.addCustomElements=x,p.addValidChildren=w,p.elements=C}}),e("tinymce/html/SaxParser",["tinymce/html/Schema","tinymce/html/Entities","tinymce/util/Tools"],function(e,j,W){var i=W.each;function U(e,t,n){var i,r,o,s,a=1;for(s=e.getShortEndedElements(),(o=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=i=n;r=o.exec(t);){if(i=o.lastIndex,"/"===r[1])a--;else if(!r[1]){if(r[2]in s)continue;a++}if(0===a)break}return i}function t(F,z){var t=this;function n(){}F=F||{},t.schema=z=z||new e,!1!==F.fix_self_closing&&(F.fix_self_closing=!0),i("comment cdata text start end pi doctype".split(" "),function(e){e&&(t[e]=F[e]||n)}),t.parse=function(e){var t,n,i,l,r,o,s,c,a,u,d,h,f,p,m,g,v,y,b,_,x,w,C,k,T,S,E,N,D=this,R=0,A=[],P=0,M=j.decode,I=W.makeMap("src,href,data,background,formaction,poster"),O=/((java|vb)script|mhtml):/i,B=/^data:/i;function L(e){var t,n;for(t=A.length;t--&&A[t].name!==e;);if(0<=t){for(n=A.length-1;t<=n;n--)(e=A[n]).valid&&D.end(e.name);A.length=t}}function H(e,t,n,i,r){var o,s;if(n=(t=t.toLowerCase())in d?t:M(n||i||r||""),f&&!c&&0!==t.indexOf("data-")){if(!(o=y[t])&&b){for(s=b.length;s--&&!(o=b[s]).pattern.test(t););-1===s&&(o=null)}if(!o)return;if(o.validValues&&!(n in o.validValues))return}if(I[t]&&!F.allow_script_urls){var a=n.replace(/[\s\u0000-\u001F]+/g,"");try{a=decodeURIComponent(a)}catch(e){a=unescape(a)}if(O.test(a))return;if(!F.allow_html_data_urls&&B.test(a)&&!/^data:image\//i.test(a))return}l.map[t]=n,l.push({name:t,value:n})}for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,u=z.getShortEndedElements(),C=F.self_closing_elements||z.getSelfClosingElements(),d=z.getBoolAttrs(),f=F.validate,a=F.remove_internals,N=F.fix_self_closing,S=z.getSpecialElements();t=k.exec(e);){if(R<t.index&&D.text(M(e.substr(R,t.index-R))),n=t[6])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),L(n);else if(n=t[7]){if(":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),h=n in u,N&&C[n]&&0<A.length&&A[A.length-1].name===n&&L(n),!f||(p=z.getElementRule(n))){if(m=!0,f&&(y=p.attributes,b=p.attributePatterns),(v=t[8])?((c=-1!==v.indexOf("data-mce-type"))&&a&&(m=!1),(l=[]).map={},v.replace(T,H)):(l=[]).map={},f&&!c){if(_=p.attributesRequired,x=p.attributesDefault,w=p.attributesForced,p.removeEmptyAttrs&&!l.length&&(m=!1),w)for(r=w.length;r--;)s=(g=w[r]).name,"{$uid}"===(E=g.value)&&(E="mce_"+P++),l.map[s]=E,l.push({name:s,value:E});if(x)for(r=x.length;r--;)(s=(g=x[r]).name)in l.map||("{$uid}"===(E=g.value)&&(E="mce_"+P++),l.map[s]=E,l.push({name:s,value:E}));if(_){for(r=_.length;r--&&!(_[r]in l.map););-1===r&&(m=!1)}if(g=l.map["data-mce-bogus"]){if("all"===g){R=U(z,e,k.lastIndex),k.lastIndex=R;continue}m=!1}}m&&D.start(n,l,h)}else m=!1;if(i=S[n]){i.lastIndex=R=t.index+t[0].length,R=(t=i.exec(e))?(m&&(o=e.substr(R,t.index-R)),t.index+t[0].length):(o=e.substr(R),e.length),m&&(0<o.length&&D.text(o,!0),D.end(n)),k.lastIndex=R;continue}h||(v&&v.indexOf("/")==v.length-1?m&&D.end(n):A.push({name:n,valid:m}))}else(n=t[1])?(">"===n.charAt(0)&&(n=" "+n),F.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),D.comment(n)):(n=t[2])?D.cdata(n):(n=t[3])?D.doctype(n):(n=t[4])&&D.pi(n,t[5]);R=t.index+t[0].length}for(R<e.length&&D.text(M(e.substr(R))),r=A.length-1;0<=r;r--)(n=A[r]).valid&&D.end(n.name)}}return t.findEndTag=U,t}),e("tinymce/html/DomParser",["tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/util/Tools"],function(M,e,I,a){var O=a.makeMap,t=a.each,i=a.explode,B=a.extend,L=function(e,t){e.padd_empty_with_br?t.empty().append(new M("br","1")).shortEnded=!0:t.empty().append(new M("#text","3")).value=" "};return function(S,E){var N=this,D={},R=[],A={},P={};(S=S||{}).validate=!("validate"in S)||S.validate,S.root_name=S.root_name||"body",N.schema=E=E||new e,N.filterNode=function(e){var t,n,i;n in D&&((i=A[n])?i.push(e):A[n]=[e]),t=R.length;for(;t--;)(n=R[t].name)in e.attributes.map&&((i=P[n])?i.push(e):P[n]=[e]);return e},N.addNodeFilter=function(e,n){t(i(e),function(e){var t=D[e];t||(D[e]=t=[]),t.push(n)})},N.addAttributeFilter=function(e,n){t(i(e),function(e){var t;for(t=0;t<R.length;t++)if(R[t].name===e)return void R[t].callbacks.push(n);R.push({name:e,callbacks:[n]})})},N.parse=function(e,t){var n,r,l,i,o,s,a,c,u,d,h,f,p,m,g,v,y,b,_,x,w,C=[];function k(e,t){var n,i=new M(e,t);return e in D&&((n=A[e])?n.push(i):A[e]=[i]),i}function T(e){var t,n,i,r,o=E.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(i=t.value.replace(g,"")).length)return void(t.value=i);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}r=t.prev,t.remove(),t=r}}if(t=t||{},A={},P={},f=B(O("script,style,head,html,body,title,meta,param"),E.getBlockElements()),x=E.getNonEmptyElements(),_=E.children,h=S.validate,w="forced_root_block"in t?t.forced_root_block:S.forced_root_block,b=E.getWhiteSpaceElements(),p=/^[ \t\r\n]+/,g=/[ \t\r\n]+$/,v=/[ \t\r\n]+/g,y=/^[ \t\r\n]+$/,n=new I({validate:h,allow_script_urls:S.allow_script_urls,allow_conditional_comments:S.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}(E.getSelfClosingElements()),cdata:function(e){l.append(k("#cdata",4)).value=e},text:function(e,t){var n;m||(e=e.replace(v," "),l.lastChild&&f[l.lastChild.name]&&(e=e.replace(p,""))),0!==e.length&&((n=k("#text",3)).raw=!!t,l.append(n).value=e)},comment:function(e){l.append(k("#comment",8)).value=e},pi:function(e,t){l.append(k(e,7)).value=t,T(l)},doctype:function(e){l.append(k("#doctype",10)).value=e,T(l)},start:function(e,t,n){var i,r,o,s,a;if(o=h?E.getElementRule(e):{}){for((i=k(o.outputName||e,1)).attributes=t,i.shortEnded=n,l.append(i),(a=_[l.name])&&_[i.name]&&!a[i.name]&&C.push(i),r=R.length;r--;)(s=R[r].name)in t.map&&((u=P[s])?u.push(i):P[s]=[i]);f[e]&&T(i),n||(l=i),!m&&b[e]&&(m=!0)}},end:function(e){var t,n,i,r,o;if(n=h?E.getElementRule(e):{}){if(f[e]&&!m){if((t=l.firstChild)&&3===t.type)if(0<(i=t.value.replace(p,"")).length)t.value=i,t=t.next;else for(r=t.next,t.remove(),t=r;t&&3===t.type;)i=t.value,r=t.next,(0===i.length||y.test(i))&&(t.remove(),t=r),t=r;if((t=l.lastChild)&&3===t.type)if(0<(i=t.value.replace(g,"")).length)t.value=i,t=t.prev;else for(r=t.prev,t.remove(),t=r;t&&3===t.type;)i=t.value,r=t.prev,(0===i.length||y.test(i))&&(t.remove(),t=r),t=r}if(m&&b[e]&&(m=!1),(n.removeEmpty||n.paddEmpty)&&l.isEmpty(x,b))if(n.paddEmpty)L(S,l);else if(!l.attributes.map.name&&!l.attributes.map.id)return o=l.parent,f[l.name]?l.empty().remove():l.unwrap(),void(l=o);l=l.parent}}},E),r=l=new M(t.context||S.root_name,11),n.parse(e),h&&C.length&&(t.context?t.invalid=!0:function(e){var t,n,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y;for(h=O("tr,td,th,tbody,thead,tfoot,table"),u=E.getNonEmptyElements(),d=E.getWhiteSpaceElements(),f=E.getTextBlockElements(),p=E.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(f[n.name]&&"li"==n.parent.name){for(m=n.next;m&&f[m.name];)m.name="li",m.fixed=!0,n.parent.insert(m,n.parent),m=m.next;n.unwrap(n)}else{for(r=[n],i=n.parent;i&&!E.isValidChild(i.name,n.name)&&!h[i.name];i=i.parent)r.push(i);if(i&&1<r.length){for(r.reverse(),o=s=N.filterNode(r[0].clone()),c=0;c<r.length-1;c++){for(E.isValidChild(s.name,r[c].name)?(a=N.filterNode(r[c].clone()),s.append(a)):a=s,l=r[c].firstChild;l&&l!=r[c+1];)g=l.next,a.append(l),l=g;s=a}o.isEmpty(u,d)?i.insert(n,r[0],!0):(i.insert(o,r[0],!0),i.insert(n,o)),((i=r[0]).isEmpty(u,d)||(y="br",(v=i)&&v.firstChild===v.lastChild&&v.firstChild.name===y))&&i.empty().remove()}else if(n.parent){if("li"===n.name){if((m=n.prev)&&("ul"===m.name||"ul"===m.name)){m.append(n);continue}if((m=n.next)&&("ul"===m.name||"ul"===m.name)){m.insert(n,m.firstChild,!0);continue}n.wrap(N.filterNode(new M("ul",1)));continue}E.isValidChild(n.parent.name,"div")&&E.isValidChild("div",n.name)?n.wrap(N.filterNode(new M("div",1))):p[n.name]?n.empty().remove():n.unwrap()}}}(C)),w&&("body"==r.name||t.isRootContent)&&function(){var e,t,n=r.firstChild;function i(e){e&&((n=e.firstChild)&&3==n.type&&(n.value=n.value.replace(p,"")),(n=e.lastChild)&&3==n.type&&(n.value=n.value.replace(g,"")))}if(E.isValidChild(r.name,w.toLowerCase())){for(;n;)e=n.next,3==n.type||1==n.type&&"p"!==n.name&&!f[n.name]&&!n.attr("data-mce-type")?(t||((t=k(w,1)).attr(S.forced_root_block_attrs),r.insert(t,n)),t.append(n)):(i(t),t=null),n=e;i(t)}}(),!t.invalid){for(d in A){for(u=D[d],a=(i=A[d]).length;a--;)i[a].parent||i.splice(a,1);for(o=0,s=u.length;o<s;o++)u[o](i,d,t)}for(o=0,s=R.length;o<s;o++)if((u=R[o]).name in P){for(a=(i=P[u.name]).length;a--;)i[a].parent||i.splice(a,1);for(a=0,c=u.callbacks.length;a<c;a++)u.callbacks[a](i,u.name,t)}}return r},S.remove_trailing_brs&&N.addNodeFilter("br",function(e){var t,n,i,r,o,s,a,l,c=e.length,u=B({},E.getBlockElements()),d=E.getNonEmptyElements(),h=E.getNonEmptyElements();for(u.body=1,t=0;t<c;t++)if(i=(n=e[t]).parent,u[n.parent.name]&&n===i.lastChild){for(o=n.prev;o;){if("span"!==(s=o.name)||"bookmark"!==o.attr("data-mce-type")){if("br"!==s)break;if("br"===s){n=null;break}}o=o.prev}n&&(n.remove(),i.isEmpty(d,h)&&(a=E.getElementRule(i.name))&&(a.removeEmpty?i.remove():a.paddEmpty&&L(S,i)))}else{for(r=n;i&&i.firstChild===r&&i.lastChild===r&&!u[(r=i).name];)i=i.parent;r===i&&!0!==S.padd_empty_with_br&&((l=new M("#text",3)).value=" ",n.replace(l))}}),S.allow_unsafe_link_target||N.addAttributeFilter("href",function(e){var t,n,i=e.length,r="noopener noreferrer";function o(e){var t=new RegExp("("+r.replace(" ","|")+")","g");return e&&(e=a.trim(e.replace(t,""))),e||null}function s(e,t){return t?(n=o(n=e))?[n,r].join(" "):r:o(e);var n}for(;i--;)n=(t=e[i]).attr("rel"),"a"===t.name&&t.attr("rel",s(n,"_blank"==t.attr("target")))}),S.allow_html_in_named_anchor||N.addAttributeFilter("id,name",function(e){for(var t,n,i,r,o=e.length;o--;)if("a"===(r=e[o]).name&&r.firstChild&&!r.attr("href"))for(i=r.parent,t=r.lastChild;n=t.prev,i.insert(t,r),t=n;);}),S.fix_list_elements&&N.addNodeFilter("ul,ol",function(e){for(var t,n,i=e.length;i--;)if("ul"===(n=(t=e[i]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var r=new M("li",1);r.attr("style","list-style-type: none"),t.wrap(r)}}),S.validate&&E.getValidClasses()&&N.addAttributeFilter("class",function(e){for(var t,n,i,r,o,s,a,l=e.length,c=E.getValidClasses();l--;){for(n=(t=e[l]).attr("class").split(" "),o="",i=0;i<n.length;i++)r=n[i],a=!1,(s=c["*"])&&s[r]&&(a=!0),s=c[t.name],!a&&s&&s[r]&&(a=!0),a&&(o&&(o+=" "),o+=r);o.length||(o=null),t.attr("class",o)}})}}),e("tinymce/html/Writer",["tinymce/html/Entities","tinymce/util/Tools"],function(t,e){var n=e.makeMap;return function(e){var a,l,c,u,d,h=[];return a=(e=e||{}).indent,l=n(e.indent_before||""),c=n(e.indent_after||""),u=t.getEncodeFunc(e.entity_encoding||"raw",e.entities),d="html"==e.element_format,{start:function(e,t,n){var i,r,o,s;if(a&&l[e]&&0<h.length&&0<(s=h[h.length-1]).length&&"\n"!==s&&h.push("\n"),h.push("<",e),t)for(i=0,r=t.length;i<r;i++)o=t[i],h.push(" ",o.name,'="',u(o.value,!0),'"');h[h.length]=!n||d?">":" />",n&&a&&c[e]&&0<h.length&&0<(s=h[h.length-1]).length&&"\n"!==s&&h.push("\n")},end:function(e){var t;h.push("</",e,">"),a&&c[e]&&0<h.length&&0<(t=h[h.length-1]).length&&"\n"!==t&&h.push("\n")},text:function(e,t){0<e.length&&(h[h.length]=t?e:u(e))},cdata:function(e){h.push("<![CDATA[",e,"]]>")},comment:function(e){h.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?h.push("<?",e," ",u(t),"?>"):h.push("<?",e,"?>"),a&&h.push("\n")},doctype:function(e){h.push("<!DOCTYPE",e,">",a?"\n":"")},reset:function(){h.length=0},getContent:function(){return h.join("").replace(/\n$/,"")}}}}),e("tinymce/html/Serializer",["tinymce/html/Writer","tinymce/html/Schema"],function(e,n){return function(t,p){var m=new e(t);(t=t||{}).validate=!("validate"in t)||t.validate,this.schema=p=p||new n,this.writer=m,this.serialize=function(e){var d,h;function f(e){var t,n,i,r,o,s,a,l,c,u=d[e.type];if(u)u(e);else{if(t=e.name,n=e.shortEnded,i=e.attributes,h&&i&&1<i.length&&((s=[]).map={},c=p.getElementRule(e.name))){for(a=0,l=c.attributesOrder.length;a<l;a++)(r=c.attributesOrder[a])in i.map&&(o=i.map[r],s.map[r]=o,s.push({name:r,value:o}));for(a=0,l=i.length;a<l;a++)(r=i[a].name)in s.map||(o=i.map[r],s.map[r]=o,s.push({name:r,value:o}));i=s}if(m.start(e.name,i,n),!n){if(e=e.firstChild)for(;f(e),e=e.next;);m.end(t)}}}return h=t.validate,d={3:function(e){m.text(e.value,e.raw)},8:function(e){m.comment(e.value)},7:function(e){m.pi(e.name,e.value)},10:function(e){m.doctype(e.value)},4:function(e){m.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;f(e),e=e.next;);}},m.reset(),1!=e.type||t.inner?d[11](e):f(e),m.getContent()}}}),e("tinymce/dom/Serializer",["tinymce/dom/DOMUtils","tinymce/html/DomParser","tinymce/html/SaxParser","tinymce/html/Entities","tinymce/html/Serializer","tinymce/html/Node","tinymce/html/Schema","tinymce/Env","tinymce/util/Tools","tinymce/text/Zwsp"],function(e,t,p,i,m,n,r,g,o,v){var y=o.each,b=o.trim,s=e.DOM;return function(l,c){var u,d,h,n=["data-mce-selected"];function f(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\ufeff]+<\\/span>","\\s?("+n.join("|")+')="[^"]+"'].join("|"),"gi");return e=v.trim(e.replace(t,""))}function e(e){var t,n,i,r,o,s=e,a=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,l=c.schema;for(s=f(s),o=l.getShortEndedElements();r=a.exec(s);)n=a.lastIndex,i=r[0].length,t=o[r[1]]?n:p.findEndTag(l,s,n),s=s.substring(0,n-i)+s.substring(t),a.lastIndex=n-i;return s}return c&&(u=c.dom,d=c.schema),u=u||s,d=d||new r(l),l.entity_encoding=l.entity_encoding||"named",l.remove_trailing_brs=!("remove_trailing_brs"in l)||l.remove_trailing_brs,(h=new t(l,d)).addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,i=e.length;i--;)(n=e[i]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),h.addAttributeFilter("src,href,style",function(e,t){for(var n,i,r=e.length,o="data-mce-"+t,s=l.url_converter,a=l.url_converter_scope;r--;)void 0!==(i=(n=e[r]).attributes.map[o])?(n.attr(t,0<i.length?i:null),n.attr(o,null)):(i=n.attributes.map[t],"style"===t?i=u.serializeStyle(u.parseStyle(i),n.name):s&&(i=s.call(a,i,t,n.name)),n.attr(t,0<i.length?i:null))}),h.addAttributeFilter("class",function(e){for(var t,n,i=e.length;i--;)(n=(t=e[i]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),h.addAttributeFilter("data-mce-type",function(e,t,n){for(var i,r=e.length;r--;)"bookmark"!==(i=e[r]).attributes.map["data-mce-type"]||n.cleanup||i.remove()}),h.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=i.decode(t.value))}),h.addNodeFilter("script,style",function(e,t){var n,i,r,o=e.length;function s(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(;o--;)i=(n=e[o]).firstChild?n.firstChild.value:"","script"===t?((r=n.attr("type"))&&n.attr("type","mce-no/type"==r?null:r.replace(/^mce\-/,"")),0<i.length&&(n.firstChild.value="// <![CDATA[\n"+s(i)+"\n// ]]>")):0<i.length&&(n.firstChild.value="\x3c!--\n"+s(i)+"\n--\x3e")}),h.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),h.addNodeFilter("xml:namespace,input",function(e,t){for(var n,i=e.length;i--;)7===(n=e[i]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),h.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)}),{schema:d,addNodeFilter:h.addNodeFilter,addAttributeFilter:h.addAttributeFilter,serialize:function(e,t){var n,i,r,o,s,a;return g.ie&&0<u.select("script,style,select,map").length?(s=e.innerHTML,e=e.cloneNode(!1),u.setHTML(e,s)):e=e.cloneNode(!0),(n=document.implementation).createHTMLDocument&&(i=n.createHTMLDocument(""),y("BODY"==e.nodeName?e.childNodes:[e],function(e){i.body.appendChild(i.importNode(e,!0))}),e="BODY"!=e.nodeName?i.body.firstChild:i.body,r=u.doc,u.doc=i),(t=t||{}).format=t.format||"html",t.selection&&(t.forced_root_block=""),t.no_events||(t.node=e,this.onPreProcess(t)),function(e){var t,n;function i(e){return e&&"br"===e.name}i(t=e.lastChild)&&i(n=t.prev)&&(t.remove(),n.remove())}(a=h.parse(b(t.getInner?e.innerHTML:u.getOuterHTML(e)),t)),o=new m(l,d),t.content=o.serialize(a),t.cleanup||(t.content=v.trim(t.content),t.content=t.content.replace(/\uFEFF/g,"")),t.no_events||this.onPostProcess(t),r&&(u.doc=r),t.node=null,t.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){c&&c.fire("PreProcess",e)},onPostProcess:function(e){c&&c.fire("PostProcess",e)},addTempAttr:function(e){-1===o.inArray(n,e)&&(h.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),n.push(e))},trimHtml:f,getTrimmedContent:function(){return e(c.getBody().innerHTML)},trimContent:e}}}),e("tinymce/dom/TridentSelection",[],function(){return function(f){var c=this,p=f.dom;function u(e,t){var n,i,r,o,s,a,l,c,u=0,d=-1;if((n=e.duplicate()).collapse(t),(c=n.parentElement()).ownerDocument===f.dom.doc){for(;"false"===c.contentEditable;)c=c.parentNode;if(!c.hasChildNodes())return{node:c,inside:1};for(i=(o=c.children).length-1;u<=i;)if(s=o[l=Math.floor((u+i)/2)],n.moveToElementText(s),0<(d=n.compareEndPoints(t?"StartToStart":"EndToEnd",e)))i=l-1;else{if(!(d<0))return{node:s};u=l+1}if(d<0)for(s?n.collapse(!1):(n.moveToElementText(c),n.collapse(!0),s=c,r=!0),a=0;0!==n.compareEndPoints(t?"StartToStart":"StartToEnd",e)&&0!==n.move("character",1)&&c==n.parentElement();)a++;else for(n.collapse(!0),a=0;0!==n.compareEndPoints(t?"StartToStart":"StartToEnd",e)&&0!==n.move("character",-1)&&c==n.parentElement();)a++;return{node:s,position:d,offset:a,inside:r}}}this.getBookmark=function(e){var n=f.getRng(),t={};function i(e){var t,n,i,r,o=[];for(t=e.parentNode,n=p.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=(i=t.children).length;r--;)if(e===i[r]){o.push(r);break}t=(e=t).parentNode}return o}function r(e){var t;if(t=u(n,e))return{position:t.position,offset:t.offset,indexes:i(t.node),inside:t.inside}}return 2===e&&(n.item?t.start={ctrl:!0,indexes:i(n.item(0))}:(t.start=r(!0),f.isCollapsed()||(t.end=r()))),t},this.moveToBookmark=function(o){var s,a=p.doc.body;function l(e){var t,n,i,r;for(t=p.getRoot(),n=e.length-1;0<=n;n--)r=t.children,(i=e[n])<=r.length-1&&(t=r[i]);return t}function e(e){var t,n,i,r=o[e?"start":"end"];r&&(t=0<r.position,(n=a.createTextRange()).moveToElementText(l(r.indexes)),void 0!==(i=r.offset)?(n.collapse(r.inside||t),n.moveStart("character",t?-i:i)):n.collapse(e),s.setEndPoint(e?"StartToStart":"EndToStart",n),e&&s.collapse(!0))}o.start&&(o.start.ctrl?(s=a.createControlRange()).addElement(l(o.start.indexes)):(s=a.createTextRange(),e(!0),e()),s.select())},this.addRange=function(e){var s,t,a,l,c,u,n,i,r,d=f.dom.doc,h=d.body;function o(e){var t,n,i,r,o;i=p.create("a"),t=e?a:c,n=e?l:u,r=s.duplicate(),t!=d&&t!=d.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(i,t),r.moveToElementText(i),r.moveStart("character",n),p.remove(i),s.setEndPoint(e?"StartToStart":"EndToEnd",r)):((o=t.childNodes).length?(n>=o.length?p.insertAfter(i,o[o.length-1]):t.insertBefore(i,o[n]),r.moveToElementText(i)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",i=t.firstChild,r.moveToElementText(i),r.collapse(!1)),s.setEndPoint(e?"StartToStart":"EndToEnd",r),p.remove(i))}if(a=e.startContainer,l=e.startOffset,c=e.endContainer,u=e.endOffset,s=h.createTextRange(),a==c&&1==a.nodeType){if(l==u&&!a.hasChildNodes()){if(a.canHaveHTML)return(n=a.previousSibling)&&!n.hasChildNodes()&&p.isBlock(n)?n.innerHTML="&#xFEFF;":n=null,a.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",s.moveToElementText(a.lastChild),s.select(),p.doc.selection.clear(),a.innerHTML="",void(n&&(n.innerHTML=""));l=p.nodeIndex(a),a=a.parentNode}if(l==u-1)try{if(r=a.childNodes[l],(t=h.createControlRange()).addElement(r),t.select(),(i=f.getRng()).item&&r===i.item(0))return}catch(e){}}o(!0),o(),s.select()},this.getRangeAt=function(){var t,n,i,r,o,a=f.getRng(),l=p.createRng();if((t=a.item?a.item(0):a.parentElement()).ownerDocument!=p.doc)return l;if(n=f.isCollapsed(),a.item)return l.setStart(t.parentNode,p.nodeIndex(t)),l.setEnd(l.startContainer,l.startOffset+1),l;function s(e){var t,n,i,r,o=u(a,e),s=0;if(t=o.node,n=o.offset,!o.inside||t.hasChildNodes())if(void 0!==n){if(o.position<0){if(!(i=o.inside?t.firstChild:t.nextSibling))return void l[e?"setStartAfter":"setEndAfter"](t);if(!n)return void(3==i.nodeType?l[e?"setStart":"setEnd"](i,0):l[e?"setStartBefore":"setEndBefore"](i));for(;i;){if(3==i.nodeType&&n<=(s+=(r=i.nodeValue).length)){t=i,s-=n,s=r.length-s;break}i=i.nextSibling}}else{if(!(i=t.previousSibling))return l[e?"setStartBefore":"setEndBefore"](t);if(!n)return void(3==t.nodeType?l[e?"setStart":"setEnd"](i,t.nodeValue.length):l[e?"setStartAfter":"setEndAfter"](i));for(;i;){if(3==i.nodeType&&n<=(s+=i.nodeValue.length)){t=i,s-=n;break}i=i.previousSibling}}l[e?"setStart":"setEnd"](t,s)}else l[e?"setStartBefore":"setEndAfter"](t);else l[e?"setStart":"setEnd"](t,0)}try{s(!0),n||s()}catch(e){if(-2147024809!=e.number)throw e;o=c.getBookmark(2),(i=a.duplicate()).collapse(!0),t=i.parentElement(),n||((i=a.duplicate()).collapse(!1),(r=i.parentElement()).innerHTML=r.innerHTML),t.innerHTML=t.innerHTML,c.moveToBookmark(o),a=f.getRng(),s(!0),n||s()}return l}}}),e("tinymce/util/VK",["tinymce/Env"],function(t){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return t.mac?e.metaKey:e.ctrlKey&&!e.altKey}}}),e("tinymce/dom/ControlSelection",["tinymce/util/VK","tinymce/util/Tools","tinymce/util/Delay","tinymce/Env","tinymce/dom/NodeType"],function(q,V,$,K,e){var J=e.isContentEditableFalse,Y=e.isContentEditableTrue;return function(r,c){var u,l,d,h,f,p,m,g,v,y,b,_,x,w,C,k,T,S,E=c.dom,N=V.each,D=c.getDoc(),R=document,o=K.ie&&K.ie<11,A=Math.abs,s=Math.round,P=c.getBody();h={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var e=".mce-content-body";function M(e){var t=c.settings.object_resizing;return!1!==t&&!K.iOS&&("string"!=typeof t&&(t="table,img,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!=c.getBody()&&c.dom.is(e,t)))}function I(e){var t,n,i,r;t=e.screenX-m,n=e.screenY-g,C=t*f[2]+b,k=n*f[3]+_,C=C<5?5:C,k=k<5?5:k,("IMG"==u.nodeName&&!1!==c.settings.resize_img_proportional?!q.modifierPressed(e):q.modifierPressed(e)||"IMG"==u.nodeName&&f[2]*f[3]!=0)&&(A(t)>A(n)?(k=s(C*x),C=s(k/x)):(C=s(k/x),k=s(C*x))),E.setStyles(l,{width:C,height:k}),i=0<(i=f.startPos.x+t)?i:0,r=0<(r=f.startPos.y+n)?r:0,E.setStyles(d,{left:i,top:r,display:"block"}),d.innerHTML=C+" &times; "+k,f[2]<0&&l.clientWidth<=C&&E.setStyle(l,"left",v+(b-C)),f[3]<0&&l.clientHeight<=k&&E.setStyle(l,"top",y+(_-k)),(t=P.scrollWidth-T)+(n=P.scrollHeight-S)!==0&&E.setStyles(d,{left:i-t,top:r-n}),w||(c.fire("ObjectResizeStart",{target:u,width:b,height:_}),w=!0)}function O(){function e(e,t){t&&(u.style[e]||!c.schema.isValid(u.nodeName.toLowerCase(),e)?E.setStyle(u,e,t):E.setAttrib(u,e,t))}w=!1,e("width",C),e("height",k),E.unbind(D,"mousemove",I),E.unbind(D,"mouseup",O),R!=D&&(E.unbind(R,"mousemove",I),E.unbind(R,"mouseup",O)),E.remove(l),E.remove(d),o&&"TABLE"!=u.nodeName||B(u),c.fire("ObjectResized",{target:u,width:C,height:k}),E.setAttrib(u,"style",E.getAttrib(u,"style")),c.nodeChanged()}function B(e,r,o){var t,s,a,n,i;L(),j(),t=E.getPos(e,P),v=t.x,y=t.y,i=e.getBoundingClientRect(),s=i.width||i.right-i.left,a=i.height||i.bottom-i.top,u!=e&&(z(),u=e,C=k=0),n=c.fire("ObjectSelected",{target:e}),M(e)&&!n.isDefaultPrevented()?N(h,function(t,e){var n;function i(e){m=e.screenX,g=e.screenY,b=u.clientWidth,_=u.clientHeight,x=_/b,(f=t).startPos={x:s*t[0]+v,y:a*t[1]+y},T=P.scrollWidth,S=P.scrollHeight,l=u.cloneNode(!0),E.addClass(l,"mce-clonedresizable"),E.setAttrib(l,"data-mce-bogus","all"),l.contentEditable=!1,l.unSelectabe=!0,E.setStyles(l,{left:v,top:y,margin:0}),l.removeAttribute("data-mce-selected"),P.appendChild(l),E.bind(D,"mousemove",I),E.bind(D,"mouseup",O),R!=D&&(E.bind(R,"mousemove",I),E.bind(R,"mouseup",O)),d=E.add(P,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},b+" &times; "+_)}r?e==r&&i(o):((n=E.get("mceResizeHandle"+e))&&E.remove(n),n=E.add(P,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),K.ie&&(n.contentEditable=!1),E.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),i(e)}),t.elm=n,E.setStyles(n,{left:s*t[0]+v-n.offsetWidth/2,top:a*t[1]+y-n.offsetHeight/2}))}):L(),u.setAttribute("data-mce-selected","1")}function L(){var e,t;for(e in j(),u&&u.removeAttribute("data-mce-selected"),h)(t=E.get("mceResizeHandle"+e))&&(E.unbind(t),E.remove(t))}function n(e){var t,n;function i(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}w||c.removed||(N(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"==e.type?e.target:r.getNode(),i(n=E.$(n).closest(o?"table":"table,img,hr")[0],P)&&(W(),i(t=r.getStart(!0),n)&&i(r.getEnd(!0),n)&&(!o||n!=t&&"IMG"!==t.nodeName))?B(n):L())}function i(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function t(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function a(e){var t,n,i,r,o,s,a,l=e.srcElement;for(n in t=l.getBoundingClientRect(),s=p.clientX-t.left,a=p.clientY-t.top,h)if(i=h[n],r=l.offsetWidth*i[0],o=l.offsetHeight*i[1],A(r-s)<8&&A(o-a)<8){f=i;break}w=!0,c.fire("ObjectResizeStart",{target:u,width:u.clientWidth,height:u.clientHeight}),c.getDoc().selection.empty(),B(l,n,p)}function H(e){return J(function(e,t){for(;t&&t!=e;){if(Y(t)||J(t))return t;t=t.parentNode}return null}(c.getBody(),e))}function F(e){var t,n=e.srcElement;if(H(n))(t=e).preventDefault?t.preventDefault():t.returnValue=!1;else if(n!=u){if(c.fire("ObjectSelected",{target:n}),z(),0===n.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=n.nodeName&&"TABLE"!=n.nodeName||(L(),i(u=n,"resizestart",a))}}function z(){t(u,"resizestart",a)}function j(){for(var e in h){var t=h[e];t.elm&&(E.unbind(t.elm),delete t.elm)}}function W(){try{c.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function U(e){var t;if(o){t=D.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(e){}}}return c.contentStyles.push(e+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+e+" .mce-resizehandle:hover {background: #000}"+e+" img[data-mce-selected],"+e+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+e+" .mce-clonedresizable {position: absolute;"+(K.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+e+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),c.on("init",function(){o?(c.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(L(),U(e.target))}),i(P,"controlselect",F),c.on("mousedown",function(e){p=e})):(W(),11<=K.ie&&(c.on("mousedown click",function(e){var t=e.target,n=t.nodeName;w||!/^(TABLE|IMG|HR)$/.test(n)||H(t)||(c.selection.select(t,"TABLE"==n),"mousedown"==e.type&&c.nodeChanged())}),c.dom.bind(P,"mscontrolselect",function(e){function t(e){$.setEditorTimeout(c,function(){c.selection.select(e)})}if(H(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 t=$.throttle(function(e){c.composing||n(e)});c.on("nodechange ResizeEditor ResizeWindow drop",t),c.on("keyup compositionend",function(e){u&&"TABLE"==u.nodeName&&t(e)}),c.on("hide blur",L)}),c.on("remove",j),{isResizable:M,showResizeRect:B,hideResizeRect:L,updateResizeRect:n,controlSelect:U,destroy:function(){u=l=null,o&&(z(),t(P,"controlselect",F))}}}}),e("tinymce/util/Fun",[],function(){var i=[].slice;return{constant:function(e){return function(){return e}},negate:function(t){return function(e){return!t(e)}},and:function(){var n=i.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},or:function(){var n=i.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},curry:function t(e){var n=i.call(arguments);return n.length-1>=e.length?e.apply(this,n.slice(1)):function(){var e=n.concat([].slice.call(arguments));return t.apply(this,e)}},compose:function(t,n){return function(e){return t(n(e))}},noop:function(){}}}),e("tinymce/caret/CaretCandidate",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/caret/CaretContainer"],function(e,n,t){var i=e.isContentEditableTrue,r=e.isContentEditableFalse,o=e.isBr,s=e.isText,a=e.matchNodeNames("script style textarea"),l=e.matchNodeNames("img input textarea hr iframe video audio object"),c=e.matchNodeNames("table"),u=t.isCaretContainer;function d(e){return!u(e)&&(s(e)?!a(e.parentNode):l(e)||o(e)||c(e)||r(e))}function h(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(r(e))return!1;if(i(e))return!0}return!0}return{isCaretCandidate:d,isInEditable:h,isAtomic:function(e){return l(e)||!!r(t=e)&&!0!==n.reduce(t.getElementsByTagName("*"),function(e,t){return e||i(t)},!1);var t},isEditableCaretCandidate:function(e,t){return d(e)&&h(e,t)}}}),e("tinymce/geom/ClientRect",[],function(){var t=Math.round;function n(e){return e?{left:t(e.left),top:t(e.top),bottom:t(e.bottom),right:t(e.right),width:t(e.width),height:t(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function i(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function r(e,t){return e.bottom<t.top||!(e.top>t.bottom)&&i(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&i(t.bottom-e.top,e,t)}function s(e,t){return e.left<t.left}function a(e,t){return e.right>t.right}return{clone:n,collapse:function(e,t){return(e=n(e)).right=(t||(e.left=e.left+e.width),e.left),e.width=0,e},isEqual:function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},isAbove:r,isBelow:o,isLeft:s,isRight:a,compare:function(e,t){return r(e,t)?-1:o(e,t)?1:s(e,t)?-1:a(e,t)?1:0},containsXY:function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}}}),e("tinymce/text/ExtendingChar",[],function(){var t=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]");return{isExtendingChar:function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&t.test(e)}}}),e("tinymce/caret/CaretPosition",["tinymce/util/Fun","tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/dom/RangeUtils","tinymce/caret/CaretCandidate","tinymce/geom/ClientRect","tinymce/text/ExtendingChar"],function(r,e,t,n,i,c,l){var u=e.isElement,o=i.isCaretCandidate,d=e.matchStyleValues("display","block table"),s=e.matchStyleValues("float","left right"),h=r.and(u,o,r.negate(s)),a=r.negate(e.matchStyleValues("white-space","pre pre-line pre-wrap")),f=e.isText,p=e.isBr,m=t.nodeIndex,g=n.getNode;function v(e){return"createRange"in e?e.createRange():t.DOM.createRng()}function y(e){return e&&/[\r\n\t ]/.test(e)}function b(e){var t,n=e.startContainer,i=e.startOffset;return!(!y(e.toString())||!a(n.parentNode)||!y((t=n.data)[i-1])&&!y(t[i+1]))}function _(e){var t,n,i=[];function r(e){var t,n,i,r,o,s,a,l;return t=0<(n=e.getClientRects()).length?c.clone(n[0]):c.clone(e.getBoundingClientRect()),p(e)&&0===t.left?(o=(i=e).ownerDocument,s=v(o),a=o.createTextNode(" "),(l=i.parentNode).insertBefore(a,i),s.setStart(a,0),s.setEnd(a,1),r=c.clone(s.getBoundingClientRect()),l.removeChild(a),r):t}function o(e,t){return(e=c.collapse(e,t)).width=1,e.right=e.left+1,e}function s(e){0!==e.height&&(0<i.length&&c.isEqual(e,i[i.length-1])||i.push(e))}function a(e,t){var n=v(e.ownerDocument);if(t<e.data.length){if(l.isExtendingChar(e.data[t]))return i;if(l.isExtendingChar(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!b(n)))return s(o(r(n),!1)),i}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),b(n)||s(o(r(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),b(n)||s(o(r(n),!0)))}if(f(e.container()))return a(e.container(),e.offset()),i;if(u(e.container()))if(e.isAtEnd())n=g(e.container(),e.offset()),f(n)&&a(n,n.data.length),h(n)&&!p(n)&&s(o(r(n),!1));else{if(n=g(e.container(),e.offset()),f(n)&&a(n,0),h(n)&&e.isAtEnd())return s(o(r(n),!1)),i;t=g(e.container(),e.offset()-1),h(t)&&!p(t)&&(d(t)||d(n)||!h(n))&&s(o(r(t),!1)),h(n)&&s(o(r(n),!0))}return i}function x(t,n,e){function i(){return e||(e=_(new x(t,n))),e}return{container:r.constant(t),offset:r.constant(n),toRange:function(){var e;return(e=v(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:i,isVisible:function(){return 0<i().length},isAtStart:function(){return f(t),0===n},isAtEnd:function(){return f(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return g(t,e?n-1:n)}}}return x.fromRangeStart=function(e){return new x(e.startContainer,e.startOffset)},x.fromRangeEnd=function(e){return new x(e.endContainer,e.endOffset)},x.after=function(e){return new x(e.parentNode,m(e)+1)},x.before=function(e){return new x(e.parentNode,m(e))},x}),e("tinymce/caret/CaretBookmark",["tinymce/dom/NodeType","tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/caret/CaretPosition"],function(l,e,c,u,o){var d=l.isText,r=l.isBogus,s=e.nodeIndex;function a(e){return e?u.reduce(e.childNodes,function(e,t){return r(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function h(t){return function(e){return t===e}}function t(e){var i,t,n;return i=a(function e(t){var n=t.parentNode;return r(n)?e(n):n}(e)),t=u.findIndex(i,h(e),e),i=i.slice(0,t+1),n=u.reduce(i,function(e,t,n){return d(t)&&d(i[n-1])&&e++,e},0),i=u.filter(i,l.matchNodeNames(e.nodeName)),(t=u.findIndex(i,h(e),e))-n}function f(e){return(d(e)?"text()":e.nodeName.toLowerCase())+"["+t(e)+"]"}return{create:function(e,t){var n,i,r,o,s,a=[];return n=t.container(),i=t.offset(),d(n)?r=function(e,t){for(;(e=e.previousSibling)&&d(e);)t+=e.data.length;return t}(n,i):(i>=(o=n.childNodes).length?(r="after",i=o.length-1):r="before",n=o[i]),a.push(f(n)),s=function(e,t,n){var i=[];for(t=t.parentNode;!(t==e||n&&n(t));t=t.parentNode)i.push(t);return i}(e,n),s=u.filter(s,c.negate(l.isBogus)),(a=a.concat(u.map(s,function(e){return f(e)}))).reverse().join("/")+","+r},resolve:function(e,t){var n,i,r;return t?(t=(n=t.split(","))[0].split("/"),r=1<n.length?n[1]:"before",(i=u.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,i=t[1],r=parseInt(t[2],10),o=a(n),o=u.filter(o,function(e,t){return!d(e)||!d(o[t-1])}),(o=u.filter(o,l.matchNodeNames(i)))[r]):null;var n,i,r,o},e))?d(i)?function(e,t){for(var n,i=e,r=0;d(i);){if(n=i.data.length,r<=t&&t<=r+n){e=i,t-=r;break}if(!d(i.nextSibling)){e=i,t=n;break}r+=n,i=i.nextSibling}return t>e.data.length&&(t=e.data.length),new o(e,t)}(i,parseInt(r,10)):(r="after"===r?s(i)+1:s(i),new o(i.parentNode,r)):null):null}}}),e("tinymce/dom/BookmarkManager",["tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretContainer","tinymce/caret/CaretBookmark","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils"],function(m,g,h,v,y,b,_){var x=b.isContentEditableFalse;function e(f){var p=f.dom;this.getBookmark=function(e,c){var t,n,i,r,o,s,a,l="&#xFEFF;";function u(e,t){var n=0;return g.each(p.select(e),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!=t&&void n++}),n}function d(o){function e(e){var t,n,i,r=e?"start":"end";t=o[r+"Container"],n=o[r+"Offset"],1==t.nodeType&&"TR"==t.nodeName&&(t=(i=t.childNodes)[Math.min(e?n:n-1,i.length-1)])&&(n=e?0:t.childNodes.length,o["set"+(e?"Start":"End")](t,n))}return e(!0),e(),o}if(2==e)return o=(s=f.getNode())?s.nodeName:null,t=f.getRng(),x(s)||"IMG"==o?{name:o,index:u(o,s)}:f.tridentSel?f.tridentSel.getBookmark(e):(s=function(e){function t(e,t){var n;if(b.isElement(e)&&(e=_.getNode(e,t),x(e)))return e;if(h.isCaretContainer(e)){if(b.isText(e)&&h.isCaretContainerBlock(e)&&(e=e.parentNode),n=e.previousSibling,x(n))return n;if(n=e.nextSibling,x(n))return n}}return t(e.startContainer,e.startOffset)||t(e.endContainer,e.endOffset)}(t))?{name:o=s.tagName,index:u(o,s)}:function(e){var l=p.getRoot(),t={};function n(e,t){var n,i,r=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],s=[],a=0;if(3==r.nodeType){if(c)for(n=r.previousSibling;n&&3==n.nodeType;n=n.previousSibling)o+=n.nodeValue.length;s.push(o)}else o>=(i=r.childNodes).length&&i.length&&(a=1,o=Math.max(0,i.length-1)),s.push(p.nodeIndex(i[o],c)+a);for(;r&&r!=l;r=r.parentNode)s.push(p.nodeIndex(r,c));return s}return t.start=n(e,!0),f.isCollapsed()||(t.end=n(e)),t}(t);if(3==e)return t=f.getRng(),{start:v.create(p.getRoot(),y.fromRangeStart(t)),end:v.create(p.getRoot(),y.fromRangeEnd(t))};if(e)return{rng:f.getRng()};if(t=f.getRng(),i=p.uniqueId(),r=f.isCollapsed(),a="overflow:hidden;line-height:0px",t.duplicate||t.item){if(t.item)return{name:o=(s=t.item(0)).nodeName,index:u(o,s)};n=t.duplicate();try{t.collapse(),t.pasteHTML('<span data-mce-type="bookmark" id="'+i+'_start" style="'+a+'">'+l+"</span>"),r||(n.collapse(!1),t.moveToElementText(n.parentElement()),0===t.compareEndPoints("StartToEnd",n)&&n.move("character",-1),n.pasteHTML('<span data-mce-type="bookmark" id="'+i+'_end" style="'+a+'">'+l+"</span>"))}catch(e){return null}}else{if("IMG"==(o=(s=f.getNode()).nodeName))return{name:o,index:u(o,s)};n=d(t.cloneRange()),r||(n.collapse(!1),n.insertNode(p.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:a},l))),(t=d(t)).collapse(!0),t.insertNode(p.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:a},l))}return f.moveToBookmark({id:i,keep:1}),{id:i}},this.moveToBookmark=function(a){var s,l,c,u,d,h,e,t;function n(e){var t,n,i,r,o=a[e?"start":"end"];if(o){for(i=o[0],n=l,t=o.length-1;1<=t;t--){if(r=n.childNodes,o[t]>r.length-1)return;n=r[o[t]]}3===n.nodeType&&(i=Math.min(o[0],n.nodeValue.length)),1===n.nodeType&&(i=Math.min(o[0],n.childNodes.length)),e?s.setStart(n,i):s.setEnd(n,i)}return!0}function i(e){var t,n,i,r,o=p.get(a.id+"_"+e),s=a.keep;if(o&&(t=o.parentNode,"start"==e?(n=s?(t=o.firstChild,1):p.nodeIndex(o),c=u=t,d=h=n):(n=s?(t=o.firstChild,1):p.nodeIndex(o),u=t,h=n),!s)){for(r=o.previousSibling,i=o.nextSibling,g.each(g.grep(o.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});o=p.get(a.id+"_"+e);)p.remove(o,1);r&&i&&r.nodeType==i.nodeType&&3==r.nodeType&&!m.opera&&(n=r.nodeValue.length,r.appendData(i.nodeValue),p.remove(i),"start"==e?(c=u=r,d=h=n):(u=r,h=n))}}function r(e){return!p.isBlock(e)||e.innerHTML||m.ie||(e.innerHTML='<br data-mce-bogus="1" />'),e}if(a)if(g.isArray(a.start)){if(s=p.createRng(),l=p.getRoot(),f.tridentSel)return f.tridentSel.moveToBookmark(a);n(!0)&&n()&&f.setRng(s)}else"string"==typeof a.start?f.setRng((e=p.createRng(),t=v.resolve(p.getRoot(),a.start),e.setStart(t.container(),t.offset()),t=v.resolve(p.getRoot(),a.end),e.setEnd(t.container(),t.offset()),e)):a.id?(i("start"),i("end"),c&&((s=p.createRng()).setStart(r(c),d),s.setEnd(r(u),h),f.setRng(s))):a.name?f.select(p.select(a.name)[a.index]):a.rng&&f.setRng(a.rng)}}return e.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},e}),e("tinymce/dom/Selection",["tinymce/dom/TreeWalker","tinymce/dom/TridentSelection","tinymce/dom/ControlSelection","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/NodeType","tinymce/Env","tinymce/util/Tools","tinymce/caret/CaretPosition"],function(a,o,s,n,l,d,c,e,t){var u=e.each,h=e.trim,f=c.ie;function i(e,t,n,i){var r=this;r.dom=e,r.win=t,r.serializer=n,r.editor=i,r.bookmarkManager=new l(r),r.controlSelection=new s(r,i),r.win.getSelection||(r.tridentSel=new o(r))}return i.prototype={setCursorLocation:function(e,t){var n=this.dom.createRng();e?(n.setStart(e,t),n.setEnd(e,t),this.setRng(n),this.collapse(!1)):(this._moveEndPoint(n,this.editor.getBody(),!0),this.setRng(n))},getContent:function(e){var t,n,i,r=this.getRng(),o=this.dom.create("body"),s=this.getSel();return t=n="",(e=e||{}).get=!0,e.format=e.format||"html",e.selection=!0,this.editor.fire("BeforeGetContent",e),"text"==e.format?this.isCollapsed()?"":r.text||(s.toString?s.toString():""):(r.cloneContents?(i=r.cloneContents())&&o.appendChild(i):r.item!==ye||r.htmlText!==ye?(o.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),o.removeChild(o.firstChild)):o.innerHTML=r.toString(),/^\s/.test(o.innerHTML)&&(t=" "),/\s+$/.test(o.innerHTML)&&(n=" "),e.getInner=!0,e.content=this.isCollapsed()?"":t+this.serializer.serialize(o,e)+n,this.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n,i,r,o=this,s=o.getRng(),a=o.win.document;if((t=t||{format:"html"}).set=!0,t.selection=!0,t.content=e,t.no_events||o.editor.fire("BeforeSetContent",t),e=t.content,s.insertNode){e+='<span id="__caret">_</span>',s.startContainer==a&&s.endContainer==a?a.body.innerHTML=e:(s.deleteContents(),0===a.body.childNodes.length?a.body.innerHTML=e:s.createContextualFragment?s.insertNode(s.createContextualFragment(e)):(i=a.createDocumentFragment(),r=a.createElement("div"),i.appendChild(r),r.outerHTML=e,s.insertNode(i))),n=o.dom.get("__caret"),(s=a.createRange()).setStartBefore(n),s.setEndBefore(n),o.setRng(s),o.dom.remove("__caret");try{o.setRng(s)}catch(e){}}else s.item&&(a.execCommand("Delete",!1,null),s=o.getRng()),/^\s+/.test(e)?(s.pasteHTML('<span id="__mce_tmp">_</span>'+e),o.dom.remove("__mce_tmp")):s.pasteHTML(e);t.no_events||o.editor.fire("SetContent",t)},getStart:function(e){var t,n,i,r,o=this.getRng();if(o.duplicate||o.item){if(o.item)return o.item(0);for((i=o.duplicate()).collapse(1),(t=i.parentElement()).ownerDocument!==this.dom.doc&&(t=this.dom.getRoot()),n=r=o.parentElement();r=r.parentNode;)if(r==t){t=n;break}return t}return 1==(t=o.startContainer).nodeType&&t.hasChildNodes()&&(e&&o.collapsed||(t=t.childNodes[Math.min(t.childNodes.length-1,o.startOffset)])),t&&3==t.nodeType?t.parentNode:t},getEnd:function(e){var t,n,i=this.getRng();return i.duplicate||i.item?i.item?i.item(0):((i=i.duplicate()).collapse(0),(t=i.parentElement()).ownerDocument!==this.dom.doc&&(t=this.dom.getRoot()),t&&"BODY"==t.nodeName&&t.lastChild||t):(t=i.endContainer,n=i.endOffset,1==t.nodeType&&t.hasChildNodes()&&(e&&i.collapsed||(t=t.childNodes[0<n?n-1:n])),t&&3==t.nodeType?t.parentNode:t)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n,i=this.dom,r=i.createRng();if(this.lastFocusBookmark=null,e){if(!t&&this.controlSelection.controlSelect(e))return;n=i.nodeIndex(e),r.setStart(e.parentNode,n),r.setEnd(e.parentNode,n+1),t&&(this._moveEndPoint(r,e,!0),this._moveEndPoint(r,e)),this.setRng(r)}return e},isCollapsed:function(){var e=this.getRng(),t=this.getSel();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},collapse:function(e){var t,n=this.getRng();n.item&&(t=n.item(0),(n=this.win.document.body.createTextRange()).moveToElementText(t)),n.collapse(!!e),this.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){var t,n,i,r,o,s,a=this;function l(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}}if(!a.win)return null;if(null==(r=a.win.document))return null;if(!e&&a.lastFocusBookmark){var c=a.lastFocusBookmark;return c.startContainer?((n=r.createRange()).setStart(c.startContainer,c.startOffset),n.setEnd(c.endContainer,c.endOffset)):n=c,n}if(e&&a.tridentSel)return a.tridentSel.getRangeAt(0);try{(t=a.getSel())&&(n=0<t.rangeCount?t.getRangeAt(0):t.createRange?t.createRange():r.createRange())}catch(e){}if((s=a.editor.fire("GetSelectionRange",{range:n})).range!==n)return s.range;if(f&&n&&n.setStart&&r.selection){try{o=r.selection.createRange()}catch(e){}o&&o.item&&(i=o.item(0),(n=r.createRange()).setStartBefore(i),n.setEndAfter(i))}return n||(n=r.createRange?r.createRange():r.body.createTextRange()),n.setStart&&9===n.startContainer.nodeType&&n.collapsed&&(i=a.dom.getRoot(),n.setStart(i,0),n.setEnd(i,0)),a.selectedRange&&a.explicitRange&&(0===l(n.START_TO_START,n,a.selectedRange)&&0===l(n.END_TO_END,n,a.selectedRange)?n=a.explicitRange:(a.selectedRange=null,a.explicitRange=null)),n},setRng:function(e,t){var n,i;if(e)if(e.select){this.explicitRange=null;try{e.select()}catch(e){}}else if(this.tridentSel){if(e.cloneRange)try{this.tridentSel.addRange(e)}catch(e){}}else{if(n=this.getSel(),e=this.editor.fire("SetSelectionRange",{range:e}).range,n){this.explicitRange=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)),this.selectedRange=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!n.setBaseAndExtent||c.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset])&&"IMG"==i.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(i,0,i,1)),this.editor.fire("AfterSetSelectionRange",{range:e})}},setNode:function(e){return this.setContent(this.dom.getOuterHTML(e)),e},getNode:function(){var e,t,n,i,r,o=this.getRng(),s=this.dom.getRoot();function a(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}return o?(t=o.startContainer,n=o.endContainer,i=o.startOffset,r=o.endOffset,o.setStart?(e=o.commonAncestorContainer,!o.collapsed&&(t==n&&r-i<2&&t.hasChildNodes()&&(e=t.childNodes[i]),3===t.nodeType&&3===n.nodeType&&(t=t.length===i?a(t.nextSibling,!0):t.parentNode,n=0===r?a(n.previousSibling,!1):n.parentNode,t&&t===n))?t:e&&3==e.nodeType?e.parentNode:e):((e=o.item?o.item(0):o.parentElement()).ownerDocument!==this.win.document&&(e=s),e)):s},getSelectedBlocks:function(e,t){var n,i,r=this.dom,o=[];if(i=r.getRoot(),e=r.getParent(e||this.getStart(),r.isBlock),t=r.getParent(t||this.getEnd(),r.isBlock),e&&e!=i&&o.push(e),e&&t&&e!=t)for(var s=new a(n=e,i);(n=s.next())&&n!=t;)r.isBlock(n)&&o.push(n);return t&&e!=t&&t!=i&&o.push(t),o},isForward:function(){var e,t,n=this.dom,i=this.getSel();return!(i&&i.anchorNode&&i.focusNode)||((e=n.createRng()).setStart(i.anchorNode,i.anchorOffset),e.collapse(!0),(t=n.createRng()).setStart(i.focusNode,i.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},normalize:function(){var e=this.getRng();return c.range&&new n(this.dom).normalize(e)&&this.setRng(e,this.isForward()),e},selectorChanged:function(e,t){var s,a=this;return a.selectorChangedData||(a.selectorChangedData={},s={},a.editor.on("NodeChange",function(e){var n=e.element,i=a.dom,r=i.getParents(n,null,i.getRoot()),o={};u(a.selectorChangedData,function(e,n){u(r,function(t){if(i.is(t,n))return s[n]||(u(e,function(e){e(!0,{node:t,selector:n,parents:r})}),s[n]=e),o[n]=e,!1})}),u(s,function(e,t){o[t]||(delete s[t],u(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a.selectorChangedData[e]||(a.selectorChangedData[e]=[]),a.selectorChangedData[e].push(t),a},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){var n,i,r,o,s=this.dom,a=s.getRoot(),l=0;function c(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}}if(d.isElement(e)){if(!1===t&&(l=e.offsetHeight),"BODY"!=a.nodeName){var u=this.getScrollContainer();if(u)return n=c(e).y-c(u).y+l,o=u.clientHeight,void((n<(r=u.scrollTop)||r+o<n+25)&&(u.scrollTop=n<r?n:n-o+25))}i=s.getViewPort(this.editor.getWin()),n=s.getPos(e).y+l,r=i.y,o=i.h,(n<i.y||r+o<n+25)&&this.editor.getWin().scrollTo(0,n<r?n:n-o+25)}},placeCaretAt:function(e,t){this.setRng(n.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(e,t,n){var i=t,r=new a(t,i),o=this.dom.schema.getNonEmptyElements();do{if(3==t.nodeType&&0!==h(t.nodeValue).length)return void(n?e.setStart(t,0):e.setEnd(t,t.nodeValue.length));if(o[t.nodeName]&&!/^(TD|TH)$/.test(t.nodeName))return void(n?e.setStartBefore(t):"BR"==t.nodeName?e.setEndBefore(t):e.setEndAfter(t));if(c.ie&&c.ie<11&&this.dom.isBlock(t)&&this.dom.isEmpty(t))return void(n?e.setStart(t,0):e.setEnd(t,0))}while(t=n?r.next():r.prev());"BODY"==i.nodeName&&(n?e.setStart(i,0):e.setEnd(i,i.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?t.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},i}),e("tinymce/dom/ElementUtils",["tinymce/dom/BookmarkManager","tinymce/util/Tools"],function(o,e){var s=e.each;return function(r){this.compare=function(e,t){if(e.nodeName!=t.nodeName)return!1;function n(n){var i={};return s(r.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(i[t]=r.getAttrib(n,t))}),i}function i(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!(!i(n(e),n(t))||!i(r.parseStyle(r.getAttrib(e,"style")),r.parseStyle(r.getAttrib(t,"style")))||o.isBookmarkNode(e)||o.isBookmarkNode(t))}}}),e("tinymce/fmt/Preview",["tinymce/dom/DOMUtils","tinymce/util/Tools","tinymce/html/Schema"],function(e,m,o){var u=m.each,g=e.DOM;function d(e,t){var n,r,i,f=t&&t.schema||new o({});function p(e){var t,n,i;return r="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=g.create(r.name),n=t,(i=r).classes.length&&g.addClass(n,i.classes.join(" ")),g.setAttribs(n,i.attrs),t}return e&&e.length?(n=p(r=e[0]),(i=g.create("div")).appendChild(function e(n,t,i){var r,o,s,a,l,c,u,d=t.length&&t[0],h=d&&d.name;if(l=h,c="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,s=!(!(u=f.getElementRule(c).parentsRequired)||!u.length)&&(l&&-1!==m.inArray(u,l)?l:u[0]))h==s?(o=t[0],t=t.slice(1)):o=s;else if(d)o=t[0],t=t.slice(1);else if(!i)return n;return o&&(r=p(o)).appendChild(n),i&&(r||(r=g.create("div")).appendChild(n),m.each(i,function(e){var t=p(e);r.insertBefore(t,n)})),e(r,t,o&&o.siblings)}(n,e.slice(1),r.siblings)),i):""}function i(e){var t,s={classes:[],attrs:{}};return"*"!==(e=s.selector=m.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,i,r){switch(t){case"#":s.attrs.id=n;break;case".":s.classes.push(n);break;case":":-1!==m.inArray("checked disabled enabled read-only required".split(" "),n)&&(s.attrs[n]=n)}if("["==i){var o=r.match(/([\w\-]+)(?:\=\"([^\"]+))?/);o&&(s.attrs[o[1]]=o[2])}return""})),s.name=t||"div",s}function h(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),m.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=m.map(e.split(/(?:~\+|~|\+)/),i),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]}return{getCssText:function(n,e){var t,i,r,o,s,a,l="";if(!1===(a=n.settings.preview_styles))return"";function c(e){return e.replace(/%(\w+)/g,"")}if("string"!=typeof a&&(a="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(a=e.preview)?"":(t=e.block||e.inline||"span",i=(o=h(e.selector)).length?(o[0].name||(o[0].name=t),t=e.selector,d(o,n)):d([t],n),r=g.select(t,i)[0]||i.firstChild,u(e.styles,function(e,t){(e=c(e))&&g.setStyle(r,t,e)}),u(e.attributes,function(e,t){(e=c(e))&&g.setAttrib(r,t,e)}),u(e.classes,function(e){e=c(e),g.hasClass(r,e)||g.addClass(r,e)}),n.fire("PreviewFormats"),g.setStyles(i,{position:"absolute",left:-65535}),n.getBody().appendChild(i),s=g.getStyle(n.getBody(),"fontSize",!0),s=/px$/.test(s)?parseInt(s,10):0,u(a.split(" "),function(e){var t=g.getStyle(r,e,!0);if(!("background-color"==e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=g.getStyle(n.getBody(),e,!0),"#ffffff"==g.toHex(t).toLowerCase())||"color"==e&&"#000000"==g.toHex(t).toLowerCase())){if("font-size"==e&&/em|%$/.test(t)){if(0===s)return;t=(t=parseFloat(t,10)/(/%$/.test(t)?100:1))*s+"px"}"border"==e&&t&&(l+="padding:0 2px;"),l+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),g.remove(i),l)},parseSelector:h,selectorToHtml:function(e,t){return d(h(e),t)}}}),e("tinymce/fmt/Hooks",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/DomQuery"],function(r,o,s){var e,t,n={},a=r.filter,l=r.each;return t=function(e){var t,n,i=e.selection.getRng();t=o.matchNodeNames("pre"),i.collapsed||(n=e.selection.getSelectedBlocks(),l(a(a(n,t),function(e){return t(e.previousSibling)&&-1!=r.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,s(n=e).remove(),s(t).append("<br><br>").append(n.childNodes)}))},n[e="pre"]||(n[e]=[]),n[e].push(t),{postProcess:function(e,t){l(n[e],function(e){e(t)})}}}),e("tinymce/Formatter",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/dom/BookmarkManager","tinymce/dom/ElementUtils","tinymce/util/Fun","tinymce/util/Tools","tinymce/fmt/Preview","tinymce/fmt/Hooks"],function(te,e,r,l,ne,ie,o,re){return function(b){var s,g,t,c,n={},_=b.dom,x=b.selection,w=new e(_),C=b.schema.isValidChild,k=_.isBlock,u=b.settings.forced_root_block,v=_.nodeIndex,m="\ufeff",d=/^(src|href|style)$/,T=!1,S=!0,E=_.getContentEditable,N=r.isBookmarkNode,D=ie.each,R=ie.grep,A=ie.walk;function P(e){return e.nodeType&&(e=e.nodeName),!!b.schema.getTextBlockElements()[e.toLowerCase()]}function p(e){return/^(TH|TD)$/.test(e.nodeName)}function y(e,t){return _.getParents(e,t,_.getRoot())}function M(e){return 1===e.nodeType&&"_mce_caret"===e.id}function I(e){return e?n[e]:n}function i(e,t){e&&("string"!=typeof e?D(e,function(e,t){i(t,e)}):(t=t.length?t:[t],D(t,function(e){e.deep===g&&(e.deep=!e.selector),e.split===g&&(e.split=!e.selector||e.inline),e.remove===g&&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+/))}),n[e]=t))}function a(e,t){var n=I(t);if(n)for(var i=0;i<n.length;i++)if(!1===n[i].inherit&&_.is(e,n[i].selector))return!0;return!1}function O(e){var t;return b.dom.getParent(e,function(e){return(t=b.dom.getStyle(e,"text-decoration"))&&"none"!==t}),t}function h(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=O(e.parentNode),b.dom.getStyle(e,"color")&&t?b.dom.setStyle(e,"text-decoration",t):b.dom.getStyle(e,"text-decoration")===t&&b.dom.setStyle(e,"text-decoration",null))}function B(f,p,o){var e,t,m=I(f),g=m[0],i=!o&&x.isCollapsed();function v(n,e){if(e=e||g,n){if(e.onformat&&e.onformat(n,e,p,o),D(e.styles,function(e,t){_.setStyle(n,t,V(e,p))}),e.styles){var t=_.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}D(e.attributes,function(e,t){_.setAttrib(n,t,V(e,p))}),D(e.classes,function(e){e=V(e,p),_.hasClass(n,e)||_.addClass(n,e)})}}function y(e,t){var n=!1;return!!g.selector&&(D(e,function(e){if(!("collapsed"in e&&e.collapsed!==i))return _.is(t,e.selector)&&!M(t)?(v(t,e),!(n=!0)):void 0}),n)}function n(e,t,l){var c,u,d=[],h=!0;c=g.inline||g.block,v(u=_.create(c)),w.walk(e,function(e){var a;D(e,function e(t){var n,i,r,o;if(o=h,n=t.nodeName.toLowerCase(),i=t.parentNode.nodeName.toLowerCase(),1===t.nodeType&&E(t)&&(o=h,h="true"===E(t),r=!0),j(n,"br"))return a=0,void(g.block&&_.remove(t));if(g.wrapper&&H(t,f,p))a=0;else{if(h&&!r&&g.block&&!g.wrapper&&P(n)&&C(i,c))return v(t=_.rename(t,c)),d.push(t),void(a=0);if(g.selector){var s=y(m,t);if(!g.inline||s)return void(a=0)}!h||r||!C(c,n)||!C(i,c)||!l&&3===t.nodeType&&1===t.nodeValue.length&&65279===t.nodeValue.charCodeAt(0)||M(t)||g.inline&&k(t)?(a=0,D(R(t.childNodes),e),r&&(h=o),a=0):(a||(a=_.clone(u,T),t.parentNode.insertBefore(a,t),d.push(a)),a.appendChild(t))}})}),!0===g.links&&D(d,function(e){!function e(t){"A"===t.nodeName&&v(t,g),D(R(t.childNodes),e)}(e)}),D(d,function(n){var e,t,i,r;function o(e){var t=0;return D(e.childNodes,function(e){$(e)||N(e)||t++}),t}function s(e){var t=!1;return D(e.childNodes,function(e){if(W(e))return t=e,!1}),t}if(e=o(n),!(1<d.length)&&k(n)||0!==e){if(g.inline||g.wrapper){if(g.exact||1!==e||((i=s(t=n))&&!N(i)&&z(i,g)&&(v(r=_.clone(i,T)),_.replace(r,t,S),_.remove(i,1)),n=r||t),D(m,function(t){D(_.select(t.inline,n),function(e){N(e)||Y(t,p,e,t.exact?e:null)})}),H(n.parentNode,f,p)&&Y(g,p,n)&&(n=0),g.merge_with_parents&&_.getParent(n.parentNode,function(e){if(H(e,f,p))return Y(g,p,n)&&(n=0),S}),!k(n)&&!q(n,"fontSize")){var a=function(e,t){do{if(1!==o(e))break;if(!(e=s(e)))break;if(t(e))return e}while(e);return null}(n,U("fontSize"));a&&B("fontsize",{value:q(a,"fontSize")},n)}n&&!1!==g.merge_siblings&&(n=Q(n=Q(X(n),n),X(n,S)))}}else _.remove(n,1)})}if("false"!==E(x.getNode())){if(g){if(o)o.nodeType?y(m,o)||((t=_.createRng()).setStartBefore(o),t.setEndAfter(o),n(J(t,m),0,!0)):n(o,0,!0);else if(i&&g.inline&&!_.select("td[data-mce-selected],th[data-mce-selected]").length)Z("apply",f,p);else{var r=b.selection.getNode();u||!m[0].defaultBlock||_.getParent(r,_.isBlock)||B(m[0].defaultBlock),b.selection.setRng(function(){var e=b.selection.getRng(),t=e.startContainer,n=e.endContainer;if(t!=n&&0===e.endOffset){var i=function(e,t){var n=new te(t);for(o=n.prev2();o;o=n.prev2()){if(3==o.nodeType&&0<o.data.length)return o;if(1<o.childNodes.length||o==e||"BR"==o.tagName)return o}}(t,n),r=3==i.nodeType?i.data.length:i.childNodes.length;e.setEnd(i,r)}return e}()),e=x.getBookmark(),n(J(x.getRng(S),m)),g.styles&&((g.styles.color||g.styles.textDecoration)&&(A(r,h,"childNodes"),h(r)),g.styles.backgroundColor&&function t(e,n,i){D(e.childNodes,function(e){W(e)&&(n(e)&&i(e),e.hasChildNodes()&&t(e,n,i))})}(r,U("fontSize"),(s="backgroundColor",a=V(g.styles.backgroundColor,p),ne.curry(function(e,t,n){_.setStyle(n,e,t)},s,a)))),x.moveToBookmark(e),ee(x.getRng(S)),b.nodeChanged()}re.postProcess(f,b)}var s,a}else{o=x.getNode();for(var l=0,c=m.length;l<c;l++)if(m[l].ceFalseOverride&&_.is(o,m[l].selector))return void v(o,m[l])}}function L(i,u,e,r){var t,n,d=I(i),h=d[0],a=!0;function o(e){return function(e,t,n,i){var r,o,s,a,l,c;if(e){for(c=e.parentNode,r=t.parentNode;r&&r!=c;r=r.parentNode){for(o=_.clone(r,T),l=0;l<d.length;l++)if(Y(d[l],u,o,o)){o=0;break}o&&(s&&o.appendChild(s),a||(a=o),s=o)}!i||h.mixed&&k(e)||(t=_.split(e,t)),s&&(n.parentNode.insertBefore(s,n),a.appendChild(n))}return t}((D(y(e.parentNode).reverse(),function(e){var t;n||"_start"==e.id||"_end"==e.id||(t=H(e,i,u,r))&&!1!==t.split&&(n=e)}),n),e,e,!0);var n}function s(e){var t=_.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return N(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),_.remove(t,!0),n}function l(e){var t,n,i=e.commonAncestorContainer;if(e=J(e,d,S),h.split){if((t=G(e,S))!=(n=G(e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),i&&/^T(HEAD|BODY|FOOT|R)$/.test(i.nodeName)&&p(n)&&n.firstChild&&(n=n.firstChild||n),_.isChildOf(t,n)&&!k(n)&&!p(t)&&!p(n))return o(t=K(t,"span",{id:"_start","data-mce-type":"bookmark"})),void(t=s(S));t=K(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=K(n,"span",{id:"_end","data-mce-type":"bookmark"}),o(t),o(n),t=s(S),n=s()}else t=n=o(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=v(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=v(n)+1}w.walk(e,function(e){D(e,function(e){!function e(t){var n,i,r,o,s;if(1===t.nodeType&&E(t)&&(o=a,a="true"===E(t),s=!0),n=R(t.childNodes),a&&!s)for(i=0,r=d.length;i<r&&!Y(d[i],u,t,t);i++);if(h.deep&&n.length){for(i=0,r=n.length;i<r;i++)e(n[i]);s&&(a=o)}}(e),1===e.nodeType&&"underline"===b.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===O(e.parentNode)&&Y({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}if(e)e.nodeType?((n=_.createRng()).setStartBefore(e),n.setEndAfter(e),l(n)):l(e);else if("false"!==E(x.getNode()))x.isCollapsed()&&h.inline&&!_.select("td[data-mce-selected],th[data-mce-selected]").length?Z("remove",i,u,r):(t=x.getBookmark(),l(x.getRng(S)),x.moveToBookmark(t),h.inline&&F(i,u,x.getStart())&&ee(x.getRng(!0)),b.nodeChanged());else{e=x.getNode();for(var c=0,f=d.length;c<f&&(!d[c].ceFalseOverride||!Y(d[c],u,e,e));c++);}}function H(e,t,a,l){var n,i,r,o=I(t);function s(e,t,n){var i,r,o,s=t[n];if(t.onmatch)return t.onmatch(e,t,n);if(s)if(s.length===g){for(i in s)if(s.hasOwnProperty(i)){if(r="attributes"===n?_.getAttrib(e,i):q(e,i),l&&!r&&!t.exact)return;if((!l||t.exact)&&!j(r,f(V(s[i],a),i)))return}}else for(o=0;o<s.length;o++)if("attributes"===n?_.getAttrib(e,s[o]):q(e,s[o]))return t;return t}if(o&&e)for(i=0;i<o.length;i++)if(z(e,n=o[i])&&s(e,n,"attributes")&&s(e,n,"styles")){if(r=n.classes)for(i=0;i<r.length;i++)if(!_.hasClass(e,r[i]))return;return n}}function F(n,i,e){var t;function r(e){var t=_.getRoot();return e!==t&&H(e=_.getParent(e,function(e){return!!a(e,n)||(e.parentNode===t||!!H(e,n,i,!0))}),n,i)}return e?r(e):r(e=x.getNode())?S:(t=x.getStart())!=e&&r(t)?S:T}function z(e,t){return j(e,t.inline)?S:j(e,t.block)?S:t.selector?1==e.nodeType&&_.is(e,t.selector):void 0}function j(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function W(e){return 1==e.nodeType&&!N(e)&&!$(e)&&!M(e)}function U(e){return ne.curry(function(e,t){return!(!t||!q(t,e))},e)}function q(e,t){return f(_.getStyle(e,t),t)}function f(e,t){return"color"!=t&&"backgroundColor"!=t||(e=_.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function V(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e}function $(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function K(e,t,n){var i=_.create(t,n);return e.parentNode.insertBefore(i,e),i.appendChild(e),i}function J(s,a,l){var e,t,n,c=s.startContainer,u=s.startOffset,d=s.endContainer,h=s.endOffset;function i(e){var t,n,i,r,o,s;if(t=n=e?c:d,r=e?"previousSibling":"nextSibling",o=_.getRoot(),3==t.nodeType&&!$(t)&&(e?0<u:h<t.nodeValue.length))return t;for(;;){if(!a[0].block_expand&&k(n))return n;for(i=n[r];i;i=i[r])if(!N(i)&&!$(i)&&("BR"!=(s=i).nodeName||!s.getAttribute("data-mce-bogus")||s.nextSibling))return n;if(n==o||n.parentNode==o){t=n;break}n=n.parentNode}return t}function r(e,t){for(t===g&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function o(e){for(var t=e;t;){if(1===t.nodeType&&E(t))return"false"===E(t)?t:e;t=t.parentNode}return e}function f(e,t,o){var n,i,r,s;function a(e,t){var n,i,r=e.nodeValue;return void 0===t&&(t=o?r.length:0),o?(n=r.lastIndexOf(" ",t),-1===(n=(i=r.lastIndexOf(" ",t))<n?n:i)||l||n++):(n=r.indexOf(" ",t),i=r.indexOf(" ",t),n=-1!==n&&(-1===i||n<i)?n:i),n}if(3===e.nodeType){if(-1!==(r=a(e,t)))return{container:e,offset:r};s=e}for(n=new te(e,_.getParent(e,k)||b.getBody());i=n[o?"prev":"next"]();)if(3===i.nodeType){if(-1!==(r=a(s=i)))return{container:i,offset:r}}else if(k(i))break;if(s)return{container:s,offset:t=o?0:s.length}}function p(e,t){var n,i,r,o;for(3==e.nodeType&&0===e.nodeValue.length&&e[t]&&(e=e[t]),n=y(e),i=0;i<n.length;i++)for(r=0;r<a.length;r++)if(!("collapsed"in(o=a[r])&&o.collapsed!==s.collapsed)&&_.is(n[i],o.selector))return n[i];return e}function m(e,t){var n,i=_.getRoot();if(a[0].wrapper||(n=_.getParent(e,a[0].block,i)),n||(n=_.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&P(e)})),n&&a[0].wrapper&&(n=y(n,"ul,ol").reverse()[0]||n),!n)for(n=e;n[t]&&!k(n[t])&&!j(n=n[t],"br"););return n||e}if(1==c.nodeType&&c.hasChildNodes()&&(e=c.childNodes.length-1,3==(c=c.childNodes[e<u?e:u]).nodeType&&(u=0)),1==d.nodeType&&d.hasChildNodes()&&(e=d.childNodes.length-1,3==(d=d.childNodes[e<h?e:h-1]).nodeType&&(h=d.nodeValue.length)),c=o(c),d=o(d),(N(c.parentNode)||N(c))&&3==(c=(c=N(c)?c:c.parentNode).nextSibling||c).nodeType&&(u=0),(N(d.parentNode)||N(d))&&3==(d=(d=N(d)?d:d.parentNode).previousSibling||d).nodeType&&(h=d.length),a[0].inline&&(s.collapsed&&((n=f(c,u,!0))&&(c=n.container,u=n.offset),(n=f(d,h))&&(d=n.container,h=n.offset)),(t=r(d,h)).node)){for(;t.node&&0===t.offset&&t.node.previousSibling;)t=r(t.node.previousSibling);t.node&&0<t.offset&&3===t.node.nodeType&&" "===t.node.nodeValue.charAt(t.offset-1)&&1<t.offset&&(d=t.node).splitText(t.offset-1)}return(a[0].inline||a[0].block_expand)&&(a[0].inline&&3==c.nodeType&&0!==u||(c=i(!0)),a[0].inline&&3==d.nodeType&&h!==d.nodeValue.length||(d=i())),a[0].selector&&a[0].expand!==T&&!a[0].inline&&(c=p(c,"previousSibling"),d=p(d,"nextSibling")),(a[0].block||a[0].selector)&&(c=m(c,"previousSibling"),d=m(d,"nextSibling"),a[0].block&&(k(c)||(c=i(!0)),k(d)||(d=i()))),1==c.nodeType&&(u=v(c),c=c.parentNode),1==d.nodeType&&(h=v(d)+1,d=d.parentNode),{startContainer:c,startOffset:u,endContainer:d,endOffset:h}}function Y(n,i,r,o){var e,t,s,a;if(!z(r,n)&&(a=r,!n.links||"A"!=a.tagName))return T;if("all"!=n.remove)for(D(n.styles,function(e,t){e=f(V(e,i),t),"number"==typeof t&&(t=e,o=0),(n.remove_similar||!o||j(q(o,t),e))&&_.setStyle(r,t,""),s=1}),s&&""===_.getAttrib(r,"style")&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style")),D(n.attributes,function(e,t){var n;if(e=V(e,i),"number"==typeof t&&(t=e,o=0),!o||j(_.getAttrib(o,t),e)){if("class"==t&&(e=_.getAttrib(r,t))&&(n="",D(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void _.setAttrib(r,t,n);"class"==t&&r.removeAttribute("className"),d.test(t)&&r.removeAttribute("data-mce-"+t),r.removeAttribute(t)}}),D(n.classes,function(e){e=V(e,i),o&&!_.hasClass(o,e)||_.removeClass(r,e)}),t=_.getAttribs(r),e=0;e<t.length;e++){var l=t[e].nodeName;if(0!==l.indexOf("_")&&0!==l.indexOf("data-"))return T}return"none"!=n.remove?(function(e,t){var n,i=e.parentNode;function r(e,t,n){return!(e=X(e,t,n))||"BR"==e.nodeName||k(e)}t.block&&(u?i==_.getRoot()&&(t.list_block&&j(e,t.list_block)||D(R(e.childNodes),function(e){C(u,e.nodeName.toLowerCase())?n?n.appendChild(e):(n=K(e,u),_.setAttribs(n,b.settings.forced_root_block_attrs)):n=0})):k(e)&&!k(i)&&(r(e,T)||r(e.firstChild,S,1)||e.insertBefore(_.create("br"),e.firstChild),r(e,S)||r(e.lastChild,T,1)||e.appendChild(_.create("br"))));if(t.selector&&t.inline&&!j(t.inline,e))return;_.remove(e,1)}(r,n),S):void 0}function X(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!$(e))return e}function Q(t,e){var n,i,r=new l(_);function o(e,t){for(n=e;n;n=n[t]){if(3==n.nodeType&&0!==n.nodeValue.length)return e;if(1==n.nodeType&&!N(n))return n}return e}if(t&&e&&(t=o(t,"previousSibling"),e=o(e,"nextSibling"),r.compare(t,e))){for(n=t.nextSibling;n&&n!=e;)n=(i=n).nextSibling,t.appendChild(i);return _.remove(e),D(R(e.childNodes),function(e){t.appendChild(e)}),t}return e}function G(e,t){var n,i,r;return n=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],1==n.nodeType&&(r=n.childNodes.length-1,!t&&i&&i--,n=n.childNodes[r<i?r:i]),3===n.nodeType&&t&&i>=n.nodeValue.length&&(n=new te(n,b.getBody()).next()||n),3!==n.nodeType||t||0!==i||(n=new te(n,b.getBody()).prev()||n),n}function Z(e,d,h,f){var r="_mce_caret",n=b.settings.caret_debug;function p(e){var t=_.create("span",{id:r,"data-mce-bogus":!0,style:n?"color:red":""});return e&&t.appendChild(b.getDoc().createTextNode(m)),t}function o(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==m||1<e.childNodes.length)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function a(e){for(;e;){if(e.id===r)return e;e=e.parentNode}}function l(e){var t;if(e)for(e=(t=new te(e,e)).current();e;e=t.next())if(3===e.nodeType)return e}function s(e,t){var n,i;if(e)i=x.getRng(!0),o(e)?(!1!==t&&(i.setStartBefore(e),i.setEndBefore(e)),_.remove(e)):((n=l(e)).nodeValue.charAt(0)===m&&(n.deleteData(0,1),i.startContainer==n&&0<i.startOffset&&i.setStart(n,i.startOffset-1),i.endContainer==n&&0<i.endOffset&&i.setEnd(n,i.endOffset-1)),_.remove(e,1)),x.setRng(i);else if(!(e=a(x.getStart())))for(;e=_.get(r);)s(e,!1)}function i(){var e;(e=a(x.getStart()))&&!_.isEmpty(e)&&A(e,function(e){1!=e.nodeType||e.id===r||_.isEmpty(e)||_.setAttrib(e,"data-mce-bogus",null)},"childNodes")}b._hasCaretEvents||(c=function(){var e,t=[];if(o(a(x.getStart()),t))for(e=t.length;e--;)_.setAttrib(t[e],"data-mce-bogus","1")},t=function(e){var t=e.keyCode;s(),8==t&&x.isCollapsed()&&x.getStart().innerHTML==m&&s(a(x.getStart())),37!=t&&39!=t||s(a(x.getStart())),i()},b.on("SetContent",function(e){e.selection&&i()}),b._hasCaretEvents=!0),"apply"==e?function(){var e,t,n,i,r,o;i=(e=x.getRng(!0)).startOffset,o=e.startContainer.nodeValue,(t=a(x.getStart()))&&(n=l(t));var s=/[^\s\u00a0\u00ad\u200b\ufeff]/;o&&0<i&&i<o.length&&s.test(o.charAt(i))&&s.test(o.charAt(i-1))?(r=x.getBookmark(),e.collapse(!0),e=J(e,I(d)),e=w.split(e),B(d,h,e),x.moveToBookmark(r)):(t&&n.nodeValue===m||(n=(t=p(!0)).firstChild,e.insertNode(t),i=1),B(d,h,t),x.setCursorLocation(n,i))}():function(){var e,t,n,i,r,o,s,a,l=x.getRng(!0),c=[];for(e=l.startContainer,t=l.startOffset,3==(r=e).nodeType&&(t!=e.nodeValue.length&&(i=!0),r=r.parentNode);r;){if(H(r,d,h,f)){o=r;break}r.nextSibling&&(i=!0),c.push(r),r=r.parentNode}if(o)if(i)n=x.getBookmark(),l.collapse(!0),l=J(l,I(d),!0),l=w.split(l),L(d,h,l),x.moveToBookmark(n);else{for(r=a=p(),s=c.length-1;0<=s;s--)r.appendChild(_.clone(c[s],!1)),r=r.firstChild;r.appendChild(_.doc.createTextNode(m)),r=r.firstChild;var u=_.getParent(o,P);u&&_.isEmpty(u)?o.parentNode.replaceChild(a,o):_.insertAfter(a,o),x.setCursorLocation(r,1),_.isEmpty(o)&&_.remove(o)}}()}function ee(e){var t,n,i,r,o,s,a=e.startContainer,l=e.startOffset;if((e.startContainer!=e.endContainer||!(s=e.startContainer.childNodes[e.startOffset])||!/^(IMG)$/.test(s.nodeName))&&(3==a.nodeType&&l>=a.nodeValue.length&&(l=v(a),a=a.parentNode,t=!0),1==a.nodeType))for(a=(r=a.childNodes)[Math.min(l,r.length-1)],n=new te(a,_.getParent(a,_.isBlock)),(l>r.length-1||t)&&n.next(),i=n.current();i;i=n.next())if(3==i.nodeType&&!$(i))return o=_.create("a",{"data-mce-bogus":"all"},m),i.parentNode.insertBefore(o,i),e.setStart(i,0),x.setRng(e),void _.remove(o)}(0,ie.extend)(this,{get:I,register:i,unregister:function(e){return e&&n[e]&&delete n[e],n},apply:B,remove:L,toggle:function(e,t,n){var i=I(e);!F(e,t,n)||"toggle"in i[0]&&!i[0].toggle?B(e,t,n):L(e,t,n)},match:F,matchAll:function(i,r){var e,o=[],s={};return e=x.getStart(),_.getParent(e,function(e){var t,n;for(t=0;t<i.length;t++)n=i[t],!s[n]&&H(e,n,r)&&(s[n]=!0,o.push(n))},_.getRoot()),o},matchNode:H,canApply:function(e){var t,n,i,r,o=I(e);if(o)for(t=y(x.getStart()),i=o.length-1;0<=i;i--){if(!(r=o[i].selector)||o[i].defaultBlock)return S;for(n=t.length-1;0<=n;n--)if(_.is(t[n],r))return S}return T},formatChanged:function(e,t,n){var o;return s||(s={},o={},b.on("NodeChange",function(n){var i=y(n.element),r={};i=ie.grep(i,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),D(s,function(e,n){D(i,function(t){return H(t,n,{},e.similar)?(o[n]||(D(e,function(e){e(!0,{node:t,format:n,parents:i})}),o[n]=e),r[n]=e,!1):!a(t,n)&&void 0})}),D(o,function(e,t){r[t]||(delete o[t],D(e,function(e){e(!1,{node:n.element,format:t,parents:i})}))})})),D(e.split(","),function(e){s[e]||(s[e]=[],s[e].similar=n),s[e].push(t)}),this},getCssText:function(e){return o.getCssText(b,e)}}),i({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){D(t,function(e,t){_.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),D("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){i(e,{block:e,remove:"all"})}),i(b.settings.formats),function(){b.addShortcut("meta+b","bold_desc","Bold"),b.addShortcut("meta+i","italic_desc","Italic"),b.addShortcut("meta+u","underline_desc","Underline");for(var e=1;e<=6;e++)b.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);b.addShortcut("access+7","",["FormatBlock",!1,"p"]),b.addShortcut("access+8","",["FormatBlock",!1,"div"]),b.addShortcut("access+9","",["FormatBlock",!1,"address"])}(),b.on("BeforeGetContent",function(e){c&&"raw"!=e.format&&c()}),b.on("mouseup keydown",function(e){t&&t(e)})}}),e("tinymce/undo/Diff",[],function(){return{KEEP:0,DELETE:2,INSERT:1,diff:function(p,m){var e=p.length+m.length+2,g=new Array(e),v=new Array(e),c=function(e,t,n,i,r){var o=u(e,t,n,i);if(null===o||o.start===t&&o.diag===t-i||o.end===e&&o.diag===e-n)for(var s=e,a=n;s<t||a<i;)s<t&&a<i&&p[s]===m[a]?(r.push([0,p[s]]),++s,++a):i-n<t-e?(r.push([2,p[s]]),++s):(r.push([1,m[a]]),++a);else{c(e,o.start,n,o.start-o.diag,r);for(var l=o.start;l<o.end;++l)r.push([0,p[l]]);c(o.end,t,o.end-o.diag,i,r)}},y=function(e,t,n,i){for(var r=e;r-t<i&&r<n&&p[r]===m[r-t];)++r;return{start:e,end:r,diag:t}},u=function(e,t,n,i){var r=t-e,o=i-n;if(0===r||0===o)return null;var s=r-o,a=o+r,l=(a%2==0?a:a+1)/2;g[1+l]=e,v[1+l]=t+1;for(var c=0;c<=l;++c){for(var u=-c;u<=c;u+=2){var d=u+l;u===-c||u!=c&&g[d-1]<g[d+1]?g[d]=g[d+1]:g[d]=g[d-1]+1;for(var h=g[d],f=h-e+n-u;h<t&&f<i&&p[h]===m[f];)g[d]=++h,++f;if(s%2!=0&&s-c<=u&&u<=s+c&&v[d-s]<=g[d])return y(v[d-s],u+e-n,t,i)}for(u=s-c;u<=s+c;u+=2){for(d=u+l-s,u===s-c||u!=s+c&&v[d+1]<=v[d-1]?v[d]=v[d+1]-1:v[d]=v[d-1],f=(h=v[d]-1)-e+n-u;e<=h&&n<=f&&p[h]===m[f];)v[d]=h--,f--;if(s%2==0&&-c<=u&&u<=c&&v[d]<=g[d+s])return y(v[d],u+e-n,t,i)}}},t=[];return c(0,p.length,0,m.length,t),t}}}),e("tinymce/undo/Fragments",["tinymce/util/Arr","tinymce/html/Entities","tinymce/undo/Diff"],function(s,t,a){var l=function(e){return 1===e.nodeType?e.outerHTML:3===e.nodeType?t.encodeRaw(e.data,!1):8===e.nodeType?"\x3c!--"+e.data+"--\x3e":""},c=function(e,t,n){var i=function(e){var t,n,i;for(i=document.createElement("div"),t=document.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var r=e.childNodes[n];r.parentNode.insertBefore(i,r)}else e.appendChild(i)};return{read:function(e){return s.map(e.childNodes,l)},write:function(e,t){var n,i,r,o=s.map(t.childNodes,l);return n=a.diff(o,e),i=t,r=0,s.each(n,function(e){e[0]===a.KEEP?r++:e[0]===a.INSERT?(c(i,e[1],r),r++):e[0]===a.DELETE&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(i,r)}),t}}}),e("tinymce/undo/Levels",["tinymce/util/Arr","tinymce/undo/Fragments"],function(r,o){var s=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},a=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},n=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content};return{createFragmentedLevel:s,createCompleteLevel:a,createFromEditor:function(t){var e,n,i;return e=o.read(t.getBody()),n=(i=r.map(e,function(e){return t.serializer.trimContent(e)})).join(""),-1!==n.indexOf("</iframe>")?s(i):a(n)},applyToEditor:function(e,t,n){"fragmented"===t.type?o.write(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},isEq:function(e,t){return n(e)===n(t)}}}),e("tinymce/UndoManager",["tinymce/util/VK","tinymce/util/Tools","tinymce/undo/Levels"],function(e,f,p){return function(a){var l,i,r=this,c=0,u=[],d=0;function h(e){a.setDirty(e)}function o(e){r.typing=!1,r.add({},e)}function n(){r.typing&&(r.typing=!1,r.add())}return a.on("init",function(){r.add()}),a.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),r.beforeChange())}),a.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&o(e)}),a.on("ObjectResizeStart Cut",function(){r.beforeChange()}),a.on("SaveContent ObjectResized blur",o),a.on("DragEnd",o),a.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(o(),a.nodeChanged()),46!==t&&8!==t||a.nodeChanged(),i&&r.typing&&(a.isDirty()||(h(u[0]&&!p.isEq(p.createFromEditor(a),u[0])),a.isDirty()&&a.fire("change",{level:u[0],lastLevel:null})),a.fire("TypingUndo"),i=!1,a.nodeChanged()))}),a.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&o(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||r.typing||n||(r.beforeChange(),r.typing=!0,r.add({},e),i=!0)}}),a.on("MouseDown",function(e){r.typing&&o(e)}),a.addShortcut("meta+z","","Undo"),a.addShortcut("meta+y,meta+shift+z","","Redo"),a.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||a.nodeChanged()}),r={data:u,typing:!1,beforeChange:function(){d||(l=a.selection.getBookmark(2,!0))},add:function(e,t){var n,i,r,o=a.settings;if(r=p.createFromEditor(a),e=e||{},e=f.extend(e,r),d||a.removed)return null;if(i=u[c],a.fire("BeforeAddUndo",{level:e,lastLevel:i,originalEvent:t}).isDefaultPrevented())return null;if(i&&p.isEq(i,e))return null;if(u[c]&&(u[c].beforeBookmark=l),o.custom_undo_redo_levels&&u.length>o.custom_undo_redo_levels){for(n=0;n<u.length-1;n++)u[n]=u[n+1];u.length--,c=u.length}e.bookmark=a.selection.getBookmark(2,!0),c<u.length-1&&(u.length=c+1),u.push(e),c=u.length-1;var s={level:e,lastLevel:i,originalEvent:t};return a.fire("AddUndo",s),0<c&&(h(!0),a.fire("change",s)),e},undo:function(){var e;return r.typing&&(r.add(),r.typing=!1),0<c&&(e=u[--c],p.applyToEditor(a,e,!0),h(!0),a.fire("undo",{level:e})),e},redo:function(){var e;return c<u.length-1&&(e=u[++c],p.applyToEditor(a,e,!1),h(!0),a.fire("redo",{level:e})),e},clear:function(){u=[],c=0,r.typing=!1,r.data=u,a.fire("ClearUndos")},hasUndo:function(){return 0<c||r.typing&&u[0]&&!p.isEq(p.createFromEditor(a),u[0])},hasRedo:function(){return c<u.length-1&&!r.typing},transact:function(e){n(),r.beforeChange();try{d++,e()}finally{d--}return r.add()},extra:function(e,t){var n,i;r.transact(e)&&(i=u[c].bookmark,n=u[c-1],p.applyToEditor(a,n,!0),r.transact(t)&&(u[c-1].beforeBookmark=i))}}}}),e("tinymce/EnterKey",["tinymce/dom/TreeWalker","tinymce/dom/RangeUtils","tinymce/caret/CaretContainer","tinymce/Env"],function(O,B,L,H){var F=H.ie&&H.ie<11;return function(E){var N=E.dom,D=E.selection,R=E.settings,A=E.undoManager,P=E.schema,M=P.getNonEmptyElements(),I=P.getMoveCaretBeforeOnEnterElements();E.on("keydown",function(e){13==e.keyCode&&!1!==function(e){var u,i,d,s,r,a,l,t,o,c,h,f,n,p,m;function g(e){return e&&N.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==N.getContentEditable(e)}function v(e){var t;N.isBlock(e)&&(t=D.getRng(),e.appendChild(N.create("span",null," ")),D.select(e),e.lastChild.outerHTML="",D.setRng(t))}function y(e){var t,n,i,r,o=e;if(e){if(H.ie&&H.ie<9&&a&&a.firstChild&&a.firstChild==a.lastChild&&"BR"==a.firstChild.tagName&&N.remove(a.firstChild),/^(LI|DT|DD)$/.test(e.nodeName)){var s=function(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(e.firstChild);s&&/^(UL|OL|DL)$/.test(s.nodeName)&&e.insertBefore(N.doc.createTextNode(" "),e.firstChild)}if(i=N.createRng(),H.ie||e.normalize(),e.hasChildNodes()){for(t=new O(e,e);n=t.current();){if(3==n.nodeType){i.setStart(n,0),i.setEnd(n,0);break}if(I[n.nodeName.toLowerCase()]){i.setStartBefore(n),i.setEndBefore(n);break}o=n,n=t.next()}n||(i.setStart(o,0),i.setEnd(o,0))}else"BR"==e.nodeName?e.nextSibling&&N.isBlock(e.nextSibling)?((!l||l<9)&&(r=N.create("br"),e.parentNode.insertBefore(r,e)),i.setStartBefore(e),i.setEndBefore(e)):(i.setStartAfter(e),i.setEndAfter(e)):(i.setStart(e,0),i.setEnd(e,0));D.setRng(i),N.remove(r),D.scrollIntoView(e)}}function b(e){var t=R.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&N.setAttribs(e,R.forced_root_block_attrs)}function _(e){e.innerHTML=F?"":'<br data-mce-bogus="1">'}function x(e){var t,n,i,r=s,o=P.getTextInlineElements();if(e||"TABLE"==f?b(t=N.create(e||p)):t=a.cloneNode(!1),i=t,!1!==R.keep_styles)do{if(o[r.nodeName]){if("_mce_caret"==r.id)continue;n=r.cloneNode(!1),N.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):i=n,t.appendChild(n)}}while((r=r.parentNode)&&r!=d);return F||(i.innerHTML='<br data-mce-bogus="1">'),t}function w(e){var t,n,i;if(3==s.nodeType&&(e?0<r:r<s.nodeValue.length))return!1;if(s.parentNode==a&&m&&!e)return!0;if(e&&1==s.nodeType&&s==a.firstChild)return!0;if("TABLE"===s.nodeName||s.previousSibling&&"TABLE"==s.previousSibling.nodeName)return m&&!e||!m&&e;for(t=new O(s,a),3==s.nodeType&&(e&&0===r?t.prev():e||r!=s.nodeValue.length||t.next());n=t.current();){if(1===n.nodeType){if(!n.getAttribute("data-mce-bogus")&&(i=n.nodeName.toLowerCase(),M[i]&&"br"!==i))return!1}else if(3===n.nodeType&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0}function C(){E.execCommand("InsertLineBreak",!1,e)}function k(){o=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!=n?x(p):x(),R.end_container_on_empty_block&&g(h)&&N.isEmpty(a)?o=N.split(h,a):N.insertAfter(o,a),y(o)}if(u=D.getRng(!0),!e.isDefaultPrevented())if(u.collapsed){if(new B(N).normalize(u),s=u.startContainer,r=u.startOffset,p=(p=(R.force_p_newlines?"p":"")||R.forced_root_block)?p.toUpperCase():"",l=N.doc.documentMode,t=e.shiftKey,1==s.nodeType&&s.hasChildNodes()&&(m=r>s.childNodes.length-1,s=s.childNodes[Math.min(r,s.childNodes.length-1)]||s,r=m&&3==s.nodeType?s.nodeValue.length:0),d=function(e){var t,n,i=N.getRoot();for(t=e;t!==i&&"false"!==N.getContentEditable(t);)"true"===N.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==i?n:i}(s))if(A.beforeChange(),N.isBlock(d)||d==N.getRoot()){if((p&&!t||!p&&t)&&(s=function(e,t){var n,i,r,o,s,a,l,c=p||"P";if(!(i=N.getParent(e,N.isBlock))||!g(i)){if(a=(i=i||d)==E.getBody()||(l=i)&&/^(TD|TH|CAPTION)$/.test(l.nodeName)?i.nodeName.toLowerCase():i.parentNode.nodeName.toLowerCase(),!i.hasChildNodes())return b(n=N.create(c)),i.appendChild(n),u.setStart(n,0),u.setEnd(n,0),n;for(o=e;o.parentNode!=i;)o=o.parentNode;for(;o&&!N.isBlock(o);)o=(r=o).previousSibling;if(r&&P.isValidChild(a,c.toLowerCase())){for(b(n=N.create(c)),r.parentNode.insertBefore(n,r),o=r;o&&!N.isBlock(o);)s=o.nextSibling,n.appendChild(o),o=s;u.setStart(e,t),u.setEnd(e,t)}}return e}(s,r)),a=N.getParent(s,N.isBlock),h=a?N.getParent(a.parentNode,N.isBlock):null,f=a?a.nodeName.toUpperCase():"","LI"!=(n=h?h.nodeName.toUpperCase():"")||e.ctrlKey||(a=h,f=n),E.undoManager.typing&&(E.undoManager.typing=!1,E.undoManager.add()),/^(LI|DT|DD)$/.test(f)){if(!p&&t)return void C();if(N.isEmpty(a))return void function(){function e(e){for(var t=h[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===a}function t(){var e=h.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:h}if(h!=E.getBody()){var n=h.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(p="LI"),o=p?x(p):N.create("BR"),e(!0)&&e()?"LI"==n?N.insertAfter(o,t()):N.replace(o,h):e(!0)?"LI"==n?(N.insertAfter(o,t()),o.appendChild(N.doc.createTextNode(" ")),o.appendChild(h)):h.parentNode.insertBefore(o,h):e()?(N.insertAfter(o,t()),v(o)):(h=t(),(i=u.cloneRange()).setStartAfter(a),i.setEndAfter(h),c=i.extractContents(),"LI"==p&&"LI"==c.firstChild.nodeName?(o=c.firstChild,N.insertAfter(c,h)):(N.insertAfter(c,h),N.insertAfter(o,h))),N.remove(a),y(o),A.add()}}()}if("PRE"==f&&!1!==R.br_in_pre){if(!t)return void C()}else if(!p&&!t&&"LI"!=f||p&&t)return void C();var T,S;p&&a===E.getBody()||(p=p||"P",L.isCaretContainerBlock(a)?(o=L.showCaretContainerBlock(a),N.isEmpty(a)&&_(a),y(o)):w()?k():w(!0)?(v(o=a.parentNode.insertBefore(x(),a)),y(a)):((i=u.cloneRange()).setEndAfter(a),function(e){for(;3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(c=i.extractContents()),o=c.firstChild,N.insertAfter(c,a),function(e){var t,n=e,i=[];if(n){for(;n=n.firstChild;){if(N.isBlock(n))return;1!=n.nodeType||M[n.nodeName.toLowerCase()]||i.push(n)}for(t=i.length;t--;)!(n=i[t]).hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?N.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&N.remove(n)}}(o),T=a,F||(T.normalize(),(S=T.lastChild)&&!/^(left|right)$/gi.test(N.getStyle(S,"float",!0))||N.add(T,"br")),N.isEmpty(a)&&_(a),o.normalize(),N.isEmpty(o)?(N.remove(o),k()):y(o)),N.setAttrib(o,"id",""),E.fire("NewBlock",{newBlock:o}),A.typing=!1,A.add())}else p&&!t||C()}else E.execCommand("Delete")}(e)&&e.preventDefault()})}}),e("tinymce/ForceBlocks",[],function(){return function(p){var m=p.settings,g=p.dom,v=p.selection,y=p.schema,b=y.getBlockElements();m.forced_root_block&&p.on("NodeChange",function(){var e,t,n,i,r,o,s,a,l,c,u,d,h=v.getStart(),f=p.getBody();if(d=m.forced_root_block,h&&1===h.nodeType&&d){for(;h&&h!=f;){if(b[h.nodeName])return;h=h.parentNode}if((e=v.getRng()).setStart){t=e.startContainer,n=e.startOffset,i=e.endContainer,r=e.endOffset;try{l=p.getDoc().activeElement===f}catch(e){}}else e.item&&(h=e.item(0),(e=p.getDoc().body.createTextRange()).moveToElementText(h)),l=e.parentElement().ownerDocument===p.getDoc(),(c=e.duplicate()).collapse(!0),n=-1*c.move("character",-16777215),c.collapsed||((c=e.duplicate()).collapse(!1),r=-1*c.move("character",-16777215)-n);for(h=f.firstChild,u=f.nodeName.toLowerCase();h;)if((3===h.nodeType||1==h.nodeType&&!b[h.nodeName])&&y.isValidChild(u,d.toLowerCase())){if(3===h.nodeType&&0===h.nodeValue.length){h=(s=h).nextSibling,g.remove(s);continue}o||(o=g.create(d,p.settings.forced_root_block_attrs),h.parentNode.insertBefore(o,h),a=!0),h=(s=h).nextSibling,o.appendChild(s)}else o=null,h=h.nextSibling;if(a&&l){if(e.setStart)e.setStart(t,n),e.setEnd(i,r),v.setRng(e);else try{(e=p.getDoc().body.createTextRange()).moveToElementText(f),e.collapse(!0),e.moveStart("character",n),0<r&&e.moveEnd("character",r),e.select()}catch(e){}p.nodeChanged()}}})}}),e("tinymce/caret/CaretUtils",["tinymce/util/Fun","tinymce/dom/TreeWalker","tinymce/dom/NodeType","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretCandidate"],function(e,s,c,t,u,n){var i=c.isContentEditableTrue,d=c.isContentEditableFalse,r=c.matchStyleValues("display","block table table-cell table-caption"),h=u.isCaretContainer,a=u.isCaretContainerBlock,f=e.curry,p=c.isElement,l=n.isCaretCandidate;function m(e){return 0<e}function g(e){return e<0}function v(e,t){for(var n;n=e(t);)if(!a(n))return n;return null}function o(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(i(e))return e;return t}function y(e,t){for(;e&&e!=t;){if(r(e))return e;e=e.parentNode}return null}function b(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function _(e,t,n){var i,r,o,s;for(r=e?"previousSibling":"nextSibling";n&&n!=t;){if(i=n[r],h(i)&&(i=i[r]),d(i)){if(s=n,y(i,o=t)==y(s,o))return i;break}if(l(i))break;n=n.parentNode}return null}var x=f(b,!0),w=f(b,!1);function C(e,t){return d((n=e,(i=t)?(r=i.container(),o=i.offset(),p(r)?r.childNodes[o+n]:null):null));var n,i,r,o}return{isForwards:m,isBackwards:g,findNode:function(e,t,n,i,r){var o=new s(e,i);if(g(t)){if((d(e)||a(e))&&n(e=v(o.prev,!0)))return e;for(;e=v(o.prev,r);)if(n(e))return e}if(m(t)){if((d(e)||a(e))&&n(e=v(o.next,!0)))return e;for(;e=v(o.next,r);)if(n(e))return e}return null},getEditingHost:o,getParentBlock:y,isInSameBlock:function(e,t,n){return y(e.container(),n)==y(t.container(),n)},isInSameEditingHost:function(e,t,n){return o(e.container(),n)==o(t.container(),n)},isBeforeContentEditableFalse:f(C,0),isAfterContentEditableFalse:f(C,-1),normalizeRange:function(e,t,n){var i,r,o,s,a=f(_,!0,t),l=f(_,!1,t);if(r=n.startContainer,o=n.startOffset,u.isCaretContainerBlock(r)){if(p(r)||(r=r.parentNode),"before"==(s=r.getAttribute("data-mce-caret"))&&(i=r.nextSibling,d(i)))return x(i);if("after"==s&&(i=r.previousSibling,d(i)))return w(i)}if(!n.collapsed)return n;if(c.isText(r)){if(h(r)){if(1===e){if(i=l(r))return x(i);if(i=a(r))return w(i)}if(-1===e){if(i=a(r))return w(i);if(i=l(r))return x(i)}return n}if(u.endsWithCaretContainer(r)&&o>=r.data.length-1)return 1===e&&(i=l(r))?x(i):n;if(u.startsWithCaretContainer(r)&&o<=1)return-1===e&&(i=a(r))?w(i):n;if(o===r.data.length)return(i=l(r))?x(i):n;if(0===o)return(i=a(r))?w(i):n}return n}}}),e("tinymce/caret/CaretWalker",["tinymce/dom/NodeType","tinymce/caret/CaretCandidate","tinymce/caret/CaretPosition","tinymce/caret/CaretUtils","tinymce/util/Arr","tinymce/util/Fun"],function(f,e,p,m,g,v){var y=f.isContentEditableFalse,b=f.isText,_=f.isElement,n=f.isBr,x=m.isForwards,w=m.isBackwards,C=e.isCaretCandidate,k=e.isAtomic,T=e.isEditableCaretCandidate;function S(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function E(e,t){if(x(e)){if(C(t.previousSibling)&&!b(t.previousSibling))return p.before(t);if(b(t))return p(t,0)}if(w(e)){if(C(t.nextSibling)&&!b(t.nextSibling))return p.after(t);if(b(t))return p(t,t.data.length)}return w(e)?n(t)?p.before(t):p.after(t):p.before(t)}function N(e,t,n){var i,r,o,s,a,l,c,u,d,h;if(!_(n)||!t)return null;if(i=(c=t).container(),r=c.offset(),b(i)){if(w(e)&&0<r)return p(i,--r);if(x(e)&&r<i.length)return p(i,++r);o=i}else{if(w(e)&&0<r&&(s=S(i,r-1),C(s)))return!k(s)&&(a=m.findNode(s,e,T,s))?b(a)?p(a,a.data.length):p.after(a):b(s)?p(s,s.data.length):p.before(s);if(x(e)&&r<i.childNodes.length&&(s=S(i,r),C(s)))return u=s,d=n,f.isBr(u)&&(h=N(1,p.after(u),d))&&!m.isInSameBlock(p.before(u),p.before(h),d)?N(e,p.after(s),n):!k(s)&&(a=m.findNode(s,e,T,s))?b(a)?p(a,0):p.before(a):b(s)?p(s,0):p.after(s);o=c.getNode()}return(x(e)&&c.isAtEnd()||w(e)&&c.isAtStart())&&(o=m.findNode(o,e,v.constant(!0),n,!0),T(o))?E(e,o):(s=m.findNode(o,e,T,n),!(l=g.last(g.filter(function(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}(i,n),y)))||s&&l.contains(s)?s?E(e,s):null:c=x(e)?p.after(l):p.before(l))}return function(t){return{next:function(e){return N(1,e,t)},prev:function(e){return N(-1,e,t)}}}}),e("tinymce/InsertList",["tinymce/util/Tools","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition"],function(N,D,R){var A=function(e){return N.grep(e.childNodes,function(e){return"LI"===e.nodeName})},P=function(e){return 0<e.length&&!e[e.length-1].firstChild?e.slice(0,-1):e},M=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},I=function(e,t){var n=R.after(e),i=new D(t).prev(n);return i?i.toRange():null},O=function(t,e,n){var i,r,o,s,a=t.parentNode;return N.each(e,function(e){a.insertBefore(e,t)}),i=t,r=n,o=R.before(i),(s=new D(r).next(o))?s.toRange():null};return{isListFragment:function(e){var t=e.firstChild,n=e.lastChild;return t&&"meta"===t.name&&(t=t.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),!(!t||t!==n||"ul"!==t.name&&"ol"!==t.name)},insertAtCaret:function(e,r,o,t){var n,i,s,a,l,c,u,d,h,f,p,m,g,v,y,b,_,x,w,C=(n=r,i=t,c=e.serialize(i),u=n.createFragment(c),a=(s=u).firstChild,l=s.lastChild,a&&"META"===a.nodeName&&a.parentNode.removeChild(a),l&&"mce_marker"===l.id&&l.parentNode.removeChild(l),s),k=M(r,o.startContainer),T=P(A(C.firstChild)),S=r.getRoot(),E=function(e){var t=R.fromRangeStart(o),n=new D(r.getRoot()),i=1===e?n.prev(t):n.next(t);return!i||M(r,i.getNode())!==k};return E(1)?O(k,T,S):E(2)?(d=k,h=T,f=S,r.insertAfter(h.reverse(),d),I(h[0],f)):(m=T,g=S,v=p=k,b=(y=o).cloneRange(),_=y.cloneRange(),b.setStartBefore(v),_.setEndAfter(v),x=[b.cloneContents(),_.cloneContents()],(w=p.parentNode).insertBefore(x[0],p),N.each(m,function(e){w.insertBefore(e,p)}),w.insertBefore(x[1],p),w.removeChild(p),I(m[m.length-1],g))},isParentBlockLi:function(e,t){return!!M(e,t)},trimListItems:P,listItems:A}}),e("tinymce/InsertContent",["tinymce/Env","tinymce/util/Tools","tinymce/html/Serializer","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/dom/ElementUtils","tinymce/dom/NodeType","tinymce/InsertList"],function(S,E,N,D,R,A,e,P){var M=e.matchNodeNames("td th");return{insertAtCaret:function(e,t){var n,i,r="string"!=typeof(n=t)?(i=E.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:i}):{content:n,details:{}};!function(r,e,t){var n,i,o,s,a,l,c,u,d,h,f,p,m=r.schema.getTextInlineElements(),g=r.selection,v=r.dom;/^ | $/.test(e)&&(e=function(e){var t,n,i;function r(e){return n[e]&&3==n[e].nodeType}return t=g.getRng(!0),n=t.startContainer,i=t.startOffset,3==n.nodeType&&(0<i?e=e.replace(/^&nbsp;/," "):r("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),i<n.length?e=e.replace(/&nbsp;(<br>|)$/," "):r("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}(e)),n=r.parser,p=t.merge,i=new N({validate:r.settings.validate},r.schema),f='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',l={content:e,format:"html",selection:!0},r.fire("BeforeSetContent",l),-1==(e=l.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f);var y,b,_,x,w=(u=g.getRng()).startContainer||(u.parentElement?u.parentElement():null),C=r.getBody();w===C&&g.isCollapsed()&&v.isBlock(C.firstChild)&&(y=C.firstChild)&&!r.schema.getShortEndedElements()[y.nodeName]&&v.isEmpty(C.firstChild)&&((u=v.createRng()).setStart(C.firstChild,0),u.setEnd(C.firstChild,0),g.setRng(u)),g.isCollapsed()||(r.selection.setRng(r.selection.getRng()),r.getDoc().execCommand("Delete",!1,null),_=(b=g.getRng(!0)).startContainer,x=b.startOffset,3==_.nodeType&&b.collapsed&&(" "===_.data[x]?(_.deleteData(x,1),/[\u00a0| ]$/.test(e)||(e+=" ")):" "===_.data[x-1]&&(_.deleteData(x-1,1),/[\u00a0| ]$/.test(e)||(e=" "+e))));var k,T={context:(o=g.getNode()).nodeName.toLowerCase(),data:t.data};if(a=n.parse(e,T),!0===t.paste&&P.isListFragment(a)&&P.isParentBlockLi(v,o))return u=P.insertAtCaret(i,v,r.selection.getRng(!0),a),r.selection.setRng(u),r.fire("SetContent",l);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(a),"mce_marker"==(d=a.lastChild).attr("id"))for(d=(c=d).prev;d;d=d.walk(!0))if(3==d.type||!v.isBlock(d.name)){r.schema.isValidChild(d.parent.name,"span")&&d.parent.insert(c,d,"br"===d.name);break}if(r._selectionOverrides.showBlockCaretContainer(o),T.invalid){for(g.setContent(f),o=g.getNode(),s=r.getBody(),9==o.nodeType?o=d=s:d=o;d!==s;)d=(o=d).parentNode;e=o==s?s.innerHTML:v.getOuterHTML(o),e=i.serialize(n.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return i.serialize(a)}))),o==s?v.setHTML(s,e):v.setOuterHTML(o,e)}else e=i.serialize(a),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):e.selection.setContent(t)}}(r,e,o);!function(){if(p){var n=r.getBody(),i=new A(v);E.each(v.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!=n;t=t.parentNode)m[e.nodeName.toLowerCase()]&&i.compare(t,e)&&v.remove(e,!0)})}}(),function(e){var t,n,i;if(e){if(g.scrollIntoView(e),t=function(e){for(var t=r.getBody();e&&e!==t;e=e.parentNode)if("false"===r.dom.getContentEditable(e))return e;return null}(e))return v.remove(e),g.select(t);u=v.createRng(),(d=e.previousSibling)&&3==d.nodeType?(u.setStart(d,d.nodeValue.length),S.ie||(h=e.nextSibling)&&3==h.nodeType&&(d.appendData(h.data),h.parentNode.removeChild(h))):(u.setStartBefore(e),u.setEndBefore(e)),n=v.getParent(e,v.isBlock),v.remove(e),n&&v.isEmpty(n)&&(r.$(n).empty(),u.setStart(n,0),u.setEnd(n,0),M(n)||n.getAttribute("data-mce-fragment")||!(i=function(e){var t=R.fromRangeStart(e);if(t=new D(r.getBody()).next(t))return t.toRange()}(u))?v.add(n,v.create("br",{"data-mce-bogus":"1"})):(u=i,v.remove(n))),g.setRng(u)}}(v.get("mce_marker")),k=r.getBody(),E.each(k.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),r.fire("SetContent",l),r.addVisual()}(e,r.content,r.details)}}}),e("tinymce/EditorCommands",["tinymce/Env","tinymce/util/Tools","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/InsertContent","tinymce/dom/NodeType"],function(h,e,_,x,i,f){var p=e.each,m=e.extend,g=e.map,w=e.inArray,C=e.explode,k=h.ie&&h.ie<11;return function(v){var y,b,s,t,a={state:{},exec:{},value:{}},l=v.settings;function c(e){var t;if(!v.quirks.isHidden()){if(e=e.toLowerCase(),t=a.state[e])return t(e);try{return v.getDoc().queryCommandState(e)}catch(e){}return!1}}function e(e,n){n=n||"exec",p(e,function(t,e){p(e.toLowerCase().split(","),function(e){a[n][e]=t})})}function u(e,t,n){return t===ye&&(t=!1),n===ye&&(n=null),v.getDoc().execCommand(e,t,n)}function n(e){return s.match(e)}function o(e,t){s.toggle(e,t?{value:t}:ye),v.nodeChanged()}function r(e){t=b.getBookmark(e)}function d(){b.moveToBookmark(t)}v.on("PreInit",function(){y=v.dom,b=v.selection,l=v.settings,s=v.formatter}),m(this,{execCommand:function(t,n,i,e){var r,o,s=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus||v.focus(),(e=v.fire("BeforeExecCommand",{command:t,ui:n,value:i})).isDefaultPrevented())return!1;if(o=t.toLowerCase(),r=a.exec[o])return r(o,n,i),v.fire("ExecCommand",{command:t,ui:n,value:i}),!0;if(p(v.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,i))return v.fire("ExecCommand",{command:t,ui:n,value:i}),!(s=!0)}),s)return s;if(v.theme&&v.theme.execCommand&&v.theme.execCommand(t,n,i))return v.fire("ExecCommand",{command:t,ui:n,value:i}),!0;try{s=v.getDoc().execCommand(t,n,i)}catch(e){}return!!s&&(v.fire("ExecCommand",{command:t,ui:n,value:i}),!0)},queryCommandState:c,queryCommandValue:function(e){var t;if(!v.quirks.isHidden()){if(e=e.toLowerCase(),t=a.value[e])return t(e);try{return v.getDoc().queryCommandValue(e)}catch(e){}}},queryCommandSupported:function(e){if(e=e.toLowerCase(),a.exec[e])return!0;try{return v.getDoc().queryCommandSupported(e)}catch(e){}return!1},addCommands:e,addCommand:function(e,r,o){e=e.toLowerCase(),a.exec[e]=function(e,t,n,i){return r.call(o||v,t,n,i)}},addQueryStateHandler:function(e,t,n){e=e.toLowerCase(),a.state[e]=function(){return t.call(n||v)}},addQueryValueHandler:function(e,t,n){e=e.toLowerCase(),a.value[e]=function(){return t.call(n||v)}},hasCustomCommand:function(e){return e=e.toLowerCase(),!!a.exec[e]}}),e({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){v.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=v.getDoc();try{u(e)}catch(e){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var i=v.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");h.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),v.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(b.isCollapsed()){var e=v.dom.getParent(v.selection.getStart(),"a");e&&v.dom.remove(e,!0)}else s.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),p("left,center,right,justify".split(","),function(e){t!=e&&s.remove("align"+e)}),"none"!=t&&o("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;u(e),(t=y.getParent(b.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(r(),y.split(n,t),d()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){o(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){o(e,n)},FontSize:function(e,t,n){var i,r;1<=n&&n<=7&&(r=C(l.font_size_style_values),n=(i=C(l.font_size_classes))?i[n-1]||n:r[n-1]||n),o(e,n)},RemoveFormat:function(e){s.remove(e)},mceBlockQuote:function(){o("blockquote")},FormatBlock:function(e,t,n){return o(n||"p")},mceCleanup:function(){var e=b.getBookmark();v.setContent(v.getContent({cleanup:!0}),{cleanup:!0}),b.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||b.getNode();i!=v.getBody()&&(r(),v.dom.remove(i,!0),d())},mceSelectNodeDepth:function(e,t,n){var i=0;y.getParent(b.getNode(),function(e){if(1==e.nodeType&&i++==n)return b.select(e),!1},v.getBody())},mceSelectNode:function(e,t,n){b.select(n)},mceInsertContent:function(e,t,n){i.insertAtCaret(v,n)},mceInsertRawHTML:function(e,t,n){b.setContent("tiny_mce_marker"),v.setContent(v.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){o(n)},mceSetContent:function(e,t,n){v.setContent(n)},"Indent,Outdent":function(n){var i,r,o;i=l.indentation,r=/[a-z%]+$/i.exec(i),i=parseInt(i,10),c("InsertUnorderedList")||c("InsertOrderedList")?u(n):(l.forced_root_block||y.getParent(b.getNode(),y.isBlock)||s.apply("div"),p(b.getSelectedBlocks(),function(e){if("false"!==y.getContentEditable(e)&&"LI"!==e.nodeName){var t=v.getParam("indent_use_margin",!1)?"margin":"padding";t="TABLE"===e.nodeName?"margin":t,t+="rtl"==y.getStyle(e,"direction",!0)?"Right":"Left","outdent"==n?(o=Math.max(0,parseInt(e.style[t]||0,10)-i),y.setStyle(e,t,o?o+r:"")):(o=parseInt(e.style[t]||0,10)+i+r,y.setStyle(e,t,o))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){v.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){v.hasVisual=!v.hasVisual,v.addVisual()},mceReplaceContent:function(e,t,n){v.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,b.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var i;"string"==typeof n&&(n={href:n}),i=y.getParent(b.getNode(),"a"),n.href=n.href.replace(" ","%20"),i&&n.href||s.remove("link"),n.href&&s.apply("link",n,i)},selectAll:function(){var e,t=y.getRoot();if(b.getRng().setStart){var n=y.getParent(b.getStart(),f.isContentEditableTrue);n&&((e=y.createRng()).selectNodeContents(n),b.setRng(e))}else(e=b.getRng()).item||(e.moveToElementText(t),e.select())},delete:function(){u("Delete");var e=v.getBody();y.isEmpty(e)&&(v.setContent(""),e.firstChild&&y.isBlock(e.firstChild)?v.selection.setCursorLocation(e.firstChild,0):v.selection.setCursorLocation(e,0))},mceNewDocument:function(){v.setContent("")},InsertLineBreak:function(e,t,n){var i,r,o,s=n,a=b.getRng(!0);new _(y).normalize(a);var l=a.startOffset,c=a.startContainer;if(1==c.nodeType&&c.hasChildNodes()){var u=l>c.childNodes.length-1;c=c.childNodes[Math.min(l,c.childNodes.length-1)]||c,l=u&&3==c.nodeType?c.nodeValue.length:0}var d=y.getParent(c,y.isBlock),h=d?d.nodeName.toUpperCase():"",f=d?y.getParent(d.parentNode,y.isBlock):null,p=f?f.nodeName.toUpperCase():"",m=s&&s.ctrlKey;"LI"!=p||m||(d=f,h=p),c&&3==c.nodeType&&l>=c.nodeValue.length&&(k||function(){for(var e,t=new x(c,d),n=v.schema.getNonEmptyElements();e=t.next();)if(n[e.nodeName.toLowerCase()]||0<e.length)return!0}()||(i=y.create("br"),a.insertNode(i),a.setStartAfter(i),a.setEndAfter(i),r=!0)),i=y.create("br"),a.insertNode(i);var g=y.doc.documentMode;return k&&"PRE"==h&&(!g||g<8)&&i.parentNode.insertBefore(y.doc.createTextNode("\r"),i),o=y.create("span",{},"&nbsp;"),i.parentNode.insertBefore(o,i),b.scrollIntoView(o),y.remove(o),r?(a.setStartBefore(i),a.setEndBefore(i)):(a.setStartAfter(i),a.setEndAfter(i)),b.setRng(a),v.undoManager.add(),!0}}),e({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=b.isCollapsed()?[y.getParent(b.getNode(),y.isBlock)]:b.getSelectedBlocks(),i=g(n,function(e){return!!s.matchNode(e,t)});return-1!==w(i,!0)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return n(e)},mceBlockQuote:function(){return n("blockquote")},Outdent:function(){var e;if(l.inline_styles){if((e=y.getParent(b.getStart(),y.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0;if((e=y.getParent(b.getEnd(),y.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0}return c("InsertUnorderedList")||c("InsertOrderedList")||!l.inline_styles&&!!y.getParent(b.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=y.getParent(b.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),e({"FontSize,FontName":function(e){var t,n=0;return(t=y.getParent(b.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),e({Undo:function(){v.undoManager.undo()},Redo:function(){v.undoManager.redo()}})}}),e("tinymce/util/URI",["tinymce/util/Tools"],function(e){var a=e.each,s=e.trim,l="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),n={ftp:21,http:80,https:443,mailto:25};function c(i,e){var t,n,r=this;if(i=s(i),t=(e=r.settings=e||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(i)||/^\s*#/.test(i))r.source=i;else{var o=0===i.indexOf("//");0!==i.indexOf("/")||o||(i=(t&&t.protocol||"http")+"://mce_host"+i),/^[\w\-]*:?\/\//.test(i)||(n=e.base_uri?e.base_uri.path:new c(location.href).directory,i=""===e.base_uri.protocol?"//mce_host"+r.toAbsPath(n,i):(i=/([^#?]*)([#?]?.*)/.exec(i),(t&&t.protocol||"http")+"://mce_host"+r.toAbsPath(n,i[1])+i[2])),i=i.replace(/@@/g,"(mce_at)"),i=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(i),a(l,function(e,t){var n=i[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),r[e]=n}),t&&(r.protocol||(r.protocol=t.protocol),r.userInfo||(r.userInfo=t.userInfo),r.port||"mce_host"!==r.host||(r.port=t.port),r.host&&"mce_host"!==r.host||(r.host=t.host),r.source=""),o&&(r.protocol="")}}return c.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!=(e=new c(e,{base_uri:this})).host&&this.host!=e.host&&e.host||this.port!=e.port||this.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),i=e.getURI();return n==i||"/"==n.charAt(n.length-1)&&n.substr(0,n.length-1)==i?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new c(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=n[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,i,r,o=0,s="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(i=0,r=e.length;i<r;i++)if(i>=n.length||e[i]!=n[i]){o=i+1;break}if(e.length<n.length)for(i=0,r=n.length;i<r;i++)if(i>=e.length||e[i]!=n[i]){o=i+1;break}if(1===o)return t;for(i=0,r=e.length-(o-1);i<r;i++)s+="../";for(i=o-1,r=n.length;i<r;i++)s+=i!=o-1?"/"+n[i]:n[i];return s},toAbsPath:function(e,t){var n,i,r,o=0,s=[];for(i=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),a(e,function(e){e&&s.push(e)}),e=s,n=t.length-1,s=[];0<=n;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?0<o?o--:s.push(t[n]):o++);return 0!==(r=(n=e.length-o)<=0?s.reverse().join("/"):e.slice(0,n).join("/")+"/"+s.reverse().join("/")).indexOf("/")&&(r="/"+r),i&&r.lastIndexOf("/")!==r.length-1&&(r+=i),r},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},c.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},c.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},c}),e("tinymce/util/Class",["tinymce/util/Tools"],function(e){var l,c,u=e.each,d=e.extend;function t(){}return t.extend=l=function(n){var e,t,i,r=this.prototype;function o(){var e,t,n;if(!c&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function s(){return this}function a(n,i){return function(){var e,t=this._super;return this._super=r[n],e=i.apply(this,arguments),this._super=t,e}}for(t in c=!0,e=new this,c=!1,n.Mixins&&(u(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),r.Mixins&&(n.Mixins=r.Mixins.concat(n.Mixins))),n.Methods&&u(n.Methods.split(","),function(e){n[e]=s}),n.Properties&&u(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return void 0!==e?(this[t]=e,this):this[t]}}),n.Statics&&u(n.Statics,function(e,t){o[t]=e}),n.Defaults&&r.Defaults&&(n.Defaults=d({},r.Defaults,n.Defaults)),n)"function"==typeof(i=n[t])&&r[t]?e[t]=a(t,i):e[t]=i;return o.prototype=e,(o.constructor=o).extend=l,o},t}),e("tinymce/util/EventDispatcher",["tinymce/util/Tools"],function(p){var t=p.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"," ");function e(s){var a,l,c=this,u={};function d(){return!1}function h(){return!0}function i(e,t,n,i){var r,o,s;if(!1===t&&(t=d),t)for(t={func:t},i&&p.extend(t,i),s=(o=e.toLowerCase().split(" ")).length;s--;)e=o[s],(r=u[e])||(r=u[e]=[],l(e,!0)),n?r.unshift(t):r.push(t);return c}function f(e,t){var n,i,r,o,s;if(e)for(n=(o=e.toLowerCase().split(" ")).length;n--;){if(e=o[n],i=u[e],!e){for(r in u)l(r,!1),delete u[r];return c}if(i){if(t)for(s=i.length;s--;)i[s].func===t&&(i=i.slice(0,s).concat(i.slice(s+1)),u[e]=i);else i.length=0;i.length||(l(e,!1),delete u[e])}}else{for(e in u)l(e,!1);u={}}return c}a=(s=s||{}).scope||c,l=s.toggleEvent||d,c.fire=function(e,t){var n,i,r,o;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=a),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=h},t.stopPropagation=function(){t.isPropagationStopped=h},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=h},t.isDefaultPrevented=d,t.isPropagationStopped=d,t.isImmediatePropagationStopped=d),s.beforeFire&&s.beforeFire(t),n=u[e])for(i=0,r=n.length;i<r;i++){if((o=n[i]).once&&f(e,o.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===o.func.call(a,t))return t.preventDefault(),t}return t},c.on=i,c.off=f,c.once=function(e,t,n){return i(e,t,n,{once:!0})},c.has=function(e){return e=e.toLowerCase(),!(!u[e]||0===u[e].length)}}return e.isNative=function(e){return!!t[e.toLowerCase()]},e}),e("tinymce/data/Binding",[],function(){function e(e){this.create=e.create}return e.create=function(r,o){return new e({create:function(t,n){var i;function e(e){t.set(n,e.value)}return t.on("change:"+n,function(e){r.set(o,e.value)}),r.on("change:"+o,e),(i=t._bindings)||(i=t._bindings=[],t.on("destroy",function(){for(var e=i.length;e--;)i[e]()})),i.push(function(){r.off("change:"+o,e)}),r.get(o)}})},e}),e("tinymce/util/Observable",["tinymce/util/EventDispatcher"],function(i){function r(n){return n._eventDispatcher||(n._eventDispatcher=new i({scope:n,toggleEvent:function(e,t){i.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher}return{fire:function(e,t,n){if(this.removed&&"remove"!==e)return t;if(t=r(this).fire(e,t,n),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},on:function(e,t,n){return r(this).on(e,t,n)},off:function(e,t){return r(this).off(e,t)},once:function(e,t){return r(this).once(e,t)},hasEventListeners:function(e){return r(this).has(e)}}}),e("tinymce/data/ObservableObject",["tinymce/data/Binding","tinymce/util/Observable","tinymce/util/Class","tinymce/util/Tools"],function(o,e,t,s){function a(e){return 0<e.nodeType}return t.extend({Mixins:[e],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof o&&(e[t]=n.create(this,t));this.data=e},set:function(e,t){var n,i,r=this.data[e];if(t instanceof o&&(t=t.create(this,e)),"object"!=typeof e)return function e(t,n){var i,r;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(s.isArray(n)){if(t.length!==n.length)return!1;for(i=t.length;i--;)if(!e(t[i],n[i]))return!1}if(a(t)||a(n))return t===n;for(i in r={},n){if(!e(t[i],n[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&!e(t[i],n[i]))return!1;return!0}(r,t)||(this.data[e]=t,i={target:this,name:e,value:t,oldValue:r},this.fire("change:"+e,i),this.fire("change",i)),this;for(n in e)this.set(n,e[n]);return this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return o.create(this,e)},destroy:function(){this.fire("destroy")}})}),e("tinymce/ui/Selector",["tinymce/util/Class"],function(e){var r,l=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,c=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,u=/^\s*|\s*$/g,o=e.extend({init:function(e){var o=this.match;function s(e,t,n){var i;function r(e){e&&t.push(e)}return r(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((i=l.exec(e.replace(u,"")))[1])),r(function(t){if(t)return function(e){return e._name===t}}(i[2])),r(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(e){var t=e[n]?e[n]():"";return i?"="===i?t===r:"*="===i?0<=t.indexOf(r):"~="===i?0<=(" "+t+" ").indexOf(" "+r+" "):"!="===i?t!=r:"^="===i?0===t.indexOf(r):"$="===i&&t.substr(t.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var t;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(t=a(i[1],[]),function(e){return!o(e,t)}):(i=i[2],function(e,t,n){return"first"===i?0===t:"last"===i?t===n-1:"even"===i?t%2==0:"odd"===i?t%2==1:!!e[i]&&e[i]()})}(i[7])),t.pseudo=!!i[7],t.direct=n,t}function a(e,t){var n,i,r,o=[];do{if(c.exec(""),(i=c.exec(e))&&(e=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,t),e=[],r=0;r<o.length;r++)">"!=o[r]&&e.push(s(o[r],[],">"===o[r-1]));return t.push(e),t}this._selectors=a(e,[])},match:function(e,t){var n,i,r,o,s,a,l,c,u,d,h,f,p;for(n=0,i=(t=t||this._selectors).length;n<i;n++){for(p=e,f=0,r=(o=(s=t[n]).length)-1;0<=r;r--)for(c=s[r];p;){if(c.pseudo)for(u=d=(h=p.parent().items()).length;u--&&h[u]!==p;);for(a=0,l=c.length;a<l;a++)if(!c[a](p,u,d)){a=l+1;break}if(a===l){f++;break}if(r===o-1)break;p=p.parent()}if(f===o)return!0}return!1},find:function(e){var t,n,c=[],i=this._selectors;function u(e,t,n){var i,r,o,s,a,l=t[n];for(i=0,r=e.length;i<r;i++){for(a=e[i],o=0,s=l.length;o<s;o++)if(!l[o](a,i,r)){o=s+1;break}if(o===s)n==t.length-1?c.push(a):a.items&&u(a.items(),t,n+1);else if(l.direct)return;a.items&&u(a.items(),t,n)}}if(e.items){for(t=0,n=i.length;t<n;t++)u(e.items(),i[t],0);1<n&&(c=function(e){for(var t,n=[],i=e.length;i--;)(t=e[i]).__checked||(n.push(t),t.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}(c))}return r||(r=o.Collection),new r(c)}});return o}),e("tinymce/ui/Collection",["tinymce/util/Tools","tinymce/ui/Selector","tinymce/util/Class"],function(i,s,e){var a,r,t=Array.prototype.push,n=Array.prototype.slice;return r={length:0,init:function(e){e&&this.add(e)},add:function(e){return i.isArray(e)?t.apply(this,e):e instanceof a?this.add(e.toArray()):t.call(this,e),this},set:function(e){var t,n=this.length;for(this.length=0,this.add(e),t=this.length;t<n;t++)delete this[t];return this},filter:function(t){var e,n,i,r,o=[];for(r="string"==typeof t?(t=new s(t),function(e){return t.match(e)}):t,e=0,n=this.length;e<n;e++)r(i=this[e])&&o.push(i);return new a(o)},slice:function(){return new a(n.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return i.each(this,e),this},toArray:function(){return i.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new a(i.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(t,n){var e;return void 0!==n?(this.each(function(e){e[t]&&e[t](n)}),this):(e=this[0])&&e[t]?e[t]():void 0},exec:function(t){var n=i.toArray(arguments).slice(1);return this.each(function(e){e[t]&&e[t].apply(e,n)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(t){return this.each(function(e){e.classes.add(t)})},removeClass:function(t){return this.each(function(e){e.classes.remove(t)})}},i.each("fire on off show hide append prepend before after reflow".split(" "),function(n){r[n]=function(){var t=i.toArray(arguments);return this.each(function(e){n in e&&e[n].apply(e,t)}),this}}),i.each("text name disabled active selected checked visible parent value data".split(" "),function(t){r[t]=function(e){return this.prop(t,e)}}),a=e.extend(r),s.Collection=a}),e("tinymce/ui/DomUtils",["tinymce/Env","tinymce/util/Tools","tinymce/dom/DOMUtils"],function(e,r,o){var t=0,n={id:function(){return"mceu_"+t++},create:function(e,t,n){var i=document.createElement(e);return o.DOM.setAttribs(i,t),"string"==typeof n?i.innerHTML=n:r.each(n,function(e){e.nodeType&&i.appendChild(e)}),i},createFragment:function(e){return o.DOM.createFragment(e)},getWindowSize:function(){return o.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return o.DOM.getPos(e,t||n.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return o.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return o.DOM.addClass(e,t)},removeClass:function(e,t){return o.DOM.removeClass(e,t)},hasClass:function(e,t){return o.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return o.DOM.toggleClass(e,t,n)},css:function(e,t,n){return o.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return o.DOM.getStyle(e,t,!0)},on:function(e,t,n,i){return o.DOM.bind(e,t,n,i)},off:function(e,t,n){return o.DOM.unbind(e,t,n)},fire:function(e,t,n){return o.DOM.fire(e,t,n)},innerHtml:function(e,t){o.DOM.setHTML(e,t)}};return n}),e("tinymce/ui/BoxUtils",[],function(){return{parseBox:function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},measureBox:function(r,e){function t(e){var t,n,i=parseFloat((t=e,(n=document.defaultView)?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(r,null).getPropertyValue(t)):r.currentStyle[t]),10);return isNaN(i)?0:i}return{top:t(e+"TopWidth"),right:t(e+"RightWidth"),bottom:t(e+"BottomWidth"),left:t(e+"LeftWidth")}}}}),e("tinymce/ui/ClassList",["tinymce/util/Tools"],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)0<t&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),e("tinymce/ui/ReflowQueue",["tinymce/util/Delay"],function(n){var i,r={};return{add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;r[t._id]||(r[t._id]=t),i||(i=!0,n.requestAnimationFrame(function(){var e,t;for(e in i=!1,r)(t=r[e]).state.get("rendered")&&t.reflow();r={}},document.body))}},remove:function(e){r[e._id]&&delete r[e._id]}}}),e("tinymce/ui/Control",["tinymce/util/Class","tinymce/util/Tools","tinymce/util/EventDispatcher","tinymce/data/ObservableObject","tinymce/ui/Collection","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/BoxUtils","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(e,o,i,s,r,v,h,y,a,c){var l,f="onmousewheel"in document,p=!1,u=0,n={Statics:{classPrefix:"mce-"},isRtl:function(){return l.rtl},classPrefix:"mce-",init:function(t){var e,n,i=this;function r(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}i.settings=t=o.extend({},i.Defaults,t),i._id=t.id||"mceu_"+u++,i._aria={role:t.role},i._elmCache={},i.$=h,i.state=new s({visible:!0,active:!1,disabled:!1,value:""}),i.data=new s(t.data),i.classes=new a(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,(e=t.classes)&&(i.Defaults&&(n=i.Defaults.classes)&&e!=n&&r(n),r(e)),o.each("title text name visible disabled active value".split(" "),function(e){e in t&&i[e](t[e])}),i.on("click",function(){if(i.disabled())return!1}),i.settings=t,i.borderBox=y.parseBox(t.border),i.paddingBox=y.parseBox(t.padding),i.marginBox=y.parseBox(t.margin),t.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){return v.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,i,r,o,s,a,l,c,u=this,d=u.settings,h=u.getEl();e=u.borderBox=u.borderBox||y.measureBox(h,"border"),u.paddingBox=u.paddingBox||y.measureBox(h,"padding"),u.marginBox=u.marginBox||y.measureBox(h,"margin"),c=v.getSize(h),a=d.minWidth,l=d.minHeight,r=a||c.width,o=l||c.height,n=d.width,i=d.height,s=void 0!==(s=d.autoResize)?s:!n&&!i,n=n||r,i=i||o;var f=e.left+e.right,p=e.top+e.bottom,m=d.maxWidth||65535,g=d.maxHeight||65535;return u._layoutRect=t={x:d.x||0,y:d.y||0,w:n,h:i,deltaW:f,deltaH:p,contentW:n-f,contentH:i-p,innerW:n-f,innerH:i-p,startMinWidth:a||0,startMinHeight:l||0,minW:Math.min(r,m),minH:Math.min(o,g),maxW:m,maxH:g,autoResize:s,scrollW:0},u._lastLayoutRect={},t},layoutRect:function(e){var t,n,i,r,o,s,a=this._layoutRect;return a||(a=this.initLayoutRect()),e?(i=a.deltaW,r=a.deltaH,e.x!==o&&(a.x=e.x),e.y!==o&&(a.y=e.y),e.minW!==o&&(a.minW=e.minW),e.minH!==o&&(a.minH=e.minH),(n=e.w)!==o&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=e.h)!==o&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=e.innerW)!==o&&(n=(n=n<a.minW-i?a.minW-i:n)>a.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=e.innerH)!==o&&(n=(n=n<a.minH-r?a.minH-r:n)>a.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),e.contentW!==o&&(a.contentW=e.contentW),e.contentH!==o&&(a.contentH=e.contentH),(t=this._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((s=l.repaintControls)&&s.map&&!s.map[this._id]&&(s.push(this),s.map[this._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),this):a},repaint:function(){var e,t,n,i,r,o,s,a,l,c,u=this;l=document.createRange?function(e){return e}:Math.round,e=u.getEl().style,i=u._layoutRect,a=u._lastRepaintRect||{},o=(r=u.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(e.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(e.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(c=l(i.w-o),e.width=(0<=c?c:0)+"px",a.w=i.w),i.h!==a.h&&(c=l(i.h-s),e.height=(0<=c?c:0)+"px",a.h=i.h),u._hasBody&&i.innerW!==a.innerW&&(c=l(i.innerW),(n=u.getEl("body"))&&((t=n.style).width=(0<=c?c:0)+"px"),a.innerW=i.innerW),u._hasBody&&i.innerH!==a.innerH&&(c=l(i.innerH),(n=n||u.getEl("body"))&&((t=t||n.style).height=(0<=c?c:0)+"px"),a.innerH=i.innerH),u._lastRepaintRect=a,u.fire("repaint",{},!1)},updateLayoutRect:function(){this.parent()._lastRect=null,v.css(this.getEl(),{width:"",height:""}),this._layoutRect=this._lastRepaintRect=this._lastLayoutRect=null,this.initLayoutRect()},on:function(e,t){var n,i,r,o=this;return d(o).on(e,"string"!=typeof(n=t)?n:function(e){return i||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(i=t[n]))return r=e,!1}),i?i.call(r,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return d(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=d(this).fire(e,t),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return d(this).has(e)},parents:function(e){var t,n=new r;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=h("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this.getEl(this.ariaTarget);return void 0===t?this._aria[e]:(this._aria[e]=t,this.state.get("rendered")&&n.setAttribute("role"==e?e:"aria-"+e,t),this)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return l.translate?l.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(e=o.length;e--;)o[e].remove()}r&&r.items&&(t=[],r.items().each(function(e){e!==n&&t.push(e)}),r.items().set(t),r._lastRect=null),n._eventsRoot&&n._eventsRoot==n&&h(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return h(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return h(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;for(i in o.$el=h(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}m(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),c.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,s,a=this.getEl(),l=a.parentNode,c=function(e,t){var n,i,r=e;for(n=i=0;r&&r!=t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return t=c.x,n=c.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"==e?(t-=o-i,n-=s-r):"center"==e&&(t-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};function d(n){return n._eventDispatcher||(n._eventDispatcher=new i({scope:n,toggleEvent:function(e,t){t&&i.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&m(n))}})),n._eventDispatcher}function m(a){var e,t,n,l,i,r;function o(e){var t=a.getParentCtrl(e.target);t&&t.fire(e.type,e)}function s(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function c(e){var t,n,i,r=a.getParentCtrl(e.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;s<i.length&&n[s]===i[s];s++);for(t=i.length-1;s<=t;t--)(o=i[t]).fire("mouseleave",{target:o.getEl()})}for(t=s;t<n.length;t++)(r=n[t]).fire("mouseenter",{target:r.getEl()})}}function u(e){e.preventDefault(),"mousewheel"==e.type?(e.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-.025*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=a.fire("wheel",e)}if(i=a._nativeEvents){for((n=a.parents().toArray()).unshift(a),e=0,t=n.length;!l&&e<t;e++)l=n[e]._eventsRoot;for(l||(l=n[n.length-1]||a),a._eventsRoot=l,t=e,e=0;e<t;e++)n[e]._eventsRoot=l;var d=l._delegates;for(r in d||(d=l._delegates={}),i){if(!i)return!1;"wheel"!==r||p?("mouseenter"===r||"mouseleave"===r?l._hasMouseEnter||(h(l.getEl()).on("mouseleave",s).on("mouseover",c),l._hasMouseEnter=1):d[r]||(h(l.getEl()).on(r,o),d[r]=!0),i[r]=!1):f?h(a.getEl()).on("mousewheel",u):h(a.getEl()).on("DOMMouseScroll",u)}}}return o.each("text title visible disabled active value".split(" "),function(t){n[t]=function(e){return 0===arguments.length?this.state.get(t):(void 0!==e&&this.state.set(t,e),this)}}),l=e.extend(n)}),e("tinymce/ui/Factory",[],function(){var o,s={};return{add:function(e,t){s[e.toLowerCase()]=t},has:function(e){return!!s[e.toLowerCase()]},create:function(e,t){var n,i,r;if(!o){for(i in r=tinymce.ui)s[i.toLowerCase()]=r[i];o=!0}if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=s[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}}}),e("tinymce/ui/KeyboardNavigation",[],function(){return function(e){var o,r,t=e.root;function n(e){return e&&1===e.nodeType}try{o=document.activeElement}catch(e){o=document.body}function s(e){return n(e=e||o)?e.getAttribute("role"):null}function i(e){for(var t,n=e||o;n=n.parentNode;)if(t=s(n))return t}function a(e){var t=o;if(n(t))return t.getAttribute("aria-"+e)}function l(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function c(e){var r=[];return function e(t){if(1==t.nodeType&&"none"!=t.style.display&&!t.disabled){var n;(l(n=t)&&!n.hidden||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(t);for(var i=0;i<t.childNodes.length;i++)e(t.childNodes[i])}}(e||t.getEl()),r}function u(e){var t,n;(n=(e=e||r).parents().toArray()).unshift(e);for(var i=0;i<n.length&&!(t=n[i]).settings.ariaRoot;i++);return t}function d(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function h(e,t){var n=-1,i=u();t=t||c(i.getEl());for(var r=0;r<t.length;r++)t[r]===o&&(n=r);n+=e,i.lastAriaIndex=d(n,t)}function f(){"tablist"==i()?h(-1,c(o.parentNode)):r.parent().submenu?v():h(-1)}function p(){var e=s(),t=i();"tablist"==t?h(1,c(o.parentNode)):"menuitem"==e&&"menu"==t&&a("haspopup")?y():h(1)}function m(){h(-1)}function g(){var e=s(),t=i();"menuitem"==e&&"menubar"==t?y():"button"==e&&a("haspopup")?y({key:"down"}):h(1)}function v(){r.fire("cancel")}function y(e){e=e||{},r.fire("click",{target:o,aria:e})}return r=t.getParentCtrl(o),t.on("keydown",function(e){function t(e,t){l(o)||"slider"!==s(o)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,f);break;case 39:t(e,p);break;case 38:t(e,m);break;case 40:t(e,g);break;case 27:v();break;case 14:case 13:case 32:t(e,y);break;case 9:!1!==function(e){if("tablist"==i()){var t=c(r.getEl("body"))[0];t&&t.focus()}else h(e.shiftKey?-1:1)}(e)&&e.preventDefault()}}),t.on("focusin",function(e){o=e.target,r=e.control}),{focusFirst:function(e){var t=u(e),n=c(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?d(t.lastAriaIndex,n):d(0,n)}}}}),e("tinymce/ui/Container",["tinymce/ui/Control","tinymce/ui/Collection","tinymce/ui/Selector","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/ui/ClassList","tinymce/ui/ReflowQueue"],function(r,n,t,o,i,s,a,l,c){var u={};return r.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new n,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new l(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=o.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=u[e]=u[e]||new t(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,i;if(!e||!(n=this.keyboardNav||this.parents().eq(-1)[0].keyboardNav))return i=this.find("*"),this.statusbar&&i.add(this.statusbar.items()),i.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),this;n.focusFirst(this)},replace:function(e,t){for(var n,i=this.items(),r=i.length;r--;)if(i[r]===e){i[r]=t;break}0<=r&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,i=[];return s.isArray(e)||(e=[e]),s.each(e,function(e){e&&(e instanceof r||("string"==typeof e&&(e={type:e}),t=s.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=o.create(t)),i.push(e))}),i},renderNew:function(){var i=this;return i.items().each(function(e,t){var n;e.parent(i),e.state.get("rendered")||((n=i.getEl("body")).hasChildNodes()&&t<=n.childNodes.length-1?a(n.childNodes[t]).before(e.renderHtml()):a(n).append(e.renderHtml()),e.postRender(),c.add(e))}),i._layout.applyClasses(i.items().filter(":visible")),i._lastRect=null,i},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var i,r,o;return e=this.create(e),i=this.items(),!n&&t<i.length-1&&(t+=1),0<=t&&t<i.length&&(r=i.slice(0,t).toArray(),o=i.slice(t).toArray(),i.set(r.concat(e,o))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var i={};return this.find("*").each(function(e){var t=e.name(),n=e.value();t&&void 0!==n&&(i[t]=n)}),i},renderHtml:function(){var e=this._layout,t=this.settings.role;return this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"'+(t?' role="'+this.settings.role+'"':"")+'><div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=new i({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this._layoutRect,t=this._lastRect;if(!t||t.w!=e.w||t.h!=e.h)return this._layout.recalc(this),e=this.layoutRect(),this._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var e;if(c.remove(this),this.visible()){for(r.repaintControls=[],r.repaintControls.map={},this.recalc(),e=r.repaintControls.length;e--;)r.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),r.repaintControls=[]}return this}})}),e("tinymce/ui/DragHelper",["tinymce/dom/DomQuery"],function(w){function C(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(e,f){var p,m,t,g,v,y,b,_=f.document||document;function x(){return _.getElementById(f.handle||e)}f=f||{},t=function(e){var t,n,i,r,o,s,a,l,c,u,d,h=(i=_,d=Math.max,r=i.documentElement,o=i.body,s=d(r.scrollWidth,o.scrollWidth),a=d(r.clientWidth,o.clientWidth),l=d(r.offsetWidth,o.offsetWidth),c=d(r.scrollHeight,o.scrollHeight),u=d(r.clientHeight,o.clientHeight),{width:s<l?a:s,height:c<d(r.offsetHeight,o.offsetHeight)?u:c});C(e),e.preventDefault(),m=e.button,t=x(),y=e.screenX,b=e.screenY,n=window.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue("cursor"):t.runtimeStyle.cursor,p=w("<div></div>").css({position:"absolute",top:0,left:0,width:h.width,height:h.height,zIndex:2147483647,opacity:1e-4,cursor:n}).appendTo(_.body),w(_).on("mousemove touchmove",v).on("mouseup touchend",g),f.start(e)},v=function(e){if(C(e),e.button!==m)return g(e);e.deltaX=e.screenX-y,e.deltaY=e.screenY-b,e.preventDefault(),f.drag(e)},g=function(e){C(e),w(_).off("mousemove touchmove",v).off("mouseup touchend",g),p.remove(),f.stop&&f.stop(e)},this.destroy=function(){w(x()).off()},w(x()).on("mousedown touchstart",t)}}),e("tinymce/ui/Scrollable",["tinymce/dom/DomQuery","tinymce/ui/DragHelper"],function(y,i){return{init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var g=this,v=2;function n(){var p,m,e;function t(e,t,n,i,r,o){var s,a,l,c,u,d,h,f;if(a=g.getEl("scroll"+e)){if(h=t.toLowerCase(),f=n.toLowerCase(),y(g.getEl("absend")).css(h,g.layoutRect()[i]-1),!r)return void y(a).css("display","none");y(a).css("display","block"),s=g.getEl("body"),l=g.getEl("scroll"+e+"t"),c=s["client"+n]-2*v,u=(c-=p&&m?a["client"+o]:0)/s["scroll"+n],(d={})[h]=s["offset"+t]+v,d[f]=c,y(a).css(d),(d={})[h]=s["scroll"+t]*u,d[f]=c*u,y(l).css(d)}}e=g.getEl("body"),p=e.scrollWidth>e.clientWidth,m=e.scrollHeight>e.clientHeight,t("h","Left","Width","contentW",p,"Height"),t("v","Top","Height","contentH",m,"Width")}g.settings.autoScroll&&(g._hasScroll||(g._hasScroll=!0,function(){function e(s,a,l,c,u){var d,e=g._id+"-scroll"+s,t=g.classPrefix;y(g.getEl()).append('<div id="'+e+'" class="'+t+"scrollbar "+t+"scrollbar-"+s+'"><div id="'+e+'t" class="'+t+'scrollbar-thumb"></div></div>'),g.draghelper=new i(e+"t",{start:function(){d=g.getEl("body")["scroll"+a],y("#"+e).addClass(t+"active")},drag:function(e){var t,n,i,r,o=g.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=g.getEl("body")["client"+l]-2*v,t=(r-=n&&i?g.getEl("scroll"+s)["client"+u]:0)/g.getEl("body")["scroll"+l],g.getEl("body")["scroll"+a]=d+e["delta"+c]/t},stop:function(){y("#"+e).removeClass(t+"active")}})}g.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height")}(),g.on("wheel",function(e){var t=g.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),y(g.getEl("body")).on("scroll",n)),n())}}}),e("tinymce/ui/Panel",["tinymce/ui/Container","tinymce/ui/Scrollable"],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),e("tinymce/ui/Movable",["tinymce/ui/DomUtils"],function(f){function o(e,t,n){var i,r,o,s,a,l,c,u,d,h;return d=f.getViewPort(),o=(r=f.getPos(t)).x,s=r.y,e.state.get("fixed")&&"static"==f.getRuntimeStyle(document.body,"position")&&(o-=d.x,s-=d.y),i=e.getEl(),a=(h=f.getSize(i)).width,l=h.height,c=(h=f.getSize(t)).width,u=h.height,"b"===(n=(n||"").split(""))[0]&&(s+=u),"r"===n[1]&&(o+=c),"c"===n[0]&&(s+=Math.round(u/2)),"c"===n[1]&&(o+=Math.round(c/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}return{testMoveRel:function(e,t){for(var n=f.getViewPort(),i=0;i<t.length;i++){var r=o(this,e,t[i]);if(this.state.get("fixed")){if(0<r.x&&r.x+r.w<n.w&&0<r.y&&r.y+r.h<n.h)return t[i]}else if(r.x>n.x&&r.x+r.w<n.w+n.x&&r.y>n.y&&r.y+r.h<n.h+n.y)return t[i]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=o(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){function n(e,t,n){return e<0?0:t<e+n&&(e=t-n)<0?0:e}if(this.settings.constrainToViewport){var i=f.getViewPort(window),r=this.layoutRect();e=n(e,i.w+i.x,r.w),t=n(t,i.h+i.y,r.h)}return this.state.get("rendered")?this.layoutRect({x:e,y:t}).repaint():(this.settings.x=e,this.settings.y=t),this.fire("move",{x:e,y:t}),this}}}),e("tinymce/ui/Resizable",["tinymce/ui/DomUtils"],function(i){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=i.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}}}),e("tinymce/ui/FloatPanel",["tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/Delay"],function(e,t,n,i,s,r){var o,a,l,c,u=[],d=[];function h(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function f(){o||(o=function(e){2!=e.button&&function(e){for(var t=u.length;t--;){var n=u[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(h(i,n)||n.parent()===i))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},s(document).on("click touchstart",o))}function p(r){var e=i.getViewPort().y;function t(e,t){for(var n,i=0;i<u.length;i++)if(u[i]!=r)for(n=u[i].parent();n&&(n=n.parent());)n==r&&u[i].fixed(e).moveBy(0,t).repaint()}r.settings.autofix&&(r.state.get("fixed")?r._autoFixY>e&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),t(!1,r._autoFixY-e)):(r._autoFixY=r.layoutRect().y,r._autoFixY<e&&(r.fixed(!0).layoutRect({y:0}).repaint(),t(!0,e-r._autoFixY))))}function m(e,t){var n,i,r=g.zIndex||65535;if(e)d.push(t);else for(n=d.length;n--;)d[n]===t&&d.splice(n,1);if(d.length)for(n=0;n<d.length;n++)d[n].modal&&(r++,i=d[n]),d[n].getEl().style.zIndex=r,d[n].zIndex=r,r++;var o=s("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];i?s(o).css("z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),c=!1),g.currentZIndex=r}var g=e.extend({Mixins:[t,n],init:function(e){var i=this;i._super(e),(i._eventsRoot=i).classes.add("floatpanel"),e.autohide&&(f(),function(){if(!l){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;l=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,g.hideAll())},s(window).on("resize",l)}}(),u.push(i)),e.autofix&&(a||(a=function(){var e;for(e=u.length;e--;)p(u[e])},s(window).on("scroll",a)),i.on("move",function(){p(this)})),i.on("postrender show",function(e){if(e.control==i){var t,n=i.classPrefix;i.modal&&!c&&((t=s("#"+n+"modal-block",i.getContainerElm()))[0]||(t=s('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(i.getContainerElm())),r.setTimeout(function(){t.addClass(n+"in"),s(i.getEl()).addClass(n+"in")}),c=!0),m(!0,i)}}),i.on("show",function(){i.parents().each(function(e){if(e.state.get("fixed"))return i.fixed(!0),!1})}),e.popover&&(i._preBodyHtml='<div class="'+i.classPrefix+'arrow"></div>',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",e.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(e){if(this.state.get("fixed")!=e){if(this.state.get("rendered")){var t=i.getViewPort();e?this.layoutRect().y-=t.y:this.layoutRect().y+=t.y}this.classes.toggle("fixed",e),this.state.set("fixed",e)}return this},show:function(){var e,t=this._super();for(e=u.length;e--&&u[e]!==this;);return-1===e&&u.push(this),t},hide:function(){return v(this),m(!1,this),this._super()},hideAll:function(){g.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),m(!1,this)),this},remove:function(){v(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function v(e){var t;for(t=u.length;t--;)u[t]===e&&u.splice(t,1);for(t=d.length;t--;)d[t]===e&&d.splice(t,1)}return g.hideAll=function(){for(var e=u.length;e--;){var t=u[e];t&&t.settings.autohide&&(t.hide(),u.splice(e,1))}},g}),e("tinymce/ui/Window",["tinymce/ui/FloatPanel","tinymce/ui/Panel","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/ui/DragHelper","tinymce/ui/BoxUtils","tinymce/Env","tinymce/util/Delay"],function(e,t,a,l,i,c,r,u){var o=[],s="";function d(e){var t,n=l("meta[name=viewport]")[0];!1!==r.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==s&&(s=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":s))}function n(e,t){(function(){for(var e=0;e<o.length;e++)if(o[e]._fullscreen)return!0;return!1})()&&!1===t&&l([document.documentElement,document.body]).removeClass(e+"fullscreen")}var h=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(e){var t=n.classPrefix+"close";(a.hasClass(e.target,t)||a.hasClass(e.target.parentNode,t))&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,n,i,r=this,o=r.statusbar;r._fullscreen&&(r.layoutRect(a.getWindowSize()),r.layoutRect().contentH=r.layoutRect().innerH),r._super(),e=r.layoutRect(),r.settings.title&&!r._fullscreen&&(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),r.layoutRect({w:t,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),r.layoutRect({w:t,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var e,t=this._super(),n=0;if(this.settings.title&&!this._fullscreen){e=this.getEl("head");var i=a.getSize(e);t.headerW=i.width,t.headerH=i.height,n+=t.headerH}this.statusbar&&(n+=this.statusbar.layoutRect().h),t.deltaH+=n,t.minH+=n,t.h+=n;var r=a.getWindowSize();return t.x=this.settings.x||Math.max(0,r.w/2-t.w/2),t.y=this.settings.y||Math.max(0,r.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",s="",a=r.html;return e.preRender(),t.preRender(e),r.title&&(o='<div id="'+n+'-head" class="'+i+'window-head"><div id="'+n+'-title" class="'+i+'title">'+e.encode(r.title)+'</div><div id="'+n+'-dragh" class="'+i+'dragh"></div><button type="button" class="'+i+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(a='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===a&&(a=t.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+a+"</div>"+s+"</div></div>"},fullscreen:function(e){var n,t,i=this,r=document.documentElement,o=i.classPrefix;if(e!=i._fullscreen)if(l(window).on("resize",function(){var e;if(i._fullscreen)if(n)i._timer||(i._timer=u.setTimeout(function(){var e=a.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),i._timer=0},50));else{e=(new Date).getTime();var t=a.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=i.layoutRect(),i._fullscreen=e){i._initial={x:t.x,y:t.y,w:t.w,h:t.h},i.borderBox=c.parseBox("0"),i.getEl("head").style.display="none",t.deltaH-=t.headerH+2,l([r,document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=a.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=c.parseBox(i.settings.border),i.getEl("head").style.display="",t.deltaH+=t.headerH,l([r,document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new i(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),o.push(n),d(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e;for(this.dragHelper.destroy(),this._super(),this.statusbar&&this.statusbar.remove(),n(this.classPrefix,!1),e=o.length;e--;)o[e]===this&&o.splice(e,1);d(0<o.length)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return function(){if(!r.desktop){var n={w:window.innerWidth,h:window.innerHeight};u.setInterval(function(){var e=window.innerWidth,t=window.innerHeight;n.w==e&&n.h==t||(n={w:e,h:t},l(window).trigger("resize"))},100)}l(window).on("resize",function(){var e,t,n=a.getWindowSize();for(e=0;e<o.length;e++)t=o[e].layoutRect(),o[e].moveTo(o[e].settings.x||Math.max(0,n.w/2-t.w/2),o[e].settings.y||Math.max(0,n.h/2-t.h/2))})}(),h}),e("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(r){var o=r.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){var t,i=e.callback||function(){};function n(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),i(t)}}}switch(e.buttons){case o.OK_CANCEL:t=[n("Ok",!0,!0),n("Cancel",!1)];break;case o.YES_NO:case o.YES_NO_CANCEL:t=[n("Yes",1,!0),n("No",0)],e.buttons==o.YES_NO_CANCEL&&t.push(n("Cancel",-1));break;default:t=[n("Ok",!0,!0)]}return new r({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:t,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){i(!1)}}).renderTo(document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,o.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=o.OK_CANCEL,o.msgBox(e)}}});return o}),e("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(a,l){return function(r){var i=[];function t(){if(i.length)return i[i.length-1]}function o(e){r.fire("OpenWindow",{win:e})}function s(e){r.fire("CloseWindow",{win:e})}this.windows=i,r.on("remove",function(){for(var e=i.length;e--;)i[e].close()}),this.open=function(n,e){var t;return r.editorManager.setActive(r),n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){t.find("form")[0].submit()}},{text:"Cancel",onclick:function(){t.close()}}]),t=new a(n),i.push(t),t.on("close",function(){for(var e=i.length;e--;)i[e]===t&&i.splice(e,1);i.length||r.focus(),s(t)}),n.data&&t.on("postRender",function(){this.find("*").each(function(e){var t=e.name();t in n.data&&e.value(n.data[t])})}),t.features=n||{},t.params=e||{},1===i.length&&r.nodeChanged(),o(t=t.renderTo().reflow()),t},this.alert=function(e,t,n){var i;(i=l.alert(e,function(){t?t.call(n||this):r.focus()})).on("close",function(){s(i)}),o(i)},this.confirm=function(e,t,n){var i;(i=l.confirm(e,function(e){t.call(n||this,e)})).on("close",function(){s(i)}),o(i)},this.close=function(){t()&&t().close()},this.getParams=function(){return t()?t().params:null},this.setParams=function(e){t()&&(t().params=e)},this.getWindows=function(){return i}}}),e("tinymce/ui/Tooltip",["tinymce/ui/Control","tinymce/ui/Movable"],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'" role="presentation"><div class="'+e+'tooltip-arrow"></div><div class="'+e+'tooltip-inner">'+this.encode(this.state.get("text"))+"</div></div>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}})}),e("tinymce/ui/Widget",["tinymce/ui/Control","tinymce/ui/Tooltip"],function(e,t){var n,o=e.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==o.tooltips&&(r.on("mouseenter",function(e){var t=r.tooltip().moveTo(-65535);if(e.control==r){var n=t.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"==n),t.classes.toggle("tooltip-nw","bc-tl"==n),t.classes.toggle("tooltip-ne","bc-tr"==n),t.moveRel(r.getEl(),n)}else t.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().hide()})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"})).renderTo(),n},postRender:function(){var e=this.settings;this._super(),this.parent()||!e.width&&!e.height||(this.initLayoutRect(),this.repaint()),e.autofocus&&this.focus()},bindStates:function(){var t=this;function n(e){t.aria("disabled",e),t.classes.toggle("disabled",e)}function i(e){t.aria("pressed",e),t.classes.toggle("active",e)}return t.state.on("change:disabled",function(e){n(e.value)}),t.state.on("change:active",function(e){i(e.value)}),t.state.get("disabled")&&n(!0),t.state.get("active")&&i(!0),t._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return o}),e("tinymce/ui/Progress",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var t=this;function n(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}return t.state.on("change:value",function(e){n(e.value)}),n(t.state.get("value")),t._super()}})}),e("tinymce/ui/Notification",["tinymce/ui/Control","tinymce/ui/Movable","tinymce/ui/Progress","tinymce/util/Delay"],function(e,t,n,i){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0<e.timeout)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",i="",r="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(i='<button type="button" class="'+t+'close" aria-hidden="true">×</button>'),e.progressBar&&(r=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+r+i+"</div>"},postRender:function(){var e=this;return i.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().childNodes[1].innerHTML=e.value}),t.progressBar&&t.progressBar.bindStates(),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}})}),e("tinymce/NotificationManager",["tinymce/ui/Notification","tinymce/util/Delay","tinymce/util/Tools"],function(s,t,a){return function(i){var r=[];function e(){if(r.length)return r[r.length-1]}function o(){if(0<r.length){var e=r.slice(0,1)[0],t=i.inline?i.getElement():i.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),1<r.length)for(var n=1;n<r.length;n++)r[n].moveRel(r[n-1].getEl(),"bc-tc")}}this.notifications=r,i.on("remove",function(){for(var e=r.length;e--;)r[e].close()}),i.on("ResizeEditor",o),i.on("ResizeWindow",function(){t.requestAnimationFrame(function(){!function(){for(var e=0;e<r.length;e++)r[e].moveTo(0,0)}(),o()})}),this.open=function(e){if(!i.removed){var t;i.editorManager.setActive(i);var n=function(e,i){if(t=i,t.progressBar||t.timeout)return null;var t;var n=a.grep(e,function(e){return n=e,(t=i).type===n.settings.type&&t.text===n.settings.text;var t,n});return 0===n.length?null:n[0]}(r,e);return null===n?(t=new s(e),r.push(t),0<e.timeout&&(t.timer=setTimeout(function(){t.close()},e.timeout)),t.on("close",function(){var e=r.length;for(t.timer&&i.getWin().clearTimeout(t.timer);e--;)r[e]===t&&r.splice(e,1);o()}),t.renderTo(),o()):t=n,t}},this.close=function(){e()&&e().close()},this.getNotifications=function(){return r},i.on("SkinLoaded",function(){var e=i.settings.service_message;e&&i.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),e("tinymce/dom/NodePath",["tinymce/dom/DOMUtils"],function(r){return{create:function(e,t,n){for(var i=[];t&&t!=e;t=t.parentNode)i.push(r.nodeIndex(t,n));return i},resolve:function(e,t){var n,i,r;for(i=e,n=t.length-1;0<=n;n--){if(r=i.childNodes,t[n]>r.length-1)return null;i=r[t[n]]}return i}}}),e("tinymce/util/Quirks",["tinymce/util/VK","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/dom/NodePath","tinymce/html/Node","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/caret/CaretWalker"],function(N,D,R,A,P,M,I,O,B,L,H,F){return function(p){var n,r=O.each,m=p.$,h=N.BACKSPACE,g=N.DELETE,c=p.dom,s=p.selection,e=p.settings,t=p.parser,i=p.serializer,o=I.gecko,a=I.ie,l=I.webkit,u="data:text/mce-internal,",d=a?"Text":"URL";function f(e,t){try{p.getDoc().execCommand(e,!1,t)}catch(e){}}function v(){var e=p.getDoc().documentMode;return e||6}function y(e){return e.isDefaultPrevented()}function b(e){var t,n;e.dataTransfer&&(p.selection.isCollapsed()&&"IMG"==e.target.tagName&&s.select(e.target),0<(t=p.selection.getContent()).length&&(n=u+escape(p.id)+","+escape(t),e.dataTransfer.setData(d,n)))}function _(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(d))&&0<=t.indexOf(u)?(t=t.substr(u.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function x(e){p.queryCommandSupported("mceInsertClipboardContent")?p.execCommand("mceInsertClipboardContent",!1,{content:e}):p.execCommand("mceInsertContent",!1,e)}function w(){p.shortcuts.add("meta+a",null,"SelectAll")}function C(){p.on("keydown",function(e){if(!y(e)&&e.keyCode===h){if(!p.getBody().getElementsByTagName("hr").length)return;if(s.isCollapsed()&&0===s.getRng(!0).startOffset){var t=s.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return c.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(c.remove(n),e.preventDefault())}}})}function k(){p.on("keydown",function(e){if(!y(e)&&e.keyCode===h&&s.isCollapsed()&&0===s.getRng(!0).startOffset){var t=s.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function T(){p.inline||(p.contentStyles.push("body {min-height: 150px}"),p.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(11<I.ie)return void p.getBody().focus();t=p.selection.getRng(),p.getBody().focus(),p.selection.setRng(t),p.selection.normalize(),p.nodeChanged()}}))}function S(){}function E(){function n(e){var t=new F(e.getBody()),n=e.selection.getRng(),i=H.fromRangeStart(n),r=H.fromRangeEnd(n),o=t.prev(i),s=t.next(r);return!e.selection.isCollapsed()&&(!o||o.isAtStart()&&i.isEqual(o))&&(!s||s.isAtEnd()&&i.isEqual(s))}p.on("keypress",function(e){!y(e)&&!s.isCollapsed()&&31<e.charCode&&!N.metaKeyPressed(e)&&n(p)&&(e.preventDefault(),p.setContent(String.fromCharCode(e.charCode)),p.selection.select(p.getBody(),!0),p.selection.collapse(!1),p.nodeChanged())}),p.on("keydown",function(e){var t=e.keyCode;y(e)||t!=g&&t!=h||n(p)&&(e.preventDefault(),p.setContent(""),p.nodeChanged())})}return p.on("keydown",function(e){var t,n,i,r,o;if(!y(e)&&e.keyCode==N.BACKSPACE&&(n=(t=s.getRng()).startContainer,i=t.startOffset,r=c.getRoot(),o=n,t.collapsed&&0===i)){for(;o&&o.parentNode&&o.parentNode.firstChild==o&&o.parentNode!=r;)o=o.parentNode;"BLOCKQUOTE"===o.tagName&&(p.formatter.toggle("blockquote",null,o),(t=c.createRng()).setStart(n,0),t.setEnd(n,0),s.setRng(t))}}),function(){function r(e){var t=c.create("body"),n=e.cloneContents();return t.appendChild(n),s.serializer.serialize(t,{format:"html"})}p.on("keydown",function(e){var t,n,i=e.keyCode;if(!y(e)&&(i==g||i==h)){if(t=p.selection.isCollapsed(),n=p.getBody(),t&&!c.isEmpty(n))return;if(!t&&!function(e){if(!e.setStart){if(e.item)return!1;var t=e.duplicate();return t.moveToElementText(p.getBody()),D.compareRanges(e,t)}var n=r(e),i=c.createRng();return i.selectNode(p.getBody()),n===r(i)}(p.selection.getRng()))return;e.preventDefault(),p.setContent(""),n.firstChild&&c.isBlock(n.firstChild)?p.selection.setCursorLocation(n.firstChild,0):p.selection.setCursorLocation(n,0),p.nodeChanged()}})}(),I.windowsPhone||p.on("keyup focusin mouseup",function(e){65==e.keyCode&&N.metaKeyPressed(e)||s.normalize()},!0),l&&(E(),function(){var e,i,r=p.getDoc(),f=p.dom,a=p.selection,n=window.MutationObserver;function s(e){var t=f.schema.getBlockElements(),n=p.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function c(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==m.trim(n.data).length)&&n!==t)return!1;return n===t}function u(e,t,n){var i,r,o;if(f.isChildOf(e,p.getBody()))for(o=f.schema.getNonEmptyElements(),i=new R(n||e,e);r=i[t?"next":"prev"]();){if(o[r.nodeName]&&!s(r))return r;if(3==r.nodeType&&0<r.data.length)return r}}function o(e){var t=a.getRng();if(function(e){var t,n,i,r,o;if(!e.collapsed&&(t=f.getParent(D.getNode(e.startContainer,e.startOffset),f.isBlock),n=f.getParent(D.getNode(e.endContainer,e.endOffset),f.isBlock),o=p.schema.getTextBlockElements(),t!=n&&o[t.nodeName]&&o[n.nodeName]&&"false"!==f.getContentEditable(t)&&"false"!==f.getContentEditable(n)))return e.deleteContents(),i=u(t,!1),r=u(n,!0),f.isEmpty(n)||m(t).append(n.childNodes),m(n).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):r&&(1==r.nodeType?(e.setStartBefore(r),e.setEndBefore(r)):(e.setStart(r,0),e.setEnd(r,0))),a.setRng(e),!0}(t=function(e,t){var n,i,r,o,s,a;if(!e.collapsed)return e;if(s=e.startContainer,a=e.startOffset,3==s.nodeType)if(t){if(a<s.data.length)return e}else if(0<a)return e;n=D.getNode(s,a),r=f.getParent(n,f.isBlock),i=u(p.getBody(),t,n),o=f.getParent(i,f.isBlock);var l=1===s.nodeType&&a>s.childNodes.length-1;if(!n||!i)return e;if(o&&r!=o)if(t){if(!c(r,o))return e;1==n.nodeType?"BR"==n.nodeName?e.setStartBefore(n):e.setStartAfter(n):e.setStart(n,n.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!c(o,r))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==n.nodeType&&l?e.setEndAfter(n):e.setEndBefore(n)}return e}(t,e)))return!0}function l(e){var t,i,r;o(e)||(O.each(p.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&p.dom.setAttrib(e,"style",p.dom.getAttrib(e,"style"))}),(t=new n(function(){})).observe(p.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),p.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),i=p.selection.getRng(),r=i.startContainer.parentNode,O.each(t.takeRecords(),function(e){if(f.isChildOf(e.target,p.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}O.each(e.addedNodes,function(e){var t,n;"SPAN"!=e.nodeName||e.getAttribute("mce-data-marked")||(e==r&&(t=i.startOffset,n=e.firstChild),f.remove(e,!0),n&&(i.setStart(n,t),i.setEnd(n,t),p.selection.setRng(i)))})}}),t.disconnect(),O.each(p.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}function d(e){p.undoManager.transact(function(){l(e)})}n||(e=!0,n=function(){var t,n=[];function i(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function r(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}this.observe=function(e){(t=e).addEventListener("DOMSubtreeModified",i,!1),t.addEventListener("DOMNodeInsertedIntoDocument",i,!1),t.addEventListener("DOMNodeInserted",i,!1),t.addEventListener("DOMAttrModified",r,!1)},this.disconnect=function(){t.removeEventListener("DOMSubtreeModified",i,!1),t.removeEventListener("DOMNodeInsertedIntoDocument",i,!1),t.removeEventListener("DOMNodeInserted",i,!1),t.removeEventListener("DOMAttrModified",r,!1)},this.takeRecords=function(){return n}}),p.on("keydown",function(e){var t=e.keyCode==g,n=e.ctrlKey||e.metaKey;if(!y(e)&&(t||e.keyCode==h)){var i=p.selection.getRng(),r=i.startContainer,o=i.startOffset;if(t&&e.shiftKey)return;if(function(e,n){var t,i,r,o,s,a,l,c,u;function d(e,t){return u=m(t).parents().filter(function(e,t){return!!p.schema.getTextInlineElements()[t.nodeName]}),r=e.cloneNode(!1),(u=O.map(u,function(e){return e=e.cloneNode(!1),r.hasChildNodes()&&e.appendChild(r.firstChild),r.appendChild(e),r.appendChild(e),e})).length?(c=f.create("br"),u[0].appendChild(c),f.replace(r,e),n.setStartBefore(c),n.setEndBefore(c),p.selection.setRng(n),c):null}function h(e){return e&&p.schema.getTextBlockElements()[e.tagName]}if(n.collapsed&&(a=n.startContainer,l=n.startOffset,h(i=f.getParent(a,f.isBlock))))if(1==a.nodeType){if((a=a.childNodes[l])&&"BR"!=a.tagName)return;if(s=e?i.nextSibling:i.previousSibling,f.isEmpty(i)&&h(s)&&f.isEmpty(s)&&d(i,a))return f.remove(s),!0}else if(3==a.nodeType){if(t=A.create(i,a),o=i.cloneNode(!0),a=A.resolve(o,t),e){if(l>=a.data.length)return;a.deleteData(l,1)}else{if(l<=0)return;a.deleteData(l-1,1)}if(f.isEmpty(o))return d(i,a)}}(t,i))return void e.preventDefault();if(!n&&i.collapsed&&3==r.nodeType&&(t?o<r.data.length:0<o))return;e.preventDefault(),n&&p.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),l(t)}}),p.on("keypress",function(e){var t,n,i,r,o,s;!y(e)&&!a.isCollapsed()&&31<e.charCode&&!N.metaKeyPressed(e)&&(t=p.selection.getRng(),s=String.fromCharCode(e.charCode),e.preventDefault(),n=m(t.startContainer).parents().filter(function(e,t){return!!p.schema.getTextInlineElements()[t.nodeName]}),l(!0),(n=n.filter(function(e,t){return!m.contains(p.getBody(),t)})).length?(i=f.createFragment(),n.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?t.appendChild(i.firstChild):o=t,i.appendChild(t),i.appendChild(t)}),o.appendChild(p.getDoc().createTextNode(s)),r=f.getParent(t.startContainer,f.isBlock),f.isEmpty(r)?m(r).empty().append(i):t.insertNode(i),t.setStart(o.firstChild,1),t.setEnd(o.firstChild,1),p.selection.setRng(t)):p.selection.setContent(s))}),p.addCommand("Delete",function(){l()}),p.addCommand("ForwardDelete",function(){l(!0)}),e||(p.on("dragstart",function(e){i=a.getRng(),b(e)}),p.on("drop",function(t){if(!y(t)){var n=_(t);n&&(t.preventDefault(),B.setEditorTimeout(p,function(){var e=D.getCaretRangeFromPoint(t.x,t.y,r);i&&(a.setRng(i),i=null,d()),a.setRng(e),x(n.html)}))}}),p.on("cut",function(e){y(e)||!e.clipboardData||p.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",p.selection.getContent()),e.clipboardData.setData("text/plain",p.selection.getContent({format:"text"})),B.setEditorTimeout(p,function(){d(!0)}))}))}(),p.settings.content_editable||c.bind(p.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==p.getDoc().documentElement)if(t=s.getRng(),p.getBody().focus(),"mousedown"==e.type){if(L.isCaretContainer(t.startContainer))return;s.placeCaretAt(e.clientX,e.clientY)}else s.setRng(t)}),p.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==c.getContentEditableParent(t)&&(e.preventDefault(),s.select(t),p.nodeChanged()),"A"==t.nodeName&&c.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),s.select(t))}),e.forced_root_block&&p.on("init",function(){f("DefaultParagraphSeparator",e.forced_root_block)}),p.on("init",function(){p.dom.bind(p.getBody(),"submit",function(e){e.preventDefault()})}),k(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()}),I.iOS?(p.inline||p.on("keydown",function(){document.activeElement==document.body&&p.getWin().focus()}),T(),p.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),p.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):w()),a&&I.ie<11&&(C(),document.body.setAttribute("role","application"),7<v()||(f("RespectVisibilityInDesign",!0),p.contentStyles.push(".mceHideBrInPre pre br {display: none}"),c.addClass(p.getBody(),"mceHideBrInPre"),t.addNodeFilter("pre",function(e){for(var t,n,i,r,o=e.length;o--;)for(n=(t=e[o].getAll("br")).length;n--;)(r=(i=t[n]).prev)&&3===r.type&&"\n"!=r.value.charAt(r.value-1)?r.value+="\n":i.parent.insert(new P("#text",3),i,!0).value="\n"}),i.addNodeFilter("pre",function(e){for(var t,n,i,r=e.length;r--;)for(n=(t=e[r].getAll("br")).length;n--;)(i=t[n].prev)&&3==i.type&&(i.value=i.value.replace(/\r?\n$/,""))})),c.bind(p.getBody(),"mouseup",function(){var e,t=s.getNode();"IMG"==t.nodeName&&((e=c.getStyle(t,"width"))&&(c.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),c.setStyle(t,"width","")),(e=c.getStyle(t,"height"))&&(c.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),c.setStyle(t,"height","")))}),p.on("keydown",function(e){var t;y(e)||e.keyCode!=h||(t=p.getDoc().selection.createRange())&&t.item&&(e.preventDefault(),p.undoManager.beforeChange(),c.remove(t.item(0)),p.undoManager.add())}),10<=v()&&(n="",r("p div h1 h2 h3 h4 h5 h6".split(" "),function(e,t){n+=(0<t?",":"")+e+":empty"}),p.contentStyles.push(n+"{padding-right: 1px !important}")),v()<9&&(t.addNodeFilter("noscript",function(e){for(var t,n,i=e.length;i--;)(n=(t=e[i]).firstChild)&&t.attr("data-mce-innertext",n.value)}),i.addNodeFilter("noscript",function(e){for(var t,n,i,r=e.length;r--;)t=e[r],(n=e[r].firstChild)?n.value=M.decode(n.value):(i=t.attributes.map["data-mce-innertext"])&&(t.attr("data-mce-innertext",null),(n=new P("#text",3)).value=i,n.raw=!0,t.append(n))})),function(){var t,n,i,r=c.doc,o=r.body;function s(e,t){var n=o.createTextRange();try{n.moveToPoint(e,t)}catch(e){n=null}return n}function a(e){var t;e.button?(t=s(e.x,e.y))&&(0<t.compareEndPoints("StartToStart",n)?t.setEndPoint("StartToStart",n):t.setEndPoint("EndToEnd",n),t.select()):l()}function l(){var e=r.selection.createRange();n&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&n.select(),c.unbind(r,"mouseup",l),c.unbind(r,"mousemove",a),n=t=0}r.documentElement.unselectable=!0,c.bind(r,"mousedown contextmenu",function(e){if("HTML"===e.target.nodeName){if(t&&l(),(i=r.documentElement).scrollHeight>i.clientHeight)return;t=1,(n=s(e.x,e.y))&&(c.bind(r,"mouseup",l),c.bind(r,"mousemove",a),c.getRoot().focus(),n.select())}})}()),11<=I.ie&&k(),I.ie&&(T(),w(),f("AutoUrlDetect",!1),p.on("dragstart",function(e){b(e)}),p.on("drop",function(e){if(!y(e)){var t=_(e);if(t&&t.id!=p.id){e.preventDefault();var n=D.getCaretRangeFromPoint(e.x,e.y,p.getDoc());s.setRng(n),x(t.html)}}})),o&&(E(),C(),window.Range.prototype.getClientRects||p.on("mousedown",function(e){if(!y(e)&&"HTML"===e.target.nodeName){var t=p.getBody();t.blur(),B.setEditorTimeout(p,function(){t.focus()})}}),function(){function n(){var e=c.getAttribs(s.getStart().cloneNode(!1));return function(){var t=s.getStart();t!==p.getBody()&&(c.setAttrib(t,"style",null),r(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function i(){return!s.isCollapsed()&&c.getParent(s.getStart(),c.isBlock)!=c.getParent(s.getEnd(),c.isBlock)}p.on("keypress",function(e){var t;if(!y(e)&&(8==e.keyCode||46==e.keyCode)&&i())return t=n(),p.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),c.bind(p.getDoc(),"cut",function(e){var t;!y(e)&&i()&&(t=n(),B.setEditorTimeout(p,function(){t()}))})}(),e.readonly||p.on("BeforeExecCommand MouseDown",function(){f("StyleWithCSS",!1),f("enableInlineTableEditing",!1),e.object_resizing||f("enableObjectResizing",!1)}),p.on("SetContent ExecCommand",function(e){"setcontent"!=e.type&&"mceInsertLink"!==e.command||r(c.select("a"),function(e){var t=e.parentNode,n=c.getRoot();if(t.lastChild===e){for(;t&&!c.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}c.add(t,"br",{"data-mce-bogus":1})}})}),p.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),I.mac&&p.on("keydown",function(e){!N.metaKeyPressed(e)||e.shiftKey||37!=e.keyCode&&39!=e.keyCode||(e.preventDefault(),p.selection.getSel().modify("move",37==e.keyCode?"backward":"forward","lineboundary"))}),k()),{refreshContentEditable:S,isHidden:function(){var e;return o?!(e=p.selection.getSel())||!e.rangeCount||0===e.rangeCount:0}}}}),e("tinymce/EditorObservable",["tinymce/util/Observable","tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t,n){var i,l=t.DOM;function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=l.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function o(o,s){var e,t=r(o,s);function a(e){return!e.hidden&&!e.readonly}if(o.delegates||(o.delegates={}),!o.delegates[s])if(o.settings.event_root){if(i||(i={},o.editorManager.on("removeEditor",function(){var e;if(!o.editorManager.activeEditor&&i){for(e in i)o.dom.unbind(r(o,e));i=null}})),i[s])return;e=function(e){for(var t=e.target,n=o.editorManager.editors,i=n.length;i--;){var r=n[i].getBody();(r===t||l.isChildOf(t,r))&&a(n[i])&&n[i].fire(s,e)}},i[s]=e,l.bind(t,s,e)}else e=function(e){a(o)&&o.fire(s,e)},l.bind(t,s,e),o.delegates[s]=e}var s={bindPendingEventDelegates:function(){var t=this;n.each(t._pendingNativeEvents,function(e){o(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?o(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this;if(t.delegates){for(e in t.delegates)t.dom.unbind(r(t,e),e,t.delegates[e]);delete t.delegates}t.inline||(t.getBody().onload=null,t.dom.unbind(t.getWin()),t.dom.unbind(t.getDoc())),t.dom.unbind(t.getBody()),t.dom.unbind(t.getContainer())}};return s=n.extend({},e,s)}),e("tinymce/Mode",[],function(){function o(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}}function i(e,t){var n,i,r;e._clickBlocker&&(e._clickBlocker.unbind(),e._clickBlocker=null),t?(e._clickBlocker=(i=(n=e).getBody(),r=function(e){0<n.dom.getParents(e.target,"a").length&&e.preventDefault()},n.dom.bind(i,"click",r),{unbind:function(){n.dom.unbind(i,"click",r)}}),e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable=!1):(e.readonly=!1,o(e,"StyleWithCSS",!(e.getBody().contentEditable=!0)),o(e,"enableInlineTableEditing",!1),o(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())}return{setMode:function(e,t){var n=e.readonly?"readonly":"design";t!=n&&(e.initialized?i(e,"readonly"==t):e.on("init",function(){i(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}}}),e("tinymce/Shortcuts",["tinymce/util/Tools","tinymce/Env"],function(u,d){var h=u.each,f=u.explode,p={f9:120,f10:121,f11:122},m=u.makeMap("alt,ctrl,shift,meta,access");return function(o){var s={},i=[];function a(e){var t,n,i={};for(n in h(f(e,"+"),function(e){e in m?i[e]=!0:/^[0-9]{2,}$/.test(e)?i.keyCode=parseInt(e,10):(i.charCode=e.charCodeAt(0),i.keyCode=p[e]||e.toUpperCase().charCodeAt(0))}),t=[i.keyCode],m)i[n]?t.push(n):i[n]=!1;return i.id=t.join(","),i.access&&(i.alt=!0,d.mac?i.ctrl=!0:i.shift=!0),i.meta&&(d.mac?i.meta=!0:(i.ctrl=!0,i.meta=!1)),i}function l(e,t,n,i){var r;return(r=u.map(f(e,">"),a))[r.length-1]=u.extend(r[r.length-1],{func:n,scope:i||o}),u.extend(r[0],{desc:o.translate(t),subpatterns:r.slice(1)})}function r(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))))}function c(e){return e.func?e.func.call(e.scope):null}o.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(h(s,function(e){if(r(t,e))return i=e.subpatterns.slice(0),"keydown"==t.type&&c(e),!0}),r(t,i[0])&&(1===i.length&&"keydown"==t.type&&c(i[0]),i.shift()))}),this.add=function(e,n,i,r){var t;return"string"==typeof(t=i)?i=function(){o.execCommand(t,!1,null)}:u.isArray(t)&&(i=function(){o.execCommand(t[0],t[1],t[2])}),h(f(u.trim(e.toLowerCase())),function(e){var t=l(e,n,i,r);s[t.id]=t}),!0},this.remove=function(e){var t=l(e);return!!s[t.id]&&(delete s[t.id],!0)}}}),e("tinymce/file/Uploader",["tinymce/util/Promise","tinymce/util/Tools","tinymce/util/Fun"],function(a,l,m){return function(d,s){var i={};function n(e,i,r,t){var o,n;(o=new XMLHttpRequest).open("POST",s.url),o.withCredentials=s.credentials,o.upload.onprogress=function(e){t(e.loaded/e.total*100)},o.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,t,n;200==o.status?(e=JSON.parse(o.responseText))&&"string"==typeof e.location?i((t=s.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):r("Invalid JSON: "+o.responseText):r("HTTP Error: "+o.status)},(n=new FormData).append("file",e.blob(),e.filename()),o.send(n)}function h(e,t){return{url:t,blobInfo:e,status:!0}}function f(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function p(e,t){l.each(i[e],function(e){e(t)}),delete i[e]}function r(l,c,u){return d.markPending(l.blobUri()),new a(function(t){var n,e,i,r,o,s=function(){};try{var a=function(){n&&(n.close(),e=s)};e=function(e){e<0||100<e||(n||(n=u()),n.progressBar.value(e))},c({id:(i=l).id,blob:i.blob,base64:i.base64,filename:m.constant((r=i,o={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[r.blob().type.toLowerCase()]||"dat",r.filename()+"."+o))},function(e){a(),d.markUploaded(l.blobUri(),e),p(l.blobUri(),h(l,e)),t(h(l,e))},function(e){a(),d.removeFailed(l.blobUri()),p(l.blobUri(),f(l,e)),t(f(l,e))},e)}catch(e){t(f(l,e.message))}})}function o(e,n){return e=l.grep(e,function(e){return!d.isUploaded(e.blobUri())}),a.all(l.map(e,function(e){return d.isPending(e.blobUri())?(t=e.blobUri(),new a(function(e){i[t]=i[t]||[],i[t].push(e)})):r(e,s.handler,n);var t}))}return s=l.extend({credentials:!1,handler:n},s),{upload:function(e,t){return s.url||s.handler!==n?o(e,t):new a(function(e){e([])})}}}}),e("tinymce/file/Conversions",["tinymce/util/Promise"],function(t){function s(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}}return{uriToBlob:function(e){return 0===e.indexOf("blob:")?(r=e,new t(function(e,t){var n=function(){t("Cannot convert "+r+" to Blob. Resource might not exist or is inaccessible.")};try{var i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="blob",i.onload=function(){200==this.status?e(this.response):n()},i.onerror=n,i.send()}catch(e){n()}})):0===e.indexOf("data:")?(o=e,new t(function(t){var e,n,i;o=s(o);try{e=atob(o.data)}catch(e){return void t(new Blob([]))}for(n=new Uint8Array(e.length),i=0;i<n.length;i++)n[i]=e.charCodeAt(i);t(new Blob([n],{type:o.type}))})):null;var r,o},blobToDataUri:function(n){return new t(function(e){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},parseDataUri:s}}),e("tinymce/file/ImageScanner",["tinymce/util/Promise","tinymce/util/Arr","tinymce/util/Fun","tinymce/file/Conversions","tinymce/Env"],function(s,a,c,u,d){var t=0,h=function(e){return(e||"blobid")+t++};return function(r,l){var o={};return{findAll:function(e,n){var t,i;return n||(n=c.constant(!0)),t=a.filter(e.getElementsByTagName("img"),function(e){var t=e.src;return!!d.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t==d.transparentSrc)&&(0===t.indexOf("blob:")?!r.isUploaded(t):0===t.indexOf("data:")&&n(e))}),i=a.map(t,function(a){var e;return o[a.src]?new s(function(t){o[a.src].then(function(e){if("string"==typeof e)return e;t({image:a,blobInfo:e.blobInfo})})}):(e=new s(function(e,t){var n,i,r,o,s;i=e,r=t,0!==(n=a).src.indexOf("blob:")?(o=u.parseDataUri(n.src).data,(s=l.findFirst(function(e){return e.base64()===o}))?i({image:n,blobInfo:s}):u.uriToBlob(n.src).then(function(e){s=l.create(h(),e,o),l.add(s),i({image:n,blobInfo:s})},function(e){r(e)})):(s=l.getByUri(n.src))?i({image:n,blobInfo:s}):u.uriToBlob(n.src).then(function(t){u.blobToDataUri(t).then(function(e){o=u.parseDataUri(e).data,s=l.create(h(),t,o),l.add(s),i({image:n,blobInfo:s})})},function(e){r(e)})}).then(function(e){return delete o[e.image.src],e}).catch(function(e){return delete o[a.src],e}),o[a.src]=e)}),s.all(i)}}}}),e("tinymce/file/BlobCache",["tinymce/util/Arr","tinymce/util/Fun"],function(i,o){return function(){var n=[],r=o.constant;function t(t){return e(function(e){return e.id()===t})}function e(e){return i.filter(n,e)[0]}return{create:function(e,t,n,i){return{id:r(e),filename:r(i||e),blob:r(t),base64:r(n),blobUri:r(URL.createObjectURL(t))}},add:function(e){t(e.id())||n.push(e)},get:t,getByUri:function(t){return e(function(e){return e.blobUri()==t})},findFirst:e,removeByUri:function(t){n=i.filter(n,function(e){return e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){i.each(n,function(e){URL.revokeObjectURL(e.blobUri())}),n=[]}}}}),e("tinymce/file/UploadStatus",[],function(){return function(){var n={};function i(e,t){return{status:e,resultUri:t}}function t(e){return e in n}return{hasBlobUri:t,getResultUri:function(e){var t=n[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===n[e].status},isUploaded:function(e){return!!t(e)&&2===n[e].status},markPending:function(e){n[e]=i(1,null)},markUploaded:function(e,t){n[e]=i(2,t)},removeFailed:function(e){delete n[e]},destroy:function(){n={}}}}}),e("tinymce/ErrorReporter",["tinymce/AddOnManager"],function(e){var i=e.PluginManager,n=function(e,t){var n=function(e,t){for(var n in i.urls)if(i.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?"Failed to load plugin: "+n+" from url "+t:"Failed to load plugin url: "+t},r=function(e,t){e.notificationManager.open({type:"error",text:t})},o=function(e,t){e._skinLoaded?r(e,t):e.on("SkinLoaded",function(){r(e,t)})};return{pluginLoadError:function(e,t){o(e,n(e,t))},uploadError:function(e,t){o(e,"Failed to upload image: "+t)},displayError:o}}),e("tinymce/EditorUpload",["tinymce/util/Arr","tinymce/file/Uploader","tinymce/file/ImageScanner","tinymce/file/BlobCache","tinymce/file/UploadStatus","tinymce/ErrorReporter"],function(v,y,b,_,x,w){return function(r){var n,e,o=new _,i=r.settings,s=new x;function a(t){return function(e){return r.selection?t(e):[]}}function l(e,t,n){for(var i=0;-1!==(i=e.indexOf(t,i))&&(e=e.substring(0,i)+n+e.substr(i+t.length),i+=n.length-t.length+1),-1!==i;);return e}function c(e,t,n){return e=l(e=l(e,'src="'+t+'"','src="'+n+'"'),'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function u(t,n){v.each(r.undoManager.data,function(e){"fragmented"===e.type?e.fragments=v.map(e.fragments,function(e){return c(e,t,n)}):e.content=c(e.content,t,n)})}function d(){return r.notificationManager.open({text:r.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function h(e,t){o.removeByUri(e.src),u(e.src,t),r.$(e).attr({src:i.images_reuse_filename?t+"?"+(new Date).getTime():t,"data-mce-src":r.convertURL(t,"src")})}function t(t){return n||(n=new y(s,{url:i.images_upload_url,basePath:i.images_upload_base_path,credentials:i.images_upload_credentials,handler:i.images_upload_handler})),m().then(a(function(i){var e;return e=v.map(i,function(e){return e.blobInfo}),n.upload(e,d).then(a(function(e){return e=v.map(e,function(e,t){var n=i[t].image;return e.status&&!1!==r.settings.images_replace_blob_uris?h(n,e.url):e.error&&w.uploadError(r,e.error),{element:n,status:e.status}}),t&&t(e),e}))}))}function f(e){if(!1!==i.automatic_uploads)return t(e)}function p(e){return!i.images_dataimg_filter||i.images_dataimg_filter(e)}function m(){return e||(e=new b(s,o)),e.findAll(r.getBody(),p).then(a(function(e){return e=v.filter(e,function(e){return"string"!=typeof e||(w.displayError(r,e),!1)}),v.each(e,function(e){u(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))}function g(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=s.getResultUri(n);if(t)return'src="'+t+'"';var i=o.getByUri(n);return i||(i=v.reduce(r.editorManager.editors,function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),i?'src="data:'+i.blob().type+";base64,"+i.base64()+'"':e})}return r.on("setContent",function(){!1!==r.settings.automatic_uploads?f():m()}),r.on("RawSaveContent",function(e){e.content=g(e.content)}),r.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=g(e.content))}),r.on("PostRender",function(){r.parser.addNodeFilter("img",function(e){v.each(e,function(e){var t=e.attr("src");if(!o.getByUri(t)){var n=s.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:o,uploadImages:t,uploadImagesAuto:f,scanForImages:m,destroy:function(){o.destroy(),s.destroy(),e=n=null}}}}),e("tinymce/caret/FakeCaret",["tinymce/caret/CaretContainer","tinymce/caret/CaretPosition","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/dom/DomQuery","tinymce/geom/ClientRect","tinymce/util/Delay"],function(y,e,t,n,b,_,x){var w=t.isContentEditableFalse;return function(h,f){var p,m,g;function v(){!function(){var e,t,n,i,r;for(e=b("*[contentEditable=false]",h),i=0;i<e.length;i++)n=(t=e[i]).previousSibling,y.endsWithCaretContainer(n)&&(1==(r=n.data).length?n.parentNode.removeChild(n):n.deleteData(r.length-1,1)),n=t.nextSibling,y.startsWithCaretContainer(n)&&(1==(r=n.data).length?n.parentNode.removeChild(n):n.deleteData(0,1))}(),g&&(y.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}return{show:function(e,t){var n,i,r,o,s,a,l,c,u,d;return v(),f(t)?(g=y.insertBlock("p",t,e),r=t,o=e,d=_.collapse(r.getBoundingClientRect(),o),l="BODY"==h.tagName?(s=h.ownerDocument.documentElement,a=h.scrollLeft||s.scrollLeft,h.scrollTop||s.scrollTop):(u=h.getBoundingClientRect(),a=h.scrollLeft-u.left,h.scrollTop-u.top),d.left+=a,d.right+=a,d.top+=l,d.bottom+=l,d.width=1,0<(c=r.offsetWidth-r.clientWidth)&&(o&&(c*=-1),d.left+=c,d.right+=c),n=d,b(g).css("top",n.top),m=b('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(h),e&&m.addClass("mce-visual-caret-before"),p=x.setInterval(function(){b("div.mce-visual-caret",h).toggleClass("mce-visual-caret-hidden")},500),(i=t.ownerDocument.createRange()).setStart(g,0),i.setEnd(g,0)):(g=y.insertInline(t,e),i=t.ownerDocument.createRange(),w(g.nextSibling)?(i.setStart(g,0),i.setEnd(g,0)):(i.setStart(g,1),i.setEnd(g,1))),i},hide:v,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;}"},destroy:function(){x.clearInterval(p)}}}}),e("tinymce/dom/Dimensions",["tinymce/util/Arr","tinymce/dom/NodeType","tinymce/geom/ClientRect"],function(r,o,s){return{getClientRects:function n(t){function e(e){return r.map(e,function(e){return(e=s.clone(e)).node=t,e})}if(r.isArray(t))return r.reduce(t,function(e,t){return e.concat(n(t))},[]);if(o.isElement(t))return e(t.getClientRects());if(o.isText(t)){var i=t.ownerDocument.createRange();return i.setStart(t,0),i.setEnd(t,t.data.length),e(i.getClientRects())}}}}),e("tinymce/caret/LineWalker",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/Dimensions","tinymce/caret/CaretCandidate","tinymce/caret/CaretUtils","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/geom/ClientRect"],function(e,p,d,h,f,m,g,v){var t=e.curry;function n(r,o,s,e,a,t){var n,l,c=0,u=[];function i(e){var t,n,i;for(i=d.getClientRects(e),-1==r&&(i=i.reverse()),t=0;t<i.length;t++)if(n=i[t],!s(n,l)){if(0<u.length&&o(n,p.last(u))&&c++,n.line=c,a(n))return!0;u.push(n)}}return(l=p.last(t.getClientRects()))&&(i(n=t.getNode()),function(e,t,n,i){for(;i=f.findNode(i,e,h.isEditableCaretCandidate,t);)if(n(i))return}(r,e,i,n)),u}return{upUntil:t(n,-1,v.isAbove,v.isBelow),downUntil:t(n,1,v.isBelow,v.isAbove),positionsUntil:function(e,t,n,i){var r,o,s,a,l,c,u=new m(t),d=[],h=0;function f(e){return p.last(e.getClientRects())}c=f(a=1==e?(r=u.next,o=v.isBelow,s=v.isAbove,g.after(i)):(r=u.prev,o=v.isAbove,s=v.isBelow,g.before(i)));do{if(a.isVisible()&&!s(l=f(a),c)){if(0<d.length&&o(l,p.last(d))&&h++,(l=v.clone(l)).position=a,l.line=h,n(l))return d;d.push(l)}}while(a=r(a));return d},isAboveLine:t(function(e,t){return t.line>e}),isLine:t(function(e,t){return t.line===e})}}),e("tinymce/caret/LineUtils",["tinymce/util/Fun","tinymce/util/Arr","tinymce/dom/NodeType","tinymce/dom/Dimensions","tinymce/geom/ClientRect","tinymce/caret/CaretUtils","tinymce/caret/CaretCandidate"],function(e,l,t,c,n,i,r){var u=t.isContentEditableFalse,o=i.findNode,s=e.curry;function d(e,t){return Math.abs(e.left-t)}function h(e,t){return Math.abs(e.right-t)}function f(e,r){function o(e,t){return e>=t.left&&e<=t.right}return l.reduce(e,function(e,t){var n,i;return n=Math.min(d(e,r),h(e,r)),i=Math.min(d(t,r),h(t,r)),o(r,t)?t:o(r,e)?e:i==n&&u(t.node)?t:i<n?t:e})}function a(e,t,n,i){for(;i=o(i,e,r.isEditableCaretCandidate,t);)if(n(i))return}function p(e,i){var r=[];function t(t,e){var n;return n=l.filter(c.getClientRects(e),function(e){return!t(e,i)}),r=r.concat(n),0===n.length}return r.push(i),a(-1,e,s(t,n.isAbove),i.node),a(1,e,s(t,n.isBelow),i.node),r}return{findClosestClientRect:f,findLineNodeRects:p,closestCaret:function(e,t,n){var i,r,o,s,a;return i=c.getClientRects((o=e,l.filter(l.toArray(o.getElementsByTagName("*")),u))),(r=f(i=l.filter(i,function(e){return n>=e.top&&n<=e.bottom}),t))&&(r=f(p(e,r),t))&&u(r.node)?(a=t,{node:(s=r).node,before:d(s,a)<h(s,a)}):null}}}),e("tinymce/dom/MousePosition",[],function(){var c=function(e){var t,n,i,r;return r=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}};return{calc:function(e,t){return n=(a=e).inline?c(a.getBody()):{left:0,top:0},s=(o=e).getBody(),i=o.inline?{left:s.scrollLeft,top:s.scrollTop}:{left:0,top:0},{pageX:(r=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,i,r,o,s,a=c(e.getContentAreaContainer()),l=(i=(n=e).getBody(),r=n.getDoc().documentElement,o={left:i.scrollLeft,top:i.scrollTop},s={left:i.scrollLeft||r.scrollLeft,top:i.scrollTop||r.scrollTop},n.inline?o:s);return{left:t.pageX-a.left+l.left,top:t.pageY-a.top+l.top}}(e,t)).left-n.left+i.left,pageY:r.top-n.top+i.top};var n,i,r,o,s,a}}}),e("tinymce/DragDropOverrides",["tinymce/dom/NodeType","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/Delay","tinymce/dom/DOMUtils","tinymce/dom/MousePosition"],function(e,c,u,d,h,y){var f=e.isContentEditableFalse,p=e.isContentEditableTrue,m=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},b=function(a,l){return function(e){if(0===e.button){var t=c.find(l.dom.getParents(e.target),u.or(f,p));if(o=l.getBody(),f(s=t)&&s!==o){var n=l.dom.getPos(t),i=l.getBody(),r=l.getDoc().documentElement;a.element=t,a.screenX=e.screenX,a.screenY=e.screenY,a.maxX=(l.inline?i.scrollWidth:r.offsetWidth)-2,a.maxY=(l.inline?i.scrollHeight:r.offsetHeight)-2,a.relX=e.pageX-n.x,a.relY=e.pageY-n.y,a.width=t.offsetWidth,a.height=t.offsetHeight,a.ghost=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}(l,t,a.width,a.height)}}var o,s}},_=function(u,d){return function(e){if(u.dragging&&(l=(o=d).selection,c=l.getSel().getRangeAt(0).startContainer,s=3===c.nodeType?c.parentNode:c,a=u.element,s!==a&&!o.dom.isChildOf(s,a)&&!f(s))){var t=(i=u.element,(r=i.cloneNode(!0)).removeAttribute("data-mce-selected"),r),n=d.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,d.undoManager.transact(function(){m(u.element),d.insertContent(d.dom.getOuterHTML(t)),d._selectionOverrides.hideFakeCaret()}))}var i,r,o,s,a,l,c;x(u)}},x=function(e){e.dragging=!1,e.element=null,m(e.ghost)},t=function(e){var t,n,i,r,o,s,m,g,v,a,l,c={};t=h.DOM,s=document,n=b(c,e),m=c,g=e,v=d.throttle(function(e,t){g._selectionOverrides.hideFakeCaret(),g.selection.placeCaretAt(e,t)},0),i=function(e){var t,n,i,r,o,s,a,l,c,u,d,h,f=Math.max(Math.abs(e.screenX-m.screenX),Math.abs(e.screenY-m.screenY));if(m.element&&!m.dragging&&10<f){if(g.fire("dragstart",{target:m.element}).isDefaultPrevented())return;m.dragging=!0,g.focus()}if(m.dragging){var p=(d=m,{pageX:(h=y.calc(g,e)).pageX-d.relX,pageY:h.pageY+5});c=m.ghost,u=g.getBody(),c.parentNode!==u&&u.appendChild(c),t=m.ghost,n=p,i=m.width,r=m.height,o=m.maxX,s=m.maxY,l=a=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+i>o&&(a=n.pageX+i-o),n.pageY+r>s&&(l=n.pageY+r-s),t.style.width=i-a+"px",t.style.height=r-l+"px",v(e.clientX,e.clientY)}},r=_(c,e),a=c,o=function(){x(a),a.dragging&&l.fire("dragend")},(l=e).on("mousedown",n),e.on("mousemove",i),e.on("mouseup",r),t.bind(s,"mousemove",i),t.bind(s,"mouseup",o),e.on("remove",function(){t.unbind(s,"mousemove",i),t.unbind(s,"mouseup",o)})};return{init:function(e){var n;t(e),(n=e).on("drop",function(e){var t=void 0!==e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(f(t)||f(n.dom.getContentEditableParent(t)))&&e.preventDefault()})}}}),e("tinymce/SelectionOverrides",["tinymce/Env","tinymce/caret/CaretWalker","tinymce/caret/CaretPosition","tinymce/caret/CaretContainer","tinymce/caret/CaretUtils","tinymce/caret/FakeCaret","tinymce/caret/LineWalker","tinymce/caret/LineUtils","tinymce/dom/NodeType","tinymce/dom/RangeUtils","tinymce/geom/ClientRect","tinymce/util/VK","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Delay","tinymce/DragDropOverrides"],function(L,H,F,z,h,a,j,W,U,e,q,V,$,K,J,Y){var X=$.curry,Q=U.isContentEditableTrue,G=U.isContentEditableFalse,Z=U.isElement,ee=h.isAfterContentEditableFalse,te=h.isBeforeContentEditableFalse,ne=e.getSelectedNode;function ie(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}return function(f){var p,e,t,m=f.getBody(),l=new H(m),g=X(ie,l.next),v=X(ie,l.prev),i=new a(f.getBody(),_),y="sel-"+f.dom.uniqueId(),b=f.$;function _(e){return f.dom.isBlock(e)}function x(e){e&&f.selection.setRng(e)}function w(){return f.selection.getRng()}function r(e,t){f.selection.scrollIntoView(e,t)}function C(e,t,n){return f.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r(t,-1===e),i.show(n,t))}function k(e){var t,n;return f.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?null:((n=(t=e).ownerDocument.createRange()).selectNode(t),n)}function T(e,t){return t=h.normalizeRange(e,m,t),-1==e?F.fromRangeStart(t):F.fromRangeEnd(t)}function o(e,t,n,i){var r,o,s,a,l,c,u,d;return!i.collapsed&&(r=ne(i),G(r))?C(e,r,-1==e):(l=i,a=z.isCaretContainerBlock(l.startContainer),n(o=T(e,i))?k(o.getNode(-1==e)):(o=t(o))?n(o)?C(e,o.getNode(-1==e),1==e):n(s=t(o))&&(c=o,u=s,!(d=h.isInSameBlock(c,u))&&U.isBr(c.getNode())||d)?C(e,s.getNode(-1==e),1==e):a?R(o.toRange()):null:a?i:null)}function s(e,t){var n,i,r;if(t.collapsed&&f.settings.forced_root_block){if(!(n=f.dom.getParent(t.startContainer,"PRE")))return;(1==e?g(F.fromRangeStart(t)):v(F.fromRangeStart(t)))||(r=f.dom.create(f.settings.forced_root_block),(!L.ie||11<=L.ie)&&(r.innerHTML='<br data-mce-bogus="1">'),i=r,1==e?f.$(n).after(i):f.$(n).before(i),f.selection.select(i,!0),f.selection.collapse())}}function S(e,t,n,i){var r;return(r=o(e,t,n,i))?r:(r=s(e,i))||null}function E(e,t,n){var i;return(i=function(e,t,n){var i,r,o,s,a,l,c,u,d;if(d=ne(n),i=T(e,n),r=t(m,j.isAboveLine(1),i),o=K.filter(r,j.isLine(1)),a=K.last(i.getClientRects()),te(i)&&(d=i.getNode()),ee(i)&&(d=i.getNode(!0)),!a)return null;if(l=a.left,(s=W.findClosestClientRect(o,l))&&G(s.node))return c=Math.abs(l-s.left),u=Math.abs(l-s.right),C(e,s.node,c<u);if(d){var h=j.positionsUntil(e,m,j.isAboveLine(1),d);if(s=W.findClosestClientRect(K.filter(h,j.isLine(1)),l))return R(s.position.toRange());if(s=K.last(K.filter(h,j.isLine(0))))return R(s.position.toRange())}}(e,t,n))?i:(i=s(e,n))||null}function N(e){e.hasAttribute("data-mce-caret")&&(z.showCaretContainerBlock(e),x(w()),r(e[0]))}function D(e){var t,n;return e=h.normalizeRange(1,m,e),t=F.fromRangeStart(e),G(t.getNode())?C(1,t.getNode(),!t.isAtEnd()):G(t.getNode(!0))?C(1,t.getNode(!0),!1):(n=f.dom.getParent(t.getNode(),$.or(G,Q)),G(n)?C(1,n,!1):null)}function R(e){return e&&e.collapsed&&D(e)||e}function A(e){var t,n,i,r;return G(e)?(G(e.previousSibling)&&(i=e.previousSibling),(n=v(F.before(e)))||(t=g(F.after(e))),t&&Z(t.getNode())&&(r=t.getNode()),z.remove(e.previousSibling),z.remove(e.nextSibling),f.dom.remove(e),f.dom.isEmpty(f.getBody())?(f.setContent(""),void f.focus()):i?F.after(i).toRange():r?F.before(r).toRange():n?n.toRange():t?t.toRange():null):null}function c(e){var t=f.schema.getTextBlockElements();return e.nodeName in t}function u(e){return f.dom.isEmpty(e)}function d(e,t,n){var i,r,o,s,a=f.dom;if(i=a.getParent(t.getNode(),a.isBlock),r=a.getParent(n.getNode(),a.isBlock),-1===e){if(s=n.getNode(!0),ee(n)&&_(s))return c(i)?(u(i)&&a.remove(i),F.after(s).toRange()):A(n.getNode(!0))}else if(s=t.getNode(),te(t)&&_(s))return c(r)?(u(r)&&a.remove(r),F.before(s).toRange()):A(t.getNode());if(i===r||!c(i)||!c(r))return null;for(;o=i.firstChild;)r.appendChild(o);return f.dom.remove(i),n.toRange()}function P(e,t,n,i){var r,o,s,a;return!i.collapsed&&(r=ne(i),G(r))?R(A(r)):n(o=T(e,i))&&z.isCaretContainerBlock(i.startContainer)?(a=-1==e?l.prev(o):l.next(o))?R(a.toRange()):i:t(o)?R(A(o.getNode(-1==e))):t(s=-1==e?l.prev(o):l.next(o))?-1===e?d(e,o,s):d(e,s,o):void 0}function n(e){return z.isCaretContainer(e)||z.startsWithCaretContainer(e)||z.endsWithCaretContainer(e)}function M(e){return n(e.startContainer)||n(e.endContainer)}function I(e){var t,n,i,r,o,s,a,l,c,u,d=f.$,h=f.dom;if(!e)return null;if(e.collapsed){if(!M(e)){if(l=T(1,e),G(l.getNode()))return C(1,l.getNode(),!l.isAtEnd());if(G(l.getNode(!0)))return C(1,l.getNode(!0),!1)}return null}return r=e.startContainer,o=e.startOffset,s=e.endOffset,3==r.nodeType&&0==o&&G(r.parentNode)&&(r=r.parentNode,o=h.nodeIndex(r),r=r.parentNode),1!=r.nodeType?null:(s==o+1&&(t=r.childNodes[o]),G(t)?(c=u=t.cloneNode(!0),(a=f.fire("ObjectSelected",{target:t,targetClone:c})).isDefaultPrevented()?null:(c=a.targetClone,0===(n=d("#"+y)).length&&(n=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",y)).appendTo(f.getBody()),e=f.dom.createRng(),c===u&&L.ie?(n.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(c),e.setStartAfter(n[0].firstChild.firstChild),e.setEndAfter(c)):(n.empty().append(" ").append(c).append(" "),e.setStart(n[0].firstChild,1),e.setEnd(n[0].lastChild,0)),n.css({top:h.getPos(t,f.getBody()).y}),n[0].focus(),(i=f.selection.getSel()).removeAllRanges(),i.addRange(e),f.$("*[data-mce-selected]").removeAttr("data-mce-selected"),t.setAttribute("data-mce-selected",1),p=t,B(),e)):null)}function O(){p&&(p.removeAttribute("data-mce-selected"),f.$("#"+y).remove(),p=null)}function B(){i.hide()}return L.ceFalse&&(function(){var n=X(S,1,g,te),i=X(S,-1,v,ee),r=X(P,1,te,ee),o=X(P,-1,ee,te),s=X(E,-1,j.upUntil),a=X(E,1,j.downUntil);function l(e,t){if(!1===e.isDefaultPrevented()){var n=t(w());n&&(e.preventDefault(),x(n))}}function c(e){for(var t=f.getBody();e&&e!=t;){if(Q(e)||G(e))return e;e=e.parentNode}return null}f.on("mouseup",function(){var e=w();e.collapsed&&x(D(e))}),f.on("click",function(e){var t;(t=c(e.target))&&(G(t)&&(e.preventDefault(),f.focus()),Q(t)&&f.dom.isChildOf(t,f.selection.getNode())&&O())}),f.on("blur NewBlock",function(){O(),B()});var e,u,d=function(e,t){var n,i,r=f.dom.getParent(e,f.dom.isBlock),o=f.dom.getParent(t,f.dom.isBlock);return r&&(n=r,i=o,!(f.dom.getParent(n,f.dom.isBlock)===f.dom.getParent(i,f.dom.isBlock)))&&function(e){var t=new H(e);if(!e.firstChild)return!1;var n=F.before(e.firstChild),i=t.next(n);return i&&!te(i)&&!ee(i)}(r)};function h(){var e,t=c(f.selection.getNode());Q(t)&&_(t)&&f.dom.isEmpty(t)&&(e=f.dom.create("br",{"data-mce-bogus":"1"}),f.$(t).empty().append(e),f.selection.setRng(F.before(e).toRange()))}function t(e){var t=b("*[data-mce-caret]")[0];if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void N(t)):void(z.hasContent(t)&&N(t))}u=!1,(e=f).on("touchstart",function(){u=!1}),e.on("touchmove",function(){u=!0}),e.on("touchend",function(e){var t=c(e.target);G(t)&&(u||(e.preventDefault(),I(k(t))))}),f.on("mousedown",function(e){var t,n,i,r;if(t=c(e.target))G(t)?(e.preventDefault(),I(k(t))):(n=e.clientX,i=e.clientY,((r=f.selection.getRng()).collapsed||!K.reduce(r.getClientRects(),function(e,t){return e||q.containsXY(t,n,i)},!1))&&f.selection.placeCaretAt(e.clientX,e.clientY));else{O(),B();var o=W.closestCaret(m,e.clientX,e.clientY);o&&(d(e.target,o.node)||(e.preventDefault(),f.getBody().focus(),x(C(1,o.node,o.before))))}}),f.on("keydown",function(e){var t;if(!V.modifierPressed(e))switch(e.keyCode){case V.RIGHT:l(e,n);break;case V.DOWN:l(e,a);break;case V.LEFT:l(e,i);break;case V.UP:l(e,s);break;case V.DELETE:l(e,r);break;case V.BACKSPACE:l(e,o);break;default:!G(f.selection.getNode())||112<=(t=e).keyCode&&t.keyCode<=123||e.preventDefault()}}),f.on("keyup compositionstart",function(e){t(e),function(e){var t;switch(e.keyCode){case V.DELETE:case V.BACKSPACE:t=h()}t&&e.preventDefault()}(e)},!0),f.on("cut",function(){var e=f.selection.getNode();G(e)&&J.setEditorTimeout(f,function(){x(R(A(e)))})}),f.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),f.on("setSelectionRange",function(e){var t;(t=I(e.range))&&(e.range=t)}),f.on("AfterSetSelectionRange",function(e){var t,n=e.range;M(n)||B(),t=n.startContainer.parentNode,f.dom.hasClass(t,"mce-offscreen-selection")||O()}),f.on("focus",function(){J.setEditorTimeout(f,function(){f.selection.setRng(R(f.selection.getRng()))},0)}),f.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!L.ie){var i=(t=f.dom.get(y))?t.getElementsByTagName("*")[0]:t;i&&(e.preventDefault(),n.clearData(),n.setData("text/html",i.outerHTML),n.setData("text/plain",i.outerText))}}),Y.init(f)}(),e=f.contentStyles,t=".mce-content-body",e.push(i.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showBlockCaretContainer:N,hideFakeCaret:B,destroy:function(){i.destroy(),p=null}}}}),e("tinymce/util/Uuid",[],function(){var n=0;return{uuid:function(e){return e+n+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t}}}),e("tinymce/ui/Sidebar",[],function(){return{add:function(e,t,n){var i=e.sidebars?e.sidebars:[];i.push({name:t,settings:n}),e.sidebars=i}}}),e("tinymce/Editor",["tinymce/dom/DOMUtils","tinymce/dom/DomQuery","tinymce/AddOnManager","tinymce/NodeChange","tinymce/html/Node","tinymce/dom/Serializer","tinymce/html/Serializer","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/dom/ScriptLoader","tinymce/dom/EventUtils","tinymce/WindowManager","tinymce/NotificationManager","tinymce/html/Schema","tinymce/html/DomParser","tinymce/util/Quirks","tinymce/Env","tinymce/util/Tools","tinymce/util/Delay","tinymce/EditorObservable","tinymce/Mode","tinymce/Shortcuts","tinymce/EditorUpload","tinymce/SelectionOverrides","tinymce/util/Uuid","tinymce/ui/Sidebar","tinymce/ErrorReporter"],function(s,a,l,c,u,d,h,f,p,m,g,v,y,b,o,e,_,x,w,C,k,T,S,E,t,n,N,D,R,r,i,A){var P=s.DOM,M=l.ThemeManager,I=l.PluginManager,O=S.extend,B=S.each,L=S.explode,H=S.inArray,F=S.trim,z=S.resolve,j=e.Event,W=T.gecko,U=T.ie;function q(e,t,n){var i,r,o,s=this;i=s.documentBaseUrl=n.documentBaseURL,r=n.baseURI,o=n.defaultSettings,t=O({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,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,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:s.convertURL,url_converter_scope:s,ie7_compat:!0},o,t),o&&o.external_plugins&&t.external_plugins&&(t.external_plugins=O({},o.external_plugins,t.external_plugins)),s.settings=t,l.language=t.language||"en",l.languageLoad=t.language_load,l.baseURL=n.baseURL,s.id=t.id=e,s.setDirty(!1),s.plugins={},s.documentBaseURI=new b(t.document_base_url||i,{base_uri:r}),s.baseURI=r,s.contentCSS=[],s.contentStyles=[],s.shortcuts=new N(s),s.loadedCSS={},s.editorCommands=new y(s),s.suffix=n.suffix,s.editorManager=n,s.inline=t.inline,s.settings.content_editable=s.inline,t.cache_suffix&&(T.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(T.overrideViewPort=!1),n.fire("SetupEditor",s),s.execCallback("setup",s),s.$=a.overrideDefaults(function(){return{context:s.inline?s.getBody():s.getDoc(),element:s.getBody()}})}return O(q.prototype={render:function(){var n=this,i=n.settings,e=n.id,r=n.suffix;if(j.domLoaded){if(n.getElement()&&T.contentEditable){i.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var t=n.getElement().form||P.getParent(e,"form");t&&(n.formElement=t,i.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(P.insertAfter(P.create("input",{type:"hidden",name:e}),e),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},P.bind(t,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!i.submit_patch||t.submit.nodeType||t.submit.length||t._mceOldSubmit||(t._mceOldSubmit=t.submit,t.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),t._mceOldSubmit(t)})),n.windowManager=new _(n),n.notificationManager=new x(n),"xml"==i.encoding&&n.on("GetContent",function(e){e.save&&(e.content=P.encode(e.content))}),i.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),i.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),function(){var e=o.ScriptLoader;if(i.language&&"en"!=i.language&&!i.language_url&&(i.language_url=n.editorManager.baseURL+"/langs/"+i.language+".js"),i.language_url&&e.add(i.language_url),i.theme&&"function"!=typeof i.theme&&"-"!=i.theme.charAt(0)&&!M.urls[i.theme]){var t=i.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+i.theme+"/theme"+r+".js",M.load(i.theme,t)}S.isArray(i.plugins)&&(i.plugins=i.plugins.join(" ")),B(i.external_plugins,function(e,t){I.load(t,e),i.plugins+=" "+t}),B(i.plugins.split(/[ ,]/),function(e){if((e=F(e))&&!I.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=I.dependencies(e);B(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=I.createUrl(t,e),I.load(e.resource,e)})}else I.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"})}),e.loadQueue(function(){n.removed||n.init()},n,function(e){A.pluginLoadError(n,e[0]),n.removed||n.init()})}()}}else P.bind(window,"ready",function e(){P.unbind(window,"ready",e),n.render()})},init:function(){var e,t,n,i,r,o,s,a,l,c,u,d=this,h=d.settings,f=d.getElement(),p=[];if(d.rtl=h.rtl_ui||d.editorManager.i18n.rtl,d.editorManager.i18n.setCode(h.language),h.aria_label=h.aria_label||P.getAttrib(f,"aria-label",d.getLang("aria.rich_text_area")),d.fire("ScriptsLoaded"),h.theme&&("function"!=typeof h.theme?(h.theme=h.theme.replace(/-/,""),o=M.get(h.theme),d.theme=new o(d,M.urls[h.theme]),d.theme.init&&d.theme.init(d,M.urls[h.theme]||d.documentBaseUrl.replace(/\/$/,""),d.$)):d.theme=h.theme),B(h.plugins.replace(/\-/g,"").split(/[ ,]/),function t(e){var n,i,r=I.get(e);if(n=I.urls[e]||d.documentBaseUrl.replace(/\/$/,""),e=F(e),r&&-1===H(p,e)){if(B(I.dependencies(e),function(e){t(e)}),d.plugins[e])return;i=new r(d,n,d.$),(d.plugins[e]=i).init&&(i.init(d,n),p.push(e))}}),h.render_ui&&d.theme&&(d.orgDisplay=f.style.display,"function"!=typeof h.theme?(e=h.width||f.style.width||f.offsetWidth,t=h.height||f.style.height||f.offsetHeight,n=h.min_height||100,(c=/^[0-9\.]+(|px)$/i).test(""+e)&&(e=Math.max(parseInt(e,10),100)),c.test(""+t)&&(t=Math.max(parseInt(t,10),n)),r=d.theme.renderUI({targetNode:f,width:e,height:t,deltaWidth:h.delta_width,deltaHeight:h.delta_height}),h.content_editable||(t=(r.iframeHeight||t)+("number"==typeof t?r.deltaHeight||0:""))<n&&(t=n)):((r=h.theme(d,f)).editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||d.id+"_parent"),r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||d.id+"_iframecontainer"),t=r.iframeHeight||f.offsetHeight),d.editorContainer=r.editorContainer),h.content_css&&B(L(h.content_css),function(e){d.contentCSS.push(d.documentBaseURI.toAbsolute(e))}),h.content_style&&d.contentStyles.push(h.content_style),h.content_editable)return f=i=r=null,d.initContentBody();if(d.iframeHTML=h.doctype+"<html><head>",h.document_base_url!=d.documentBaseUrl&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),!T.caretAfter&&h.ie7_compat&&(d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(u=0;u<d.contentCSS.length;u++){var m=d.contentCSS[u];d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+S._addCacheSuffix(m)+'" />',d.loadedCSS[m]=!0}-1!=(a=h.body_id||"tinymce").indexOf("=")&&(a=(a=d.getParam("body_id","","hash"))[d.id]||a),-1!=(l=h.body_class||"").indexOf("=")&&(l=(l=d.getParam("body_class","","hash"))[d.id]||""),h.content_security_policy&&(d.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+h.content_security_policy+'" />'),d.iframeHTML+='</head><body id="'+a+'" class="mce-content-body '+l+'" data-id="'+d.id+'"><br></body></html>';var g='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&T.ie&&T.ie<12&&(s=g);var v=P.create("iframe",{id:d.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:d.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:t,display:"block"}});if(v.onload=function(){v.onload=null,d.fire("load")},P.setAttrib(v,"src",s||'javascript:""'),d.contentAreaContainer=r.iframeContainer,d.iframeElement=v,i=P.add(r.iframeContainer,v),U)try{d.getDoc()}catch(e){i.src=s=g}r.editorContainer&&(P.get(r.editorContainer).style.display=d.orgDisplay,d.hidden=P.isHidden(r.editorContainer)),d.getElement().style.display="none",P.setAttrib(d.id,"aria-hidden",!0),s||d.initContentBody(),f=i=r=null},initContentBody:function(e){var t,n,a=this,i=a.settings,r=a.getElement(),o=a.getDoc();i.inline||(a.getElement().style.visibility=a.orgVisibility),e||i.content_editable||(o.open(),o.write(a.iframeHTML),o.close()),i.content_editable&&(a.on("remove",function(){var e=this.getBody();P.removeClass(e,"mce-content-body"),P.removeClass(e,"mce-edit-focus"),P.setAttrib(e,"contentEditable",null)}),P.addClass(r,"mce-content-body"),a.contentDocument=o=i.content_document||document,a.contentWindow=i.content_window||window,a.bodyElement=r,i.content_document=i.content_window=null,i.root_name=r.nodeName.toLowerCase()),(t=a.getBody()).disabled=!0,a.readonly=i.readonly,a.readonly||(a.inline&&"static"==P.getStyle(t,"position",!0)&&(t.style.position="relative"),t.contentEditable=a.getParam("content_editable_state",!0)),t.disabled=!1,a.editorUpload=new D(a),a.schema=new w(i),a.dom=new s(o,{keep_values:!0,url_converter:a.convertURL,url_converter_scope:a,hex_colors:i.force_hex_style_colors,class_filter:i.class_filter,update_styles:!0,root_element:a.inline?a.getBody():null,collect:i.content_editable,schema:a.schema,onSetAttrib:function(e){a.fire("SetAttrib",e)}}),a.parser=new C(i,a.schema),a.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,i,r,o=e.length,s=a.dom;o--;)if(i=(n=e[o]).attr(t),r="data-mce-"+t,!n.attributes.map[r]){if(0===i.indexOf("data:")||0===i.indexOf("blob:"))continue;"style"===t?((i=s.serializeStyle(s.parseStyle(i),n.name)).length||(i=null),n.attr(r,i),n.attr(t,i)):"tabindex"===t?(n.attr(r,i),n.attr(t,null)):n.attr(r,a.convertURL(i,t,n.name))}}),a.parser.addNodeFilter("script",function(e){for(var t,n,i=e.length;i--;)0!==(n=(t=e[i]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),a.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),a.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,i=a.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(i)&&0===t.getAll("br").length&&(t.append(new u("br",1)).shortEnded=!0)}),a.serializer=new d(i,a),a.selection=new f(a.dom,a.getWin(),a.serializer,a),a.formatter=new p(a),a.undoManager=new m(a),a.forceBlocks=new v(a),a.enterKey=new g(a),a._nodeChangeDispatcher=new c(a),a._selectionOverrides=new R(a),a.fire("PreInit"),i.browser_spellcheck||i.gecko_spellcheck||(o.body.spellcheck=!1,P.setAttrib(t,"spellcheck","false")),a.quirks=new k(a),a.fire("PostRender"),i.directionality&&(t.dir=i.directionality),i.nowrap&&(t.style.whiteSpace="nowrap"),i.protect&&a.on("BeforeSetContent",function(t){B(i.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),a.on("SetContent",function(){a.addVisual(a.getBody())}),i.padd_empty_editor&&a.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|<br \/>|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),a.load({initial:!0,format:"html"}),a.startContent=a.getContent({format:"raw"}),a.initialized=!0,a.bindPendingEventDelegates(),a.fire("init"),a.focus(!0),a.nodeChanged({initial:!0}),a.execCallback("init_instance_callback",a),a.on("compositionstart compositionend",function(e){a.composing="compositionstart"===e.type}),0<a.contentStyles.length&&(n="",B(a.contentStyles,function(e){n+=e+"\r\n"}),a.dom.addStyle(n)),B(a.contentCSS,function(e){a.loadedCSS[e]||(a.dom.loadCSS(e),a.loadedCSS[e]=!0)}),i.auto_focus&&E.setEditorTimeout(a,function(){var e;(e=!0===i.auto_focus?a:a.editorManager.get(i.auto_focus)).destroyed||e.focus()},100),r=o=t=null},focus:function(e){var t,n,i,r,o=this,s=o.selection,a=o.settings.content_editable,l=o.getDoc(),c=o.getBody();if(!e){if((t=s.getRng()).item&&(n=t.item(0)),o.quirks.refreshContentEditable(),r=s.getNode(),i=o.dom.getParent(r,function(e){return"true"===o.dom.getContentEditable(e)}),o.$.contains(c,i))return i.focus(),s.normalize(),void o.editorManager.setActive(o);if(a||(T.opera||o.getBody().focus(),o.getWin().focus()),W||a){if(c.setActive)try{c.setActive()}catch(e){c.focus()}else c.focus();a&&s.normalize()}n&&n.ownerDocument==l&&((t=l.body.createControlRange()).addElement(n),t.select())}o.editorManager.setActive(o)},execCallback:function(e){var t,n=this.settings[e];if(n)return this.callbackLookup&&(t=this.callbackLookup[e])&&(n=t.func,t=t.scope),"string"==typeof n&&(t=(t=n.replace(/\.\w+$/,""))?z(t):0,n=z(n),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:n,scope:t}),n.apply(t||this,Array.prototype.slice.call(arguments,1))},translate:function(e){var n=this.settings.language||"en",i=this.editorManager.i18n;return e?(e=i.data[n+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,t){return i.data[n+"."+t]||"{#"+t+"}"}),this.editorManager.translate(e)):""},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==ye?t:"{#"+e+"}")},getParam:function(e,t,n){var i,r=e in this.settings?this.settings[e]:t;return"hash"===n?(i={},"string"==typeof r?B(0<r.indexOf("=")?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){1<(e=e.split("=")).length?i[F(e[0])]=F(e[1]):i[F(e[0])]=F(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return i.add(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n,i=this;i.contextToolbars=i.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return i.dom.is(e,n)}),i.contextToolbars.push({id:r.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,i){this.shortcuts.add(e,t,n,i)},execCommand:function(e,t,n,i){return this.editorCommands.execCommand(e,t,n,i)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(P.show(this.getContainer()),P.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(U&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(P.hide(e.getContainer()),P.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();if(n)return(e=e||{}).load=!0,t=this.setContent(n.value!==ye?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t},save:function(e){var t,n,i=this,r=i.getElement();if(r&&i.initialized)return(e=e||{}).save=!0,e.element=r,e.content=i.getContent(e),e.no_events||i.fire("SaveContent",e),"raw"==e.format&&i.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(r.nodeName)?r.value=t:(i.inline||(r.innerHTML=t),(n=P.getParent(i.id,"form"))&&B(n.elements,function(e){if(e.name==i.id)return e.value=t,!1})),e.element=r=null,!1!==e.set_dirty&&i.setDirty(!1),t},setContent:function(e,t){var n,i,r=this,o=r.getBody();return(t=t||{}).format=t.format||"html",t.set=!0,t.content=e,t.no_events||r.fire("BeforeSetContent",t),0===(e=t.content).length||/^\s+$/.test(e)?(i=U&&U<11?"":'<br data-mce-bogus="1">',"TABLE"==o.nodeName?e="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(o.nodeName)&&(e="<li>"+i+"</li>"),(n=r.settings.forced_root_block)&&r.schema.isValidChild(o.nodeName.toLowerCase(),n.toLowerCase())?(e=i,e=r.dom.createHTML(n,r.settings.forced_root_block_attrs,e)):U||e||(e='<br data-mce-bogus="1">'),r.dom.setHTML(o,e),r.fire("SetContent",t)):("raw"!==t.format&&(e=new h({validate:r.validate},r.schema).serialize(r.parser.parse(e,{isRootContent:!0}))),t.content=F(e),r.dom.setHTML(o,t.content),t.no_events||r.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this.getBody();return(e=e||{}).format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||this.fire("BeforeGetContent",e),t="raw"==e.format?S.trim(this.serializer.getTrimmedContent()):"text"==e.format?n.innerText||n.textContent:this.serializer.serialize(n,e),"text"!=e.format?e.content=F(t):e.content=t,e.no_events||this.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=O({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){n.setMode(this,e)},getContainer:function(){return this.container||(this.container=P.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=P.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var i=this.settings;return i.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n,i=this,r=i.settings,o=i.dom;e=e||i.getBody(),i.hasVisual===ye&&(i.hasVisual=r.visual),B(o.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=r.visual_table_class||"mce-item-table",void((t=o.getAttrib(e,"border"))&&"0"!=t||!i.hasVisual?o.removeClass(e,n):o.addClass(e,n));case"A":return void(o.getAttrib(e,"href",!1)||(t=o.getAttrib(e,"name")||e.id,n=r.visual_anchor_class||"mce-item-anchor",t&&i.hasVisual?o.addClass(e,n):o.removeClass(e,n)))}}),i.fire("VisualAid",{element:e,hasVisual:i.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&P.remove(e.getElement().nextSibling),e.inline||(U&&U<10&&e.getDoc().execCommand("SelectAll",!1,null),P.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),P.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t,n=this;n.destroyed||(e||n.removed?(e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),(t=n.formElement)&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),P.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1):n.remove())},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},t),q}),e("tinymce/util/I18n",["tinymce/util/Tools"],function(s){var a={},l="en";return{setCode:function(e){e&&(l=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return l},rtl:!1,add:function(e,t){var n=a[e];for(var i in n||(a[e]=n={}),t)n[i]=t[i];this.setCode(e)},translate:function(e){var t=a[l]||{};function n(e){return s.is(e,"function")?Object.prototype.toString.call(e):i(e)?"":""+e}function i(e){return""===e||null===e||s.is(e,"undefined")}function r(e){return e=n(e),s.hasOwn(t,e)?n(t[e]):e}if(i(e))return"";if(s.is(e,"object")&&s.hasOwn(e,"raw"))return n(e.raw);if(s.is(e,"array")){var o=e.slice(1);e=r(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return s.hasOwn(o,t)?n(o[t]):e})}return r(e).replace(/{context:\w+}$/,"")},data:a}}),e("tinymce/FocusManager",["tinymce/dom/DOMUtils","tinymce/util/Delay","tinymce/Env"],function(e,t,i){var r,a,l,c=e.DOM,u=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==c.getParent(e,function(e){return o.isEditorUIElement(e)||!!n&&t.dom.is(e,n)})};function o(s){function n(){try{return document.activeElement}catch(e){return document.body}}s.on("AddEditor",function(e){var o=e.editor;o.on("init",function(){(o.inline||i.ie)&&("onbeforedeactivate"in document&&i.ie<9?o.dom.bind(o.getBody(),"beforedeactivate",function(e){if(e.target==o.getBody())try{o.lastRng=o.selection.getRng()}catch(e){}}):o.on("nodechange mouseup keyup",function(e){var t=n();"nodechange"==e.type&&e.selectionChange||(t&&t.id==o.id+"_ifr"&&(t=o.getBody()),o.dom.isChildOf(t,o.getBody())&&(o.lastRng=o.selection.getRng()))}),i.webkit&&!r&&(r=function(){var e=s.activeEditor;if(e&&e.selection){var t=e.selection.getRng();t&&!t.collapsed&&(o.lastRng=t)}},c.bind(document,"selectionchange",r)))}),o.on("setcontent",function(){o.lastRng=null}),o.on("mousedown",function(){o.selection.lastFocusBookmark=null}),o.on("focusin",function(){var e,t,n,i,r=s.focusedEditor;o.selection.lastFocusBookmark&&((n=(t=o).selection.lastFocusBookmark).startContainer?((i=t.getDoc().createRange()).setStart(n.startContainer,n.startOffset),i.setEnd(n.endContainer,n.endOffset)):i=n,e=i,o.selection.lastFocusBookmark=null,o.selection.setRng(e)),r!=o&&(r&&r.fire("blur",{focusedEditor:o}),s.setActive(o),(s.focusedEditor=o).fire("focus",{blurredEditor:r}),o.focus(!0)),o.lastRng=null}),o.on("focusout",function(){t.setEditorTimeout(o,function(){var e=s.focusedEditor;u(o,n())||e!=o||(o.fire("blur",{focusedEditor:null}),s.focusedEditor=null,o.selection&&(o.selection.lastFocusBookmark=null))})}),a||(a=function(e){var t,n=s.activeEditor;t=e.target,n&&t.ownerDocument==document&&(n.selection&&t!=n.getBody()&&(n.selection.lastFocusBookmark=function(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}(n.dom,n.lastRng)),t==document.body||u(n,t)||s.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),s.focusedEditor=null))},c.bind(document,"focusin",a)),o.inline&&!l&&(l=function(e){var t=s.activeEditor,n=t.dom;if(t.inline&&n&&!n.isChildOf(e.target,t.getBody())){var i=t.selection.getRng();i.collapsed||(t.lastRng=i)}},c.bind(document,"mouseup",l))}),s.on("RemoveEditor",function(e){s.focusedEditor==e.editor&&(s.focusedEditor=null),s.activeEditor||(c.unbind(document,"selectionchange",r),c.unbind(document,"focusin",a),c.unbind(document,"mouseup",l),r=a=l=null)})}return o.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},o._isUIElement=u,o}),e("tinymce/EditorManager",["tinymce/Editor","tinymce/dom/DomQuery","tinymce/dom/DOMUtils","tinymce/util/URI","tinymce/Env","tinymce/util/Tools","tinymce/util/Promise","tinymce/util/Observable","tinymce/util/I18n","tinymce/FocusManager","tinymce/AddOnManager"],function(f,p,e,l,t,m,r,n,i,c,o){var s,a,g=e.DOM,v=m.explode,y=m.each,b=m.extend,_=0,u=!1;function d(t){y(a.editors,function(e){"scroll"===t.type?e.fire("ScrollWindow",t):e.fire("ResizeWindow",t)})}function h(e,t){t!==u&&(t?p(window).on("resize scroll",d):p(window).off("resize scroll",d),u=t)}function x(e){var t,n=a.editors;delete n[e.id];for(var i=0;i<n.length;i++)if(n[i]==e){n.splice(i,1),t=!0;break}return a.activeEditor==e&&(a.activeEditor=n[0]),a.focusedEditor==e&&(a.focusedEditor=null),t}return b(a={$:p,majorVersion:"4",minorVersion:"5.8",releaseDate:"2017-10-05",editors:[],i18n:i,activeEditor:null,setup:function(){var e,t,n,i,r="";if(t=l.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,r=n.suffix;else{for(var o=document.getElementsByTagName("script"),s=0;s<o.length;s++){var a=(i=o[s].src).substring(i.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(i)){-1!=a.indexOf(".min")&&(r=".min"),e=i.substring(0,i.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!=(i=document.currentScript.src).indexOf(".min")&&(r=".min"),e=i.substring(0,i.lastIndexOf("/")))}this.baseURL=new l(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new l(this.baseURL),this.suffix=r,this.focusManager=new c(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new l(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new l(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n);var i=(this.defaultSettings=e).plugin_base_urls;for(var r in i)o.PluginManager.urls[r]=i[r]},init:function(l){var n,c,u=this;function d(e){var t=e.id;return t||(t=(t=e.name)&&!g.get(t)?e.name:g.uniqueId(),e.setAttribute("id",t)),t}function i(e,t){return t.constructor===RegExp?t.test(e.className):g.hasClass(e,t)}c=m.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var h=function(e){n=e};return u.settings=l,g.bind(window,"ready",function e(){var r,o=0,s=[];function a(e,t,n){var i=new f(e,t,u);s.push(i),i.on("init",function(){++o===r.length&&h(s)}),i.targetElm=i.targetElm||n,i.render()}g.unbind(window,"ready",e),function(e){var t=l[e];t&&t.apply(u,Array.prototype.slice.call(arguments,2))}("onpageload"),r=p.unique(function(t){var e,n=[];if(t.types)return y(t.types,function(e){n=n.concat(g.select(e.selector))}),n;if(t.selector)return g.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&y(v(e),function(t){var e;(e=g.get(t))?n.push(e):y(document.forms,function(e){y(e.elements,function(e){e.name===t&&(t="mce_editor_"+_++,g.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":y(g.select("textarea"),function(e){t.editor_deselector&&i(e,t.editor_deselector)||t.editor_selector&&!i(e,t.editor_selector)||n.push(e)})}return n}(l)),l.types?y(l.types,function(t){m.each(r,function(e){return!g.is(e,t.selector)||(a(d(e),b({},l,t),e),!1)})}):(m.each(r,function(e){var t;(t=u.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(x(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),r=m.grep(r,function(e){return!u.get(e.id)}),y(r,function(e){var t,n,i;i=e,l.inline&&i.tagName.toLowerCase()in c?(t="Could not initialize inline editor on invalid inline target element",n=e,window.console&&!window.test&&window.console.log(t,n)):a(d(e),l,e)}))}),new r(function(t){n?t(n):h=function(e){t(e)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),h(0,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),s||(s=function(){t.fire("BeforeUnload")},g.bind(window,"beforeunload",s)),e},createEditor:function(e,t){return this.add(new f(e,t,this))},remove:function(e){var t,n,i=this,r=i.editors;if(e)return"string"==typeof e?(e=e.selector||e,void y(g.select(e),function(e){(n=r[e.id])&&i.remove(n)})):r[(n=e).id]?(x(n)&&i.fire("RemoveEditor",{editor:n}),r.length||g.unbind(window,"beforeunload",s),n.remove(),h(0,0<r.length),n):null;for(t=r.length-1;0<=t;t--)i.remove(r[t])},execCommand:function(e,t,n){var i=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new f(n,this.settings,this).render(),!0;case"mceRemoveEditor":return i&&i.remove(),!0;case"mceToggleEditor":return i?i.isHidden()?i.show():i.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){y(this.editors,function(e){e.save()})},addI18n:function(e,t){i.add(e,t)},translate:function(e){return i.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}},n),a.setup(),window.tinymce=window.tinyMCE=a,a}),e("tinymce/LegacyInput",["tinymce/EditorManager","tinymce/util/Tools"],function(e,t){var a=t.each,l=t.explode;e.on("AddEditor",function(e){var s=e.editor;s.on("preInit",function(){var t,n,i,r=s.settings;function o(n,e){a(e,function(e,t){e&&i.setStyle(n,t,e)}),i.rename(n,"span")}r.inline_styles&&(n=l(r.font_size_legacy_values),t={font:function(e,t){o(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:n[parseInt(t.size,10)-1]})},u:function(e,t){"html4"===s.settings.schema&&o(t,{textDecoration:"underline"})},strike:function(e,t){o(t,{textDecoration:"line-through"})}},s.on("PreProcess SetContent",function(e){i=s.dom,r.convert_fonts_to_spans&&a(i.select("font,u,strike",e.node),function(e){t[e.nodeName.toLowerCase()](i,e)})}))})})}),e("tinymce/util/XHR",["tinymce/util/Observable","tinymce/util/Tools"],function(e,r){var o={send:function(e){var t,n=0;function i(){!e.async||4==t.readyState||1e4<n++?(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,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):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||"",o.fire("beforeInitialize",{settings:e}),t=new XMLHttpRequest){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&&r.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=o.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return i();setTimeout(i,10)}}};return r.extend(o,e),o}),e("tinymce/util/JSON",[],function(){return{serialize:function e(t,n){var i,r,o,s;if(n=n||'"',null===t)return"null";if("string"==(o=typeof t))return r="\bb\tt\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(i=r.indexOf(t))+1?"\\"+r.charAt(i+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"!=o)return""+t;if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(i=0,r="[";i<t.length;i++)r+=(0<i?",":"")+e(t[i],n);return r+"]"}for(s in r="{",t)t.hasOwnProperty(s)&&(r+="function"!=typeof t[s]?(1<r.length?","+n:n)+s+n+":"+e(t[s],n):"");return r+"}"},parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(e){}}}}),e("tinymce/util/JSONRequest",["tinymce/util/JSON","tinymce/util/XHR","tinymce/util/Tools"],function(o,e,t){var s=t.extend;function n(e){this.settings=s({},e),this.count=0}return n.sendRPC=function(e){return(new n).send(e)},n.prototype={send:function(n){var i=n.error,r=n.success;(n=s(this.settings,n)).success=function(e,t){void 0===(e=o.parse(e))&&(e={error:"JSON Parse error."}),e.error?i.call(n.error_scope||n.scope,e.error,t):r.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){i&&i.call(n.error_scope||n.scope,e,t)},n.data=o.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",e.send(n)}},n}),e("tinymce/util/JSONP",["tinymce/dom/DOMUtils"],function(e){return{callbacks:{},count:0,send:function(t){var n=this,i=e.DOM,r=t.count!==ye?t.count:n.count,o="tinymce_jsonp_"+r;n.callbacks[r]=function(e){i.remove(o),delete n.callbacks[r],t.callback(e)},i.add(i.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),n.count++}}}),e("tinymce/util/LocalStorage",[],function(){var t,s,a,n,l,c;try{if(window.localStorage)return localStorage}catch(e){}function u(){for(var e in n=[],a)n.push(e);t.length=n.length}function i(){var e,t="";if(c){for(var n in a)e=a[n],t+=(t?",":"")+n.length.toString(32)+","+n+","+e.length.toString(32)+","+e;s.setAttribute(l,t);try{s.save(l)}catch(e){}u()}}return l="tinymce",s=document.documentElement,(c=!!s.addBehavior)&&s.addBehavior("#default#userData"),t={key:function(e){return n[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,i()},removeItem:function(e){delete a[e],i()},clear:function(){a={},i()}},function(){var e,i,t,r=0;if(a={},c){s.load(l),i=s.getAttribute(l)||"";do{var n=o();if(null===n)break;if(null!==(e=o(parseInt(n,32)||0))){if(null===(n=o()))break;t=o(parseInt(n,32)||0),e&&(a[e]=t)}}while(null!==e);u()}function o(e){var t,n;return-1===(n=e!==ye?r+e:i.indexOf(",",r))||n>i.length?null:(t=i.substring(r,n),r=n+1,t)}}(),t}),e("tinymce/Compat",["tinymce/dom/DOMUtils","tinymce/dom/EventUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/util/Tools","tinymce/Env"],function(e,t,n,i,r,o){var s=window.tinymce;return s.DOM=e.DOM,s.ScriptLoader=n.ScriptLoader,s.PluginManager=i.PluginManager,s.ThemeManager=i.ThemeManager,s.dom=s.dom||{},s.dom.Event=t.Event,r.each("trim isArray is toArray makeMap each map grep inArray extend create walk createNS resolve explode _addCacheSuffix".split(" "),function(e){s[e]=r[e]}),r.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){s[e]=o[e.substr(2).toLowerCase()]}),{}}),e("tinymce/ui/Layout",["tinymce/util/Class","tinymce/util/Tools"],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,i,r,o=this.settings;t=o.firstControlClass,n=o.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(o.controlClass),e.visible()&&(i||(i=e),r=e)}),i&&i.classes.add(t),r&&r.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),e("tinymce/ui/AbsoluteLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),e("tinymce/ui/Button",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t=this._id,n=this.classPrefix,i=this.state.get("icon"),r=this.state.get("text"),o="";return e=(e=this.settings.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",r&&(this.classes.add("btn-has-text"),o='<span class="'+n+'txt">'+this.encode(r)+"</span>"),i=i?n+"ico "+n+"i-"+i:"",'<div id="'+t+'" class="'+this.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+o+"</button></div>"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(e){var t=n("span."+i,o.getEl());e?(t[0]||(n("button:first",o.getEl()).append('<span class="'+i+'"></span>'),t=n("span."+i,o.getEl())),t.html(o.encode(e))):t.remove(),o.classes.toggle("btn-has-text",!!e)}return o.state.on("change:text",function(e){s(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r==i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}})}),e("tinymce/ui/ButtonGroup",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this._layout;return this.classes.add("btn-group"),this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"}})}),e("tinymce/ui/Checkbox",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'" unselectable="on" aria-labelledby="'+e+'-al" tabindex="-1"><i class="'+t+"ico "+t+'i-checkbox"></i><span id="'+e+'-al" class="'+t+'label">'+this.encode(this.state.get("text"))+"</span></div>"},bindStates:function(){var o=this;function t(e){o.classes.toggle("checked",e),o.aria("checked",e)}return o.state.on("change:text",function(e){o.getEl("al").firstChild.data=o.translate(e.value)}),o.state.on("change:checked change:value",function(e){o.fire("change"),t(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;if(void 0===t)return o.settings.icon;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r==i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r)}),o.state.get("checked")&&t(!0),o._super()}})}),e("tinymce/ui/ComboBox",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/ui/DomUtils","tinymce/dom/DomQuery","tinymce/util/VK","tinymce/util/Tools"],function(e,o,l,c,i,n){return e.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(e){var t=e.target,n=r.getEl();if(c.contains(n,t)||t==n)for(;t&&t!=n;)t.id&&-1!=t.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),e.aria&&r.menu.items()[0].focus())),t=t.parentNode}),r.on("keydown",function(e){var t;13==e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),r.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),r.fire("submit",{data:t.toJSON()}))}),r.on("keyup",function(e){if("INPUT"==e.target.nodeName){var t=r.state.get("value"),n=e.target.value;n!==t&&(r.state.set("value",n),r.fire("autocomplete",e))}}),r.on("mouseover",function(e){var t=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==e.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"==i),t.classes.toggle("tooltip-nw","bc-tl"==i),t.classes.toggle("tooltip-ne","bc-tr"==i),t.moveRel(e.target,i)}})},statusLevel:function(e){return 0<arguments.length&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return 0<arguments.length&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=o.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()==t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"==e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this.getEl(),i=this.getEl("open"),r=this.layoutRect(),o=0,s=n.firstChild;this.statusLevel()&&"none"!==this.statusLevel()&&(o=parseInt(l.getRuntimeStyle(s,"padding-right"),10)-parseInt(l.getRuntimeStyle(s,"padding-left"),10)),e=i?r.w-l.getSize(i).width-10:r.w-10;var a=document;return a.all&&(!a.documentMode||a.documentMode<=8)&&(t=this.layoutRect().h-2+"px"),c(s).css({width:e-o,lineHeight:t}),this._super(),this},postRender:function(){var t=this;return c(this.getEl("inp")).on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)}),t._super()},renderHtml:function(){var e,t,n,i=this,r=i._id,o=i.settings,s=i.classPrefix,a=i.state.get("value")||"",l="",c="";return"spellcheck"in o&&(c+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(c+=' maxlength="'+o.maxLength+'"'),o.size&&(c+=' size="'+o.size+'"'),o.subtype&&(c+=' type="'+o.subtype+'"'),n='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',i.disabled()&&(c+=' disabled="disabled"'),(e=o.icon)&&"caret"!=e&&(e=s+"ico "+s+"i-"+o.icon),t=i.state.get("text"),(e||t)&&(l='<div id="'+r+'-open" class="'+s+"btn "+s+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=e?'<i class="'+e+'"></i>':'<i class="'+s+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",i.classes.add("has-open")),'<div id="'+r+'" class="'+i.classes+'"><input id="'+r+'-inp" class="'+s+'textbox" value="'+i.encode(a,!1)+'" hidefocus="1"'+c+' placeholder="'+i.encode(o.placeholder)+'" />'+n+l+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,i){var r=this;if(0!==e.length){r.menu?r.menu.items().remove():r.menu=o.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(r).renderTo(),n.each(e,function(e){var t,n;r.menu.add({text:e.title,url:e.previewUrl,match:i,classes:"menu-item-ellipsis",onclick:(t=e.value,n=e.title,function(){r.fire("selectitem",{title:n,value:t})})})}),r.menu.renderNew(),r.hideMenu(),r.menu.on("cancel",function(e){e.control.parent()===r.menu&&(e.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()});var t=r.layoutRect().w;r.menu.layoutRect({w:t,minW:0,maxW:t}),r.menu.reflow(),r.menu.show(),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else r.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var r=this;r.state.on("change:value",function(e){r.getEl("inp").value!=e.value&&(r.getEl("inp").value=e.value)}),r.state.on("change:disabled",function(e){r.getEl("inp").disabled=e.value}),r.state.on("change:statusLevel",function(e){var t=r.getEl("status"),n=r.classPrefix,i=e.value;l.css(t,"display","none"===i?"none":""),l.toggleClass(t,n+"i-checkmark","ok"===i),l.toggleClass(t,n+"i-warning","warn"===i),l.toggleClass(t,n+"i-error","error"===i),r.classes.toggle("has-status","none"!==i),r.repaint()}),l.on(r.getEl("status"),"mouseleave",function(){r.tooltip().hide()}),r.on("cancel",function(e){r.menu&&r.menu.visible()&&(e.stopPropagation(),r.hideMenu())});var n=function(e,t){t&&0<t.items().length&&t.items().eq(e)[0].focus()};return r.on("keydown",function(e){var t=e.keyCode;"INPUT"===e.target.nodeName&&(t===i.DOWN?(e.preventDefault(),r.fire("autocomplete"),n(0,r.menu)):t===i.UP&&(e.preventDefault(),n(-1,r.menu)))}),r._super()},remove:function(){c(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),e("tinymce/ui/ColorBox",["tinymce/ui/ComboBox"],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(e){}},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.state.get("rendered")&&t.repaintColor(e.value)}),t._super()}})}),e("tinymce/ui/PanelButton",["tinymce/ui/Button","tinymce/ui/FloatPanel"],function(e,i){return e.extend({showPanel:function(){var t=this,e=t.settings;if(t.active(!0),t.panel)t.panel.show();else{var n=e.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,t.panel=new i(n).on("hide",function(){t.active(!1)}).on("cancel",function(e){e.stopPropagation(),t.focus(),t.hidePanel()}).parent(t).renderTo(t.getContainerElm()),t.panel.fire("show"),t.panel.reflow()}t.panel.moveRel(t.getEl(),e.popoverAlign||(t.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var t=this;return t.aria("haspopup",!0),t.on("click",function(e){e.control===t&&(t.panel&&t.panel.visible()?t.hidePanel():(t.showPanel(),t.panel.focus(!!e.aria)))}),t._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),e("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(e,t){var i=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.state.get("text"),r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",s="";return i&&(e.classes.add("btn-has-text"),s='<span class="'+n+'txt">'+e.encode(i)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+s+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var t=this,n=t.settings.onclick;return t.on("click",function(e){e.aria&&"down"==e.aria.key||e.control!=t||i.getParent(e.target,"."+t.classPrefix+"open")||(e.stopImmediatePropagation(),n.call(t,e))}),delete t.settings.onclick,t._super()}})}),e("tinymce/util/Color",[],function(){var u=Math.min,d=Math.max,h=Math.round;return function(e){var n=this,a=0,l=0,c=0;function t(e){var t;return"object"==typeof e?"r"in e?(a=e.r,l=e.g,c=e.b):"v"in e&&function(e,t,n){var i,r,o,s;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=d(0,u(t,1)),n=d(0,u(n,1)),0!==t){switch(i=e/60,o=(r=n*t)*(1-Math.abs(i%2-1)),s=n-r,Math.floor(i)){case 0:a=r,l=o,c=0;break;case 1:a=o,l=r,c=0;break;case 2:a=0,l=r,c=o;break;case 3:a=0,l=o,c=r;break;case 4:a=o,l=0,c=r;break;case 5:a=r,l=0,c=o;break;default:a=l=c=0}a=h(255*(a+s)),l=h(255*(l+s)),c=h(255*(c+s))}else a=l=c=h(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(a=parseInt(t[1],10),l=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(a=parseInt(t[1],16),l=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(a=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),a=a<0?0:255<a?255:a,l=l<0?0:255<l?255:l,c=c<0?0:255<c?255:c,n}e&&t(e),n.toRgb=function(){return{r:a,g:l,b:c}},n.toHsv=function(){return e=a,t=l,n=c,r=0,(o=u(e/=255,u(t/=255,n/=255)))==(s=d(e,d(t,n)))?{h:0,s:0,v:100*(r=o)}:(i=(s-o)/s,{h:h(60*((e==o?3:n==o?1:5)-(e==o?t-n:n==o?e-t:n-e)/((r=s)-o))),s:h(100*i),v:h(100*r)});var e,t,n,i,r,o,s},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(a)+e(l)+e(c)},n.parse=t}}),e("tinymce/ui/ColorPicker",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils","tinymce/util/Color"],function(e,d,h,f){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var n,i,r,o,s,a=this,l=a.color();function c(e,t){var n,i,r=h.getPos(e);return n=t.pageX-r.x,i=t.pageY-r.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:i=Math.max(0,Math.min(i/e.clientHeight,1))}}function u(e,t){var n=(360-e.h)/360;h.css(r,{top:100*n+"%"}),t||h.css(s,{left:e.s+"%",top:100-e.v+"%"}),o.style.background=new f({s:100,v:100,h:e.h}).toHex(),a.color().parse({s:e.s,v:e.v,h:e.h})}function e(e){var t;t=c(o,e),n.s=100*t.x,n.v=100*(1-t.y),u(n),a.fire("change")}function t(e){var t;t=c(i,e),(n=l.toHsv()).h=360*(1-t.y),u(n,!0),a.fire("change")}i=a.getEl("h"),r=a.getEl("hp"),o=a.getEl("sv"),s=a.getEl("svp"),a._repaint=function(){u(n=l.toHsv())},a._super(),a._svdraghelper=new d(a._id+"-sv",{start:e,drag:e}),a._hdraghelper=new d(a._id+"-h",{start:t,drag:t}),a._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=new f),this._color},renderHtml:function(){var e,t=this._id,o=this.classPrefix,s="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+o+'colorpicker-h" style="'+("background: -ms-linear-gradient(top,"+s+");background: linear-gradient(to bottom,"+s+");")+'">'+function(){var e,t,n,i,r="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(i=s.split(",")).length-1;e<t;e++)r+='<div class="'+o+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+i[e]+",endColorstr="+i[e+1]+");-ms-"+n+i[e]+",endColorstr="+i[e+1]+')"></div>';return r}()+'<div id="'+t+'-hp" class="'+o+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+o+'colorpicker-sv"><div class="'+o+'colorpicker-overlay1"><div class="'+o+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+o+'colorpicker-selector1"><div class="'+o+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}})}),e("tinymce/ui/Path",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var n=this;e.delimiter||(e.delimiter="»"),n._super(e),n.classes.add("path"),n.canFocus=!0,n.on("click",function(e){var t;(t=e.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[t],index:t})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var t=this;return t.state.on("change:row",function(e){t.innerHtml(t._getDataPathHtml(e.value))}),t._super()},_getDataPathHtml:function(e){var t,n,i=e||[],r="",o=this.classPrefix;for(t=0,n=i.length;t<n;t++)r+=(0<t?'<div class="'+o+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(t==n-1?" "+o+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+i[t].name+"</div>";return r||(r='<div class="'+o+'path-item"> </div>'),r}})}),e("tinymce/ui/ElementPath",["tinymce/ui/Path"],function(e){return e.extend({postRender:function(){var o=this,s=o.settings.editor;function a(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==s.settings.elementpath&&(o.on("select",function(e){s.focus(),s.selection.select(this.row()[e.index].element),s.nodeChanged()}),s.on("nodeChange",function(e){for(var t=[],n=e.parents,i=n.length;i--;)if(1==n[i].nodeType&&!a(n[i])){var r=s.fire("ResolveName",{name:n[i].nodeName.toLowerCase(),target:n[i]});if(r.isDefaultPrevented()||t.push({name:r.name,element:n[i]}),r.isPropagationStopped())break}o.row(t)})),o._super()}})}),e("tinymce/ui/FormItem",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),e("tinymce/ui/Form",["tinymce/ui/Container","tinymce/ui/FormItem","tinymce/util/Tools"],function(e,r,o){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var i=this,e=i.items();i.settings.formItemDefaults||(i.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),e.each(function(e){var t,n=e.settings.label;n&&((t=new r(o.extend({items:{type:"label",id:e._id+"-l",text:n,flex:0,forId:e._id,disabled:e.disabled()}},i.settings.formItemDefaults))).type="formitem",e.aria("labelledby",e._id+"-l"),void 0===e.settings.flex&&(e.settings.flex=1),i.replace(e,t),t.add(e))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var n=this;function e(){var e,t,i=0,r=[];if(!1!==n.settings.labelGapCalc)for(("children"==n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;i=i<n?n:i,r.push(t)}),t=n.settings.labelGap||0,e=r.length;e--;)r[e].settings.minWidth=i+t}n._super(),n.on("show",e),e()}})}),e("tinymce/ui/FieldSet",["tinymce/ui/Form"],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),e("tinymce/content/LinkTargets",["tinymce/dom/DOMUtils","tinymce/util/Fun","tinymce/util/Arr","tinymce/util/Uuid","tinymce/util/Tools","tinymce/dom/NodeType"],function(i,r,o,s,e,n){var t=e.trim,a=function(e,t,n,i,r){return{type:e,title:t,url:n,level:i,attach:r}},l=function(e){return e.innerText||e.textContent},c=function(e){return(t=e)&&"A"===t.nodeName&&(t.id||t.name)&&d(e);var t},u=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},d=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return n.isContentEditableTrue(e)}return!1}(e)&&!n.isContentEditableFalse(e)},h=function(e){return u(e)&&d(e)},f=function(e){var t,n,i=(t=e).id?t.id:s.uuid("h");return a("header",l(e),"#"+i,u(n=e)?parseInt(n.nodeName.substr(1),10):0,function(){e.id=i})},p=function(e){var t=e.id||e.name,n=l(e);return a("anchor",n||"#"+t,"#"+t,0,r.noop)},m=function(e){var t,n;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,i.DOM.select(t,n)},g=function(e){return 0<t(e.title).length};return{find:function(e){var t,n,i=m(e);return o.filter((n=i,o.map(o.filter(n,h),f)).concat((t=i,o.map(o.filter(t,c),p))),g)}}}),e("tinymce/ui/FilePicker",["tinymce/ui/ComboBox","tinymce/util/Tools","tinymce/util/Arr","tinymce/util/Fun","tinymce/util/VK","tinymce/content/LinkTargets"],function(e,d,h,f,t,a){var p={},m=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},g=function(e,t){return{title:e,value:{title:e,url:t,attach:f.noop}}},v=function(e,t,n){var i=t in e?e[t]:n;return!1===i?null:i},l=function(e,i,n,t){var r,o,s,a,l={title:"-"},c=function(e){var t=h.filter(e[n],function(e){return t=e,n=i,!h.find(n,function(e){return e.url===t});var t,n});return d.map(t,function(e){return{title:e,value:{title:e,url:e,attach:f.noop}}})},u=function(t){var e,n=h.filter(i,function(e){return e.type==t});return e=n,d.map(e,m)};return!1===t.typeahead_urls?[]:"file"===n?(r=[y(e,c(p)),y(e,u("header")),y(e,(o=u("anchor"),s=v(t,"anchor_top","#top"),a=v(t,"anchor_bottom","#bottom"),null!==s&&o.unshift(g("<top>",s)),null!==a&&o.push(g("<bottom>",a)),o))],h.reduce(r,function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(l,t)},[])):y(e,c(p))},y=function(e,t){var n=e.toLowerCase(),i=d.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===i.length&&i[0].title===e?[]:i},c=function(r,i,o,s){var t=function(e){var t=a.find(o),n=l(e,t,s,i);r.showAutoComplete(n,e)};r.on("autocomplete",function(){t(r.value())}),r.on("selectitem",function(e){var t=e.value;r.value(t.url);var n,i=(n=t.title).raw?n.raw:n;"image"===s?r.fire("change",{meta:{alt:i,attach:t.attach}}):r.fire("change",{meta:{text:i,attach:t.attach}}),r.focus()}),r.on("click",function(e){0===r.value().length&&"INPUT"===e.target.nodeName&&t("")}),r.on("PostRender",function(){r.getRoot().on("submit",function(e){var t,n,i;e.isDefaultPrevented()||(t=r.value(),i=p[n=s],/^https?/.test(t)&&(i?-1===h.indexOf(i,t)&&(p[n]=i.slice(0,5).concat(t)):p[n]=[t]))})})},u=function(o,e,n){var i=e.filepicker_validator_handler;if(i){o.state.on("change:value",function(e){var t;0!==(t=e.value).length?i({url:t,type:n},function(e){var t,n,i,r=(n=(t=e).status,i=t.message,"valid"===n?{status:"ok",message:i}:"unknown"===n?{status:"warn",message:i}:"invalid"===n?{status:"warn",message:i}:{status:"none",message:""});o.statusMessage(r.message),o.statusLevel(r.status)}):o.statusLevel("none")})}};return e.extend({init:function(e){var t,n,i,r=this,o=tinymce.activeEditor,s=o.settings,a=e.filetype;e.spellcheck=!1,(i=s.file_picker_types||s.file_browser_callback_types)&&(i=d.makeMap(i,/[, ]/)),i&&!i[a]||(!(n=s.file_picker_callback)||i&&!i[a]?!(n=s.file_browser_callback)||i&&!i[a]||(t=function(){n(r.getEl("inp").id,r.value(),a,window)}):t=function(){var e=r.fire("beforecall").meta;e=d.extend({filetype:a},e),n.call(o,function(e,t){r.value(e).fire("change",{meta:t})},r.value(),e)}),t&&(e.icon="browse",e.onaction=t),r._super(e),c(r,s,o.getBody(),a),u(r,s,a)}})}),e("tinymce/ui/FitLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),e("tinymce/ui/FlexLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,_,x,w,C,k,T,S,E,N,D,R,A,P,M,I,O,B,L,H=[],F=Math.max,z=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e.paddingBox,s=e.settings,h=e.isRtl()?s.direction||"row-reversed":s.direction,a=s.align,l=e.isRtl()?s.pack||"end":s.pack,c=s.spacing||0,"row-reversed"!=h&&"column-reverse"!=h||(i=i.set(i.toArray().reverse()),h=h.split("-")[0]),L="column"==h?(k="y",w="h",C="minH",T="maxH",E="innerH",S="top",N="deltaH",D="contentH",I="left",P="w",R="x",A="innerW",M="minW",O="right",B="deltaW","contentW"):(k="x",w="w",C="minW",T="maxW",E="innerW",S="left",N="deltaW",D="contentW",I="top",P="h",R="y",A="innerH",M="minH",O="bottom",B="deltaH","contentH"),d=r[E]-o[S]-o[S],x=u=0,t=0,n=i.length;t<n;t++)p=(f=i[t]).layoutRect(),d-=t<n-1?c:0,0<(m=f.settings.flex)&&(u+=m,p[T]&&H.push(f),p.flex=m),d-=p[C],x<(g=o[I]+p[M]+o[O])&&(x=g);if((b={})[C]=d<0?r[C]-d+r[N]:r[E]-d+r[N],b[M]=x+r[B],b[D]=r[E]-d,b[L]=x,b.minW=z(b.minW,r.maxW),b.minH=z(b.minH,r.maxH),b.minW=F(b.minW,r.startMinWidth),b.minH=F(b.minH,r.startMinHeight),!r.autoResize||b.minW==r.minW&&b.minH==r.minH){for(y=d/u,t=0,n=H.length;t<n;t++)v=(p=(f=H[t]).layoutRect())[T],g=p[C]+p.flex*y,p.maxFlexSize=v<g?(d-=p[T]-p[C],u-=p.flex,p.flex=0,v):0;for(y=d/u,_=o[S],b={},0===u&&("end"==l?_=d+o[S]:"center"==l?(_=Math.round(r[E]/2-(r[E]-d)/2)+o[S])<0&&(_=o[S]):"justify"==l&&(_=o[S],c=Math.floor(d/(i.length-1)))),b[R]=o[I],t=0,n=i.length;t<n;t++)g=(p=(f=i[t]).layoutRect()).maxFlexSize||p[C],"center"===a?b[R]=Math.round(r[A]/2-p[P]/2):"stretch"===a?(b[P]=F(p[M]||0,r[A]-o[I]-o[O]),b[R]=o[I]):"end"===a&&(b[R]=r[A]-p[P]-o.top),0<p.flex&&(g+=p.flex*y),b[w]=g,b[k]=_,f.layoutRect(b),f.recalc&&f.recalc(),_+=g+c}else if(b.w=b.minW,b.h=b.minH,e.layoutRect(b),this.recalc(e),null===e._lastRect){var j=e.parent();j&&(j._lastRect=null,j.recalc())}}})}),e("tinymce/ui/FlowLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),e("tinymce/fmt/FontInfo",["tinymce/dom/DOMUtils"],function(n){var r=function(e,t,n){for(;n!==t;){if(n.style[e])return n.style[e];n=n.parentNode}return""},o=function(e,t){return n.DOM.getStyle(t,e,!0)};return{getFontSize:function(e,t){var n=r("fontSize",e,t);return""!==n?n:o("fontSize",t)},getFontFamily:function(e,t){var n=r("fontFamily",e,t),i=""!==n?n:o("fontFamily",t);return i!==ye?i.replace(/[\'\"]/g,"").replace(/,\s+/g,","):""},toPt:function(e){return/[0-9.]+px$/.test(e)?Math.round(72*parseInt(e,10)/96)+"pt":e}}}),e("tinymce/ui/FormatControls",["tinymce/ui/Control","tinymce/ui/Widget","tinymce/ui/FloatPanel","tinymce/util/Tools","tinymce/util/Arr","tinymce/dom/DOMUtils","tinymce/EditorManager","tinymce/Env","tinymce/fmt/FontInfo"],function(r,e,u,d,h,o,t,s,f){var p=d.each;t.on("AddEditor",function(e){var t,n,i=e.editor;(t=i).on("ScriptsLoaded",function(){t.rtl&&(r.rtl=!0)}),function(a){var e;function n(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}function i(e){return function(){var t=this;a.formatter?a.formatter.formatChanged(e,function(e){t.active(e)}):a.on("init",function(){a.formatter.formatChanged(e,function(e){t.active(e)})})}}function t(n){return function(){var e=this;function t(){var e="redo"==n?"hasRedo":"hasUndo";return!!a.undoManager&&a.undoManager[e]()}e.disabled(!t()),a.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){e.disabled(a.readonly||!t())})}}e=function(){var r=0,o=[],e=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];function s(e){var i=[];if(e)return p(e,function(e){var t={text:e.title,icon:e.icon};if(e.items)t.menu=s(e.items);else{var n=e.format||"custom"+r++;e.format||(e.name=n,o.push(e)),t.format=n,t.cmd=e.cmd}i.push(t)}),i}function t(){return a.settings.style_formats_merge?a.settings.style_formats?s(e.concat(a.settings.style_formats)):s(e):s(a.settings.style_formats||e)}return a.on("init",function(){p(o,function(e){a.formatter.register(e.name,e)})}),{type:"menu",items:t(),onPostRender:function(e){a.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return a.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var e,t;(e=n.settings.format)&&(n.disabled(!a.formatter.canApply(e)),n.active(a.formatter.match(e))),(t=n.settings.cmd)&&n.active(a.queryCommandState(t))})},onclick:function(){this.settings.format&&l(this.settings.format),this.settings.cmd&&a.execCommand(this.settings.cmd)}}}}(),p({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){a.addButton(t,{tooltip:e,onPostRender:i(t),onclick:function(){l(t)}})}),p({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(e,t){a.addButton(t,{tooltip:e[0],cmd:e[1]})}),p({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(e,t){a.addButton(t,{tooltip:e[0],cmd:e[1],onPostRender:i(t)})});var r=function(e){var t=e;return 0<t.length&&"-"===t[0].text&&(t=t.slice(1)),0<t.length&&"-"===t[t.length-1].text&&(t=t.slice(0,t.length-1)),t},o=function(e){var t,n,i;if("string"==typeof e)n=e.split(" ");else if(d.isArray(e))return i=d.map(e,o),h.reduce(i,function(e,t){return e.concat(t)},[]);return t=d.grep(n,function(e){return"|"===e||e in a.menuItems}),d.map(t,function(e){return"|"===e?{text:"-"}:a.menuItems[e]})},s=function(e){return e.insert_button_items?r(o(e.insert_button_items)):r((t="insert",n=[{text:"-"}],i=d.grep(a.menuItems,function(e){return e.context===t}),d.each(i,function(e){"before"==e.separator&&n.push({text:"|"}),e.prependToContext?n.unshift(e):n.push(e),"after"==e.separator&&n.push({text:"|"})}),n));var t,n,i};function l(e){e.control&&(e=e.control.value()),e&&a.execCommand("mceToggleFormat",!1,e)}function c(e){var n=e.items().length;return e.items().each(function(e){e.menu&&e.visible(0<c(e.menu)),!e.menu&&e.settings.menu&&e.visible(0<function n(e){var i=e.length;d.each(e,function(e){e.menu&&(e.hidden=0===n(e.menu));var t=e.format;t&&(e.hidden=!a.formatter.canApply(t)),e.hidden&&i--});return i}(e.settings.menu));var t=e.settings.format;t&&e.visible(a.formatter.canApply(t)),e.visible()||n--}),n}a.addButton("undo",{tooltip:"Undo",onPostRender:t("undo"),cmd:"undo"}),a.addButton("redo",{tooltip:"Redo",onPostRender:t("redo"),cmd:"redo"}),a.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),a.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:t("undo"),cmd:"undo"}),a.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:t("redo"),cmd:"redo"}),a.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:function(){var t=this;a.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(a.hasVisual)},cmd:"mceToggleVisualAid"}),a.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),a.addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(s(a.settings)),this.menu.renderNew()}}),p({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(e,t){a.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),a.on("mousedown",function(){u.hideAll()}),a.addButton("styleselect",{type:"menubutton",text:"Formats",menu:e,onShowMenu:function(){a.settings.style_formats_autohide&&c(this.menu)}}),a.addButton("formatselect",function(){var r,o,t=[],e=n(a.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return p(e,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return a.formatter.getCssText(e[1])}})}),{type:"listbox",text:e[0][0],values:t,fixedWidth:!0,onselect:l,onPostRender:(r=t,function(){var t=this;a.on("nodeChange",function(e){var n=a.formatter,i=null;p(e.parents,function(t){if(p(r,function(e){if(o?n.matchNode(t,o,{value:e.value})&&(i=e.value):n.matchNode(t,e.value)&&(i=e.value),i)return!1}),i)return!1}),t.value(i)})})}}),a.addButton("fontselect",function(){var o,t=[],e=n(a.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return p(e,function(e){t.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:(o=t,function(){var i=this,r=function(e){return e?e.split(",")[0]:""};a.on("nodeChange",function(e){var t,n=null;t=f.getFontFamily(a.getBody(),e.element),p(o,function(e){e.value.toLowerCase()===t.toLowerCase()&&(n=e.value)}),p(o,function(e){n||r(e.value).toLowerCase()!==r(t).toLowerCase()||(n=e.value)}),i.value(n),!n&&t&&i.text(r(t))})}),onselect:function(e){e.control.settings.value&&a.execCommand("FontName",!1,e.control.settings.value)}}}),a.addButton("fontsizeselect",function(){var o,r=[],e=a.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt";return p(e.split(" "),function(e){var t=e,n=e,i=e.split("=");1<i.length&&(t=i[0],n=i[1]),r.push({text:t,value:n})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:r,fixedWidth:!0,onPostRender:(o=r,function(){var r=this;a.on("nodeChange",function(e){var t,n,i=null;t=f.getFontSize(a.getBody(),e.element),n=f.toPt(t),p(o,function(e){e.value===t?i=t:e.value===n&&(i=n)}),r.value(i),i||r.text(n)})}),onclick:function(e){e.control.settings.value&&a.execCommand("FontSize",!1,e.control.settings.value)}}}),a.addMenuItem("formats",{text:"Formats",menu:e})}(i),(n=i).settings.ui_container&&(s.container=o.DOM.select(n.settings.ui_container)[0])}),r.translate=function(e){return t.translate(e)},e.tooltips=!s.iOS}),e("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,_,x,w,C,k,T,S,E,N,D=[],R=[];t=e.settings,r=e.items().filter(":visible"),o=e.layoutRect(),i=t.columns||Math.ceil(Math.sqrt(r.length)),n=Math.ceil(r.length/i),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,_=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,N="reverseRows"in t?t.reverseRows:e.isRtl(),_&&"string"==typeof _&&(_=[_]),x&&"string"==typeof x&&(x=[x]);for(d=0;d<i;d++)D.push(0);for(h=0;h<n;h++)R.push(0);for(h=0;h<n;h++)for(d=0;d<i&&(u=r[h*i+d]);d++)k=(c=u.layoutRect()).minW,T=c.minH,D[d]=k>D[d]?k:D[d],R[h]=T>R[h]?T:R[h];for(S=o.innerW-g.left-g.right,d=w=0;d<i;d++)w+=D[d]+(0<d?y:0),S-=(0<d?y:0)+D[d];for(E=o.innerH-g.top-g.bottom,h=C=0;h<n;h++)C+=R[h]+(0<h?b:0),E-=(0<h?b:0)+R[h];if(w+=g.left+g.right,C+=g.top+g.bottom,(l={}).minW=w+(o.w-o.innerW),l.minH=C+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){var A;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),A="start"==t.packV?0:0<E?Math.floor(E/n):0;var P=0,M=t.flexWidths;if(M)for(d=0;d<M.length;d++)P+=M[d];else P=i;var I=S/P;for(d=0;d<i;d++)D[d]+=M?M[d]*I:I;for(p=g.top,h=0;h<n;h++){for(f=g.left,a=R[h]+A,d=0;d<i&&(u=r[N?h*i+i-1-d:h*i+d]);d++)m=u.settings,c=u.layoutRect(),s=Math.max(D[d],c.startMinWidth),c.x=f,c.y=p,"center"==(v=m.alignH||(_?_[d]||_[0]:null))?c.x=f+s/2-c.w/2:"right"==v?c.x=f+s-c.w:"stretch"==v&&(c.w=s),"center"==(v=m.alignV||(x?x[d]||x[0]:null))?c.y=p+a/2-c.h/2:"bottom"==v?c.y=p+a-c.h:"stretch"==v&&(c.h=a),u.layoutRect(c),f+=s+y,u.recalc&&u.recalc();p+=a+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var O=e.parent();O&&(O._lastRect=null,O.recalc())}}})}),e("tinymce/ui/Iframe",["tinymce/ui/Widget","tinymce/util/Delay"],function(e,r){return e.extend({renderHtml:function(){return this.classes.add("iframe"),this.canFocus=!1,'<iframe id="'+this._id+'" class="'+this.classes+'" tabindex="-1" src="'+(this.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,t&&t()):r.setTimeout(function(){n.html(e)}),this}})}),e("tinymce/ui/InfoBox",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+this.encode(this.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+e+"ico "+e+'i-help"></i></button></div></div>'},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl("body").firstChild.data=t.encode(e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t.state.on("change:help",function(e){t.classes.toggle("has-help",e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}})}),e("tinymce/ui/Label",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){return e.extend({init:function(e){this._super(e),this.classes.add("widget").add("label"),this.canFocus=!1,e.multiline&&this.classes.add("autoscroll"),e.strong&&this.classes.add("strong")},initLayoutRect:function(){var e=this._super();this.settings.multiline&&(t.getSize(this.getEl()).width>e.maxW&&(e.minW=e.maxW,this.classes.add("multiline")),this.getEl().style.width=e.minW+"px",e.startMinH=e.h=e.minH=Math.min(e.maxH,t.getSize(this.getEl()).height));return e},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,i=n.settings.forId;return!i&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(i=e._id),i?'<label id="'+n._id+'" class="'+n.classes+'"'+(i?' for="'+i+'"':"")+">"+n.encode(n.state.get("text"))+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+n.encode(n.state.get("text"))+"</span>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.innerHtml(t.encode(e.value)),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}})}),e("tinymce/ui/Toolbar",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}})}),e("tinymce/ui/MenuBar",["tinymce/ui/Toolbar"],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),e("tinymce/ui/MenuButton",["tinymce/ui/Button","tinymce/ui/Factory","tinymce/ui/MenuBar"],function(e,i,a){var o=e.extend({init:function(e){this._renderOpen=!0,this._super(e),e=this.settings,this.classes.add("menubtn"),e.fixedWidth&&this.classes.add("fixed-width"),this.aria("haspopup",!0),this.state.set("menu",e.menu||this.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||((t=n.state.get("menu")||[]).length?t={type:"menu",items:t}:t.type=t.type||"menu",t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=i.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){e.control==n.menu&&n.activeMenu("show"==e.type),n.aria("expanded","show"==e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon,o=t.state.get("text"),s="";return e=(e=t.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",o&&(t.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+t.encode(o)+"</span>"),r=t.settings.icon?i+"ico "+i+"i-"+r:"",t.aria("role",t.parent()instanceof a?"menuitem":"button"),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+s+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var r=this;return r.on("click",function(e){e.control===r&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(e.target,r.getEl())&&(r.focus(),r.showMenu(!e.aria),e.aria&&r.menu.items().filter(":visible")[0].focus())}),r.on("mouseenter",function(e){var t,n=e.control,i=r.parent();n&&i&&n instanceof o&&n.parent()==i&&(i.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(t=!0),e.hideMenu())}),t&&(n.focus(),n.showMenu()))}),r._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return o}),e("tinymce/ui/MenuItem",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/Env","tinymce/util/Delay"],function(e,o,f,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var t,n=this,e=n.settings,i=n.parent();if(i.items().each(function(e){e!==n&&e.hideMenu()}),e.menu){(t=n.menu)?t.show():((t=e.menu).length?t={type:"menu",items:t}:t.type=t.type||"menu",i.settings.itemDefaults&&(t.itemDefaults=i.settings.itemDefaults),(t=n.menu=o.create(t).parent(n).renderTo()).reflow(),t.on("cancel",function(e){e.stopPropagation(),n.focus(),t.hide()}),t.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),t.on("hide",function(e){e.control===t&&n.classes.remove("selected")}),t.submenu=!0),t._parentMenu=i,t.classes.add("menu-sub");var r=t.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);t.moveRel(n.getEl(),r),r="menu-sub-"+(t.rel=r),t.classes.remove(t._lastRel).add(r),t._lastRel=r,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){return this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide(),this.aria("expanded",!1)),this},renderHtml:function(){var e,t=this,n=t._id,i=t.settings,r=t.classPrefix,o=t.state.get("text"),s=t.settings.icon,a="",l=i.shortcut,c=t.encode(i.url);function u(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(e){var t=i.match||"";return t?e.replace(new RegExp(u(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function h(e){return e.replace(new RegExp(u("!mce~match["),"g"),"<b>").replace(new RegExp(u("]mce~match!"),"g"),"</b>")}return s&&t.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(e){var t,n,i={};for(i=f.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=i[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(l)),s=r+"ico "+r+"i-"+(t.settings.icon||"none"),e="-"!==o?'<i class="'+s+'"'+a+"></i> ":"",o=h(t.encode(d(o))),c=h(t.encode(d(c))),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1">'+e+("-"!==o?'<span id="'+n+'-text" class="'+r+'text">'+o+"</span>":"")+(l?'<div id="'+n+'-shortcut" class="'+r+'menu-shortcut">'+l+"</div>":"")+(i.menu?'<div class="'+r+'caret"></div>':"")+(c?'<div class="'+r+'menu-item-link">'+c+"</div>":"")+"</div>"},postRender:function(){var t=this,n=t.settings,e=n.textStyle;if("function"==typeof e&&(e=e.call(this)),e){var i=t.getEl("text");i&&i.setAttribute("style",e)}return t.on("mouseenter click",function(e){e.control===t&&(n.menu||"click"!==e.type?(t.showMenu(),e.aria&&t.menu.focus(!0)):(t.fire("select"),r.requestAnimationFrame(function(){t.parent().hideAll()})))}),t._super(),t},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),e("tinymce/ui/Throbber",["tinymce/dom/DomQuery","tinymce/ui/Control","tinymce/util/Delay"],function(c,e,u){return function(i,r){var o,s,a=this,l=e.classPrefix;a.show=function(e,t){function n(){o&&(c(i).append('<div class="'+l+"throbber"+(r?" "+l+"throbber-inline":"")+'"></div>'),t&&t())}return a.hide(),o=!0,e?s=u.setTimeout(n,e):n(),a},a.hide=function(){var e=i.lastChild;return u.clearTimeout(s),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,a}}}),e("tinymce/ui/Menu",["tinymce/ui/FloatPanel","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/util/Tools"],function(e,t,r,i){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=i.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var t,n=this;function i(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new r(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",i)),n.requestTime=t=(new Date).getTime(),n.settings.itemsFactory(function(e){0!==e.length?n.requestTime===t&&(n.getEl().style.width="",n.getEl("body").style.width="",i(),n.items().remove(),n.getEl("body").innerHTML="",n.add(e),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(e){var t=e.settings;if(t.icon||t.image||t.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n._super()}})}),e("tinymce/ui/ListBox",["tinymce/ui/MenuButton","tinymce/ui/Menu"],function(e,r){return e.extend({init:function(i){var e,r,o,n,s=this;s._super(i),i=s.settings,s._values=e=i.values,e&&(void 0!==i.value&&function e(t){for(var n=0;n<t.length;n++){if(r=t[n].selected||i.value===t[n].value)return o=o||t[n].text,s.state.set("value",t[n].value),!0;if(t[n].menu&&e(t[n].menu))return!0}}(e),!r&&0<e.length&&(o=e[0].text,s.state.set("value",e[0].value)),s.state.set("menu",e)),s.state.set("text",i.text||o),s.classes.add("listbox"),s.on("select",function(e){var t=e.control;n&&(e.lastControl=n),i.multiple?t.active(!t.active()):s.value(e.control.value()),n=t})},bindStates:function(){var i=this;return i.on("show",function(e){var t,n;t=e.control,n=i.value(),t instanceof r&&t.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}),i.state.on("change:value",function(e){var t=function e(t,n){var i;if(t)for(var r=0;r<t.length;r++){if(t[r].value===n)return t[r];if(t[r].menu&&(i=e(t[r].menu,n)))return i}}(i.state.get("menu"),e.value);t?i.text(t.text):i.text(i.settings.text)}),i._super()}})}),e("tinymce/ui/Radio",["tinymce/ui/Checkbox"],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),e("tinymce/ui/ResizeHandle",["tinymce/ui/Widget","tinymce/ui/DragHelper"],function(e,n){return e.extend({renderHtml:function(){var e=this.classPrefix;return this.classes.add("resizehandle"),"both"==this.settings.direction&&this.classes.add("resizehandle-both"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"><i class="'+e+"ico "+e+'i-resize"></i></div>'},postRender:function(){var t=this;t._super(),t.resizeDragHelper=new n(this._id,{start:function(){t.fire("ResizeStart")},drag:function(e){"both"!=t.settings.direction&&(e.deltaX=0),t.fire("Resize",e)},stop:function(){t.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),e("tinymce/ui/SelectBox",["tinymce/ui/Widget"],function(e){function n(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var n=this;n._super(e),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(e){var t;13==e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t="";return e=n(this._options),this.size&&(t=' size = "'+this.size+'"'),'<select id="'+this._id+'" class="'+this.classes+'"'+t+">"+e+"</select>"},bindStates:function(){var t=this;return t.state.on("change:options",function(e){t.getEl().innerHTML=n(e.value)}),t._super()}})}),e("tinymce/ui/Slider",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils"],function(e,m,g){function v(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function a(e,t,n){e.setAttribute("aria-"+t,n)}function n(e,t){var n,i,r,o,s;n="v"==e.settings.orientation?(r="top",i="height","h"):(r="left",i="width","w"),s=e.getEl("handle"),o=((e.layoutRect()[n]||100)-g.getSize(s)[i])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",s.style[r]=o,s.style.height=e.layoutRect().h+"px",a(s,"valuenow",t),a(s,"valuetext",""+e.settings.previewFilter(t)),a(s,"valuemin",e._minValue),a(s,"valuemax",e._maxValue)}return e.extend({init:function(e){e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),this._super(e),this.classes.add("slider"),"v"==e.orientation&&this.classes.add("vertical"),this._minValue=e.minValue||0,this._maxValue=e.maxValue||100,this._initValue=this.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,i,r,o,s,a,l,c,u,d,h,f,p=this;e=p._minValue,t=p._maxValue,o="v"==p.settings.orientation?(n="screenY",i="top",r="height","h"):(n="screenX",i="left",r="width","w"),p._super(),function(o,s){function t(e){var t,n,i,r;t=v(t=(((t=p.value())+(r=n=o))/((i=s)-r)+.05*e)*(i-n)-n,o,s),p.value(t),p.fire("dragstart",{value:t}),p.fire("drag",{value:t}),p.fire("dragend",{value:t})}p.on("keydown",function(e){switch(e.keyCode){case 37:case 38:t(-1);break;case 39:case 40:t(1)}})}(e,t,p.getEl("handle")),s=e,a=t,l=p.getEl("handle"),p._dragHelper=new m(p._id,{handle:p._id+"-handle",start:function(e){c=e[n],u=parseInt(p.getEl("handle").style[i],10),d=(p.layoutRect()[o]||100)-g.getSize(l)[r],p.fire("dragstart",{value:f})},drag:function(e){var t=e[n]-c;h=v(u+t,0,d),l.style[i]=h+"px",f=s+h/d*(a-s),p.value(f),p.tooltip().text(""+p.settings.previewFilter(f)).show().moveRel(l,"bc tc"),p.fire("drag",{value:f})},stop:function(){p.tooltip().hide(),p.fire("dragend",{value:f})}})},repaint:function(){this._super(),n(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){n(t,e.value)}),t._super()}})}),e("tinymce/ui/Spacer",["tinymce/ui/Widget"],function(e){return e.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}})}),e("tinymce/ui/SplitButton",["tinymce/ui/MenuButton","tinymce/ui/DomUtils","tinymce/dom/DomQuery"],function(e,r,o){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),i=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,o(e).css({width:i.w-r.getSize(t).width,height:i.h-2}),o(t).css({height:i.h-2}),this},activeMenu:function(e){o(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.state.get("icon"),o=t.state.get("text"),s="";return e=(e=t.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",r=t.settings.icon?i+"ico "+i+"i-"+r:"",o&&(t.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+t.encode(o)+"</span>"),'<div id="'+n+'" class="'+t.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+s+'</button><button type="button" class="'+i+'open" hidefocus="1" tabindex="-1">'+(t._menuBtnText?(r?" ":"")+t._menuBtnText:"")+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control==this)for(;t;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==t.nodeName&&-1==t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}})}),e("tinymce/ui/StackLayout",["tinymce/ui/FlowLayout"],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),e("tinymce/ui/TabPanel",["tinymce/ui/Panel","tinymce/dom/DomQuery","tinymce/ui/DomUtils"],function(e,t,r){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),t(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),t(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!=t&&e.hide()})},renderHtml:function(){var i=this,e=i._layout,r="",o=i.classPrefix;return i.preRender(),e.preRender(i),i.items().each(function(e,t){var n=i._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),r+='<div id="'+n+'" class="'+o+'tab" unselectable="on" role="tab" aria-controls="'+e._id+'" aria-selected="false" tabIndex="-1">'+i.encode(e.settings.title)+"</div>"}),'<div id="'+i._id+'" class="'+i.classes+'" hidefocus="1" tabindex="-1"><div id="'+i._id+'-head" class="'+o+'tabs" role="tablist">'+r+'</div><div id="'+i._id+'-body" class="'+i.bodyClasses+'">'+e.renderHtml(i)+"</div></div>"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id==i._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]==e.target&&i.activateTab(n)})},initLayoutRect:function(){var e,t,n;t=(t=r.getSize(this.getEl("head")).width)<0?0:t,n=0,this.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),this.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var i=r.getSize(this.getEl("head")).height;return this.settings.minWidth=t,this.settings.minHeight=n+i,(e=this._super()).deltaH+=i,e.innerH=e.h-e.deltaH,e}})}),e("tinymce/ui/TextBox",["tinymce/ui/Widget","tinymce/util/Tools","tinymce/ui/DomUtils"],function(e,i,r){return e.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13==e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=0;e=this.getEl().style,t=this._layoutRect,r=this._lastRepaintRect||{};var s=document;return!this.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(e.lineHeight=t.h-o+"px"),i=(n=this.borderBox).left+n.right+8,o=n.top+n.bottom+(this.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-o+"px",r.h=t.h),this._lastRepaintRect=r,this.fire("repaint",{},!1),this},renderHtml:function(){var t,e,n=this.settings;return t={id:this._id,hidefocus:"1"},i.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=n[e]}),this.disabled()&&(t.disabled="disabled"),n.subtype&&(t.type=n.subtype),(e=r.create(n.multiline?"textarea":"input",t)).value=this.state.get("value"),e.className=this.classes,e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!=e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}})}),e("tinymce/Register",[],function(){var e=this||window;return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],function(){return e.tinymce})),"object"==typeof module&&(module.exports=window.tinymce),{}}),function(e){var t,n,i,r,o;for(t=0;t<e.length;t++){n=a,r=(i=e[t]).split(/[.\/]/);for(var s=0;s<r.length-1;++s)n[r[s]]===ye&&(n[r[s]]={}),n=n[r[s]];n[r[r.length-1]]=l[i]}if(a.AMDLC_TESTS){for(i in o=a.privateModules||{},l)o[i]=l[i];for(t=0;t<e.length;t++)delete o[e[t]];a.privateModules=o}}(["tinymce/geom/Rect","tinymce/util/Promise","tinymce/util/Delay","tinymce/Env","tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/TreeWalker","tinymce/html/Entities","tinymce/dom/DOMUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/dom/RangeUtils","tinymce/html/Node","tinymce/html/Schema","tinymce/html/SaxParser","tinymce/html/DomParser","tinymce/html/Writer","tinymce/html/Serializer","tinymce/dom/Serializer","tinymce/util/VK","tinymce/dom/ControlSelection","tinymce/dom/BookmarkManager","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EditorCommands","tinymce/util/URI","tinymce/util/Class","tinymce/util/EventDispatcher","tinymce/util/Observable","tinymce/ui/Selector","tinymce/ui/Collection","tinymce/ui/ReflowQueue","tinymce/ui/Control","tinymce/ui/Factory","tinymce/ui/KeyboardNavigation","tinymce/ui/Container","tinymce/ui/DragHelper","tinymce/ui/Scrollable","tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/FloatPanel","tinymce/ui/Window","tinymce/ui/MessageBox","tinymce/WindowManager","tinymce/ui/Tooltip","tinymce/ui/Widget","tinymce/ui/Progress","tinymce/ui/Notification","tinymce/NotificationManager","tinymce/EditorObservable","tinymce/Shortcuts","tinymce/Editor","tinymce/util/I18n","tinymce/FocusManager","tinymce/EditorManager","tinymce/util/XHR","tinymce/util/JSON","tinymce/util/JSONRequest","tinymce/util/JSONP","tinymce/util/LocalStorage","tinymce/Compat","tinymce/ui/Layout","tinymce/ui/AbsoluteLayout","tinymce/ui/Button","tinymce/ui/ButtonGroup","tinymce/ui/Checkbox","tinymce/ui/ComboBox","tinymce/ui/ColorBox","tinymce/ui/PanelButton","tinymce/ui/ColorButton","tinymce/util/Color","tinymce/ui/ColorPicker","tinymce/ui/Path","tinymce/ui/ElementPath","tinymce/ui/FormItem","tinymce/ui/Form","tinymce/ui/FieldSet","tinymce/ui/FilePicker","tinymce/ui/FitLayout","tinymce/ui/FlexLayout","tinymce/ui/FlowLayout","tinymce/ui/FormatControls","tinymce/ui/GridLayout","tinymce/ui/Iframe","tinymce/ui/InfoBox","tinymce/ui/Label","tinymce/ui/Toolbar","tinymce/ui/MenuBar","tinymce/ui/MenuButton","tinymce/ui/MenuItem","tinymce/ui/Throbber","tinymce/ui/Menu","tinymce/ui/ListBox","tinymce/ui/Radio","tinymce/ui/ResizeHandle","tinymce/ui/SelectBox","tinymce/ui/Slider","tinymce/ui/Spacer","tinymce/ui/SplitButton","tinymce/ui/StackLayout","tinymce/ui/TabPanel","tinymce/ui/TextBox"])}(window),function(){var l={},e=function(e,t,n){if("string"!=typeof e)throw"module id must be a string";if(void 0===t)throw"no dependencies for "+e;if(void 0===n)throw"no definition function for "+e;l[e]={deps:t,defn:n,instance:void 0}},c=function(e){var t=l[e];if(void 0===t)throw"module ["+e+"] was undefined";return void 0===t.instance&&function(e){for(var t=l[e],n=t.deps,i=t.defn,r=n.length,o=new Array(r),s=0;s<r;++s)o[s]=c(n[s]);var a=i.apply(null,o);if(void 0===a)throw"module ["+e+"] returned undefined";t.instance=a}(e),t.instance},n=e,t=function(e,t){n(e,[],function(){return t})};t("global!tinymce.Env",tinymce.Env),t("global!tinymce.EditorManager",tinymce.EditorManager),t("global!tinymce.ThemeManager",tinymce.ThemeManager),t("global!tinymce.util.Tools",tinymce.util.Tools),t("global!tinymce.ui.Factory",tinymce.ui.Factory),t("global!tinymce.DOM",tinymce.DOM),n("tinymce.modern.ui.Toolbar",["global!tinymce.util.Tools","global!tinymce.ui.Factory"],function(a,l){var s=function(i,e,r){var o,s=[];if(e)return a.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=i.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"==t?o=null:l.has(t)?(t={type:t,size:r},s.push(t),o=null):(o||(o={type:"buttongroup",items:[]},s.push(o)),i.buttons[t]&&(e=t,"function"==typeof(t=i.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=r,t=l.create(t),o.items.push(t),i.initialized?n():i.on("init",n)))}),{type:"toolbar",layout:"flow",items:s}};return{createToolbar:s,createToolbars:function(t,n){var i=[],r=t.settings,e=function(e){if(e)return i.push(s(t,e,n)),!0};if(a.isArray(r.toolbar)){if(0===r.toolbar.length)return;a.each(r.toolbar,function(e,t){r["toolbar"+(t+1)]=e}),delete r.toolbar}for(var o=1;o<10&&e(r["toolbar"+o]);o++);if(i.length||!1===r.toolbar||e(r.toolbar||"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),i.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}}}}),n("tinymce.modern.ui.Menubar",["global!tinymce.util.Tools"],function(c){var u={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},d=function(e,t){return"|"==t?{text:"|"}:e[t]},l=function(t,e,n){var i,r,o,s,a;if(a=c.makeMap((e.removed_menuitems||"").split(/[ ,]/)),e.menu?(r=e.menu[n],s=!0):r=u[n],r){i={text:r.title},o=[],c.each((r.items||"").split(/[ ,]/),function(e){d(t,e)&&!a[e]&&o.push(d(t,e))}),s||c.each(t,function(e){e.context==n&&("before"==e.separator&&o.push({text:"|"}),e.prependToContext?o.unshift(e):o.push(e),"after"==e.separator&&o.push({text:"|"}))});for(var l=0;l<o.length;l++)"|"==o[l].text&&(0!==l&&l!=o.length-1||o.splice(l,1));if(i.menu=o,!i.menu.length)return null}return i};return{createMenuButtons:function(e){var t,n=[],i=e.settings,r=[];if(i.menu)for(t in i.menu)r.push(t);else for(t in u)r.push(t);for(var o="string"==typeof i.menubar?i.menubar.split(/[ ,]/):r,s=0;s<o.length;s++){var a=o[s];(a=l(e.menuItems,e.settings,a))&&n.push(a)}return n}}}),t("global!tinymce.util.Delay",tinymce.util.Delay),t("global!tinymce.geom.Rect",tinymce.geom.Rect),n("tinymce.modern.ui.ContextToolbars",["global!tinymce.DOM","global!tinymce.util.Tools","global!tinymce.util.Delay","tinymce.modern.ui.Toolbar","global!tinymce.ui.Factory","global!tinymce.geom.Rect"],function(_,x,l,c,u,w){var s=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},C=function(e,t){e.moveTo(t.left,t.top)},k=function(e,t,n,i,r,o){return o=s({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:s(i),contentAreaRect:s(r),panelRect:o})),o};return{addContextualToolbars:function(y){var n,b=y.settings,o=function(){return y.contextToolbars||[]},i=function(e,t){var n,i,r,o,s,a,l,c=b.inline_toolbar_position_handler;if(!y.removed){if(!e||!e.toolbar.panel)return u=y,void x.each(u.contextToolbars,function(e){e.panel&&e.panel.hide()});var u,d,h,f,p,m,g,v;l=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],s=e.toolbar.panel,t&&s.show(),d=e.element,h=_.getPos(y.getContentAreaContainer()),f=y.dom.getRect(d),"BODY"===(p=y.dom.getRoot()).nodeName&&(f.x-=p.ownerDocument.documentElement.scrollLeft||p.scrollLeft,f.y-=p.ownerDocument.documentElement.scrollTop||p.scrollTop),f.x+=h.x,f.y+=h.y,r=f,i=_.getRect(s.getEl()),o=_.getRect(y.getContentAreaContainer()||y.getBody()),"inline"!==_.getStyle(e.element,"display",!0)&&(r.w=e.element.clientWidth,r.h=e.element.clientHeight),y.inline||(o.w=y.getDoc().documentElement.offsetWidth),y.selection.controlSelection.isResizable(e.element)&&r.w<25&&(r=w.inflate(r,0,8)),n=w.findBestRelativePosition(i,r,o,l),r=w.clamp(r,o),n?(a=w.relativePosition(i,r,n),C(s,k(c,a.x,a.y,r,o,i))):(o.h+=i.h,(r=w.intersect(o,r))?(n=w.findBestRelativePosition(i,r,o,["bc-tc","bl-tl","br-tr"]))?(a=w.relativePosition(i,r,n),C(s,k(c,a.x,a.y,r,o,i))):C(s,k(c,r.x,r.y,r,o,i)):s.hide()),m=s,v=function(e,t){return e===t},g=(g=n)?g.substr(0,2):"",x.each({t:"down",b:"up"},function(e,t){m.classes.toggle("arrow-"+e,v(t,g.substr(0,1)))}),x.each({l:"left",r:"right"},function(e,t){m.classes.toggle("arrow-"+e,v(t,g.substr(1,1)))})}},r=function(e){return function(){l.requestAnimationFrame(function(){y.selection&&i(a(y.selection.getNode()),e)})}},t=function(e){var t;if(e.toolbar.panel)return e.toolbar.panel.show(),void i(e);n||(n=y.selection.getScrollContainer()||y.getWin(),_.bind(n,"scroll",r(!0)),y.on("remove",function(){_.unbind(n,"scroll")})),t=u.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:c.createToolbar(y,e.toolbar.items),oncancel:function(){y.focus()}}),(e.toolbar.panel=t).renderTo(document.body).reflow(),i(e)},s=function(){x.each(o(),function(e){e.panel&&e.panel.hide()})},a=function(e){var t,n,i,r=o();for(t=(i=y.$(e).parents().add(e)).length-1;0<=t;t--)for(n=r.length-1;0<=n;n--)if(r[n].predicate(i[t]))return{toolbar:r[n],element:i[t]};return null};y.on("click keyup setContent ObjectResized",function(e){("setcontent"!==e.type||e.selection)&&l.setEditorTimeout(y,function(){var e;(e=a(y.selection.getNode()))?(s(),t(e)):s()})}),y.on("blur hide contextmenu",s),y.on("ObjectResizeStart",function(){var e=a(y.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),y.on("ResizeEditor ResizeWindow",r(!0)),y.on("nodeChange",r(!1)),y.on("remove",function(){x.each(o(),function(e){e.panel&&e.panel.remove()}),y.contextToolbars={}}),y.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var e=a(y.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})}}}),n("tinymce.modern.ui.A11y",[],function(){var n=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}};return{addKeys:function(e,t){e.shortcuts.add("Alt+F9","",n(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",n(t,"toolbar")),e.shortcuts.add("Alt+F11","",n(t,"elementpath")),t.on("cancel",function(){e.focus()})}}}),n("tinymce.modern.ui.Sidebar",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.Env"],function(f,p,t){var m=function(e,t,n){var i,r=e.settings[n];r&&r((i=t.getEl("body"),{element:function(){return i}}))},i=function(u,d,h){return function(e){var t,n,i,r,o,s=e.control,a=s.parents().filter("panel")[0],l=a.find("#"+d)[0],c=(t=h,n=d,f.grep(t,function(e){return e.name===n})[0]);i=d,r=a,o=h,f.each(o,function(e){var t=r.items().filter("#"+e.name)[0];t&&t.visible()&&e.name!==i&&(m(e,t,"onhide"),t.visible(!1))}),s.parent().items().each(function(e){e.active(!1)}),l&&l.visible()?(m(c,l,"onhide"),l.hide(),s.active(!1)):(l?l.show():(l=p.create({type:"container",name:d,layout:"stack",classes:"sidebar-panel",html:""}),a.prepend(l),m(c,l,"onrender")),m(c,l,"onshow"),s.active(!0)),u.fire("ResizeEditor")}};return{hasSidebar:function(e){return!(t.ie&&!(11<=t.ie)||!e.sidebars)&&0<e.sidebars.length},createSidebar:function(n){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:f.map(n.sidebars,function(e){var t=e.settings;return{type:"button",icon:t.icon,image:t.image,tooltip:t.tooltip,onclick:i(n,e.name,n.sidebars)}})}]}}}}),n("tinymce.modern.ui.SkinLoaded",[],function(){return{fireSkinLoaded:function(e){var t=function(){e._skinLoaded=!0,e.fire("SkinLoaded")};return function(){e.initialized?t():e.on("init",t)}}}}),n("tinymce.modern.ui.Resize",["global!tinymce.DOM"],function(l){var c=function(e){return{width:e.clientWidth,height:e.clientHeight}},r=function(e,t,n){var i,r,o,s,a=e.settings;i=e.getContainer(),r=e.getContentAreaContainer().firstChild,o=c(i),s=c(r),null!==t&&(t=Math.max(a.min_width||100,t),t=Math.min(a.max_width||65535,t),l.setStyle(i,"width",t+(o.width-s.width)),l.setStyle(r,"width",t)),n=Math.max(a.min_height||100,n),n=Math.min(a.max_height||65535,n),l.setStyle(r,"height",n),e.fire("ResizeEditor")};return{resizeTo:r,resizeBy:function(e,t,n){var i=e.getContentAreaContainer();r(e,i.clientWidth+t,i.clientHeight+n)}}}),n("tinymce.modern.modes.Iframe",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","tinymce.modern.ui.Toolbar","tinymce.modern.ui.Menubar","tinymce.modern.ui.ContextToolbars","tinymce.modern.ui.A11y","tinymce.modern.ui.Sidebar","tinymce.modern.ui.SkinLoaded","tinymce.modern.ui.Resize"],function(e,c,u,d,h,f,p,m,g,v){var y=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}};return{render:function(t,e,n){var i,r,o,s,a,l=t.settings;return n.skinUiCss&&u.styleSheetLoader.load(n.skinUiCss,g.fireSkinLoaded(t)),i=e.panel=c.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[!1===l.menubar?null:{type:"menubar",border:"0 0 1 0",items:h.createMenuButtons(t)},d.createToolbars(t,l.toolbar_items_size),m.hasSidebar(t)?(s=t,{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[y("0"),m.createSidebar(s)]}):y("1 0 0 0")]}),!1!==l.resize&&(r={type:"resizehandle",direction:l.resize,onResizeStart:function(){var e=t.getContentAreaContainer().firstChild;o={width:e.clientWidth,height:e.clientHeight}},onResize:function(e){"both"===l.resize?v.resizeTo(t,o.width+e.deltaX,o.height+e.deltaY):v.resizeTo(t,null,o.height+e.deltaY)}}),!1!==l.statusbar&&i.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:t},r]}),t.fire("BeforeRenderUI"),t.on("SwitchMode",(a=i,function(e){a.find("*").disabled("readonly"===e.mode)})),i.renderBefore(n.targetNode).reflow(),l.readonly&&t.setMode("readonly"),l.width&&u.setStyle(i.getEl(),"width",l.width),t.on("remove",function(){i.remove(),i=null}),p.addKeys(t,i),f.addContextualToolbars(t),{iframeContainer:i.find("#iframe")[0].getEl(),editorContainer:i.getEl()}}}}),t("global!tinymce.ui.FloatPanel",tinymce.ui.FloatPanel),n("tinymce.modern.modes.Inline",["global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","global!tinymce.ui.FloatPanel","tinymce.modern.ui.Toolbar","tinymce.modern.ui.Menubar","tinymce.modern.ui.ContextToolbars","tinymce.modern.ui.A11y","tinymce.modern.ui.SkinLoaded"],function(e,u,d,h,f,p,m,g,v){return{render:function(s,e,t){var a,n,i=s.settings;i.fixed_toolbar_container&&(n=d.select(i.fixed_toolbar_container)[0]);var r=function(){if(a&&a.moveRel&&a.visible()&&!a._fixed){var e=s.selection.getScrollContainer(),t=s.getBody(),n=0,i=0;if(e){var r=d.getPos(t),o=d.getPos(e);n=Math.max(0,o.x-r.x),i=Math.max(0,o.y-r.y)}a.fixed(!1).moveRel(t,s.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,i)}},o=function(){a&&(a.show(),r(),d.addClass(s.getBody(),"mce-edit-focus"))},l=function(){a&&(a.hide(),h.hideAll(),d.removeClass(s.getBody(),"mce-edit-focus"))},c=function(){a?a.visible()||o():(a=e.panel=u.create({type:n?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!n,border:1,items:[!1===i.menubar?null:{type:"menubar",border:"0 0 1 0",items:p.createMenuButtons(s)},f.createToolbars(s,i.toolbar_items_size)]}),s.fire("BeforeRenderUI"),a.renderTo(n||document.body).reflow(),g.addKeys(s,a),o(),m.addContextualToolbars(s),s.on("nodeChange",r),s.on("activate",o),s.on("deactivate",l),s.nodeChanged())};return i.content_editable=!0,s.on("focus",function(){t.skinUiCss?d.styleSheetLoader.load(t.skinUiCss,c,c):c()}),s.on("blur hide",l),s.on("remove",function(){a&&(a.remove(),a=null)}),t.skinUiCss&&d.styleSheetLoader.load(t.skinUiCss,v.fireSkinLoaded(s)),{}}}}),t("global!tinymce.ui.Throbber",tinymce.ui.Throbber),n("tinymce.modern.ui.ProgressState",["global!tinymce.ui.Throbber"],function(i){return{setup:function(e,t){var n;e.on("ProgressState",function(e){n=n||new i(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})}}}),n("tinymce.modern.Theme",["global!tinymce.Env","global!tinymce.EditorManager","global!tinymce.ThemeManager","tinymce.modern.modes.Iframe","tinymce.modern.modes.Inline","tinymce.modern.ui.Resize","tinymce.modern.ui.ProgressState"],function(s,a,e,l,c,i,u){return e.add("modern",function(n){return{renderUI:function(e){return function(e,t,n){var i=e.settings,r=!1!==i.skin&&(i.skin||"lightgray");if(r){var o=i.skin_url;o=o?e.documentBaseURI.toAbsolute(o):a.baseURL+"/skins/"+r,s.documentMode<=7?n.skinUiCss=o+"/skin.ie7.min.css":n.skinUiCss=o+"/skin.min.css",e.contentCSS.push(o+"/content"+(e.inline?".inline":"")+".min.css")}return u.setup(e,t),i.inline?c.render(e,t,n):l.render(e,t,n)}(n,this,e)},resizeTo:function(e,t){return i.resizeTo(n,e,t)},resizeBy:function(e,t){return i.resizeBy(n,e,t)}}}),function(){}}),c("tinymce.modern.Theme")()}(),tinymce.PluginManager.add("link",function(y){var b={};function o(e){return e&&"A"===e.nodeName&&e.href}function n(e){return 0<tinymce.util.Tools.grep(e,o).length}function i(e){return y.dom.getParent(e,"a[href]")}function r(){return i(y.selection.getStart())}function s(e){if(!tinymce.Env.ie||10<tinymce.Env.ie){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),o=t,s=n,document.body.appendChild(o),o.dispatchEvent(s),document.body.removeChild(o)}else{var i=window.open("","_blank");if(i){i.opener=null;var r=i.document;r.open(),r.write('<meta http-equiv="refresh" content="0; url='+tinymce.DOM.encode(e)+'">'),r.close()}}var o,s}function a(e){if(e){var t=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(t)){var n=y.$(t);n.length&&y.selection.scrollIntoView(n[0],!0)}else s(e.href)}var i}function e(){a(r())}function t(t){return function(){var e=y.settings.link_list;"string"==typeof e?tinymce.util.XHR.send({url:e,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof e?e(t):t(e)}}function _(e,r,t){return function n(e,i){return i=i||[],tinymce.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,r&&r(t)),i.push(t)}),i}(e,t||[])}function l(e){var t,o,s,i,a,n,r,l,c,u,d,h,f={},p=y.selection,m=y.dom;function g(e){var t=i.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),i.find("#href").value(e.control.value())}function v(){!s&&0===f.text.length&&a&&this.parent().parent().find("#text")[0].value(this.value())}t=p.getNode(),o=m.getParent(t,"a[href]"),a=function(e){var t=p.getContent();if(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1==t.indexOf("href=")))return!1;if(e){var n,i=e.childNodes;if(0===i.length)return!1;for(n=i.length-1;0<=n;n--)if(3!=i[n].nodeType)return!1}return!0}(),f.text=s=o?o.innerText||o.textContent:p.getContent({format:"text"}),f.href=o?m.getAttrib(o,"href"):"",o?f.target=m.getAttrib(o,"target"):y.settings.default_link_target&&(f.target=y.settings.default_link_target),(h=m.getAttrib(o,"rel"))&&(f.rel=h),(h=m.getAttrib(o,"class"))&&(f.class=h),(h=m.getAttrib(o,"title"))&&(f.title=h),a&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){f.text=this.value()}}),e&&(r={type:"listbox",label:"Link list",values:_(e,function(e){e.value=y.convertURL(e.value||e.url,"href")},[{text:"None",value:""}]),onselect:g,value:y.convertURL(f.href,"href"),onPostRender:function(){r=this}}),!1!==y.settings.target_list&&(y.settings.target_list||(y.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:_(y.settings.target_list)}),y.settings.rel_list&&(l={name:"rel",type:"listbox",label:"Rel",values:_(y.settings.rel_list)}),y.settings.link_class_list&&(u={name:"class",type:"listbox",label:"Class",values:_(y.settings.link_class_list,function(e){e.value&&(e.textStyle=function(){return y.formatter.getCssText({inline:"a",classes:[e.value]})})})}),!1!==y.settings.link_title&&(d={name:"title",type:"textbox",label:"Title",value:f.title}),i=y.windowManager.open({title:"Insert link",data:f,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(e){var t=e.meta||{};r&&r.value(y.convertURL(this.value(),"href")),tinymce.each(e.meta,function(e,t){var n=i.find("#"+t);"text"===t?0===s.length&&(n.value(e),f.text=e):n.value(e)}),t.attach&&(b={href:this.value(),attach:t.attach}),t.text||v.call(this)},onkeyup:v,onbeforecall:function(e){e.meta=i.toJSON()}},n,d,function(n){var i=[];if(tinymce.each(y.dom.select("a:not([href])"),function(e){var t=e.name||e.id;t&&i.push({text:t,value:"#"+t,selected:-1!=n.indexOf("#"+t)})}),i.length)return i.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:i,onselect:g}}(f.href),r,l,c,u],onSubmit:function(e){var t;function n(e,t){var n=y.selection.getRng();tinymce.util.Delay.setEditorTimeout(y,function(){y.windowManager.confirm(e,function(e){y.selection.setRng(n),t(e)})})}function i(){var e={href:t,target:f.target?f.target:null,rel:f.rel?f.rel:null,class:f.class?f.class:null,title:f.title?f.title:null};y.settings.allow_unsafe_link_target||(e.rel=function(e,t){var n,i="noopener noreferrer";function r(e){var t=new RegExp("("+i.replace(" ","|")+")","g");return e&&(e=tinymce.trim(e.replace(t,""))),e||null}return t?(n=r(n=e))?[n,i].join(" "):i:r(e)}(e.rel,"_blank"==e.target)),t===b.href&&(b.attach(),b={}),o?(y.focus(),a&&f.text!=s&&("innerText"in o?o.innerText=f.text:o.textContent=f.text),m.setAttribs(o,e),p.select(o),y.undoManager.add()):a?y.insertContent(m.createHTML("a",e,m.encode(f.text))):y.execCommand("mceInsertLink",!1,e)}function r(){y.undoManager.transact(i)}f=tinymce.extend(f,e.data),(t=f.href)?0<t.indexOf("@")&&-1==t.indexOf("//")&&-1==t.indexOf("mailto:")?n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(t="mailto:"+t),r()}):y.settings.link_assume_external_targets&&!/^\w+:/i.test(t)||!y.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(t)?n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(t="http://"+t),r()}):r():y.execCommand("unlink")}})}y.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:t(l),stateSelector:"a[href]"}),y.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),y.addContextToolbar&&(y.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:e}),y.addContextToolbar(function(e){var t,n,i,r;return!!(y.settings.link_context_toolbar&&(!(r=y.plugins.contextmenu)||!r.isContextMenuVisible())&&o(e)&&3==(i=(n=(t=y.selection).getRng()).startContainer).nodeType&&t.isCollapsed()&&0<n.startOffset&&n.startOffset<i.data.length)},"openlink | link unlink")),y.addShortcut("Meta+K","",t(l)),y.addCommand("mceLink",t(l)),y.on("click",function(e){var t=i(e.target);t&&tinymce.util.VK.metaKeyPressed(e)&&(e.preventDefault(),a(t))}),y.on("keydown",function(e){var t,n=r();n&&13===e.keyCode&&(!0===(t=e).altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey)&&(e.preventDefault(),a(n))}),this.showDialog=l,y.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:e,onPostRender:function(){var t=this,e=function(e){n(e.parents)?t.show():t.hide()};n(y.dom.getParents(y.selection.getStart()))||t.hide(),y.on("nodechange",e),t.on("remove",function(){y.off("nodechange",e)})},prependToContext:!0}),y.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:t(l),stateSelector:"a[href]",context:"insert",prependToContext:!0})}),tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")}),e.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}),function(a,e){"use strict";var l={};function t(e,t,n){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(void 0===t)throw"invalid module definition, dependencies must be specified";if(void 0===n)throw"invalid module definition, definition function must be specified";!function(e,t){for(var n,i=[],r=0;r<e.length;++r){if(!(n=l[e[r]]||o(e[r])))throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}(t,function(){l[e]=n.apply(null,arguments)})}function o(e){for(var t=a,n=e.split(/[.\/]/),i=0;i<n.length;++i){if(!t[n[i]])return;t=t[n[i]]}return t}t("tinymce/pasteplugin/Utils",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema"],function(i,l,c){function u(t,e){return i.each(e,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}return{filter:u,innerText:function(e){var t=new c,n=new l({},t),r="",o=t.getShortEndedElements(),s=i.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements();return e=u(e,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,i=t;if("br"!==n)if(o[n]&&(r+=" "),s[n])r+=" ";else{if(3==t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))for(;e(t),t=t.next;);a[n]&&i.next&&(r+="\n","p"==n&&(r+="\n"))}else r+="\n"}(n.parse(e)),r},trimHtml:function(e){return e=u(function(e){var t="\x3c!--StartFragment--\x3e",n="\x3c!--EndFragment--\x3e",i=e.indexOf(t);if(-1!==i){var r=e.substr(i+t.length),o=r.indexOf(n);if(-1!==o&&/^<\/(p|h[1-6]|li)>/i.test(r.substr(o+n.length,5)))return r.substr(0,o)}return e}(e),[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}}}),t("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(r){var s=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},a=function(e){return s(e)&&/.(gif|jpe?g|png)$/.test(e)},o=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!s(t))&&(r=t,o=n,(i=e).undoManager.extra(function(){o(i,r)},function(){i.execCommand("mceInsertLink",!1,r)}),!0);var i,r,o},l=function(e,t,n){return!!a(t)&&(r=t,o=n,(i=e).undoManager.extra(function(){o(i,r)},function(){i.insertContent('<img src="'+r+'">')}),!0);var i,r,o},c=function(e,t){return e.insertContent(t,{merge:!1!==e.settings.paste_merge_formats,paste:!0}),!0};return{isImageUrl:a,isAbsoluteUrl:s,insertContent:function(e,t){var n,i;!1===e.settings.smart_paste?c(e,t):(n=e,i=t,r.each([o,l,c],function(e){return!0!==e(n,i,c)}))}}}),t("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/util/Tools","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(T,S,t,E,N,r,D){return function(f){var c,u,d,h=this,p=0,s=!1,a="%MCEPASTEBIN%",o="data:text/mce-internal,",m=N.createIdGenerator("mceclip");function g(e){var t,n=f.dom;if(t=f.fire("BeforePastePreProcess",{content:e}),e=(t=f.fire("PastePreProcess",t)).content,!t.isDefaultPrevented()){if(f.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var i=n.add(f.getBody(),"div",{style:"display:none"},e);t=f.fire("PastePostProcess",{node:i}),n.remove(i),e=t.node.innerHTML}t.isDefaultPrevented()||r.insertContent(f,e)}}function v(e){e=f.dom.encode(e).replace(/\r\n/g,"\n");var t,n=f.dom.getParent(f.selection.getStart(),f.dom.isBlock),i=f.settings.forced_root_block;i&&(t=(t=f.dom.createHTML(i,f.settings.forced_root_block_attrs)).substr(0,t.length-3)+">"),n&&/^(PRE|DIV)$/.test(n.nodeName)||!i?e=N.filter(e,[[/\n/g,"<br>"]]):-1!=(e=N.filter(e,[[/\n\n/g,"</p>"+t],[/^(.*<\/p>)(<p>)$/,t+"$1"],[/\n/g,"<br />"]])).indexOf("<p>")&&(e=t+e),g(e)}function y(){var e,o=f.dom,t=f.getBody(),n=f.dom.getViewPort(f.getWin()).y,i=20;if(u=f.selection.getRng(),f.inline&&(e=f.selection.getScrollContainer())&&0<e.scrollTop&&(n=e.scrollTop),u.getClientRects){var r=function(e){var t,n,i,r=e.startContainer;if((t=e.getClientRects()).length)return t[0];if(e.collapsed&&1==r.nodeType){for(i=r.childNodes[u.startOffset];i&&3==i.nodeType&&!i.data.length;)i=i.nextSibling;if(i)return"BR"==i.tagName&&(n=o.doc.createTextNode("\ufeff"),i.parentNode.insertBefore(n,i),(e=o.createRng()).setStartBefore(n),e.setEndAfter(n),t=e.getClientRects(),o.remove(n)),t.length?t[0]:void 0}}(u);if(r)i=n+(r.top-o.getPos(t).y);else{i=n;var s=u.startContainer;s&&(3==s.nodeType&&s.parentNode!=t&&(s=s.parentNode),1==s.nodeType&&(i=o.getPos(s,e||t).y))}}c=o.add(f.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},a),(T.ie||T.gecko)&&o.setStyle(c,"left","rtl"==o.getStyle(t,"direction",!0)?65535:-65535),o.bind(c,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),c.focus(),f.selection.select(c,!0)}function b(){if(c){for(var e;e=f.dom.get("mcepastebin");)f.dom.remove(e),f.dom.unbind(e);u&&f.selection.setRng(u)}c=u=null}function _(){var e,t,n,i,r="";for(e=f.dom.select("div[id=mcepastebin]"),t=0;t<e.length;t++)(n=e[t]).firstChild&&"mcepastebin"==n.firstChild.id&&(n=n.firstChild),i=n.innerHTML,r!=a&&(r+=i);return r}function x(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&-1==n.indexOf(o)&&(t["text/plain"]=n)}if(e.types)for(var i=0;i<e.types.length;i++){var r=e.types[i];t[r]=e.getData(r)}}return t}function w(e){return k(e,"text/html")||k(e,"text/plain")}function l(e,t,n){e&&(f.selection.setRng(e),e=null);var i,r,o,s,a=t.result,l=-1!==(r=(i=a).indexOf(","))?i.substr(r+1):null,c=new Image;if(c.src=a,o=f.settings,s=c,!o.images_dataimg_filter||o.images_dataimg_filter(s)){var u,d,h=f.editorUpload.blobCache;(d=h.findFirst(function(e){return e.base64()===l}))?u=d:(u=h.create(m(),n,l),h.add(u)),g('<img src="'+u.blobUri()+'">')}else g('<img src="'+a+'">')}function C(s,a){var e=s.clipboardData||s.dataTransfer;function t(e){var t,n,i,r=!1;if(e)for(t=0;t<e.length;t++)if(n=e[t],/^image\/(jpeg|png|gif|bmp)$/.test(n.type)){var o=n.getAsFile?n.getAsFile():n;(i=new FileReader).onload=l.bind(null,a,i,o),i.readAsDataURL(o),s.preventDefault(),r=!0}return r}if(f.settings.paste_data_images&&e)return t(e.items)||t(e.files)}function k(e,t){return t in e&&0<e[t].length}function n(e){return t.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function e(){function l(e,t,n){var i;k(e,"text/html")?i=e["text/html"]:(i=_())==a&&(n=!0),i=N.trimHtml(i),c&&c.firstChild&&"mcepastebin"===c.firstChild.id&&(n=!0),b(),i.length||(n=!0),n&&(i=k(e,"text/plain")&&-1==i.indexOf("</p>")?e["text/plain"]:N.innerText(i)),i!=a?n?v(i):g(i):t||f.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")}f.on("keydown",function(e){function t(e){n(e)&&!e.isDefaultPrevented()&&b()}if(n(e)&&!e.isDefaultPrevented()){if((d=e.shiftKey&&86==e.keyCode)&&T.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),p=(new Date).getTime(),T.ie&&d)return e.preventDefault(),void f.fire("paste",{ieFake:!0});b(),y(),f.once("keyup",t),f.once("paste",function(){f.off("keyup",t)})}});f.on("paste",function(e){var t,n,i=(new Date).getTime(),r=(t=x(e.clipboardData||f.getDoc().dataTransfer),N.isMsEdge()?E.extend(t,{"text/html":""}):t),o=(new Date).getTime()-i,s=(new Date).getTime()-p-o<1e3,a="text"==h.pasteFormat||d;(d=!1,e.isDefaultPrevented()||(n=e.clipboardData,-1!=navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length))?b():w(r)||!C(e,u||f.selection.getRng())?(s||e.preventDefault(),!T.ie||s&&!e.ieFake||(y(),f.dom.bind(c,"paste",function(e){e.stopPropagation()}),f.getDoc().execCommand("Paste",!1,null),r["text/html"]=_()),k(r,"text/html")?(e.preventDefault(),l(r,s,a)):D.setEditorTimeout(f,function(){l(r,s,a)},0)):b()}),f.on("dragstart dragend",function(e){s="dragstart"==e.type}),f.on("drop",function(e){var t,n,i,r;if((i=e,n=S.getCaretRangeFromPoint(i.clientX,i.clientY,f.getDoc()),!e.isDefaultPrevented()&&!s)&&((w(t=x(e.dataTransfer))&&(!(r=t["text/plain"])||0!==r.indexOf("file://"))||!C(e,n))&&n&&!1!==f.settings.paste_filter_drop)){var o=t["mce-internal"]||t["text/html"]||t["text/plain"];o&&(e.preventDefault(),D.setEditorTimeout(f,function(){f.undoManager.transact(function(){t["mce-internal"]&&f.execCommand("Delete"),f.selection.setRng(n),o=N.trimHtml(o),t["text/html"]?g(o):v(o)})}))}}),f.on("dragover dragend",function(e){f.settings.paste_data_images&&e.preventDefault()})}h.pasteHtml=g,h.pasteText=v,h.pasteImageData=C,f.on("preInit",function(){e(),f.parser.addNodeFilter("img",function(e,t,n){function i(e){e.attr("data-mce-object")||o===T.transparentSrc||e.remove()}if(!f.settings.paste_data_images&&((s=n).data&&!0===s.data.paste))for(var r=e.length;r--;){var o=e[r].attributes.map.src;o&&(0===o.indexOf("webkit-fake-url")?i(e[r]):f.settings.allow_html_data_urls||0!==o.indexOf("data:")||i(e[r]))}var s})})}}),t("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(d,h,f,p,m,g){function v(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function y(t){var n,e;return e=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),d.each(e,function(e){if(e.test(t))return!(n=!0)}),n}function e(c){var u=c.settings;c.on("BeforePastePreProcess",function(e){var s,a,t=e.content;function i(n,i){var r,o={},e=c.dom.parseStyle(i);return d.each(e,function(e,t){switch(t){case"mso-list":(r=/\w+ \w+([0-9]+)/i.exec(i))&&(n._listLevel=parseInt(r[1],10)),/Ignore/i.test(e)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(o[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void n.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"==s||a&&a[t])&&(o[t]=e):n.remove()}),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],n.wrap(new m("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],n.wrap(new m("i",1))),(o=c.dom.serializeStyle(o,n.name))||null}if(t=(t=t.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,"")).replace(/<br class="?Apple-interchange-newline"?>/gi,""),(s=u.paste_retain_style_properties)&&(a=d.makeMap(s.split(/[, ]/))),!1!==u.paste_enable_default_filters&&v(e.content)){e.wordContent=!0,t=g.filter(t,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var n=u.paste_word_valid_elements;n||(n="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var r=new f({valid_elements:n,valid_children:"-li[p]"});d.each(r.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var o=new h({},r);o.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",i(t,t.attr("style"))),"span"==t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),o.addAttributeFilter("class",function(e){for(var t,n,i=e.length;i--;)n=(t=e[i]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),o.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),o.addNodeFilter("a",function(e){for(var t,n,i,r=e.length;r--;)if(n=(t=e[r]).attr("href"),i=t.attr("name"),n&&-1!=n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||i){if(i&&!/^_?(?:toc|edn|ftn)/i.test(i)){t.unwrap();continue}t.attr({href:n,name:i})}else t.unwrap()});var l=o.parse(t);!1!==u.paste_convert_word_fake_lists&&function(e){var r,o,s=1;function n(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t}function a(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!a(e,t))return!1}while(e=e.next);return!0}function t(e,t,n){var i=e._listLevel||s;i!=s&&(i<s?r&&(r=r.parent.parent):(o=r,r=null)),r&&r.name==t?r.append(e):(o=o||r,r=new m(t,1),1<n&&r.attr("start",""+n),e.wrap(r)),e.name="li",s<i&&o&&o.lastChild.append(r),s=i,function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;e(t),t=t.next;);}(e),a(e,/^\u00a0+/),a(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),a(e,/^\u00a0+/)}for(var i=[],l=e.firstChild;null!=l;)if(i.push(l),null!==(l=l.walk()))for(;void 0!==l&&l.parent!==e;)l=l.walk();for(var c=0;c<i.length;c++)if("p"==(e=i[c]).name&&e.firstChild){var u=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(u)){t(e,"ul");continue}if(y(u)){var d=/([0-9]+)\./.exec(u),h=1;d&&(h=parseInt(d[1],10)),t(e,"ol",h);continue}if(e._listLevel){t(e,"ul",1);continue}r=null}else o=r,r=null}(l),e.content=new p({validate:u.validate},r).serialize(l)}})}return e.isWordContent=v,e}),t("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(n,r,o,s){return function(i){function e(t){i.on("BeforePastePreProcess",function(e){e.content=t(e.content)})}var t;n.webkit&&e(function(e){if(o.isWordContent(e))return e;var c=i.settings.paste_webkit_styles;if(!1===i.settings.paste_remove_styles_if_webkit||"all"==c)return e;if(c&&(c=c.split(/[, ]/)),c){var u=i.dom,d=i.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,i){var r=u.parseStyle(n,"span"),o={};if("none"===c)return t+i;for(var s=0;s<c.length;s++){var a=r[c[s]],l=u.getStyle(d,c[s],!0);/color/.test(c[s])&&(a=u.toHex(a),l=u.toHex(l)),l!=a&&(o[c[s]]=a)}return(o=u.serializeStyle(o,"span"))?t+' style="'+o+'"'+i:t+i})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i){return t+' style="'+n+'"'+i})}),n.ie&&(e(function(e){if(!o.isWordContent(e))return e;var n=[];r.each(i.schema.getBlockElements(),function(e,t){n.push(t)});var t=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=s.filter(e,[[t,"$1"]]),e=s.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}),t=function(e){i.$("a",e).find("font,u").each(function(e,t){i.dom.remove(t,!0)})},i.on("PastePostProcess",function(e){t(e.node)}))}}),t("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(s,a,l,c){var u;s.add("paste",function(n){var i,r=this,t=n.settings;function e(){if("text"==i.pasteFormat)i.pasteFormat="html",n.fire("PastePlainTextToggle",{state:!1});else if(i.pasteFormat="text",n.fire("PastePlainTextToggle",{state:!0}),!u&&!1!==n.settings.paste_plaintext_inform){var e=n.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");n.notificationManager.open({text:e,type:"info"}),u=!0}n.focus()}function o(){var t=this;t.active("text"===i.pasteFormat),n.on("PastePlainTextToggle",function(e){t.active(e.state)})}/(^|[ ,])powerpaste([, ]|$)/.test(t.plugins)&&s.get("powerpaste")?"undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."):(r.clipboard=i=new a(n),r.quirks=new c(n),r.wordFilter=new l(n),n.settings.paste_as_text&&(r.clipboard.pasteFormat="text"),t.paste_preprocess&&n.on("PastePreProcess",function(e){t.paste_preprocess.call(r,r,e)}),t.paste_postprocess&&n.on("PastePostProcess",function(e){t.paste_postprocess.call(r,r,e)}),n.addCommand("mceInsertClipboardContent",function(e,t){t.content&&r.clipboard.pasteHtml(t.content),t.text&&r.clipboard.pasteText(t.text)}),n.settings.paste_block_drop&&n.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),n.settings.paste_data_images||n.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),n.addCommand("mceTogglePlainTextPaste",e),n.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:e,onPostRender:o}),n.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:i.pasteFormat,onclick:e,onPostRender:o}))})}),function(e){var t,n,i,r,o;for(t=0;t<e.length;t++){n=a,r=(i=e[t]).split(/[.\/]/);for(var s=0;s<r.length-1;++s)void 0===n[r[s]]&&(n[r[s]]={}),n=n[r[s]];n[r[r.length-1]]=l[i]}if(a.AMDLC_TESTS){for(i in o=a.privateModules||{},l)o[i]=l[i];for(t=0;t<e.length;t++)delete o[e[t]];a.privateModules=o}}(["tinymce/pasteplugin/Utils"])}(window),function(){var l={},e=function(e,t,n){if("string"!=typeof e)throw"module id must be a string";if(void 0===t)throw"no dependencies for "+e;if(void 0===n)throw"no definition function for "+e;l[e]={deps:t,defn:n,instance:void 0}},c=function(e){var t=l[e];if(void 0===t)throw"module ["+e+"] was undefined";return void 0===t.instance&&function(e){for(var t=l[e],n=t.deps,i=t.defn,r=n.length,o=new Array(r),s=0;s<r;++s)o[s]=c(n[s]);var a=i.apply(null,o);if(void 0===a)throw"module ["+e+"] returned undefined";t.instance=a}(e),t.instance},n=e,t=function(e,t){n(e,[],function(){return t})};t("global!tinymce.PluginManager",tinymce.PluginManager),t("global!tinymce.util.Tools",tinymce.util.Tools),t("global!tinymce.util.VK",tinymce.util.VK),n("tinymce.lists.core.NodeType",[],function(){var n=function(e){return e&&"BR"===e.nodeName};return{isTextNode:function(e){return e&&3===e.nodeType},isListNode:function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},isListItemNode:function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},isBr:n,isFirstChild:function(e){return e.parentNode.firstChild===e},isLastChild:function(e){return e.parentNode.lastChild===e},isTextBlock:function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},isBogusBr:function(e,t){return!!n(t)&&!(!e.isBlock(t.nextSibling)||n(t.previousSibling))},isEmpty:function(e,t,n){var i=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&i},isChildOfBody:function(e,t){return e.isChildOf(t,e.getRoot())}}}),t("global!tinymce.dom.TreeWalker",tinymce.dom.TreeWalker),t("global!tinymce.dom.RangeUtils",tinymce.dom.RangeUtils),n("tinymce.lists.core.Selection",["global!tinymce.util.Tools","tinymce.lists.core.NodeType"],function(t,n){return{getSelectedListItems:function(e){return t.grep(e.selection.getSelectedBlocks(),function(e){return n.isListItemNode(e)})}}}),t("global!tinymce.dom.DOMUtils.DOM",tinymce.dom.DOMUtils.DOM),n("tinymce.lists.core.Range",["global!tinymce.dom.RangeUtils","tinymce.lists.core.NodeType"],function(i,r){var o=function(e,t){var n=i.getNode(e,t);return r.isListItemNode(e)&&r.isTextNode(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:{container:e,offset:t}};return{getNormalizedEndPoint:o,normalizeRange:function(e){var t=e.cloneRange(),n=o(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var i=o(e.endContainer,e.endOffset);return t.setEnd(i.container,i.offset),t}}}),n("tinymce.lists.core.Bookmark",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Range"],function(s,e,n){return{createBookmark:function(r){var o={},e=function(e){var t,n,i;n=r[e?"startContainer":"endContainer"],i=r[e?"startOffset":"endOffset"],1===n.nodeType&&(t=s.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(i=Math.min(i,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[i]):s.insertAfter(t,n.childNodes[i])):n.appendChild(t),n=t,i=0),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=i};return e(!0),r.collapsed||e(),o},resolveBookmark:function(r){function e(e){var t,n,i;t=i=r[e?"startContainer":"endContainer"],n=r[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,s.remove(i)),r[e?"startContainer":"endContainer"]=t,r[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=s.createRng();return t.setStart(r.startContainer,r.startOffset),r.endContainer&&t.setEnd(r.endContainer,r.endOffset),n.normalizeRange(t)}}}),n("tinymce.lists.core.NormalizeLists",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.util.Tools","tinymce.lists.core.NodeType"],function(r,n,o){var i=function(e,t){var n,i=t.parentNode;"LI"===i.nodeName&&i.firstChild===t&&((n=i.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),o.isEmpty(e,i)&&r.remove(i)):r.setStyle(i,"listStyleType","none")),o.isListNode(i)&&(n=i.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)};return{normalizeList:i,normalizeLists:function(t,e){n.each(n.grep(t.select("ol,ul",e)),function(e){i(t,e)})}}}),t("global!tinymce.dom.BookmarkManager",tinymce.dom.BookmarkManager),t("global!tinymce.Env",tinymce.Env),n("tinymce.lists.core.TextBlock",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.Env"],function(c,u){return{createNewTextBlock:function(e,t,n){var i,r,o,s=c.createFragment(),a=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((r=c.create(n)).tagName===e.settings.forced_root_block&&c.setAttribs(r,e.settings.forced_root_block_attrs),s.appendChild(r)),t)for(;i=t.firstChild;){var l=i.nodeName;o||"SPAN"===l&&"bookmark"===i.getAttribute("data-mce-type")||(o=!0),a[l]?(s.appendChild(i),r=null):n?(r||(r=c.create(n),s.appendChild(r)),r.appendChild(i)):s.appendChild(i)}return e.settings.forced_root_block?o||u.ie&&!(10<u.ie)||r.appendChild(c.create("br",{"data-mce-bogus":"1"})):s.appendChild(c.create("br")),s}}}),n("tinymce.lists.core.SplitList",["global!tinymce.dom.DOMUtils.DOM","global!tinymce.util.Tools","tinymce.lists.core.TextBlock","tinymce.lists.core.NodeType"],function(c,u,d,h){return{splitList:function(e,t,n,i){var r,o,s,a,l;for(s=c.select('span[data-mce-type="bookmark"]',t),i=i||d.createNewTextBlock(e,n),(r=c.createRng()).setStartAfter(n),r.setEndAfter(t),a=(o=r.extractContents()).firstChild;a;a=a.firstChild)if("LI"===a.nodeName&&e.dom.isEmpty(a)){c.remove(a);break}e.dom.isEmpty(o)||c.insertAfter(o,t),c.insertAfter(i,t),h.isEmpty(e.dom,n.parentNode)&&(l=n.parentNode,u.each(s,function(e){l.parentNode.insertBefore(e,n.parentNode)}),c.remove(l)),c.remove(n),h.isEmpty(e.dom,t)&&c.remove(t)}}}),n("tinymce.lists.actions.Outdent",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Selection","tinymce.lists.core.SplitList","tinymce.lists.core.NormalizeLists","tinymce.lists.core.TextBlock"],function(o,s,a,l,c,u,d){var h=function(e,t){s.isEmpty(e,t)&&o.remove(t)},f=function(e,t){var n,i=t.parentNode,r=i.parentNode;return i===e.getBody()||("DD"===t.nodeName?o.rename(t,"DT"):s.isFirstChild(t)&&s.isLastChild(t)?"LI"===r.nodeName?(o.insertAfter(t,r),h(e.dom,r),o.remove(i)):s.isListNode(r)?o.remove(i,!0):(r.insertBefore(d.createNewTextBlock(e,t),i),o.remove(i)):s.isFirstChild(t)?"LI"===r.nodeName?(o.insertAfter(t,r),t.appendChild(i),h(e.dom,r)):s.isListNode(r)?r.insertBefore(t,i):(r.insertBefore(d.createNewTextBlock(e,t),i),o.remove(t)):s.isLastChild(t)?"LI"===r.nodeName?o.insertAfter(t,r):s.isListNode(r)?o.insertAfter(t,i):(o.insertAfter(d.createNewTextBlock(e,t),i),o.remove(t)):(n="LI"===r.nodeName?(i=r,d.createNewTextBlock(e,t,"LI")):s.isListNode(r)?d.createNewTextBlock(e,t,"LI"):d.createNewTextBlock(e,t),c.splitList(e,i,t,n),u.normalizeLists(e.dom,i.parentNode))),!0};return{outdent:f,outdentSelection:function(e){var t=l.getSelectedListItems(e);if(t.length){var n,i,r=a.createBookmark(e.selection.getRng(!0)),o=e.getBody();for(n=t.length;n--;)for(var s=t[n].parentNode;s&&s!==o;){for(i=t.length;i--;)if(t[i]===s){t.splice(n,1);break}s=s.parentNode}for(n=0;n<t.length&&(f(e,t[n])||0!==n);n++);return e.selection.setRng(a.resolveBookmark(r)),e.nodeChanged(),!0}}}}),n("tinymce.lists.actions.ToggleList",["global!tinymce.util.Tools","global!tinymce.dom.BookmarkManager","tinymce.lists.core.Selection","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.SplitList","tinymce.lists.core.NormalizeLists","tinymce.lists.actions.Outdent"],function(d,h,o,f,p,s,a,l){var u=function(n,e){d.each(e,function(e,t){n.setAttribute(t,e)})},m=function(e,t,n){var i,r,o,s,a,l,c;i=e,r=t,s=(o=n)["list-style-type"]?o["list-style-type"]:null,i.setStyle(r,"list-style-type",s),a=e,u(l=t,(c=n)["list-attributes"]),d.each(a.select("li",l),function(e){u(e,c["list-item-attributes"])})},g=function(e,t,n){var i,r,o=e.getBody();for(i=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"],1===i.nodeType&&(i=i.childNodes[Math.min(r,i.childNodes.length-1)]||i);i.parentNode!==o;){if(f.isTextBlock(e,i))return i;if(/^(TD|TH)$/.test(i.parentNode.nodeName))return i;i=i.parentNode}return i},c=function(s,a,l){var e,t=s.selection.getRng(!0),c="LI",u=s.dom;l=l||{},"false"!==u.getContentEditable(s.selection.getNode())&&("DL"===(a=a.toUpperCase())&&(c="DT"),e=p.createBookmark(t),d.each(function(n,e){for(var i,r=[],o=n.getBody(),s=n.dom,t=g(n,e,!0),a=g(n,e,!1),l=[],c=t;c&&(l.push(c),c!==a);c=c.nextSibling);return d.each(l,function(e){if(f.isTextBlock(n,e))return r.push(e),void(i=null);if(s.isBlock(e)||f.isBr(e))return f.isBr(e)&&s.remove(e),void(i=null);var t=e.nextSibling;h.isBookmarkNode(e)&&(f.isTextBlock(n,t)||!t&&e.parentNode===o)?i=null:(i||(i=s.create("p"),e.parentNode.insertBefore(i,e),r.push(i)),i.appendChild(e))}),r}(s,t),function(e){var t,n,i,r,o;(n=e.previousSibling)&&f.isListNode(n)&&n.nodeName===a&&(i=n,r=u.getStyle(i,"list-style-type"),o=l?l["list-style-type"]:"",r===(o=null===o?"":o))?(t=n,e=u.rename(e,c),n.appendChild(e)):(t=u.create(a),e.parentNode.insertBefore(t,e),t.appendChild(e),e=u.rename(e,c)),m(u,t,l),y(s.dom,t)}),s.selection.setRng(p.resolveBookmark(e)))},v=function(i){var e=p.createBookmark(i.selection.getRng(!0)),r=i.getBody(),t=o.getSelectedListItems(i),n=d.grep(t,function(e){return i.dom.isEmpty(e)});t=d.grep(t,function(e){return!i.dom.isEmpty(e)}),d.each(n,function(e){f.isEmpty(i.dom,e)&&l.outdent(i,e)}),d.each(t,function(e){var t,n;if(e.parentNode!==i.getBody()){for(t=e;t&&t!==r;t=t.parentNode)f.isListNode(t)&&(n=t);s.splitList(i,n,e),a.normalizeLists(i.dom,n.parentNode)}}),i.selection.setRng(p.resolveBookmark(e))},r=function(e,t,n){return l=n,(a=t)&&l&&f.isListNode(a)&&a.nodeName===l.nodeName&&(o=t,s=n,(r=e).getStyle(o,"list-style-type",!0)===r.getStyle(s,"list-style-type",!0))&&(i=n,t.className===i.className);var i,r,o,s,a,l},y=function(e,t){var n,i;if(n=t.nextSibling,r(e,t,n)){for(;i=n.firstChild;)t.appendChild(i);e.remove(n)}if(n=t.previousSibling,r(e,t,n)){for(;i=n.lastChild;)t.insertBefore(i,t.firstChild);e.remove(n)}};return{toggleList:function(e,t,n){var i=e.dom.getParent(e.selection.getStart(),"OL,UL,DL");if(n=n||{},i!==e.getBody())if(i)if(i.nodeName===t)v(e);else{var r=p.createBookmark(e.selection.getRng(!0));m(e.dom,i,n),y(e.dom,e.dom.rename(i,t)),e.selection.setRng(p.resolveBookmark(r))}else c(e,t,n)},removeList:v,mergeWithAdjacentLists:y}}),n("tinymce.lists.core.Delete",["global!tinymce.dom.TreeWalker","global!tinymce.dom.RangeUtils","global!tinymce.util.VK","tinymce.lists.core.Selection","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Range","tinymce.lists.core.NormalizeLists","tinymce.lists.actions.ToggleList"],function(a,l,n,i,c,u,d,r,h){var f=function(e,t,n){var i,r,o=t.startContainer,s=t.startOffset;if(3===o.nodeType&&(n?s<o.data.length:0<s))return o;for(i=e.schema.getNonEmptyElements(),1===o.nodeType&&(o=l.getNode(o,s)),r=new a(o,e.getBody()),n&&c.isBogusBr(e.dom,o)&&r.next();o=r[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(i[o.nodeName])return o;if(3===o.nodeType&&0<o.data.length)return o}},p=function(e,t,n){var i,r,o=t.parentNode;if(c.isChildOfBody(e,t)&&c.isChildOfBody(e,n)){if(c.isListNode(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&c.isBr(o.previousSibling)&&e.remove(o.previousSibling),(i=n.lastChild)&&c.isBr(i)&&t.hasChildNodes()&&e.remove(i),c.isEmpty(e,n,!0)&&e.$(n).empty(),!c.isEmpty(e,t,!0))for(;i=t.firstChild;)n.appendChild(i);r&&n.appendChild(r),e.remove(t),c.isEmpty(e,o)&&o!==e.getRoot()&&e.remove(o)}},o=function(e,t){return function(e,t){var n,i,r,o=e.dom,s=e.selection,a=o.getParent(s.getStart(),"LI");if(a){if((n=a.parentNode)===e.getBody()&&c.isEmpty(o,n))return!0;if(i=d.normalizeRange(s.getRng(!0)),(r=o.getParent(f(e,i,t),"LI"))&&r!==a){var l=u.createBookmark(i);return t?p(o,r,a):p(o,a,r),e.selection.setRng(u.resolveBookmark(l)),!0}if(!r&&!t&&h.removeList(e,n.nodeName))return!0}return!1}(e,t)||function(e,t){var n=e.dom,i=n.getParent(e.selection.getStart(),n.isBlock);if(i&&n.isEmpty(i)){var r=d.normalizeRange(e.selection.getRng(!0)),o=n.getParent(f(e,r,t),"LI");if(o)return e.undoManager.transact(function(){n.remove(i),h.mergeWithAdjacentLists(n,o.parentNode),e.selection.select(o,!0),e.selection.collapse(t)}),!0}return!1}(e,t)},s=function(e,t){return e.selection.isCollapsed()?o(e,t):!!((n=e).dom.getParent(n.selection.getStart(),"LI,DT,DD")||0<i.getSelectedListItems(n).length)&&(n.undoManager.transact(function(){n.execCommand("Delete"),r.normalizeLists(n.dom,n.getBody())}),!0);var n};return{setup:function(t){t.on("keydown",function(e){e.keyCode===n.BACKSPACE?s(t,!1)&&e.preventDefault():e.keyCode===n.DELETE&&s(t,!0)&&e.preventDefault()})},backspaceDelete:s}}),n("tinymce.lists.actions.Indent",["global!tinymce.dom.DOMUtils.DOM","tinymce.lists.core.NodeType","tinymce.lists.core.Bookmark","tinymce.lists.core.Selection"],function(l,c,u,d){var h=function(e,t){var n;if(c.isListNode(e)){for(;n=e.firstChild;)t.appendChild(n);l.remove(e)}};return{indentSelection:function(e){var t,n,i,r,o=d.getSelectedListItems(e);if(o.length){for(var s=u.createBookmark(e.selection.getRng(!0)),a=0;a<o.length&&(t=o[a],r=i=n=void 0,("DT"===t.nodeName?(l.rename(t,"DD"),1):(n=t.previousSibling)&&c.isListNode(n)?(n.appendChild(t),1):n&&"LI"===n.nodeName&&c.isListNode(n.lastChild)?(n.lastChild.appendChild(t),h(t.lastChild,n.lastChild),1):(n=t.nextSibling)&&c.isListNode(n)?(n.insertBefore(t,n.firstChild),1):(n=t.previousSibling)&&"LI"===n.nodeName&&(i=l.create(t.parentNode.nodeName),(r=l.getStyle(t.parentNode,"listStyleType"))&&l.setStyle(i,"listStyleType",r),n.appendChild(i),i.appendChild(t),h(t.lastChild,i),1))||0!==a);a++);return e.selection.setRng(u.resolveBookmark(s)),e.nodeChanged(),!0}}}}),n("tinymce.lists.Plugin",["global!tinymce.PluginManager","global!tinymce.util.Tools","global!tinymce.util.VK","tinymce.lists.core.NodeType","tinymce.lists.core.Delete","tinymce.lists.actions.Indent","tinymce.lists.actions.Outdent","tinymce.lists.actions.ToggleList"],function(e,o,a,l,c,u,d,h){var f=function(t,n){return function(){var e=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===n}};return e.add("lists",function(n){var s,e,t,i,r;return r=function(i){return function(){var n=this;s.on("NodeChange",function(e){var t=o.grep(e.parents,l.isListNode);n.active(0<t.length&&t[0].nodeName===i)})}},t="advlist",i=(e=s=n).settings.plugins?e.settings.plugins:"",-1===o.inArray(i.split(/[ ,]/),t)&&(s.addButton("numlist",{title:"Numbered list",cmd:"InsertOrderedList",onPostRender:r("OL")}),s.addButton("bullist",{title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:r("UL")})),s.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(e){var o=e.control;s.on("nodechange",function(){for(var e=s.selection.getSelectedBlocks(),t=!1,n=0,i=e.length;!t&&n<i;n++){var r=e[n].nodeName;t="LI"===r&&l.isFirstChild(e[n])||"UL"===r||"OL"===r||"DD"===r}o.disabled(t)})}}),c.setup(n),n.on("init",function(){var i,e,t;(i=n).on("BeforeExecCommand",function(e){var t,n=e.command.toLowerCase();if("indent"===n?u.indentSelection(i)&&(t=!0):"outdent"===n&&d.outdentSelection(i)&&(t=!0),t)return i.fire("ExecCommand",{command:e.command}),e.preventDefault(),!0}),i.addCommand("InsertUnorderedList",function(e,t){h.toggleList(i,"UL",t)}),i.addCommand("InsertOrderedList",function(e,t){h.toggleList(i,"OL",t)}),i.addCommand("InsertDefinitionList",function(e,t){h.toggleList(i,"DL",t)}),(e=n).addQueryStateHandler("InsertUnorderedList",f(e,"UL")),e.addQueryStateHandler("InsertOrderedList",f(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",f(e,"DL")),(t=n).on("keydown",function(e){9!==e.keyCode||a.metaKeyPressed(e)||t.dom.getParent(t.selection.getStart(),"LI,DT,DD")&&(e.preventDefault(),e.shiftKey?d.outdentSelection(t):u.indentSelection(t))})}),{backspaceDelete:function(e){c.backspaceDelete(n,e)}}}),function(){}}),c("tinymce.lists.Plugin")()}(),tinymce.PluginManager.add("textcolor",function(d){var h,f;function e(){var e,t,n,i,r,o,s,a,l=this._id,c=0;function u(e,t){var n="transparent"==e;return'<td class="mce-grid-cell'+(n?" mce-colorbtn-trans":"")+'"><div id="'+l+"-"+c+++'" data-mce-color="'+(e||"")+'" role="option" tabIndex="-1" style="'+(e?"background-color: "+e:"")+'" title="'+tinymce.translate(t)+'">'+(n?"&#215;":"")+"</div></td>"}for((e=function(e){var t,n,i=[];for(n=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],n=d.settings.textcolor_map||n,n=d.settings[e+"_map"]||n,t=0;t<n.length;t+=2)i.push({text:n[t+1],color:"#"+n[t]});return i}(a=this.settings.origin)).push({text:tinymce.translate("No color"),color:"transparent"}),n='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',i=e.length-1,o=0;o<f[a];o++){for(n+="<tr>",r=0;r<h[a];r++)n+=i<(s=o*h[a]+r)?"<td></td>":u((t=e[s]).color,t.text);n+="</tr>"}if(d.settings.color_picker_callback){for(n+='<tr><td colspan="'+h[a]+'" class="mce-custom-color-btn"><div id="'+l+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+l+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",n+="<tr>",r=0;r<h[a];r++)n+=u("","Custom color");n+="</tr>"}return n+="</tbody></table>"}function r(e,t){d.undoManager.transact(function(){d.focus(),d.formatter.apply(e,{value:t}),d.nodeChanged()})}function c(e){d.undoManager.transact(function(){d.focus(),d.formatter.remove(e,{value:null},null,!0),d.nodeChanged()})}function t(e){var t,o,n,i,s=this.parent();function a(e){s.hidePanel(),s.color(e),r(s.settings.format,e)}function l(e,t){e.style.background=t,e.setAttribute("data-mce-color",t)}o=s.settings.origin,tinymce.DOM.getParent(e.target,".mce-custom-color-btn")&&(s.hidePanel(),d.settings.color_picker_callback.call(d,function(e){var t,n,i,r=s.panel.getEl().getElementsByTagName("table")[0];for(t=tinymce.map(r.rows[r.rows.length-1].childNodes,function(e){return e.firstChild}),i=0;i<t.length&&(n=t[i]).getAttribute("data-mce-color");i++);if(i==h[o])for(i=0;i<h[o]-1;i++)l(t[i],t[i+1].getAttribute("data-mce-color"));l(n,e),a(e)},(n=s.settings.format,d.dom.getParents(d.selection.getStart(),function(e){var t;(t=e.style["forecolor"==n?"color":"background-color"])&&(i=t)}),i))),(t=e.target.getAttribute("data-mce-color"))?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),e.target.setAttribute("aria-selected",!0),this.lastId=e.target.id,"transparent"==t?(s.hidePanel(),s.resetColor(),c(s.settings.format)):a(t)):null!==t&&s.hidePanel()}function n(){this._color?r(this.settings.format,this._color):c(this.settings.format)}f={forecolor:d.settings.forecolor_rows||d.settings.textcolor_rows||5,backcolor:d.settings.backcolor_rows||d.settings.textcolor_rows||5},h={forecolor:d.settings.forecolor_cols||d.settings.textcolor_cols||8,backcolor:d.settings.backcolor_cols||d.settings.textcolor_cols||8},d.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{origin:"forecolor",role:"application",ariaRemember:!0,html:e,onclick:t},onclick:n}),d.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{origin:"backcolor",role:"application",ariaRemember:!0,html:e,onclick:t},onclick:n})}),tinymce.PluginManager.add("code",function(t){function e(){t.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t.getParam("code_dialog_width",600),minHeight:t.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(e){t.focus(),t.undoManager.transact(function(){t.setContent(e.data.code)}),t.selection.setCursorLocation(),t.nodeChanged()}}).find("#code").value(t.getContent({source_view:!0}))}t.addCommand("mceCodeEditor",e),t.addButton("code",{icon:"code",tooltip:"Source code",onclick:e}),t.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:e})});
//# sourceMappingURL=mosaico-libs-and-tinymce.min.js.map