573 lines
565 KiB
JavaScript
573 lines
565 KiB
JavaScript
/*!
|
||
* jQuery JavaScript Library v1.9.1
|
||
* http://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2013-2-4
|
||
*/
|
||
function snippetPopup(e){top.consoleRef=window.open("","myconsole","width=600,height=300,left=50,top=50,menubar=0,toolbar=0,location=0,status=0,scrollbars=1,resizable=1"),top.consoleRef.document.writeln("<html><head><title>Snippet :: Code View :: "+location.href+"</title></head>"+'<body bgcolor=white onLoad="self.focus()">'+"<pre>"+e+"</pre>"+"</body></html>"),top.consoleRef.document.close()}function sh_isEmailAddress(e){return/^mailto:/.test(e)?!1:-1!==e.indexOf("@")}function sh_setHref(e,t,n){var i=n.substring(e[t-2].pos,e[t-1].pos);i.length>=2&&"<"===i.charAt(0)&&">"===i.charAt(i.length-1)&&(i=i.substr(1,i.length-2)),sh_isEmailAddress(i)&&(i="mailto:"+i),e[t-2].node.href=i}function sh_konquerorExec(e){var t=[""];return t.index=e.length,t.input=e,t}function sh_highlightString(e,t){if(/Konqueror/.test(navigator.userAgent)&&!t.konquered){for(var n=0;t.length>n;n++)for(var i=0;t[n].length>i;i++){var r=t[n][i][0];"$"===r.source&&(r.exec=sh_konquerorExec)}t.konquered=!0}var s=document.createElement("a"),o=document.createElement("span"),a=[],l=0,c=[],h=0,u=null,d=function(t,n){var i=t.length;if(0!==i){if(!n){var r=c.length;if(0!==r){var d=c[r-1];d[3]||(n=d[1])}}if(u!==n&&(u&&(a[l++]={pos:h},"sh_url"===u&&sh_setHref(a,l,e)),n)){var f;f="sh_url"===n?s.cloneNode(!1):o.cloneNode(!1),f.className=n,a[l++]={node:f,pos:h}}h+=i,u=n}},f=/\r\n|\r|\n/g;f.lastIndex=0;for(var p=e.length;p>h;){var g,m,y=h,v=f.exec(e);null===v?(g=p,m=p):(g=v.index,m=f.lastIndex);for(var b=e.substring(y,g),w=[];;){var _,x=h-y,C=c.length;_=0===C?0:c[C-1][2];var T=t[_],E=T.length,k=w[_];k||(k=w[_]=[]);for(var N=null,A=-1,S=0;E>S;S++){var D;if(k.length>S&&(null===k[S]||k[S].index>=x))D=k[S];else{var M=T[S][0];M.lastIndex=x,D=M.exec(b),k[S]=D}if(null!==D&&(null===N||D.index<N.index)&&(N=D,A=S,D.index===x))break}if(null===N){d(b.substring(x),null);break}N.index>x&&d(b.substring(x,N.index),null);var R,L=T[A],z=L[1];if(z instanceof Array)for(var O=0;z.length>O;O++)R=N[O+1],d(R,z[O]);else R=N[0],d(R,z);switch(L[2]){case-1:break;case-2:c.pop();break;case-3:c.length=0;break;default:c.push(L)}}u&&(a[l++]={pos:h},"sh_url"===u&&sh_setHref(a,l,e),u=null),h=m}return a}function sh_getClasses(e){var t=[],n=e.className;if(n&&n.length>0)for(var i=n.split(" "),r=0;i.length>r;r++)i[r].length>0&&t.push(i[r]);return t}function sh_addClass(e,t){for(var n=sh_getClasses(e),i=0;n.length>i;i++)if(t.toLowerCase()===n[i].toLowerCase())return;n.push(t),e.className=n.join(" ")}function sh_extractTagsFromNodeList(e,t){for(var n=e.length,i=0;n>i;i++){var r=e.item(i);switch(r.nodeType){case 1:if("br"===r.nodeName.toLowerCase()){var s;s=/MSIE/.test(navigator.userAgent)?"\r":"\n",t.text.push(s),t.pos++}else t.tags.push({node:r.cloneNode(!1),pos:t.pos}),sh_extractTagsFromNodeList(r.childNodes,t),t.tags.push({pos:t.pos});break;case 3:case 4:t.text.push(r.data),t.pos+=r.length}}}function sh_extractTags(e,t){var n={};return n.text=[],n.tags=t,n.pos=0,sh_extractTagsFromNodeList(e.childNodes,n),n.text.join("")}function sh_mergeTags(e,t){var n=e.length;if(0===n)return t;var i=t.length;if(0===i)return e;for(var r=[],s=0,o=0;n>s&&i>o;){var a=e[s],l=t[o];a.pos<=l.pos?(r.push(a),s++):(r.push(l),t[o+1].pos<=a.pos?(o++,r.push(t[o]),o++):(r.push({pos:a.pos}),t[o]={node:l.node.cloneNode(!1),pos:a.pos}))}for(;n>s;)r.push(e[s]),s++;for(;i>o;)r.push(t[o]),o++;return r}function sh_insertTags(e,t){for(var n=document,i=document.createDocumentFragment(),r=0,s=e.length,o=0,a=t.length,l=i;a>o||s>r;){var c,h;if(s>r?(c=e[r],h=c.pos):h=a,o>=h){if(c.node){var u=c.node;l.appendChild(u),l=u}else l=l.parentNode;r++}else l.appendChild(n.createTextNode(t.substring(o,h))),o=h}return i}function sh_highlightElement(e,t){sh_addClass(e,"sh_sourceCode");for(var n=[],i=sh_extractTags(e,n),r=sh_highlightString(i,t),s=sh_mergeTags(n,r),o=sh_insertTags(s,i);e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(o)}function sh_getXMLHttpRequest(){if(window.ActiveXObject)return new ActiveXObject("Msxml2.XMLHTTP");if(window.XMLHttpRequest)return new XMLHttpRequest;throw"No XMLHttpRequest implementation available"}function sh_load(language,element,prefix,suffix){if(language in sh_requests)return sh_requests[language].push(element),void 0;sh_requests[language]=[element];var request=sh_getXMLHttpRequest(),url=prefix+"sh_"+language+suffix;request.open("GET",url,!0),request.onreadystatechange=function(){if(4===request.readyState)try{if(request.status&&200!==request.status)throw"HTTP error: status "+request.status;eval(request.responseText);for(var elements=sh_requests[language],i=0;elements.length>i;i++)sh_highlightElement(elements[i],sh_languages[language])}finally{request=null}},request.send(null)}function sh_highlightDocument(e,t){for(var n=document.getElementsByTagName("pre"),i=0;n.length>i;i++){var r=n.item(i),s=r.className.toLowerCase(),o=s.replace(/sh_sourcecode/g,"");if(-1!=o.indexOf("sh_")&&(o=o.match(/(\bsh_)\w+\b/g)[0]),-1==s.indexOf("sh_sourcecode")&&"sh_"===o.substr(0,3)){var a=o.substring(3);if(a in sh_languages)sh_highlightElement(r,sh_languages[a]);else{if("string"!=typeof e||"string"!=typeof t){console.log('Found <pre> element with class="'+o+'", but no such language exists');continue}sh_load(a,r,e,t)}break}}}function rubyCodeFormat(){$("pre.ruby").snippet("ruby",{style:"rand01",transparent:!0,showNum:!0})}(function(e,t){function n(e){var t=e.length,n=lt.type(e);return lt.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e){var t=Ct[e]={};return lt.each(e.match(ht)||[],function(e,n){t[n]=!0}),t}function r(e,n,i,r){if(lt.acceptData(e)){var s,o,a=lt.expando,l="string"==typeof n,c=e.nodeType,h=c?lt.cache:e,u=c?e[a]:e[a]&&a;if(u&&h[u]&&(r||h[u].data)||!l||i!==t)return u||(c?e[a]=u=J.pop()||lt.guid++:u=a),h[u]||(h[u]={},c||(h[u].toJSON=lt.noop)),("object"==typeof n||"function"==typeof n)&&(r?h[u]=lt.extend(h[u],n):h[u].data=lt.extend(h[u].data,n)),s=h[u],r||(s.data||(s.data={}),s=s.data),i!==t&&(s[lt.camelCase(n)]=i),l?(o=s[n],null==o&&(o=s[lt.camelCase(n)])):o=s,o}}function s(e,t,n){if(lt.acceptData(e)){var i,r,s,o=e.nodeType,l=o?lt.cache:e,c=o?e[lt.expando]:lt.expando;if(l[c]){if(t&&(s=n?l[c]:l[c].data)){lt.isArray(t)?t=t.concat(lt.map(t,lt.camelCase)):t in s?t=[t]:(t=lt.camelCase(t),t=t in s?[t]:t.split(" "));for(i=0,r=t.length;r>i;i++)delete s[t[i]];if(!(n?a:lt.isEmptyObject)(s))return}(n||(delete l[c].data,a(l[c])))&&(o?lt.cleanData([e],!0):lt.support.deleteExpando||l!=l.window?delete l[c]:l[c]=null)}}}function o(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(Et,"-$1").toLowerCase();if(i=e.getAttribute(r),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:Tt.test(i)?lt.parseJSON(i):i}catch(s){}lt.data(e,n,i)}else i=t}return i}function a(e){var t;for(t in e)if(("data"!==t||!lt.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function l(){return!0}function c(){return!1}function h(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function u(e,t,n){if(t=t||0,lt.isFunction(t))return lt.grep(e,function(e,i){var r=!!t.call(e,i,e);return r===n});if(t.nodeType)return lt.grep(e,function(e){return e===t===n});if("string"==typeof t){var i=lt.grep(e,function(e){return 1===e.nodeType});if(Zt.test(t))return lt.filter(t,i,!n);t=lt.filter(t,i)}return lt.grep(e,function(e){return lt.inArray(e,t)>=0===n})}function d(e){var t=Ut.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function p(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=sn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,i=0;null!=(n=e[i]);i++)lt._data(n,"globalEval",!t||lt._data(t[i],"globalEval"))}function y(e,t){if(1===t.nodeType&<.hasData(e)){var n,i,r,s=lt._data(e),o=lt._data(t,s),a=s.events;if(a){delete o.handle,o.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)lt.event.add(t,n,a[n][i])}o.data&&(o.data=lt.extend({},o.data))}}function v(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!lt.support.noCloneEvent&&t[lt.expando]){r=lt._data(t);for(i in r.events)lt.removeEvent(t,i,r.handle);t.removeAttribute(lt.expando)}"script"===n&&t.text!==e.text?(p(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),lt.support.html5Clone&&e.innerHTML&&!lt.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&tn.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var i,r,s=0,o=typeof e.getElementsByTagName!==V?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==V?e.querySelectorAll(n||"*"):t;if(!o)for(o=[],i=e.childNodes||e;null!=(r=i[s]);s++)!n||lt.nodeName(r,n)?o.push(r):lt.merge(o,b(r,n));return n===t||n&<.nodeName(e,n)?lt.merge([e],o):o}function w(e){tn.test(e.type)&&(e.defaultChecked=e.checked)}function _(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=En.length;r--;)if(t=En[r]+n,t in e)return t;return i}function x(e,t){return e=t||e,"none"===lt.css(e,"display")||!lt.contains(e.ownerDocument,e)}function C(e,t){for(var n,i,r,s=[],o=0,a=e.length;a>o;o++)i=e[o],i.style&&(s[o]=lt._data(i,"olddisplay"),n=i.style.display,t?(s[o]||"none"!==n||(i.style.display=""),""===i.style.display&&x(i)&&(s[o]=lt._data(i,"olddisplay",N(i.nodeName)))):s[o]||(r=x(i),(n&&"none"!==n||!r)&<._data(i,"olddisplay",r?n:lt.css(i,"display"))));for(o=0;a>o;o++)i=e[o],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?s[o]||"":"none"));return e}function T(e,t,n){var i=vn.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function E(e,t,n,i,r){for(var s=n===(i?"border":"content")?4:"width"===t?1:0,o=0;4>s;s+=2)"margin"===n&&(o+=lt.css(e,n+Tn[s],!0,r)),i?("content"===n&&(o-=lt.css(e,"padding"+Tn[s],!0,r)),"margin"!==n&&(o-=lt.css(e,"border"+Tn[s]+"Width",!0,r))):(o+=lt.css(e,"padding"+Tn[s],!0,r),"padding"!==n&&(o+=lt.css(e,"border"+Tn[s]+"Width",!0,r)));return o}function k(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,s=un(e),o=lt.support.boxSizing&&"border-box"===lt.css(e,"boxSizing",!1,s);if(0>=r||null==r){if(r=dn(e,t,s),(0>r||null==r)&&(r=e.style[t]),bn.test(r))return r;i=o&&(lt.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+E(e,t,n||(o?"border":"content"),i,s)+"px"}function N(e){var t=X,n=_n[e];return n||(n=A(e,t),"none"!==n&&n||(hn=(hn||lt("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(hn[0].contentWindow||hn[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=A(e,t),hn.detach()),_n[e]=n),n}function A(e,t){var n=lt(t.createElement(e)).appendTo(t.body),i=lt.css(n[0],"display");return n.remove(),i}function S(e,t,n,i){var r;if(lt.isArray(t))lt.each(t,function(t,r){n||Nn.test(e)?i(e,r):S(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==lt.type(t))i(e,t);else for(r in t)S(e+"["+r+"]",t[r],n,i)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,s=t.toLowerCase().match(ht)||[];if(lt.isFunction(n))for(;i=s[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function M(e,t,n,i){function r(a){var l;return s[a]=!0,lt.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||o||s[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var s={},o=e===$n;return r(t.dataTypes[0])||!s["*"]&&r("*")}function R(e,n){var i,r,s=lt.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);return i&<.extend(!0,e,i),e}function L(e,n,i){var r,s,o,a,l=e.contents,c=e.dataTypes,h=e.responseFields;for(a in h)a in i&&(n[h[a]]=i[a]);for(;"*"===c[0];)c.shift(),s===t&&(s=e.mimeType||n.getResponseHeader("Content-Type"));if(s)for(a in l)if(l[a]&&l[a].test(s)){c.unshift(a);break}if(c[0]in i)o=c[0];else{for(a in i){if(!c[0]||e.converters[a+" "+c[0]]){o=a;break}r||(r=a)}o=o||r}return o?(o!==c[0]&&c.unshift(o),i[o]):void 0}function z(e,t){var n,i,r,s,o={},a=0,l=e.dataTypes.slice(),c=l[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l[1])for(r in e.converters)o[r.toLowerCase()]=e.converters[r];for(;i=l[++a];)if("*"!==i){if("*"!==c&&c!==i){if(r=o[c+" "+i]||o["* "+i],!r)for(n in o)if(s=n.split(" "),s[1]===i&&(r=o[c+" "+s[0]]||o["* "+s[0]])){r===!0?r=o[n]:o[n]!==!0&&(i=s[0],l.splice(a--,0,i));break}if(r!==!0)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(h){return{state:"parsererror",error:r?h:"No conversion from "+c+" to "+i}}}c=i}return{state:"success",data:t}}function O(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function I(){return setTimeout(function(){Jn=t}),Jn=lt.now()}function H(e,t){lt.each(t,function(t,n){for(var i=(si[t]||[]).concat(si["*"]),r=0,s=i.length;s>r;r++)if(i[r].call(e,t,n))return})}function j(e,t,n){var i,r,s=0,o=ri.length,a=lt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Jn||I(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,s=1-i,o=0,l=c.tweens.length;l>o;o++)c.tweens[o].run(s);return a.notifyWith(e,[c,s,n]),1>s&&l?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:lt.extend({},t),opts:lt.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Jn||I(),duration:n.duration,tweens:[],createTween:function(t,n){var i=lt.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),h=c.props;for(P(h,c.opts.specialEasing);o>s;s++)if(i=ri[s].call(c,e,h,c.opts))return i;return H(c,h),lt.isFunction(c.opts.start)&&c.opts.start.call(e,c),lt.fx.timer(lt.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function P(e,t){var n,i,r,s,o;for(r in e)if(i=lt.camelCase(r),s=t[i],n=e[r],lt.isArray(n)&&(s=n[1],n=e[r]=n[0]),r!==i&&(e[i]=n,delete e[r]),o=lt.cssHooks[i],o&&"expand"in o){n=o.expand(n),delete e[i];for(r in n)r in e||(e[r]=n[r],t[r]=s)}else t[i]=s}function B(e,t,n){var i,r,s,o,a,l,c,h,u,d=this,f=e.style,p={},g=[],m=e.nodeType&&x(e);n.queue||(h=lt._queueHooks(e,"fx"),null==h.unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always(function(){d.always(function(){h.unqueued--,lt.queue(e,"fx").length||h.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===lt.css(e,"display")&&"none"===lt.css(e,"float")&&(lt.support.inlineBlockNeedsLayout&&"inline"!==N(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",lt.support.shrinkWrapBlocks||d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],ti.exec(o)){if(delete t[r],l=l||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(s=g.length){a=lt._data(e,"fxshow")||lt._data(e,"fxshow",{}),"hidden"in a&&(m=a.hidden),l&&(a.hidden=!m),m?lt(e).show():d.done(function(){lt(e).hide()}),d.done(function(){var t;lt._removeData(e,"fxshow");for(t in p)lt.style(e,t,p[t])});for(r=0;s>r;r++)i=g[r],c=d.createTween(i,m?a[i]:0),p[i]=a[i]||lt.style(e,i),i in a||(a[i]=c.start,m&&(c.end=c.start,c.start="width"===i||"height"===i?1:0))}}function q(e,t,n,i,r){return new q.prototype.init(e,t,n,i,r)}function Z(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Tn[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function $(e){return lt.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var W,U,V=typeof t,X=e.document,Y=e.location,G=e.jQuery,K=e.$,Q={},J=[],et="1.9.1",tt=J.concat,nt=J.push,it=J.slice,rt=J.indexOf,st=Q.toString,ot=Q.hasOwnProperty,at=et.trim,lt=function(e,t){return new lt.fn.init(e,t,U)},ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=/\S+/g,ut=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,dt=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,ft=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pt=/^[\],:{}\s]*$/,gt=/(?:^|:|,)(?:\s*\[)+/g,mt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,yt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,vt=/^-ms-/,bt=/-([\da-z])/gi,wt=function(e,t){return t.toUpperCase()},_t=function(e){(X.addEventListener||"load"===e.type||"complete"===X.readyState)&&(xt(),lt.ready())},xt=function(){X.addEventListener?(X.removeEventListener("DOMContentLoaded",_t,!1),e.removeEventListener("load",_t,!1)):(X.detachEvent("onreadystatechange",_t),e.detachEvent("onload",_t))};lt.fn=lt.prototype={jquery:et,constructor:lt,init:function(e,n,i){var r,s;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:dt.exec(e),!r||!r[1]&&n)return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e);if(r[1]){if(n=n instanceof lt?n[0]:n,lt.merge(this,lt.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:X,!0)),ft.test(r[1])&<.isPlainObject(n))for(r in n)lt.isFunction(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}if(s=X.getElementById(r[2]),s&&s.parentNode){if(s.id!==r[2])return i.find(e);this.length=1,this[0]=s}return this.context=X,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):lt.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),lt.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return it.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=lt.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return lt.each(this,e,t)},ready:function(e){return lt.ready.promise().done(e),this},slice:function(){return this.pushStack(it.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(lt.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:nt,sort:[].sort,splice:[].splice},lt.fn.init.prototype=lt.fn,lt.extend=lt.fn.extend=function(){var e,n,i,r,s,o,a=arguments[0]||{},l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),"object"==typeof a||lt.isFunction(a)||(a={}),c===l&&(a=this,--l);c>l;l++)if(null!=(s=arguments[l]))for(r in s)e=a[r],i=s[r],a!==i&&(h&&i&&(lt.isPlainObject(i)||(n=lt.isArray(i)))?(n?(n=!1,o=e&<.isArray(e)?e:[]):o=e&<.isPlainObject(e)?e:{},a[r]=lt.extend(h,o,i)):i!==t&&(a[r]=i));return a},lt.extend({noConflict:function(t){return e.$===lt&&(e.$=K),t&&e.jQuery===lt&&(e.jQuery=G),lt},isReady:!1,readyWait:1,holdReady:function(e){e?lt.readyWait++:lt.ready(!0)},ready:function(e){if(e===!0?!--lt.readyWait:!lt.isReady){if(!X.body)return setTimeout(lt.ready);lt.isReady=!0,e!==!0&&--lt.readyWait>0||(W.resolveWith(X,[lt]),lt.fn.trigger&<(X).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===lt.type(e)},isArray:Array.isArray||function(e){return"array"===lt.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?Q[st.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==lt.type(e)||e.nodeType||lt.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||ot.call(e,i)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||X;var i=ft.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=lt.buildFragment([e],t,r),r&<(r).remove(),lt.merge([],i.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=lt.trim(t),t&&pt.test(t.replace(mt,"@").replace(yt,"]").replace(gt,"")))?new Function("return "+t)():(lt.error("Invalid JSON: "+t),void 0)},parseXML:function(n){var i,r;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(s){i=t}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||lt.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&<.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(vt,"ms-").replace(bt,wt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,s=0,o=e.length,a=n(e);if(i){if(a)for(;o>s&&(r=t.apply(e[s],i),r!==!1);s++);else for(s in e)if(r=t.apply(e[s],i),r===!1)break}else if(a)for(;o>s&&(r=t.call(e[s],s,e[s]),r!==!1);s++);else for(s in e)if(r=t.call(e[s],s,e[s]),r===!1)break;return e},trim:at&&!at.call(" ")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ut,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?lt.merge(i,"string"==typeof e?[e]:e):nt.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(rt)return rt.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var i=n.length,r=e.length,s=0;if("number"==typeof i)for(;i>s;s++)e[r++]=n[s];else for(;n[s]!==t;)e[r++]=n[s++];return e.length=r,e},grep:function(e,t,n){var i,r=[],s=0,o=e.length;for(n=!!n;o>s;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,t,i){var r,s=0,o=e.length,a=n(e),l=[];if(a)for(;o>s;s++)r=t(e[s],s,i),null!=r&&(l[l.length]=r);else for(s in e)r=t(e[s],s,i),null!=r&&(l[l.length]=r);return tt.apply([],l)},guid:1,proxy:function(e,n){var i,r,s;return"string"==typeof n&&(s=e[n],n=e,e=s),lt.isFunction(e)?(i=it.call(arguments,2),r=function(){return e.apply(n||this,i.concat(it.call(arguments)))},r.guid=e.guid=e.guid||lt.guid++,r):t},access:function(e,n,i,r,s,o,a){var l=0,c=e.length,h=null==i;if("object"===lt.type(i)){s=!0;for(l in i)lt.access(e,n,l,i[l],!0,o,a)}else if(r!==t&&(s=!0,lt.isFunction(r)||(a=!0),h&&(a?(n.call(e,r),n=null):(h=n,n=function(e,t,n){return h.call(lt(e),n)})),n))for(;c>l;l++)n(e[l],i,a?r:r.call(e[l],l,n(e[l],i)));return s?e:h?n.call(e):c?n(e[0],i):o},now:function(){return(new Date).getTime()}}),lt.ready.promise=function(t){if(!W)if(W=lt.Deferred(),"complete"===X.readyState)setTimeout(lt.ready);else if(X.addEventListener)X.addEventListener("DOMContentLoaded",_t,!1),e.addEventListener("load",_t,!1);else{X.attachEvent("onreadystatechange",_t),e.attachEvent("onload",_t);var n=!1;try{n=null==e.frameElement&&X.documentElement}catch(i){}n&&n.doScroll&&function r(){if(!lt.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}xt(),lt.ready()}}()}return W.promise(t)},lt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),U=lt(X);var Ct={};lt.Callbacks=function(e){e="string"==typeof e?Ct[e]||i(e):lt.extend({},e);var n,r,s,o,a,l,c=[],h=!e.once&&[],u=function(t){for(r=e.memory&&t,s=!0,a=l||0,l=0,o=c.length,n=!0;c&&o>a;a++)if(c[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,c&&(h?h.length&&u(h.shift()):r?c=[]:d.disable())},d={add:function(){if(c){var t=c.length;(function i(t){lt.each(t,function(t,n){var r=lt.type(n);"function"===r?e.unique&&d.has(n)||c.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=c.length:r&&(l=t,u(r))}return this},remove:function(){return c&<.each(arguments,function(e,t){for(var i;(i=lt.inArray(t,c,i))>-1;)c.splice(i,1),n&&(o>=i&&o--,a>=i&&a--)}),this},has:function(e){return e?lt.inArray(e,c)>-1:!(!c||!c.length)},empty:function(){return c=[],this},disable:function(){return c=h=r=t,this},disabled:function(){return!c},lock:function(){return h=t,r||d.disable(),this},locked:function(){return!h},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!c||s&&!h||(n?h.push(t):u(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!s}};return d},lt.extend({Deferred:function(e){var t=[["resolve","done",lt.Callbacks("once memory"),"resolved"],["reject","fail",lt.Callbacks("once memory"),"rejected"],["notify","progress",lt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return lt.Deferred(function(n){lt.each(t,function(t,s){var o=s[0],a=lt.isFunction(e[t])&&e[t];r[s[1]](function(){var e=a&&a.apply(this,arguments);e&<.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?lt.extend(e,i):i}},r={};return i.pipe=i.then,lt.each(t,function(e,s){var o=s[2],a=s[3];i[s[1]]=o.add,a&&o.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),r[s[0]]=function(){return r[s[0]+"With"](this===r?i:this,arguments),this},r[s[0]+"With"]=o.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,s=it.call(arguments),o=s.length,a=1!==o||e&<.isFunction(e.promise)?o:0,l=1===a?e:lt.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?it.call(arguments):r,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);o>r;r++)s[r]&<.isFunction(s[r].promise)?s[r].promise().done(c(r,i,s)).fail(l.reject).progress(c(r,n,t)):--a;return a||l.resolveWith(i,s),l.promise()}}),lt.support=function(){var t,n,i,r,s,o,a,l,c,h,u=X.createElement("div");if(u.setAttribute("className","t"),u.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=u.getElementsByTagName("*"),i=u.getElementsByTagName("a")[0],!n||!i||!n.length)return{};s=X.createElement("select"),a=s.appendChild(X.createElement("option")),r=u.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==u.className,leadingWhitespace:3===u.firstChild.nodeType,tbody:!u.getElementsByTagName("tbody").length,htmlSerialize:!!u.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!r.value,optSelected:a.selected,enctype:!!X.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==X.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===X.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},r.checked=!0,t.noCloneChecked=r.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled;try{delete u.test}catch(d){t.deleteExpando=!1}r=X.createElement("input"),r.setAttribute("value",""),t.input=""===r.getAttribute("value"),r.value="t",r.setAttribute("type","radio"),t.radioValue="t"===r.value,r.setAttribute("checked","t"),r.setAttribute("name","t"),o=X.createDocumentFragment(),o.appendChild(r),t.appendChecked=r.checked,t.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){t.noCloneEvent=!1}),u.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})u.setAttribute(l="on"+h,"t"),t[h+"Bubbles"]=l in e||u.attributes[l].expando===!1;return u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===u.style.backgroundClip,lt(function(){var n,i,r,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",o=X.getElementsByTagName("body")[0];o&&(n=X.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",o.appendChild(n).appendChild(u),u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=u.getElementsByTagName("td"),r[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===r[0].offsetHeight,r[0].style.display="",r[1].style.display="none",t.reliableHiddenOffsets=c&&0===r[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===u.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==o.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(u,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(u,null)||{width:"4px"}).width,i=u.appendChild(X.createElement("div")),i.style.cssText=u.style.cssText=s,i.style.marginRight=i.style.width="0",u.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),typeof u.style.zoom!==V&&(u.innerHTML="",u.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="<div></div>",u.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==u.offsetWidth,t.inlineBlockNeedsLayout&&(o.style.zoom=1)),o.removeChild(n),n=u=r=i=null)}),n=s=o=a=i=r=null,t}();var Tt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Et=/([A-Z])/g;lt.extend({cache:{},expando:"jQuery"+(et+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?lt.cache[e[lt.expando]]:e[lt.expando],!!e&&!a(e)},data:function(e,t,n){return r(e,t,n)},removeData:function(e,t){return s(e,t)},_data:function(e,t,n){return r(e,t,n,!0)},_removeData:function(e,t){return s(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&<.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),lt.fn.extend({data:function(e,n){var i,r,s=this[0],a=0,l=null;if(e===t){if(this.length&&(l=lt.data(s),1===s.nodeType&&!lt._data(s,"parsedAttrs"))){for(i=s.attributes;i.length>a;a++)r=i[a].name,r.indexOf("data-")||(r=lt.camelCase(r.slice(5)),o(s,r,l[r]));lt._data(s,"parsedAttrs",!0)}return l}return"object"==typeof e?this.each(function(){lt.data(this,e)}):lt.access(this,function(n){return n===t?s?o(s,e,lt.data(s,e)):null:(this.each(function(){lt.data(this,e,n)}),void 0)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){lt.removeData(this,e)})}}),lt.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=lt._data(e,t),n&&(!i||lt.isArray(n)?i=lt._data(e,t,lt.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=lt.queue(e,t),i=n.length,r=n.shift(),s=lt._queueHooks(e,t),o=function(){lt.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),s.cur=r,r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,o,s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return lt._data(e,n)||lt._data(e,n,{empty:lt.Callbacks("once memory").add(function(){lt._removeData(e,t+"queue"),lt._removeData(e,n)})})}}),lt.fn.extend({queue:function(e,n){var i=2;return"string"!=typeof e&&(n=e,e="fx",i--),i>arguments.length?lt.queue(this[0],e):n===t?this:this.each(function(){var t=lt.queue(this,e,n);lt._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&<.dequeue(this,e)})},dequeue:function(e){return this.each(function(){lt.dequeue(this,e)})},delay:function(e,t){return e=lt.fx?lt.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var i,r=1,s=lt.Deferred(),o=this,a=this.length,l=function(){--r||s.resolveWith(o,[o])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";a--;)i=lt._data(o[a],e+"queueHooks"),i&&i.empty&&(r++,i.empty.add(l));return l(),s.promise(n)}});var kt,Nt,At=/[\t\r\n]/g,St=/\r/g,Dt=/^(?:input|select|textarea|button|object)$/i,Mt=/^(?:a|area)$/i,Rt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,zt=lt.support.getSetAttribute,Ot=lt.support.input;lt.fn.extend({attr:function(e,t){return lt.access(this,lt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){lt.removeAttr(this,e)})},prop:function(e,t){return lt.access(this,lt.prop,e,t,arguments.length>1)
|
||
},removeProp:function(e){return e=lt.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,i,r,s,o=0,a=this.length,l="string"==typeof e&&e;if(lt.isFunction(e))return this.each(function(t){lt(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];a>o;o++)if(n=this[o],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):" ")){for(s=0;r=t[s++];)0>i.indexOf(" "+r+" ")&&(i+=r+" ");n.className=lt.trim(i)}return this},removeClass:function(e){var t,n,i,r,s,o=0,a=this.length,l=0===arguments.length||"string"==typeof e&&e;if(lt.isFunction(e))return this.each(function(t){lt(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];a>o;o++)if(n=this[o],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):"")){for(s=0;r=t[s++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");n.className=e?lt.trim(i):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return lt.isFunction(e)?this.each(function(n){lt(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var r,s=0,o=lt(this),a=t,l=e.match(ht)||[];r=l[s++];)a=i?a:!o.hasClass(r),o[a?"addClass":"removeClass"](r);else(n===V||"boolean"===n)&&(this.className&<._data(this,"__className__",this.className),this.className=this.className||e===!1?"":lt._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(At," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,i,r,s=this[0];{if(arguments.length)return r=lt.isFunction(e),this.each(function(n){var s,o=lt(this);1===this.nodeType&&(s=r?e.call(this,n,o.val()):e,null==s?s="":"number"==typeof s?s+="":lt.isArray(s)&&(s=lt.map(s,function(e){return null==e?"":e+""})),i=lt.valHooks[this.type]||lt.valHooks[this.nodeName.toLowerCase()],i&&"set"in i&&i.set(this,s,"value")!==t||(this.value=s))});if(s)return i=lt.valHooks[s.type]||lt.valHooks[s.nodeName.toLowerCase()],i&&"get"in i&&(n=i.get(s,"value"))!==t?n:(n=s.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),lt.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,s="select-one"===e.type||0>r,o=s?null:[],a=s?r+1:i.length,l=0>r?a:s?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(lt.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&<.nodeName(n.parentNode,"optgroup"))){if(t=lt(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n=lt.makeArray(t);return lt(e).find("option").each(function(){this.selected=lt.inArray(lt(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,i){var r,s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===V?lt.prop(e,n,i):(s=1!==a||!lt.isXMLDoc(e),s&&(n=n.toLowerCase(),r=lt.attrHooks[n]||(Rt.test(n)?Nt:kt)),i===t?r&&s&&"get"in r&&null!==(o=r.get(e,n))?o:(typeof e.getAttribute!==V&&(o=e.getAttribute(n)),null==o?t:o):null!==i?r&&s&&"set"in r&&(o=r.set(e,i,n))!==t?o:(e.setAttribute(n,i+""),i):(lt.removeAttr(e,n),void 0))},removeAttr:function(e,t){var n,i,r=0,s=t&&t.match(ht);if(s&&1===e.nodeType)for(;n=s[r++];)i=lt.propFix[n]||n,Rt.test(n)?!zt&&Lt.test(n)?e[lt.camelCase("default-"+n)]=e[i]=!1:e[i]=!1:lt.attr(e,n,""),e.removeAttribute(zt?n:i)},attrHooks:{type:{set:function(e,t){if(!lt.support.radioValue&&"radio"===t&<.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,i){var r,s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!lt.isXMLDoc(e),o&&(n=lt.propFix[n]||n,s=lt.propHooks[n]),i!==t?s&&"set"in s&&(r=s.set(e,i,n))!==t?r:e[n]=i:s&&"get"in s&&null!==(r=s.get(e,n))?r:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Dt.test(e.nodeName)||Mt.test(e.nodeName)&&e.href?0:t}}}}),Nt={get:function(e,n){var i=lt.prop(e,n),r="boolean"==typeof i&&e.getAttribute(n),s="boolean"==typeof i?Ot&&zt?null!=r:Lt.test(n)?e[lt.camelCase("default-"+n)]:!!r:e.getAttributeNode(n);return s&&s.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?lt.removeAttr(e,n):Ot&&zt||!Lt.test(n)?e.setAttribute(!zt&<.propFix[n]||n,n):e[lt.camelCase("default-"+n)]=e[n]=!0,n}},Ot&&zt||(lt.attrHooks.value={get:function(e,n){var i=e.getAttributeNode(n);return lt.nodeName(e,"input")?e.defaultValue:i&&i.specified?i.value:t},set:function(e,t,n){return lt.nodeName(e,"input")?(e.defaultValue=t,void 0):kt&&kt.set(e,t,n)}}),zt||(kt=lt.valHooks.button={get:function(e,n){var i=e.getAttributeNode(n);return i&&("id"===n||"name"===n||"coords"===n?""!==i.value:i.specified)?i.value:t},set:function(e,n,i){var r=e.getAttributeNode(i);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(i)),r.value=n+="","value"===i||n===e.getAttribute(i)?n:t}},lt.attrHooks.contenteditable={get:kt.get,set:function(e,t,n){kt.set(e,""===t?!1:t,n)}},lt.each(["width","height"],function(e,t){lt.attrHooks[t]=lt.extend(lt.attrHooks[t],{set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}})})),lt.support.hrefNormalized||(lt.each(["href","src","width","height"],function(e,n){lt.attrHooks[n]=lt.extend(lt.attrHooks[n],{get:function(e){var i=e.getAttribute(n,2);return null==i?t:i}})}),lt.each(["href","src"],function(e,t){lt.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),lt.support.style||(lt.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),lt.support.optSelected||(lt.propHooks.selected=lt.extend(lt.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),lt.support.enctype||(lt.propFix.enctype="encoding"),lt.support.checkOn||lt.each(["radio","checkbox"],function(){lt.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),lt.each(["radio","checkbox"],function(){lt.valHooks[this]=lt.extend(lt.valHooks[this],{set:function(e,t){return lt.isArray(t)?e.checked=lt.inArray(lt(e).val(),t)>=0:void 0}})});var Ft=/^(?:input|select|textarea)$/i,It=/^key/,Ht=/^(?:mouse|contextmenu)|click/,jt=/^(?:focusinfocus|focusoutblur)$/,Pt=/^([^.]*)(?:\.(.+)|)$/;lt.event={global:{},add:function(e,n,i,r,s){var o,a,l,c,h,u,d,f,p,g,m,y=lt._data(e);if(y){for(i.handler&&(c=i,i=c.handler,s=c.selector),i.guid||(i.guid=lt.guid++),(a=y.events)||(a=y.events={}),(u=y.handle)||(u=y.handle=function(e){return typeof lt===V||e&<.event.triggered===e.type?t:lt.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=(n||"").match(ht)||[""],l=n.length;l--;)o=Pt.exec(n[l])||[],p=m=o[1],g=(o[2]||"").split(".").sort(),h=lt.event.special[p]||{},p=(s?h.delegateType:h.bindType)||p,h=lt.event.special[p]||{},d=lt.extend({type:p,origType:m,data:r,handler:i,guid:i.guid,selector:s,needsContext:s&<.expr.match.needsContext.test(s),namespace:g.join(".")},c),(f=a[p])||(f=a[p]=[],f.delegateCount=0,h.setup&&h.setup.call(e,r,g,u)!==!1||(e.addEventListener?e.addEventListener(p,u,!1):e.attachEvent&&e.attachEvent("on"+p,u))),h.add&&(h.add.call(e,d),d.handler.guid||(d.handler.guid=i.guid)),s?f.splice(f.delegateCount++,0,d):f.push(d),lt.event.global[p]=!0;e=null}},remove:function(e,t,n,i,r){var s,o,a,l,c,h,u,d,f,p,g,m=lt.hasData(e)&<._data(e);if(m&&(h=m.events)){for(t=(t||"").match(ht)||[""],c=t.length;c--;)if(a=Pt.exec(t[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f){for(u=lt.event.special[f]||{},f=(i?u.delegateType:u.bindType)||f,d=h[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=s=d.length;s--;)o=d[s],!r&&g!==o.origType||n&&n.guid!==o.guid||a&&!a.test(o.namespace)||i&&i!==o.selector&&("**"!==i||!o.selector)||(d.splice(s,1),o.selector&&d.delegateCount--,u.remove&&u.remove.call(e,o));l&&!d.length&&(u.teardown&&u.teardown.call(e,p,m.handle)!==!1||lt.removeEvent(e,f,m.handle),delete h[f])}else for(f in h)lt.event.remove(e,f+t[c],n,i,!0);lt.isEmptyObject(h)&&(delete m.handle,lt._removeData(e,"events"))}},trigger:function(n,i,r,s){var o,a,l,c,h,u,d,f=[r||X],p=ot.call(n,"type")?n.type:n,g=ot.call(n,"namespace")?n.namespace.split("."):[];if(l=u=r=r||X,3!==r.nodeType&&8!==r.nodeType&&!jt.test(p+lt.event.triggered)&&(p.indexOf(".")>=0&&(g=p.split("."),p=g.shift(),g.sort()),a=0>p.indexOf(":")&&"on"+p,n=n[lt.expando]?n:new lt.Event(p,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=r),i=null==i?[n]:lt.makeArray(i,[n]),h=lt.event.special[p]||{},s||!h.trigger||h.trigger.apply(r,i)!==!1)){if(!s&&!h.noBubble&&!lt.isWindow(r)){for(c=h.delegateType||p,jt.test(c+p)||(l=l.parentNode);l;l=l.parentNode)f.push(l),u=l;u===(r.ownerDocument||X)&&f.push(u.defaultView||u.parentWindow||e)}for(d=0;(l=f[d++])&&!n.isPropagationStopped();)n.type=d>1?c:h.bindType||p,o=(lt._data(l,"events")||{})[n.type]&<._data(l,"handle"),o&&o.apply(l,i),o=a&&l[a],o&<.acceptData(l)&&o.apply&&o.apply(l,i)===!1&&n.preventDefault();if(n.type=p,!(s||n.isDefaultPrevented()||h._default&&h._default.apply(r.ownerDocument,i)!==!1||"click"===p&<.nodeName(r,"a")||!lt.acceptData(r)||!a||!r[p]||lt.isWindow(r))){u=r[a],u&&(r[a]=null),lt.event.triggered=p;try{r[p]()}catch(m){}lt.event.triggered=t,u&&(r[a]=u)}return n.result}},dispatch:function(e){e=lt.event.fix(e);var n,i,r,s,o,a=[],l=it.call(arguments),c=(lt._data(this,"events")||{})[e.type]||[],h=lt.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,e)!==!1){for(a=lt.event.handlers.call(this,e,c),n=0;(s=a[n++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,o=0;(r=s.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(r.namespace))&&(e.handleObj=r,e.data=r.data,i=((lt.event.special[r.origType]||{}).handle||r.handler).apply(s.elem,l),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,e),e.result}},handlers:function(e,n){var i,r,s,o,a=[],l=n.delegateCount,c=e.target;if(l&&c.nodeType&&(!e.button||"click"!==e.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==e.type)){for(s=[],o=0;l>o;o++)r=n[o],i=r.selector+" ",s[i]===t&&(s[i]=r.needsContext?lt(i,this).index(c)>=0:lt.find(i,this,null,[c]).length),s[i]&&s.push(r);s.length&&a.push({elem:c,handlers:s})}return n.length>l&&a.push({elem:this,handlers:n.slice(l)}),a},fix:function(e){if(e[lt.expando])return e;var t,n,i,r=e.type,s=e,o=this.fixHooks[r];for(o||(this.fixHooks[r]=o=Ht.test(r)?this.mouseHooks:It.test(r)?this.keyHooks:{}),i=o.props?this.props.concat(o.props):this.props,e=new lt.Event(s),t=i.length;t--;)n=i[t],e[n]=s[n];return e.target||(e.target=s.srcElement||X),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,o.filter?o.filter(e,s):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var i,r,s,o=n.button,a=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||X,s=r.documentElement,i=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||i&&i.scrollLeft||0)-(s&&s.clientLeft||i&&i.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||i&&i.scrollTop||0)-(s&&s.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),e.which||o===t||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return lt.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0}},focus:{trigger:function(){if(this!==X.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===X.activeElement&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=lt.extend(new lt.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?lt.event.trigger(r,null,t):lt.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},lt.removeEvent=X.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===V&&(e[i]=null),e.detachEvent(i,n))},lt.Event=function(e,t){return this instanceof lt.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?l:c):this.type=e,t&<.extend(this,t),this.timeStamp=e&&e.timeStamp||lt.now(),this[lt.expando]=!0,void 0):new lt.Event(e,t)},lt.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},lt.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){lt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,s=e.handleObj;return(!r||r!==i&&!lt.contains(i,r))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),lt.support.submitBubbles||(lt.event.special.submit={setup:function(){return lt.nodeName(this,"form")?!1:(lt.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,i=lt.nodeName(n,"input")||lt.nodeName(n,"button")?n.form:t;i&&!lt._data(i,"submitBubbles")&&(lt.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),lt._data(i,"submitBubbles",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&<.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return lt.nodeName(this,"form")?!1:(lt.event.remove(this,"._submit"),void 0)}}),lt.support.changeBubbles||(lt.event.special.change={setup:function(){return Ft.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(lt.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),lt.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),lt.event.simulate("change",this,e,!0)})),!1):(lt.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ft.test(t.nodeName)&&!lt._data(t,"changeBubbles")&&(lt.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||lt.event.simulate("change",this.parentNode,e,!0)}),lt._data(t,"changeBubbles",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return lt.event.remove(this,"._change"),!Ft.test(this.nodeName)}}),lt.support.focusinBubbles||lt.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,i=function(e){lt.event.simulate(t,e.target,lt.event.fix(e),!0)};lt.event.special[t]={setup:function(){0===n++&&X.addEventListener(e,i,!0)},teardown:function(){0===--n&&X.removeEventListener(e,i,!0)}}}),lt.fn.extend({on:function(e,n,i,r,s){var o,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=t);for(o in e)this.on(o,n,i,e[o],s);return this}if(null==i&&null==r?(r=n,i=n=t):null==r&&("string"==typeof n?(r=i,i=t):(r=i,i=n,n=t)),r===!1)r=c;else if(!r)return this;return 1===s&&(a=r,r=function(e){return lt().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=lt.guid++)),this.each(function(){lt.event.add(this,e,r,i,n)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,n,i){var r,s;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,lt(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(s in e)this.off(s,n,e[s]);return this}return(n===!1||"function"==typeof n)&&(i=n,n=t),i===!1&&(i=c),this.each(function(){lt.event.remove(this,e,i,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){lt.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?lt.event.trigger(e,t,n,!0):void 0}}),/*!
|
||
* Sizzle CSS Selector Engine
|
||
* Copyright 2012 jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://sizzlejs.com/
|
||
*/
|
||
function(e,t){function n(e){return pt.test(e+"")}function i(){var e,t=[];return e=function(n,i){return t.push(n+=" ")>T.cacheLength&&delete e[t.shift()],e[n]=i}}function r(e){return e[j]=!0,e}function s(e){var t=M.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function o(e,t,n,i){var r,s,o,a,l,c,h,f,p,g;if((t?t.ownerDocument||t:P)!==M&&D(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(!L&&!i){if(r=gt.exec(e))if(o=r[1]){if(9===a){if(s=t.getElementById(o),!s||!s.parentNode)return n;if(s.id===o)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&I(t,s)&&s.id===o)return n.push(s),n}else{if(r[2])return K.apply(n,Q.call(t.getElementsByTagName(e),0)),n;if((o=r[3])&&B.getByClassName&&t.getElementsByClassName)return K.apply(n,Q.call(t.getElementsByClassName(o),0)),n}if(B.qsa&&!z.test(e)){if(h=!0,f=j,p=t,g=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=u(e),(h=t.getAttribute("id"))?f=h.replace(vt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+d(c[l]);p=ft.test(e)&&t.parentNode||t,g=c.join(",")}if(g)try{return K.apply(n,Q.call(p.querySelectorAll(g),0)),n}catch(m){}finally{h||t.removeAttribute("id")}}}return w(e.replace(ot,"$1"),t,n,i)}function a(e,t){var n=t&&e,i=n&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function l(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function h(e){return r(function(t){return t=+t,r(function(n,i){for(var r,s=e([],n.length,t),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))})})}function u(e,t){var n,i,r,s,a,l,c,h=W[e+" "];if(h)return t?0:h.slice(0);for(a=e,l=[],c=T.preFilter;a;){(!n||(i=at.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),l.push(r=[])),n=!1,(i=ct.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(ot," ")}),a=a.slice(n.length));for(s in T.filter)!(i=dt[s].exec(a))||c[s]&&!(i=c[s](i))||(n=i.shift(),r.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?o.error(e):W(e,l).slice(0)}function d(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,r=n&&"parentNode"===i,s=Z++;return t.first?function(t,n,s){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,s)}:function(t,n,o){var a,l,c,h=q+" "+s;if(o){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,o))return!0}else for(;t=t[i];)if(1===t.nodeType||r)if(c=t[j]||(t[j]={}),(l=c[i])&&l[0]===h){if((a=l[1])===!0||a===C)return a===!0}else if(l=c[i]=[h],l[1]=e(t,n,o)||C,l[1]===!0)return!0}}function p(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,c=null!=t;l>a;a++)(s=e[a])&&(!n||n(s,i,r))&&(o.push(s),c&&t.push(a));return o}function m(e,t,n,i,s,o){return i&&!i[j]&&(i=m(i)),s&&!s[j]&&(s=m(s,o)),r(function(r,o,a,l){var c,h,u,d=[],f=[],p=o.length,m=r||b(t||"*",a.nodeType?[a]:a,[]),y=!e||!r&&t?m:g(m,d,e,a,l),v=n?s||(r?e:p||i)?[]:o:y;if(n&&n(y,v,a,l),i)for(c=g(v,f),i(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[f[h]]=!(y[f[h]]=u));if(r){if(s||e){if(s){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(y[h]=u);s(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=s?J.call(r,u):d[h])>-1&&(r[c]=!(o[c]=u))}}else v=g(v===o?v.splice(p,v.length):v),s?s(null,o,v,l):K.apply(o,v)})}function y(e){for(var t,n,i,r=e.length,s=T.relative[e[0].type],o=s||T.relative[" "],a=s?1:0,l=f(function(e){return e===t},o,!0),c=f(function(e){return J.call(t,e)>-1},o,!0),h=[function(e,n,i){return!s&&(i||n!==S)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];r>a;a++)if(n=T.relative[e[a].type])h=[f(p(h),n)];else{if(n=T.filter[e[a].type].apply(null,e[a].matches),n[j]){for(i=++a;r>i&&!T.relative[e[i].type];i++);return m(a>1&&p(h),a>1&&d(e.slice(0,a-1)).replace(ot,"$1"),n,i>a&&y(e.slice(a,i)),r>i&&y(e=e.slice(i)),r>i&&d(e))}h.push(n)}return p(h)}function v(e,t){var n=0,i=t.length>0,s=e.length>0,a=function(r,a,l,c,h){var u,d,f,p=[],m=0,y="0",v=r&&[],b=null!=h,w=S,_=r||s&&T.find.TAG("*",h&&a.parentNode||a),x=q+=null==w?1:Math.random()||.1;for(b&&(S=a!==M&&a,C=n);null!=(u=_[y]);y++){if(s&&u){for(d=0;f=e[d++];)if(f(u,a,l)){c.push(u);break}b&&(q=x,C=++n)}i&&((u=!f&&u)&&m--,r&&v.push(u))}if(m+=y,i&&y!==m){for(d=0;f=t[d++];)f(v,p,a,l);if(r){if(m>0)for(;y--;)v[y]||p[y]||(p[y]=G.call(c));p=g(p)}K.apply(c,p),b&&!r&&p.length>0&&m+t.length>1&&o.uniqueSort(c)}return b&&(q=x,S=w),v};return i?r(a):a}function b(e,t,n){for(var i=0,r=t.length;r>i;i++)o(e,t[i],n);return n}function w(e,t,n,i){var r,s,o,a,l,c=u(e);if(!i&&1===c.length){if(s=c[0]=c[0].slice(0),s.length>2&&"ID"===(o=s[0]).type&&9===t.nodeType&&!L&&T.relative[s[1].type]){if(t=T.find.ID(o.matches[0].replace(wt,_t),t)[0],!t)return n;e=e.slice(s.shift().value.length)}for(r=dt.needsContext.test(e)?0:s.length;r--&&(o=s[r],!T.relative[a=o.type]);)if((l=T.find[a])&&(i=l(o.matches[0].replace(wt,_t),ft.test(s[0].type)&&t.parentNode||t))){if(s.splice(r,1),e=i.length&&d(s),!e)return K.apply(n,Q.call(i,0)),n;break}}return N(e,c)(i,t,L,n,ft.test(e)),n}function _(){}var x,C,T,E,k,N,A,S,D,M,R,L,z,O,F,I,H,j="sizzle"+-new Date,P=e.document,B={},q=0,Z=0,$=i(),W=i(),U=i(),V=typeof t,X=1<<31,Y=[],G=Y.pop,K=Y.push,Q=Y.slice,J=Y.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),it="([*^$|!~]?=)",rt="\\["+et+"*("+tt+")"+et+"*(?:"+it+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",st=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+rt.replace(3,8)+")*)|.*)\\)|)",ot=new RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),at=new RegExp("^"+et+"*,"+et+"*"),ct=new RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ht=new RegExp(st),ut=new RegExp("^"+nt+"$"),dt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),NAME:new RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:new RegExp("^("+tt.replace("w","w*")+")"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:new RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},ft=/[\x20\t\r\n\f]*[+~]/,pt=/^[^{]+\{\s*\[native code/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,wt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,_t=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{Q.call(P.documentElement.childNodes,0)[0].nodeType}catch(xt){Q=function(e){for(var t,n=[];t=this[e++];)n.push(t);return n}}k=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=o.setDocument=function(e){var i=e?e.ownerDocument||e:P;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,R=i.documentElement,L=k(i),B.tagNameNoComments=s(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),B.attributes=s(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),B.getByClassName=s(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),B.getByName=s(function(e){e.id=j+0,e.innerHTML="<a name='"+j+"'></a><div name='"+j+"'></div>",R.insertBefore(e,R.firstChild);var t=i.getElementsByName&&i.getElementsByName(j).length===2+i.getElementsByName(j+0).length;return B.getIdNotName=!i.getElementById(j),R.removeChild(e),t}),T.attrHandle=s(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},B.getIdNotName?(T.find.ID=function(e,t){if(typeof t.getElementById!==V&&!L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(wt,_t);return function(e){return e.getAttribute("id")===t}}):(T.find.ID=function(e,n){if(typeof n.getElementById!==V&&!L){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==V&&i.getAttributeNode("id").value===e?[i]:t:[]}},T.filter.ID=function(e){var t=e.replace(wt,_t);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=B.tagNameNoComments?function(e,t){return typeof t.getElementsByTagName!==V?t.getElementsByTagName(e):void 0}:function(e,t){var n,i=[],r=0,s=t.getElementsByTagName(e);if("*"===e){for(;n=s[r++];)1===n.nodeType&&i.push(n);return i}return s},T.find.NAME=B.getByName&&function(e,t){return typeof t.getElementsByName!==V?t.getElementsByName(name):void 0},T.find.CLASS=B.getByClassName&&function(e,t){return typeof t.getElementsByClassName===V||L?void 0:t.getElementsByClassName(e)},O=[],z=[":focus"],(B.qsa=n(i.querySelectorAll))&&(s(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||z.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||z.push(":checked")}),s(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&z.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||z.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),z.push(",.*:")})),(B.matchesSelector=n(F=R.matchesSelector||R.mozMatchesSelector||R.webkitMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&s(function(e){B.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),O.push("!=",st)}),z=new RegExp(z.join("|")),O=new RegExp(O.join("|")),I=n(R.contains)||R.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},H=R.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===i||I(P,e)?-1:t===i||I(P,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,r=0,s=e.parentNode,o=t.parentNode,l=[e],c=[t];if(e===t)return A=!0,0;if(!s||!o)return e===i?-1:t===i?1:s?-1:o?1:0;if(s===o)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===P?-1:c[r]===P?1:0},A=!1,[0,0].sort(H),B.detectDuplicates=A,M):M},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==M&&D(e),t=t.replace(bt,"='$1']"),!(!B.matchesSelector||L||O&&O.test(t)||z.test(t)))try{var n=F.call(e,t);if(n||B.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return o(t,M,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==M&&D(e),I(e,t)},o.attr=function(e,t){var n;return(e.ownerDocument||e)!==M&&D(e),L||(t=t.toLowerCase()),(n=T.attrHandle[t])?n(e):L||B.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},o.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],i=1,r=0;if(A=!B.detectDuplicates,e.sort(H),A){for(;t=e[i];i++)t===e[i-1]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},E=o.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=E(t);return n},T=o.selectors={cacheLength:50,createPseudo:r,match:dt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,_t),e[3]=(e[4]||e[5]||"").replace(wt,_t),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return dt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ht.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(wt,_t).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&$(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=o.attr(i,e);return null==r?"!="===t:t?(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r+" ").indexOf(n)>-1:"|="===t?r===n||r.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,i,r){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,h,u,d,f,p,g=s!==o?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!l&&!a;if(m){if(s){for(;g;){for(u=t;u=u[g];)if(a?u.nodeName.toLowerCase()===y:1===u.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?m.firstChild:m.lastChild],o&&v){for(h=m[j]||(m[j]={}),c=h[e]||[],f=c[0]===q&&c[1],d=c[0]===q&&c[2],u=f&&m.childNodes[f];u=++f&&u&&u[g]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===t){h[e]=[q,f,d];break}}else if(v&&(c=(t[j]||(t[j]={}))[e])&&c[0]===q)d=c[1];else for(;(u=++f&&u&&u[g]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==y:1!==u.nodeType)||!++d||(v&&((u[j]||(u[j]={}))[e]=[q,d]),u!==t)););return d-=r,d===i||0===d%i&&d/i>=0}}},PSEUDO:function(e,t){var n,i=T.pseudos[e]||T.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return i[j]?i(t):i.length>1?(n=[e,e,"",t],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var r,s=i(e,t),o=s.length;o--;)r=J.call(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:r(function(e){var t=[],n=[],i=N(e.replace(ot,"$1"));return i[j]?r(function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,r,s){return t[0]=e,i(t,null,s,n),!n.pop()}}),has:r(function(e){return function(t){return o(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return ut.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(wt,_t).toLowerCase(),function(t){var n;do if(n=L?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===R},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,n){return[0>n?n+t:n]}),even:h(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:h(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:h(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:h(function(e,t,n){for(var i=0>n?n+t:n;t>++i;)e.push(i);return e})}};for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=c(x);N=o.compile=function(e,t){var n,i=[],r=[],s=U[e+" "];if(!s){for(t||(t=u(e)),n=t.length;n--;)s=y(t[n]),s[j]?i.push(s):r.push(s);s=U(e,v(r,i))}return s},T.pseudos.nth=T.pseudos.eq,T.filters=_.prototype=T.pseudos,T.setFilters=new _,D(),o.attr=lt.attr,lt.find=o,lt.expr=o.selectors,lt.expr[":"]=lt.expr.pseudos,lt.unique=o.uniqueSort,lt.text=o.getText,lt.isXMLDoc=o.isXML,lt.contains=o.contains}(e);var Bt=/Until$/,qt=/^(?:parents|prev(?:Until|All))/,Zt=/^.[^:#\[\.,]*$/,$t=lt.expr.match.needsContext,Wt={children:!0,contents:!0,next:!0,prev:!0};lt.fn.extend({find:function(e){var t,n,i,r=this.length;if("string"!=typeof e)return i=this,this.pushStack(lt(e).filter(function(){for(t=0;r>t;t++)if(lt.contains(i[t],this))return!0}));for(n=[],t=0;r>t;t++)lt.find(e,this[t],n);return n=this.pushStack(r>1?lt.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=lt(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(lt.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(u(this,e,!1))},filter:function(e){return this.pushStack(u(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?lt(e,this.context).index(this[0])>=0:lt.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,i=0,r=this.length,s=[],o=$t.test(e)||"string"!=typeof e?lt(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(o?o.index(n)>-1:lt.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}return this.pushStack(s.length>1?lt.unique(s):s)},index:function(e){return e?"string"==typeof e?lt.inArray(this[0],lt(e)):lt.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?lt(e,t):lt.makeArray(e&&e.nodeType?[e]:e),i=lt.merge(this.get(),n);return this.pushStack(lt.unique(i))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),lt.fn.andSelf=lt.fn.addBack,lt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return lt.dir(e,"parentNode")},parentsUntil:function(e,t,n){return lt.dir(e,"parentNode",n)},next:function(e){return h(e,"nextSibling")},prev:function(e){return h(e,"previousSibling")},nextAll:function(e){return lt.dir(e,"nextSibling")},prevAll:function(e){return lt.dir(e,"previousSibling")},nextUntil:function(e,t,n){return lt.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return lt.dir(e,"previousSibling",n)},siblings:function(e){return lt.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return lt.sibling(e.firstChild)},contents:function(e){return lt.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:lt.merge([],e.childNodes)}},function(e,t){lt.fn[e]=function(n,i){var r=lt.map(this,t,n);return Bt.test(e)||(i=n),i&&"string"==typeof i&&(r=lt.filter(i,r)),r=this.length>1&&!Wt[e]?lt.unique(r):r,this.length>1&&qt.test(e)&&(r=r.reverse()),this.pushStack(r)}}),lt.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?lt.find.matchesSelector(t[0],e)?[t[0]]:[]:lt.find.matches(e,t)},dir:function(e,n,i){for(var r=[],s=e[n];s&&9!==s.nodeType&&(i===t||1!==s.nodeType||!lt(s).is(i));)1===s.nodeType&&r.push(s),s=s[n];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Ut="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vt=/ jQuery\d+="(?:null|\d+)"/g,Xt=new RegExp("<(?:"+Ut+")[\\s/>]","i"),Yt=/^\s+/,Gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Kt=/<([\w:]+)/,Qt=/<tbody/i,Jt=/<|&#?\w+;/,en=/<(?:script|style|link)/i,tn=/^(?:checkbox|radio)$/i,nn=/checked\s*(?:[^=]|=\s*.checked.)/i,rn=/^$|\/(?:java|ecma)script/i,sn=/^true\/(.*)/,on=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,an={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:lt.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ln=d(X),cn=ln.appendChild(X.createElement("div"));an.optgroup=an.option,an.tbody=an.tfoot=an.colgroup=an.caption=an.thead,an.th=an.td,lt.fn.extend({text:function(e){return lt.access(this,function(e){return e===t?lt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||X).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(lt.isFunction(e))return this.each(function(t){lt(this).wrapAll(e.call(this,t))});if(this[0]){var t=lt(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return lt.isFunction(e)?this.each(function(t){lt(this).wrapInner(e.call(this,t))}):this.each(function(){var t=lt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=lt.isFunction(e);return this.each(function(n){lt(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){lt.nodeName(this,"body")||lt(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=0;null!=(n=this[i]);i++)(!e||lt.filter(e,[n]).length>0)&&(t||1!==n.nodeType||lt.cleanData(b(n)),n.parentNode&&(t&<.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&<.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&<.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return lt.clone(this,e,t)})},html:function(e){return lt.access(this,function(e){var n=this[0]||{},i=0,r=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Vt,""):t;if(!("string"!=typeof e||en.test(e)||!lt.support.htmlSerialize&&Xt.test(e)||!lt.support.leadingWhitespace&&Yt.test(e)||an[(Kt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Gt,"<$1></$2>");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(lt.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=lt.isFunction(e);return t||"string"==typeof e||(e=lt(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(lt(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,i){e=tt.apply([],e);var r,s,o,a,l,c,h=0,u=this.length,d=this,m=u-1,y=e[0],v=lt.isFunction(y);if(v||!(1>=u||"string"!=typeof y||lt.support.checkClone)&&nn.test(y))return this.each(function(r){var s=d.eq(r);v&&(e[0]=y.call(this,r,n?s.html():t)),s.domManip(e,n,i)});if(u&&(c=lt.buildFragment(e,this[0].ownerDocument,!1,this),r=c.firstChild,1===c.childNodes.length&&(c=r),r)){for(n=n&<.nodeName(r,"tr"),a=lt.map(b(c,"script"),p),o=a.length;u>h;h++)s=c,h!==m&&(s=lt.clone(s,!0,!0),o&<.merge(a,b(s,"script"))),i.call(n&<.nodeName(this[h],"table")?f(this[h],"tbody"):this[h],s,h);if(o)for(l=a[a.length-1].ownerDocument,lt.map(a,g),h=0;o>h;h++)s=a[h],rn.test(s.type||"")&&!lt._data(s,"globalEval")&<.contains(l,s)&&(s.src?lt.ajax({url:s.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):lt.globalEval((s.text||s.textContent||s.innerHTML||"").replace(on,"")));c=r=null}return this}}),lt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){lt.fn[e]=function(e){for(var n,i=0,r=[],s=lt(e),o=s.length-1;o>=i;i++)n=i===o?this:this.clone(!0),lt(s[i])[t](n),nt.apply(r,n.get());return this.pushStack(r)}}),lt.extend({clone:function(e,t,n){var i,r,s,o,a,l=lt.contains(e.ownerDocument,e);if(lt.support.html5Clone||lt.isXMLDoc(e)||!Xt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(cn.innerHTML=e.outerHTML,cn.removeChild(s=cn.firstChild)),!(lt.support.noCloneEvent&<.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||lt.isXMLDoc(e)))for(i=b(s),a=b(e),o=0;null!=(r=a[o]);++o)i[o]&&v(r,i[o]);if(t)if(n)for(a=a||b(e),i=i||b(s),o=0;null!=(r=a[o]);o++)y(r,i[o]);else y(e,s);return i=b(s,"script"),i.length>0&&m(i,!l&&b(e,"script")),i=a=r=null,s},buildFragment:function(e,t,n,i){for(var r,s,o,a,l,c,h,u=e.length,f=d(t),p=[],g=0;u>g;g++)if(s=e[g],s||0===s)if("object"===lt.type(s))lt.merge(p,s.nodeType?[s]:s);else if(Jt.test(s)){for(a=a||f.appendChild(t.createElement("div")),l=(Kt.exec(s)||["",""])[1].toLowerCase(),h=an[l]||an._default,a.innerHTML=h[1]+s.replace(Gt,"<$1></$2>")+h[2],r=h[0];r--;)a=a.lastChild;if(!lt.support.leadingWhitespace&&Yt.test(s)&&p.push(t.createTextNode(Yt.exec(s)[0])),!lt.support.tbody)for(s="table"!==l||Qt.test(s)?"<table>"!==h[1]||Qt.test(s)?0:a:a.firstChild,r=s&&s.childNodes.length;r--;)lt.nodeName(c=s.childNodes[r],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(lt.merge(p,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=f.lastChild}else p.push(t.createTextNode(s));for(a&&f.removeChild(a),lt.support.appendChecked||lt.grep(b(p,"input"),w),g=0;s=p[g++];)if((!i||-1===lt.inArray(s,i))&&(o=lt.contains(s.ownerDocument,s),a=b(f.appendChild(s),"script"),o&&m(a),n))for(r=0;s=a[r++];)rn.test(s.type||"")&&n.push(s);return a=null,f},cleanData:function(e,t){for(var n,i,r,s,o=0,a=lt.expando,l=lt.cache,c=lt.support.deleteExpando,h=lt.event.special;null!=(n=e[o]);o++)if((t||lt.acceptData(n))&&(r=n[a],s=r&&l[r])){if(s.events)for(i in s.events)h[i]?lt.event.remove(n,i):lt.removeEvent(n,i,s.handle);l[r]&&(delete l[r],c?delete n[a]:typeof n.removeAttribute!==V?n.removeAttribute(a):n[a]=null,J.push(r))}}});var hn,un,dn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,gn=/^(top|right|bottom|left)$/,mn=/^(none|table(?!-c[ea]).+)/,yn=/^margin/,vn=new RegExp("^("+ct+")(.*)$","i"),bn=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),wn=new RegExp("^([+-])=("+ct+")","i"),_n={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Cn={letterSpacing:0,fontWeight:400},Tn=["Top","Right","Bottom","Left"],En=["Webkit","O","Moz","ms"];lt.fn.extend({css:function(e,n){return lt.access(this,function(e,n,i){var r,s,o={},a=0;if(lt.isArray(n)){for(s=un(e),r=n.length;r>a;a++)o[n[a]]=lt.css(e,n[a],!1,s);return o}return i!==t?lt.style(e,n,i):lt.css(e,n)},e,n,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:x(this))?lt(this).show():lt(this).hide()})}}),lt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=dn(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":lt.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,a,l=lt.camelCase(n),c=e.style;if(n=lt.cssProps[l]||(lt.cssProps[l]=_(c,l)),a=lt.cssHooks[n]||lt.cssHooks[l],i===t)return a&&"get"in a&&(s=a.get(e,!1,r))!==t?s:c[n];if(o=typeof i,"string"===o&&(s=wn.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(lt.css(e,n)),o="number"),!(null==i||"number"===o&&isNaN(i)||("number"!==o||lt.cssNumber[l]||(i+="px"),lt.support.clearCloneStyle||""!==i||0!==n.indexOf("background")||(c[n]="inherit"),a&&"set"in a&&(i=a.set(e,i,r))===t)))try{c[n]=i}catch(h){}}},css:function(e,n,i,r){var s,o,a,l=lt.camelCase(n);return n=lt.cssProps[l]||(lt.cssProps[l]=_(e.style,l)),a=lt.cssHooks[n]||lt.cssHooks[l],a&&"get"in a&&(o=a.get(e,!0,i)),o===t&&(o=dn(e,n,r)),"normal"===o&&n in Cn&&(o=Cn[n]),""===i||i?(s=parseFloat(o),i===!0||lt.isNumeric(s)?s||0:o):o},swap:function(e,t,n,i){var r,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];r=n.apply(e,i||[]);for(s in t)e.style[s]=o[s];return r}}),e.getComputedStyle?(un=function(t){return e.getComputedStyle(t,null)},dn=function(e,n,i){var r,s,o,a=i||un(e),l=a?a.getPropertyValue(n)||a[n]:t,c=e.style;return a&&(""!==l||lt.contains(e.ownerDocument,e)||(l=lt.style(e,n)),bn.test(l)&&yn.test(n)&&(r=c.width,s=c.minWidth,o=c.maxWidth,c.minWidth=c.maxWidth=c.width=l,l=a.width,c.width=r,c.minWidth=s,c.maxWidth=o)),l}):X.documentElement.currentStyle&&(un=function(e){return e.currentStyle},dn=function(e,n,i){var r,s,o,a=i||un(e),l=a?a[n]:t,c=e.style;return null==l&&c&&c[n]&&(l=c[n]),bn.test(l)&&!gn.test(n)&&(r=c.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),c.left="fontSize"===n?"1em":l,l=c.pixelLeft+"px",c.left=r,o&&(s.left=o)),""===l?"auto":l}),lt.each(["height","width"],function(e,t){lt.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&mn.test(lt.css(e,"display"))?lt.swap(e,xn,function(){return k(e,t,i)}):k(e,t,i):void 0},set:function(e,n,i){var r=i&&un(e);return T(e,n,i?E(e,t,i,lt.support.boxSizing&&"border-box"===lt.css(e,"boxSizing",!1,r),r):0)}}}),lt.support.opacity||(lt.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=lt.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===lt.trim(s.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=fn.test(s)?s.replace(fn,r):s+" "+r)}}),lt(function(){lt.support.reliableMarginRight||(lt.cssHooks.marginRight={get:function(e,t){return t?lt.swap(e,{display:"inline-block"},dn,[e,"marginRight"]):void 0}}),!lt.support.pixelPosition&<.fn.position&<.each(["top","left"],function(e,t){lt.cssHooks[t]={get:function(e,n){return n?(n=dn(e,t),bn.test(n)?lt(e).position()[t]+"px":n):void 0}}})}),lt.expr&<.expr.filters&&(lt.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!lt.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||lt.css(e,"display"))},lt.expr.filters.visible=function(e){return!lt.expr.filters.hidden(e)}),lt.each({margin:"",padding:"",border:"Width"},function(e,t){lt.cssHooks[e+t]={expand:function(n){for(var i=0,r={},s="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Tn[i]+t]=s[i]||s[i-2]||s[0];return r}},yn.test(e)||(lt.cssHooks[e+t].set=T)});var kn=/%20/g,Nn=/\[\]$/,An=/\r?\n/g,Sn=/^(?:submit|button|image|reset|file)$/i,Dn=/^(?:input|select|textarea|keygen)/i;lt.fn.extend({serialize:function(){return lt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=lt.prop(this,"elements");return e?lt.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!lt(this).is(":disabled")&&Dn.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!tn.test(e))}).map(function(e,t){var n=lt(this).val();return null==n?null:lt.isArray(n)?lt.map(n,function(e){return{name:t.name,value:e.replace(An,"\r\n")}}):{name:t.name,value:n.replace(An,"\r\n")}}).get()}}),lt.param=function(e,n){var i,r=[],s=function(e,t){t=lt.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)
|
||
};if(n===t&&(n=lt.ajaxSettings&<.ajaxSettings.traditional),lt.isArray(e)||e.jquery&&!lt.isPlainObject(e))lt.each(e,function(){s(this.name,this.value)});else for(i in e)S(i,e[i],n,s);return r.join("&").replace(kn,"+")},lt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){lt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),lt.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var Mn,Rn,Ln=lt.now(),zn=/\?/,On=/#.*$/,Fn=/([?&])_=[^&]*/,In=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Hn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,jn=/^(?:GET|HEAD)$/,Pn=/^\/\//,Bn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,qn=lt.fn.load,Zn={},$n={},Wn="*/".concat("*");try{Rn=Y.href}catch(Un){Rn=X.createElement("a"),Rn.href="",Rn=Rn.href}Mn=Bn.exec(Rn.toLowerCase())||[],lt.fn.load=function(e,n,i){if("string"!=typeof e&&qn)return qn.apply(this,arguments);var r,s,o,a=this,l=e.indexOf(" ");return l>=0&&(r=e.slice(l,e.length),e=e.slice(0,l)),lt.isFunction(n)?(i=n,n=t):n&&"object"==typeof n&&(o="POST"),a.length>0&<.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments,a.html(r?lt("<div>").append(lt.parseHTML(e)).find(r):e)}).complete(i&&function(e,t){a.each(i,s||[e.responseText,t,e])}),this},lt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){lt.fn[t]=function(e){return this.on(t,e)}}),lt.each(["get","post"],function(e,n){lt[n]=function(e,i,r,s){return lt.isFunction(i)&&(s=s||r,r=i,i=t),lt.ajax({url:e,type:n,dataType:s,data:i,success:r})}}),lt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rn,type:"GET",isLocal:Hn.test(Mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":lt.parseJSON,"text xml":lt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?R(R(e,lt.ajaxSettings),t):R(lt.ajaxSettings,e)},ajaxPrefilter:D(Zn),ajaxTransport:D($n),ajax:function(e,n){function i(e,n,i,r){var s,u,v,b,_,C=n;2!==w&&(w=2,l&&clearTimeout(l),h=t,a=r||"",x.readyState=e>0?4:0,i&&(b=L(d,x,i)),e>=200&&300>e||304===e?(d.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(lt.lastModified[o]=_),_=x.getResponseHeader("etag"),_&&(lt.etag[o]=_)),204===e?(s=!0,C="nocontent"):304===e?(s=!0,C="notmodified"):(s=z(d,b),C=s.state,u=s.data,v=s.error,s=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),x.status=e,x.statusText=(n||C)+"",s?g.resolveWith(f,[u,C,x]):g.rejectWith(f,[x,C,v]),x.statusCode(y),y=t,c&&p.trigger(s?"ajaxSuccess":"ajaxError",[x,d,s?u:v]),m.fireWith(f,[x,C]),c&&(p.trigger("ajaxComplete",[x,d]),--lt.active||lt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,s,o,a,l,c,h,u,d=lt.ajaxSetup({},n),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?lt(f):lt.event,g=lt.Deferred(),m=lt.Callbacks("once memory"),y=d.statusCode||{},v={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!u)for(u={};t=In.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return w||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)y[t]=[y[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||_;return h&&h.abort(t),i(0,t),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||Rn)+"").replace(On,"").replace(Pn,Mn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=lt.trim(d.dataType||"*").toLowerCase().match(ht)||[""],null==d.crossDomain&&(r=Bn.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===Mn[1]&&r[2]===Mn[2]&&(r[3]||("http:"===r[1]?80:443))==(Mn[3]||("http:"===Mn[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=lt.param(d.data,d.traditional)),M(Zn,d,n,x),2===w)return x;c=d.global,c&&0===lt.active++&<.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!jn.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(zn.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Fn.test(o)?o.replace(Fn,"$1_="+Ln++):o+(zn.test(o)?"&":"?")+"_="+Ln++)),d.ifModified&&(lt.lastModified[o]&&x.setRequestHeader("If-Modified-Since",lt.lastModified[o]),lt.etag[o]&&x.setRequestHeader("If-None-Match",lt.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wn+"; q=0.01":""):d.accepts["*"]);for(s in d.headers)x.setRequestHeader(s,d.headers[s]);if(d.beforeSend&&(d.beforeSend.call(f,x,d)===!1||2===w))return x.abort();_="abort";for(s in{success:1,error:1,complete:1})x[s](d[s]);if(h=M($n,d,n,x)){x.readyState=1,c&&p.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},d.timeout));try{w=1,h.send(v,i)}catch(C){if(!(2>w))throw C;i(-1,C)}}else i(-1,"No Transport");return x},getScript:function(e,n){return lt.get(e,t,n,"script")},getJSON:function(e,t,n){return lt.get(e,t,n,"json")}}),lt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return lt.globalEval(e),e}}}),lt.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),lt.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=X.head||lt("head")[0]||X.documentElement;return{send:function(t,r){n=X.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||r(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Vn=[],Xn=/(=)\?(?=&|$)|\?\?/;lt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vn.pop()||lt.expando+"_"+Ln++;return this[e]=!0,e}}),lt.ajaxPrefilter("json jsonp",function(n,i,r){var s,o,a,l=n.jsonp!==!1&&(Xn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(s=n.jsonpCallback=lt.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Xn,"$1"+s):n.jsonp!==!1&&(n.url+=(zn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return a||lt.error(s+" was not called"),a[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){a=arguments},r.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=i.jsonpCallback,Vn.push(s)),a&<.isFunction(o)&&o(a[0]),a=o=t}),"script"):void 0});var Yn,Gn,Kn=0,Qn=e.ActiveXObject&&function(){var e;for(e in Yn)Yn[e](t,!0)};lt.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&O()||F()}:O,Gn=lt.ajaxSettings.xhr(),lt.support.cors=!!Gn&&"withCredentials"in Gn,Gn=lt.support.ajax=!!Gn,Gn&<.ajaxTransport(function(n){if(!n.crossDomain||lt.support.cors){var i;return{send:function(r,s){var o,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");try{for(a in r)l.setRequestHeader(a,r[a])}catch(c){}l.send(n.hasContent&&n.data||null),i=function(e,r){var a,c,h,u;try{if(i&&(r||4===l.readyState))if(i=t,o&&(l.onreadystatechange=lt.noop,Qn&&delete Yn[o]),r)4!==l.readyState&&l.abort();else{u={},a=l.status,c=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(u.text=l.responseText);try{h=l.statusText}catch(d){h=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=u.text?200:404}}catch(f){r||s(-1,f)}u&&s(a,h,u,c)},n.async?4===l.readyState?setTimeout(i):(o=++Kn,Qn&&(Yn||(Yn={},lt(e).unload(Qn)),Yn[o]=i),l.onreadystatechange=i):i()},abort:function(){i&&i(t,!0)}}}});var Jn,ei,ti=/^(?:toggle|show|hide)$/,ni=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),ii=/queueHooks$/,ri=[B],si={"*":[function(e,t){var n,i,r=this.createTween(e,t),s=ni.exec(t),o=r.cur(),a=+o||0,l=1,c=20;if(s){if(n=+s[2],i=s[3]||(lt.cssNumber[e]?"":"px"),"px"!==i&&a){a=lt.css(r.elem,e,!0)||n||1;do l=l||".5",a/=l,lt.style(r.elem,e,a+i);while(l!==(l=r.cur()/o)&&1!==l&&--c)}r.unit=i,r.start=a,r.end=s[1]?a+(s[1]+1)*n:n}return r}]};lt.Animation=lt.extend(j,{tweener:function(e,t){lt.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],si[n]=si[n]||[],si[n].unshift(t)},prefilter:function(e,t){t?ri.unshift(e):ri.push(e)}}),lt.Tween=q,q.prototype={constructor:q,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(lt.cssNumber[n]?"":"px")},cur:function(){var e=q.propHooks[this.prop];return e&&e.get?e.get(this):q.propHooks._default.get(this)},run:function(e){var t,n=q.propHooks[this.prop];return this.pos=t=this.options.duration?lt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=lt.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){lt.fx.step[e.prop]?lt.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[lt.cssProps[e.prop]]||lt.cssHooks[e.prop])?lt.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},lt.each(["toggle","show","hide"],function(e,t){var n=lt.fn[t];lt.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Z(t,!0),e,i,r)}}),lt.fn.extend({fadeTo:function(e,t,n,i){return this.filter(x).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=lt.isEmptyObject(e),s=lt.speed(t,n,i),o=function(){var t=j(this,lt.extend({},e),s);o.finish=function(){t.stop(!0)},(r||lt._data(this,"finish"))&&t.stop(!0)};return o.finish=o,r||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,i){var r=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=lt.timers,o=lt._data(this);if(n)o[n]&&o[n].stop&&r(o[n]);else for(n in o)o[n]&&o[n].stop&&ii.test(n)&&r(o[n]);for(n=s.length;n--;)s[n].elem!==this||null!=e&&s[n].queue!==e||(s[n].anim.stop(i),t=!1,s.splice(n,1));(t||!i)&<.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=lt._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],s=lt.timers,o=i?i.length:0;for(n.finish=!0,lt.queue(this,e,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;o>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),lt.each({slideDown:Z("show"),slideUp:Z("hide"),slideToggle:Z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){lt.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),lt.speed=function(e,t,n){var i=e&&"object"==typeof e?lt.extend({},e):{complete:n||!n&&t||lt.isFunction(e)&&e,duration:e,easing:n&&t||t&&!lt.isFunction(t)&&t};return i.duration=lt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in lt.fx.speeds?lt.fx.speeds[i.duration]:lt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){lt.isFunction(i.old)&&i.old.call(this),i.queue&<.dequeue(this,i.queue)},i},lt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},lt.timers=[],lt.fx=q.prototype.init,lt.fx.tick=function(){var e,n=lt.timers,i=0;for(Jn=lt.now();n.length>i;i++)e=n[i],e()||n[i]!==e||n.splice(i--,1);n.length||lt.fx.stop(),Jn=t},lt.fx.timer=function(e){e()&<.timers.push(e)&<.fx.start()},lt.fx.interval=13,lt.fx.start=function(){ei||(ei=setInterval(lt.fx.tick,lt.fx.interval))},lt.fx.stop=function(){clearInterval(ei),ei=null},lt.fx.speeds={slow:600,fast:200,_default:400},lt.fx.step={},lt.expr&<.expr.filters&&(lt.expr.filters.animated=function(e){return lt.grep(lt.timers,function(t){return e===t.elem}).length}),lt.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){lt.offset.setOffset(this,e,t)});var n,i,r={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(o)return n=o.documentElement,lt.contains(n,s)?(typeof s.getBoundingClientRect!==V&&(r=s.getBoundingClientRect()),i=$(o),{top:r.top+(i.pageYOffset||n.scrollTop)-(n.clientTop||0),left:r.left+(i.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):r},lt.offset={setOffset:function(e,t,n){var i=lt.css(e,"position");"static"===i&&(e.style.position="relative");var r,s,o=lt(e),a=o.offset(),l=lt.css(e,"top"),c=lt.css(e,"left"),h=("absolute"===i||"fixed"===i)&<.inArray("auto",[l,c])>-1,u={},d={};h?(d=o.position(),r=d.top,s=d.left):(r=parseFloat(l)||0,s=parseFloat(c)||0),lt.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(u.top=t.top-a.top+r),null!=t.left&&(u.left=t.left-a.left+s),"using"in t?t.using.call(e,u):o.css(u)}},lt.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===lt.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),lt.nodeName(e[0],"html")||(n=e.offset()),n.top+=lt.css(e[0],"borderTopWidth",!0),n.left+=lt.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-lt.css(i,"marginTop",!0),left:t.left-n.left-lt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||X.documentElement;e&&!lt.nodeName(e,"html")&&"static"===lt.css(e,"position");)e=e.offsetParent;return e||X.documentElement})}}),lt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var i=/Y/.test(n);lt.fn[e]=function(r){return lt.access(this,function(e,r,s){var o=$(e);return s===t?o?n in o?o[n]:o.document.documentElement[r]:e[r]:(o?o.scrollTo(i?lt(o).scrollLeft():s,i?s:lt(o).scrollTop()):e[r]=s,void 0)},e,r,arguments.length,null)}}),lt.each({Height:"height",Width:"width"},function(e,n){lt.each({padding:"inner"+e,content:n,"":"outer"+e},function(i,r){lt.fn[r]=function(r,s){var o=arguments.length&&(i||"boolean"!=typeof r),a=i||(r===!0||s===!0?"margin":"border");return lt.access(this,function(n,i,r){var s;return lt.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):r===t?lt.css(n,i,a):lt.style(n,i,r,a)},n,o?r:t,o,null)}})}),e.jQuery=e.$=lt,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return lt})})(window),function(e,t){var n=function(){var t=e._data(document,"events");return t&&t.click&&e.grep(t.click,function(e){return"rails"===e.namespace}).length};n()&&e.error("jquery-ujs has already been loaded!");var i;e.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(t){var n=e('meta[name="csrf-token"]').attr("content");n&&t.setRequestHeader("X-CSRF-Token",n)},fire:function(t,n,i){var r=e.Event(n);return t.trigger(r,i),r.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr("href")},handleRemote:function(n){var r,s,o,a,l,c,h,u;if(i.fire(n,"ajax:before")){if(a=n.data("cross-domain"),l=a===t?null:a,c=n.data("with-credentials")||null,h=n.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,n.is("form")){r=n.attr("method"),s=n.attr("action"),o=n.serializeArray();var d=n.data("ujs:submit-button");d&&(o.push(d),n.data("ujs:submit-button",null))}else n.is(i.inputChangeSelector)?(r=n.data("method"),s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):(r=n.data("method"),s=i.href(n),o=n.data("params")||null);u={type:r||"GET",data:o,dataType:h,beforeSend:function(e,r){return r.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),i.fire(n,"ajax:beforeSend",[e,r])},success:function(e,t,i){n.trigger("ajax:success",[e,t,i])},complete:function(e,t){n.trigger("ajax:complete",[e,t])},error:function(e,t,i){n.trigger("ajax:error",[e,t,i])},crossDomain:l},c&&(u.xhrFields={withCredentials:c}),s&&(u.url=s);var f=i.ajax(u);return n.trigger("ajax:send",f),f}return!1},handleMethod:function(n){var r=i.href(n),s=n.data("method"),o=n.attr("target"),a=e("meta[name=csrf-token]").attr("content"),l=e("meta[name=csrf-param]").attr("content"),c=e('<form method="post" action="'+r+'"></form>'),h='<input name="_method" value="'+s+'" type="hidden" />';l!==t&&a!==t&&(h+='<input name="'+l+'" value="'+a+'" type="hidden" />'),o&&c.attr("target",o),c.hide().append(h).appendTo("body"),c.submit()},disableFormElements:function(t){t.find(i.disableSelector).each(function(){var t=e(this),n=t.is("button")?"html":"val";t.data("ujs:enable-with",t[n]()),t[n](t.data("disable-with")),t.prop("disabled",!0)})},enableFormElements:function(t){t.find(i.enableSelector).each(function(){var t=e(this),n=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[n](t.data("ujs:enable-with")),t.prop("disabled",!1)})},allowAction:function(e){var t,n=e.data("confirm"),r=!1;return n?(i.fire(e,"confirm")&&(r=i.confirm(n),t=i.fire(e,"confirm:complete",[r])),r&&t):!0},blankInputs:function(t,n,i){var r,s,o=e(),a=n||"input,textarea",l=t.find(a);return l.each(function(){if(r=e(this),s=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!s==!i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;o=o.add(r)}}),o.length?o:!1},nonBlankInputs:function(e,t){return i.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},callFormSubmitBindings:function(n,i){var r=n.data("events"),s=!0;return r!==t&&r.submit!==t&&e.each(r.submit,function(e,t){return"function"==typeof t.handler?s=t.handler(i):void 0}),s},disableElement:function(e){e.data("ujs:enable-with",e.html()),e.html(e.data("disable-with")),e.bind("click.railsDisable",function(e){return i.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.data("ujs:enable-with",!1)),e.unbind("click.railsDisable")}},i.fire(e(document),"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,n){e.crossDomain||i.CSRFProtection(n)}),e(document).delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(e(this))}),e(document).delegate(i.linkClickSelector,"click.rails",function(n){var r=e(this),s=r.data("method"),o=r.data("params");if(!i.allowAction(r))return i.stopEverything(n);if(r.is(i.linkDisableSelector)&&i.disableElement(r),r.data("remote")!==t){if(!(!n.metaKey&&!n.ctrlKey||s&&"GET"!==s||o))return!0;var a=i.handleRemote(r);return a===!1?i.enableElement(r):a.error(function(){i.enableElement(r)}),!1}return r.data("method")?(i.handleMethod(r),!1):void 0}),e(document).delegate(i.inputChangeSelector,"change.rails",function(t){var n=e(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(t)}),e(document).delegate(i.formSubmitSelector,"submit.rails",function(n){var r=e(this),s=r.data("remote")!==t,o=i.blankInputs(r,i.requiredInputSelector),a=i.nonBlankInputs(r,i.fileInputSelector);if(!i.allowAction(r))return i.stopEverything(n);if(o&&r.attr("novalidate")==t&&i.fire(r,"ajax:aborted:required",[o]))return i.stopEverything(n);if(s){if(a){setTimeout(function(){i.disableFormElements(r)},13);var l=i.fire(r,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(r)},13),l}return!e.support.submitBubbles&&"1.7">e().jquery&&i.callFormSubmitBindings(r,n)===!1?i.stopEverything(n):(i.handleRemote(r),!1)}setTimeout(function(){i.disableFormElements(r)},13)}),e(document).delegate(i.formInputClickSelector,"click.rails",function(t){var n=e(this);if(!i.allowAction(n))return i.stopEverything(t);var r=n.attr("name"),s=r?{name:r,value:n.val()}:null;n.closest("form").data("ujs:submit-button",s)}),e(document).delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(t){this==t.target&&i.disableFormElements(e(this))}),e(document).delegate(i.formSubmitSelector,"ajax:complete.rails",function(t){this==t.target&&i.enableFormElements(e(this))}),e(function(){var t=e("meta[name=csrf-token]").attr("content"),n=e("meta[name=csrf-param]").attr("content");e('form input[name="'+n+'"]').val(t)}))}(jQuery);/**
|
||
* @license wysihtml5 v0.3.0
|
||
* https://github.com/xing/wysihtml5
|
||
*
|
||
* Author: Christopher Blum (https://github.com/tiff)
|
||
*
|
||
* Copyright (C) 2012 XING AG
|
||
* Licensed under the MIT license (MIT)
|
||
*
|
||
*/
|
||
var wysihtml5={version:"0.3.0",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};/**
|
||
* @license Rangy, a cross-browser JavaScript range and selection library
|
||
* http://code.google.com/p/rangy/
|
||
*
|
||
* Copyright 2011, Tim Down
|
||
* Licensed under the MIT license.
|
||
* Version: 1.2.2
|
||
* Build date: 13 November 2011
|
||
*/
|
||
window.rangy=function(){function e(e,t){var n=typeof e[t];return n==u||!(n!=h||!e[t])||"unknown"==n}function t(e,t){return!(typeof e[t]!=h||!e[t])}function n(e,t){return typeof e[t]!=d}function i(e){return function(t,n){for(var i=n.length;i--;)if(!e(t,n[i]))return!1;return!0}}function r(e){return e&&y(e,m)&&b(e,g)}function s(e){window.alert("Rangy not supported in your browser. Reason: "+e),w.initialized=!0,w.supported=!1}function o(e){var t="Rangy warning: "+e;w.config.alertOnWarn?window.alert(t):typeof window.console!=d&&typeof window.console.log!=d&&window.console.log(t)}function a(){if(!w.initialized){var n,i=!1,o=!1;e(document,"createRange")&&(n=document.createRange(),y(n,p)&&b(n,f)&&(i=!0),n.detach());var a=t(document,"body")?document.body:document.getElementsByTagName("body")[0];a&&e(a,"createTextRange")&&(n=a.createTextRange(),r(n)&&(o=!0)),i||o||s("Neither Range nor TextRange are implemented"),w.initialized=!0,w.features={implementsDomRange:i,implementsTextRange:o};for(var l=x.concat(_),c=0,h=l.length;h>c;++c)try{l[c](w)}catch(u){t(window,"console")&&e(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",u)}}}function l(e){e=e||window,a();for(var t=0,n=C.length;n>t;++t)C[t](e)}function c(e){this.name=e,this.initialized=!1,this.supported=!1}var h="object",u="function",d="undefined",f=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],p=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],g=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],m=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],y=i(e),v=i(t),b=i(n),w={version:"1.2.2",initialized:!1,supported:!0,util:{isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:y,areHostObjects:v,areHostProperties:b,isTextRange:r},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};w.fail=s,w.warn=o,{}.hasOwnProperty?w.util.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}:s("hasOwnProperty not supported");var _=[],x=[];w.init=a,w.addInitListener=function(e){w.initialized?e(w):_.push(e)};var C=[];w.addCreateMissingNativeApiListener=function(e){C.push(e)},w.createMissingNativeApi=l,c.prototype.fail=function(e){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+e)},c.prototype.warn=function(e){w.warn("Module "+this.name+": "+e)},c.prototype.createError=function(e){return new Error("Error in Rangy "+this.name+" module: "+e)},w.createModule=function(e,t){var n=new c(e);w.modules[e]=n,x.push(function(e){t(e,n),n.initialized=!0,n.supported=!0})},w.requireModules=function(e){for(var t,n,i=0,r=e.length;r>i;++i){if(n=e[i],t=w.modules[n],!(t&&t instanceof c))throw new Error("Module '"+n+"' not found");if(!t.supported)throw new Error("Module '"+n+"' not supported")}};var T=!1,E=function(){T||(T=!0,w.initialized||a())};return typeof window==d?(s("No window found"),void 0):typeof document==d?(s("No document found"),void 0):(e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",E,!1),e(window,"addEventListener")?window.addEventListener("load",E,!1):e(window,"attachEvent")?window.attachEvent("onload",E):s("Window does not have required addEventListener or attachEvent method"),w)}(),rangy.createModule("DomUtil",function(e,t){function n(e){var t;return typeof e.namespaceURI==E||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function i(e){var t=e.parentNode;return 1==t.nodeType?t:null}function r(e){for(var t=0;e=e.previousSibling;)t++;return t}function s(e){var t;return c(e)?e.length:(t=e.childNodes)?t.length:0}function o(e,t){var n,i=[];for(n=e;n;n=n.parentNode)i.push(n);for(n=t;n;n=n.parentNode)if(S(i,n))return n;return null}function a(e,t,n){for(var i=n?t:t.parentNode;i;){if(i===e)return!0;i=i.parentNode}return!1}function l(e,t,n){for(var i,r=n?e:e.parentNode;r;){if(i=r.parentNode,i===t)return r;r=i}return null}function c(e){var t=e.nodeType;return 3==t||4==t||8==t}function h(e,t){var n=t.nextSibling,i=t.parentNode;return n?i.insertBefore(e,n):i.appendChild(e),e}function u(e,t){var n=e.cloneNode(!1);return n.deleteData(0,t),e.deleteData(t,e.length-t),h(n,e),n}function d(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=E)return e.ownerDocument;if(typeof e.document!=E)return e.document;if(e.parentNode)return d(e.parentNode);throw new Error("getDocument: no document found for node")}function f(e){var t=d(e);if(typeof t.defaultView!=E)return t.defaultView;if(typeof t.parentWindow!=E)return t.parentWindow;throw new Error("Cannot get a window object for node")}function p(e){if(typeof e.contentDocument!=E)return e.contentDocument;if(typeof e.contentWindow!=E)return e.contentWindow.document;throw new Error("getIframeWindow: No Document object found for iframe element")}function g(e){if(typeof e.contentWindow!=E)return e.contentWindow;if(typeof e.contentDocument!=E)return e.contentDocument.defaultView;throw new Error("getIframeWindow: No Window object found for iframe element")}function m(e){return k.isHostObject(e,"body")?e.body:e.getElementsByTagName("body")[0]}function y(e){for(var t;t=e.parentNode;)e=t;return e}function v(e,t,n,i){var s,a,c,h,u;if(e==n)return t===i?0:i>t?-1:1;if(s=l(n,e,!0))return r(s)>=t?-1:1;if(s=l(e,n,!0))return i>r(s)?-1:1;if(a=o(e,n),c=e===a?a:l(e,a,!0),h=n===a?a:l(n,a,!0),c===h)throw new Error("comparePoints got to case 4 and childA and childB are the same!");for(u=a.firstChild;u;){if(u===c)return-1;if(u===h)return 1;u=u.nextSibling}throw new Error("Should not be here!")}function b(e){for(var t,n=d(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function w(e){if(!e)return"[No node]";if(c(e))return'"'+e.data+'"';if(1==e.nodeType){var t=e.id?' id="'+e.id+'"':"";return"<"+e.nodeName+t+">["+e.childNodes.length+"]"}return e.nodeName}function _(e){this.root=e,this._next=e}function x(e){return new _(e)}function C(e,t){this.node=e,this.offset=t}function T(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var E="undefined",k=e.util;k.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),k.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var N=document.createElement("div");k.areHostMethods(N,["insertBefore","appendChild","cloneNode"]||!k.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),k.isHostProperty(N,"innerHTML")||t.fail("Element is missing innerHTML property");var A=document.createTextNode("test");k.areHostMethods(A,["splitText","deleteData","insertData","appendData","cloneNode"]||!k.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"])||!k.areHostProperties(A,["data"]))||t.fail("Incomplete Text Node implementation");var S=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1};_.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},C.prototype={equals:function(e){return this.node===e.node&this.offset==e.offset},inspect:function(){return"[DomPosition("+w(this.node)+":"+this.offset+")]"}},T.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11},T.prototype.toString=function(){return this.message},e.dom={arrayContains:S,isHtmlNamespace:n,parentElement:i,getNodeIndex:r,getNodeLength:s,getCommonAncestor:o,isAncestorOf:a,getClosestAncestorIn:l,isCharacterDataNode:c,insertAfter:h,splitDataNode:u,getDocument:d,getWindow:f,getIframeWindow:g,getIframeDocument:p,getBody:m,getRootContainer:y,comparePoints:v,inspectNode:w,fragmentFromNodeChildren:b,createIterator:x,DomPosition:C},e.DOMException=T}),rangy.createModule("DomRange",function(e){function t(e,t){return 3!=e.nodeType&&(F.isAncestorOf(e,t.startContainer,!0)||F.isAncestorOf(e,t.endContainer,!0))}function n(e){return F.getDocument(e.startContainer)}function i(e,t,n){var i=e._listeners[t];if(i)for(var r=0,s=i.length;s>r;++r)i[r].call(e,{target:e,args:n})}function r(e){return new I(e.parentNode,F.getNodeIndex(e))}function s(e){return new I(e.parentNode,F.getNodeIndex(e)+1)}function o(e,t,n){var i=11==e.nodeType?e.firstChild:e;return F.isCharacterDataNode(t)?n==t.length?F.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:F.splitDataNode(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),i}function a(e){for(var t,i,r,s=n(e.range).createDocumentFragment();i=e.next();){if(t=e.isPartiallySelectedSubtree(),i=i.cloneNode(!t),t&&(r=e.getSubtreeIterator(),i.appendChild(a(r)),r.detach(!0)),10==i.nodeType)throw new H("HIERARCHY_REQUEST_ERR");s.appendChild(i)}return s}function l(e,t,n){var i,r;n=n||{stop:!1};for(var s,o;s=e.next();)if(e.isPartiallySelectedSubtree()){if(t(s)===!1)return n.stop=!0,void 0;if(o=e.getSubtreeIterator(),l(o,t,n),o.detach(!0),n.stop)return}else for(i=F.createIterator(s);r=i.next();)if(t(r)===!1)return n.stop=!0,void 0}function c(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(t=e.getSubtreeIterator(),c(t),t.detach(!0)):e.remove()}function h(e){for(var t,i,r=n(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),i=e.getSubtreeIterator(),t.appendChild(h(i)),i.detach(!0)):e.remove(),10==t.nodeType)throw new H("HIERARCHY_REQUEST_ERR");r.appendChild(t)}return r}function u(e,t,n){var i,r=!(!t||!t.length),s=!!n;r&&(i=new RegExp("^("+t.join("|")+")$"));var o=[];return l(new f(e,!1),function(e){r&&!i.test(e.nodeType)||s&&!n(e)||o.push(e)}),o}function d(e){var t="undefined"==typeof e.getName?"Range":e.getName();return"["+t+"("+F.inspectNode(e.startContainer)+":"+e.startOffset+", "+F.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function f(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&F.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||F.isCharacterDataNode(this.sc)?F.getClosestAncestorIn(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||F.isCharacterDataNode(this.ec)?F.getClosestAncestorIn(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function p(e){this.code=this[e],this.codeName=e,this.message="RangeException: "+this.codeName}function g(e,t,n){this.nodes=u(e,t,n),this._next=this.nodes[0],this._position=0}function m(e){return function(t,n){for(var i,r=n?t:t.parentNode;r;){if(i=r.nodeType,F.arrayContains(e,i))return r;r=r.parentNode}return null}}function y(e,t){if(V(e,t))throw new p("INVALID_NODE_TYPE_ERR")}function v(e){if(!e.startContainer)throw new H("INVALID_STATE_ERR")}function b(e,t){if(!F.arrayContains(t,e.nodeType))throw new p("INVALID_NODE_TYPE_ERR")}function w(e,t){if(0>t||t>(F.isCharacterDataNode(e)?e.length:e.childNodes.length))throw new H("INDEX_SIZE_ERR")}function _(e,t){if(W(e,!0)!==W(t,!0))throw new H("WRONG_DOCUMENT_ERR")}function x(e){if(U(e,!0))throw new H("NO_MODIFICATION_ALLOWED_ERR")}function C(e,t){if(!e)throw new H(t)}function T(e){return!F.arrayContains(P,e.nodeType)&&!W(e,!0)}function E(e,t){return(F.isCharacterDataNode(e)?e.length:e.childNodes.length)>=t}function k(e){if(v(e),T(e.startContainer)||T(e.endContainer)||!E(e.startContainer,e.startOffset)||!E(e.endContainer,e.endOffset))throw new Error("Range error: Range is no longer valid after DOM mutation ("+e.inspect()+")")}function N(){}function A(e){e.START_TO_START=J,e.START_TO_END=et,e.END_TO_END=tt,e.END_TO_START=nt,e.NODE_BEFORE=it,e.NODE_AFTER=rt,e.NODE_BEFORE_AND_AFTER=st,e.NODE_INSIDE=ot}function S(e){A(e),A(e.prototype)}function D(e,t){return function(){k(this);var n,i,r=this.startContainer,o=this.startOffset,a=this.commonAncestorContainer,c=new f(this,!0);r!==a&&(n=F.getClosestAncestorIn(r,a,!0),i=s(n),r=i.node,o=i.offset),l(c,x),c.reset();var h=e(c);return c.detach(),t(this,r,o,r,o),h}}function M(n,i,o){function a(e,t){return function(n){v(this),b(n,j),b($(n),P);var i=(e?r:s)(n);(t?l:u)(this,i.node,i.offset)}}function l(e,t,n){var r=e.endContainer,s=e.endOffset;(t!==e.startContainer||n!==e.startOffset)&&(($(t)!=$(r)||1==F.comparePoints(t,n,r,s))&&(r=t,s=n),i(e,t,n,r,s))}function u(e,t,n){var r=e.startContainer,s=e.startOffset;(t!==e.endContainer||n!==e.endOffset)&&(($(t)!=$(r)||-1==F.comparePoints(t,n,r,s))&&(r=t,s=n),i(e,r,s,t,n))}function d(e,t,n){(t!==e.startContainer||n!==e.startOffset||t!==e.endContainer||n!==e.endOffset)&&i(e,t,n,t,n)}n.prototype=new N,e.util.extend(n.prototype,{setStart:function(e,t){v(this),y(e,!0),w(e,t),l(this,e,t)},setEnd:function(e,t){v(this),y(e,!0),w(e,t),u(this,e,t)},setStartBefore:a(!0,!0),setStartAfter:a(!1,!0),setEndBefore:a(!0,!1),setEndAfter:a(!1,!1),collapse:function(e){k(this),e?i(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):i(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){v(this),y(e,!0),i(this,e,0,e,F.getNodeLength(e))},selectNode:function(e){v(this),y(e,!1),b(e,j);var t=r(e),n=s(e);i(this,t.node,t.offset,n.node,n.offset)},extractContents:D(h,i),deleteContents:D(c,i),canSurroundContents:function(){k(this),x(this.startContainer),x(this.endContainer);var e=new f(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},detach:function(){o(this)},splitBoundaries:function(){k(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,r=this.endOffset,s=e===n;F.isCharacterDataNode(n)&&r>0&&n.length>r&&F.splitDataNode(n,r),F.isCharacterDataNode(e)&&t>0&&e.length>t&&(e=F.splitDataNode(e,t),s?(r-=t,n=e):n==e.parentNode&&r>=F.getNodeIndex(e)&&r++,t=0),i(this,e,t,n,r)},normalizeBoundaries:function(){k(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,r=this.endOffset,s=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(n=e,r=e.length,e.appendData(t.data),t.parentNode.removeChild(t))},o=function(i){var s=i.previousSibling;if(s&&s.nodeType==i.nodeType){e=i;var o=i.length;if(t=s.length,i.insertData(0,s.data),s.parentNode.removeChild(s),e==n)r+=t,n=e;else if(n==i.parentNode){var a=F.getNodeIndex(i);r==a?(n=i,r=o):r>a&&r--}}},a=!0;if(F.isCharacterDataNode(n))n.length==r&&s(n);else{if(r>0){var l=n.childNodes[r-1];l&&F.isCharacterDataNode(l)&&s(l)}a=!this.collapsed}if(a){if(F.isCharacterDataNode(e))0==t&&o(e);else if(e.childNodes.length>t){var c=e.childNodes[t];c&&F.isCharacterDataNode(c)&&o(c)}}else e=n,t=r;i(this,e,t,n,r)},collapseToPoint:function(e,t){v(this),y(e,!0),w(e,t),d(this,e,t)}}),S(n)}function R(e){e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset,e.commonAncestorContainer=e.collapsed?e.startContainer:F.getCommonAncestor(e.startContainer,e.endContainer)}function L(e,t,n,r,s){var o=e.startContainer!==t||e.startOffset!==n,a=e.endContainer!==r||e.endOffset!==s;e.startContainer=t,e.startOffset=n,e.endContainer=r,e.endOffset=s,R(e),i(e,"boundarychange",{startMoved:o,endMoved:a})}function z(e){v(e),e.startContainer=e.startOffset=e.endContainer=e.endOffset=null,e.collapsed=e.commonAncestorContainer=null,i(e,"detach",null),e._listeners=null}function O(e){this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=0,this._listeners={boundarychange:[],detach:[]},R(this)}e.requireModules(["DomUtil"]);var F=e.dom,I=F.DomPosition,H=e.DOMException;f.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var e=this._current=this._next;return e&&(this._next=e!==this._last?e.nextSibling:null,F.isCharacterDataNode(e)&&this.clonePartiallySelectedTextNodes&&(e===this.ec&&(e=e.cloneNode(!0)).deleteData(this.eo,e.length-this.eo),this._current===this.sc&&(e=e.cloneNode(!0)).deleteData(0,this.so))),e},remove:function(){var e,t,n=this._current;!F.isCharacterDataNode(n)||n!==this.sc&&n!==this.ec?n.parentNode&&n.parentNode.removeChild(n):(e=n===this.sc?this.so:0,t=n===this.ec?this.eo:n.length,e!=t&&n.deleteData(e,t-e))},isPartiallySelectedSubtree:function(){var e=this._current;return t(e,this.range)},getSubtreeIterator:function(){var e;if(this.isSingleCharacterDataNode)e=this.range.cloneRange(),e.collapse();else{e=new O(n(this.range));var t=this._current,i=t,r=0,s=t,o=F.getNodeLength(t);F.isAncestorOf(t,this.sc,!0)&&(i=this.sc,r=this.so),F.isAncestorOf(t,this.ec,!0)&&(s=this.ec,o=this.eo),L(e,i,r,s,o)}return new f(e,this.clonePartiallySelectedTextNodes)},detach:function(e){e&&this.range.detach(),this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}},p.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2},p.prototype.toString=function(){return this.message},g.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){return this._current=this._next,this._next=this.nodes[++this._position],this._current},detach:function(){this._current=this._next=this.nodes=null}};var j=[1,3,4,5,7,8,10],P=[2,9,11],B=[5,6,10,12],q=[1,3,4,5,7,8,10,11],Z=[1,3,4,5,7,8],$=F.getRootContainer,W=m([9,11]),U=m(B),V=m([6,10,12]),X=document.createElement("style"),Y=!1;try{X.innerHTML="<b>x</b>",Y=3==X.firstChild.nodeType}catch(G){}e.features.htmlParsingConforms=Y;var K=Y?function(e){var t=this.startContainer,n=F.getDocument(t);if(!t)throw new H("INVALID_STATE_ERR");var i=null;return 1==t.nodeType?i=t:F.isCharacterDataNode(t)&&(i=F.parentElement(t)),i=null===i||"HTML"==i.nodeName&&F.isHtmlNamespace(F.getDocument(i).documentElement)&&F.isHtmlNamespace(i)?n.createElement("body"):i.cloneNode(!1),i.innerHTML=e,F.fragmentFromNodeChildren(i)}:function(e){v(this);var t=n(this),i=t.createElement("body");return i.innerHTML=e,F.fragmentFromNodeChildren(i)},Q=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],J=0,et=1,tt=2,nt=3,it=0,rt=1,st=2,ot=3;N.prototype={attachListener:function(e,t){this._listeners[e].push(t)},compareBoundaryPoints:function(e,t){k(this),_(this.startContainer,t.startContainer);var n,i,r,s,o=e==nt||e==J?"start":"end",a=e==et||e==J?"start":"end";return n=this[o+"Container"],i=this[o+"Offset"],r=t[a+"Container"],s=t[a+"Offset"],F.comparePoints(n,i,r,s)},insertNode:function(e){if(k(this),b(e,q),x(this.startContainer),F.isAncestorOf(e,this.startContainer,!0))throw new H("HIERARCHY_REQUEST_ERR");var t=o(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){k(this);var e,t;if(this.collapsed)return n(this).createDocumentFragment();if(this.startContainer===this.endContainer&&F.isCharacterDataNode(this.startContainer))return e=this.startContainer.cloneNode(!0),e.data=e.data.slice(this.startOffset,this.endOffset),t=n(this).createDocumentFragment(),t.appendChild(e),t;var i=new f(this,!0);return e=a(i),i.detach(),e},canSurroundContents:function(){k(this),x(this.startContainer),x(this.endContainer);var e=new f(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},surroundContents:function(e){if(b(e,Z),!this.canSurroundContents())throw new p("BAD_BOUNDARYPOINTS_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);o(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){k(this);for(var e,t=new O(n(this)),i=Q.length;i--;)e=Q[i],t[e]=this[e];return t},toString:function(){k(this);var e=this.startContainer;if(e===this.endContainer&&F.isCharacterDataNode(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new f(this,!0);return l(n,function(e){(3==e.nodeType||4==e.nodeType)&&t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){k(this);var t=e.parentNode,n=F.getNodeIndex(e);if(!t)throw new H("NOT_FOUND_ERR");var i=this.comparePoint(t,n),r=this.comparePoint(t,n+1);return 0>i?r>0?st:it:r>0?rt:ot},comparePoint:function(e,t){return k(this),C(e,"HIERARCHY_REQUEST_ERR"),_(e,this.startContainer),0>F.comparePoints(e,t,this.startContainer,this.startOffset)?-1:F.comparePoints(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:K,toHtml:function(){k(this);var e=n(this).createElement("div");return e.appendChild(this.cloneContents()),e.innerHTML},intersectsNode:function(e,t){if(k(this),C(e,"NOT_FOUND_ERR"),F.getDocument(e)!==n(this))return!1;var i=e.parentNode,r=F.getNodeIndex(e);C(i,"NOT_FOUND_ERR");var s=F.comparePoints(i,r,this.endContainer,this.endOffset),o=F.comparePoints(i,r+1,this.startContainer,this.startOffset);return t?0>=s&&o>=0:0>s&&o>0},isPointInRange:function(e,t){return k(this),C(e,"HIERARCHY_REQUEST_ERR"),_(e,this.startContainer),F.comparePoints(e,t,this.startContainer,this.startOffset)>=0&&0>=F.comparePoints(e,t,this.endContainer,this.endOffset)},intersectsRange:function(e,t){if(k(this),n(e)!=n(this))throw new H("WRONG_DOCUMENT_ERR");var i=F.comparePoints(this.startContainer,this.startOffset,e.endContainer,e.endOffset),r=F.comparePoints(this.endContainer,this.endOffset,e.startContainer,e.startOffset);return t?0>=i&&r>=0:0>i&&r>0},intersection:function(e){if(this.intersectsRange(e)){var t=F.comparePoints(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=F.comparePoints(this.endContainer,this.endOffset,e.endContainer,e.endOffset),i=this.cloneRange();return-1==t&&i.setStart(e.startContainer,e.startOffset),1==n&&i.setEnd(e.endContainer,e.endOffset),i}return null},union:function(e){if(this.intersectsRange(e,!0)){var t=this.cloneRange();return-1==F.comparePoints(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==F.comparePoints(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new p("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==ot},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&0>=this.comparePoint(e,F.getNodeLength(e))},containsRange:function(e){return this.intersection(e).equals(e)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var i=n.pop();t.setEnd(i,i.length);var r=this.containsRange(t);return t.detach(),r}return this.containsNodeContents(e)},createNodeIterator:function(e,t){return k(this),new g(this,e,t)},getNodes:function(e,t){return k(this),u(this,e,t)},getDocument:function(){return n(this)},collapseBefore:function(e){v(this),this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){v(this),this.setStartAfter(e),this.collapse(!0)},getName:function(){return"DomRange"},equals:function(e){return O.rangesEqual(this,e)},inspect:function(){return d(this)}},M(O,L,z),e.rangePrototype=N.prototype,O.rangeProperties=Q,O.RangeIterator=f,O.copyComparisonConstants=S,O.createPrototypeRange=M,O.inspect=d,O.getRangeDocument=n,O.rangesEqual=function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},e.DomRange=O,e.RangeException=p}),rangy.createModule("WrappedRange",function(e){function t(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var i=n.parentElement();n=e.duplicate(),n.collapse(!1);var r=n.parentElement(),s=i==r?i:o.getCommonAncestor(i,r);return s==t?s:o.getCommonAncestor(t,s)}function n(e){return 0==e.compareEndPoints("StartToEnd",e)}function i(e,t,n,i){var r=e.duplicate();r.collapse(n);var s=r.parentElement();if(o.isAncestorOf(t,s,!0)||(s=t),!s.canHaveHTML)return new a(s.parentNode,o.getNodeIndex(s));var l,c,h,u,d,f=o.getDocument(s).createElement("span"),p=n?"StartToStart":"StartToEnd";do s.insertBefore(f,f.previousSibling),r.moveToElementText(f);while((l=r.compareEndPoints(p,e))>0&&f.previousSibling);if(d=f.nextSibling,-1==l&&d&&o.isCharacterDataNode(d)){r.setEndPoint(n?"EndToStart":"EndToEnd",e);var g;if(/[\r\n]/.test(d.data)){var m=r.duplicate(),y=m.text.replace(/\r\n/g,"\r").length;for(g=m.moveStart("character",y);-1==(l=m.compareEndPoints("StartToEnd",m));)g++,m.moveStart("character",1)}else g=r.text.length;u=new a(d,g)}else c=(i||!n)&&f.previousSibling,h=(i||n)&&f.nextSibling,u=h&&o.isCharacterDataNode(h)?new a(h,0):c&&o.isCharacterDataNode(c)?new a(c,c.length):new a(s,o.getNodeIndex(f));return f.parentNode.removeChild(f),u}function r(e,t){var n,i,r,s,a=e.offset,l=o.getDocument(e.node),c=l.body.createTextRange(),h=o.isCharacterDataNode(e.node);return h?(n=e.node,i=n.parentNode):(s=e.node.childNodes,n=s.length>a?s[a]:null,i=e.node),r=l.createElement("span"),r.innerHTML="&#feff;",n?i.insertBefore(r,n):i.appendChild(r),c.moveToElementText(r),c.collapse(!t),i.removeChild(r),h&&c[t?"moveStart":"moveEnd"]("character",a),c}e.requireModules(["DomUtil","DomRange"]);var s,o=e.dom,a=o.DomPosition,l=e.DomRange;if(!e.features.implementsDomRange||e.features.implementsTextRange&&e.config.preferTextRange){if(e.features.implementsTextRange){s=function(e){this.textRange=e,this.refresh()},s.prototype=new l(document),s.prototype.refresh=function(){var e,r,s=t(this.textRange);n(this.textRange)?r=e=i(this.textRange,s,!0,!0):(e=i(this.textRange,s,!0,!1),r=i(this.textRange,s,!1,!1)),this.setStart(e.node,e.offset),this.setEnd(r.node,r.offset)},l.copyComparisonConstants(s);var c=function(){return this}();"undefined"==typeof c.Range&&(c.Range=s),e.createNativeRange=function(e){return e=e||document,e.body.createTextRange()}}}else(function(){function t(e){for(var t,n=h.length;n--;)t=h[n],e[t]=e.nativeRange[t]}function n(e,t,n,i,r){var s=e.startContainer!==t||e.startOffset!=n,o=e.endContainer!==i||e.endOffset!=r;(s||o)&&(e.setEnd(i,r),e.setStart(t,n))}function i(e){e.nativeRange.detach(),e.detached=!0;for(var t,n=h.length;n--;)t=h[n],e[t]=null}var r,a,c,h=l.rangeProperties;s=function(e){if(!e)throw new Error("Range must be specified");this.nativeRange=e,t(this)},l.createPrototypeRange(s,n,i),r=s.prototype,r.selectNode=function(e){this.nativeRange.selectNode(e),t(this)},r.deleteContents=function(){this.nativeRange.deleteContents(),t(this)},r.extractContents=function(){var e=this.nativeRange.extractContents();return t(this),e},r.cloneContents=function(){return this.nativeRange.cloneContents()},r.surroundContents=function(e){this.nativeRange.surroundContents(e),t(this)},r.collapse=function(e){this.nativeRange.collapse(e),t(this)},r.cloneRange=function(){return new s(this.nativeRange.cloneRange())},r.refresh=function(){t(this)},r.toString=function(){return this.nativeRange.toString()};var u=document.createTextNode("test");o.getBody(document).appendChild(u);var d=document.createRange();d.setStart(u,0),d.setEnd(u,0);try{d.setStart(u,1),a=!0,r.setStart=function(e,n){this.nativeRange.setStart(e,n),t(this)},r.setEnd=function(e,n){this.nativeRange.setEnd(e,n),t(this)},c=function(e){return function(n){this.nativeRange[e](n),t(this)}}}catch(f){a=!1,r.setStart=function(e,n){try{this.nativeRange.setStart(e,n)}catch(i){this.nativeRange.setEnd(e,n),this.nativeRange.setStart(e,n)}t(this)},r.setEnd=function(e,n){try{this.nativeRange.setEnd(e,n)}catch(i){this.nativeRange.setStart(e,n),this.nativeRange.setEnd(e,n)}t(this)},c=function(e,n){return function(i){try{this.nativeRange[e](i)}catch(r){this.nativeRange[n](i),this.nativeRange[e](i)}t(this)}}}r.setStartBefore=c("setStartBefore","setEndBefore"),r.setStartAfter=c("setStartAfter","setEndAfter"),r.setEndBefore=c("setEndBefore","setStartBefore"),r.setEndAfter=c("setEndAfter","setStartAfter"),d.selectNodeContents(u),r.selectNodeContents=d.startContainer==u&&d.endContainer==u&&0==d.startOffset&&d.endOffset==u.length?function(e){this.nativeRange.selectNodeContents(e),t(this)}:function(e){this.setStart(e,0),this.setEnd(e,l.getEndOffset(e))},d.selectNodeContents(u),d.setEnd(u,3);var p=document.createRange();p.selectNodeContents(u),p.setEnd(u,4),p.setStart(u,2),r.compareBoundaryPoints=-1==d.compareBoundaryPoints(d.START_TO_END,p)&1==d.compareBoundaryPoints(d.END_TO_START,p)?function(e,t){return t=t.nativeRange||t,e==t.START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)},e.util.isHostMethod(d,"createContextualFragment")&&(r.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),o.getBody(document).removeChild(u),d.detach(),p.detach()})(),e.createNativeRange=function(e){return e=e||document,e.createRange()};e.features.implementsTextRange&&(s.rangeToTextRange=function(e){if(e.collapsed){var t=r(new a(e.startContainer,e.startOffset),!0);return t}var n=r(new a(e.startContainer,e.startOffset),!0),i=r(new a(e.endContainer,e.endOffset),!1),s=o.getDocument(e.startContainer).body.createTextRange();return s.setEndPoint("StartToStart",n),s.setEndPoint("EndToEnd",i),s}),s.prototype.getName=function(){return"WrappedRange"},e.WrappedRange=s,e.createRange=function(t){return t=t||document,new s(e.createNativeRange(t))},e.createRangyRange=function(e){return e=e||document,new l(e)},e.createIframeRange=function(t){return e.createRange(o.getIframeDocument(t))},e.createIframeRangyRange=function(t){return e.createRangyRange(o.getIframeDocument(t))},e.addCreateMissingNativeApiListener(function(t){var n=t.document;"undefined"==typeof n.createRange&&(n.createRange=function(){return e.createRange(this)}),n=t=null})}),rangy.createModule("WrappedSelection",function(e,t){function n(e){return(e||window).getSelection()}function i(e){return(e||window).document.selection}function r(e,t,n){var i=n?"end":"start",r=n?"start":"end";e.anchorNode=t[i+"Container"],e.anchorOffset=t[i+"Offset"],e.focusNode=t[r+"Container"],e.focusOffset=t[r+"Offset"]}function s(e){var t=e.nativeSelection;e.anchorNode=t.anchorNode,e.anchorOffset=t.anchorOffset,e.focusNode=t.focusNode,e.focusOffset=t.focusOffset}function o(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function a(t){var n;return t instanceof T?(n=t._selectionNativeRange,n||(n=e.createNativeRange(x.getDocument(t.startContainer)),n.setEnd(t.endContainer,t.endOffset),n.setStart(t.startContainer,t.startOffset),t._selectionNativeRange=n,t.attachListener("detach",function(){this._selectionNativeRange=null}))):t instanceof E?n=t.nativeRange:e.features.implementsDomRange&&t instanceof x.getWindow(t.startContainer).Range&&(n=t),n}function l(e){if(!e.length||1!=e[0].nodeType)return!1;for(var t=1,n=e.length;n>t;++t)if(!x.isAncestorOf(e[0],e[t]))return!1;return!0}function c(e){var t=e.getNodes();if(!l(t))throw new Error("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return t[0]}function h(e){return!!e&&"undefined"!=typeof e.text}function u(e,t){var n=new E(t);e._ranges=[n],r(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function d(t){if(t._ranges.length=0,"None"==t.docSelection.type)o(t);else{var n=t.docSelection.createRange();if(h(n))u(t,n);else{t.rangeCount=n.length;for(var i,s=x.getDocument(n.item(0)),a=0;t.rangeCount>a;++a)i=e.createRange(s),i.selectNode(n.item(a)),t._ranges.push(i);t.isCollapsed=1==t.rangeCount&&t._ranges[0].collapsed,r(t,t._ranges[t.rangeCount-1],!1)}}}function f(e,t){for(var n=e.docSelection.createRange(),i=c(t),r=x.getDocument(n.item(0)),s=x.getBody(r).createControlRange(),o=0,a=n.length;a>o;++o)s.add(n.item(o));try{s.add(i)}catch(l){throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}s.select(),d(e)}function p(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function g(e,t){for(var n,i=x.getDocument(t[0].startContainer),r=x.getBody(i).createControlRange(),s=0;rangeCount>s;++s){n=c(t[s]);try{r.add(n)}catch(o){throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")
|
||
}}r.select(),d(e)}function m(e,t){if(e.anchorNode&&x.getDocument(e.anchorNode)!==x.getDocument(t))throw new k("WRONG_DOCUMENT_ERR")}function y(e){var t=[],n=new N(e.anchorNode,e.anchorOffset),i=new N(e.focusNode,e.focusOffset),r="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var s=0,o=e.rangeCount;o>s;++s)t[s]=T.inspect(e.getRangeAt(s));return"["+r+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+i.inspect()+"]"}e.requireModules(["DomUtil","DomRange","WrappedRange"]),e.config.checkSelectionRanges=!0;var v,b,w="boolean",_="_rangySelection",x=e.dom,C=e.util,T=e.DomRange,E=e.WrappedRange,k=e.DOMException,N=x.DomPosition,A="Control",S=e.util.isHostMethod(window,"getSelection"),D=e.util.isHostObject(document,"selection"),M=D&&(!S||e.config.preferTextRange);M?(v=i,e.isSelectionValid=function(e){var t=(e||window).document,n=t.selection;return"None"!=n.type||x.getDocument(n.createRange().parentElement())==t}):S?(v=n,e.isSelectionValid=function(){return!0}):t.fail("Neither document.selection or window.getSelection() detected."),e.getNativeSelection=v;var R=v(),L=e.createNativeRange(document),z=x.getBody(document),O=C.areHostObjects(R,["anchorNode","focusNode"]&&C.areHostProperties(R,["anchorOffset","focusOffset"]));e.features.selectionHasAnchorAndFocus=O;var F=C.isHostMethod(R,"extend");e.features.selectionHasExtend=F;var I="number"==typeof R.rangeCount;e.features.selectionHasRangeCount=I;var H=!1,j=!0;C.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof R.rangeCount&&e.features.implementsDomRange&&function(){var e=document.createElement("iframe");z.appendChild(e);var t=x.getIframeDocument(e);t.open(),t.write("<html><head></head><body>12</body></html>"),t.close();var n=x.getIframeWindow(e).getSelection(),i=t.documentElement,r=i.lastChild,s=r.firstChild,o=t.createRange();o.setStart(s,1),o.collapse(!0),n.addRange(o),j=1==n.rangeCount,n.removeAllRanges();var a=o.cloneRange();o.setStart(s,0),a.setEnd(s,2),n.addRange(o),n.addRange(a),H=2==n.rangeCount,o.detach(),a.detach(),z.removeChild(e)}(),e.features.selectionSupportsMultipleRanges=H,e.features.collapsedNonEditableSelectionsSupported=j;var P,B=!1;z&&C.isHostMethod(z,"createControlRange")&&(P=z.createControlRange(),C.areHostProperties(P,["item","add"])&&(B=!0)),e.features.implementsControlRange=B,b=O?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return e.rangeCount?e.getRangeAt(e.rangeCount-1).collapsed:!1};var q;C.isHostMethod(R,"getRangeAt")?q=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:O&&(q=function(t){var n=x.getDocument(t.anchorNode),i=e.createRange(n);return i.setStart(t.anchorNode,t.anchorOffset),i.setEnd(t.focusNode,t.focusOffset),i.collapsed!==this.isCollapsed&&(i.setStart(t.focusNode,t.focusOffset),i.setEnd(t.anchorNode,t.anchorOffset)),i}),e.getSelection=function(e){e=e||window;var t=e[_],n=v(e),r=D?i(e):null;return t?(t.nativeSelection=n,t.docSelection=r,t.refresh(e)):(t=new p(n,r,e),e[_]=t),t},e.getIframeSelection=function(t){return e.getSelection(x.getIframeWindow(t))};var Z=p.prototype;if(!M&&O&&C.areHostMethods(R,["removeAllRanges","addRange"])){Z.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),o(this)};var $=function(t,n){var i=T.getRangeDocument(n),r=e.createRange(i);r.collapseToPoint(n.endContainer,n.endOffset),t.nativeSelection.addRange(a(r)),t.nativeSelection.extend(n.startContainer,n.startOffset),t.refresh()};Z.addRange=I?function(t,n){if(B&&D&&this.docSelection.type==A)f(this,t);else if(n&&F)$(this,t);else{var i;if(H?i=this.rangeCount:(this.removeAllRanges(),i=0),this.nativeSelection.addRange(a(t)),this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==i+1){if(e.config.checkSelectionRanges){var s=q(this.nativeSelection,this.rangeCount-1);s&&!T.rangesEqual(s,t)&&(t=new E(s))}this._ranges[this.rangeCount-1]=t,r(this,t,V(this.nativeSelection)),this.isCollapsed=b(this)}else this.refresh()}}:function(e,t){t&&F?$(this,e):(this.nativeSelection.addRange(a(e)),this.refresh())},Z.setRanges=function(e){if(B&&e.length>1)g(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;n>t;++t)this.addRange(e[t])}}}else{if(!(C.isHostMethod(R,"empty")&&C.isHostMethod(L,"select")&&B&&M))return t.fail("No means of selecting a Range or TextRange was found"),!1;Z.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=x.getDocument(this.anchorNode);else if(this.docSelection.type==A){var t=this.docSelection.createRange();t.length&&(e=x.getDocument(t.item(0)).body.createTextRange())}if(e){var n=e.body.createTextRange();n.select(),this.docSelection.empty()}}}catch(i){}o(this)},Z.addRange=function(e){this.docSelection.type==A?f(this,e):(E.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,r(this,e,!1))},Z.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?g(this,e):t&&this.addRange(e[0])}}Z.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new k("INDEX_SIZE_ERR");return this._ranges[e]};var W;if(M)W=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=x.getBody(t.win.document).createTextRange(),n.collapse(!0)),t.docSelection.type==A?d(t):h(n)?u(t,n):o(t)};else if(C.isHostMethod(R,"getRangeAt")&&"number"==typeof R.rangeCount)W=function(t){if(B&&D&&t.docSelection.type==A)d(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,i=t.rangeCount;i>n;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));r(t,t._ranges[t.rangeCount-1],V(t.nativeSelection)),t.isCollapsed=b(t)}else o(t)};else{if(!O||typeof R.isCollapsed!=w||typeof L.collapsed!=w||!e.features.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;W=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=q(n,0),e._ranges=[t],e.rangeCount=1,s(e),e.isCollapsed=b(e)):o(e)}}Z.refresh=function(e){var t=e?this._ranges.slice(0):null;if(W(this),e){var n=t.length;if(n!=this._ranges.length)return!1;for(;n--;)if(!T.rangesEqual(t[n],this._ranges[n]))return!1;return!0}};var U=function(e,t){var n=e.getAllRanges(),i=!1;e.removeAllRanges();for(var r=0,s=n.length;s>r;++r)i||t!==n[r]?e.addRange(n[r]):i=!0;e.rangeCount||o(e)};Z.removeRange=B?function(e){if(this.docSelection.type==A){for(var t,n=this.docSelection.createRange(),i=c(e),r=x.getDocument(n.item(0)),s=x.getBody(r).createControlRange(),o=!1,a=0,l=n.length;l>a;++a)t=n.item(a),t!==i||o?s.add(n.item(a)):o=!0;s.select(),d(this)}else U(this,e)}:function(e){U(this,e)};var V;!M&&O&&e.features.implementsDomRange?(V=function(e){var t=!1;return e.anchorNode&&(t=1==x.comparePoints(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)),t},Z.isBackwards=function(){return V(this)}):V=Z.isBackwards=function(){return!1},Z.toString=function(){for(var e=[],t=0,n=this.rangeCount;n>t;++t)e[t]=""+this._ranges[t];return e.join("")},Z.collapse=function(t,n){m(this,t);var i=e.createRange(x.getDocument(t));i.collapseToPoint(t,n),this.removeAllRanges(),this.addRange(i),this.isCollapsed=!0},Z.collapseToStart=function(){if(!this.rangeCount)throw new k("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},Z.collapseToEnd=function(){if(!this.rangeCount)throw new k("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},Z.selectAllChildren=function(t){m(this,t);var n=e.createRange(x.getDocument(t));n.selectNodeContents(t),this.removeAllRanges(),this.addRange(n)},Z.deleteFromDocument=function(){if(B&&D&&this.docSelection.type==A){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),e.parentNode.removeChild(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();this.removeAllRanges();for(var i=0,r=n.length;r>i;++i)n[i].deleteContents();this.addRange(n[r-1])}},Z.getAllRanges=function(){return this._ranges.slice(0)},Z.setSingleRange=function(e){this.setRanges([e])},Z.containsNode=function(e,t){for(var n=0,i=this._ranges.length;i>n;++n)if(this._ranges[n].containsNode(e,t))return!0;return!1},Z.toHtml=function(){var e="";if(this.rangeCount){for(var t=T.getRangeDocument(this._ranges[0]).createElement("div"),n=0,i=this._ranges.length;i>n;++n)t.appendChild(this._ranges[n].cloneContents());e=t.innerHTML}return e},Z.getName=function(){return"WrappedSelection"},Z.inspect=function(){return y(this)},Z.detach=function(){this.win[_]=null,this.win=this.anchorNode=this.focusNode=null},p.inspect=y,e.Selection=p,e.selectionPrototype=Z,e.addCreateMissingNativeApiListener(function(t){"undefined"==typeof t.getSelection&&(t.getSelection=function(){return e.getSelection(this)}),t=null})});/*
|
||
Base.js, version 1.1a
|
||
Copyright 2006-2010, Dean Edwards
|
||
License: http://www.opensource.org/licenses/mit-license.php
|
||
*/
|
||
var Base=function(){};Base.extend=function(e,t){var n=Base.prototype.extend;Base._prototyping=!0;var i=new this;n.call(i,e),i.base=function(){},delete Base._prototyping;var r=i.constructor,s=i.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==s)this._constructing=!0,r.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||n).call(arguments[0],i)};return s.ancestor=this,s.extend=this.extend,s.forEach=this.forEach,s.implement=this.implement,s.prototype=i,s.toString=this.toString,s.valueOf=function(e){return"object"==e?s:r.valueOf()},n.call(s,t),"function"==typeof s.init&&s.init(),s},Base.prototype={extend:function(e,t){if(arguments.length>1){var n=this[e];if(n&&"function"==typeof t&&(!n.valueOf||n.valueOf()!=t.valueOf())&&/\bbase\b/.test(t)){var i=t.valueOf();t=function(){var e=this.base||Base.prototype.base;this.base=n;var t=i.apply(this,arguments);return this.base=e,t},t.valueOf=function(e){return"object"==e?t:i},t.toString=Base.toString}this[e]=t}else if(e){var r=Base.prototype.extend;Base._prototyping||"function"==typeof this||(r=this.extend||r);for(var s={toSource:null},o=["constructor","toString","valueOf"],a=Base._prototyping?0:1;l=o[a++];)e[l]!=s[l]&&r.call(this,l,e[l]);for(var l in e)s[l]||r.call(this,l,e[l])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(e,t,n){for(var i in e)void 0===this.prototype[i]&&t.call(n,e[i],i,e)},implement:function(){for(var e=0;arguments.length>e;e++)"function"==typeof arguments[e]?arguments[e](this.prototype):this.prototype.extend(arguments[e]);return this},toString:function(){return String(this.valueOf())}}),wysihtml5.browser=function(){function e(e){return(/ipad|iphone|ipod/.test(e)&&e.match(/ os (\d+).+? like mac os x/)||[,0])[1]}var t=navigator.userAgent,n=document.createElement("div"),i=-1!==t.indexOf("MSIE")&&-1===t.indexOf("Opera"),r=-1!==t.indexOf("Gecko")&&-1===t.indexOf("KHTML"),s=-1!==t.indexOf("AppleWebKit/"),o=-1!==t.indexOf("Chrome/"),a=-1!==t.indexOf("Opera/");return{USER_AGENT:t,supported:function(){var t=this.USER_AGENT.toLowerCase(),i="contentEditable"in n,r=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,s=document.querySelector&&document.querySelectorAll,o=this.isIos()&&5>e(t)||-1!==t.indexOf("opera mobi")||-1!==t.indexOf("hpwos/");return i&&r&&s&&!o},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){var e=this.USER_AGENT.toLowerCase();return-1!==e.indexOf("webkit")&&-1!==e.indexOf("mobile")},supportsSandboxedIframes:function(){return i},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return!r},hasCurrentStyleProperty:function(){return"currentStyle"in n},insertsLineBreaksOnReturn:function(){return r},supportsPlaceholderAttributeOn:function(e){return"placeholder"in e},supportsEvent:function(e){return"on"+e in n||function(){return n.setAttribute("on"+e,"return;"),"function"==typeof n["on"+e]}()},supportsEventsInIframeCorrectly:function(){return!a},firesOnDropOnlyWhenOnDragOverIsCancelled:function(){return s||r},supportsDataTransfer:function(){try{return s&&(window.Clipboard||window.DataTransfer).prototype.getData}catch(e){return!1}},supportsHTML5Tags:function(e){var t=e.createElement("div"),n="<article>foo</article>";return t.innerHTML=n,t.innerHTML.toLowerCase()===n},supportsCommand:function(){var e={formatBlock:i,insertUnorderedList:i||a||s,insertOrderedList:i||a||s},t={insertHTML:r};return function(n,i){var r=e[i];if(!r){try{return n.queryCommandSupported(i)}catch(s){}try{return n.queryCommandEnabled(i)}catch(o){return!!t[i]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return i},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return r||a||s},supportsGetAttributeCorrectly:function(){var e=document.createElement("td");return"1"!=e.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return r||i||a},clearsListsInContentEditableCorrectly:function(){return r||i||s},autoScrollsToCaret:function(){return!s},autoClosesUnclosedTags:function(){var e,t,i=n.cloneNode(!1);return i.innerHTML="<p><div></div>",t=i.innerHTML.toLowerCase(),e="<p></p><div></div>"===t||"<p><div></div></p>"===t,this.autoClosesUnclosedTags=function(){return e},e},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},supportsClassList:function(){return"classList"in n},needsSpaceAfterLineBreak:function(){return a},supportsSpeechApiOn:function(e){var n=t.match(/Chrome\/(\d+)/)||[,0];return n[1]>=11&&("onwebkitspeechchange"in e||"speech"in e)},crashesWhenDefineProperty:function(e){return i&&("XMLHttpRequest"===e||"XDomainRequest"===e)},doesAsyncFocus:function(){return i},hasProblemsSettingCaretAfterImg:function(){return i},hasUndoInContextMenu:function(){return r||o||a}}}(),wysihtml5.lang.array=function(e){return{contains:function(t){if(e.indexOf)return-1!==e.indexOf(t);for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return!0;return!1},without:function(t){t=wysihtml5.lang.array(t);for(var n=[],i=0,r=e.length;r>i;i++)t.contains(e[i])||n.push(e[i]);return n},get:function(){for(var t=0,n=e.length,i=[];n>t;t++)i.push(e[t]);return i}}},wysihtml5.lang.Dispatcher=Base.extend({observe:function(e,t){return this.events=this.events||{},this.events[e]=this.events[e]||[],this.events[e].push(t),this},on:function(){return this.observe.apply(this,wysihtml5.lang.array(arguments).get())},fire:function(e,t){this.events=this.events||{};for(var n=this.events[e]||[],i=0;n.length>i;i++)n[i].call(this,t);return this},stopObserving:function(e,t){this.events=this.events||{};var n,i,r=0;if(e){for(n=this.events[e]||[],i=[];n.length>r;r++)n[r]!==t&&t&&i.push(n[r]);this.events[e]=i}else this.events={};return this}}),wysihtml5.lang.object=function(e){return{merge:function(t){for(var n in t)e[n]=t[n];return this},get:function(){return e},clone:function(){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(){return"[object Array]"===Object.prototype.toString.call(e)}}},function(){var e=/^\s+/,t=/\s+$/;wysihtml5.lang.string=function(n){return n=String(n),{trim:function(){return n.replace(e,"").replace(t,"")},interpolate:function(e){for(var t in e)n=this.replace("#{"+t+"}").by(e[t]);return n},replace:function(e){return{by:function(t){return n.split(e).join(t)}}}}}}(),function(e){function t(e){return s(e)?e:(e===e.ownerDocument.documentElement&&(e=e.ownerDocument.body),o(e))}function n(e){return e.replace(l,function(e,t){var n=(t.match(c)||[])[1]||"",i=u[n];t=t.replace(c,""),t.split(i).length>t.split(n).length&&(t+=n,n="");var r=t,s=t;return t.length>h&&(s=s.substr(0,h)+"..."),"www."===r.substr(0,4)&&(r="http://"+r),'<a href="'+r+'">'+s+"</a>"+n})}function i(e){var t=e._wysihtml5_tempElement;return t||(t=e._wysihtml5_tempElement=e.createElement("div")),t}function r(e){var t=e.parentNode,r=i(t.ownerDocument);for(r.innerHTML="<span></span>"+n(e.data),r.removeChild(r.firstChild);r.firstChild;)t.insertBefore(r.firstChild,e);t.removeChild(e)}function s(e){for(var t;e.parentNode;){if(e=e.parentNode,t=e.nodeName,a.contains(t))return!0;if("body"===t)return!1}return!1}function o(t){if(!a.contains(t.nodeName)){if(t.nodeType===e.TEXT_NODE&&t.data.match(l))return r(t),void 0;for(var n=e.lang.array(t.childNodes).get(),i=n.length,s=0;i>s;s++)o(n[s]);return t}}var a=e.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),l=/((https?:\/\/|www\.)[^\s<]{3,})/gi,c=/([^\w\/\-](,?))$/i,h=100,u={")":"(","]":"[","}":"{"};e.dom.autoLink=t,e.dom.autoLink.URL_REG_EXP=l}(wysihtml5),function(e){var t=e.browser.supportsClassList(),n=e.dom;n.addClass=function(e,i){return t?e.classList.add(i):(n.hasClass(e,i)||(e.className+=" "+i),void 0)},n.removeClass=function(e,n){return t?e.classList.remove(n):(e.className=e.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," "),void 0)},n.hasClass=function(e,n){if(t)return e.classList.contains(n);var i=e.className;return i.length>0&&(i==n||new RegExp("(^|\\s)"+n+"(\\s|$)").test(i))}}(wysihtml5),wysihtml5.dom.contains=function(){var e=document.documentElement;return e.contains?function(e,t){return t.nodeType!==wysihtml5.ELEMENT_NODE&&(t=t.parentNode),e!==t&&e.contains(t)}:e.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:void 0}(),wysihtml5.dom.convertToList=function(){function e(e,t){var n=e.createElement("li");return t.appendChild(n),n}function t(e,t){return e.createElement(t)}function n(n,i){if("UL"===n.nodeName||"OL"===n.nodeName||"MENU"===n.nodeName)return n;var r,s,o,a,l,c,h,u,d,f=n.ownerDocument,p=t(f,i),g=n.querySelectorAll("br"),m=g.length;for(d=0;m>d;d++)for(a=g[d];(l=a.parentNode)&&l!==n&&l.lastChild===a;){if("block"===wysihtml5.dom.getStyle("display").from(l)){l.removeChild(a);break}wysihtml5.dom.insert(a).after(a.parentNode)}for(r=wysihtml5.lang.array(n.childNodes).get(),s=r.length,d=0;s>d;d++)u=u||e(f,p),o=r[d],c="block"===wysihtml5.dom.getStyle("display").from(o),h="BR"===o.nodeName,c?(u=u.firstChild?e(f,p):u,u.appendChild(o),u=null):h?u=u.firstChild?null:u:u.appendChild(o);return n.parentNode.replaceChild(p,n),p}return n}(),wysihtml5.dom.copyAttributes=function(e){return{from:function(t){return{to:function(n){for(var i,r=0,s=e.length;s>r;r++)i=e[r],"undefined"!=typeof t[i]&&""!==t[i]&&(n[i]=t[i]);return{andTo:arguments.callee}}}}}},function(e){var t=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],n=function(t){return i(t)?parseInt(e.getStyle("width").from(t),10)<t.offsetWidth:!1},i=function(n){for(var i=0,r=t.length;r>i;i++)if("border-box"===e.getStyle(t[i]).from(n))return t[i]};e.copyStyles=function(i){return{from:function(r){n(r)&&(i=wysihtml5.lang.array(i).without(t));for(var s,o="",a=i.length,l=0;a>l;l++)s=i[l],o+=s+":"+e.getStyle(s).from(r)+";";return{to:function(t){return e.setStyles(o).on(t),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(e){e.dom.delegate=function(t,n,i,r){return e.dom.observe(t,i,function(i){for(var s=i.target,o=e.lang.array(t.querySelectorAll(n));s&&s!==t;){if(o.contains(s)){r.call(s,i);break}s=s.parentNode}})}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var e=function(e,t){var n=t.createElement("div");n.style.display="none",t.body.appendChild(n);try{n.innerHTML=e}catch(i){}return t.body.removeChild(n),n},t=function(e){if(!e._wysihtml5_supportsHTML5Tags){for(var t=0,i=n.length;i>t;t++)e.createElement(n[t]);e._wysihtml5_supportsHTML5Tags=!0}},n=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(n,i){i=i||document;var r;return"object"==typeof n&&n.nodeType?(r=i.createElement("div"),r.appendChild(n)):wysihtml5.browser.supportsHTML5Tags(i)?(r=i.createElement("div"),r.innerHTML=n):(t(i),r=e(n,i)),r}}(),wysihtml5.dom.getParentElement=function(){function e(e,t){return t&&t.length?"string"==typeof t?e===t:wysihtml5.lang.array(t).contains(e):!0}function t(e){return e.nodeType===wysihtml5.ELEMENT_NODE}function n(e,t,n){var i=(e.className||"").match(n)||[];return t?i[i.length-1]===t:!!i.length}function i(t,n,i){for(;i--&&t&&"BODY"!==t.nodeName;){if(e(t.nodeName,n))return t;t=t.parentNode}return null}function r(i,r,s,o,a){for(;a--&&i&&"BODY"!==i.nodeName;){if(t(i)&&e(i.nodeName,r)&&n(i,s,o))return i;i=i.parentNode}return null}return function(e,t,n){return n=n||50,t.className||t.classRegExp?r(e,t.nodeName,t.className,t.classRegExp,n):i(e,t.nodeName,n)}}(),wysihtml5.dom.getStyle=function(){function e(e){return e.replace(n,function(e){return e.charAt(1).toUpperCase()})}var t={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},n=/\-[a-z]/g;return function(n){return{from:function(i){if(i.nodeType===wysihtml5.ELEMENT_NODE){var r=i.ownerDocument,s=t[n]||e(n),o=i.style,a=i.currentStyle,l=o[s];if(l)return l;if(a)try{return a[s]}catch(c){}var h,u,d=r.defaultView||r.parentWindow,f=("height"===n||"width"===n)&&"TEXTAREA"===i.nodeName;return d.getComputedStyle?(f&&(h=o.overflow,o.overflow="hidden"),u=d.getComputedStyle(i,null).getPropertyValue(n),f&&(o.overflow=h||""),u):void 0}}}}}(),wysihtml5.dom.hasElementWithTagName=function(){function e(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=n++)}var t={},n=1;return function(n,i){var r=e(n)+":"+i,s=t[r];return s||(s=t[r]=n.getElementsByTagName(i)),s.length>0}}(),function(e){function t(e){return e._wysihtml5_identifier||(e._wysihtml5_identifier=i++)}var n={},i=1;e.dom.hasElementWithClassName=function(i,r){if(!e.browser.supportsNativeGetElementsByClassName())return!!i.querySelector("."+r);var s=t(i)+":"+r,o=n[s];return o||(o=n[s]=i.getElementsByClassName(r)),o.length>0}}(wysihtml5),wysihtml5.dom.insert=function(e){return{after:function(t){t.parentNode.insertBefore(e,t.nextSibling)},before:function(t){t.parentNode.insertBefore(e,t)},into:function(t){t.appendChild(e)}}},wysihtml5.dom.insertCSS=function(e){return e=e.join("\n"),{into:function(t){var n=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),n&&n.appendChild(i)}}},wysihtml5.dom.observe=function(e,t,n){t="string"==typeof t?[t]:t;for(var i,r,s=0,o=t.length;o>s;s++)r=t[s],e.addEventListener?e.addEventListener(r,n,!1):(i=function(t){"target"in t||(t.target=t.srcElement),t.preventDefault=t.preventDefault||function(){this.returnValue=!1},t.stopPropagation=t.stopPropagation||function(){this.cancelBubble=!0},n.call(e,t)},e.attachEvent("on"+r,i));return{stop:function(){for(var r,s=0,o=t.length;o>s;s++)r=t[s],e.removeEventListener?e.removeEventListener(r,n,!1):e.detachEvent("on"+r,i)}}},wysihtml5.dom.parse=function(){function e(e,n,i,r){wysihtml5.lang.object(u).merge(h).merge(n).get(),i=i||e.ownerDocument||document;var s,o,a,l=i.createDocumentFragment(),c="string"==typeof e;for(s=c?wysihtml5.dom.getAsDom(e,i):e;s.firstChild;)a=s.firstChild,s.removeChild(a),o=t(a,r),o&&l.appendChild(o);return s.innerHTML="",s.appendChild(l),c?wysihtml5.quirks.getCorrectInnerHTML(s):s}function t(e,n){var i,r=e.nodeType,s=e.childNodes,o=s.length,c=a[r],h=0;if(i=c&&c(e),!i)return null;for(h=0;o>h;h++)newChild=t(s[h],n),newChild&&i.appendChild(newChild);return n&&1>=i.childNodes.length&&i.nodeName.toLowerCase()===l&&!i.attributes.length?i.firstChild:i}function n(e){var t,n,r=u.tags,s=e.nodeName.toLowerCase(),o=e.scopeName;if(e._wysihtml5)return null;if(e._wysihtml5=1,"wysihtml5-temp"===e.className)return null;if(o&&"HTML"!=o&&(s=o+":"+s),"outerHTML"in e&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==e.nodeName||"</p>"===e.outerHTML.slice(-4).toLowerCase()||(s="div")),s in r){if(t=r[s],!t||t.remove)return null;t="string"==typeof t?{rename_tag:t}:t}else{if(!e.firstChild)return null;t={rename_tag:l}}return n=e.ownerDocument.createElement(t.rename_tag||s),i(e,n,t),e=null,n}function i(e,t,n){var i,s,o,a,l,h,d,g={},m=n.set_class,y=n.add_class,v=n.set_attributes,b=n.check_attributes,w=u.classes,_=0,x=[],C=[],T=[],E=[];if(v&&(g=wysihtml5.lang.object(v).clone()),b)for(l in b)d=f[b[l]],d&&(h=d(r(e,l)),"string"==typeof h&&(g[l]=h));if(m&&x.push(m),y)for(l in y)d=p[y[l]],d&&(a=d(r(e,l)),"string"==typeof a&&x.push(a));for(w["_wysihtml5-temp-placeholder"]=1,E=e.getAttribute("class"),E&&(x=x.concat(E.split(c))),i=x.length;i>_;_++)o=x[_],w[o]&&C.push(o);for(s=C.length;s--;)o=C[s],wysihtml5.lang.array(T).contains(o)||T.unshift(o);T.length&&(g["class"]=T.join(" "));for(l in g)try{t.setAttribute(l,g[l])}catch(k){}g.src&&("undefined"!=typeof g.width&&t.setAttribute("width",g.width),"undefined"!=typeof g.height&&t.setAttribute("height",g.height))}function r(e,t){t=t.toLowerCase();var n=e.nodeName;if("IMG"==n&&"src"==t&&s(e)===!0)return e.src;if(d&&"outerHTML"in e){var i=e.outerHTML.toLowerCase(),r=-1!=i.indexOf(" "+t+"=");return r?e.getAttribute(t):null}return e.getAttribute(t)}function s(e){try{return e.complete&&!e.mozMatchesSelector(":-moz-broken")}catch(t){if(e.complete&&"complete"===e.readyState)return!0}}function o(e){return e.ownerDocument.createTextNode(e.data)}var a={1:n,3:o},l="span",c=/\s+/,h={tags:{},classes:{}},u={},d=!wysihtml5.browser.supportsGetAttributeCorrectly(),f={url:function(){var e=/^https?:\/\//i;return function(t){return t&&t.match(e)?t.replace(e,function(e){return e.toLowerCase()}):null}}(),alt:function(){var e=/[^ a-z0-9_\-]/gi;return function(t){return t?t.replace(e,""):""}}(),numbers:function(){var e=/\D/g;return function(t){return t=(t||"").replace(e,""),t||null}}()},p={align_img:function(){var e={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(t){return e[String(t).toLowerCase()]}}(),align_text:function(){var e={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(t){return e[String(t).toLowerCase()]}}(),clear_br:function(){var e={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(t){return e[String(t).toLowerCase()]}}(),size_font:function(){var e={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(t){return e[String(t).charAt(0)]}}()};return e}(),wysihtml5.dom.removeEmptyTextNodes=function(e){for(var t,n=wysihtml5.lang.array(e.childNodes).get(),i=n.length,r=0;i>r;r++)t=n[r],t.nodeType===wysihtml5.TEXT_NODE&&""===t.data&&t.parentNode.removeChild(t)},wysihtml5.dom.renameElement=function(e,t){for(var n,i=e.ownerDocument.createElement(t);n=e.firstChild;)i.appendChild(n);return wysihtml5.dom.copyAttributes(["align","className"]).from(e).to(i),e.parentNode.replaceChild(i,e),i},wysihtml5.dom.replaceWithChildNodes=function(e){if(e.parentNode){if(!e.firstChild)return e.parentNode.removeChild(e),void 0;for(var t=e.ownerDocument.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e),e=t=null}},function(e){function t(t){return"block"===e.getStyle("display").from(t)}function n(e){return"BR"===e.nodeName}function i(e){var t=e.ownerDocument.createElement("br");e.appendChild(t)}function r(e){if("MENU"===e.nodeName||"UL"===e.nodeName||"OL"===e.nodeName){var r,s,o,a,l,c=e.ownerDocument,h=c.createDocumentFragment(),u=e.previousElementSibling||e.previousSibling;for(u&&!t(u)&&i(h);l=e.firstChild;){for(s=l.lastChild;r=l.firstChild;)o=r===s,a=o&&!t(r)&&!n(r),h.appendChild(r),a&&i(h);l.parentNode.removeChild(l)}e.parentNode.replaceChild(h,e)}}e.resolveList=r}(wysihtml5.dom),function(e){var t=document,n=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],i=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],r=["referrer","write","open","close"];e.dom.Sandbox=Base.extend({constructor:function(t,n){this.callback=t||e.EMPTY_FUNCTION,this.config=e.lang.object({}).merge(n).get(),this.iframe=this._createIframe()},insertInto:function(e){"string"==typeof e&&(e=t.getElementById(e)),e.appendChild(this.iframe)},getIframe:function(){return this.iframe},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var e=this.getIframe();e.parentNode.removeChild(e)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var n=this,i=t.createElement("iframe");return i.className="wysihtml5-sandbox",e.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(i),e.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(i.src="javascript:'<html></html>'"),i.onload=function(){i.onreadystatechange=i.onload=null,n._onLoadIframe(i)},i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&(i.onreadystatechange=i.onload=null,n._onLoadIframe(i))},i},_onLoadIframe:function(s){if(e.dom.contains(t.documentElement,s)){var o=this,a=s.contentWindow,l=s.contentWindow.document,c=t.characterSet||t.charset||"utf-8",h=this._getHtml({charset:c,stylesheets:this.config.stylesheets});if(l.open("text/html","replace"),l.write(h),l.close(),this.getWindow=function(){return s.contentWindow},this.getDocument=function(){return s.contentWindow.document},a.onerror=function(e,t,n){throw new Error("wysihtml5.Sandbox: "+e,t,n)},!e.browser.supportsSandboxedIframes()){var u,d;for(u=0,d=n.length;d>u;u++)this._unset(a,n[u]);for(u=0,d=i.length;d>u;u++)this._unset(a,i[u],e.EMPTY_FUNCTION);for(u=0,d=r.length;d>u;u++)this._unset(l,r[u]);this._unset(l,"cookie","",!0)}this.loaded=!0,setTimeout(function(){o.callback(o)},0)}},_getHtml:function(t){var n,i=t.stylesheets,r="",s=0;if(i="string"==typeof i?[i]:i)for(n=i.length;n>s;s++)r+='<link rel="stylesheet" href="'+i[s]+'">';return t.stylesheets=r,e.lang.string('<!DOCTYPE html><html><head><meta charset="#{charset}">#{stylesheets}</head><body></body></html>').interpolate(t)},_unset:function(t,n,i,r){try{t[n]=i}catch(s){}try{t.__defineGetter__(n,function(){return i})}catch(s){}if(r)try{t.__defineSetter__(n,function(){})}catch(s){}if(!e.browser.crashesWhenDefineProperty(n))try{var o={get:function(){return i}};r&&(o.set=function(){}),Object.defineProperty(t,n,o)}catch(s){}}})}(wysihtml5),function(){var e={className:"class"};wysihtml5.dom.setAttributes=function(t){return{on:function(n){for(var i in t)n.setAttribute(e[i]||i,t[i])}}}}(),wysihtml5.dom.setStyles=function(e){return{on:function(t){var n=t.style;if("string"==typeof e)return n.cssText+=";"+e,void 0;for(var i in e)"float"===i?(n.cssFloat=e[i],n.styleFloat=e[i]):n[i]=e[i]}}},function(e){e.simulatePlaceholder=function(t,n,i){var r="placeholder",s=function(){n.hasPlaceholderSet()&&n.clear(),e.removeClass(n.element,r)},o=function(){n.isEmpty()&&(n.setValue(i),e.addClass(n.element,r))};t.observe("set_placeholder",o).observe("unset_placeholder",s).observe("focus:composer",s).observe("paste:composer",s).observe("blur:composer",o),o()}}(wysihtml5.dom),function(e){var t=document.documentElement;"textContent"in t?(e.setTextContent=function(e,t){e.textContent=t},e.getTextContent=function(e){return e.textContent}):"innerText"in t?(e.setTextContent=function(e,t){e.innerText=t},e.getTextContent=function(e){return e.innerText}):(e.setTextContent=function(e,t){e.nodeValue=t},e.getTextContent=function(e){return e.nodeValue})}(wysihtml5.dom),wysihtml5.quirks.cleanPastedHTML=function(){function e(e,n,i){n=n||t,i=i||e.ownerDocument||document;var r,s,o,a,l,c="string"==typeof e,h=0;r=c?wysihtml5.dom.getAsDom(e,i):e;for(l in n)for(o=r.querySelectorAll(l),s=n[l],a=o.length;a>h;h++)s(o[h]);return o=e=n=null,c?r.innerHTML:r}var t={"a u":wysihtml5.dom.replaceWithChildNodes};return e}(),function(e){var t=e.dom;e.quirks.ensureProperClearing=function(){var e=function(){var e=this;setTimeout(function(){var t=e.innerHTML.toLowerCase();("<p> </p>"==t||"<p> </p><p> </p>"==t)&&(e.innerHTML="")},0)};return function(n){t.observe(n.element,["cut","keydown"],e)}}(),e.quirks.ensureProperClearingOfLists=function(){var n=["OL","UL","MENU"],i=function(i,r){if(r.firstChild&&e.lang.array(n).contains(r.firstChild.nodeName)){var s=t.getParentElement(i,{nodeName:n});if(s){var o=s==r.firstChild;if(o){var a=1>=s.childNodes.length;if(a){var l=s.firstChild?""===s.firstChild.innerHTML:!0;l&&s.parentNode.removeChild(s)}}}}};return function(n){t.observe(n.element,"keydown",function(t){if(t.keyCode===e.BACKSPACE_KEY){var r=n.selection.getSelectedNode();i(r,n.element)}})}}()}(wysihtml5),function(e){var t="%7E";e.quirks.getCorrectInnerHTML=function(n){var i=n.innerHTML;if(-1===i.indexOf(t))return i;var r,s,o,a,l=n.querySelectorAll("[href*='~'], [src*='~']");for(a=0,o=l.length;o>a;a++)r=l[a].href||l[a].src,s=e.lang.string(r).replace("~").by(t),i=e.lang.string(i).replace(s).by(r);return i}}(wysihtml5),function(e){var t=e.dom,n=["LI","P","H1","H2","H3","H4","H5","H6"],i=["UL","OL","MENU"];e.quirks.insertLineBreakOnReturn=function(r){function s(n){var i=t.getParentElement(n,{nodeName:["P","DIV"]},2);if(i){var s=document.createTextNode(e.INVISIBLE_SPACE);t.insert(s).before(i),t.replaceWithChildNodes(i),r.selection.selectNode(s)}}function o(o){var a=o.keyCode;if(!(o.shiftKey||a!==e.ENTER_KEY&&a!==e.BACKSPACE_KEY)){var l=(o.target,r.selection.getSelectedNode()),c=t.getParentElement(l,{nodeName:n},4);return c?("LI"!==c.nodeName||a!==e.ENTER_KEY&&a!==e.BACKSPACE_KEY?c.nodeName.match(/H[1-6]/)&&a===e.ENTER_KEY&&setTimeout(function(){s(r.selection.getSelectedNode())},0):setTimeout(function(){var e,n=r.selection.getSelectedNode();n&&(e=t.getParentElement(n,{nodeName:i},2),e||s(n))},0),void 0):(a!==e.ENTER_KEY||e.browser.insertsLineBreaksOnReturn()||(r.commands.exec("insertLineBreak"),o.preventDefault()),void 0)}}t.observe(r.element.ownerDocument,"keydown",o)}}(wysihtml5),function(e){var t="wysihtml5-quirks-redraw";e.quirks.redraw=function(n){e.dom.addClass(n,t),e.dom.removeClass(n,t);try{var i=n.ownerDocument;i.execCommand("italic",!1,null),i.execCommand("italic",!1,null)}catch(r){}}}(wysihtml5),function(e){function t(e){var t=0;if(e.parentNode)do t+=e.offsetTop||0,e=e.offsetParent;while(e);return t}var n=e.dom;e.Selection=Base.extend({constructor:function(e){window.rangy.init(),this.editor=e,this.composer=e.composer,this.doc=this.composer.doc},getBookmark:function(){var e=this.getRange();return e&&e.cloneRange()},setBookmark:function(e){e&&this.setSelection(e)},setBefore:function(e){var t=rangy.createRange(this.doc);return t.setStartBefore(e),t.setEndBefore(e),this.setSelection(t)},setAfter:function(e){var t=rangy.createRange(this.doc);return t.setStartAfter(e),t.setEndAfter(e),this.setSelection(t)},selectNode:function(t){var i=rangy.createRange(this.doc),r=t.nodeType===e.ELEMENT_NODE,s="canHaveHTML"in t?t.canHaveHTML:"IMG"!==t.nodeName,o=r?t.innerHTML:t.data,a=""===o||o===e.INVISIBLE_SPACE,l=n.getStyle("display").from(t),c="block"===l||"list-item"===l;if(a&&r&&s)try{t.innerHTML=e.INVISIBLE_SPACE}catch(h){}s?i.selectNodeContents(t):i.selectNode(t),s&&a&&r?i.collapse(c):s&&a&&(i.setStartAfter(t),i.setEndAfter(t)),this.setSelection(i)},getSelectedNode:function(e){var t,n;return e&&this.doc.selection&&"Control"===this.doc.selection.type&&(n=this.doc.selection.createRange(),n&&n.length)?n.item(0):(t=this.getSelection(this.doc),t.focusNode===t.anchorNode?t.focusNode:(n=this.getRange(this.doc),n?n.commonAncestorContainer:this.doc.body))},executeAndRestore:function(t,n){var i,r=this.doc.body,s=n&&r.scrollTop,o=n&&r.scrollLeft,a="_wysihtml5-temp-placeholder",l='<span class="'+a+'">'+e.INVISIBLE_SPACE+"</span>",c=this.getRange(this.doc);if(!c)return t(r,r),void 0;var h=c.createContextualFragment(l);c.insertNode(h);try{t(c.startContainer,c.endContainer)}catch(u){setTimeout(function(){throw u},0)}caretPlaceholder=this.doc.querySelector("."+a),caretPlaceholder?(i=rangy.createRange(this.doc),i.selectNode(caretPlaceholder),i.deleteContents(),this.setSelection(i)):r.focus(),n&&(r.scrollTop=s,r.scrollLeft=o);try{caretPlaceholder.parentNode.removeChild(caretPlaceholder)}catch(d){}},executeAndRestoreSimple:function(e){var t,n,i,r,s,o=this.getRange(),a=this.doc.body;if(!o)return e(a,a),void 0;r=o.getNodes([3]),n=r[0]||o.startContainer,i=r[r.length-1]||o.endContainer,s={collapsed:o.collapsed,startContainer:n,startOffset:n===o.startContainer?o.startOffset:0,endContainer:i,endOffset:i===o.endContainer?o.endOffset:i.length};try{e(o.startContainer,o.endContainer)}catch(l){setTimeout(function(){throw l},0)}t=rangy.createRange(this.doc);try{t.setStart(s.startContainer,s.startOffset)}catch(c){}try{t.setEnd(s.endContainer,s.endOffset)}catch(h){}try{this.setSelection(t)}catch(u){}},insertHTML:function(e){var t=rangy.createRange(this.doc),n=t.createContextualFragment(e),i=n.lastChild;this.insertNode(n),i&&this.setAfter(i)},insertNode:function(e){var t=this.getRange();t&&t.insertNode(e)},surround:function(e){var t=this.getRange();if(t)try{t.surroundContents(e),this.selectNode(e)}catch(n){e.appendChild(t.extractContents()),t.insertNode(e)}},scrollIntoView:function(){var n,i=this.doc,r=i.documentElement.scrollHeight>i.documentElement.offsetHeight,s=i._wysihtml5ScrollIntoViewElement=i._wysihtml5ScrollIntoViewElement||function(){var t=i.createElement("span");return t.innerHTML=e.INVISIBLE_SPACE,t}();r&&(this.insertNode(s),n=t(s),s.parentNode.removeChild(s),n>i.body.scrollTop&&(i.body.scrollTop=n))},selectLine:function(){e.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var e=this.doc.defaultView,t=e.getSelection();t.modify("extend","left","lineboundary"),t.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var e,t,n,i,r,s=this.doc.selection.createRange(),o=s.boundingTop,a=(s.boundingHeight,this.doc.body.scrollWidth);if(s.moveToPoint){for(0===o&&(n=this.doc.createElement("span"),this.insertNode(n),o=n.offsetTop,n.parentNode.removeChild(n)),o+=1,i=-10;a>i;i+=2)try{s.moveToPoint(i,o);break}catch(l){}for(e=o,t=this.doc.selection.createRange(),r=a;r>=0;r--)try{t.moveToPoint(r,e);break}catch(c){}s.setEndPoint("EndToEnd",t),s.select()}},getText:function(){var e=this.getSelection();return e?e.toString():""},getNodes:function(e,t){var n=this.getRange();return n?n.getNodes([e],t):[]},getRange:function(){var e=this.getSelection();return e&&e.rangeCount&&e.getRangeAt(0)},getSelection:function(){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow)},setSelection:function(e){var t=this.doc.defaultView||this.doc.parentWindow,n=rangy.getSelection(t);return n.setSingleRange(e)}})}(wysihtml5),function(e,t){function n(e,t,n){if(!e.className)return!1;var i=e.className.match(n)||[];return i[i.length-1]===t}function i(e,t,n){e.className?(r(e,n),e.className+=" "+t):e.className=t}function r(e,t){e.className&&(e.className=e.className.replace(t,""))}function s(e,t){return e.className.replace(f," ")==t.className.replace(f," ")}function o(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function a(e,t){if(e.attributes.length!=t.attributes.length)return!1;for(var n,i,r,s=0,o=e.attributes.length;o>s;++s)if(n=e.attributes[s],r=n.name,"class"!=r){if(i=t.attributes.getNamedItem(r),n.specified!=i.specified)return!1;if(n.specified&&n.nodeValue!==i.nodeValue)return!1}return!0}function l(e,n){return t.dom.isCharacterDataNode(e)?0==n?!!e.previousSibling:n==e.length?!!e.nextSibling:!0:n>0&&e.childNodes.length>n}function c(e,n,i){var r;if(t.dom.isCharacterDataNode(n)&&(0==i?(i=t.dom.getNodeIndex(n),n=n.parentNode):i==n.length?(i=t.dom.getNodeIndex(n)+1,n=n.parentNode):r=t.dom.splitDataNode(n,i)),!r){r=n.cloneNode(!1),r.id&&r.removeAttribute("id");for(var s;s=n.childNodes[i];)r.appendChild(s);t.dom.insertAfter(r,n)}return n==e?r:c(e,r.parentNode,t.dom.getNodeIndex(r))}function h(t){this.isElementMerge=t.nodeType==e.ELEMENT_NODE,this.firstTextNode=this.isElementMerge?t.lastChild:t,this.textNodes=[this.firstTextNode]}function u(e,t,n,i){this.tagNames=e||[d],this.cssClass=t||"",this.similarClassRegExp=n,this.normalize=i,this.applyToAnyTagName=!1}var d="span",f=/\s+/g;h.prototype={doMerge:function(){for(var e,t,n,i=[],r=0,s=this.textNodes.length;s>r;++r)e=this.textNodes[r],t=e.parentNode,i[r]=e.data,r&&(t.removeChild(e),t.hasChildNodes()||t.parentNode.removeChild(t));return this.firstTextNode.data=n=i.join(""),n},getLength:function(){for(var e=this.textNodes.length,t=0;e--;)t+=this.textNodes[e].length;return t},toString:function(){for(var e=[],t=0,n=this.textNodes.length;n>t;++t)e[t]="'"+this.textNodes[t].data+"'";return"[Merge("+e.join(",")+")]"}},u.prototype={getAncestorWithClass:function(i){for(var r;i;){if(r=this.cssClass?n(i,this.cssClass,this.similarClassRegExp):!0,i.nodeType==e.ELEMENT_NODE&&t.dom.arrayContains(this.tagNames,i.tagName.toLowerCase())&&r)return i;i=i.parentNode}return!1},postApply:function(e,t){for(var n,i,r,s=e[0],o=e[e.length-1],a=[],l=s,c=o,u=0,d=o.length,f=0,p=e.length;p>f;++f)i=e[f],r=this.getAdjacentMergeableTextNode(i.parentNode,!1),r?(n||(n=new h(r),a.push(n)),n.textNodes.push(i),i===s&&(l=n.firstTextNode,u=l.length),i===o&&(c=n.firstTextNode,d=n.getLength())):n=null;
|
||
var g=this.getAdjacentMergeableTextNode(o.parentNode,!0);if(g&&(n||(n=new h(o),a.push(n)),n.textNodes.push(g)),a.length){for(f=0,p=a.length;p>f;++f)a[f].doMerge();t.setStart(l,u),t.setEnd(c,d)}},getAdjacentMergeableTextNode:function(t,n){var i,r=t.nodeType==e.TEXT_NODE,s=r?t.parentNode:t,o=n?"nextSibling":"previousSibling";if(r){if(i=t[o],i&&i.nodeType==e.TEXT_NODE)return i}else if(i=s[o],i&&this.areElementsMergeable(t,i))return i[n?"firstChild":"lastChild"];return null},areElementsMergeable:function(e,n){return t.dom.arrayContains(this.tagNames,(e.tagName||"").toLowerCase())&&t.dom.arrayContains(this.tagNames,(n.tagName||"").toLowerCase())&&s(e,n)&&a(e,n)},createContainer:function(e){var t=e.createElement(this.tagNames[0]);return this.cssClass&&(t.className=this.cssClass),t},applyToTextNode:function(e){var n=e.parentNode;if(1==n.childNodes.length&&t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase()))this.cssClass&&i(n,this.cssClass,this.similarClassRegExp);else{var r=this.createContainer(t.dom.getDocument(e));e.parentNode.insertBefore(r,e),r.appendChild(e)}},isRemovable:function(n){return t.dom.arrayContains(this.tagNames,n.tagName.toLowerCase())&&e.lang.string(n.className).trim()==this.cssClass},undoToTextNode:function(e,t,n){if(!t.containsNode(n)){var i=t.cloneRange();i.selectNode(n),i.isPointInRange(t.endContainer,t.endOffset)&&l(t.endContainer,t.endOffset)&&(c(n,t.endContainer,t.endOffset),t.setEndAfter(n)),i.isPointInRange(t.startContainer,t.startOffset)&&l(t.startContainer,t.startOffset)&&(n=c(n,t.startContainer,t.startOffset))}this.similarClassRegExp&&r(n,this.similarClassRegExp),this.isRemovable(n)&&o(n)},applyToRange:function(t){var n=t.getNodes([e.TEXT_NODE]);if(!n.length)try{var i=this.createContainer(t.endContainer.ownerDocument);return t.surroundContents(i),this.selectNode(t,i),void 0}catch(r){}if(t.splitBoundaries(),n=t.getNodes([e.TEXT_NODE]),n.length){for(var s,o=0,a=n.length;a>o;++o)s=n[o],this.getAncestorWithClass(s)||this.applyToTextNode(s);t.setStart(n[0],0),s=n[n.length-1],t.setEnd(s,s.length),this.normalize&&this.postApply(n,t)}},undoToRange:function(t){var n,i,r=t.getNodes([e.TEXT_NODE]);if(r.length)t.splitBoundaries(),r=t.getNodes([e.TEXT_NODE]);else{var s=t.endContainer.ownerDocument,o=s.createTextNode(e.INVISIBLE_SPACE);t.insertNode(o),t.selectNode(o),r=[o]}for(var a=0,l=r.length;l>a;++a)n=r[a],i=this.getAncestorWithClass(n),i&&this.undoToTextNode(n,t,i);1==l?this.selectNode(t,r[0]):(t.setStart(r[0],0),n=r[r.length-1],t.setEnd(n,n.length),this.normalize&&this.postApply(r,t))},selectNode:function(t,n){var i=n.nodeType===e.ELEMENT_NODE,r="canHaveHTML"in n?n.canHaveHTML:!0,s=i?n.innerHTML:n.data,o=""===s||s===e.INVISIBLE_SPACE;if(o&&i&&r)try{n.innerHTML=e.INVISIBLE_SPACE}catch(a){}t.selectNodeContents(n),o&&i?t.collapse(!1):o&&(t.setStartAfter(n),t.setEndAfter(n))},getTextSelectedByRange:function(e,t){var n=t.cloneRange();n.selectNodeContents(e);var i=n.intersection(t),r=i?i.toString():"";return n.detach(),r},isAppliedToRange:function(t){var n,i=[],r=t.getNodes([e.TEXT_NODE]);if(!r.length)return n=this.getAncestorWithClass(t.startContainer),n?[n]:!1;for(var s,o=0,a=r.length;a>o;++o){if(s=this.getTextSelectedByRange(r[o],t),n=this.getAncestorWithClass(r[o]),""!=s&&!n)return!1;i.push(n)}return i},toggleRange:function(e){this.isAppliedToRange(e)?this.undoToRange(e):this.applyToRange(e)}},e.selection.HTMLApplier=u}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.doc=this.composer.doc},support:function(e){return wysihtml5.browser.supportsCommand(this.doc,e)},exec:function(e,t){var n=wysihtml5.commands[e],i=wysihtml5.lang.array(arguments).get(),r=n&&n.exec,s=null;if(this.editor.fire("beforecommand:composer"),r)i.unshift(this.composer),s=r.apply(n,i);else try{s=this.doc.execCommand(e,!1,t)}catch(o){}return this.editor.fire("aftercommand:composer"),s},state:function(e){var t=wysihtml5.commands[e],n=wysihtml5.lang.array(arguments).get(),i=t&&t.state;if(i)return n.unshift(this.composer),i.apply(t,n);try{return this.doc.queryCommandState(e)}catch(r){return!1}},value:function(e){var t=wysihtml5.commands[e],n=t&&t.value;if(n)return n.call(t,this.composer,e);try{return this.doc.queryCommandValue(e)}catch(i){return null}}}),function(e){var t;e.commands.bold={exec:function(t,n){return e.commands.formatInline.exec(t,n,"b")},state:function(t,n){return e.commands.formatInline.state(t,n,"b")},value:function(){return t}}}(wysihtml5),function(e){function t(e,t){for(var n,i,r,o=t.length,a=0;o>a;a++)n=t[a],i=s.getParentElement(n,{nodeName:"code"}),r=s.getTextContent(n),r.match(s.autoLink.URL_REG_EXP)&&!i?i=s.renameElement(n,"code"):s.replaceWithChildNodes(n)}function n(t,n){var o,a,l,c,h,u,d,f,p,g=t.doc,m="_wysihtml5-temp-"+ +new Date,y=/non-matching-class/g,v=0;for(e.commands.formatInline.exec(t,i,r,m,y),a=g.querySelectorAll(r+"."+m),o=a.length;o>v;v++){l=a[v],l.removeAttribute("class");for(p in n)l.setAttribute(p,n[p])}u=l,1===o&&(d=s.getTextContent(l),c=!!l.querySelector("*"),h=""===d||d===e.INVISIBLE_SPACE,!c&&h&&(s.setTextContent(l,n.text||l.href),f=g.createTextNode(" "),t.selection.setAfter(l),t.selection.insertNode(f),u=f)),t.selection.setAfter(u)}var i,r="A",s=e.dom;e.commands.createLink={exec:function(e,i,r){var s=this.state(e,i);s?e.selection.executeAndRestore(function(){t(e,s)}):(r="object"==typeof r?r:{href:r},n(e,r))},state:function(t,n){return e.commands.formatInline.state(t,n,"A")},value:function(){return i}}}(wysihtml5),function(e){var t,n=/wysiwyg-font-size-[a-z\-]+/g;e.commands.fontSize={exec:function(t,i,r){return e.commands.formatInline.exec(t,i,"span","wysiwyg-font-size-"+r,n)},state:function(t,i,r){return e.commands.formatInline.state(t,i,"span","wysiwyg-font-size-"+r,n)},value:function(){return t}}}(wysihtml5),function(e){var t,n=/wysiwyg-color-[a-z]+/g;e.commands.foreColor={exec:function(t,i,r){return e.commands.formatInline.exec(t,i,"span","wysiwyg-color-"+r,n)},state:function(t,i,r){return e.commands.formatInline.state(t,i,"span","wysiwyg-color-"+r,n)},value:function(){return t}}}(wysihtml5),function(e){function t(e,t,i){e.className?(n(e,i),e.className+=" "+t):e.className=t}function n(e,t){e.className=e.className.replace(t,"")}function i(t){return t.nodeType===e.TEXT_NODE&&!e.lang.string(t.data).trim()}function r(e){for(var t=e.previousSibling;t&&i(t);)t=t.previousSibling;return t}function s(e){for(var t=e.nextSibling;t&&i(t);)t=t.nextSibling;return t}function o(e){var t=e.ownerDocument,n=s(e),i=r(e);n&&!h(n)&&e.parentNode.insertBefore(t.createElement("br"),n),i&&!h(i)&&e.parentNode.insertBefore(t.createElement("br"),e)}function a(e){var t=s(e),n=r(e);t&&c(t)&&t.parentNode.removeChild(t),n&&c(n)&&n.parentNode.removeChild(n)}function l(e){var t=e.lastChild;t&&c(t)&&t.parentNode.removeChild(t)}function c(e){return"BR"===e.nodeName}function h(e){return c(e)?!0:"block"===g.getStyle("display").from(e)?!0:!1}function u(t,n,i,r){if(r)var s=g.observe(t,"DOMNodeInserted",function(t){var n,i=t.target;i.nodeType===e.ELEMENT_NODE&&(n=g.getStyle("display").from(i),"inline"!==n.substr(0,6)&&(i.className+=" "+r))});t.execCommand(n,!1,i),s&&s.stop()}function d(e,t){e.selection.selectLine(),e.selection.surround(t),a(t),l(t),e.selection.selectNode(t)}function f(t){return!!e.lang.string(t.className).trim()}var p,g=e.dom,m="DIV",y=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE",m];e.commands.formatBlock={exec:function(i,r,s,a,l){var c,h=i.doc,p=this.state(i,r,s,a,l);return s="string"==typeof s?s.toUpperCase():s,p?(i.selection.executeAndRestoreSimple(function(){l&&n(p,l);var e=f(p);e||p.nodeName!==(s||m)?e&&g.renameElement(p,m):(o(p),g.replaceWithChildNodes(p))}),void 0):(null===s||e.lang.array(y).contains(s))&&(c=i.selection.getSelectedNode(),p=g.getParentElement(c,{nodeName:y}))?(i.selection.executeAndRestoreSimple(function(){s&&(p=g.renameElement(p,s)),a&&t(p,a,l)}),void 0):i.commands.support(r)?(u(h,r,s||m,a),void 0):(p=h.createElement(s||m),a&&(p.className=a),d(i,p),void 0)},state:function(e,t,n,i,r){n="string"==typeof n?n.toUpperCase():n;var s=e.selection.getSelectedNode();return g.getParentElement(s,{nodeName:n,className:i,classRegExp:r})},value:function(){return p}}}(wysihtml5),function(e){function t(e){var t=r[e];return t?[e.toLowerCase(),t.toLowerCase()]:[e.toLowerCase()]}function n(n,i,r){var o=n+":"+i;return s[o]||(s[o]=new e.selection.HTMLApplier(t(n),i,r,!0)),s[o]}var i,r={strong:"b",em:"i",b:"strong",i:"em"},s={};e.commands.formatInline={exec:function(e,t,i,r,s){var o=e.selection.getRange();return o?(n(i,r,s).toggleRange(o),e.selection.setSelection(o),void 0):!1},state:function(t,i,s,o,a){var l,c=t.doc,h=r[s]||s;return e.dom.hasElementWithTagName(c,s)||e.dom.hasElementWithTagName(c,h)?o&&!e.dom.hasElementWithClassName(c,o)?!1:(l=t.selection.getRange(),l?n(s,o,a).isAppliedToRange(l):!1):!1},value:function(){return i}}}(wysihtml5),function(e){var t;e.commands.insertHTML={exec:function(e,t,n){e.commands.support(t)?e.doc.execCommand(t,!1,n):e.selection.insertHTML(n)},state:function(){return!1},value:function(){return t}}}(wysihtml5),function(e){var t="IMG";e.commands.insertImage={exec:function(n,i,r){r="object"==typeof r?r:{src:r};var s,o,a,l=n.doc,c=this.state(n);if(c)return n.selection.setBefore(c),a=c.parentNode,a.removeChild(c),e.dom.removeEmptyTextNodes(a),"A"!==a.nodeName||a.firstChild||(n.selection.setAfter(a),a.parentNode.removeChild(a)),e.quirks.redraw(n.element),void 0;c=l.createElement(t);for(o in r)c[o]=r[o];n.selection.insertNode(c),e.browser.hasProblemsSettingCaretAfterImg()?(s=l.createTextNode(e.INVISIBLE_SPACE),n.selection.insertNode(s),n.selection.setAfter(s)):n.selection.setAfter(c)},state:function(n){var i,r,s,o=n.doc;return e.dom.hasElementWithTagName(o,t)?(i=n.selection.getSelectedNode())?i.nodeName===t?i:i.nodeType!==e.ELEMENT_NODE?!1:(r=n.selection.getText(),(r=e.lang.string(r).trim())?!1:(s=n.selection.getNodes(e.ELEMENT_NODE,function(e){return"IMG"===e.nodeName}),1!==s.length?!1:s[0])):!1:!1},value:function(e){var t=this.state(e);return t&&t.src}}}(wysihtml5),function(e){var t,n="<br>"+(e.browser.needsSpaceAfterLineBreak()?" ":"");e.commands.insertLineBreak={exec:function(t,i){t.commands.support(i)?(t.doc.execCommand(i,!1,null),e.browser.autoScrollsToCaret()||t.selection.scrollIntoView()):t.commands.exec("insertHTML",n)},state:function(){return!1},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.insertOrderedList={exec:function(t,n){var i,r,s=t.doc,o=t.selection.getSelectedNode(),a=e.dom.getParentElement(o,{nodeName:"OL"}),l=e.dom.getParentElement(o,{nodeName:"UL"}),c="_wysihtml5-temp-"+(new Date).getTime();return t.commands.support(n)?(s.execCommand(n,!1,null),void 0):(a?t.selection.executeAndRestoreSimple(function(){e.dom.resolveList(a)}):l?t.selection.executeAndRestoreSimple(function(){e.dom.renameElement(l,"ol")}):(t.commands.exec("formatBlock","div",c),r=s.querySelector("."+c),i=""===r.innerHTML||r.innerHTML===e.INVISIBLE_SPACE,t.selection.executeAndRestoreSimple(function(){a=e.dom.convertToList(r,"ol")}),i&&t.selection.selectNode(a.querySelector("li"))),void 0)},state:function(t){var n=t.selection.getSelectedNode();return e.dom.getParentElement(n,{nodeName:"OL"})},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.insertUnorderedList={exec:function(t,n){var i,r,s=t.doc,o=t.selection.getSelectedNode(),a=e.dom.getParentElement(o,{nodeName:"UL"}),l=e.dom.getParentElement(o,{nodeName:"OL"}),c="_wysihtml5-temp-"+(new Date).getTime();return t.commands.support(n)?(s.execCommand(n,!1,null),void 0):(a?t.selection.executeAndRestoreSimple(function(){e.dom.resolveList(a)}):l?t.selection.executeAndRestoreSimple(function(){e.dom.renameElement(l,"ul")}):(t.commands.exec("formatBlock","div",c),r=s.querySelector("."+c),i=""===r.innerHTML||r.innerHTML===e.INVISIBLE_SPACE,t.selection.executeAndRestoreSimple(function(){a=e.dom.convertToList(r,"ul")}),i&&t.selection.selectNode(a.querySelector("li"))),void 0)},state:function(t){var n=t.selection.getSelectedNode();return e.dom.getParentElement(n,{nodeName:"UL"})},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.italic={exec:function(t,n){return e.commands.formatInline.exec(t,n,"i")},state:function(t,n){return e.commands.formatInline.state(t,n,"i")},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-center",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyCenter={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-left",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyLeft={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t,n="wysiwyg-text-align-right",i=/wysiwyg-text-align-[a-z]+/g;e.commands.justifyRight={exec:function(t){return e.commands.formatBlock.exec(t,"formatBlock",null,n,i)},state:function(t){return e.commands.formatBlock.state(t,"formatBlock",null,n,i)},value:function(){return t}}}(wysihtml5),function(e){var t;e.commands.underline={exec:function(t,n){return e.commands.formatInline.exec(t,n,"u")},state:function(t,n){return e.commands.formatInline.state(t,n,"u")},value:function(){return t}}}(wysihtml5),function(e){function t(e){for(var t;t=e.querySelector("._wysihtml5-temp");)t.parentNode.removeChild(t)}var n=90,i=89,r=8,s=46,o=40,a='<span id="_wysihtml5-undo" class="_wysihtml5-temp">'+e.INVISIBLE_SPACE+"</span>",l='<span id="_wysihtml5-redo" class="_wysihtml5-temp">'+e.INVISIBLE_SPACE+"</span>",c=e.dom;e.UndoManager=e.lang.Dispatcher.extend({constructor:function(e){this.editor=e,this.composer=e.composer,this.element=this.composer.element,this.history=[this.composer.getValue()],this.position=1,this.composer.commands.support("insertHTML")&&this._observe()},_observe:function(){var o,h=this,u=this.composer.sandbox.getDocument();if(c.observe(this.element,"keydown",function(e){if(!e.altKey&&(e.ctrlKey||e.metaKey)){var t=e.keyCode,r=t===n&&!e.shiftKey,s=t===n&&e.shiftKey||t===i;r?(h.undo(),e.preventDefault()):s&&(h.redo(),e.preventDefault())}}),c.observe(this.element,"keydown",function(e){var t=e.keyCode;t!==o&&(o=t,(t===r||t===s)&&h.transact())}),e.browser.hasUndoInContextMenu()){var d,f,p=function(){t(u),clearInterval(d)};c.observe(this.element,"contextmenu",function(){p(),h.composer.selection.executeAndRestoreSimple(function(){h.element.lastChild&&h.composer.selection.setAfter(h.element.lastChild),u.execCommand("insertHTML",!1,a),u.execCommand("insertHTML",!1,l),u.execCommand("undo",!1,null)}),d=setInterval(function(){u.getElementById("_wysihtml5-redo")?(p(),h.redo()):u.getElementById("_wysihtml5-undo")||(p(),h.undo())},400),f||(f=!0,c.observe(document,"mousedown",p),c.observe(u,["mousedown","paste","cut","copy"],p))})}this.editor.observe("newword:composer",function(){h.transact()}).observe("beforecommand:composer",function(){h.transact()})},transact:function(){var e=this.history[this.position-1],t=this.composer.getValue();if(t!=e){var n=this.history.length=this.position;n>o&&(this.history.shift(),this.position--),this.position++,this.history.push(t)}},undo:function(){this.transact(),1>=this.position||(this.set(this.history[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.position>=this.history.length||(this.set(this.history[++this.position-1]),this.editor.fire("redo:composer"))},set:function(e){this.composer.setValue(e),this.editor.focus(!0)}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(e,t,n){this.parent=e,this.element=t,this.config=n,this._observeViewChange()},_observeViewChange:function(){var e=this;this.parent.observe("beforeload",function(){e.parent.observe("change_view",function(t){t===e.name?(e.parent.currentView=e,e.show(),setTimeout(function(){e.focus()},0)):e.hide()})})},focus:function(){if(this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element.focus()}catch(e){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(e){var t=e.dom,n=e.browser;e.views.Composer=e.views.View.extend({name:"composer",CARET_HACK:"<br>",constructor:function(e,t,n){this.base(e,t,n),this.textarea=this.parent.textarea,this._initSandbox()},clear:function(){this.element.innerHTML=n.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(t){var n=this.isEmpty()?"":e.quirks.getCorrectInnerHTML(this.element);return t&&(n=this.parent.parse(n)),n=e.lang.string(n).replace(e.INVISIBLE_SPACE).by("")},setValue:function(e,t){t&&(e=this.parent.parse(e)),this.element.innerHTML=e},show:function(){this.iframe.style.display=this._displayStyle||"",this.disable(),this.enable()},hide:function(){this._displayStyle=t.getStyle("display").from(this.iframe),"none"===this._displayStyle&&(this._displayStyle=null),this.iframe.style.display="none"},disable:function(){this.element.removeAttribute("contentEditable"),this.base()},enable:function(){this.element.setAttribute("contentEditable","true"),this.base()},focus:function(t){e.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var n=this.element.lastChild;t&&n&&("BR"===n.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getTextContent:function(){return t.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==this.textarea.element.getAttribute("placeholder")},isEmpty:function(){var e=this.element.innerHTML,t="blockquote, ul, ol, img, embed, object, table, iframe, svg, video, audio, button, input, select, textarea";return""===e||e===this.CARET_HACK||this.hasPlaceholderSet()||""===this.getTextContent()&&!this.element.querySelector(t)},_initSandbox:function(){var e=this;this.sandbox=new t.Sandbox(function(){e._create()},{stylesheets:this.config.stylesheets}),this.iframe=this.sandbox.getIframe();var n=document.createElement("input");n.type="hidden",n.name="_wysihtml5_mode",n.value=1;var i=this.textarea.element;t.insert(this.iframe).after(i),t.insert(n).after(i)},_create:function(){var i=this;this.doc=this.sandbox.getDocument(),this.element=this.doc.body,this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0),this.enable(),this.selection=new e.Selection(this.parent),this.commands=new e.Commands(this.parent),t.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),t.addClass(this.element,this.config.composerClassName),this.config.style&&this.style(),this.observe();var r=this.config.name;r&&(t.addClass(this.element,r),t.addClass(this.iframe,r));var s="string"==typeof this.config.placeholder?this.config.placeholder:this.textarea.element.getAttribute("placeholder");s&&t.simulatePlaceholder(this.parent,this,s),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),(this.textarea.element.hasAttribute("autofocus")||document.querySelector(":focus")==this.textarea.element)&&setTimeout(function(){i.focus()},100),e.quirks.insertLineBreakOnReturn(this),n.clearsContentEditableCorrectly()||e.quirks.ensureProperClearing(this),n.clearsListsInContentEditableCorrectly()||e.quirks.ensureProperClearingOfLists(this),this.initSync&&this.config.sync&&this.initSync(),this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var i=this,r=n.canDisableAutoLinking(),s=n.doesAutoLinkingInContentEditable();if(r&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!s||s&&r)&&this.parent.observe("newword:composer",function(){i.selection.executeAndRestore(function(e,n){t.autoLink(n.parentNode)})});var o=this.sandbox.getDocument().getElementsByTagName("a"),a=t.autoLink.URL_REG_EXP,l=function(n){var i=e.lang.string(t.getTextContent(n)).trim();return"www."===i.substr(0,4)&&(i="http://"+i),i};t.observe(this.element,"keydown",function(e){if(o.length){var n,r=i.selection.getSelectedNode(e.target.ownerDocument),s=t.getParentElement(r,{nodeName:"A"},4);s&&(n=l(s),setTimeout(function(){var e=l(s);e!==n&&e.match(a)&&s.setAttribute("href",e)},0))}})}},_initObjectResizing:function(){var i=["width","height"],r=i.length,s=this.element;this.commands.exec("enableObjectResizing",this.config.allowObjectResizing),this.config.allowObjectResizing?n.supportsEvent("resizeend")&&t.observe(s,"resizeend",function(t){for(var n,o=t.target||t.srcElement,a=o.style,l=0;r>l;l++)n=i[l],a[n]&&(o.setAttribute(n,parseInt(a[n],10)),a[n]="");e.quirks.redraw(s)}):n.supportsEvent("resizestart")&&t.observe(s,"resizestart",function(e){e.preventDefault()})},_initUndoManager:function(){new e.UndoManager(this.parent)}})}(wysihtml5),function(e){var t=e.dom,n=document,i=window,r=n.createElement("div"),s=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],o=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],a=["width","height","top","left","right","bottom"],l=["html { height: 100%; }","body { min-height: 100%; padding: 0; margin: 0; margin-top: -1px; padding-top: 1px; }","._wysihtml5-temp { display: none; }",e.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","body[disabled] { background-color: #eee !important; color: #999 !important; cursor: default !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],c=function(e){if(e.setActive)try{e.setActive()}catch(r){}else{var s=e.style,o=n.documentElement.scrollTop||n.body.scrollTop,a=n.documentElement.scrollLeft||n.body.scrollLeft,l={position:s.position,top:s.top,left:s.left,WebkitUserSelect:s.WebkitUserSelect};t.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(e),e.focus(),t.setStyles(l).on(e),i.scrollTo&&i.scrollTo(a,o)}};e.views.Composer.prototype.style=function(){var h=this,u=n.querySelector(":focus"),d=this.textarea.element,f=d.hasAttribute("placeholder"),p=f&&d.getAttribute("placeholder");this.focusStylesHost=this.focusStylesHost||r.cloneNode(!1),this.blurStylesHost=this.blurStylesHost||r.cloneNode(!1),f&&d.removeAttribute("placeholder"),d===u&&d.blur(),t.copyStyles(o).from(d).to(this.iframe).andTo(this.blurStylesHost),t.copyStyles(s).from(d).to(this.element).andTo(this.blurStylesHost),t.insertCSS(l).into(this.element.ownerDocument),c(d),t.copyStyles(o).from(d).to(this.focusStylesHost),t.copyStyles(s).from(d).to(this.focusStylesHost);var g=e.lang.array(o).without(["display"]);if(u?u.focus():d.blur(),f&&d.setAttribute("placeholder",p),!e.browser.hasCurrentStyleProperty())var m=t.observe(i,"resize",function(){if(!t.contains(document.documentElement,h.iframe))return m.stop(),void 0;var e=t.getStyle("display").from(d),n=t.getStyle("display").from(h.iframe);d.style.display="",h.iframe.style.display="none",t.copyStyles(a).from(d).to(h.iframe).andTo(h.focusStylesHost).andTo(h.blurStylesHost),h.iframe.style.display=n,d.style.display=e});return this.parent.observe("focus:composer",function(){t.copyStyles(g).from(h.focusStylesHost).to(h.iframe),t.copyStyles(s).from(h.focusStylesHost).to(h.element)}),this.parent.observe("blur:composer",function(){t.copyStyles(g).from(h.blurStylesHost).to(h.iframe),t.copyStyles(s).from(h.blurStylesHost).to(h.element)}),this}}(wysihtml5),function(e){var t=e.dom,n=e.browser,i={66:"bold",73:"italic",85:"underline"};e.views.Composer.prototype.observe=function(){var r=this,s=this.getValue(),o=this.sandbox.getIframe(),a=this.element,l=n.supportsEventsInIframeCorrectly()?a:this.sandbox.getWindow(),c=n.supportsEvent("drop")?["drop","paste"]:["dragdrop","paste"];t.observe(o,"DOMNodeRemoved",function(){clearInterval(h),r.parent.fire("destroy:composer")});var h=setInterval(function(){t.contains(document.documentElement,o)||(clearInterval(h),r.parent.fire("destroy:composer"))},250);t.observe(l,"focus",function(){r.parent.fire("focus").fire("focus:composer"),setTimeout(function(){s=r.getValue()},0)}),t.observe(l,"blur",function(){s!==r.getValue()&&r.parent.fire("change").fire("change:composer"),r.parent.fire("blur").fire("blur:composer")}),e.browser.isIos()&&t.observe(a,"blur",function(){var e=a.ownerDocument.createElement("input"),t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollLeft||document.body.scrollLeft;try{r.selection.insertNode(e)}catch(i){a.appendChild(e)}e.focus(),e.parentNode.removeChild(e),window.scrollTo(n,t)}),t.observe(a,"dragenter",function(){r.parent.fire("unset_placeholder")}),n.firesOnDropOnlyWhenOnDragOverIsCancelled()&&t.observe(a,["dragover","dragenter"],function(e){e.preventDefault()}),t.observe(a,c,function(e){var t,i=e.dataTransfer;console.log("PASTED",e),i&&n.supportsDataTransfer()&&(t=i.getData("text/html")||i.getData("text/plain")),t?(a.focus(),r.commands.exec("insertHTML",t),r.parent.fire("paste").fire("paste:composer"),e.stopPropagation(),e.preventDefault()):setTimeout(function(){r.parent.fire("paste").fire("paste:composer")},0)}),t.observe(a,"keyup",function(t){var n=t.keyCode;(n===e.SPACE_KEY||n===e.ENTER_KEY)&&r.parent.fire("newword:composer")}),this.parent.observe("paste:composer",function(){setTimeout(function(){r.parent.fire("newword:composer")},0)}),n.canSelectImagesInContentEditable()||t.observe(a,"mousedown",function(e){var t=e.target;"IMG"===t.nodeName&&(r.selection.selectNode(t),e.preventDefault())}),t.observe(a,"keydown",function(e){var t=e.keyCode,n=i[t];(e.ctrlKey||e.metaKey)&&!e.altKey&&n&&(r.commands.exec(n),e.preventDefault())}),t.observe(a,"keydown",function(t){var n,i=r.selection.getSelectedNode(!0),s=t.keyCode;!i||"IMG"!==i.nodeName||s!==e.BACKSPACE_KEY&&s!==e.DELETE_KEY||(n=i.parentNode,n.removeChild(i),"A"!==n.nodeName||n.firstChild||n.parentNode.removeChild(n),setTimeout(function(){e.quirks.redraw(a)},0),t.preventDefault())});var u={IMG:"Image: ",A:"Link: "};t.observe(a,"mouseover",function(e){var t,n=e.target,i=n.nodeName;if("A"===i||"IMG"===i){var r=n.hasAttribute("title");r||(t=u[i]+(n.getAttribute("href")||n.getAttribute("src")),n.setAttribute("title",t))}})}}(wysihtml5),function(e){var t=400;e.views.Synchronizer=Base.extend({constructor:function(e,t,n){this.editor=e,this.textarea=t,this.composer=n,this._observe()},fromComposerToTextarea:function(t){this.textarea.setValue(e.lang.string(this.composer.getValue()).trim(),t)},fromTextareaToComposer:function(e){var t=this.textarea.getValue();t?this.composer.setValue(t,e):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(e){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(e):this.fromComposerToTextarea(e)},_observe:function(){var n,i=this,r=this.textarea.element.form,s=function(){n=setInterval(function(){i.fromComposerToTextarea()},t)},o=function(){clearInterval(n),n=null};s(),r&&(e.dom.observe(r,"submit",function(){i.sync(!0)}),e.dom.observe(r,"reset",function(){setTimeout(function(){i.fromTextareaToComposer()},0)})),this.editor.observe("change_view",function(e){"composer"!==e||n?"textarea"===e&&(i.fromComposerToTextarea(!0),o()):(i.fromTextareaToComposer(!0),s())}),this.editor.observe("destroy:composer",o)}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(e,t,n){this.base(e,t,n),this._observe()},clear:function(){this.element.value=""},getValue:function(e){var t=this.isEmpty()?"":this.element.value;return e&&(t=this.parent.parse(t)),t},setValue:function(e,t){t&&(e=this.parent.parse(e)),this.element.value=e},hasPlaceholderSet:function(){var e=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),t=this.element.getAttribute("placeholder")||null,n=this.element.value,i=!n;return e&&i||n===t},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var e=this.element,t=this.parent,n={focusin:"focus",focusout:"blur"},i=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];t.observe("beforeload",function(){wysihtml5.dom.observe(e,i,function(e){var i=n[e.type]||e.type;t.fire(i).fire(i+":textarea")}),wysihtml5.dom.observe(e,["paste","drop"],function(){setTimeout(function(){t.fire("paste").fire("paste:textarea")},0)})})}}),function(e){var t=e.dom,n="wysihtml5-command-dialog-opened",i="input, select, textarea",r="[data-wysihtml5-dialog-field]",s="data-wysihtml5-dialog-field";e.toolbar.Dialog=e.lang.Dispatcher.extend({constructor:function(e,t){this.link=e,this.container=t},_observe:function(){if(!this._observed){var r=this,s=function(e){var t=r._serialize();t==r.elementToChange?r.fire("edit",t):r.fire("save",t),r.hide(),e.preventDefault(),e.stopPropagation()};t.observe(r.link,"click",function(){t.hasClass(r.link,n)&&setTimeout(function(){r.hide()},0)}),t.observe(this.container,"keydown",function(t){var n=t.keyCode;n===e.ENTER_KEY&&s(t),n===e.ESCAPE_KEY&&r.hide()}),t.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",s),t.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(e){r.fire("cancel"),r.hide(),e.preventDefault(),e.stopPropagation()});for(var o=this.container.querySelectorAll(i),a=0,l=o.length,c=function(){clearInterval(r.interval)};l>a;a++)t.observe(o[a],"change",c);this._observed=!0}},_serialize:function(){for(var e=this.elementToChange||{},t=this.container.querySelectorAll(r),n=t.length,i=0;n>i;i++)e[t[i].getAttribute(s)]=t[i].value;return e},_interpolate:function(e){for(var t,n,i,o=document.querySelector(":focus"),a=this.container.querySelectorAll(r),l=a.length,c=0;l>c;c++)t=a[c],t!==o&&(e&&"hidden"===t.type||(n=t.getAttribute(s),i=this.elementToChange?this.elementToChange[n]||"":t.defaultValue,t.value=i))},show:function(e){var r=this,s=this.container.querySelector(i);if(this.elementToChange=e,this._observe(),this._interpolate(),e&&(this.interval=setInterval(function(){r._interpolate(!0)},500)),t.addClass(this.link,n),this.container.style.display="",this.fire("show"),s&&!e)try{s.focus()}catch(o){}},hide:function(){clearInterval(this.interval),this.elementToChange=null,t.removeClass(this.link,n),this.container.style.display="none",this.fire("hide")}})}(wysihtml5),function(e){var t=e.dom,n={position:"relative"},i={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},r={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},s={"x-webkit-speech":"",speech:""};e.toolbar.Speech=function(o,a){var l=document.createElement("input");if(!e.browser.supportsSpeechApiOn(l))return a.style.display="none",void 0;var c=document.createElement("div");e.lang.object(i).merge({width:a.offsetWidth+"px",height:a.offsetHeight+"px"}),t.insert(l).into(c),t.insert(c).into(a),t.setStyles(r).on(l),t.setAttributes(s).on(l),t.setStyles(i).on(c),t.setStyles(n).on(a);var h="onwebkitspeechchange"in l?"webkitspeechchange":"speechchange";t.observe(l,h,function(){o.execCommand("insertText",l.value),l.value=""}),t.observe(l,"click",function(e){t.hasClass(a,"wysihtml5-command-disabled")&&e.preventDefault(),e.stopPropagation()})}}(wysihtml5),function(e){var t="wysihtml5-command-disabled",n="wysihtml5-commands-disabled",i="wysihtml5-command-active",r="wysihtml5-action-active",s=e.dom;
|
||
e.toolbar.Toolbar=Base.extend({constructor:function(t,n){this.editor=t,this.container="string"==typeof n?document.getElementById(n):n,this.composer=t.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),this.show();for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),r=i.length,s=0;r>s;s++)new e.toolbar.Speech(this,i[s])},_getLinks:function(t){for(var n,i,r,s,o,a=this[t+"Links"]=e.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+t+"]")).get(),l=a.length,c=0,h=this[t+"Mapping"]={};l>c;c++)n=a[c],r=n.getAttribute("data-wysihtml5-"+t),s=n.getAttribute("data-wysihtml5-"+t+"-value"),i=this.container.querySelector("[data-wysihtml5-"+t+"-group='"+r+"']"),o=this._getDialog(n,r),h[r+":"+s]={link:n,group:i,name:r,value:s,dialog:o,state:!1}},_getDialog:function(t,n){var i,r,s=this,o=this.container.querySelector("[data-wysihtml5-dialog='"+n+"']");return o&&(i=new e.toolbar.Dialog(t,o),i.observe("show",function(){r=s.composer.selection.getBookmark(),s.editor.fire("show:dialog",{command:n,dialogContainer:o,commandLink:t})}),i.observe("save",function(e){r&&s.composer.selection.setBookmark(r),s._execCommand(n,e),s.editor.fire("save:dialog",{command:n,dialogContainer:o,commandLink:t})}),i.observe("cancel",function(){s.editor.focus(!1),s.editor.fire("cancel:dialog",{command:n,dialogContainer:o,commandLink:t})})),i},execCommand:function(e,t){if(!this.commandsDisabled){var n=this.commandMapping[e+":"+t];n&&n.dialog&&!n.state?n.dialog.show():this._execCommand(e,t)}},_execCommand:function(e,t){this.editor.focus(!1),this.composer.commands.exec(e,t),this._updateLinkStates()},execAction:function(e){var t=this.editor;switch(e){case"change_view":t.currentView===t.textarea?t.fire("change_view","composer"):t.fire("change_view","textarea")}},_observe:function(){for(var e=this,t=this.editor,i=this.container,r=this.commandLinks.concat(this.actionLinks),o=r.length,a=0;o>a;a++)s.setAttributes({href:"javascript:;",unselectable:"on"}).on(r[a]);s.delegate(i,"[data-wysihtml5-command]","mousedown",function(e){e.preventDefault()}),s.delegate(i,"[data-wysihtml5-command]","click",function(t){var n=this,i=n.getAttribute("data-wysihtml5-command"),r=n.getAttribute("data-wysihtml5-command-value");e.execCommand(i,r),t.preventDefault()}),s.delegate(i,"[data-wysihtml5-action]","click",function(t){var n=this.getAttribute("data-wysihtml5-action");e.execAction(n),t.preventDefault()}),t.observe("focus:composer",function(){e.bookmark=null,clearInterval(e.interval),e.interval=setInterval(function(){e._updateLinkStates()},500)}),t.observe("blur:composer",function(){clearInterval(e.interval)}),t.observe("destroy:composer",function(){clearInterval(e.interval)}),t.observe("change_view",function(t){setTimeout(function(){e.commandsDisabled="composer"!==t,e._updateLinkStates(),e.commandsDisabled?s.addClass(i,n):s.removeClass(i,n)},0)})},_updateLinkStates:function(){var n,o,a,l,c=(this.composer.element,this.commandMapping),h=this.actionMapping;for(n in c)l=c[n],this.commandsDisabled?(o=!1,s.removeClass(l.link,i),l.group&&s.removeClass(l.group,i),l.dialog&&l.dialog.hide()):(o=this.composer.commands.state(l.name,l.value),e.lang.object(o).isArray()&&(o=1===o.length?o[0]:!0),s.removeClass(l.link,t),l.group&&s.removeClass(l.group,t)),l.state!==o&&(l.state=o,o?(s.addClass(l.link,i),l.group&&s.addClass(l.group,i),l.dialog&&("object"==typeof o?l.dialog.show(o):l.dialog.hide())):(s.removeClass(l.link,i),l.group&&s.removeClass(l.group,i),l.dialog&&l.dialog.hide()));for(n in h)a=h[n],"change_view"===a.name&&(a.state=this.editor.currentView===this.editor.textarea,a.state?s.addClass(a.link,r):s.removeClass(a.link,r))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(e){var t,n={name:t,style:!0,toolbar:t,autoLink:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},parser:e.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",stylesheets:[],placeholderText:t,allowObjectResizing:!0,supportTouchDevices:!0};e.Editor=e.lang.Dispatcher.extend({constructor:function(t,i){if(this.textareaElement="string"==typeof t?document.getElementById(t):t,this.config=e.lang.object({}).merge(n).merge(i).get(),this.textarea=new e.views.Textarea(this,this.textareaElement,this.config),this.currentView=this.textarea,this._isCompatible=e.browser.supported(),!this._isCompatible||!this.config.supportTouchDevices&&e.browser.isTouchDevice()){var r=this;return setTimeout(function(){r.fire("beforeload").fire("load")},0),void 0}e.dom.addClass(document.body,this.config.bodyClassName),this.composer=new e.views.Composer(this,this.textareaElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.observe("beforeload",function(){this.synchronizer=new e.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new e.toolbar.Toolbar(this,this.config.toolbar))});try{console.log("Heya! This page is using wysihtml5 for rich text editing. Check out https://github.com/xing/wysihtml5")}catch(s){}},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(e){return this.currentView.getValue(e)},setValue:function(e,t){return e?(this.currentView.setValue(e,t),this):this.clear()},focus:function(e){return this.currentView.focus(e),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(t){var n=this.config.parser(t,this.config.parserRules,this.composer.sandbox.getDocument(),!0);return"object"==typeof t&&e.quirks.redraw(t),n},_initParser:function(){this.observe("paste:composer",function(){var t=!0,n=this;n.composer.selection.executeAndRestore(function(){e.quirks.cleanPastedHTML(n.composer.element),n.parse(n.composer.element)},t)}),this.observe("paste:textarea",function(){var e,t=this.textarea.getValue();e=this.parse(t),this.textarea.setValue(e)})}})}(wysihtml5),function(e,t){function n(e){var t=pt[e]={};return Q.each(e.split(tt),function(e,n){t[n]=!0}),t}function i(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(mt,"-$1").toLowerCase();if(i=e.getAttribute(r),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:gt.test(i)?Q.parseJSON(i):i}catch(s){}Q.data(e,n,i)}else i=t}return i}function r(e){var t;for(t in e)if(("data"!==t||!Q.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function s(){return!1}function o(){return!0}function a(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function c(e,t,n){if(t=t||0,Q.isFunction(t))return Q.grep(e,function(e,i){var r=!!t.call(e,i,e);return r===n});if(t.nodeType)return Q.grep(e,function(e){return e===t===n});if("string"==typeof t){var i=Q.grep(e,function(e){return 1===e.nodeType});if(Ft.test(t))return Q.filter(t,i,!n);t=Q.filter(t,i)}return Q.grep(e,function(e){return Q.inArray(e,t)>=0===n})}function h(e){var t=jt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function u(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function d(e,t){if(1===t.nodeType&&Q.hasData(e)){var n,i,r,s=Q._data(e),o=Q._data(t,s),a=s.events;if(a){delete o.handle,o.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)Q.event.add(t,n,a[n][i])}o.data&&(o.data=Q.extend({},o.data))}}function f(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),Q.support.html5Clone&&e.innerHTML&&!Q.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Yt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.selected=e.defaultSelected:"input"===n||"textarea"===n?t.defaultValue=e.defaultValue:"script"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(Q.expando))}function p(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function g(e){Yt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=vn.length;r--;)if(t=vn[r]+n,t in e)return t;return i}function y(e,t){return e=t||e,"none"===Q.css(e,"display")||!Q.contains(e.ownerDocument,e)}function v(e,t){for(var n,i,r=[],s=0,o=e.length;o>s;s++)n=e[s],n.style&&(r[s]=Q._data(n,"olddisplay"),t?(!r[s]&&"none"===n.style.display&&(n.style.display=""),""===n.style.display&&y(n)&&(r[s]=Q._data(n,"olddisplay",x(n.nodeName)))):(i=nn(n,"display"),!r[s]&&"none"!==i&&Q._data(n,"olddisplay",i)));for(s=0;o>s;s++)n=e[s],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[s]||"":"none"));return e}function b(e,t,n){var i=un.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function w(e,t,n,i){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,s=0;4>r;r+=2)"margin"===n&&(s+=Q.css(e,n+yn[r],!0)),i?("content"===n&&(s-=parseFloat(nn(e,"padding"+yn[r]))||0),"margin"!==n&&(s-=parseFloat(nn(e,"border"+yn[r]+"Width"))||0)):(s+=parseFloat(nn(e,"padding"+yn[r]))||0,"padding"!==n&&(s+=parseFloat(nn(e,"border"+yn[r]+"Width"))||0));return s}function _(e,t,n){var i="width"===t?e.offsetWidth:e.offsetHeight,r=!0,s=Q.support.boxSizing&&"border-box"===Q.css(e,"boxSizing");if(0>=i||null==i){if(i=nn(e,t),(0>i||null==i)&&(i=e.style[t]),dn.test(i))return i;r=s&&(Q.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+w(e,t,n||(s?"border":"content"),r)+"px"}function x(e){if(pn[e])return pn[e];var t=Q("<"+e+">").appendTo(B.body),n=t.css("display");return t.remove(),("none"===n||""===n)&&(rn=B.body.appendChild(rn||Q.extend(B.createElement("iframe"),{frameBorder:0,width:0,height:0})),sn&&rn.createElement||(sn=(rn.contentWindow||rn.contentDocument).document,sn.write("<!doctype html><html><body>"),sn.close()),t=sn.body.appendChild(sn.createElement(e)),n=nn(t,"display"),B.body.removeChild(rn)),pn[e]=n,n}function C(e,t,n,i){var r;if(Q.isArray(t))Q.each(t,function(t,r){n||_n.test(e)?i(e,r):C(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==Q.type(t))i(e,t);else for(r in t)C(e+"["+r+"]",t[r],n,i)}function T(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r,s,o=t.toLowerCase().split(tt),a=0,l=o.length;if(Q.isFunction(n))for(;l>a;a++)i=o[a],s=/^\+/.test(i),s&&(i=i.substr(1)||"*"),r=e[i]=e[i]||[],r[s?"unshift":"push"](n)}}function E(e,n,i,r,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;for(var a,l=e[s],c=0,h=l?l.length:0,u=e===In;h>c&&(u||!a);c++)a=l[c](n,i,r),"string"==typeof a&&(!u||o[a]?a=t:(n.dataTypes.unshift(a),a=E(e,n,i,r,a,o)));return(u||!a)&&!o["*"]&&(a=E(e,n,i,r,"*",o)),a}function k(e,n){var i,r,s=Q.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);r&&Q.extend(!0,e,r)}function N(e,n,i){var r,s,o,a,l=e.contents,c=e.dataTypes,h=e.responseFields;for(s in h)s in i&&(n[h[s]]=i[s]);for(;"*"===c[0];)c.shift(),r===t&&(r=e.mimeType||n.getResponseHeader("content-type"));if(r)for(s in l)if(l[s]&&l[s].test(r)){c.unshift(s);break}if(c[0]in i)o=c[0];else{for(s in i){if(!c[0]||e.converters[s+" "+c[0]]){o=s;break}a||(a=s)}o=o||a}return o?(o!==c[0]&&c.unshift(o),i[o]):void 0}function A(e,t){var n,i,r,s,o=e.dataTypes.slice(),a=o[0],l={},c=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),o[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;r=o[++c];)if("*"!==r){if("*"!==a&&a!==r){if(n=l[a+" "+r]||l["* "+r],!n)for(i in l)if(s=i.split(" "),s[1]===r&&(n=l[a+" "+s[0]]||l["* "+s[0]])){n===!0?n=l[i]:l[i]!==!0&&(r=s[0],o.splice(c--,0,r));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(h){return{state:"parsererror",error:n?h:"No conversion from "+a+" to "+r}}}a=r}return{state:"success",data:t}}function S(){try{return new e.XMLHttpRequest}catch(t){}}function D(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function M(){return setTimeout(function(){Xn=t},0),Xn=Q.now()}function R(e,t){Q.each(t,function(t,n){for(var i=(ei[t]||[]).concat(ei["*"]),r=0,s=i.length;s>r;r++)if(i[r].call(e,t,n))return})}function L(e,t,n){var i,r=0,s=Jn.length,o=Q.Deferred().always(function(){delete a.elem}),a=function(){for(var t=Xn||M(),n=Math.max(0,l.startTime+l.duration-t),i=n/l.duration||0,r=1-i,s=0,a=l.tweens.length;a>s;s++)l.tweens[s].run(r);return o.notifyWith(e,[l,r,n]),1>r&&a?n:(o.resolveWith(e,[l]),!1)},l=o.promise({elem:e,props:Q.extend({},t),opts:Q.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||M(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Q.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){for(var n=0,i=t?l.tweens.length:0;i>n;n++)l.tweens[n].run(1);return t?o.resolveWith(e,[l,t]):o.rejectWith(e,[l,t]),this}}),c=l.props;for(z(c,l.opts.specialEasing);s>r;r++)if(i=Jn[r].call(l,e,c,l.opts))return i;return R(l,c),Q.isFunction(l.opts.start)&&l.opts.start.call(e,l),Q.fx.timer(Q.extend(a,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function z(e,t){var n,i,r,s,o;for(n in e)if(i=Q.camelCase(n),r=t[i],s=e[n],Q.isArray(s)&&(r=s[1],s=e[n]=s[0]),n!==i&&(e[i]=s,delete e[n]),o=Q.cssHooks[i],o&&"expand"in o){s=o.expand(s),delete e[i];for(n in s)n in e||(e[n]=s[n],t[n]=r)}else t[i]=r}function O(e,t,n){var i,r,s,o,a,l,c,h,u,d=this,f=e.style,p={},g=[],m=e.nodeType&&y(e);n.queue||(h=Q._queueHooks(e,"fx"),null==h.unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always(function(){d.always(function(){h.unqueued--,Q.queue(e,"fx").length||h.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===Q.css(e,"display")&&"none"===Q.css(e,"float")&&(Q.support.inlineBlockNeedsLayout&&"inline"!==x(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",Q.support.shrinkWrapBlocks||d.done(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in t)if(s=t[i],Gn.exec(s)){if(delete t[i],l=l||"toggle"===s,s===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){a=Q._data(e,"fxshow")||Q._data(e,"fxshow",{}),"hidden"in a&&(m=a.hidden),l&&(a.hidden=!m),m?Q(e).show():d.done(function(){Q(e).hide()}),d.done(function(){var t;Q.removeData(e,"fxshow",!0);for(t in p)Q.style(e,t,p[t])});for(i=0;o>i;i++)r=g[i],c=d.createTween(r,m?a[r]:0),p[r]=a[r]||Q.style(e,r),r in a||(a[r]=c.start,m&&(c.end=c.start,c.start="width"===r||"height"===r?1:0))}}function F(e,t,n,i,r){return new F.prototype.init(e,t,n,i,r)}function I(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=yn[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function H(e){return Q.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var j,P,B=e.document,q=e.location,Z=e.navigator,$=e.jQuery,W=e.$,U=Array.prototype.push,V=Array.prototype.slice,X=Array.prototype.indexOf,Y=Object.prototype.toString,G=Object.prototype.hasOwnProperty,K=String.prototype.trim,Q=function(e,t){return new Q.fn.init(e,t,j)},J=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,nt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,it=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^[\],:{}\s]*$/,ot=/(?:^|:|,)(?:\s*\[)+/g,at=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,lt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ct=/^-ms-/,ht=/-([\da-z])/gi,ut=function(e,t){return(t+"").toUpperCase()},dt=function(){B.addEventListener?(B.removeEventListener("DOMContentLoaded",dt,!1),Q.ready()):"complete"===B.readyState&&(B.detachEvent("onreadystatechange",dt),Q.ready())},ft={};Q.fn=Q.prototype={constructor:Q,init:function(e,n,i){var r,s,o;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:it.exec(e),r&&(r[1]||!n)){if(r[1])return n=n instanceof Q?n[0]:n,o=n&&n.nodeType?n.ownerDocument||n:B,e=Q.parseHTML(r[1],o,!0),rt.test(r[1])&&Q.isPlainObject(n)&&this.attr.call(e,n,!0),Q.merge(this,e);if(s=B.getElementById(r[2]),s&&s.parentNode){if(s.id!==r[2])return i.find(e);this.length=1,this[0]=s}return this.context=B,this.selector=e,this}return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e)}return Q.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Q.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return V.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,n){var i=Q.merge(this.constructor(),e);return i.prevObject=this,i.context=this.context,"find"===t?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return Q.each(this,e,t)},ready:function(e){return Q.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(V.apply(this,arguments),"slice",V.call(arguments).join(","))},map:function(e){return this.pushStack(Q.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},Q.fn.init.prototype=Q.fn,Q.extend=Q.fn.extend=function(){var e,n,i,r,s,o,a=arguments[0]||{},l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),"object"!=typeof a&&!Q.isFunction(a)&&(a={}),c===l&&(a=this,--l);c>l;l++)if(null!=(e=arguments[l]))for(n in e)i=a[n],r=e[n],a!==r&&(h&&r&&(Q.isPlainObject(r)||(s=Q.isArray(r)))?(s?(s=!1,o=i&&Q.isArray(i)?i:[]):o=i&&Q.isPlainObject(i)?i:{},a[n]=Q.extend(h,o,r)):r!==t&&(a[n]=r));return a},Q.extend({noConflict:function(t){return e.$===Q&&(e.$=W),t&&e.jQuery===Q&&(e.jQuery=$),Q},isReady:!1,readyWait:1,holdReady:function(e){e?Q.readyWait++:Q.ready(!0)},ready:function(e){if(e===!0?!--Q.readyWait:!Q.isReady){if(!B.body)return setTimeout(Q.ready,1);Q.isReady=!0,e!==!0&&--Q.readyWait>0||(P.resolveWith(B,[Q]),Q.fn.trigger&&Q(B).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===Q.type(e)},isArray:Array.isArray||function(e){return"array"===Q.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):ft[Y.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==Q.type(e)||e.nodeType||Q.isWindow(e))return!1;try{if(e.constructor&&!G.call(e,"constructor")&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||G.call(e,i)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var i;return e&&"string"==typeof e?("boolean"==typeof t&&(n=t,t=0),t=t||B,(i=rt.exec(e))?[t.createElement(i[1])]:(i=Q.buildFragment([e],t,n?null:[]),Q.merge([],(i.cacheable?Q.clone(i.fragment):i.fragment).childNodes))):null},parseJSON:function(t){return t&&"string"==typeof t?(t=Q.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):st.test(t.replace(at,"@").replace(lt,"]").replace(ot,""))?new Function("return "+t)():(Q.error("Invalid JSON: "+t),void 0)):null},parseXML:function(n){var i,r;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(s){i=t}return(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)&&Q.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ct,"ms-").replace(ht,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,i){var r,s=0,o=e.length,a=o===t||Q.isFunction(e);if(i)if(a){for(r in e)if(n.apply(e[r],i)===!1)break}else for(;o>s&&n.apply(e[s++],i)!==!1;);else if(a){for(r in e)if(n.call(e[r],r,e[r])===!1)break}else for(;o>s&&n.call(e[s],s,e[s++])!==!1;);return e},trim:K&&!K.call(" ")?function(e){return null==e?"":K.call(e)}:function(e){return null==e?"":(e+"").replace(nt,"")},makeArray:function(e,t){var n,i=t||[];return null!=e&&(n=Q.type(e),null==e.length||"string"===n||"function"===n||"regexp"===n||Q.isWindow(e)?U.call(i,e):Q.merge(i,e)),i},inArray:function(e,t,n){var i;if(t){if(X)return X.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var i=n.length,r=e.length,s=0;if("number"==typeof i)for(;i>s;s++)e[r++]=n[s];else for(;n[s]!==t;)e[r++]=n[s++];return e.length=r,e},grep:function(e,t,n){var i,r=[],s=0,o=e.length;for(n=!!n;o>s;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,i){var r,s,o=[],a=0,l=e.length,c=e instanceof Q||l!==t&&"number"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||Q.isArray(e));if(c)for(;l>a;a++)r=n(e[a],a,i),null!=r&&(o[o.length]=r);else for(s in e)r=n(e[s],s,i),null!=r&&(o[o.length]=r);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var i,r,s;return"string"==typeof n&&(i=e[n],n=e,e=i),Q.isFunction(e)?(r=V.call(arguments,2),s=function(){return e.apply(n,r.concat(V.call(arguments)))},s.guid=e.guid=e.guid||Q.guid++,s):t},access:function(e,n,i,r,s,o,a){var l,c=null==i,h=0,u=e.length;if(i&&"object"==typeof i){for(h in i)Q.access(e,n,h,i[h],1,o,r);s=1}else if(r!==t){if(l=a===t&&Q.isFunction(r),c&&(l?(l=n,n=function(e,t,n){return l.call(Q(e),n)}):(n.call(e,r),n=null)),n)for(;u>h;h++)n(e[h],i,l?r.call(e[h],h,n(e[h],i)):r,a);s=1}return s?e:c?n.call(e):u?n(e[0],i):o},now:function(){return(new Date).getTime()}}),Q.ready.promise=function(t){if(!P)if(P=Q.Deferred(),"complete"===B.readyState)setTimeout(Q.ready,1);else if(B.addEventListener)B.addEventListener("DOMContentLoaded",dt,!1),e.addEventListener("load",Q.ready,!1);else{B.attachEvent("onreadystatechange",dt),e.attachEvent("onload",Q.ready);var n=!1;try{n=null==e.frameElement&&B.documentElement}catch(i){}n&&n.doScroll&&function r(){if(!Q.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}Q.ready()}}()}return P.promise(t)},Q.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){ft["[object "+t+"]"]=t.toLowerCase()}),j=Q(B);var pt={};Q.Callbacks=function(e){e="string"==typeof e?pt[e]||n(e):Q.extend({},e);var i,r,s,o,a,l,c=[],h=!e.once&&[],u=function(t){for(i=e.memory&&t,r=!0,l=o||0,o=0,a=c.length,s=!0;c&&a>l;l++)if(c[l].apply(t[0],t[1])===!1&&e.stopOnFalse){i=!1;break}s=!1,c&&(h?h.length&&u(h.shift()):i?c=[]:d.disable())},d={add:function(){if(c){var t=c.length;(function n(t){Q.each(t,function(t,i){var r=Q.type(i);"function"===r?(!e.unique||!d.has(i))&&c.push(i):i&&i.length&&"string"!==r&&n(i)})})(arguments),s?a=c.length:i&&(o=t,u(i))}return this},remove:function(){return c&&Q.each(arguments,function(e,t){for(var n;(n=Q.inArray(t,c,n))>-1;)c.splice(n,1),s&&(a>=n&&a--,l>=n&&l--)}),this},has:function(e){return Q.inArray(e,c)>-1},empty:function(){return c=[],this},disable:function(){return c=h=i=t,this},disabled:function(){return!c},lock:function(){return h=t,i||d.disable(),this},locked:function(){return!h},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],c&&(!r||h)&&(s?h.push(t):u(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},Q.extend({Deferred:function(e){var t=[["resolve","done",Q.Callbacks("once memory"),"resolved"],["reject","fail",Q.Callbacks("once memory"),"rejected"],["notify","progress",Q.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Q.Deferred(function(n){Q.each(t,function(t,i){var s=i[0],o=e[t];r[i[1]](Q.isFunction(o)?function(){var e=o.apply(this,arguments);e&&Q.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return null!=e?Q.extend(e,i):i}},r={};return i.pipe=i.then,Q.each(t,function(e,s){var o=s[2],a=s[3];i[s[1]]=o.add,a&&o.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),r[s[0]]=o.fire,r[s[0]+"With"]=o.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,s=V.call(arguments),o=s.length,a=1!==o||e&&Q.isFunction(e.promise)?o:0,l=1===a?e:Q.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?V.call(arguments):r,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(o>1)for(t=new Array(o),n=new Array(o),i=new Array(o);o>r;r++)s[r]&&Q.isFunction(s[r].promise)?s[r].promise().done(c(r,i,s)).fail(l.reject).progress(c(r,n,t)):--a;return a||l.resolveWith(i,s),l.promise()}}),Q.support=function(){var t,n,i,r,s,o,a,l,c,h,u,d=B.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0],!n||!i||!n.length)return{};r=B.createElement("select"),s=r.appendChild(B.createElement("option")),o=d.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:"on"===o.value,optSelected:s.selected,getSetAttribute:"t"!==d.className,enctype:!!B.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==B.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===B.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,r.disabled=!0,t.optDisabled=!s.disabled;try{delete d.test}catch(f){t.deleteExpando=!1}if(!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",u=function(){t.noCloneEvent=!1}),d.cloneNode(!0).fireEvent("onclick"),d.detachEvent("onclick",u)),o=B.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","checked"),o.setAttribute("name","t"),d.appendChild(o),a=B.createDocumentFragment(),a.appendChild(d.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,a.removeChild(o),a.appendChild(d),d.attachEvent)for(c in{submit:!0,change:!0,focusin:!0})l="on"+c,h=l in d,h||(d.setAttribute(l,"return;"),h="function"==typeof d[l]),t[c+"Bubbles"]=h;return Q(function(){var n,i,r,s,o="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=B.getElementsByTagName("body")[0];a&&(n=B.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),i=B.createElement("div"),n.appendChild(i),i.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=i.getElementsByTagName("td"),r[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===r[0].offsetHeight,r[0].style.display="",r[1].style.display="none",t.reliableHiddenOffsets=h&&0===r[0].offsetHeight,i.innerHTML="",i.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===i.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,s=B.createElement("div"),s.style.cssText=i.style.cssText=o,s.style.marginRight=s.style.width="0",i.style.width="1px",i.appendChild(s),t.reliableMarginRight=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),"undefined"!=typeof i.style.zoom&&(i.innerHTML="",i.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===i.offsetWidth,i.style.display="block",i.style.overflow="visible",i.innerHTML="<div></div>",i.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==i.offsetWidth,n.style.zoom=1),a.removeChild(n),n=i=r=s=null)}),a.removeChild(d),n=i=r=s=o=a=d=null,t}();var gt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,mt=/([A-Z])/g;Q.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(Q.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?Q.cache[e[Q.expando]]:e[Q.expando],!!e&&!r(e)},data:function(e,n,i,r){if(Q.acceptData(e)){var s,o,a=Q.expando,l="string"==typeof n,c=e.nodeType,h=c?Q.cache:e,u=c?e[a]:e[a]&&a;if(u&&h[u]&&(r||h[u].data)||!l||i!==t)return u||(c?e[a]=u=Q.deletedIds.pop()||Q.guid++:u=a),h[u]||(h[u]={},c||(h[u].toJSON=Q.noop)),("object"==typeof n||"function"==typeof n)&&(r?h[u]=Q.extend(h[u],n):h[u].data=Q.extend(h[u].data,n)),s=h[u],r||(s.data||(s.data={}),s=s.data),i!==t&&(s[Q.camelCase(n)]=i),l?(o=s[n],null==o&&(o=s[Q.camelCase(n)])):o=s,o}},removeData:function(e,t,n){if(Q.acceptData(e)){var i,s,o,a=e.nodeType,l=a?Q.cache:e,c=a?e[Q.expando]:Q.expando;if(l[c]){if(t&&(i=n?l[c]:l[c].data)){Q.isArray(t)||(t in i?t=[t]:(t=Q.camelCase(t),t=t in i?[t]:t.split(" ")));for(s=0,o=t.length;o>s;s++)delete i[t[s]];if(!(n?r:Q.isEmptyObject)(i))return}(n||(delete l[c].data,r(l[c])))&&(a?Q.cleanData([e],!0):Q.support.deleteExpando||l!=l.window?delete l[c]:l[c]=null)}}},_data:function(e,t,n){return Q.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&Q.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),Q.fn.extend({data:function(e,n){var r,s,o,a,l,c=this[0],h=0,u=null;if(e===t){if(this.length&&(u=Q.data(c),1===c.nodeType&&!Q._data(c,"parsedAttrs"))){for(o=c.attributes,l=o.length;l>h;h++)a=o[h].name,a.indexOf("data-")||(a=Q.camelCase(a.substring(5)),i(c,a,u[a]));Q._data(c,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){Q.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",s=r[1]+"!",Q.access(this,function(n){return n===t?(u=this.triggerHandler("getData"+s,[r[0]]),u===t&&c&&(u=Q.data(c,e),u=i(c,e,u)),u===t&&r[1]?this.data(r[0]):u):(r[1]=n,this.each(function(){var t=Q(this);t.triggerHandler("setData"+s,r),Q.data(this,e,n),t.triggerHandler("changeData"+s,r)}),void 0)},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Q.removeData(this,e)})}}),Q.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=Q._data(e,t),n&&(!i||Q.isArray(n)?i=Q._data(e,t,Q.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Q.queue(e,t),i=n.length,r=n.shift(),s=Q._queueHooks(e,t),o=function(){Q.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,o,s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q._data(e,n)||Q._data(e,n,{empty:Q.Callbacks("once memory").add(function(){Q.removeData(e,t+"queue",!0),Q.removeData(e,n,!0)})})}}),Q.fn.extend({queue:function(e,n){var i=2;return"string"!=typeof e&&(n=e,e="fx",i--),i>arguments.length?Q.queue(this[0],e):n===t?this:this.each(function(){var t=Q.queue(this,e,n);Q._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&Q.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Q.dequeue(this,e)})},delay:function(e,t){return e=Q.fx?Q.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var i,r=1,s=Q.Deferred(),o=this,a=this.length,l=function(){--r||s.resolveWith(o,[o])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";a--;)i=Q._data(o[a],e+"queueHooks"),i&&i.empty&&(r++,i.empty.add(l));return l(),s.promise(n)}});var yt,vt,bt,wt=/[\t\r\n]/g,_t=/\r/g,xt=/^(?:button|input)$/i,Ct=/^(?:button|input|object|select|textarea)$/i,Tt=/^a(?:rea|)$/i,Et=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,kt=Q.support.getSetAttribute;
|
||
Q.fn.extend({attr:function(e,t){return Q.access(this,Q.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Q.removeAttr(this,e)})},prop:function(e,t){return Q.access(this,Q.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Q.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,i,r,s,o,a;if(Q.isFunction(e))return this.each(function(t){Q(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(tt),n=0,i=this.length;i>n;n++)if(r=this[n],1===r.nodeType)if(r.className||1!==t.length){for(s=" "+r.className+" ",o=0,a=t.length;a>o;o++)0>s.indexOf(" "+t[o]+" ")&&(s+=t[o]+" ");r.className=Q.trim(s)}else r.className=e;return this},removeClass:function(e){var n,i,r,s,o,a,l;if(Q.isFunction(e))return this.each(function(t){Q(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(tt),a=0,l=this.length;l>a;a++)if(r=this[a],1===r.nodeType&&r.className){for(i=(" "+r.className+" ").replace(wt," "),s=0,o=n.length;o>s;s++)for(;i.indexOf(" "+n[s]+" ")>=0;)i=i.replace(" "+n[s]+" "," ");r.className=e?Q.trim(i):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return Q.isFunction(e)?this.each(function(n){Q(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var r,s=0,o=Q(this),a=t,l=e.split(tt);r=l[s++];)a=i?a:!o.hasClass(r),o[a?"addClass":"removeClass"](r);else("undefined"===n||"boolean"===n)&&(this.className&&Q._data(this,"__className__",this.className),this.className=this.className||e===!1?"":Q._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(wt," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,i,r,s=this[0];{if(arguments.length)return r=Q.isFunction(e),this.each(function(i){var s,o=Q(this);1===this.nodeType&&(s=r?e.call(this,i,o.val()):e,null==s?s="":"number"==typeof s?s+="":Q.isArray(s)&&(s=Q.map(s,function(e){return null==e?"":e+""})),n=Q.valHooks[this.type]||Q.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,s,"value")!==t||(this.value=s))});if(s)return n=Q.valHooks[s.type]||Q.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(s,"value"))!==t?i:(i=s.value,"string"==typeof i?i.replace(_t,""):null==i?"":i)}}}),Q.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,s="select-one"===e.type||0>r,o=s?null:[],a=s?r+1:i.length,l=0>r?a:s?r:0;a>l;l++)if(n=i[l],!(!n.selected&&l!==r||(Q.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Q.nodeName(n.parentNode,"optgroup"))){if(t=Q(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n=Q.makeArray(t);return Q(e).find("option").each(function(){this.selected=Q.inArray(Q(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,i,r){var s,o,a,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return r&&Q.isFunction(Q.fn[n])?Q(e)[n](i):"undefined"==typeof e.getAttribute?Q.prop(e,n,i):(a=1!==l||!Q.isXMLDoc(e),a&&(n=n.toLowerCase(),o=Q.attrHooks[n]||(Et.test(n)?vt:yt)),i!==t?null===i?(Q.removeAttr(e,n),void 0):o&&"set"in o&&a&&(s=o.set(e,i,n))!==t?s:(e.setAttribute(n,i+""),i):o&&"get"in o&&a&&null!==(s=o.get(e,n))?s:(s=e.getAttribute(n),null===s?t:s))},removeAttr:function(e,t){var n,i,r,s,o=0;if(t&&1===e.nodeType)for(i=t.split(tt);i.length>o;o++)r=i[o],r&&(n=Q.propFix[r]||r,s=Et.test(r),s||Q.attr(e,r,""),e.removeAttribute(kt?r:n),s&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(xt.test(e.nodeName)&&e.parentNode)Q.error("type property can't be changed");else if(!Q.support.radioValue&&"radio"===t&&Q.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return yt&&Q.nodeName(e,"button")?yt.get(e,t):t in e?e.value:null},set:function(e,t,n){return yt&&Q.nodeName(e,"button")?yt.set(e,t,n):(e.value=t,void 0)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,i){var r,s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!Q.isXMLDoc(e),o&&(n=Q.propFix[n]||n,s=Q.propHooks[n]),i!==t?s&&"set"in s&&(r=s.set(e,i,n))!==t?r:e[n]=i:s&&"get"in s&&null!==(r=s.get(e,n))?r:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Ct.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:t}}}}),vt={get:function(e,n){var i,r=Q.prop(e,n);return r===!0||"boolean"!=typeof r&&(i=e.getAttributeNode(n))&&i.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var i;return t===!1?Q.removeAttr(e,n):(i=Q.propFix[n]||n,i in e&&(e[i]=!0),e.setAttribute(n,n.toLowerCase())),n}},kt||(bt={name:!0,id:!0,coords:!0},yt=Q.valHooks.button={get:function(e,n){var i;return i=e.getAttributeNode(n),i&&(bt[n]?""!==i.value:i.specified)?i.value:t},set:function(e,t,n){var i=e.getAttributeNode(n);return i||(i=B.createAttribute(n),e.setAttributeNode(i)),i.value=t+""}},Q.each(["width","height"],function(e,t){Q.attrHooks[t]=Q.extend(Q.attrHooks[t],{set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}})}),Q.attrHooks.contenteditable={get:yt.get,set:function(e,t,n){""===t&&(t="false"),yt.set(e,t,n)}}),Q.support.hrefNormalized||Q.each(["href","src","width","height"],function(e,n){Q.attrHooks[n]=Q.extend(Q.attrHooks[n],{get:function(e){var i=e.getAttribute(n,2);return null===i?t:i}})}),Q.support.style||(Q.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),Q.support.optSelected||(Q.propHooks.selected=Q.extend(Q.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Q.support.enctype||(Q.propFix.enctype="encoding"),Q.support.checkOn||Q.each(["radio","checkbox"],function(){Q.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),Q.each(["radio","checkbox"],function(){Q.valHooks[this]=Q.extend(Q.valHooks[this],{set:function(e,t){return Q.isArray(t)?e.checked=Q.inArray(Q(e).val(),t)>=0:void 0}})});var Nt=/^(?:textarea|input|select)$/i,At=/^([^\.]*|)(?:\.(.+)|)$/,St=/(?:^|\s)hover(\.\S+|)\b/,Dt=/^key/,Mt=/^(?:mouse|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){return Q.event.special.hover?e:e.replace(St,"mouseenter$1 mouseleave$1")};Q.event={add:function(e,n,i,r,s){var o,a,l,c,h,u,d,f,p,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&i&&(o=Q._data(e))){for(i.handler&&(p=i,i=p.handler,s=p.selector),i.guid||(i.guid=Q.guid++),l=o.events,l||(o.events=l={}),a=o.handle,a||(o.handle=a=function(e){return"undefined"==typeof Q||e&&Q.event.triggered===e.type?t:Q.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=Q.trim(Lt(n)).split(" "),c=0;n.length>c;c++)h=At.exec(n[c])||[],u=h[1],d=(h[2]||"").split(".").sort(),m=Q.event.special[u]||{},u=(s?m.delegateType:m.bindType)||u,m=Q.event.special[u]||{},f=Q.extend({type:u,origType:h[1],data:r,handler:i,guid:i.guid,selector:s,needsContext:s&&Q.expr.match.needsContext.test(s),namespace:d.join(".")},p),g=l[u],g||(g=l[u]=[],g.delegateCount=0,m.setup&&m.setup.call(e,r,d,a)!==!1||(e.addEventListener?e.addEventListener(u,a,!1):e.attachEvent&&e.attachEvent("on"+u,a))),m.add&&(m.add.call(e,f),f.handler.guid||(f.handler.guid=i.guid)),s?g.splice(g.delegateCount++,0,f):g.push(f),Q.event.global[u]=!0;e=null}},global:{},remove:function(e,t,n,i,r){var s,o,a,l,c,h,u,d,f,p,g,m=Q.hasData(e)&&Q._data(e);if(m&&(d=m.events)){for(t=Q.trim(Lt(t||"")).split(" "),s=0;t.length>s;s++)if(o=At.exec(t[s])||[],a=l=o[1],c=o[2],a){for(f=Q.event.special[a]||{},a=(i?f.delegateType:f.bindType)||a,p=d[a]||[],h=p.length,c=c?new RegExp("(^|\\.)"+c.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u=0;p.length>u;u++)g=p[u],!(!r&&l!==g.origType||n&&n.guid!==g.guid||c&&!c.test(g.namespace)||i&&i!==g.selector&&("**"!==i||!g.selector)||(p.splice(u--,1),g.selector&&p.delegateCount--,!f.remove||!f.remove.call(e,g)));0===p.length&&h!==p.length&&((!f.teardown||f.teardown.call(e,c,m.handle)===!1)&&Q.removeEvent(e,a,m.handle),delete d[a])}else for(a in d)Q.event.remove(e,a+t[s],n,i,!0);Q.isEmptyObject(d)&&(delete m.handle,Q.removeData(e,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,i,r,s){if(!r||3!==r.nodeType&&8!==r.nodeType){var o,a,l,c,h,u,d,f,p,g,m=n.type||n,y=[];if(Rt.test(m+Q.event.triggered))return;if(m.indexOf("!")>=0&&(m=m.slice(0,-1),a=!0),m.indexOf(".")>=0&&(y=m.split("."),m=y.shift(),y.sort()),(!r||Q.event.customEvent[m])&&!Q.event.global[m])return;if(n="object"==typeof n?n[Q.expando]?n:new Q.Event(m,n):new Q.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=a,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u=0>m.indexOf(":")?"on"+m:"",!r){o=Q.cache;for(l in o)o[l].events&&o[l].events[m]&&Q.event.trigger(n,i,o[l].handle.elem,!0);return}if(n.result=t,n.target||(n.target=r),i=null!=i?Q.makeArray(i):[],i.unshift(n),d=Q.event.special[m]||{},d.trigger&&d.trigger.apply(r,i)===!1)return;if(p=[[r,d.bindType||m]],!s&&!d.noBubble&&!Q.isWindow(r)){for(g=d.delegateType||m,c=Rt.test(g+m)?r:r.parentNode,h=r;c;c=c.parentNode)p.push([c,g]),h=c;h===(r.ownerDocument||B)&&p.push([h.defaultView||h.parentWindow||e,g])}for(l=0;p.length>l&&!n.isPropagationStopped();l++)c=p[l][0],n.type=p[l][1],f=(Q._data(c,"events")||{})[n.type]&&Q._data(c,"handle"),f&&f.apply(c,i),f=u&&c[u],f&&Q.acceptData(c)&&f.apply&&f.apply(c,i)===!1&&n.preventDefault();return n.type=m,!(s||n.isDefaultPrevented()||d._default&&d._default.apply(r.ownerDocument,i)!==!1||"click"===m&&Q.nodeName(r,"a")||!Q.acceptData(r)||!u||!r[m]||("focus"===m||"blur"===m)&&0===n.target.offsetWidth||Q.isWindow(r)||(h=r[u],h&&(r[u]=null),Q.event.triggered=m,r[m](),Q.event.triggered=t,!h||!(r[u]=h))),n.result}},dispatch:function(n){n=Q.event.fix(n||e.event);var i,r,s,o,a,l,c,h,u,d=(Q._data(this,"events")||{})[n.type]||[],f=d.delegateCount,p=V.call(arguments),g=!n.exclusive&&!n.namespace,m=Q.event.special[n.type]||{},y=[];if(p[0]=n,n.delegateTarget=this,!m.preDispatch||m.preDispatch.call(this,n)!==!1){if(f&&(!n.button||"click"!==n.type))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||"click"!==n.type){for(a={},c=[],i=0;f>i;i++)h=d[i],u=h.selector,a[u]===t&&(a[u]=h.needsContext?Q(u,this).index(s)>=0:Q.find(u,this,null,[s]).length),a[u]&&c.push(h);c.length&&y.push({elem:s,matches:c})}for(d.length>f&&y.push({elem:this,matches:d.slice(f)}),i=0;y.length>i&&!n.isPropagationStopped();i++)for(l=y[i],n.currentTarget=l.elem,r=0;l.matches.length>r&&!n.isImmediatePropagationStopped();r++)h=l.matches[r],(g||!n.namespace&&!h.namespace||n.namespace_re&&n.namespace_re.test(h.namespace))&&(n.data=h.data,n.handleObj=h,o=((Q.event.special[h.origType]||{}).handle||h.handler).apply(l.elem,p),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation())));return m.postDispatch&&m.postDispatch.call(this,n),n.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var i,r,s,o=n.button,a=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||B,r=i.documentElement,s=i.body,e.pageX=n.clientX+(r&&r.scrollLeft||s&&s.scrollLeft||0)-(r&&r.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(r&&r.scrollTop||s&&s.scrollTop||0)-(r&&r.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&o!==t&&(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Q.expando])return e;var t,n,i=e,r=Q.event.fixHooks[e.type]||{},s=r.props?this.props.concat(r.props):this.props;for(e=Q.Event(i),t=s.length;t;)n=s[--t],e[n]=i[n];return e.target||(e.target=i.srcElement||B),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,r.filter?r.filter(e,i):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){Q.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,i){var r=Q.extend(new Q.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Q.event.trigger(r,null,t):Q.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},Q.event.handle=Q.event.dispatch,Q.removeEvent=B.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&("undefined"==typeof e[i]&&(e[i]=null),e.detachEvent(i,n))},Q.Event=function(e,t){return this instanceof Q.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&Q.extend(this,t),this.timeStamp=e&&e.timeStamp||Q.now(),this[Q.expando]=!0,void 0):new Q.Event(e,t)},Q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},Q.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Q.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,s=e.handleObj;return s.selector,(!r||r!==i&&!Q.contains(i,r))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),Q.support.submitBubbles||(Q.event.special.submit={setup:function(){return Q.nodeName(this,"form")?!1:(Q.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,i=Q.nodeName(n,"input")||Q.nodeName(n,"button")?n.form:t;i&&!Q._data(i,"_submit_attached")&&(Q.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),Q._data(i,"_submit_attached",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Q.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return Q.nodeName(this,"form")?!1:(Q.event.remove(this,"._submit"),void 0)}}),Q.support.changeBubbles||(Q.event.special.change={setup:function(){return Nt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(Q.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),Q.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),Q.event.simulate("change",this,e,!0)})),!1):(Q.event.add(this,"beforeactivate._change",function(e){var t=e.target;Nt.test(t.nodeName)&&!Q._data(t,"_change_attached")&&(Q.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&Q.event.simulate("change",this.parentNode,e,!0)}),Q._data(t,"_change_attached",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return Q.event.remove(this,"._change"),!Nt.test(this.nodeName)}}),Q.support.focusinBubbles||Q.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,i=function(e){Q.event.simulate(t,e.target,Q.event.fix(e),!0)};Q.event.special[t]={setup:function(){0===n++&&B.addEventListener(e,i,!0)},teardown:function(){0===--n&&B.removeEventListener(e,i,!0)}}}),Q.fn.extend({on:function(e,n,i,r,o){var a,l;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=t);for(l in e)this.on(l,n,i,e[l],o);return this}if(null==i&&null==r?(r=n,i=n=t):null==r&&("string"==typeof n?(r=i,i=t):(r=i,i=n,n=t)),r===!1)r=s;else if(!r)return this;return 1===o&&(a=r,r=function(e){return Q().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=Q.guid++)),this.each(function(){Q.event.add(this,e,r,i,n)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,n,i){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Q(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(i=n,n=t),i===!1&&(i=s),this.each(function(){Q.event.remove(this,e,i,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return Q(this.context).on(e,this.selector,t,n),this},die:function(e,t){return Q(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){Q.event.trigger(e,t,this)})},triggerHandler:function(e,t){return this[0]?Q.event.trigger(e,t,this[0],!0):void 0},toggle:function(e){var t=arguments,n=e.guid||Q.guid++,i=0,r=function(n){var r=(Q._data(this,"lastToggle"+e.guid)||0)%i;return Q._data(this,"lastToggle"+e.guid,r+1),n.preventDefault(),t[r].apply(this,arguments)||!1};for(r.guid=n;t.length>i;)t[i++].guid=n;return this.click(r)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Q.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Dt.test(t)&&(Q.event.fixHooks[t]=Q.event.keyHooks),Mt.test(t)&&(Q.event.fixHooks[t]=Q.event.mouseHooks)}),function(e,t){function n(e,t,n,i){n=n||[],t=t||M;var r,s,o,a,l=t.nodeType;if(!e||"string"!=typeof e)return n;if(1!==l&&9!==l)return[];if(o=_(t),!o&&!i&&(r=nt.exec(e)))if(a=r[1]){if(9===l){if(s=t.getElementById(a),!s||!s.parentNode)return n;if(s.id===a)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&x(t,s)&&s.id===a)return n.push(s),n}else{if(r[2])return F.apply(n,I.call(t.getElementsByTagName(e),0)),n;if((a=r[3])&&dt&&t.getElementsByClassName)return F.apply(n,I.call(t.getElementsByClassName(a),0)),n}return g(e.replace(K,"$1"),t,n,i,o)}function i(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function r(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function s(e){return j(function(t){return t=+t,j(function(n,i){for(var r,s=e([],n.length,t),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))})})}function o(e,t,n){if(e===t)return n;for(var i=e.nextSibling;i;){if(i===t)return-1;i=i.nextSibling}return 1}function a(e,t){var i,r,s,o,a,l,c,h=q[S][e+" "];if(h)return t?0:h.slice(0);for(a=e,l=[],c=b.preFilter;a;){(!i||(r=J.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(s=[])),i=!1,(r=et.exec(a))&&(s.push(i=new D(r.shift())),a=a.slice(i.length),i.type=r[0].replace(K," "));for(o in b.filter)(r=at[o].exec(a))&&(!c[o]||(r=c[o](r)))&&(s.push(i=new D(r.shift())),a=a.slice(i.length),i.type=o,i.matches=r);if(!i)break}return t?a.length:a?n.error(e):q(e,l).slice(0)}function l(e,t,n){var i=t.dir,r=n&&"parentNode"===t.dir,s=z++;return t.first?function(t,n,s){for(;t=t[i];)if(r||1===t.nodeType)return e(t,n,s)}:function(t,n,o){if(o){for(;t=t[i];)if((r||1===t.nodeType)&&e(t,n,o))return t}else for(var a,l=L+" "+s+" ",c=l+y;t=t[i];)if(r||1===t.nodeType){if((a=t[S])===c)return t.sizset;if("string"==typeof a&&0===a.indexOf(l)){if(t.sizset)return t}else{if(t[S]=c,e(t,n,o))return t.sizset=!0,t;t.sizset=!1}}}}function c(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function h(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,c=null!=t;l>a;a++)(s=e[a])&&(!n||n(s,i,r))&&(o.push(s),c&&t.push(a));return o}function u(e,t,n,i,r,s){return i&&!i[S]&&(i=u(i)),r&&!r[S]&&(r=u(r,s)),j(function(s,o,a,l){var c,u,d,f=[],g=[],m=o.length,y=s||p(t||"*",a.nodeType?[a]:a,[]),v=!e||!s&&t?y:h(y,f,e,a,l),b=n?r||(s?e:m||i)?[]:o:v;if(n&&n(v,b,a,l),i)for(c=h(b,g),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(b[g[u]]=!(v[g[u]]=d));if(s){if(r||e){if(r){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);r(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=r?H.call(s,d):f[u])>-1&&(s[c]=!(o[c]=d))}}else b=h(b===o?b.splice(m,b.length):b),r?r(null,o,b,l):F.apply(o,b)})}function d(e){for(var t,n,i,r=e.length,s=b.relative[e[0].type],o=s||b.relative[" "],a=s?1:0,h=l(function(e){return e===t},o,!0),f=l(function(e){return H.call(t,e)>-1},o,!0),p=[function(e,n,i){return!s&&(i||n!==k)||((t=n).nodeType?h(e,n,i):f(e,n,i))}];r>a;a++)if(n=b.relative[e[a].type])p=[l(c(p),n)];else{if(n=b.filter[e[a].type].apply(null,e[a].matches),n[S]){for(i=++a;r>i&&!b.relative[e[i].type];i++);return u(a>1&&c(p),a>1&&e.slice(0,a-1).join("").replace(K,"$1"),n,i>a&&d(e.slice(a,i)),r>i&&d(e=e.slice(i)),r>i&&e.join(""))}p.push(n)}return c(p)}function f(e,t){var i=t.length>0,r=e.length>0,s=function(o,a,l,c,u){var d,f,p,g=[],m=0,v="0",w=o&&[],_=null!=u,x=k,C=o||r&&b.find.TAG("*",u&&a.parentNode||a),T=L+=null==x?1:Math.E;for(_&&(k=a!==M&&a,y=s.el);null!=(d=C[v]);v++){if(r&&d){for(f=0;p=e[f];f++)if(p(d,a,l)){c.push(d);break}_&&(L=T,y=++s.el)}i&&((d=!p&&d)&&m--,o&&w.push(d))}if(m+=v,i&&v!==m){for(f=0;p=t[f];f++)p(w,g,a,l);if(o){if(m>0)for(;v--;)!w[v]&&!g[v]&&(g[v]=O.call(c));g=h(g)}F.apply(c,g),_&&!o&&g.length>0&&m+t.length>1&&n.uniqueSort(c)}return _&&(L=T,k=x),w};return s.el=0,i?j(s):s}function p(e,t,i){for(var r=0,s=t.length;s>r;r++)n(e,t[r],i);return i}function g(e,t,n,i,r){var s,o,l,c,h,u=a(e);if(u.length,!i&&1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(l=o[0]).type&&9===t.nodeType&&!r&&b.relative[o[1].type]){if(t=b.find.ID(l.matches[0].replace(ot,""),t,r)[0],!t)return n;e=e.slice(o.shift().length)}for(s=at.POS.test(e)?-1:o.length-1;s>=0&&(l=o[s],!b.relative[c=l.type]);s--)if((h=b.find[c])&&(i=h(l.matches[0].replace(ot,""),it.test(o[0].type)&&t.parentNode||t,r))){if(o.splice(s,1),e=i.length&&o.join(""),!e)return F.apply(n,I.call(i,0)),n;break}}return C(e,u)(i,t,r,n,it.test(e)),n}function m(){}var y,v,b,w,_,x,C,T,E,k,N=!0,A="undefined",S=("sizcache"+Math.random()).replace(".",""),D=String,M=e.document,R=M.documentElement,L=0,z=0,O=[].pop,F=[].push,I=[].slice,H=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},j=function(e,t){return e[S]=null==t||t,e},P=function(){var e={},t=[];return j(function(n,i){return t.push(n)>b.cacheLength&&delete e[t.shift()],e[n+" "]=i},e)},B=P(),q=P(),Z=P(),$="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",U=W.replace("w","w#"),V="([*^$|!~]?=)",X="\\["+$+"*("+W+")"+$+"*(?:"+V+$+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)"+$+"*\\]",Y=":("+W+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+X+")|[^:]|\\\\.)*|.*))\\)|)",G=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$+"*((?:-\\d)?\\d*)"+$+"*\\)|)(?=[^-]|$)",K=new RegExp("^"+$+"+|((?:^|[^\\\\])(?:\\\\.)*)"+$+"+$","g"),J=new RegExp("^"+$+"*,"+$+"*"),et=new RegExp("^"+$+"*([\\x20\\t\\r\\n\\f>+~])"+$+"*"),tt=new RegExp(Y),nt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,it=/[\x20\t\r\n\f]*[+~]/,rt=/h\d/i,st=/input|select|textarea|button/i,ot=/\\(?!\\)/g,at={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),NAME:new RegExp("^\\[name=['\"]?("+W+")['\"]?\\]"),TAG:new RegExp("^("+W.replace("w","w*")+")"),ATTR:new RegExp("^"+X),PSEUDO:new RegExp("^"+Y),POS:new RegExp(G,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+$+"*(even|odd|(([+-]|)(\\d*)n|)"+$+"*(?:([+-]|)"+$+"*(\\d+)|))"+$+"*\\)|)","i"),needsContext:new RegExp("^"+$+"*[>+~]|"+G,"i")},lt=function(e){var t=M.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},ct=lt(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),ht=lt(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")}),ut=lt(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),dt=lt(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),ft=lt(function(e){e.id=S+0,e.innerHTML="<a name='"+S+"'></a><div name='"+S+"'></div>",R.insertBefore(e,R.firstChild);var t=M.getElementsByName&&M.getElementsByName(S).length===2+M.getElementsByName(S+0).length;return v=!M.getElementById(S),R.removeChild(e),t});try{I.call(R.childNodes,0)[0].nodeType}catch(pt){I=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){return n(t,null,null,[e]).length>0},w=n.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=w(t);return n},_=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},x=n.contains=R.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!!(i&&1===i.nodeType&&n.contains&&n.contains(i))}:R.compareDocumentPosition?function(e,t){return t&&!!(16&e.compareDocumentPosition(t))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},n.attr=function(e,t){var n,i=_(e);return i||(t=t.toLowerCase()),(n=b.attrHandle[t])?n(e):i||ut?e.getAttribute(t):(n=e.getAttributeNode(t),n?"boolean"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},b=n.selectors={cacheLength:50,createPseudo:j,match:at,attrHandle:ht?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:v?function(e,t,n){if(typeof t.getElementById!==A&&!n){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}}:function(e,n,i){if(typeof n.getElementById!==A&&!i){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},TAG:ct?function(e,t){return typeof t.getElementsByTagName!==A?t.getElementsByTagName(e):void 0}:function(e,t){var n=t.getElementsByTagName(e);if("*"===e){for(var i,r=[],s=0;i=n[s];s++)1===i.nodeType&&r.push(i);return r}return n},NAME:ft&&function(e,t){return typeof t.getElementsByName!==A?t.getElementsByName(name):void 0},CLASS:dt&&function(e,t,n){return typeof t.getElementsByClassName===A||n?void 0:t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ot,""),e[3]=(e[4]||e[5]||"").replace(ot,""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1]?(e[2]||n.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*("even"===e[2]||"odd"===e[2])),e[4]=+(e[6]+e[7]||"odd"===e[2])):e[2]&&n.error(e[0]),e},PSEUDO:function(e){var t,n;return at.CHILD.test(e[0])?null:(e[3]?e[2]=e[3]:(t=e[4])&&(tt.test(t)&&(n=a(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t),e.slice(0,3))}},filter:{ID:v?function(e){return e=e.replace(ot,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(ot,""),function(t){var n=typeof t.getAttributeNode!==A&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(ot,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=B[S][e+" "];return t||(t=new RegExp("(^|"+$+")"+e+"("+$+"|$)"))&&B(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,i){return function(r){var s=n.attr(r,e);return null==s?"!="===t:t?(s+="","="===t?s===i:"!="===t?s!==i:"^="===t?i&&0===s.indexOf(i):"*="===t?i&&s.indexOf(i)>-1:"$="===t?i&&s.substr(s.length-i.length)===i:"~="===t?(" "+s+" ").indexOf(i)>-1:"|="===t?s===i||s.substr(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i){return"nth"===e?function(e){var t,r,s=e.parentNode;if(1===n&&0===i)return!0;if(s)for(r=0,t=s.firstChild;t&&(1!==t.nodeType||(r++,e!==t));t=t.nextSibling);return r-=i,r===n||0===r%n&&r/n>=0}:function(t){var n=t;switch(e){case"only":case"first":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if("first"===e)return!0;n=t;case"last":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t){var i,r=b.pseudos[e]||b.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return r[S]?r(t):r.length>1?(i=[e,e,"",t],b.setFilters.hasOwnProperty(e.toLowerCase())?j(function(e,n){for(var i,s=r(e,t),o=s.length;o--;)i=H.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,i)}):r}},pseudos:{not:j(function(e){var t=[],n=[],i=C(e.replace(K,"$1"));return i[S]?j(function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,r,s){return t[0]=e,i(t,null,s,n),!n.pop()}}),has:j(function(e){return function(t){return n(e,t).length>0}}),contains:j(function(e){return function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!b.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>"@"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},header:function(e){return rt.test(e.nodeName)},text:function(e){var t,n;return"input"===e.nodeName.toLowerCase()&&"text"===(t=e.type)&&(null==(n=e.getAttribute("type"))||n.toLowerCase()===t)},radio:i("radio"),checkbox:i("checkbox"),file:i("file"),password:i("password"),image:i("image"),submit:r("submit"),reset:r("reset"),button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return st.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[0>n?n+t:n]}),even:s(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=0>n?n+t:n;t>++i;)e.push(i);return e})}},T=R.compareDocumentPosition?function(e,t){return e===t?(E=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:function(e,t){if(e===t)return E=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,i,r=[],s=[],a=e.parentNode,l=t.parentNode,c=a;if(a===l)return o(e,t);if(!a)return-1;if(!l)return 1;for(;c;)r.unshift(c),c=c.parentNode;for(c=l;c;)s.unshift(c),c=c.parentNode;n=r.length,i=s.length;for(var h=0;n>h&&i>h;h++)if(r[h]!==s[h])return o(r[h],s[h]);return h===n?o(e,s[h],-1):o(r[h],t,1)},[0,0].sort(T),N=!E,n.uniqueSort=function(e){var t,n=[],i=1,r=0;if(E=N,e.sort(T),E){for(;t=e[i];i++)t===e[i-1]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},C=n.compile=function(e,t){var n,i=[],r=[],s=Z[S][e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)s=d(t[n]),s[S]?i.push(s):r.push(s);s=Z(e,f(r,i))}return s},M.querySelectorAll&&function(){var e,t=g,i=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,s=[":focus"],o=[":active"],l=R.matchesSelector||R.mozMatchesSelector||R.webkitMatchesSelector||R.oMatchesSelector||R.msMatchesSelector;
|
||
lt(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||s.push("\\["+$+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||s.push(":checked")}),lt(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&s.push("[*^$]="+$+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||s.push(":enabled",":disabled")}),s=new RegExp(s.join("|")),g=function(e,n,r,o,l){if(!o&&!l&&!s.test(e)){var c,h,u=!0,d=S,f=n,p=9===n.nodeType&&e;if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){for(c=a(e),(u=n.getAttribute("id"))?d=u.replace(i,"\\$&"):n.setAttribute("id",d),d="[id='"+d+"'] ",h=c.length;h--;)c[h]=d+c[h].join("");f=it.test(e)&&n.parentNode||n,p=c.join(",")}if(p)try{return F.apply(r,I.call(f.querySelectorAll(p),0)),r}catch(g){}finally{u||n.removeAttribute("id")}}return t(e,n,r,o,l)},l&&(lt(function(t){e=l.call(t,"div");try{l.call(t,"[test!='']:sizzle"),o.push("!=",Y)}catch(n){}}),o=new RegExp(o.join("|")),n.matchesSelector=function(t,i){if(i=i.replace(r,"='$1']"),!_(t)&&!o.test(i)&&!s.test(i))try{var a=l.call(t,i);if(a||e||t.document&&11!==t.document.nodeType)return a}catch(c){}return n(i,null,null,[t]).length>0})}(),b.pseudos.nth=b.pseudos.eq,b.filters=m.prototype=b.pseudos,b.setFilters=new m,n.attr=Q.attr,Q.find=n,Q.expr=n.selectors,Q.expr[":"]=Q.expr.pseudos,Q.unique=n.uniqueSort,Q.text=n.getText,Q.isXMLDoc=n.isXML,Q.contains=n.contains}(e);var zt=/Until$/,Ot=/^(?:parents|prev(?:Until|All))/,Ft=/^.[^:#\[\.,]*$/,It=Q.expr.match.needsContext,Ht={children:!0,contents:!0,next:!0,prev:!0};Q.fn.extend({find:function(e){var t,n,i,r,s,o,a=this;if("string"!=typeof e)return Q(e).filter(function(){for(t=0,n=a.length;n>t;t++)if(Q.contains(a[t],this))return!0});for(o=this.pushStack("","find",e),t=0,n=this.length;n>t;t++)if(i=o.length,Q.find(e,this[t],o),t>0)for(r=i;o.length>r;r++)for(s=0;i>s;s++)if(o[s]===o[r]){o.splice(r--,1);break}return o},has:function(e){var t,n=Q(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(Q.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(c(this,e,!1),"not",e)},filter:function(e){return this.pushStack(c(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?It.test(e)?Q(e,this.context).index(this[0])>=0:Q.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,i=0,r=this.length,s=[],o=It.test(e)||"string"!=typeof e?Q(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(o?o.index(n)>-1:Q.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}return s=s.length>1?Q.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?"string"==typeof e?Q.inArray(this[0],Q(e)):Q.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?Q(e,t):Q.makeArray(e&&e.nodeType?[e]:e),i=Q.merge(this.get(),n);return this.pushStack(a(n[0])||a(i[0])?i:Q.unique(i))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Q.fn.andSelf=Q.fn.addBack,Q.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Q.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Q.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return Q.dir(e,"nextSibling")},prevAll:function(e){return Q.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Q.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Q.dir(e,"previousSibling",n)},siblings:function(e){return Q.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Q.sibling(e.firstChild)},contents:function(e){return Q.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Q.merge([],e.childNodes)}},function(e,t){Q.fn[e]=function(n,i){var r=Q.map(this,t,n);return zt.test(e)||(i=n),i&&"string"==typeof i&&(r=Q.filter(i,r)),r=this.length>1&&!Ht[e]?Q.unique(r):r,this.length>1&&Ot.test(e)&&(r=r.reverse()),this.pushStack(r,e,V.call(arguments).join(","))}}),Q.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?Q.find.matchesSelector(t[0],e)?[t[0]]:[]:Q.find.matches(e,t)},dir:function(e,n,i){for(var r=[],s=e[n];s&&9!==s.nodeType&&(i===t||1!==s.nodeType||!Q(s).is(i));)1===s.nodeType&&r.push(s),s=s[n];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var jt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pt=/ jQuery\d+="(?:null|\d+)"/g,Bt=/^\s+/,qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zt=/<([\w:]+)/,$t=/<tbody/i,Wt=/<|&#?\w+;/,Ut=/<(?:script|style|link)/i,Vt=/<(?:script|object|embed|option|style)/i,Xt=new RegExp("<(?:"+jt+")[\\s/>]","i"),Yt=/^(?:checkbox|radio)$/,Gt=/checked\s*(?:[^=]|=\s*.checked.)/i,Kt=/\/(java|ecma)script/i,Qt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Jt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},en=h(B),tn=en.appendChild(B.createElement("div"));Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td,Q.support.htmlSerialize||(Jt._default=[1,"X<div>","</div>"]),Q.fn.extend({text:function(e){return Q.access(this,function(e){return e===t?Q.text(this):this.empty().append((this[0]&&this[0].ownerDocument||B).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Q.isFunction(e))return this.each(function(t){Q(this).wrapAll(e.call(this,t))});if(this[0]){var t=Q(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Q.isFunction(e)?this.each(function(t){Q(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Q(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Q.isFunction(e);return this.each(function(n){Q(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,"body")||Q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(e,this),"before",this.selector)}},after:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(this,e),"after",this.selector)}},remove:function(e,t){for(var n,i=0;null!=(n=this[i]);i++)(!e||Q.filter(e,[n]).length)&&(!t&&1===n.nodeType&&(Q.cleanData(n.getElementsByTagName("*")),Q.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&Q.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Q.clone(this,e,t)})},html:function(e){return Q.access(this,function(e){var n=this[0]||{},i=0,r=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Pt,""):t;if(!("string"!=typeof e||Ut.test(e)||!Q.support.htmlSerialize&&Xt.test(e)||!Q.support.leadingWhitespace&&Bt.test(e)||Jt[(Zt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(qt,"<$1></$2>");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(Q.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return a(this[0])?this.length?this.pushStack(Q(Q.isFunction(e)?e():e),"replaceWith",e):this:Q.isFunction(e)?this.each(function(t){var n=Q(this),i=n.html();n.replaceWith(e.call(this,t,i))}):("string"!=typeof e&&(e=Q(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;Q(this).remove(),t?Q(t).before(e):Q(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,i){e=[].concat.apply([],e);var r,s,o,a,l=0,c=e[0],h=[],d=this.length;if(!Q.support.checkClone&&d>1&&"string"==typeof c&&Gt.test(c))return this.each(function(){Q(this).domManip(e,n,i)});if(Q.isFunction(c))return this.each(function(r){var s=Q(this);e[0]=c.call(this,r,n?s.html():t),s.domManip(e,n,i)});if(this[0]){if(r=Q.buildFragment(e,this,h),o=r.fragment,s=o.firstChild,1===o.childNodes.length&&(o=s),s)for(n=n&&Q.nodeName(s,"tr"),a=r.cacheable||d-1;d>l;l++)i.call(n&&Q.nodeName(this[l],"table")?u(this[l],"tbody"):this[l],l===a?o:Q.clone(o,!0,!0));o=s=null,h.length&&Q.each(h,function(e,t){t.src?Q.ajax?Q.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Q.error("no ajax"):Q.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Qt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Q.buildFragment=function(e,n,i){var r,s,o,a=e[0];return n=n||B,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,1===e.length&&"string"==typeof a&&512>a.length&&n===B&&"<"===a.charAt(0)&&!Vt.test(a)&&(Q.support.checkClone||!Gt.test(a))&&(Q.support.html5Clone||!Xt.test(a))&&(s=!0,r=Q.fragments[a],o=r!==t),r||(r=n.createDocumentFragment(),Q.clean(e,n,r,i),s&&(Q.fragments[a]=o&&r)),{fragment:r,cacheable:s}},Q.fragments={},Q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Q.fn[e]=function(n){var i,r=0,s=[],o=Q(n),a=o.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===a)return o[t](this[0]),this;for(;a>r;r++)i=(r>0?this.clone(!0):this).get(),Q(o[r])[t](i),s=s.concat(i);return this.pushStack(s,e,o.selector)}}),Q.extend({clone:function(e,t,n){var i,r,s,o;if(Q.support.html5Clone||Q.isXMLDoc(e)||!Xt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(o=tn.firstChild)),!(Q.support.noCloneEvent&&Q.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Q.isXMLDoc(e)))for(f(e,o),i=p(e),r=p(o),s=0;i[s];++s)r[s]&&f(i[s],r[s]);if(t&&(d(e,o),n))for(i=p(e),r=p(o),s=0;i[s];++s)d(i[s],r[s]);return i=r=null,o},clean:function(e,t,n,i){var r,s,o,a,l,c,u,d,f,p,m,y=t===B&&en,v=[];for(t&&"undefined"!=typeof t.createDocumentFragment||(t=B),r=0;null!=(o=e[r]);r++)if("number"==typeof o&&(o+=""),o){if("string"==typeof o)if(Wt.test(o)){for(y=y||h(t),u=t.createElement("div"),y.appendChild(u),o=o.replace(qt,"<$1></$2>"),a=(Zt.exec(o)||["",""])[1].toLowerCase(),l=Jt[a]||Jt._default,c=l[0],u.innerHTML=l[1]+o+l[2];c--;)u=u.lastChild;if(!Q.support.tbody)for(d=$t.test(o),f="table"!==a||d?"<table>"!==l[1]||d?[]:u.childNodes:u.firstChild&&u.firstChild.childNodes,s=f.length-1;s>=0;--s)Q.nodeName(f[s],"tbody")&&!f[s].childNodes.length&&f[s].parentNode.removeChild(f[s]);!Q.support.leadingWhitespace&&Bt.test(o)&&u.insertBefore(t.createTextNode(Bt.exec(o)[0]),u.firstChild),o=u.childNodes,u.parentNode.removeChild(u)}else o=t.createTextNode(o);o.nodeType?v.push(o):Q.merge(v,o)}if(u&&(o=u=y=null),!Q.support.appendChecked)for(r=0;null!=(o=v[r]);r++)Q.nodeName(o,"input")?g(o):"undefined"!=typeof o.getElementsByTagName&&Q.grep(o.getElementsByTagName("input"),g);if(n)for(p=function(e){return!e.type||Kt.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e):void 0},r=0;null!=(o=v[r]);r++)Q.nodeName(o,"script")&&p(o)||(n.appendChild(o),"undefined"!=typeof o.getElementsByTagName&&(m=Q.grep(Q.merge([],o.getElementsByTagName("script")),p),v.splice.apply(v,[r+1,0].concat(m)),r+=m.length));return v},cleanData:function(e,t){for(var n,i,r,s,o=0,a=Q.expando,l=Q.cache,c=Q.support.deleteExpando,h=Q.event.special;null!=(r=e[o]);o++)if((t||Q.acceptData(r))&&(i=r[a],n=i&&l[i])){if(n.events)for(s in n.events)h[s]?Q.event.remove(r,s):Q.removeEvent(r,s,n.handle);l[i]&&(delete l[i],c?delete r[a]:r.removeAttribute?r.removeAttribute(a):r[a]=null,Q.deletedIds.push(i))}}}),function(){var e,t;Q.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=Q.uaMatch(Z.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),Q.browser=t,Q.sub=function(){function e(t,n){return new e.fn.init(t,n)}Q.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,i){return i&&i instanceof Q&&!(i instanceof e)&&(i=e(i)),Q.fn.init.call(this,n,i,t)},e.fn.init.prototype=e.fn;var t=e(B);return e}}();var nn,rn,sn,on=/alpha\([^)]*\)/i,an=/opacity=([^)]*)/,ln=/^(top|right|bottom|left)$/,cn=/^(none|table(?!-c[ea]).+)/,hn=/^margin/,un=new RegExp("^("+J+")(.*)$","i"),dn=new RegExp("^("+J+")(?!px)[a-z%]+$","i"),fn=new RegExp("^([-+])=("+J+")","i"),pn={BODY:"block"},gn={position:"absolute",visibility:"hidden",display:"block"},mn={letterSpacing:0,fontWeight:400},yn=["Top","Right","Bottom","Left"],vn=["Webkit","O","Moz","ms"],bn=Q.fn.toggle;Q.fn.extend({css:function(e,n){return Q.access(this,function(e,n,i){return i!==t?Q.style(e,n,i):Q.css(e,n)},e,n,arguments.length>1)},show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e,t){var n="boolean"==typeof e;return Q.isFunction(e)&&Q.isFunction(t)?bn.apply(this,arguments):this.each(function(){(n?e:y(this))?Q(this).show():Q(this).hide()})}}),Q.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return""===n?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Q.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,a,l=Q.camelCase(n),c=e.style;if(n=Q.cssProps[l]||(Q.cssProps[l]=m(c,l)),a=Q.cssHooks[n]||Q.cssHooks[l],i===t)return a&&"get"in a&&(s=a.get(e,!1,r))!==t?s:c[n];if(o=typeof i,"string"===o&&(s=fn.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(Q.css(e,n)),o="number"),!(null==i||"number"===o&&isNaN(i)||("number"===o&&!Q.cssNumber[l]&&(i+="px"),a&&"set"in a&&(i=a.set(e,i,r))===t)))try{c[n]=i}catch(h){}}},css:function(e,n,i,r){var s,o,a,l=Q.camelCase(n);return n=Q.cssProps[l]||(Q.cssProps[l]=m(e.style,l)),a=Q.cssHooks[n]||Q.cssHooks[l],a&&"get"in a&&(s=a.get(e,!0,r)),s===t&&(s=nn(e,n)),"normal"===s&&n in mn&&(s=mn[n]),i||r!==t?(o=parseFloat(s),i||Q.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var i,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];i=n.call(e);for(r in t)e.style[r]=s[r];return i}}),e.getComputedStyle?nn=function(t,n){var i,r,s,o,a=e.getComputedStyle(t,null),l=t.style;return a&&(i=a.getPropertyValue(n)||a[n],""===i&&!Q.contains(t.ownerDocument,t)&&(i=Q.style(t,n)),dn.test(i)&&hn.test(n)&&(r=l.width,s=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=i,i=a.width,l.width=r,l.minWidth=s,l.maxWidth=o)),i}:B.documentElement.currentStyle&&(nn=function(e,t){var n,i,r=e.currentStyle&&e.currentStyle[t],s=e.style;return null==r&&s&&s[t]&&(r=s[t]),dn.test(r)&&!ln.test(t)&&(n=s.left,i=e.runtimeStyle&&e.runtimeStyle.left,i&&(e.runtimeStyle.left=e.currentStyle.left),s.left="fontSize"===t?"1em":r,r=s.pixelLeft+"px",s.left=n,i&&(e.runtimeStyle.left=i)),""===r?"auto":r}),Q.each(["height","width"],function(e,t){Q.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&cn.test(nn(e,"display"))?Q.swap(e,gn,function(){return _(e,t,i)}):_(e,t,i):void 0},set:function(e,n,i){return b(e,n,i?w(e,t,i,Q.support.boxSizing&&"border-box"===Q.css(e,"boxSizing")):0)}}}),Q.support.opacity||(Q.cssHooks.opacity={get:function(e,t){return an.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=Q.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=i&&i.filter||n.filter||"";n.zoom=1,t>=1&&""===Q.trim(s.replace(on,""))&&n.removeAttribute&&(n.removeAttribute("filter"),i&&!i.filter)||(n.filter=on.test(s)?s.replace(on,r):s+" "+r)}}),Q(function(){Q.support.reliableMarginRight||(Q.cssHooks.marginRight={get:function(e,t){return Q.swap(e,{display:"inline-block"},function(){return t?nn(e,"marginRight"):void 0})}}),!Q.support.pixelPosition&&Q.fn.position&&Q.each(["top","left"],function(e,t){Q.cssHooks[t]={get:function(e,n){if(n){var i=nn(e,t);return dn.test(i)?Q(e).position()[t]+"px":i}}}})}),Q.expr&&Q.expr.filters&&(Q.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!Q.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||nn(e,"display"))},Q.expr.filters.visible=function(e){return!Q.expr.filters.hidden(e)}),Q.each({margin:"",padding:"",border:"Width"},function(e,t){Q.cssHooks[e+t]={expand:function(n){var i,r="string"==typeof n?n.split(" "):[n],s={};for(i=0;4>i;i++)s[e+yn[i]+t]=r[i]||r[i-2]||r[0];return s}},hn.test(e)||(Q.cssHooks[e+t].set=b)});var wn=/%20/g,_n=/\[\]$/,xn=/\r?\n/g,Cn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tn=/^(?:select|textarea)/i;Q.fn.extend({serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Tn.test(this.nodeName)||Cn.test(this.type))}).map(function(e,t){var n=Q(this).val();return null==n?null:Q.isArray(n)?Q.map(n,function(e){return{name:t.name,value:e.replace(xn,"\r\n")}}):{name:t.name,value:n.replace(xn,"\r\n")}}).get()}}),Q.param=function(e,n){var i,r=[],s=function(e,t){t=Q.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=Q.ajaxSettings&&Q.ajaxSettings.traditional),Q.isArray(e)||e.jquery&&!Q.isPlainObject(e))Q.each(e,function(){s(this.name,this.value)});else for(i in e)C(i,e[i],n,s);return r.join("&").replace(wn,"+")};var En,kn,Nn=/#.*$/,An=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Sn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Dn=/^(?:GET|HEAD)$/,Mn=/^\/\//,Rn=/\?/,Ln=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,zn=/([?&])_=[^&]*/,On=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Fn=Q.fn.load,In={},Hn={},jn=["*/"]+["*"];try{kn=q.href}catch(Pn){kn=B.createElement("a"),kn.href="",kn=kn.href}En=On.exec(kn.toLowerCase())||[],Q.fn.load=function(e,n,i){if("string"!=typeof e&&Fn)return Fn.apply(this,arguments);if(!this.length)return this;var r,s,o,a=this,l=e.indexOf(" ");return l>=0&&(r=e.slice(l,e.length),e=e.slice(0,l)),Q.isFunction(n)?(i=n,n=t):n&&"object"==typeof n&&(s="POST"),Q.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){i&&a.each(i,o||[e.responseText,t,e])}}).done(function(e){o=arguments,a.html(r?Q("<div>").append(e.replace(Ln,"")).find(r):e)}),this},Q.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){Q.fn[t]=function(e){return this.on(t,e)}}),Q.each(["get","post"],function(e,n){Q[n]=function(e,i,r,s){return Q.isFunction(i)&&(s=s||r,r=i,i=t),Q.ajax({type:n,url:e,data:i,success:r,dataType:s})}}),Q.extend({getScript:function(e,n){return Q.get(e,t,n,"script")},getJSON:function(e,t,n){return Q.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?k(e,Q.ajaxSettings):(t=e,e=Q.ajaxSettings),k(e,t),e},ajaxSettings:{url:kn,isLocal:Sn.test(En[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":jn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":Q.parseJSON,"text xml":Q.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:T(In),ajaxTransport:T(Hn),ajax:function(e,n){function i(e,n,i,o){var c,u,v,b,_,C=n;2!==w&&(w=2,l&&clearTimeout(l),a=t,s=o||"",x.readyState=e>0?4:0,i&&(b=N(d,x,i)),e>=200&&300>e||304===e?(d.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(Q.lastModified[r]=_),_=x.getResponseHeader("Etag"),_&&(Q.etag[r]=_)),304===e?(C="notmodified",c=!0):(c=A(d,b),C=c.state,u=c.data,v=c.error,c=!v)):(v=C,(!C||e)&&(C="error",0>e&&(e=0))),x.status=e,x.statusText=(n||C)+"",c?g.resolveWith(f,[u,C,x]):g.rejectWith(f,[x,C,v]),x.statusCode(y),y=t,h&&p.trigger("ajax"+(c?"Success":"Error"),[x,d,c?u:v]),m.fireWith(f,[x,C]),h&&(p.trigger("ajaxComplete",[x,d]),--Q.active||Q.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,s,o,a,l,c,h,u,d=Q.ajaxSetup({},n),f=d.context||d,p=f!==d&&(f.nodeType||f instanceof Q)?Q(f):Q.event,g=Q.Deferred(),m=Q.Callbacks("once memory"),y=d.statusCode||{},v={},b={},w=0,_="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!w){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},getAllResponseHeaders:function(){return 2===w?s:null},getResponseHeader:function(e){var n;if(2===w){if(!o)for(o={};n=An.exec(s);)o[n[1].toLowerCase()]=n[2];n=o[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return w||(d.mimeType=e),this},abort:function(e){return e=e||_,a&&a.abort(e),i(0,e),this}};if(g.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(2>w)for(t in e)y[t]=[y[t],e[t]];else t=e[x.status],x.always(t)}return this},d.url=((e||d.url)+"").replace(Nn,"").replace(Mn,En[1]+"//"),d.dataTypes=Q.trim(d.dataType||"*").toLowerCase().split(tt),null==d.crossDomain&&(c=On.exec(d.url.toLowerCase()),d.crossDomain=!(!c||c[1]===En[1]&&c[2]===En[2]&&(c[3]||("http:"===c[1]?80:443))==(En[3]||("http:"===En[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=Q.param(d.data,d.traditional)),E(In,d,n,x),2===w)return x;if(h=d.global,d.type=d.type.toUpperCase(),d.hasContent=!Dn.test(d.type),h&&0===Q.active++&&Q.event.trigger("ajaxStart"),!d.hasContent&&(d.data&&(d.url+=(Rn.test(d.url)?"&":"?")+d.data,delete d.data),r=d.url,d.cache===!1)){var C=Q.now(),T=d.url.replace(zn,"$1_="+C);d.url=T+(T===d.url?(Rn.test(d.url)?"&":"?")+"_="+C:"")}(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(r=r||d.url,Q.lastModified[r]&&x.setRequestHeader("If-Modified-Since",Q.lastModified[r]),Q.etag[r]&&x.setRequestHeader("If-None-Match",Q.etag[r])),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+jn+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)x.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(f,x,d)!==!1&&2!==w){_="abort";for(u in{success:1,error:1,complete:1})x[u](d[u]);if(a=E(Hn,d,n,x)){x.readyState=1,h&&p.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},d.timeout));try{w=1,a.send(v,i)}catch(k){if(!(2>w))throw k;i(-1,k)}}else i(-1,"No Transport");return x}return x.abort()},active:0,lastModified:{},etag:{}});var Bn=[],qn=/\?/,Zn=/(=)\?(?=&|$)|\?\?/,$n=Q.now();Q.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bn.pop()||Q.expando+"_"+$n++;return this[e]=!0,e}}),Q.ajaxPrefilter("json jsonp",function(n,i,r){var s,o,a,l=n.data,c=n.url,h=n.jsonp!==!1,u=h&&Zn.test(c),d=h&&!u&&"string"==typeof l&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zn.test(l);return"jsonp"===n.dataTypes[0]||u||d?(s=n.jsonpCallback=Q.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],u?n.url=c.replace(Zn,"$1"+s):d?n.data=l.replace(Zn,"$1"+s):h&&(n.url+=(qn.test(c)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return a||Q.error(s+" was not called"),a[0]},n.dataTypes[0]="json",e[s]=function(){a=arguments},r.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=i.jsonpCallback,Bn.push(s)),a&&Q.isFunction(o)&&o(a[0]),a=o=t}),"script"):void 0}),Q.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return Q.globalEval(e),e}}}),Q.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),Q.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=B.head||B.getElementsByTagName("head")[0]||B.documentElement;return{send:function(r,s){n=B.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,r){(r||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,i&&n.parentNode&&i.removeChild(n),n=t,r||s(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Wn,Un=e.ActiveXObject?function(){for(var e in Wn)Wn[e](0,1)}:!1,Vn=0;Q.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&S()||D()}:S,function(e){Q.extend(Q.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(Q.ajaxSettings.xhr()),Q.support.ajax&&Q.ajaxTransport(function(n){if(!n.crossDomain||Q.support.cors){var i;return{send:function(r,s){var o,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),!n.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");try{for(a in r)l.setRequestHeader(a,r[a])}catch(c){}l.send(n.hasContent&&n.data||null),i=function(e,r){var a,c,h,u,d;try{if(i&&(r||4===l.readyState))if(i=t,o&&(l.onreadystatechange=Q.noop,Un&&delete Wn[o]),r)4!==l.readyState&&l.abort();else{a=l.status,h=l.getAllResponseHeaders(),u={},d=l.responseXML,d&&d.documentElement&&(u.xml=d);try{u.text=l.responseText}catch(f){}try{c=l.statusText}catch(f){c=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=u.text?200:404}}catch(p){r||s(-1,p)}u&&s(a,c,u,h)},n.async?4===l.readyState?setTimeout(i,0):(o=++Vn,Un&&(Wn||(Wn={},Q(e).unload(Un)),Wn[o]=i),l.onreadystatechange=i):i()},abort:function(){i&&i(0,1)}}}});var Xn,Yn,Gn=/^(?:toggle|show|hide)$/,Kn=new RegExp("^(?:([-+])=|)("+J+")([a-z%]*)$","i"),Qn=/queueHooks$/,Jn=[O],ei={"*":[function(e,t){var n,i,r=this.createTween(e,t),s=Kn.exec(t),o=r.cur(),a=+o||0,l=1,c=20;if(s){if(n=+s[2],i=s[3]||(Q.cssNumber[e]?"":"px"),"px"!==i&&a){a=Q.css(r.elem,e,!0)||n||1;do l=l||".5",a/=l,Q.style(r.elem,e,a+i);while(l!==(l=r.cur()/o)&&1!==l&&--c)}r.unit=i,r.start=a,r.end=s[1]?a+(s[1]+1)*n:n}return r}]};Q.Animation=Q.extend(L,{tweener:function(e,t){Q.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],ei[n]=ei[n]||[],ei[n].unshift(t)},prefilter:function(e,t){t?Jn.unshift(e):Jn.push(e)}}),Q.Tween=F,F.prototype={constructor:F,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(Q.cssNumber[n]?"":"px")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.pos=t=this.options.duration?Q.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Q.css(e.elem,e.prop,!1,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Q.fx.step[e.prop]?Q.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Q.cssProps[e.prop]]||Q.cssHooks[e.prop])?Q.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Q.each(["toggle","show","hide"],function(e,t){var n=Q.fn[t];Q.fn[t]=function(i,r,s){return null==i||"boolean"==typeof i||!e&&Q.isFunction(i)&&Q.isFunction(r)?n.apply(this,arguments):this.animate(I(t,!0),i,r,s)}}),Q.fn.extend({fadeTo:function(e,t,n,i){return this.filter(y).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=Q.isEmptyObject(e),s=Q.speed(t,n,i),o=function(){var t=L(this,Q.extend({},e),s);r&&t.stop(!0)};return r||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,i){var r=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=Q.timers,o=Q._data(this);if(n)o[n]&&o[n].stop&&r(o[n]);else for(n in o)o[n]&&o[n].stop&&Qn.test(n)&&r(o[n]);for(n=s.length;n--;)s[n].elem===this&&(null==e||s[n].queue===e)&&(s[n].anim.stop(i),t=!1,s.splice(n,1));(t||!i)&&Q.dequeue(this,e)})}}),Q.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Q.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),Q.speed=function(e,t,n){var i=e&&"object"==typeof e?Q.extend({},e):{complete:n||!n&&t||Q.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Q.isFunction(t)&&t};return i.duration=Q.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Q.fx.speeds?Q.fx.speeds[i.duration]:Q.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){Q.isFunction(i.old)&&i.old.call(this),i.queue&&Q.dequeue(this,i.queue)},i},Q.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Q.timers=[],Q.fx=F.prototype.init,Q.fx.tick=function(){var e,n=Q.timers,i=0;for(Xn=Q.now();n.length>i;i++)e=n[i],!e()&&n[i]===e&&n.splice(i--,1);n.length||Q.fx.stop(),Xn=t},Q.fx.timer=function(e){e()&&Q.timers.push(e)&&!Yn&&(Yn=setInterval(Q.fx.tick,Q.fx.interval))},Q.fx.interval=13,Q.fx.stop=function(){clearInterval(Yn),Yn=null},Q.fx.speeds={slow:600,fast:200,_default:400},Q.fx.step={},Q.expr&&Q.expr.filters&&(Q.expr.filters.animated=function(e){return Q.grep(Q.timers,function(t){return e===t.elem}).length});var ti=/^(?:body|html)$/i;Q.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){Q.offset.setOffset(this,e,t)});var n,i,r,s,o,a,l,c={top:0,left:0},h=this[0],u=h&&h.ownerDocument;if(u)return(i=u.body)===h?Q.offset.bodyOffset(h):(n=u.documentElement,Q.contains(n,h)?("undefined"!=typeof h.getBoundingClientRect&&(c=h.getBoundingClientRect()),r=H(u),s=n.clientTop||i.clientTop||0,o=n.clientLeft||i.clientLeft||0,a=r.pageYOffset||n.scrollTop,l=r.pageXOffset||n.scrollLeft,{top:c.top+a-s,left:c.left+l-o}):c)},Q.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return Q.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(Q.css(e,"marginTop"))||0,n+=parseFloat(Q.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var i=Q.css(e,"position");"static"===i&&(e.style.position="relative");var r,s,o=Q(e),a=o.offset(),l=Q.css(e,"top"),c=Q.css(e,"left"),h=("absolute"===i||"fixed"===i)&&Q.inArray("auto",[l,c])>-1,u={},d={};h?(d=o.position(),r=d.top,s=d.left):(r=parseFloat(l)||0,s=parseFloat(c)||0),Q.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(u.top=t.top-a.top+r),null!=t.left&&(u.left=t.left-a.left+s),"using"in t?t.using.call(e,u):o.css(u)}},Q.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),n=this.offset(),i=ti.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(Q.css(e,"marginTop"))||0,n.left-=parseFloat(Q.css(e,"marginLeft"))||0,i.top+=parseFloat(Q.css(t[0],"borderTopWidth"))||0,i.left+=parseFloat(Q.css(t[0],"borderLeftWidth"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||B.body;e&&!ti.test(e.nodeName)&&"static"===Q.css(e,"position");)e=e.offsetParent;return e||B.body})}}),Q.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var i=/Y/.test(n);Q.fn[e]=function(r){return Q.access(this,function(e,r,s){var o=H(e);
|
||
return s===t?o?n in o?o[n]:o.document.documentElement[r]:e[r]:(o?o.scrollTo(i?Q(o).scrollLeft():s,i?s:Q(o).scrollTop()):e[r]=s,void 0)},e,r,arguments.length,null)}}),Q.each({Height:"height",Width:"width"},function(e,n){Q.each({padding:"inner"+e,content:n,"":"outer"+e},function(i,r){Q.fn[r]=function(r,s){var o=arguments.length&&(i||"boolean"!=typeof r),a=i||(r===!0||s===!0?"margin":"border");return Q.access(this,function(n,i,r){var s;return Q.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):r===t?Q.css(n,i,r,a):Q.style(n,i,r,a)},n,o?r:t,o,null)}})}),e.jQuery=e.$=Q,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return Q})}(window),/* ===================================================
|
||
* bootstrap-transition.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||
* ===================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================== */
|
||
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e,t=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e]}();return e&&{end:e}}()})}(window.jQuery),/* =========================================================
|
||
* bootstrap-modal.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||
* =========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================= */
|
||
!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")}))},hide:function(t){t&&t.preventDefault(),t=e.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]===e.target||t.$element.has(e.target).length||t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){27==t.which&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var i=e(this),r=i.data("modal"),s=e.extend({},e.fn.modal.defaults,i.data(),"object"==typeof n&&n);r||i.data("modal",r=new t(this,s)),"string"==typeof n?r[n]():s.show&&r.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),r=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());t.preventDefault(),r.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),/* ============================================================
|
||
* bootstrap-dropdown.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||
* ============================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ============================================================ */
|
||
!function(e){"use strict";function t(){e(i).each(function(){n(e(this)).removeClass("open")})}function n(t){var n,i=t.attr("data-target");return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),n=e(i),n.length||(n=t.parent()),n}var i="[data-toggle=dropdown]",r=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};r.prototype={constructor:r,toggle:function(){var i,r,s=e(this);if(!s.is(".disabled, :disabled"))return i=n(s),r=i.hasClass("open"),t(),r||i.toggleClass("open"),s.focus(),!1},keydown:function(t){var i,r,s,o,a;if(/(38|40|27)/.test(t.keyCode)&&(i=e(this),t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled"))){if(s=n(i),o=s.hasClass("open"),!o||o&&27==t.keyCode)return i.click();r=e("[role=menu] li:not(.divider):visible a",s),r.length&&(a=r.index(r.filter(":focus")),38==t.keyCode&&a>0&&a--,40==t.keyCode&&r.length-1>a&&a++,~a||(a=0),r.eq(a).focus())}}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("dropdown");i||n.data("dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api touchstart.dropdown.data-api",t).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",i,r.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",i+", [role=menu]",r.prototype.keydown)}(window.jQuery),/* =============================================================
|
||
* bootstrap-scrollspy.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||
* =============================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ============================================================== */
|
||
!function(e){"use strict";function t(t,n){var i,r=e.proxy(this.process,this),s=e(t).is("body")?e(window):e(t);this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=s.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(i=e(t).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t,n=this;this.offsets=e([]),this.targets=e([]),t=this.$body.find(this.selector).map(function(){var t=e(this),i=t.data("target")||t.attr("href"),r=/^#\w/.test(i)&&e(i);return r&&r.length&&[[r.position().top+n.$scrollElement.scrollTop(),i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},process:function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),r=this.offsets,s=this.targets,o=this.activeTarget;if(t>=i)return o!=(e=s.last()[0])&&this.activate(e);for(e=r.length;e--;)o!=s[e]&&t>=r[e]&&(!r[e+1]||r[e+1]>=t)&&this.activate(s[e])},activate:function(t){var n,i;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),i=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(i).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var i=e(this),r=i.data("scrollspy"),s="object"==typeof n&&n;r||i.data("scrollspy",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),/* ========================================================
|
||
* bootstrap-tab.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||
* ========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ======================================================== */
|
||
!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t,n,i,r=this.element,s=r.closest("ul:not(.dropdown-menu)"),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),r.parent("li").hasClass("active")||(t=s.find(".active:last a")[0],i=e.Event("show",{relatedTarget:t}),r.trigger(i),i.isDefaultPrevented()||(n=e(o),this.activate(r.parent("li"),s),this.activate(n,n.parent(),function(){r.trigger({type:"shown",relatedTarget:t})})))},activate:function(t,n,i){function r(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),o?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var s=n.find("> .active"),o=i&&e.support.transition&&s.hasClass("fade");o?s.one(e.support.transition.end,r):r(),s.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var i=e(this),r=i.data("tab");r||i.data("tab",r=new t(this)),"string"==typeof n&&r[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),/* ===========================================================
|
||
* bootstrap-tooltip.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||
* ===========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================== */
|
||
!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,i){var r,s;this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(r="hover"==this.options.trigger?"mouseenter":"focus",s="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(r+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);return n.options.delay&&n.options.delay.show?(clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show),void 0):n.show()},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),n.options.delay&&n.options.delay.hide?(n.hoverState="out",this.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide),void 0):n.hide()},show:function(){var e,t,n,i,r,s,o;if(this.hasContent()&&this.enabled){switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),n=this.getPosition(t),i=e[0]?e[0].offsetWidth:"",r=e[0]?e[0].offsetHeight:"",t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":o={top:n.top-r,left:n.left+n.width/2-i/2};break;case"left":o={top:n.top+n.height/2-r/2,left:n.left-i};break;case"right":o={top:n.top+n.height/2-r/2,left:n.left+n.width}}e.offset(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function t(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?t():n.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);n[n.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),r=i.data("tooltip"),s="object"==typeof n&&n;r||i.data("tooltip",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),/* ===========================================================
|
||
* bootstrap-popover.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||
* ===========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* =========================================================== */
|
||
!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),r=i.data("popover"),s="object"==typeof n&&n;r||i.data("popover",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),/* ==========================================================
|
||
* bootstrap-affix.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#affix
|
||
* ==========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================== */
|
||
!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t,n=e(document).height(),i=this.$window.scrollTop(),r=this.$element.offset(),s=this.options.offset,o=s.bottom,a=s.top,l="affix affix-top affix-bottom";"object"!=typeof s&&(o=a=s),"function"==typeof a&&(a=s.top()),"function"==typeof o&&(o=s.bottom()),t=null!=this.unpin&&i+this.unpin<=r.top?!1:null!=o&&r.top+this.$element.height()>=n-o?"bottom":null!=a&&a>=i?"top":!1,this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?r.top-i:null,this.$element.removeClass(l).addClass("affix"+(t?"-"+t:"")))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var i=e(this),r=i.data("affix"),s="object"==typeof n&&n;r||i.data("affix",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),/* ==========================================================
|
||
* bootstrap-alert.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||
* ==========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================== */
|
||
!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){i.trigger("closed").remove()}var i,r=e(this),s=r.attr("data-target");s||(s=r.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),i=e(s),t&&t.preventDefault(),i.length||(i=r.hasClass("alert")?r:r.parent()),i.trigger(t=e.Event("close")),t.isDefaultPrevented()||(i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,n):n())};var i=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var i=e(this),r=i.data("alert");r||i.data("alert",r=new n(this)),"string"==typeof t&&r[t].call(i)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),/* ============================================================
|
||
* bootstrap-button.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||
* ============================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ============================================================ */
|
||
!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.data(),r=n.is("input")?"val":"html";e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),r=i.data("button"),s="object"==typeof n&&n;r||i.data("button",r=new t(this,s)),"toggle"==n?r.toggle():n&&r.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),/* =============================================================
|
||
* bootstrap-collapse.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||
* =============================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ============================================================ */
|
||
!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,i,r;if(!this.transitioning){if(t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),i=this.$parent&&this.$parent.find("> .accordion-group > .in"),i&&i.length){if(r=i.data("collapse"),r&&r.transitioning)return;i.collapse("hide"),r||i.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])}},hide:function(){var t;this.transitioning||(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0))},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[null!==e?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,i){var r=this,s=function(){"show"==n.type&&r.reset(),r.transitioning=0,r.$element.trigger(i)};this.$element.trigger(n),n.isDefaultPrevented()||(this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var i=e(this),r=i.data("collapse"),s="object"==typeof n&&n;r||i.data("collapse",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n,i=e(this),r=i.attr("data-target")||t.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),s=e(r).data("collapse")?"toggle":i.data();i[e(r).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(r).collapse(s)})}(window.jQuery),/* ==========================================================
|
||
* bootstrap-carousel.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||
* ==========================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================== */
|
||
!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),i=n.parent().children(),r=i.index(n),s=this;if(!(t>i.length-1||0>t))return this.sliding?this.$element.one("slid",function(){s.to(t)}):r==t?this.pause().cycle():this.slide(t>r?"next":"prev",e(i[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(t,n){var i,r=this.$element.find(".item.active"),s=n||r[t](),o=this.interval,a="next"==t?"left":"right",l="next"==t?"first":"last",c=this;if(this.sliding=!0,o&&this.pause(),s=s.length?s:this.$element.find(".item")[l](),i=e.Event("slide",{relatedTarget:s[0]}),!s.hasClass("active")){if(e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(i),i.isDefaultPrevented())return;s.addClass(t),s[0].offsetWidth,r.addClass(a),s.addClass(a),this.$element.one(e.support.transition.end,function(){s.removeClass([t,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),c.sliding=!1,setTimeout(function(){c.$element.trigger("slid")},0)})}else{if(this.$element.trigger(i),i.isDefaultPrevented())return;r.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return o&&this.cycle(),this}}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var i=e(this),r=i.data("carousel"),s=e.extend({},e.fn.carousel.defaults,"object"==typeof n&&n),o="string"==typeof n?n:s.slide;r||i.data("carousel",r=new t(this,s)),"number"==typeof n?r.to(n):o?r[o]():s.interval&&r.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide]",function(t){var n,i=e(this),r=e(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},r.data(),i.data());r.carousel(s),t.preventDefault()})}(window.jQuery),/* =============================================================
|
||
* bootstrap-typeahead.js v2.2.2
|
||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||
* =============================================================
|
||
* Copyright 2012 Twitter, Inc.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ============================================================ */
|
||
!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(t=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,t?this.process(t):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],i=[],r=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?i.push(t):r.push(t):n.push(t);return n.concat(i,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,i){return t=e(n.options.item).attr("data-value",i),t.find("a").html(n.highlighter(i)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.next();n.length||(n=e(this.$menu.find("li")[0])),n.addClass("active")},prev:function(){var e=this.$menu.find(".active").removeClass("active"),t=e.prev();t.length||(t=this.$menu.find("li").last()),t.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(){var e=this;setTimeout(function(){e.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var i=e(this),r=i.data("typeahead"),s="object"==typeof n&&n;r||i.data("typeahead",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);n.data("typeahead")||(t.preventDefault(),n.typeahead(n.data()))})}(window.jQuery),function(e){e.scrollUp=function(t){var n={scrollName:"scrollUp",topDistance:"300",topSpeed:300,animation:"fade",animationInSpeed:200,animationOutSpeed:200,scrollText:"Scroll to top",activeOverlay:!1};if(t)var n=e.extend(n,t);var i="#"+n.scrollName,r=n.animation,s=n.animationOutSpeed,o=n.animationInSpeed,a=n.topDistance,l=n.scrollText,c=n.topSpeed,h=n.activeOverlay;e("<a/>",{id:n.scrollName,href:"#top",title:l,text:l}).appendTo("body"),e(i).css({display:"none",position:"fixed","z-index":"2147483647"}),h&&(e("body").append("<div id='"+n.scrollName+"-active'></div>"),e(i+"-active").css({position:"absolute",top:a+"px",width:"100%","border-top":"1px dotted "+h,"z-index":"2147483647"})),e(window).scroll(function(){"fade"===r?e(e(window).scrollTop()>a?e(i).fadeIn(o):e(i).fadeOut(s)):"slide"===r?e(e(window).scrollTop()>a?e(i).slideDown(o):e(i).slideUp(s)):e(e(window).scrollTop()>a?e(i).show(0):e(i).hide(0))}),e(i).click(function(){return e("html, body").animate({scrollTop:0},c),!1})}}(jQuery),!function(e,t){"use strict";var n={"font-styles":function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li class='dropdown'><a class='btn btn-inverse dropdown-toggle"+n+"' data-toggle='dropdown' href='#'>"+"<i class='icon-font'></i> <span class='current-font'>"+e.font_styles.normal+"</span> <b class='caret'></b>"+"</a>"+"<ul class='dropdown-menu'>"+"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='div' tabindex='-1'>"+e.font_styles.normal+"</a></li>"+"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h1' tabindex='-1'>"+e.font_styles.h1+"</a></li>"+"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h2' tabindex='-1'>"+e.font_styles.h2+"</a></li>"+"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h3' tabindex='-1'>"+e.font_styles.h3+"</a></li>"+"</ul>"+"</li>"},emphasis:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li><div class='btn-group'><a class='btn btn-inverse"+n+"' data-wysihtml5-command='bold' title='CTRL+B' tabindex='-1'>"+e.emphasis.bold+"</a>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='italic' title='CTRL+I' tabindex='-1'>"+e.emphasis.italic+"</a>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='underline' title='CTRL+U' tabindex='-1'>"+e.emphasis.underline+"</a>"+"</div>"+"</li>"},lists:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li><div class='btn-group'><a class='btn btn-inverse"+n+"' data-wysihtml5-command='insertUnorderedList' title='"+e.lists.unordered+"' tabindex='-1'><i class='icon-list'></i></a>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='insertOrderedList' title='"+e.lists.ordered+"' tabindex='-1'><i class='icon-list-2'></i></a>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='Outdent' title='"+e.lists.outdent+"' tabindex='-1'><i class='icon-indent-increase'></i></a>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='Indent' title='"+e.lists.indent+"' tabindex='-1'><i class='icon-indent-decrease'></i></a>"+"</div>"+"</li>"},link:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li><div class='bootstrap-wysihtml5-insert-link-modal modal hide fade'><div class='modal-header'><a class='close' data-dismiss='modal'>×</a><h3>"+e.link.insert+"</h3>"+"</div>"+"<div class='modal-body'>"+"<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>"+"</div>"+"<div class='modal-footer'>"+"<a href='#' class='btn btn-inverse' data-dismiss='modal'>"+e.link.cancel+"</a>"+"<a href='#' class='btn btn-primary' data-dismiss='modal'>"+e.link.insert+"</a>"+"</div>"+"</div>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='createLink' title='"+e.link.insert+"' tabindex='-1'><i class='icon-share'></i></a>"+"</li>"},image:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li><div class='bootstrap-wysihtml5-insert-image-modal modal hide fade'><div class='modal-header'><a class='close' data-dismiss='modal'>×</a><h3>"+e.image.insert+"</h3>"+"</div>"+"<div class='modal-body'>"+"<input value='http://' class='bootstrap-wysihtml5-insert-image-url input-xlarge'>"+"</div>"+"<div class='modal-footer'>"+"<a href='#' class='btn' data-dismiss='modal'>"+e.image.cancel+"</a>"+"<a href='#' class='btn btn-primary' data-dismiss='modal'>"+e.image.insert+"</a>"+"</div>"+"</div>"+"<a class='btn btn-inverse"+n+"' data-wysihtml5-command='insertImage' title='"+e.image.insert+"' tabindex='-1'><i class='icon-image-2'></i></a>"+"</li>"},html:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li><div class='btn-group'><a class='btn btn-inverse"+n+"' data-wysihtml5-action='change_view' title='"+e.html.edit+"' tabindex='-1'><i class='icon-pen-alt-stroke'></i></a>"+"</div>"+"</li>"},color:function(e,t){var n=t&&t.size?" btn-"+t.size:"";return"<li class='dropdown'><a class='btn btn-inverse dropdown-toggle"+n+"' data-toggle='dropdown' href='#' tabindex='-1'>"+"<span class='current-color'>"+e.colours.black+"</span> <b class='caret'></b>"+"</a>"+"<ul class='dropdown-menu'>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='black'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='black'>"+e.colours.black+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='silver'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='silver'>"+e.colours.silver+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='gray'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='gray'>"+e.colours.gray+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='maroon'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='maroon'>"+e.colours.maroon+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='red'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='red'>"+e.colours.red+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='purple'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='purple'>"+e.colours.purple+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='green'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='green'>"+e.colours.green+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='olive'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='olive'>"+e.colours.olive+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='navy'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='navy'>"+e.colours.navy+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='blue'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='blue'>"+e.colours.blue+"</a></li>"+"<li><div class='wysihtml5-colors' data-wysihtml5-command-value='orange'></div><a class='wysihtml5-colors-title' data-wysihtml5-command='foreColor' data-wysihtml5-command-value='orange'>"+e.colours.orange+"</a></li>"+"</ul>"+"</li>"}},i=function(e,t,i){return n[e](t,i)},r=function(t,i){this.el=t;var r=i||o;for(var s in r.customTemplates)n[s]=r.customTemplates[s];this.toolbar=this.createToolbar(t,r),this.editor=this.createEditor(i),window.editor=this.editor,e("iframe.wysihtml5-sandbox").each(function(t,n){e(n.contentWindow).off("focus.wysihtml5").on({"focus.wysihtml5":function(){e("li.dropdown").removeClass("open")}})})};r.prototype={constructor:r,createEditor:function(e){e=e||{},e.toolbar=this.toolbar[0];var n=new t.Editor(this.el[0],e);if(e&&e.events)for(var i in e.events)n.on(i,e.events[i]);return n},createToolbar:function(t,n){var r=this,s=e("<ul/>",{"class":"wysihtml5-toolbar",style:"display:none"}),l=n.locale||o.locale||"en";for(var c in o){var h=!1;void 0!==n[c]?n[c]===!0&&(h=!0):h=o[c],h===!0&&(s.append(i(c,a[l],n)),"html"===c&&this.initHtml(s),"link"===c&&this.initInsertLink(s),"image"===c&&this.initInsertImage(s))}if(n.toolbar)for(c in n.toolbar)s.append(n.toolbar[c]);return s.find("a[data-wysihtml5-command='formatBlock']").click(function(t){var n=t.target||t.srcElement,i=e(n);r.toolbar.find(".current-font").text(i.html())}),s.find("a[data-wysihtml5-command='foreColor']").click(function(t){var n=t.target||t.srcElement,i=e(n);r.toolbar.find(".current-color").text(i.html())}),this.el.before(s),s},initHtml:function(e){var t="a[data-wysihtml5-action='change_view']";e.find(t).click(function(){e.find("a.btn").not(t).toggleClass("disabled")})},initInsertImage:function(t){var n,i=this,r=t.find(".bootstrap-wysihtml5-insert-image-modal"),s=r.find(".bootstrap-wysihtml5-insert-image-url"),o=r.find("a.btn-primary"),a=s.val(),l=function(){var e=s.val();s.val(a),i.editor.currentView.element.focus(),n&&(i.editor.composer.selection.setBookmark(n),n=null),i.editor.composer.commands.exec("insertImage",e)};s.keypress(function(e){13==e.which&&(l(),r.modal("hide"))}),o.click(l),r.on("shown",function(){s.focus()}),r.on("hide",function(){i.editor.currentView.element.focus()}),t.find("a[data-wysihtml5-command=insertImage]").click(function(){var t=e(this).hasClass("wysihtml5-command-active");return t?!0:(i.editor.currentView.element.focus(!1),n=i.editor.composer.selection.getBookmark(),r.modal("show"),r.on("click.dismiss.modal",'[data-dismiss="modal"]',function(e){e.stopPropagation()}),!1)})},initInsertLink:function(t){var n,i=this,r=t.find(".bootstrap-wysihtml5-insert-link-modal"),s=r.find(".bootstrap-wysihtml5-insert-link-url"),o=r.find("a.btn-primary"),a=s.val(),l=function(){var e=s.val();s.val(a),i.editor.currentView.element.focus(),n&&(i.editor.composer.selection.setBookmark(n),n=null),i.editor.composer.commands.exec("createLink",{href:e,target:"_blank",rel:"nofollow"})};s.keypress(function(e){13==e.which&&(l(),r.modal("hide"))}),o.click(l),r.on("shown",function(){s.focus()}),r.on("hide",function(){i.editor.currentView.element.focus()}),t.find("a[data-wysihtml5-command=createLink]").click(function(){var t=e(this).hasClass("wysihtml5-command-active");return t?!0:(i.editor.currentView.element.focus(!1),n=i.editor.composer.selection.getBookmark(),r.appendTo("body").modal("show"),r.on("click.dismiss.modal",'[data-dismiss="modal"]',function(e){e.stopPropagation()}),!1)})}};var s={resetDefaults:function(){e.fn.wysihtml5.defaultOptions=e.extend(!0,{},e.fn.wysihtml5.defaultOptionsCache)},bypassDefaults:function(t){return this.each(function(){var n=e(this);n.data("wysihtml5",new r(n,t))})},shallowExtend:function(t){var n=e.extend({},e.fn.wysihtml5.defaultOptions,t||{}),i=this;return s.bypassDefaults.apply(i,[n])},deepExtend:function(t){var n=e.extend(!0,{},e.fn.wysihtml5.defaultOptions,t||{}),i=this;return s.bypassDefaults.apply(i,[n])},init:function(e){var t=this;return s.shallowExtend.apply(t,[e])}};e.fn.wysihtml5=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?(e.error("Method "+t+" does not exist on jQuery.wysihtml5"),void 0):s.init.apply(this,arguments)},e.fn.wysihtml5.Constructor=r;var o=e.fn.wysihtml5.defaultOptions={"font-styles":!0,color:!0,emphasis:!0,lists:!0,html:!0,link:!0,image:!0,events:{},parserRules:{classes:{"wysiwyg-color-silver":1,"wysiwyg-color-gray":1,"wysiwyg-color-white":1,"wysiwyg-color-maroon":1,"wysiwyg-color-red":1,"wysiwyg-color-purple":1,"wysiwyg-color-fuchsia":1,"wysiwyg-color-green":1,"wysiwyg-color-lime":1,"wysiwyg-color-olive":1,"wysiwyg-color-yellow":1,"wysiwyg-color-navy":1,"wysiwyg-color-blue":1,"wysiwyg-color-teal":1,"wysiwyg-color-aqua":1,"wysiwyg-color-orange":1},tags:{b:{},i:{},br:{},ol:{},ul:{},li:{},h1:{},h2:{},h3:{},blockquote:{},u:1,img:{check_attributes:{width:"numbers",alt:"alt",src:"url",height:"numbers"}},a:{set_attributes:{target:"_blank",rel:"nofollow"},check_attributes:{href:"url"}},span:1,div:1}},stylesheets:["./css/wysiwyg/wysiwyg-color.css"],locale:"en"};"undefined"==typeof e.fn.wysihtml5.defaultOptionsCache&&(e.fn.wysihtml5.defaultOptionsCache=e.extend(!0,{},e.fn.wysihtml5.defaultOptions));var a=e.fn.wysihtml5.locale={en:{font_styles:{normal:"Normal text",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3"},emphasis:{bold:"Bold",italic:"Italic",underline:"Underline"},lists:{unordered:"Unordered list",ordered:"Ordered list",outdent:"Outdent",indent:"Indent"},link:{insert:"Insert link",cancel:"Cancel"},image:{insert:"Insert image",cancel:"Cancel"},html:{edit:"Edit HTML"},colours:{black:"Black",silver:"Silver",gray:"Grey",maroon:"Maroon",red:"Red",purple:"Purple",green:"Green",olive:"Olive",navy:"Navy",blue:"Blue",orange:"Orange"}}}}(window.jQuery,window.wysihtml5),/* =========================================================
|
||
* bootstrap-colorpicker.js
|
||
* http://www.eyecon.ro/bootstrap-colorpicker
|
||
* =========================================================
|
||
* Copyright 2012 Stefan Petre
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================= */
|
||
!function(e){var t=function(e){this.value={h:1,s:1,b:1,a:1},this.setColor(e)};t.prototype={constructor:t,setColor:function(t){t=t.toLowerCase();var n=this;e.each(i.stringParsers,function(e,r){var s=r.re.exec(t),o=s&&r.parse(s),a=r.space||"rgba";return o?(n.value="hsla"===a?i.RGBtoHSB.apply(null,i.HSLtoRGB.apply(null,o)):i.RGBtoHSB.apply(null,o),!1):void 0})},setHue:function(e){this.value.h=1-e},setSaturation:function(e){this.value.s=e},setLightness:function(e){this.value.b=1-e},setAlpha:function(e){this.value.a=parseInt(100*(1-e),10)/100},toRGB:function(e,t,n,i){e||(e=this.value.h,t=this.value.s,n=this.value.b),e*=360;var r,s,o,a,l;return e=e%360/60,l=n*t,a=l*(1-Math.abs(e%2-1)),r=s=o=n-l,e=~~e,r+=[l,a,0,0,a,l][e],s+=[a,l,l,a,0,0][e],o+=[0,0,a,l,l,a][e],{r:Math.round(255*r),g:Math.round(255*s),b:Math.round(255*o),a:i||this.value.a}},toHex:function(e,t,n,i){var r=this.toRGB(e,t,n,i);return"#"+(1<<24|parseInt(r.r)<<16|parseInt(r.g)<<8|parseInt(r.b)).toString(16).substr(1)},toHSL:function(e,t,n,i){e||(e=this.value.h,t=this.value.s,n=this.value.b);var r=e,s=(2-t)*n,o=t*n;return o/=s>0&&1>=s?s:2-s,s/=2,o>1&&(o=1),{h:r,s:o,l:s,a:i||this.value.a}}};var n=function(t,n){this.element=e(t);var r=n.format||this.element.data("color-format")||"hex";this.format=i.translateFormats[r],this.isInput=this.element.is("input"),this.component=this.element.is(".color")?this.element.find(".add-on"):!1,this.picker=e(i.template).appendTo("body").on("mousedown",e.proxy(this.mousedown,this)),this.isInput?this.element.on({focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this)}):this.component?this.component.on({click:e.proxy(this.show,this)}):this.element.on({click:e.proxy(this.show,this)}),("rgba"===r||"hsla"===r)&&(this.picker.addClass("alpha"),this.alpha=this.picker.find(".colorpicker-alpha")[0].style),this.component?(this.picker.find(".colorpicker-color").hide(),this.preview=this.element.find("i")[0].style):this.preview=this.picker.find("div:last")[0].style,this.base=this.picker.find("div:first")[0].style,this.update()};n.prototype={constructor:n,show:function(t){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),e(window).on("resize",e.proxy(this.place,this)),this.isInput||t&&(t.stopPropagation(),t.preventDefault()),e(document).on({mousedown:e.proxy(this.hide,this)}),this.element.trigger({type:"show",color:this.color})},update:function(){this.color=new t(this.isInput?this.element.prop("value"):this.element.data("color")),this.picker.find("i").eq(0).css({left:100*this.color.value.s,top:100-100*this.color.value.b}).end().eq(1).css("top",100*(1-this.color.value.h)).end().eq(2).css("top",100*(1-this.color.value.a)),this.previewColor()},setValue:function(e){this.color=new t(e),this.picker.find("i").eq(0).css({left:100*this.color.value.s,top:100-100*this.color.value.b}).end().eq(1).css("top",100*(1-this.color.value.h)).end().eq(2).css("top",100*(1-this.color.value.a)),this.previewColor(),this.element.trigger({type:"changeColor",color:this.color})},hide:function(){this.picker.hide(),e(window).off("resize",this.place),this.isInput?this.element.prop("value",this.format.call(this)):(e(document).off({mousedown:this.hide}),this.component&&this.element.find("input").prop("value",this.format.call(this)),this.element.data("color",this.format.call(this))),this.element.trigger({type:"hide",color:this.color})},place:function(){var e=this.component?this.component.offset():this.element.offset();this.picker.css({top:e.top+this.height,left:e.left})},previewColor:function(){try{this.preview.backgroundColor=this.format.call(this)}catch(e){this.preview.backgroundColor=this.color.toHex()}this.base.backgroundColor=this.color.toHex(this.color.value.h,1,1,1),this.alpha&&(this.alpha.backgroundColor=this.color.toHex())},pointer:null,slider:null,mousedown:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target),r=n.closest("div");if(!r.is(".colorpicker")){if(r.is(".colorpicker-saturation"))this.slider=e.extend({},i.sliders.saturation);else if(r.is(".colorpicker-hue"))this.slider=e.extend({},i.sliders.hue);else{if(!r.is(".colorpicker-alpha"))return!1;this.slider=e.extend({},i.sliders.alpha)}var s=r.offset();this.slider.knob=r.find("i")[0].style,this.slider.left=t.pageX-s.left,this.slider.top=t.pageY-s.top,this.pointer={left:t.pageX,top:t.pageY},e(document).on({mousemove:e.proxy(this.mousemove,this),mouseup:e.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(e){e.stopPropagation(),e.preventDefault();var t=Math.max(0,Math.min(this.slider.maxLeft,this.slider.left+((e.pageX||this.pointer.left)-this.pointer.left))),n=Math.max(0,Math.min(this.slider.maxTop,this.slider.top+((e.pageY||this.pointer.top)-this.pointer.top)));return this.slider.knob.left=t+"px",this.slider.knob.top=n+"px",this.slider.callLeft&&this.color[this.slider.callLeft].call(this.color,t/100),this.slider.callTop&&this.color[this.slider.callTop].call(this.color,n/100),this.previewColor(),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(t){return t.stopPropagation(),t.preventDefault(),e(document).off({mousemove:this.mousemove,mouseup:this.mouseup}),!1}},e.fn.colorpicker=function(t){return this.each(function(){var i=e(this),r=i.data("colorpicker"),s="object"==typeof t&&t;r||i.data("colorpicker",r=new n(this,e.extend({},e.fn.colorpicker.defaults,s))),"string"==typeof t&&r[t]()})},e.fn.colorpicker.defaults={},e.fn.colorpicker.Constructor=n;var i={translateFormats:{rgb:function(){var e=this.color.toRGB();return"rgb("+e.r+","+e.g+","+e.b+")"},rgba:function(){var e=this.color.toRGB();return"rgba("+e.r+","+e.g+","+e.b+","+e.a+")"},hsl:function(){var e=this.color.toHSL();return"hsl("+Math.round(360*e.h)+","+Math.round(100*e.s)+"%,"+Math.round(100*e.l)+"%)"},hsla:function(){var e=this.color.toHSL();return"hsla("+Math.round(360*e.h)+","+Math.round(100*e.s)+"%,"+Math.round(100*e.l)+"%,"+e.a+")"},hex:function(){return this.color.toHex()}},sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setLightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},RGBtoHSB:function(e,t,n,i){e/=255,t/=255,n/=255;var r,s,o,a;return o=Math.max(e,t,n),a=o-Math.min(e,t,n),r=0===a?null:o==e?(t-n)/a:o==t?(n-e)/a+2:(e-t)/a+4,r=60*((r+360)%6)/360,s=0===a?0:a/o,{h:r||1,s:s,b:o,a:i||1}},HueToRGB:function(e,t,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?e+6*(t-e)*n:1>2*n?t:2>3*n?e+6*(t-e)*(2/3-n):e},HSLtoRGB:function(e,t,n,r){0>t&&(t=0);var s;s=.5>=n?n*(1+t):n+t-n*t;var o=2*n-s,a=e+1/3,l=e,c=e-1/3,h=Math.round(255*i.HueToRGB(o,s,a)),u=Math.round(255*i.HueToRGB(o,s,l)),d=Math.round(255*i.HueToRGB(o,s,c));return[h,u,d,r||1]},stringParsers:[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}}],template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div></div>'}}(window.jQuery),/**
|
||
* @version: 1.0 Alpha-1
|
||
* @author: Coolite Inc. http://www.coolite.com/
|
||
* @date: 2008-05-13
|
||
* @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
||
* @license: Licensed under The MIT License. See http://www.datejs.com/license/.
|
||
* @website: http://www.datejs.com/
|
||
*/
|
||
Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]},function(){var e=Date,t=e.prototype,n=e.CultureInfo,i=function(e,t){return t||(t=2),("000"+e).slice(-1*t)};t.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},t.setTimeToNow=function(){var e=new Date;return this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()),this},e.today=function(){return(new Date).clearTime()},e.compare=function(e,t){if(isNaN(e)||isNaN(t))throw new Error(e+" - "+t);if(e instanceof Date&&t instanceof Date)return t>e?-1:e>t?1:0;throw new TypeError(e+" - "+t)},e.equals=function(e,t){return 0===e.compareTo(t)},e.getDayNumberFromName=function(e){for(var t=n.dayNames,i=n.abbreviatedDayNames,r=n.shortestDayNames,s=e.toLowerCase(),o=0;t.length>o;o++)if(t[o].toLowerCase()==s||i[o].toLowerCase()==s||r[o].toLowerCase()==s)return o;return-1},e.getMonthNumberFromName=function(e){for(var t=n.monthNames,i=n.abbreviatedMonthNames,r=e.toLowerCase(),s=0;t.length>s;s++)if(t[s].toLowerCase()==r||i[s].toLowerCase()==r)return s;return-1},e.isLeapYear=function(e){return 0===e%4&&0!==e%100||0===e%400},e.getDaysInMonth=function(t,n){return[31,e.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][n]},e.getTimezoneAbbreviation=function(e){for(var t=n.timezones,i=0;t.length>i;i++)if(t[i].offset===e)return t[i].name;return null},e.getTimezoneOffset=function(e){for(var t=n.timezones,i=0;t.length>i;i++)if(t[i].name===e.toUpperCase())return t[i].offset;return null},t.clone=function(){return new Date(this.getTime())},t.compareTo=function(e){return Date.compare(this,e)},t.equals=function(e){return Date.equals(this,e||new Date)},t.between=function(e,t){return this.getTime()>=e.getTime()&&this.getTime()<=t.getTime()},t.isAfter=function(e){return 1===this.compareTo(e||new Date)},t.isBefore=function(e){return-1===this.compareTo(e||new Date)},t.isToday=function(){return this.isSameDay(new Date)},t.isSameDay=function(e){return this.clone().clearTime().equals(e.clone().clearTime())},t.addMilliseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+e),this},t.addSeconds=function(e){return this.addMilliseconds(1e3*e)},t.addMinutes=function(e){return this.addMilliseconds(6e4*e)},t.addHours=function(e){return this.addMilliseconds(36e5*e)},t.addDays=function(e){return this.setDate(this.getDate()+e),this},t.addWeeks=function(e){return this.addDays(7*e)},t.addMonths=function(t){var n=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+t),this.setDate(Math.min(n,e.getDaysInMonth(this.getFullYear(),this.getMonth()))),this},t.addYears=function(e){return this.addMonths(12*e)},t.add=function(e){if("number"==typeof e)return this._orient=e,this;var t=e;return t.milliseconds&&this.addMilliseconds(t.milliseconds),t.seconds&&this.addSeconds(t.seconds),t.minutes&&this.addMinutes(t.minutes),t.hours&&this.addHours(t.hours),t.weeks&&this.addWeeks(t.weeks),t.months&&this.addMonths(t.months),t.years&&this.addYears(t.years),t.days&&this.addDays(t.days),this};var r,s,o;t.getWeek=function(){var e,t,n,i,a,l,c,h,u,d;return r=r?r:this.getFullYear(),s=s?s:this.getMonth()+1,o=o?o:this.getDate(),2>=s?(e=r-1,t=(0|e/4)-(0|e/100)+(0|e/400),n=(0|(e-1)/4)-(0|(e-1)/100)+(0|(e-1)/400),u=t-n,a=0,l=o-1+31*(s-1)):(e=r,t=(0|e/4)-(0|e/100)+(0|e/400),n=(0|(e-1)/4)-(0|(e-1)/100)+(0|(e-1)/400),u=t-n,a=u+1,l=o+(153*(s-3)+2)/5+58+u),c=(e+t)%7,i=(l+c-a)%7,h=0|l+3-i,d=0>h?53-(0|(c-u)/5):h>364+u?1:(0|h/7)+1,r=s=o=null,d},t.getISOWeek=function(){return r=this.getUTCFullYear(),s=this.getUTCMonth()+1,o=this.getUTCDate(),i(this.getWeek())},t.setWeek=function(e){return this.moveToDayOfWeek(1).addWeeks(e-this.getWeek())},e._validate=function(e,t,n,i){if("undefined"==typeof e)return!1;if("number"!=typeof e)throw new TypeError(e+" is not a Number.");if(t>e||e>n)throw new RangeError(e+" is not a valid value for "+i+".");return!0},e.validateMillisecond=function(t){return e._validate(t,0,999,"millisecond")},e.validateSecond=function(t){return e._validate(t,0,59,"second")},e.validateMinute=function(t){return e._validate(t,0,59,"minute")},e.validateHour=function(t){return e._validate(t,0,23,"hour")},e.validateDay=function(t,n,i){return e._validate(t,1,e.getDaysInMonth(n,i),"day")},e.validateMonth=function(t){return e._validate(t,0,11,"month")},e.validateYear=function(t){return e._validate(t,0,9999,"year")},t.set=function(t){return e.validateMillisecond(t.millisecond)&&this.addMilliseconds(t.millisecond-this.getMilliseconds()),e.validateSecond(t.second)&&this.addSeconds(t.second-this.getSeconds()),e.validateMinute(t.minute)&&this.addMinutes(t.minute-this.getMinutes()),e.validateHour(t.hour)&&this.addHours(t.hour-this.getHours()),e.validateMonth(t.month)&&this.addMonths(t.month-this.getMonth()),e.validateYear(t.year)&&this.addYears(t.year-this.getFullYear()),e.validateDay(t.day,this.getFullYear(),this.getMonth())&&this.addDays(t.day-this.getDate()),t.timezone&&this.setTimezone(t.timezone),t.timezoneOffset&&this.setTimezoneOffset(t.timezoneOffset),t.week&&e._validate(t.week,0,53,"week")&&this.setWeek(t.week),this},t.moveToFirstDayOfMonth=function(){return this.set({day:1})},t.moveToLastDayOfMonth=function(){return this.set({day:e.getDaysInMonth(this.getFullYear(),this.getMonth())})},t.moveToNthOccurrence=function(e,t){var n=0;if(t>0)n=t-1;else if(-1===t)return this.moveToLastDayOfMonth(),this.getDay()!==e&&this.moveToDayOfWeek(e,-1),this;return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(e,1).addWeeks(n)},t.moveToDayOfWeek=function(e,t){var n=(e-this.getDay()+7*(t||1))%7;return this.addDays(0===n?n+=7*(t||1):n)},t.moveToMonth=function(e,t){var n=(e-this.getMonth()+12*(t||1))%12;return this.addMonths(0===n?n+=12*(t||1):n)},t.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1},t.getTimezone=function(){return e.getTimezoneAbbreviation(this.getUTCOffset())},t.setTimezoneOffset=function(e){var t=this.getTimezoneOffset(),n=-6*Number(e)/10;return this.addMinutes(n-t)},t.setTimezone=function(t){return this.setTimezoneOffset(e.getTimezoneOffset(t))},t.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()},t.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()},t.getUTCOffset=function(){var e,t=-10*this.getTimezoneOffset()/6;return 0>t?(e=(t-1e4).toString(),e.charAt(0)+e.substr(2)):(e=(t+1e4).toString(),"+"+e.substr(1))},t.getElapsed=function(e){return(e||new Date)-this},t.toISOString||(t.toISOString=function(){function e(e){return 10>e?"0"+e:e}return'"'+this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+'Z"'}),t._toString=t.toString,t.toString=function(e){var t=this;if(e&&1==e.length){var r=n.formatPatterns;switch(t.t=t.toString,e){case"d":return t.t(r.shortDate);case"D":return t.t(r.longDate);case"F":return t.t(r.fullDateTime);case"m":return t.t(r.monthDay);case"r":return t.t(r.rfc1123);case"s":return t.t(r.sortableDateTime);case"t":return t.t(r.shortTime);case"T":return t.t(r.longTime);case"u":return t.t(r.universalSortableDateTime);case"y":return t.t(r.yearMonth)}}var s=function(e){switch(1*e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return e?e.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(e){if("\\"===e.charAt(0))return e.replace("\\","");switch(t.h=t.getHours,e){case"hh":return i(13>t.h()?0===t.h()?12:t.h():t.h()-12);case"h":return 13>t.h()?0===t.h()?12:t.h():t.h()-12;case"HH":return i(t.h());case"H":return t.h();case"mm":return i(t.getMinutes());case"m":return t.getMinutes();case"ss":return i(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return i(t.getFullYear(),4);case"yy":return i(t.getFullYear());case"dddd":return n.dayNames[t.getDay()];case"ddd":return n.abbreviatedDayNames[t.getDay()];case"dd":return i(t.getDate());case"d":return t.getDate();case"MMMM":return n.monthNames[t.getMonth()];case"MMM":return n.abbreviatedMonthNames[t.getMonth()];case"MM":return i(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return 12>t.h()?n.amDesignator.substring(0,1):n.pmDesignator.substring(0,1);case"tt":return 12>t.h()?n.amDesignator:n.pmDesignator;case"S":return s(t.getDate());default:return e}}):this._toString()}}(),function(){var e=Date,t=e.prototype,n=e.CultureInfo,i=Number.prototype;t._orient=1,t._nth=null,t._is=!1,t._same=!1,t._isSecond=!1,i._dateElement="day",t.next=function(){return this._orient=1,this},e.next=function(){return e.today().next()},t.last=t.prev=t.previous=function(){return this._orient=-1,this},e.last=e.prev=e.previous=function(){return e.today().last()},t.is=function(){return this._is=!0,this},t.same=function(){return this._same=!0,this._isSecond=!1,this},t.today=function(){return this.same().day()},t.weekday=function(){return this._is?(this._is=!1,!this.is().sat()&&!this.is().sun()):!1},t.at=function(t){return"string"==typeof t?e.parse(this.toString("d")+" "+t):this.set(t)},i.fromNow=i.after=function(e){var t={};return t[this._dateElement]=this,(e?e.clone():new Date).add(t)},i.ago=i.before=function(e){var t={};return t[this._dateElement]=-1*this,(e?e.clone():new Date).add(t)};var r,s="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),o="january february march april may june july august september october november december".split(/\s/),a="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),l="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),c="final first second third fourth fifth".split(/\s/);t.toObject=function(){for(var e={},t=0;a.length>t;t++)e[a[t].toLowerCase()]=this["get"+l[t]]();return e},e.fromObject=function(e){return e.week=null,Date.today().set(e)};for(var h=function(t){return function(){if(this._is)return this._is=!1,this.getDay()==t;if(null!==this._nth){this._isSecond&&this.addSeconds(-1*this._orient),this._isSecond=!1;var n=this._nth;this._nth=null;var i=this.clone().moveToLastDayOfMonth();if(this.moveToNthOccurrence(t,n),this>i)throw new RangeError(e.getDayName(t)+" does not occur "+n+" times in the month of "+e.getMonthName(i.getMonth())+" "+i.getFullYear()+".");return this}return this.moveToDayOfWeek(t,this._orient)}},u=function(t){return function(){var i=e.today(),r=t-i.getDay();return 0===t&&1===n.firstDayOfWeek&&0!==i.getDay()&&(r+=7),i.addDays(r)}},d=0;s.length>d;d++)e[s[d].toUpperCase()]=e[s[d].toUpperCase().substring(0,3)]=d,e[s[d]]=e[s[d].substring(0,3)]=u(d),t[s[d]]=t[s[d].substring(0,3)]=h(d);for(var f=function(e){return function(){return this._is?(this._is=!1,this.getMonth()===e):this.moveToMonth(e,this._orient)}},p=function(t){return function(){return e.today().set({month:t,day:1})}},g=0;o.length>g;g++)e[o[g].toUpperCase()]=e[o[g].toUpperCase().substring(0,3)]=g,e[o[g]]=e[o[g].substring(0,3)]=p(g),t[o[g]]=t[o[g].substring(0,3)]=f(g);for(var m=function(e){return function(){if(this._isSecond)return this._isSecond=!1,this;if(this._same){this._same=this._is=!1;for(var t=this.toObject(),n=(arguments[0]||new Date).toObject(),i="",r=e.toLowerCase(),s=a.length-1;s>-1;s--){if(i=a[s].toLowerCase(),t[i]!=n[i])return!1;if(r==i)break}return!0}return"s"!=e.substring(e.length-1)&&(e+="s"),this["add"+e](this._orient)}},y=function(e){return function(){return this._dateElement=e,this}},v=0;a.length>v;v++)r=a[v].toLowerCase(),t[r]=t[r+"s"]=m(a[v]),i[r]=i[r+"s"]=y(r);t._ss=m("Second");for(var b=function(e){return function(t){return this._same?this._ss(arguments[0]):t||0===t?this.moveToNthOccurrence(t,e):(this._nth=e,2!==e||void 0!==t&&null!==t?this:(this._isSecond=!0,this.addSeconds(this._orient)))}},w=0;c.length>w;w++)t[c[w]]=0===w?b(-1):b(w)}(),function(){Date.Parsing={Exception:function(e){this.message="Parse error at '"+e.substring(0,10)+" ...'"}};for(var e=Date.Parsing,t=e.Operators={rtoken:function(t){return function(n){var i=n.match(t);if(i)return[i[0],n.substring(i[0].length)];throw new e.Exception(n)}},token:function(){return function(e){return t.rtoken(new RegExp("^s*"+e+"s*"))(e)}},stoken:function(e){return t.rtoken(new RegExp("^"+e))},until:function(e){return function(t){for(var n=[],i=null;t.length;){try{i=e.call(this,t)}catch(r){n.push(i[0]),t=i[1];continue}break}return[n,t]}},many:function(e){return function(t){for(var n=[],i=null;t.length;){try{i=e.call(this,t)}catch(r){return[n,t]}n.push(i[0]),t=i[1]}return[n,t]}},optional:function(e){return function(t){var n=null;try{n=e.call(this,t)}catch(i){return[null,t]}return[n[0],n[1]]}},not:function(t){return function(n){try{t.call(this,n)}catch(i){return[null,n]}throw new e.Exception(n)}},ignore:function(e){return e?function(t){var n=null;return n=e.call(this,t),[null,n[1]]}:null},product:function(){for(var e=arguments[0],n=Array.prototype.slice.call(arguments,1),i=[],r=0;e.length>r;r++)i.push(t.each(e[r],n));return i},cache:function(t){var n={},i=null;return function(r){try{i=n[r]=n[r]||t.call(this,r)}catch(s){i=n[r]=s}if(i instanceof e.Exception)throw i;return i}},any:function(){var t=arguments;return function(n){for(var i=null,r=0;t.length>r;r++)if(null!=t[r]){try{i=t[r].call(this,n)}catch(s){i=null}if(i)return i}throw new e.Exception(n)}},each:function(){var t=arguments;return function(n){for(var i=[],r=null,s=0;t.length>s;s++)if(null!=t[s]){try{r=t[s].call(this,n)}catch(o){throw new e.Exception(n)}i.push(r[0]),n=r[1]}return[i,n]}},all:function(){var e=arguments,t=t;return t.each(t.optional(e))},sequence:function(n,i,r){return i=i||t.rtoken(/^\s*/),r=r||null,1==n.length?n[0]:function(t){for(var s=null,o=null,a=[],l=0;n.length>l;l++){try{s=n[l].call(this,t)}catch(c){break}a.push(s[0]);try{o=i.call(this,s[1])}catch(h){o=null;break}t=o[1]}if(!s)throw new e.Exception(t);if(o)throw new e.Exception(o[1]);if(r)try{s=r.call(this,s[1])}catch(u){throw new e.Exception(s[1])}return[a,s?s[1]:t]}},between:function(e,n,i){i=i||e;var s=t.each(t.ignore(e),n,t.ignore(i));return function(e){var t=s.call(this,e);return[[t[0][0],r[0][2]],t[1]]}},list:function(e,n,i){return n=n||t.rtoken(/^\s*/),i=i||null,e instanceof Array?t.each(t.product(e.slice(0,-1),t.ignore(n)),e.slice(-1),t.ignore(i)):t.each(t.many(t.each(e,t.ignore(n))),px,t.ignore(i))},set:function(n,i,r){return i=i||t.rtoken(/^\s*/),r=r||null,function(s){for(var o=null,a=null,l=null,c=null,h=[[],s],u=!1,d=0;n.length>d;d++){l=null,a=null,o=null,u=1==n.length;try{o=n[d].call(this,s)}catch(f){continue}if(c=[[o[0]],o[1]],o[1].length>0&&!u)try{l=i.call(this,o[1])}catch(p){u=!0}else u=!0;if(u||0!==l[1].length||(u=!0),!u){for(var g=[],m=0;n.length>m;m++)d!=m&&g.push(n[m]);a=t.set(g,i).call(this,l[1]),a[0].length>0&&(c[0]=c[0].concat(a[0]),c[1]=a[1])}if(c[1].length<h[1].length&&(h=c),0===h[1].length)break}if(0===h[0].length)return h;if(r){try{l=r.call(this,h[1])}catch(y){throw new e.Exception(h[1])}h[1]=l[1]}return h}},forward:function(e,t){return function(n){return e[t].call(this,n)}},replace:function(e,t){return function(n){var i=e.call(this,n);return[t,i[1]]}},process:function(e,t){return function(n){var i=e.call(this,n);return[t.call(this,i[0]),i[1]]}},min:function(t,n){return function(i){var r=n.call(this,i);if(t>r[0].length)throw new e.Exception(i);return r}}},n=function(e){return function(){var t=null,n=[];if(arguments.length>1?t=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(t=arguments[0]),!t)return e.apply(null,arguments);for(var i=0,r=t.shift();r.length>i;i++)return t.unshift(r[i]),n.push(e.apply(null,t)),t.shift(),n}},i="optional not ignore cache".split(/\s/),s=0;i.length>s;s++)t[i[s]]=n(t[i[s]]);for(var o=function(e){return function(){return arguments[0]instanceof Array?e.apply(null,arguments[0]):e.apply(null,arguments)}},a="each any all".split(/\s/),l=0;a.length>l;l++)t[a[l]]=o(t[a[l]])}(),function(){var e=Date,t=(e.prototype,e.CultureInfo),n=function(e){for(var t=[],i=0;e.length>i;i++)e[i]instanceof Array?t=t.concat(n(e[i])):e[i]&&t.push(e[i]);return t};e.Grammar={},e.Translator={hour:function(e){return function(){this.hour=Number(e)}},minute:function(e){return function(){this.minute=Number(e)}},second:function(e){return function(){this.second=Number(e)}},meridian:function(e){return function(){this.meridian=e.slice(0,1).toLowerCase()}},timezone:function(e){return function(){var t=e.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=e.toLowerCase()}},day:function(e){var t=e[0];return function(){this.day=Number(t.match(/\d+/)[0])}},month:function(e){return function(){this.month=3==e.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(e)/4:Number(e)-1}},year:function(e){return function(){var n=Number(e);this.year=e.length>2?n:n+(t.twoDigitYearMax>n+2e3?2e3:1900)}},rday:function(e){return function(){switch(e){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0,this.now=!0}}},finishExact:function(t){t=t instanceof Array?t:[t];for(var n=0;t.length>n;n++)t[n]&&t[n].call(this);var i=new Date;if(!this.hour&&!this.minute||this.month||this.year||this.day||(this.day=i.getDate()),this.year||(this.year=i.getFullYear()),this.month||0===this.month||(this.month=i.getMonth()),this.day||(this.day=1),this.hour||(this.hour=0),this.minute||(this.minute=0),this.second||(this.second=0),this.meridian&&this.hour&&("p"==this.meridian&&12>this.hour?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.day>e.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);return this.timezone?r.set({timezone:this.timezone}):this.timezoneOffset&&r.set({timezoneOffset:this.timezoneOffset}),r},finish:function(t){if(t=t instanceof Array?n(t):[t],0===t.length)return null;for(var i=0;t.length>i;i++)"function"==typeof t[i]&&t[i].call(this);var r=e.today();if(this.now&&!this.unit&&!this.operator)return new Date;this.now&&(r=new Date);var s,o,a,l=!!(this.days&&null!==this.days||this.orient||this.operator);if(a="past"==this.orient||"subtract"==this.operator?-1:1,this.now||-1=="hour minute second".indexOf(this.unit)||r.setTimeToNow(),(this.month||0===this.month)&&-1!="year day hour minute second".indexOf(this.unit)&&(this.value=this.month+1,this.month=null,l=!0),!l&&this.weekday&&!this.day&&!this.days){var c=Date[this.weekday]();this.day=c.getDate(),this.month||(this.month=c.getMonth()),this.year=c.getFullYear()}if(l&&this.weekday&&"month"!=this.unit&&(this.unit="day",s=e.getDayNumberFromName(this.weekday)-r.getDay(),o=7,this.days=s?(s+a*o)%o:a*o),this.month&&"day"==this.unit&&this.operator&&(this.value=this.month+1,this.month=null),null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value),this.month&&!this.day&&this.value&&(r.set({day:1*this.value}),l||(this.day=1*this.value)),this.month||!this.value||"month"!=this.unit||this.now||(this.month=this.value,l=!0),l&&(this.month||0===this.month)&&"year"!=this.unit&&(this.unit="month",s=this.month-r.getMonth(),o=12,this.months=s?(s+a*o)%o:a*o,this.month=null),this.unit||(this.unit="day"),!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"]?this[this.unit+"s"]=this[this.unit+"s"]+("add"==this.operator?1:-1)+(this.value||0)*a:(null==this[this.unit+"s"]||null!=this.operator)&&(this.value||(this.value=1),this[this.unit+"s"]=this.value*a),this.meridian&&this.hour&&("p"==this.meridian&&12>this.hour?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.weekday&&!this.day&&!this.days){var c=Date[this.weekday]();this.day=c.getDate(),c.getMonth()!==r.getMonth()&&(this.month=c.getMonth())}return!this.month&&0!==this.month||this.day||(this.day=1),this.orient||this.operator||"week"!=this.unit||!this.value||this.day||this.month?(l&&this.timezone&&this.day&&this.days&&(this.day=this.days),l?r.add(this):r.set(this)):Date.today().setWeek(this.value)}};var i,r=e.Parsing.Operators,s=e.Grammar,o=e.Translator;s.datePartDelimiter=r.rtoken(/^([\s\-\.\,\/\x27]+)/),s.timePartDelimiter=r.stoken(":"),s.whiteSpace=r.rtoken(/^\s*/),s.generalDelimiter=r.rtoken(/^(([\s\,]|at|@|on)+)/);var a={};s.ctoken=function(e){var n=a[e];if(!n){for(var i=t.regexPatterns,s=e.split(/\s+/),o=[],l=0;s.length>l;l++)o.push(r.replace(r.rtoken(i[s[l]]),s[l]));n=a[e]=r.any.apply(null,o)}return n},s.ctoken2=function(e){return r.rtoken(t.regexPatterns[e])},s.h=r.cache(r.process(r.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),o.hour)),s.hh=r.cache(r.process(r.rtoken(/^(0[0-9]|1[0-2])/),o.hour)),s.H=r.cache(r.process(r.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),o.hour)),s.HH=r.cache(r.process(r.rtoken(/^([0-1][0-9]|2[0-3])/),o.hour)),s.m=r.cache(r.process(r.rtoken(/^([0-5][0-9]|[0-9])/),o.minute)),s.mm=r.cache(r.process(r.rtoken(/^[0-5][0-9]/),o.minute)),s.s=r.cache(r.process(r.rtoken(/^([0-5][0-9]|[0-9])/),o.second)),s.ss=r.cache(r.process(r.rtoken(/^[0-5][0-9]/),o.second)),s.hms=r.cache(r.sequence([s.H,s.m,s.s],s.timePartDelimiter)),s.t=r.cache(r.process(s.ctoken2("shortMeridian"),o.meridian)),s.tt=r.cache(r.process(s.ctoken2("longMeridian"),o.meridian)),s.z=r.cache(r.process(r.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),o.timezone)),s.zz=r.cache(r.process(r.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),o.timezone)),s.zzz=r.cache(r.process(s.ctoken2("timezone"),o.timezone)),s.timeSuffix=r.each(r.ignore(s.whiteSpace),r.set([s.tt,s.zzz])),s.time=r.each(r.optional(r.ignore(r.stoken("T"))),s.hms,s.timeSuffix),s.d=r.cache(r.process(r.each(r.rtoken(/^([0-2]\d|3[0-1]|\d)/),r.optional(s.ctoken2("ordinalSuffix"))),o.day)),s.dd=r.cache(r.process(r.each(r.rtoken(/^([0-2]\d|3[0-1])/),r.optional(s.ctoken2("ordinalSuffix"))),o.day)),s.ddd=s.dddd=r.cache(r.process(s.ctoken("sun mon tue wed thu fri sat"),function(e){return function(){this.weekday=e}})),s.M=r.cache(r.process(r.rtoken(/^(1[0-2]|0\d|\d)/),o.month)),s.MM=r.cache(r.process(r.rtoken(/^(1[0-2]|0\d)/),o.month)),s.MMM=s.MMMM=r.cache(r.process(s.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),o.month)),s.y=r.cache(r.process(r.rtoken(/^(\d\d?)/),o.year)),s.yy=r.cache(r.process(r.rtoken(/^(\d\d)/),o.year)),s.yyy=r.cache(r.process(r.rtoken(/^(\d\d?\d?\d?)/),o.year)),s.yyyy=r.cache(r.process(r.rtoken(/^(\d\d\d\d)/),o.year)),i=function(){return r.each(r.any.apply(null,arguments),r.not(s.ctoken2("timeContext")))},s.day=i(s.d,s.dd),s.month=i(s.M,s.MMM),s.year=i(s.yyyy,s.yy),s.orientation=r.process(s.ctoken("past future"),function(e){return function(){this.orient=e}}),s.operator=r.process(s.ctoken("add subtract"),function(e){return function(){this.operator=e}}),s.rday=r.process(s.ctoken("yesterday tomorrow today now"),o.rday),s.unit=r.process(s.ctoken("second minute hour day week month year"),function(e){return function(){this.unit=e}}),s.value=r.process(r.rtoken(/^\d\d?(st|nd|rd|th)?/),function(e){return function(){this.value=e.replace(/\D/g,"")}}),s.expression=r.set([s.rday,s.operator,s.value,s.unit,s.orientation,s.ddd,s.MMM]),i=function(){return r.set(arguments,s.datePartDelimiter)},s.mdy=i(s.ddd,s.month,s.day,s.year),s.ymd=i(s.ddd,s.year,s.month,s.day),s.dmy=i(s.ddd,s.day,s.month,s.year),s.date=function(e){return(s[t.dateElementOrder]||s.mdy).call(this,e)},s.format=r.process(r.many(r.any(r.process(r.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(t){if(s[t])return s[t];throw e.Parsing.Exception(t)}),r.process(r.rtoken(/^[^dMyhHmstz]+/),function(e){return r.ignore(r.stoken(e))}))),function(e){return r.process(r.each.apply(null,e),o.finishExact)});var l={},c=function(e){return l[e]=l[e]||s.format(e)[0]};s.formats=function(e){if(e instanceof Array){for(var t=[],n=0;e.length>n;n++)t.push(c(e[n]));return r.any.apply(null,t)}return c(e)},s._formats=s.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]),s._start=r.process(r.set([s.date,s.time,s.expression],s.generalDelimiter,s.whiteSpace),o.finish),s.start=function(e){try{var t=s._formats.call({},e);if(0===t[1].length)return t}catch(n){}return s._start.call({},e)},e._parse=e.parse,e.parse=function(t){var n=null;if(!t)return null;if(t instanceof Date)return t;try{n=e.Grammar.start.call({},t.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(i){return null}return 0===n[1].length?n[0]:null},e.getParseFunction=function(t){var n=e.Grammar.formats(t);return function(e){var t=null;try{t=n.call({},e)}catch(i){return null}return 0===t[1].length?t[0]:null}},e.parseExact=function(t,n){return e.getParseFunction(n)(t)}}(),/**
|
||
* @version: 1.1
|
||
* @author: Dan Grossman http://www.dangrossman.info/
|
||
* @date: 2013-03-04
|
||
* @copyright: Copyright (c) 2012 Dan Grossman. All rights reserved.
|
||
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
|
||
* @website: http://www.improvely.com/
|
||
*/
|
||
!function(e){var t=function(t,n,i){var r,s="object"==typeof n;this.startDate=Date.today(),this.endDate=Date.today(),this.minDate=!1,this.maxDate=!1,this.changed=!1,this.cleared=!1,this.showDropdowns=!1,this.ranges={},this.dateLimit=!1,this.opens="right",this.cb=function(){},this.format="MM/dd/yyyy",this.separator=" - ",this.showWeekNumbers=!1,this.buttonClasses=["btn-success"],this.applyClass="btn btn-small btn-success",this.clearClass="btn btn-small",this.locale={applyLabel:"Apply",clearLabel:"Clear",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:Date.CultureInfo.shortestDayNames,monthNames:Date.CultureInfo.monthNames,firstDay:0},r=this.locale,this.leftCalendar={month:Date.today().set({day:1,month:this.startDate.getMonth(),year:this.startDate.getFullYear()}),calendar:Array()},this.rightCalendar={month:Date.today().set({day:1,month:this.endDate.getMonth(),year:this.endDate.getFullYear()}),calendar:Array()},this.element=e(t),this.element.hasClass("pull-right")&&(this.opens="left"),this.element.is("input")?this.element.on({click:e.proxy(this.show,this),focus:e.proxy(this.show,this)}):this.element.on("click",e.proxy(this.show,this)),s&&("object"==typeof n.locale&&e.each(r,function(e,t){r[e]=n.locale[e]||t}),n.applyClass&&(this.applyClass=n.applyClass),n.clearClass&&(this.clearClass=n.clearClass));var o='<div class="daterangepicker dropdown-menu"><div class="calendar left"></div><div class="calendar right"></div><div class="ranges"><div class="range_inputs"><div class="daterangepicker_start_input" style="float: left"><label for="daterangepicker_start">'+this.locale.fromLabel+"</label>"+'<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />'+"</div>"+'<div class="daterangepicker_end_input" style="float: left; padding-left: 11px">'+'<label for="daterangepicker_end">'+this.locale.toLabel+"</label>"+'<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />'+"</div>"+'<button class="'+this.applyClass+' applyBtn" disabled="disabled">'+this.locale.applyLabel+"</button> "+'<button class="'+this.clearClass+' clearBtn">'+this.locale.clearLabel+"</button>"+"</div>"+"</div>"+"</div>";if(this.container=e(o).appendTo("body"),s){if("string"==typeof n.format&&(this.format=n.format),"string"==typeof n.separator&&(this.separator=n.separator),"string"==typeof n.startDate&&(this.startDate=Date.parseExact(n.startDate,this.format)),"string"==typeof n.endDate&&(this.endDate=Date.parseExact(n.endDate,this.format)),"string"==typeof n.minDate&&(this.minDate=Date.parseExact(n.minDate,this.format)),"string"==typeof n.maxDate&&(this.maxDate=Date.parseExact(n.maxDate,this.format)),"object"==typeof n.startDate&&(this.startDate=n.startDate),"object"==typeof n.endDate&&(this.endDate=n.endDate),"object"==typeof n.minDate&&(this.minDate=n.minDate),"object"==typeof n.maxDate&&(this.maxDate=n.maxDate),"object"==typeof n.ranges){for(var a in n.ranges){var l=n.ranges[a][0],c=n.ranges[a][1];"string"==typeof l&&(l=Date.parse(l)),"string"==typeof c&&(c=Date.parse(c)),this.minDate&&this.minDate>l&&(l=this.minDate),this.maxDate&&c>this.maxDate&&(c=this.maxDate),this.minDate&&this.minDate>c||this.maxDate&&l>this.maxDate||(this.ranges[a]=[l,c])}var h="<ul>";for(var a in this.ranges)h+="<li>"+a+"</li>";h+="<li>"+this.locale.customRangeLabel+"</li>",h+="</ul>",this.container.find(".ranges").prepend(h)}if("object"==typeof n.dateLimit&&(this.dateLimit=n.dateLimit),"object"==typeof n.locale&&"number"==typeof n.locale.firstDay){this.locale.firstDay=n.locale.firstDay;for(var u=n.locale.firstDay;u>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),u--}"string"==typeof n.opens&&(this.opens=n.opens),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=[n.buttonClasses]),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns)}var d=this.container;if(e.each(this.buttonClasses,function(e,t){d.find("button").addClass(t)}),"right"==this.opens){var f=this.container.find(".calendar.left"),p=this.container.find(".calendar.right");f.removeClass("left").addClass("right"),p.removeClass("right").addClass("left")}if(("undefined"==typeof n||"undefined"==typeof n.ranges)&&this.container.find(".calendar").show(),"function"==typeof i&&(this.cb=i),this.container.addClass("opens"+this.opens),(!s||"undefined"==typeof n.startDate&&"undefined"==typeof n.endDate)&&e(this.element).is("input[type=text]")){var g=e(this.element).val(),m=g.split(this.separator);2==m.length&&(this.startDate=Date.parseExact(m[0],this.format),this.endDate=Date.parseExact(m[1],this.format))}this.container.on("mousedown",e.proxy(this.mousedown,this)),this.container.find(".calendar").on("click",".prev",e.proxy(this.clickPrev,this)),this.container.find(".calendar").on("click",".next",e.proxy(this.clickNext,this)),this.container.find(".ranges").on("click","button.applyBtn",e.proxy(this.clickApply,this)),this.container.find(".ranges").on("click","button.clearBtn",e.proxy(this.clickClear,this)),this.container.find(".calendar").on("click","td.available",e.proxy(this.clickDate,this)),this.container.find(".calendar").on("mouseenter","td.available",e.proxy(this.enterDate,this)),this.container.find(".calendar").on("mouseleave","td.available",e.proxy(this.updateView,this)),this.container.find(".ranges").on("click","li",e.proxy(this.clickRange,this)),this.container.find(".ranges").on("mouseenter","li",e.proxy(this.enterRange,this)),this.container.find(".ranges").on("mouseleave","li",e.proxy(this.updateView,this)),this.container.find(".calendar").on("change","select.yearselect",e.proxy(this.updateYear,this)),this.container.find(".calendar").on("change","select.monthselect",e.proxy(this.updateMonth,this)),this.element.on("keyup",e.proxy(this.updateFromControl,this)),this.updateView(),this.updateCalendars()};t.prototype={constructor:t,mousedown:function(t){t.stopPropagation(),(!this.showDropdowns||e(t.target).not("select").length)&&t.preventDefault()},updateView:function(){this.leftCalendar.month.set({month:this.startDate.getMonth(),year:this.startDate.getFullYear()}),this.rightCalendar.month.set({month:this.endDate.getMonth(),year:this.endDate.getFullYear()}),this.container.find("input[name=daterangepicker_start]").val(this.startDate.toString(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.toString(this.format)),this.startDate.equals(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")){var e=this.element.val().split(this.separator),t=Date.parseExact(e[0],this.format),n=Date.parseExact(e[1],this.format);null!=t&&null!=n&&(n.isBefore(t)||(this.startDate=t,this.endDate=n,this.updateView(),this.cb(this.startDate,this.endDate),this.updateCalendars()))}},notify:function(){this.cleared||this.updateView(),this.element.is("input")&&this.element.val(this.cleared?"":this.startDate.toString(this.format)+this.separator+this.endDate.toString(this.format));var e=this.cleared?null:this.startDate,t=this.cleared?null:this.endDate;this.cleared=!1,this.cb(e,t)},move:function(){"left"==this.opens?this.container.css({top:this.element.offset().top+this.element.outerHeight(),right:e(window).width()-this.element.offset().left-this.element.outerWidth(),left:"auto"}):this.container.css({top:this.element.offset().top+this.element.outerHeight(),left:this.element.offset().left,right:"auto"})},show:function(t){this.container.show(),this.move(),t&&(t.stopPropagation(),t.preventDefault()),this.changed=!1,this.element.trigger("shown",{target:t.target,picker:this}),e(document).on("mousedown",e.proxy(this.hide,this))},hide:function(){this.container.hide(),e(document).off("mousedown",this.hide),this.changed&&(this.changed=!1,this.notify())},enterRange:function(e){var t=e.target.innerHTML;if(t==this.locale.customRangeLabel)this.updateView();else{var n=this.ranges[t];this.container.find("input[name=daterangepicker_start]").val(n[0].toString(this.format)),this.container.find("input[name=daterangepicker_end]").val(n[1].toString(this.format))}},clickRange:function(e){var t=e.target.innerHTML;if(t==this.locale.customRangeLabel)this.container.find(".calendar").show();else{var n=this.ranges[t];this.startDate=n[0],this.endDate=n[1],this.leftCalendar.month.set({month:this.startDate.getMonth(),year:this.startDate.getFullYear()}),this.rightCalendar.month.set({month:this.endDate.getMonth(),year:this.endDate.getFullYear()}),this.updateCalendars(),this.changed=!0,this.container.find(".calendar").hide(),this.hide()}},clickPrev:function(t){var n=e(t.target).parents(".calendar");n.hasClass("left")?this.leftCalendar.month.add({months:-1}):this.rightCalendar.month.add({months:-1}),this.updateCalendars()},clickNext:function(t){var n=e(t.target).parents(".calendar");n.hasClass("left")?this.leftCalendar.month.add({months:1}):this.rightCalendar.month.add({months:1}),this.updateCalendars()},enterDate:function(t){var n=e(t.target).attr("title"),i=n.substr(1,1),r=n.substr(3,1),s=e(t.target).parents(".calendar");s.hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[i][r].toString(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[i][r].toString(this.format))},clickDate:function(t){var n=e(t.target).attr("title"),i=n.substr(1,1),r=n.substr(3,1),s=e(t.target).parents(".calendar");if(s.hasClass("left")){if(startDate=this.leftCalendar.calendar[i][r],endDate=this.endDate,"object"==typeof this.dateLimit){var o=new Date(startDate).add(this.dateLimit);endDate.isAfter(o)&&(endDate=o)}this.element.trigger("clicked",{dir:"left",picker:this})}else{if(startDate=this.startDate,endDate=this.rightCalendar.calendar[i][r],"object"==typeof this.dateLimit){var a={days:0-this.dateLimit.days,months:0-this.dateLimit.months,years:0-this.dateLimit.years},l=new Date(endDate).add(a);startDate.isBefore(l)&&(startDate=l)}this.element.trigger("clicked",{dir:"right",picker:this})}s.find("td").removeClass("active"),startDate.equals(endDate)||startDate.isBefore(endDate)?(e(t.target).addClass("active"),startDate.equals(this.startDate)&&endDate.equals(this.endDate)||(this.changed=!0),this.startDate=startDate,this.endDate=endDate):startDate.isAfter(endDate)&&(e(t.target).addClass("active"),this.changed=!0,this.startDate=startDate,this.endDate=startDate.clone().add(1).days()),this.leftCalendar.month.set({month:this.startDate.getMonth(),year:this.startDate.getFullYear()}),this.rightCalendar.month.set({month:this.endDate.getMonth(),year:this.endDate.getFullYear()}),this.updateCalendars()},clickApply:function(){this.hide()},clickClear:function(){this.changed=!0,this.cleared=!0,this.hide()},updateYear:function(t){var n=parseInt(e(t.target).val()),i=e(t.target).closest(".calendar").hasClass("left");i?this.leftCalendar.month.set({month:this.startDate.getMonth(),year:n}):this.rightCalendar.month.set({month:this.endDate.getMonth(),year:n}),this.updateCalendars()},updateMonth:function(t){var n=parseInt(e(t.target).val()),i=e(t.target).closest(".calendar").hasClass("left");i?this.leftCalendar.month.set({month:n,year:this.startDate.getFullYear()}):this.rightCalendar.month.set({month:n,year:this.endDate.getFullYear()}),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.getMonth(),this.leftCalendar.month.getFullYear()),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.getMonth(),this.rightCalendar.month.getFullYear()),this.container.find(".calendar.left").html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate)),this.container.find(".calendar.right").html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.startDate,this.maxDate)),this.container.find(".ranges li").removeClass("active");var e=!0,t=0;for(var n in this.ranges)this.startDate.equals(this.ranges[n][0])&&this.endDate.equals(this.ranges[n][1])&&(e=!1,this.container.find(".ranges li:eq("+t+")").addClass("active")),t++;e&&this.container.find(".ranges li:last").addClass("active"),this.element.trigger("updated",this)},buildCalendar:function(e,t){var n=Date.today().set({day:1,month:e,year:t}),i=n.clone().add(-1).day().getMonth(),r=n.clone().add(-1).day().getFullYear();Date.getDaysInMonth(t,e);for(var s=Date.getDaysInMonth(r,i),o=n.getDay(),a=Array(),l=0;6>l;l++)a[l]=Array();var c=s-o+this.locale.firstDay+1;c>s&&(c-=7),o==this.locale.firstDay&&(c=s-6);for(var h=Date.today().set({day:c,month:i,year:r}),l=0,u=0,d=0;42>l;l++,u++,h=h.clone().add(1).day())l>0&&0==u%7&&(u=0,d++),a[d][u]=h;return a},renderDropdowns:function(e,t,n){for(var i=e.getMonth(),r='<select class="monthselect">',s=!1,o=!1,a=0;12>a;a++)(!s||a>=t.getMonth())&&(!o||n.getMonth()>=a)&&(r+="<option value='"+a+"'"+(a===i?" selected='selected'":"")+">"+this.locale.monthNames[a]+"</option>");r+="</select>";for(var l=e.getFullYear(),c=n&&n.getFullYear()||l+5,h=t&&t.getFullYear()||l-50,u='<select class="yearselect">',d=h;c>=d;d++)u+='<option value="'+d+'"'+(d===l?' selected="selected"':"")+">"+d+"</option>";return u+="</select>",r+u},renderCalendar:function(t,n,i,r){var s='<table class="table-condensed">';s+="<thead>",s+="<tr>",this.showWeekNumbers&&(s+="<th></th>"),s+=!i||t[1][1]>i?'<th class="prev available"><i class="icon-arrow-left"></i></th>':"<th></th>";var o=this.locale.monthNames[t[1][1].getMonth()]+t[1][1].toString(" yyyy");this.showDropdowns&&(o=this.renderDropdowns(t[1][1],i,r)),s+='<th colspan="5" style="width: auto">'+o+"</th>",s+=!r||r>t[1][1]?'<th class="next available"><i class="icon-arrow-right"></i></th>':"<th></th>",s+="</tr>",s+="<tr>",this.showWeekNumbers&&(s+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,function(e,t){s+="<th>"+t+"</th>"}),s+="</tr>",s+="</thead>",s+="<tbody>";for(var a=0;6>a;a++){s+="<tr>",this.showWeekNumbers&&(s+='<td class="week">'+t[a][0].getWeek()+"</td>");for(var l=0;7>l;l++){var c="available ";c+=t[a][l].getMonth()==t[1][1].getMonth()?"":"off",n.setHours(0,0,0,0),i&&i>t[a][l]||r&&t[a][l]>r?c=" off disabled ":t[a][l].equals(n)?(c+=" active ",t[a][l].equals(this.startDate)&&(c+=" start-date "),t[a][l].equals(this.endDate)&&(c+=" end-date ")):t[a][l]>=this.startDate&&t[a][l]<=this.endDate&&(c+=" in-range ",t[a][l].equals(this.startDate)&&(c+=" start-date "),t[a][l].equals(this.endDate)&&(c+=" end-date "));var h="r"+a+"c"+l;s+='<td class="'+c.replace(/\s+/g," ").replace(/^\s?(.*?)\s?$/,"$1")+'" title="'+h+'">'+t[a][l].getDate()+"</td>"}s+="</tr>"}return s+="</tbody>",s+="</table>"}},e.fn.daterangepicker=function(n,i){return this.each(function(){var r=e(this);r.data("daterangepicker")||r.data("daterangepicker",new t(r,n,i))}),this}}(window.jQuery),/* =========================================================
|
||
* bootstrap-timepicker.js
|
||
* http://www.github.com/jdewit/bootstrap-timepicker
|
||
* =========================================================
|
||
* Copyright 2012
|
||
*
|
||
* Created By:
|
||
* Joris de Wit @joris_dewit
|
||
*
|
||
* Contributions By:
|
||
* Gilbert @mindeavor
|
||
* Koen Punt info@koenpunt.nl
|
||
* Nek
|
||
* Chris Martin
|
||
* Dominic Barnes contact@dominicbarnes.us
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
* ========================================================= */
|
||
!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.timepicker.defaults,n,this.$element.data()),this.minuteStep=this.options.minuteStep||this.minuteStep,this.secondStep=this.options.secondStep||this.secondStep,this.showMeridian=this.options.showMeridian||this.showMeridian,this.showSeconds=this.options.showSeconds||this.showSeconds,this.showInputs=this.options.showInputs||this.showInputs,this.disableFocus=this.options.disableFocus||this.disableFocus,this.template=this.options.template||this.template,this.modalBackdrop=this.options.modalBackdrop||this.modalBackdrop,this.defaultTime=this.options.defaultTime||this.defaultTime,this.open=!1,this.init()};t.prototype={constructor:t,init:function(){this.$element.parent().hasClass("input-append")?(this.$element.parent(".input-append").find(".add-on").on("click",e.proxy(this.showWidget,this)),this.$element.on({focus:e.proxy(this.highlightUnit,this),click:e.proxy(this.highlightUnit,this),keypress:e.proxy(this.elementKeypress,this),blur:e.proxy(this.blurElement,this)})):this.template?this.$element.on({focus:e.proxy(this.showWidget,this),click:e.proxy(this.showWidget,this),blur:e.proxy(this.blurElement,this)}):this.$element.on({focus:e.proxy(this.highlightUnit,this),click:e.proxy(this.highlightUnit,this),keypress:e.proxy(this.elementKeypress,this),blur:e.proxy(this.blurElement,this)}),this.$widget=e(this.getTemplate()).appendTo("body"),this.$widget.on("click",e.proxy(this.widgetClick,this)),this.showInputs&&this.$widget.find("input").on({click:function(){this.select()},keypress:e.proxy(this.widgetKeypress,this),change:e.proxy(this.updateFromWidgetInputs,this)}),this.setDefaultTime(this.defaultTime)},showWidget:function(t){if(t.stopPropagation(),t.preventDefault(),!this.open){this.$element.trigger("show"),this.disableFocus&&this.$element.blur();var n=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});this.updateFromElementVal(),e("html").trigger("click.timepicker.data-api").one("click.timepicker.data-api",e.proxy(this.hideWidget,this)),"modal"===this.template?this.$widget.modal("show").on("hidden",e.proxy(this.hideWidget,this)):(this.$widget.css({top:n.top+n.height,left:n.left}),this.open||this.$widget.addClass("open")),this.open=!0,this.$element.trigger("shown")}},hideWidget:function(){this.$element.trigger("hide"),"modal"===this.template?this.$widget.modal("hide"):this.$widget.removeClass("open"),this.open=!1,this.$element.trigger("hidden")},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target).closest("a").data("action");n&&(this[n](),this.update())},widgetKeypress:function(t){var n=e(t.target).closest("input").attr("name");switch(t.keyCode){case 9:this.showMeridian?"meridian"==n&&this.hideWidget():this.showSeconds?"second"==n&&this.hideWidget():"minute"==n&&this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(n){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.update();break;case 40:switch(n){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.update()}},elementKeypress:function(e){switch(this.$element.get(0),e.keyCode){case 0:break;case 9:this.updateFromElementVal(),this.showMeridian?"meridian"!=this.highlightedUnit&&(e.preventDefault(),this.highlightNextUnit()):this.showSeconds?"second"!=this.highlightedUnit&&(e.preventDefault(),this.highlightNextUnit()):"minute"!=this.highlightedUnit&&(e.preventDefault(),this.highlightNextUnit());break;case 27:this.updateFromElementVal();break;case 37:this.updateFromElementVal(),this.highlightPrevUnit();break;case 38:switch(this.highlightedUnit){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.updateElement();break;case 39:this.updateFromElementVal(),this.highlightNextUnit();break;case 40:switch(this.highlightedUnit){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.updateElement()}0!==e.keyCode&&8!==e.keyCode&&9!==e.keyCode&&46!==e.keyCode&&e.preventDefault()},setValues:function(e){if(this.showMeridian){var t=e.split(" "),n=t[0].split(":");this.meridian=t[1]}else var n=e.split(":");this.hour=parseInt(n[0],10),this.minute=parseInt(n[1],10),this.second=parseInt(n[2],10),isNaN(this.hour)&&(this.hour=0),isNaN(this.minute)&&(this.minute=0),this.showMeridian?(this.hour>12?this.hour=12:1>this.hour&&(this.hour=1),"am"==this.meridian||"a"==this.meridian?this.meridian="AM":("pm"==this.meridian||"p"==this.meridian)&&(this.meridian="PM"),"AM"!=this.meridian&&"PM"!=this.meridian&&(this.meridian="AM")):this.hour>=24?this.hour=23:0>this.hour&&(this.hour=0),0>this.minute?this.minute=0:this.minute>=60&&(this.minute=59),this.showSeconds&&(isNaN(this.second)?this.second=0:0>this.second?this.second=0:this.second>=60&&(this.second=59)),""!=this.$element.val()&&this.updateElement(),this.updateWidget()},setMeridian:function(e){"a"==e||"am"==e||"AM"==e?this.meridian="AM":"p"==e||"pm"==e||"PM"==e?this.meridian="PM":this.updateWidget(),this.updateElement()},setDefaultTime:function(e){if(e){if("current"===e){var t=new Date,n=t.getHours(),i=Math.floor(t.getMinutes()/this.minuteStep)*this.minuteStep,r=Math.floor(t.getSeconds()/this.secondStep)*this.secondStep,s="AM";this.showMeridian&&(0===n?n=12:n>=12?(n>12&&(n-=12),s="PM"):s="AM"),this.hour=n,this.minute=i,this.second=r,this.meridian=s}else"value"===e?this.setValues(this.$element.val()):this.setValues(e);""!=this.$element.val()&&this.updateElement(),this.updateWidget()}else this.hour=0,this.minute=0,this.second=0},formatTime:function(e,t,n,i){return e=10>e?"0"+e:e,t=10>t?"0"+t:t,n=10>n?"0"+n:n,e+":"+t+(this.showSeconds?":"+n:"")+(this.showMeridian?" "+i:"")},getTime:function(){return this.formatTime(this.hour,this.minute,this.second,this.meridian)},setTime:function(e){this.setValues(e),this.update()},update:function(){this.updateElement(),this.updateWidget()},blurElement:function(){this.highlightedUnit=void 0,this.updateFromElementVal()},updateElement:function(){var e=this.getTime();switch(this.$element.val(e).change(),this.highlightedUnit){case"hour":this.highlightHour();break;case"minute":this.highlightMinute();break;case"second":this.highlightSecond();break;case"meridian":this.highlightMeridian()}},updateWidget:function(){this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(10>this.hour?"0"+this.hour:this.hour),this.$widget.find("input.bootstrap-timepicker-minute").val(10>this.minute?"0"+this.minute:this.minute),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(10>this.second?"0"+this.second:this.second),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(this.hour),this.$widget.find("span.bootstrap-timepicker-minute").text(10>this.minute?"0"+this.minute:this.minute),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(10>this.second?"0"+this.second:this.second),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))},updateFromElementVal:function(){var e=this.$element.val();e&&(this.setValues(e),this.updateWidget())},updateFromWidgetInputs:function(){var t=e("input.bootstrap-timepicker-hour",this.$widget).val()+":"+e("input.bootstrap-timepicker-minute",this.$widget).val()+(this.showSeconds?":"+e("input.bootstrap-timepicker-second",this.$widget).val():"")+(this.showMeridian?" "+e("input.bootstrap-timepicker-meridian",this.$widget).val():"");this.setValues(t)},getCursorPosition:function(){var e=this.$element.get(0);if("selectionStart"in e)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange(),n=document.selection.createRange().text.length;return t.moveStart("character",-e.value.length),t.text.length-n}},highlightUnit:function(){this.$element.get(0),this.position=this.getCursorPosition(),this.position>=0&&2>=this.position?this.highlightHour():this.position>=3&&5>=this.position?this.highlightMinute():this.position>=6&&8>=this.position?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&11>=this.position&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.highlightMeridian();break;case"second":this.highlightMeridian();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMeridian();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){this.highlightedUnit="hour",this.$element.get(0).setSelectionRange(0,2)},highlightMinute:function(){this.highlightedUnit="minute",this.$element.get(0).setSelectionRange(3,5)},highlightSecond:function(){this.highlightedUnit="second",this.$element.get(0).setSelectionRange(6,8)},highlightMeridian:function(){this.highlightedUnit="meridian",this.showSeconds?this.$element.get(0).setSelectionRange(9,11):this.$element.get(0).setSelectionRange(6,8)},incrementHour:function(){if(this.showMeridian)if(11===this.hour)this.toggleMeridian();else if(12===this.hour)return this.hour=1;return 23===this.hour?this.hour=0:(this.hour=this.hour+1,void 0)},decrementHour:function(){if(this.showMeridian){if(1===this.hour)return this.hour=12;12===this.hour&&this.toggleMeridian()}return 0===this.hour?this.hour=23:(this.hour=this.hour-1,void 0)},incrementMinute:function(){var e=this.minute+this.minuteStep-this.minute%this.minuteStep;e>59?(this.incrementHour(),this.minute=e-60):this.minute=e},decrementMinute:function(){var e=this.minute-this.minuteStep;0>e?(this.decrementHour(),this.minute=e+60):this.minute=e},incrementSecond:function(){var e=this.second+this.secondStep-this.second%this.secondStep;e>59?(this.incrementMinute(),this.second=e-60):this.second=e},decrementSecond:function(){var e=this.second-this.secondStep;0>e?(this.decrementMinute(),this.second=e+60):this.second=e},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM",this.update()},getTemplate:function(){if(this.options.templates[this.options.template])return this.options.templates[this.options.template];if(this.showInputs)var e='<input type="text" name="hour" class="bootstrap-timepicker-hour" maxlength="2"/>',t='<input type="text" name="minute" class="bootstrap-timepicker-minute" maxlength="2"/>',n='<input type="text" name="second" class="bootstrap-timepicker-second" maxlength="2"/>',i='<input type="text" name="meridian" class="bootstrap-timepicker-meridian" maxlength="2"/>';else var e='<span class="bootstrap-timepicker-hour"></span>',t='<span class="bootstrap-timepicker-minute"></span>',n='<span class="bootstrap-timepicker-second"></span>',i='<span class="bootstrap-timepicker-meridian"></span>';var r,s='<table class="'+(this.showSeconds?"show-seconds":"")+" "+(this.showMeridian?"show-meridian":"")+'">'+"<tr>"+'<td><a href="#" data-action="incrementHour"><i class="icon-chevron-up"></i></a></td>'+'<td class="separator"> </td>'+'<td><a href="#" data-action="incrementMinute"><i class="icon-chevron-up"></i></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="incrementSecond"><i class="icon-chevron-up"></i></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="icon-chevron-up"></i></a></td>':"")+"</tr>"+"<tr>"+"<td>"+e+"</td> "+'<td class="separator">:</td>'+"<td>"+t+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+n+"</td>":"")+(this.showMeridian?'<td class="separator"> </td><td>'+i+"</td>":"")+"</tr>"+"<tr>"+'<td><a href="#" data-action="decrementHour"><i class="icon-chevron-down"></i></a></td>'+'<td class="separator"></td>'+'<td><a href="#" data-action="decrementMinute"><i class="icon-chevron-down"></i></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="decrementSecond"><i class="icon-chevron-down"></i></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td><a href="#" data-action="toggleMeridian"><i class="icon-chevron-down"></i></a></td>':"")+"</tr>"+"</table>";switch(this.options.template){case"modal":r='<div class="bootstrap-timepicker modal hide fade in" style="top: 30%; margin-top: 0; width: 200px; margin-left: -100px;" data-backdrop="'+(this.modalBackdrop?"true":"false")+'">'+'<div class="modal-header">'+'<a href="#" class="close" data-dismiss="modal">×</a>'+"<h4>Pick a Time</h4>"+"</div>"+'<div class="modal-content">'+s+"</div>"+'<div class="modal-footer">'+'<a href="#" class="btn btn-primary" data-dismiss="modal">Ok</a>'+"</div>"+"</div>";break;case"dropdown":r='<div class="bootstrap-timepicker dropdown-menu">'+s+"</div>"}return r}},e.fn.timepicker=function(n){return this.each(function(){var i=e(this),r=i.data("timepicker"),s="object"==typeof n&&n;r||i.data("timepicker",r=new t(this,s)),"string"==typeof n&&r[n]()})},e.fn.timepicker.defaults={minuteStep:15,secondStep:15,disableFocus:!1,defaultTime:"current",showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",modalBackdrop:!1,templates:{}},e.fn.timepicker.Constructor=t}(window.jQuery),function(e){var t=function(t,n){var t=e(t),i=this,r=e.extend({},e.fn.bootstrapWizard.defaults,n),s=null,o=null;this.fixNavigationButtons=function(){return s.length||(o.find("a:first").tab("show"),s=o.find("li:first")),i.firstIndex()>=i.currentIndex()?e("li.previous",t).addClass("disabled"):e("li.previous",t).removeClass("disabled"),i.currentIndex()>=i.navigationLength()?e("li.next",t).addClass("disabled"):e("li.next",t).removeClass("disabled"),r.onTabShow&&"function"==typeof r.onTabShow&&r.onTabShow(s,o,i.currentIndex())===!1?!1:void 0},this.next=function(){return t.hasClass("last")?!1:r.onNext&&"function"==typeof r.onNext&&r.onNext(s,o,i.nextIndex())===!1?!1:($index=i.nextIndex(),$index>i.navigationLength()||o.find("li:eq("+$index+") a").tab("show"),void 0)},this.previous=function(){return t.hasClass("first")?!1:r.onPrevious&&"function"==typeof r.onPrevious&&r.onPrevious(s,o,i.previousIndex())===!1?!1:($index=i.previousIndex(),0>$index||o.find("li:eq("+$index+") a").tab("show"),void 0)},this.first=function(){return r.onFirst&&"function"==typeof r.onFirst&&r.onFirst(s,o,i.firstIndex())===!1?!1:t.hasClass("disabled")?!1:(o.find("li:eq(0) a").tab("show"),void 0)},this.last=function(){return r.onLast&&"function"==typeof r.onLast&&r.onLast(s,o,i.lastIndex())===!1?!1:t.hasClass("disabled")?!1:(o.find("li:eq("+i.navigationLength()+") a").tab("show"),void 0)},this.currentIndex=function(){return o.find("li").index(s)},this.firstIndex=function(){return 0},this.lastIndex=function(){return i.navigationLength()},this.getIndex=function(e){return o.find("li").index(e)},this.nextIndex=function(){return o.find("li").index(s)+1},this.previousIndex=function(){return o.find("li").index(s)-1},this.navigationLength=function(){return o.find("li").length-1},this.activeTab=function(){return s},this.nextTab=function(){return o.find("li:eq("+(i.currentIndex()+1)+")").length?o.find("li:eq("+(i.currentIndex()+1)+")"):null},this.previousTab=function(){return 0>=i.currentIndex()?null:o.find("li:eq("+parseInt(i.currentIndex()-1)+")")},this.show=function(e){return t.find("li:eq("+e+") a").tab("show")},o=t.find("ul:first",t),s=o.find("li.active",t),o.hasClass(r.tabClass)||o.addClass(r.tabClass),r.onInit&&"function"==typeof r.onInit&&r.onInit(s,o,0),e(r.nextSelector,t).bind("click",i.next),e(r.previousSelector,t).bind("click",i.previous),e(r.lastSelector,t).bind("click",i.last),e(r.firstSelector,t).bind("click",i.first),r.onShow&&"function"==typeof r.onShow&&r.onShow(s,o,i.nextIndex()),i.fixNavigationButtons(),e('a[data-toggle="tab"]',t).on("click",function(){return r.onTabClick&&"function"==typeof r.onTabClick&&r.onTabClick(s,o,i.currentIndex())===!1?!1:void 0}),e('a[data-toggle="tab"]',t).on("show",function(t){return $element=e(t.target).parent(),$element.hasClass("disabled")?!1:(s=$element,i.fixNavigationButtons(),void 0)})};e.fn.bootstrapWizard=function(n){if("string"==typeof n){var i=Array.prototype.slice.call(arguments,1).toString();return this.data("bootstrapWizard")[n](i)}return this.each(function(){var i=e(this);if(!i.data("bootstrapWizard")){var r=new t(i,n);i.data("bootstrapWizard",r)}})},e.fn.bootstrapWizard.defaults={tabClass:"nav nav-pills",nextSelector:".wizard li.next",previousSelector:".wizard li.previous",firstSelector:".wizard li.first",lastSelector:".wizard li.last",onShow:null,onInit:null,onNext:null,onPrevious:null,onLast:null,onFirst:null,onTabClick:null,onTabShow:null}}(jQuery),/**
|
||
*
|
||
* jquery.sparkline.js
|
||
*
|
||
* v2.1
|
||
* (c) Splunk, Inc
|
||
* Contact: Gareth Watts (gareth@splunk.com)
|
||
* http://omnipotent.net/jquery.sparkline/
|
||
*
|
||
* Generates inline sparkline charts from data supplied either to the method
|
||
* or inline in HTML
|
||
*
|
||
* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
|
||
* (Firefox 2.0+, Safari, Opera, etc)
|
||
*
|
||
* License: New BSD License
|
||
*
|
||
* Copyright (c) 2012, Splunk Inc.
|
||
* All rights reserved.
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without modification,
|
||
* are permitted provided that the following conditions are met:
|
||
*
|
||
* * Redistributions of source code must retain the above copyright notice,
|
||
* this list of conditions and the following disclaimer.
|
||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the documentation
|
||
* and/or other materials provided with the distribution.
|
||
* * Neither the name of Splunk Inc nor the names of its contributors may
|
||
* be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||
* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*
|
||
*
|
||
* Usage:
|
||
* $(selector).sparkline(values, options)
|
||
*
|
||
* If values is undefined or set to 'html' then the data values are read from the specified tag:
|
||
* <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
|
||
* $('.sparkline').sparkline();
|
||
* There must be no spaces in the enclosed data set
|
||
*
|
||
* Otherwise values must be an array of numbers or null values
|
||
* <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
|
||
* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
|
||
* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
|
||
*
|
||
* Values can also be specified in an HTML comment, or as a values attribute:
|
||
* <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
|
||
* <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
|
||
* $('.sparkline').sparkline();
|
||
*
|
||
* For line charts, x values can also be specified:
|
||
* <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
|
||
* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
|
||
*
|
||
* By default, options should be passed in as teh second argument to the sparkline function:
|
||
* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
|
||
*
|
||
* Options can also be set by passing them on the tag itself. This feature is disabled by default though
|
||
* as there's a slight performance overhead:
|
||
* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
|
||
* <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
|
||
* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
|
||
*
|
||
* Supported options:
|
||
* lineColor - Color of the line used for the chart
|
||
* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
|
||
* width - Width of the chart - Defaults to 3 times the number of values in pixels
|
||
* height - Height of the chart - Defaults to the height of the containing element
|
||
* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
|
||
* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
|
||
* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
|
||
* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
|
||
* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
|
||
* composite - If true then don't erase any existing chart attached to the tag, but draw
|
||
* another chart over the top - Note that width and height are ignored if an
|
||
* existing chart is detected.
|
||
* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
|
||
* enableTagOptions - Whether to check tags for sparkline options
|
||
* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
|
||
* disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
|
||
* hidden dom element, avoding a browser reflow
|
||
* disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
|
||
* making the plugin perform much like it did in 1.x
|
||
* disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
|
||
* disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
|
||
* defaults to false (highlights enabled)
|
||
* highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
|
||
* tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
|
||
* tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
|
||
* tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
|
||
* tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
|
||
* tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip
|
||
* callback is given arguments of (sparkline, options, fields)
|
||
* tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
|
||
* tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries)
|
||
* to control the format of the tooltip
|
||
* tooltipPrefix - A string to prepend to each field displayed in a tooltip
|
||
* tooltipSuffix - A string to append to each field displayed in a tooltip
|
||
* tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
|
||
* tooltipValueLookups - An object or range map to map field values to tooltip strings
|
||
* (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
|
||
* numberFormatter - Optional callback for formatting numbers in tooltips
|
||
* numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
|
||
* numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
|
||
* numberDigitGroupCount - Number of digits between group separator - Defaults to 3
|
||
*
|
||
* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
|
||
* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
|
||
* line - Line chart. Options:
|
||
* spotColor - Set to '' to not end each line in a circular spot
|
||
* minSpotColor - If set, color of spot at minimum value
|
||
* maxSpotColor - If set, color of spot at maximum value
|
||
* spotRadius - Radius in pixels
|
||
* lineWidth - Width of line in pixels
|
||
* normalRangeMin
|
||
* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
|
||
* or expected range of values
|
||
* normalRangeColor - Color to use for the above bar
|
||
* drawNormalOnTop - Draw the normal range above the chart fill color if true
|
||
* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
|
||
* highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
|
||
* highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
|
||
* valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map
|
||
*
|
||
* bar - Bar chart. Options:
|
||
* barColor - Color of bars for postive values
|
||
* negBarColor - Color of bars for negative values
|
||
* zeroColor - Color of bars with zero values
|
||
* nullColor - Color of bars with null values - Defaults to omitting the bar entirely
|
||
* barWidth - Width of bars in pixels
|
||
* colorMap - Optional mappnig of values to colors to override the *BarColor values above
|
||
* can be an Array of values to control the color of individual bars or a range map
|
||
* to specify colors for individual ranges of values
|
||
* barSpacing - Gap between bars in pixels
|
||
* zeroAxis - Centers the y-axis around zero if true
|
||
*
|
||
* tristate - Charts values of win (>0), lose (<0) or draw (=0)
|
||
* posBarColor - Color of win values
|
||
* negBarColor - Color of lose values
|
||
* zeroBarColor - Color of draw values
|
||
* barWidth - Width of bars in pixels
|
||
* barSpacing - Gap between bars in pixels
|
||
* colorMap - Optional mappnig of values to colors to override the *BarColor values above
|
||
* can be an Array of values to control the color of individual bars or a range map
|
||
* to specify colors for individual ranges of values
|
||
*
|
||
* discrete - Options:
|
||
* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
|
||
* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
|
||
* thresholdColor
|
||
*
|
||
* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
|
||
* options:
|
||
* targetColor - The color of the vertical target marker
|
||
* targetWidth - The width of the target marker in pixels
|
||
* performanceColor - The color of the performance measure horizontal bar
|
||
* rangeColors - Colors to use for each qualitative range background color
|
||
*
|
||
* pie - Pie chart. Options:
|
||
* sliceColors - An array of colors to use for pie slices
|
||
* offset - Angle in degrees to offset the first slice - Try -90 or +90
|
||
* borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
|
||
* borderColor - Color to use for the pie chart border - Defaults to #000
|
||
*
|
||
* box - Box plot. Options:
|
||
* raw - Set to true to supply pre-computed plot points as values
|
||
* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
|
||
* When set to false you can supply any number of values and the box plot will
|
||
* be computed for you. Default is false.
|
||
* showOutliers - Set to true (default) to display outliers as circles
|
||
* outlierIQR - Interquartile range used to determine outliers. Default 1.5
|
||
* boxLineColor - Outline color of the box
|
||
* boxFillColor - Fill color for the box
|
||
* whiskerColor - Line color used for whiskers
|
||
* outlierLineColor - Outline color of outlier circles
|
||
* outlierFillColor - Fill color of the outlier circles
|
||
* spotRadius - Radius of outlier circles
|
||
* medianColor - Line color of the median line
|
||
* target - Draw a target cross hair at the supplied value (default undefined)
|
||
*
|
||
*
|
||
*
|
||
* Examples:
|
||
* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
|
||
* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
|
||
* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
|
||
* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
|
||
* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
|
||
* $('#pie').sparkline([1,1,2], { type:'pie' });
|
||
*/
|
||
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";var t,n,i,r,s,o,a,l,c,h,u,d,f,p,g,m,y,v,b,w,_,x,C,T,E,k,N,A,S,D,M,R,L={},z=0;t=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0,tooltipFormat:new i('<span style="color: {{color}}">●</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0,tooltipFormat:new i('<span style="color: {{color}}">●</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new i('<span style="color: {{color}}">●</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:void 0,thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,tooltipFormat:new i("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:void 0,tooltipFormat:new i("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new i('<span style="color: {{color}}">●</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0,tooltipFormat:new i("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},k='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',n=function(){var t,n;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=e.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(n=Array.prototype.slice.call(arguments,1,-1),n.unshift(t.prototype),e.extend.apply(e,n))):t.prototype=arguments[0],t.prototype.cls=t,t},e.SPFormatClass=i=n({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(e,t){this.format=e,this.fclass=t},render:function(e,t,n){var i,r,s,o,a,l=this,h=e;return this.format.replace(this.fre,function(){var e;return r=arguments[1],s=arguments[3],i=l.precre.exec(r),i?(a=i[2],r=i[1]):a=!1,o=h[r],void 0===o?"":s&&t&&t[s]?(e=t[s],e.get?t[s].get(o)||o:t[s][o]||o):(c(o)&&(o=n.get("numberFormatter")?n.get("numberFormatter")(o):p(o,a,n.get("numberDigitGroupCount"),n.get("numberDigitGroupSep"),n.get("numberDecimalMark"))),o)})}}),e.spformat=function(e,t){return new i(e,t)},r=function(e,t,n){return t>e?t:e>n?n:e},s=function(e,t){var n;return 2===t?(n=Math.floor(e.length/2),e.length%2?e[n]:(e[n-1]+e[n])/2):e.length%2?(n=(e.length*t+t)/4,n%1?(e[Math.floor(n)]+e[Math.floor(n)-1])/2:e[n-1]):(n=(e.length*t+2)/4,n%1?(e[Math.floor(n)]+e[Math.floor(n)-1])/2:e[n-1])},o=function(e){var t;switch(e){case"undefined":e=void 0;break;case"null":e=null;break;case"true":e=!0;break;case"false":e=!1;break;default:t=parseFloat(e),e==t&&(e=t)}return e},a=function(e){var t,n=[];for(t=e.length;t--;)n[t]=o(e[t]);return n},l=function(e,t){var n,i,r=[];for(n=0,i=e.length;i>n;n++)e[n]!==t&&r.push(e[n]);return r},c=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},p=function(t,n,i,r,s){var o,a;for(t=(n===!1?parseFloat(t).toString():t.toFixed(n)).split(""),o=0>(o=e.inArray(".",t))?t.length:o,t.length>o&&(t[o]=s),a=o-i;a>0;a-=i)t.splice(a,0,r);return t.join("")},h=function(e,t,n){var i;for(i=t.length;i--;)if((!n||null!==t[i])&&t[i]!==e)return!1;return!0},u=function(e){var t,n=0;for(t=e.length;t--;)n+="number"==typeof e[t]?e[t]:0;return n},f=function(t){return e.isArray(t)?t:[t]},d=function(e){var t;document.createStyleSheet?document.createStyleSheet().cssText=e:(t=document.createElement("style"),t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t),t["string"==typeof document.body.style.WebkitAppearance?"innerText":"innerHTML"]=e)},e.fn.simpledraw=function(t,n,i,r){var s,o;if(i&&(s=this.data("_jqs_vcanvas")))return s;if(void 0===t&&(t=e(this).innerWidth()),void 0===n&&(n=e(this).innerHeight()),e.browser.hasCanvas)s=new D(t,n,this,r);else{if(!e.browser.msie)return!1;s=new M(t,n,this)}return o=e(this).data("_jqs_mhandler"),o&&o.registerCanvas(s),s},e.fn.cleardraw=function(){var e=this.data("_jqs_vcanvas");e&&e.reset()},e.RangeMapClass=g=n({init:function(e){var t,n,i=[];for(t in e)e.hasOwnProperty(t)&&"string"==typeof t&&t.indexOf(":")>-1&&(n=t.split(":"),n[0]=0===n[0].length?-1/0:parseFloat(n[0]),n[1]=0===n[1].length?1/0:parseFloat(n[1]),n[2]=e[t],i.push(n));this.map=e,this.rangelist=i||!1},get:function(e){var t,n,i,r=this.rangelist;if(void 0!==(i=this.map[e]))return i;if(r)for(t=r.length;t--;)if(n=r[t],e>=n[0]&&n[1]>=e)return n[2];return void 0}}),e.range_map=function(e){return new g(e)},m=n({init:function(t,n){var i=e(t);this.$el=i,this.options=n,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!n.get("disableTooltips"),this.highlightEnabled=!n.get("disableHighlight")},registerSparkline:function(e){this.splist.push(e),this.over&&this.updateDisplay()},registerCanvas:function(t){var n=e(t.canvas);this.canvas=t,this.$canvas=n,n.mouseenter(e.proxy(this.mouseenter,this)),n.mouseleave(e.proxy(this.mouseleave,this)),n.click(e.proxy(this.mouseclick,this))},reset:function(e){this.splist=[],this.tooltip&&e&&(this.tooltip.remove(),this.tooltip=void 0)},mouseclick:function(t){var n=e.Event("sparklineClick");n.originalEvent=t,n.sparklines=this.splist,this.$el.trigger(n)},mouseenter:function(t){e(document.body).unbind("mousemove.jqs"),e(document.body).bind("mousemove.jqs",e.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new y(this.options),this.tooltip.updatePosition(t.pageX,t.pageY)),this.updateDisplay()},mouseleave:function(){e(document.body).unbind("mousemove.jqs");var t,n,i=this.splist,r=i.length,s=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),n=0;r>n;n++)t=i[n],t.clearRegionHighlight()&&(s=!0);s&&this.canvas.render()},mousemove:function(e){this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,this.tooltip&&this.tooltip.updatePosition(e.pageX,e.pageY),this.updateDisplay()},updateDisplay:function(){var t,n,i,r,s,o=this.splist,a=o.length,l=!1,c=this.$canvas.offset(),h=this.currentPageX-c.left,u=this.currentPageY-c.top;if(this.over){for(i=0;a>i;i++)n=o[i],r=n.setRegionHighlight(this.currentEl,h,u),r&&(l=!0);if(l){if(s=e.Event("sparklineRegionChange"),s.sparklines=this.splist,this.$el.trigger(s),this.tooltip){for(t="",i=0;a>i;i++)n=o[i],t+=n.getCurrentRegionTooltip();this.tooltip.setContent(t)}this.disableHighlight||this.canvas.render()}null===r&&this.mouseleave()}}}),y=n({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(t){var n,i=t.get("tooltipClassname","jqstooltip"),r=this.sizeStyle;this.container=t.get("tooltipContainer")||document.body,this.tooltipOffsetX=t.get("tooltipOffsetX",10),this.tooltipOffsetY=t.get("tooltipOffsetY",12),e("#jqssizetip").remove(),e("#jqstooltip").remove(),this.sizetip=e("<div/>",{id:"jqssizetip",style:r,"class":i}),this.tooltip=e("<div/>",{id:"jqstooltip","class":i}).appendTo(this.container),n=this.tooltip.offset(),this.offsetLeft=n.left,this.offsetTop=n.top,this.hidden=!0,e(window).unbind("resize.jqs scroll.jqs"),e(window).bind("resize.jqs scroll.jqs",e.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=e(window).scrollTop(),this.scrollLeft=e(window).scrollLeft(),this.scrollRight=this.scrollLeft+e(window).width(),this.updatePosition()},getSize:function(e){this.sizetip.html(e).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(e){return e?(this.getSize(e),this.tooltip.html(e).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition()),void 0):(this.tooltip.css("visibility","hidden"),this.hidden=!0,void 0)},updatePosition:function(e,t){if(void 0===e){if(void 0===this.mousex)return;e=this.mousex-this.offsetLeft,t=this.mousey-this.offsetTop}else this.mousex=e-=this.offsetLeft,this.mousey=t-=this.offsetTop;this.height&&this.width&&!this.hidden&&(t-=this.height+this.tooltipOffsetY,e+=this.tooltipOffsetX,this.scrollTop>t&&(t=this.scrollTop),this.scrollLeft>e?e=this.scrollLeft:e+this.width>this.scrollRight&&(e=this.scrollRight-this.width),this.tooltip.css({left:e,top:t}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=void 0,e(window).unbind("resize.jqs scroll.jqs")}}),N=function(){d(k)},e(N),R=[],e.fn.sparkline=function(t,n){return this.each(function(){var i,r,s=new e.fn.sparkline.options(this,n),o=e(this);if(i=function(){var n,i,r,a,l,c,h;return"html"===t||void 0===t?(h=this.getAttribute(s.get("tagValuesAttribute")),(void 0===h||null===h)&&(h=o.html()),n=h.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):n=t,i="auto"===s.get("width")?n.length*s.get("defaultPixelsPerValue"):s.get("width"),"auto"===s.get("height")?s.get("composite")&&e.data(this,"_jqs_vcanvas")||(a=document.createElement("span"),a.innerHTML="a",o.html(a),r=e(a).innerHeight()||e(a).height(),e(a).remove(),a=null):r=s.get("height"),s.get("disableInteraction")?l=!1:(l=e.data(this,"_jqs_mhandler"),l?s.get("composite")||l.reset():(l=new m(this,s),e.data(this,"_jqs_mhandler",l))),s.get("composite")&&!e.data(this,"_jqs_vcanvas")?(e.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),e.data(this,"_jqs_errnotify",!0)),void 0):(c=new(e.fn.sparkline[s.get("type")])(this,n,s,i,r),c.render(),l&&l.registerSparkline(c),void 0)},e(this).html()&&!s.get("disableHiddenCheck")&&e(this).is(":hidden")||"1.3.0">e.fn.jquery&&e(this).parents().is(":hidden")||!e(this).parents("body").length){if(!s.get("composite")&&e.data(this,"_jqs_pending"))for(r=R.length;r;r--)R[r-1][0]==this&&R.splice(r-1,1);R.push([this,i]),e.data(this,"_jqs_pending",!0)}else i.call(this)})},e.fn.sparkline.defaults=t(),e.sparkline_display_visible=function(){var t,n,i,r=[];for(n=0,i=R.length;i>n;n++)t=R[n][0],e(t).is(":visible")&&!e(t).parents().is(":hidden")?(R[n][1].call(t),e.data(R[n][0],"_jqs_pending",!1),r.push(n)):e(t).closest("html").length||e.data(t,"_jqs_pending")||(e.data(R[n][0],"_jqs_pending",!1),r.push(n));for(n=r.length;n;n--)R.splice(r[n-1],1)},e.fn.sparkline.options=n({init:function(t,n){var i,r,s,o;this.userOptions=n=n||{},this.tag=t,this.tagValCache={},r=e.fn.sparkline.defaults,s=r.common,this.tagOptionsPrefix=n.enableTagOptions&&(n.tagOptionsPrefix||s.tagOptionsPrefix),o=this.getTagSetting("type"),i=o===L?r[n.type||s.type]:r[o],this.mergedOptions=e.extend({},s,i,n)},getTagSetting:function(e){var t,n,i,r,s=this.tagOptionsPrefix;if(s===!1||void 0===s)return L;if(this.tagValCache.hasOwnProperty(e))t=this.tagValCache.key;else{if(t=this.tag.getAttribute(s+e),void 0===t||null===t)t=L;else if("["===t.substr(0,1))for(t=t.substr(1,t.length-2).split(","),n=t.length;n--;)t[n]=o(t[n].replace(/(^\s*)|(\s*$)/g,""));else if("{"===t.substr(0,1))for(i=t.substr(1,t.length-2).split(","),t={},n=i.length;n--;)r=i[n].split(":",2),t[r[0].replace(/(^\s*)|(\s*$)/g,"")]=o(r[1].replace(/(^\s*)|(\s*$)/g,""));else t=o(t);this.tagValCache.key=t}return t},get:function(e,t){var n,i=this.getTagSetting(e);return i!==L?i:void 0===(n=this.mergedOptions[e])?t:n}}),e.fn.sparkline._base=n({disabled:!1,init:function(t,n,i,r,s){this.el=t,this.$el=e(t),this.values=n,this.options=i,this.width=r,this.height=s,this.currentRegion=void 0},initTarget:function(){var e=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),e))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(){},setRegionHighlight:function(e,t,n){var i,r=this.currentRegion,s=!this.options.get("disableHighlight");return t>this.canvasWidth||n>this.canvasHeight||0>t||0>n?null:(i=this.getRegion(e,t,n),r!==i?(void 0!==r&&s&&this.removeHighlight(),this.currentRegion=i,void 0!==i&&s&&this.renderHighlight(),!0):!1)},clearRegionHighlight:function(){return void 0!==this.currentRegion?(this.removeHighlight(),this.currentRegion=void 0,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(){},getCurrentRegionTooltip:function(){var t,n,r,s,o,a,l,c,h,u,d,f,p,g,m=this.options,y="",v=[];if(void 0===this.currentRegion)return"";if(t=this.getCurrentRegionFields(),d=m.get("tooltipFormatter"))return d(this,m,t);if(m.get("tooltipChartTitle")&&(y+='<div class="jqs jqstitle">'+m.get("tooltipChartTitle")+"</div>\n"),n=this.options.get("tooltipFormat"),!n)return"";if(e.isArray(n)||(n=[n]),e.isArray(t)||(t=[t]),l=this.options.get("tooltipFormatFieldlist"),c=this.options.get("tooltipFormatFieldlistKey"),l&&c){for(h=[],a=t.length;a--;)u=t[a][c],-1!=(g=e.inArray(u,l))&&(h[g]=t[a]);t=h}for(r=n.length,p=t.length,a=0;r>a;a++)for(f=n[a],"string"==typeof f&&(f=new i(f)),s=f.fclass||"jqsfield",g=0;p>g;g++)t[g].isNull&&m.get("tooltipSkipNull")||(e.extend(t[g],{prefix:m.get("tooltipPrefix"),suffix:m.get("tooltipSuffix")}),o=f.render(t[g],m.get("tooltipValueLookups"),m),v.push('<div class="'+s+'">'+o+"</div>"));return v.length?y+v.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(e,t){var n,i,s,o,a=t.get("highlightColor"),l=t.get("highlightLighten");if(a)return a;if(l&&(n=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e))){for(s=[],i=4===e.length?16:1,o=0;3>o;o++)s[o]=r(Math.round(parseInt(n[o+1],16)*i*l),0,255);return"rgb("+s.join(",")+")"}return e}}),v={changeHighlight:function(t){var n,i=this.currentRegion,r=this.target,s=this.regionShapes[i];s&&(n=this.renderRegion(i,t),e.isArray(n)||e.isArray(s)?(r.replaceWithShapes(s,n),this.regionShapes[i]=e.map(n,function(e){return e.id})):(r.replaceWithShape(s,n),this.regionShapes[i]=n.id))},render:function(){var t,n,i,r,s=this.values,o=this.target,a=this.regionShapes;if(this.cls._super.render.call(this)){for(i=s.length;i--;)if(t=this.renderRegion(i))if(e.isArray(t)){for(n=[],r=t.length;r--;)t[r].append(),n.push(t[r].id);a[i]=n}else t.append(),a[i]=t.id;else a[i]=null;o.render()}}},e.fn.sparkline.line=b=n(e.fn.sparkline._base,{type:"line",init:function(e,t,n,i,r){b._super.init.call(this,e,t,n,i,r),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(e,t){var n,i=this.regionMap;for(n=i.length;n--;)if(null!==i[n]&&t>=i[n][0]&&i[n][1]>=t)return i[n][2];return void 0},getCurrentRegionFields:function(){var e=this.currentRegion;return{isNull:null===this.yvalues[e],x:this.xvalues[e],y:this.yvalues[e],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:e}},renderHighlight:function(){var e,t,n=this.currentRegion,i=this.target,r=this.vertices[n],s=this.options,o=s.get("spotRadius"),a=s.get("highlightSpotColor"),l=s.get("highlightLineColor");r&&(o&&a&&(e=i.drawCircle(r[0],r[1],o,void 0,a),this.highlightSpotId=e.id,i.insertAfterShape(this.lastShapeId,e)),l&&(t=i.drawLine(r[0],this.canvasTop,r[0],this.canvasTop+this.canvasHeight,l),this.highlightLineId=t.id,i.insertAfterShape(this.lastShapeId,t)))},removeHighlight:function(){var e=this.target;this.highlightSpotId&&(e.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(e.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var e,t,n,i,r,s=this.values,o=s.length,a=this.xvalues,l=this.yvalues,c=this.yminmax;for(e=0;o>e;e++)t=s[e],n="string"==typeof s[e],i="object"==typeof s[e]&&s[e]instanceof Array,r=n&&s[e].split(":"),n&&2===r.length?(a.push(Number(r[0])),l.push(Number(r[1])),c.push(Number(r[1]))):i?(a.push(t[0]),l.push(t[1]),c.push(t[1])):(a.push(e),null===s[e]||"null"===s[e]?l.push(null):(l.push(Number(t)),c.push(Number(t))));this.options.get("xvalues")&&(a=this.options.get("xvalues")),this.maxy=this.maxyorg=Math.max.apply(Math,c),this.miny=this.minyorg=Math.min.apply(Math,c),this.maxx=Math.max.apply(Math,a),this.minx=Math.min.apply(Math,a),this.xvalues=a,this.yvalues=l,this.yminmax=c},processRangeOptions:function(){var e=this.options,t=e.get("normalRangeMin"),n=e.get("normalRangeMax");void 0!==t&&(this.miny>t&&(this.miny=t),n>this.maxy&&(this.maxy=n)),void 0!==e.get("chartRangeMin")&&(e.get("chartRangeClip")||e.get("chartRangeMin")<this.miny)&&(this.miny=e.get("chartRangeMin")),void 0!==e.get("chartRangeMax")&&(e.get("chartRangeClip")||e.get("chartRangeMax")>this.maxy)&&(this.maxy=e.get("chartRangeMax")),void 0!==e.get("chartRangeMinX")&&(e.get("chartRangeClipX")||e.get("chartRangeMinX")<this.minx)&&(this.minx=e.get("chartRangeMinX")),void 0!==e.get("chartRangeMaxX")&&(e.get("chartRangeClipX")||e.get("chartRangeMaxX")>this.maxx)&&(this.maxx=e.get("chartRangeMaxX"))},drawNormalRange:function(e,t,n,i,r){var s=this.options.get("normalRangeMin"),o=this.options.get("normalRangeMax"),a=t+Math.round(n-n*((o-this.miny)/r)),l=Math.round(n*(o-s)/r);this.target.drawRect(e,a,i,l,void 0,this.options.get("normalRangeColor")).append()},render:function(){var t,n,i,r,s,o,a,l,c,h,u,d,f,p,m,y,v,w,_,x,C,T,E,k,N,A=this.options,S=this.target,D=this.canvasWidth,M=this.canvasHeight,R=this.vertices,L=A.get("spotRadius"),z=this.regionMap;if(b._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),E=this.xvalues,k=this.yvalues,this.yminmax.length&&!(2>this.yvalues.length))){for(r=s=0,t=0===this.maxx-this.minx?1:this.maxx-this.minx,n=0===this.maxy-this.miny?1:this.maxy-this.miny,i=this.yvalues.length-1,L&&(4*L>D||4*L>M)&&(L=0),L&&(C=A.get("highlightSpotColor")&&!A.get("disableInteraction"),(C||A.get("minSpotColor")||A.get("spotColor")&&k[i]===this.miny)&&(M-=Math.ceil(L)),(C||A.get("maxSpotColor")||A.get("spotColor")&&k[i]===this.maxy)&&(M-=Math.ceil(L),r+=Math.ceil(L)),(C||(A.get("minSpotColor")||A.get("maxSpotColor"))&&(k[0]===this.miny||k[0]===this.maxy))&&(s+=Math.ceil(L),D-=Math.ceil(L)),(C||A.get("spotColor")||A.get("minSpotColor")||A.get("maxSpotColor")&&(k[i]===this.miny||k[i]===this.maxy))&&(D-=Math.ceil(L))),M--,void 0===A.get("normalRangeMin")||A.get("drawNormalOnTop")||this.drawNormalRange(s,r,M,D,n),a=[],l=[a],p=m=null,y=k.length,N=0;y>N;N++)c=E[N],u=E[N+1],h=k[N],d=s+Math.round((c-this.minx)*(D/t)),f=y-1>N?s+Math.round((u-this.minx)*(D/t)):D,m=d+(f-d)/2,z[N]=[p||0,m,N],p=m,null===h?N&&(null!==k[N-1]&&(a=[],l.push(a)),R.push(null)):(this.miny>h&&(h=this.miny),h>this.maxy&&(h=this.maxy),a.length||a.push([d,r+M]),o=[d,r+Math.round(M-M*((h-this.miny)/n))],a.push(o),R.push(o));for(v=[],w=[],_=l.length,N=0;_>N;N++)a=l[N],a.length&&(A.get("fillColor")&&(a.push([a[a.length-1][0],r+M]),w.push(a.slice(0)),a.pop()),a.length>2&&(a[0]=[a[0][0],a[1][1]]),v.push(a));for(_=w.length,N=0;_>N;N++)S.drawShape(w[N],A.get("fillColor"),A.get("fillColor")).append();for(void 0!==A.get("normalRangeMin")&&A.get("drawNormalOnTop")&&this.drawNormalRange(s,r,M,D,n),_=v.length,N=0;_>N;N++)S.drawShape(v[N],A.get("lineColor"),void 0,A.get("lineWidth")).append();if(L&&A.get("valueSpots"))for(x=A.get("valueSpots"),void 0===x.get&&(x=new g(x)),N=0;y>N;N++)T=x.get(k[N]),T&&S.drawCircle(s+Math.round((E[N]-this.minx)*(D/t)),r+Math.round(M-M*((k[N]-this.miny)/n)),L,void 0,T).append();L&&A.get("spotColor")&&S.drawCircle(s+Math.round((E[E.length-1]-this.minx)*(D/t)),r+Math.round(M-M*((k[i]-this.miny)/n)),L,void 0,A.get("spotColor")).append(),this.maxy!==this.minyorg&&(L&&A.get("minSpotColor")&&(c=E[e.inArray(this.minyorg,k)],S.drawCircle(s+Math.round((c-this.minx)*(D/t)),r+Math.round(M-M*((this.minyorg-this.miny)/n)),L,void 0,A.get("minSpotColor")).append()),L&&A.get("maxSpotColor")&&(c=E[e.inArray(this.maxyorg,k)],S.drawCircle(s+Math.round((c-this.minx)*(D/t)),r+Math.round(M-M*((this.maxyorg-this.miny)/n)),L,void 0,A.get("maxSpotColor")).append())),this.lastShapeId=S.getLastShapeId(),this.canvasTop=r,S.render()}}}),e.fn.sparkline.bar=w=n(e.fn.sparkline._base,v,{type:"bar",init:function(t,n,i,s,c){var h,u,d,f,p,m,y,v,b,_,x,C,T,E,k,N,A,S,D,M,R,L,z=parseInt(i.get("barWidth"),10),O=parseInt(i.get("barSpacing"),10),F=i.get("chartRangeMin"),I=i.get("chartRangeMax"),H=i.get("chartRangeClip"),j=1/0,P=-1/0;for(w._super.init.call(this,t,n,i,s,c),m=0,y=n.length;y>m;m++)M=n[m],h="string"==typeof M&&M.indexOf(":")>-1,(h||e.isArray(M))&&(k=!0,h&&(M=n[m]=a(M.split(":"))),M=l(M,null),u=Math.min.apply(Math,M),d=Math.max.apply(Math,M),j>u&&(j=u),d>P&&(P=d));this.stacked=k,this.regionShapes={},this.barWidth=z,this.barSpacing=O,this.totalBarWidth=z+O,this.width=s=n.length*z+(n.length-1)*O,this.initTarget(),H&&(T=void 0===F?-1/0:F,E=void 0===I?1/0:I),p=[],f=k?[]:p;var B=[],q=[];for(m=0,y=n.length;y>m;m++)if(k)for(N=n[m],n[m]=D=[],B[m]=0,f[m]=q[m]=0,A=0,S=N.length;S>A;A++)M=D[A]=H?r(N[A],T,E):N[A],null!==M&&(M>0&&(B[m]+=M),0>j&&P>0?0>M?q[m]+=Math.abs(M):f[m]+=M:f[m]+=Math.abs(M-(0>M?P:j)),p.push(M));else M=H?r(n[m],T,E):n[m],M=n[m]=o(M),null!==M&&p.push(M);this.max=C=Math.max.apply(Math,p),this.min=x=Math.min.apply(Math,p),this.stackMax=P=k?Math.max.apply(Math,B):C,this.stackMin=j=k?Math.min.apply(Math,p):x,void 0!==i.get("chartRangeMin")&&(i.get("chartRangeClip")||x>i.get("chartRangeMin"))&&(x=i.get("chartRangeMin")),void 0!==i.get("chartRangeMax")&&(i.get("chartRangeClip")||i.get("chartRangeMax")>C)&&(C=i.get("chartRangeMax")),this.zeroAxis=b=i.get("zeroAxis",!0),_=0>=x&&C>=0&&b?0:0==b?x:x>0?x:C,this.xaxisOffset=_,v=k?Math.max.apply(Math,f)+Math.max.apply(Math,q):C-x,this.canvasHeightEf=b&&0>x?this.canvasHeight-2:this.canvasHeight-1,_>x?(L=k&&C>=0?P:C,R=(L-_)/v*this.canvasHeight,R!==Math.ceil(R)&&(this.canvasHeightEf-=2,R=Math.ceil(R))):R=this.canvasHeight,this.yoffset=R,e.isArray(i.get("colorMap"))?(this.colorMapByIndex=i.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=i.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new g(this.colorMapByValue))),this.range=v},getRegion:function(e,t){var n=Math.floor(t/this.totalBarWidth);return 0>n||n>=this.values.length?void 0:n},getCurrentRegionFields:function(){var e,t,n=this.currentRegion,i=f(this.values[n]),r=[];for(t=i.length;t--;)e=i[t],r.push({isNull:null===e,value:e,color:this.calcColor(t,e,n),offset:n});return r},calcColor:function(t,n,i){var r,s,o=this.colorMapByIndex,a=this.colorMapByValue,l=this.options;return r=this.stacked?l.get("stackedBarColor"):0>n?l.get("negBarColor"):l.get("barColor"),0===n&&void 0!==l.get("zeroColor")&&(r=l.get("zeroColor")),a&&(s=a.get(n))?r=s:o&&o.length>i&&(r=o[i]),e.isArray(r)?r[t%r.length]:r},renderRegion:function(t,n){var i,r,s,o,a,l,c,u,d,f,p=this.values[t],g=this.options,m=this.xaxisOffset,y=[],v=this.range,b=this.stacked,w=this.target,_=t*this.totalBarWidth,x=this.canvasHeightEf,C=this.yoffset;if(p=e.isArray(p)?p:[p],c=p.length,u=p[0],o=h(null,p),f=h(m,p,!0),o)return g.get("nullColor")?(s=n?g.get("nullColor"):this.calcHighlightColor(g.get("nullColor"),g),i=C>0?C-1:C,w.drawRect(_,i,this.barWidth-1,0,s,s)):void 0;for(a=C,l=0;c>l;l++){if(u=p[l],b&&u===m){if(!f||d)continue;d=!0}r=v>0?Math.floor(x*(Math.abs(u-m)/v))+1:1,m>u||u===m&&0===C?(i=a,a+=r):(i=C-r,C-=r),s=this.calcColor(l,u,t),n&&(s=this.calcHighlightColor(s,g)),y.push(w.drawRect(_,i,this.barWidth-1,r-1,s,s))}return 1===y.length?y[0]:y}}),e.fn.sparkline.tristate=_=n(e.fn.sparkline._base,v,{type:"tristate",init:function(t,n,i,r,s){var o=parseInt(i.get("barWidth"),10),a=parseInt(i.get("barSpacing"),10);_._super.init.call(this,t,n,i,r,s),this.regionShapes={},this.barWidth=o,this.barSpacing=a,this.totalBarWidth=o+a,this.values=e.map(n,Number),this.width=r=n.length*o+(n.length-1)*a,e.isArray(i.get("colorMap"))?(this.colorMapByIndex=i.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=i.get("colorMap"),this.colorMapByValue&&void 0===this.colorMapByValue.get&&(this.colorMapByValue=new g(this.colorMapByValue))),this.initTarget()},getRegion:function(e,t){return Math.floor(t/this.totalBarWidth)},getCurrentRegionFields:function(){var e=this.currentRegion;return{isNull:void 0===this.values[e],value:this.values[e],color:this.calcColor(this.values[e],e),offset:e}},calcColor:function(e,t){var n,i,r=this.values,s=this.options,o=this.colorMapByIndex,a=this.colorMapByValue;return n=a&&(i=a.get(e))?i:o&&o.length>t?o[t]:0>r[t]?s.get("negBarColor"):r[t]>0?s.get("posBarColor"):s.get("zeroBarColor")},renderRegion:function(e,t){var n,i,r,s,o,a,l=this.values,c=this.options,h=this.target;return n=h.pixelHeight,r=Math.round(n/2),s=e*this.totalBarWidth,0>l[e]?(o=r,i=r-1):l[e]>0?(o=0,i=r-1):(o=r-1,i=2),a=this.calcColor(l[e],e),null!==a?(t&&(a=this.calcHighlightColor(a,c)),h.drawRect(s,o,this.barWidth-1,i-1,a,a)):void 0}}),e.fn.sparkline.discrete=x=n(e.fn.sparkline._base,v,{type:"discrete",init:function(t,n,i,r,s){x._super.init.call(this,t,n,i,r,s),this.regionShapes={},this.values=n=e.map(n,Number),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),this.range=this.max-this.min,this.width=r="auto"===i.get("width")?2*n.length:this.width,this.interval=Math.floor(r/n.length),this.itemWidth=r/n.length,void 0!==i.get("chartRangeMin")&&(i.get("chartRangeClip")||i.get("chartRangeMin")<this.min)&&(this.min=i.get("chartRangeMin")),void 0!==i.get("chartRangeMax")&&(i.get("chartRangeClip")||i.get("chartRangeMax")>this.max)&&(this.max=i.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===i.get("lineHeight")?Math.round(.3*this.canvasHeight):i.get("lineHeight"))},getRegion:function(e,t){return Math.floor(t/this.itemWidth)},getCurrentRegionFields:function(){var e=this.currentRegion;return{isNull:void 0===this.values[e],value:this.values[e],offset:e}},renderRegion:function(e,t){var n,i,s,o,a=this.values,l=this.options,c=this.min,h=this.max,u=this.range,d=this.interval,f=this.target,p=this.canvasHeight,g=this.lineHeight,m=p-g;return i=r(a[e],c,h),o=e*d,n=Math.round(m-m*((i-c)/u)),s=l.get("thresholdColor")&&l.get("thresholdValue")>i?l.get("thresholdColor"):l.get("lineColor"),t&&(s=this.calcHighlightColor(s,l)),f.drawLine(o,n,o,n+g,s)}}),e.fn.sparkline.bullet=C=n(e.fn.sparkline._base,{type:"bullet",init:function(e,t,n,i,r){var s,o,l;C._super.init.call(this,e,t,n,i,r),this.values=t=a(t),l=t.slice(),l[0]=null===l[0]?l[2]:l[0],l[1]=null===t[1]?l[2]:l[1],s=Math.min.apply(Math,t),o=Math.max.apply(Math,t),s=void 0===n.get("base")?0>s?s:0:n.get("base"),this.min=s,this.max=o,this.range=o-s,this.shapes={},this.valueShapes={},this.regiondata={},this.width=i="auto"===n.get("width")?"4.0em":i,this.target=this.$el.simpledraw(i,r,n.get("composite")),t.length||(this.disabled=!0),this.initTarget()},getRegion:function(e,t,n){var i=this.target.getShapeAt(e,t,n);return void 0!==i&&void 0!==this.shapes[i]?this.shapes[i]:void 0},getCurrentRegionFields:function(){var e=this.currentRegion;return{fieldkey:e.substr(0,1),value:this.values[e.substr(1)],region:e}},changeHighlight:function(e){var t,n=this.currentRegion,i=this.valueShapes[n];switch(delete this.shapes[i],n.substr(0,1)){case"r":t=this.renderRange(n.substr(1),e);break;case"p":t=this.renderPerformance(e);break;case"t":t=this.renderTarget(e)}this.valueShapes[n]=t.id,this.shapes[t.id]=n,this.target.replaceWithShape(i,t)},renderRange:function(e,t){var n=this.values[e],i=Math.round(this.canvasWidth*((n-this.min)/this.range)),r=this.options.get("rangeColors")[e-2];return t&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,i-1,this.canvasHeight-1,r,r)},renderPerformance:function(e){var t=this.values[1],n=Math.round(this.canvasWidth*((t-this.min)/this.range)),i=this.options.get("performanceColor");return e&&(i=this.calcHighlightColor(i,this.options)),this.target.drawRect(0,Math.round(.3*this.canvasHeight),n-1,Math.round(.4*this.canvasHeight)-1,i,i)},renderTarget:function(e){var t=this.values[0],n=Math.round(this.canvasWidth*((t-this.min)/this.range)-this.options.get("targetWidth")/2),i=Math.round(.1*this.canvasHeight),r=this.canvasHeight-2*i,s=this.options.get("targetColor");return e&&(s=this.calcHighlightColor(s,this.options)),this.target.drawRect(n,i,this.options.get("targetWidth")-1,r-1,s,s)},render:function(){var e,t,n=this.values.length,i=this.target;if(C._super.render.call(this)){for(e=2;n>e;e++)t=this.renderRange(e).append(),this.shapes[t.id]="r"+e,this.valueShapes["r"+e]=t.id;null!==this.values[1]&&(t=this.renderPerformance().append(),this.shapes[t.id]="p1",this.valueShapes.p1=t.id),null!==this.values[0]&&(t=this.renderTarget().append(),this.shapes[t.id]="t0",this.valueShapes.t0=t.id),i.render()}}}),e.fn.sparkline.pie=T=n(e.fn.sparkline._base,{type:"pie",init:function(t,n,i,r,s){var o,a=0;if(T._super.init.call(this,t,n,i,r,s),this.shapes={},this.valueShapes={},this.values=n=e.map(n,Number),"auto"===i.get("width")&&(this.width=this.height),n.length>0)for(o=n.length;o--;)a+=n[o];this.total=a,this.initTarget(),this.radius=Math.floor(Math.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(e,t,n){var i=this.target.getShapeAt(e,t,n);return void 0!==i&&void 0!==this.shapes[i]?this.shapes[i]:void 0},getCurrentRegionFields:function(){var e=this.currentRegion;return{isNull:void 0===this.values[e],value:this.values[e],percent:100*(this.values[e]/this.total),color:this.options.get("sliceColors")[e%this.options.get("sliceColors").length],offset:e}},changeHighlight:function(e){var t=this.currentRegion,n=this.renderSlice(t,e),i=this.valueShapes[t];delete this.shapes[i],this.target.replaceWithShape(i,n),this.valueShapes[t]=n.id,this.shapes[n.id]=t},renderSlice:function(e,t){var n,i,r,s,o,a=this.target,l=this.options,c=this.radius,h=l.get("borderWidth"),u=l.get("offset"),d=2*Math.PI,f=this.values,p=this.total,g=u?2*Math.PI*(u/360):0;for(s=f.length,r=0;s>r;r++){if(n=g,i=g,p>0&&(i=g+d*(f[r]/p)),e===r)return o=l.get("sliceColors")[r%l.get("sliceColors").length],t&&(o=this.calcHighlightColor(o,l)),a.drawPieSlice(c,c,c-h,n,i,void 0,o);g=i}},render:function(){var e,t,n=this.target,i=this.values,r=this.options,s=this.radius,o=r.get("borderWidth");if(T._super.render.call(this)){for(o&&n.drawCircle(s,s,Math.floor(s-o/2),r.get("borderColor"),void 0,o).append(),t=i.length;t--;)i[t]&&(e=this.renderSlice(t).append(),this.valueShapes[t]=e.id,this.shapes[e.id]=t);n.render()}}}),e.fn.sparkline.box=E=n(e.fn.sparkline._base,{type:"box",init:function(t,n,i,r,s){E._super.init.call(this,t,n,i,r,s),this.values=e.map(n,Number),this.width="auto"===i.get("width")?"4.0em":r,this.initTarget(),this.values.length||(this.disabled=1)
|
||
},getRegion:function(){return 1},getCurrentRegionFields:function(){var e=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return void 0!==this.loutlier&&e.push({field:"lo",value:this.loutlier}),void 0!==this.routlier&&e.push({field:"ro",value:this.routlier}),void 0!==this.lwhisker&&e.push({field:"lw",value:this.lwhisker}),void 0!==this.rwhisker&&e.push({field:"rw",value:this.rwhisker}),e},render:function(){var e,t,n,i,r,o,a,l,c,h,u,d=this.target,f=this.values,p=f.length,g=this.options,m=this.canvasWidth,y=this.canvasHeight,v=void 0===g.get("chartRangeMin")?Math.min.apply(Math,f):g.get("chartRangeMin"),b=void 0===g.get("chartRangeMax")?Math.max.apply(Math,f):g.get("chartRangeMax"),w=0;if(E._super.render.call(this)){if(g.get("raw"))g.get("showOutliers")&&f.length>5?(t=f[0],e=f[1],i=f[2],r=f[3],o=f[4],a=f[5],l=f[6]):(e=f[0],i=f[1],r=f[2],o=f[3],a=f[4]);else if(f.sort(function(e,t){return e-t}),i=s(f,1),r=s(f,2),o=s(f,3),n=o-i,g.get("showOutliers")){for(e=a=void 0,c=0;p>c;c++)void 0===e&&f[c]>i-n*g.get("outlierIQR")&&(e=f[c]),f[c]<o+n*g.get("outlierIQR")&&(a=f[c]);t=f[0],l=f[p-1]}else e=f[0],a=f[p-1];this.quartiles=[i,r,o],this.lwhisker=e,this.rwhisker=a,this.loutlier=t,this.routlier=l,u=m/(b-v+1),g.get("showOutliers")&&(w=Math.ceil(g.get("spotRadius")),m-=2*Math.ceil(g.get("spotRadius")),u=m/(b-v+1),e>t&&d.drawCircle((t-v)*u+w,y/2,g.get("spotRadius"),g.get("outlierLineColor"),g.get("outlierFillColor")).append(),l>a&&d.drawCircle((l-v)*u+w,y/2,g.get("spotRadius"),g.get("outlierLineColor"),g.get("outlierFillColor")).append()),d.drawRect(Math.round((i-v)*u+w),Math.round(.1*y),Math.round((o-i)*u),Math.round(.8*y),g.get("boxLineColor"),g.get("boxFillColor")).append(),d.drawLine(Math.round((e-v)*u+w),Math.round(y/2),Math.round((i-v)*u+w),Math.round(y/2),g.get("lineColor")).append(),d.drawLine(Math.round((e-v)*u+w),Math.round(y/4),Math.round((e-v)*u+w),Math.round(y-y/4),g.get("whiskerColor")).append(),d.drawLine(Math.round((a-v)*u+w),Math.round(y/2),Math.round((o-v)*u+w),Math.round(y/2),g.get("lineColor")).append(),d.drawLine(Math.round((a-v)*u+w),Math.round(y/4),Math.round((a-v)*u+w),Math.round(y-y/4),g.get("whiskerColor")).append(),d.drawLine(Math.round((r-v)*u+w),Math.round(.1*y),Math.round((r-v)*u+w),Math.round(.9*y),g.get("medianColor")).append(),g.get("target")&&(h=Math.ceil(g.get("spotRadius")),d.drawLine(Math.round((g.get("target")-v)*u+w),Math.round(y/2-h),Math.round((g.get("target")-v)*u+w),Math.round(y/2+h),g.get("targetColor")).append(),d.drawLine(Math.round((g.get("target")-v)*u+w-h),Math.round(y/2),Math.round((g.get("target")-v)*u+w+h),Math.round(y/2),g.get("targetColor")).append()),d.render()}}}),e.browser.msie&&document.namespaces&&!document.namespaces.v&&document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),void 0===e.browser.hasCanvas&&(e.browser.hasCanvas=void 0!==document.createElement("canvas").getContext),A=n({init:function(e,t,n,i){this.target=e,this.id=t,this.type=n,this.args=i},append:function(){return this.target.appendShape(this),this}}),S=n({_pxregex:/(\d+)(px)?\s*$/i,init:function(t,n,i){t&&(this.width=t,this.height=n,this.target=i,this.lastShapeId=null,i[0]&&(i=i[0]),e.data(i,"_jqs_vcanvas",this))},drawLine:function(e,t,n,i,r,s){return this.drawShape([[e,t],[n,i]],r,s)},drawShape:function(e,t,n,i){return this._genShape("Shape",[e,t,n,i])},drawCircle:function(e,t,n,i,r,s){return this._genShape("Circle",[e,t,n,i,r,s])},drawPieSlice:function(e,t,n,i,r,s,o){return this._genShape("PieSlice",[e,t,n,i,r,s,o])},drawRect:function(e,t,n,i,r,s){return this._genShape("Rect",[e,t,n,i,r,s])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(t,n){e(n).html(t)},_calculatePixelDims:function(t,n,i){var r;r=this._pxregex.exec(n),this.pixelHeight=r?r[1]:e(i).height(),r=this._pxregex.exec(t),this.pixelWidth=r?r[1]:e(i).width()},_genShape:function(e,t){var n=z++;return t.unshift(n),new A(this,n,e,t)},appendShape:function(){alert("appendShape not implemented")},replaceWithShape:function(){alert("replaceWithShape not implemented")},insertAfterShape:function(){alert("insertAfterShape not implemented")},removeShapeId:function(){alert("removeShapeId not implemented")},getShapeAt:function(){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),D=n(S,{init:function(t,n,i,r){D._super.init.call(this,t,n,i),this.canvas=document.createElement("canvas"),i[0]&&(i=i[0]),e.data(i,"_jqs_vcanvas",this),e(this.canvas).css({display:"inline-block",width:t,height:n,verticalAlign:"top"}),this._insert(this.canvas,i),this._calculatePixelDims(t,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=r,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0,e(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(e,t,n){var i=this.canvas.getContext("2d");return void 0!==e&&(i.strokeStyle=e),i.lineWidth=void 0===n?1:n,void 0!==t&&(i.fillStyle=t),i},reset:function(){var e=this._getContext();e.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=void 0},_drawShape:function(e,t,n,i,r){var s,o,a=this._getContext(n,i,r);for(a.beginPath(),a.moveTo(t[0][0]+.5,t[0][1]+.5),s=1,o=t.length;o>s;s++)a.lineTo(t[s][0]+.5,t[s][1]+.5);void 0!==n&&a.stroke(),void 0!==i&&a.fill(),void 0!==this.targetX&&void 0!==this.targetY&&a.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=e)},_drawCircle:function(e,t,n,i,r,s,o){var a=this._getContext(r,s,o);a.beginPath(),a.arc(t,n,i,0,2*Math.PI,!1),void 0!==this.targetX&&void 0!==this.targetY&&a.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=e),void 0!==r&&a.stroke(),void 0!==s&&a.fill()},_drawPieSlice:function(e,t,n,i,r,s,o,a){var l=this._getContext(o,a);l.beginPath(),l.moveTo(t,n),l.arc(t,n,i,r,s,!1),l.lineTo(t,n),l.closePath(),void 0!==o&&l.stroke(),a&&l.fill(),void 0!==this.targetX&&void 0!==this.targetY&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=e)},_drawRect:function(e,t,n,i,r,s,o){return this._drawShape(e,[[t,n],[t+i,n],[t+i,n+r],[t,n+r],[t,n]],s,o)},appendShape:function(e){return this.shapes[e.id]=e,this.shapeseq.push(e.id),this.lastShapeId=e.id,e.id},replaceWithShape:function(e,t){var n,i=this.shapeseq;for(this.shapes[t.id]=t,n=i.length;n--;)i[n]==e&&(i[n]=t.id);delete this.shapes[e]},replaceWithShapes:function(e,t){var n,i,r,s=this.shapeseq,o={};for(i=e.length;i--;)o[e[i]]=!0;for(i=s.length;i--;)n=s[i],o[n]&&(s.splice(i,1),delete this.shapes[n],r=i);for(i=t.length;i--;)s.splice(r,0,t[i].id),this.shapes[t[i].id]=t[i]},insertAfterShape:function(e,t){var n,i=this.shapeseq;for(n=i.length;n--;)if(i[n]===e)return i.splice(n+1,0,t.id),this.shapes[t.id]=t,void 0},removeShapeId:function(e){var t,n=this.shapeseq;for(t=n.length;t--;)if(n[t]===e){n.splice(t,1);break}delete this.shapes[e]},getShapeAt:function(e,t,n){return this.targetX=t,this.targetY=n,this.render(),this.currentTargetShapeId},render:function(){var e,t,n,i=this.shapeseq,r=this.shapes,s=i.length,o=this._getContext();for(o.clearRect(0,0,this.pixelWidth,this.pixelHeight),n=0;s>n;n++)e=i[n],t=r[e],this["_draw"+t.type].apply(this,t.args);this.interact||(this.shapes={},this.shapeseq=[])}}),M=n(S,{init:function(t,n,i){var r;M._super.init.call(this,t,n,i),i[0]&&(i=i[0]),e.data(i,"_jqs_vcanvas",this),this.canvas=document.createElement("span"),e(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:t,height:n,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,i),this._calculatePixelDims(t,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,r='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"'+' style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",r),this.group=e(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(e,t,n,i,r){var s,o,a,l,c,h,u,d=[];for(u=0,h=t.length;h>u;u++)d[u]=""+t[u][0]+","+t[u][1];return s=d.splice(0,1),r=void 0===r?1:r,o=void 0===n?' stroked="false" ':' strokeWeight="'+r+'px" strokeColor="'+n+'" ',a=void 0===i?' filled="false"':' fillColor="'+i+'" filled="true" ',l=d[0]===d[d.length-1]?"x ":"",c='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+e+'" '+o+a+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+s+" l "+d.join(", ")+" "+l+'e">'+" </v:shape>"},_drawCircle:function(e,t,n,i,r,s,o){var a,l,c;return t-=i,n-=i,a=void 0===r?' stroked="false" ':' strokeWeight="'+o+'px" strokeColor="'+r+'" ',l=void 0===s?' filled="false"':' fillColor="'+s+'" filled="true" ',c='<v:oval id="jqsshape'+e+'" '+a+l+' style="position:absolute;top:'+n+"px; left:"+t+"px; width:"+2*i+"px; height:"+2*i+'px"></v:oval>'},_drawPieSlice:function(e,t,n,i,r,s,o,a){var l,c,h,u,d,f,p,g;if(r!==s&&(s-r===2*Math.PI&&(r=0,s=2*Math.PI),c=t+Math.round(Math.cos(r)*i),h=n+Math.round(Math.sin(r)*i),u=t+Math.round(Math.cos(s)*i),d=n+Math.round(Math.sin(s)*i),!(c===u&&h===d&&Math.PI>s-r)))return l=[t-i,n-i,t+i,n+i,c,h,u,d],f=void 0===o?' stroked="false" ':' strokeWeight="1px" strokeColor="'+o+'" ',p=void 0===a?' filled="false"':' fillColor="'+a+'" filled="true" ',g='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+e+'" '+f+p+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+t+","+n+" wa "+l.join(", ")+' x e">'+" </v:shape>"},_drawRect:function(e,t,n,i,r,s,o){return this._drawShape(e,[[t,n],[t,n+r],[t+i,n+r],[t+i,n],[t,n]],s,o)},reset:function(){this.group.innerHTML=""},appendShape:function(e){var t=this["_draw"+e.type].apply(this,e.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",t):this.prerender+=t,this.lastShapeId=e.id,e.id},replaceWithShape:function(t,n){var i=e("#jqsshape"+t),r=this["_draw"+n.type].apply(this,n.args);i[0].outerHTML=r},replaceWithShapes:function(t,n){var i,r=e("#jqsshape"+t[0]),s="",o=n.length;for(i=0;o>i;i++)s+=this["_draw"+n[i].type].apply(this,n[i].args);for(r[0].outerHTML=s,i=1;t.length>i;i++)e("#jqsshape"+t[i]).remove()},insertAfterShape:function(t,n){var i=e("#jqsshape"+t),r=this["_draw"+n.type].apply(this,n.args);i[0].insertAdjacentHTML("afterEnd",r)},removeShapeId:function(t){var n=e("#jqsshape"+t);this.group.removeChild(n[0])},getShapeAt:function(e){var t=e.id.substr(8);return t},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})}),function(e){function t(t,n){function i(){return h.update(),s(),h}function r(){var e=b.toLowerCase();m.obj.css(v,w/p.ratio),f.obj.css(v,-w),x.start=m.obj.offset()[v],p.obj.css(e,g[n.axis]),g.obj.css(e,g[n.axis]),m.obj.css(e,m[n.axis])}function s(){C?d.obj[0].ontouchstart=function(e){1===e.touches.length&&(o(e.touches[0]),e.stopPropagation())}:(m.obj.bind("mousedown",o),g.obj.bind("mouseup",l)),n.scroll&&window.addEventListener?(u[0].addEventListener("DOMMouseScroll",a,!1),u[0].addEventListener("mousewheel",a,!1)):n.scroll&&(u[0].onmousewheel=a)}function o(t){e("body").addClass("noSelect");var n=parseInt(m.obj.css(v),10);x.start=y?t.pageX:t.pageY,_.start="auto"==n?0:n,C?(document.ontouchmove=function(e){e.preventDefault(),l(e.touches[0])},document.ontouchend=c):(e(document).bind("mousemove",l),e(document).bind("mouseup",c),m.obj.bind("mouseup",c))}function a(t){if(1>f.ratio){var i=t||window.event,r=i.wheelDelta?i.wheelDelta/120:-i.detail/3;w-=r*n.wheel,w=Math.min(f[n.axis]-d[n.axis],Math.max(0,w)),m.obj.css(v,w/p.ratio),f.obj.css(v,-w),(n.lockscroll||w!==f[n.axis]-d[n.axis]&&0!==w)&&(i=e.event.fix(i),i.preventDefault())}}function l(e){1>f.ratio&&(_.now=n.invertscroll&&C?Math.min(g[n.axis]-m[n.axis],Math.max(0,_.start+(x.start-(y?e.pageX:e.pageY)))):Math.min(g[n.axis]-m[n.axis],Math.max(0,_.start+((y?e.pageX:e.pageY)-x.start))),w=_.now*p.ratio,f.obj.css(v,-w),m.obj.css(v,_.now))}function c(){e("body").removeClass("noSelect"),e(document).unbind("mousemove",l),e(document).unbind("mouseup",c),m.obj.unbind("mouseup",c),document.ontouchmove=document.ontouchend=null}var h=this,u=t,d={obj:e(".viewport",t)},f={obj:e(".overview",t)},p={obj:e(".scrollbar",t)},g={obj:e(".track",p.obj)},m={obj:e(".thumb",p.obj)},y="x"===n.axis,v=y?"left":"top",b=y?"Width":"Height",w=0,_={start:0,now:0},x={},C="ontouchstart"in document.documentElement;return this.update=function(e){d[n.axis]=d.obj[0]["offset"+b],f[n.axis]=f.obj[0]["scroll"+b],f.ratio=d[n.axis]/f[n.axis],p.obj.toggleClass("disable",f.ratio>=1),g[n.axis]="auto"===n.size?d[n.axis]:n.size,m[n.axis]=Math.min(g[n.axis],Math.max(0,"auto"===n.sizethumb?g[n.axis]*f.ratio:n.sizethumb)),p.ratio="auto"===n.sizethumb?f[n.axis]/g[n.axis]:(f[n.axis]-d[n.axis])/(g[n.axis]-m[n.axis]),w="relative"===e&&1>=f.ratio?Math.min(f[n.axis]-d[n.axis],Math.max(0,w)):0,w="bottom"===e&&1>=f.ratio?f[n.axis]-d[n.axis]:isNaN(parseInt(e,10))?w:parseInt(e,10),r()},i()}e.tiny=e.tiny||{},e.tiny.scrollbar={options:{axis:"y",wheel:40,scroll:!0,lockscroll:!0,size:"auto",sizethumb:"auto",invertscroll:!1}},e.fn.tinyscrollbar=function(n){var i=e.extend({},e.tiny.scrollbar.options,n);return this.each(function(){e(this).data("tsb",new t(e(this),i))}),this},e.fn.tinyscrollbar_update=function(t){return e(this).data("tsb").update(t)}}(jQuery),/*!
|
||
* jQuery Validation Plugin 1.11.1
|
||
*
|
||
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
||
* http://docs.jquery.com/Plugins/Validation
|
||
*
|
||
* Copyright 2013 Jörn Zaefferer
|
||
* Released under the MIT license:
|
||
* http://www.opensource.org/licenses/mit-license.php
|
||
*/
|
||
function(e){e.extend(e.fn,{validate:function(t){if(!this.length)return t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var n=e.data(this[0],"validator");return n?n:(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){n.settings.submitHandler&&(n.submitButton=t.target),e(t.target).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==e(t.target).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.submit(function(t){function i(){var i;return n.settings.submitHandler?(n.submitButton&&(i=e("<input type='hidden'/>").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,t),n.submitButton&&i.remove(),!1):!0}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,i()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):i():(n.focusInvalid(),!1)})),n)},valid:function(){if(e(this[0]).is("form"))return this.validate().form();var t=!0,n=e(this[0].form).validate();return this.each(function(){t=t&&n.element(this)}),t},removeAttrs:function(t){var n={},i=this;return e.each(t.split(/\s/),function(e,t){n[t]=i.attr(t),i.removeAttr(t)}),n},rules:function(t,n){var i=this[0];if(t){var r=e.data(i.form,"validator").settings,s=r.rules,o=e.validator.staticRules(i);switch(t){case"add":e.extend(o,e.validator.normalizeRule(n)),delete o.messages,s[i.name]=o,n.messages&&(r.messages[i.name]=e.extend(r.messages[i.name],n.messages));break;case"remove":if(!n)return delete s[i.name],o;var a={};return e.each(n.split(/\s/),function(e,t){a[t]=o[t],delete o[t]}),a}}var l=e.validator.normalizeRules(e.extend({},e.validator.classRules(i),e.validator.attributeRules(i),e.validator.dataRules(i),e.validator.staticRules(i)),i);if(l.required){var c=l.required;delete l.required,l=e.extend({required:c},l)}return l}}),e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){return!!e.trim(""+e(t).val())},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return 1===arguments.length?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(e)).hide())},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(e,t){(9!==t.which||""!==this.elementValue(e))&&(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,i){"radio"===t.type?this.findByName(t.name).addClass(n).removeClass(i):e(t).addClass(n).removeClass(i)},unhighlight:function(t,n,i){"radio"===t.type?this.findByName(t.name).removeClass(n).addClass(i):e(t).removeClass(n).addClass(i)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){var n=e.data(this[0].form,"validator"),i="on"+t.type.replace(/^validate/,"");n.settings[i]&&n.settings[i].call(n,this[0],t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n=this.groups={};e.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/)),e.each(i,function(e,i){n[i]=t})});var i=this.settings.rules;e.each(i,function(t,n){i[t]=e.validator.normalizeRule(n)}),e(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",t).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",t),this.settings.invalidHandler&&e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=e(t);var n=this.check(t)!==!1;return n?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),n},showErrors:function(t){if(t){e.extend(this.errorMap,t),this.errorList=[];for(var n in t)this.errorList.push({message:t[n],element:this.findByName(n)[0]});this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t=0;for(var n in e)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in n||!t.objectLength(e(this).rules())?!1:(n[this.name]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([]),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n=e(t).attr("type"),i=e(t).val();return"radio"===n||"checkbox"===n?e("input[name='"+e(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(t){t=this.validationTargetFor(this.clean(t));var n,i=e(t).rules(),r=!1,s=this.elementValue(t);for(var o in i){var a={method:o,parameters:i[o]};try{if(n=e.validator.methods[o].call(this,s,t,a.parameters),"dependency-mismatch"===n){r=!0;continue}if(r=!1,"pending"===n)return this.toHide=this.toHide.not(this.errorsFor(t)),void 0;if(!n)return this.formatAndAdd(t,a),!1}catch(l){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+a.method+"' method.",l),l}}return r?void 0:(this.objectLength(i)&&this.successList.push(t),!0)},customDataMessage:function(t,n){return e(t).data("msg-"+n.toLowerCase())||t.attributes&&e(t).attr("data-msg-"+n.toLowerCase())},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;arguments.length>e;e++)if(void 0!==arguments[e])return arguments[e];return void 0},defaultMessage:function(t,n){return this.findDefined(this.customMessage(t.name,n),this.customDataMessage(t,n),!this.settings.ignoreTitle&&t.title||void 0,e.validator.messages[n],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(t,n){var i=this.defaultMessage(t,n.method),r=/\$?\{(\d+)\}/g;"function"==typeof i?i=i.call(this,n.parameters,t):r.test(i)&&(i=e.validator.format(i.replace(r,"{$1}"),n.parameters)),this.errorList.push({message:i,element:t}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t;for(e=0;this.errorList[e];e++){var n=this.errorList[e];this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var i=this.errorsFor(t);i.length?(i.removeClass(this.settings.validClass).addClass(this.settings.errorClass),i.html(n)):(i=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(i=i.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(i).length||(this.settings.errorPlacement?this.settings.errorPlacement(i,e(t)):i.insertAfter(t))),!n&&this.settings.success&&(i.text(""),"string"==typeof this.settings.success?i.addClass(this.settings.success):this.settings.success(i,t)),this.toShow=this.toShow.add(i)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name).not(this.settings.ignore)[0]),e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+t+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return this.dependTypes[typeof e]?this.dependTypes[typeof e](e,t):!0},dependTypes:{"boolean":function(e){return e},string:function(t,n){return!!e(t,n.form).length},"function":function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,this.pending[e.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[t.name],n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},i=e(t).attr("class");return i&&e.each(i.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},attributeRules:function(t){var n={},i=e(t),r=i[0].getAttribute("type");for(var s in e.validator.methods){var o;"required"===s?(o=i.get(0).getAttribute(s),""===o&&(o=!0),o=!!o):o=i.attr(s),/min|max/.test(s)&&(null===r||/number|range|text/.test(r))&&(o=Number(o)),o?n[s]=o:r===s&&"range"!==r&&(n[s]=!0)}return n.maxlength&&/-1|2147483647|524288/.test(n.maxlength)&&delete n.maxlength,n},dataRules:function(t){var n,i,r={},s=e(t);for(n in e.validator.methods)i=s.data("rule-"+n.toLowerCase()),void 0!==i&&(r[n]=i);return r},staticRules:function(t){var n={},i=e.data(t.form,"validator");return i.settings.rules&&(n=e.validator.normalizeRule(i.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(i,r){if(r===!1)return delete t[i],void 0;if(r.param||r.depends){var s=!0;switch(typeof r.depends){case"string":s=!!e(r.depends,n.form).length;break;case"function":s=r.depends.call(n,n)}s?t[i]=void 0!==r.param?r.param:!0:delete t[i]}}),e.each(t,function(i,r){t[i]=e.isFunction(r)?r(n):r}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(n=t[this].split(/[\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,i){e.validator.methods[t]=n,e.validator.messages[t]=void 0!==i?i:e.validator.messages[t],3>n.length&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,i){if(!this.depend(i,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var r=e(n).val();return r&&r.length>0}return this.checkable(n)?this.getLength(t,n)>0:e.trim(t).length>0},email:function(e,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(e))return!1;var n=0,i=0,r=!1;e=e.replace(/\D/g,"");for(var s=e.length-1;s>=0;s--){var o=e.charAt(s);i=parseInt(o,10),r&&(i*=2)>9&&(i-=9),n+=i,r=!r}return 0===n%10},minlength:function(t,n,i){var r=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||r>=i},maxlength:function(t,n,i){var r=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},rangelength:function(t,n,i){var r=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||r>=i[0]&&i[1]>=r},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||n>=e},range:function(e,t,n){return this.optional(t)||e>=n[0]&&n[1]>=e},equalTo:function(t,n,i){var r=e(i);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()}),t===r.val()},remote:function(t,n,i){if(this.optional(n))return"dependency-mismatch";var r=this.previousValue(n);if(this.settings.messages[n.name]||(this.settings.messages[n.name]={}),r.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=r.message,i="string"==typeof i&&{url:i}||i,r.old===t)return r.valid;r.old=t;var s=this;this.startRequest(n);var o={};return o[n.name]=t,e.ajax(e.extend(!0,{url:i,mode:"abort",port:"validate"+n.name,dataType:"json",data:o,success:function(i){s.settings.messages[n.name].remote=r.originalMessage;var o=i===!0||"true"===i;if(o){var a=s.formSubmitted;s.prepareElement(n),s.formSubmitted=a,s.successList.push(n),delete s.invalid[n.name],s.showErrors()}else{var l={},c=i||s.defaultMessage(n,"remote");l[n.name]=r.message=e.isFunction(c)?c(t):c,s.invalid[n.name]=!0,s.showErrors(l)}r.valid=o,s.stopRequest(n,o)}},i)),"pending"}}}),e.format=e.validator.format}(jQuery),function(e){var t={};if(e.ajaxPrefilter)e.ajaxPrefilter(function(e,n,i){var r=e.port;"abort"===e.mode&&(t[r]&&t[r].abort(),t[r]=i)});else{var n=e.ajax;e.ajax=function(i){var r=("mode"in i?i:e.ajaxSettings).mode,s=("port"in i?i:e.ajaxSettings).port;return"abort"===r?(t[s]&&t[s].abort(),t[s]=n.apply(this,arguments),t[s]):n.apply(this,arguments)}}}(jQuery),function(e){e.extend(e.fn,{validateDelegate:function(t,n,i){return this.bind(n,function(n){var r=e(n.target);return r.is(t)?i.apply(r,arguments):void 0})}})}(jQuery),/*
|
||
* Snippet :: jQuery Syntax Highlighter v2.0.0
|
||
* http://steamdev.com/snippet
|
||
*
|
||
* Copyright 2011, SteamDev
|
||
* Released under the MIT license.
|
||
* http://www.opensource.org/licenses/mit-license.php
|
||
*
|
||
* Date: Wed Jan 19, 2011
|
||
*/
|
||
function(e){window.log=function(){log.history=log.history||[],log.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments))},e.fn.snippet=function(t,n){"object"==typeof t&&(n=t),"string"==typeof t&&(t=t.toLowerCase());var i={style:"random",showNum:!0,transparent:!1,collapse:!1,menu:!0,showMsg:"Expand Code",hideMsg:"Collapse Code",clipboard:"",startCollapsed:!0,startText:!1,box:"",boxColor:"",boxFill:""},r=["acid","berries-dark","berries-light","bipolar","blacknblue","bright","contrast","darkblue","darkness","desert","dull","easter","emacs","golden","greenlcd","ide-anjuta","ide-codewarrior","ide-devcpp","ide-eclipse","ide-kdev","ide-msvcpp","kwrite","matlab","navy","nedit","neon","night","pablo","peachpuff","print","rand01","the","typical","vampire","vim","vim-dark","whatis","whitengrey","zellner"];return n&&e.extend(i,n),this.each(function(){var n=i.style.toLowerCase();if("random"==i.style){var s=Math.floor(Math.random()*r.length);n=r[s]}var o=e(this),a=this.nodeName.toLowerCase();if("pre"!=a){var l="Snippet Error: Sorry, Snippet only formats '<pre>' elements. '<"+a+">' elements are currently unsupported.";return console.log(l),!1}if(void 0==o.data("orgHtml")||null==o.data("orgHtml")){var c=o.html();o.data("orgHtml",c)}if(o.parent().hasClass("snippet-wrap")){if(o.parent().attr("class","sh_"+n+" snippet-wrap"),o.parents(".snippet-container").find(".snippet-reveal").attr("class","sh_"+n+" snippet-wrap snippet-reveal"),o.find("li.box, li.box-top, li.box-mid, li.box-bot").removeAttr("style").removeAttr("class"),o.find("li .box-sp").remove(),i.transparent){var h={"background-color":"transparent","box-shadow":"none","-moz-box-shadow":"none","-webkit-box-shadow":"none"};o.css(h),o.next(".snippet-textonly").css(h),o.parents(".snippet-container").find(".snippet-hide pre").css(h)}else{var h={"background-color":"","box-shadow":"","-moz-box-shadow":"","-webkit-box-shadow":""};o.css(h),o.next(".snippet-textonly").css(h),o.parents(".snippet-container").find(".snippet-reveal pre").css(h)}if(i.showNum){var u=o.find("li").eq(0).parent();if(u.hasClass("snippet-no-num")){u.wrap("<ol class='snippet-num'></ol>");var d=o.find("li").eq(0);d.unwrap()}}else{var u=o.find("li").eq(0).parent();if(u.hasClass("snippet-num")){u.wrap("<ul class='snippet-no-num'></ul>");var d=o.find("li").eq(0);d.unwrap()}}if(""!=i.box){for(var f="<span class='box-sp'> </span>",p=i.box.split(","),g=0;p.length>g;g++){var m=p[g];if(-1==m.indexOf("-"))m=parseFloat(m)-1,o.find("li").eq(m).addClass("box").prepend(f);else{var y=parseFloat(m.split("-")[0])-1,v=parseFloat(m.split("-")[1])-1;if(v>y){o.find("li").eq(y).addClass("box box-top").prepend(f),o.find("li").eq(v).addClass("box box-bot").prepend(f);for(var b=y+1;v>b;b++)o.find("li").eq(b).addClass("box box-mid").prepend(f)}else y==v&&o.find("li").eq(y).addClass("box").prepend(f)}}""!=i.boxColor&&o.find("li.box").css("border-color",i.boxColor),""!=i.boxFill&&o.find("li.box").addClass("box-bg").css("background-color",i.boxFill),e.browser.webkit&&(o.find(".snippet-num li.box").css("margin-left","-3.3em"),o.find(".snippet-num li .box-sp").css("width","21px"))}sh_highlightDocument(),i.menu?o.prev(".snippet-menu").find("pre,.snippet-clipboard").show():o.prev(".snippet-menu").find("pre,.snippet-clipboard").hide()}else{if("string"!=typeof t){if(o.attr("class").length>0)var w=' class="'+o.attr("class")+'"';else var w="";if(o.attr("id").length>0)var _=' id="'+o.attr("id")+'"';else var _="";var l="Snippet Error: You must specify a language on inital usage of Snippet. Reference <pre"+w+_+">";return console.log(l),!1}if(o.addClass("sh_"+t).addClass("snippet-formatted").wrap("<div class='snippet-container' style='"+o.attr("style")+";'><div class='sh_"+n+" snippet-wrap'></div></div>"),o.removeAttr("style"),sh_highlightDocument(),i.showNum){var x=o.html();for(x=x.replace(/\n/g,"</li><li>"),x="<ol class='snippet-num'><li>"+x+"</li></ol>";-1!=x.indexOf("<li></li></ol>");)x=x.replace("<li></li></ol>","</ol>")}else{var x=o.html();for(x=x.replace(/\n/g,"</li><li>"),x="<ul class='snippet-no-num'><li>"+x+"</li></ul>";-1!=x.indexOf("<li></li></ul>");)x=x.replace("<li></li></ul>","</ul>")}for(x=x.replace(/\t/g," "),o.html(x);""==o.find("li").eq(0).html();)o.find("li").eq(0).remove();o.find("li").each(function(){if(2>e(this).html().length){var t=e(this).html().replace(/\s/g,"");""==t&&(e.browser.opera?e(this).html(" "):e(this).html("<span style='display:none;'> </span>"))}});var C="<pre class='snippet-textonly sh_sourceCode' style='display:none;'>"+o.data("orgHtml")+"</pre>",T="<div class='snippet-menu sh_sourceCode' style='display:none;'><pre><a class='snippet-copy' href='#'>copy</a><a class='snippet-text' href='#'>text</a><a class='snippet-window' href='#'>pop-up</a></pre></div>";if(o.parent().append(C),o.parent().prepend(T),o.parent().hover(function(){e(this).find(".snippet-menu").fadeIn("fast")},function(){e(this).find(".snippet-menu").fadeOut("fast")}),""!=i.clipboard&&0!=i.clipboard){var E=o.parent().find("a.snippet-copy");E.show(),E.parents(".snippet-menu").show();var k=o.parents(".snippet-wrap").find(".snippet-textonly").text();ZeroClipboard.setMoviePath(i.clipboard);var N=new ZeroClipboard.Client;N.setText(k),N.glue(E[0],E.parents(".snippet-menu")[0]),N.addEventListener("complete",function(e,t){t.length>500&&(t=t.substr(0,500)+"...\n\n("+(t.length-500)+" characters not shown)"),alert("Copied text to clipboard:\n\n "+t)}),E.parents(".snippet-menu").hide()}else o.parent().find("a.snippet-copy").hide();if(o.parent().find("a.snippet-text").click(function(){var t=e(this).parents(".snippet-wrap").find(".snippet-formatted"),n=e(this).parents(".snippet-wrap").find(".snippet-textonly");return t.toggle(),n.toggle(),n.is(":visible")?e(this).html("html"):e(this).html("text"),e(this).blur(),!1}),o.parent().find("a.snippet-window").click(function(){var t=e(this).parents(".snippet-wrap").find(".snippet-textonly").html();return snippetPopup(t),e(this).blur(),!1}),i.menu||o.prev(".snippet-menu").find("pre,.snippet-clipboard").hide(),i.collapse){var A=o.parent().attr("class"),S="<div class='snippet-reveal "+A+"'><pre class='sh_sourceCode'><a href='#' class='snippet-toggle'>"+i.showMsg+"</a></pre></div>",D="<div class='sh_sourceCode snippet-hide'><pre><a href='#' class='snippet-revealed snippet-toggle'>"+i.hideMsg+"</a></pre></div>";o.parents(".snippet-container").append(S),o.parent().append(D);var M=o.parents(".snippet-container");i.startCollapsed?(M.find(".snippet-reveal").show(),M.find(".snippet-wrap").eq(0).hide()):(M.find(".snippet-reveal").hide(),M.find(".snippet-wrap").eq(0).show()),M.find("a.snippet-toggle").click(function(){return M.find(".snippet-wrap").toggle(),!1})}if(i.transparent){var h={"background-color":"transparent","box-shadow":"none","-moz-box-shadow":"none","-webkit-box-shadow":"none"};o.css(h),o.next(".snippet-textonly").css(h),o.parents(".snippet-container").find(".snippet-reveal pre").css(h)}if(i.startText&&(o.hide(),o.next(".snippet-textonly").show(),o.parent().find(".snippet-text").html("html")),""!=i.box){for(var f="<span class='box-sp'> </span>",p=i.box.split(","),g=0;p.length>g;g++){var m=p[g];if(-1==m.indexOf("-"))m=parseFloat(m)-1,o.find("li").eq(m).addClass("box").prepend(f);else{var y=parseFloat(m.split("-")[0])-1,v=parseFloat(m.split("-")[1])-1;if(v>y){o.find("li").eq(y).addClass("box box-top").prepend(f),o.find("li").eq(v).addClass("box box-bot").prepend(f);for(var b=y+1;v>b;b++)o.find("li").eq(b).addClass("box box-mid").prepend(f)}else y==v&&o.find("li").eq(y).addClass("box").prepend(f)}}""!=i.boxColor&&o.find("li.box").css("border-color",i.boxColor),""!=i.boxFill&&o.find("li.box, li.box-top, li.box-mid, li.box-bot").addClass("box-bg").css("background-color",i.boxFill),e.browser.webkit&&(o.find(".snippet-num li.box").css("margin-left","-3.3em"),o.find(".snippet-num li .box-sp").css("width","21px"))}o.parents(".snippet-container").find("a").addClass("sh_url")}})}}(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(e){return"string"==typeof e&&(e=document.getElementById(e)),e.addClass||(e.hide=function(){this.style.display="none"},e.show=function(){this.style.display=""},e.addClass=function(e){this.removeClass(e),this.className+=" "+e},e.removeClass=function(e){for(var t=this.className.split(/\s+/),n=-1,i=0;t.length>i;i++)t[i]==e&&(n=i,i=t.length);return n>-1&&(t.splice(n,1),this.className=t.join(" ")),this},e.hasClass=function(e){return!!this.className.match(new RegExp("\\s*"+e+"\\s*"))}),e},setMoviePath:function(e){this.moviePath=e},dispatch:function(e,t,n){var i=this.clients[e];i&&i.receiveEvent(t,n)},register:function(e,t){this.clients[e]=t},getDOMObjectPosition:function(e,t){for(var n={left:0,top:0,width:e.width?e.width:e.offsetWidth,height:e.height?e.height:e.offsetHeight};e&&e!=t;)n.left+=e.offsetLeft,n.top+=e.offsetTop,e=e.offsetParent;return n},Client:function(e){this.handlers={},this.id=ZeroClipboard.nextId++,this.movieId="ZeroClipboardMovie_"+this.id,ZeroClipboard.register(this.id,this),e&&this.glue(e)}};ZeroClipboard.Client.prototype={id:0,ready:!1,movie:null,clipText:"",handCursorEnabled:!0,cssEffects:!0,handlers:null,glue:function(e,t,n){this.domElement=ZeroClipboard.$(e);var i=99;this.domElement.style.zIndex&&(i=parseInt(this.domElement.style.zIndex,10)+1),"string"==typeof t?t=ZeroClipboard.$(t):"undefined"==typeof t&&(t=document.getElementsByTagName("body")[0]);var r=ZeroClipboard.getDOMObjectPosition(this.domElement,t);this.div=document.createElement("div"),this.div.className="snippet-clipboard";var s=this.div.style;if(s.position="absolute",s.left=""+r.left+"px",s.top=""+r.top+"px",s.width=""+r.width+"px",s.height=""+r.height+"px",s.zIndex=i,"object"==typeof n)for(addedStyle in n)s[addedStyle]=n[addedStyle];t.appendChild(this.div),this.div.innerHTML=this.getHTML(r.width,r.height)},getHTML:function(e,t){var n="",i="id="+this.id+"&width="+e+"&height="+t;if(navigator.userAgent.match(/MSIE/)){var r=location.href.match(/^https/i)?"https://":"http://";n+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+r+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+e+'" height="'+t+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+i+'"/><param name="wmode" value="transparent"/></object>'}else n+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+e+'" height="'+t+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+i+'" wmode="transparent" />';return n},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide(),this.div.innerHTML="";var e=document.getElementsByTagName("body")[0];try{e.removeChild(this.div)}catch(t){}this.domElement=null,this.div=null}},reposition:function(e){if(e&&(this.domElement=ZeroClipboard.$(e),this.domElement||this.hide()),this.domElement&&this.div){var t=ZeroClipboard.getDOMObjectPosition(this.domElement),n=this.div.style;n.left=""+t.left+"px",n.top=""+t.top+"px"}},setText:function(e){this.clipText=e,this.ready&&this.movie.setText(e)},addEventListener:function(e,t){e=e.toString().toLowerCase().replace(/^on/,""),this.handlers[e]||(this.handlers[e]=[]),this.handlers[e].push(t)},setHandCursor:function(e){this.handCursorEnabled=e,this.ready&&this.movie.setHandCursor(e)},setCSSEffects:function(e){this.cssEffects=!!e},receiveEvent:function(e,t){switch(e=e.toString().toLowerCase().replace(/^on/,"")){case"load":if(this.movie=document.getElementById(this.movieId),!this.movie){var n=this;return setTimeout(function(){n.receiveEvent("load",null)},1),void 0}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var n=this;return setTimeout(function(){n.receiveEvent("load",null)},100),this.ready=!0,void 0}this.ready=!0;try{this.movie.setText(this.clipText)}catch(i){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(i){}break;case"mouseover":this.domElement&&this.cssEffects&&(this.domElement.addClass("hover"),this.recoverActive&&this.domElement.addClass("active"));break;case"mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0),this.domElement.removeClass("hover"));break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[e])for(var r=0,s=this.handlers[e].length;s>r;r++){var o=this.handlers[e][r];"function"==typeof o?o(this,t):"object"==typeof o&&2==o.length?o[0][o[1]](this,t):"string"==typeof o&&window[o](this,t)}}},/* Copyright (C) 2007, 2008 gnombat@users.sourceforge.net */
|
||
this.sh_languages||(this.sh_languages={});var sh_requests={};this.sh_languages||(this.sh_languages={}),sh_languages.c=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",10,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",13],[/'/g,"sh_string",14],[/\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/$/g,null,-2],[/</g,"sh_string",11],[/"/g,"sh_string",12],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.cpp=[[[/(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:class|const_cast|delete|dynamic_cast|explicit|false|friend|inline|mutable|namespace|new|operator|private|protected|public|reinterpret_cast|static_cast|template|this|throw|true|try|typeid|typename|using|virtual)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",10,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",13],[/'/g,"sh_string",14],[/\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/$/g,null,-2],[/</g,"sh_string",11],[/"/g,"sh_string",12],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.csharp=[[[/\b(?:using)\b/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))(?:[FfDdMmUulL]+)?\b/g,"sh_number",-1],[/(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:abstract|event|new|struct|as|explicit|null|switch|base|extern|this|false|operator|throw|break|finally|out|true|fixed|override|try|case|params|typeof|catch|for|private|foreach|protected|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|continue|in|return|virtual|default|interface|sealed|volatile|delegate|internal|do|is|sizeof|while|lock|stackalloc|else|static|enum|namespace|get|partial|set|value|where|yield)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",10,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",13],[/'/g,"sh_string",14],[/\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/$/g,null,-2],[/</g,"sh_string",11],[/"/g,"sh_string",12],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.css=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/(?:\.|#)[A-Za-z0-9_]+/g,"sh_selector",-1],[/\{/g,"sh_cbracket",10,1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\}/g,"sh_cbracket",-2],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/[A-Za-z0-9_-]+[ \t]*:/g,"sh_property",-1],[/[.%A-Za-z0-9_-]+/g,"sh_value",-1],[/#(?:[A-Za-z0-9_]+)/g,"sh_string",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.flex=[[[/^%\{/g,"sh_preproc",1,1],[/^%[sx]/g,"sh_preproc",16,1],[/^%option/g,"sh_preproc",17,1],[/^%(?:array|pointer|[aceknopr])/g,"sh_preproc",-1],[/[A-Za-z_][A-Za-z0-9_-]*/g,"sh_preproc",19,1],[/^%%/g,"sh_preproc",20,1]],[[/^%\}/g,"sh_preproc",-2],[/(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:class|const_cast|delete|dynamic_cast|explicit|false|friend|inline|mutable|namespace|new|operator|private|protected|public|reinterpret_cast|static_cast|template|this|throw|true|try|typeid|typename|using|virtual)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",2],[/\/\//g,"sh_comment",8],[/\/\*\*/g,"sh_comment",9],[/\/\*/g,"sh_comment",10],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",11,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",14],[/'/g,"sh_string",15],[/\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",3,1],[/<!DOCTYPE/g,"sh_preproc",5,1],[/<!--/g,"sh_comment",6],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",7,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",7,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",4]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",4]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",6]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",4]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",3,1],[/<!DOCTYPE/g,"sh_preproc",5,1],[/<!--/g,"sh_comment",6],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",7,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",7,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/$/g,null,-2],[/</g,"sh_string",12],[/"/g,"sh_string",13],[/\/\/\//g,"sh_comment",2],[/\/\//g,"sh_comment",8],[/\/\*\*/g,"sh_comment",9],[/\/\*/g,"sh_comment",10]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/$/g,null,-2],[/[A-Za-z_][A-Za-z0-9_-]*/g,"sh_function",-1]],[[/$/g,null,-2],[/[A-Za-z_][A-Za-z0-9_-]*/g,"sh_keyword",-1],[/"/g,"sh_string",18],[/=/g,"sh_symbol",-1]],[[/$/g,null,-2],[/"/g,"sh_string",-2]],[[/$/g,null,-2],[/\{[A-Za-z_][A-Za-z0-9_-]*\}/g,"sh_type",-1],[/"/g,"sh_string",13],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1]],[[/^%%/g,"sh_preproc",21,1],[/<[A-Za-z_][A-Za-z0-9_-]*>/g,"sh_function",-1],[/"/g,"sh_string",13],[/\\./g,"sh_preproc",-1],[/\{[A-Za-z_][A-Za-z0-9_-]*\}/g,"sh_type",-1],[/\/\*/g,"sh_comment",22],[/\{/g,"sh_cbracket",23,1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1]],[[/(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:class|const_cast|delete|dynamic_cast|explicit|false|friend|inline|mutable|namespace|new|operator|private|protected|public|reinterpret_cast|static_cast|template|this|throw|true|try|typeid|typename|using|virtual)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",2],[/\/\//g,"sh_comment",8],[/\/\*\*/g,"sh_comment",9],[/\/\*/g,"sh_comment",10],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",11,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",14],[/'/g,"sh_string",15],[/\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/\*\//g,"sh_comment",-2],[/\/\*/g,"sh_comment",22]],[[/\}/g,"sh_cbracket",-2],[/\{/g,"sh_cbracket",23,1],[/\$./g,"sh_variable",-1],[/(\b(?:class|struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:class|const_cast|delete|dynamic_cast|explicit|false|friend|inline|mutable|namespace|new|operator|private|protected|public|reinterpret_cast|static_cast|template|this|throw|true|try|typeid|typename|using|virtual)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",2],[/\/\//g,"sh_comment",8],[/\/\*\*/g,"sh_comment",9],[/\/\*/g,"sh_comment",10],[/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/^[ \t]*#(?:[ \t]*include)/g,"sh_preproc",11,1],[/^[ \t]*#(?:[ \t]*[A-Za-z0-9_]*)/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",14],[/'/g,"sh_string",15],[/\b(?:__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|break|case|catch|cdecl|const|continue|default|do|else|enum|extern|for|goto|if|pascal|register|return|sizeof|static|struct|switch|typedef|union|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:bool|char|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.html=[[[/<\?xml/g,"sh_preproc",1,1],[/<!DOCTYPE/g,"sh_preproc",3,1],[/<!--/g,"sh_comment",4],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",5,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",5,1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",4]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]]],this.sh_languages||(this.sh_languages={}),sh_languages.java=[[[/\b(?:import|package)\b/g,"sh_preproc",-1],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/(\b(?:class|interface))([ \t]+)([$A-Za-z0-9_]+)/g,["sh_keyword","sh_normal","sh_classname"],-1],[/\b(?:abstract|assert|break|case|catch|class|const|continue|default|do|else|extends|false|final|finally|for|goto|if|implements|instanceof|interface|native|new|null|private|protected|public|return|static|strictfp|super|switch|synchronized|throw|throws|true|this|transient|try|volatile|while)\b/g,"sh_keyword",-1],[/\b(?:int|byte|boolean|char|long|float|double|short|void)\b/g,"sh_type",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1],[/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,["sh_usertype","sh_usertype","sh_normal"],-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.javascript=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,"sh_keyword",-1],[/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,["sh_symbol","sh_normal","sh_symbol"],-1],[/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,["sh_number","sh_normal","sh_symbol"],-1],[/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,["sh_normal","sh_symbol"],-1],[/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,"sh_regexp",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,"sh_predef_var",-1],[/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,"sh_predef_func",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.javascript_dom=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,"sh_keyword",-1],[/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,["sh_symbol","sh_normal","sh_symbol"],-1],[/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,["sh_number","sh_normal","sh_symbol"],-1],[/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,["sh_normal","sh_symbol"],-1],[/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,"sh_regexp",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,"sh_predef_var",-1],[/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,"sh_predef_func",-1],[/\b(?:applicationCache|closed|Components|content|controllers|crypto|defaultStatus|dialogArguments|directories|document|frameElement|frames|fullScreen|globalStorage|history|innerHeight|innerWidth|length|location|locationbar|menubar|name|navigator|opener|outerHeight|outerWidth|pageXOffset|pageYOffset|parent|personalbar|pkcs11|returnValue|screen|availTop|availLeft|availHeight|availWidth|colorDepth|height|left|pixelDepth|top|width|screenX|screenY|scrollbars|scrollMaxX|scrollMaxY|scrollX|scrollY|self|sessionStorage|sidebar|status|statusbar|toolbar|top|window)\b/g,"sh_predef_var",-1],[/\b(?:alert|addEventListener|atob|back|blur|btoa|captureEvents|clearInterval|clearTimeout|close|confirm|dump|escape|find|focus|forward|getAttention|getComputedStyle|getSelection|home|moveBy|moveTo|open|openDialog|postMessage|print|prompt|releaseEvents|removeEventListener|resizeBy|resizeTo|scroll|scrollBy|scrollByLines|scrollByPages|scrollTo|setInterval|setTimeout|showModalDialog|sizeToContent|stop|unescape|updateCommands|onabort|onbeforeunload|onblur|onchange|onclick|onclose|oncontextmenu|ondragdrop|onerror|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onpaint|onreset|onresize|onscroll|onselect|onsubmit|onunload)\b/g,"sh_predef_func",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.perl=[[[/\b(?:import)\b/g,"sh_preproc",-1],[/(s)(\{(?:\\\}|[^}])*\}\{(?:\\\}|[^}])*\})([ixsmogce]*)/g,["sh_keyword","sh_regexp","sh_keyword"],-1],[/(s)(\((?:\\\)|[^)])*\)\((?:\\\)|[^)])*\))([ixsmogce]*)/g,["sh_keyword","sh_regexp","sh_keyword"],-1],[/(s)(\[(?:\\\]|[^\]])*\]\[(?:\\\]|[^\]])*\])([ixsmogce]*)/g,["sh_keyword","sh_regexp","sh_keyword"],-1],[/(s)(<.*><.*>)([ixsmogce]*)/g,["sh_keyword","sh_regexp","sh_keyword"],-1],[/(q(?:q?))(\{(?:\\\}|[^}])*\})/g,["sh_keyword","sh_string"],-1],[/(q(?:q?))(\((?:\\\)|[^)])*\))/g,["sh_keyword","sh_string"],-1],[/(q(?:q?))(\[(?:\\\]|[^\]])*\])/g,["sh_keyword","sh_string"],-1],[/(q(?:q?))(<.*>)/g,["sh_keyword","sh_string"],-1],[/(q(?:q?))([^A-Za-z0-9 \t])(.*\2)/g,["sh_keyword","sh_string","sh_string"],-1],[/(s)([^A-Za-z0-9 \t])(.*\2.*\2)([ixsmogce]*(?=[ \t]*(?:\)|;)))/g,["sh_keyword","sh_regexp","sh_regexp","sh_keyword"],-1],[/(s)([^A-Za-z0-9 \t])(.*\2[ \t]*)([^A-Za-z0-9 \t])(.*\4)([ixsmogce]*(?=[ \t]*(?:\)|;)))/g,["sh_keyword","sh_regexp","sh_regexp","sh_regexp","sh_regexp","sh_keyword"],-1],[/#/g,"sh_comment",1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/(?:m|qr)(?=\{)/g,"sh_keyword",2],[/(?:m|qr)(?=#)/g,"sh_keyword",4],[/(?:m|qr)(?=\|)/g,"sh_keyword",6],[/(?:m|qr)(?=@)/g,"sh_keyword",8],[/(?:m|qr)(?=<)/g,"sh_keyword",10],[/(?:m|qr)(?=\[)/g,"sh_keyword",12],[/(?:m|qr)(?=\\)/g,"sh_keyword",14],[/(?:m|qr)(?=\/)/g,"sh_keyword",16],[/"/g,"sh_string",18],[/'/g,"sh_string",19],[/</g,"sh_string",20],[/\/[^\n]*\//g,"sh_string",-1],[/\b(?:chomp|chop|chr|crypt|hex|i|index|lc|lcfirst|length|oct|ord|pack|q|qq|reverse|rindex|sprintf|substr|tr|uc|ucfirst|m|s|g|qw|abs|atan2|cos|exp|hex|int|log|oct|rand|sin|sqrt|srand|my|local|our|delete|each|exists|keys|values|pack|read|syscall|sysread|syswrite|unpack|vec|undef|unless|return|length|grep|sort|caller|continue|dump|eval|exit|goto|last|next|redo|sub|wantarray|pop|push|shift|splice|unshift|split|switch|join|defined|foreach|last|chop|chomp|bless|dbmclose|dbmopen|ref|tie|tied|untie|while|next|map|eq|die|cmp|lc|uc|and|do|if|else|elsif|for|use|require|package|import|chdir|chmod|chown|chroot|fcntl|glob|ioctl|link|lstat|mkdir|open|opendir|readlink|rename|rmdir|stat|symlink|umask|unlink|utime|binmode|close|closedir|dbmclose|dbmopen|die|eof|fileno|flock|format|getc|print|printf|read|readdir|rewinddir|seek|seekdir|select|syscall|sysread|sysseek|syswrite|tell|telldir|truncate|warn|write|alarm|exec|fork|getpgrp|getppid|getpriority|kill|pipe|qx|setpgrp|setpriority|sleep|system|times|x|wait|waitpid)\b/g,"sh_keyword",-1],[/^\=(?:head1|head2|item)/g,"sh_comment",21],[/(?:\$[#]?|@|%)[\/A-Za-z0-9_]+/g,"sh_variable",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2]],[[/\{/g,"sh_regexp",3]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\\{|\\\}|\}/g,"sh_regexp",-3]],[[/#/g,"sh_regexp",5]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\#|#/g,"sh_regexp",-3]],[[/\|/g,"sh_regexp",7]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\\||\|/g,"sh_regexp",-3]],[[/@/g,"sh_regexp",9]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\@|@/g,"sh_regexp",-3]],[[/</g,"sh_regexp",11]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\<|\\>|>/g,"sh_regexp",-3]],[[/\[/g,"sh_regexp",13]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\]|\]/g,"sh_regexp",-3]],[[/\\/g,"sh_regexp",15]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\\\|\\/g,"sh_regexp",-3]],[[/\//g,"sh_regexp",17]],[[/[ \t]+#.*/g,"sh_comment",-1],[/\$(?:[A-Za-z0-9_]+|\{[A-Za-z0-9_]+\})/g,"sh_variable",-1],[/\\\/|\//g,"sh_regexp",-3]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|')/g,null,-1],[/'/g,"sh_string",-2]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/\=cut/g,"sh_comment",-2]]],this.sh_languages||(this.sh_languages={}),sh_languages.php=[[[/\b(?:include|include_once|require|require_once)\b/g,"sh_preproc",-1],[/\/\//g,"sh_comment",1],[/#/g,"sh_comment",1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",2],[/'/g,"sh_string",3],[/\b(?:and|or|xor|__FILE__|exception|php_user_filter|__LINE__|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|each|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|isset|list|new|old_function|print|return|static|switch|unset|use|var|while|__FUNCTION__|__CLASS__|__METHOD__)\b/g,"sh_keyword",-1],[/\/\/\//g,"sh_comment",4],[/\/\//g,"sh_comment",1],[/\/\*\*/g,"sh_comment",9],[/\/\*/g,"sh_comment",10],[/(?:\$[#]?|@|%)[A-Za-z0-9_]+/g,"sh_variable",-1],[/<\?php|~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/\\(?:\\|')/g,null,-1],[/'/g,"sh_string",-2]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",5,1],[/<!DOCTYPE/g,"sh_preproc",6,1],[/<!--/g,"sh_comment",7],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",8,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",8,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",7]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",5,1],[/<!DOCTYPE/g,"sh_preproc",6,1],[/<!--/g,"sh_comment",7],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",8,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",8,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.python=[[[/\b(?:import|from)\b/g,"sh_preproc",-1],[/#/g,"sh_comment",1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/\b(?:and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|global|if|in|is|lambda|not|or|pass|print|raise|return|try|while)\b/g,"sh_keyword",-1],[/^(?:[\s]*'{3})/g,"sh_comment",2],[/^(?:[\s]*\"{3})/g,"sh_comment",3],[/^(?:[\s]*'(?:[^\\']|\\.)*'[\s]*|[\s]*\"(?:[^\\\"]|\\.)*\"[\s]*)$/g,"sh_comment",-1],[/(?:[\s]*'{3})/g,"sh_string",4],[/(?:[\s]*\"{3})/g,"sh_string",5],[/"/g,"sh_string",6],[/'/g,"sh_string",7],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\||\{|\}/g,"sh_symbol",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2]],[[/(?:'{3})/g,"sh_comment",-2]],[[/(?:\"{3})/g,"sh_comment",-2]],[[/(?:'{3})/g,"sh_string",-2]],[[/(?:\"{3})/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|')/g,null,-1],[/'/g,"sh_string",-2]]],this.sh_languages||(this.sh_languages={}),sh_languages.ruby=[[[/\b(?:require)\b/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",1],[/'/g,"sh_string",2],[/</g,"sh_string",3],[/\/[^\n]*\//g,"sh_regexp",-1],[/(%r)(\{(?:\\\}|#\{[A-Za-z0-9]+\}|[^}])*\})/g,["sh_symbol","sh_regexp"],-1],[/\b(?:alias|begin|BEGIN|break|case|defined|do|else|elsif|end|END|ensure|for|if|in|include|loop|next|raise|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|false|nil|self|true|__FILE__|__LINE__|and|not|or|def|class|module|catch|fail|load|throw)\b/g,"sh_keyword",-1],[/(?:^\=begin)/g,"sh_comment",4],[/(?:\$[#]?|@@|@)(?:[A-Za-z0-9_]+|'|\"|\/)/g,"sh_type",-1],[/[A-Za-z0-9]+(?:\?|!)/g,"sh_normal",-1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/(#)(\{)/g,["sh_symbol","sh_cbracket"],-1],[/#/g,"sh_comment",5],[/\{|\}/g,"sh_cbracket",-1]],[[/$/g,null,-2],[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/$/g,null,-2],[/\\(?:\\|')/g,null,-1],[/'/g,"sh_string",-2]],[[/$/g,null,-2],[/>/g,"sh_string",-2]],[[/^(?:\=end)/g,"sh_comment",-2]],[[/$/g,null,-2]]],this.sh_languages||(this.sh_languages={}),sh_languages.sql=[[[/\b(?:VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\b/gi,"sh_type",-1],[/\b(?:ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT|BETWEEN|BINARY|BOTH|BY|BOOLEAN|CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE|DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT|ENCLOSED|ESCAPED|EXISTS|EXPLAIN|FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM|GROUP|GRANT|HAVING|IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF|JOIN|KEYS|KILL|KEY|LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE|MODIFY|NATURAL|NOT|NULL|NEXTVAL|OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON|PROCEDURE|PROCEDURAL|PRIMARY|READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT|SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET|TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED|UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW|WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\b/gi,"sh_keyword",-1],[/"/g,"sh_string",1],[/'/g,"sh_string",2],[/`/g,"sh_string",3],[/#/g,"sh_comment",4],[/\/\/\//g,"sh_comment",5],[/\/\//g,"sh_comment",4],[/\/\*\*/g,"sh_comment",11],[/\/\*/g,"sh_comment",12],[/--/g,"sh_comment",4],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/`/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/$/g,null,-2]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",6,1],[/<!DOCTYPE/g,"sh_preproc",8,1],[/<!--/g,"sh_comment",9],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",10,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",10,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",7]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",7]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",9]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",7]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",6,1],[/<!DOCTYPE/g,"sh_preproc",8,1],[/<!--/g,"sh_comment",9],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",10,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",10,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]]],this.sh_languages||(this.sh_languages={}),sh_languages.url=[[{regex:/(?:<?)[A-Za-z0-9_\.\/\-_]+@[A-Za-z0-9_\.\/\-_]+(?:>?)/g,style:"sh_url"},{regex:/(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_]+(?:>?)/g,style:"sh_url"}]],this.sh_languages||(this.sh_languages={}),sh_languages.xml=[[[/<\?xml/g,"sh_preproc",1,1],[/<!DOCTYPE/g,"sh_preproc",3,1],[/<!--/g,"sh_comment",4],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",5,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",4]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]]],function(){(function(e){return e.easyPieChart=function(t,n){var i,r,s,o,a,l,c,h=this;
|
||
return this.el=t,this.$el=e(t),this.$el.data("easyPieChart",this),this.init=function(){var t;return h.options=e.extend({},e.easyPieChart.defaultOptions,n),t=parseInt(h.$el.data("percent"),10),h.percentage=0,h.canvas=e("<canvas width='"+h.options.size+"' height='"+h.options.size+"'></canvas>").get(0),h.$el.append(h.canvas),"undefined"!=typeof G_vmlCanvasManager&&null!==G_vmlCanvasManager&&G_vmlCanvasManager.initElement(h.canvas),h.ctx=h.canvas.getContext("2d"),h.ctx.translate(h.options.size/2,h.options.size/2),h.$el.addClass("easyPieChart"),h.$el.css({width:h.options.size,height:h.options.size,lineHeight:""+h.options.size+"px"}),h.update(t),h},this.update=function(e){return h.options.animate===!1?s(e):r(h.percentage,e)},l=function(){var e,t,n;for(h.ctx.fillStyle=h.options.scaleColor,h.ctx.lineWidth=1,n=[],e=t=0;24>=t;e=++t)n.push(i(e));return n},i=function(e){var t;return t=0===e%6?0:.017*h.options.size,h.ctx.save(),h.ctx.rotate(e*Math.PI/12),h.ctx.fillRect(h.options.size/2-t,0,.05*-h.options.size+t,1),h.ctx.restore()},c=function(){var e;return e=h.options.size/2-h.options.lineWidth/2,h.options.scaleColor!==!1&&(e-=.08*h.options.size),h.ctx.beginPath(),h.ctx.arc(0,0,e,0,2*Math.PI,!0),h.ctx.closePath(),h.ctx.strokeStyle=h.options.trackColor,h.ctx.lineWidth=h.options.lineWidth,h.ctx.stroke()},a=function(){return h.options.scaleColor!==!1&&l(),h.options.trackColor!==!1?c():void 0},s=function(t){var n;return a(),h.ctx.strokeStyle=e.isFunction(h.options.barColor)?h.options.barColor(t):h.options.barColor,h.ctx.lineCap=h.options.lineCap,n=h.options.size/2-h.options.lineWidth/2,h.options.scaleColor!==!1&&(n-=.08*h.options.size),h.ctx.save(),h.ctx.rotate(-Math.PI/2),h.ctx.beginPath(),h.ctx.arc(0,0,n,0,2*Math.PI*t/100,!1),h.ctx.stroke(),h.ctx.restore()},r=function(e,t){var n,i,r;return i=30,r=i*h.options.animate/1e3,n=0,h.options.onStart.call(h),h.percentage=t,h.animation&&(clearInterval(h.animation),h.animation=!1),h.animation=setInterval(function(){return h.ctx.clearRect(-h.options.size/2,-h.options.size/2,h.options.size,h.options.size),a.call(h),s.call(h,[o(n,e,t-e,r)]),n++,n/r>1?(clearInterval(h.animation),h.animation=!1,h.options.onStop.call(h)):void 0},1e3/i)},o=function(e,t,n,i){return e/=i/2,1>e?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},this.init()},e.easyPieChart.defaultOptions={barColor:"#ef1e25",trackColor:"#f2f2f2",scaleColor:"#dfe0e0",lineCap:"round",size:110,lineWidth:3,animate:!1,onStart:e.noop,onStop:e.noop},e.fn.easyPieChart=function(t){return e.each(this,function(n,i){var r;return r=e(i),r.data("easyPieChart")?void 0:r.data("easyPieChart",new e.easyPieChart(i,t))})},void 0})(jQuery)}.call(this),$(document).ready(function(){rubyCodeFormat()}); |