/*! jQuery v1.7.2 jquery.com | jquery.org/license */

//  Copyright (c) 2014 Evernote. All rights reserved.

/**
 * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

//  Copyright (c) 2015 Evernote. All rights reserved.

(function(e,t){function n(e){return H.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}function r(e){if(!vn[e]){var t=_.body,n=H("<"+e+">").appendTo(t),r=n.css("display");n.remove();if(r==="none"||r===""){mn||(mn=_.createElement("iframe"),mn.frameBorder=mn.width=mn.height=0),t.appendChild(mn);if(!gn||!mn.createElement)gn=(mn.contentWindow||mn.contentDocument).document,gn.write((H.support.boxModel?"<!doctype html>":"")+"<html><body>"),gn.close();n=gn.createElement(e),gn.body.appendChild(n),r=H.css(n,"display"),t.removeChild(mn)}vn[e]=r}return vn[e]}function i(e,t){var n={};return H.each(En.concat.apply([],En.slice(0,t)),function(){n[this]=e}),n}function s(){Sn=t}function o(){return setTimeout(s,0),Sn=H.now()}function u(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function a(){try{return new e.XMLHttpRequest}catch(t){}}function f(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},s,o,u=r.length,a,f=r[0],l,c,h,p,d;for(s=1;s<u;s++){if(s===1)for(o in e.converters)typeof o=="string"&&(i[o.toLowerCase()]=e.converters[o]);l=f,f=r[s];if(f==="*")f=l;else if(l!=="*"&&l!==f){c=l+" "+f,h=i[c]||i["* "+f];if(!h){d=t;for(p in i){a=p.split(" ");if(a[0]===l||a[0]==="*"){d=i[a[1]+" "+f];if(d){p=i[p],p===!0?h=d:d===!0&&(h=p);break}}}}!h&&!d&&H.error("No conversion from "+c.replace(" "," to ")),h!==!0&&(n=h?h(n):d(p(n)))}}return n}function l(e,n,r){var i=e.contents,s=e.dataTypes,o=e.responseFields,u,a,f,l;for(a in o)a in r&&(n[o[a]]=r[a]);while(s[0]==="*")s.shift(),u===t&&(u=e.mimeType||n.getResponseHeader("content-type"));if(u)for(a in i)if(i[a]&&i[a].test(u)){s.unshift(a);break}if(s[0]in r)f=s[0];else{for(a in r){if(!s[0]||e.converters[a+" "+s[0]]){f=a;break}l||(l=a)}f=f||l}if(f)return f!==s[0]&&s.unshift(f),r[f]}function c(e,t,n,r){if(H.isArray(t))H.each(t,function(t,i){n||Ut.test(e)?r(e,i):c(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&H.type(t)==="object")for(var i in t)c(e+"["+i+"]",t[i],n,r);else r(e,t)}function h(e,n){var r,i,s=H.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&H.extend(!0,e,i)}function p(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u=e[s],a=0,f=u?u.length:0,l=e===rn,c;for(;a<f&&(l||!c);a++)c=u[a](n,r,i),typeof c=="string"&&(!l||o[c]?c=t:(n.dataTypes.unshift(c),c=p(e,n,r,i,c,o)));return(l||!c)&&!o["*"]&&(c=p(e,n,r,i,"*",o)),c}function d(e){return function(t,n){typeof t!="string"&&(n=t,t="*");if(H.isFunction(n)){var r=t.toLowerCase().split(Zt),i=0,s=r.length,o,u,a;for(;i<s;i++)o=r[i],a=/^\+/.test(o),a&&(o=o.substr(1)||"*"),u=e[o]=e[o]||[],u[a?"unshift":"push"](n)}}}function v(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=t==="width"?1:0,s=4;if(r>0){if(n!=="border")for(;i<s;i+=2)n||(r-=parseFloat(H.css(e,"padding"+jt[i]))||0),n==="margin"?r+=parseFloat(H.css(e,n+jt[i]))||0:r-=parseFloat(H.css(e,"border"+jt[i]+"Width"))||0;return r+"px"}r=Ft(e,t);if(r<0||r==null)r=e.style[t];if(Dt.test(r))return r;r=parseFloat(r)||0;if(n)for(;i<s;i+=2)r+=parseFloat(H.css(e,"padding"+jt[i]))||0,n!=="padding"&&(r+=parseFloat(H.css(e,"border"+jt[i]+"Width"))||0),n==="margin"&&(r+=parseFloat(H.css(e,n+jt[i]))||0);return r+"px"}function m(e){var t=_.createElement("div");return Lt.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function g(e){var t=(e.nodeName||"").toLowerCase();t==="input"?y(e):t!=="script"&&typeof e.getElementsByTagName!="undefined"&&H.grep(e.getElementsByTagName("input"),y)}function y(e){if(e.type==="checkbox"||e.type==="radio")e.defaultChecked=e.checked}function b(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function w(e,t){var n;t.nodeType===1&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?t.outerHTML=e.outerHTML:n!=="input"||e.type!=="checkbox"&&e.type!=="radio"?n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(H.expando),t.removeAttribute("_submit_attached"),t.removeAttribute("_change_attached"))}function E(e,t){if(t.nodeType===1&&!!H.hasData(e)){var n,r,i,s=H._data(e),o=H._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)H.event.add(t,n,u[n][r])}o.data&&(o.data=H.extend({},o.data))}}function S(e,t){return H.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function x(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function T(e,t,n){t=t||0;if(H.isFunction(t))return H.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return H.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=H.grep(e,function(e){return e.nodeType===1});if(lt.test(t))return H.filter(t,r,!n);t=H.filter(t,r)}return H.grep(e,function(e,r){return H.inArray(e,t)>=0===n})}function N(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function C(){return!0}function k(){return!1}function L(e,t,n){var r=t+"defer",i=t+"queue",s=t+"mark",o=H._data(e,r);o&&(n==="queue"||!H._data(e,i))&&(n==="mark"||!H._data(e,s))&&setTimeout(function(){!H._data(e,i)&&!H._data(e,s)&&(H.removeData(e,r,!0),o.fire())},0)}function A(e){for(var t in e){if(t==="data"&&H.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function O(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:H.isNumeric(r)?+r:F.test(r)?H.parseJSON(r):r}catch(s){}H.data(e,n,r)}else r=t}return r}function M(e){var t=B[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}var _=e.document,D=e.navigator,P=e.location,H=function(){function n(){if(!r.isReady){try{_.documentElement.doScroll("left")}catch(e){setTimeout(n,1);return}r.ready()}}var r=function(e,t){return new r.fn.init(e,t,o)},i=e.jQuery,s=e.$,o,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,a=/\S/,f=/^\s+/,l=/\s+$/,c=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,m=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,y=/(msie) ([\w.]+)/,b=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,E=/^-ms-/,S=function(e,t){return(t+"").toUpperCase()},x=D.userAgent,T,N,C,k=Object.prototype.toString,L=Object.prototype.hasOwnProperty,A=Array.prototype.push,O=Array.prototype.slice,M=String.prototype.trim,P=Array.prototype.indexOf,H={};return r.fn=r.prototype={constructor:r,init:function(e,n,i){var s,o,a,f;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!n&&_.body)return this.context=_,this[0]=_.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)!=="<"||e.charAt(e.length-1)!==">"||e.length<3?s=u.exec(e):s=[null,e,null];if(s&&(s[1]||!n)){if(s[1])return n=n instanceof r?n[0]:n,f=n?n.ownerDocument||n:_,a=c.exec(e),a?r.isPlainObject(n)?(e=[_.createElement(a[1])],r.fn.attr.call(e,n,!0)):e=[f.createElement(a[1])]:(a=r.buildFragment([s[1]],[f]),e=(a.cacheable?r.clone(a.fragment):a.fragment).childNodes),r.merge(this,e);o=_.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return i.find(e);this.length=1,this[0]=o}return this.context=_,this.selector=e,this}return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e)}return r.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),r.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return O.call(this,0)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var i=this.constructor();return r.isArray(e)?A.apply(i,e):r.merge(i,e),i.prevObject=this,i.context=this.context,t==="find"?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return r.each(this,e,t)},ready:function(e){return r.bindReady(),N.add(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(e){return this.pushStack(r.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:A,sort:[].sort,splice:[].splice},r.fn.init.prototype=r.fn,r.extend=r.fn.extend=function(){var e,n,i,s,o,u,a=arguments[0]||{},f=1,l=arguments.length,c=!1;typeof a=="boolean"&&(c=a,a=arguments[1]||{},f=2),typeof a!="object"&&!r.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f<l;f++)if((e=arguments[f])!=null)for(n in e){i=a[n],s=e[n];if(a===s)continue;c&&s&&(r.isPlainObject(s)||(o=r.isArray(s)))?(o?(o=!1,u=i&&r.isArray(i)?i:[]):u=i&&r.isPlainObject(i)?i:{},a[n]=r.extend(c,u,s)):s!==t&&(a[n]=s)}return a},r.extend({noConflict:function(t){return e.$===r&&(e.$=s),t&&e.jQuery===r&&(e.jQuery=i),r},isReady:!1,readyWait:1,holdReady:function(e){e?r.readyWait++:r.ready(!0)},ready:function(e){if(e===!0&&!--r.readyWait||e!==!0&&!r.isReady){if(!_.body)return setTimeout(r.ready,1);r.isReady=!0;if(e!==!0&&--r.readyWait>0)return;N.fireWith(_,[r]),r.fn.trigger&&r(_).trigger("ready").off("ready")}},bindReady:function(){if(!N){N=r.Callbacks("once memory");if(_.readyState==="complete")return setTimeout(r.ready,1);if(_.addEventListener)_.addEventListener("DOMContentLoaded",C,!1),e.addEventListener("load",r.ready,!1);else if(_.attachEvent){_.attachEvent("onreadystatechange",C),e.attachEvent("onload",r.ready);var t=!1;try{t=e.frameElement==null}catch(i){}_.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return r.type(e)==="function"},isArray:Array.isArray||function(e){return r.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):H[k.call(e)]||"object"},isPlainObject:function(e){if(!e||r.type(e)!=="object"||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!L.call(e,"constructor")&&!L.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||L.call(e,i)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){if(typeof t!="string"||!t)return null;t=r.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(h.test(t.replace(p,"@").replace(d,"]").replace(v,"")))return(new Function("return "+t))();r.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var i,s;try{e.DOMParser?(s=new DOMParser,i=s.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(o){i=t}return(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)&&r.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&a.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(E,"ms-").replace(w,S)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,i){var s,o=0,u=e.length,a=u===t||r.isFunction(e);if(i){if(a){for(s in e)if(n.apply(e[s],i)===!1)break}else for(;o<u;)if(n.apply(e[o++],i)===!1)break}else if(a){for(s in e)if(n.call(e[s],s,e[s])===!1)break}else for(;o<u;)if(n.call(e[o],o,e[o++])===!1)break;return e},trim:M?function(e){return e==null?"":M.call(e)}:function(e){return e==null?"":(e+"").replace(f,"").replace(l,"")},makeArray:function(e,t){var n=t||[];if(e!=null){var i=r.type(e);e.length==null||i==="string"||i==="function"||i==="regexp"||r.isWindow(e)?A.call(n,e):r.merge(n,e)}return n},inArray:function(e,t,n){var r;if(t){if(P)return P.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=e.length,i=0;if(typeof n.length=="number")for(var s=n.length;i<s;i++)e[r++]=n[i];else while(n[i]!==t)e[r++]=n[i++];return e.length=r,e},grep:function(e,t,n){var r=[],i;n=!!n;for(var s=0,o=e.length;s<o;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,i){var s,o,u=[],a=0,f=e.length,l=e instanceof r||f!==t&&typeof f=="number"&&(f>0&&e[0]&&e[f-1]||f===0||r.isArray(e));if(l)for(;a<f;a++)s=n(e[a],a,i),s!=null&&(u[u.length]=s);else for(o in e)s=n(e[o],o,i),s!=null&&(u[u.length]=s);return u.concat.apply([],u)},guid:1,proxy:function(e,n){if(typeof n=="string"){var i=e[n];n=e,e=i}if(!r.isFunction(e))return t;var s=O.call(arguments,2),o=function(){return e.apply(n,s.concat(O.call(arguments)))};return o.guid=e.guid=e.guid||o.guid||r.guid++,o},access:function(e,n,i,s,o,u,a){var f,l=i==null,c=0,h=e.length;if(i&&typeof i=="object"){for(c in i)r.access(e,n,c,i[c],1,u,s);o=1}else if(s!==t){f=a===t&&r.isFunction(s),l&&(f?(f=n,n=function(e,t,n){return f.call(r(e),n)}):(n.call(e,s),n=null));if(n)for(;c<h;c++)n(e[c],i,f?s.call(e[c],c,n(e[c],i)):s,a);o=1}return o?e:l?n.call(e):h?n(e[0],i):u},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=m.exec(e)||g.exec(e)||y.exec(e)||e.indexOf("compatible")<0&&b.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}r.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,i){return i&&i instanceof r&&!(i instanceof e)&&(i=e(i)),r.fn.init.call(this,n,i,t)},e.fn.init.prototype=e.fn;var t=e(_);return e},browser:{}}),r.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){H["[object "+t+"]"]=t.toLowerCase()}),T=r.uaMatch(x),T.browser&&(r.browser[T.browser]=!0,r.browser.version=T.version),r.browser.webkit&&(r.browser.safari=!0),a.test(" ")&&(f=/^[\s\xA0]+/,l=/[\s\xA0]+$/),o=r(_),_.addEventListener?C=function(){_.removeEventListener("DOMContentLoaded",C,!1),r.ready()}:_.attachEvent&&(C=function(){_.readyState==="complete"&&(_.detachEvent("onreadystatechange",C),r.ready())}),r}(),B={};H.Callbacks=function(e){e=e?B[e]||M(e):{};var n=[],r=[],i,s,o,u,a,f,l=function(t){var r,i,s,o,u;for(r=0,i=t.length;r<i;r++)s=t[r],o=H.type(s),o==="array"?l(s):o==="function"&&(!e.unique||!h.has(s))&&n.push(s)},c=function(t,l){l=l||[],i=!e.memory||[t,l],s=!0,o=!0,f=u||0,u=0,a=n.length;for(;n&&f<a;f++)if(n[f].apply(t,l)===!1&&e.stopOnFalse){i=!0;break}o=!1,n&&(e.once?i===!0?h.disable():n=[]:r&&r.length&&(i=r.shift(),h.fireWith(i[0],i[1])))},h={add:function(){if(n){var e=n.length;l(arguments),o?a=n.length:i&&i!==!0&&(u=e,c(i[0],i[1]))}return this},remove:function(){if(n){var t=arguments,r=0,i=t.length;for(;r<i;r++)for(var s=0;s<n.length;s++)if(t[r]===n[s]){o&&s<=a&&(a--,s<=f&&f--),n.splice(s--,1);if(e.unique)break}}return this},has:function(e){if(n){var t=0,r=n.length;for(;t<r;t++)if(e===n[t])return!0}return!1},empty:function(){return n=[],this},disable:function(){return n=r=i=t,this},disabled:function(){return!n},lock:function(){return r=t,(!i||i===!0)&&h.disable(),this},locked:function(){return!r},fireWith:function(t,n){return r&&(o?e.once||r.push([t,n]):(!e.once||!i)&&c(t,n)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!s}};return h};var j=[].slice;H.extend({Deferred:function(e){var t=H.Callbacks("once memory"),n=H.Callbacks("once memory"),r=H.Callbacks("memory"),i="pending",s={resolve:t,reject:n,notify:r},o={done:t.add,fail:n.add,progress:r.add,state:function(){return i},isResolved:t.fired,isRejected:n.fired,then:function(e,t,n){return u.done(e).fail(t).progress(n),this},always:function(){return u.done.apply(u,arguments).fail.apply(u,arguments),this},pipe:function(e,t,n){return H.Deferred(function(r){H.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n=t[0],i=t[1],s;H.isFunction(n)?u[e](function(){s=n.apply(this,arguments),s&&H.isFunction(s.promise)?s.promise().then(r.resolve,r.reject,r.notify):r[i+"With"](this===u?r:this,[s])}):u[e](r[i])})}).promise()},promise:function(e){if(e==null)e=o;else for(var t in o)e[t]=o[t];return e}},u=o.promise({}),a;for(a in s)u[a]=s[a].fire,u[a+"With"]=s[a].fireWith;return u.done(function(){i="resolved"},n.disable,r.lock).fail(function(){i="rejected"},t.disable,r.lock),e&&e.call(u,u),u},when:function(e){function t(e){return function(t){o[e]=arguments.length>1?j.call(arguments,0):t,f.notifyWith(l,o)}}function n(e){return function(t){r[e]=arguments.length>1?j.call(arguments,0):t,--u||f.resolveWith(f,r)}}var r=j.call(arguments,0),i=0,s=r.length,o=Array(s),u=s,a=s,f=s<=1&&e&&H.isFunction(e.promise)?e:H.Deferred(),l=f.promise();if(s>1){for(;i<s;i++)r[i]&&r[i].promise&&H.isFunction(r[i].promise)?r[i].promise().then(n(i),f.reject,t(i)):--u;u||f.resolveWith(f,r)}else f!==e&&f.resolveWith(f,s?[e]:[]);return l}}),H.support=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p=_.createElement("div"),d=_.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!n.length||!r)return{};i=_.createElement("select"),s=i.appendChild(_.createElement("option")),o=p.getElementsByTagName("input")[0],t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.55/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:o.value==="on",optSelected:s.selected,getSetAttribute:p.className!=="t",enctype:!!_.createElement("form").enctype,html5Clone:_.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},H.boxModel=t.boxModel=_.compatMode==="CSS1Compat",o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete p.test}catch(v){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),o=_.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","checked"),o.setAttribute("name","t"),p.appendChild(o),u=_.createDocumentFragment(),u.appendChild(p.lastChild),t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,u.removeChild(o),u.appendChild(p);if(p.attachEvent)for(c in{submit:1,change:1,focusin:1})l="on"+c,h=l in p,h||(p.setAttribute(l,"return;"),h=typeof p[l]=="function"),t[c+"Bubbles"]=h;return u.removeChild(p),u=i=s=p=o=null,H(function(){var n,r,i,s,o,u,f,l,c,d,v,m,g,y=_.getElementsByTagName("body")[0];!y||(l=1,g="padding:0;margin:0;border:",v="position:absolute;top:0;left:0;width:1px;height:1px;",m=g+"0;visibility:hidden;",c="style='"+v+g+"5px solid #000;",d="<div "+c+"display:block;'><div style='"+g+"0;display:block;overflow:hidden;'></div></div>"+"<table "+c+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",n=_.createElement("div"),n.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+l+"px",y.insertBefore(n,y.firstChild),p=_.createElement("div"),n.appendChild(p),p.innerHTML="<table><tr><td style='"+g+"0;display:none'></td><td>t</td></tr></table>",a=p.getElementsByTagName("td"),h=a[0].offsetHeight===0,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=h&&a[0].offsetHeight===0,e.getComputedStyle&&(p.innerHTML="",f=_.createElement("div"),f.style.width="0",f.style.marginRight="0",p.style.width="2px",p.appendChild(f),t.reliableMarginRight=(parseInt((e.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,t.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",t.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=v+m,p.innerHTML=d,r=p.firstChild,i=r.firstChild,o=r.nextSibling.firstChild.firstChild,u={doesNotAddBorder:i.offsetTop!==5,doesAddBorderForTableAndCells:o.offsetTop===5},i.style.position="fixed",i.style.top="20px",u.fixedPosition=i.offsetTop===20||i.offsetTop===15,i.style.position=i.style.top="",r.style.overflow="hidden",r.style.position="relative",u.subtractsBorderForOverflowNotVisible=i.offsetTop===-5,u.doesNotIncludeMarginInBodyOffset=y.offsetTop!==l,e.getComputedStyle&&(p.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof n.style.zoom!="undefined"&&(n.style.zoom=1),y.removeChild(n),f=p=n=null,H.extend(t,u))}),t}();var F=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;H.extend({cache:{},uuid:0,expando:"jQuery"+(H.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?H.cache[e[H.expando]]:e[H.expando],!!e&&!A(e)},data:function(e,n,r,i){if(!!H.acceptData(e)){var s,o,u,a=H.expando,f=typeof n=="string",l=e.nodeType,c=l?H.cache:e,h=l?e[a]:e[a]&&a,p=n==="events";if((!h||!c[h]||!p&&!i&&!c[h].data)&&f&&r===t)return;h||(l?e[a]=h=++H.uuid:h=a),c[h]||(c[h]={},l||(c[h].toJSON=H.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=H.extend(c[h],n):c[h].data=H.extend(c[h].data,n);return s=o=c[h],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[H.camelCase(n)]=r),p&&!o[n]?s.events:(f?(u=o[n],u==null&&(u=o[H.camelCase(n)])):u=o,u)}},removeData:function(e,t,n){if(!!H.acceptData(e)){var r,i,s,o=H.expando,u=e.nodeType,a=u?H.cache:e,f=u?e[o]:o;if(!a[f])return;if(t){r=n?a[f]:a[f].data;if(r){H.isArray(t)||(t in r?t=[t]:(t=H.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?A:H.isEmptyObject)(r))return}}if(!n){delete a[f].data;if(!A(a[f]))return}H.support.deleteExpando||!a.setInterval?delete a[f]:a[f]=null,u&&(H.support.deleteExpando?delete e[o]:e.removeAttribute?e.removeAttribute(o):e[o]=null)}},_data:function(e,t,n){return H.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=H.noData[e.nodeName.toLowerCase()];if(t)return t!==!0&&e.getAttribute("classid")===t}return!0}}),H.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=H.data(a);if(a.nodeType===1&&!H._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")===0&&(o=H.camelCase(o.substring(5)),O(a,o,l[o]));H._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){H.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",H.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=H.data(a,e),l=O(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=H(this);t.triggerHandler("setData"+i,r),H.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){H.removeData(this,e)})}}),H.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",H._data(e,t,(H._data(e,t)||0)+1))},_unmark:function(e,t,n){e!==!0&&(n=t,t=e,e=!1);if(t){n=n||"fx";var r=n+"mark",i=e?0:(H._data(t,r)||1)-1;i?H._data(t,r,i):(H.removeData(t,r,!0),L(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=H._data(e,t),n&&(!r||H.isArray(n)?r=H._data(e,t,H.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=H.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),H._data(e,t+".run",i),r.call(e,function(){H.dequeue(e,t)},i)),n.length||(H.removeData(e,t+"queue "+t+".run",!0),L(e,t,"queue"))}}),H.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?H.queue(this[0],e):n===t?this:this.each(function(){var t=H.queue(this,e,n);e==="fx"&&t[0]!=="inprogress"&&H.dequeue(this,e)})},dequeue:function(e){return this.each(function(){H.dequeue(this,e)})},delay:function(e,t){return e=H.fx?H.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function r(){--u||i.resolveWith(s,[s])}typeof e!="string"&&(n=e,e=t),e=e||"fx";var i=H.Deferred(),s=this,o=s.length,u=1,a=e+"defer",f=e+"queue",l=e+"mark",c;while(o--)if(c=H.data(s[o],a,t,!0)||(H.data(s[o],f,t,!0)||H.data(s[o],l,t,!0))&&H.data(s[o],a,H.Callbacks("once memory"),!0))u++,c.add(r);return r(),i.promise(n)}});var q=/[\n\t\r]/g,R=/\s+/,U=/\r/g,z=/^(?:button|input)$/i,W=/^(?:button|input|object|select|textarea)$/i,X=/^a(?:rea)?$/i,V=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,$=H.support.getSetAttribute,J,K,Q;H.fn.extend({attr:function(e,t){return H.access(this,H.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){H.removeAttr(this,e)})},prop:function(e,t){return H.access(this,H.prop,e,t,arguments.length>1)},removeProp:function(e){return e=H.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(H.isFunction(e))return this.each(function(t){H(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(R);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)~s.indexOf(" "+t[o]+" ")||(s+=t[o]+" ");i.className=H.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(H.isFunction(e))return this.each(function(t){H(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(R);for(r=0,i=this.length;r<i;r++){s=this[r];if(s.nodeType===1&&s.className)if(e){o=(" "+s.className+" ").replace(q," ");for(u=0,a=n.length;u<a;u++)o=o.replace(" "+n[u]+" "," ");s.className=H.trim(o)}else s.className=""}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return H.isFunction(e)?this.each(function(n){H(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=H(this),u=t,a=e.split(R);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&H._data(this,"__className__",this.className),this.className=this.className||e===!1?"":H._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!!arguments.length)return i=H.isFunction(e),this.each(function(r){var s=H(this),o;if(this.nodeType===1){i?o=e.call(this,r,s.val()):o=e,o==null?o="":typeof o=="number"?o+="":H.isArray(o)&&(o=H.map(o,function(e){return e==null?"":e+""})),n=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,o,"value")===t)this.value=o}});if(s)return n=H.valHooks[s.type]||H.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(U,""):r==null?"":r)}}),H.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,s=e.selectedIndex,o=[],u=e.options,a=e.type==="select-one";if(s<0)return null;n=a?s:0,r=a?s+1:u.length;for(;n<r;n++){i=u[n];if(i.selected&&(H.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!H.nodeName(i.parentNode,"optgroup"))){t=H(i).val();if(a)return t;o.push(t)}}return a&&!o.length&&u.length?H(u[s]).val():o},set:function(e,t){var n=H.makeArray(t);return H(e).find("option").each(function(){this.selected=H.inArray(H(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!!e&&a!==3&&a!==8&&a!==2){if(i&&n in H.attrFn)return H(e)[n](r);if(typeof e.getAttribute=="undefined")return H.prop(e,n,r);u=a!==1||!H.isXMLDoc(e),u&&(n=n.toLowerCase(),o=H.attrHooks[n]||(V.test(n)?K:J));if(r!==t){if(r===null){H.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,""+r),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)}},removeAttr:function(e,t){var n,r,i,s,o,u=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(R),s=r.length;for(;u<s;u++)i=r[u],i&&(n=H.propFix[i]||i,o=V.test(i),o||H.attr(e,i,""),e.removeAttribute($?i:n),o&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(z.test(e.nodeName)&&e.parentNode)H.error("type property can't be changed");else if(!H.support.radioValue&&t==="radio"&&H.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return J&&H.nodeName(e,"button")?J.get(e,t):t in e?e.value:null},set:function(e,t,n){if(J&&H.nodeName(e,"button"))return J.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!!e&&u!==3&&u!==8&&u!==2)return o=u!==1||!H.isXMLDoc(e),o&&(n=H.propFix[n]||n,s=H.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):W.test(e.nodeName)||X.test(e.nodeName)&&e.href?0:t}}}}),H.attrHooks.tabindex=H.propHooks.tabIndex,K={get:function(e,n){var r,i=H.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?H.removeAttr(e,n):(r=H.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},$||(Q={name:!0,id:!0,coords:!0},J=H.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(Q[n]?r.nodeValue!=="":r.specified)?r.nodeValue:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=_.createAttribute(n),e.setAttributeNode(r)),r.nodeValue=t+""}},H.attrHooks.tabindex.set=J.set,H.each(["width","height"],function(e,t){H.attrHooks[t]=H.extend(H.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),H.attrHooks.contenteditable={get:J.get,set:function(e,t,n){t===""&&(t="false"),J.set(e,t,n)}}),H.support.hrefNormalized||H.each(["href","src","width","height"],function(e,n){H.attrHooks[n]=H.extend(H.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),H.support.style||(H.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),H.support.optSelected||(H.propHooks.selected=H.extend(H.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),H.support.enctype||(H.propFix.enctype="encoding"),H.support.checkOn||H.each(["radio","checkbox"],function(){H.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),H.each(["radio","checkbox"],function(){H.valHooks[this]=H.extend(H.valHooks[this],{set:function(e,t){if(H.isArray(t))return e.checked=H.inArray(H(e).val(),t)>=0}})});var G=/^(?:textarea|input|select)$/i,Y=/^([^\.]*)?(?:\.(.+))?$/,Z=/(?:^|\s)hover(\.\S+)?\b/,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,it=function(e){var t=rt.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},st=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n["class"]||{}).value))},ot=function(e){return H.event.special.hover?e:e.replace(Z,"mouseenter$1 mouseleave$1")};H.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g;if(!(e.nodeType===3||e.nodeType===8||!n||!r||!(o=H._data(e)))){r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=H.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof H=="undefined"||!!e&&H.event.triggered===e.type?t:H.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=H.trim(ot(n)).split(" ");for(f=0;f<n.length;f++){l=Y.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=H.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=H.event.special[c]||{},p=H.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,quick:s&&it(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),H.event.global[c]=!0}e=null}},global:{},remove:function(e,t,n,r,i){var s=H.hasData(e)&&H._data(e),o,u,a,f,l,c,h,p,d,v,m,g;if(!!s&&!!(p=s.events)){t=H.trim(ot(t||"")).split(" ");for(o=0;o<t.length;o++){u=Y.exec(t[o])||[],a=f=u[1],l=u[2];if(!a){for(a in p)H.event.remove(e,a+t[o],n,r,!0);continue}d=H.event.special[a]||{},a=(r?d.delegateType:d.bindType)||a,m=p[a]||[],c=m.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(h=0;h<m.length;h++)g=m[h],(i||f===g.origType)&&(!n||n.guid===g.guid)&&(!l||l.test(g.namespace))&&(!r||r===g.selector||r==="**"&&g.selector)&&(m.splice(h--,1),g.selector&&m.delegateCount--,d.remove&&d.remove.call(e,g));m.length===0&&c!==m.length&&((!d.teardown||d.teardown.call(e,l)===!1)&&H.removeEvent(e,a,s.handle),delete p[a])}H.isEmptyObject(p)&&(v=s.handle,v&&(v.elem=null),H.removeData(e,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,s){if(!i||i.nodeType!==3&&i.nodeType!==8){var o=n.type||n,u=[],a,f,l,c,h,p,d,v,m,g;if(nt.test(o+H.event.triggered))return;o.indexOf("!")>=0&&(o=o.slice(0,-1),f=!0),o.indexOf(".")>=0&&(u=o.split("."),o=u.shift(),u.sort());if((!i||H.event.customEvent[o])&&!H.event.global[o])return;n=typeof n=="object"?n[H.expando]?n:new H.Event(o,n):new H.Event(o),n.type=o,n.isTrigger=!0,n.exclusive=f,n.namespace=u.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,p=o.indexOf(":")<0?"on"+o:"";if(!i){a=H.cache;for(l in a)a[l].events&&a[l].events[o]&&H.event.trigger(n,r,a[l].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?H.makeArray(r):[],r.unshift(n),d=H.event.special[o]||{};if(d.trigger&&d.trigger.apply(i,r)===!1)return;m=[[i,d.bindType||o]];if(!s&&!d.noBubble&&!H.isWindow(i)){g=d.delegateType||o,c=nt.test(g+o)?i:i.parentNode,h=null;for(;c;c=c.parentNode)m.push([c,g]),h=c;h&&h===i.ownerDocument&&m.push([h.defaultView||h.parentWindow||e,g])}for(l=0;l<m.length&&!n.isPropagationStopped();l++)c=m[l][0],n.type=m[l][1],v=(H._data(c,"events")||{})[n.type]&&H._data(c,"handle"),v&&v.apply(c,r),v=p&&c[p],v&&H.acceptData(c)&&v.apply(c,r)===!1&&n.preventDefault();return n.type=o,!s&&!n.isDefaultPrevented()&&(!d._default||d._default.apply(i.ownerDocument,r)===!1)&&(o!=="click"||!H.nodeName(i,"a"))&&H.acceptData(i)&&p&&i[o]&&(o!=="focus"&&o!=="blur"||n.target.offsetWidth!==0)&&!H.isWindow(i)&&(h=i[p],h&&(i[p]=null),H.event.triggered=o,i[o](),H.event.triggered=t,h&&(i[p]=h)),n.result}},dispatch:function(n){n=H.event.fix(n||e.event);var r=(H._data(this,"events")||{})[n.type]||[],i=r.delegateCount,s=[].slice.call(arguments,0),o=!n.exclusive&&!n.namespace,u=H.event.special[n.type]||{},a=[],f,l,c,h,p,d,v,m,g,y,b;s[0]=n,n.delegateTarget=this;if(!u.preDispatch||u.preDispatch.call(this,n)!==!1){if(i&&(!n.button||n.type!=="click")){h=H(this),h.context=this.ownerDocument||this;for(c=n.target;c!=this;c=c.parentNode||this)if(c.disabled!==!0){d={},m=[],h[0]=c;for(f=0;f<i;f++)g=r[f],y=g.selector,d[y]===t&&(d[y]=g.quick?st(c,g.quick):h.is(y)),d[y]&&m.push(g);m.length&&a.push({elem:c,matches:m})}}r.length>i&&a.push({elem:this,matches:r.slice(i)});for(f=0;f<a.length&&!n.isPropagationStopped();f++){v=a[f],n.currentTarget=v.elem;for(l=0;l<v.matches.length&&!n.isImmediatePropagationStopped();l++){g=v.matches[l];if(o||!n.namespace&&!g.namespace||n.namespace_re&&n.namespace_re.test(g.namespace))n.data=g.data,n.handleObj=g,p=((H.event.special[g.origType]||{}).handle||g.handler).apply(v.elem,s),p!==t&&(n.result=p,p===!1&&(n.preventDefault(),n.stopPropagation()))}}return u.postDispatch&&u.postDispatch.call(this,n),n.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,o=n.button,u=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||_,i=r.documentElement,s=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),!e.which&&o!==t&&(e.which=o&1?1:o&2?3:o&4?2:0),e}},fix:function(e){if(e[H.expando])return e;var n,r,i=e,s=H.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=H.Event(i);for(n=o.length;n;)r=o[--n],e[r]=i[r];return e.target||(e.target=i.srcElement||_),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),s.filter?s.filter(e,i):e},special:{ready:{setup:H.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){H.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=H.extend(new H.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?H.event.trigger(i,null,t):H.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},H.event.handle=H.event.dispatch,H.removeEvent=_.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},H.Event=function(e,t){if(!(this instanceof H.Event))return new H.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?C:k):this.type=e,t&&H.extend(this,t),this.timeStamp=e&&e.timeStamp||H.now(),this[H.expando]=!0},H.Event.prototype={preventDefault:function(){this.isDefaultPrevented=C;var e=this.originalEvent;!e||(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=C;var e=this.originalEvent;!e||(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=C,this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k},H.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){H.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n=this,r=e.relatedTarget,i=e.handleObj,s=i.selector,o;if(!r||r!==n&&!H.contains(n,r))e.type=i.origType,o=i.handler.apply(this,arguments),e.type=t;return o}}}),H.support.submitBubbles||(H.event.special.submit={setup:function(){if(H.nodeName(this,"form"))return!1;H.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=H.nodeName(n,"input")||H.nodeName(n,"button")?n.form:t;r&&!r._submit_attached&&(H.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),r._submit_attached=!0)})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&H.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(H.nodeName(this,"form"))return!1;H.event.remove(this,"._submit")}}),H.support.changeBubbles||(H.event.special.change={setup:function(){if(G.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")H.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),H.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,H.event.simulate("change",this,e,!0))});return!1}H.event.add(this,"beforeactivate._change",function(e){var t=e.target;G.test(t.nodeName)&&!t._change_attached&&(H.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&H.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return H.event.remove(this,"._change"),G.test(this.nodeName)}}),H.support.focusinBubbles||H.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){H.event.simulate(t,e.target,H.event.fix(e),!0)};H.event.special[t]={setup:function(){n++===0&&_.addEventListener(e,r,!0)},teardown:function(){--n===0&&_.removeEventListener(e,r,!0)}}}),H.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=k;else if(!i)return this;return s===1&&(o=i,i=function(e){return H().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=H.guid++)),this.each(function(){H.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){if(e&&e.preventDefault&&e.handleObj){var i=e.handleObj;return H(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if(typeof e=="object"){for(var s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=k),this.each(function(){H.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return H(this.context).on(e,this.selector,t,n),this},die:function(e,t){return H(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length==1?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){H.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return H.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||H.guid++,r=0,i=function(n){var i=(H._data(this,"lastToggle"+e.guid)||0)%r;return H._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),H.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){H.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},H.attrFn&&(H.attrFn[t]=!0),et.test(t)&&(H.event.fixHooks[t]=H.event.keyHooks),tt.test(t)&&(H.event.fixHooks[t]=H.event.mouseHooks)}),function(){function e(e,t,n,r,s,o){for(var u=0,a=r.length;u<a;u++){var f=r[u];if(f){var l=!1;f=f[e];while(f){if(f[i]===n){l=r[f.sizset];break}if(f.nodeType===1){o||(f[i]=n,f.sizset=u);if(typeof t!="string"){if(f===t){l=!0;break}}else if(h.filter(t,[f]).length>0){l=f;break}}f=f[e]}r[u]=l}}}function n(e,t,n,r,s,o){for(var u=0,a=r.length;u<a;u++){var f=r[u];if(f){var l=!1;f=f[e];while(f){if(f[i]===n){l=r[f.sizset];break}f.nodeType===1&&!o&&(f[i]=n,f.sizset=u);if(f.nodeName.toLowerCase()===t){l=f;break}f=f[e]}r[u]=l}}}var r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),s=0,o=Object.prototype.toString,u=!1,a=!0,f=/\\/g,l=/\r\n/g,c=/\W/;[0,0].sort(function(){return a=!1,0});var h=function(e,t,n,i){n=n||[],t=t||_;var s=t;if(t.nodeType!==1&&t.nodeType!==9)return[];if(!e||typeof e!="string")return n;var u,a,f,l,c,p,m,g,b=!0,w=h.isXML(t),E=[],x=e;do{r.exec(""),u=r.exec(x);if(u){x=u[3],E.push(u[1]);if(u[2]){l=u[3];break}}}while(u);if(E.length>1&&v.exec(e))if(E.length===2&&d.relative[E[0]])a=S(E[0]+E[1],t,i);else{a=d.relative[E[0]]?[t]:h(E.shift(),t);while(E.length)e=E.shift(),d.relative[e]&&(e+=E.shift()),a=S(e,a,i)}else{!i&&E.length>1&&t.nodeType===9&&!w&&d.match.ID.test(E[0])&&!d.match.ID.test(E[E.length-1])&&(c=h.find(E.shift(),t,w),t=c.expr?h.filter(c.expr,c.set)[0]:c.set[0]);if(t){c=i?{expr:E.pop(),set:y(i)}:h.find(E.pop(),E.length!==1||E[0]!=="~"&&E[0]!=="+"||!t.parentNode?t:t.parentNode,w),a=c.expr?h.filter(c.expr,c.set):c.set,E.length>0?f=y(a):b=!1;while(E.length)p=E.pop(),m=p,d.relative[p]?m=E.pop():p="",m==null&&(m=t),d.relative[p](f,m,w)}else f=E=[]}f||(f=a),f||h.error(p||e);if(o.call(f)==="[object Array]")if(!b)n.push.apply(n,f);else if(t&&t.nodeType===1)for(g=0;f[g]!=null;g++)f[g]&&(f[g]===!0||f[g].nodeType===1&&h.contains(t,f[g]))&&n.push(a[g]);else for(g=0;f[g]!=null;g++)f[g]&&f[g].nodeType===1&&n.push(a[g]);else y(f,n);return l&&(h(l,s,n,i),h.uniqueSort(n)),n};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1)}return e},h.matches=function(e,t){return h(e,null,null,t)},h.matchesSelector=function(e,t){return h(t,null,null,[e]).length>0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i<s;i++){u=d.order[i];if(o=d.leftMatch[u].exec(e)){a=o[1],o.splice(1,1);if(a.substr(a.length-1)!=="\\"){o[1]=(o[1]||"").replace(f,""),r=d.find[u](o,t,n);if(r!=null){e=e.replace(d.match[u],"");break}}}}return r||(r=typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName("*"):[]),{set:r,expr:e}},h.filter=function(e,n,r,i){var s,o,u,a,f,l,c,p,v,m=e,g=[],y=n,b=n&&n[0]&&h.isXML(n[0]);while(e&&n.length){for(u in d.filter)if((s=d.leftMatch[u].exec(e))!=null&&s[2]){l=d.filter[u],c=s[1],o=!1,s.splice(1,1);if(c.substr(c.length-1)==="\\")continue;y===g&&(g=[]);if(d.preFilter[u]){s=d.preFilter[u](s,y,r,g,i,b);if(!s)o=a=!0;else if(s===!0)continue}if(s)for(p=0;(f=y[p])!=null;p++)f&&(a=l(f,s,p,y),v=i^a,r&&a!=null?v?o=!0:y[p]=!1:v&&(g.push(f),o=!0));if(a!==t){r||(y=g),e=e.replace(d.match[u],"");if(!o)return[];break}}if(e===m){if(o!=null)break;h.error(e)}m=e}return y},h.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var p=h.getText=function(e){var t,n,r=e.nodeType,i="";if(r){if(r===1||r===9||r===11){if(typeof e.textContent=="string")return e.textContent;if(typeof e.innerText=="string")return e.innerText.replace(l,"");for(e=e.firstChild;e;e=e.nextSibling)i+=p(e)}else if(r===3||r===4)return e.nodeValue}else for(t=0;n=e[t];t++)n.nodeType!==8&&(i+=p(n));return i},d=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n=typeof t=="string",r=n&&!c.test(t),i=n&&!r;r&&(t=t.toLowerCase());for(var s=0,o=e.length,u;s<o;s++)if(u=e[s]){while((u=u.previousSibling)&&u.nodeType!==1);e[s]=i||u&&u.nodeName.toLowerCase()===t?u||!1:u===t}i&&h.filter(t,e,!0)},">":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i<s;i++){n=e[i];if(n){var o=n.parentNode;e[i]=o.nodeName.toLowerCase()===t?o:!1}}}else{for(;i<s;i++)n=e[i],n&&(e[i]=r?n.parentNode:n.parentNode===t);r&&h.filter(t,e,!0)}},"":function(t,r,i){var o,u=s++,a=e;typeof r=="string"&&!c.test(r)&&(r=r.toLowerCase(),o=r,a=n),a("parentNode",r,u,t,o,i)},"~":function(t,r,i){var o,u=s++,a=e;typeof r=="string"&&!c.test(r)&&(r=r.toLowerCase(),o=r,a=n),a("previousSibling",r,u,t,o,i)}},find:{ID:function(e,t,n){if(typeof t.getElementById!="undefined"&&!n){var r=t.getElementById(e[1]);return r&&r.parentNode?[r]:[]}},NAME:function(e,t){if(typeof t.getElementsByName!="undefined"){var n=[],r=t.getElementsByName(e[1]);for(var i=0,s=r.length;i<s;i++)r[i].getAttribute("name")===e[1]&&n.push(r[i]);return n.length===0?null:n}},TAG:function(e,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,r,i,s){e=" "+e[1].replace(f,"")+" ";if(s)return e;for(var o=0,u;(u=t[o])!=null;o++)u&&(i^(u.className&&(" "+u.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||r.push(u):n&&(t[o]=!1));return!1},ID:function(e){return e[1].replace(f,"")},TAG:function(e,t){return e[1].replace(f,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){e[2]||h.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&h.error(e[0]);return e[0]=s++,e},ATTR:function(e,t,n,r,i,s){var o=e[1]=e[1].replace(f,"");return!s&&d.attrMap[o]&&(e[1]=d.attrMap[o]),e[4]=(e[4]||e[5]||"").replace(f,""),e[2]==="~="&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,i,s){if(e[1]==="not"){if(!((r.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var o=h.filter(e[3],t,n,!0^s);return n||i.push.apply(i,o),!1}e[3]=h(e[3],null,null,t)}else if(d.match.POS.test(e[0])||d.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!h(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return e.nodeName.toLowerCase()==="input"&&"text"===n&&(t===n||t===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"submit"===e.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&"button"===e.type||t==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return t===0},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],s=d.filters[i];if(s)return s(e,n,t,r);if(i==="contains")return(e.textContent||e.innerText||p([e])||"").indexOf(t[3])>=0;if(i==="not"){var o=t[3];for(var u=0,a=o.length;u<a;u++)if(o[u]===e)return!1;return!0}h.error(i)},CHILD:function(e,t){var n,r,s,o,u,a,f,l=t[1],c=e;switch(l){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(l==="first")return!0;c=e;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0;case"nth":n=t[2],r=t[3];if(n===1&&r===0)return!0;s=t[0],o=e.parentNode;if(o&&(o[i]!==s||!e.nodeIndex)){a=0;for(c=o.firstChild;c;c=c.nextSibling)c.nodeType===1&&(c.nodeIndex=++a);o[i]=s}return f=e.nodeIndex-r,n===0?f===0:f%n===0&&f/n>=0}},ID:function(e,t){return e.nodeType===1&&e.getAttribute("id")===t},TAG:function(e,t){return t==="*"&&e.nodeType===1||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],r=h.attr?h.attr(e,n):d.attrHandle[n]?d.attrHandle[n](e):e[n]!=null?e[n]:e.getAttribute(n),i=r+"",s=t[2],o=t[4];return r==null?s==="!=":!s&&h.attr?r!=null:s==="="?i===o:s==="*="?i.indexOf(o)>=0:s==="~="?(" "+i+" ").indexOf(o)>=0:o?s==="!="?i!==o:s==="^="?i.indexOf(o)===0:s==="$="?i.substr(i.length-o.length)===o:s==="|="?i===o||i.substr(0,o.length+1)===o+"-":!1:i&&r!==!1},POS:function(e,t,n,r){var i=t[2],s=d.setFilters[i];if(s)return s(e,n,t,r)}}},v=d.match.POS,m=function(e,t){return"\\"+(t-0+1)};for(var g in d.match)d.match[g]=new RegExp(d.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),d.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+d.match[g].source.replace(/\\(\d+)/g,m));d.match.globalPOS=v;var y=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(_.documentElement.childNodes,0)[0].nodeType}catch(b){y=function(e,t){var n=0,r=t||[];if(o.call(e)==="[object Array]")Array.prototype.push.apply(r,e);else if(typeof e.length=="number")for(var i=e.length;n<i;n++)r.push(e[n]);else for(;e[n];n++)r.push(e[n]);return r}}var w,E;_.documentElement.compareDocumentPosition?w=function(e,t){return e===t?(u=!0,0):!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition?-1:1:e.compareDocumentPosition(t)&4?-1:1}:(w=function(e,t){if(e===t)return u=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,a=t.parentNode,f=o;if(o===a)return E(e,t);if(!o)return-1;if(!a)return 1;while(f)i.unshift(f),f=f.parentNode;f=a;while(f)s.unshift(f),f=f.parentNode;n=i.length,r=s.length;for(var l=0;l<n&&l<r;l++)if(i[l]!==s[l])return E(i[l],s[l]);return l===n?E(e,s[l],-1):E(i[l],t,1)},E=function(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}),function(){var e=_.createElement("div"),n="script"+(new Date).getTime(),r=_.documentElement;e.innerHTML="<a name='"+n+"'/>",r.insertBefore(e,r.firstChild),_.getElementById(n)&&(d.find.ID=function(e,n,r){if(typeof n.getElementById!="undefined"&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||typeof i.getAttributeNode!="undefined"&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},d.filter.ID=function(e,t){var n=typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id");return e.nodeType===1&&n&&n.nodeValue===t}),r.removeChild(e),r=e=null}(),function(){var e=_.createElement("div");e.appendChild(_.createComment("")),e.getElementsByTagName("*").length>0&&(d.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if(e[1]==="*"){var r=[];for(var i=0;n[i];i++)n[i].nodeType===1&&r.push(n[i]);n=r}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),_.querySelectorAll&&function(){var e=h,t=_.createElement("div"),n="__sizzle__";t.innerHTML="<p class='TEST'></p>";if(!t.querySelectorAll||t.querySelectorAll(".TEST").length!==0){h=function(t,r,i,s){r=r||_;if(!s&&!h.isXML(r)){var o=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(o&&(r.nodeType===1||r.nodeType===9)){if(o[1])return y(r.getElementsByTagName(t),i);if(o[2]&&d.find.CLASS&&r.getElementsByClassName)return y(r.getElementsByClassName(o[2]),i)}if(r.nodeType===9){if(t==="body"&&r.body)return y([r.body],i);if(o&&o[3]){var u=r.getElementById(o[3]);if(!u||!u.parentNode)return y([],i);if(u.id===o[3])return y([u],i)}try{return y(r.querySelectorAll(t),i)}catch(a){}}else if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){var f=r,l=r.getAttribute("id"),c=l||n,p=r.parentNode,v=/^\s*[+~]/.test(t);l?c=c.replace(/'/g,"\\$&"):r.setAttribute("id",c),v&&p&&(r=r.parentNode);try{if(!v||p)return y(r.querySelectorAll("[id='"+c+"'] "+t),i)}catch(m){}finally{l||f.removeAttribute("id")}}}return e(t,r,i,s)};for(var r in e)h[r]=e[r];t=null}}(),function(){var e=_.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(_.createElement("div"),"div"),r=!1;try{t.call(_.documentElement,"[test!='']:sizzle")}catch(i){r=!0}h.matchesSelector=function(e,i){i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(r||!d.match.PSEUDO.test(i)&&!/!=/.test(i)){var s=t.call(e,i);if(s||!n||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(i,null,null,[e]).length>0}}}(),function(){var e=_.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!e.getElementsByClassName&&e.getElementsByClassName("e").length!==0){e.lastChild.className="e";if(e.getElementsByClassName("e").length===1)return;d.order.splice(1,0,"CLASS"),d.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!="undefined"&&!n)return t.getElementsByClassName(e[1])},e=null}}(),_.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:_.documentElement.compareDocumentPosition?h.contains=function(e,t){return!!(e.compareDocumentPosition(t)&16)}:h.contains=function(){return!1},h.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?t.nodeName!=="HTML":!1};var S=function(e,t,n){var r,i=[],s="",o=t.nodeType?[t]:t;while(r=d.match.PSEUDO.exec(e))s+=r[0],e=e.replace(d.match.PSEUDO,"");e=d.relative[e]?e+"*":e;for(var u=0,a=o.length;u<a;u++)h(e,o[u],i,n);return h.filter(s,i)};h.attr=H.attr,h.selectors.attrMap={},H.find=h,H.expr=h.selectors,H.expr[":"]=H.expr.filters,H.unique=h.uniqueSort,H.text=h.getText,H.isXMLDoc=h.isXML,H.contains=h.contains}();var ut=/Until$/,at=/^(?:parents|prevUntil|prevAll)/,ft=/,/,lt=/^.[^:#\[\.,]*$/,ct=Array.prototype.slice,ht=H.expr.match.globalPOS,pt={children:!0,contents:!0,next:!0,prev:!0};H.fn.extend({find:function(e){var t=this,n,r;if(typeof e!="string")return H(e).filter(function(){for(n=0,r=t.length;n<r;n++)if(H.contains(t[n],this))return!0});var i=this.pushStack("","find",e),s,o,u;for(n=0,r=this.length;n<r;n++){s=i.length,H.find(e,this[n],i);if(n>0)for(o=s;o<i.length;o++)for(u=0;u<s;u++)if(i[u]===i[o]){i.splice(o--,1);break}}return i},has:function(e){var t=H(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(H.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(T(this,e,!1),"not",e)},filter:function(e){return this.pushStack(T(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?ht.test(e)?H(e,this.context).index(this[0])>=0:H.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,s=this[0];if(H.isArray(e)){var o=1;while(s&&s.ownerDocument&&s!==t){for(r=0;r<e.length;r++)H(s).is(e[r])&&n.push({selector:e[r],elem:s,level:o});s=s.parentNode,o++}return n}var u=ht.test(e)||typeof e!="string"?H(e,t||this.context):0;for(r=0,i=this.length;r<i;r++){s=this[r];while(s){if(u?u.index(s)>-1:H.find.matchesSelector(s,e)){n.push(s);break}s=s.parentNode;if(!s||!s.ownerDocument||s===t||s.nodeType===11)break}}return n=n.length>1?H.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?H.inArray(this[0],H(e)):H.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?H(e,t):H.makeArray(e&&e.nodeType?[e]:e),r=H.merge(this.get(),n);return this.pushStack(N(n[0])||N(r[0])?r:H.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),H.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return H.dir(e,"parentNode")},parentsUntil:function(e,t,n){return H.dir(e,"parentNode",n)},next:function(e){return H.nth(e,2,"nextSibling")},prev:function(e){return H.nth(e,2,"previousSibling")},nextAll:function(e){return H.dir(e,"nextSibling")},prevAll:function(e){return H.dir(e,"previousSibling")},nextUntil:function(e,t,n){return H.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return H.dir(e,"previousSibling",n)},siblings:function(e){return H.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return H.sibling(e.firstChild)},contents:function(e){return H.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:H.makeArray(e.childNodes)}},function(e,t){H.fn[e]=function(n,r){var i=H.map(this,t,n);return ut.test(e)||(r=n),r&&typeof r=="string"&&(i=H.filter(r,i)),i=this.length>1&&!pt[e]?H.unique(i):i,(this.length>1||ft.test(r))&&at.test(e)&&(i=i.reverse()),this.pushStack(i,e,ct.call(arguments).join(","))}}),H.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?H.find.matchesSelector(t[0],e)?[t[0]]:[]:H.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!H(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},nth:function(e,t,n,r){t=t||1;var i=0;for(;e;e=e[n])if(e.nodeType===1&&++i===t)break;return e},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:\d+|null)"/g,mt=/^\s+/,gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,yt=/<([\w:]+)/,bt=/<tbody/i,wt=/<|&#?\w+;/,Et=/<(?:script|style)/i,St=/<(?:script|object|embed|option|style)/i,xt=new RegExp("<(?:"+dt+")[\\s/>]","i"),Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/\/(java|ecma)script/i,Ct=/^\s*<!(?:\[CDATA\[|\-\-)/,kt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Lt=x(_);kt.optgroup=kt.option,kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,H.support.htmlSerialize||(kt._default=[1,"div<div>","</div>"]),H.fn.extend({text:function(e){return H.access(this,function(e){return e===t?H.text(this):this.empty().append((this[0]&&this[0].ownerDocument||_).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(H.isFunction(e))return this.each(function(t){H(this).wrapAll(e.call(this,t))});if(this[0]){var t=H(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return H.isFunction(e)?this.each(function(t){H(this).wrapInner(e.call(this,t))}):this.each(function(){var t=H(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=H.isFunction(e);return this.each(function(n){H(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){H.nodeName(this,"body")||H(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=H.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,H.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||H.filter(e,[r]).length)!t&&r.nodeType===1&&(H.cleanData(r.getElementsByTagName("*")),H.cleanData([r])),r.parentNode&&r.parentNode.removeChild(r);return this},empty:function(){for(var e=0,t;(t=this[e])!=null;e++){t.nodeType===1&&H.cleanData(t.getElementsByTagName("*"));while(t.firstChild)t.removeChild(t.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return H.clone(this,e,t)})},html:function(e){return H.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(vt,""):null;if(typeof e=="string"&&!Et.test(e)&&(H.support.leadingWhitespace||!mt.test(e))&&!kt[(yt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(gt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(H.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return this[0]&&this[0].parentNode?H.isFunction(e)?this.each(function(t){var n=H(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=H(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;H(this).remove(),t?H(t).before(e):H(n).append(e)})):this.length?this.pushStack(H(H.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){var i,s,o,u,a=e[0],f=[];if(!H.support.checkClone&&arguments.length===3&&typeof a=="string"&&Tt.test(a))return this.each(function(){H(this).domManip(e,n,r,!0)});if(H.isFunction(a))return this.each(function(i){var s=H(this);e[0]=a.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){u=a&&a.parentNode,H.support.parentNode&&u&&u.nodeType===11&&u.childNodes.length===this.length?i={fragment:u}:i=H.buildFragment(e,this,f),o=i.fragment,o.childNodes.length===1?s=o=o.firstChild:s=o.firstChild;if(s){n=n&&H.nodeName(s,"tr");for(var l=0,c=this.length,h=c-1;l<c;l++)r.call(n?S(this[l],s):this[l],i.cacheable||c>1&&l<h?H.clone(o,!0,!0):o)}f.length&&H.each(f,function(e,t){t.src?H.ajax({type:"GET",global:!1,url:t.src,async:!1,dataType:"script"}):H.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Ct,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),H.buildFragment=function(e,t,n){var r,i,s,o,u=e[0];return t&&t[0]&&(o=t[0].ownerDocument||t[0]),o.createDocumentFragment||(o=_),e.length===1&&typeof u=="string"&&u.length<512&&o===_&&u.charAt(0)==="<"&&!St.test(u)&&(H.support.checkClone||!Tt.test(u))&&(H.support.html5Clone||!xt.test(u))&&(i=!0,s=H.fragments[u],s&&s!==1&&(r=s)),r||(r=o.createDocumentFragment(),H.clean(e,o,r,n)),i&&(H.fragments[u]=s?r:1),{fragment:r,cacheable:i}},H.fragments={},H.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){H.fn[e]=function(n){var r=[],i=H(n),s=this.length===1&&this[0].parentNode;if(s&&s.nodeType===11&&s.childNodes.length===1&&i.length===1)return i[t](this[0]),this;for(var o=0,u=i.length;o<u;o++){var a=(o>0?this.clone(!0):this).get();H(i[o])[t](a),r=r.concat(a)}return this.pushStack(r,e,i.selector)}}),H.extend({clone:function(e,t,n){var r,i,s,o=H.support.html5Clone||H.isXMLDoc(e)||!xt.test("<"+e.nodeName+">")?e.cloneNode(!0):m(e);if((!H.support.noCloneEvent||!H.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!H.isXMLDoc(e)){w(e,o),r=b(e),i=b(o);for(s=0;r[s];++s)i[s]&&w(r[s],i[s])}if(t){E(e,o);if(n){r=b(e),i=b(o);for(s=0;r[s];++s)E(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var i,s,o,u=[];t=t||_,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||_);for(var a=0,f;(f=e[a])!=null;a++){typeof f=="number"&&(f+="");if(!f)continue;if(typeof f=="string")if(!wt.test(f))f=t.createTextNode(f);else{f=f.replace(gt,"<$1></$2>");var l=(yt.exec(f)||["",""])[1].toLowerCase(),c=kt[l]||kt._default,h=c[0],p=t.createElement("div"),d=Lt.childNodes,v;t===_?Lt.appendChild(p):x(t).appendChild(p),p.innerHTML=c[1]+f+c[2];while(h--)p=p.lastChild;if(!H.support.tbody){var m=bt.test(f),y=l==="table"&&!m?p.firstChild&&p.firstChild.childNodes:c[1]==="<table>"&&!m?p.childNodes:[];for(o=y.length-1;o>=0;--o)H.nodeName(y[o],"tbody")&&!y[o].childNodes.length&&y[o].parentNode.removeChild(y[o])}!H.support.leadingWhitespace&&mt.test(f)&&p.insertBefore(t.createTextNode(mt.exec(f)[0]),p.firstChild),f=p.childNodes,p&&(p.parentNode.removeChild(p),d.length>0&&(v=d[d.length-1],v&&v.parentNode&&v.parentNode.removeChild(v)))}var b;if(!H.support.appendChecked)if(f[0]&&typeof (b=f.length)=="number")for(o=0;o<b;o++)g(f[o]);else g(f);f.nodeType?u.push(f):u=H.merge(u,f)}if(n){i=function(e){return!e.type||Nt.test(e.type)};for(a=0;u[a];a++){s=u[a];if(r&&H.nodeName(s,"script")&&(!s.type||Nt.test(s.type)))r.push(s.parentNode?s.parentNode.removeChild(s):s);else{if(s.nodeType===1){var w=H.grep(s.getElementsByTagName("script"),i);u.splice.apply(u,[a+1,0].concat(w))}n.appendChild(s)}}}return u},cleanData:function(e){var t,n,r=H.cache,i=H.event.special,s=H.support.deleteExpando;for(var o=0,u;(u=e[o])!=null;o++){if(u.nodeName&&H.noData[u.nodeName.toLowerCase()])continue;n=u[H.expando];if(n){t=r[n];if(t&&t.events){for(var a in t.events)i[a]?H.event.remove(u,a):H.removeEvent(u,a,t.handle);t.handle&&(t.handle.elem=null)}s?delete u[H.expando]:u.removeAttribute&&u.removeAttribute(H.expando),delete r[n]}}}});var At=/alpha\([^)]*\)/i,Ot=/opacity=([^)]*)/,Mt=/([A-Z]|^ms)/g,_t=/^[\-+]?(?:\d*\.)?\d+$/i,Dt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,Pt=/^([\-+])=([\-+.\de]+)/,Ht=/^margin/,Bt={position:"absolute",visibility:"hidden",display:"block"},jt=["Top","Right","Bottom","Left"],Ft,It,qt;H.fn.css=function(e,n){return H.access(this,function(e,n,r){return r!==t?H.style(e,n,r):H.css(e,n)},e,n,arguments.length>1)},H.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ft(e,"opacity");return n===""?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":H.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!!e&&e.nodeType!==3&&e.nodeType!==8&&!!e.style){var s,o,u=H.camelCase(n),a=e.style,f=H.cssHooks[u];n=H.cssProps[u]||u;if(r===t)return f&&"get"in f&&(s=f.get(e,!1,i))!==t?s:a[n];o=typeof r,o==="string"&&(s=Pt.exec(r))&&(r=+(s[1]+1)*+s[2]+parseFloat(H.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!H.cssNumber[u]&&(r+="px");if(!f||!("set"in f)||(r=f.set(e,r))!==t)try{a[n]=r}catch(l){}}},css:function(e,n,r){var i,s;n=H.camelCase(n),s=H.cssHooks[n],n=H.cssProps[n]||n,n==="cssFloat"&&(n="float");if(s&&"get"in s&&(i=s.get(e,!0,r))!==t)return i;if(Ft)return Ft(e,n)},swap:function(e,t,n){var r={},i,s;for(s in t)r[s]=e.style[s],e.style[s]=t[s];i=n.call(e);for(s in t)e.style[s]=r[s];return i}}),H.curCSS=H.css,_.defaultView&&_.defaultView.getComputedStyle&&(It=function(e,t){var n,r,i,s,o=e.style;return t=t.replace(Mt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!H.contains(e.ownerDocument.documentElement,e)&&(n=H.style(e,t))),!H.support.pixelMargin&&i&&Ht.test(t)&&Dt.test(n)&&(s=o.width,o.width=n,n=i.width,o.width=s),n}),_.documentElement.currentStyle&&(qt=function(e,t){var n,r,i,s=e.currentStyle&&e.currentStyle[t],o=e.style;return s==null&&o&&(i=o[t])&&(s=i),Dt.test(s)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=t==="fontSize"?"1em":s,s=o.pixelLeft+"px",o.left=n,r&&(e.runtimeStyle.left=r)),s===""?"auto":s}),Ft=It||qt,H.each(["height","width"],function(e,t){H.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?v(e,t,r):H.swap(e,Bt,function(){return v(e,t,r)})},set:function(e,t){return _t.test(t)?t+"px":t}}}),H.support.opacity||(H.cssHooks.opacity={get:function(e,t){return Ot.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=H.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&H.trim(s.replace(At,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=At.test(s)?s.replace(At,i):s+" "+i}}),H(function(){H.support.reliableMarginRight||(H.cssHooks.marginRight={get:function(e,t){return H.swap(e,{display:"inline-block"},function(){return t?Ft(e,"margin-right"):e.style.marginRight})}})}),H.expr&&H.expr.filters&&(H.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!H.support.reliableHiddenOffsets&&(e.style&&e.style.display||H.css(e,"display"))==="none"},H.expr.filters.visible=function(e){return!H.expr.filters.hidden(e)}),H.each({margin:"",padding:"",border:"Width"},function(e,t){H.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+jt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Rt=/%20/g,Ut=/\[\]$/,zt=/\r?\n/g,Wt=/#.*$/,Xt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Vt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,$t=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Jt=/^(?:GET|HEAD)$/,Kt=/^\/\//,Qt=/\?/,Gt=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Yt=/^(?:select|textarea)/i,Zt=/\s+/,en=/([?&])_=[^&]*/,tn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,nn=H.fn.load,rn={},sn={},on,un,an=["*/"]+["*"];try{on=P.href}catch(fn){on=_.createElement("a"),on.href="",on=on.href}un=tn.exec(on.toLowerCase())||[],H.fn.extend({load:function(e,n,r){if(typeof e!="string"&&nn)return nn.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var s=e.slice(i,e.length);e=e.slice(0,i)}var o="GET";n&&(H.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=H.param(n,H.ajaxSettings.traditional),o="POST"));var u=this;return H.ajax({url:e,type:o,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),u.html(s?H("<div>").append(n.replace(Gt,"")).find(s):n)),r&&u.each(r,[n,t,e])}}),this},serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?H.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Yt.test(this.nodeName)||Vt.test(this.type))}).map(function(e,t){var n=H(this).val();return n==null?null:H.isArray(n)?H.map(n,function(e,n){return{name:t.name,value:e.replace(zt,"\r\n")}}):{name:t.name,value:n.replace(zt,"\r\n")}}).get()}}),H.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){H.fn[t]=function(e){return this.on(t,e)}}),H.each(["get","post"],function(e,n){H[n]=function(e,r,i,s){return H.isFunction(r)&&(s=s||i,i=r,r=t),H.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),H.extend({getScript:function(e,n){return H.get(e,t,n,"script")},getJSON:function(e,t,n){return H.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?h(e,H.ajaxSettings):(t=e,e=H.ajaxSettings),h(e,t),e},ajaxSettings:{url:on,isLocal:$t.test(un[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":an},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":H.parseJSON,"text xml":H.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:d(rn),ajaxTransport:d(sn),ajax:function(e,n){function r(e,n,r,p){if(E!==2){E=2,b&&clearTimeout(b),y=t,m=p||"",T.readyState=e>0?4:0;var d,v,g,w=n,x=r?l(i,T,r):t,N,C;if(e>=200&&e<300||e===304){if(i.ifModified){if(N=T.getResponseHeader("Last-Modified"))H.lastModified[h]=N;if(C=T.getResponseHeader("Etag"))H.etag[h]=C}if(e===304)w="notmodified",d=!0;else try{v=f(i,x),w="success",d=!0}catch(k){w="parsererror",g=k}}else{g=w;if(!w||e)w="error",e<0&&(e=0)}T.status=e,T.statusText=""+(n||w),d?u.resolveWith(s,[v,w,T]):u.rejectWith(s,[T,w,g]),T.statusCode(c),c=t,S&&o.trigger("ajax"+(d?"Success":"Error"),[T,i,d?v:g]),a.fireWith(s,[T,w]),S&&(o.trigger("ajaxComplete",[T,i]),--H.active||H.event.trigger("ajaxStop"))}}typeof e=="object"&&(n=e,e=t),n=n||{};var i=H.ajaxSetup({},n),s=i.context||i,o=s!==i&&(s.nodeType||s instanceof H)?H(s):H.event,u=H.Deferred(),a=H.Callbacks("once memory"),c=i.statusCode||{},h,d={},v={},m,g,y,b,w,E=0,S,x,T={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=v[n]=v[n]||e,d[e]=t}return this},getAllResponseHeaders:function(){return E===2?m:null},getResponseHeader:function(e){var n;if(E===2){if(!g){g={};while(n=Xt.exec(m))g[n[1].toLowerCase()]=n[2]}n=g[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(i.mimeType=e),this},abort:function(e){return e=e||"abort",y&&y.abort(e),r(0,e),this}};u.promise(T),T.success=T.done,T.error=T.fail,T.complete=a.add,T.statusCode=function(e){if(e){var t;if(E<2)for(t in e)c[t]=[c[t],e[t]];else t=e[T.status],T.then(t,t)}return this},i.url=((e||i.url)+"").replace(Wt,"").replace(Kt,un[1]+"//"),i.dataTypes=H.trim(i.dataType||"*").toLowerCase().split(Zt),i.crossDomain==null&&(w=tn.exec(i.url.toLowerCase()),i.crossDomain=!(!w||w[1]==un[1]&&w[2]==un[2]&&(w[3]||(w[1]==="http:"?80:443))==(un[3]||(un[1]==="http:"?80:443)))),i.data&&i.processData&&typeof i.data!="string"&&(i.data=H.param(i.data,i.traditional)),p(rn,i,n,T);if(E===2)return!1;S=i.global,i.type=i.type.toUpperCase(),i.hasContent=!Jt.test(i.type),S&&H.active++===0&&H.event.trigger("ajaxStart");if(!i.hasContent){i.data&&(i.url+=(Qt.test(i.url)?"&":"?")+i.data,delete i.data),h=i.url;if(i.cache===!1){var N=H.now(),C=i.url.replace(en,"$1_="+N);i.url=C+(C===i.url?(Qt.test(i.url)?"&":"?")+"_="+N:"")}}(i.data&&i.hasContent&&i.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",i.contentType),i.ifModified&&(h=h||i.url,H.lastModified[h]&&T.setRequestHeader("If-Modified-Since",H.lastModified[h]),H.etag[h]&&T.setRequestHeader("If-None-Match",H.etag[h])),T.setRequestHeader("Accept",i.dataTypes[0]&&i.accepts[i.dataTypes[0]]?i.accepts[i.dataTypes[0]]+(i.dataTypes[0]!=="*"?", "+an+"; q=0.01":""):i.accepts["*"]);for(x in i.headers)T.setRequestHeader(x,i.headers[x]);if(!i.beforeSend||i.beforeSend.call(s,T,i)!==!1&&E!==2){for(x in{success:1,error:1,complete:1})T[x](i[x]);y=p(sn,i,n,T);if(!y)r(-1,"No Transport");else{T.readyState=1,S&&o.trigger("ajaxSend",[T,i]),i.async&&i.timeout>0&&(b=setTimeout(function(){T.abort("timeout")},i.timeout));try{E=1,y.send(d,r)}catch(k){if(!(E<2))throw k;r(-1,k)}}return T}return T.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=H.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=H.ajaxSettings.traditional);if(H.isArray(e)||e.jquery&&!H.isPlainObject(e))H.each(e,function(){i(this.name,this.value)});else for(var s in e)c(s,e[s],n,i);return r.join("&").replace(Rt,"+")}}),H.extend({active:0,lastModified:{},etag:{}});var ln=H.now(),cn=/(\=)\?(&|$)|\?\?/i;H.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return H.expando+"_"+ln++}}),H.ajaxPrefilter("json jsonp",function(t,n,r){var i=typeof t.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if(t.dataTypes[0]==="jsonp"||t.jsonp!==!1&&(cn.test(t.url)||i&&cn.test(t.data))){var s,o=t.jsonpCallback=H.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u=e[o],a=t.url,f=t.data,l="$1"+o+"$2";return t.jsonp!==!1&&(a=a.replace(cn,l),t.url===a&&(i&&(f=f.replace(cn,l)),t.data===f&&(a+=(/\?/.test(a)?"&":"?")+t.jsonp+"="+o))),t.url=a,t.data=f,e[o]=function(e){s=[e]},r.always(function(){e[o]=u,s&&H.isFunction(u)&&e[o](s[0])}),t.converters["script json"]=function(){return s||H.error(o+" was not called"),s[0]},t.dataTypes[0]="json","script"}}),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return H.globalEval(e),e}}}),H.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),H.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=_.head||_.getElementsByTagName("head")[0]||_.documentElement;return{send:function(i,s){n=_.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var hn=e.ActiveXObject?function(){for(var e in dn)dn[e](0,1)}:!1,pn=0,dn;H.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&a()||u()}:a,function(e){H.extend(H.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(H.ajaxSettings.xhr()),H.support.ajax&&H.ajaxTransport(function(n){if(!n.crossDomain||H.support.cors){var r;return{send:function(i,s){var o=n.xhr(),u,a;n.username?o.open(n.type,n.url,n.async,n.username,n.password):o.open(n.type,n.url,n.async);if(n.xhrFields)for(a in n.xhrFields)o[a]=n.xhrFields[a];n.mimeType&&o.overrideMimeType&&o.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(a in i)o.setRequestHeader(a,i[a])}catch(f){}o.send(n.hasContent&&n.data||null),r=function(e,i){var a,f,l,c,h;try{if(r&&(i||o.readyState===4)){r=t,u&&(o.onreadystatechange=H.noop,hn&&delete dn[u]);if(i)o.readyState!==4&&o.abort();else{a=o.status,l=o.getAllResponseHeaders(),c={},h=o.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=o.responseText}catch(e){}try{f=o.statusText}catch(p){f=""}!a&&n.isLocal&&!n.crossDomain?a=c.text?200:404:a===1223&&(a=204)}}}catch(d){i||s(-1,d)}c&&s(a,f,c,l)},!n.async||o.readyState===4?r():(u=++pn,hn&&(dn||(dn={},H(e).unload(hn)),dn[u]=r),o.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var vn={},mn,gn,yn=/^(?:toggle|show|hide)$/,bn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,wn,En=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Sn;H.fn.extend({show:function(e,t,n){var s,o;if(e||e===0)return this.animate(i("show",3),e,t,n);for(var u=0,a=this.length;u<a;u++)s=this[u],s.style&&(o=s.style.display,!H._data(s,"olddisplay")&&o==="none"&&(o=s.style.display=""),(o===""&&H.css(s,"display")==="none"||!H.contains(s.ownerDocument.documentElement,s))&&H._data(s,"olddisplay",r(s.nodeName)));for(u=0;u<a;u++){s=this[u];if(s.style){o=s.style.display;if(o===""||o==="none")s.style.display=H._data(s,"olddisplay")||""}}return this},hide:function(e,t,n){if(e||e===0)return this.animate(i("hide",3),e,t,n);var r,s,o=0,u=this.length;for(;o<u;o++)r=this[o],r.style&&(s=H.css(r,"display"),s!=="none"&&!H._data(r,"olddisplay")&&H._data(r,"olddisplay",s));for(o=0;o<u;o++)this[o].style&&(this[o].style.display="none");return this},_toggle:H.fn.toggle,toggle:function(e,t,n){var r=typeof e=="boolean";return H.isFunction(e)&&H.isFunction(t)?this._toggle.apply(this,arguments):e==null||r?this.each(function(){var t=r?e:H(this).is(":hidden");H(this)[t?"show":"hide"]()}):this.animate(i("toggle",3),e,t,n),this},fadeTo:function(e,t,n,r){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,i){function s(){o.queue===!1&&H._mark(this);var t=H.extend({},o),n=this.nodeType===1,i=n&&H(this).is(":hidden"),s,u,a,f,l,c,h,p,d,v,m;t.animatedProperties={};for(a in e){s=H.camelCase(a),a!==s&&(e[s]=e[a],delete e[a]);if((l=H.cssHooks[s])&&"expand"in l){c=l.expand(e[s]),delete e[s];for(a in c)a in e||(e[a]=c[a])}}for(s in e){u=e[s],H.isArray(u)?(t.animatedProperties[s]=u[1],u=e[s]=u[0]):t.animatedProperties[s]=t.specialEasing&&t.specialEasing[s]||t.easing||"swing";if(u==="hide"&&i||u==="show"&&!i)return t.complete.call(this);n&&(s==="height"||s==="width")&&(t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],H.css(this,"display")==="inline"&&H.css(this,"float")==="none"&&(!H.support.inlineBlockNeedsLayout||r(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}t.overflow!=null&&(this.style.overflow="hidden");for(a in e)f=new H.fx(this,t,a),u=e[a],yn.test(u)?(m=H._data(this,"toggle"+a)||(u==="toggle"?i?"show":"hide":0),m?(H._data(this,"toggle"+a,m==="show"?"hide":"show"),f[m]()):f[u]()):(h=bn.exec(u),p=f.cur(),h?(d=parseFloat(h[2]),v=h[3]||(H.cssNumber[a]?"":"px"),v!=="px"&&(H.style(this,a,(d||1)+v),p=(d||1)/f.cur()*p,H.style(this,a,p+v)),h[1]&&(d=(h[1]==="-="?-1:1)*d+p),f.custom(p,d,v)):f.custom(p,u,""));return!0}var o=H.speed(t,n,i);return H.isEmptyObject(e)?this.each(o.complete,[!1]):(e=H.extend({},e),o.queue===!1?this.each(s):this.queue(o.queue,s))},stop:function(e,n,r){return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){function t(e,t,n){var i=t[n];H.removeData(e,n,!0),i.stop(r)}var n,i=!1,s=H.timers,o=H._data(this);r||H._unmark(!0,this);if(e==null)for(n in o)o[n]&&o[n].stop&&n.indexOf(".run")===n.length-4&&t(this,o,n);else o[n=e+".run"]&&o[n].stop&&t(this,o,n);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(r?s[n](!0):s[n].saveState(),i=!0,s.splice(n,1));(!r||!i)&&H.dequeue(this,e)})}}),H.each({slideDown:i("show",1),slideUp:i("hide",1),slideToggle:i("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){H.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),H.extend({speed:function(e,t,n){var r=e&&typeof e=="object"?H.extend({},e):{complete:n||!n&&t||H.isFunction(e)&&e,duration:e,easing:n&&t||t&&!H.isFunction(t)&&t};r.duration=H.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in H.fx.speeds?H.fx.speeds[r.duration]:H.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(e){H.isFunction(r.old)&&r.old.call(this),r.queue?H.dequeue(this,r.queue):e!==!1&&H._unmark(this)},r},easing:{linear:function(e){return e},swing:function(e){return-Math.cos(e*Math.PI)/2+.5}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),H.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(H.fx.step[this.prop]||H.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var e,t=H.css(this.elem,this.prop);return isNaN(e=parseFloat(t))?!t||t==="auto"?0:t:e}return this.elem[this.prop]},custom:function(e,n,r){function i(e){return s.step(e)}var s=this,u=H.fx;this.startTime=Sn||o(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=r||this.unit||(H.cssNumber[this.prop]?"":"px"),i.queue=this.options.queue,i.elem=this.elem,i.saveState=function(){H._data(s.elem,"fxshow"+s.prop)===t&&(s.options.hide?H._data(s.elem,"fxshow"+s.prop,s.start):s.options.show&&H._data(s.elem,"fxshow"+s.prop,s.end))},i()&&H.timers.push(i)&&!wn&&(wn=setInterval(u.tick,u.interval))},show:function(){var e=H._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||H.style(this.elem,this.prop),this.options.show=!0,e!==t?this.custom(this.cur(),e):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),H(this.elem).show()},hide:function(){this.options.orig[this.prop]=H._data(this.elem,"fxshow"+this.prop)||H.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(e){var t,n,r,i=Sn||o(),s=!0,u=this.elem,a=this.options;if(e||i>=a.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),a.animatedProperties[this.prop]=!0;for(t in a.animatedProperties)a.animatedProperties[t]!==!0&&(s=!1);if(s){a.overflow!=null&&!H.support.shrinkWrapBlocks&&H.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&H(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)H.style(u,t,a.orig[t]),H.removeData(u,"fxshow"+t,!0),H.removeData(u,"toggle"+t,!0);r=a.complete,r&&(a.complete=!1,r.call(u))}return!1}return a.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/a.duration,this.pos=H.easing[a.animatedProperties[this.prop]](this.state,n,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},H.extend(H.fx,{tick:function(){var e,t=H.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||H.fx.stop()},interval:13,stop:function(){clearInterval(wn),wn=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){H.style(e.elem,"opacity",e.now)},_default:function(e){e.elem.style&&e.elem.style[e.prop]!=null?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}}}),H.each(En.concat.apply([],En),function(e,t){t.indexOf("margin")&&(H.fx.step[t]=function(e){H.style(e.elem,t,Math.max(0,e.now)+e.unit)})}),H.expr&&H.expr.filters&&(H.expr.filters.animated=function(e){return H.grep(H.timers,function(t){return e===t.elem}).length});var xn,Tn=/^t(?:able|d|h)$/i,Nn=/^(?:body|html)$/i;"getBoundingClientRect"in _.documentElement?xn=function(e,t,r,i){try{i=e.getBoundingClientRect()}catch(s){}if(!i||!H.contains(r,e))return i?{top:i.top,left:i.left}:{top:0,left:0};var o=t.body,u=n(t),a=r.clientTop||o.clientTop||0,f=r.clientLeft||o.clientLeft||0,l=u.pageYOffset||H.support.boxModel&&r.scrollTop||o.scrollTop,c=u.pageXOffset||H.support.boxModel&&r.scrollLeft||o.scrollLeft,h=i.top+l-a,p=i.left+c-f;return{top:h,left:p}}:xn=function(e,t,n){var r,i=e.offsetParent,s=e,o=t.body,u=t.defaultView,a=u?u.getComputedStyle(e,null):e.currentStyle,f=e.offsetTop,l=e.offsetLeft;while((e=e.parentNode)&&e!==o&&e!==n){if(H.support.fixedPosition&&a.position==="fixed")break;r=u?u.getComputedStyle(e,null):e.currentStyle,f-=e.scrollTop,l-=e.scrollLeft,e===i&&(f+=e.offsetTop,l+=e.offsetLeft,H.support.doesNotAddBorder&&(!H.support.doesAddBorderForTableAndCells||!Tn.test(e.nodeName))&&(f+=parseFloat(r.borderTopWidth)||0,l+=parseFloat(r.borderLeftWidth)||0),s=i,i=e.offsetParent),H.support.subtractsBorderForOverflowNotVisible&&r.overflow!=="visible"&&(f+=parseFloat(r.borderTopWidth)||0,l+=parseFloat(r.borderLeftWidth)||0),a=r}if(a.position==="relative"||a.position==="static")f+=o.offsetTop,l+=o.offsetLeft;return H.support.fixedPosition&&a.position==="fixed"&&(f+=Math.max(n.scrollTop,o.scrollTop),l+=Math.max(n.scrollLeft,o.scrollLeft)),{top:f,left:l}},H.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){H.offset.setOffset(this,e,t)});var n=this[0],r=n&&n.ownerDocument;return r?n===r.body?H.offset.bodyOffset(n):xn(n,r,r.documentElement):null},H.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return H.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(H.css(e,"marginTop"))||0,n+=parseFloat(H.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=H.css(e,"position");r==="static"&&(e.style.position="relative");var i=H(e),s=i.offset(),o=H.css(e,"top"),u=H.css(e,"left"),a=(r==="absolute"||r==="fixed")&&H.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),H.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Nn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(H.css(e,"marginTop"))||0,n.left-=parseFloat(H.css(e,"marginLeft"))||0,r.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(H.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||_.body;while(e&&!Nn.test(e.nodeName)&&H.css(e,"position")==="static")e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var i=/Y/.test(r);H.fn[e]=function(s){return H.access(this,function(e,s,o){var u=n(e);if(o===t)return u?r in u?u[r]:H.support.boxModel&&u.document.documentElement[s]||u.document.body[s]:e[s];u?u.scrollTo(i?H(u).scrollLeft():o,i?o:H(u).scrollTop()):e[s]=o},e,s,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,s="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,n,"padding")):this[n]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,n,e?"margin":"border")):this[n]():null},H.fn[n]=function(e){return H.access(this,function(e,n,o){var u,a,f,l;if(H.isWindow(e))return u=e.document,a=u.documentElement[r],H.support.boxModel&&a||u.body&&u.body[r]||a;if(e.nodeType===9)return u=e.documentElement,u[r]>=u[i]?u[r]:Math.max(e.body[i],u[i],e.body[s],u[s]);if(o===t)return f=H.css(e,n),l=parseFloat(f),H.isNumeric(l)?l:f;H(e).css(n,o)},n,e,arguments.length,null)}}),e.jQuery=e.$=H,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})})(window),define("Shared/External/jQuery",function(){}),define("Shared/Utilities/JQueryExt",["require","Shared/External/jQuery"],function(e){e("Shared/External/jQuery");var t=$.noConflict();return t.fn.extend({reverse:function(){return this.pushStack(this.get().reverse(),arguments)},isOnScreen:function(e){if(!this.is(":visible"))return!1;var t=e+window.encpPlatform.viewPort().height,n=this.offset().top,r=n+this.height();return r<=t&&n>=e},isBelowViewPort:function(e){if(!this.is(":visible"))return!1;var t=e+window.encpPlatform.viewPort().height,n=this.offset().top,r=n+this.height();return r>t},isAboveViewPort:function(e){if(!this.is(":visible"))return!1;var t=this.offset().top;return t<e}}),t}),define("Mac/ENCPPlatform",["require","Shared/Utilities/JQueryExt"],function(e){var t=e("Shared/Utilities/JQueryExt"),n=function(){};return n.prototype={viewPortSize:null,scaleRatio:1,host:function(){return window.encpPlatformLink?window.encpPlatformLink:(console.log("[WARN] Cannot access host"),window.encpPlatformLink={willSetupWebview:function(){},didClickMediaWithParameters:function(e){},requestDocumentInformationForURL:function(e,t,n,r,i){},didMoveToEndOfNote:function(){},didMoveFromEndOfNote:function(){},beep:function(){},didParseMediaItems:function(e){},willStartLayouting:function(){},didFinishLayouting:function(){},didFinishPageLoad:function(){},didFinishStyleUpdate:function(){},didScrollToPosition:function(e,t){},navigateToNextNote:function(){},navigateToPreviousNote:function(){},showLog:function(e){},viewPort:function(){return{height:t(window).height(),width:t(window).width()}},setViewPortSize:function(e){},didChangeSectionBreaks:function(e,t,n){},didClickPageAtOffsetY:function(e){},didSetupHeaderCaptions:function(e){},didSetupFooterCaptions:function(e){},applicationDidLoad:function(e){}},window.encpPlatformLink)},setupPlatform:function(){this.host().willSetupWebview()},didClickMediaWithParameters:function(e){this.host().didClickMediaWithParameters(JSON.stringify(e))},requestDocumentInformationForURL:function(e,t,n,r,i){if(!e||!t){this.showLog({message:"invalid url or invalid mime type",caller:"ENCPPlatform.requestDocumentInformationForURL"});return}n||(n=""),this.host().requestDocumentInformationForURL(e,t,n,r,i)},didMoveToEndOfNote:function(){this.host().didMoveToEndOfNote()},didMoveFromEndOfNote:function(){this.host().didMoveFromEndOfNote()},beep:function(){this.host().beep()},didParseMediaItems:function(e){this.host().didParseMediaItems(JSON.stringify(e))},willStartLayouting:function(){this.host().willStartLayouting()},didFinishLayouting:function(){this.host().didFinishLayouting()},didFinishPageLoad:function(){this.host().didFinishPageLoad()},didFinishStyleUpdate:function(){},didScrollToPosition:function(e,t){this.host().didScrollToPosition(e,t)},navigateToNextNote:function(){this.host().navigateToNextNote()},navigateToPreviousNote:function(){this.host().navigateToPreviousNote()},showLog:function(e){this.host().showLog(JSON.stringify(e))},EMBEDDED_MEDIA_PATH_PREFIX:"http://encoverpage.localhost/",fixEmbeddedMedia:function(e){var n=this;t(e).find("embed[id^='en-media']").replaceWith(function(){var e=t(this),r=t("<img class='en-media '/>"),i=e.attr("src"),s=e.attr("type"),o=e.attr("title"),u="";return o.match(/.+\.([^.]+$)/)&&(u=RegExp.$1),r.attr("src",n.EMBEDDED_MEDIA_PATH_PREFIX+i+"?type="+s+"&ext="+u),r.addClass(e.attr("class")),r.wrap('<div class="encp-media-container"/>').wrap('<div class="encp-media-preview"/>'),r.closest(".encp-media-container").attr("data-media-url",i).attr("data-media-mime",s).attr("data-media-filename",o).addClass("encp-can-open-attachment")})},didAdjustImages:function(){t('img[src^="'+this.EMBEDDED_MEDIA_PATH_PREFIX+'"]').each(function(){t(this).closest(".encp-media-preview").css("width",t(this).width()+"px")})},markBrokenNoteLinks:function(e){},viewPort:function(){if(this.viewPortSize==null){var e=t(window);return{height:e.height(),width:e.width()}}return this.viewPortSize},setViewPortSize:function(e){e=JSON.parse(e),e?this.viewPortSize=e:this.viewPortSize=null},shouldHandleResizing:function(){return!0},hasViewPortBeenOverriden:function(){return!1},imagesToBeAdjusted:function(e){return null},ADDITIONAL_ZOOM_PERCENT:10,adjustZoomLevel:function(e,n,r){if(n==0)return;var i=this.viewPort().width*100/n+this.ADDITIONAL_ZOOM_PERCENT;i*=r,t(e).css("zoom",""+i/100)},didChangeSectionBreaks:function(e,t,n){e||(e=[]),t||(t=[]),this.host().didChangeSectionBreaks(JSON.stringify({enabledIndexes:e,disabledIndexes:t,withDragging:n}))},didClickPageAtOffsetY:function(e){this.host().didClickPageAtOffsetY(e)},didSetupHeaderCaptions:function(e){this.host().didSetupHeaderCaptions(e)},didSetupFooterCaptions:function(e){this.host().didSetupFooterCaptions(e)},applicationDidLoad:function(e){this.host().applicationDidLoad(e)}},n}),define("Shared/Utilities/ENCPLogger",["require"],function(e){function o(){this.outputFunction=null}function u(e,t){var n=Array.prototype.slice.call(t,0),r=n.join(", "),i=undefined,o=undefined;try{throw new Error}catch(u){if(u.stack){var a=u.stack.split("\n");if(a[0]=="Error"){var f=a[3].match("^\\s+at\\s+(.+)\\s+\\((.*)\\)$");i=f?f[1]:undefined,o=f?f[2].split("/").slice(-1)[0]:undefined}else{var l=a[2].match("^((.+)@)?(.*)$");i=l?l[2]:undefined,o=l?l[3].split("/").slice(-1)[0]:undefined}}}i=i||"(unnamed)",console.log("["+s[e]+": "+i+", "+o+"] "+r);if(this.outputFunction){var c={caller:i,message:r,file:o,level:e};this.outputFunction(c)}}var t=1,n=2,r=3,i=4,s={};return s[t]="DEBUG",s[n]="INFO",s[r]="WARN",s[i]="ERROR",o.prototype.logDebug=function(){u.call(this,t,arguments)},o.prototype.logInfo=function(){u.call(this,n,arguments)},o.prototype.logWarn=function(){u.call(this,r,arguments)},o.prototype.logError=function(){u.call(this,i,arguments)},new o}),define("Shared/Utilities/ENCPDeferred",["require"],function(e){var t=function(e){return this.queue=[],this.timer=null,this.finalCallback=typeof e=="function"?e:null,this};return t.doNow=function(e){t.list||(t.list=[]);if(e){if(typeof e!="function")throw"error: a callback must be a function.";e()}var n=new t(function(){t.list.shift()});return t.list.push(n),n},t.tearDown=function(){if(t.list){for(var e=0,n=t.list.length;e<n;++e)t.list[e].cancel();t.list=[]}},t.prototype={then:function(e){if(typeof e!="function")throw"error: a callback must be a function.";return this.queue.push({call:e,wait:!1}),this},waitUntil:function(e){if(typeof e!="function")throw"error: a callback must be a function.";return this.queue.push({call:e,wait:!0}),this},cancel:function(){this.timer&&window.clearTimeout(this.timer),this.queue=[]},done:function(){var e=this;e.timer=window.setTimeout(function(){var t=e.queue.shift(),n=t.call();t.wait&&!n&&e.queue.unshift(t),e.queue.length>0?e.done():e.finalCallback&&e.finalCallback()},10)}},t}),define("Shared/Utilities/ENCPUtilities",["require"],function(e){var t={};return t.arrayFromNodeList=function(e){return Array.prototype.slice.call(e,0)},t.parentForElements=function(e,t){function n(e){var t=0;while(e.parentNode)e=e.parentNode,t++;return t}var r=n(e),i=n(t),s=r-i;while(s>0)s--,e=e.parentNode;while(s<0)s++,t=t.parentNode;while(e!==t)e=e.parentNode,t=t.parentNode;return e},t.elementPositionRelativeToParent=function(e,t){var n={x:e.offsetLeft,y:e.offsetTop},r=e.offsetParent;while(r&&r!=t)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;return n},t.createStyleSheet=function(e){var t=document.createElement("style");t.classList.add("encp-style-sheet");var n=setInterval(function(){for(var r=0,i=document.styleSheets.length;r<i;r++){var s=document.styleSheets[r];if(s.ownerNode==t){clearInterval(n),typeof e=="function"&&e(s);break}}},10);return document.head.appendChild(t),t},t.getChildOfClass=function(e,t){for(var n=e.firstChild;!!n;n=n.nextSibling){if(n.nodeType!=Node.ELEMENT_NODE)continue;if(n.classList.contains(t))return n;var r=this.getChildOfClass(n,t);if(r)return r}return null},t.matchesSelector=function(e,t){return(e.matches||e.webkitMatchesSelector).call(e,t)},t}),define("Shared/LayoutEditor/ENCPSectionBreak",["require","Shared/Utilities/JQueryExt","Shared/Utilities/ENCPUtilities"],function(e){function r(e){this.breaksDisabledForSaving=null,this.rootElement=e}function p(e){e&&e.parentElement&&e.parentElement.removeChild(e)}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/Utilities/ENCPUtilities"),i="-evernote-encp-section-break:true;",s="display:none;"+i,o='<hr style="'+s+'"/>',u="encp-section-break",a='<div class="'+u+'"></div>',f="encp-hidden-section-break",l='<div class="'+f+'"></div>',c="encp-enabled-section-break",h='<div class="'+c+'"></div>';return r.isBreak=function(e){if(!e)return!1;var t=e.classList;return t.contains(u)||t.contains(c)||t.contains(f)},r.isNoteBreak=function(e){if(!e)return!1;var t=e.getAttribute("style");return t?(t=t.replace(/\s/g,""),t.indexOf(i)!=-1):!1},r.isDisabledBreak=function(e){return e&&e.classList.contains(u)},r.isEnabledBreak=function(e){return e&&e.classList.contains(c)},r.isHiddenBreak=function(e){return e&&e.classList.contains(f)},r.prototype.findAllBreaks=function(e){var t=e?e:this.rootElement,r=t.querySelectorAll("."+u+", ."+c+", ."+f);return n.arrayFromNodeList(r)},r.prototype.findNoteBreaks=function(){var e=this.rootElement.querySelectorAll("[style*='"+i+"']");return n.arrayFromNodeList(e)},r.prototype.findEnabledBreaks=function(){var e=this.rootElement.querySelectorAll("."+c);return n.arrayFromNodeList(e)},r.prototype.findHiddenBreaks=function(){var e=this.rootElement.querySelectorAll("."+f);return n.arrayFromNodeList(e)},r.prototype.setBreakAtIndexEnabled=function(e,t){var n=this.findAllBreaks()[e];return n?r.isEnabledBreak(n)==t?!1:(this.setBreakEnabled(n,t),!0):!1},r.prototype.setBreakAtIndexHidden=function(e,t){var n=this.findAllBreaks()[e];return n?r.isHiddenBreak(n)==t?!1:(this.setBreakHidden(n,t),!0):!1},r.prototype.setBreakEnabled=function(e,n){var r=t(e);if(r.hasClass(u))n&&r.removeClass(u).addClass(c);else{if(!r.hasClass(c))throw r.hasClass(f)?"You can't enable hidden section break":"Bad breakElement: "+e;n||r.removeClass(c).addClass(u)}},r.prototype.setBreakHidden=function(e,n){var r=t(e);if(r.hasClass(u))n&&r.removeClass(u).addClass(f).hide();else{if(!r.hasClass(f))throw r.hasClass(c)?"You can't hide enabled section break":"Bad breakElement: "+e;n||r.removeClass(f).addClass(u).show()}},r.prototype.setupBreaks=function(){function i(e,n){if(!n(e))return;t(e).contents().each(function(e,t){i(t,n)}),n(e)}function o(e){if(e.nodeType===Node.TEXT_NODE)return e.nodeValue.trim().length>0?s.TEXT:s.UNKNOWN_NODE;if(r.isBreak(e))return s.SECTION_BREAK_TAG;if(r.isNoteBreak(e))return s.SECTION_BREAK_TAG;var t=e.tagName;if(t===undefined)return s.UNKNOWN_NODE;t=t.toLowerCase();if(t=="embed"&&e.getAttribute("type")=="evernote/x-todo")return s.TEXT_TAG;if(e.id==="en-editor-last-insertion-point")return s.CURSOR_POSITION;if(n.matchesSelector(e,"img.en-todo"))return s.TEXT_TAG;var i={a:s.TEXT_TAG,abbr:s.SECTION_TAG,address:s.SECTION_TAG,b:s.TEXT_TAG,body:s.TEXT_SECTION_TAG,br:s.LINEBREAK_TAG,div:s.TEXT_SECTION_TAG,embed:s.SECTION_TAG,font:s.TEXT_TAG,sup:s.TEXT_TAG,sub:s.TEXT_TAG,h1:s.SECTION_TAG,h2:s.SECTION_TAG,h3:s.SECTION_TAG,h4:s.SECTION_TAG,h5:s.SECTION_TAG,h6:s.SECTION_TAG,hr:s.SECTION_TAG,html:s.TEXT_SECTION_TAG,i:s.TEXT_TAG,img:s.SECTION_TAG,li:s.SECTION_TAG,s:s.TEXT_TAG,strong:s.TEXT_TAG,u:s.TEXT_TAG,ul:s.SECTION_TAG,ol:s.SECTION_TAG,p:s.TEXT_SECTION_TAG,span:s.TEXT_TAG,table:s.SECTION_TAG}[t];return i===undefined?s.UNKNOWN_NODE:i}var e=this,s={TEXT:0,TEXT_TAG:1,TEXT_SECTION_TAG:2,SECTION_TAG:3,SECTION_BREAK_TAG:4,CURSOR_POSITION:5,LINEBREAK_TAG:6,UNKNOWN_NODE:7},u=undefined,f=undefined,l=!1,c=[],d=!1;i(this.rootElement,function(e){function p(){if(f!==undefined){var r=n.parentForElements(f,e),i=t(f).parentsUntil(r).last(),s=d?t(h):t(a);i.length?i.after(s):t(f).after(s),d=!1}f=e}var i=u;u=o(e);switch(u){case s.TEXT:return l?f=e:(p(e),l=!0),!1;case s.TEXT_TAG:return!0;case s.TEXT_SECTION_TAG:return l=!1,!0;case s.SECTION_TAG:return p(e),l=!1,!1;case s.SECTION_BREAK_TAG:c.push(e);if(r.isNoteBreak(e)||r.isEnabledBreak(e))d=!0;return!1;case s.CURSOR_POSITION:return!1;case s.LINEBREAK_TAG:return u===i&&(p(e),l=!1),!1;case s.UNKNOWN_NODE:return l=!1,!1}throw"Bad sequencing flow"}),c.forEach(function(e){p(e)})},r.prototype.setupBreaksAndTitle=function(){var e=document.createElement("img");this.rootElement.insertBefore(e,this.rootElement.firstChild),this.setupBreaks(),p(e)},r.prototype.prepareBreaksForSaving=function(){if(this.breaksDisabledForSaving)throw"Already stored breaks";this.breaksDisabledForSaving=[],this.findAllBreaks().forEach(function(e){this.breaksDisabledForSaving.unshift({nextNode:e.nextSibling,parentElement:e.parentElement,breakNode:e}),r.isEnabledBreak(e)&&e.insertAdjacentHTML("afterend",o),p(e)},this)},r.prototype.restoreBreaksAfterSaving=function(){if(!this.breaksDisabledForSaving)throw"Has no stored breaks";this.findNoteBreaks().forEach(function(e){p(e)}),this.breaksDisabledForSaving.forEach(function(e){e.nextNode?e.nextNode.parentElement.insertBefore(e.breakNode,e.nextNode):e.parentElement.insertBefore(e.breakNode,null)}),this.breaksDisabledForSaving=null},r.prototype.disableAllEnabledSectionBreaks=function(){this.findEnabledBreaks().forEach(function(e){this.setBreakEnabled(e,!1)},this)},r}),define("Shared/NotePresenter/ENCPImageLayout",["require","Shared/Utilities/JQueryExt","Shared/LayoutEditor/ENCPSectionBreak"],function(e){function r(e){this.pageSummary=[],this.isResponsiveLayout=!1,this.canHandleCaptions=!1,e&&(g(),b(),this.canHandleCaptions=!0)}function g(){t("*:visible").each(function(){t(this).contents().filter(function(){var e=this.nextSibling||this.previousSibling;return e&&e.id==c&&(e=null),this.nodeType==Node.TEXT_NODE&&this.nodeValue.trim().length>0&&e}).wrap('<span class="encp-minimal-text"/>')})}function y(){t("."+d).removeClass(d),t("* > br:only-child").each(function(e,t){var n=t.parentElement;n.textContent.length||n.classList.add(p)})}function b(){t("table").each(function(){var e=t(this);e.parent("table").length==0&&e.wrap('<div class="encp-table-container"/>');var n=e.find("tr:first-child");n.has("img").length||n.addClass("encp-header-row")})}function w(e,t){e.width*=t.height/e.height,e.height=t.height}function E(e,t){e.height*=t.width/e.width,e.width=t.width}function S(e){return!e.is(".encp-checkbox + .encp-minimal-text")&&e.closest("li").length==0&&e.closest("tr").length==0}function T(e){var n=0,r=null;return e.attr(l)&&(r=JSON.parse(e.attr(l))),r&&r.length===Object.keys(x).length&&(r[x.HEADER]&&(n+=t("#"+a+"-"+r[x.PAGE_INDEX]).outerHeight()),r[x.FOOTER]&&(n+=t("#"+f+"-"+r[x.PAGE_INDEX]).outerHeight())),n}function N(e){var t=null;return e.attr(l)&&(t=JSON.parse(e.attr(l))),t&&t.length===Object.keys(x).length?t[x.PAGE_INDEX]:undefined}function C(e,t){var n=e.height(),r=T(e);if(r>0&&n+r<t){var i=t-n-r;return{"margin-top":Math.ceil(i/2)+"px","margin-bottom":Math.floor(i/2)+"px"}}return{"margin-top":"","margin-bottom":""}}function k(e,n,r){if(e){var i=!1,s=!1;e.target.length==1&&!e.hasTitle&&r.findEnabledBreaks().length>0&&(i=e.header.length==1&&e.footer.length<=1&&S(e.header[0]),s=e.footer.length==1&&e.header.length<=1&&S(e.footer[0]));var o={hasHeader:i,hasFooter:s,imgCount:e.imgCount,contentCount:e.target.length+e.txtCount,pageHeight:0,hasTopMargin:e.hasTitle||e.header.length>0&&!i||e.target.length==0&&e.txtCount>0,hasBottomMargin:e.footer.length>0&&!s||e.target.length==0&&e.txtCount>0},u=JSON.stringify([n,i,s]);i&&t(e.header).wrap('<div class="'+a+'" id="'+a+"-"+n+'"/>'),s&&t(e.footer).wrap('<div class="'+f+'" id="'+f+"-"+n+'"/>/>'),e.target.forEach(function(t,n){t.attr(l,u);var r=t.is("img")?t.closest(".encp-media-container"):t.closest(".encp-table-container"),a={"margin-top":"","margin-bottom":""};!i&&!s&&(e.target.length>1||e.txtCount>1)?(r.addClass(h),n==0&&!o.hasTopMargin?a["margin-top"]="0":n==e.target.length-1&&!o.hasBottomMargin&&(a["margin-bottom"]="0")):r.removeClass(h),r.css(a)},this),(o.hasHeader||o.hasFooter||e.txtCount==0)&&e.spacer.forEach(function(e){e.classList.add(d)}),e.headerSpacerToHide.forEach(function(e){e.classList.add(d)}),e.footerSpacerToHide.forEach(function(e){e.classList.add(d)}),this.pageSummary[n]=o}return{target:[],header:[],footer:[],spacer:[],headerSpacerToHide:[],footerSpacerToHide:[],imgCount:0,txtCount:0,hasTitle:!1}}function L(){t("."+a).children().unwrap(),t("."+f).children().unwrap()}function A(e,n,r){var i=t(e);r.width*=.7,r.height=Math.min(r.height*.9,r.height*.95-T(i)),n.width=Math.floor(n.width),n.height=Math.floor(n.height),n.width>=r.width&&E(n,r),n.height>r.height&&w(n,r),i.css({"max-width":"none","max-height":"none",width:n.width,height:n.height}).addClass(n.width<=n.height?"encp-portrait":"encp-landscape"),i.closest(".encp-media-container").addClass("encp-media-nonimage").css(C(i,r.height))}function O(e,n){var r=t(e),i=r.closest(".encp-media-container"),s=i.width();r.css({width:n.width>s?s:"",height:""}),i.css({"margin-left":"0","margin-right":"0"})}function M(e,n,r){var i=t(e);i.css({width:Math.floor(n.width*o),"max-height":Math.floor(r.height*u)})}function _(e,r,i){var s=t(e),o=s.closest(".encp-media-container"),u=o.get(0),a=function(e){var t=u[e];return t&&t.nodeType==Node.TEXT_NODE&&(t=t[e]),t&&t.id==c&&(t=t[e]),t};if(!o.parent().hasClass("encp-media-container-inline")){s.addClass("encp-small-image");var f=a("previousSibling"),l=a("nextSibling");n.isDisabledBreak(f)&&i.setBreakHidden(f,!0),n.isDisabledBreak(l)&&i.setBreakHidden(l,!0),o.css({"margin-left":f?"0.2rem":"0","margin-right":l?"0.2rem":"0"}),o.wrap('<div class="encp-media-container-inline"/>')}}function D(e,n,r){var i=t(e);n.width<=n.height?i.addClass("encp-portrait"):i.addClass("encp-landscape");var o={"max-width":"none","max-height":"none","margin-top":"","margin-bottom":"",width:"",height:""},u=this.isResponsiveLayout?1:r.width/s;n.width*=2*u,n.height*=2*u,n.width>=r.width&&E(n,r);var a=T(i);r.height-=a,n.height>r.height&&w(n,r),n.width=Math.floor(n.width),n.height=Math.floor(n.height),o.width=n.width+"px",o.height=n.height+"px";var f=N(i),l=null;f!==undefined&&(l=this.pageSummary[f]);if(a>0){var c=Math.max(0,r.height-n.height);o["margin-top"]=Math.ceil(c/2)+"px",o["margin-bottom"]=Math.floor(c/2)+"px",l&&(l.pageHeight=n.height+a+c)}else l&&l.imgCount==1&&l.contentCount==1&&(l.pageHeight=n.height+a);i.css(o)}function P(){var e=0,n=0;t("*["+l+"]").each(function(){var r=t(this),i=JSON.parse(r.attr(l));i&&(e+=i[x.HEADER]?1:0,n+=i[x.FOOTER]?1:0)}),window.encpPlatform.didSetupHeaderCaptions(e),window.encpPlatform.didSetupFooterCaptions(n)}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/LayoutEditor/ENCPSectionBreak"),i=200,s=1440,o=1.3,u=.9,a="encp-media-caption-header",f="encp-media-caption-footer",l="data-encp-media-caption",c="en-editor-last-insertion-point",h="encp-media-with-padding",p="encp-line-spacer",d="encp-hidden-line-spacer",v="data-encp-base-width",m="data-encp-base-height",x={PAGE_INDEX:0,HEADER:1,FOOTER:2};return r.prototype.setupCaptions=function(e){function o(e){var n=t(e);return n.is("* + br")?e:n.parent().is("."+p)?e.parentNode:n.is("br")&&!e.previousSibling?e:null}if(!this.canHandleCaptions)return;var r=this,i=0,s=k.call(r,null,i,e);r.pageSummary=[],y(),L();var u=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT);for(var a=u.currentNode;a;a=u.nextNode()){var f=t(a);if(a.id==c)continue;if(n.isEnabledBreak(a)){s=k.call(r,s,i++,e);continue}if(f.is(".encp-table-container > table")){s.footer=[],s.target.push(f);continue}if(f.is(".encp-media-container img")&&!f.hasClass("encp-table-image")){s.footer=[],s.imgCount++,s.target.push(f);continue}if(f.children().length!=1||!f.children().is("#"+c))if(f.children().length>0||f.closest("table").length>0)continue;var l=o(a);l?(s.spacer.push(l),s.txtCount==0?s.headerSpacerToHide.push(l):s.footerSpacerToHide.push(l)):f.is("h1.title")?s.hasTitle=!0:f.text().trim().length>0&&(s.footerSpacerToHide=[],s.txtCount++,s.target.length==0?s.header.push(f):s.footer.push(f))}k.call(r,s,i,e),P()},r.prototype.setImageBaseSize=function(e,t,n){t&&n&&(e.setAttribute(v,t+""),e.setAttribute(m,n+""))},r.prototype.getImageBaseSize=function(e){var t=e.naturalWidth,n=e.naturalHeight;e.getAttribute(v)&&e.getAttribute(m)&&(t=Math.round(parseFloat(e.getAttribute(v))),n=Math.round(parseFloat(e.getAttribute(m))));if(e.getAttribute("width")){var r=e.getAttribute("width"),i=r/t;t=Math.round(t*i),n=Math.round(n*i)}return{width:t,height:n}},r.prototype.adjustTableMargins=function(e){t(".encp-table-container table").each(function(){var n=t(this),r=t.extend({},e).height;n.parent(".encp-table-container").css(C(n,r))})},r.prototype.adjustImage=function(e,n,r){n=t.extend({},n);var s=t(e),o=s.closest(".encp-media-container");if(!o.length)return;var u=this.getImageBaseSize(e);o.css("padding","0"),u.width<=i&&u.height<=i?_.call(this,e,u,r):s.closest("ul").length||s.closest("ol").length?O.call(this,e,u):s.hasClass("encp-table-image")?M.call(this,e,u,n):o.attr("data-media-mime").indexOf("image")!=0?A.call(this,e,u,n):D.call(this,e,u,n)},r.prototype.hasTopMargin=function(e){var t=this.pageSummary[e];return t?t.hasTopMargin:!1},r.prototype.hasBottomMargin=function(e){var t=this.pageSummary[e];return t?t.hasBottomMargin:!1},r.prototype.getPageHeightIfAvailable=function(e){var t=this.pageSummary[e];return t?t.pageHeight:0},r.prototype.hasImageHeaderInPage=function(e){var t=this.pageSummary[e];return t?t.hasHeader&&t.imgCount==1:!1},r.prototype.hasNoContent=function(e){var t=this.pageSummary[e];return t?t.contentCount==0:!0},r}),define("Shared/LayoutEditor/ENCPSectionBreakUI",["require","Shared/Utilities/JQueryExt","Shared/LayoutEditor/ENCPSectionBreak","Shared/Utilities/ENCPUtilities"],function(e){function d(e,t){var n=this;this.layoutEditorController=e,this.sectionBreak=t,this.readonly=!1,this.styleSheet=null,this.allBreakContainersStyle=null,r.createStyleSheet(function(e){n.styleSheet=e,n.styleSheet.insertRule("."+s+" {}",0),n.allBreakContainersStyle=n.styleSheet.cssRules[0].style,n.updateScaleRatioForSectionBreaksUI()}),this.setupMouseEventsHandling()}function v(e){var t=e.target;t.classList.contains(l)&&t.classList.remove(l)}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/LayoutEditor/ENCPSectionBreak"),r=e("Shared/Utilities/ENCPUtilities"),i=15,s="encp-section-break-ui",o="encp-section-break-line",u="encp-section-break-button",a="encp-section-disabled-break",f="encp-section-enabled-break",l="encp-section-break-animation",c="encp-hovered-element",h="encp-draggable-element",p="encp-droppable-element";return d.prototype.makeSectionBreakDrop=function(e,t){function i(e){var t=e;while((t=t.parentElement)&&!n.isBreak(t));return t}var r=this,s=[],o=[],u=i(t);n.isEnabledBreak(u)||(r.setSectionBreakEnabled(u,!0),s.push(u));var a=i(e);r.setSectionBreakEnabled(a,!1),o.push(a),r.layoutEditorController.notifyHostAboutSectionBreakModeChanges(s,o,!0)},d.prototype.setSectionBreakEnabled=function(e,t){e.classList.add(l),this.sectionBreak.setBreakEnabled(e,t),this.refreshSectionBreakUI(e),window.encpPresenter.updatePageBreaks(!0)},d.prototype.createLineForSectionBreak=function(e){var t=window.document.createElement("div");return t.classList.add(o),n.isEnabledBreak(e)&&t.classList.add(h),t},d.prototype.createButtonForSectionBreak=function(e){function r(r){function i(e){e.stopPropagation()}function s(r){var i=n.isEnabledBreak(e);t.setSectionBreakEnabled(e,!i);var s=i?[]:[e],o=i?[e]:[];t.layoutEditorController.notifyHostAboutSectionBreakModeChanges(s,o,!1)}if(!r)throw"Wrong parameter";r.addEventListener("mousedown",i),r.addEventListener("click",s)}var t=this,i=window.document.createElement("div");return i.classList.add(u),r(i),i},d.prototype.updateScaleRatioForSectionBreaksUI=function(){if(!this.allBreakContainersStyle)return;var e=t(".encp-layout-editor-note-content"),n=window.encpPlatform.scaleRatio;this.allBreakContainersStyle.zoom=1/n;var r=window.encpPlatform.viewPort(),i=r.width*n,s=(e.parent().width()-e.width())/2*n;this.allBreakContainersStyle.width=i+"px",this.allBreakContainersStyle.marginLeft=-s+"px"},d.prototype.createUIForSectionBreak=function(e){var t=document.createElement("div");t.classList.add(s),t.classList.add(p);var r=window.document.createElement("div"),i=n.isEnabledBreak(e);r.classList.add(i?f:a),t.appendChild(r);var o=this.createLineForSectionBreak(e);r.appendChild(o);var u=this.createButtonForSectionBreak(e);return r.appendChild(u),t},d.prototype.refreshSectionBreakUI=function(e){var t=r.getChildOfClass(e,s);t&&e.removeChild(t),t=this.createUIForSectionBreak(e),e.appendChild(t)},d.prototype.showAllMarkerLines=function(){var e=this;this.sectionBreak.findAllBreaks().forEach(function(t){e.refreshSectionBreakUI(t),t.addEventListener("webkitTransitionEnd",v)})},d.prototype.hideAllMarkerLines=function(){t("."+s).remove(),this.sectionBreak.findAllBreaks().forEach(function(e){e.removeEventListener("webkitTransitionEnd",v)})},d.prototype.updateSectionBreaksDisplay=function(){this.updateScaleRatioForSectionBreaksUI();var e=this,t=document.querySelectorAll("."+s);r.arrayFromNodeList(t).forEach(function(t){var n=r.getChildOfClass(t,u),i=r.getChildOfClass(t,o);e.readonly?(t.classList.remove(c),i.classList.remove(h),n.style.display="none"):(t.classList.contains(f)&&i.classList.add(h),n.style.display="")})},d.prototype.setReadonly=function(e){this.readonly=e,this.updateSectionBreaksDisplay()},d.prototype.setupMouseEventsHandling=function(){this.hoveredElement=null,this.startY=0,this.dragElement=null,this.registerMouseListeners()},d.prototype.registerMouseListeners=function(){function t(t){var n=t.target;if(t.button==0&&n.classList.contains(h))return t.stopPropagation(),t.preventDefault(),e.startY=t.clientY,e.dragElement=n,e.dragElement.style.zIndex=1e4,e.dragElement.style.pointerEvents="none",!1}function n(t){function n(t){function n(t){function n(e){var t=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT);t.currentNode=e;for(var n=t.currentNode;n;n=t.previousNode()){if(!n.offsetParent){n=null;break}if(n.classList.contains(p))break}t.currentNode=e;for(var r=t.currentNode;r;r=t.nextNode()){if(!r.offsetParent){r=null;break}if(r.classList.contains(p))break}return[n,r]}function i(t,n){var i=r.elementPositionRelativeToParent(n.offsetParent,null),s=e.allBreakContainersStyle.zoom;s==null&&(s=1),i.x+=n.offsetLeft*s,i.y+=n.offsetTop*s;var o=i.y,u=o+n.offsetHeight;return Math.min(Math.abs(o-t),Math.abs(u-t))}var s=document.elementFromPoint(t.clientX,t.clientY),o=s?n(s):[],u=t.pageY/window.encpPlatform.scaleRatio,a=null,f=-1;return o.forEach(function(t){if(!t||t.contains(e.dragElement))return;var n=i(u,t);if(f<0||f>n)f=n,a=t}),{element:a,distance:f}}var s=n(t),o=s.element,u=s.distance;return u>=0&&u<i/window.encpPlatform.scaleRatio?o:null}var s=n(t),o=e.hoveredElement&&e.hoveredElement.classList.contains(c),a=s&&(t.target.classList.contains(u)||e.dragElement);if(e.hoveredElement!==s||o!=a)e.hoveredElement&&e.hoveredElement.classList.remove(c),e.hoveredElement=s,a&&e.hoveredElement.classList.add(c);e.dragElement&&(t.stopPropagation(),t.preventDefault(),e.dragElement.style.top=t.clientY-e.startY+"px")}function s(t){e.dragElement!=null&&(t.stopPropagation(),t.preventDefault(),e.hoveredElement&&!e.hoveredElement.contains(e.dragElement)?e.makeSectionBreakDrop(e.dragElement,e.hoveredElement):e.dragElement.style.top="0",e.dragElement.style.zIndex="",e.dragElement.style.pointerEvents="",e.dragElement=null)}var e=this;window.document.addEventListener("mouseup",s,!1),window.document.addEventListener("mousemove",n,!0),this.sectionBreak.findAllBreaks().forEach(function(e){e.addEventListener("mousedown",t,!1)})},d}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.12",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i&&i.isBuild&&!i.inlineText){r();return}d.isBuild=i&&i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("﻿")===0&&(i=i.substring(1)),t(i)}catch(s){r&&r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status||0,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r&&r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}),define("text!SharedCSS/LayoutEditorBase.css",[],function(){return'\n/*\n * Layout editor content container\n */\ndiv.encp-layout-editor-note-content-container {\n  position: relative;\n  background-color: #ffffff;\n  border-radius: 30px;\n  cursor: pointer;\n}\n\ndiv.encp-layout-editor-note-content {\n  /* For default zoom level left and right margins are set to 12% */\n  width: 76%;\n  margin-left: auto;\n  margin-right: auto;\n}\n\nbody.encp-medium-zoom div.encp-layout-editor-note-content {\n  /* For medium zoom level left and right margins are set to 10% */\n  width: 80%;\n}\n\nbody.encp-large-zoom div.encp-layout-editor-note-content {\n  /* For large zoom level left and right margins are set to 8% */\n  width: 84%;\n}\n\ndiv.encp-layout-editor-note-content .encp-media-container,\ndiv.encp-layout-editor-note-content a {\n  /* Disable all pointer events for the media view & links if inside the layout editor */\n  pointer-events: none;\n}\n\n\n/*\n * Presented area indicator clipping\n */\ndiv.encp-layout-editor-presented-area-container {\n  position: absolute;\n  top: 0;\n  overflow: hidden;\n  width: 100%;\n  height: 100%;\n  border-radius: 30px;\n  pointer-events: none;\n}\n\n/*\n * Presented area indicator\n */\ndiv.encp-layout-editor-presented-area {\n  position: absolute;\n  background-color: rgba(177, 177, 177, 0.4);\n  pointer-events: none;\n}\n\n/*\n * Section break line\n */\ndiv.encp-section-break-ui {\n  position: relative;\n  z-index: 1;\n}\n\ndiv.encp-section-disabled-break, div.encp-section-enabled-break {\n  width: 100%;\n  position: absolute;\n}\n\ndiv.encp-section-break-ui.encp-hovered-element {\n  z-index: 10000;\n}\n\ndiv.encp-section-enabled-break div.encp-section-break-line {\n  margin: -1.5px 0;\n  border-top: 3px solid #3FB4DF;\n  width: 100%;\n}\n\ndiv.encp-section-break-ui.encp-hovered-element div.encp-section-disabled-break div.encp-section-break-line {\n  margin: -0.5px 0;\n  border-top: 1px solid #3FB4DF;\n  width: 100%;\n}\n\n/*\n * Section break button next to the section break line\n */\ndiv.encp-section-break-button {\n  position: relative;\n\n  width: 24px; /* this is a experimental value to prevent squashing button image in Lion */\n  height: 18px;\n\n  margin-left: auto;\n  margin-right: -26px;\n  margin-top: -9px;    /* half of the height */\n  margin-bottom: -9px;\n\n  float: right;\n}\n/*\n * Each button below need to be centered inside button panel.\n * To do this we shift it to the right using "marging-right".\n * To calculate "marging-right" we take into account width of the button\'s panel: 30px\n * margin-right = -(buttonWidth + (panelWidth - buttonWidth) / 2)\n */\ndiv.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-DayMode.svg);\n}\ndiv.encp-section-break-ui.encp-hovered-element div.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-DayMode-HoverState.svg);\n}\ndiv.encp-section-disabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-add.svg);\n}\ndiv.encp-section-break-ui.encp-hovered-element div.encp-section-disabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-add-HoverState.svg);\n}\n\n/*\n * Section break. Enabled line\n */\ndiv.encp-section-enabled-break div.encp-section-break-line.encp-draggable-element:after {\n  content: url(../Images/space-divider-drag.svg);\n  width: 18px;\n  height: 18px;\n\n  display: block;\n  margin: -9px auto; /* half of the height */\n}\n\n/*\n * Drag and Drop\n */\n.encp-draggable-element {\n  position: relative;\n}\n\n/*\n * Section break animation\n */\n.encp-section-break-animation {\n  -webkit-transition-property: padding-top, padding-bottom;\n  -webkit-transition-duration: 250ms, 250ms;\n}\nimg.encp-section-break-animation {\n  -webkit-transition-property: width, height, margin-top, margin-bottom;\n  -webkit-transition-duration: 250ms, 250ms, 250ms, 250ms;\n}\n'}),define("text!SharedCSS/LayoutEditorDefault.css",[],function(){return"\n/*\n * Layout editor content container\n */\ndiv.encp-layout-editor-note-content-container {\n  background-color: #ffffff;\n}\n\n/*\n * Presented area indicator\n */\ndiv.encp-layout-editor-presented-area {\n  background-color: rgba(177, 177, 177, 0.4);\n}\n\n/*\n * Section break button next to the section break line\n */\ndiv.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-DayMode.svg);\n}\ndiv.encp-section-break-ui.encp-hovered-element div.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-DayMode-HoverState.svg);\n}\n"}),define("text!SharedCSS/LayoutEditorNight.css",[],function(){return"\n/*\n * Layout editor content container\n */\ndiv.encp-layout-editor-note-content-container {\n  background-color: #000000;\n}\n\n/*\n * Presented area indicator\n */\ndiv.encp-layout-editor-presented-area {\n  background-color: rgba(152, 152, 152, 0.4);\n}\n\n/*\n * Section break button next to the section break line\n */\ndiv.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-NightMode.svg);\n}\ndiv.encp-section-break-ui.encp-hovered-element div.encp-section-enabled-break div.encp-section-break-button {\n  content: url(../Images/space-divider-remove-NightMode-HoverState.svg);\n}\n"}),define("Shared/LayoutEditor/ENCPLayoutEditorController",["require","Shared/Utilities/JQueryExt","Shared/LayoutEditor/ENCPSectionBreakUI","text!SharedCSS/LayoutEditorBase.css","text!SharedCSS/LayoutEditorDefault.css","text!SharedCSS/LayoutEditorNight.css"],function(e){function d(e){var n=navigator.userAgent.match(/AppleWebKit\/([\d.]+)/);if(n&&n.length==2&&parseInt(n[1],10)>536)return;var r=e.get(0),i=null,s=null;t(window).on("scroll",function(){s||(s=setInterval(function(){r.style.display="none",r.offsetHeight,r.style.display="block"},10)),clearTimeout(i),i=setTimeout(function(){clearInterval(s),s=null},500)})}function v(t,r){this.breakLayout=t,this.sectionBreakUI=new n(this,t.sectionBreak),this.presentedAreaBoxTop=window.document.createElement("div"),this.presentedAreaBoxTop.classList.add(p),this.presentedAreaBoxBottom=window.document.createElement("div"),this.presentedAreaBoxBottom.classList.add(p),this.presentedAreaOffsetY=0,this.lastEnabledSectionBreak=null,this.lastDisabledSectionBreak=null,this.lastFocusedPage=0,this.registerMouseListener(),this._CSSGroup={base:["LayoutEditorBase.css",e("text!SharedCSS/LayoutEditorBase.css")],"default":["LayoutEditorDefault.css",e("text!SharedCSS/LayoutEditorDefault.css")],night:["LayoutEditorNight.css",e("text!SharedCSS/LayoutEditorNight.css")]},r.registerCSSGroup(this._CSSGroup)}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/LayoutEditor/ENCPSectionBreakUI"),r="encp-layout-editor-note-content",i='<div class="'+r+'"></div>',s="encp-layout-editor-note-content-container",o='<div class="'+s+'"></div>',u="encp-layout-editor-zoom-container",a='<div class="'+u+'"></div>',f="encp-layout-editor-scroll-container",l='<div class="'+f+'"></div>',c="encp-layout-editor-presented-area-container",h='<div class="'+c+'"></div>',p="encp-layout-editor-presented-area";return v.prototype.updateLayoutEditorDisplay=function(){var e=t(window.document.body),n=window.document.getElementsByClassName(s).length!=0;if(!n){var r=t(h);t(window.document.documentElement).css("background-color","transparent"),e.children().wrapAll(i),e.append(r),e.children().wrapAll(o),this.displayCurrentlyPresentedContentBox(!0),d(r)}var u=t(window).width(),a=window.encpPlatform.viewPort(),f=t("."+s),l=a.width;f.css("width",l+"px");var c=20,p=30,v=u-p-c,m=v/l;e.css("width",u/m+"px"),e.css("-webkit-transform","scale("+m+")"),e.css("-webkit-transform-origin","0 0"),e.css("-webkit-user-select","none"),window.encpPlatform.scaleRatio=m,this.updatePresentedAreaIndicator(),this.sectionBreakUI.updateSectionBreaksDisplay()},v.prototype.updateZoom=function(){var e=parseFloat(t("html").css("zoom"));e||(e=1);var n=window.encpPlatform.scaleRatio,r=t(window.document.body);r.css("-webkit-transform","scale("+n/e+")"),t("#en-note, .encp-note-title").css("zoom",e)},v.prototype.updateDocumentHeight=function(){var e=window.encpPlatform.scaleRatio;if(e!=1){var n=t(window.document.body),r=n.height(),i=Math.ceil(r*e),s=t(window).height();n.height(Math.max(s,i))}this.updatePresentedAreaIndicator()},v.prototype.displaySectionBreaks=function(e){e?this.sectionBreakUI.showAllMarkerLines():this.sectionBreakUI.hideAllMarkerLines()},v.prototype.refreshSectionBreaks=function(){this.displaySectionBreaks(!1),this.displaySectionBreaks(!0)},v.prototype.displayCurrentlyPresentedContentBox=function(e){var t=document.getElementsByClassName(c)[0];e?(t.appendChild(this.presentedAreaBoxTop),t.appendChild(this.presentedAreaBoxBottom),this.updatePresentedAreaIndicator()):(t.removeChild(this.presentedAreaBoxTop),t.removeChild(this.presentedAreaBoxBottom))},v.prototype.setCurrentlyPresentedContentOffset=function(e,t){this.presentedAreaOffsetY=e,this.updatePresentedAreaIndicator(),t&&this.scrollToPresentedArea()},v.prototype.setReadonly=function(e){this.sectionBreakUI.setReadonly(e)},v.prototype.scrollToPresentedArea=function(){var e=50,n=window.encpPlatform.scaleRatio,r=this.viewPortBox(),i=t(window).scrollTop(),s=t(window).height(),o=Math.max(0,Math.round(r.top*n)-e),u=Math.min(this.breakLayout.documentHeight(),Math.round((r.top+r.height)*n)+e);o<i?t(window).scrollTop(o):u-s>i&&t(window).scrollTop(u-s)},v.prototype.viewPortBox=function(){var e=window.encpPlatform.viewPort();return{left:0,top:Math.round(this.presentedAreaOffsetY),width:Math.round(e.width),height:Math.round(e.height)}},v.prototype.updatePresentedAreaIndicator=function(){var e=this.viewPortBox();this.presentedAreaBoxTop.style.top=0,this.presentedAreaBoxTop.style.left=e.left,this.presentedAreaBoxTop.style.width=e.width,this.presentedAreaBoxTop.style.height=e.top,this.presentedAreaBoxBottom.style.top=e.top+e.height,this.presentedAreaBoxBottom.style.left=e.left,this.presentedAreaBoxBottom.style.width=e.width,this.presentedAreaBoxBottom.style.height=1e6,this.lastFocusedPage=this.breakLayout.pageNumberForOffset(e.top+e.height/2)},v.prototype.showPageForOffsetY=function(e){var t=this,n=t.breakLayout.pageNumberForOffset(e),r=t.breakLayout.pageLimits(n),i=window.encpPlatform.viewPort(),s=Math.round(e-i.height/2);s=Math.max(r.top,Math.min(r.bottom-i.height,s)),window.encpPlatform.didClickPageAtOffsetY(s)},v.prototype.registerMouseListener=function(){function t(t){t.preventDefault();var n=t.pageY/window.encpPlatform.scaleRatio;e.showPageForOffsetY(n)}var e=this;window.document.addEventListener("mousedown",t)},v.prototype.showPresentedContentAfterAnimation=function(){var e=this.viewPortBox();if(this.lastEnabledSectionBreak&&this.lastDisabledSectionBreak){var t=this.breakLayout.enabledLayoutBreaks(),n=t.indexOf(this.lastEnabledSectionBreak);this.lastFocusedPage<n?this.showPresentedAreaAboveSectionBreak(this.lastEnabledSectionBreak):this.showPresentedAreaBelowSectionBreak(this.lastEnabledSectionBreak)}else if(this.lastEnabledSectionBreak){var r=this.breakLayout.pageOffsetForBreak(this.lastEnabledSectionBreak);e.top<r?this.showPresentedAreaAboveSectionBreak(this.lastEnabledSectionBreak):this.showPresentedAreaBelowSectionBreak(this.lastEnabledSectionBreak)}else if(this.lastDisabledSectionBreak){var i=this.breakLayout.pageOffsetForBreak(this.lastDisabledSectionBreak);this.showPresentedAreaAroundSectionBreak(this.lastDisabledSectionBreak)}this.lastEnabledSectionBreak=null,this.lastDisabledSectionBreak=null},v.prototype.handleEvent=function(e){switch(e.type){case"webkitTransitionEnd":this.showPresentedContentAfterAnimation(),e.target.removeEventListener("webkitTransitionEnd",this)}},v.prototype.showPresentedAreaBelowSectionBreak=function(e){var t=this.breakLayout.pageOffsetForBreak(e);this.showPageForOffsetY(t+1)},v.prototype.showPresentedAreaAboveSectionBreak=function(e){var t=this.breakLayout.pageOffsetForBreak(e);this.showPageForOffsetY(t-1)},v.prototype.showPresentedAreaAroundSectionBreak=function(e){var t=this.breakLayout.pageOffsetForBreak(e);this.showPageForOffsetY(t)},v.prototype.notifyHostAboutSectionBreakModeChanges=function(e,t,n){var r=this.breakLayout.sectionBreak.findAllBreaks(),i=e.map(r.indexOf,r),s=t.map(r.indexOf,r);window.encpPlatform.didChangeSectionBreaks(i,s,n),this.lastEnabledSectionBreak=e[0],this.lastDisabledSectionBreak=t[0],this.lastDisabledSectionBreak?this.lastDisabledSectionBreak.addEventListener("webkitTransitionEnd",this,!1):this.lastEnabledSectionBreak.addEventListener("webkitTransitionEnd",this,!1)},v}),define("Shared/NotePresenter/ENCPMediaContents",["require","Shared/Utilities/JQueryExt","Shared/Utilities/ENCPUtilities"],function(e){function i(e){this.platform=window.encpPlatform,this.isSimulatedOpening=!1,this.presenter=e,this.openedMediaPath=null,this.platformContents=null}function s(){this.itemToInvoke!=null&&(this.openMediaItem(this.itemToInvoke),this.itemToInvoke=null)}function o(e,n){var r=t(e);n?r.addClass("encp-mouse-down"):r.removeClass("encp-mouse-down")}function u(e,n){var r=t(e),i=r.offset();return{X:i.left,Y:i.top,Width:r.width()*n,Height:r.height()*n}}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/Utilities/ENCPUtilities"),r=.95;return i.prototype.setupMediaContainers=function(){var e=this;t(".encp-media-preview img").mousedown(function(n){n.preventDefault(),n.button==0&&!n.ctrlKey&&!e.isSimulatedOpening?(e.clickedContainer=t(n.currentTarget).closest(".encp-media-container")[0],o.call(e,e.clickedContainer,!0)):t(this).trigger("mouseout")}),t("body").mouseup(function(n){if(!e.clickedContainer||e.isSimulatedOpening)return;t(n.target).parents().andSelf().is("img, .encp-attachment-box")&&(e.itemToInvoke=e.clickedContainer,s.call(e)),e.clickedContainer=null}),t(".encp-media-preview img").mouseout(function(n){var r=t(n.currentTarget).closest(".encp-media-container")[0];r==e.clickedContainer&&!e.isSimulatedOpening&&o.call(e,e.clickedContainer,!1)}),t(".encp-media-preview img").mouseenter(function(n){var r=t(n.currentTarget).closest(".encp-media-container")[0];r==e.clickedContainer&&!e.isSimulatedOpening&&o.call(e,e.clickedContainer,!0)}),t(".encp-media-preview img").each(function(){e.setupMediaPreview(this)})},i.prototype.simulateOpeningMediaItem=function(e,n){if(this.clickedContainer)return;var r=this,i=document.querySelectorAll('.encp-can-open-attachment img[src="'+e+'"]');for(var o=0,u=i.length;o<u;o++){r.itemToInvoke=t(i[o]).closest(".encp-media-container")[0],s.call(r);break}},i.prototype.openMediaItem=function(e){var n=t(e);if(!n.hasClass("encp-can-open-attachment"))return;var i=u(n.find(".encp-media-preview img").get(0),r),s=this.getMediaProperty(n.get());s.mediaFrame=i,s.mediaIndex=t(".encp-media-container").index(n),this.openedMediaPath=s.src,this.platform.didClickMediaWithParameters(s)},i.prototype.getClosingMediaFrame=function(e,n){var r=t(".encp-media-container"),i=null;n>=0&&n<r.length&&(i=t(r.get(n)),i.attr("data-media-url").indexOf(e)==-1?i=null:i=i.find(".encp-media-preview img")),i||(i=t(window.document.body).find("[data-media-url$='"+e+"'] .encp-media-preview img"));if(i.length==0)return null;var s=this.openedMediaPath.length-e.length;if(s<0||this.openedMediaPath.indexOf(e,s)!==s){var o=this.presenter.scrollPosition();i.isOnScreen(o)||this.presenter.scrollIntoView(i.get(0))}return i.closest(".encp-media-container").removeClass("encp-mouse-down"),this.openedMediaPath=null,u(i.get(),1)},i.prototype.loadMediaImage=function(e,n){var r=this,i=t(e).closest(".encp-media-container"),s=r.getMediaProperty(i.get());r.platform.requestDocumentInformationForURL(encodeURI(s.src),s.mime,s.filename,function(e,t,r,i){n(r,i)},function(){n(Math.NaN,Math.NaN)})},i.prototype.getMediaProperty=function(e){var n=t(e);return{src:n.attr("data-media-url"),mime:n.attr("data-media-mime"),filename:n.attr("data-media-filename")}},i.prototype.getMediaItems=function(){var e=this,n=[];return t(".encp-media-container").each(function(){var t=e.getMediaProperty(this);t.src&&t.mime&&n.push(t)}),n},i.prototype.setupMediaPreview=function(e){if(this.platformContents.setupMediaPreview){var n=t(e).closest(".encp-media-container"),r=this.getMediaProperty(n.get(0));this.platformContents.setupMediaPreview(e,r)}},i.prototype.adjustMediaImages=function(){this.platformContents.adjustMediaImages&&this.platformContents.adjustMediaImages()},i.prototype.updateMediaItem=function(e){this.platformContents.updateMediaItem&&this.platformContents.updateMediaItem(e)},i}),define("Mac/ENCPPlatformMediaContents",["require","Shared/Utilities/JQueryExt"],function(e){function n(e){this.mediaContents=e}function r(e,n){e.addClass("encp-document"),e.wrap(t("<div class='encp-media-container-document'></div>"));var r=e.parent();n>2&&r.prepend(t("<div class='encp-shadow encp-second-shadow'></div>")),n>1&&r.prepend(t("<div class='encp-shadow encp-first-shadow'></div>"))}var t=e("Shared/Utilities/JQueryExt");return n.prototype.setupMediaPreview=function(e,n){var i=this,s=t(e);i.mediaContents.platform.requestDocumentInformationForURL(encodeURI(n.src),n.mime,n.filename,function(t,n,o,u,a){t&&r(s,n),i.mediaContents.presenter.imageLayout.setImageBaseSize(e,o,u),a&&(s.addClass("encp-predefined-preview"),s.addClass("encp-preview-"+a.replace(/[A-Z]/,function(e){return"-"+e.toLowerCase()})))},function(){})},n}),define("Shared/LayoutEditor/ENCPSectionBreakLayout",["require","Shared/LayoutEditor/ENCPSectionBreak"],function(e){function r(e){this.sectionBreak=e;var t=this.sectionBreak.rootElement;this.beginElement=document.createElement("div"),t.insertBefore(this.beginElement,t.firstChild),this.endElement=document.createElement("div"),t.appendChild(this.endElement),this.viewPortSize=null,this.resetPageBreaks()}var t=e("Shared/LayoutEditor/ENCPSectionBreak"),n=1;return r.prototype.allLayoutBreaks=function(){var e=this.sectionBreak.findAllBreaks();return[this.beginElement].concat(e).concat([this.endElement])},r.prototype.enabledLayoutBreaks=function(){var e=this.sectionBreak.findEnabledBreaks();return[this.beginElement].concat(e).concat([this.endElement])},r.prototype.setViewPortSize=function(e,t){this.viewPortSize={width:e,height:t}},r.prototype.contentOffsetAboveBreak=function(e){var t=e.style.marginTop?parseInt(e.style.marginTop):0;return e.offsetTop-t},r.prototype.contentOffsetBelowBreak=function(e){var t=e.style.marginBottom?parseInt(e.style.marginBottom):0;return e.offsetTop+e.offsetHeight+t},r.prototype.computeBreakPadding=function(e){if(this.viewPortSize===null)throw"Need to set view port size";var n=this.viewPortSize.height,r=this.allLayoutBreaks(),i=[],s=r.shift(),o={top:0,bottom:0},u=s,a=0,f=0;return i.push(o),r.forEach(function(r){var l=this.contentOffsetBelowBreak(s),c=this.contentOffsetAboveBreak(r);a+=c-l;var h={top:0,bottom:0};if(t.isEnabledBreak(r)||r===this.endElement){var p={top:0,bottom:0,pageHeightOverride:0};e&&(p=e(u===this.beginElement?undefined:u,r===this.endElement?undefined:r,f),p.pageHeightOverride&&(a=p.pageHeightOverride));var d=u===this.beginElement&&r===this.endElement,v=d?0:(n-a)/2,m=Math.floor(v),g=Math.ceil(v),y=Math.max(Math.min(0,g-p.bottom),p.top-m);o.bottom=m+y,h.top=Math.max(g-y,p.bottom),a=0,o=h,u=r,++f}i.push(h),s=r},this),i},r.prototype.documentHeight=function(){return this.pageOffsetForBreak(this.endElement)},r.prototype.setupComputedPadding=function(e){var t=this.allLayoutBreaks();if(t.length!=e.length)throw"Cannot apply computed breaks - number of breaks and number of measurements differ";t.forEach(function(r,i){var s=e[i];if(!s.top&&!s.bottom){if(i==t.length-1){r.style.paddingTop=n+"px",r.style.marginTop="-"+n+"px",r.style.paddingBottom="",r.style.marginBottom="";return}r.style.paddingTop="",r.style.marginTop="",r.style.paddingBottom=n+"px",r.style.marginBottom="-"+n+"px";return}r.style.marginTop="",r.style.marginBottom="",r.style.paddingTop=s.top?s.top+"px":"",r.style.paddingBottom=s.bottom?s.bottom+"px":""},this)},r.prototype.pageOffsetForBreak=function(e){return e.offsetTop+(e.style.paddingTop?parseInt(e.style.paddingTop):0)},r.prototype.getUpperBreakForOffset=function(e,t){if(!e.length)return 0;var n=0,r=e.length-1;while(r>n){var i=Math.ceil((r+n)/2);this.pageOffsetForBreak(e[i])>t?r=i-1:n=i}return n},r.prototype.getLowerBreakForOffset=function(e,t){var n=this.getUpperBreakForOffset(e,t);return n+1<e.length?n+1:n},r.prototype.hasEnabledUserBreaks=function(){return this.sectionBreak.findEnabledBreaks().length>0},r.prototype.pageLimits=function(e){var t=this.enabledLayoutBreaks();return e>=t.length-1?null:{top:this.pageOffsetForBreak(t[e]),bottom:this.pageOffsetForBreak(t[e+1])}},r.prototype.pageNumberForOffset=function(e){if(e<0||!this.hasEnabledUserBreaks())return 0;var t=this.enabledLayoutBreaks();return Math.min(this.getUpperBreakForOffset(t,e),t.length-2)},r.prototype.constrainOffset=function(e){return e=Math.min(this.pageOffsetForBreak(this.endElement)-this.viewPortSize.height,e),e=Math.max(this.pageOffsetForBreak(this.beginElement),e),e},r.prototype.pageDownOffset=function(e){if(this.viewPortSize===null)throw"Need to set view port size";var t=this.enabledLayoutBreaks(),n=this.getLowerBreakForOffset(t,e);e+=this.viewPortSize.height;var r=this.pageOffsetForBreak(t[n]);return e>=r?e=r:e>r-this.viewPortSize.height&&(e=r-this.viewPortSize.height),this.constrainOffset(e)},r.prototype.pageUpOffset=function(e){if(this.viewPortSize===null)throw"Need to set view port size";var t=this.enabledLayoutBreaks(),n=this.getUpperBreakForOffset(t,e+this.viewPortSize.height-1),r=this.pageOffsetForBreak(t[n]),i=e-r,s=e+this.viewPortSize.height-r;return 0<i&&i<this.viewPortSize.height?e=r:0<=s&&s<this.viewPortSize.height?e=r-this.viewPortSize.height:e-=this.viewPortSize.height,this.constrainOffset(e)},r.prototype.setupPageBreaks=function(e){this.setupComputedPadding(this.computeBreakPadding(e))},r.prototype.resetPageBreaks=function(){var e=[],t={top:0,bottom:0};this.allLayoutBreaks().forEach(function(){e.push(t)}),this.setupComputedPadding(e)},r}),define("Shared/LayoutEditor/ENCPSectionBreakAutoFormatter",["require","Shared/LayoutEditor/ENCPSectionBreak","Shared/Utilities/ENCPUtilities"],function(e){function r(){this.titleElement=null}function i(e){return n.matchesSelector(e,"img")&&!n.matchesSelector(e,"table img")||n.matchesSelector(e,"table")&&!n.matchesSelector(e,"table table")||n.matchesSelector(e,"embed")&&!n.matchesSelector(e,"table embed")||n.matchesSelector(e,"object.en-attachment")&&!n.matchesSelector(e,"table object")}var t=e("Shared/LayoutEditor/ENCPSectionBreak"),n=e("Shared/Utilities/ENCPUtilities");return r.prototype.performAutoLayout=function(e){if(!e.findAllBreaks().length)return!1;var n=!1,r=null,s=!1,o=e.rootElement,u=o.ownerDocument.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);for(var a=u.currentNode;a;a=u.nextNode()){if(t.isBreak(a)&&!t.isHiddenBreak(a)){if(s){e.setBreakEnabled(a,!0),n=!0,s=!1;continue}r=a;continue}if(s||this.titleElement&&a===this.titleElement||i(a))s=!0,r&&(t.isEnabledBreak(r)||(e.setBreakEnabled(r,!0),n=!0),r=null)}return n},r}),define("Shared/LayoutEditor/ENCPSectionBreakHRConverter",["require","Shared/LayoutEditor/ENCPSectionBreak","Shared/Utilities/ENCPUtilities"],function(e){function o(){this._removedHRsForSaving=null}var t=e("Shared/LayoutEditor/ENCPSectionBreak"),n=e("Shared/Utilities/ENCPUtilities"),r="encp-section-converted",i="hr:not(."+r+")",s="hr."+r;return o.hasConvertibleHRs=function(e){return e.querySelectorAll(i).length>0},o.prototype.convert=function(e){if(e.findEnabledBreaks().length)return!1;var n=e.rootElement.querySelectorAll(".encp-section-break, "+i);if(n.length==0)return!1;var s=!1,o=n.item(0);for(var u=1;u<n.length;u++){var a=n.item(u);a.tagName.toLowerCase()=="hr"?(a.classList.add(r),a.style.display="none",t.isBreak(o)&&(t.isHiddenBreak(o)&&e.setBreakHidden(o,!1),e.setBreakEnabled(o,!0),s=!0)):o.tagName.toLowerCase()=="hr"&&e.setBreakHidden(a,!0),o=a}return s},o.prototype.prepareHRForSaving=function(e){if(this._removedHRsForSaving)throw"Already stored HRs";this._removedHRsForSaving=[];var t=e.querySelectorAll(s);n.arrayFromNodeList(t).forEach(function(e){this._removedHRsForSaving.unshift({nextNode:e.nextSibling,parentNode:e.parentElement,node:e}),e.parentElement.removeChild(e)},this)},o.prototype.restoreHRsAfterSaving=function(){if(!this._removedHRsForSaving)throw"Has no stored HRs";this._removedHRsForSaving.forEach(function(e){e.parentNode.insertBefore(e.node,e.nextNode)}),this._removedHRsForSaving=null},o}),define("Shared/Utilities/ENCPThemeStyles",["require"],function(e){function o(){this._currentTheme=null,this._styles=[]}function u(e){var t=-1;return this._styles.some(function(n,r){return n._CSSGroup===e?(t=r,!0):!1}),t}var t=0,n=1,r=2,i=0,s=function(){function e(e){this._CSSGroup=e,this._installed={}}function s(e){if(this._installed[e])return;var s=this._CSSGroup[e];if(!s)return;if(s.length!=r)throw"Bad theme content description: "+s;var o="encp-theme-style-id-"+i;i++;var u=document.createElement("style");u.id=o,u.setAttribute("data-encp-title",s[t]+" ("+e+")"),u.appendChild(document.createTextNode(s[n])),document.head.appendChild(u),this._installed[e]=o}function o(e){var t=this._installed[e];if(!t)return;var n=document.getElementById(t);if(!n)throw"Style element disappeared for: "+e;n.parentNode.removeChild(n),delete this._installed[e]}return e.prototype.updateCSS=function(e){s.call(this,"base"),Object.keys(this._CSSGroup).forEach(function(t){if(t=="base")return;t==e?s.call(this,t):o.call(this,t)},this)},e.prototype.removeAllCSS=function(){Object.keys(this._installed).forEach(function(e){o.call(this,e)},this)},e}();return o.prototype.applyTheme=function(e){this._currentTheme=e,this._styles.forEach(function(e){e.updateCSS(this._currentTheme)},this)},o.prototype.registerCSSGroup=function(e){Object.freeze(e);if(u.call(this,e)!=-1)return;var t=new s(e);this._styles.push(t),t.updateCSS(this._currentTheme)},o.prototype.removeCSSGroup=function(e){var t=u.call(this,e);if(t==-1)throw"Cannot remove CSSGroup";this._styles[t].removeAllCSS(),this._styles.splice(t,1)},o.prototype.removeAllCSSGroups=function(){this._styles.forEach(function(e){e.removeAllCSS()}),this._styles=[]},o}),define("text!CSS/Common.css",[],function(){return'\n@font-face {\n  font-family: Gotham;\n  src: url(../Fonts/Gotham-Light.otf);\n  font-weight: normal;\n  font-style: normal;\n}\n\n@font-face {\n  font-family: Gotham;\n  src: url(../Fonts/Gotham-Medium.otf);\n  font-weight: bold;\n  font-style: normal;\n}\n\n@font-face {\n  font-family: GothamMedium;\n  src: url(../Fonts/Gotham-Medium.otf);\n}\n\n@font-face {\n  font-family: GothamBold;\n  src: url(../Fonts/Gotham-Bold.otf);\n}\n\n@font-face {\n  font-family: CaeciliaLight;\n  src: url(../Fonts/CaeciliaLTStd-LightItalic.otf);\n}\n\n@font-face {\n  font-family: Caecilia;\n  src: url(../Fonts/CaeciliaLTStd-Italic.otf);\n}\n\n/*\n  We don\'t need any italic variation for custom fonts (like Gotham) in css.\n  It affects font size calculation of webkit, as a result tiny fonts will be shown for italic in some languages,\n  e.g. Chinese, Japanese, Korean, ..., see CP-1149 for the details.\n  Italic variation should be included in bundle but should NOT be defined in css.\n*/\n\nhr {\n  background-color: rgb(126, 126, 126);\n  height: 0.09rem;\n  border: 0;\n}\n\n*:focus {\n  outline: none;\n}\n\ndiv.encp-no-title {\n  padding-top: 6.8rem;\n}\n\ndiv.encp-note-title {\n  font-family: "CaeciliaLight";\n  line-height: 1.8rem;\n  font-size: 1rem;\n  color: rgb(67, 67, 67);\n  text-align: center;\n  padding-top: 6.8rem;\n  padding-bottom: 5.6rem;\n  font-weight: bold;\n  /* TODO: Probably we should remove box because it\'s a bit unstable at the moment. */\n  display: box;\n  display: -moz-box;\n  display: -webkit-box;\n  box-orient: horizontal;\n  box-orient: -webkit-horizontal;\n  box-pack: center;\n  -webkit-box-pack: center;\n}\n\ndiv.encp-note-title > div.encp-title-container {\n  max-width: 70%;\n}\n\ndiv.encp-note-title > div.encp-title-container > h1.title {\n  font-family: "CaeciliaLight";\n  font-weight: normal;\n  font-size: 1.8666rem;\n  color: rgb(67, 67, 67);\n  line-height: 2.5333rem;\n  word-break: normal;\n  word-wrap: break-word;\n  margin-bottom: 0.4rem;\n  -webkit-nbsp-mode: space;\n  -webkit-line-break: after-white-space;\n}\n\n.encp-media-preview img {\n  cursor: pointer;\n}\n\nimg {\n  -webkit-user-select: none;\n  -webkit-user-drag: none;\n}\n\nimg.encp-predefined-preview {\n  background-size: contain;\n  background-position: 50% 50%;\n  background-repeat: no-repeat;\n}\n\nimg.encp-preview-encrypted-content {\n  background-image: url(../Images/encryptedContent.svg);\n}\n\nimg.encp-preview-default {\n  background-image: url(../Images/brokenNote.svg);\n}\n\ndiv.encp-attachment-box {\n  text-align: center;\n  opacity: 0.5;\n  margin: 0 auto;\n  border: 0.1111rem solid rgb(204, 204, 204);\n  border-radius: 0.9rem;\n  margin-bottom: 3.0rem;\n  width: 12.5rem;\n  max-width: 70%;\n  overflow: hidden;\n  background-size: 2.125rem 2.125rem;\n  background-position: 100% 0;\n  background-repeat: no-repeat;\n}\n\ndiv.encp-can-open-attachment div.encp-attachment-box {\n  opacity: 1.0;\n}\n\ndiv.encp-can-open-attachment div.encp-attachment-box.encp-attachment-previewing {\n  background-image: none;\n}\n\ndiv.encp-attachment-box .encp-media-preview {\n  margin-top: 0;\n}\n\ndiv.encp-attachment-box div.encp-attachment-info {\n  display: none;\n  padding: 0.3rem 0;\n  margin: 0;\n  height: 1.2rem;\n  line-height: 1.2rem;\n  font-size: 0.6rem;\n}\n\ndiv.encp-attachment-box img.encp-attachment-icon {\n  margin-top: 0.8rem;\n  width: auto;\n  height: auto;\n  opacity: 1.0;\n}\n\ndiv.encp-attachment-box img.encp-attachment-icon.encp-attachment-progress {\n  opacity: 0.4;\n  width: 3.333rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-filename {\n  font-family: "Gotham";\n  font-size: 0.8rem;\n  color: rgb(142, 142, 142);\n  margin-bottom: 0.8rem;\n  margin-top: 0.7rem;\n  padding: 0 1rem;\n  line-height: 1rem;\n  word-break: normal;\n  word-wrap: break-word;\n  -webkit-nbsp-mode: space;\n  -webkit-line-break: after-white-space;\n}\n\ndiv.encp-attachment-box div.encp-attachment-filename em {\n  font-style: normal;\n  font-weight: bold;\n  color: rgb(1, 197, 251);\n  margin-bottom: 0.7rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-filename span.encp-attachment-filename {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  width: 100%;\n}\n\ndiv.encp-attachment-box.encp-attachment-previewing {\n  width: auto;\n  max-width: 70%;\n}\n\ndiv.encp-attachment-box.encp-attachment-previewing img.encp-attachment-icon {\n  margin-top: 0;\n  margin-bottom: 0;\n  background-color: rgb(0, 0, 0);\n}\n\ndiv.encp-attachment-box.encp-attachment-previewing div.encp-attachment-filename {\n  display: none;\n}\n\ndiv.encp-attachment-box.encp-attachment-previewing div.encp-attachment-info,\ndiv.encp-attachment-box div.encp-attachment-info span,\ndiv.encp-attachment-box div.encp-attachment-info img,\ndiv.encp-attachment-box div.encp-attachment-filename span,\ndiv.encp-attachment-box div.encp-attachment-filename em {\n  display: block;\n}\n\ndiv.encp-attachment-box + div.encp-attachment-box {\n  margin-bottom: 2.777rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-info img {\n  float: left;\n  height: 1.2rem;\n  padding-left: 0.6rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-info span.encp-attachment-info-detail {\n  float: right;\n  padding-right: 0.6rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-info span.encp-attachment-info-title,\ndiv.encp-attachment-box div.encp-attachment-filename span.encp-attachment-filename {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\ndiv.encp-attachment-box div.encp-attachment-info span.encp-attachment-info-title {\n  width: 50%;\n  text-align: left;\n  padding-left: 0.6rem;\n}\n\ndiv.encp-attachment-box div.encp-attachment-filename span.encp-attachment-filename {\n  width: 100%;\n}\n\ndiv.encp-attachment-box.encp-attachment-playable div.encp-media-preview {\n  position: relative;\n}\n\ndiv.encp-attachment-box.encp-attachment-playable div.encp-media-preview:before {\n  content: "";\n  display: block;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-size: 4rem 4rem;\n  background-position: 50% 50%;\n  background-repeat: no-repeat;\n  background-image: url(../Images/thumbnailPreviewPlayButton.svg);\n}\n\ndiv.encp-media-container.encp-attachment-touched div.encp-attachment-box.encp-attachment-playable div.encp-media-preview:before {\n  background-image: url(../Images/thumbnailPreviewPlayButtonPressed.svg);\n}\n\n'}),define("text!CSS/Presentation.css",[],function(){return'\n/*\n * Note about width variable:\n * Don\'t forget that we are using same "width" value in layout editor (.encp-layout-editor-note-content)\n * This also concerned body\'s medium and large zoom level classes\n */\nbody {\n  font-family: "Gotham";\n  width: 76%;   /* Also reflect the change of width to "div.encp-layout-editor-note-content" style */\n  margin: auto;\n  font-size: 0.76rem; /* 1rem = 16px (maybe, depends on browser), after our applied scale percentage we have to\n                         divide desired font size by 30 to get correct rem */\n  line-height: 1.25rem;\n  color: rgb(67, 67, 67);\n  background-color: transparent;\n  overflow-x: hidden;\n  -webkit-nbsp-mode: space; /* non standard css to deal with all &nbsp; as normal space */\n}\n\nbody.encp-medium-zoom {\n  /* Also reflect the change of width to "body.encp-medium-zoom div.encp-layout-editor-note-content" style */\n  width: 80%;\n}\n\nbody.encp-large-zoom {\n  /* Also reflect the change of width to "body.encp-large-zoom div.encp-layout-editor-note-content" style */\n  width: 84%;\n}\n\ndiv.encp-note-title > div.encp-title-container {\n  max-width: 100%;\n  padding: 0 3.95%; /* padding = (100% / longestParentWidth% * paddingInDesign% / 2) \n                       e.g. used for 15% in 15%/70%/15% title when body width is 76% */\n}\n\nbody.encp-medium-zoom div.encp-note-title > div.encp-title-container {\n  padding: 0 6.25%;\n}\n\nbody.encp-large-zoom div.encp-note-title > div.encp-title-container {\n  padding: 0;\n}\n\nli {\n  line-height: 1.4rem;\n  vertical-align: text-top;\n}\n\nhr {\n  height: 1px;\n  border: 0;\n  padding: 0;\n  margin: 1.2rem auto;\n  width: 100%;\n  background-color: rgb(191, 191, 191);\n}\n\n.small-font {\n  font-size: 0.62rem;\n}\n\n.medium-font {\n  font-size: 0.85rem;\n}\n\n.large-font {\n  font-size: 1.16rem;\n}\n\na {\n  word-wrap: break-word;\n}\n\np + p {\n  margin-top: 0.6rem;\n}\n\nli, div {\n  margin-top: 0;\n}\n\nb, strong {\n  font-weight: bold;\n}\n\n/*\n * Cleaner for en-note content wrapper.\n *\n * Fix for partialy copied HTML content containing floated layout, bug https://evernote.jira.com/browse/CP-3064\n * More details about floating problem http://www.quirksmode.org/css/clearing.html\n */\n#en-note:after {\n  content: "";\n  display: table;\n  clear: both;\n}\n\n/*\n * Highlight\n */\n.encp-note-highlight {\n  color: black !important;\n  background-color: rgb(255, 250, 165) !important;\n}\n\n.encp-note-highlight * {\n  color: black !important;\n}\n\n/*\n * Monospace\n */\n.encp-note-monospace {\n  font-family: "Menlo",monospace;\n  font-size: 0.6rem;\n  line-height: 1.0rem;\n  margin: 0 2rem;\n}\n\n.encp-note-monospace > div {\n  margin-top: 0;\n}\n\nfont.encp-note-monospace,\nspan.encp-note-monospace,\nem.encp-note-monospace,\nstrong.encp-note-monospace {\n  display: inline-block;\n}\n\n.encp-monospace-inline {\n  font-family: "Menlo",monospace;\n}\n\n.encp-note-monospace .small-font {\n  font-size: 0.44rem;\n}\n\n.encp-note-monospace .medium-font {\n  font-size: 0.6rem;\n}\n\n.encp-note-monospace .large-font {\n  font-size: 0.81rem;\n}\n\n/*\n * Checkboxes\n */\n/* Invalid markup, but we have it in our \'This special one\' test note */\nol > div > .encp-checkbox {\n  margin-top: 0;\n}\n\n.encp-checkbox.encp-inside-text {\n  margin-left: 0.3rem;\n}\n\n.encp-checkbox {\n  margin-right: 0.26rem;\n  text-align: center;\n  margin-top: 0.15rem;\n  height: 0.9rem;\n  width: 0.9rem;\n  vertical-align: top;\n  display: inline-block;\n  background-image: url(../Images/checkmarkUnchecked.svg);\n  background-repeat: no-repeat;\n  background-position: center;\n  background-size: contain;\n}\n\n.encp-checkbox.encp-checked {\n  background-image: url(../Images/checkmarkChecked.svg);\n  background-repeat: no-repeat;\n  background-position: center;\n  background-size: contain;\n}\n\nli .encp-checkbox {\n  margin-top: 0.21rem;\n}\n\n/*\n * Table\n */\ndiv.encp-table-container {\n  text-align: center;\n  padding: 0;\n  margin: 0;\n  /* Borders of row will be running over to make them edge-to-edge. We need to hide overflowed parts of them.  */\n  overflow: hidden;\n  /* 100% / 76% - 100% = 31.57% then / 2 = 15.8% */\n  margin-right: -15.8%;\n  margin-left: -15.8%;\n}\n\ndiv.encp-table-container.encp-media-with-padding {\n  margin-top: 1.2rem;\n  margin-bottom: 1.2rem;\n}\n\nbody.encp-medium-zoom div.encp-table-container {\n  /* 100% / 80% - 100% = 25% then / 2 = 12.5% */\n  margin-right: -12.5%;\n  margin-left: -12.5%;\n}\n\nbody.encp-large-zoom div.encp-table-container {\n  /* 100% / 86% - 100% = 16.27% then / 2 = 8.14% */\n  margin-right: -8.14%;\n  margin-left: -8.14%;\n}\n\ntable {\n  margin: 0 auto;\n  border-collapse: collapse;\n  max-width: 94%;\n  border-width: 0;\n  table-layout: fixed;\n}\n\ntd, th {\n  padding: 0.93%;\n  border-color: rgb(191, 191, 191);\n  border-width: 1px;\n  border-style: solid;\n  font-size: 0.65rem;\n  vertical-align: top;\n  word-wrap: break-word;\n}\n\ntr:first-child td, tr:first-child th {\n  border-top-width: 0;\n}\n\ntr:last-child td, tr:last-child th {\n  border-bottom-width: 0;\n}\n\ntd:first-child, th:first-child {\n  position: relative;\n  border-left-width: 0;\n}\n\ntd:last-child, th:last-child {\n  position: relative;\n  border-right-width: 0;\n}\n\ntable[style*="width: 100%"] td:first-child:before,\ntable[style*="width: 100%"] th:first-child:before {\n  content: " ";\n  display: block;\n  position: absolute;\n  right: 0;\n  bottom: -1px;\n  width: 9999px;\n  border-bottom: 1px solid rgb(191, 191, 191);\n}\n\ntr:last-child td:first-child:before, tr:last-child th:first-child:before {\n  border-bottom-width: 0;\n}\n\ntable[style*="width: 100%"] td:last-child:after,\ntable[style*="width: 100%"] th:last-child:after {\n  content: " ";\n  display: block;\n  position: absolute;\n  left: 0;\n  bottom: -1px;\n  width: 9999px;\n  border-bottom: 1px solid rgb(191, 191, 191);\n}\n\ntr:last-child td:last-child:after,\ntr:last-child th:last-child:after {\n  border-bottom-width: 0;\n}\n\ntd div:first-child,\ntable td ol:first-child,\ntable td ul:first-child,\ntable ol > li:first-child,\ntable ul > li:first-child,\nbody.encp-medium-zoom td div:first-child,\nbody.encp-medium-zoom table td ol:first-child,\nbody.encp-medium-zoom table td ul:first-child,\nbody.encp-medium-zoom table ol > li:first-child,\nbody.encp-medium-zoom table ul > li:first-child,\nbody.encp-large-zoom td div:first-child,\nbody.encp-large-zoom table td ol:first-child,\nbody.encp-large-zoom table td ul:first-child,\nbody.encp-large-zoom table ol > li:first-child,\nbody.encp-large-zoom table ul > li:first-child {\n  margin-top: 0;\n}\n\ntd > div > img {\n  max-width: 100%;\n}\n\ntable .encp-checkbox {\n  height: 0.7rem;\n  width: 0.7rem;\n}\n\ntable ul {\n  margin-left: 0.7rem;\n}\n\ntable ol {\n  margin-left: 1.2rem;\n}\n\ntable .encp-note-monospace {\n  margin-left: 0;\n}\n\ntable ol > li,\ntable ul > li {\n  line-height: 0.9rem;\n  margin-top: 0.36rem;\n  margin-bottom: 0;\n  padding-left: 0;\n}\n\ntable .encp-line-spacer {\n  font-size: 0.65rem;\n  line-height: 0.65rem;\n  margin-top: 0;\n}\n\ntable .small-font {\n  font-size: 0.63rem;\n}\n\ntable .medium-font {\n  font-size: 0.65rem;\n}\n\ntable .large-font {\n  font-size: 0.87rem;\n}\n\nbody.encp-medium-zoom td,\nbody.encp-medium-zoom th {\n  padding: 1.07%;\n  font-size: 0.52rem;\n}\n\nbody.encp-large-zoom table .encp-line-spacer {\n  font-size: 0.52rem;\n  line-height: 0.52rem;\n  margin-top: 0;\n}\n\nbody.encp-medium-zoom table .small-font {\n  font-size: 0.5rem;\n}\n\nbody.encp-medium-zoom table .medium-font {\n  font-size: 0.52rem;\n}\n\nbody.encp-medium-zoom table .large-font {\n  font-size: 0.69rem;\n}\n\nbody.encp-medium-zoom table .encp-checkbox {\n  height: 0.6rem;\n  width: 0.6rem;\n}\n\nbody.encp-medium-zoom table ol > li,\nbody.encp-medium-zoom table ul > li {\n  line-height: 0.72rem;\n  margin-top: 0.29rem;\n}\n\nbody.encp-medium-zoom table ul {\n  margin-left: 0.6rem;\n}\n\nbody.encp-medium-zoom table ol {\n  margin-left: 1.0rem;\n}\n\nbody.encp-large-zoom td,\nbody.encp-large-zoom th {\n  padding: 1.36%;\n  font-size: 0.49rem;\n}\n\nbody.encp-large-zoom table .encp-line-spacer {\n  font-size: 0.49rem;\n  line-height: 0.41rem;\n  margin-top: 0;\n}\n\nbody.encp-large-zoom table .small-font {\n  font-size: 0.41rem;\n}\n\nbody.encp-large-zoom table .medium-font {\n  font-size: 0.49rem;\n}\n\nbody.encp-large-zoom table .large-font {\n  font-size: 0.57rem;\n}\n\nbody.encp-large-zoom table .encp-checkbox {\n  height: 0.55rem;\n  width: 0.55rem;\n}\n\nbody.encp-large-zoom table ol > li,\nbody.encp-large-zoom table ul > li {\n  line-height: 0.67rem;\n  margin-top: 0.27rem;\n}\n\nbody.encp-large-zoom table ul {\n  margin-left: 0.75rem;\n}\n\nbody.encp-large-zoom table ol {\n  margin-left: 1.0rem;\n}\n\n/*\n * Table inside table\n */\ntable div.encp-table-container {\n  margin: 0;\n}\n\ntable div.encp-table-container table td:last-child:after,\ntable div.encp-table-container table th:last-child:after,\ntable div.encp-table-container table td:first-child:before,\ntable div.encp-table-container table th:first-child:before {\n  border-bottom-width: 0;\n}\n\n/*\n * Links\n */\na.encp-text-link,\na.encp-text-link:visited,\na.encp-text-link:active {\n  background-color: inherit;\n  color: rgb(0, 144, 244) !important;\n  text-decoration: underline;\n  cursor: pointer;\n  padding-top: 0.1rem;\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;\n}\n\na.encp-text-link:hover,\na.encp-text-link:focus {\n  color: white !important;\n  background-color: rgb(0, 144, 244) !important;\n  text-decoration: none;\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;\n}\n\na.encp-note-link.encp-text-link,\na.encp-note-link.encp-text-link:visited,\na.encp-note-link.encp-text-link:active {\n  color: rgb(1, 159, 81) !important;\n  text-decoration: underline;\n}\n\na.encp-note-link.encp-text-link:hover,\na.encp-note-link.encp-text-link:focus {\n  color: white !important;\n  background-color: rgb(1, 159, 81) !important;\n  text-decoration: none;\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;\n}\n\na.encp-broken-link,\na.encp-broken-link.encp-note-link.encp-text-link,\na.encp-broken-link:hover,\na.encp-broken-link.encp-note-link.encp-text-link:hover,\na.encp-broken-link:focus,\na.encp-broken-link.encp-note-link.encp-text-link:focus {\n  cursor: default;\n  text-decoration: inherit !important;\n  background-color: transparent !important;\n  color: rgb(47, 47, 47) !important;\n  -webkit-transition: none;\n}\n\na hr,\na:visited hr,\na:hover hr,\na:focus hr,\na:active hr {\n  background-color: transparent !important;\n  -webkit-transition: none !important;\n}\n\n/*\n * List styles (ul, ol)\n */\nul {\n  margin-left: 2.22rem;\n  padding: 0;\n  list-style-type: disc;\n  line-height: 1.1rem;\n}\n\nul > li {\n  padding-left: 0.2rem;\n}\n\nol {\n  margin-left: 2.22rem;\n  font-weight: bold;\n  padding: 0;\n  line-height: 1.1rem;\n}\n\nol > li {\n  padding-left: 0.2rem;\n  margin-left:0;\n  margin-bottom: 0.454rem;\n}\n\nol > li > span.content {\n  font-weight: normal;\n  display: block;\n  -webkit-nbsp-mode: space;\n  -webkit-line-break: after-white-space;\n}\n\nol > li > span.content > ul {\n  margin: 0 0 0 2.27rem;\n  padding: 0;\n}\n\nbody.encp-large-zoom ul,\nbody.encp-large-zoom ol {\n  margin-left: 1rem;\n}\n\n/*\n * Media container\n */\ndiv.encp-media-container {\n  /* CP-3120: Disabled scale due to conflict with .encp-section-break-animation in LayoutEditorBase.css */\n  /* It seems not to have any effect on the UI. */\n  /*-webkit-transform: scale(1.0);*/\n  text-align: center;\n  padding-top: 1rem;\n  padding-bottom: 1rem;\n  margin-top: 0;\n  /* 100% / 76% - 100% = 31.57% then / 2 = 15.8% + 0.1% margin */\n  margin-right: -15.9%;\n  margin-left: -15.9%;\n}\n\ndiv.encp-media-container.encp-mouse-down {\n  /* MUST ensure the scale matches CLICKED_CONTAINER_SCALE in ENCPMediaContents.js */\n  -webkit-transform: scale(0.95);\n}\n\nli div.encp-media-container,\nbody.encp-medium-zoom li div.encp-media-container,\nbody.encp-large-zoom li div.encp-media-container {\n  text-align: left;\n}\n\nbody.encp-medium-zoom div.encp-media-container {\n  /* 100% / 80% - 100% = 25% then / 2 = 12.5% */\n  margin-left: -12.5%;\n  margin-right: -12.5%;\n}\n\nbody.encp-large-zoom div.encp-media-container {\n  /* 100% / 86% - 100% = 16.27% then / 2 = 8.14% + 0.01% margin */\n  margin-right: -8.15%;\n  margin-left: -8.15%;\n}\n\ndiv.encp-media-container.encp-media-nonimage {\n  margin-left: 0!important;\n  margin-right: 0!important;\n}\n\ndiv.encp-media-container.encp-media-with-padding {\n  margin-top: 1.2rem;\n  margin-bottom: 1.2rem;\n}\n\ndiv.encp-media-container + div.encp-media-container {\n  padding-bottom: 2rem;\n}\n\ndiv.encp-media-container + br {\n  display: none;\n}\n\ndiv.encp-media-container > div.encp-media-preview {\n  margin-left: auto;\n  margin-right: auto;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.encp-media-container img {\n  margin-left: auto;\n  margin-right: auto;\n  max-height: none;\n  max-width: 100%;\n}\n\n.encp-media-container .encp-portrait {\n  max-height: 90%;\n  max-width: none;\n}\n\n.encp-media-container-document > .encp-shadow {\n  position: absolute;\n  display: block;\n  left: 0;\n  right: 0;\n  top: -0.5rem;\n  bottom: 0;\n}\n\n.encp-media-container-document > .encp-shadow.encp-first-shadow {\n  transform: rotate(2deg);\n  -webkit-transform: rotate(2deg); /* a workaround to make sure enabling transform */\n  background-color: rgb(219,219,219);\n}\n\n.encp-media-container-document > .encp-shadow.encp-second-shadow {\n  transform: rotate(1deg);\n  -webkit-transform: rotate(1deg); /* a workaround to make sure enabling transform */\n  background-color: rgb(234,234,234);\n}\n\n.encp-media-container-document {\n  position: relative;\n}\n\n.encp-media-container-document > .en-media.encp-document {\n  position: relative;\n  border-style: solid;\n  border-width: 1px;\n  border-color: rgb(234,234,234);\n  opacity: 1.0;\n  display: block;\n  background-color: white;\n}\n\n/*\n * Inline images\n */\n.encp-media-container-inline {\n  display: inline-block;\n  margin-top: 0;\n  margin-bottom: 0.1rem;\n  vertical-align: middle;\n}\n\n/*\n * Images in table\n */\n.encp-table-image {\n  height: auto !important;\n  width: auto !important;\n}\n\ntable div.encp-media-container,\ntable div.encp-media-container.encp-media-with-padding,\nbody.encp-medium-zoom table div.encp-media-container,\nbody.encp-large-zoom table div.encp-media-container {\n  margin: 0 !important;\n}\n\ntable div.encp-media-container img,\ntable div.encp-media-container .encp-portrait {\n  max-width: 100%;\n  max-height: none;\n}\n\n/*\n * Captions\n */\n.encp-media-caption-header,\n.encp-media-caption-footer {\n  text-align: center;\n}\n\n.encp-media-caption-header {\n  font-family: "Caecilia";\n  font-size: 1.0666rem;\n  line-height: 1.4666rem;\n  padding: 1.6rem 15.13% 1.0rem;\n}\n\n.encp-media-caption-header b,\n.encp-media-caption-header strong {\n  font-weight: normal;\n}\n\n.encp-media-caption-header .large-font,\n.encp-media-caption-header .medium-font,\n.encp-media-caption-header .small-font {\n  font-size: 1.55rem;\n}\n\n.encp-media-caption-footer {\n  font-size: 0.5666rem;\n  line-height: 0.8rem;\n  padding: 1.2rem 15.13%;\n}\n\n.encp-media-caption-footer .large-font,\n.encp-media-caption-footer .medium-font,\n.encp-media-caption-footer .small-font {\n  font-size: 0.86rem;\n}\n\nbody.encp-medium-zoom .encp-media-caption-header {\n  padding: 1.28rem 12.5% 0.8rem;\n}\n\nbody.encp-medium-zoom .encp-media-caption-footer {\n  padding: 0.96rem 12.5%;\n}\n\nbody.encp-large-zoom .encp-media-caption-header {\n  padding: 0.85rem 2.38% 0.6rem;\n}\n\nbody.encp-large-zoom .encp-media-caption-footer {\n  padding: 0.55rem 2.38%;\n}\n\n/*\n * Miscellaneous\n */\n.encp-crypt {\n  border-bottom: 2px solid rgb(180, 180, 180);\n  display: inline-block;\n  font-size: 0.85rem;\n  border-radius: 0.6rem;\n  padding: 0 0.5rem;\n  margin: 0.25rem 0.3rem;\n  line-height: 1.0rem;\n}\n\n.encp-crypt:after {\n  content: "●●●●●●●●";\n}\n\ndiv > span.encp-crypt:first-of-type {\n  margin-left: 0;\n}\n\nhtml[encp-content-class=\'evernote.penultimate.notebook\'] hr {\n  display: none;\n}\n\nbody, html {\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out;\n}\n\n.encp-line-spacer {\n  line-height: 1rem;\n  margin-top: 0;\n}\n\n.encp-hidden-line-spacer {\n  display: none;\n}\n\n::selection {\n  background-color: Highlight;\n  color: HighlightText;\n}\n'}),define("text!CSS/PresentationDefault.css",[],function(){return"/* common */\nhr {\n  background-color: rgb(191, 191, 191);\n}\ndiv.encp-note-title {\n  color:rgb(67, 67, 67);\n}\ndiv.encp-note-title > div.encp-title-container > h1.title {\n  color:rgb(67, 67, 67);\n}\nimg.encp-preview-encrypted-content {\n  background-image: url(../Images/encryptedContent.svg);\n}\nimg.encp-preview-default {\n  background-image: url(../Images/brokenNote.svg);\n}\n/* presentation */\nhtml {\n  color:rgb(67, 67, 67);\n  background-color:rgb(255,255,255);\n}\nbody {\n  color:rgb(67, 67, 67);\n}\na.encp-note-link.encp-text-link, a.encp-note-link.encp-text-link:visited, a.encp-note-link.encp-text-link:active {\n  color: rgb(1, 159, 81) !important;\n  text-decoration: underline;\n}\na.encp-note-link.encp-text-link:hover, a.encp-note-link.encp-text-link:focus {\n  color:white !important;\n  background-color: rgb(1, 159, 81) !important;\n}\na.encp-broken-link, a.encp-broken-link.encp-note-link.encp-text-link,\na.encp-broken-link:hover, a.encp-broken-link.encp-note-link.encp-text-link:hover,\na.encp-broken-link:focus, a.encp-broken-link.encp-note-link.encp-text-link:focus {\n  color: rgb(67, 67, 67) !important;\n}\ntd, th,\ntd:first-child:before, th:first-child:before,\ntd:last-child:after, th:last-child:after {\n  border-color: rgb(191, 191, 191);\n}\n"}),define("text!CSS/PresentationNight.css",[],function(){return"/* common */\nhr {\n  background-color: rgb(64, 64, 64);\n}\ndiv.encp-note-title {\n  color:rgb(255, 255, 255);\n}\ndiv.encp-note-title > div.encp-title-container > h1.title {\n  color:rgb(255, 255, 255);\n}\nimg.encp-preview-encrypted-content {\n  background-image: url(../Images/encryptedContentWhite.svg);\n}\nimg.encp-preview-default {\n  background-image: url(../Images/brokenNoteWhite.svg);\n}\n/* presentation */\nhtml {\n  color:rgb(245, 245, 245);\n  background-color:rgb(0,0,0);\n}\nbody {\n  color:rgb(245, 245, 245);\n}\nbody * {\n  color:rgb(245,245,245) !important;\n}\na.encp-note-link.encp-text-link, a.encp-note-link.encp-text-link:visited, a.encp-note-link.encp-text-link:active {\n  color: rgb(1, 159, 81) !important;\n  text-decoration: underline;\n}\na.encp-note-link.encp-text-link:hover, a.encp-note-link.encp-text-link:focus {\n  color:white !important;\n  background-color: rgb(1, 159, 81) !important;\n}\na.encp-broken-link, a.encp-broken-link.encp-note-link.encp-text-link,\na.encp-broken-link:hover, a.encp-broken-link.encp-note-link.encp-text-link:hover,\na.encp-broken-link:focus, a.encp-broken-link.encp-note-link.encp-text-link:focus {\n  color: rgb(255, 255, 255) !important;\n}\ntd, th,\ntd:first-child:before, th:first-child:before,\ntd:last-child:after, th:last-child:after {\n  border-color: rgb(134, 134, 134);\n}\n"}),define("text!CSS/Websource.css",[],function(){return'\nbody > div, body > table, body > img {\n  display: block;\n  margin: 0px auto;\n}\n\nbody {\n  margin: 150px auto !important;\n  max-width:1024px;\n}\n\n\n/* margin and padding have to be the same\n   as body margin values to match style */\n.encp-layout-editor-note-content > #en-note\n{\n  margin-left: 150px;\n  margin-right: 150px;\n}\n\ndiv.encp-layout-editor-note-content\n{\n  padding-bottom: 150px;\n}\n\n.encp-layout-editor-note-content\n{\n  background-color: white;\n}\n\ndiv#en-note {\n  position: relative;\n}\n\nhtml[encp-content-class="evernote.hello.encounter.2"] > body {\n  margin-top: 0px !important;\n}\n\nhtml[encp-content-class="evernote.food.meal.2"] > body,\nhtml[encp-content-class="evernote.food.meal"] > body {\n  word-wrap: break-word;\n  -webkit-nbsp-mode: space;\n  -webkit-line-break: after-white-space;\n}\n\nimg {\n  max-width: 100%;\n  height: auto !important;\n}\n\ndiv.encp-note-title {\n  /*  CP-1024 - Allow title to be visible within weird notes which overlay entire view */\n  background-color: white;\n  position: relative;\n  z-index: 1000;\n}\n\ndiv.encp-note-title > div.encp-title-container > h1.title,\nhtml[encp-source="Clearly"] h1 {\n   /* use pixels instead of rem, as rem doesn\'t work with zoom */\n  font-size: 45px !important;\n  line-height: 120%;\n}\n\na, a:visited, a:active {\n  background-color: inherit;\n  color:rgb(0, 144, 244) !important;\n  cursor: pointer;\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;\n}\n\na:hover, a:focus {\n  color:white !important;\n  background-color: rgb(0, 144, 244) !important;\n  text-decoration: none;\n  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;\n}\n\n\n'}),define("Mac/ENCPPresenter",["require","Shared/Utilities/JQueryExt","Shared/Utilities/ENCPDeferred","Shared/NotePresenter/ENCPImageLayout","Shared/Utilities/ENCPLogger","Shared/LayoutEditor/ENCPLayoutEditorController","Shared/NotePresenter/ENCPMediaContents","Mac/ENCPPlatformMediaContents","Shared/LayoutEditor/ENCPSectionBreak","Shared/LayoutEditor/ENCPSectionBreakLayout","Shared/LayoutEditor/ENCPSectionBreakAutoFormatter","Shared/LayoutEditor/ENCPSectionBreakHRConverter","Shared/Utilities/ENCPThemeStyles","Shared/Utilities/ENCPUtilities","text!CSS/Common.css","text!CSS/Presentation.css","text!CSS/PresentationDefault.css","text!CSS/PresentationNight.css","text!CSS/Websource.css"],function(e){function d(){this.setupStyleSheet()}var t=e("Shared/Utilities/JQueryExt"),n=e("Shared/Utilities/ENCPDeferred"),r=e("Shared/NotePresenter/ENCPImageLayout"),i=e("Shared/Utilities/ENCPLogger"),s=e("Shared/LayoutEditor/ENCPLayoutEditorController"),o=e("Shared/NotePresenter/ENCPMediaContents"),u=e("Mac/ENCPPlatformMediaContents"),a=e("Shared/LayoutEditor/ENCPSectionBreak"),f=e("Shared/LayoutEditor/ENCPSectionBreakLayout"),l=e("Shared/LayoutEditor/ENCPSectionBreakAutoFormatter"),c=e("Shared/LayoutEditor/ENCPSectionBreakHRConverter"),h=e("Shared/Utilities/ENCPThemeStyles"),p=e("Shared/Utilities/ENCPUtilities");return d.prototype={REFERENCE_SCREEN_RESOLUTION:1440,REFERENCE_FONT_SIZE_IN_PX:30,STANDARD_EM_SIZE_IN_PX:16,MIN_PAGEMARGIN_RATIO:.1,MIN_IMAGE_SIZE:100,MAX_IMAGE_DISPLAY_HEIGHT_FACTOR:.9,MAX_IMAGE_DISPLAY_WIDTH_FACTOR:.7,isAlreadyAtEndOfNote:!1,previousDocumentHeight:0,previousScrollTop:0,lastScrollPosition:0,targetScrollPosition:-1,scrollMarker:null,markerPosition:-1,isTouched:!1,isRecoveringScrollPosition:!1,readyToSetupPageBreaks:!1,didSetupPageBreaks:!1,pageBoundaries:null,referenceScreenResolution:0,referenceFontSize:0,focused:null,lastKeyPress:undefined,themeStyles:undefined,userZoomLevel:1,titlePadding:{top:0,bottom:0},imageContainers:t(),numberOfLoadedImages:0,sectionBreak:null,breakLayout:null,imageLayout:null,mediaContents:null,layoutEditorController:null,isAnimatingScroll:!1,SECTION_BREAK_ANIMATION_CLASS:"encp-section-break-animation",prepareExitGalleryModeForMediaAtPath:function(e,t){var n=this.mediaContents.getClosingMediaFrame(e,t);return JSON.stringify({mediaFrame:n})},setupStyleSheet:function(){var t=new h;t.applyTheme("default"),this.commonCSSGroup={base:["Common.css",e("text!CSS/Common.css")]},t.registerCSSGroup(this.commonCSSGroup),this.isNoteSource?this.presenterCSSGroup={base:["Presentation.css",e("text!CSS/Presentation.css")],"default":["PresentationDefault.css",e("text!CSS/PresentationDefault.css")],night:["PresentationNight.css",e("text!CSS/PresentationNight.css")]}:this.presenterCSSGroup={base:e("text!CSS/Websource.css")},t.registerCSSGroup(this.presenterCSSGroup),this.themeStyles=t},proceedLayout:function(){var e=this;n.doNow().then(function(){e.scalePresentation(),t(".encp-media-preview").addClass("encp-layout").removeClass("encp-media-preview")}).then(function(){t(".encp-layout").addClass("encp-media-preview").removeClass("encp-layout"),e.readyToSetupPageBreaks=!0,e.updatePageBreaks(!1)}).waitUntil(function(){return e.didSetupPageBreaks}).then(function(){e.previousDocumentHeight&&this.previousScrollTop&&(t(window).scrollTop(e.previousScrollTop*t(document).height()/e.previousDocumentHeight),e.previousScrollTop=0),e.isUpdatingLayout=!1,e.recoverScrollPosition()}).done()},updateLayout:function(){var e=this,t=e.viewPort();n.doNow(function(){window.encpPlatform.willStartLayouting(),e.isUpdatingLayout=!0,e.pageBoundaries=null}).then(function(){var n=e.viewPort();window.encpPlatform.hasViewPortBeenOverriden()&&t.height==n.height&&t.width==n.width?(e.isUpdatingLayout=!1,e.recoverScrollPosition()):e.proceedLayout()}).waitUntil(function(){return!e.isUpdatingLayout}).then(function(){e.layoutEditorController&&(e.layoutEditorController.updateDocumentHeight(),e.layoutEditorController.scrollToPresentedArea()),window.encpPlatform.didFinishLayouting()}).done()},registerResizeHandler:function(){var e=this;t(window).on("resize",function(){e.updateLayout()})},updateDocumentHeight:function(){var e=this,n=t(document).height();n!=e.previousDocumentHeight&&(e.previousDocumentHeight=n)},willChangeScreen:function(){this.previousScrollTop=t(window).scrollTop(),this.updateDocumentHeight()},zoomFactorInPercent:function(){return this.referenceFontSize*100/this.STANDARD_EM_SIZE_IN_PX*this.viewPort().width/this.referenceScreenResolution},scalePresentation:function(){var e=this,n=t("html"),r=0;e.isNoteSource()?(r=this.zoomFactorInPercent(),r*=this.userZoomLevel,n.css("font-size",""+r+"%")):n.hasClass("encp-image-only")||window.encpPlatform.adjustZoomLevel(n,e.referenceScreenResolution,this.userZoomLevel),this.mediaContents.adjustMediaImages()},updateUserZoomLevel:function(e){this.userZoomLevel=e;var n=t("body");this.userZoomLevel>1.5?(n.removeClass("encp-medium-zoom"),n.addClass("encp-large-zoom")):this.userZoomLevel>1?(n.addClass("encp-medium-zoom"),n.removeClass("encp-large-zoom")):(n.removeClass("encp-medium-zoom"),n.removeClass("encp-large-zoom")),this.readyToSetupPageBreaks&&(this.willChangeScreen(),this.updateLayout())},proceedPageDown:function(){if(this.focused&&this.focused.hasClass("encp-note-link")){var e=this.lastScrollPosition,t=e+this.viewPort().height,n=this.focused.offset().top;if(n>e&&n<t){window.location.href=this.focused.attr("href");return}}if(this.isEndOfNote()){window.encpPlatform.navigateToNextNote();return}this.scrollToNextBoundary()},proceedPageUp:function(){if(this.isBeginningOfNote()){window.encpPlatform.navigateToPreviousNote();return}this.scrollToPreviousBoundary()},registerKeydownHandler:function(){var e=this;if(e.isInLayoutEditorMode())return;t(window).on("keydown",function(t){t.keyCode==32&&e.lastKeyPress==t.keyCode&&e.targetScrollPosition==-1&&(e.lastKeyPress=undefined);if(e.lastKeyPress!==undefined){t.preventDefault(),t.returnValue=!1;return}var n=null;if(t.keyCode==34)n=e.proceedPageDown;else if(t.keyCode==33)n=e.proceedPageUp;else if(t.keyCode==32)n=t.shiftKey?e.scrollToPreviousBoundary:e.scrollToNextBoundary;else if(t.keyCode==37||t.keyCode==38)n=e.scrollToPreviousBoundary;else if(t.keyCode==39||t.keyCode==40)n=e.scrollToNextBoundary;if(n){if(t.altKey||t.ctrlKey||t.metaKey)n=e.beep;n.call(e),e.lastKeyPress=t.keyCode,t.preventDefault(),t.returnValue=!1}}),t(window).on("keyup",function(t){e.lastKeyPress===t.keyCode&&(e.lastKeyPress=undefined,t.preventDefault(),t.returnValue=!1)})},beep:function(){window.encpPlatform.beep()},disableInputElements:function(){t("input").attr("disabled","true")},registerFocusListener:function(){var e=this,n=t("a");n.on("focus",function(){e.focused=t(this)}),n.on("blur",function(){e.focused&&e.focused==t(this)&&(e.focused=null)})},validNoteLinks:function(){return t(".encp-note-link:not(.encp-broken-link)")},setupInitialFocus:function(){var e=this,n=e.validNoteLinks();if(!n.length||t(window).scrollTop()>0||e.focused)return;var r=window.scrollX,i=window.scrollY;t(n.get(0)).focus(),window.scrollTo(r,i)},pageBreakOffset:function(e){return e.length>0?e.offset().top:t(document).height()},setBreakAtIndexEnabled:function(e,t){return this.sectionBreak.setBreakAtIndexEnabled(e,t)},updatePageBreaks:function(e){var r=this;n.doNow(function(){r.imageLayout.setupCaptions(r.sectionBreak)}).then(function(){t("img.encp-loaded").each(function(){e&&this.classList.add(r.SECTION_BREAK_ANIMATION_CLASS),r.imageLayout.adjustImage(this,r.viewPort(),r.sectionBreak)})}).then(function(){r.readyToSetupPageBreaks=!0,r.setupPageBreaks(e)}).done()},hasEnabledSectionBreaks:function(){return this.breakLayout.hasEnabledUserBreaks()},convertHRsToEnabledSectionBreaks:function(){var e=new c;return e.convert(this.sectionBreak)?(this.updatePageBreaks(!0),this.layoutEditorController&&this.layoutEditorController.refreshSectionBreaks(),this.scrollToTopOffset(0,!0),!0):!1},performAutoLayout:function(){var e=new l;return e.titleElement=document.querySelector(".encp-note-title"),e.performAutoLayout(this.sectionBreak)?(this.updatePageBreaks(!0),this.layoutEditorController&&this.layoutEditorController.refreshSectionBreaks(),this.scrollToTopOffset(0,!0),!0):!1},disableAllEnabledSectionBreaks:function(){this.sectionBreak.disableAllEnabledSectionBreaks(),this.updatePageBreaks(!0),this.layoutEditorController&&this.layoutEditorController.refreshSectionBreaks(),this.scrollToTopOffset(0,!0)},setupPageBreaksIfNeeded:function(){if(!this.readyToSetupPageBreaks||this.numberOfLoadedImages<this.imageContainers.length||!this.isNoteSource())return;this.setupPageBreaks(!1)},setupPageBreaks:function(e){if(!this.readyToSetupPageBreaks){i.logWarn("Not ready to setup page breaks.");return}var n=this.imageLayout,r=this.viewPort(),s=Math.floor(this.MIN_PAGEMARGIN_RATIO*r.height),o={"padding-top":"","padding-bottom":""};if(this.breakLayout.hasEnabledUserBreaks())if(n.hasNoContent(0))o={"padding-top":"0","padding-bottom":"0"};else{var u=this.titlePadding.top/(this.titlePadding.top+this.titlePadding.bottom)*s*4,a=this.titlePadding.bottom/(this.titlePadding.top+this.titlePadding.bottom)*s*4;o={"padding-top":Math.floor(u)+"px","padding-bottom":Math.ceil(a)+"px"}}t(".encp-note-title").css(o),n.adjustTableMargins(r),this.breakLayout.setViewPortSize(r.width,r.height),this.breakLayout.setupPageBreaks(function(e,i,o){if(e===undefined&&i===undefined){var u=0,a=t("#en-note");return a.length&&(u=r.height,u-=p.elementPositionRelativeToParent(a.get(0),null).y,u-=a.height()),{top:0,bottom:Math.max(u,s),pageHeightOverride:0}}return{top:n.hasTopMargin(o)?s:0,bottom:n.hasBottomMargin(o)?s:0,pageHeightOverride:n.getPageHeightIfAvailable(o)}}),this.pageBoundaries=null,this.didSetupPageBreaks=!0},setup:function(){this.sectionBreak=new a(document.body),this.breakLayout=new f(this.sectionBreak),this.imageLayout=new r(this.isNoteSource()),this.mediaContents=new o(this),this.platformMediaContents=new u(this.mediaContents),this.mediaContents.platformContents=this.platformMediaContents,this.mediaContents.setupMediaContainers();var e=this;e.referenceScreenResolution=e.REFERENCE_SCREEN_RESOLUTION,e.referenceFontSize=e.REFERENCE_FONT_SIZE_IN_PX,e.imageContainers=t(".encp-media-container img"),e.numberOfLoadedImages=0;var i=t(".encp-note-title");e.titlePadding={top:parseFloat(i.css("padding-top")),bottom:parseFloat(i.css("padding-bottom"))},e.titlePadding.top==0&&e.titlePadding.bottom==0&&(e.titlePadding={top:1,bottom:1}),window.encpPlatform.setupPlatform&&window.encpPlatform.setupPlatform(),e.imageLayout.setupCaptions(e.sectionBreak),e.registerImageLoadListener(),e.registerScrollListener(),window.encpPlatform.shouldHandleResizing()&&e.registerResizeHandler(),e.registerBrokenLinkListener(),e.scalePresentation(),e.registerKeydownHandler(),e.registerFocusListener(),e.disableInputElements(),e.previousDocumentHeight=t(document).height(),t(window).focus(function(){e.setupInitialFocus()}),n.doNow(function(){e.presentationPageLoaded()}).then(function(){e.setupPageBreaksIfNeeded(),window.encpPlatform.didParseMediaItems(e.mediaContents.getMediaItems())}).waitUntil(function(){return e.didSetupPageBreaks||!e.isNoteSource()}).then(function(){e.layoutEditorController&&(e.layoutEditorController.updateDocumentHeight(),e.layoutEditorController.updateZoom()),window.encpPlatform.didFinishLayouting()}).then(function(){window.encpPlatform.didFinishPageLoad()}).done()},tearDown:function(){n.tearDown()},isAtEndOfNote:function(){var e=document.height;return t(window).scrollTop()+this.viewPort().height>=e},isOnePageNote:function(){return document.height<=this.viewPort().height},notifyPlatformOfEndOfNoteChange:function(e){var t=this;t.isAtEndOfNote()?(t.isAlreadyAtEndOfNote||window.encpPlatform.didMoveToEndOfNote(),t.isAlreadyAtEndOfNote=!0):t.isAlreadyAtEndOfNote&&(window.encpPlatform.didMoveFromEndOfNote(),t.isAlreadyAtEndOfNote=!1)},markScrollPosition:function(){var e=this;if(e.isUpdatingLayout||e.isRecoveringScrollPosition)return;e.scrollMarker&&e.scrollMarker.removeClass("encp-scroll-marker");var n=e.viewPort(),r=document.elementFromPoint(n.width/2,n.height/2),i=r?t(r):t("body");i.innerHeight()>n.height?e.markerPosition=(t(window).scrollTop()+n.height/2)/t(document).height():e.markerPosition=-1,e.scrollMarker=i,e.scrollMarker.addClass("encp-scroll-marker"),e.targetScrollPosition=-1},recoverScrollPosition:function(){if(this.isUpdatingLayout||this.isTouched||this.targetScrollPosition>-1||!this.scrollMarker)return;this.isRecoveringScrollPosition=!0;if(this.breakLayout.hasEnabledUserBreaks()){var e=this.scrollPosition();this.markerPosition>0?e=t(document).height()*this.markerPosition:this.scrollMarker&&(e=t(this.scrollMarker).offset().top);var n=this.breakLayout.pageNumberForOffset(e),r=this.breakLayout.pageLimits(n);r&&(e=r.top),this.scrollToTopOffset(e,!1)}else if(this.markerPosition<0){var i=this.viewPort(),s=document.elementFromPoint(i.width/2,i.height/2);if(s&&t(s).is(".encp-scroll-marker")){this.isRecoveringScrollPosition=!1;return}}else this.scrollToTopOffset(t(document).height()*this.markerPosition-this.viewPort().height/2,!1);this.scrollMarker&&this.scrollIntoView(this.scrollMarker),this.markScrollPosition()},registerScrollListener:function(){var e=this;e.isAlreadyAtEndOfNote=!1,window.encpPlatform.didScrollToPosition(e.lastScrollPosition,e.isAnimatingScroll);var n=t(window);n.on("scroll",function(){e.isRecoveringScrollPosition?e.isRecoveringScrollPosition=!1:e.markScrollPosition(),e.lastScrollPosition=t(window).scrollTop(),window.encpPlatform.didScrollToPosition(e.lastScrollPosition,e.isAnimatingScroll),e.notifyPlatformOfEndOfNoteChange(),e.targetScrollPosition=-1}),n.on("touchstart",function(){e.isTouched=!0}),n.on("touchend",function(){e.isTouched=!1})},registerBrokenLinkListener:function(){t(".encp-broken-link").on("mousedown",function(e){return e.preventDefault(),!1})},completeImageLoading:function(e){var n=t(e);if(n.hasClass("encp-loaded"))return;if(!n.hasClass("encp-document")){var r=this;this.mediaContents.loadMediaImage(e,function(n,i){if(n&&i){r.imageLayout.setImageBaseSize(e,n,i);var s=r.imageLayout.getImageBaseSize(e);t(e).css("width",s.width+"px"),t(e).css("height",s.height+"px")}r.computeAspectRatio(e),window.encpPlatform.didAdjustImages()})}else this.computeAspectRatio(e)},computeAspectRatios:function(){var e=this;e.imageContainers.each(function(){e.completeImageLoading(this)}),window.encpPlatform.didAdjustImages()},computeAspectRatio:function(e){this.imageLayout.adjustImage(e,this.viewPort(),this.sectionBreak),t(e).addClass("encp-loaded"),++this.numberOfLoadedImages,this.setupPageBreaksIfNeeded()},registerImageLoadListener:function(){var e=this;e.imageContainers.bind("load",function(){var t=this;e.completeImageLoading(t),t.addEventListener("webkitTransitionEnd",function(){t.classList.contains(e.SECTION_BREAK_ANIMATION_CLASS)&&t.classList.remove(e.SECTION_BREAK_ANIMATION_CLASS)},!1)})},presentationPageLoaded:function(){this.computeAspectRatios(),this.readyToSetupPageBreaks=!0},scrollIntoView:function(e){t(window).scrollTop(t(e).offset().top+t(e).height()/2-this.viewPort().height/2),self.targetScrollPosition=-1},scrollToDocumentWithURL:function(e,n){var r=t("img[src='"+e+"']");n!==undefined&&n>0&&n<r.length&&(r=r.eq(n)),r.length&&this.scrollIntoView(r.get(0))},updateMediaItem:function(e){e=JSON.parse(e);if(e.identifier===undefined||e.mimetype===undefined)return;this.mediaContents.updateMediaItem(e)},isNoteSource:function(){return t("html").hasClass("notesource")},sourceType:function(){return t("html").is(".notesource")?"notesource":"websource"},getSectionBoundary:function(e){var t=1,n=2,r=this.scrollPosition();switch(e){case t:return this.breakLayout.pageDownOffset(r);case n:return this.breakLayout.pageUpOffset(r)}return r},setupPageBoundaries:function(){function o(o){s=!1;var u=i,a=t(n.get(i));while(a.length&&a.offset().top+a.height()<=o+e)a=t(n.get(++i));if(a.length&&(u!=i||i==0)){var f=0,l=r.index(a);u!=i&&(f=r.index(n.get(u))+1),f<l&&r.slice(f,l).each(function(){return t(this).text().trim().length>0&&(s=!0),!s})}return a.get(0)}function u(t){var n=this.breakLayout;if(n.hasEnabledUserBreaks()){var r=n.pageNumberForOffset(t),i=n.pageLimits(r)||{top:0,bottom:0},s=i.bottom-i.top>e,o=n.pageDownOffset(t);if(!s||o==i.bottom||o<t+e)return o}return Math.NaN}if(!this.didSetupPageBreaks||this.pageBoundaries||!this.isNoteSource())return;var e=this.viewPort().height,n=t("img:visible, table").not(".encp-small-image"),r=t("*:visible"),i=0,s=!1,a=0,f=-1,l=[a],c=t(document).height(),h=Math.floor(e*this.MIN_PAGEMARGIN_RATIO);while(f!=a&&a+e<c){f=a;var p=o.call(this,a),d=u.call(this,a);if(isNaN(d))if(p){d=p.offsetTop;var v=p.clientHeight;v<e&&(d-=Math.ceil((e-v)/2));var m=d-a;if(m<=0||m>e&&s)d=a+e-h}else d=a+e-h;l.push(d),a=d}this.pageBoundaries=l},getNearestBoundary:function(e){this.pageBoundaries||this.setupPageBoundaries();if(this.pageBoundaries)for(var t=this.pageBoundaries.length-1;t>=0;--t){var n=Math.floor(this.pageBoundaries[t]);if(n>e)continue;return n}return e},getPreviousBoundary:function(e){e===undefined&&(e=this.scrollPosition()),this.pageBoundaries||this.setupPageBoundaries();if(this.pageBoundaries){for(var t=this.pageBoundaries.length-1;t>=0;--t){var n=Math.floor(this.pageBoundaries[t]);if(n>=e)continue;return n}return this.pageBoundaries[0]}var r=Math.ceil(this.viewPort().height*(1-this.MIN_PAGEMARGIN_RATIO));return Math.max(0,e-r)},getNextBoundary:function(){var e=this.scrollPosition();this.pageBoundaries||this.setupPageBoundaries();if(this.pageBoundaries){var t=this.pageBoundaries.length;for(var n=0;n<t;++n){var r=Math.floor(this.pageBoundaries[n]);if(r<=e)continue;return r}return this.pageBoundaries[t-1]}var i=Math.ceil(this.viewPort().height*(1-this.MIN_PAGEMARGIN_RATIO));return e+i},pageBreakOffsets:function(){var e=this,t=[];t.push(0);var n=this.sectionBreak.findEnabledBreaks();return n.forEach(function(n){t.push(Math.floor(e.breakLayout.pageOffsetForBreak(n)))}),t.push(document.height),JSON.stringify(t)},scrollToPreviousBoundary:function(){var e=this;e.notifyPlatformOfEndOfNoteChange();if(e.scrollPosition()<=0)return!0;var t=e.getPreviousBoundary();return e.scrollToTopOffset(t,!1),!1},scrollToNextBoundary:function(){var e=this;e.notifyPlatformOfEndOfNoteChange();if(e.isAtEndOfNote())return!0;var t=e.getNextBoundary();return e.scrollToTopOffset(t,!1),!1},focusNextOrCurrentNoteLink:function(e){var n=this,r=n.validNoteLinks(),s=r.index(t(".encp-note-link[href='"+e+"']"));s>=0?(s<r.length-1&&(s+=1),t(r.get(s)).focus()):i.logWarn("didn't find note link!")},scrollPosition:function(){return this.targetScrollPosition<0?t(window).scrollTop():this.targetScrollPosition},scrollToTopOffset:function(e,n){var r=this;e<0&&(e=0);if(n){var i=t("body");i.stop(),r.targetScrollPosition=e,r.isAnimatingScroll=!0,i.animate({scrollTop:e},{duration:500,complete:function(){r.isAnimatingScroll=!1,e==r.targetScrollPosition&&(r.targetScrollPosition=-1)}})}else t(window).scrollTop(e),r.targetScrollPosition=-1},animatedScrollToMarkerID:function(e){var n=t("#"+e);if(!n.length)return;var r=this.scrollPosition(),i=this.viewPort().height,s=.2*i,o=n.offset().top-(r+s),u=n.offset().top+n.height()-(r+i-s),a=o<0?o:u>0?u:0;if(a){var f=t("html").css("zoom");f&&(a*=parseFloat(f))}var l=this.breakLayout.pageNumberForOffset(n.offset().top),c=this.breakLayout.pageNumberForOffset(r+a),h=this.breakLayout.pageNumberForOffset(r+a+i);c!=h?(l==c&&this.scrollToTopOffset(this.breakLayout.pageLimits(c).bottom-i,!0),l==h&&this.scrollToTopOffset(this.breakLayout.pageLimits(h).top,!0)):a&&this.scrollToTopOffset(r+a,!0)},scrollToCursorPosition:function(){var e=t("#en-editor-last-insertion-point");if(!e.length)return;var n=this,r=e.offset().top,i=e.height(),s=n.viewPort().height,o=-1,u=e.next(".encp-media-container").find("img");if(u.length){var a=n.breakLayout.pageNumberForOffset(r);n.imageLayout.hasImageHeaderInPage(a)||(o=n.getNearestBoundary(u.offset().top))}o<0&&(o=this.getPreviousBoundary(r));if(o<0||r+i-o>=s){var f=1;t("html").css("zoom")&&(f=parseFloat(t("html").css("zoom"))),o=(r+Math.floor(i/2))*f-Math.floor(s/2)}n.scrollToTopOffset(o,!1)},isEndOfNote:function(){return t(window).scrollTop()+this.viewPort().height>=t(document).height()},isBeginningOfNote:function(){var e=this;return e.targetScrollPosition<0&&t(window).scrollTop()==0},deselectLinkIfNeeded:function(){var e=this;return e.focused?(e.focused.blur(),e.focused=null,!0):!1},switchStyle:function(e){this.themeStyles.applyTheme(e)},enableStyles:function(e){var n=this;t.each(n.styleSheets,function(){var n=this,r=e.indexOf(t(n).attr("title"))==-1;if(n.disabled==r)return;n.disabled=r,t(n).attr("rel",r?"alternate stylesheet":"stylesheet")})},viewPort:function(){return window.encpPlatform.viewPort()},validateAllAnchorLinks:function(e){var t=document.querySelectorAll("a[href], a[data-encp-disabled-link]");Array.prototype.slice.call(t,0).forEach(function(t){var n=!!e(t),r=t.getAttribute("href"),i=!!r&&!!r.length;if(n==i)return;n?(t.setAttribute("href",t.getAttribute("data-encp-disabled-link")),t.removeAttribute("data-encp-disabled-link")):(t.setAttribute("data-encp-disabled-link",t.getAttribute("href")),t.removeAttribute("href"))})},getTextSelection:function(){var e=window.getSelection?window.getSelection():undefined;return e!==undefined&&e.rangeCount>0?e.getRangeAt(0).cloneContents().textContent:undefined},tableItemsCount:function(){return document.querySelectorAll(".encp-table-container").length},checkboxItemsCount:function(){return document.querySelectorAll(".encp-checkbox").length},listItemsCount:function(){return document.getElementsByTagName("li").length},hasHRsToConvert:function(){return c.hasConvertibleHRs(document)},canUseHRsConversion:function(){return this.hasHRsToConvert()&&!this.hasEnabledSectionBreaks()},canPerformAutoLayout:function(){if(this.hasEnabledSectionBreaks()||!this.sectionBreak.findAllBreaks().length)return!1;var e=!!document.querySelector(".encp-note-title"),t=!!document.querySelector(".encp-media-container"),n=!!document.querySelector(".encp-table-container");return e||t||n},isInLayoutEditorMode:function(){return this.layoutEditorController!==null},enableLayoutEditorMode:function(){return this.layoutEditorController||(this.layoutEditorController=new s(this.breakLayout,this.themeStyles)),this.validateAllAnchorLinks(function(){return!1}),this.layoutEditorController},openMediaItem:function(e){this.mediaContents.simulateOpeningMediaItem(e)}},d}),requirejs.config({paths:{Mac:"../Mac/Source",CSS:"../Mac/CSS",Shared:"../Shared/Source",SharedCSS:"../Shared/CSS",text:"../Shared/Source/External/text"}}),require(["Mac/ENCPPlatform","Shared/Utilities/ENCPLogger","Mac/ENCPPresenter"],function(e,t,n){window.encpPlatform=new e,t.outputFunction=window.encpPlatform.showLog.bind(window.encpPlatform),window.encpPresenter=new n,window.encpPresenter.setup(),window.encpPlatform.applicationDidLoad(window.encpPresenter)}),define("PresenterApp",function(){});