varwysihtml5,Base,Handlebars;Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&!function(){vara=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){returna.get.call(this)},set:function(b){returna.set.call(this,b)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),wysihtml5={version:"0.4.15",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46},function(a,b){"function"==typeofdefine&&define.amd?define(a):b.rangy=a()}(function(){functiona(a,b){varc=typeofa[b];returnc==x||!(c!=w||!a[b])||"unknown"==c}functionb(a,b){return!(typeofa[b]!=w||!a[b])}functionc(a,b){returntypeofa[b]!=y}functiond(a){returnfunction(b,c){for(vard=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}functione(a){returna&&D(a,C)&&F(a,B)}functionf(a){returnb(a,"body")?a.body:a.getElementsByTagName("body")[0]}functiong(c){b(window,"console")&&a(window.console,"log")&&window.console.log(c)}functionh(a,b){b?window.alert(a):g(a)}functioni(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported on this page in your browser. Reason: "+a,H.config.alertOnFail)}functionj(a){h("Rangy warning: "+a,H.config.alertOnWarn)}functionk(a){returna.message||a.description||a+""}functionl(){varb,c,d,h,j,l,m,o,p;if(!H.initialized){if(c=!1,d=!1,a(document,"createRange")&&(b=document.createRange(),D(b,A)&&F(b,z)&&(c=!0)),h=f(document),!h||"body"!=h.nodeName.toLowerCase())returni("No body element found"),void0;if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)returni("Neither Range nor TextRange are available"),void0;H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};for(minG)(j=G[m])instanceofn&&j.init(j,H);for(o=0,p=s.length;p>o;++o)try{s[o](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}functionm(a){a=a||window,l();for(varb=0,c=t.length;c>b;++b)t[b](a)}functionn(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}functiono(a,b,c,d){vare=newn(b,c,function(a){if(!a.initialized){a.initialized=!0;try{d(H,a),a.supported=!0}catch(c){vare="Module '"+b+"' failed to load: "+k(c);g(e)}}});G[b]=e}functionp(){}functionq(){}varr,s,t,u,v,w="object",x="function",y="undefined",z=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],A=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],B=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],C=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],D=d(a),E=d(b),F=d(c),G={},H={version:"1.3alpha.20140804",initialized:!1,supported:!0,util:{isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:D,areHostObjects:E,areHostProperties:F,isTextRange:e,getBody:f},features:{},modules:G,config:{alertOnFail:!0,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeofrangyAutoInitialize==y?!0:rangyAutoInitialize}};returnH.fail=i,H.warn=j,{}.hasOwnProperty?H.util.extend=function(a,b,c){vard,e,f;for(finb)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeofd&&null!==e&&"object"==typeofe&&H.util.extend(d,e,!0),a[f]=e);returnb.hasOwnProperty("toString")&&(a.toString=b.toString),a}:i("hasOwnProperty not supported"),function(){vara,b,c=document.createElement("div");c.appendChild(document.createElement("span")),a=[].slice;try{1==a.call(c.childNodes,0)[0].nodeType&&(b=funct
f(this.textRange)?b=a=g(this.textRange,d,!0,!0).boundaryPosition:(c=g(this.textRange,d,!0,!1),a=c.boundaryPosition,b=g(this.textRange,d,!1,!1,c.nodeInfo).boundaryPosition),this.setStart(a.node,a.offset),this.setEnd(b.node,b.offset)},d.prototype.getName=function(){return"WrappedTextRange"},n.copyComparisonConstants(d),i=function(a){varb,c,d;returna.collapsed?h(newm(a.startContainer,a.startOffset),!0):(b=h(newm(a.startContainer,a.startOffset),!0),c=h(newm(a.endContainer,a.endOffset),!1),d=o(n.getRangeDocument(a)).createTextRange(),d.setEndPoint("StartToStart",b),d.setEndPoint("EndToEnd",c),d)},d.rangeToTextRange=i,d.prototype.toTextRange=function(){returni(this)},a.WrappedTextRange=d,(!a.features.implementsDomRange||a.config.preferTextRange)&&(j=function(){returnthis}(),void0===j.Range&&(j.Range=d),a.createNativeRange=function(a){returna=p(a,b,"createNativeRange"),o(a).createTextRange()},a.WrappedRange=d)),a.createRange=function(c){returnc=p(c,b,"createRange"),newa.WrappedRange(a.createNativeRange(c))},a.createRangyRange=function(a){returna=p(a,b,"createRangyRange"),newn(a)},a.createIframeRange=function(c){returnb.deprecationNotice("createIframeRange()","createRange(iframeEl)"),a.createRange(c)},a.createIframeRangyRange=function(c){returnb.deprecationNotice("createIframeRangyRange()","createRangyRange(iframeEl)"),a.createRangyRange(c)},a.addShimListener(function(b){varc=b.document;void0===c.createRange&&(c.createRange=function(){returna.createRange(c)}),c=b=null})}),H.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(a,b){functionc(a){return"string"==typeofa?/^backward(s)?$/i.test(a):!!a}functiond(a,c){if(a){if(A.isWindow(a))returna;if(ainstanceofr)returna.win;vard=A.getContentDocument(a,b,c);returnA.getWindow(d)}returnwindow}functione(a){returnd(a,"getWinSelection").getSelection()}functionf(a){returnd(a,"getDocSelection").document.selection}functiong(a){varb=!1;returna.anchorNode&&(b=1==A.comparePoints(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)),b}functionh(a,b,c){vard=c?"end":"start",e=c?"start":"end";a.anchorNode=b[d+"Container"],a.anchorOffset=b[d+"Offset"],a.focusNode=b[e+"Container"],a.focusOffset=b[e+"Offset"]}functioni(a){varb=a.nativeSelection;a.anchorNode=b.anchorNode,a.anchorOffset=b.anchorOffset,a.focusNode=b.focusNode,a.focusOffset=b.focusOffset}functionj(a){a.anchorNode=a.focusNode=null,a.anchorOffset=a.focusOffset=0,a.rangeCount=0,a.isCollapsed=!0,a._ranges.length=0}functionk(b){varc;returnbinstanceofD?(c=a.createNativeRange(b.getDocument()),c.setEnd(b.endContainer,b.endOffset),c.setStart(b.startContainer,b.startOffset)):binstanceofE?c=b.nativeRange:J.implementsDomRange&&binstanceofA.getWindow(b.startContainer).Range&&(c=b),c}functionl(a){if(!a.length||1!=a[0].nodeType)return!1;for(varb=1,c=a.length;c>b;++b)if(!A.isAncestorOf(a[0],a[b]))return!1;return!0}functionm(a){varc=a.getNodes();if(!l(c))throwb.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");returnc[0]}functionn(a){return!!a&&void0!==a.text}functiono(a,b){varc=newE(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}functionp(b){varc,d,e,f;if(b._ranges.length=0,"None"==b.docSelection.type)j(b);elseif(c=b.docSelection.createRange(),n(c))o(b,c);else{for(b.rangeCount=c.length,e=L(c.item(0)),f=0;f<b.rangeCount;++f)d=a.createRange(e),d.selectNode(c.item(f)),b._ranges.push(d);b.isCollapsed=1==b.rangeCount&&b._ranges[0].collapsed,h(b,b._ranges[b.rangeCount-1],!1)}}functionq(a,c){vard,e,f=a.docSelection.createRange(),g=m(c),h=L(f.item(0)),i=M(h).createControlRange();for(d=0,e=f.length;e>d;++d)i.add(f.item(d));try{i.add(g)}catch(j){throwb.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}i.select(),p(a)}functionr(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}functions(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}