// Copyright 2013-2015 Evernote Corp. All rights reserved.
// http://www.evernote.com

window.enLoadState = 'willLoad';
try {(function(){ 'use strict';var q,aa=this;
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==
b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return"array"==ba(a)}function t(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ea(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
function fa(a,b){function c(){}c.prototype=b.prototype;a.Rb=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.bf=function(a,c,f){for(var h=Array(arguments.length-2),g=2;g<arguments.length;g++)h[g-2]=arguments[g];return b.prototype[c].apply(a,h)}};var x,ga,ha;window.CE_VERSION_INFO={lastBuildNumber:13,lastCommitDate:"2015-05-08 14:50:30 -0700"};(function(){function a(a){a=a.toString();var b=a.indexOf(".");return 0>b?a:a.substring(0,b+4)}function b(){}var c;window.evernoteClient&&(c=function(a){window.evernoteClient.log(Array.prototype.slice.call(arguments).join(" "))});if(c)x={log:c,info:c.bind(null,"INFO:"),warn:c.bind(null,"WARN:"),error:c.bind(null,"ERROR:")};else try{x={},x.log=window.console.log.bind(window.console),x.info=window.console.info.bind(window.console),x.warn=window.console.warn.bind(window.console),x.error=window.console.error.bind(window.console),
x.trace=window.console.trace.bind(window.console),x.time=window.console.time.bind(window.console),x.timeEnd=window.console.timeEnd.bind(window.console)}catch(d){x=window.console}x.time||(x.time=b);x.timeEnd||(x.timeEnd=b);x.trace||(x.trace=b);x.dump=function(a){var b=Array.prototype.slice.call(arguments).map(function(a){return t(a)?a:ia(a)});x.log.apply(x,b)};var e={};x.Od=function(a,b){var c={uc:window.performance&&window.performance.now?window.performance.now():(new Date).getTime(),jb:Array.prototype.slice.call(arguments,
1).join(" ")||""};e[a]?e[a].push(c):e[a]=[c]};x.hf=function(a,b){e[a]=[];x.Od.apply(this,arguments)};x.gf=function(b,c){x.Od.apply(this,arguments);for(var d=e[b],m=d[d.length-1].uc-d[0].uc,n=1;n<d.length;n++){var l=d[n].uc-d[n-1].uc;x.log("\u25fc "+b+"."+n+": "+a(l)+"ms ("+Math.round(100*l/m)+"% of "+a(m)+"ms full time)",d[n].jb?"<-":"",d[n].jb)}e[b]=[]};ga=x.warn;ha=x.error}).call(aa);function ka(a){var b=la(arguments);b.unshift("DEPRECATION WARNING:");x.warn.apply(null,b)}
function z(a,b){if(!a){var c="Assertion failed! "+Array.prototype.slice.call(arguments,1).join(" ");x.error(c);throw c;}}function ma(a){try{if(t(a))return na(a);var b=JSON.stringify(a,null,"  ")}catch(c){return a.toString()}return b}
function ia(a){if(a instanceof Text)return"<TextNode:"+ma(a.textContent)+">";if(a instanceof Element)return"<Element:"+a.outerHTML.replace(/^<(.*?)>[\s\S]*$/gi,"$1")+">";if(a instanceof DocumentFragment){var b=document.createElement("div");b.appendChild(a.cloneNode(!0));return"<DocumentFragment:"+b.innerHTML.replace(/^<(.*?)>[\s\S]*$/gi,"$1")+">"}return a instanceof Range?(b=document.createElement("div"),b.appendChild(a.cloneContents()),"<Range:"+ia(a.startContainer)+":"+a.startOffset+","+ia(a.endContainer)+
":"+a.endOffset+(a.collapsed?" collapsed":" not collapsed")+" "+ma(b.innerHTML)+">"):"<"+typeof a+":"+ma(a)+">"}var oa=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;function pa(a){return a instanceof RegExp?a.source:a.replace(oa,"\\$&")}var qa=/[^\x20\x21\x23-\x26\x28-\x5B\x5D-\x7E]/g;function na(a){return"'"+a.replace(qa,function(a){a=a.charCodeAt(0).toString(16);var c=a.length;return 1===c?"\\x0"+a:2===c?"\\x"+a:3===c?"\\u0"+a:"\\u"+a})+"'"}var sa=/([\uD800-\uDBFF])([\uDC00-\uDFFF])/g;
function ta(a){sa.lastIndex=0;return sa.test(a)}var ua=/[\u0001-\u0008\u000E-\u001F\u007F-\u009F\uFDD0-\uFDEF\u000B\uFFFE\uFFFF]|[\x01-\x10][\uFFFE-\uFFFF]/g,va={"&apos;":/&apos;/gi,"&quot;":/&quot;/gi,"&gt;":/&gt;/gi,"&lt;":/&lt;/gi,"&amp;":/&amp;/gi,"&":/&/g,"<":/</g,">":/>/g,'"':/"/g,"'":/'/g};function wa(a){return a.replace(va["&apos;"],"'").replace(va["&quot;"],'"').replace(va["&gt;"],">").replace(va["&lt;"],"<").replace(va["&amp;"],"&")}
function B(a,b){var c;if(a&&b)if(null!=a.length){c=0;for(var d=a.length;c<d&&b.call(a,a[c],c)!==xa;c++);}else"object"===typeof a&&Object.keys(a).every(function(c){return b.call(a,c,a[c])===xa?!1:!0})}var xa={};function ya(a,b,c){if(b)for(var d in b)if(!c||void 0===a[d]){var e=b[d];void 0!==e&&(a[d]=e)}return a}
function C(a,b,c){null==c&&(c=!0);if(null==a||""===a)a={};t(a)&&(a=JSON.parse(a)||{});z(za(a),"Options of wrong type");if(b){z(za(b),"Defaults of wrong type");var d,e=Object.keys(b);for(d in a)a.hasOwnProperty(d)&&!(0<=e.indexOf(d))&&c&&x.warn("Key",ma(d),"not supported! Seen in:",(a||{}).name||"",a);for(d in b)"undefined"===typeof a[d]&&(a[d]=b[d])}return a||{}}function Ba(){var a=navigator.language||navigator.userLanguage||"en";return a=a.split("-")[0]}
function la(a,b){if(!b)return Array.prototype.slice.call(a,0);var c=a.length,d=[],e;if(b)for(e=c-1;0<=e;e--)d.push(a[e]);else for(e=0;e<c;e++)d.push(a[e]);return d}var Ca=/^[\x00-\x20\s]*$/g;function Da(a){return t(a)?(Ca.lastIndex=0,0===a.length||Ca.test(a)):!1}function Ea(a){return!a||Da(a)||ca(a)&&0===a.length||da(a)&&0===Object.keys(a).length}var Fa=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?((?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))))(?::\d{2,5})?(?:\/\S*)?$/gi;
function za(a){return!!a&&"object"===ba(a)}function Ga(a){var b=a.indexOf(">"),c=a.lastIndexOf("<");return 0>b||0>c?a:a.substring(b+1,c)}function Ha(a){var b;if(t(a))b=document.createElement("div"),b.textContent=a;else if(a instanceof Node)b=a.ownerDocument.createElement("div"),b.appendChild(a.cloneNode(!0));else throw"Illegal argument type for en.toHTML";return Ga(b.outerHTML)}function Ia(){return window.ENUniqueCounter++}window.ENUniqueCounter=1;function Ja(a){window.setTimeout(a,0)}
function Ka(a,b){var c;try{c=a()}catch(d){x.error("Exception:",d.toString()),b&&b(d)}return c}function La(){this.U=[];this.bb=[]}La.prototype.has=function(a){return-1!==this.U.indexOf(a)};function Ma(a,b){var c=a.U.indexOf(b);return-1!==c?a.bb[c]:void 0}La.prototype.set=function(a,b){var c=this.U.indexOf(a);-1!==c?this.bb[c]=b:(this.U.push(a),this.bb.push(b))};La.prototype.remove=function(a){a=this.U.indexOf(a);-1!==a&&(this.U.splice(a,1),this.bb.splice(a,1))};
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});function Na(){return!1}function D(){return!0}var Oa=window.onerror;
window.onerror=function(a,b,c){var d=!1;Oa&&(d=Oa(a,b,c));x.error("Uncaught error in JS:",a.toString(),b,c);return d};var Pa="style bgcolor title lang dir text".split(" "),Qa="address article aside body blockquote caption center col colgroup dd details dir div dl dt fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hgroup hr li listing menu nav ol p plaintext pre section summary table tbody td tfoot th thead tr ul xmp".split(" "),Sa="a abbr b bdi bdo cite code dfn em h1 h2 h3 h4 h5 h6 i kbd mark p pre q rp rt ruby s samp small span strong sub sup u var acronym listing strike xmp big blink font marquee nobr tt".split(" "),
Ta="margin-left margin-right font-family font-size font-weight text-align color direction background-color font-style text-decoration vertical-alignment line-height".split(" "),Ua=["0","0px","none","initial"],Va="colgroup table tbody tfoot thead tr".split(" "),Wa=["script","style","plaintext","xmp"],Xa=["embed","object","img"],Ya=Qa.join(",");function Za(){function a(a,b){a.f=C(b,{title:null,id:null})}function b(a){z(t(a)&&a===a.toLowerCase(),"Command name has to be lower case only.");var b=a.lastIndexOf("."),f=[];if(-1===b)(a=c[a])&&(f=a.filter(function(a){return!0!==a.Ua}));else{var h=a.substring(0,b);(a=c[a.substring(b+1)])&&(f=a.filter(function(a){return a.Ia&&-1!==a.Ia.indexOf(h)}))}return f}var c={};this.Re=function(a){z(za(a),"We require command to be an object:",a);var b=a.name;z(t(b)&&1<b.length&&!!b.match(/[a-z]+/gi),"Invalid name for command:",
ma(b));a.action&&z(!!a.enabled,'We require command to have "enabled" state:',a.name);z(!!(a.action||a.value||a.state),'We require command to have one of "action", "value" or "state":',a.name);z(!a.Ia||ca(a.Ia),"We require command groups to be an Array:",a.name);var f=c[b];f||(f=[],c[b]=f);z(ca(f),"Expected list for commands");f.push(a)};this.ge=function(a){if(a&&c)for(var b=Object.keys(c||{}),f=0;f<b.length;f++){var h=b[f],g=c[h];if(g)for(var m=g.length-1;0<=m;m--){var n=g[m];n&&a(n)&&(g.splice(m,
1),0>=g.length?delete c[h]:c[h]=g)}}else c={}};this.action=function(c,e,f){var h=null;Ka(function(){var g=b(c);if(0!=g.length)for(var m=0;m<g.length;m++){var n=g[m];if(n.action&&n&&n.enabled&&!0===n.enabled.call(n,e)){var l={name:n.name,value:e||"",command:n};$a("beforeexeccommand",l);a(n,f);n=n.action.call(n,e||"");h=null===h&&!1===n?!1:!0;l.result=n;$a("execcommand",l)}}else x.warn("execCommand of unknown command:",c,e)},function(a){"complete"!==document.readyState?x.warn("Exception in execCommand <$>:",
a.toString()):x.error("Exception in execCommand <$>:",a.toString())});return h};this.enabled=function(c,e,f){var h=null;Ka(function(){var g=b(c);if(g)for(var m=0;m<g.length;m++){var n=g[m];if(n.enabled){a(n,f);n=n.enabled.call(n,e);if(!0===n){h=!0;break}null===h&&!1===n&&(h=!1)}}else x.warn("queryCommandEnabled of unknown command:",c,e)},function(a){"complete"!==document.readyState?x.warn("Exception in queryCommandEnabled <$>:",a.toString()):x.error("Exception in queryCommandEnabled <$>:",a.toString())});
return h};this.state=function(c,e,f){var h=null;Ka(function(){var g=b(c);if(g)for(var m=0;m<g.length;m++){var n=g[m];if(n.state){a(n,f);if(!0===n.state.call(n,e||"")){h=!0;break}h=!1}}else x.warn("queryCommandState of unknown command:",c,e)},function(a){"complete"!==document.readyState?x.warn("Exception in queryCommandState <$>:",a.toString()):x.error("Exception in queryCommandState <$>:",a.toString())});return h};this.value=function(c,e,f){var h=null;Ka(function(){var g=b(c);if(g)for(var m=0;m<g.length;m++){var n=
g[m];if(n.value){a(n,f);n=n.value.call(n,e);if(null!=n){if(!t(n))try{h=JSON.stringify(n);break}catch(l){}h=n.toString();break}h=""}}else x.warn("queryCommandValue of unknown command:",c,e)},function(a){"complete"!==document.readyState?x.warn("Exception in queryCommandValue <$>:",a.toString()):x.error("Exception in queryCommandValue <$>:",a.toString())});return h}}function ab(a){if(null==a||""==a)return!0;a=a.toString().trim().toLowerCase();return!("false"===a||"0"===a)}
function bb(a){if(za(a))return a;if(t(a)&&0<a.length){if(0===a.indexOf("{"))return JSON.parse(a)||{};ka('Please use a JSON formatted string in the form { "value": "'+a.substring(0,100)+'"}');return{value:a||""}}return{}}function cb(a){var b="";try{var c=a;t(c)&&(c=JSON.parse(c)||{});if(ca(c))return c;if(za(c))return[c]}catch(d){b=d}x.warn("Problems parsing value",a,b.toString());return null};function db(a,b,c){z(!!a,"Missing target to work with");z("function"==typeof b,"Listener must be a function");this.a=b;this.target=a;this.ha={};this.state=1;this.i=!1;this.options=C(c||{},this.b,!1)}function eb(a,b){return a===b?1:Math.abs(a)>=Math.abs(b)?0<a?2:4:0<b?8:16}function fb(a,b){var c=void 0===a.x?["clientX","clientY"]:["x","y"],d=b[c[0]]-a[c[0]],c=b[c[1]]-a[c[1]];return Math.sqrt(d*d+c*c)}
function hb(a,b){var c=void 0===a.x?["clientX","clientY"]:["x","y"];return 180*Math.atan2(b[c[1]]-a[c[1]],b[c[0]]-a[c[0]])/Math.PI}function ib(a){var b=0,c=0,d=a.length;a.forEach(function(a){b+=a.clientX;c+=a.clientY});return{x:Math.round(b/d),y:Math.round(c/d)}}function jb(a){var b=[];a.touches.forEach(function(a){b.push({clientX:Math.round(a.clientX),clientY:Math.round(a.clientY)})});return{timeStamp:Date.now(),touches:b,center:ib(b),deltaX:a.deltaX,deltaY:a.deltaY}}
function kb(a,b){var c=Array.prototype.slice.call(a.targetTouches),d={};if(b&3&&1===c.length)return[c,c];var e=Array.prototype.slice.call(a.changedTouches);c.forEach(function(a){d[a.identifier]=!0});e.forEach(function(a){d[a.identifier]||(d[a.identifier]=!0,c.push(a))});return[c,e]}function lb(a){a.state=this.state;a.preventDefault=function(){a.srcEvent.preventDefault()};a.stopPropagation=function(){a.srcEvent.stopPropagation()};this.e(a);this.a.call(this.target,a)}
var mb={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nb(a){a.preventDefault()}var ob=0;db.prototype.b={};db.prototype.qb=function(){return 1};db.prototype.e=function(){};function pb(a,b){z(!!b,"Payload is missing, check proper flow when tryEmit is being used.");a.options.ed&&a.state&6&&!(a.state&8)?qb(a,!0):a.options.ed&&qb(a,!1);a.state&30&&!b.srcEvent.defaultPrevented&&lb.call(a,b)}
function qb(a,b){a.i&&!b&&0>=--ob?document.body.removeEventListener("touchmove",nb):!a.i&&b&&0<++ob&&document.body.addEventListener("touchmove",nb);a.i=b}function rb(a,b,c){db.call(this,a,b,c);this.m=this.k=0}fa(rb,db);rb.prototype.b={type:"pan",ua:1,ta:10,ed:!0,direction:30};
rb.prototype.qb=function(a){var b=this.state&6,c;if((c=a.touches.length===this.options.ua)&&!(c=this.state&2)&&(c=!(this.state&2))){c=a.direction;var d=a.distance;a.direction&this.options.direction||(this.options.direction&6?(d=a.deltaX,c=0===d?1:0>d?2:4):(d=a.deltaY,c=0===d?1:0>d?8:16),d=Math.abs(d));c=!!(d>this.options.ta&&c&this.options.direction)}if(b&&(a.inputType&8||!c))return this.state|16;if(b||c)return a.inputType&4?this.state|8:this.state&2?this.state|4:(this.k=a.deltaX,this.m=a.deltaY,
2);this.m=this.k=0;return 32};rb.prototype.e=function(a){a.deltaX-=this.k;a.deltaY-=this.m;2===this.state&&(a.isInitial=!0)};function sb(a,b,c){db.call(this,a,b,c)}fa(sb,db);sb.prototype.b={type:"pinch",ua:2,ta:0,ed:!0};sb.prototype.qb=function(a){var b=this.state&6,c=a.touches.length===this.options.ua&&(Math.abs(a.scale-1)>this.options.ta||this.state&2);return b&&(a.inputType&8||!c)?this.state|16:b||c?a.inputType&4?this.state|8:this.state&2?this.state|4:2:32};
sb.prototype.e=function(a){this.state&8&&(a.isFinal=!0)};function tb(a,b,c){db.call(this,a,b,c)}fa(tb,sb);tb.prototype.b={type:"rotate",ua:2,ta:0};function ub(a,b,c){db.call(this,a,b,c)}fa(ub,db);ub.prototype.b={type:"swipe",ta:10,af:.65,direction:30,ua:1};
ub.prototype.qb=function(a){var b=this.options.direction,c=0;b&30?c=a.velocity:b&6?c=a.velocityX:b&24&&(c=a.velocityY);var d=this.state&6,b=a.touches.length===this.options.ua&&a.inputType&4&&a.distance>this.options.ta&&b&a.direction&&Math.abs(c)>this.options.af;return d&&(a.inputType&8||!b)?this.state|16:d||b?a.inputType&4?this.state|8:this.state&2?this.state|4:2:32};function vb(a,b,c){db.call(this,a,b,c);this.Na=null;this.X=void 0;this.ab=0}fa(vb,db);
vb.prototype.b={type:"tap",ua:1,Xe:1,interval:300,time:250,ta:5,offset:10};
vb.prototype.qb=function(a){var b=a.touches.length===this.options.ua&&a.distance<this.options.ta&&a.deltaTime<this.options.time;clearTimeout(this.Na);if(b){var c=this;if(4!=a.inputType)return c.Na=setTimeout(function(){c.state=32;c.X=void 0;c.ab=0},c.options.interval),32;var b=!this.X||a.timeStamp-this.X.timeStamp<this.options.interval,d=!this.X||fb(this.X.center,a.center)<this.options.offset;this.X=a;this.ab=b&&d?this.ab+1:1;this.ab===this.options.Xe&&(this.Na=setTimeout(function(){c.state=8;pb(c,
c.X);c.ab=0;c.X=void 0},this.options.interval))}return 32};vb.prototype.e=function(a){a.count=this.ab};function wb(a,b,c){db.call(this,a,b,c);this.Na=null;this.X=void 0}fa(wb,db);wb.prototype.b={type:"press",ua:1,time:500,ta:5};
wb.prototype.qb=function(a){var b=a.touches.length===this.options.ua&&a.distance<this.options.ta;if(b&&a.inputType&1){var c=this;clearTimeout(this.Na);this.X=a;this.Na=setTimeout(function(){c.state=8;pb(c,c.X)},this.options.time)}else b&&a.inputType&2?this.X=a:(clearTimeout(this.Na),this.X=void 0);return 32};function xb(a,b){return a&&a.classList?a.classList.contains(b):!!(a&&a.className&&(new RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","gi")).test(a.className))}function E(a,b){a&&(a.classList?a.classList.add(b):xb(a,b)||(a.className=((a.className||" ")+" "+b).trim()))}function yb(a,b){a&&(a.classList?a.classList.remove(b):xb(a,b)&&(a.className=a.className.replace(new RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","gi")," ").trim()||""),0===a.className.length&&a.removeAttribute("class"))}
function zb(a,b,c){a&&(null!=c?c?E(a,b):yb(a,b):a.classList?(a.classList.toggle(b),0===a.className.length&&a.removeAttribute("class")):xb(a,b)?yb(a,b):E(a,b))}function Ab(a){return a&&a.parentNode?a.parentNode.removeChild(a):null}function Bb(a){return F(a)?la(a.childNodes):[]}function Cb(a){return F(a)&&a.firstChild?Cb(a.firstChild):a}function Db(a){return F(a)&&a.lastChild?Db(a.lastChild):a}function Eb(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Fb(a,b){var c=a.parentNode;c&&c.replaceChild(b,a);return b}function Gb(a){if(a){for(;a.firstChild;)a.parentNode.insertBefore(a.removeChild(a.firstChild),a);Ab(a)}}function Kb(a,b){for(;a.firstChild;)b.appendChild(a.firstChild)}function Lb(a){for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);return b}function Mb(a,b){Eb(b);for(var c=b.ownerDocument.createDocumentFragment();a.firstChild;)c.appendChild(a.firstChild);b.appendChild(c)}
function Nb(a,b){Kb(a,b);a.appendChild(b)}function Ob(a,b){z(F(a),"<$>");b=b.toLowerCase();if(G(a)===b||!a.parentNode)return a;for(var c=a.ownerDocument.createElement(b),d=0;d<a.attributes.length;d++)c.setAttributeNS(a.attributes[d].namespaceURI,a.attributes[d].name,a.attributes[d].value);z(F(a),"<$>");z(F(c),"<$>");z(!c.hasChildNodes(),"new node has to be empty <$>");a.parentNode.insertBefore(c,a);Kb(a,c);Ab(a);return c}
function Pb(a,b,c,d){a instanceof Document||(a=a.ownerDocument);b=a.createElement(b?b.toString().toLowerCase():"div");if(c)for(var e in c)if(t(e)){var f=c[e];t(f)?b.setAttribute(e,f):x.warn("Provide a string as attribute value",e,f)}if(d)if(t(d))ka("You should not use innerHTML feature of en.node.make due to security concerns!",ia(b),ia(d)),b.innerHTML=d;else if(ca(d))for(c=0;c<d.length;c++)(e=d[c])&&(t(e)?b.appendChild(a.createTextNode(e)):b.appendChild(e));else throw"Unsupported type for opt_inner";
return b}function H(a,b,c){return Pb(document,a,b,c)}function Qb(){return H("div",{},[H("br")])}function Rb(a,b){var c;if(a)if(a.previousSibling)a=a.previousSibling;else return(c=a.parentNode)&&c!==b&&1==c.nodeType?c:null;else a=b||document.ownerDocument.documentElement;for(;c=a.lastChild;)a=c;return a}function Sb(a,b){if(!a){if(!b)return null;a=b}var c=a.firstChild;if(c)return c;for(;a&&a!==b;){if(c=a.nextSibling)return c;a=a.parentNode}return null}function Tb(a){return!(!a||3!==a.nodeType)}
function F(a){return!(!a||!a.nodeType||1!==a.nodeType)}function Ub(a,b){return b&&a?!!(a.compareDocumentPosition(b)&8):!1}function Vb(a,b){return b&&a?!!(a.compareDocumentPosition(b)&16):!1}function Wb(a){return!(!a||!a.isEqualNode(document.documentElement)&&!Ub(a,document.documentElement))}function Xb(a){try{if(a&&(F(a)||(a=a.parentNode),a))return window.getComputedStyle(a)}catch(b){}return null}
function I(a){if(!a)return null;var b=null,c=a.nodeType;if(null!=c){var d=a;1===c?b=d.getBoundingClientRect():(a=document.createRange(),a.selectNode(d))}null==b&&(b=a,d=b.getClientRects(),0<d.length?b=d[0]:Tb(b.endContainer)&&0<b.endContainer.length?(b=b.cloneRange(),b.endOffset=Math.min(b.endOffset+1,b.endContainer.length),b.startOffset=Math.max(b.startOffset-1,0),b=b.getBoundingClientRect()):(d=Yb(b),Tb(d)?(b=b.cloneRange(),a=Math.min(1,d.length),b.setEnd(d,a),b=b.getBoundingClientRect()):(d=H("span"),
null==d.getClientRects&&ha("Failed all fallbacks for getting range bounding box!"),d.appendChild(document.createTextNode("\u200b")),b.insertNode(d),b=d.getClientRects()[0],a=d.parentNode,a.removeChild(d),a.normalize())));d=document.body.scrollLeft;a=document.body.scrollTop;b&&(b={left:b.left+d,right:b.right+d,top:b.top+a,bottom:b.bottom+a,width:b.width,height:b.height});return b}function Zb(a){return(a=Xb(a))&&a.display?"block"===a.display.toLowerCase():!1}
function $b(a){return!(!a||-1===Qa.indexOf(G(a))&&9!==a.nodeType&&11!==a.nodeType)}function G(a){return a&&a.tagName?a.tagName.toLowerCase()||void 0||"":""}function ac(a,b){return a&&a.getAttribute?a.getAttribute(b)||void 0||"":""}function J(a){for(var b=0;a=a.previousSibling;)b++;return b}function M(a){if(!a)return 0;switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}
function N(a,b,c){c||(c=document.body);return a===c?null:O(a,b)?a:(a=a&&a.parentNode)?N(a,b,c):null}function bc(a,b){return N(a.parentNode,$b,b)}function O(a,b){return a&&b?b instanceof Function?b(a):F(a)&&t(b)?a.webkitMatchesSelector(b):!1:!1}function P(a,b){return b?G(a)===b:F(a)}function Q(a){return"br"===G(a)}function cc(a,b){return!0===b?!!N(a,cc):F(a)?"true"===a.contentEditable:!1}function dc(a,b){a.contentEditable=b?"true":"inherit";b||a.removeAttribute("contenteditable")}var ec={};
function fc(a){var b=ec[a];b||(b=new RegExp("(^|;)\\s*("+pa(a)+")\\s*\\:\\s*(.*?)($|;)+","gi"),fc[a]=b);return b}function gc(a){return a&&a.getAttribute?a.a?a.b:a.getAttribute("style"):""}function hc(a){a&&a.getAttribute&&!a.a&&(a.a=!0,a.b=a.getAttribute?a.getAttribute("style"):"")}function ic(a){if(a&&a.a){var b=a.b;"undefined"!==typeof b&&a.getAttribute("style")!==b&&(null===b||0===b.trim().length?a.removeAttribute("style"):a.setAttribute("style",b));delete a.b;delete a.a}}
function jc(a){a&&a.hasAttribute&&a.hasAttribute("style")&&(a.getAttribute("style").trim().length||a.removeAttribute("style"))}function R(a,b){var c=gc(a);if(null==c)return null;c=fc(b).exec(c);return null===c?null:c[3].trim()}function U(a,b){var c=gc(a);if(null==c)return"";c=c.replace(fc(b),"$1").trim();if(a.a)return a.b=c;0<c.length?a.setAttribute("style",c):a.removeAttribute("style");return c||""}
function V(a,b,c){var d=U(a,b);null!=c&&(d=d.trim(),d.length&&";"!==d[d.length-1]&&(d+=";"),d=d+b+":"+c+";",a.a?a.b=d:a.setAttribute("style",d))}function kc(a,b){F(a)&&a.style?(a.style.display=b?"":"none",jc(a)):x.warn("Failed to set visibility on non HTML element",a)}function lc(){var a;a="span";z(t("-evernote-sentoj-emoji")||!0);return a+'[style*="-evernote-sentoj-emoji"]'}function mc(a){a=W(lc(),a,!0);return a=a.filter(function(a){return"true"===R(a,"-evernote-sentoj-emoji")})}
function nc(a){for(var b=[];a&&a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function W(a,b,c){b||(b=document);try{return la(b.querySelectorAll(a),c)}catch(d){throw 0===d.toString().indexOf("Uncaught error in JS: SyntaxError: DOM Exception 12")&&x.error("Wrong syntax in selector:",a),d;}}function X(a,b){return W(a,b,!0)}function oc(a,b,c){for(;a&&(a=Sb(a,c));)if(O(a,b))return a;return null}function pc(a,b,c){for(;a&&(a=Rb(a,c));)if(O(a,b))return a;return null}var qc=/^[\t\n\r ]+$/;
function rc(a){qc.lastIndex=0;return Tb(a)&&(""===a.data||qc.test(a.data))}function sc(a){for(var b;a&&(b=a.firstChild);)a=b;return a}function tc(a,b){var c=H("div",{style:"position: absolute; width: 1px; height: 1px; top: -9999px; left: -9999px;"});c.appendChild(a);document.body.appendChild(c);b(a);Ab(a);Ab(c)}function uc(a,b,c){c=c||document.body;var d;if(!Ub(a,c)){do if(F(a)&&a.hasAttribute("style")&&(d=a.style[b],null!=d))break;while((a=a.parentNode)&&c===a)}return d||""}
function vc(a,b){var c;c=c||document.body;b=b||0;a=a||0;if(0===b)c.scrollTop=a;else{var d=c.scrollTop,e=a-d,f=0,h=function(){f+=20;var a;a=f;a/=b/2;1>a?a=e/2*a*a+d:(a--,a=-e/2*(a*(a-2)-1)+d);c.scrollTop=a;f<b&&window.setTimeout(h,20)};h()}}function wc(a,b){if(!F(a))return!1;var c=window.scrollY,d=c+window.innerHeight;null==b&&(b=55);var e=a.getBoundingClientRect().top+c,f=a.getBoundingClientRect().bottom+c,c=Math.max(c,e),d=Math.min(d,f);return Math.max(0,Math.round((d-c)/(f-e)*100))>=b}var xc=new La;
function yc(a,b){var c=Ma(xc,a);c||(c={},xc.set(a,c));b&&!c.id&&(c.id=Ia().toString());return c}function zc(a,b){var c=a.id||yc(a,!0).id;return b+"@"+c};function Ac(a,b,c,d){var e=document.createRange();void 0!==a&&(e.setStart(a||null,b||0),c?e.setEnd(c||null,d||0):e.setEnd(a||null,b||0));return e}function Bc(a,b){if(a&&(!b||Cc(a,b))&&a){var c=window.getSelection();c.setBaseAndExtent?c.setBaseAndExtent(a.startContainer,a.startOffset,a.endContainer,a.endOffset||0):(c.removeAllRanges(),c.addRange(a))}}function Y(a){var b=window.getSelection();if(1>b.rangeCount)return null;b=b.getRangeAt(0);return a&&b&&!Cc(b,a)?null:b?b.cloneRange():null}
function Dc(a){var b=document.createRange();b.selectNode(a);Bc(b)}function Ec(){window.getSelection().removeAllRanges()}function Cc(a,b){return(a.startContainer===b||Ub(a.startContainer,b))&&(a.endContainer===b||Ub(a.endContainer,b))}function Gc(a){return a?Tb(a.startContainer)?a.startContainer:a.startContainer.childNodes[a.startOffset]||a.startContainer:null}
function Yb(a){return a?Tb(a.endContainer)?a.endContainer:a.endContainer.childNodes[a.endOffset]||a.endContainer.lastChild||a.endContainer:null}function Hc(a,b){return null==a||null==b?!1:a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset?!0:!1}function Ic(a){return a?{startContainer:a.startContainer,startOffset:a.startOffset,endContainer:a.endContainer,endOffset:a.endOffset,collapsed:a.collapsed}:null}
function Jc(a){if(!a)return null;try{var b=Ac(a.startContainer,a.startOffset,a.endContainer,a.endOffset)}catch(c){b=null}return b}
function Kc(a,b){function c(a,b){var c=document.createNodeIterator(d,window.NodeFilter.SHOW_TEXT),k;for(a=Math.max(0,b?a:a-1);0<=a&&(k=c.nextNode());)a-=k.length;return k?{Pa:k,offset:a+k.length+(b?0:1)}:null}var d=b||a.root||document.body,e=a.hasOwnProperty("len")?a.len:a.end-a.start,f=a.start,e=a.hasOwnProperty("end")?a.end:f+e,h=c(f,!0),g=h;f!==e&&(g=c(e,!1));return h&&g?Ac(h.Pa,h.offset,g.Pa,g.offset):null}
function Lc(a,b){if(!a||a.collapsed)return[];for(var c=[],d=a.commonAncestorContainer,e=a.startContainer;e&&a.intersectsNode(e);e=Sb(e,d))b&&!O(e,b)||c.push(e);return c}
function Mc(a){if(null!=a){var b=document.body.scrollTop,c=window.innerHeight,d;d=b+c;var e;e=(e=Nc.env)&&null!=e.editorInset?e.editorInset:{top:0,bottom:0,left:0,right:0};a=I(a);var f=Math.min(24,c/12),h=f/2,g=null;a.bottom+h>d?g=Math.max(0,a.bottom-c+f):a.top-h<b&&(g=Math.max(0,a.top-f));null!=g&&(g!==e.top||0===e.top&&0===g)&&(document.body.scrollTop=g)}}
function Oc(a,b){var c=null;try{var d=a.startContainer,e=9==d.nodeType?d:d.ownerDocument,f=e.createElement("div"),h;f.insertAdjacentHTML?f.insertAdjacentHTML("beforeend",b):f.innerHTML=b;for(c=e.createDocumentFragment();h=f.firstChild;)c.appendChild(h)}catch(g){}return c}function Pc(a,b){var c=N(a,"table,ul,ol",b);if(null!==c)return c;for(;Tb(a);)a=a.parentNode;return a}
function Qc(a,b){var c=Gc(a),d=Yb(a),c=Pc(c,b),d=Pc(d,b);if(c===d)return[c,d];var e=nc(c),f=nc(d);if(e[0]!==f[0])return[c,d];for(var h=0;h<e.length;h++)if(e[h]!==f[h])return[e[h],f[h]];return[c,d]}Range.prototype.createContextualFragment||(Range.prototype.createContextualFragment=function(a){Oc(this,a)});
Range.prototype.compareNode||(x.warn("Range.compareNode has been added by polyfill!"),Range.prototype.compareNode=function(a){var b=a.ownerDocument.createRange();try{b.selectNode(a)}catch(c){b.selectNodeContents(a)}a=1===this.compareBoundaryPoints(Range.START_TO_START,b);b=-1===this.compareBoundaryPoints(Range.RANGE_END_TO_END,b);return a&&!b?0:!a&&b?1:a&&b?2:3});var Rc="click rightclick dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave selectstart wheel keypress keydown keyup blur focus deactivate domfocusin domfocusout change select submit input propertychange dragstart drag dragenter dragover dragleave drop dragend touchstart touchmove touchend touchcancel beforeunload consolemessage contextmenu domcontentloaded error help load losecapture orientationchange readystatechange resize scroll unload hashchange pagehide pageshow popstate copy paste cut beforecopy beforecut beforepaste online offline message connect webkitanimationstart webkitanimationend webkitanimationiteration webkittransitionend pointerdown pointerup pointercancel pointermove pointerover pointerout pointerenter pointerleave gotpointercapture lostpointercapture msgesturechange msgestureend msgesturehold msgesturestart msgesturetap msgotpointercapture msinertiastart mslostpointercapture mspointercancel mspointerdown mspointerenter mspointerhover mspointerleave mspointermove mspointerout mspointerover mspointerup text textinput compositionstart compositionupdate compositionend exit loadabort loadcommit loadredirect loadstart loadstop responsive sizechanged unresponsive visibilitychange storage domsubtreemodified domnodeinserted domnoderemoved domnoderemovedfromdocument domnodeinsertedintodocument domattrmodified domcharacterdatamodified selectionchange abort blur change click copy cut drag drop focus gesturestart gesturechange gestureend pageshow mousemove mousedown mouseup mouseover mouseout orientationchange pagehide pageshow paste reset selection submit touchcancel touchend touchmove touchstart unload pagehide".split(" "),
Sc={},Tc=1,Uc=1,Vc={};function Wc(a){var b=a["en-event-expando"];b||(b=a["en-event-expando"]=Tc++,Sc[b]={});return Sc[b]}function Xc(a){var b=a["en-event-expando"];if(b){delete Sc[b];try{delete a["en-event-expando"]}catch(c){a.removeAttribute&&a.removeAttribute("en-event-expando")}}}
function Yc(a){if(!a||!a.stopPropagation){var b=a||window.event;a={};for(var c in b)a[c]=b[c];a.type=a.type.toLowerCase();a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){a.returnValue=!1;a.isDefaultPrevented=D};a.isDefaultPrevented=Na;a.stopPropagation=function(){a.cancelBubble=!0;a.isPropagationStopped=D};a.isPropagationStopped=Na;a.stopImmediatePropagation=function(){a.isImmediatePropagationStopped=D;a.stopPropagation()};
a.isImmediatePropagationStopped=Na;null!=a.clientX&&(b=document.documentElement,c=document.body,a.pageX=a.clientX+(b&&b.scrollLeft||c&&c.scrollLeft||0)-(b&&b.clientLeft||c&&c.clientLeft||0),a.pageY=a.clientY+(b&&b.scrollTop||c&&c.scrollTop||0)-(b&&b.clientTop||c&&c.clientTop||0));a.which=a.charCode||a.keyCode;null!=a.button&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a}
function Zc(a,b){function c(a){for(var b in a)return!1;return!0}var d=Wc(a);0===d.O[b].length&&(delete d.O[b],document.removeEventListener?a.removeEventListener(b,d.cb,!1):document.detachEvent&&a.detachEvent("on"+b,d.cb));c(d.O)&&(delete d.O,delete d.cb);c(d)&&Xc(a)}
function $c(a,b,c,d){b=b.toLowerCase();var e=Wc(a);e.O||(e.O={});e.O[b]||(e.O[b]=[]);c.qc||(c.qc=Uc++);e.O[b].push(c);e.cb||(e.disabled=!1,e.cb=function(b){if(!e.disabled){b=Yc(b);var c=e.O[b.type];if(c)for(var d=0;d<c.length;d++)c[d].call(a,b)}});1==e.O[b].length&&(a.addEventListener?a.addEventListener(b,e.cb,!0===d):a.attachEvent&&a.attachEvent("on"+b,e.cb))}
function ad(a,b,c){var d=Wc(a);if(d.O)if(b){b=b.toLowerCase();var e=d.O[b];if(e)if(c){if(c.qc)for(d=0;d<e.length;d++)e[d].qc===c.qc&&e.splice(d--,1);Zc(a,b)}else d.O[b]=[],Zc(a,b)}else for(e in d.O)b=e,d.O[b]=[],Zc(a,b)}function bd(a){a.preventDefault();a.stopPropagation();return!1}
function cd(){var a;a="onmouseenter";if(null!=Vc[a])return Vc[a];var b=H({select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"}[a]||"div"),c=a in b;c||(b.setAttribute(a,"return;"),c="function"===typeof b[a]);return Vc[a]=c};var dd={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
function ed(a){var b={};a=String(a);var c="#"==a.charAt(0)?a:"#"+a;if(fd.test(c))return b.eb=gd(c),b.type="hex",b;a:{var d=a.match(hd);if(d){var c=Number(d[1]),e=Number(d[2]),d=Number(d[3]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=d&&255>=d){c=[c,e,d];break a}}c=[]}if(c.length){a=c[0];e=c[1];c=c[2];a=Number(a);e=Number(e);c=Number(c);if(isNaN(a)||0>a||255<a||isNaN(e)||0>e||255<e||isNaN(c)||0>c||255<c)throw Error('"('+a+","+e+","+c+'") is not a valid RGB color');b.eb="#"+id(a.toString(16))+id(e.toString(16))+
id(c.toString(16));b.type="rgb";return b}if(dd&&(c=dd[a.toLowerCase()]))return b.eb=c,b.type="named",b;throw Error(a+" is not a valid color string");}var jd=/#(.)(.)(.)/;function gd(a){if(!fd.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(jd,"#$1$1$2$2$3$3"));return a.toLowerCase()}var fd=/^#(?:[0-9a-f]{3}){1,2}$/i,hd=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function id(a){return 1==a.length?"0"+a:a}
function kd(a){if("currentcolor"===a.toLowerCase())return null;try{var b=ed(a),c;if(b.eb){var d=b.eb,d=gd(d);c="rgb("+[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)].join(", ")+")"}else c=null;return c}catch(e){return null}}function ld(a){try{var b=ed(a);if(b.eb)return b.eb}catch(c){}return null};function md(){function a(a,b){c.va(b).forEach(function(a){c.detach(a)});xc.remove(a)}function b(){for(var b=Object.keys(e),c=0;c<b.length;c++){for(var l=e[b[c]],k=W(l.Se,d),g=0;g<k.length;g++){var h=k[g];if(!l.ld.has(h)){var f={id:yc(h,!0).id};l.ld.set(h,f);l.d(h,f)}}for(var h=[],p=l.ld,g=p.U.length-1;0<=g;g--){var r=p.U[g];if(-1===k.indexOf(r)){f=p.bb[g];l.s(r,f);var A=p,T=g;A.U.splice(T,1);A.bb.splice(T,1);h.push([r,f.id])}}for(g=h.length-1;0<=g;g--)a.apply(this,h[g])}}var c=this;c.name="layer";
var d=null,e={},f={},h=null,g=!1;c.a={};c.a.cover=function(a,b){var c=I(a);b.style.top=c.top+"px";b.style.left=c.left+"px";b.style.width=c.width+"px";b.style.height=c.height+"px"};c.a.anchor=function(a,b){var c=I(a);b.style.top=c.top+"px";b.style.left=c.left+"px"};c.a.bottomRightCorner=function(a,b){var c=I(a),d=window.innerWidth-c.right;b.style.bottom=window.innerHeight-c.bottom+"px";b.style.right=d+"px"};c.a.bottomLeftCorner=function(a,b){var c=I(a);b.style.bottom=window.innerHeight-c.bottom+"px";
b.style.left=c.left+"px"};c.a.bottomRightResizeHandle=function(a,b){var c=I(a),d=window.innerWidth-c.right-11;b.style.bottom=window.innerHeight-c.bottom-13+"px";b.style.right=d+"px"};c.a.bottomLeftResizeHandle=function(a,b){var c=I(a),d=c.left-11;b.style.bottom=window.innerHeight-c.bottom-13+"px";b.style.left=d+"px"};c.a.rightEdge=function(a,b){var c=Math.floor(I(b).width/2),d=I(a),c=window.innerWidth-d.right-c,e=window.innerHeight-d.bottom;b.style.top=d.top+"px";b.style.right=c+"px";b.style.bottom=
e+"px"};c.a.leftEdge=function(a,b){var c=Math.floor(I(b).width/2),d=I(a),c=d.left-c,e=window.innerHeight-d.bottom;b.style.top=d.top+"px";b.style.left=c+"px";b.style.bottom=e+"px"};c.a.tableColumnEdge=function(a,b){c.a.rightEdge(a,b);var d=N(a,"table"),d=window.innerHeight-I(d).bottom;b.style.bottom=d+"px"};c.we=function(a,b){var c=Ia().toString();e[c]={name:c,Se:"table",d:a,s:b||Na,ld:new La}};c.Id=function(){return h};c.e=function(a){return a.getAttribute("data-en-layout-algorithm")};c.va=function(a){var b=
"";if(null==a)b="[data-en-overlay-id]";else if("string"===typeof a)b='[data-en-overlay-id="'+a+'"]';else if(a instanceof Element){a=yc(a).id;if(null==a)return[];b='[data-en-overlay-id="'+a+'"]'}else return[];return W(b,h)};c.getParent=function(a){return(a=f[a])&&a.q||null};c.Gd=function(b){if(b){var d=b.getAttribute("data-en-overlay-id");if(null!=d){var e=c.getParent(d);if(null==e)c.detach(b);else if(Wb(e)){if(d=c.e(b),null!=d&&"undefined"!==typeof c.a[d])c.a[d](e,b)}else a(e,d)}}};c.xa=function(a){!0===
a&&(g=!0);g&&b();a=c.va();for(var d=0;d<a.length;d++)c.Gd(a[d])};c.Tb=function(a,b){var d;b=b||"cover";z("undefined"!==typeof c.a[b],"Invalid layout algorithm:",b);z(F(a),"Expected a node!");var e=yc(a,!0).id;z(!!e&&t(e),"Expected an ID");e in f?++f[e].Vd:f[e]={q:a,Vd:1};d=d||H("div");d.setAttribute("data-en-overlay-id",e);d.setAttribute("data-en-layout-algorithm",b);R(d,"z-index")||V(d,"z-index","900");V(d,"position","absolute");h.appendChild(d);c.a[b](a,d);return d};c.detach=function(a){var b=a.getAttribute("data-en-overlay-id"),
c=f[b];c&&0>=--c.Vd&&delete f[b];Ab(a);return b};c.jc=function(a,b,d,e,g){var h=!0;null==h&&(h=!1);var f=!1,p,r,A,T,u=H("div",{style:"position: fixed;top: 0px;left: 0px;right: 0px;bottom: 0px;z-index: 999;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;-o-user-select: none;user-select: none;"+(null==g?"":g)});c.c.a(a,"mousedown",function(a){f=!0;p=a.pageX;r=a.pageY;A=a.pageX;T=a.pageY;!0===h&&c.Id().appendChild(u);null!=b&&b()});c.c.a(window,"mousemove",function(a){if(!1!==
f){A=a.pageX;T=a.pageY;a=A-p;var b=T-r;null!=d&&d(a,b)}});c.c.a(window,"mouseup",function(a){if(!1!==f){f=!1;A=a.pageX;T=a.pageY;a=A-p;var b=T-r;!0===h&&Ab(u);null!=e&&e(a,b)}})};c.d=function(a){d=C(a,{root:null}).root||c.b("context").root;h=document.querySelector("#en-tools");h||(h=H("div",{"class":"en-tools",id:"en-tools"}),document.body.appendChild(h));z(F(d));z(F(h));c.c.a(window,"resize",c.xa.bind(c,!1));c.c.i("execcommand",c.xa.bind(c,!0));c.c.a(document,"input",c.xa.bind(c,!0));c.xa(!0)};c.s=
function(){c.va().forEach(function(a){c.detach(a)});d=null}};function nd(){function a(a){b(a.target)}function b(a){B(m.va(a),function(a){xb(a,"img-resizer-handle")&&m.detach(a)})}function c(a){O(a.target,"img:not(.en-object-placeholder)")&&d(a.target)}function d(a){if(1!==v.length)W(".img-resizer-handle",m.Id()).forEach(function(a){a=m.getParent(a);b(a)});else{var c=!1;B(m.va(a),function(a){xb(a,"img-resizer-handle")&&(c=!0)});if(!0!==c){var d=n.Hd(a),g=d===a.naturalWidth;if(!(142>=d)){var h=e(a),f="right"===e(a)?"bottomLeftResizeHandle":"bottomRightResizeHandle",
u=m.Tb(a,f);V(u,"z-index","901");E(u,"img-resizer-handle");E(u,f);var K;"bottomRightResizeHandle"===f?K="cursor: nwse-resize;":"bottomLeftResizeHandle"===f&&(K="cursor: nesw-resize;");var S=function(){V(a,"height","auto");var b=I(a);U(a,"width");a.setAttribute("width",b.width)},ja=I(a);m.jc(u,function(){null!=k&&x.warn("Multiple images being resized at once! <$>");k=a;S()},function(b){var c,e=I(l).width;"right"===h?c=ja.width-b:c="center"===h?ja.width+2*b:ja.width+b;142>=c?a.setAttribute("width",
"142"):c>=e||c>=d?(a.removeAttribute("width"),!1===g&&(n.Kd(a),S())):a.setAttribute("width",""+c);m.xa()},function(){k=null;ja=I(a);od(l,"setDirty",{Kb:!0});Dc(a)},K)}}}}function e(a){a=(a=Xb(a))?a.textAlign:null;return"center"===a?"center":"right"===a?"right":"justify"===a?"full":"left"}function f(a){O(a.target,"img:not(.en-object-placeholder)")&&Dc(a.target)}function h(a){!1!==!!a.getAttribute("data-en-img-selected")&&(a.removeAttribute("data-en-img-selected"),B(m.va(a),function(a){xb(a,"img-selected-overlay")&&
m.detach(a)}))}var g=this,m=null,n=null,l=null;g.name="ui-img";var k,v=[];g.d=function(){l=g.b("context").root;E(l,"en-ui-img-on");m=g.b("layer");n=g.b("img");g.c.e(l,"imageSelected",c);g.c.e(l,"imageUnselected",a);g.c.a(l,"click",f);g.c.e(l,"selectionChanged",function(){if(0!==l.getElementsByTagName("img").length){var a=W("img:not(.en-object-placeholder)",l);v=[];if(0!==a.length){var b=window.getSelection();b.isCollapsed||B(a,function(a){b.containsNode(a,!1)&&-1===v.indexOf(a)&&v.push(a)});B(a,function(a){if(!b.isCollapsed&&
b.containsNode(a,!1)){if(!a.getAttribute("data-en-img-selected")){a.setAttribute("data-en-img-selected","true");var c=m.Tb(a);E(c,"img-selected-overlay");var d=H("div",{"class":"img-selected-overlay-top-left-corner"}),e=H("div",{"class":"img-selected-overlay-top-right-corner"}),n=H("div",{"class":"img-selected-overlay-bottom-left-corner"}),g=H("div",{"class":"img-selected-overlay-bottom-right-corner"}),v=H("div",{"class":"img-selected-overlay-right-edge"}),f=H("div",{"class":"img-selected-overlay-left-edge"});
c.appendChild(d);c.appendChild(e);c.appendChild(n);c.appendChild(g);c.appendChild(v);c.appendChild(f)}od(l,"imageSelected",{target:a})}else k!==a&&(h(a),od(l,"imageUnselected",{target:a}))})}}})};g.s=function(){yb(l,"en-ui-img-on");W("img:not(.en-object-placeholder)",l).forEach(function(a){h(a);b(a)});n=m=l=null}};function pd(a,b,c){if("undefined"===typeof c||0===+c)return Math[a](b);b=+b;c=+c;if(isNaN(b)||"number"!==typeof c||0!==c%1)return NaN;b=b.toString().split("e");b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c)));b=b.toString().split("e");return+(b[0]+"e"+(b[1]?+b[1]+c:c))}Math.ga||(Math.ga=function(a,b){return pd("round",a,b||0)});Math.Ee||(Math.Ee=function(a,b){return pd("floor",a,b||0)});Math.Ce||(Math.Ce=function(a,b){return pd("ceil",a,b||0)});var qd=/^(\d*\.?\d*)(px|em|\%|pt)?$/,rd=0,sd=0;
function td(a){var b=null;if("number"===typeof a)b={Za:"px",value:a,La:a.toString(),rc:a||null};else{var c=qd.exec(a);c&&(b={Za:c[2]||"px",value:parseFloat(c[1]),La:c[1],rc:a||null})}return b}function ud(a){a=a||document.body;a=Xb(a);rd=td(a.fontSize).value;z(!!rd,"Did not find base font size",rd,a.fontSize);a=H("div",{style:"height: 100pt; left: -100%; position: absolute; top: -100%; width: 100pt; "});document.body.appendChild(a);sd=a.offsetHeight/100;z(!!sd,"Did not find pt ratio",sd);Ab(a)}
function vd(a,b,c){var d=a||null;if(t(a)){var e=td(a);e?(a=e.value,c=e.Za):a=null}b||(b="px");if(!a)return{Za:b,value:0,La:"0",rc:d,Gb:c};c||(c="px");if(c===b)return a=Math.ga(a),{Za:b,value:a,La:a+b,rc:d,Gb:c};"px"===c&&"px"===b||z(0<rd,"en.unit.init needs to get called first!");"px"===c?"em"===b?a=Math.ga(a/rd):"%"===b?a=Math.ga(100*a/rd):"pt"===b&&(a=Math.ga(a/sd)):"pt"===c?"em"===b?a=Math.ga(a*sd/rd):"%"===b?a=Math.ga(100*a*sd/rd):"px"===b&&(a=Math.ga(a*sd)):"%"===c?"em"===b?a=Math.ga(a/100):
"pt"===b?a=Math.ga(a*rd/(100*sd)):"px"===b&&(a=Math.ga(a*rd/100)):z(!1,"Not implemented yet",c,"=>",b);return{Za:b,value:a,La:a+b,rc:d,Gb:c}}function wd(a){return vd(a).value||0};function xd(a,b){null==a&&(a=document.body);for(var c=a,d=b.length-1;0<=d;d--){var e=b[d];e>M(c)&&(e=M(c)-1);c=c.childNodes[e]}return c}function yd(a,b){var c=[];null==b&&(b=document.body);for(;a&&a.parentNode&&a!==b;){for(var d=0,e=a.parentNode.childNodes,f=0;f<e.length;f++)if(e[f]===a){d=f;break}c.push(d);a=a.parentNode}return c}
function zd(a,b,c){for(var d=[];1==b.nodeType;){var e=b.childNodes[c];if(!e&&!b.lastChild)break;e?(b=e,c=0):(b=b.lastChild,c=M(b))}b=c={q:b,offset:c};if(3==b.q.nodeType)for(c=b.q.previousSibling;c&&3==c.nodeType;c=c.previousSibling)b.offset+=M(c);else c=b.q.previousSibling;e=b.q.parentNode;b.q=c?c.nextSibling:e.firstChild;c=b;for(b=c.q;b&&b.parentNode&&b!==a;){for(var f=e=0,h=b.parentNode.childNodes,g=0;g<h.length;g++){var m=h[g];3!==m.nodeType&&0<f&&(++e,f=0);if(m===b)break;3===m.nodeType?f+=M(m):
++e}d.push(e);b=b.parentNode}return{path:d,offset:c.offset}}function Ad(a,b,c){null==a&&(a=document.body);var d="";b&&(c?(c=zd(a,b.startContainer,b.startOffset),a=zd(a,b.endContainer,b.endOffset),d={startPath:c.path,startOffset:c.offset,endPath:a.path,endOffset:a.offset,collapsed:b.collapsed}):d={startPath:yd(b.startContainer,a),startOffset:b.startOffset,endPath:yd(b.endContainer,a),endOffset:b.endOffset,collapsed:b.collapsed});return JSON.stringify(d)}
function Bd(a,b){null==a&&(a=document.body);if(!b)return null;var c=JSON.parse(b),d;if(c&&c instanceof Object)a:{var e=a;null==e&&(e=document.body);if(void 0===e||!c)throw"All arguments required";try{var f=xd(e,c.startPath),h=xd(e,c.endPath);if(!f||!h){d=null;break a}var g=Ac(f,c.startOffset,h,c.endOffset);c.collapsed&&g.collapse(!0);d=g;break a}catch(m){x.error("Exception <$>",m.toString())}d=null}else d=null;return d}
function Cd(a,b){null==a&&(a=document.body);var c=Y(a);return c?Ad(a,c,b):null}function Dd(a,b){null==a&&(a=document.body);Cd(a);if(b){var c=Bd(a,b);c&&Bc(c)}};function Ed(a){function b(a,b,c){this.he=a;this.De=b;this.title=c||null}z(this instanceof Ed,"Use `new` to instantiate this class");var c=[],d=[],e=a&&a.maxLength||0;this.ra=function(a,h,g){if(a)if(h){if(a=new b(a,h,g),d=[],a.he(),c.push(a),1<e)for(;c.length>e;)c.shift()}else throw"UndoRedo.do missing required parameter 'down'.";else throw"UndoRedo.do missing required parameter 'up'.";};this.register=function(a,h,g){if(a)if(h){if(a=new b(a,h,g),d=[],c.push(a),1<e)for(;c.length>e;)c.shift()}else throw"UndoRedo.do missing required parameter 'down'.";
else throw"UndoRedo.do missing required parameter 'up'.";};this.Aa=function(){return 0<c.length};this.za=function(){return 0<d.length};this.fe=function(){return c&&0!==c.length?c[c.length-1].title:null};this.Ud=function(){return d&&0!==d.length?d[d.length-1].title:null};this.de=function(){var a=c.pop();return a?(a.De(),d.push(a),!0):!1};this.Td=function(){var a=d.pop();return a?(a.he(),c.push(a),!0):!1};this.clear=function(){c=[];d=[]}};function Fd(a,b){z(t(a),"name has to be string",b);z(null==b||za(b),"info has to be empty or dict",a,b);b=b||{};b.version="1.0";window.evernoteClient&&window.evernoteClient.postNotification&&window.evernoteClient.postNotification(a,JSON.stringify(b))}function Gd(a,b){z(!a||t(a),"module has to be string",a,b);z(!b||za(b),"info has to be dict",a,b);b=b||{};b.module=a||"";Fd("contentChanged",b)}
function Hd(a,b){z(!a||t(a),"module has to be string",a,b);z(!b||za(b),"info has to be dict",a,b);b=b||{};b.module=a||"";Fd("focusChanged",b)}function Id(){Fd("contentLoaded",{module:"content"})}function Jd(a){Fd("titleBlur",{module:a||"title"})}function Kd(a,b,c){z(t(a)||1<a.length,"href required",a,b,c);z(!b||t(b),"module has to be string",a,b,c);z(!c||za(c),"info has to be dict",a,b,c);c=c||{};c.href=a;c.module=b||"";Fd("openLink",c)}function Ld(){Fd("contextVisible",{module:"context"})}
function Md(a){Fd("contextExpanded",{module:"context",expanded:!!a})};var Nc={},Nd={},Od=null,Pd=null,Qd=[];function Rd(a){hc(a);-1===Qd.indexOf(a)&&Qd.push(a)}function Sd(){for(var a=0;a<Qd.length;a++)ic(Qd[a]);Qd=[]}function Td(a){z(za(a),"Expected to get an non empty object");Nc=a}function Ud(){var a=Nc.env;return a&&null!=a.selectionColor?a.selectionColor:"rgb(167, 203, 245)"}function $a(a,b){var c=Nd[a];if(c)for(var d=0;d<c.length;d++)(0,c[d][1])(b,a)}function od(a,b,c){$a(zc(a,b),null!=c?c:{target:a})}
function Vd(a,b){var c=Nd[a];if(c&&c.length)for(var d=c.length-1;0<=d;d--)c[d][1]===b&&c.splice(d,1)}var Wd=[];function Xd(a){z(da(a),"Expecting an module object.");Wd.push(a);$a("module",a)};var Yd={tap:vb,press:wb,pan:rb,swipe:ub,rotate:tb,pinch:sb},Zd=["touchstart","touchmove","touchend","touchcancel"],$d=1;
function ae(){function a(a,b){Ka(function(){1===a?Od.ge(function(a){return a.fa===b}):2===a?b[0].removeEventListener(b[1],b[2],b[3]):3===a?ad(b[0],b[1],b[2]):4===a?window.clearTimeout(b):5===a?window.clearInterval(b):7===a?b():8===a?(qb(b[4],!1),Zd.forEach(function(a){b[0].removeEventListener(a,b[2],b[3])})):9===a?Vd(b[0],b[1]):x.error("Unhandled binding cleanup step!",a,b)})}function b(a,b){var c={Pd:++$d,type:a,value:b};return f[c.Pd]=c}var c=this;z(this instanceof ae,"Use `new` to instantiate this class");
var d=!1,e=null,f={};c.m=function(){z(!1,"Not public!");return Object.keys(f)};c.remove=function(b){null!=b&&(a(b.type,b.value),delete f[b.Pd])};c.d=function(a){a=C(a,{name:null});e=a.name;z(0===Object.keys(f).length,"Binding are in an undefined state before setup",e);z(!1===d,"You need to call cleanup first!",e);d=!0};c.s=function(){z(d,"You need to call setup first!");d=!1;for(var b=Object.keys(f).sort(function(a,b){a=+a;b=+b;return a>b?1:a<b?-1:0}),c=b.length-1;0<=c;c--){var n=f[b[c]];a(n.type,
n.value)}f={};e=h=null};var h=null;c.Nb=function(a){h=a};c.b=function(a){z(d,"You need to call setup first!");a.fa=Ia();h&&(a=ya(a,h,!0));Od.Re(a);return b(1,a.fa)};c.a=function(a,c,e,l){z(null!=a,"target is required!");z(d,"You need to call setup first!");z(!l||za(l),"option must be dictionary when used");c=c.toLocaleLowerCase();var k=!!l&&!0===l.df,h=[a,c,e,k];if(-1!==Rc.indexOf(c.toLowerCase()))l=b(2,h),a.addEventListener(c,e,k);else if(Yd[c]){var f=new Yd[c](a,e,l);h[2]=function(a){var b=mb[a.type],
c=kb.call(f,a,b);if(c){a={inputType:b,srcEvent:a,touches:c[0],changedTouches:c[1],target:a.target,type:f.options.type};var c=a.touches.length,d=a.changedTouches.length;a.isInitial=!!(b&1&&0===c-d);a.isFinal=!!(b&12&&0===c-d);a.isInitial&&(f.ha={});f.ha.zd||(f.ha.zd=jb(a));1<a.touches.length&&!f.ha.Pc?f.ha.Pc=jb(a):1===a.touches.length&&(f.ha.Pc=void 0);var c=f.ha.zd,d=(b=f.ha.Pc)?b.center:c.center,m=a.center=ib(a.touches);a.timeStamp=Date.now();a.deltaTime=a.timeStamp-c.timeStamp;a.angle=hb(d,m);
a.distance=fb(d,m);var c=f.ha,d=a.center,m=c.Ne||{},e=c.Oe||{},k=c.Pe||{};if(1===a.inputType||4===k.inputType)e=c.Oe={x:k.deltaX||0,y:k.deltaY||0},m=c.Ne={x:d.x,y:d.y};a.deltaX=e.x+(d.x-m.x);a.deltaY=e.y+(d.y-m.y);a.offsetDirection=eb(a.deltaX,a.deltaY);b?(c=b.touches,d=a.touches,c=fb(d[0],d[1])/fb(c[0],c[1])):c=1;a.scale=c;b?(b=b.touches,c=a.touches,b=hb(c[1],c[0])-hb(b[1],b[0])):b=0;a.rotation=b;b=f.ha;k=b.Le||a;c=a.timeStamp-k.timeStamp;8!=a.inputType&&(25<c||void 0===k.velocity)?(m=k.deltaX-a.deltaX,
k=k.deltaY-a.deltaY,e={x:m/c||0,y:k/c||0},c=e.x,d=e.y,e=Math.abs(e.x)>Math.abs(e.y)?e.x:e.y,m=eb(m,k),b.Le=a):(e=k.velocity,c=k.velocityX,d=k.velocityY,m=k.direction);a.velocity=e;a.velocityX=c;a.velocityY=d;a.direction=m;f.state&56&&(f.state=1);f.state=f.qb(a);pb(f,a);f.ha.Pe=a}};h.push(f);l=b(8,h);Zd.forEach(function(b){a.addEventListener(b,h[2],k)})}else l=b(3,h),$c(a,c,e,k);return l};c.i=function(a,c,d){a:{var e=Nd[a];null==e&&(e=[],Nd[a]=e);d=d||0;for(var k=0;k<e.length;k++)if(d<e[k][0]){e.splice(k,
0,[d,c]);break a}e.push([d,c])}b(9,[a,c])};c.e=function(a,b,d,e){c.i(zc(a,b),d,e)};c.timeout=function(a,m,e){z(d,"You need to call setup first!");e&&c.remove(e);var l=0,l=window.setTimeout(function(){a();for(var b=l,c=f.length-1;0<=c;c--)if(f[c][0]===b){f.splice(c,1);break}},m||0);return b(4,l)};c.k=function(a){b(7,a)}};function be(a){var b=this;b.k=a||{};b.b=null;var c=[],d={};b.load=function(a){return Ka(function(){if(!a)return!1;a.C=!1;z(!(0<=c.indexOf(a)),"Plugin has already been loaded:",a.name);z(!d[a.name],"There is another plugin with the same name!",a.name);c.push(a);a.name&&0<a.name.length&&(d[a.name]=a);a.c=new ae;return!0},function(a){x.error("Exception in PluginManager.load <$>",a.toString())})};b.r=function(a){return d[a]||null};b.e=function(){return c.filter(function(a){return a.C})};b.nc=function(a){if(t(a))return d[a]||
null;for(var b=c.length-1;0<=b;b--){var h=c[b];if(a(h))return h}return null};b.a=function(a){z(null!=d[a],"The plugin",a,"is required here!");return d[a]};b.o=function(a){b.i=a};b.d=function(a,d){return Ka(function(){z(!!a,"Expected a plugin");z(!a.C,"Plugin is already set up:",a.name);0<=c.indexOf(a)||b.load(a);a.c.d({name:a.name||"?"+Ia()});a.sb=b;a.N=function(){a.Wa||(a.Wa=new be(b.k),a.Wa.b=a);return a.Wa};a.ac=b.nc.bind(b);a.b=b.a.bind(b);b.i&&b.i(a);a.d&&a.d(d||{},b.k);a.C=!0;return a},function(a){x.error("Exception in PluginManager.setup <$>",
a.toString())})};b.t=function(a){for(var d=0;d<c.length;d++)b.d(c[d],a)};b.s=function(a){Ka(function(){z(!!a,"Expected a plugin");z(a.C,"Plugin is not yet set up:",a.name);z(0<=c.indexOf(a),"Plugin has not been loaded before:",a.name);a.C=!1;a.Wa&&(a.Wa.b=null,a.Wa.m(),a.Wa=null);a.c.s();a.s&&a.s();delete a.N;delete a.ac;delete a.b;a.sb=null},function(a){x.error("Exception in PluginManager.cleanup <$>",a.toString())})};b.m=function(){for(var a=c.length-1;0<=a;a--){var f=c[a];!0===f.C&&b.s(f)}c=[];
d={}}};function ce(){var a=this;a.name="mutation-observer";a.d=function(b){function c(a){if(a)for(var b=0;b<a.length;b++){var c=a[b],c={type:c.type,target:c.target,addedNodes:la(c.addedNodes),removedNodes:la(c.removedNodes),oldValue:c.oldValue,nextSibling:c.nextSibling,attributeName:c.attributeName,value:"characterData"===c.type?c.target.data:c.target.getAttribute(c.attributeName)};c.target===d&&"class"===c.attributeName||e.push(c)}}var d=C(b,{element:null}).element;z(F(d),"Element!");var e,f=null;a.c.k(function(){f&&
a.g()});a.H=function(){z(null==f,"Observer already running");e=[];var a=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(a){var b=new (window.MutationObserverInit||window.WebKitMutationObserverInit||window.MozMutationObserverInit||Object);b.subtree=!0;b.childList=!0;b.attributes=!0;b.characterData=!0;b.attributeOldValue=!0;b.characterDataOldValue=!0;f=new a(c);f.observe(d,b)}};a.u=function(){return!!f};a.j=function(){z(null!=f,"Observer not running");var a=f.takeRecords();
c(a);return e};a.g=function(){a.j();f.disconnect();f=null;return e};a.T=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];if("childList"===c.type){if(c.addedNodes.length)for(var d=0;d<c.addedNodes.length;d++)x.log("  ",b,"add node",G(c.addedNodes[d])||ma(c.addedNodes[d].textContent),c.addedNodes[d].outerHTML);if(c.removedNodes.length)for(d=0;d<c.removedNodes.length;d++)x.log("  ",b,"remove node",G(c.removedNodes[d])||ma(c.removedNodes[d].textContent),c.removedNodes[d].outerHTML)}else"attributes"===
c.type?null===c.oldValue?x.log("  ",b,"remove attribute",G(c.target),c.attributeName,c.target.outerHTML):x.log("  ",b,"set attribute",G(c.target),c.attributeName,c.target.outerHTML):"characterData"===c.type?x.log("  ",b,"change text",ma(c.oldValue),"to",ma(c.value)):x.error("!!! unknown mutation",c.type)}};a.w=function(a){for(var b=a.length-1;0<=b;b--){var c=a[b];if("childList"===c.type){if(c.addedNodes.length)for(var d=0;d<c.addedNodes.length;d++)c.target.removeChild(c.addedNodes[d]);if(c.removedNodes.length)for(d=
0;d<c.removedNodes.length;d++)c.target.insertBefore(c.removedNodes[d],c.nextSibling)}else"attributes"===c.type?null===c.oldValue?c.target.removeAttribute(c.attributeName):c.target.setAttribute(c.attributeName,c.oldValue):"characterData"===c.type?c.target.data=c.oldValue:x.error("!!! unknown mutation",c.type)}}}};function de(){z(this instanceof de,"Use `new` to instantiate this class");var a=this;a.name="undo";var b=/\s*(id|data\-en\-[a-z0-9\-]+)=".*?"/gi;a.d=function(c){function d(a){return function(){Mb(a.q.cloneNode(!0),h);Dd(h,a.selection);f.ub&&f.ub(a.Bb);m=a}}function e(){var a={q:h.cloneNode(!0),selection:Cd(h)};f.sa&&(a.Bb=f.sa());return a}var f=C(c,{element:null,Eb:"Typing",sa:null,ub:null}),h=f.element;z(!!h&&F(h),'"element" option must be an HTMLElement');var g=new Ed,m=null;a.g=function(){var a;
if(!(a=!m)){a=m;var c=a.Uc;c||(c=a.q.innerHTML,a.Uc=c);var d=h.innerHTML,c=c.replace(b,""),d=d.replace(b,"");a=c!==d?!1:f.sa?f.sa()===a.Bb:!0}return!a};a.flush=function(){if(a.g()){var b=e();g.register(d(b),d(m),f.Eb);return m=b}return null};a.c.a(h,"keydown",function(){m||(m=e())});a.c.a(h,"mouseup",function(){m||(m=e())});a.ra=function(b,c){var n=a.flush()||e();b();var h=e();g.register(d(h),d(n),c);m=h};a.clear=function(){g.clear();m=null;window.TEST&&(m||(m=e()))};var n=a.sb.b;a.Aa=function(){return g.Aa()||
a.g()};a.za=function(){return g.za()&&!a.g()};a.c.b({name:"undo",action:function(){a.flush();g.de()&&od(h,"setDirty");return!0},state:function(){return a.Aa()},value:function(){return a.g()?f.Eb:g.fe()},enabled:function(){return n.hasFocus&&n.hasFocus()&&a.Aa()}});a.c.b({name:"redo",action:function(){g.Td()&&od(h,"setDirty");return!0},state:function(){return a.za()},value:function(){return g.Ud()},enabled:function(){return n.hasFocus&&n.hasFocus()&&a.za()}});a.c.b({name:"clearundo",action:function(){g.clear();
return!0},enabled:D})}};function ee(){z(this instanceof ee,"Use `new` to instantiate this class");var a=this;a.name="undo";var b=[],c=[];a.d=function(d){function e(a){return function(){l.w(a.Jb);Dd(m,a.selection);g.ub&&g.ub(a.Bb)}}function f(a){!0!==a&&n||(n=h(),l.H())}function h(){var a={Jb:[],selection:Cd(m)};g.sa&&(a.Bb=g.sa());return a}var g=C(d,{element:null,Eb:"Typing",sa:null,ub:null},!0),m=g.element;z(!!m&&F(m),'"element" option must be an HTMLElement');var n=null,l=new ce;a.N().d(l,{element:m});a.g=function(){return n?
0<l.j().length?!0:g.sa?g.sa()!==n.Bb:!1:!1};a.flush=function(){if(a.g()&&n){n.Jb=l.g();var d=e(n),m=g.Eb;c=[];b.push({Ta:d,title:m});n=null}f();return n};a.c.a(m,"keydown",function(){f()});a.c.a(m,"mousedown",function(){f()});a.ra=function(d,m){a.flush();n=h();d();n.Jb=l.g();var k=e(n);c=[];b.push({Ta:k,title:m});f(!0)};a.clear=function(){l.u()&&(l.g(),n=null);b=[];c=[];window.TEST&&f()};var k=a.sb.b;a.Aa=function(){return 0<b.length||a.g()};a.za=function(){return 0<c.length&&!a.g()};a.c.b({name:"undo",
action:function(){a.flush();var d=b.pop();return d?(n=h(),d.Ta(),n.Jb=l.g(),c.push({Ta:e(n),title:d.title}),f(!0),od(m,"setDirty"),!0):!1},state:function(){return a.Aa()},value:function(){return a.g()?g.Eb:b&&0!==b.length?b[b.length-1].title:null},enabled:function(){return k.hasFocus&&k.hasFocus()&&a.Aa()}});a.c.b({name:"redo",action:function(){var d=c.pop();return d?(a.flush(),n=h(),d.Ta(),n.Jb=l.g(),b.push({Ta:e(n),title:d.title}),f(!0),od(m,"setDirty"),!0):!1},state:function(){return a.za()},value:function(){return c&&
0!==c.length?c[c.length-1].title:null},enabled:function(){return k.hasFocus&&k.hasFocus()&&a.za()}});a.c.b({name:"clearundo",action:function(){a.clear();return!0},enabled:D})}};function fe(){function a(a){var h=bb(a);a=!1;var g=h.visible;null!=g&&(kc(c,!!g),a=!0);g=h.active;null!=g&&(E(c,g?"en-shared-on":"en-shared-off"),yb(c,g?"en-shared-off":"en-shared-on"),a=!0);g=h.business;null!=g&&(kc(e,!!g),a=!0);h=h.value;t(h)&&(d.innerHTML=h,X("a",d).forEach(function(a){var c=a.getAttribute("href");a.removeAttribute("href");E(a,"en-shared-link");a=Ob(a,"span");a.onclick=function(){var d=I(a);Kd(c,b.name,{left:d.left,top:d.top,width:d.width,height:d.height});return!1}}),a=!0);return a}
var b=this;this.name="shared";z(this instanceof fe,"Use `new` to instantiate this class");var c=null,d=null,e=null;this.d=function(b){var h=document.querySelector(".en-note-container");d=H("div",{"class":"en-shared-message"});e=H("div",{"class":"en-shared-business",style:"display:none;"});c=H("div",{"class":"en-shared en-shared-off",id:"en-shared",style:"display:none;"},[e,d]);h.insertBefore(c,h.firstChild);a(b);this.c.b({name:"shared",action:a,enabled:D})};this.s=function(){e=d=null;Ab(c);c=null}}
;function ge(){function a(a){if(!(null==a||t(a)&&""===a||da(a)&&0===Object.keys(a).length)){var n=bb(a);a=n.visible;var v=n.expanded,y=n.hideIndicatorLabelWhenExpanded,p=n.hideIndicatorLabelWhenCollapsed,w=n.chatButtonLabel||"Chat",ja=n.shareButtonLabel||"Share",Aa=n.items,gb=n.contextSectionLabel,L=n.firstLaunchInfo;null!=a&&kc(k,!!a);if(Aa&&!(0>=Aa.length)){Eb(k);var ra=H("div",{"class":"en-context-label"});ra.textContent=gb||"Context";k.appendChild(ra);gb=H("div",{"class":v?"en-context-hide-label":
"en-context-show-label"});k.appendChild(gb);if(null!=L&&null!=L.headline&&null!=L.subHeadline&&null!=L.learnMoreLinkLabel&&null!=L.dismissButtonLabel){var Hb=L.headline,Ib=L.subHeadline,ra=L.learnMoreLinkLabel,L=L.dismissButtonLabel,Jb=H("div",{"class":"en-context-fle-container"});k.appendChild(Jb);var Ra=H("div",{"class":"en-context-fle-header"});Ra.textContent=Hb;Jb.appendChild(Ra);Hb=H("div",{"class":"en-context-fle-body"});Jb.appendChild(Hb);Ra=H("span",{"class":"en-context-fle-subheader"});Ra.textContent=
Ib+" ";Hb.appendChild(Ra);Ib=H("span",{"class":"en-context-fle-learn-more"});Ib.textContent=ra;Hb.appendChild(Ib);m.c.a(Ib,"click",function(a){Kd("learnMore",m.name,{kind:"firstLaunch",sharing:!1});bd(a)});ra=H("div",{"class":"en-context-fle-dismiss-button"});ra.textContent=L;Jb.appendChild(ra);m.c.a(ra,"click",function(a){Kd("dismiss",m.name,{kind:"firstLaunch",sharing:!1});Ab(Jb);a.stopPropagation()})}ra=H("div",{"class":"en-context-card-holder"});k.appendChild(ra);for(L=0;L<Aa.length;L++)ra.appendChild(g(Aa[L],
ja,w));V(k,"max-height",139*l.maxRows+32+"px");v?e(gb,y):f(gb,p);d(gb,y,p);b();m.c.timeout(b,250);h(!0);!0===a&&!0===v&&0<Aa.length&&m.c.timeout(function(){c(n)},1500)}}}function b(){var a;var b=document.querySelector(".en-context-card-holder");a=document.querySelectorAll(".en-context-item").length||0;var c=document.querySelector(".en-context-item");if(null==b||null==c)a=null;else{var b=Math.round(I(b).width),d=Xb(c),m=Math.round(c.offsetWidth+(parseInt(d["margin-left"],10)+parseInt(d["margin-right"],
10)));a={ye:b,Me:a,Ae:m,ef:Math.round(c.offsetHeight+(parseInt(d["margin-top"],10)+parseInt(d["margin-bottom"],10))),Be:Math.floor(b/m)}}c=document.querySelector(".en-context-card-holder");null!=a&&null!=c&&(b=Math.min(a.Me,a.Be),0>=b?V(c,"left","0px"):V(c,"left",(a.ye-a.Ae*b)/2+"px"))}function c(a){if(!0!==w&&!1!==l.showPopup&&null==v&&null!=k&&null!=a&&null!=a.items&&0!==a.items.length){var b=a.items,c=a.toastNotificationHeaderLabel||"FIX HEADER";a=a.toastNotificationFooterLabel||"FIX FOOTER";var d=
wa(b[0].title||"Untitled"),e=H("div",{"class":"en-context-popup-header"});e.textContent=c;c="en-context-popup-body";null!=b[0].kind&&(c+=" "+b[0].kind);b=H("div",{"class":c});b.textContent=d;d=H("div",{"class":"en-context-popup-footer"});d.textContent=a;d.appendChild(H("div",{"class":"en-context-popup-down-arrow"}));v=H("div",{"class":"en-context-popup"},[H("div",{"class":"en-context-popup-wrapper"},[e,b,d])]);k.parentNode.insertBefore(v,k.nextSibling);m.c.timeout(function(){E(v,"en-context-popup-visible")},
1);m.c.a(v,"mousedown",function(){m.c.remove(y)});m.c.a(v,"mouseup",function(){var a=I(k);vc(a.top-15,240);yb(v,"en-context-popup-visible");V(v,"pointer-events","none")});y=m.c.timeout(function(){yb(v,"en-context-popup-visible");V(v,"pointer-events","none");m.c.timeout(function(){kc(v,!1)},250)},5500,y)}}function d(a,b,c){m.c.a(a,"click",function(){a.textContent===b?(f(a,c),Md(!1)):a.textContent===c&&(e(a,b),Md(!0));h(!0)})}function e(a,b){var c=W(".en-context-card-holder",k),d=W(".en-context-fle-container",
k);1!==c.length?x.error("Couldnt find card holder?!"):(c=c[0],a.textContent=b,yb(a,"en-context-show-label"),E(a,"en-context-hide-label"),kc(c,!0),null!=d&&1===d.length&&kc(d[0],!0))}function f(a,b){var c=W(".en-context-card-holder",k),d=W(".en-context-fle-container",k);1!==c.length?x.error("Couldnt find card holder?!"):(c=c[0],a.textContent=b,yb(a,"en-context-hide-label"),E(a,"en-context-show-label"),kc(c,!1),null!=d&&1===d.length&&kc(d[0],!1))}function h(a){function b(){var a=k.querySelector(".en-context-item");
null!=a&&wc(a,100)&&!1===w&&(w=!0,Ld())}null==a&&(a=!1);a?b():p=m.c.timeout(b,100,p)}function g(a,b,c){var d=a.link||"#",k=a.kind||"undefined",e=document.createTextNode(wa(a.text||"")),l=a.thumbnail||"",g=""!==l,h=wa(a.title||"Untitled"),v=a.sourceName||"",f=a.sourceId||"",y=a.date||"",p=a.author||"";a=a.canShare;var w=H("div",{"class":g?"en-context-item-title":"en-context-item-title en-context-wide",href:d,name:k});w.textContent=h;h=H("span",{"class":"en-context-author"});""!==p&&(h.textContent=
p);var Ra=H("span",{"class":"en-context-separator"});Ra.textContent="|";var Fc=H("span",{"class":"note"===k?"en-context-note-date":"en-context-news-date"});""!==y&&(Fc.textContent=y);d=[];"news"===k?""!==y?(d.push(Fc),""!==p&&(d.push(Ra),d.push(h))):""!==p&&d.push(h):(""!==y&&d.push(Fc),d.push(e));e="en-context-item-body";g||(e+=" en-context-wide");"news"===k?e+=" en-context-item-body-one":"note"===k&&"evernote.business"===f?e+=" en-context-item-body-two":"people"===k&&(e+=" en-context-body-italics");
y=H("div",{"class":e},d);e=H("div",{"class":"en-context-graphic-clipper"});d="en-context-graphic";a&&(d+=" en-context-graphic-blur");l=H("img",{"class":d,alt:"graphic",src:l});d="en-context-graphic-hover";g||(d+=" en-context-graphic-hover-solid");b=H("div",{"class":d},[H("div",{"class":"en-context-workchat"}),H("div",{"class":"en-context-share-text"},["people"===k?c:b])]);g&&e.appendChild(l);a&&(e.appendChild(b),m.c.a(e,"click",function(a){Kd(w.getAttribute("href"),m.name,{kind:w.getAttribute("name"),
sharing:!0});a.stopPropagation()}));g=f;"dowjones.wsj"===g&&(g="wsj");"profile.linkedin"===g&&(g="linkedin");if("profile.evernote.business"===g||"evernote.business"===g)g="evernote-business";"profile.factiva"===g&&(g="factiva");c="";if("profile.evernote.business"===f||"evernote.business"===f)c="en-context-source-text-blue";b=H("div",{"class":"en-context-source-img "+g});c=H("div",{"class":"en-context-source-text "+c});c.textContent="dowjones.wsj"===f?"":"evernote.business"===f?p:v;v=H("div",{"class":"en-context-source"});
-1!==n.indexOf(g)&&v.appendChild(b);v.appendChild(c);p=[w,y];p.push(e);("news"===k||"people"===k||"company"===k||"note"===k&&"evernote.business"===f)&&p.push(v);k=H("div",{"class":"en-context-item"},p);m.c.a(k,"click",function(a){Kd(w.getAttribute("href"),m.name,{kind:w.getAttribute("name"),sharing:!1});a.preventDefault()});return k}var m=this;this.name="context";z(this instanceof ge,"Use new for this");var n="factiva fastcompany inc lifehacker linkedin pandodaily techcrunch theverge evernote-business wsj forbes nikkei".split(" "),
l,k=null,v=null,y,w=!1,p;this.d=function(c){var d=document.querySelector(".en-note-container");k=H("div",{"class":"en-context",id:"en-context",style:"display:none;"});null!=d?(d.parentNode.insertBefore(k,d.nextSibling),m.c.a(window,"scroll",h),m.c.a(window,"resize",h),h(!0),m.c.a(window,"resize",b),l=C(c,{showPopup:!0,maxRows:9999},!1),this.c.b({name:"context",action:a,enabled:D})):x.error("Couldnt find note container! Bailing.")};this.s=function(){Ab(k);Ab(v);y=0;k=null;w=!1}};function he(){function a(a){if(!(null==a||t(a)&&""===a||da(a)&&0===Object.keys(a).length)){var k=bb(a),m=k.expanded;null==m&&(m=!1);var n=k.headline||"Get more Context with Premium",w=k.subHeadline||"Go Premium to view notes, articles, and people related to what you're working on.";a=k.goPremiumLabel||"Go Premium";var p=k.hideIndicatorLabelWhenExpanded||"Hide",k=k.hideIndicatorLabelWhenCollapsed||"Show";Eb(h);kc(h,!0);g=H("div",{"class":"en-context-upsell-body"});h.appendChild(g);var r=H("div",{"class":m?
"en-context-upsell-hide-label":"en-context-upsell-show-label"});h.appendChild(r);m?c(r,p):d(r,k);b(r,p,k);m=H("div",{"class":"en-context-upsell-headline"});m.textContent=n;g.appendChild(m);n=H("div",{"class":"en-context-upsell-subheadline"});n.textContent=w;g.appendChild(n);w=H("div",{"class":"en-context-upsell-go-premium"});w.textContent=a;g.appendChild(w);f.c.a(w,"click",function(a){Kd("http://evernote.com","context",{kind:"upsell",sharing:!0});bd(a)});e(!0)}}function b(a,b,m){f.c.a(a,"click",function(){a.textContent===
b?(d(a,m),Md(!1)):a.textContent===m&&(c(a,b),Md(!0));e(!0)})}function c(a,b){null!=g&&(a.textContent=b,yb(a,"en-context-upsell-show-label"),E(a,"en-context-upsell-hide-label"),kc(g,!0))}function d(a,b){null!=g&&(a.textContent=b,yb(a,"en-context-upsell-hide-label"),E(a,"en-context-upsell-show-label"),kc(g,!1))}function e(a){function b(){wc(h,75)&&!1===m&&(m=!0,Ld())}null==a&&(a=!1);a?b():n=f.c.timeout(b,100,n)}var f=this;this.name="context-upsell";z(this instanceof he,'Use "new" to create the Context Upsell Plugin');
var h=null,g=null,m=!1,n;this.d=function(b){var c=document.querySelector(".en-note-container");h=H("div",{"class":"en-context-upsell",id:"en-context-upsell",style:"display:none;"});null!=c?(c.parentNode.insertBefore(h,c.nextSibling),f.c.a(window,"scroll",e),f.c.a(window,"resize",e),e(!0),a(b),this.c.b({name:"context-upsell",action:a,enabled:D})):x.error("Couldnt find note container! Bailing.")};this.s=function(){Ab(h);g=h=null;m=!1}};function ie(){function a(a){a=bb(a);a=c(a.value,+a.limit||d);return JSON.stringify(a)}function b(a){c(a);return!0}function c(a,b){if(0>=a.length)return null;b||(b=d);var c=b,m=[a.trim()].map(pa).join("|"),n=new RegExp(m,"gi"),l=[],k=!1;W(e).forEach(function(a){for(var c=a.textContent,d;(d=n.exec(c))&&0<d.length;){var m=d.index,e=n.lastIndex,m={string:c.slice(m,e),length:e-m,from:m,to:e};var e=m,g=a,f={start:e.from,end:e.to},u=Kc(f,g);if(u){var K=u.getBoundingClientRect();K.height>wd(Xb(Gc(u)).lineHeight)&&
(u=Kc({start:e.from,ff:1},g),g=u.getBoundingClientRect(),K={left:g.left,right:K.right,top:g.top,bottom:g.bottom});g=document.body;e.to=f.end;e.top=K.top+g.scrollTop;e.bottom=K.bottom+g.scrollTop;e.left=K.left+g.scrollLeft;e.right=K.right+g.scrollLeft;e.width=K.right-K.left;e.height=K.bottom-K.top}else e=null;if(null!=e){if(0>=b--){k=!0;break}l.push(m)}}});return{limit:c,hasMore:k,count:l.length,items:l}}this.name="find";z(this instanceof ie,"Use `new` to instantiate this class");var d,e;this.d=function(c){d=
0<+c.limit?+c.limit:100;e=t(c.selector)?c.selector:"#en-note";this.c.b({name:"find",action:b,value:a,enabled:D})}};function je(){function a(a,b){z(!0===a.qa,"Only commands supported due to optimizations");a.qa=a.qa||!0;a.shiftKey=!!a.shiftKey;a.which=a.charCode||a.key.charCodeAt(0);a.Ta=b;n.push(a)}function b(a){var b=l[a.keyCode];return b?b(a)?bd(a):!0:!0}function c(a){a=h(a);return 2===a?Z.execCommand("deleteword"):4===a?Z.execCommand("deleteline"):Z.execCommand("delete")}function d(a){a=h(a);return 2===a?Z.execCommand("forwarddeleteword"):4===a?Z.execCommand("forwarddeleteline"):Z.execCommand("forwarddelete")}
function e(a){var b=!1;a=h(a);0===a?b=Z.execCommand("insertparagraph"):1===a?b=Z.execCommand("insertlinebreak"):2===a?b=Z.execCommand("inserttodo","toggle"):4!==a&&6!==a&&(b=!0);return b}function f(a){var b=!1;a=h(a);0===a?b=Z.execCommand("tab",""):1===a&&(b=Z.execCommand("tab","true"));return b}function h(a){return(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0)}function g(a){if(a.ctrlKey||a.metaKey)for(var b=n.length-1;0<=b;b--){var c=n[b];if(c.qa===(a.ctrlKey||a.metaKey)&&a.which===
c.which&&a.shiftKey===c.shiftKey)return c.Ta.call(null),a.preventDefault(),!1}return!0}var m=this;z(this instanceof je,"Use `new` to instantiate this class");m.name="keyboard";var n=[],l={};m.d=function(k){k=C(k,{shortcuts:!0,editing:!0,custom:null,root:null});var h=k.root||document.body;k.shortcuts&&(a({key:"z",qa:!0},Z.execCommand.bind(Z,"undo")),a({key:"z",qa:!0,shiftKey:!0},Z.execCommand.bind(Z,"redo")),a({key:"y",qa:!0},Z.execCommand.bind(Z,"redo")),a({key:"b",qa:!0},Z.execCommand.bind(Z,"bold")),
a({key:"i",qa:!0},Z.execCommand.bind(Z,"italic")),a({key:"u",qa:!0},Z.execCommand.bind(Z,"underline")));k.editing&&(l[9]=f,l[13]=e,l[46]=d,l[8]=c,m.c.a(h,"keydown",b));if(k.custom){var y=k.custom;z(ca(k.custom),"Expected an Array for custom keyboard definitions");for(k=0;k<y.length;k++){var w=y[k],p=w.key,w=w.fn;z(t(p)&&"function"==ba(w),'Expected "key" and "fn"');a({key:p,qa:!0,shiftKey:p.toUpperCase()===p},w)}}n&&m.c.a(h,"keypress",g)};m.s=function(){n=[]}};function ke(){var a=this;a.name="context";a.d=function(b){function c(){var b=a.a();m&&b&&m.startContainer===b.startContainer&&m.endContainer===b.endContainer&&m.startOffset===b.startOffset&&m.endOffset===b.endOffset||(h={},g={},m=b?b.cloneRange():null)}var d=b.root;z(F(d),"We expect a valid root element",d);a.root=d;var e=b.Rd||Y(a.root)||null,f=!1;a.K={};a.i=function(b){return a.K[b]||{}};var h={},g={},m=null,n=null;a.qe=function(){return!(!Object.keys(h).length&&!Object.keys(g).length)};a.dc=function(a){c();
return h[a]};a.le=function(a,b){c();h[a]=b};a.nd=function(a){c();delete h[a]};a.ec=function(a){c();return g[a]};a.md=function(a,b){c();g[a]=b;"backcolor"===a?g.ze=b:"highlight"===a&&(g.Ke=b)};a.xe=function(a){c();delete g[a];"backcolor"===a?delete g.ze:"highlight"===a&&delete g.Ke};a.Ge=function(){return n};a.We=function(a){n=a};a.$e=function(){n=null};a.a=function(){return e};a.Xa=function(a){e=a||null;f=!0};a.Qc=function(a,b){e.setStart(a,b);f=!0};a.Nc=function(a,b){e.setEnd(a,b);f=!0};a.R=function(){e=
Y(d)||null;f=!1};a.ue=function(){a.ja()};a.ja=function(){f&&(Bc(e,d),a.R())};a.ke=function(a){e||(e=d.ownerDocument.createRange());e.selectNode(a);f=!0};a.e=function(a,b,c,m){e||(e=d.ownerDocument.createRange());e.setStart(a,b);c?e.setEnd(c,m||0):e.setEnd(a,b);f=!0};a.o=function(b,c,d){c&&-1===d&&(d=c.childNodes.length);var m=b.parentNode,n=J(b);z(!!e,"Global range expected");for(var l=[[e.startContainer,e.startOffset],[e.endContainer,e.endOffset]],g=l.length,h=0;h<g;h++){var f=l[h];f[0]===c&&f[1]>
d&&f[1]++;f[0]!==m||f[1]!==n&&f[1]!==n+1||(c?(f[0]=c,f[1]+=d-n):f[1]>n&&0<f[1]&&--f[1]);f[0]===m&&f[1]>n+1&&f[1]--;!c&&Ub(f[0],b)&&(f[0]=b.parentNode,f[1]=J(b))}c?c.childNodes.length===d?c.appendChild(b):c.insertBefore(b,c.childNodes[d]):Ab(b);a.e(l[0][0],l[0][1],l[1][0],l[1][1])};a.Xd=function(b,c,d){z(b!==c,"Do not move into itself");for(var e;e=b.firstChild;)a.o(e,c,0>d?-1:d++)};a.insertBefore=function(b,c,d){a.o(b,c,d?J(d):-1)};a.fb=function(b,c){a.o(b,c,-1)};a.removeNode=function(b){a.o(b)};
a.je=function(b){for(;b.firstChild;)a.removeNode(b.firstChild)};a.S=function(b,c){if(b&&b.tagName.toLowerCase()===c.toLocaleLowerCase())return b;var d=b.parentNode;if(!d)return b;for(var e=H(c),m=0;m<b.attributes.length;m++)e.setAttributeNS(b.attributes[m].namespaceURI,b.attributes[m].name,b.attributes[m].value);a.o(e,d,J(b));a.Xd(b,e,0);a.removeNode(b);return e};a.hasFocus=function(){return cc(d)&&!!Y(d)};var l=!1;a.Yd=function(a){l=!0===a};a.Ja=function(){return l};a.dump=function(){var b;if(b=
a.a()){var c=Ad(d,b);b=d.cloneNode(!0);if(c=Bd(b,c)){if(c.startContainer.nodeType==Node.TEXT_NODE||c.startContainer.nodeType==Node.COMMENT_NODE)c.collapsed?c.startContainer.insertData(c.startOffset,"[]"):c.startContainer.insertData(c.startOffset,"[");else{var e=c.collapsed?"{}":"{";c.startOffset!=c.startContainer.childNodes.length&&c.startContainer.childNodes[c.startOffset].nodeType==Node.TEXT_NODE?c.startContainer.childNodes[c.startOffset].insertData(0,e):0!=c.startOffset&&c.startContainer.childNodes[c.startOffset-
1].nodeType==Node.TEXT_NODE?c.startContainer.childNodes[c.startOffset-1].appendData(e):c.startContainer.insertBefore(document.createTextNode(e),c.startContainer.childNodes.length==c.startOffset?null:c.startContainer.childNodes[c.startOffset])}c.collapsed||(c.endContainer.nodeType==Node.TEXT_NODE||c.endContainer.nodeType==Node.COMMENT_NODE?c.endContainer.insertData(c.endOffset,"]"):c.endOffset!=c.endContainer.childNodes.length&&c.endContainer.childNodes[c.endOffset].nodeType==Node.TEXT_NODE?c.endContainer.childNodes[c.endOffset].insertData(0,
"}"):0!=c.endOffset&&c.endContainer.childNodes[c.endOffset-1].nodeType==Node.TEXT_NODE?c.endContainer.childNodes[c.endOffset-1].appendData("}"):c.endContainer.insertBefore(document.createTextNode("}"),c.endContainer.childNodes.length==c.endOffset?null:c.endContainer.childNodes[c.endOffset]))}b=b.innerHTML}else b=d.innerHTML;return b}};a.s=function(){a.root=null}};function le(){var a=this,b=this;b.name="block";b.d=function(){var c=b.b("context"),d=b.b("query"),e=b.b("format"),f=c.root;a.Ea=function(a){if((a=d.A(a))&&(d.h(a)||d.na(a)))if(d.Zb(a)){var b=a.getElementsByTagName("object");if(0<b.length){var e=!1,b=b[b.length-1];oc(b.lastChild||b,function(a){return e=Q(a)||d.D(a)},a);e||c.fb(H("br"),a)}}else c.je(a),d.vb(a)?c.fb(Qb(),a):c.fb(H("br"),a)};a.Q=function(b){if(d.h(b))if(d.Fa(b).every(function(a){return!d.t(b,a)||!d.B(b,a)})){var g=G(b);"dd"===g||"dt"===
g?e.oa([b],function(a){return P(a,"dl")&&!a.attributes.length},function(){return H("dl")}):d.B("p",d.Xb(b))&&d.rb(b)&&("div"!==g&&(b=c.S(b,"div"),a.Q(b)),la(b.childNodes).filter(d.rb).forEach(function(b){var c=e.L([b]);a.M([b]);e.G(c)}))}else if(!d.B(b,b.parentNode)){for(g=e.L([b]);!d.B(b,b.parentNode);)a.M([b]);e.G(g)}};a.Ga=function(a){if(P(a,"li")&&d.h(a)&&d.h(a.parentNode)){for(var b=function(a){return O(a,"ol,ul")},e=!1,n=null;la(a.childNodes).some(b);){var l=a.lastChild;b(l)||!n&&rc(l)?(n=null,
c.o(l,a.parentNode,1+J(a)),e=!0):d.F(l)?c.removeNode(l):(n||(n=H("li"),a.parentNode.insertBefore(n,a.nextSibling)),c.o(l,n,0),e=!0)}e&&d.wa(a,0)&&c.removeNode(a)}};a.j=function(){if(!c.a()||0===f.getElementsByTagName("li").length)return null;var a=d.P(c.a()),a=d.la(a,function(a){return d.h(a)&&!d.Ra(a)&&(O(a,"ol,ul")||O(a.parentNode,"ol,ul")||d.B(a,"li"))});return a.length?a:null};a.ma=function(){var b=a.j();if(!b)return"none";for(var c=[],e=!0,n=!1,l=[],k=b.length;k--;){var f=b[k],y=!1,w=!1;if(F(f)){var p=
d.nb(f);null!==p&&(0>c.indexOf(p)&&c.push(p),y=!0);var r=d.pe(f);r&&0<r.length&&(w=!0,null!==p&&(-1<r.indexOf(p)&&r.splice(r.indexOf(p),1),0<r.length&&(y=!1)))}f=f.parentNode;0>l.indexOf(f)&&(l.push(f),p=d.nb(f),null!==p&&(0>c.indexOf(p)&&c.push(p),y=!0),P(f.parentNode,"li")&&(f=d.nb(f.parentNode),null!==f&&(0>c.indexOf(f)&&c.push(f),y=!0)));e=e&&y;n=n||y||w;if(!e&&n)return"mixed"}return 0===c.length?"none":!e||1!==c.length&&1!==b.length?"mixed":c[0]};a.bc=function(a){$b(a)||(a=bc(a,f));if(!a||1!==
a.nodeType)return"left";var b=Xb(a).textAlign.replace(/^-(moz|webkit)-/,"").replace(/^auto$/,"start");return"start"===b?"ltr"===d.Bc(a)?"left":"right":"end"===b?"ltr"===d.Bc(a)?"right":"left":-1!==["center","justify","left","right"].indexOf(b)?b:"left"};a.ne=function(b){void 0===b&&(b={});var g="blockMerging"in b?Boolean(b.cf):!0,m="stripWrappers"in b?Boolean(b.Qb):!0,n="direction"in b?b.direction:"forward";if(c.a()){a.hb(c.a().startContainer,c.a().startOffset,!1);a.hb(c.a().endContainer,c.a().endOffset,
!1);b=d.pc(c.a().startContainer,c.a().startOffset);var l=b[0],k=b[1];b=d.Hb(c.a().endContainer,c.a().endOffset);var f=b[0],y=b[1];if("after"!==d.pb(f,y,l,k))c.a().collapse("forward"===n);else{3===l.nodeType&&0==k&&(k=J(l),l=l.parentNode);3===f.nodeType&&y==M(f)&&(y=1+J(f),f=f.parentNode);c.e(l,k,f,y);for(var w=c.a().startContainer;d.t(w,w.parentNode)&&d.n(w);)w=w.parentNode;if(!d.m(w)&&!d.na(w)||!d.B("span",w)||O(w,"td,th"))w=null;for(var p=c.a().endContainer;d.t(p,p.parentNode)&&d.n(p);)p=p.parentNode;
if(!d.m(p)&&!d.na(p)||!d.B("span",p)||O(p,"td,th"))p=null;b=e.ie();if(l==f&&d.h(l)&&3===l.nodeType)l.deleteData(k,y-k),a.hb(l,k,!1),c.a().collapse("forward"===n);else{d.h(l)&&3===l.nodeType&&l.deleteData(k,M(l)-k);for(var r=d.la(c.a(),function(a){return d.h(a)&&!O(a,"thead,tbody,tfoot,tr,th,td")}),A=0;A<r.length;A++){var T=r[A];if(k=T.parentNode)if(k.removeChild(T),a.Ea(k),m||!Ub(l,k)&&k!=l)for(;d.h(k)&&d.n(k)&&0==M(k);)T=k.parentNode,T.removeChild(k),k=T}d.h(f)&&3===f.nodeType&&f.deleteData(0,y);
a.hb(c.a().startContainer,c.a().startOffset,!1);a.hb(c.a().endContainer,c.a().endOffset,!1);if(g&&w&&p&&d.t(w,p)&&w!=p){1===w.children.length&&d.Ec(w.firstChild)&&w.removeChild(w.firstChild);if(Ub(p,w)){for(g=p;g.parentNode!=w;)g=g.parentNode;c.e(w,J(g));if(!p.hasChildNodes()){for(;d.h(p)&&1==p.parentNode.childNodes.length&&p.parentNode!=w;)k=p,k.removeChild(p),p=k;d.h(p)&&!d.n(p)&&d.n(p.previousSibling)&&d.n(p.nextSibling)&&p.parentNode.insertBefore(H("br"),p.nextSibling);d.h(p)&&p.parentNode.removeChild(p);
e.ya(b);return}if(!d.n(p.firstChild)){e.ya(b);return}m=[];for(m.push(p.firstChild);!Q(m[m.length-1])&&d.n(m[m.length-1].nextSibling);)m.push(m[m.length-1].nextSibling);for(g=e.L(m);Ub(w,m[0])&&m[0].parentNode!=w;)a.M(m);d.h(m[0].previousSibling)&&Q(m[0].previousSibling)&&m[0].parentNode.removeChild(m[0].previousSibling)}else if(Ub(w,p)){c.e(w,M(w));for(g=w;g.parentNode!=p;)g=g.parentNode;d.n(g.nextSibling)&&Q(w.lastChild)&&w.removeChild(w.lastChild);m=[];g.nextSibling&&!d.m(g.nextSibling)&&m.push(g.nextSibling);
m.length&&!Q(m[m.length-1])&&m[m.length-1].nextSibling&&!d.m(m[m.length-1].nextSibling)&&m.push(m[m.length-1].nextSibling);g=e.L(m);m.forEach(function(a){c.o(a,w,-1)})}else{c.e(w,M(w));d.n(p.firstChild)&&Q(w.lastChild)&&w.removeChild(w.lastChild);for(g=e.L(la(p.childNodes));p.hasChildNodes();)c.o(p.firstChild,w,-1);for(;!(p.hasChildNodes()||0<=["td"].indexOf(p.tagName.toLowerCase()));)k=p.parentNode,k.removeChild(p),p=k}for(var u=w;d.oe(u).some(function(a){return d.t(u,a)&&(P(a,"ol")&&P(a.nextSibling,
"ol")||P(a,"ul")&&P(a.nextSibling,"ul"))&&d.t(u,a.nextSibling)});){for(;!(P(u,"ol")&&P(u.nextSibling,"ol")&&d.t(u,u.nextSibling)||P(u,"ul")&&P(u.nextSibling,"ul")&&d.t(u,u.nextSibling));)u=u.parentNode;for(;u.nextSibling.hasChildNodes();)c.o(u.nextSibling.firstChild,u,-1);u.parentNode.removeChild(u.nextSibling)}e.G(g);a.Ea(w);e.Jc(w)}else c.a().collapse("forward"===n)}e.ya(b)}}};a.M=function(a){var b=a[0].parentNode;if(d.h(b)&&b.parentNode){-1!==a.indexOf(b.firstChild)&&e.Mc(b);var m=-1!==a.indexOf(b.firstChild)&&
d.Vb(b),n=-1!==a.indexOf(b.lastChild)&&d.tb(b);if(-1===a.indexOf(b.firstChild)&&-1!==a.indexOf(b.lastChild)){for(var l=a.length-1;0<=l;l--)c.o(a[l],b.parentNode,1+J(b));n&&!d.tb(a[a.length-1])&&a[a.length-1].parentNode.insertBefore(H("br"),a[a.length-1].nextSibling);e.Jc(b)}else{if(-1===a.indexOf(b.firstChild))for(l=b.cloneNode(!1),b.removeAttribute("id"),b.parentNode.insertBefore(l,b);a[0].previousSibling;)c.o(b.firstChild,l,l.childNodes.length);for(l=0;l<a.length;l++)c.o(a[l],b.parentNode,J(b));
m&&!d.Vb(a[0])&&a[0].parentNode.insertBefore(H("br"),a[0]);d.n(a[a.length-1])&&!Q(a[a.length-1])&&Q(b.firstChild)&&!d.n(b)&&b.removeChild(b.firstChild);d.wa(b,0)?(a=a[a.length-1],Ab(b),n&&!d.tb(a)&&a.parentNode.insertBefore(H("br"),a.nextSibling)):e.Mc(b)}}};a.zb=function(b){d.Zb(b)?a.M(la(b.childNodes)):c.removeNode(b)};a.g=function(a,b,c){if(0==a)return"";if(1==a&&!b&&!c)return" ";if(1==a)return"\u00a0";var d="",e;for(e=b?"\u00a0 ":" \u00a0";3<a;)d+=e,a-=2;return 3==a?d+(b||c?b&&!c?"\u00a0\u00a0 ":
!b&&c?" \u00a0\u00a0":b&&c?"\u00a0 \u00a0":"impossible":" \u00a0 "):d+(b||c?b&&!c?"\u00a0 ":!b&&c?" \u00a0":b&&c?"\u00a0\u00a0":"impossible":"\u00a0 ")};a.hb=function(b,c,e){void 0===e&&(e=!0);if(d.h(b)||d.na(b)){for(;;)if(0<=c-1&&d.t(b,b.childNodes[c-1]))b=b.childNodes[c-1],c=M(b);else if(0==c&&!d.Vb(b)&&d.t(b,b.parentNode))c=J(b),b=b.parentNode;else if(3===b.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Xb(b.parentNode).whiteSpace)&&0!=c&&/[ \xa0]/.test(b.data[c-1]))c--;else break;for(var n=b,l=c,
k=0,f=0==c&&d.Vb(b);;)if(l<n.childNodes.length&&d.t(n,n.childNodes[l]))n=n.childNodes[l],l=0;else if(l==M(n)&&!d.tb(n)&&d.t(n,n.parentNode))l=1+J(n),n=n.parentNode;else if(3===n.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Xb(n.parentNode).whiteSpace)&&l!=M(n)&&/[ \xa0]/.test(n.data[l]))e&&f&&" "==n.data[l]?n.deleteData(l,1):(f=" "==n.data[l],l++,k++);else break;e&&b===n&&Tb(b)&&c===l&&(f=(f=b.textContent.match(/^\s+/))?f[0]:"",f=f.length,f>=c&&(b.deleteData(0,f),c=l=0));if(e)for(;"before"==d.pb(b,
c,n,l);)if(0<=l-1&&l-1<n.childNodes.length&&d.t(n,n.childNodes[l-1]))n=n.childNodes[l-1],l=M(n);else if(0==l&&d.t(n,n.parentNode))l=J(n),n=n.parentNode;else if(3===n.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Xb(n.parentNode).whiteSpace)&&l==M(n)&&" "==n.data[n.data.length-1]&&d.tb(n))l--,k--,n.deleteData(l,1);else break;for(e=a.g(k,0==c&&d.Vb(b),l==M(n)&&d.tb(n));"before"==d.pb(b,c,n,l);)c<b.childNodes.length?(b=b.childNodes[c],c=0):3!=b.nodeType||c==M(b)?(c=1+J(b),b=b.parentNode):(k=e[0],e=e.slice(1),
k!=b.data[c]&&(b.insertData(c,k),b.deleteData(c+1,1)),c++)}};a.Cc=function(a){V(a,"margin-left",d.Yb(a)+40+"px")};a.wb=function(){return!(!c.a()||!N(c.a().startContainer,"ul,ol",e.lb()))};a.Qd=function(){return!(!c.a()||!N(c.a().startContainer,"table",e.lb()))};a.hc=function(){return a.Qd()||a.wb()}}};function me(){var a=this,b=this;b.name="query";b.d=function(){var c=b.b("context").root;a.nextNode=function(b){return b.hasChildNodes()?b.firstChild:a.ca(b)};a.previousNode=function(a){if(a.previousSibling){for(a=a.previousSibling;a.hasChildNodes();)a=a.lastChild;return a}return a.parentNode&&1===a.parentNode.nodeType?a.parentNode:null};a.ca=function(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null};a.Fa=function(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;
return b};a.oe=function(b){return a.Fa(b).concat(b)};a.Wb=function(b){for(var c=[],f=a.ca(b);(b=a.nextNode(b))&&b!=f;)c.push(b);return c};a.Bc=function(b){return"ltr"==b.dir?"ltr":"rtl"==b.dir?"rtl":P(b.parentNode)?a.Bc(b.parentNode):"ltr"};a.pb=function(b,c,f,h){if(b==f){if(c==h)return"equal";if(c<h)return"before";if(c>h)return"after"}if(f.compareDocumentPosition(b)&4){h=a.pb(f,h,b,c);if("before"==h)return"after";if("after"==h)return"before"}if(f.compareDocumentPosition(b)&8){for(;f.parentNode!=
b;)f=f.parentNode;if(J(f)<c)return"after"}return"before"};a.u=function(a){for(;null!=a.parentNode;)a=a.parentNode;return a};a.gc=function(b,c){var f=a.pb(b,0,c.startContainer,c.startOffset),h=a.pb(b,M(b),c.endContainer,c.endOffset);return a.u(b)==a.u(c.startContainer)&&"after"==f&&"before"==h};a.la=function(b,c){"undefined"==typeof c&&(c=function(){return!0});var f=b.startContainer;f.hasChildNodes()&&b.startOffset<f.childNodes.length?f=f.childNodes[b.startOffset]:f=b.startOffset==M(f)?a.ca(f):a.nextNode(f);
var h=b.endContainer;h.hasChildNodes()&&b.endOffset<h.childNodes.length?h=h.childNodes[b.endOffset]:h=a.ca(h);for(var g=[];f.compareDocumentPosition(h)&4;)a.gc(f,b)&&c(f)?(g.push(f),f=a.ca(f)):f=a.nextNode(f);return g};a.kb=function(b,c){"undefined"==typeof c&&(c=function(){return!0});var f=b.startContainer;f.hasChildNodes()&&b.startOffset<f.childNodes.length?f=f.childNodes[b.startOffset]:f=b.startOffset==M(f)?a.ca(f):a.nextNode(f);var h=b.endContainer;h.hasChildNodes()&&b.endOffset<h.childNodes.length?
h=h.childNodes[b.endOffset]:h=a.ca(h);for(var g=[];f.compareDocumentPosition(h)&4;)a.gc(f,b)&&c(f)&&g.push(f),f=a.nextNode(f);return g};a.rb=function(a){return O(a,Ya)};a.m=function(a){return!(!a||a!==c&&!$b(a))};a.n=function(b){return!(!b||a.m(b))};a.wa=function(b,c){var f=0;null==c&&(c=1);var h=a.Wb(b);0===h.length&&(h=[b]);for(var g=h.length-1;0<=g;g--){var m=h[g];if(Tb(m)&&!rc(m)||Q(m)&&++f>=c+1||a.ba(m))return!1}return!0};a.h=function(b){return!(!b||!a.Da(b)||1!==b.nodeType&&1!==b.parentNode.nodeType)};
a.Ld=function(b){for(var c=0;c<b.childNodes.length;c++)if(a.h(b.childNodes[c])||a.Ld(b.childNodes[c]))return!0;return!1};a.fc=function(b){if(!Q(b))return!1;var e=a.A(b),f=!1,h=!1;oc(b,function(b){if(a.m(b)||e!==a.A(b))return!0;if(Q(b))return h=!0;f=f||a.j(b);return!1},c);return!f&&!h};a.j=function(b){return 3===b.nodeType&&!rc(b)||a.ba(b)};a.Qa=function(b){if(!Q(b))return!1;for(var e=b;(e=e.parentNode)&&!(1<e.childNodes.length||e===c);){if("li"===G(e))return!1;if(a.m(e))break}var e=b,f=a.A(b),h=!1,
g=!1;pc(e,function(b){if(a.m(b)||f!==a.A(b))return!0;if(Q(b))return g=!0;h=h||a.j(b);return!1},c);var m=!1,n=!1;oc(e,function(b){if(a.m(b)||f!==a.A(b))return!0;if(Q(b))return n=!0;m=m||a.j(b);return!1},c);return n||m||g||h?n||m?!1:h&&!m?!0:g?!1:!0:"li"===G(f)};a.ba=function(a){return 3!==a.nodeType&&(-1!==["img","embed","object","input","hr"].indexOf(G(a))||xb(a,"en-resource"))};a.Fc=function(b){if(!rc(b))return!1;if(""==b.data)return!0;var c=b.parentNode;if(!c)return!0;for(;!a.m(c)&&c.parentNode;)c=
c.parentNode;for(var f=b;f!=c;){f=a.previousNode(f);if(a.m(f)||Q(f))return!0;if(3==f.nodeType&&!rc(f)||a.ba(f))break}f=b;for(b=a.ca(c);f!=b;){f=a.nextNode(f);if(a.m(f)||Q(f))return!0;if(f&&3==f.nodeType&&!rc(f)||a.ba(f))break}return!1};a.Sd=function(b){if(!b)return!1;if(a.m(b)||3===b.nodeType&&!a.Fc(b)||a.ba(b))return!0;for(var c=0;c<b.childNodes.length;c++)if(a.Sd(b.childNodes[c]))return!0;return!1};a.D=function(b){if(!b)return!1;if(a.m(b)||a.ba(b)||3===b.nodeType&&!a.Fc(b)||Q(b)&&!a.Qa(b))return!0;
for(var c=0;c<b.childNodes.length;c++)if(a.D(b.childNodes[c]))return!0;return!1};a.Zb=function(b){return Bb(b).some(function(b){return a.D(b)})};a.F=function(b){return!!b&&!a.D(b)};a.Ec=function(b){if(a.fc(b)&&!a.Qa(b))return!0;if(!a.n(b)||1!=b.nodeType)return!1;for(var c=!1,f=0;f<b.childNodes.length;f++){if(!a.F(b.childNodes[f])&&!a.Ec(b.childNodes[f]))return!1;a.Ec(b.childNodes[f])&&(c=!0)}return c};a.yc=function(a){return-1!==Sa.indexOf(G(a))};a.B=function(a,b){var c="",h=null;t(b)?c=b:(c=G(b),
h=b.nodeType);var g="",m=null;t(a)?g=a:(g=G(a),m=a.nodeType);if(-1!==Va.indexOf(c)&&3===m&&!/^[ \t\n\f\r]*$/.test(a.data)||-1!==Wa.indexOf(c)&&("object"!==typeof a||3!==m)||9===m||11===m||10===m)return!1;if(1===h)for(m=b;m;){if(F(m)){var n=G(m);if("a"===g&&"a"===n||-1!==Qa.indexOf(g)&&-1!==Sa.indexOf(n)||/^h[1-6]$/.test(g)&&/^h[1-6]$/.test(n))return!1}m=m.parentNode}if(11===h)return!0;switch(c){case "colgroup":return"col"===a;case "table":return-1!=="caption col colgroup tbody td tfoot th thead tr".split(" ").indexOf(g);
case "tbody":case "thead":case "tfoot":return-1!==["td","th","tr"].indexOf(g);case "tr":return-1!==["td","th"].indexOf(g);case "dl":return-1!==["dt","dd"].indexOf(g);case "dir":case "ol":case "ul":return-1!==["dir","li","ol","ul"].indexOf(g);case "hgroup":return/^h[1-6]$/.test(g)}if(-1!=="body caption col colgroup frame frameset head html tbody td tfoot th thead tr".split(" ").indexOf(g)||-1!==["dd","dt"].indexOf(g)&&"dl"!==c||"li"===g&&"ol"!==c&&"ul"!==c)return!1;h=[[["a"],["a"]],[["dd","dt"],["dd",
"dt"]],["h1 h2 h3 h4 h5 h6".split(" "),"h1 h2 h3 h4 h5 h6".split(" ")],[["li"],["li"]],[["nobr"],["nobr"]],[Sa,Qa],[["td","th"],"caption col colgroup tbody td tfoot th thead tr".split(" ")]];for(m=0;m<h.length;m++)if(-1!==h[m][0].indexOf(c)&&-1!==h[m][1].indexOf(g))return!1;return!0};a.$=function(b){return a.h(b)&&a.D(b)&&(3===b.nodeType||a.ba(b)||Q(b))};a.Ra=function(a){if(!P(a))return!1;var b=G(a);return"blockquote"===b?!0:"div"!==b?!1:"0px"!==Xb(a)["margin-left"]?!0:!1};a.xb=function(b){if(!a.Ra(b))return!1;
for(var c=0;c<b.attributes.length;c++)if(-1===["style","dir"].indexOf(b.attributes[c].name))return!1;for(c=0;c<b.style.length;c++)if(!/^(-[a-z]+-)?(margin|border|padding)/.test(b.style[c]))return!1;return!0};a.Ma=function(a){return O(a,"address,div,h1,h2,h3,h4,h5,h6,listing,p,pre,xmp")};a.Gc=function(b){return a.Ma(b)||O(b,"li,dt,dd")};a.A=function(b){for(;b&&!a.m(b);)b=b.parentNode;return b};a.H=function(b,c){var f=!1;b?0===c?f=a.m(b)||!b.parentNode:0<=c-1&&c-1<b.childNodes.length&&(f=a.D(b.childNodes[c-
1])&&a.m(b.childNodes[c-1])||Q(b.childNodes[c-1])):f=!0;return f};a.w=function(b,c){var f=!1;b?c===M(b)?f=!b.parentNode&&c===M(b)||a.m(b):c<b.childNodes.length&&(f=a.D(b.childNodes[c])&&a.m(b.childNodes[c])):f=!0;return f};a.g=function(b,c){return a.H(b,c)||a.w(b,c)};a.P=function(b){var c=b.startContainer,f=b.startOffset,h=b.endContainer;b=b.endOffset;var g=a.Fa(c).concat(c).filter(function(a){return P(a,"li")}).slice(-1);g.length&&(f=J(g[0]),c=g[0].parentNode);if(!a.H(c,f)){do 0<=f-1&&F(c.childNodes[f-
1])&&c.childNodes[f-1].hasChildNodes()?(c=c.childNodes[f-1],f=M(c)):0==f?(f=J(c),c=c.parentNode):f--,Tb(c)&&(f=J(c),c=c.parentNode);while(!a.g(c,f))}for(;0==f&&c.parentNode&&a.h(h);)f=J(c),c=c.parentNode;g=a.Fa(h).concat(h).filter(function(a){return P(a,"li")}).slice(-1);g.length&&(b=1+J(g[0]),h=g[0].parentNode);if(!a.w(h,b)){do b<M(h)&&F(h)&&h.hasChildNodes()?(h=h.childNodes[b],b=0):b>=M(h)?(b=1+J(h),h=h.parentNode):b++,Tb(h)&&(b=1+J(h),h=h.parentNode);while(!a.g(h,b))}for(;b==M(h)&&h.parentNode&&
a.h(h);)b=1+J(h),h=h.parentNode;return Ac(c,f,h,b)};a.Vb=function(b){for(var c=0;!a.g(b,c);){if(0<=c-1&&c-1<b.childNodes.length&&a.D(b.childNodes[c-1]))return!1;0!=c&&b.hasChildNodes()?(b=b.childNodes[c-1],c=M(b)):(c=J(b),b=b.parentNode)}return!0};a.tb=function(b){for(var c=M(b);!a.g(b,c);){if(c<b.childNodes.length&&a.D(b.childNodes[c]))return!1;c!=M(b)&&b.hasChildNodes()?(b=b.childNodes[c],c=0):(c=1+J(b),b=b.parentNode)}return!0};a.Yb=function(a){return a&&a.style?wd(a.style.marginLeft):0};a.ic=
function(b,c){if(!b||a.na(b)||!F(b))return!0;var f=b.style;if(f)for(var h=0;h<f.length;h++){var g=null,m=null,g=f[h],m=f.getPropertyValue(g);if(-1===Ua.indexOf(m)&&m&&-1===Ta.indexOf(g))return!1}return c?a.ic(b.parentNode):!0};a.se=function(b){return!!N(b,"li,ol,ul,dl,dd,dt",a.Xb(b))};a.nb=function(a){var b=G(a);return"ul"===b&&xb(a,"en-todo-list")?"tl":"ol"===b||"ul"===b?b:null};a.pe=function(b){var c=[];b=b.querySelectorAll("ol,ul");for(var f=b.length;f--;){var h=a.nb(b[f]);null!==h&&0>c.indexOf(h)&&
c.push(h)}return c};a.Nd=function(b,c){return a.nb(b)===c};a.$a=function(a,b){return!(!a.isPointInRange(b.startContainer,b.startOffset)&&!a.isPointInRange(b.endContainer,b.endOffset))};a.T=function(b,c){return 0===M(b)?null:c===M(b)&&b.parentNode&&a.n(b)?[b.parentNode,1+J(b)]:0<=c&&c<b.childNodes.length&&0!==M(b.childNodes[c])&&a.n(b.childNodes[c])?[b.childNodes[c],0]:null};a.da=function(b,c){return 0==M(b)?null:0==c&&b.parentNode&&a.n(b)?[b.parentNode,J(b)]:0<=c-1&&c-1<b.childNodes.length&&0!=M(b.childNodes[c-
1])&&a.n(b.childNodes[c-1])?[b.childNodes[c-1],M(b.childNodes[c-1])]:null};a.Hb=function(b,c){for(var f;f=a.da(b,c);)b=f[0],c=f[1];return[b,c]};a.pc=function(b,c){for(var f;f=a.T(b,c);)b=f[0],c=f[1];return[b,c]};a.vb=function(b){var e;!(e=c===b)&&(e=b&&Ub(b,c))&&(e=!!(b&&F(b)&&(xb(b,"en-container")||P(b,"td")||a.m(b)&&!a.ic(b,!1))));return e?!0:!1};a.na=function(a){return c===a};a.Xb=function(b){return Ub(b,c)||a.na(b)?c:null};a.Da=function(a){return Ub(a,c)};a.t=function(b,c){return!(!a.Xb(b)||a.Xb(b)!=
a.Xb(c))}}};function ne(a){var b=W("*[id]:not(.en-container):not(.en-todo):not(.en-resource):not(.en-object-placeholder),*[class]:not(.en-container):not(.en-todo):not(.en-resource):not(.en-object-placeholder)",a);a=W(".en-resource *",a);for(var c=a.length;c--;)b.splice(b.indexOf(a[c]),1);for(c=b.length-1;0<=c;c--){var d=b[c];-1===Xa.indexOf(G(d))&&"en-editor-last-insertion-point"!==d.id&&d.removeAttribute("id");d.removeAttribute("class");d.attributes&&0<d.attributes.length&&la(d.attributes).forEach(function(a){0===
a.name.indexOf("data-")&&d.removeAttribute(a.name)})}}function oe(a){X("span",a).forEach(function(a){a.hasAttributes()||Gb(a)})}
function pe(a){var b=a.ownerDocument.createNodeIterator(a,136,null,!1),c;for(a=[];c=b.nextNode();)a.push(c);for(b=a.length-1;0<=b;b--)if(c=a[b],8===c.nodeType)if(0==c.data.indexOf("[CDATA[")){var d=c.nextSibling;c=Fb(c,document.createTextNode(c.data.substr(7)));c.data.lastIndexOf("]]")!=c.data.length-2&&d&&3==d.nodeType?(d.data=d.data.replace(/^(.*?)\]\]\>(.*?)$/gi,"$1$2"),c.data+=">"):c.data=c.data.replace(/^(.*?)\]\](.*?)$/gi,"$1$2")}else c.parentNode.removeChild(c);else Fb(c,document.createTextNode(c.data))}
function qe(a){a=a.querySelectorAll("*[style*='line-height']");for(var b=a.length-1;0<=b;b--){var c=a[b];c.style.lineHeight&&U(c,"line-height")}}var re=["javascript"];function se(a){var b=a;try{b=decodeURIComponent(b)||b}catch(c){ga("Could't decode invalid URI:",a),b="#"}b=b.replace(/[\x00-\x20]+/,"");b=b.replace(/<\!\-\-.*?\-\-\>/g,"");return(b=b.match(/^([a-zA-Z]+)\:/))?0<=re.indexOf(b[1].toLowerCase())?"#":a.trim()||"#":a||"#"}
function te(a){X("span[style*='-evernote-last-insertion-point']",a).forEach(function(a){Gb(a)})}function ue(){return H("span",{style:"-evernote-last-insertion-point:true;",id:"en-editor-last-insertion-point"})}
function ve(a){for(var b=Pa.concat("id","contenteditable"),c=la(a.attributes||[]).map(function(a){return a.name.toLowerCase()}),d=0;d<c.length;d++){var e=c[d];-1===b.indexOf(e)&&a.removeAttribute(e)}hc(a);U(a,"height");U(a,"width");U(a,"max-height");U(a,"max-width");U(a,"min-height");U(a,"min-width");ic(a)}
function we(a,b){for(var c='<div id="en-note"',d=0;d<Pa.length;d++){var e=Pa[d].toLowerCase();if(a.hasAttribute(e))var f=" "+e+'="',e=a.getAttribute(e).replace(va["&"],"&amp;").replace(va["<"],"&lt;").replace(va[">"],"&gt;").replace(va['"'],"&quot;").replace(va["'"],"&apos;"),c=c+(f+e+'"')}return c+">"+b+"</div>"};function xe(){var a=this,b=this;b.name="format";b.d=function(){var c=b.b("context"),d=b.b("query"),e=c.root,f={};f.createlink=f.unlink=function(a){for(;a&&(!P(a)||"a"!==G(a)||!a.hasAttribute("href"));)a=a.parentNode;return a?a.getAttribute("href"):null};f.backcolor=function(a){for(;a&&a!==e&&d.n(a);){if(a.style){var b=a.style.backgroundColor;if(b&&"rgba(0, 0, 0, 0)"!==b&&""!==b&&"transparent"!==b)return Xb(a).backgroundColor}a=a.parentNode}return null};f.highlight=function(a){for(;a&&a!==e&&d.n(a);){if(a.style&&
("rgb(255, 250, 165)"===a.style.backgroundColor||"true"===R(a,"-evernote-highlight")||"true"===R(a,"-evernote-highlighted")))return"rgb(255, 250, 165)";a=a.parentNode}return null};f.subscript=f.superscript=function(a){for(var b=!1,c=!1;d.n(a);)P(a,"sub")?b=!0:P(a,"sup")&&(c=!0),a=a.parentNode;return b&&c?"mixed":b?"subscript":c?"superscript":null};f.strikethrough=function(a){return N(a,function(a){var b=G(a);return"s"===b||"strike"===b||"del"===b?!0:a.style&&(a=a.style.textDecoration)?-1!==a.indexOf("line-through"):
!1},c.root)?"line-through":null};f.underline=function(a){return N(a,function(a){return"u"===G(a)?!0:a.style&&(a=a.style.textDecoration)?-1!==a.indexOf("underline"):!1},c.root)?"underline":null};f.tt=function(a){return N(a,"tt",c.root)?"tt":null};a.Mc=function(a){var b=a.previousSibling;if(b){for(;b.hasChildNodes();)b=b.lastChild;for(;d.F(b)&&!d.Qa(b)&&b!=a.parentNode;)b=d.previousNode(b);d.h(b)&&d.Qa(b)&&b.parentNode.removeChild(b)}};a.Jc=function(a){for(var b=a;b.hasChildNodes();)b=b.lastChild;for(;d.F(b)&&
!d.Qa(b)&&b!=a;)b=d.previousNode(b);if(d.h(b)&&d.Qa(b)){for(;d.h(b.parentNode)&&d.F(b.parentNode);)b=b.parentNode;b.parentNode.removeChild(b)}};a.$a=function(b){a.Mc(b);a.Jc(b)};a.oa=function(b,e,l){"undefined"==typeof e&&(e=function(){return!1});"undefined"==typeof l&&(l=function(){return null});if(b.every(d.F)&&!b.some(function(a){return Q(a)})||!b[0].parentNode)return null;for(d.n(b[b.length-1])&&!Q(b[b.length-1])&&Q(b[b.length-1].nextSibling)&&b.push(b[b.length-1].nextSibling);d.F(b[0].previousSibling);)b.unshift(b[0].previousSibling);
for(;d.F(b[b.length-1].nextSibling);)b.push(b[b.length-1].nextSibling);l=d.h(b[0].previousSibling)&&e(b[0].previousSibling)?b[0].previousSibling:d.h(b[b.length-1].nextSibling)&&e(b[b.length-1].nextSibling)?b[b.length-1].nextSibling:l();if(!l)return null;if(!l.parentNode){b[0].parentNode.insertBefore(l,b[0]);var k=c.a();k.startContainer==l.parentNode&&k.startOffset==J(l)&&c.Qc(k.startContainer,k.startOffset+1);k.endContainer==l.parentNode&&k.endOffset==J(l)&&c.Nc(k.endContainer,k.endOffset+1)}k=b[0].parentNode;
if(l.compareDocumentPosition(b[0])&4){!d.n(l)&&d.n([].filter.call(l.childNodes,d.D).slice(-1)[0])&&d.n(b.filter(d.D)[0])&&!Q(l.lastChild)&&l.appendChild(H("br"));for(var g=0;g<b.length;g++)c.o(b[g],l,-1)}else for(!d.n(l)&&d.n([].filter.call(l.childNodes,d.D)[0])&&d.n(b.filter(d.D).slice(-1)[0])&&!Q(b[b.length-1])&&l.insertBefore(H("br"),l.firstChild),g=b.length-1;0<=g;g--)c.o(b[g],l,0);d.h(k)&&!k.hasChildNodes()&&k.parentNode.removeChild(k);if(d.h(l.nextSibling)&&e(l.nextSibling)){for(!d.n(l)&&d.n(l.lastChild)&&
d.n(l.nextSibling.firstChild)&&!Q(l.lastChild)&&l.appendChild(H("br"));l.nextSibling.hasChildNodes();)c.o(l.nextSibling.firstChild,l,-1);c.removeNode(l.nextSibling)}a.$a(l);return l};a.H=function(b,c){return c.collapsed?!1:d.gc(b,c)||b==c.startContainer&&3===b.nodeType&&M(b)!=c.startOffset||b==c.endContainer&&3===b.nodeType&&0!=c.endOffset||!(!b.hasChildNodes()||![].every.call(b.childNodes,function(b){return a.H(b,c)})||Ub(c.startContainer,b)&&3==c.startContainer.nodeType&&0!=c.startOffset||Ub(c.endContainer,
b)&&3==c.endContainer.nodeType&&c.endOffset!=M(c.endContainer))?!0:!1};a.Oa=function(b,c){"undefined"==typeof c&&(c=function(){return!0});if(b.collapsed)return null;for(var e=b.startContainer;a.H(e.parentNode,b);)e=e.parentNode;for(var k=d.ca(b.endContainer);!k&&e||k&&e.compareDocumentPosition(k)&4;){if(a.H(e,b)&&c(e))return e;e=d.nextNode(e)}return null};a.ka=function(b,c){"undefined"==typeof c&&(c=function(){return!0});if(b.collapsed)return[];for(var e=b.startContainer;a.H(e.parentNode,b);)e=e.parentNode;
for(var k=d.ca(b.endContainer),g=[];!k&&e||k&&e.compareDocumentPosition(k)&4;)a.H(e,b)&&c(e)&&g.push(e),e=d.nextNode(e);return g};a.da=function(a){if(!P(a))return!1;var b=a.tagName.toUpperCase();if(-1!="B EM I S SPAN STRIKE STRONG SUB SUP U".split(" ").indexOf(b)&&(0==a.attributes.length||1==a.attributes.length&&a.hasAttribute("style")))return!0;if("FONT"==b||"A"==b){var c=a.attributes.length;a.hasAttribute("style")&&c--;"FONT"==b&&(a.hasAttribute("color")&&c--,a.hasAttribute("face")&&c--,a.hasAttribute("size")&&
c--);"A"==b&&a.hasAttribute("href")&&c--;if(0==c)return!0}return!1};a.T=function(a){if(!P(a))return!1;var b=a.tagName.toUpperCase();return-1=="A B EM FONT I S SPAN STRIKE STRONG SUB SUP U".split(" ").indexOf(b)?!1:0==a.attributes.length?!0:1<a.attributes.length?!1:a.hasAttribute("style")&&0==a.style.length||"A"==b&&a.hasAttribute("href")||"FONT"==b&&(a.hasAttribute("color")||a.hasAttribute("face")||a.hasAttribute("size"))||("B"==b||"STRONG"==b)&&a.hasAttribute("style")&&1==a.style.length&&""!=a.style.fontWeight||
("I"==b||"EM"==b)&&a.hasAttribute("style")&&1==a.style.length&&""!=a.style.fontStyle||("A"==b||"FONT"==b||"SPAN"==b)&&a.hasAttribute("style")&&1==a.style.length&&""==a.style.textDecoration||-1!="A FONT S SPAN STRIKE U".split(" ").indexOf(b)&&a.hasAttribute("style")&&(1==a.style.length||4==a.style.length&&"MozTextBlink"in a.style&&"MozTextDecorationColor"in a.style&&"MozTextDecorationLine"in a.style&&"MozTextDecorationStyle"in a.style)&&("line-through"==a.style.textDecoration||"underline"==a.style.textDecoration||
"overline"==a.style.textDecoration||"none"==a.style.textDecoration)?!0:!1};a.j=function(a,b,d){return null===b&&null===d||t(b)&&t(d)&&b==d&&!c.i(a).Ha||t(b)&&t(d)&&c.i(a).Ha&&c.i(a).Ha(b,d)?!0:!1};a.u=function(b,c,d){return a.j(b,c,d)?!0:!1};a.r=function(b,d){if(1!==b.nodeType&&(!b.parentNode||1!=b.parentNode.nodeType))return null;if(1!==b.nodeType)return a.r(b.parentNode,d);var l=f[d];if(l)return l(b);z(!!c.i(d).W,"Bug: no relevantCssProperty for "+d+" in f.getEffectiveCommandValue");l=c.i(d).W;
return l?Wb(b)?b.style&&null!==b.style[l]&&""!==b.style[l]?b.style[l]:Xb(b)[l]:(x.warn("We are not on rendered DOM for fontSize retieval",b),uc(b,l,e)):""};a.g=function(a,b){if(("backcolor"===b||"highlight"===b)&&$b(a))return null;var d=G(a);if("createlink"===b||"unlink"===b)return"a"===d&&a.hasAttribute("href")?a.getAttribute("href"):null;if("subscript"===b||"superscript"===b)return"sup"===d?"superscript":"sub"===d?"subscript":null;if("strikethrough"===b&&""!=a.style.textDecoration)return-1!=a.style.textDecoration.indexOf("line-through")?
"line-through":null;if("strikethrough"===b&&("s"===d||"strike"===d||"del"===d))return"line-through";if("underline"===b&&""!=a.style.textDecoration)return-1!=a.style.textDecoration.indexOf("underline")?"underline":null;if("underline"===b&&"u"===d)return"underline";if("highlight"===b&&"mark"===d)return"rgb(255, 250, 165)";if("tt"==d)return"tt";var k=c.i(b),g=k.W;if(null===g)return null;var f=a.style[g];if(""!=f)return(d=k.V)&&d.length?("highlight"===b&&(f=kd(f)),-1!==d.indexOf(f)?f:null):f;if("font"===
d){if("color"==g&&a.hasAttribute("color"))return a.color;if("fontFamily"==g&&a.hasAttribute("face"))return a.face;if("fontSize"==g&&a.hasAttribute("size"))return Wb(a)?Xb(a).fontSize.toString():(x.warn("We are not on rendered DOM for fontSize retieval",a),uc(a,"fontSize",e))}return"fontWeight"!=g||"b"!=d&&"strong"!=d?"fontStyle"!=g||"i"!=d&&"em"!=d?null:"italic":"bold"};a.Ma=function(b,d,e){for(var k=b;a.da(k)&&1==k.childNodes.length&&a.da(k.firstChild)&&(!a.T(k)||!a.j(d,a.g(k,d),e));)k=k.firstChild;
if(k!=b&&a.T(k)&&a.j(d,a.g(k,d),e)&&a.u(d,a.r(k,d),e)){for(;k.hasChildNodes();)c.o(k.firstChild,k.parentNode,J(k));b.parentNode.insertBefore(k,b.nextSibling);c.o(b,k,-1)}};a.L=function(b){var c=[];b.forEach(function(b){"subscript forecolor highlight backcolor fontname fontsize bold italic strikethrough underline tt".split(" ").forEach(function(d){var e=b;1!=e.nodeType&&(e=e.parentNode);for(;e&&1==e.nodeType&&null===a.g(e,d);)e=e.parentNode;e&&1==e.nodeType?c.push([b,d,a.g(e,d)]):c.push([b,d,null])})});
return c};a.G=function(b){b.forEach(function(b){var c=b[0],d=b[1];b=b[2];var e=c;e&&1==e.nodeType||(e=e.parentNode);for(;e&&1==e.nodeType&&null===a.g(e,d);)e=e.parentNode;null===b&&e&&1==e.nodeType?a.Da(c,d,null):(e&&1==e.nodeType&&!a.j(d,a.g(e,d),b)||(!e||1!=e.nodeType)&&null!==b)&&a.w(c,d,b)})};a.Ac=function(b,e){if(d.h(b)&&null!==a.g(b,e))if(a.T(b)){for(var l=Array.prototype.slice.call(b.childNodes),k=0;k<l.length;k++)c.o(l[k],b.parentNode,J(b));b.parentNode.removeChild(b)}else"strikethrough"===
e&&-1!=b.style.textDecoration.indexOf("line-through")&&("line-through"==b.style.textDecoration?b.style.textDecoration="":b.style.textDecoration=b.style.textDecoration.replace("line-through","")),"underline"===e&&-1!=b.style.textDecoration.indexOf("underline")&&("underline"==b.style.textDecoration?b.style.textDecoration="":b.style.textDecoration=b.style.textDecoration.replace("underline","")),null!==c.i(e).W&&(b.style[c.i(e).W]=""),P(b,"font")&&("forecolor"===e&&b.removeAttribute("color"),"fontname"===
e&&b.removeAttribute("face"),"fontsize"===e&&b.removeAttribute("size")),!P(b,"a")||"createlink"!==e&&"unlink"!==e||b.removeAttribute("href"),""==b.getAttribute("style")&&b.removeAttribute("style"),null===a.g(b,e)||c.S(b,"span")};a.Da=function(b,c,e){if(b.parentNode&&1==b.parentNode.nodeType&&!a.u(c,a.r(b,c),e)){for(var k=b.parentNode,g=[];d.h(k)&&1==k.nodeType&&!a.u(c,a.r(k,c),e);)g.push(k),k=k.parentNode;if(g.length){var f=a.g(g[g.length-1],c);if(null!==f||f==e)if(null===e||a.u(c,a.r(g[g.length-
1].parentNode,c),e))for(;g.length;)for(k=g.pop(),null!==a.g(k,c)&&(f=a.g(k,c)),e=Array.prototype.slice.call(k.childNodes),null!==a.g(k,c)&&a.Ac(k,c),k=0;k<e.length;k++){var h=e[k];h!=b&&(1!=h.nodeType||null===a.g(h,c)||a.j(c,f,a.g(h,c)))&&h!=g[g.length-1]&&a.w(h,c,f)}}}};a.w=function(b,e,g){if(b.parentNode&&null!==g&&(d.B(b,"span")&&(a.Ma(b.previousSibling,e,g),a.Ma(b.nextSibling,e,g),a.oa([b],function(b){return a.T(b)&&a.j(e,a.g(b,e),g)&&a.u(e,a.r(b,e),g)},function(){return null})),!d.F(b)&&!a.u(e,
a.r(b,e),g)&&b.parentNode))if(!d.B(b,"span")){for(var k=[],f=0;f<b.childNodes.length;f++){if(1==b.childNodes[f].nodeType){var h=a.g(b.childNodes[f],e);if(null!==h&&!a.j(e,g,h))continue}k.push(b.childNodes[f])}for(f=0;f<k.length;f++)a.w(k[f],e,g)}else if(!a.u(e,a.r(b,e),g)){k=null;if("bold"!==e||"bold"!==g&&"700"!==g)if("italic"===e&&"italic"===g)k=H("i");else if("strikethrough"===e&&"line-through"==g)k=H("s");else if("underline"===e&&"underline"===g)k=H("u");else if("tt"===e&&"tt"===g)k=H("tt");else if("createlink"===
e||"unlink"===e)for(k=H("a"),k.setAttribute("href",g),f=b.parentNode;f;)P(f,"a")&&(f=c.S(f,"span")),f=f.parentNode;else"subscript"!==e&&"superscript"!==e||"subscript"!==g?"subscript"!==e&&"superscript"!==e||"superscript"!==g||(k=H("sup")):k=H("sub");else k=H("b");k||(k=H("span"));b.parentNode.insertBefore(k,b);f=c.i(e).W;null===f||k.style[f]===g||a.u(e,a.r(k,e),g)||(k.style[f]=g,"highlight"===e&&V(k,"-evernote-highlight","true"));"forecolor"===e&&ld(g)&&k.style.color!==g&&(k.style.color=g);"fontname"===
e&&null!=g&&k.style.fontFamily!==g&&(k.style.fontFamily=g);"fontsize"===e&&null!=g&&k.style.fontSize!==g&&(k.style.fontSize=g);"strikethrough"===e&&"line-through"==g&&"line-through"!=a.r(k,"strikethrough")&&(k.style.textDecoration="line-through");"underline"===e&&"underline"==g&&"underline"!=a.r(k,"underline")&&(k.style.textDecoration="underline");c.o(b,k,k.childNodes.length);if(1===b.nodeType&&!a.j(e,a.r(b,e),g)){c.o(b,k.parentNode,J(k));k.parentNode.removeChild(k);k=[];for(f=0;f<b.childNodes.length;f++){if(1==
b.childNodes[f].nodeType&&(h=a.g(b.childNodes[f],e),null!==h&&!a.j(e,g,h)))continue;k.push(b.childNodes[f])}for(f=0;f<k.length;f++)a.w(k[f],e,g)}}};a.I=function(b,e,g){var k=!1;void 0===g&&(g=c.a(),k=!0);if(null===a.Oa(g,d.$))c.i(b).V&&c.le(b,-1!=c.i(b).V.indexOf(e)),"subscript"===b&&c.nd("superscript"),"superscript"===b&&c.nd("subscript"),null===e?c.xe(b):("createlink"===b||c.i(b).value)&&c.md(b,e);else{if(d.h(g.startContainer)&&3==g.startContainer.nodeType&&0!=g.startOffset&&g.startOffset!=M(g.startContainer)){var f;
if(g.startContainer==g.endContainer){var h=g.endOffset-g.startOffset;f=g.startContainer.splitText(g.startOffset);g.setEnd(f,h)}else f=g.startContainer.splitText(g.startOffset);g.setStart(f,0)}d.h(g.endContainer)&&3==g.endContainer.nodeType&&0!=g.endOffset&&g.endOffset!=M(g.endContainer)&&(f=[g.startContainer,g.startOffset],h=[g.endContainer,g.endOffset],g.endContainer.splitText(g.endOffset),g.setStart(f[0],f[1]),g.setEnd(h[0],h[1]));k&&c.Xa(g);a.ka(g,function(a){return d.h(a)&&1===a.nodeType}).forEach(function(c){a.Ac(c,
b)});a.ka(g,d.h).forEach(function(c){a.Da(c,b,e);d.B(c,"span")&&a.w(c,b,e)})}};var h="bold italic strikethrough subscript superscript underline highlight tt".split(" "),g=["fontname","fontsize","forecolor"];a.yb=function(){var a=[];void 0!==c.ec("createlink")&&a.push(["createlink",c.ec("createlink")]);h.forEach(function(b){void 0!==c.dc(b)&&a.push([b,c.dc(b)])});g.forEach(function(b){void 0!==c.ec(b)&&a.push([b,c.ec(b)])});return a};a.ie=function(b){var e=[],f=a.Oa(c.a(),d.$);!f&&b&&(b=c.a())&&(f=
Gc(b));if(!f)return e;e.push(["createlink",a.r(f,"createlink")]);h.forEach(function(b){var d=a.r(f,b);-1!=c.i(b).V.indexOf(d)?e.push([b,!0]):e.push([b,!1])});g.forEach(function(a){e.push([a,c.i(a).value()])});return e};a.ya=function(b){var e=a.Oa(c.a(),d.$);if(null!==e)for(var g=0;g<b.length;g++){var k=b[g][0],f=b[g][1];"boolean"===typeof f&&c.i(k).state()!==f?c.i(k).action(f):t(f)&&!a.j(k,a.r(e,k),f)&&c.i(k).action(f);e=a.Oa(c.a(),d.$)||e}else for(g=0;g<b.length;g++)k=b[g][0],f=b[g][1],"boolean"==
typeof f&&c.le(k,f),t(f)&&c.md(k,f)};a.te=function(b){var d=a.ie(!0);b();c.ja();a.ya(d)};a.lb=function(){return c.root}}};function ye(){var a=this;a.name="normalize";var b=/\n\r|\r\n|\r|\n/gi,c=/\s/gi;a.d=function(){function d(a){var b=Xb(a)||{},b={fontWeight:b.fontWeight,Fe:b.fontFamily,fontSize:wd(b.fontSize),marginTop:wd(b.marginTop),marginBottom:wd(b.marginBottom)},c=Xb(a.parentNode)||{};a=p.S(a,"div");b.fontWeight&&"normal"!==b.fontWeight&&400!=b.fontWeight&&(a.style.fontWeight=b.fontWeight);b.fontFamily&&b.Fe!==c.fontName&&(a.style.fontFamily=b.fontFamily);b.fontSize&&b.fontSize!==wd(c.fontSize)&&(a.style.fontSize=
b.fontSize.toString()+"px");0<=1*b.marginTop-wd(c.fontSize)&&(r.se(a)?(a.appendChild(H("br")),a.appendChild(H("br"))):(b=Qb(),p.o(b,a.parentNode,J(a)),hc(b),m(b),ic(b)));return a}function e(a){if(!a)return a;$b(a)&&(a=p.S(a,"div"));Rd(a);U(a,"white-space");U(a,"word-wrap");U(a,"word-break");for(var d=Bb(a),g,k,r=p.a(),l=0;l<d.length;l++){var m=d[l];if(Tb(m)){for(var h=m.textContent.split(b),n=H("div"),A=0;A<h.length;A++){var v=h[A].replace(c,"\u00a0").replace(K,"\u00a0 ");v&&n.appendChild(document.createTextNode(v));
A<h.length-1&&n.appendChild(H("br"))}if(r.startContainer===m||Ub(m,r.startContainer))g=f(n,r.startOffset);if(r.endContainer===m||Ub(m,r.endContainer))k=f(n,r.endOffset);Fb(m,n);Gb(n)}else e(m)}g&&null!==g[0]&&p.Qc(g[0],g[1]);k&&null!==k[0]&&p.Nc(k[0],k[1]);return a}function f(a,b){for(var c=0,d=null,e=0,g=0;g<a.childNodes.length;g++){var k=a.childNodes[g],f=k.length||1;if(c<b)c+=f,e=f-(c-b),d=k;else{c==b&&(e=0,d=k);break}}return[d,e]}function h(){if(!v(u,!0)&&r.wa(u)){Eb(u);var a=Qb();u.appendChild(a);
p.e(a,0)}}function g(a){if(F(a)&&(a=a.getElementsByTagName("*")))for(var b=a.length-1;0<=b;b--){var c=a[b];c.hasChildNodes()||$b(c)||r.ba(c)||Q(c)||p.removeNode(c)}}function m(a){(a=sc(a))&&w(a,"div>div,div>table,div>ol,div>ul").forEach(function(a){var b=a.parentNode;if(b&&!r.vb(b)){if(P(a,"div")){["text-align"].forEach(function(c){if(!a.style[c]){var d=b.style[c];d&&(a.style[c]=d)}});var c=r.Yb(b)+r.Yb(a);0<c?V(a,"margin-left",c+"px"):U(a,"margin-left")}var c=[a],d=A.L(c);T.M(c);A.G(d);n(r.A(a))}})}
function n(a){var b=a&&a.nextSibling;b&&!v(b)&&p.removeNode(b);(a=a&&a.previousSibling)&&!v(a)&&p.removeNode(a)}function l(a){if(O(a,"ul,ol")&&r.h(a)&&r.ic(a,!0))for(var b=null,c=a.childNodes.length-1;0<=c;c--){var d=a.childNodes[c];O(d,"li,ol,ul")?b=null:$b(d)?p.S(d,"li"):rc(d)?p.removeNode(d):(b||(b=H("li"),p.insertBefore(b,d.parentNode,d.nextSibling)),p.o(d,b,0))}}function k(a){z(!!a,"expected node");if("hr"===G(a)){var b=H("div");b.appendChild(a);return b}do{var c=Ac(a,0),c=r.P(c);if(c.collapsed)return null;
for(;r.m(b=c.startContainer.childNodes[c.startOffset]);)c.setStart(b,0);b=r.la(c);if(0>=b.length)return Yb(c);for(var c=b[0].parentNode,d=r.m(c)&&b[0]===c.firstChild&&b[b.length-1]===c.lastChild;b.length&&rc(b[0]);)p.removeNode(b.shift());var e=r.vb(c);if(d){if(!e)break;if(0>=b.length||!Bb(c).some(function(a){return v(a)})){T.Ea(c);break}}b.length&&(d=A.L(b),c=A.oa(b,function(){return!1},function(){return H("div")}),A.G(d),T.Q(c))}while(0);return c}function v(a,b){if(!a)return!1;if(3===a.nodeType&&
!r.Fc(a)||r.ba(a)||O(a,"table,tr,td,th,li")||Q(a)&&(b?!r.fc(a):!r.Qa(a)))return!0;for(var c=0;c<a.childNodes.length;c++)if(v(a.childNodes[c],b))return!0;return!1}function y(a,b){for(var c=[];a&&a!==u;)-1!==b.indexOf(G(a))&&c.unshift(a),a=a.parentNode;return c}function w(a,b){for(var c=[];a&&a!==u;)O(a,b)&&c.unshift(a),a=a.parentNode;return c}var p=a.b("context"),r=a.b("query"),A=a.b("format"),T=a.b("block"),u=p.root,K=/\u00a0\u00a0/gi,S={dl:function(a){if(a){for(var b=a.getElementsByTagName("dt"),
c=b.length;c--;)d(b[c]);b=a.getElementsByTagName("dd");for(c=b.length;c--;)T.Cc(d(b[c]));return d(a)}return a}};S.h1=S.h2=S.h3=S.h4=S.h5=S.h6=S.p=d;S.center=function(a){a=d(a);V(a,"text-align","center")};S.blockquote=function(a){a=d(a);a.style.marginLeft="";T.Cc(a);Bb(a).forEach(m);return a};S.th=function(a){a=p.S(a,"td");var b=document.createRange();b.selectNodeContents(a);A.I("bold","bold",b);return a};S.ol=S.ul=function(a,b){b||(X("li div",a).forEach(function(a){r.vb(a)||T.zb(a)}),X("li",a).forEach(T.Ga),
X('li[style*="list-style:"]',a).forEach(function(a){if("none"===R(a,"list-style")){for(;rc(a.previousSibling);)p.removeNode(a.previousSibling);O(a.previousSibling,"li")?(p.Xd(a,a.previousSibling,-1),p.removeNode(a)):a.removeAttribute("style")}}));l(a);return a};S.pre=function(a){return e(a)};var ja=Object.keys(S),Aa=null;a.g=function(a){if(!a)return null;a=sc(a);var b=!1,c=!1;y(a,ja).forEach(function(a){var d=G(a),e=S[d];e&&(e(a,b,c),"pre"===d?c=!0:-1!==["ul","ol"].indexOf(d)&&(b=!0))});if(!b){var d=
[];w(a,"*[style]").forEach(function(a){var b=R(a,"white-space");if("pre"===b||"pre-wrap"===b)a=e(a),c=!0;for(var b=["overflow","overflow-y","overflow-x","line-height"],g=b.length;g--;){var k=b[g];R(a,k)&&(Rd(a),U(a,k))}b=R(a,"position");if("absolute"===b||"fixed"===b)b=a,b.parentNode===u?(Rd(b),V(b,"position","relative")):(g=R(b.parentNode,"position"),g&&"relative"!==g||(g=R(b,"top"),k=R(b,"left"),g&&"0px"!==g||k&&"0px"!==k||(Rd(b),V(b,"position","relative"))));"fixed"===R(a,"position")&&(Aa||(Aa=
I(u)),b=I(a),(b.right<Aa.left||b.bottom<Aa.top)&&d.push(a));"none"===R(a,"display")&&d.push(a)});for(var f=d.length;f--;)Ab(d[f]);c||(a=sc(a),a=k(a))}a=sc(a);Rd(a);m(a);if(a=r.A(a))g(a),n(a);Sd();return a};a.Va=function(){a.g(Gc(p.a()));h()};a.ce=function(){a.g(Yb(p.a()));h()};a.Hc=function(){p.a().collapsed||a.ce();a.Va()};a.ve=function(){for(var b=Gc(p.a()),c,d=2;b&&0<d;)rc(b)?c=Rb(b,u):r.n(b)?(--d,c=a.g(b),c=pc(c,function(a){return r.n(a)&&r.A(c)!==r.A(a)},u)):c=Rb(b,u),z(c!==b,"iterate!",c,b),
b=c;h()};a.wc=function(b,c){p.a()||p.e(u,0);var d=0;c||(c=D);var e=A.lb();X("td:empty,th:empty",e).forEach(function(a){p.fb(Qb(),a)});X("li:empty",e).forEach(function(a){p.fb(H("br"),a)});X("hr",e).forEach(function(a){a.parentNode!==e&&T.M([a])});for(var g=b||e.firstChild,k;g&&c(g)&&1111>d++;){g=sc(g);if(rc(g)&&1<M(g.parentNode))k=Sb(g,e),p.removeNode(g);else if(r.n(g)||O(g,"td,li,div")){var f=g.nextSibling;(k=a.g(g))||(k=f);k=oc(k,function(a){return r.n(a)&&r.A(k)!==r.A(a)},e)}else k=Sb(g,e);g=k}h();
0>=d&&x.error("Normalization reached safety limit, this probably indicates that the current document failed to get normalized and may behave unexpectedly.")};a.Sa=function(){p.a().collapsed?a.Va():a.wc(Gc(p.a()),function(a){var b=p.a();return b&&!(a.compareDocumentPosition(Yb(b))&2)})}}};function ze(a){return(a=/^[\'\"]?(.*?)[\'\"]?(,|$)/.exec(a))&&a[1]?a[1]:null};function Ae(){var a=this;a.name="editor";a.d=function(){function b(a,b){var d=!1;0==g&&null!=a?c.Xa(a):0==g&&(c.R(),d=!0);g++;var e=Ka(function(){return b()});g--;d&&c.ja();return e}var c=a.b("context"),d=a.b("query"),e=a.b("format");a.b("block");var f=a.b("normalize"),h=c.K;ud(c.root);var g=0;a.execCommand=function(c,d,e,g){if(1===arguments.length||4<=arguments.length&&null==d)d=!1;if(2>=arguments.length||4<=arguments.length&&null==e)e="";return b(g,function(b,c,d){return function(){if(!(b in h&&
a.queryCommandEnabled(b)))return!1;var c=h[b],e=c.action(""===d?null:d);c.Ba&&a.b("spellcheck").Ba(b);if(!0!==e&&!1!==e)throw"execCommand() didn't return true or false: "+e;return!1!==e}}(c,d,e))};a.queryCommandEnabled=function(a,d){return b(d,function(a){return function(){return a in h?c.i(a).enabled?c.i(a).enabled():c.hasFocus():!1}}(a))};a.queryCommandIndeterm=function(a,d){return b(d,function(a){return function(){return c.i(a).ea?h[a].ea():!1}}(a))};a.queryCommandState=function(a,d){return b(d,
function(a){return function(){var b=c.i(a);return b.state?null!=c.dc(a)?c.dc(a):b.state():!1}}(a))};a.queryCommandSupported=function(a){return a in h};a.queryCommandValue=function(a,d,e){return b(e,function(){return c.i(a).value?h[a].value(d):""})};c.Pb=function(){Object.keys(h).forEach(function(a){c.i(a).W||(h[a].W=null);c.i(a).V&&!c.i(a).ea&&(h[a].ea=function(){if(!c.a())return!1;var b=e.ka(c.a(),d.$).map(function(b){return e.r(b,a)}),g=b.filter(function(b){return-1!=h[a].V.indexOf(b)});return 1<=
g.length&&1<=b.length-g.length});c.i(a).V&&(h[a].state=function(){var b=c.a();return b?-1!==h[a].V.indexOf(e.r(b.startContainer,a)):!1});c.i(a).be&&(h[a].ea=function(){if(!c.a())return!1;for(var b=e.ka(c.a(),d.$).map(function(b){return e.r(b,a)}),g=1;g<b.length;g++)if(b[g]!==b[g-1])return!0;return!1},h[a].value=function(){if(!c.a())return"";var b=e.Oa(c.a(),d.$);null==b&&(b=c.a().startContainer);b=e.r(b,a);return null===b?"":b});if(c.i(a).J){var b=h[a].action;h[a].action=function(a){var d=e.yb();
a=b(a);c.ja();c.a().collapsed&&e.ya(d);return a}}})};a.Sa=f.wc;a.He=function(){return h}}};function Be(){function a(){T=w.c.timeout(function(){var a=-u;u=I(A).width;a+=u;0!==a&&B(A.querySelectorAll("table"),function(a){k(a)})},100,T)}function b(a){v(a.target);k(a.target);d(a)}function c(a){d(a)}function d(a){y(a.target);f(a.target)}function e(a,b){var c=[],d=-1,e=N(a,"table"),g=N(a,"tr");null==b&&(b=0);if(null==e||null==g)return x.warn("Couldn't find tr or table for a td! <$>"),[];for(var g=g.querySelectorAll("td"),f=0;f<g.length;f++)g[f]===a&&(d=f);if(-1===d)return x.warn("Couldn't find td within its tr! <%>"),
[];d+=b;if(0>d||d>g.length-1)return[];B(e.querySelectorAll("tr"),function(a){a=a.querySelectorAll("td");null!=a[d]&&c.push(a[d])});return c}function f(a){if(!1!==g(a)&&!1!==h(a)){var b=r.$b(a);"right"===b?l(a):("center"===b&&l(a),n(a));m(a)}}function h(a){var b=la(a.querySelectorAll("colgroup")),c=b[0]||null,d;if(0===b.length)return!0;d=X("col",c);for(var e=0;e<b.length;e++)if(null!=d[e].getAttribute("style"))return!1;for(e=0;e<d.length;e++)if(null!=d[e].getAttribute("style"))return!1;k(a);Ab(c);
return!0}function g(a){if(N(a.parentElement,"table")||null!=a.querySelector("table"))return!1;var b=!1;B(p.va(a),function(a){xb(a,"table-edge")&&(b=!0)});return b?!1:!0}function m(a){var b=a.querySelector("tr").querySelectorAll("td");B(b,function(c){if(c!==b[b.length-1]){var d=p.Tb(c,"tableColumnEdge");E(d,"table-edge");var g=H("div",{"class":"line"});d.appendChild(g);var f,r,h,l,n,m,y=e(c),T=e(c,1),u=I(d).width;p.jc(d,function(){v(a);var b=I(y[0]),c=I(T[0]);f=b.width;r=c.width;h=window.innerWidth-
b.left-35;l=window.innerWidth-c.right+35;n=I(a).width;m=parseInt(R(d,"right"),10);E(d,"no-hide-element")},function(a){a=m-a;a>h-u&&(a=h-u);a<l&&(a=l);d.style.right=a+"px"},function(b){b<-f+35&&(b=-f+35);b>r-35&&(b=r-35);var c=(r-b)/n*100;y[0].style.width=(f+b)/n*100+"%";T[0].style.width=c+"%";yb(d,"no-hide-element");p.Gd(d);k(a);od(A,"setDirty",{Kb:!0});p.xa()},"cursor: col-resize;")}})}function n(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,g=r.$b(a),f=p.Tb(a,"rightEdge");
E(f,"table-edge");f.appendChild(H("div",{"class":"line"}));var h=I(f).width,l;p.jc(f,function(){v(a);var e=I(a);b=e.width;c=window.innerWidth-e.left;l=parseInt(R(f,"right"),10);d=I(a.parentNode).width;E(f,"no-hide-element")},function(a){if("center"===g){a=l-a;var d=c-(h+e+b)/2;a>d&&(a=d)}else a=l-a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);f.style.right=a+"px"},function(c){b="center"===g?b+2*c:b+c;b<e&&(b=e);c=b/d*100;100<c&&(c=100);yb(f,"no-hide-element");a.style.width=c+"%";k(a);od(A,"setDirty",{Kb:!0});p.xa()},
"cursor: col-resize;")}function l(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,g=r.$b(a),f=p.Tb(a,"leftEdge");E(f,"table-edge");f.appendChild(H("div",{"class":"line"}));var h=I(f).width,l;p.jc(f,function(){v(a);var e=I(a);b=e.width;c=e.right;l=parseInt(R(f,"left"),10);d=I(a.parentNode).width;E(f,"no-hide-element")},function(a){if("center"===g){a=l+a;var d=c-(b+e+h)/2;a>d&&(a=d)}else a=l+a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);f.style.left=a+"px"},function(c){b="center"===g?b-2*c:
b-c;b<e&&(b=e);c=b/d*100;100<c&&(c=100);yb(f,"no-hide-element");a.style.width=c+"%";k(a);od(A,"setDirty",{Kb:!0});p.xa()},"cursor: col-resize;")}function k(a){var b=I(a).width,c=35/b*100,d=[],e=0,g=0,f=a.querySelector("tr");if(null!=f&&(f=f.querySelectorAll("td"),0!==f.length)){b<35*f.length&&(b=35*f.length);var k=I(a.parentNode).width,k=Math.max(0,Math.min(100,b/k*100)),r=R(a,"width"),h=null;null!=r&&(h=td(r||""));h&&h.Za&&"%"===h.Za?V(a,"width",k+"%"):V(a,"width",b+"px");var l=[];B(f,function(a){a=
I(a).width;l.push(a/b*100+"%")});B(f,function(a){var b=I(a).width,f=l.shift();null==f&&(x.error("Length of first row magically changed <$>"),f="0%");V(a,"width",f);35>=b?(V(a,"width",c+"%"),g++):d.push(a);e+=parseInt(R(a,"width"),10)});if(0!==d.length&&0!==g){a=g*c;var n=e-a,m=100-a;B(d,function(a){var b=parseInt(R(a,"width"),10),b=b/n*m;V(a,"width",b+"%")})}}}function v(a){V(a,"table-layout","fixed")}function y(a){B(p.va(a),function(a){xb(a,"table-edge")&&p.detach(a)});B(a.querySelectorAll("td"),
function(a){B(p.va(a),function(a){xb(a,"table-edge")&&p.detach(a)})})}var w=this,p=null,r=null,A=null;w.name="ui-table";var T,u=null;w.d=function(){A=w.b("context").root;E(A,"en-ui-table-on");p=w.b("layer");r=w.b("table");p.we(function(a,b){function c(b){f(a);b.stopPropagation();return!1}cd()?(console.log("setting up with onmouseenter"),b.fa=w.c.a(a,"mouseenter",c)):(console.log("setting up with onmouseover"),b.fa=w.c.a(a,"mouseover",c))},function(a,b){b.fa&&w.c.remove(b.fa)});w.c.e(A,"TABLE_ALIGN",
d);w.c.e(A,"TABLE_INSERT_ROW",c);w.c.e(A,"TABLE_DELETE_ROW",d);w.c.e(A,"TABLE_INSERT_COLUMN",c);w.c.e(A,"TABLE_DELETE_COLUMN",b);u=I(A).width;w.c.a(window,"resize",a)};w.s=function(){yb(A,"en-ui-table-on");B(A.querySelectorAll("table"),function(a){y(a)});A=null}};function Ce(){var a=this;a.name="copy";a.d=function(){function b(){var a=Y(l);return!(!a||a.collapsed)}function c(){x.warn("The copy/cut action will only work if a ClipboardEvent is passed. Limited to WEB right now and highly experimental!")}function d(){var a=Y(l);return e(l,a)}function e(b,c){var d={html:!0,raw:!0,resources:!0,plain:!0},d=C(d,{plain:!0,html:!1,raw:!1,xhtml:!1,resources:!1});if(!c||c.collapsed)return"";var e=Pd.nc("rte").N(),h=e.nc("query"),r=e.nc("table"),l=h.Hb(c.startContainer,
c.startOffset),n=N(c.startContainer,"td.en-selected",b),e=0;null!==n&&(l=h.Hb(n,0),n=r.cd(n),0<n.column&&(e=n.column));c.setStart(l[0],l[1]);n=N(c.endContainer,"td.en-selected",b);l=0;if(null!==n){var u=h.pc(n,M(n));c.setEnd(u[0],u[1]);n=r.cd(n);(r=r.Ad(n.table))&&r.columns>n.column&&(l=r.columns-n.column-1)}n=c.cloneContents();r=document.createElement("body");r.appendChild(n);for(n=c.commonAncestorContainer;n&&h.h(n)&&h.n(n);)F(n)&&Nb(r,n.cloneNode(!1)),n=n.parentNode;if(Bb(r).some(function(a){return O(a,
"li,tr,td")})&&(h=N(c.startContainer,"table,ul,ol",b)))for(h=h.cloneNode(!1),r.insertBefore(h,r.firstChild);;)if((n=r.children[1])&&O(n,"li,ol,ul,tr,td"))h.appendChild(n);else break;if(0<e||0<l){var K=W("tr",r);if(0<e&&0<K.length)for(var S=K[0],h=0;h<e;h++)n=S.firstChild.cloneNode(!1),u=H("div",{},[H("br")]),n.appendChild(u),S.insertBefore(n,S.firstChild);if(0<l&&0<K.length)for(e=K[K.length-1],h=0;h<l;h++)n=e.lastChild.cloneNode(!1),u=H("div",{},[H("br")]),n.appendChild(u),e.appendChild(n)}var ja=
{};d.plain&&tc(r.cloneNode(!0),function(a){a=(a=(a.innerText||a.textContent).replace(ua,""))?a.replace(/\u00A0/g," "):"";ja.plain=a});d.resources&&(ja.resources=f(r)||[]);d.raw&&(e=r.cloneNode(!0),ne(e),ja.raw=Ga(e.outerHTML).replace(ua,""));d.html&&(a.b("transform").zc(r,3),g(r),ne(r),m(r),ja.html=Ga(r.outerHTML).replace(ua,""));return JSON.stringify(ja)}function f(a){if(!a)return null;try{var b=[],c=a.querySelectorAll("embed[id],img[id]");for(a=0;a<c.length;a++){var d=c[a],e=(d.getAttribute("id")||
"").split(":");if(3<=e.length&&"en-media"===e[0]){var g=e[2];g&&(d.setAttribute("src","?hash="+g),-1===b.indexOf(g)&&b.push(g))}}return b}catch(f){x.error("Exception in collectResourcesAction <$>",f.toString())}return null}function h(a){a=(a||"").split(":");return 3<=a.length&&"en-media"===a[0]?a[2]:null}function g(a){X("embed[src][id]",a).forEach(function(b){var c=h(b.id);c&&(c=Pb(a,"object",{type:"application/x-apple-msg-attachment",data:"cid:"+c}),Fb(b,c))});X("img[src]",a).forEach(function(a){var b=
h(a.id);b&&(a.setAttribute("src","cid:"+b),a.removeAttribute("class"),a.removeAttribute("id"),a.removeAttribute("data-en-resource-reference"))})}function m(a){var b={},c={};a instanceof Element&&(b=Xb(a));b&&b["font-family"]||(b=Xb(document.body));b&&(c["font-family"]=b["font-family"],c["font-size"]=b["font-size"]);for(var b=Bb(a),d=b.length-1;0<=d;d--){var e=b[d];if(3===e.nodeType){if(0===e.textContent.length)continue;var g=H("span");a.insertBefore(g,e);g.appendChild(e);e=g}for(var f in c)g=c[f],
null===R(e,f)&&void 0!==g&&V(e,f,g)}}var n=a.b("context"),l=n.root;a.c.b({name:"copy",action:function(){c();return!0},value:function(){if(b())return d()},enabled:function(){return b()}});a.c.b({name:"cut",action:function(){a.b("undo").ra(function(){c();a.b("edit").v()});return!0},value:function(){var c=null;b()&&a.b("undo").ra(function(){c=d();null!=c&&a.b("edit").v()});return c},enabled:function(){return n.hasFocus()&&b()}})}};function De(){var a=this;a.name="paste";a.d=function(){function b(b,c){c=C(c,{value:"",selection:""},!1);c=C(bb(b),c,!0);var g=c.mode,f=c.type,h=c.value,r=c.selection;r&&(Dd(e.root,r),e.R());if(t(h)){if(r="raw"!==g)r=h.trim(),Fa.lastIndex=0,r=t(r)&&Fa.test(r);if(r)return g=H("a",{href:h.trim()},[h]),a.insertNode(g,!0,!1);"pre"===g&&(h=h.replace(/\t/gi,"    ").replace(/[^\S\r\n]/gi,"\u00a0").replace(/\u00a0\u00a0/gi,"\u00a0 "));if("plain"===f)return a.g(h);r=d(!0);r=Oc(r,h);if(!r)return!0;if("raw"===
g)return a.insertNode(h,!0,!1);if("html"===f&&("plain"===g||"pre"===g||"simple"===g)){f=a.b("simpletext");if(f="simple"===g?f.me(r):f.Fd(r))r=f.ownerDocument.createRange(),r.selectNodeContents(f),r=r.cloneContents();if("plain"===g||"pre"===g)return a.g(r)}return a.insertNode(r,!0,"rich"===g||"simple"===g)}return!0}function c(a){var b={};if(N(e.a().startContainer,"li")&&O(a.firstChild,"ol,ul,li")){var b={Lc:[],lastChild:null},c=N(e.a().startContainer,"li");f.wa(c,1)&&Eb(c);for(var c=X("ol,ul",a),d=
0;d<c.length;d++){var g=c[d];if(null!=g){for(var r=!0,h=g.parentNode;h;){if(-1!==["ol","ul"].indexOf(G(h))){r=!1;break}h=h.parentNode}r&&Gb(g)}}c=a.querySelector("li");O(c.parentNode,"ol,ul")||Gb(c);b.lastChild=a.lastChild;b.Lc=f.Wb(a)}else b.lastChild=a.lastChild,b.Lc=f.Wb(a);e.a().insertNode(a);return b}function d(a){var b=e.a();b||(b=Ac(),b.selectNodeContents(n),b.collapse(!1),e.Xa(b),e.ja());a||m.v();return e.a()}var e=a.b("context"),f=a.b("query"),h=a.b("block"),g=a.b("normalize"),m=a.b("edit"),
n=e.root,l=e.K;a.g=function(a){m.v({Qb:!1});if(!e.a())return x.warn("insertPlainText did fail due to missing content"),!1;var b;t(a)&&(b=a);var c;a instanceof DocumentFragment?c=a:a instanceof Node&&(c=document.createDocumentFragment(),c.appendChild(a));c&&tc(document.createElement("body"),function(a){a.appendChild(c);b=(a.innerText||a.textContent||"").replace(/\u00A0/g," ")});a=b.split(/\n/gi);for(var d=e.i("insertparagraph").action,g=0;g<a.length;g++){var r=a[g];0<g&&d&&d();if(r&&r.length){var h=
e.a(),l=h.startContainer,h=h.startOffset;0<=h-1&&h-1<l.childNodes.length&&3===l.childNodes[h-1].nodeType&&(l=l.childNodes[h-1],h=M(l));0<=h&&h<l.childNodes.length&&3===l.childNodes[h].nodeType&&(l=l.childNodes[h],h=0);f.m(l)&&f.wa(l)&&(h=f.pc(l,h),l=h[0],h=h[1]);e.e(l,h);r.trim()&&(3===l.nodeType?(l.insertData(h,r),e.e(l,h+r.length)):(1===l.childNodes.length&&f.fc(l.firstChild)&&l.removeChild(l.firstChild),l=document.createTextNode(r),e.a().insertNode(l),e.e(l,r.length)))}}e.a().collapse(!1);return!0};
a.insertNode=function(b,l,n){function m(a){[].filter.call(a.childNodes,function(a){return f.h(a)&&!f.Sd(a)&&J(a)>=e.a().startOffset}).forEach(function(a){a.parentNode.removeChild(a)})}if(!b)return x.warn("insertNode failed due to missing content"),!1;var p=d(),r;l&&(r=document.createTextNode("\u00a0"),p.insertNode(r),p.selectNode(r),e.i("removeformat").action(),e.e(r,1));var A;t(b)?A=e.a().createContextualFragment(b):b instanceof DocumentFragment?A=b:b instanceof Node&&(A=document.createDocumentFragment(),
A.appendChild(b));n&&(a.b("transform").gb(A,3),g.Va());if(0<Lc(p,"table").length||N(p.startContainer,"table")||N(p.endContainer,"table"))if(n=W("table",A),0<n.length){var T=a.b("simpletext");for(b=0;b<n.length;b++){var u=n[b],K=u.nextSibling,S=u.parentNode,ja=T.Fd(u);Ub(u,S)&&S.removeChild(u);K?S.insertBefore(K,ja):S.appendChild(ja)}}p.collapse(!1);e.Xa(p);e.ja();if(null==A.childNodes||0===A.childNodes.length)return x.warn("insertNode failed to empty content argument"),!1;f.m(e.a().startContainer)?
m(e.a().startContainer):l&&f.m(e.a().startContainer.parentNode)&&m(e.a().startContainer.parentNode);p=c(A);l=p.Lc;p=p.lastChild;e.e(p.parentNode,J(p)+1);h.Ea(e.a().startContainer);h.Ea(p);for(b=0;b<l.length;b++)h.Q(l[b]);r&&1===r.length&&e.removeNode(r);e.ja();g.Va();p&&p.parentNode&&e.e(p.parentNode,J(p)+1);return!0};l.inserthtml={l:!0,J:!0,action:function(b){if(null!=b){var c=null;t(b)?(c=d(),c=Oc(c,b)):c=b;null!=c&&(a.b("transform").gb(c,3),g.Va(),a.insertNode(c,!1,!1))}return!0},value:function(){var a=
e.a();if(!a||a.collapsed)return"";var b=f.Hb(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();return Ha(a)}};l.inserttext={l:!0,action:function(b){return a.g(b)}};l.paste={l:!0,action:function(a){return b(a,{type:"html",mode:"rich"})}};l.pasteraw={l:!0,action:function(a){ka('Please use execCommand("paste", { type: "html", mode: "raw", "value": ... })');return b(a,{type:"html",mode:"raw"})}};l.pasteplain={l:!0,action:function(a){ka('Please use execCommand("paste", { type: "plain", mode: "pre", "value": ... })');
return b(a,{type:"plain",mode:"pre"})}};l.pastesimple={l:!0,action:function(a){ka('Please use execCommand("paste", { type: "html", mode: "simple", "value": ... })');return b(a,{type:"html",mode:"simple"})}}};a.s=function(){a.j=null}};function Ee(){function a(a){a=a.toString().trim();return 0<b.f.maxLength?a.slice(0,b.f.maxLength):a}z(this instanceof Ee,"Use `new` to instantiate this class");var b=this,c=null,d=!1;b.name="textfield-"+Ia();b.f=null;b.g=null;b.Da=null;b.d=function(d){b.f=C(d,{element:null,Jd:!1,maxLength:0,placeholder:null,bd:!1,ee:!0,xd:!0,qd:!0,sd:["textfield"],Fb:null,mc:null,yd:null,name:null,fontsize:null});c=b.f.element;z(!!c&&F(c),'"element" option must be an HTMLElement');b.c.Nb({Ia:b.f.sd});b.yc(b.f.placeholder);
b.$a(b.f.fontsize);b.setActive(b.f.qd);z(!(b.f.Jd&&b.f.maxLength),"Max length not supported for multi line fields");0<b.f.maxLength&&b.c.a(c,"input",function(){b.j();if(c.textContent.length>b.f.maxLength){var a=c.firstChild;if(Tb(a)){var d=Y(c).startOffset;a.textContent=b.j();Bc(Ac(a,Math.min(d,b.f.maxLength)))}z(t("title")&&!0,"module name expexted","title");Fd("warning",{module:"title"})}});b.f.mc&&b.f.name&&(b.c.a(c,"blur",function(){Hd(b.f.name,{focus:b.hasFocus()})}),b.c.a(c,"focus",function(){b.focus()}));
b.f.Fb&&(b.c.a(c,"input",function(){b.w(!0)}),b.c.a(c,"blur",function(){b.T()&&$a(b.f.Fb,{target:c,value:b.j(!1),blur:!0})}));b.f.yd&&b.c.a(c,"paste",function(a){if(a&&a.clipboardData){var c=a.clipboardData.getData("text/plain");b.g.ra(function(){document.execCommand("inserttext",!1,c.replace(/\s+/gi," "))});a.preventDefault()}});if(b.f.xd){var f=function(a,d){d=C(bb(a),d,!0);var e=d.value;if("html"===d.type)var f=Y(c),e=Oc(f,e).textContent;b.g.ra(function(){document.execCommand("inserttext",!1,e.replace(/\s+/gi,
" "))});return!0};b.c.b({name:"paste",action:function(a){if(b.hasFocus())return f(a,{type:"html",mode:"plain",value:""})},enabled:function(){return b.hasFocus()}});b.c.b({name:"pasteplain",action:function(a){if(b.hasFocus())return ka('Please use execCommand("textfield.paste", { type: "plain", mode: "plain", "value": ... })'),f(a,{type:"plain",mode:"plain",value:""})},enabled:function(){return b.hasFocus()}});var h=function(){var a=Y(c);return a&&!a.collapsed};b.c.b({name:"copy",value:function(){return h()?
{plain:Y(c).toString().replace(ua,"")}:null},enabled:h});b.c.b({name:"inserttext",action:function(a){if(b.hasFocus())return b.g.ra(function(){document.execCommand("inserttext",!1,a)}),!0},enabled:function(){return b.hasFocus()}});b.c.b({name:"delete",action:function(a){return"selection"===a?(document.execCommand("delete"),!0):!1},enabled:function(a){if("selection"===a)return b.hasFocus()}})}b.f.ee&&(b.g=new de,b.N().d(b.g,{element:c}),b.c.b({name:"undo",action:function(){b.g.de();return!0},state:function(){return b.g.Aa()},
value:function(){return b.g.fe()},enabled:function(){return b.hasFocus()&&b.g.Aa()}}),b.c.b({name:"redo",action:function(){b.g.Td();return!0},state:function(){return b.g.za()},value:function(){return b.g.Ud()},enabled:function(){return b.hasFocus()&&b.g.za()}}));b.c.b({name:"content",action:function(c){!b.f.bd||c&&a(c)!==b.u()||(c="");b.da(c);return!0},value:function(a){d=C(bb(a),{resetChangesState:!0});d.resetChangesState&&b.w(!1);return b.j()||(b.f.bd?b.u():"")},enabled:D,Ua:!0});b.c.b({name:"active",
action:function(a){b.setActive(ab(a))},state:function(){return b.H()},enabled:D,Ua:!0});b.c.b({name:"focus",action:function(){b.focus();return!0},state:function(){return b.hasFocus()},enabled:D,Ua:!0});b.c.b({name:"changes",action:function(a){a=ab(a);b.w(a);return!0},state:function(){return b.T()},enabled:D,Ua:!0});b.c.b({name:"selectall",action:function(){b.Ma();return!0},enabled:function(){return b.hasFocus()}})};b.s=function(){b.setActive(!1);b.Da=null;b.f=null;c.removeAttribute("data-en-placeholder");
c=null};b.j=function(d){d&&b.w(!1);return b.f.multiline?c.innerText||"":a(c.textContent)};b.da=function(d){c.textContent=a(d);b.w(!1)};b.hasFocus=function(){if(!b.H())return!1;var a=Y(c);return a&&(a=Gc(a))?!!N(a,cc):!1};b.focus=function(){c.focus();Bc(Ac(c,M(c)));b.f.mc&&b.f.name&&Hd(b.f.name,{focus:b.hasFocus()})};b.Ma=function(){c.focus();window.getSelection().selectAllChildren(c);b.f.mc&&b.f.name&&Hd(b.f.name,{focus:b.hasFocus()})};b.u=function(){return c.getAttribute("data-en-placeholder")||
""};b.yc=function(b){null!=b?c.setAttribute("data-en-placeholder",a(b)):c.removeAttribute("data-en-placeholder")};b.setActive=function(a){a!==b.H()&&(window.getSelection().containsNode(c,!0)&&Ec(),dc(c,a))};b.H=function(){return cc(c)};b.w=function(a){d=!!a;!0===b.T()&&b.f.Fb&&$a(b.f.Fb,{target:c,value:b.j(!1)})};b.T=function(){return d&&b.H()};b.$a=function(a){(a=vd(a,"px","px"))&&0<a.value&&V(c,"font-size",a.La)}};function Fe(){function a(){ka("Please use title.focus");return h.hasFocus()}function b(a){if("placeholder"===a)return h.u();if("focus"===a)return ka("Please use title.focus"),h.hasFocus();ka("Please use title.content");return h.j()||h.u()}function c(a){a=bb(a);var b=!1,c=a.active;null!=c&&(ka("Please use title.active"),h.setActive(c),b=!0);c=a.value;null!=c&&(ka("Please use title.content"),d(c),b=!0);!0===a.focus&&(ka("Please use title.focus"),h.focus(),b=!0);return b}function d(a){a&&a!==h.u()?h.j()!==
a&&h.da(a):h.da("");g=h.j()||h.u();h.w(!1)}z(this instanceof Fe,"Use `new` to instantiate this class");var e=this;this.name="title";var f=document.querySelector("#en-title");z(F(f),"Node for title required");var h=null,g=null;this.d=function(m){m=C(m,{active:!0,value:"",placeholder:"Untitled",fontsize:null});this.c.Nb({Ia:["title"]});h=new Ee;this.N().d(h,{element:f,Jd:!1,maxLength:255,placeholder:m.placeholder,bd:!0,ee:!0,xd:!0,qd:m.active,Fb:"titlechanged",sd:["title"],mc:!0,yd:m.pasteEvent,name:e.name,
fontsize:m.fontsize});this.c.k(function(){h=null});g=m.value;d(g);this.c.a(f,"keydown",function(a){var b=!1,c=(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0);9===a.keyCode?0===c?(Z.execCommand("content.focus",{pos:"top",force:!0}),b=!0):1===c&&(Jd(e.name),b=!0):13===a.keyCode&&(0===c?(Z.execCommand("content.focus",{pos:"top",force:!0}),b=!0):1===c?(Jd(e.name),b=!0):4!==c&&6!==c&&(b=!0));return b?bd(a):!0});this.c.b({name:"title",action:c,value:b,state:a,enabled:D})}};function Ge(){var a=this;a.name="crypt";a.d=function(){function b(){var a=d.a();if(!a||a.collapsed)return"";var b=e.Hb(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();return Ha(a)}function c(b){var c=d.a();if(!c)return!1;var e=null;if(t(b)){e=Oc(c,b);if(null==e)return!1;a.b("transform").gb(e,3)}else e=b;if(null==e)return!1;a.b("edit").v();b=e.firstChild;c.insertNode(e);d.e(b,0);return!0}var d=a.b("context"),e=a.b("query");a.b("normalize");var f=d.K;f.insertcrypto={J:!0,action:c,
value:b};f.revealcrypto={J:!0,mb:!0,action:c,value:b};f.crypt={action:function(){},value:function(){}}};a.aa=function(a,c){1===c&&X("en-crypt",a).forEach(function(a){var b;b="en-crypt:"+a.textContent.trim()+":"+a.getAttribute("cipher")+":"+a.getAttribute("length")+":"+a.getAttribute("hint");b=H("embed",{type:"evernote/x-crypto",align:"absmiddle",id:b});Fb(a,b)})};a.ia=function(a,c,d){if(1===c){var e=d.crypto||{};z(e,"Expected a crypto info on Mac here",e);W("div.en-crypt-revealed,div.en-crypto-revealed",
a).forEach(function(c){var d=c.getAttribute("id");e[d]?(d=e[d].split(":"),d=Pb(a,"en-crypt",{cipher:d[2],length:d[3],hint:d.slice(4).join(":")},[d[1]]),Fb(c,d)):x.error("Found revealed crypto but not replacement. Key:",d)});X('embed[type="evernote/x-crypto"]',a).forEach(function(c){var d=c.getAttribute("id").split(":"),d=Pb(a,"en-crypt",{cipher:d[2],length:d[3],hint:d.slice(4).join(":")},[d[1]]);Fb(c,d)})}}};function He(){var a=this;a.name="edit";a.d=function(){function b(a){function b(a){return O(a,"ol,ul")}for(var c=null;la(a.childNodes).some(b);){var d=a.lastChild;b(d)||!c&&rc(d)?(c=null,a.parentNode.insertBefore(d,a.nextSibling)):(c||(c=H("li"),a.parentNode.insertBefore(c,a.nextSibling)),c.appendChild(d))}}function c(a){window.getSelection().isCollapsed&&(window.getSelection().modify("extend",a?"backward":"forward","lineboundary"),l.R());return l.i(a?"delete":"forwarddelete").action()}function d(a){if(!window.getSelection().isCollapsed)return l.i("delete").action();
var b=N(l.a().startContainer,"li");y.wb()&&null!=b&&k.wa(b)||(window.getSelection().modify("extend",a?"backward":"forward","word"),l.R());return l.i(a?"delete":"forwarddelete").action()}function e(){if(l.a().collapsed){w.ve();var b=v.lb();if(!(k.vb(b)&&1===M(b)&&P(b.firstChild,"div")&&1===M(b.firstChild)&&P(b.firstChild.firstChild,"br"))){y.hb(l.a().startContainer,l.a().startOffset);var c=l.a().startContainer,b=l.a().startOffset;if(!l.a().collapsed||0!==b||0!==J(c)||!P(c.parentNode,"td")&&!P(c.parentNode.parentNode,
"td")||null!=N(c,"td").querySelector("li")){for(;;)if(0===b&&k.h(c.previousSibling)&&k.F(c.previousSibling))c.parentNode.removeChild(c.previousSibling);else if(0<=b-1&&b-1<c.childNodes.length&&k.h(c.childNodes[b-1])&&k.F(c.childNodes[b-1]))c.removeChild(c.childNodes[b-1]),b--;else if(0==b&&k.n(c)||k.F(c))b=J(c),c=c.parentNode;else{if(0<=b-1&&b-1<c.childNodes.length&&k.h(c.childNodes[b-1])&&P(c.childNodes[b-1],"a")){y.zb(c.childNodes[b-1]);return}if(0<=b-1&&b-1<c.childNodes.length&&!k.m(c.childNodes[b-
1])&&!Q(c.childNodes[b-1])&&!k.ba(c.childNodes[b-1]))c=c.childNodes[b-1],b=M(c);else break}if(0<b&&3===c.nodeType){var d=1;1<b&&ta(c.textContent.substring(b-2,b))&&(d=2);l.e(c,b-d,c,b);a.v()}else if(k.h(c)&&0<=b-1&&b-1<c.childNodes.length&&(O(c.childNodes[b-1],"br,hr")||k.ba(c.childNodes[b-1])))l.e(c,b-1,c,b),a.v();else if(!k.n(c))if(O(c,"li,dt,dd")&&c==c.parentNode.firstChild&&0==b){b=[];for(d=c.parentNode;d;d=d.parentNode)P(d,"li")&&b.unshift(d);for(d=0;d<b.length;d++)y.Ga(b[d]);b=v.L([c]);y.M([c]);
v.G(b);O(c,"dd,dt")&&k.Fa(c).every(function(a){return!k.t(c,a)||!k.B(c,a)})&&(c=l.S(c,"div"));y.Q(c)}else{for(var d=c,e=b;;)if(0==e)e=J(d),d=d.parentNode;else if(0<=e-1&&e-1<d.childNodes.length&&k.h(d.childNodes[e-1])&&k.F(d.childNodes[e-1]))d.removeChild(d.childNodes[e-1]),e--;else break;if(0===b&&k.ic(c,!0)&&k.Fa(c).concat(c).filter(function(a){return k.h(a)&&k.t(a,c)&&k.Ra(a)}).length)if(b=Ac(c,0),b=k.P(b),b=k.la(b,function(a){return k.h(a)&&!k.Ld(a)}),b.filter(function(a){return 3!==a.nodeType}).length)for(d=
0;d<b.length;d++)m(b[d]);else m(c);else if(!O(c,"table, .en-module, .en-crypt"))if(0<=e-1&&e-1<d.childNodes.length&&O(d.childNodes[e-1],"table, .en-module, .en-crypt"))l.e(d,e-1,d,e);else if(0==b&&(P(d.childNodes[e-1],"hr")||Q(d.childNodes[e-1])&&(Q(d.childNodes[e-1].previousSibling)||!k.n(d.childNodes[e-1].previousSibling))))l.e(d,e-1,d,e),a.v(),l.e(c,b);else if(O(d.childNodes[e],"li,dt,dd")&&O(d.childNodes[e].previousSibling,"li,dt,dd"))d=d.childNodes[e-1],e=M(d),c=d.nextSibling,l.e(d,e,c,0),a.v();
else{for(;0<=e-1&&e-1<d.childNodes.length;){var g=d.childNodes[e-1];k.h(g)&&k.F(g)?(d.removeChild(g),e--):O(g,"hr")?e--:(d=g,e=M(d))}l.e(d,e,c,b);a.v({direction:"backward"})}}}}}else a.v()}function f(a){w.Sa();for(var b=k.P(l.a()),b=k.kb(b,function(a){return 1===a.nodeType&&k.h(a)&&(a.hasAttribute("align")||""!=a.style.textAlign)}),c=0;c<b.length;c++){var d=b[c];d.removeAttribute("align");U(d,"text-align")}if("left"!=a)for(b=k.P(l.a()),b=k.la(b,function(a){return k.h(a)&&P(a,"div")});b.length;)b.shift().setAttribute("style",
"text-align: "+a)}function h(a){var b=a.toLowerCase(),c="tl"===b,d=c?"ul":b,e=l.a();if(e){w.Sa();var f=y.ma()===b?"disable":"enable",h=function(a){return k.Nd(a,b)},n=function(a){return!h(a)&&O(a,"ol,ul")},p=[];(function(){for(var a=e.endContainer;a!==e.commonAncestorContainer;a=a.parentNode)P(a,"li")&&p.unshift(a);for(a=e.startContainer;a;a=a.parentNode)P(a,"li")&&p.unshift(a)})();p.forEach(y.Ga);a=k.P(e);"enable"===f&&k.kb(a,function(a){return k.h(a)&&n(a)}).forEach(function(a){if(k.h(a.previousSibling)&&
h(a.previousSibling)||k.h(a.nextSibling)&&h(a.nextSibling)){a=[].slice.call(a.childNodes);var b=v.L(a);y.M(a);v.oa(a,function(a){return h(a)});v.G(b)}else l.S(a,d),zb(a,"en-todo-list",c),V(a,"-evernote-list-type",c?"todo":null)});a=k.la(a,function(a){return k.h(a)&&(O(a,"ol,ul")||O(a.parentNode,"ol,ul")||k.B(a,"li"))});"enable"==f&&(a=a.filter(function(a){return!O(a,"ol,ul")||O(a.parentNode,"ol,ul")}));if("disable"==f)for(;a.length;){var L=[];L.push(a.shift());if(h(L[0]))m(L[0]);else{for(;a.length&&
a[0]==L[L.length-1].nextSibling&&!h(a[0]);)L.push(a.shift());f=v.L(L);y.M(L);for(var ra=0;ra<L.length;ra++)y.Q(L[ra]);v.G(f)}}else for(;a.length;){for(L=[];!L.length||a.length&&a[0]==L[L.length-1].nextSibling;)if(O(a[0],"p,div"))a[0].style.margin="",a[0].style.textAlign="",a[0].removeAttribute("align"),jc(a[0]),L.push(l.S(a[0],"li")),a.shift();else if(O(a[0],"li,ol,ul"))L.push(a.shift());else{for(f=[];!f.length||a.length&&a[0]==f[f.length-1].nextSibling&&k.n(a[0])&&k.n(f[f.length-1])&&!Q(f[f.length-
1]);)f.push(a.shift());for(;f.length&&rc(f[f.length-1]);)f.pop();f.length&&L.push(v.oa(f,void 0,function(){return H("li")}))}h(L[0].parentNode)||L.every(function(a){return O(a,"ol,ul")})||(n(L[0].parentNode)?(L=la(L[0].parentNode.childNodes),f=v.L(L),y.M(L),v.oa(L,function(a){return h(a)},function(){return g(b)}),v.G(f)):(f=v.oa(L,function(a){return h(a)},function(){if(!(k.h(L[0].parentNode)&&k.xb(L[0].parentNode)&&k.h(L[0].parentNode.previousSibling)&&h(L[0].parentNode.previousSibling)))return g(b);
var a=L[0].parentNode.previousSibling;y.Ga(a.lastChild);k.h(a.lastChild)&&h(a.lastChild)||a.appendChild(g(b));return a.lastChild}),y.Q(f)))}}}function g(a){z(0<=["ul","ol","tl"].indexOf(a.toLowerCase()));return"tl"===a?H("ul",{"class":"en-todo-list",style:"-evernote-list-type:todo"}):H(a)}function m(a){if(k.h(a))if(P(a,"div")){var b=k.Yb(a)-40;0<b?V(a,"margin-left",b+"px"):y.zb(a)}else if(k.xb(a))y.zb(a);else if(k.Ra(a))a.removeAttribute("dir"),a.style.margin="",a.style.padding="",a.style.border=
"",""!=a.getAttribute("style")&&"border-width: initial; border-color: initial; "!=a.getAttribute("style")||a.removeAttribute("style"),l.S(a,"div");else{for(var b=a.parentNode,c=[];k.h(b)&&1==b.nodeType&&!k.xb(b)&&!O(b,"ol,ul");)c.push(b),b=b.parentNode;if(!k.h(b)||!k.xb(b))for(b=a.parentNode,c=[];k.h(b)&&1==b.nodeType&&!k.Ra(b)&&!O(b,"ol,ul");)c.push(b),b=b.parentNode;if(O(a,"ol,ul")&&(!k.h(b)||!k.Ra(b))){a.removeAttribute("reversed");a.removeAttribute("start");a.removeAttribute("type");b=[].slice.call(a.childNodes);
if(O(a.parentNode,"ol,ul")||la(a.parentNode.childNodes).every(function(){return O(a,"ol,ul")||rc(a)}))c=v.L([].slice.call(a.childNodes)),y.zb(a),v.G(c);for(c=0;c<b.length;c++)y.Q(b[c])}else if(k.h(b)&&k.Ra(b)){c.push(b);for(var d=b;c.length;){var b=c.pop(),e=a.parentNode==b?a:c[c.length-1];k.n(e)&&!Q(e)&&Q(e.nextSibling)&&e.parentNode.removeChild(e.nextSibling);var g=[].slice.call(b.childNodes,1+J(e));n([].slice.call(b.childNodes,0,J(e)));n(g)}m(d)}}}function n(a){if(a.length){var b=a[0];if(O(b.parentNode,
"ol,ul")){var c=k.nb(b.parentNode);v.oa(a,function(a){return k.Nd(a,c)},function(){return g(c)})}else for(;a.length;)b=a.shift(),P(b,"div")?y.Cc(b):(b=v.oa([b],function(a){return k.xb(a)?!0:!1},function(){return H("div",{style:"margin-left:40px;"})}),y.Q(b))}}var l=a.b("context"),k=a.b("query"),v=a.b("format"),y=a.b("block"),w=a.b("normalize"),p=l.K;a.v=function(b){if(l.a()){w.Hc();var c=0<Lc(l.a(),"td").length;y.ne(b);c&&a.g();w.Va()}};a.g=function(){for(var a=W("td",l.root),b=0;b<a.length;b++)if(0===
M(a[b])){var c=H("div",{},[H("br")]);a[b].appendChild(c)}};p.deleteword={Ba:!0,J:!0,action:function(){return d(!0)}};p.forwarddeleteword={Ba:!0,J:!0,action:function(){return d(!1)}};p.deleteline={Ba:!0,J:!0,action:function(){return c(!0)}};p.forwarddeleteline={Ba:!0,J:!0,action:function(){return c(!1)}};p["delete"]={Ba:!0,action:function(b){v.te(function(){"selection"===b?a.v():"word"===b?d(!0):"line"===b?c(!0):e()});return!0}};p.forwarddelete={Ba:!0,J:!0,action:function(b){"selection"===b?a.v():
"word"===b?d(!1):"line"===b?c(!1):l.a().collapsed?(b=l.a(),window.getSelection().modify("extend","forward","character"),window.getSelection().collapseToEnd(),l.R(),Hc(b,l.a())||l.i("delete").action()):a.v();return!0}};p.indent={l:!0,J:!0,action:function(){w.Sa();for(var a=[],b=l.a().endContainer;b!=l.a().commonAncestorContainer;b=b.parentNode)P(b,"li")&&a.unshift(b);for(b=l.a().startContainer;b!=l.a().commonAncestorContainer;b=b.parentNode)P(b,"li")&&a.unshift(b);for(b=l.a().commonAncestorContainer;b;b=
b.parentNode)P(b,"li")&&a.unshift(b);for(b=0;b<a.length;b++)y.Ga(a[b]);a=k.P(l.a());a=k.la(a,function(a){return k.h(a)&&O(a,"div,li")});b=a.filter(k.D)[0];if(P(b,"li")&&O(b.parentNode,"ol,ul")){for(b=b.previousSibling;k.F(b);)b=b.previousSibling;P(b,"li")&&y.Ga(b)}for(;a.length;){b=[];for(b.push(a.shift());a.length&&a[0]==b[b.length-1].nextSibling;)b.push(a.shift());n(b)}return!0}};p.outdent={l:!0,J:!0,action:function(){w.Sa();var a=v.lb(),b=[];(function(){for(var a=l.a().endContainer;a!=l.a().commonAncestorContainer;a=
a.parentNode)P(a,"li")&&b.unshift(a);for(a=l.a().startContainer;a;a=a.parentNode)P(a,"li")&&b.unshift(a)})();b.forEach(y.Ga);for(var c=k.P(l.a()),c=k.la(c,function(a){return k.h(a)&&(!k.Wb(a).some(k.h)||O(a,"ol,ul")||P(a,"li")&&O(a.parentNode,"ol,ul"))}),d=[];c.length;){for(;c.length&&P(bc(c[0],a),"div");){var e=bc(c.shift(),a);if(-1===d.indexOf(e)){d.push(e);var g=k.Yb(e)-40;0<g?V(e,"margin-left",g+"px"):(U(e,"margin-left"),U(e,"margin"))}}for(;c.length&&(O(c[0],"ol,ul")||!O(c[0].parentNode,"ol,ul"));)m(c.shift());
if(!c.length)break;e=[];for(e.push(c.shift());c.length&&c[0]==e[e.length-1].nextSibling&&!O(c[0],"ol,ul");)e.push(c.shift());g=v.L(e);y.M(e);e.forEach(y.Q);v.G(g)}return!0}};p.inserthorizontalrule={l:!0,J:!0,action:function(){if(y.hc())return!1;l.i("insertparagraph").action();var a=H("div",{},[H("hr")]),b=k.A(l.a().startContainer);l.o(a,b.parentNode,J(b));return!0},enabled:function(){return l.hasFocus()&&!y.hc()}};p.insertimage={l:!0,J:!0,action:function(b){if(""===b)return!1;b=H("img",{src:se(b)});
if(b){a.v({Qb:!1});var c=l.a();if(k.h(l.a().startContainer)||k.na(l.a().startContainer))k.m(c.startContainer)&&1==c.startContainer.childNodes.length&&Q(c.startContainer.firstChild)&&0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild),c.insertNode(b),l.e(b.parentNode,1+J(b))}b.removeAttribute("width");b.removeAttribute("height");return!0}};p.insertlinebreak={J:!0,action:function(){if(!y.wb())return l.i("insertparagraph").action();a.v({Qb:!1});if(!k.h(l.a().startContainer)&&
!k.na(l.a().startContainer)||1==l.a().startContainer.nodeType&&!k.B("br",l.a().startContainer)||1!=l.a().startContainer.nodeType&&!k.B("br",l.a().startContainer.parentNode))return!0;if(3==l.a().startContainer.nodeType&&0==l.a().startOffset){var b=l.a().startContainer.parentNode,c=J(l.a().startContainer);l.e(b,c)}3==l.a().startContainer.nodeType&&l.a().startOffset==M(l.a().startContainer)&&(b=l.a().startContainer.parentNode,c=1+J(l.a().startContainer),l.e(b,c));b=H("br");l.a().insertNode(b);l.e(b.parentNode,
1+J(b));k.fc(b)&&(l.a().insertNode(H("br")),l.e(b.parentNode,1+J(b)));return!0}};p.insertparagraph={J:!0,action:function(){var b=a.ac("todo");a.v();var c=l.a().startContainer,d=l.a().startOffset;if(!k.h(c)&&!k.na(c))return!0;3===c.nodeType&&0!==d&&d!==M(c)&&c.splitText(d);3===c.nodeType&&d===M(c)&&(d=1+J(c),c=c.parentNode);3===c.nodeType&&(d=J(c),c=c.parentNode);l.e(c,d);for(var e=c;!k.Gc(e)&&k.h(e.parentNode)&&k.t(c,e.parentNode);)e=e.parentNode;if(k.h(e)&&k.Gc(e)&&k.t(c,e.parentNode)&&O(e,"p,div")){for(var g=
e;!O(g,"dd,dt,li")&&k.h(g.parentNode);)g=g.parentNode;O(g,"dd,dt,li")&&(e=g)}if(!k.h(e)||!k.t(e,c)||!k.Gc(e)){g=k.P(l.a());g=k.la(g,function(a){return k.B(a,"p")}).slice(0,1);if(!g.length){if(!k.B("div",l.a().startContainer))return!0;e=Qb();l.a().insertNode(e);l.e(e,0);return!0}for(;g[g.length-1].nextSibling&&k.B(g[g.length-1].nextSibling,"p");)g.push(g[g.length-1].nextSibling);e=v.oa(g,Na,function(){return H("div")})}var g=!1,f=b?b.Vc(e):null;if(b&&null!=f){if(b.re(e))return Eb(e),e.appendChild(H("br")),
l.e(e,0),!0;g=!0}if(O(e,"address,listing,pre"))return b=H("br"),l.a().insertNode(b),l.e(c,d+1),Ub(k.nextNode(b),e)||(l.a().insertNode(H("br")),l.e(c,d+1)),!0;O(e,"li,dt,dd")&&y.Ga(e);if(O(e,"li,dt,dd")&&k.wa(e))return y.M([e]),k.Zb(e)||(l.je(e),e.appendChild(H("br"))),O(e,"dd,dt")&&k.Fa(e).every(function(a){return!k.t(e,a)||!k.B(e,a)})&&(e=l.S(e,"div")),y.Q(e),!0;for(d=Ac(l.a().startContainer,l.a().startOffset,e,M(e));0===d.startOffset&&!k.rb(d.startContainer);)d.setStart(d.startContainer.parentNode,
J(d.startContainer));for(;d.startOffset===M(d.startContainer)&&!k.rb(d.startContainer);)d.setStart(d.startContainer.parentNode,1+J(d.startContainer));var c=k.la(d),f=!c.length||1===c.length&&Q(c[0]),c=Gc(l.a()),h=v.lb(),c=N(c,function(a){return"a"!==G(a)},h)||c,c=v.L([c]),n;O(e,"h1,h2,h3,h4,h5,h6")&&f?n="div":P(e,"dt")&&f?n="dd":P(e,"dd")&&f?n="dt":n=e.tagName.toLowerCase();var m=H(n);for(n=0;n<e.attributes.length;n++)m.setAttributeNS(e.attributes[n].namespaceURI,e.attributes[n].name,e.attributes[n].value);
m.removeAttribute("id");m.removeAttribute("class");e.parentNode.insertBefore(m,e.nextSibling);f=k.kb(d);d=d.extractContents();h=k.Wb(d);for(n=0;n<h.length;n++)1===h[n].nodeType&&-1===f.indexOf(h[n])&&h[n].removeAttribute("id");for(n=d.childNodes.length-1;0<=n;n--)f=d.childNodes[n],Tb(f)?rc(f)&&Ab(f):k.wa(f)&&Ab(f);for(m.appendChild(d);k.rb(e.lastChild);)e=e.lastChild;for(;k.rb(m.lastChild);)m=m.lastChild;k.Zb(e)||(e.appendChild(H("br")),v.G(c.map(function(a){a[0]=e;return a})));if(k.Zb(m))m.children&&
1===m.children.length&&Q(m.children[0])&&v.G(c.map(function(a){a[0]=m;return a}));else{if(g)return Eb(m),b=b.Dc(m),l.e(b.parentNode,M(b)+1),v.G(c.map(function(a){a[0]=m;return a})),!0;m.appendChild(H("br"));v.G(c.map(function(a){a[0]=m;return a}))}n=0;g&&!b.Vc(m)&&(z(3!==m.nodeType,"newContainer for checkbox insertion cannot be text"),b.Dc(m),n++);b=k.pc(m,n);m=b[0];n=b[1];l.e(m,n);return!0}};p.insertorderedlist={l:!0,J:!0,action:function(){h("ol");return!0},ea:function(){return"mixed"===y.ma()},
value:function(){return y.ma()},state:function(){return"ol"===y.ma()}};p.insertunorderedlist={l:!0,J:!0,action:function(){h("ul");return!0},ea:function(){return"mixed"===y.ma()},value:function(){return y.ma()},state:function(){return"ul"===y.ma()}};p.inserttodolist={l:!0,J:!0,action:function(){h("tl");return!0},ea:function(){return"mixed"===y.ma()},value:function(){return y.ma()},state:function(){return"tl"===y.ma()}};[{name:"justifyfull",mode:"justify"},{name:"justifyleft",mode:"left"},{name:"justifycenter",
mode:"center"},{name:"justifyright",mode:"right"}].forEach(function(a){p[a.name]={l:!0,J:!0,action:function(){f(a.mode);return!0},ea:function(){if(!l.a())return!1;var b=k.kb(k.P(l.a()),function(a){return k.h(a)&&k.D(a)&&!a.hasChildNodes()});return b.some(function(b){return y.bc(b)==a.mode})&&b.some(function(b){return y.bc(b)!=a.mode})},state:function(){if(!l.a())return!1;var b=k.kb(k.P(l.a()),function(a){return k.h(a)&&k.D(a)&&!a.hasChildNodes()});return b.length&&b.every(function(b){return y.bc(b)==
a.mode})},value:function(){if(!l.a())return"";var a=k.kb(k.P(l.a()),function(a){return k.h(a)&&k.D(a)&&!a.hasChildNodes()});return a.length?y.bc(a[0]):"left"},enabled:function(){return l.hasFocus()&&!y.wb()}}});p.selectall={action:function(){window.getSelection().selectAllChildren(l.root);return!0},enabled:D,mb:!0};p.tab={l:!0,J:!0,action:function(b){var c="true"===b||1===+b;if(y.Qd()){var d=a.ac("table");if(d)return b=d.k(),d=d.cc(),c?(b=pc(d,"td",b))&&l.e(b,0):(c=oc(d,"td",b),c||(l.i("inserttablerow").action("after"),
c=oc(d,"td",b)),l.e(c,0)),!0}if(y.wb()||!l.a().collapsed)return l.i(c?"outdent":"indent").action();c||l.i("inserthtml").action("\u00a0\u00a0\u00a0\u00a0\u00a0");return!0}};a.aa=function(a){X('div[style~="margin-left:"]>ul,div[style~="margin-left:"]>ol',a).forEach(function(b){var c=b.parentElement;if(O(c,"div")){for(var d=R(c,"margin-left"),d=+d.replace(/(\d+)em/gi,"$1"),e=null;0<d;){var g=Pb(a,b.tagName);e?e.appendChild(g):c.insertAdjacentElement("afterEnd",g);e=g;d-=2}e&&(Kb(c,e),Ab(c))}});X('li[style*="list-style:"]',
a).forEach(function(a){"none"===R(a,"list-style")&&Gb(a)});X("li",a).forEach(b);X("ol,ul",a).forEach(function(b){var c=null;la(b.childNodes).forEach(function(b){-1!==["li","ol","ul"].indexOf(G(b))?c=null:rc(b)?Ab(b):$b(b)?Ob(b,"li"):(c||(c=Pb(a,"li"),b.parentNode.insertBefore(c,b.nextSibling)),c.appendChild(b))})});X('ul[style*="-evernote-list-type"]',a).forEach(function(a){E(a,"en-todo-list");Bb(a).forEach(function(a){if(P(a,"li")){var b=!1,c=W("object.en-todo",a).shift();c&&(b=xb(c,"en-todo-checked"),
Ab(c));yb(a,"en-todo-over");zb(a,"en-todo-checked",b)}})})};a.ia=function(a){X("ul.en-todo-list",a).forEach(function(b){Bb(b).forEach(function(b){if(P(b,"li")){var c=Pb(a,"object",{"class":"en-todo"});zb(c,"en-todo-checked",xb(b,"en-todo-checked"));b.insertBefore(c,b.firstChild)}})});X("ol>ul,ul>ol,ul>ul,ol>ol",a).forEach(function(b){var c=b.previousSibling;P(c,"li")?c.appendChild(b):(c=Pb(a,"li",{style:"display:inline;list-style:none;"}),b.parentNode.insertBefore(c,b),c.appendChild(b))})}}};function Ie(){function a(a){return H("object",{"class":"en-emoticon"},a)}this.name="typebehind-emoticon-"+Ia();this.oc=function(){return"emoticon"};this.Sc=function(){return/^[\s\S]*:\)[\xa0 ]$/gi};this.Wd=function(b){var c=a("\ud83d\ude03");b=Ac(b.startContainer,b.startOffset-1);b=b.insertNode(c)||c;var c=b.previousSibling,d=c.textContent.replace(/:\)$/,"");0<d.length?c.textContent=d:Ab(c);Bc(Ac(b.nextSibling,1))};this.aa=function(b){mc(b).forEach(function(b){Fb(b,a(b.textContent))})};this.ia=function(a){X("object.en-emoticon",
a).forEach(function(a){Fb(a,H("span",{style:"-evernote-sentoj-emoji:true"},a.textContent))})};this.d=function(a){z(!0===a,"typebehind.emoticon only accepts true as opt")}};function Je(){var a=this;a.name="typebehind-url-"+Ia();a.oc=function(){return"url"};a.Sc=function(){return/(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?((?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))))(?::\d{2,5})?(?:\/\S*)?/gi};
a.Wd=function(b){var c=b.startContainer;b=Ac(b.startContainer,b.startOffset-1);var d=H("a");b.insertNode(d);var e=c.textContent.match(a.Sc());b=null;null!=e&&(b=e[0]);z(null!=b,"typebehind: should be impossible for","replacements to run without regex match.");e=d.previousSibling;c=c.textContent.replace(b,"");0<c.length?e.textContent=c:Ab(e);t(b)&&(d.setAttribute("href",b),d.textContent=b);Bc(Ac(d.nextSibling,1))};a.d=function(a){z(!0===a,"typebehind.url only accepts true as opt")}};function Ke(){var a=this;a.name="typebehind";a.d=function(b){var c=a.b("context"),d=C(b,{emoticon:!1,url:!1}),e=a.b("undo"),f=c.root,h=a.N(),g=new La;g.set("emoticon",new Ie);g.set("url",new Je);g.U.forEach(function(a){a=Ma(g,a);var b=a.oc(),c=d[b];null!=c&&!1!==c&&h.d(a,d[b])});var m=!1;a.c.a(f,"keypress",function(a){m=32===a.keyCode});a.c.a(f,"keyup",function(){if(m){m=!1;var a=Y(f);if(a&&a.collapsed){var b=a.endContainer,c=null;Tb(b)&&(c=b.textContent.substring(0,a.endOffset));if(null!=c)for(b=
0;b<g.U.length;b++){var d=Ma(g,g.U[b]),h=d.Sc();h.lastIndex=0;if(d.C&&h.test(c)){e.ra(function(){d.Wd(a)});break}}}}});a.aa=function(a){g.U.forEach(function(b){b=Ma(g,b);var c=d[b.oc()];null!=c&&!1!==c&&null!=b.aa&&b.aa(a)})};a.ia=function(a){g.U.forEach(function(b){b=Ma(g,b);var c=d[b.oc()];null!=c&&!1!==c&&null!=b.aa&&b.ia(a)})}}};function Le(){var a=this;a.name="enml";var b=/ +xmlns="(http:\/\/www.w3.org\/1999\/xhtml)?"/g,c=/<en-todo([^>]*?)><\/en-todo>/g,d=/<en-media([^>]*?)><\/en-media>/g,e=/<en-(todo|media)([^>]*?)\/>/g;a.d=function(f){var h=C(f,{root:null}).root||a.b("context").root;a.tc=function(b){b=b.replace(e,"<en-$1$2></en-$1>");var c=null,c=(new DOMParser).parseFromString(b,"text/html"),d=c.body.firstElementChild;if("en-note"!==G(d))return x.error("Invalid ENML. Expected en-note root node.",d),!1;Pa.forEach(function(a){d.hasAttribute(a)?
h.setAttribute(a,d.getAttribute(a)):h.removeAttribute(a)});a.b("transform").gb(d,1);b=h.ownerDocument.importNode(d,!0);Mb(b,h);od(h,"setDirty",!1);return!0};a.Rc=function(e){var f=C(e,{crypto:null,contentElement:h}),n=f.contentElement;e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","en-note",document.implementation.createDocumentType("en-note","","http://xml.evernote.com/pub/enml2.dtd"));var l=e.documentElement;if(n.hasAttributes())for(var k=0;k<n.attributes.length;k++)-1!==
Pa.indexOf(n.attributes[k].name.toLowerCase())&&l.setAttribute(n.attributes[k].name.toLowerCase(),n.attributes[k].value);k=e.importNode(n,!0);null!=k&&Kb(k,l);a.b("transform").zc(l,1,f);a.sb.e().forEach(function(a){"transform"!==a.name&&(a.Ye?a.Ye(l,f):a.ia&&a.ia(l))});n=l.querySelectorAll("*[id],*[class],*[data-en-overlay-id]");for(k=n.length-1;0<=k;k--){var v=n[k];v.removeAttribute("id");v.removeAttribute("class");v.removeAttribute("data");la(v.attributes).forEach(function(a){0===a.name.indexOf("data-")&&
v.removeAttribute(a.name)})}return(new XMLSerializer).serializeToString(e).replace(ua,"").replace(b,"").replace(c,"<en-todo$1 />").replace(d,"<en-media$1 />")};a.c.b({name:"enml",action:function(b){if(!a.tc(b))return!1;(b=a.ac("undo"))&&b.clear();return!0},value:function(b){return a.Rc(bb(b))},enabled:D})}};function Me(){function a(){e.c.a(h,"click",function(a){if(O(a.target,"img:not(.en-object-placeholder)")){var b={};b.src=a.target.getAttribute("src")||"";b.name=a.target.getAttribute("name")||"";a=b;z(!0,"tagname must have non-zero length");a=a||{};a.tagname="img";Fd("clicked",a)}});e.c.a(h,"dblclick",function(a){if(O(a.target,"img:not(.en-object-placeholder)")){var b={};b.src=a.target.getAttribute("src")||"";b.name=a.target.getAttribute("name")||"";a=b;z(!0,"tagname must have non-zero length");a=
a||{};a.tagname="img";Fd("doubleClicked",a)}})}function b(a){null!=a&&a!=={}&&(m=a);W("img:not(.en-object-placeholder)",h).forEach(function(a){!0===a.complete?c(a):e.c.a(a,"load",function(){c(a)})})}function c(a){e.Kd(a);var b=d(a),c=b.width,b=b.height;null==c&&null==b?a.style.height="auto":null!=c&&null!=b&&Math.round(a.naturalHeight/a.naturalWidth*10)===Math.round(b/c*10)&&(a.style.height="auto")}function d(a){var b;null!=a.getAttribute("width")?b=parseInt(a.getAttribute("width"),10):(b=parseInt(a.style.width,
10),isNaN(b)&&(b=null));null!=a.getAttribute("height")?a=parseInt(a.getAttribute("height"),10):(a=parseInt(a.style.height,10),isNaN(a)&&(a=null));return{width:b,height:a}}var e=this;e.name="img";var f,h,g,m=null;e.Hd=function(a){if(null==m)return a.naturalWidth;var b;if(null==m["images-dpi"][a.getAttribute("src")])return a.naturalWidth;b=m["images-dpi"][a.getAttribute("src")][0];a=a.naturalWidth;return 144===b?Math.round(a/(b/72)):a};e.g=function(a){if(null==m)return a.naturalHeight;var b;if(null==
m["images-dpi"][a.getAttribute("src")])return a.naturalHeight;b=m["images-dpi"][a.getAttribute("src")][1];a=a.naturalHeight;return 144===b?Math.round(a/(b/72)):a};e.Kd=function(a){var b=a.naturalWidth,c=e.Hd(a),g=a.naturalHeight,f=e.g(a),h=d(a);null==h.height&&null==h.width&&(b!==c&&V(a,"width",c+"px"),g!==f&&V(a,"height",f+"px"))};e.d=function(c){f=e.b("context");h=f.root;g=C(c,{imageClickEvents:!1,images:null});!0===g.imageClickEvents&&a();b(g.images);e.c.b({name:"images",action:function(a){null==
a||da(a)&&0===Object.keys(a).length||""===a?a=null:a=bb(a);b(a);return!0},enabled:D})}};function Ne(){var a=this;a.name="inline";a.d=function(){function b(a){var d="";t(a)&&(-1<a.indexOf("+")||-1<a.indexOf("-"))&&(d=a[0],a=a.slice(1));a=vd(a,"px","px");var e=null;if(a&&0<a.value){if(""===d)return e=a.La,f.I("fontsize",e),!0;var g=c(a.Gb);if(""!==g&&("+"===d?e=(parseInt(g,10)+a.value).toString()+a.Gb:"-"===d&&(e=(parseInt(g,10)-a.value).toString()+a.Gb),e))return b(e)}return!1}function c(a,b){a||(a="px");if(!b){var c=d.a();if(!c)return"";var g=null;c.collapsed||(g=f.Oa(c,e.$));null===
g&&(g=c.startContainer);b=f.r(g,"fontsize")}return(c=vd(b,a))&&c.value?c.value.toString():"0"}var d=a.b("context"),e=a.b("query"),f=a.b("format"),h=a.b("block"),g=a.b("editor"),m=d.root,n=d.K,l=!1,k=null,v=null;a.c.a(m,"compositionstart",function(){l=!0;d.R();k=f.yb()});a.c.a(m,"compositionend",function(){l=!1});a.c.e(m,"selectionChanged",function(a){l||(k=null,a=a.Rd,null!=a&&(v=Ic(a)))});a.c.a(m,"input",function(){if(!l&&v)if(k&&(d.R(),f.ya(k)),k=null,d.qe()){var a=Jc(v);if(null!=a){var b=Y(m),
a=Ac(a.startContainer,a.startOffset,b.startContainer,b.startOffset);v=null;a&&(b=f.yb(),d.Xa(a),d.a().collapsed||(f.ya(b),a=d.a(),a.collapse(!1),d.Xa(a),d.ja()))}}else v=null});n.bold={l:!0,Z:!0,action:function(a){a=null==a?!g.queryCommandState("bold"):+a;f.I("bold",a?"bold":"normal");return!0},V:["bold","600","700","800","900"],W:"fontWeight",Ha:function(a,b){return a==b||"bold"==a&&"700"==b||"700"==a&&"bold"==b||"normal"==a&&"400"==b||"400"==a&&"normal"==b}};n.italic={l:!0,Z:!0,action:function(a){a=
null==a?!g.queryCommandState("italic"):+a;f.I("italic",a?"italic":"normal");return!0},V:["italic","oblique"],W:"fontStyle"};n.underline={l:!0,Z:!0,action:function(a){a=null==a?!g.queryCommandState("underline"):+a;f.I("underline",a?"underline":null);return!0},V:["underline"]};n.strikethrough={l:!0,Z:!0,action:function(a){a=null==a?!g.queryCommandState("strikethrough"):+a;f.I("strikethrough",a?"line-through":null);return!0},V:["line-through"]};n.tt={l:!0,Z:!0,action:function(a){a=null==a?!g.queryCommandState("tt"):
+a;f.I("tt",a?"tt":null);return!0},V:["tt"]};n.fontname={l:!0,Z:!0,action:function(a){f.I("fontname",a);return!0},value:function(){var a=d.a();if(!a)return"";var b=null;a.collapsed||(b=f.Oa(a,e.$));null===b&&(b=a.startContainer);a=f.r(b,"fontname");return ze(a)||""},W:"fontFamily",Ha:function(a,b){return ze(a)===ze(b)}};n.fontsize={l:!0,Z:!0,action:function(a){return b(a)},ea:function(){return 2<=f.ka(d.a(),e.$).map(function(a){return f.r(a,"fontsize")}).filter(function(a,b,c){return-1==c.slice(0,
b).indexOf(a)}).length},value:function(a,b){return c(a,b)},W:"fontSize",Ha:function(a,b){if(a===b)return!0;var c=a;0<a.indexOf("pt")?c=vd(a,"px").La:0>a.indexOf("p")&&(c=a+"px");var d=b;0<b.indexOf("pt")?d=vd(b,"px").La:0>b.indexOf("p")&&(d=b+"px");return c===d}};n.forecolor={l:!0,Z:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ld(a)&&"transparent"!=a.toLowerCase())return!1;f.I("forecolor",a);return!0},be:!0,W:"color",Ha:function(a,b){return kd(a)===
kd(b)}};n.backcolor={l:!0,Z:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ld(a)&&"transparent"!=a.toLowerCase())return!1;f.I("backcolor",a);return!0},ea:function(){return 2<=f.ka(d.a(),function(a){return e.h(a)&&3===a.nodeType}).map(function(a){return f.r(a,"backcolor")}).filter(function(a,b,c){return-1==c.slice(0,b).indexOf(a)}).length},be:!0,W:"backgroundColor",Ha:function(a,b){return kd(a)===kd(b)}};n.highlight={l:!0,Z:!0,action:function(a){a=
null==a?!g.queryCommandState("highlight"):+a;f.I("highlight",a?"rgb(255, 250, 165)":null);return!0},V:["rgb(255, 250, 165)","rgb(255, 204, 102)","rgb(246, 238, 150)"],W:"backgroundColor",Ha:function(a,b){return kd(a)===kd(b)}};var y="abbr acronym b bdi bdo big blink cite code dfn em font i ins kbd mark nobr q s samp small span strike strong sub sup tt u var".split(" ");n.removeformat={l:!0,Z:!0,action:function(){function a(b){return e.h(b)&&-1<y.indexOf(G(b))}f.ka(d.a(),a).forEach(function(a){for(;a.hasChildNodes();)d.o(a.firstChild,
a.parentNode,J(a));a.parentNode.removeChild(a)});if(e.h(d.a().startContainer)&&3==d.a().startContainer.nodeType&&0!=d.a().startOffset&&d.a().startOffset!=M(d.a().startContainer))if(d.a().startContainer==d.a().endContainer){var b=d.a().endOffset-d.a().startOffset,c=d.a().startContainer.splitText(d.a().startOffset);d.e(c,0,c,b)}else d.Qc(d.a().startContainer.splitText(d.a().startOffset),0);e.h(d.a().endContainer)&&3==d.a().endContainer.nodeType&&0!=d.a().endOffset&&d.a().endOffset!=M(d.a().endContainer)&&
(c=[d.a().startContainer,d.a().startOffset],b=[d.a().endContainer,d.a().endOffset],d.Nc(document.documentElement,0),b[0].splitText(b[1]),d.e(c[0],c[1],b[0],b[1]));f.ka(d.a(),e.h).forEach(function(b){for(;a(b.parentNode)&&e.t(b.parentNode,b);)h.M([b])});"subscript superscript bold tt fontname fontsize forecolor highlight backcolor italic strikethrough underline".split(" ").forEach(function(a){f.I(a,null)});return!0}};["superscript","subscript"].forEach(function(a){n[a]={l:!0,Z:!0,action:function(b){b=
null==b?!g.queryCommandState(a):+b;f.I(a,null);b&&f.I(a,a);return!0},ea:function(){var b=f.ka(d.a(),e.$);return b.some(function(b){return f.r(b,a)==a})&&b.some(function(b){return f.r(b,a)!=a})||b.some(function(b){return"mixed"==f.r(b,a)})},V:[a]}});if(!0===Nc.rte.highlightMagic)try{var w=null;a.c.a(d.root,"mousedown",function(){w=Cd(d.root)});a.c.a(document,"mouseup",function(a){var b=Y(d.root);b&&!b.collapsed&&w!==Cd(d.root)&&(!a.metaKey||a.altKey||a.shiftKey||a.ctrlKey?a.metaKey&&a.altKey&&!a.shiftKey&&
!a.ctrlKey&&Z.execCommand("strikethrough"):Z.execCommand("highlight"));w=null})}catch(p){x.error("Exception in <$>:",p.toString)}}};function Oe(){var a=this;a.name="io";a.d=function(){function b(a){f=!!a;!1===f&&d.flush()}var c=a.b("context"),d=a.b("undo"),e=c.root,f=!1,h;a.c.e(e,"setDirty",function(c){var d=!0;!1===c&&(d=!1);b(d);h=a.c.timeout(function(){f&&Gd("content")},1E3,h)},1);a.g=function(c){var d=C(c,{html:!1,cleanup:!1,stripNS:!1,trim:!0,titleString:null,withInsertionPoint:!1,hiddenCryptoData:null,wrap:!1,resetChangesState:!1,value:"",type:""});d.resetChangesState&&b(!1);if("enml"===(d.type||d.value||""))return a.b("enml").Rc({crypto:d.hiddenCryptoData});
var f=c=null,h=d.withInsertionPoint,k=e,v=Cd(k);if(d.cleanup||h)k=e.cloneNode(!0);W("div.en-crypto-revealed",k).forEach(function(a){var b=a.id;0===b.indexOf("en-revealed-crypto:")?d.hiddenCryptoData&&d.hiddenCryptoData[b]?Fb(a,H("embed",{type:"evernote/x-crypto",id:d.hiddenCryptoData[b]})):x.error("Found revealed crypto but not replacement. Key:",b):x.error("Unsupported revealed crypto element with ID:",b)});d.cleanup&&f&&h&&(f.insertNode(ue()),h=!1);h&&v&&(f=Bd(k,v))&&f.insertNode(ue());d.cleanup&&
a.b("transform").zc(k);d.stripNS?c=Ga(k.outerHTML):c=k.innerHTML;d.trim&&(c=c.trim());return d.html?"<html><head><title></title></head><body>"+c+"</body></html>":d.wrap?we(k,c):c.replace(ua,"")};a.Ob=function(c,f){b(!1);f&&d.flush();var h=H("div",{},c),h=a.b("transform").gb(h,2,{Wc:!0});Mb(h,e);f?d.flush():d.clear()};a.c.b({name:"content",action:function(b){b=bb(b);null!=b.value&&(ka("rte.content called with non-JSON string.","String used as new content."),b.content=b.value,delete b.value);b=C(b,
{scrollToTop:!0,content:"",undoable:!1,type:"html",placeholder:null,resources:null});Ea(b.resources)||a.b("resource").od(b.resources);null!=b.placeholder&&e.setAttribute("data-en-placeholder",b.placeholder);"enml"===b.type?a.b("enml").tc(b.content||""):a.Ob(b.content||"",!0===b.undoable);!0===b.scrollToTop&&vc(0,0);Id();return!0},value:function(b){return a.g(bb(b))},enabled:D});a.c.b({name:"changes",action:function(a){b(ab(a));return!0},state:function(){return f},enabled:D,Ua:!0})}};function Pe(){var a=this;a.name="link";a.g=function(a){"a"===G(a.target)&&(window.location.href=a.target.href,a.preventDefault())};a.d=function(){function b(b){if(!b)return!1;a.b("edit").v({Qb:!1});var c=d.a();if(!e.h(d.a().startContainer)&&!e.na(d.a().startContainer))return!0;e.m(c.startContainer)&&1==c.startContainer.childNodes.length&&Q(c.startContainer.firstChild)&&0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild);c.insertNode(b);d.e(b.parentNode,1+J(b));return!0}function c(){if(!d.a()||
!d.a().startContainer)return null;var a=N(d.a().startContainer,"a[href]",d.root);return a?a.href:null}var d=a.b("context"),e=a.b("query"),f=a.b("format"),h=d.K;h.createlink={l:!0,action:function(a){if(!a)return!1;if(d.a().collapsed){var c=H("a",{href:se(a.toString())});c.textContent=a.toString();return b(c)}f.ka(d.a()).forEach(function(b){e.Fa(b).forEach(function(b){e.h(b)&&P(b,"a")&&b.hasAttribute("href")&&b.setAttribute("href",a)})});f.I("createlink",a);return!0},value:function(){return c()||""},
state:function(){return!!c()}};h.unlink={l:!0,action:function(){for(var a=d.a(),b=[],c=a.startContainer;c;c=c.parentNode)P(c,"a")&&c.hasAttribute("href")&&b.unshift(c);for(c=a.startContainer;c!=e.ca(a.endContainer);c=e.nextNode(c))P(c,"a")&&c.hasAttribute("href")&&(e.gc(c,a)||Ub(a.endContainer,c)||c==a.endContainer)&&b.push(c);for(a=0;a<b.length;a++)f.Ac(b[a],"unlink");return!0},value:function(){return c()||""},state:function(){return!!c()}};a.aa=function(a){X("*[href]",a).forEach(function(a){var b=
a.getAttribute("href"),c=se(b);b!==c&&a.setAttribute("href",c)});X("*[src]",a).forEach(function(a){var b=a.getAttribute("src"),c=se(b);b!==c&&a.setAttribute("src",c)})}}};function Qe(){var a=this;a.name="misc";a.d=function(){var b=a.b("context"),c=a.b("normalize");b.K.normalize={mb:!0,action:function(a){if(!a||"all"===a)return c.wc(),!0;if(!b.a())return x.warn("Command normalize called without selection. Value:",a),!1;if("start"===a)return c.Va(),!0;if("end"===a)return c.ce(),!0;if("selection"===a)return c.Sa(),!0;if("edges"===a)return c.Hc(),!0;x.warn("Command normalize called with unknown value:",a);return!1},enabled:D}}};function Re(){function a(a){this.fa=Ia()+"";this.info={title:"Unknown",mime:"application/octet-stream",hash:"",filename:"",filesize:"",downloaded:"",progress:0,url:null,state:"unloaded",thumbnailURL:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"};this.i=!1;this.k(a);this.g=function(a){a.preventDefault()}}var b=this;b.name="resource";a.prototype.A=function(){this.a||(this.a=this.m(),this.b());return this.a};a.prototype.m=function(){var a=this.info.mime,b=-1!==["image/jpeg",
"image/png","image/gif","image/tiff","image/svg+xml"].indexOf(a),e="application/pdf"===a,f="application/vnd.evernote.ink"===a,h={src:this.info.url,"class":"en-resource en-media"},g=ya({},this.info.attrs||{});delete g.hash;delete g.type;var m="en-media:"+this.info.mime+":"+this.info.hash;b?h.id=m+":"+(g.width||"none")+":"+(g.height||"none"):(f?(h.type=a,h.border="1"):h.type=e?"evernote/x-pdf":"evernote/x-attachment",h.id=m);ya(h,g,!0);a=H(this.B?"img":"embed",h);a.setAttribute("data-en-resource-reference",
this.fa);U(a,"height");return a};a.prototype.e=function(){return this.A()};a.prototype.k=function(a){a&&(z(za(a)||za(this.info),"Info param must be dictionary."),this.info=ya(this.info,a),this.info.url||(this.info.url="?hash="+this.info.hash),this.info.mime=this.info.mime.toLowerCase(),this.B=-1!==this.info.mime.indexOf("image/"))};a.prototype.b=function(a){this.k(a);this.a&&(this.o&&this.o.setAttribute("src",this.info.thumbnailURL),this.r&&(this.r.textContent=this.info.filename),this.v&&(this.v.textContent=
"loading"===this.info.state&&this.info.downloaded?this.info.downloaded+" / "+this.info.filesize:this.info.filesize),this.t&&(this.t.textContent=this.info.title))};a.prototype.toJSON=function(){return{hash:this.info.hash,url:this.info.url,mime:this.info.mime,rect:I(this.a),reference:this.fa,selected:this.i}};b.d=function(c){function d(a){Kd(this.info.url,"resource",{hash:this.info.hash,mime:this.info.mime,reference:this.fa,action:"open"});a.preventDefault();a.stopPropagation()}function e(a){if(!v){v=
{};for(var b in k){var c=k[b],d=v[c.info.hash];d||(v[c.info.hash]=d=[]);d.push(c)}}return v[a]||[]}function f(a){var b=F(a)?a.getAttribute("data-en-resource-reference"):a.reference,c=null;b&&(c=k[b]);c||(c=h(a));return c}function h(b){var c,e,f;if(b instanceof HTMLElement){"en-media"===G(b)?(c=b.getAttribute("hash"),e=b.getAttribute("type")):(f=b.getAttribute("id"),z(!!f,"ID for non image resources is mandatory!"),f=f.split(":"),e=f[1],c=f[2]);b.getAttribute("x-evernote-mime");f=l[c]||{};f.hash||
(f.hash=c);!f.mime&&e&&(f.mime=e);e={};if(b&&(b=b.attributes))for(c=b.length;c--;)e[b[c].name.toLowerCase()]=b[c].value;f.attrs=e}else za(b)&&(f=b);z(f&&f.hash,"Info data or hash inside is missing to create a resource element.");b=new a(f);k[b.fa]=b;b.g=d;return b}var g=b.b("context"),m=g.root,n=g.K,l=c.resources||{},k={},v=null;b.od=function(a){v=null;z(za(a),"Expected dict for resourceInfoDefaults",a);ya(l,a)};n.resources={action:function(a){if(a=cb(a)){var c=!1;a.forEach(function(a){if("update"===
a.action)if(c=!0,a.reference){var d=f(a);d&&d.b(a)}else e(a.hash).forEach(function(b){b.b(a)});else if("insert"===a.action){if(g.Ja())return!1;g.hasFocus()||Z.execCommand("content.focus");g.R();g.ue();var k=b.b("paste"),d=h(a),d=d.e();k.insertNode(d);Mc(d)}});c&&setTimeout(function(){b.b("layer").xa()},0)}return!0},value:function(){var a=window.getSelection();return W("img.en-media,embed",m).map(function(b){var c=f(b);c.i=a&&!a.isCollapsed&&a.containsNode(b,!1);return c})},enabled:D};b.aa=function(a,
b){if(1===b)for(var c=a.getElementsByTagName("en-media"),d=c.length-1;0<=d;d--){var e=c[d],f=h(e);z(!!f,"Failed to create resource for",e);Fb(e,f.e())}else X('embed[id^="en-media:"],img[id^="en-media:"]',a).forEach(function(a){var b=h(a);Fb(a,b.e())})};b.ia=function(a,b){1===b?X("img.en-media,embed",a).forEach(function(a){var b=f(a);b&&(a=Ob(a,"en-media"),a.removeAttribute("src"),a.removeAttribute("class"),a.removeAttribute("id"),a.removeAttribute("data-en-resource-reference"),a.setAttribute("type",
b.info.mime),a.setAttribute("hash",b.info.hash))}):X('embed[id^="en-media:"],img[id^="en-media:"],.en-object-placeholder',a).forEach(function(a){a.removeAttribute("class");a.removeAttribute("data-en-resource-reference")})}}};function Se(){function a(a){v.call(this,a)}function b(a){v.call(this,a)}function c(a){v.call(this,a)}function d(a){v.call(this,a)}function e(a){v.call(this,a)}function f(a){v.call(this,a)}function h(a){v.call(this,a)}function g(a){v.call(this,a)}function m(a){a.Dd=!0;v.call(this,a)}function n(a){v.call(this,a)}function l(a){v.call(this,a)}function k(a){v.call(this,a)}function v(a){if(!(this instanceof v))return new v(a);this.a=a;this.d()}function y(a){var b=R(a.td,"-evernote-context-name");b&&(V(a.Md,
"-evernote-context-name",b),a.Md.textContent=a.f.ib[b+"-label"]||b)}function w(a,b){a.td=p(a.Pa,"context");a.Md=p(a.ad,"context");var c=a.td,d=R(c,"-evernote-context-name");E(c,"en-editable-context");var e;Eb(c);c.appendChild(e=H("span"));e.textContent=a.f.ib[d+"-label"]||d;for(var f=[],g=0;g<b.length;g++){var h=b[g],k=H("option",{value:h},[a.f.ib[h+"-label"]||h]);h===d&&k.setAttribute("selected","selected");f.push(k)}var l=H("select",{"class":"en-editable-select-context",tabindex:"-1"},f);c.insertBefore(l,
null);u.c.a(l,"change",function(){var b=l.value;V(c,"-evernote-context-name",b);e.textContent=a.f.ib[b+"-label"]||b;if(a.f.Lb instanceof Object)try{var d=a.f.Lb[a.name];d&&d(a)}catch(f){x.error("Exception on onDidChangeActions (2)",f.toString())}a.f.Oc=a.name;S=!0});c.parentElement.style.textDecoration="none"}function p(a,b){for(var c=la(a.querySelectorAll("*[style*='x-evernote:']")),d=0;d<c.length;d++){var e=c[d];if(R(e,"x-evernote")===b)return e}return null}function r(a){var b=a.q;E(b,"en-editable");
E(b,"en-editable-"+a.type);E(b,("en-"+a.f.Cb+"-"+a.name).toLowerCase());b.setAttribute("title",(a.f.ib[a.name+"-placeholder-title"]||"...")+"\u00a0\u00a0\u00a0");dc(b,!0);T(a);a.f.hd&&b.removeAttribute("style");var c=null;u.c.a(b,"focus",function(){c=a.object.b();Ja(function(){window.getSelection().selectAllChildren(b)})});u.c.a(b,"input",function(){S=!0});u.c.a(b,"blur",function(){Ec();T(a);var b=!1;if(a.f.Lb instanceof Object)try{var d=a.f.Lb[a.name];d&&d(a)&&(b=!0)}catch(e){x.error("Exception on onDidChangeActions (1)",
e.toString())}d=a.object.b();if(b||c!==d)a.f.Oc=a.name,S=!0});u.c.a(b,"keydown",function(c){var d=!1;13===c.keyCode?a.Dd||(b.blur(),d=!0):8===c.keyCode&&(document.execCommand("delete"),d=!0);return d?bd(c):!1})}function A(a,b){var c=a.innerText.trim();Da(c)?c="\u00a0":b?(c=c.split("\n"),c=c.map(function(a){return Da(a)?"<div><br/></div>":"<div>"+Ha(a)+"</div>"}),c=c.join("")):c=Ha(c.replace(/\n/g," "));return c}function T(a){z(!!a,"We need field info");z(!!a.q,"We need an element to work on");var b=
a.q;b.innerHTML=A(b,a.Dd);Da(b.textContent)?E(b,"en-editable-placeholder"):yb(b,"en-editable-placeholder");a.Uc=b.innerHTML}var u=this,K=null;z(this instanceof Se,"Use `new` to instantiate this class");u.name="template";var S=!1;v.prototype.d=function(){};v.prototype.b=function(){return this.a.q.innerHTML};v.prototype.Ub=function(a){var b=this.b();this.a.Mb.innerHTML=b;a&&this.a.f.Oc===this.a.name&&this.a.Mb.insertBefore(ue(),null)};fa(k,v);fa(l,v);l.prototype.b=function(){return A(this.a.q)};fa(n,
v);n.prototype.d=function(){r(this.a)};n.prototype.b=function(){return A(this.a.q)};fa(m,n);m.prototype.b=function(){try{return A(this.a.q,!0)}catch(a){x.error("getHTML 'PlainTextArea.prototype.getHTML' failed ",a)}return null};fa(g,v);g.prototype.d=function(){this.a.q=p(this.a.Pa,"value");this.a.Mb=p(this.a.ad,"value");z(!!this.a.q,"x-evernote:value element missing in phone field");r(this.a);w(this.a,"phone home work mobile main home-fax work-fax other".split(" "))};g.prototype.b=function(){return A(this.a.q)};
g.prototype.Ub=function(a){g.Rb.Ub.call(this,a);y(this.a)};fa(h,v);h.prototype.e=function(a,b){z(b instanceof Object);b.href=a;return H("a",b,[a])};h.prototype.j=function(){var a=this.a.q.textContent;return!a||Da(a)?"":a.trim()};h.prototype.d=function(){function a(){yb(f,"en-editable-hidden");E(e,"en-editable-hidden");Eb(g);var c=b.j();Da(c)?(yb(e,"en-editable-hidden"),E(f,"en-editable-hidden")):g.appendChild(b.e(c,{tabindex:"-1"}));e.textContent=c}var b=this;this.a.q=p(this.a.Pa,"value");this.a.Mb=
p(this.a.ad,"value");z(!!this.a.q,"x-evernote:value element missing in LinkField");var c=this.a.q,d=this.j();U(c,"text-decoration");Eb(c);var e;c.appendChild(e=H("div"));e.textContent=d;this.a.q=e;r(this.a);var f,g;c.appendChild(f=H("div",{"class":"en-editable-preview"},[g=H("span")]));a();u.c.a(f,"click",function(){e.focus()});u.c.a(e,"focus",function(){yb(e,"en-editable-hidden");E(f,"en-editable-hidden")});u.c.a(e,"blur",function(){a()});E(this.a.Pa,"en-editable-container")};h.prototype.b=function(){var a=
this.a.q.textContent;return Da(a)?"\u00a0":Ha(this.e(a,{}))};fa(f,h);f.prototype.d=function(){f.Rb.d.call(this);w(this.a,["email","home","work","other"])};f.prototype.Ub=function(a){f.Rb.Ub.call(this,a);y(this.a)};f.prototype.e=function(a,b){a=a.trim().replace(/^mailto:/,"");z(b instanceof Object);b.href="mailto:"+a;return H("a",b,[a])};fa(e,h);e.prototype.j=function(){var a=this.a.q.textContent;if(!a)return"";a=a.trim().replace(/^\@/,"");return Da(a)?"":a};e.prototype.e=function(a,b){z(b instanceof
Object);b.href="http://twitter.com/"+encodeURIComponent(a);return H("a",b,["@"+a])};fa(d,h);fa(c,h);fa(b,h);b.prototype.j=function(){var a=this.a.q.textContent;if(!a)return"";a=a.trim().replace(/^\@/,"");return Da(a)?"":a};b.prototype.e=function(a,b){z(b instanceof Object);return document.createTextNode("@"+a)};fa(a,h);a.prototype.e=function(a,b){a=a.trim();z(b instanceof Object);b.href="http://maps.google.com/?q="+encodeURIComponent(a);return H("a",b,[a])};var ja={title:l,field:n,textarea:m,phone:g,
email:f,twitter:e,linkedin:d,facebook:c,weibo:b,address:a,"profile-image":k},Aa=Object.keys(ja);u.u=function(){K===document.body?(u.Ka=document.body.parentNode.cloneNode(!0),la(u.Ka.getElementsByTagName("head")).forEach(function(a){Ab(a)})):u.Ka=K.cloneNode(!0);var a=u.j(K),b=u.j(K===document.body?u.Ka.getElementsByTagName("body")[0]:u.Ka);u.Y=[];for(var c=0;c<a.length;c++)try{var d=a[c];d.index=c;d.Mb=b[c].q;d.f=this.f;d.Pa=d.q;d.ad=d.Mb;d.object=new ja[d.type](d);u.Y.push(d)}catch(e){x.error("A field failed during setup",
e.toString())}};u.Zd=function(a){a=C(a,{lc:null,Cb:null,kc:null,hd:!1,jd:null,kd:null,$c:{},Lb:{},ib:{},Oc:null,root:null});u.f=a;K=a.root||document.getElementById("en-note");z(K&&F(K),"Root not valid!");ve(K);z(null!==u.f.lc,"Content Class is required");u.f.Cb=u.f.Cb||u.f.lc.replace(/[^\w]+/gi,"-");E(K,"en-template-style-on");E(K,u.f.Cb);u.u();u.c.e(K,"setDirty",function(a){var b=!0;!1===a&&(b=!1);S=!!b});null!==u.f.kd&&u.fd(u.f.kd);u.w=function(a){u.fd(a.value)};u.c.i("titlechanged",u.w);if(u.f.$c instanceof
Object)for(var b=0;b<u.Y.length;b++)try{var c=u.Y[b],d=u.f.$c[c.name];d&&d(c)}catch(e){x.error("Exception on onDidInitActions (3)",e.toString())}b=this.N();b.d(new ke,{root:K});b.d(new Le);b.d(new Re);u.Pb();b=a.html;a=a.enml;z(!(null!=b&&null!=a),"You can only provide one content type: html or enml");t(b)?u.Ob(b):t(a)&&z(!1,"ENML currently not supported for Templates")};u.s=function(){yb(K,"en-template-style-on");yb(K,u.f.Cb);for(var a=0;a<this.Y.length;a++)try{ad(this.Y[a].q)}catch(b){x.error("Exception on cleanup",
b.toString())}W(".en-editable-select-context,.en-editable-preview",K).forEach(function(a){ad(a)});this.Y=[]};u.hasFocus=function(){var a=Y(K);return a&&(a=Gc(a))?N(a,cc):!1};u.Pb=function(){function a(b,c){c=C(bb(b),c,!0);var d=c.value;if("html"===c.type)var e=Y(K),d=Oc(e,d).textContent;document.execCommand("inserttext",!1,d.replace(/\s+/gi," "));return!0}u.c.Nb({Ia:["content","template"]});u.c.b({name:"focus",action:function(){u.focus();return!0},state:function(){return u.hasFocus()},value:function(){if(u.hasFocus())return u.name},
enabled:D});u.c.b({name:"paste",action:function(b){return a(b,{type:"html",mode:"plain",value:""})},enabled:D});u.c.b({name:"pasteplain",action:function(b){ka('Please use execCommand("template.paste", { type: "plain", mode: "plain", "value": ... })');return a(b,{type:"plain",mode:"plain",value:""})},enabled:D});u.c.b({name:"copy",enabled:D,value:function(){var a=Y(K);if(!a||a.collapsed)return"";var b={},a=a.cloneContents(),c=document.createElement("div");c.appendChild(a);tc(c,function(a){b.plain=
a.innerText});return JSON.stringify(b)}});u.c.b({name:"content",action:function(a){a=bb(a);null!=a.value&&(ka("rte.content called with non-JSON string.","String used as new content."),a.content=a.value,delete a.value);a=C(a,{scrollToTop:!0,content:"",type:"html",resources:null});Ea(a.resources)||u.b("resource").od(a.resources);var b=a.content||"";"enml"===a.type?u.N().a("enml").tc(b):u.Ob(b);u.u();!0===a.scrollToTop&&vc(0,0);Id();return!0},value:function(a){return u.g(bb(a))},enabled:D});u.c.b({name:"changes",
action:function(a){S=!!ab(a);return!0},state:function(){return S},enabled:D,Ua:!0})};u.focus=function(a){for(a=+a||0;a<this.Y.length;a++){var b=this.Y[a];if(!b.Ed){b.q.focus();break}}};u.fd=function(a){if(a&&0<a.length&&255>=a.length){for(var b,c=0;c<this.Y.length;c++)if(!0===this.Y[c].Ed){b=this.Y[c];break}b&&b.q.textContent!==a&&(b.q.textContent=a,b.Uc=b.q.innerHTML)}};u.j=function(a){return la(a.querySelectorAll("*[style*='-evernote-editable:']")).map(function(a){var b=R(a,"-evernote-editable");
if(0<=Aa.indexOf(b)){var c=R(a,"x-evernote"),d=this.f.jd&&this.f.jd===c;d&&(b="title");return d||null===this.f.kc||this.f.kc.some(function(a){return c===a})?{q:a,name:c,type:b,Ed:d}:void 0}x.error("Invalid -evernote-editable field mode!",b)},this).filter(function(a){return a&&a.q})};u.Ob=function(a){var b=H("div");b.innerHTML=a;Mb(b,K)};u.g=function(a){a=C(a,{html:!1,cleanup:!1,stripNS:!1,trim:!0,withInsertionPoint:!1,titleString:"",hiddenCryptoData:null,resetChangesState:!1,wrap:!1,type:""});a.resetChangesState&&
(S=!1);t(a.titleString)&&this.fd(a.titleString);for(var b=0;b<this.Y.length;b++){var c=this.Y[b];try{c.object.Ub(a.withInsertionPoint)}catch(d){x.error("Unable to extract data from field",d.toString(),c)}}if("enml"===(a.type||a.value||""))return u.N().a("enml").Rc({crypto:a.hiddenCryptoData,contentElement:u.Ka.cloneNode(!0)});b="html"===G(this.Ka)||a.stripNS?this.Ka.outerHTML:this.Ka.innerHTML;a.stripNS&&(b=Ga(b));b=b.trim();return a.html?"<html><head><title></title></head><body>"+b+"</body></html>":
a.wrap?we(K,b):b};u.d=function(a){var b=a.contentClass,c=a.title,d=a.localization;if("evernote.food.meal.2"===b)this.Zd({root:a.root||null,lc:b,kc:["caption-text","meal-review"],hd:!0,jd:"title",kd:c});else if("evernote.contact.1"===b){var e=function(a){return(a=a.q.textContent)?a.replace(/\s+/g," ").trim():null},f=null,g=c;this.Zd({root:a.root||null,lc:b,kc:"contact-title contact-org note-body weibo twitter phone email address display-as".split(" "),hd:!1,ib:d||{"display-as-placeholder-title":"Add Name...",
"contact-title-placeholder-title":"Add Title...","contact-org-placeholder-title":"Add Company...","note-body-placeholder-title":"Add Notes...","linkedin-placeholder-title":"Add LinkedIn URL...","facebook-placeholder-title":"Add Facebook URL...","twitter-placeholder-title":"Add Twitter Name...","weibo-placeholder-title":"Add Weibo Name...","phone-placeholder-title":"Add Phone...","email-placeholder-title":"Add Email...","address-placeholder-title":"Add Address...","email-label":"Email","home-label":"Home",
"work-label":"Work","other-label":"Other","phone-label":"Phone","mobile-label":"Mobile","main-label":"Main","home-fax-label":"Home Fax","work-fax-label":"Work Fax","twitter-label":"Twitter","facebook-label":"Facebook","weibo-label":"Weibo","linkedin-label":"LinkedIn","address-label":"Address"},$c:{"display-as":function(a){f=e(a)}},Lb:{"display-as":function(a){g=Od.value("title.content");var b=!1;a=e(a);if(f&&a&&g){var c=new RegExp("\\b"+pa(f)+"\\b","g");if(c=g.replace(c,a))255<c.length&&(c=g),Od.action("title.content",
c),Od.action("title.changes",!0),b=!0,f=a}return b}}})}}};function Te(a){a=G(a);return"p"===a||"div"===a}function Ue(a){a=G(a);return"ul"===a||"ol"===a}function Ve(a){return"td"===a||"th"===a}function We(a){return a?!!N(a,function(a){return a&&a.style?"rgb(255, 250, 165)"===a.style.backgroundColor:!1}):!1}function Xe(a,b,c,d){b=b.getAttribute(c);if(null===b||void 0===b){if(void 0===d)return;b=d}a.setAttribute(c,b)}
function Ye(a,b,c){"undefined"===typeof c&&(c={});this.i=c;z(null!=this.i.Sb,"You have to provide tablePlugin config!");void 0!==c.cssBlockStyle?this.v=c.cssBlockStyle:this.v=this.pd;this.D=!!c.async;if(!a)a=document.body;else if(a instanceof DocumentFragment||!Wb(a))c=H("div"),c.appendChild(a),document.body.appendChild(c),this.M=a=c;this.k=a;this.ob=b;this.Yc()}q=Ye.prototype;q.xc="div";q.pd=null;
q.Yc=function(){var a=this;this.K=this.g=this.r=this.b=this.a=null;this.o=H("div");this.G=this.m=null;this.e=!1;this.t=[];var b=Xb(document.body);this.R=b&&b.fontSize?.8*+b.fontSize.replace(/px/gi,""):16;if(this.D){this.A=this.I=this.L=0;this.B=!1;this.P=this.j=(new Date).getTime();for(var b=document.createNodeIterator(this.k,-1,null,!0),c=0;b.nextNode();)++c;this.Q=c}this.S=document.createTreeWalker(this.k,-1,{acceptNode:function(b){for(var c=0;c<a.t.length;c++)if(Ub(b,a.t[c]))return 2;return 1}},
!0);Ze(this)};function Ze(a){if(a.$)a.s();else{for(var b;(b=a.S.nextNode())&&!(3===b.nodeType?$e(a,b):1===b.nodeType&&a.Bd(b),a.D&&(++a.L,150<(new Date).getTime()-a.j)););++a.I;if(b&&a.D){a.A=Math.min(1,a.L/a.Q);a.B||(b=((new Date).getTime()-a.P)/a.A,b+=10*(Math.ceil(a.I/a.A)-a.I),2E3<=b&&(a.B=!0));if(a.B&&a.i.onprogress)a.i.onprogress(a,a.A);window.setTimeout(function(){a.j=(new Date).getTime();Ze(a)},10)}else{a.t=null;af(a.a);if(a.B&&a.i.onprogress)a.i.onprogress(a,1);a.Xc()}}}
q.Xc=function(){this.ob?Mb(this.o,this.ob):this.ob=this.o;this.s();if(this.i.onready)this.i.onready(this)};q.s=function(){this.M&&document.body.removeChild(this.M)};
function af(a){if(a){for(var b,c=document.createNodeIterator(a,4,null,!0);(b=c.nextNode())&&!(b.textContent=b.textContent.replace(/^ /gi,""),0<b.textContent.length);)Tb(b)?b.parentNode.appendChild(H("br")):b.appendChild(H("br"));for(var c=document.createNodeIterator(a,4,null,!0),d=[];b=c.nextNode();)d.unshift(b);for(c=0;c<d.length&&!(b=d[c],b.textContent=b.textContent.replace(/\s+$/gi,""),0<b.textContent.length);c++)Tb(b)?b.parentNode.appendChild(H("br")):b.appendChild(H("br"));a.normalize()}}
q.Db=function(a){a=H(a?a:this.xc);this.v&&a.setAttribute("style",this.v);return a};function bf(a){var b=a.Db();b.appendChild(H("br"));a.o.appendChild(b);a.e=!1}function cf(a,b){var c=a.Db();null!=b&&(t(b)?c=a.Db(b):F(b)&&(c=b));if(a.o.hasChildNodes&&a.e){var d=a.o.lastElementChild;d&&d.textContent.length&&Te(d)&&Te(c)&&bf(a)}a.e=!1;a.o.appendChild(c);return c}function df(a){af(a.a);a.a=null;a.b=null}
function ef(a,b){var c=document.createRange();c.selectNodeContents(b);c=c.getBoundingClientRect();a.G&&c&&!Ub(b,a.b)&&Math.abs(c.top-a.G.bottom)>=a.R&&(a.e=!0);c&&(a.G=c)}function ff(a){return"div"===G(a)&&1===a.childNodes.length&&"br"===G(a.childNodes[0])}
q.pa=function(a,b,c,d){c=!Ub(a,this.b);if(d&&c)return null;b||(b=a.cloneNode(!1));ef(this,a);c&&(F(this.b)&&(d=G(this.b),Ve(d)&&(this.e=!0)),df(this));for(c=a;c!==this.k&&(c=c.parentNode);){this.b=c;d=G(c);if("li"===d)break;if(Ve(d))break;if(Zb(c))break}if(N(a,"table"))if(d=N(a,"table"),c=this.i.Sb,null!=d&&null!=c&&F(d)&&"table"===G(d)){var e=c.Ad(d);-1!==e.rows&&(this.g!==d&&(this.g=d,this.K=c.ud(e),ff(this.g.previousSibling)&&bf(this),cf(this,this.K),ff(this.g.nextSibling)&&bf(this)),d=c.cd(a),
null!=d.table&&(c=d=this.K.querySelectorAll("tr")[d.row].querySelectorAll("td")[d.column],null==d?x.warn("Something crazy happened with table simplify: <$>"):(1===d.childNodes.length&&"div"===G(d.childNodes[0])&&(c=d.childNodes[0],1===c.childNodes.length&&"br"===G(c.childNodes[0])&&Eb(c)),this.a=c)))}else x.warn("Couldn't simplify table. Look into this!");if(N(a,"li"))a:if(d=N(a,"li"),null==d)this.r=null;else{if(Tb(a)){if(-1!==a.textContent.search(/^\s*$/i))break a;a.textContent.replace(/\s+/gi," ")}if(this.m&&
this.r===d)this.a=this.m,(d=this.m.lastChild)&&!$b(d)&&a&&!$b(a)||this.a.appendChild(H("br"));else{var f=0;c=null;for(var h=d;h&&h!==this.k;)Ue(h)&&(++f,c||(c=G(h))),h=h.parentNode;f=Math.max(0,f);e=null;for(this.a&&0<this.a.childNodes.length?h=this.a:h=this.o;;){h=h.lastElementChild;if(!h)break;if(Ue(h)&&(e=h,--f,1>f))break}if(0<f&&e)f=e.lastElementChild,e=cf(this,c||"ol"),f.appendChild(e);else if(!e)null!=this.a?(e=H(c||"ol"),this.a.appendChild(e)):e=cf(this,c||"ol");else if(this.e||c&&c!==G(e))null!=
this.a?(e=H(c||"ol"),this.a.appendChild(e)):e=cf(this,c||"ol");this.a=this.Db("li");e.appendChild(this.a);this.r=d;this.m=this.a}}a=this.Tc(a);this.a||(this.a=cf(this));this.a.appendChild(this.gd(b,a));return b};
function $e(a,b){if(b){var c;if((c=Xb(b.parentNode))&&/pre/gi.test(c.whiteSpace)){var d=b.textContent.split(/\n\r|\r\n|\r|\n/gi);if(d&&0<d.length){c=d[0].replace(/\s/gi," ").replace(/\s\s/gi,"\u00a0 ");var e=a.pa(b,document.createTextNode(c));if(e)for(var f=1;f<d.length;f++){var h=e.parentNode;h.appendChild(H("br"));c=d[f].replace(/\s/gi," ").replace(/\s\s/gi,"\u00a0 ");h.appendChild(document.createTextNode(c))}}}else c=b.textContent.replace(/[\ \n\r\t]+/gi," "),d=!1,-1!==c.search(/^[\ \t\n]*$/i)&&
(d=!0),a.pa(b,document.createTextNode(c),!1,d)}else x.warn("Node missing",b)}
q.Bd=function(a){if(a){var b=G(a);"div"===b&&/^en-revealed-crypto:\d+$/.test(a.id)?(df(this),this.pa(a,a.cloneNode(!0),!0),df(this),this.t.push(a)):"embed"===b?(b=ac(a,"type").toLowerCase(),"evernote/x-crypto"!==b&&"evernote/x-todo"!==b&&"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.pa(a)):"script"===b||"style"===b?this.t.push(a):"object"===b&&O(a,"object.en-todo")?this.pa(a):"img"===b&&a.src?(df(this),b=H("img"),Xe(b,a,"src"),Xe(b,a,"alt",""),Xe(b,a,"id"),this.pa(a,b,!0),df(this)):"hr"===
b?(df(this),this.pa(a,H("hr"),!0),df(this)):"br"===b?(df(this),bf(this)):this.a&&a&&(Zb(a)||!Vb(this.b,a))&&df(this)}else x.warn("Node missing",a)};
q.Tc=function(a){for(var b={Ab:0,jb:0,wd:0,rd:0,Cd:0,vc:0,dd:0};a||a===this.k;){var c=G(a);"del"===c||"strike"===c||"s"===c?b.dd=1:"mark"===c?b.jb=1:"a"===c&&(c=a.href+"")&&c.length&&(b.Ab=c,b.wd=0===c.indexOf("evernote://"));if(c=Xb(a)){var d=c.backgroundColor.toLowerCase();if("rgb(255, 204, 102)"===d||"rgb(255, 250, 165)"===d||"rgb(246, 238, 150)"===d||We(a))b.jb=1;var d=c.fontWeight.toLowerCase(),e=c.fontStyle.toLowerCase(),c=c.textDecoration.toLowerCase();if("bold"===d||"bolder"===d||"700"===
d)b.rd=1;if("italic"===e||"oblique"===e)b.Cd=1;!b.Ab&&0<=c.indexOf("underline")&&(b.vc=1);0<=c.indexOf("line-through")&&(b.dd=1)}a=a.parentNode}b.Ab&&b.vc&&delete b.vc;return b};
q.gd=function(a,b){var c;b.Ab&&(c=H("a"),c.setAttribute("href",b.Ab),b.wd&&c.setAttribute("style","color:rgb(105, 170, 53);"),c.appendChild(a),a=c);b.rd&&(c=H("b"),c.appendChild(a),a=c);b.Cd&&(c=H("i"),c.appendChild(a),a=c);b.vc&&(c=H("u"),c.appendChild(a),a=c);b.dd&&(c=H("s"),c.appendChild(a),a=c);b.jb&&(c=H("span",{style:"-evernote-highlight:true; background-color:rgb(255, 250, 165);"}),c.appendChild(a),a=c);return a};
function gf(a,b,c){if(!(this instanceof gf))return new gf(a,b,c);Ye.call(this,a,b,c)}fa(gf,Ye);function hf(a,b,c){if(!(this instanceof hf))return new hf(a,b,c);Ye.call(this,a,b,c)}fa(hf,Ye);q=hf.prototype;q.xc="div";q.pd='font-family: Courier, "Courier New", monospace;';q.Yc=function(){this.F=[];hf.Rb.Yc.call(this)};q.Xc=function(){this.e=!0;for(var a=0;a<this.F.length;a++)this.a=cf(this),this.a.appendChild(this.F[a]);hf.Rb.Xc.call(this)};
q.Db=function(){var a=H(this.xc);this.v&&a.setAttribute("style",this.v);return a};
q.pa=function(a,b,c,d){c=!Ub(a,this.b);if(d&&c)return null;b||(b=a.cloneNode(!1));ef(this,a);c&&(F(this.b)&&(d=G(this.b),Ve(d)&&(this.e=!0)),df(this));for(c=a;c!==this.k&&(c=c.parentNode);){this.b=c;d=G(c);if("li"===d)break;if(Ve(d))break;if(Zb(c))break}d=N(a,"li");if(!this.a&&d)if(this.m&&this.r===d)this.a=this.m,this.a.appendChild(H("br"));else{c=0;for(var e=d;e&&e!==this.k;)Ue(e)&&++c,e=e.parentNode;c=Math.max(0,c);this.a=cf(this);for(e="- ";1<c;)e="\u00a0 \u00a0 "+e,--c;this.a.appendChild(document.createTextNode(e));
this.r=d;this.m=this.a}else this.r=null,this.a||(this.a=cf(this));a=this.Tc(a);this.a.appendChild(this.gd(b,a));return b};
q.Bd=function(a){var b;b=G(a);"object"===b&&O(a,"object.en-todo")?(b=xb(a,"en-todo-checked"),this.pa(a,document.createTextNode(b?"[x] ":"[ ] "))):"embed"===b?(b=ac(a,"type").toLowerCase(),"evernote/x-todo"===b?(b="true"===(ac(a,"todo-checked")+"").toLowerCase(),this.pa(a,document.createTextNode(b?"[x] ":"[ ] "))):"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.F.push(a.cloneNode(!0))):("script"!==b&&"style"!==b||this.t.push(a),"img"!==b&&("hr"===b?df(this):"br"===b?df(this):Ve(b)?(df(this),
this.e=!0):!this.a||!Zb(a)&&Vb(this.b,a)||df(this)))};q.Tc=function(){return{}};q.gd=function(a){return a};
function jf(){var a=this;this.name="simpletext";this.d=function(){function b(b,f){var m=c.a(),n,l,k;if(m&&!m.collapsed){d.Hc();l=Qc(m,e);n=l[0];var v=l[1];k=v.nextSibling;l=v.parentNode;n===v?c.ke(n):c.e(n,0,v,v.childNodes.length);n=c.a().cloneContents()}if(n){var y=(new b(n,null,f)).ob.childNodes;n=y[0];v=y[y.length-1];m=m.startContainer;for(k&&Tb(k)&&0===k.length&&(k=null);0<y.length;)null!==k?c.insertBefore(y[0],l,k):c.fb(y[0],l);a.b("edit").v({Qb:!0});m!==e&&m!==l&&c.removeNode(m);m=Db(v);c.e(Cb(n),
0,m,m.length)}else new b(e,e,f),c.e(e,0),c.ja();return!0}var c=a.b("context");a.b("query");var d=a.b("normalize"),e=c.root,f=c.K;f.simpletext={l:!0,action:function(c){null!=c&&ka("simpletext called with an argument!");return b(gf,{Sb:a.b("table")})},enabled:D};f.plaintext={l:!0,action:function(d){var e=null,f=null,f="",e=null;d=bb(d);null!=d.value&&(ka("plaintext called with non-JSON string"),d={});d=C(d,{fontStyle:"fixed width"});"fixed width"===d.fontStyle?(e=H("tt",{style:"position: absolute;"}),
document.body.appendChild(e),f=Xb(e),f="font-family:"+f.fontFamily+"; font-size:"+f.fontSize+"; font-weight:"+f.fontWeight,Ab(e)):"none"===d.fontStyle&&c.i("removeformat").action();e={cssBlockStyle:f,Sb:a.b("table")};return b(hf,e)},enabled:D}};this.me=function(b){return(new gf(b,null,{Sb:a.b("table")})).ob};this.Fd=function(b){return(new hf(b,null,{Sb:a.b("table"),cssBlockStyle:""})).ob}};function kf(){this.name="spellcheck";this.root=null;this.d=function(){function a(a,b){var c;null!=a&&null!=b&&3===a.nodeType&&a===b.startContainer&&a===b.endContainer&&!0!==b.collapsed&&(c=a.data.substr(b.startOffset,b.endOffset-b.startOffset),a.replaceData(b.startOffset,c.length,c))}var b=this.b("context"),c=this.b("format");this.root=b.root;this.Ba=function(){var d=c.yb(),e,f=Y(),h=Cd(b.root);null!=f&&f.startContainer===f.endContainer&&3===f.startContainer.nodeType&&!1!==f.collapsed&&(f=f.startContainer,
e=window.getSelection(),e.modify("move","backward","word"),e.modify("extend","forward","word"),e=Y(),a(f,e),Dd(b.root,h),e=window.getSelection(),e.modify("move","forward","word"),e.modify("extend","backward","word"),e=Y(),a(f,e),Dd(b.root,h));b.R();c.ya(d)};return this};this.s=function(){this.root=this.Ba=null}};function lf(){var a=this;a.name="stats";a.d=function(){var b=a.b("context"),c=a.b("query"),d=a.b("todo"),e=b.root,b=b.K;a.getStats=function(a){var b={};a=C(a,{stats:["todo","firstLine"]});a=a.stats;z(ca(a));-1!==a.indexOf("todo")&&(b.todo=d.Ic().length);if(-1!==a.indexOf("firstLine"))for(var g;g=Sb(g,e);)if(g&&!Da(g.textContent)){b.firstLine=c.A(g).innerText.substr(0,255).trim();break}return b};b.stats={l:!1,value:function(b){return a.getStats(bb(b))},enabled:D,mb:!0}}};function mf(){this.name="table";this.d=function(){function a(a){var b=Xb(a.querySelector("td")),c=parseInt(b.borderWidth,10)||1,d=b.borderColor||"black";B(la(a.style),function(b){0<=b.indexOf("border")&&U(a,b)});a.removeAttribute("border");V(a,"border-style","solid");V(a,"border-width",c+"px");V(a,"border-color",d);V(a,"border-collapse","collapse");B(a.querySelectorAll("tr"),function(a){B(la(a.style),function(b){0<=b.indexOf("border")&&U(a,b)})});B(a.querySelectorAll("td"),function(a){B(la(a.style),
function(b){0<=b.indexOf("border")&&U(a,b)});V(a,"border-style","solid");V(a,"border-width",c+"px");V(a,"border-color",d)})}var b=this,c=b.b("context"),d=b.b("query"),e=b.b("block"),f=c.root,h=c.K;b.k=function(){var a=c.a();if(!a)return null;var b=N(a.startContainer,"table",f),a=N(a.endContainer,"table",f);return!b||a&&a!==b?null:b};b.g=function(){return b.k()?N(c.a().startContainer,"tr",f):null};b.cc=function(){return b.k()?N(c.a().startContainer,"td",f):null};b.j=function(){var a;if(null==a&&(a=
b.k(),null==a))return[];var c=window.getSelection(),d=[],e=[],f=[];B(a.querySelectorAll("td"),function(a){c.containsNode(a,!1)?(e.push(a),f.push(a)):c.containsNode(a,!0)&&(d.push(a),f.push(a))});return f};b.cd=function(a){var b={table:null,cell:null,row:-1,column:-1},c=N(a,"table"),d=N(a,"tr");a=N(a,"td,th");if(null==c||null==d||null==a)return b;for(var e=-1,f=-1,h=c.querySelectorAll("tr"),w=0;w<h.length;w++)h[w]===d&&(e=w);if(-1===e)return b;d=d.querySelectorAll("td,th");for(w=0;w<d.length;w++)d[w]===
a&&(f=w);return-1===f?b:{table:c,cell:a,row:e,column:f}};b.$b=function(a){var b=R(a,"float"),c=a.getAttribute("align"),d=a.style.marginLeft;a=a.style.marginRight;var e;null!=b?e=b:null!=c?e=c:"auto"===d&&"auto"===a?e="center":"auto"===d?e="right":"auto"===a&&(e="left");null==e&&(e="left");return e};b.Ad=function(a){if(null==a||!F(a)||"table"!==G(a)||null!=a.querySelector("table"))return{rows:-1,columns:-1};a=a.querySelectorAll("tr");if(0>=a.length)return{rows:0,columns:0};var b=a[0].querySelectorAll("td,th");
return{rows:a.length,columns:b.length}};b.ud=function(a){for(var b=+a.columns||2,c=+a.rows||2,d=a.borderColor||"rgb(211,211,211)",e=+a.borderWidth||1,f=H("table",{style:"-evernote-table:true;border-collapse:collapse;width:100%;table-layout:fixed;"}),h=Math.round(1E4/b)/100,w=0;w<c;w++){var p=H("tr");f.appendChild(p);for(var r=0;r<b;r++){var A=H("td",{style:"border-style:solid;border-width:"+e+"px;border-color:"+d+";padding:10px;margin:0px;width:"+h+"%;"},[Qb()]);a.cellColor&&(A.style.backgroundColor=
a.cellColor);p.appendChild(A)}}return f};h.inserttable={l:!0,action:function(a){if(!c.a()||e.hc())return!1;var h={};"{"===a[0]?h=C(a,{columns:2,rows:2,borderColor:"rgb(211,211,211)",borderWidth:1,cellColor:null,alignment:"left"}):(a=a.split(","),h.columns=+a[0].trim(),h.rows=+a[1].trim());c.i("insertparagraph").action();a=h.align||"left";var h=b.ud(h),n=d.A(c.a().startContainer);n.parentNode.insertBefore(h,n);e.Q(h);c.e(h.querySelector("div"),0);c.i("tablealign").action(a);od(f,"TABLE_ADDED",{target:h});
return!0},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!e.hc()}};h.inserttablerow={l:!0,action:function(a){var d=b.k();if(null==d)return!1;a="before"===a.toString().toLowerCase().trim();var e=N(c.a().startContainer,"tr",f),h=N(c.a().endContainer,"tr",f);if(!e&&!h)return!1;e=e.compareDocumentPosition(h)&(a?4:2)?e:h;if(!e)return!1;var h=e.cloneNode(!0),k=[];B(h.querySelectorAll("td"),function(a){k.push(a);Eb(a);a.appendChild(Qb())});c.o(h,e.parentNode,J(e)+(a?0:1));od(f,"TABLE_INSERT_ROW",
{target:d});return!0},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}};h.inserttablecol={l:!0,action:function(a){var d=b.k();if(!d)return!1;var e="before"===a.toString().toLowerCase().trim();a=N(c.a().startContainer,"td",f);var h=N(c.a().endContainer,"td",f);if(!a&&!h)return!1;var k=a.compareDocumentPosition(h)&(e?4:2)?a:h;if(!k)return!1;var v=[],y=k.cellIndex;B(la(d.querySelectorAll("td")),function(a){if(a.cellIndex===y&&d===N(k,"table")){var b=a.cloneNode(!0);Eb(b);
b.appendChild(Qb());v.push(b);var f=R(a,"width"),f=window.parseFloat(f)||0;0<f&&(V(b,"width",f/2+"%"),V(a,"width",f/2+"%"));c.o(b,a.parentNode,J(a)+(e?0:1))}});od(f,"TABLE_INSERT_COLUMN",{target:d});return!0},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}};h.deletetablerow={l:!0,action:function(){var a=b.g();if(!a)return!1;var d=b.k();if(!d)return!1;var e=W("tr",d);if(1===e.length)return c.i("deletetable").action();e.indexOf(a)===e.length-1?(e=W("td",e[e.length-2]).pop(),
c.e(e,M(e))):(e=W("td",e[e.indexOf(a)+1]).shift(),c.e(e,0));c.removeNode(a);od(f,"TABLE_DELETE_ROW",{target:d});return!0},state:function(){return!!b.g()},enabled:function(){return c.hasFocus()&&!!b.g()}};h.deletetablecol={l:!0,action:function(){var a=b.cc();if(!a)return!1;var d=a.cellIndex,e=b.k();if(!e)return!1;var h=W("td",e);if(h.every(function(a){return a.cellIndex===d}))return c.i("deletetable").action();var k=h.filter(function(a){return a.cellIndex===d+1});k&&k.length||(k=h.filter(function(a){return a.cellIndex===
d-1}));for(var v=W("tr",e),y=0,w=0;w<v.length;w++)for(var p=W("td",v[w]),r=0;r<p.length;r++)p[r]===a&&(y=w);c.e(k[y],0);for(w=h.length-1;0<=w;w--)a=h[w],a.cellIndex===d&&c.removeNode(a);od(f,"TABLE_DELETE_COLUMN",{target:e});return!0},state:function(){return!!b.cc()},enabled:function(){return c.hasFocus()&&!!b.cc()}};h.deletetable={l:!0,action:function(){var a=b.k();if(!a)return!1;c.e(a.parentNode,J(a),a.parentNode,J(a)+1);b.b("edit").v();od(f,"TABLE_REMOVED",{target:a});return!0},state:function(){return!!b.k()},
enabled:function(){return c.hasFocus()&&!!b.k()}};h.tablebordercolor={l:!0,action:function(c){var d=c||"black";c=b.k();if(null==c)return!1;a(c);V(c,"border-color",d);B(c.querySelectorAll("td"),function(a){V(a,"border-color",d)});return!0},value:function(){var a=b.k();return null==a?"":(a=Xb(a.querySelector("td")).borderColor)?""+a:""},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}};h.tableborderwidth={l:!0,action:function(c){var d=parseInt(c,10);if(isNaN(d)||0>d)return x.warn("Invalid value given to tableborderwidth <$>",
ma(d)),!1;c=b.k();if(null==c)return!1;a(c);V(c,"border-width",d+"px");B(c.querySelectorAll("td"),function(a){V(a,"border-width",d+"px")});od(f,"TABLE_BORDER_WIDTH",{target:c,value:d});return!0},value:function(){var a=b.k();if(null==a)return"";a=Xb(a.querySelector("td"));return(a=parseInt(a.borderWidth,10))?""+a:"0"},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}};h.tablealign={l:!0,action:function(a){if("left"!==a&&"right"!==a&&"center"!==a)return x.warn("Invalid value given to tablealign <$>"),
!1;var c=b.k();if(null==c)return!1;c.removeAttribute("align");U(c,"float");U(c,"margin");U(c,"margin-right");U(c,"margin-left");"left"===a?V(c,"margin-left","0px"):"right"===a?(V(c,"margin-left","auto"),V(c,"margin-right","0px")):"center"===a&&(V(c,"margin-left","auto"),V(c,"margin-right","auto"));od(f,"TABLE_ALIGN",{target:c,value:a});return!0},value:function(){var a=b.k();return null==a?"":b.$b(a)},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}};h.tablecellcolor=
{l:!0,action:function(a){a=a||"transparent";var c=b.j();if(0===c.length)return!1;B(c,function(b){U(b,"background");U(b,"background-image");U(b,"background-attachment");U(b,"background-position");U(b,"background-clip");U(b,"background-repeat");V(b,"background-color",a)});return!0},value:function(){var a=b.j();if(0===a.length)return"";a=a[0].style;return a.backgroundColor?(a=kd(a.backgroundColor),null!=a?a:""):""},state:function(){return!!b.k()},enabled:function(){return c.hasFocus()&&!!b.k()}}}};function nf(){var a=this;this.name="tableselection";this.d=function(){function b(a,b){var c=[],d=[],e=Lc(a,"td");if(0<e.length)for(var f=0;f<e.length;f++){var g=e[f];b.containsNode(g,!1)?d.push(g):b.containsNode(g,!0)&&c.push(g)}return{Kc:d,sc:c}}function c(){for(var a=e.getElementsByClassName("en-selected");0<a.length;)yb(a[0],"en-selected")}var d=this.b("context"),e=d.root,f=!1,h,g=Ac();this.c.e(e,"selectionChanged",function(){if(Y(e)&&!f&&0!==e.getElementsByTagName("table").length){var a=window.getSelection(),
d=Y();g=Ac(d.startContainer,d.startOffset,d.endContainer,d.endOffset);c();d&&!d.collapsed&&(a=b(d,a),1>=a.sc.length&&0===a.Kc.length||(B(e.querySelectorAll("table"),function(a){E(a,"en-selected")}),B(a.sc,function(a){E(a,"en-selected")}),B(a.Kc,function(a){E(a,"en-selected")})))}});this.c.a(document,"contextmenu",function(e){f=!0;h=a.c.timeout(function(){f=!1},1E3,h);e=e.target;var l=window.getSelection(),k=Y();c();Hc(k,g)||(l=b(k,l),2!==l.sc.length&&1!==l.sc.length||0!==l.Kc.length||N(k.startContainer,
"td")===N(k.endContainer,"td")||(k=document.createRange(),k.selectNodeContents(e),d.Xa(k),d.ja()));return!0});c();var m=H("style",{type:"text/css"});m.textContent="td.en-selected { background-color: "+Ud()+" !important;}";document.querySelector("head").appendChild(m)}};function of(){var a=this;this.name="texttransform";this.d=function(){function b(a){void 0===a&&(a=document.body);c(a);f(a,function(a){var b="";a=a.split(/(\W+)/gi);for(var c=0;c<a.length;c++)var d=a[c],b=0<d.length?b+(d.charAt(0).toLocaleUpperCase()+d.slice(1).toLocaleLowerCase()):b+d;return b})}function c(a){var b=Cd(a,!0);a.normalize();Dd(a,b)}function d(a){void 0===a&&(a=document.body);f(a,function(a){return a.toLocaleLowerCase()})}function e(a){void 0===a&&(a=document.body);f(a,function(a){return a.toLocaleUpperCase()})}
function f(a,b){var c;void 0===a&&(a=document.body);var d=Y();if(d&&!(1>d.toString().length)){Tb(d.endContainer)&&0<d.endOffset&&d.endOffset<d.endContainer.textContent.length&&(c=d.endContainer.splitText(d.endOffset),d.setEnd(c,0));Tb(d.startContainer)&&0<d.startOffset&&(c=d.startContainer.splitText(d.startOffset),d.setStart(c,0));Bc(d);for(var e=c=null,f=window.getSelection(),d=document.createTreeWalker(a,4,{acceptNode:function(a){return f.containsNode(a,!1)?1:2}},!1);d.nextNode();)Tb(d.currentNode)&&
(d.currentNode.textContent=b(d.currentNode.textContent),c||(c=d.currentNode),e=d.currentNode);d=document.createRange();d.setStartBefore(c);d.setEndAfter(e);Bc(d)}}var h=a.b("context"),g=h.root,h=h.K;h.lowercase={l:!0,action:function(){d(g);return!0}};h.uppercase={l:!0,action:function(){e(g);return!0}};h.capitalize={l:!0,action:function(){b(g);return!0}}}};function pf(){var a=this;a.name="todo";var b;a.d=function(){function c(a,b){for(var c=0;c<a.length;c++){var d=a[c];b?E(d,"en-todo-checked"):yb(d,"en-todo-checked")}}function d(a,c){zb(a,"en-todo-checked");od(b,"setDirty",{Kb:!0===c})}function e(a){var c=a.target;if(!h.Ja()){var d=W("li.en-todo-over",b);(a=f(a))&&E(c,"en-todo-over");for(var e=0;e<d.length;e++){var g=d[e];a&&g.isEqualNode(c)||yb(g,"en-todo-over")}}}function f(a){var b=a.target;return P(b,"li")&&xb(b.parentNode,"en-todo-list")&&40>a.clientX-
b.getBoundingClientRect().left}var h=a.b("context"),g=a.b("query"),m=a.b("block"),n=a.b("normalize"),l=a.b("undo");b=h.root;var k=h.K;a.Vc=function(a){var b=null;oc(a,function(a){return O(a,"object.en-todo")?(b=a,!0):rc(a)||g.n(a)?!1:!0},a);return b};a.re=function(b){if(!O(b,"div,li"))return!1;var c=a.Vc(b);if(!c)return!1;for(var d=b.childNodes.length-1;0<=d;d--){var e=b.childNodes[d];if(e!==c&&(Tb(e)&&!rc(e)||!g.wa(e)))return!1}return!0};a.g=function(){return H("object",{"class":"en-todo"})};a.Dc=
function(b){var c=a.g();h.o(c,b,0);m.Ea(b);return c};a.Ic=function(){return W("object.en-todo",b)};a.j=function(a){if(a&&a.parentNode){var b=a.parentNode,c=a.nextSibling;if(c&&Tb(c)){var d=c.textContent,e=d.trimLeft(d);d!==e&&(0==e.length?h.removeNode(c):c.textContent=e)}h.removeNode(a);m.Ea(b)}};a.c.a(b,"mousemove",e);a.c.a(b,"mouseout",e);a.c.a(b,"blur",e);a.c.a(b,"mouseup",function(a){if(O(a.target,"object.en-todo")||f(a))h.Ja()||l.ra(function(){d(a.target,!0)})});k.controltodos={l:!0,action:function(d){var e=
h.a();if(!e||!cc(b))return!1;var f=a.Ic();e.collapsed||(f=Lc(e,"object.en-todo"),e=Gc(e),(e=pc(e,"object.en-todo",g.A(e)||b))&&f.push(e));if(d&&"toggle"!=d)if("on"==d)c(f,!0);else if("off"==d)c(f,!1);else return!1;else for(d=f,f=0;f<d.length;f++)zb(d[f],"en-todo-checked");return!0}};k.inserttodo={l:!0,action:function(c){var e=h.a();if(!e||!cc(b))return!1;if("toggle"===c){c=Gc(e);var f=N(c,"ul.en-todo-list > li",b);if(f||(f=pc(c,"object.en-todo",g.A(c)||b)))return d(f,!1),!0}if(e.collapsed)return c=
a.g(),a.b("paste").insertNode(c),m.Ea(c),!0;n.Sa();if((c=a.Ic().filter(function(a){return e.intersectsNode(a)}).reverse())&&0<c.length)return c.map(function(b){a.j(b)}),!0;(c=W("div,li",b).filter(function(a){return e.intersectsNode(a)}))&&0<c.length&&(c.map(function(b){Da(b.textContent)||a.Dc(b)}),e=h.a(),h.e(c[0],0,e.endContainer,e.endOffset));return!0}}};a.aa=function(b,d){1===d?X("en-todo",b).forEach(function(b){var c=a.g();zb(c,"en-todo-checked","true"==b.getAttribute("checked"));x.log("en-todo",
c.outerHTML);Fb(b,c)}):X('embed[type="evernote/x-todo"]',b).forEach(function(a){var d=Pb(b,"object",{"class":"en-todo"});"true"===a.getAttribute("todo-checked")&&E(d,"en-todo-checked");Fb(a,d)})};a.ia=function(a,b){1===b&&X("object.en-todo",a).forEach(function(b){var d=Pb(a,"en-todo");xb(b,"en-todo-checked")&&d.setAttribute("checked","true");Fb(b,d)})}};function qf(){var a=this;a.name="transform";a.gb=function(b,c,d){function e(b){3===c&&X("title,script,style,link,base,meta",b).forEach(Ab);a.sb.e().forEach(function(d){d!==a&&d.aa&&d.aa(b,c,f.info||{})});te(b);1!==c&&ne(b);pe(b);qe(b);oe(b);return b}var f=C(d,{info:{},Wc:3===c});if(b instanceof DocumentFragment)return f.Wc=!0,e(b);Wb(b)?(d=Lb(b),e(d),b.appendChild(d)):e(b);f.Wc||ve(b);return b};a.zc=function(b,c,d){var e=C(d,{info:{}});dc(b,!1);a.sb.e().forEach(function(d){d!==a&&d.ia&&d.ia(b,c,e.info||
{})});ne(b)}};function rf(){var a=this;a.name="clearly";a.f=null;a.d=function(b){a.f=C(b);E(a.f.root,"en-clearly-style-on")};a.s=function(){yb(a.f.root,"en-clearly-style-on")}};var sf=function(){function a(a,c,d){z(F(c),"Container required",c);this.editor=a;this.element=c;this.elementID=d;this.e=c.cloneNode(!0);this.b=!1;this.a=null}a.prototype.d=function(){var a=this.editor.Ib;z(a,"Editor has no module?");z(!this.a,"Already setup?");var c=a.createContentModule(this);z(c,"Content module could not be created");["setup","saveENML"].forEach(function(d){z("function"==ba(c[d]),"Expected a content module method",d,a.Ya,a)});var d=c.d();z(d);this.a=c};a.prototype.s=function(){var a=
this.a.cleanup;a&&a();(a=this.editor.Ib.removedContentModule)&&a(this.a);this.a=null};a.prototype.Ue=function(a){for(;a.firstChild;)a.removeChild(a.firstChild);if(this.b){var c=document.createDocumentFragment();this.a.saveENML(c,!0);a.appendChild(c)}else for(c=this.e.cloneNode(!0);c.firstChild;)a.appendChild(c.firstChild);this.b=!1;this.e=a.cloneNode(!0)};a.prototype.markAsDirty=function(){this.b=!0};return a}();var tf=function(){function a(){this.a={};this.b={};this.e={}}var b=0;a.prototype.Qe=function(a){var b=a.Ya.toLowerCase();z(!this.a[b],b,"App channel is already registered");this.a[b]=a};a.prototype.Ze=function(a){a=a.Ya.toLowerCase();z(!!this.a[a],a,"App channel is not registered");delete this.a[a]};a.prototype.Te=function(a,d,e,f){a=a.Ya.toLowerCase();x.log("Module",a,"sendMessage",d,e);d={type:"message",moduleName:a,messageName:d,data:e?e:{}};f&&(e=""+b++,this.b[a+":"+e]=f?f:null,d.messageID=e);
Fd("modulePublished",d)};a.prototype.Ie=function(a){x.log("Module receives",a);z(za(a),"Bad message payload",a);switch(a.type){case "message":this.i(a);break;case "reply":this.k(a)}};a.prototype.i=function(a){var b=this,e=a.moduleName,f=a.messageName,h=a.messageID,g=a.data;z(e&&f&&g,"Bad native message payload",a);if(a=this.a[e.toLowerCase()]){var m=function(){};if(h){var n=e+":"+h;this.e[n]=e;m=function(a){a={type:"reply",moduleName:e,messageName:f,messageID:h,data:a?a:{}};delete b.e[n];Fd("modulePublished",
a)}}a.Je(f,g,m)||m({})}else x.log("Module call failed - not loaded",e)};a.prototype.k=function(a){var b=a.moduleName,e=a.messageName,f=a.messageID,h=a.data;z(b&&e&&f&&h,"Bad native response payload",a);b=b+":"+f;(e=this.b[b])?(e(a.data),delete this.b[b]):x.log("Unexpected response received",a)};a.ae=new a;return a}();var uf=function(){function a(a){this.Ya=a;this.a={};b.Qe(this)}var b=tf.ae;a.prototype.s=function(){b.Ze(this)};a.prototype.sendMessage=function(a,d,e){b.Te(this,a,d,e)};a.prototype.registerMessageHandler=function(a,b){this.a[a]=b};a.prototype.Je=function(a,b,e){var f=this.a[a];if(!f)return x.log("Unexpected message received",a),!1;1==f.length?(f(b),e({})):f(b,e);return!0};return a}();var vf=function(){function a(a){this.Ya=a;this.Ib=null;this.a={};this.registerModule=Xd;this.nativeChannel=new b(a)}var b=uf;a.prototype.d=function(a){z(this.Ya===a.Ya,"Module names do not match");this.Ib=a;a.d(this)};a.prototype.C=function(){return!!this.Ib};a.prototype.s=function(){this.Ib.s()};a.prototype.Ve=function(a,b){var e=this.a[a];z(e,"Could not find elment with ID",a);e.Ue(b)};a.prototype.$d=function(a,b){var e=this;Ka(function(){var f=new sf(e,a,b);f.d();e.a[b]=f})};return a}();function wf(){var a=this;a.name="module";a.d=function(b){function c(b,c){var d=e(b);if(d.C())d.$d(c,c.id);else if(null==l[b]){var f=n[b];if(null!=f){l[b]=f;var g="script"!==f.mode,h=f.url;z(t(h),"No URL provided");a.c.timeout(function(){var a=H("script",{type:"text/javascript",async:"true",src:h});if(g){var b=H("script",{type:"text/javascript"},["var editor = frameElement.evernoteEditorAPI;"]),c=H("iframe",{style:"position:absolute;width:1px;height:1px;top:-999px;left:-999px;display:none;"});c.e=
d;document.body.appendChild(c);c.contentDocument.head.appendChild(b);c.contentDocument.head.appendChild(a)}else document.head.appendChild(a)})}}}function d(a){var b=a.moduleName;z(t(b)&&0<b.length,'Expected "moduleName" for module!',a);z(!e(b).C(),"Modules can only be registered once!",b,a);["createContentModule","setup"].forEach(function(c){z("function"==ba(a[c]),"Expected a module method",c,b,a)});delete l[b];var c=e(b);z(!c.C(),"Editor is already setup");c.d(a);return c}function e(a){var b=k[a];
b||(b=new vf(a),k[a]=b);return b}var f=a.b("context"),h=a.b("query"),g=a.b("block"),m=f.root;b=C(b,{Zc:null});var n={},l={},k={};za(b.Zc)&&(n=b.Zc);for(b=0;b<Wd.length;b++)d(Wd[b]);a.c.i("module",function(a){var b=d(a);W("div.en-module",m).forEach(function(c){var d=c.getAttribute("data-en-module-name");a.moduleName==d&&b.$d(c,c.id)})});a.c.b({name:"module",action:function(a){a=cb(a);if(null==a)return!1;x.log("INFO",a);for(var b=0;b<a.length;b++){var d=a[b];if("insert"===d.action){var e=d.moduleName;
t(e)?(d="en-module-"+Ia().toString(),d=H("div",{id:d,"class":"en-module","data-en-module-name":e,contentEditable:"false"},"MODULE"),c(e,d),f.i("insertparagraph").action(),e=h.A(f.a().startContainer),e.parentNode.insertBefore(d,e),g.Q(d),f.ke(d)):x.error("No name for insert provided",d)}}return!0},value:function(a){var b=[];a&&(b=W("div.en-module",m).filter(function(b){return b.getAttribute("data-en-module-name")===a}).map(function(a){return a.id}));return{result:b}},enabled:D});a.c.b({name:"module-channel",
value:function(a){tf.ae.Ie(a);return null},enabled:D});a.aa=function(a){W('div[en-content-class="evernote.module"]',a).forEach(function(a){E(a,"en-module");var b="en-module-"+Ia().toString();a.setAttribute("id",b);a.removeAttribute("en-content-class");a.setAttribute("contentEditable","false");b=a&&a.getAttribute?a.getAttribute("en-app-data"):"";null==b?b=null:(b=fc("en-module-name").exec(b),b=null===b?null:b[3].trim());b&&(a.setAttribute("data-en-module-name",b),c(b,a))})};a.ia=function(a){W("div.en-module",
a).forEach(function(a){var b=a.id;a.removeAttribute("class");a.removeAttribute("id");var c=a.getAttribute("data-en-module-name");a.removeAttribute("data-en-module-name");var d;d=a&&a.getAttribute?a.getAttribute("en-app-data"):"";null==d?d="":(d=d.replace(fc("en-module-name"),"$1").trim(),0<d.length?a.setAttribute("en-app-data",d):a.removeAttribute("en-app-data"),d=d||"");null!=c&&(d=d.trim(),d.length&&";"!==d[d.length-1]&&(d+=";"),a.setAttribute("en-app-data",d+"en-module-name:"+c+";"));dc(a,!1);
a.setAttribute("en-content-class","evernote.module");c=k[c];c.C()&&c.Ve(b,a)})}}};function xf(){z(this instanceof xf,"Use `new` to instantiate this class")}q=xf.prototype;q.name="rte";
q.d=function(a){var b=this;b.f=C(a,{active:!0,highlightMagic:!1,skipMarkupTransform:!1,placeholder:"",trackStateChanges:null,trackValueChanges:null,trackEnabledChanges:null,tableResizing:!1,imageResizing:!1,tableSelection:!1,typebehind:{emoticon:!1,url:!1},mutationObserver:!1,resources:null,smartScroll:!1,smartHeight:!1,imageConfig:{},selector:null,html:null,enml:null,modules:null,clearly:null,root:null});t(b.f.selector)?b.root=document.querySelector(b.f.selector):b.root=a.root||document.getElementById("en-note")||
document.body;z(b.root&&F(b.root),"Root not valid!");z(F(b.root),"RTE root node required to be an HTML element! <$>");var c=b.N();b.c.Nb({Ia:["rte","content"]});c.o(function(a){a.c.Nb({Ia:["rte","content"]})});b.da=null;b.Ma=!!(b.f.trackStateChanges||b.f.trackValueChanges||b.f.trackEnabledChanges);var d=new ke;c.d(d,{root:b.root});d.Yd(!b.f.active);c.d(new me);var e=new xe;c.d(e);c.d(new le);c.d(new ye);b.g=!0===b.f.mutationObserver?new ee:new de;c.d(b.g,{element:b.root,sa:function(){d.R();return JSON.stringify(e.yb())},
ub:function(a){d.R();e.ya(JSON.parse(a))}});b.j=new Ae;c.d(b.j);var f=b.f.tableResizing,h=b.f.imageResizing,g=b.f.tableSelection;b.H=new md;c.load(b.H);c.d(new Ne);c.d(new He);c.d(new Ce);c.d(new De);c.d(new Me,b.f.imageConfig);c.d(new mf);c.d(new pf);c.d(new Ge);c.d(new Qe);c.d(new Pe);c.d(new lf);c.d(new of);c.d(new jf);c.d(new kf);null!=a.modules&&c.d(new wf,{Zc:a.modules});a.emoticons&&(ka("Use typebehind: { emoticon: true } instead of adding","emoticons: true directly to the rte options."),a.typebehind.emoticon=
!0);c.d(new Ke,a.typebehind);za(b.f.resources)&&c.d(new Re,{resources:b.f.resources});var m=new qf;c.d(m);c.d(new Oe);c.d(new Le);b.f.skipMarkupTransform||m.gb(b.root,2);g&&c.d(new nf);h&&(b.u=new nd,d.Ja()||c.d(b.u));f&&(b.w=new Be,d.Ja()||c.d(b.w));b.H&&c.d(b.H);null!=a.clearly&&c.d(new rf,{root:b.root});d.Ja()||dc(b.root,!0);d.Pb();b.Pb();b.c.e(b.root,"setDirty",function(a){yf(b,a)});b.c.a(b.root,"input",function(){od(b.root,"setDirty")});b.$a=function(){var a=b.hasFocus();a!==b.T&&(Hd("content",
{focus:a}),b.T=a);if(a&&b.Ma){var a=zf(b),c=JSON.stringify(a);c!==b.Da&&(b.Da=c,z(!a||za(a),"info has to be dict",a),a=a||{},a.module="content",Fd("styleChanged",a))}};b.c.a(b.root.ownerDocument,"selectionchange",b.vd.bind(b));b.f.smartHeight&&(c=function(){var a=window.innerHeight;document.body.style.minHeight="";a>document.body.clientHeight&&(document.body.style.minHeight=a+"px")},b.c.a(window,"resize",c),c());b.f.placeholder&&b.root.setAttribute("data-en-placeholder",b.f.placeholder);c=a.html;
a=a.enml;z(!(null!=c&&null!=a),"You can only provide one content type: html or enml");t(c)?b.N().a("io").Ob(c):t(a)&&b.N().a("enml").tc(a);b.g.clear()};q.s=function(){this.Da=this.yc=null;Ec();this.T=this.Ca=null;dc(this.root,!1);this.j=this.root=this.f=this.w=this.u=null};q.vd=function(){try{var a={Ca:this.Ca},b=Y(this.root);null!=b&&(this.Ca=Ic(b));a.Rd=b;od(this.root,"selectionChanged",a);this.da=this.c.timeout(this.$a,50,this.da)}catch(c){x.error("Exception in en.rte.didChangeStyle <$>:",c.toString())}};
function yf(a,b){b=b||{};a.f.smartScroll&&!1!==b.Kb&&setTimeout(function(){Mc(Y())},0);a.vd()}
function zf(a){function b(a,b,d){if(a&&a.length){for(var e={},f=0;f<a.length;f++){var g=a[f];e[g]=d(g)}e&&(c[b]=e)}}var c={},d=Od,e=a.N().a("context"),f=Y(a.root),h=!a.Ca||a.Ca.startContainer!==f.startContainer;if(f.collapsed&&(h||null===e.Ge())){var g=Xb(f.startContainer);e.We(g)}b(a.f.trackStateChanges,"state",d.state);b(a.f.trackValueChanges,"value",d.value);b(a.f.trackEnabledChanges,"enabled",d.enabled);f.collapsed&&h&&e.$e();return c}
q.selection=function(a){var b=Y(this.root);a&&(this.Ca&&Bc(Jc(this.Ca)),this.root.focus(),b=Y(this.root));return b};function Af(a,b,c){return Ka(function(){function d(){c();!0!==b.mb&&od(a.root,"setDirty")}!0===b.focus&&a.selection(!0);!0===b.l?a.g.ra(d,b.f.title):d();return!0})||!1}q.hasFocus=function(){var a=Y(this.root);return a&&(a=Gc(a))?!(!N(a,cc)&&!cc(document.body)):!1};
q.Pb=function(){var a=this,b=this.j.He();Object.keys(b).forEach(function(c){var d=b[c];d.name=c;var e={name:c,l:d.l,mb:d.mb,Z:d.Z,enabled:null,action:function(b){b=a.j.execCommand.bind(a.j,c,!1,b);return Af(a,e,b)},state:function(){return a.j.queryCommandState(c)},value:function(b){return a.j.queryCommandValue(c,b)}};e.enabled=d.enabled?function(){return a.j.queryCommandEnabled(c)}:function(){return a.hasFocus()&&a.j.queryCommandEnabled(c)};a.c.b(e)});a.c.b({name:"focus",action:function(b){b=C(bb(b),
{pos:"top",force:!1,scroll:!1,animate:!1,value:null});if(!Y(a.root)||b.force)if(a.root.focus(),a.Ca&&!b.force)Bc(Jc(a.Ca));else if("bottom"===b.pos){var d=document.createRange();d.selectNodeContents(a.root);d.collapse(!1);Bc(d)}else Bc(Ac(a.root,0));b.scroll&&0!=M(a.root)&&Mc(Y());return!0},state:function(){return a.hasFocus()},value:function(b){var d=a.hasFocus();if(d&&b&&"position"===b.type)return I(Y());if(d)return a.name},Ua:!0,enabled:D});a.c.b({name:"active",action:function(b){b=ab(b);var d=
a.N(),e=d.a("context"),f=!e.Ja();f!==b&&window.getSelection().containsNode(a.root,!0)&&Ec();e.Yd(!b);f&&!b&&(dc(a.root,!1),a.u&&d.s(a.u),a.w&&d.s(a.w));!f&&b&&(Ec(),dc(a.root,!0),a.u&&d.d(a.u),a.w&&d.d(a.w));return!0},state:function(){return!a.N().a("context").Ja()},enabled:D})};var Z={},Bf=null,Cf=null;Z.C=!1;
Z.d=function(a){!0===Z.C&&Z.s();return Ka(function(){a=C(a);Od=new Za;Td(a);Pd=Bf=new be({a:Od,f:a,uid:(new Date).getTime()});Cf=new ae;Cf.d({name:"document"});var b,c;a.template?(b=new Se,c=a.template):a.rte&&(b=new xf,c=a.rte);b?((null==a.active||a.active)&&Bf.d(b,c),Cf.b({name:"bounds",enabled:D,value:function(){var a=I(b.root),c={left:a.left,right:a.right,top:a.top,bottom:a.bottom,width:a.width,height:a.height};c.y=document.body.scrollHeight-a.bottom;c.x=a.left;return JSON.stringify(c)}})):x.error('Settings for "rte" or "template" are obligatory!');
null!=a.title&&(Bf.d(new Fe,a.title),Cf.i("titlechanged",function(a){Gd("title",{blur:!0===a.blur})}));null!=a.shared&&Bf.d(new fe,a.shared);null!=a.context&&Bf.d(new ge,a.context);null!=a["context-upsell"]&&Bf.d(new he,a["context-upsell"]);null!=a.find&&Bf.d(new ie,a.find);null!=a.keyboard&&Bf.d(new je,a.keyboard);Cf.b({name:"env",action:function(a){var b=Nc;if(!za(a)||!za(b))return!1;b.env||(b.env={});ya(b.env,a);return!0},value:function(a){var b=Nc;if(!za(b))return null;b=b.env;return za(b)?t(a)?
b[a]:b:{}},enabled:D});(document.getElementById("en-note")||document.body)&&document.body.setAttribute("lang",Ba());return Z.C=!0})};Z.s=function(){!0!==Z.C?x.error("Someone tried to call cleanup before setup!"):(Ka(function(){Od.ge();Bf.m();Bf=null;Cf.s();Pd=Od=null;Nd={};Nc={}}),Z.C=!1)};Z.execCommand=function(a,b,c){z(Z.C,"Calling EN.setup before using commands is required");return Ka(function(){a=a.toLowerCase();return Od.action(a,b,c)||!1})};
Z.queryCommandState=function(a,b,c){z(Z.C,"Calling EN.setup before using commands is required");return Ka(function(){a=a.toLowerCase();return Od.state(a,b,c)||!1})};Z.queryCommandValue=function(a,b,c){z(Z.C,"Calling EN.setup before using commands is required");return Ka(function(){a=a.toLowerCase();return Od.value(a,b,c)||""})};Z.queryCommandEnabled=function(a,b,c){z(Z.C,"Calling EN.setup before using commands is required");return Ka(function(){a=a.toLowerCase();return Od.enabled(a,b,c)||!1})};ea("EN.setup",Z.d);ea("EN.cleanup",Z.s);ea("EN.execCommand",Z.execCommand);ea("EN.queryCommandState",Z.queryCommandState);ea("EN.queryCommandValue",Z.queryCommandValue);ea("EN.queryCommandEnabled",Z.queryCommandEnabled);ea("EN.registerModule",Xd);ea("EN.getLastBuildNumber",function(){return window.CE_VERSION_INFO.lastBuildNumber});ea("EN.getLastCommitDate",function(){return window.CE_VERSION_INFO.lastCommitDate});var Df,Ef;
(function(){function a(a){B(d.querySelectorAll("embed"),function(b){var c=H("div");E(c,"en-print");switch(b.getAttribute("type")){case "evernote/x-pdf":E(c,"pdf");c.textContent=a.pdf_file;break;case "evernote/x-attachment":var d=b.getAttribute("id");null!=d&&d.match(/.*en-media:audio.*/)?(E(c,"audio"),c.textContent=a.audio_file):(E(c,"generic-attachment"),c.textContent=a.generic_file);break;default:x.warn("Found <embed> with unknown type! "+b),E(c,"generic-attachment"),c.textContent=a.generic_file}Fb(b,c)});
B(d.querySelectorAll("object"),function(a){var b=H("div");E(b,"en-print");xb(a,"en-todo")&&E(b,"checkbox");xb(a,"en-todo-checked")&&E(b,"checked");Fb(a,b)})}function b(){var a=H("br");E(a,"en-print");d.appendChild(a)}function c(a,b){for(var c=H("table"),g,m,n=0;4>n;n++){g=H("tr");c.appendChild(g);for(var l=0;2>l;l++)m=H("td"),g.appendChild(m)}c.setAttribute("id","header-table");E(c,"en-print");d.appendChild(c);g=[[0,b.author,"author"],[1,b.notebook,"notebook"],[2,b.created,"created"],[3,b.tags,"tags"],
[4,b.updated,"updated"],[5,b.url,"url"],[6,b.deleted,"deleted"],[7,b.location,"location"]];var k=c.querySelectorAll("td");B(g,function(b){if(null!=a[b[2]]){k[b[0]].innerHTML="";var c=H("span");E(c,"header-table-label");c.textContent=b[1];var d=H("span");E(d,"header-table-text");d.textContent=" "+a[b[2]];k[b[0]].appendChild(c);k[b[0]].appendChild(d)}})}var d=null;Df=function(e,f){null!=d&&(x.warn("Multiple unnecessary calls to setup print."),Ef());for(var h=0;h<document.body.childNodes.length;h++)F(document.body.childNodes[h])&&
kc(document.body.childNodes[h],!1);d=H("div");d.setAttribute("id","print-container");E(d,"en-print");h=document.querySelector("#container");h.parentNode.insertBefore(d,h);var g=C(f,{title:null,notebook:null,created:null,updated:null,deleted:null,author:null,location:null,tags:null,url:null}),h=C(e,{notebook:"Notebook:",created:"Created:",updated:"Updated:",deleted:"Deleted:",author:"Author:",location:"Location:",tags:"Tags:",url:"Source:",pdf_file:"PDF File",audio_file:"Audio File",generic_file:"Generic File"});
null!=f&&""!==f&&(c(g,h),g=H("hr"),d.appendChild(g),b());g=document.querySelector("#en-title");if(null!=g&&null!=g.textContent){var g=g.textContent,m=H("div");m.setAttribute("id","header-title");E(m,"en-print");m.textContent=g;d.appendChild(m);b()}g=document.querySelector("#en-note");null==g&&(x.warn("Could not find note!"),g=null);null!=g&&null!=d||x.error("Couldnt find note body or print container!");d.innerHTML=d.innerHTML+g.innerHTML;a(h);Fd("printReady",{module:"print"})};Ef=function(){null==
d?x.warn("Print module teardown called while it was off!"):(Ab(d),d=null)}})();ea("EN.enablePrint",Df);ea("EN.disablePrint",Ef); }).call(window); window.enLoadState = 'didLoad'; }
catch(ex) { window.enLoadState = "Exception: " + ex.toString() + '\n' + ex.stack + ''; }

