diff --git a/assets/js/html2print.js b/assets/js/html2print.js new file mode 100644 index 0000000..018abc1 --- /dev/null +++ b/assets/js/html2print.js @@ -0,0 +1,10 @@ + +$(function() { + + // Cloning the master page + for (i = 1; i < nb_page; i++){ + $("#master-page").clone().attr("id","page-"+i).insertBefore($("#master-page")); + } + $("#master-page").attr("data-width", $(".paper:first-child").width()).hide(); + +}); diff --git a/assets/js/script.js b/assets/js/script.js new file mode 100644 index 0000000..c57a03c --- /dev/null +++ b/assets/js/script.js @@ -0,0 +1,68 @@ +jQuery(document).ready(function($) { + + console.log("Hello Les notices"); + + // $('.story-page').each(function(index, el) { + // $figures = $('figure', this); + // $(this).addClass("figures-"+$figures.length); + // }); + + $('.story-page-2 h2, .story-page:not(.story-page-0):not(.story-page-1):not(.story-page-2) h1').each(function(index, el) { + // console.log("item to typotize",$(this).text()); + var chars = $(this).text().split(""); + // console.log("chars", chars); + var typotized = ""; + var k = 0; + for (var j = 0; j < chars.length; j++) { + // console.log('node '+j+" modulo : "+(j % 6),chars[j]); + if(! /\s/.test(chars[j]) ){ + k++; + if ( k % 12 == 0){ + typotized += ''+chars[j]+''; + continue; + } + if ( k % 9 == 0){ + typotized += ''+chars[j]+''; + continue; + } + if ( k % 6 == 0){ + typotized += ''+chars[j]+''; + continue; + } + if ( k % 3 == 0){ + typotized += ''+chars[j]+''; + continue; + } + } + typotized += chars[j]; + } + $(this).html(typotized); + }); + +/* + // Detect if a flow element is in odd or even paper + + // var flow = document.webkitGetFlowByName('flow-main'); + // var flow = NamedFlowMap;//();//getFlowByName("flow-main"); + // console.log('flow', window); + var namedFlow = document.webkitGetNamedFlows()["flow-main"]; + console.log(namedFlow); + // var regions = namedFlow.getRegions(); + // var content = namedFlow.getContent(); + + setTimeout(function(){ + var region, paper, paperid; + $(".story-page>h1,.story-page>figure", "#flow-main").each(function(index, el) { + region = namedFlow.getRegionsByContent(this); + // paper = $(region).parents('.paper'); + paperid = $(region).parents('.paper').attr('id').match(/page-(\d+)/)[1]; + // console.log(paperid); + if(paperid % 2 == 0){ + $(this).addClass('paper-odd') + }else{ + $(this).addClass('paper-even') + } + }); + }, 1000); +*/ +}); diff --git a/assets/js/setup.js b/assets/js/setup.js new file mode 100644 index 0000000..6b31209 --- /dev/null +++ b/assets/js/setup.js @@ -0,0 +1 @@ +nb_page = 100; diff --git a/assets/lib/css-regions-polyfill.min.js b/assets/lib/css-regions-polyfill.min.js new file mode 100644 index 0000000..21a167a --- /dev/null +++ b/assets/lib/css-regions-polyfill.min.js @@ -0,0 +1,6 @@ +/*! CSS-REGIONS-POLYFILL - v3.0.0 - 2015-12-13 - https://github.com/FremyCompany/css-regions-polyfill - Copyright (c) 2015 François REMY; MIT-Licensed !*/ + +!function(){"use strict";var a={exports:{}},b=function(){var b={},c=function(a){return b[a]};return c.define=function(c){b[c]=a.exports,a.exports={}},c}();if(!function(a,b){a.console||(a.console={backlog:"",log:function(b){this.backlog+=b+"\n",a.debug&&alert(b)},dir:function(b){try{var c=function(a){return a.innerHTML?{tagName:a.tagName,className:a.className,id:a.id,innerHTML:a.innerHTML.substr(0,100)}:{nodeName:a.nodeName,nodeValue:a.nodeValue}},d=function(b){var d=[],e=JSON.stringify(b,function(b,e){if("object"==typeof e){if(!d.indexOf(e))return"__cycle__";if(e instanceof a.Node)return c(e);d.push(e)}return e});return e};this.log(d(b))}catch(e){this.log(b)}},warn:function(a){this.log(a)},error:function(a){this.log("ERROR:"),this.log(a)}},a.onerror||(a.onerror=function(){console.log([].slice.call(arguments,0).join("\n"))})),a.cssConsole={enabled:!!a.debug,warnEnabled:!0,log:function(a){this.enabled&&console.log(a)},dir:function(a){this.enabled&&console.dir(a)},warn:function(a){this.warnEnabled&&console.warn(a)},error:function(a){console.error(a)}}}(window,document),b.define("src/core/polyfill-dom-console.js"),a.exports=function(a,c){b("src/core/polyfill-dom-console.js");var d={cloneMouseEvent:function(a){var b=c.createEvent("MouseEvent");return b.initMouseEvent(a.type,a.canBubble||a.bubbles,a.cancelable,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget),b},cloneKeyboardEvent:function(a){return d.cloneCustomEvent(a)},cloneCustomEvent:function(a){var b=c.createEvent("CustomEvent");b.initCustomEvent(a.type,a.canBubble||a.bubbles,a.cancelable,"detail"in a?a.detail:a);for(var d in a)try{if(a[d]!=b[d]&&a[d]!=a.target)try{b[d]=a[d]}catch(e){Object.defineProperty(b,d,{get:function(){return a[d]}})}}catch(e){}return b},cloneEvent:function(a){return a instanceof MouseEvent?d.cloneMouseEvent(a):a instanceof KeyboardEvent?d.cloneKeyboardEvent(a):d.cloneCustomEvent(a)},EventTarget:{implementsIn:function(a,b){b||"function"!=typeof a||(a=a.prototype),a.dispatchEvent=d.EventTarget.prototype.dispatchEvent,a.addEventListener=d.EventTarget.prototype.addEventListener,a.removeEventListener=d.EventTarget.prototype.removeEventListener},prototype:{}}};return d.EventTarget.prototype.addEventListener=function(a,b){this.eventListeners||(this.eventListeners=[]);var c=this.eventListeners[a]||(this.eventListeners[a]=[]);-1==c.indexOf(b)&&c.push(b)},d.EventTarget.prototype.removeEventListener=function(a,b){this.eventListeners||(this.eventListeners=[]);var c,d=this.eventListeners[a]||(this.eventListeners[a]=[]);-1!==(c=d.indexOf(b))&&d.splice(c,1)},d.EventTarget.prototype.dispatchEvent=function(a){function b(a,b,c){Object.defineProperty(b,c,{get:function(){var b=a[c];return"function"==typeof b?b.bind(a):b},set:function(b){a[c]=b}})}function d(a,c){try{Object.defineProperty(a,"target",{get:function(){return c}})}catch(e){}finally{if(a.target!==c){var f=Object.create(Object.getPrototypeOf(a));f=d(f,c);for(key in a)"target"!=key&&b(a,f,key);return f}return a}}if(this.eventListeners||(this.eventListeners=[]),"string"==typeof a){if(!this.eventListeners[a]||0==this.eventListeners[a].length)return}else if(!this.eventListeners[a.type]||0==this.eventListeners[a.type].length)return;var e=a;if("object"==typeof e)try{e=d(e,this)}catch(f){}else{if("string"!=typeof e)throw new Error("dispatchEvent expect an Event object or a string containing the event type");e=c.createEvent("CustomEvent"),e.initCustomEvent(a,!0,!1,this);try{e=d(e,this)}catch(f){}}for(var g=this.eventListeners[e.type]||(this.eventListeners[e.type]=[]),h=g.length;h--;)try{g[h](e)}catch(f){setImmediate(function(){throw f})}return e.isDefaultPrevented},d}(window,document),b.define("src/core/dom-events.js"),a.exports=function(a,b){function c(){var a=[];return a.toCSSString=d,a}function d(a){return a?this.map(function(a){return a.toCSSString()}).join(a):this.asCSSString||(this.asCSSString=this.map(function(a){return a.toCSSString()}).join("/**/").replace(/( +\/\*\*\/ *| * | *\/\*\*\/ +)/g," ").replace(/( +\/\*\*\/ *| * | *\/\*\*\/ +)/g," ").replace(/(\!|\:|\;|\@|\.|\,|\*|\=|\&|\\|\/|\<|\>|\[|\{|\(|\]|\}|\)|\|)\/\*\*\//g,"$1").replace(/\/\*\*\/(\!|\:|\;|\@|\.|\,|\*|\=|\&|\\|\/|\<|\>|\[|\{|\(|\]|\}|\)|\|)/g,"$1"))}function e(a,b,c){return a>=b&&c>=a}function f(a){return e(a,48,57)}function g(a){return f(a)||e(a,65,70)||e(a,97,102)}function h(a){return e(a,65,90)}function i(a){return e(a,97,122)}function j(a){return h(a)||i(a)}function k(a){return a>=128}function l(a){return j(a)||k(a)||95==a}function m(a){return l(a)||f(a)||45==a}function n(a){return e(a,0,8)||11==a||e(a,14,31)||127==a}function o(a){return 10==a}function p(a){return o(a)||9==a||32==a}function q(a){this.message=a}function r(a){for(var b=[],c=0;c=a)return String.fromCharCode(a);a-=Math.pow(2,21);var b=Math.floor(a/Math.pow(2,10))+55296,c=a%Math.pow(2,10);return String.fromCharCode(b)+String.fromCharCode(c)}function t(a){a=r(a);for(var b,d=-1,e=new c,h=0,i=0,j=0,k=function(){h+=1,j=i,i=0},q={line:h,column:i},t=function(b){return b>=a.length?-1:a[b]},u=function(a){if(void 0===a&&(a=1),a>3)throw"Spec Error: no more than three codepoints of lookahead.";return t(d+a)},D=function(a){return void 0===a&&(a=1),d+=a,b=t(d),o(b)?k():i+=a,!0},S=function(){return d-=1,o(b)?(h-=1,i=j):i-=1,q.line=h,q.column=i,!0},aa=function(a){return void 0===a&&(a=b),-1==a},ba=function(){},ca=function(){return console.log("Parse error at index "+d+", processing codepoint 0x"+b.toString(16)+"."),!0},da=function(){if(ea(),D(),p(b)){for(;p(u());)D();return new x}if(34==b)return ha();if(35==b){if(m(u())||ka(u(1),u(2))){var a=new W;return ma(u(1),u(2),u(3))&&(a.type="id"),a.value=qa(),a}return new R(b)}return 36==b?61==u()?(D(),new N):new R(b):39==b?ha():40==b?new I:41==b?new J:42==b?61==u()?(D(),new O):new R(b):43==b?pa()?(S(),fa()):new R(b):44==b?new C:45==b?pa()?(S(),fa()):45==u(1)&&62==u(2)?(D(2),new z):na()?(S(),ga()):new R(b):46==b?pa()?(S(),fa()):new R(b):58==b?new A:59==b?new B:60==b?33==u(1)&&45==u(2)&&45==u(3)?(D(3),new y):new R(b):64==b?ma(u(1),u(2),u(3))?new V(qa()):new R(b):91==b?new G:92==b?la()?(S(),ga()):(ca(),new R(b)):93==b?new H:94==b?61==u()?(D(),new M):new R(b):123==b?new E:124==b?61==u()?(D(),new L):124==u()?(D(),new P):new R(b):125==b?new F:126==b?61==u()?(D(),new K):new R(b):f(b)?(S(),fa()):l(b)?(S(),ga()):aa()?new Q:new R(b)},ea=function(){for(;47==u(1)&&42==u(2);)for(D(2);;){if(D(),42==b&&47==u()){D();break}if(aa())return void ca()}},fa=function(){var a=ra();if(ma(u(1),u(2),u(3))){var b=new _;return b.value=a.value,b.repr=a.repr,b.type=a.type,b.unit=qa(),b}if(37==u()){D();var b=new $;return b.value=a.value,b.repr=a.repr,b}var b=new Z;return b.value=a.value,b.repr=a.repr,b.type=a.type,b},ga=function(){var a=qa();if("url"==a.toLowerCase()&&40==u()){for(D();p(u(1))&&p(u(2));)D();return 34==u()||39==u()?new U(a):!p(u())||34!=u(2)&&39!=u(2)?ia():new U(a)}return 40==u()?(D(),new U(a)):new T(a)},ha=function(a){void 0===a&&(a=b);for(var c="";D();){if(b==a||aa())return new X(c);if(o(b))return ca(),S(),new v;92==b?aa(u())?ba():o(u())?D():c+=s(ja()):c+=s(b)}},ia=function(){for(var a=new Y("");p(u());)D();if(aa(u()))return a;for(;D();){if(41==b||aa())return a;if(p(b)){for(;p(u());)D();return 41==u()||aa(u())?(D(),a):(ta(),new w)}if(34==b||39==b||40==b||n(b))return ca(),ta(),new w;if(92==b){if(!la())return ca(),ta(),new w;a.value+=s(ja())}else a.value+=s(b)}},ja=function(){if(D(),g(b)){for(var a=[b],c=0;5>c&&g(u());c++)D(),a.push(b);p(u())&&D();var d=parseInt(a.map(function(a){return String.fromCharCode(a)}).join(""),16);return d>Ga&&(d=65533),d}return aa()?65533:b},ka=function(a,b){return 92!=a?!1:o(b)?!1:!0},la=function(){return ka(b,u())},ma=function(a,b,c){return 45==a?l(b)||45==b||ka(b,c):l(a)?!0:92==a?ka(a,b):!1},na=function(){return ma(b,u(1),u(2))},oa=function(a,b,c){return 43==a||45==a?f(b)?!0:46==b&&f(c)?!0:!1:46==a?f(b)?!0:!1:f(a)?!0:!1},pa=function(){return oa(b,u(1),u(2))},qa=function(){for(var a="";D();)if(m(b))a+=s(b);else{if(!la())return S(),a;a+=s(ja())}},ra=function(){var a="",c="integer";for((43==u()||45==u())&&(D(),a+=s(b));f(u());)D(),a+=s(b);if(46==u(1)&&f(u(2)))for(D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b);var d=u(1),e=u(2),g=u(3);if(69!=d&&101!=d||!f(e)){if((69==d||101==d)&&(43==e||45==e)&&f(g))for(D(),a+=s(b),D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b)}else for(D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b);var h=sa(a);return{type:c,value:h,repr:a}},sa=function(a){return+a},ta=function(){for(;D();){if(45==b||aa())return;la()?(ja(),ba()):ba()}},ua=0;!aa(u());)if(e.push(da()),ua++>2*a.length)throw new Error("The CSS Tokenizer is infinite-looping");return e}function u(){return this}function v(){return this}function w(){return this}function x(){return this}function y(){return this}function z(){return this}function A(){return this}function B(){return this}function C(){return this}function D(){return this}function E(){return this.value="{",this.mirror="}",this}function F(){return this.value="}",this.mirror="{",this}function G(){return this.value="[",this.mirror="]",this}function H(){return this.value="]",this.mirror="[",this}function I(){return this.value="(",this.mirror=")",this}function J(){return this.value=")",this.mirror="(",this}function K(){return this}function L(){return this}function M(){return this}function N(){return this}function O(){return this}function P(){return this}function Q(){return this}function R(a){return this.value=s(a),this}function S(){return this}function T(a){this.value=a}function U(a){this.value=a,this.mirror=")"}function V(a){this.value=a}function W(a){this.value=a,this.type="unrestricted"}function X(a){this.value=a}function Y(a){this.value=a}function Z(){this.value=null,this.type="integer",this.repr=""}function $(){this.value=null,this.repr=""}function _(){this.value=null,this.type="integer",this.repr="",this.unit=""}function aa(a){a=""+a;for(var b="",c=a.charCodeAt(0),d=0;d=128||45==f||95==f||e(f,48,57)||e(f,65,90)||e(f,97,122)?a[d]:"\\"+a[d]}return b}function ba(a){a=""+a;for(var b="",c=(a.charCodeAt(0),0);c=128||45==d||95==d||e(d,48,57)||e(d,65,90)||e(d,97,122)?a[c]:"\\"+d.toString(16)+" "}return b}function ca(a){a=""+a;for(var b="",c=0;c=0;d--)if(!(b.value[d]instanceof x)){if(!(b.value[d]instanceof T&&b.value[d].ASCIIMatch("important"))){if(c&&b.value[d]instanceof R&&"!"==b.value[d].value){b.value.splice(d,b.value.length),b.important=!0;break}break}c=!0}return b}function la(a){return a.consume(),a.token instanceof E||a.token instanceof G||a.token instanceof I?ma(a):a.token instanceof U?na(a):a.token}function ma(a){for(var b=a.token.mirror,c=new Ca(a.token.value);a.consume();){if(a.token instanceof Q||a.token instanceof D&&a.token.value==b)return c;a.reconsume(),c.value.push(la(a))}}function na(a){for(var b=new Da(a.token.value);a.consume();){if(a.token instanceof Q||a.token instanceof J)return b;a.reconsume(),b.value.push(la(a))}}function oa(a){if("string"==typeof a)return new da(t(a));if(a instanceof da)return a;if(void 0!==a.length)return new da(a);throw SyntaxError(a)}function pa(a){a=oa(a);var b=new ya;return b.value=ga(a,"top-level"),b}function qa(a){return a=oa(a),ga(a)}function ra(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(a.next()instanceof Q)throw SyntaxError();if(a.next()instanceof V)var b=ha(a);else{var b=ia(a);if(!b)throw SyntaxError()}for(;a.next()instanceof x;)a.consume();if(a.next()instanceof Q)return b;throw SyntaxError()}function sa(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(!(a.next()instanceof T))throw SyntaxError();var b=ka(a);if(!b)throw new SyntaxError;return b}function ta(a){return a=oa(a),ja(a)}function ua(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(a.next()instanceof Q)throw SyntaxError();var b=la(a);if(!b)throw SyntaxError();for(;a.next()instanceof x;)a.consume();if(!(a.next()instanceof Q))throw new SyntaxError;return b}function va(a){a=oa(a);for(var b=new c;;){var d=la(a);if(d instanceof Q)return b;b.push(d)}}function wa(a){a=oa(a);for(var b=new c;;)for(var d=new c;;){var e=la(a);if(e instanceof Q)return b.push(d),b;if(e instanceof C){b.push(d);break}d.push(e)}}function xa(){return this}function ya(){return this.value=new c,this}function za(a){return this.name=a,this.prelude=new c,this.value=null,this}function Aa(){return this.prelude=new c,this.selector=this.prelude,this.value=null,this}function Ba(a){return this.name=a,this.value=new c,this.important=!1,this}function Ca(a){return this.name=a,this.value=new c,this}function Da(a){return this.name=a,this.value=new c,this}function Ea(){return this.value=new c,this}var Fa={tokenize:function(a){},parse:function(a){}};Fa.TokenList=c,Fa.TokenListToCSSString=d;var Ga=1114111;return q.prototype=new Error,q.prototype.name="InvalidCharacterError",u.prototype.toJSON=function(){return{token:this.tokenType}},u.prototype.toString=function(){return this.tokenType},u.prototype.toCSSString=function(){return""+this},v.prototype=new u,v.prototype.tokenType="BADSTRING",v.prototype.toCSSString=function(){return"'"},w.prototype=new u,w.prototype.tokenType="BADURL",w.prototype.toCSSString=function(){return"url("},x.prototype=new u,x.prototype.tokenType="WHITESPACE",x.prototype.toString=function(){return"WS"},x.prototype.toCSSString=function(){return" "},y.prototype=new u,y.prototype.tokenType="CDO",y.prototype.toCSSString=function(){return""},A.prototype=new u,A.prototype.tokenType=":",B.prototype=new u,B.prototype.tokenType=";",C.prototype=new u,C.prototype.tokenType=",",C.prototype.value=";",D.prototype=new u,E.prototype=new D,E.prototype.tokenType="{",F.prototype=new D,F.prototype.tokenType="}",G.prototype=new D,G.prototype.tokenType="[",H.prototype=new D,H.prototype.tokenType="]",I.prototype=new D,I.prototype.tokenType="(",J.prototype=new D,J.prototype.tokenType=")",K.prototype=new u,K.prototype.tokenType="~=",L.prototype=new u,L.prototype.tokenType="|=",M.prototype=new u,M.prototype.tokenType="^=",N.prototype=new u,N.prototype.tokenType="$=",O.prototype=new u,O.prototype.tokenType="*=",P.prototype=new u,P.prototype.tokenType="||",Q.prototype=new u,Q.prototype.tokenType="EOF",Q.prototype.toCSSString=function(){return""},R.prototype=new u,R.prototype.tokenType="DELIM",R.prototype.toString=function(){return"DELIM("+this.value+")"},R.prototype.toCSSString=function(){return"\\"==this.value?"\\\n":this.value},S.prototype=new u,S.prototype.ASCIIMatch=function(a){return this.value.toLowerCase()==a.toLowerCase()},T.prototype=new S,T.prototype.tokenType="IDENT",T.prototype.toString=function(){return"IDENT("+this.value+")"},T.prototype.toCSSString=function(){return aa(this.value)},U.prototype=new S,U.prototype.tokenType="FUNCTION",U.prototype.toString=function(){return"FUNCTION("+this.value+")"},U.prototype.toCSSString=function(){return aa(this.value)+"("},V.prototype=new S,V.prototype.tokenType="AT-KEYWORD",V.prototype.toString=function(){return"AT("+this.value+")"},V.prototype.toCSSString=function(){return"@"+aa(this.value)},W.prototype=new S,W.prototype.tokenType="HASH",W.prototype.toString=function(){return"HASH("+this.value+")"},W.prototype.toCSSString=function(){var a="id"==this.type?aa:ba;return"#"+a(this.value)},X.prototype=new S,X.prototype.tokenType="STRING",X.prototype.toString=function(){return'"'+ca(this.value)+'"'},Y.prototype=new S,Y.prototype.tokenType="URL",Y.prototype.toString=function(){return"URL("+this.value+")"},Y.prototype.toCSSString=function(){return'url("'+ca(this.value)+'")'},Z.prototype=new u,Z.prototype.tokenType="NUMBER",Z.prototype.toString=function(){return"integer"==this.type?"INT("+this.value+")":"NUMBER("+this.value+")"},Z.prototype.toJSON=function(){var a=this.constructor.prototype.constructor.prototype.toJSON.call(this);return a.value=this.value,a.type=this.type,a.repr=this.repr,a},Z.prototype.toCSSString=function(){return this.repr},$.prototype=new u,$.prototype.tokenType="PERCENTAGE",$.prototype.toString=function(){return"PERCENTAGE("+this.value+")"},$.prototype.toCSSString=function(){return this.repr+"%"},_.prototype=new u,_.prototype.tokenType="DIMENSION",_.prototype.toString=function(){return"DIM("+this.value+","+this.unit+")"},_.prototype.toCSSString=function(){var a=this.repr,b=aa(this.unit);return"e"!=b[0].toLowerCase()||"-"!=b[1]&&!e(b.charCodeAt(1),48,57)||(b="\\65 "+b.slice(1,b.length)),a+b},Fa.tokenize=t,Fa.IdentToken=T,Fa.IdentifierToken=T,Fa.FunctionToken=U,Fa.AtKeywordToken=V,Fa.HashToken=W,Fa.StringToken=X,Fa.BadStringToken=v,Fa.URLToken=Y,Fa.BadURLToken=w,Fa.DelimToken=R,Fa.NumberToken=Z,Fa.PercentageToken=$,Fa.DimensionToken=_,Fa.IncludeMatchToken=K,Fa.DashMatchToken=L,Fa.PrefixMatchToken=M,Fa.SuffixMatchToken=N,Fa.SubstringMatchToken=O,Fa.ColumnToken=P,Fa.WhitespaceToken=x,Fa.CDOToken=y,Fa.CDCToken=z,Fa.ColonToken=A,Fa.SemicolonToken=B,Fa.CommaToken=C,Fa.OpenParenToken=I,Fa.CloseParenToken=J,Fa.OpenSquareToken=G,Fa.CloseSquareToken=H,Fa.OpenCurlyToken=E,Fa.CloseCurlyToken=F,Fa.EOFToken=Q,Fa.CSSParserToken=u,Fa.GroupingToken=D,da.prototype.tokenAt=function(a){return a0||b.length>0)&&a.push(b),a},Ea.prototype=new xa,Ea.prototype.type="FUNCTION-ARG",Ea.prototype.toCSSString=function(){return this.value.toCSSString()+", "},Fa.CSSParserRule=xa,Fa.Stylesheet=ya,Fa.AtRule=za,Fa.StyleRule=Aa,Fa.Declaration=Ba,Fa.SimpleBlock=Ca,Fa.Func=Da,Fa.parseAStylesheet=pa,Fa.parseAListOfRules=qa,Fa.parseARule=ra,Fa.parseADeclaration=sa,Fa.parseAListOfDeclarations=ta,Fa.parseAComponentValue=ua,Fa.parseAListOfComponentValues=va,Fa.parseACommaSeparatedListOfComponentValues=wa,Fa.parse=pa,Fa.parseCSSValue=va,Fa}(),b.define("src/core/css-syntax.js"),void function(){for(var a=["webkit","moz","ms","o"],b=0;b=0&&a255&&(numberOfIds=255),c>255&&(c=255),e>255&&(e=255),256*(256*b+c)+e},findAllMatchingRules:function(a){return this.findAllMatchingRulesWithPseudo(a)},findAllMatchingRulesWithPseudo:function(a,b){b=b?(""+b).toLowerCase():b;for(var c=[],e=function(f){try{for(var h=f.length;h--;){var i=f[h];if(!i.disabled)if(i instanceof d.StyleRule)for(var j=i.subRules||g.splitRule(i),k=j.length;k--;){var l=j[k].selector.toCSSString().replace(/ *(\/\*\*\/| ) */g," ").trim();if(b){var m=l.toLowerCase(),n=l.length-b.length-1;if(0>=n)continue;if(m.lastIndexOf("::"+b)==n-1)l=l.substr(0,n-1);else{if(m.lastIndexOf(":"+b)!=n)continue;l=l.substr(0,n)}0==l.trim().length?l="*":" "==l[l.length-1]?l+="*":"+"==l[l.length-1]?l+="*":">"==l[l.length-1]?l+="*":"~"==l[l.length-1]&&(l+="*")}var o=!1;try{if(a.matches)o=a.matches(l);else if(a.matchesSelector)o=a.matchesSelector(l);else if(a.oMatchesSelector)o=a.oMatchesSelector(l);else if(a.msMatchesSelector)o=a.msMatchesSelector(l);else if(a.mozMatchesSelector)o=a.mozMatchesSelector(l);else{if(!a.webkitMatchesSelector)throw new Error("no element.matches?");o=a.webkitMatchesSelector(l)}}catch(p){setImmediate(function(){throw p})}o&&c.push(j[k])}else i instanceof d.AtRule&&"media"==i.name&&e(i.toStylesheet().value)}}catch(p){setImmediate(function(){throw p})}},f=g.stylesheets.length;f--;){var h=g.stylesheets[f];e(h)}return c},allCSSProperties:null,getAllCSSProperties:function(){if(this.allCSSProperties)return this.allCSSProperties;for(var a=getComputedStyle(c.documentElement),b=new Array(a.length),d=a.length;d--;)b[d]=a[d];return-1==b.indexOf("content")&&b.push("content"),-1==b.indexOf("counter-reset")&&(b.push("counter-reset"),b.push("counter-increment"),g.computationUnsafeProperties["counter-reset"]=!0),this.allCSSProperties=b},computationUnsafeProperties:{bottom:!0,direction:!0,display:!0,"font-size":!0,height:!0,left:!0,"line-height":!0,"margin-left":!0,"margin-right":!0,"margin-bottom":!0,"margin-top":!0,"max-height":!0,"max-width":!0,"min-height":!0,"min-width":!0,"padding-left":!0,"padding-right":!0,"padding-bottom":!0,"padding-top":!0,right:!0,"text-align":!0,"text-align-last":!0,top:!0,width:!0,__proto__:null},inheritingProperties:{"border-collapse":!0,"border-spacing":!0,"caption-side":!0,color:!0,cursor:!0,direction:!0,"empty-cells":!0,"font-family":!0,"font-size":!0,"font-style":!0,"font-variant":!0,"font-weight":!0,font:!0,"letter-spacing":!0,"line-height":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,"list-style":!0,orphans:!0,quotes:!0,"text-align":!0,"text-indent":!0,"text-transform":!0,visibility:!0,"white-space":!0,widows:!0,"word-break":!0,"word-spacing":!0,"word-wrap":!0,__proto__:null},defaultStylesForTag:Object.create?Object.create(null):{},getDefaultStyleForTag:function(a){ +var b=this.defaultStylesForTag[a];if(b)return b;var d=c.createElement(a),e=this.defaultStylesForTag[a]=getComputedStyle(d);return e.display?e:(c.head.insertBefore(d,c.head.firstChild),e)},getSpecifiedStyle:function(b,e,f){var h;if((h=b.getAttribute("data-css-regions-fragment-of"))&&(h=c.querySelector('[data-css-regions-fragment-source="'+h+'"]')))return g.getSpecifiedStyle(h,e);if(b.currentStyle&&!a.opera){var i=b.myStyle[e]||b.currentStyle[e]||"";return d.parseAListOfComponentValues(i)}try{if(i=b.style.getPropertyValue(e)||b.myStyle[e])return d.parseAListOfComponentValues(i)}catch(j){}var k=!1,l=0,i=new d.TokenList,m=f||(e in g.monitoredProperties?b.myMatchedRules||[]:g.findAllMatchingRules(b)),n=function(a){for(var b=a.length;b--;)if(!a[b].disabled)if(a[b]instanceof d.StyleRule){for(var c=a[b].getDeclarations(),f=c.length-1;f>=0;f--)if("DECLARATION"==c[f].type&&c[f].name==e){var h=g.computeSelectorPriorityOf(a[b].selector);k?c[f].important&&h>=l&&(l=h,i=c[f].value):c[f].important?(k=!0,l=h,i=c[f].value):h>=l&&(l=h,i=c[f].value)}}else a[b]instanceof d.AtRule&&"media"==a[b].name&&n(a[b].toStylesheet())};return n(m),i||null},stylesheets:[],loadStyleSheet:function(a,b){var c=d.parse(a).value;"undefined"!=typeof b?g.stylesheets[b]=c:b=g.stylesheets.push(c),g.startMonitoringStylesheet(c)},loadStyleSheetTag:function(a,b){if(!a.hasAttribute("data-css-polyfilled")){if("LINK"==a.tagName)try{g.stylesheets[b]=new d.TokenList;var c=new XMLHttpRequest;c.href=a.href,c.open("GET",a.href,!0),c.ruleIndex=b,c.onreadystatechange=function(){4==this.readyState&&(200==this.status||0==this.status?g.loadStyleSheet(this.responseText,this.ruleIndex):cssConsole.log("css-cascade polyfill failled to load: "+this.href))},c.send()}catch(e){cssConsole.log("css-cascade polyfill failled to load: "+a.href)}else g.loadStyleSheet(a.textContent,b);a.setAttribute("data-css-polyfilled",!0)}},selectorForStylesheets:"style:not([data-no-css-polyfill]):not([data-css-polyfilled]), link[rel=stylesheet]:not([data-no-css-polyfill]):not([data-css-polyfilled])",loadAllStyleSheets:function(){var a=c.head||c.documentElement,b=a.querySelectorAll(g.selectorForStylesheets),d=this.stylesheets.length;this.stylesheets.length+=b.length;for(var e=b.length;e--;){var f=b[e];g.loadStyleSheetTag(f,d+e)}},monitoredProperties:Object.create?Object.create(null):{},monitoredPropertiesHandler:{onupdate:function(a,b){for(var c=g.monitoredProperties,d=b.getDeclarations(),e=d.length-1;e>=0;e--)if("DECLARATION"==d[e].type&&d[e].name in c){for(var f=c[d[e].name],h=f.length;h--;)f[h].onupdate(a,b);break}}},startMonitoringProperties:function(a,b){for(var c=a.length;c--;){var d=a[c],e=g.monitoredProperties[d]||(g.monitoredProperties[d]=[]);e.push(b)}for(var f=0;f=0;f--)if("DECLARATION"==e[f].type&&e[f].name in g.monitoredProperties){g.startMonitoringRule(b[c]);break}}else b[c]instanceof d.AtRule&&"media"==b[c].name&&a.matchMedia&&g.startMonitoringMedia(b[c])},startMonitoringMedia:function(b){try{var c=a.matchMedia(b.prelude.toCSSString()),d=b.toStylesheet().value;g.updateMedia(d,!c.matches,!1),c.addListener(function(a){g.updateMedia(d,!a.matches,!0)}),g.startMonitoringStylesheet(d)}catch(e){setImmediate(function(){throw e})}},updateMedia:function(a,b,d){for(var e=a.length;e--;){a[e].disabled=b;var f=a[e].subRules;if(f)for(var h=f.length;h--;)f[h].disabled=b}if(d)for(var e=a.length;e--;)for(var i=c.querySelectorAll(a[e].selector.toCSSString()),h=i.length;h--;)g.monitoredPropertiesHandler.onupdate(i[h],a[e])},splitRule:function(a){var b=[],c=new d.StyleRule;c.disabled=a.disabled;for(var e=0;e0?c.toCSSString():""}},set:function(b){this.clip=void 0===this.clip?"":this.clip;try{if(!this.parentElement)throw new Error("Please use the anHTMLElement.myStyle property to set polyfilled properties")}catch(c){return void setImmediate(function(){throw c})}this.parentElement.getAttribute("data-style-"+a)!=b&&this.parentElement.setAttribute("data-style-"+a,b)}},e=[];try{e.push(Object.getPrototypeOf(c.documentElement.style)||CSSStyleDeclaration)}catch(f){}for(var h=e.length;h--;){var i=e[h];Object.defineProperty(i,a,b),Object.defineProperty(i,g.toCamelCase(a),b)}g.startMonitoringRule(d.parse('[style*="'+a+'"]{'+a+":attr(style)}").value[0]),g.startMonitoringRule(d.parse("[data-style-"+a+"]{"+a+":attr(style)}").value[0]),g.getAllCSSProperties().push(a),g.computationUnsafeProperties[a]=!0}};return e.EventTarget.implementsIn(g),Object.defineProperty(Element.prototype,"myStyle",{get:function(){var a=this.style;return a.parentElement||(a.parentElement=this),a}}),"no_auto_stylesheet_detection"in a||(g.loadAllStyleSheets(),c.addEventListener("DOMContentLoaded",function(){g.loadAllStyleSheets(),f(g.selectorForStylesheets,{onadded:function(a){g.loadStyleSheetTag(a),g.dispatchEvent("stylesheetadded")}})})),g}(window,document),b.define("src/core/css-cascade.js"),a.exports=function(a,c){var d=(b("src/core/css-syntax.js"),b("src/core/css-cascade.js")),e={isReplacedElement:function(a){if(!(a instanceof Element))return!1;var b=/^(SVG|MATH|IMG|VIDEO|PICTURE|OBJECT|EMBED|IFRAME|TEXTAREA|BUTTON|INPUT)$/;return b.test(a.tagName)},isScrollable:function(a,b){return a instanceof Element?("undefined"==typeof b&&(b=getComputedStyle(a).overflow),"visible"!==b&&"hidden"!==b):!1},isSingleLineOfTextComponent:function(a,b,c,d,e){return a instanceof Element?("undefined"==typeof b&&(b=getComputedStyle(a)),"undefined"==typeof c&&(c=b.display),"undefined"==typeof d&&(d=b.position),"undefined"==typeof e&&(e=this.isReplacedElement(a)),!("inline-block"!==c&&"inline-table"!==c&&"inline-flex"!==c&&"inline-grid"!==c||"static"!==d&&"relative"!==d)):!0},hasAnyInlineFlow:function(a){function b(a){return a instanceof Element?!e.isOutOfFlowElement(a)&&e.isSingleLineOfTextComponent(a):!/^\s*$/.test(a.nodeValue)}for(var c=a.firstChild;c;){if(b(c))return!0;c=c.nextSibling}return!1},isLineBreakingElement:function(a,b,c,d){return a instanceof Element?("undefined"==typeof b&&(b=getComputedStyle(a)),"undefined"==typeof c&&(c=b.display),"undefined"==typeof d&&(d=b.position),"block"===c&&!this.isOutOfFlowElement(a,b,c,d)||"BR"===a.tagName&&"none"!==c):!1},isLinePreBreakingElement:function(a,b,c,f){if(!(a instanceof Element))return!1;var g=d.getSpecifiedStyle(a,"break-before").toCSSString();return"region"==g||"all"==g||e.isLineBreakingElement(a,b,c,f)},isLinePostBreakingElement:function(a,b,c,f){if(!(a instanceof Element))return!1;var g=d.getSpecifiedStyle(a,"break-after").toCSSString();return"region"==g||"all"==g||e.isLineBreakingElement(a,b,c,f)},isOutOfFlowElement:function(a,b,c,d,e){return a instanceof Element?("undefined"==typeof b&&(b=getComputedStyle(a)),"undefined"==typeof c&&(c=b.display),"undefined"==typeof d&&(d=b.position),"undefined"==typeof e&&(e=b["float"]||b.styleFloat||b.cssFloat),"absolute"===d||"fixed"===d||"none"!==e||"none"===c):!1},areInSameSingleLine:function(a,b){function c(a,b,c){return{top:a.top+c,bottom:a.bottom+c,left:a.left+b,right:a.right+b}}if(a.nextSibling!=b){if(b.nextSibling!=a)throw"I gave up!";var d=a;a=b,b=d}if(this.isLinePostBreakingElement(a))return!1;if(this.isLinePreBreakingElement(b))return!1;if(this.isOutOfFlowElement(a))return!0;if(!this.isSingleLineOfTextComponent(a))return!1;var e=Node.getBoundingClientRect(a),f=Node.getBoundingClientRect(b);if(a instanceof Element){var g=getComputedStyle(a);e=c(e,parseFloat(g.marginLeft),parseFloat(g.marginTop)),"relative"==g.position&&(e=c(e,parseFloat(g.left),parseFloat(g.top)))}if(b instanceof Element){var h=getComputedStyle(b);f=c(f,parseFloat(h.marginLeft),parseFloat(h.marginTop)),"relative"==h.position&&(f=c(f,parseFloat(h.left),parseFloat(h.top)))}var i="rtl"==getComputedStyle(a.parentNode).direction?f:e,j="rtl"==getComputedStyle(a.parentNode).direction?e:f;return i.right<=j.left},isHiddenOverflowing:function(a,b){return a instanceof Element?("undefined"==typeof b&&(b=getComputedStyle(a).display),"hidden"==b&&a.offsetHeight!=a.scrollHeight):!1},hasBigRadius:function(a,b){if(!(a instanceof Element))return!1;if("undefined"==typeof b&&(b=getComputedStyle(a)),"borderTopLeftRadius"in b){var c=parseFloat(b.borderTopLeftRadius),d=parseFloat(b.borderTopRightRadius),e=parseFloat(b.borderBottomLeftRadius),f=parseFloat(b.borderBottomRightRadius);if(15>c&&15>d&&15>e&&15>f)return!1;var g=parseFloat(b.borderTopWidth),h=parseFloat(b.borderBottomWidth),i=parseFloat(b.borderLeftWidth),j=parseFloat(b.borderRightWidth);if(c>g)return!0;if(c>i)return!0;if(d>g)return!0;if(d>j)return!0;if(e>h)return!0;if(e>i)return!0;if(f>h)return!0;if(f>j)return!0}return!1},isBreakInsideAvoid:function(a,b){var c=d.getSpecifiedStyle(a,"break-inside",void 0,!0).toCSSString().trim().toLowerCase();return"avoid"==c||"avoid-region"==c},isMonolithic:function(a){if(!(a instanceof Element))return!1;var b=getComputedStyle(a),c=b.overflow,d=b.display,e=this.isReplacedElement(a),f=this.isScrollable(a,c),g=this.isSingleLineOfTextComponent(a,b,d,void 0,e),h=this.isHiddenOverflowing(a,c),i=this.hasBigRadius(a,b),j=this.isBreakInsideAvoid(a,b);return e||f||g||h||i||j},isPossibleBreakPoint:function(a,b){if(!(a instanceof Range))return!1;if(!a.collapsed)return!1;for(var c=a.startContainer;c&&c!==b;){if(e.isMonolithic(c))return!1;c=c.parentNode}for(var c=a.startContainer,d=a.startContainer.childNodes[a.startOffset];c&&d!==b;){if(d&&d.previousSibling&&this.areInSameSingleLine(d,d.previousSibling))return!1;d=c,c=c.parentNode}if(0==a.startOffset){var f=a.startContainer.childNodes[0];if(!f)return!1;var g=Node.getBoundingClientRect(f),h=a.startContainer.getBoundingClientRect();if(g.top==h.top)return!1}return!0}};return e}(window,document),b.define("src/core/css-break.js"),!document.caretRangeFromPoint)if(document.caretPositionFromPoint)document.caretRangeFromPoint=function(a,b){var c=document.createRange(),d=document.caretPositionFromPoint(a,b);return d.offsetNode&&(c.setStart(d.offsetNode,d.offset),c.setEnd(d.offsetNode,d.offset)),c};else if((document.body||document.createElement("body")).createTextRange){var c={convertToDOMRange:function(a,b){var c=function(a,c,d){var e=b.createElement("a"),f=c.duplicate();f.collapse(d);var g=f.parentElement();do g.insertBefore(e,e.previousSibling),f.moveToElementText(e);while(f.compareEndPoints(d?"StartToStart":"StartToEnd",c)>0&&e.previousSibling);-1==f.compareEndPoints(d?"StartToStart":"StartToEnd",c)&&e.nextSibling?(f.setEndPoint(d?"EndToStart":"EndToEnd",c),a[d?"setStart":"setEnd"](e.nextSibling,f.text.length)):a[d?"setStartBefore":"setEndBefore"](e),e.parentNode.removeChild(e)};b||(b=window.document);var d=b.createRange();return c(d,a,!0),c(d,a,!1),d},convertFromDOMRange:function(a){var b=function(a,b,c){var d=b[c?"startContainer":"endContainer"],e=b[c?"startOffset":"endOffset"],f=0,g=DOMUtils.isDataNode(d)?d:d.childNodes[e],h=DOMUtils.isDataNode(d)?d.parentNode:d;(3==d.nodeType||4==d.nodeType)&&(f=e);var i=b._document.createElement("a");h.insertBefore(i,g);var j=b._document.body.createTextRange();j.moveToElementText(i),i.parentNode.removeChild(i),a.setEndPoint(c?"StartToStart":"EndToStart",j),a[c?"moveStart":"moveEnd"]("character",f)},c=a._document.body.createTextRange();return b(c,a,!0),b(c,a,!1),c}};document.caretRangeFromPoint=function(a,b){for(var d=40,e=document.body.createTextRange(),f=d;f;f-=4){var g=a;try{return e.moveToPoint(g,f+b-d),c.convertToDOMRange(e)}catch(h){}}try{var i=document.elementFromPoint(a-1,b-1),e=document.createRange();return e.setStartAfter(i),e}catch(h){return null}}}Range.prototype.myMoveOneCharLeft=function(){var a=this;if(a.endOffset>0){var b=a.endContainer.childNodes[a.endOffset-1];b&&b.lastChild?a.setEndAfter(b.lastChild):b&&b.nodeType==b.TEXT_NODE?a.setEnd(b,b.nodeValue.length):a.setEnd(a.endContainer,a.endOffset-1)}else a.setEndBefore(a.endContainer)},Range.prototype.myMoveOneCharRight=function(){var a=this,b=a.startContainer.nodeType==a.startContainer.TEXT_NODE?a.startContainer.nodeValue.length:a.startContainer.childNodes.length;if(a.startOffsetf&&/^\w$/.test(g);)g=e[f++];a.setStart(a.startContainer,f)}else a.setStart(a.startContainer,a.startOffset+1)}else a.setStartAfter(a.endContainer);a.setEnd(a.startContainer,a.startOffset)},Range.prototype.myMoveEndOneCharLeft=function(){var a=this;if(a.endOffset>0){var b=a.endContainer.childNodes[a.endOffset-1];b&&b.lastChild?a.setEndAfter(b.lastChild):b&&b.nodeType==b.TEXT_NODE?a.setEnd(b,b.nodeValue.length):a.setEnd(a.endContainer,a.endOffset-1)}else a.setEndBefore(a.endContainer)},Range.prototype.myMoveEndOneCharRight=function(){var a=this,b=a.endContainer.nodeType==a.endContainer.TEXT_NODE?a.endContainer.nodeValue.length:a.endContainer.childNodes.length;if(a.endOffset0||navigator.userAgent.indexOf("Trident")>0)&&-1==f.listOfTextNodesForIE.indexOf(a)&&f.listOfTextNodesForIE.push(a));break;case 1:if(a.hasAttribute("data-css-regions-cloning")&&(a.removeAttribute("data-css-regions-cloning"),a.setAttribute("data-css-regions-cloned",!0),a.currentStyle&&a.currentStyle.display.toString()),"undefined"==typeof c)return;case 9:case 11:for(d=a.firstChild;d;)e=d.nextSibling,b(d),d=e}}a.forEach(b)},unhideTextNodesFromFragmentSource:function(a){function b(a){var c,d;switch(a.nodeType){case 3:"cssRegionsSavedNodeValue"in a&&(a.nodeValue=a.cssRegionsSavedNodeValue,delete a.cssRegionsSavedNodeValue);break;case 1:if("undefined"==typeof k)return;case 9:case 11:for(c=a.firstChild;c;)d=c.nextSibling,b(c),c=d}}a.forEach(b)},unmarkNodesAsFragmentSource:function(a){function b(a,c){var d,e;switch(a.nodeType){case 3:"cssRegionsSavedNodeValue"in a&&(a.nodeValue=a.cssRegionsSavedNodeValue,delete a.cssRegionsSavedNodeValue);break;case 1:a.removeAttribute("data-css-regions-cloned"),a.removeAttribute("data-css-regions-fragment-source"),a.currentStyle&&a.currentStyle.display.toString(),"OL"==a.tagName&&f.unexpandListValues(a),"undefined"!=typeof c&&"LI"==a.tagName&&f.unexpandListValues(a.parentNode);case 9:case 11:for(d=a.firstChild;d;)e=d.nextSibling,b(d),d=e}}a.forEach(b)},transformFragmentSourceToFragments:function(a){function b(a){var c,d;switch(a.nodeType){case 1:var e=a.getAttribute("data-css-regions-fragment-source");a.removeAttribute("data-css-regions-fragment-source"),a.removeAttribute("data-css-regions-cloning"),a.removeAttribute("data-css-regions-cloned"),a.setAttribute("data-css-regions-fragment-of",e),a.id&&(a.id+="--fragment");case 9:case 11:for(c=a.firstChild;c;)d=c.nextSibling,b(c),c=d}}a.forEach(b)},embedTrailingWhiteSpaceNodes:function(a){function b(a){var d,e;switch(a.nodeType){case 3:if(!a.previousSibling){"pre"!==getComputedStyle(a.parentNode).whiteSpace.substring(0,3)&&c.test(a.nodeValue)&&(a.parentNode.setAttribute("data-whitespace-before",a.nodeValue),a.parentNode.removeChild(a));break}if(!a.nextSibling){"pre"!==getComputedStyle(a.parentNode).whiteSpace.substring(0,3)&&c.test(a.nodeValue)&&(a.parentNode.setAttribute("data-whitespace-after",a.nodeValue),a.parentNode.removeChild(a));break}break;case 1:case 9:case 11:for(d=a.firstChild;d;)e=d.nextSibling,b(d),d=e}}var c=/^\s*$/;b(a)},unembedTrailingWhiteSpaceNodes:function(a){function b(a){var d,e;switch(a.nodeType){case 1:var f="";(f=a.getAttribute("data-whitespace-before"))&&""==a.getAttribute("data-starting-fragment")&&a.getAttribute("data-special-starting-fragment","")&&a.insertBefore(c.createTextNode(f),a.firstChild),a.removeAttribute("data-whitespace-before"),(f=a.getAttribute("data-whitespace-after"))&&""==a.getAttribute("data-continued-fragment")&&a.getAttribute("data-special-continued-fragment","")&&a.insertAfter(c.createTextNode(f),a.lastChild),a.removeAttribute("data-whitespace-after");case 9:case 11:for(d=a.firstChild;d;)e=d.nextSibling,b(d),d=e}}b(a)},copyStyle:function(b,d){function g(b,d,h){var i,j,k,l;switch(b.nodeType){case 1:for(var m=b.currentStyle&&!a.opera?void 0:e.findAllMatchingRules(b),n=e.allCSSProperties||e.getAllCSSProperties(),o=n.length;o--;)if(n[o]in e.computationUnsafeProperties||"-"==n[o][0]){var p=e.getSpecifiedStyle(b,n[o],m);if(p&&p.length)d.style.setProperty(n[o],p.toCSSString());else if(h&&b.parentNode&&"-"!=n[o][0]){if(!(n[o]in e.inheritingProperties))continue;if("font-size"==n[o]||!(n[o]in e.computationUnsafeProperties)&&"-"!=n[o][0]){var q=getComputedStyle(b).getPropertyValue(n[o]);d.style.setProperty(n[o],q);continue}var p=e.getSpecifiedStyle(b,n[o],m);p&&p.length&&d.style.setProperty(n[o],p.toCSSString())}}else{var q=getComputedStyle(b).getPropertyValue(n[o]),r=e.getDefaultStyleForTag(b.tagName).getPropertyValue(n[o]);q!=r&&d.style.setProperty(n[o],q)}var s=function(a,b,d){var f=!!e.findAllMatchingRulesWithPseudo(a,d.substr(1)).length;if(f){var g=getComputedStyle(a,d);if("none"!=g.content){var h=c.createElement("style");h.setAttribute("data-no-css-polyfill",!0);for(var i="",j=e.allCSSProperties||e.getAllCSSProperties(),k=j.length;k--;){var l=g.getPropertyValue(j[k]);i+=j[k]+":"+l+";"}h.textContent='[data-css-regions-fragment-of="'+a.getAttribute("data-css-regions-fragment-source")+'"]:not([data-css-regions-starting-fragment]):not([data-css-regions-special-starting-fragment]):'+d+"{"+i+"}",b.parentNode.insertBefore(h,b)}}};s(b,d,":before"),s(b,d,":after"),f.retargetEvents(b,d);case 9:case 11:for(i=b.firstChild,k=d.firstChild;i;)j=i.nextSibling,l=k.nextSibling,i.cssRegionsLastFlowIntoName&&"element"===i.cssRegionsLastFlowIntoType?d.removeChild(k):g(i,k),i=j,k=l}}g(b,d,!0)},retargetEvents:function(a,b){var c="cssRegionsHelpers.retargetEvent(this,event)";b.setAttribute("onclick",c),b.setAttribute("ondblclick",c),b.setAttribute("onmousedown",c),b.setAttribute("onmouseup",c),b.setAttribute("onmousein",c),b.setAttribute("onmouseout",c),b.setAttribute("onmouseenter",c),b.setAttribute("onmouseleave",c)},retargetEvent:function(a,b){var e=a.cssRegionsFragmentSource||(a.cssRegionsFragmentSource=c.querySelector('[data-css-regions-fragment-source="'+a.getAttribute("data-css-regions-fragment-of")+'"]'));if(e){var f=d.cloneEvent(b);if(e.dispatchEvent(f),b.stopImmediatePropagation?b.stopImmediatePropagation():b.stopPropagation(),f.isDefaultPrevented||f.defaultPrevented)return b.preventDefault(),!1}}});return f}(window,document),b.define("src/css-regions/lib/helpers.js"),a.exports=function(a,c,d){var e=b("src/core/dom-events.js"),f=(b("src/core/css-syntax.js"),b("src/core/css-cascade.js")),g=(b("src/core/css-break.js"),b("src/css-regions/lib/helpers.js")),h=b("src/core/dom-experimental-event-streams.js");d.Flow=function(a){this.name=a,Object.defineProperty(this,"name",{get:function(){return a}}),this.overset=!1,this.firstEmptyRegionIndex=-1,this.content=[],this.lastContent=[],this.regions=[],this.lastRegions=[],this.eventListeners={regionfragmentchange:[],regionoversetchange:[]};var b=this;b.update=function(a){a.schedule(b.update),b.relayout()},b.lastStylesheetAdded=0,f.addEventListener("stylesheetadded",function(){b.lastStylesheetAdded-Date()>100?(b.lastStylesheetAdded=+Date(),b.relayout()):cssConsole.warn("Please don't add stylesheets as a response to region events. Operation cancelled.")}),b.failedLayoutCount=0,b.lastEventRAF=0,b.restartLayout=!1},d.Flow.prototype.removeFromContent=function(a){this.removeEventListenersOf(a);var b=this.content.indexOf(a);b>=0&&this.content.splice(b,1)},d.Flow.prototype.removeFromRegions=function(a){this.removeEventListenersOf(a);var b=this.regions.indexOf(a);b>=0&&this.regions.splice(b,1)},d.Flow.prototype.addToContent=function(a){var b=this.content,d=c.createTreeWalker(c.documentElement,NodeFilter.SHOW_ELEMENT,function(a){return b.indexOf(a)>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);d.currentNode=a,d.nextNode()?b.splice(b.indexOf(d.currentNode),0,a):b.push(a)},d.Flow.prototype.addToRegions=function(a){var b=this.regions,d=c.createTreeWalker(c.documentElement,NodeFilter.SHOW_ELEMENT,function(a){return b.indexOf(a)>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);d.currentNode=a,d.nextNode()?b.splice(this.regions.indexOf(d.currentNode),0,a):b.push(a)},d.Flow.prototype.generateContentFragment=function(){for(var a=c.createDocumentFragment(),b=0;b0&&!e.restartLayout){var g=!1;g=g||e.regions.some(function(a){return!c.documentElement.contains(a)}),g=g||e.content.some(function(a){return!c.documentElement.contains(a)}),g?(cssConsole.warn("Buggy css regions layout: the page changed; we need to restart."),e.restartLayout=!0):e.lastEventRAF=requestAnimationFrame(function(){e.dispatchEvent("regionfragmentchange"),e.dispatchEvent("regionoversetchange")})}c.documentElement.scrollTop=f,c.body.scrollTop=h,e.relayoutInProgress=!1,e.failedLayoutCount=0,e.restartLayout&&(e.restartLayout=!1,e.relayout())}})}catch(k){setImmediate(function(){throw k}),e.failedLayoutCount++,e.failedLayoutCount<7?requestAnimationFrame(function(){e._relayout()}):(e.failedLayoutCount=0,e.relayoutScheduled=!1,e.relayoutInProgress=!1,e.restartLayout=!1)}},d.Flow.prototype.relayoutIfSizeChanged=function(){for(var a=this.regions,b=a.length;b--;)if(a[b].offsetHeight!==a[b].cssRegionsLastOffsetHeight||a[b].offsetWidth!==a[b].cssRegionsLastOffsetWidth)return void this.relayout()},d.Flow.prototype.addEventListenersTo=function(a){var b=this;a instanceof Element&&(a=[a]),a.forEach(function(a){a.cssRegionsEventStream||(a.cssRegionsEventStream=new h.DOMUpdateEventStream({target:a}),a.cssRegionsEventStream.schedule(b.update))})},d.Flow.prototype.removeEventListenersOf=function(a){a instanceof Element&&(a=[a]),a.forEach(function(a){a.cssRegionsEventStream&&(a.cssRegionsEventStream.dispose(),delete a.cssRegionsEventStream)})},d.NamedFlow=d.Flow,d.NamedFlow.prototype.getContent=function(){return this.content.slice(0)},d.NamedFlow.prototype.getRegions=function(){return this.regions.slice(0)},d.NamedFlow.prototype.getRegionsByContent=function(a){for(var b=[],d=c.querySelectorAll('[data-css-regions-fragment-of="'+a.getAttribute("data-css-regions-fragment-source")+'"]'),e=0;e*,[data-css-regions-fragment-source]:not([data-css-regions-cloning]),[data-css-regions-fragment-source][data-css-regions-cloned]{display:none!important}[data-css-region]>cssregion:last-of-type{display:inline!important}[data-css-region]{content:normal!important}[data-css-special-continued-fragment]{counter-reset:none!important;counter-increment:none!important;margin-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}[data-css-continued-fragment]{counter-reset:none!important;counter-increment:none!important;margin-bottom:0!important;padding-bottom:0!important;border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}[data-css-continued-fragment]::after{content:none!important;display:none!important}[data-css-special-starting-fragment]{text-indent:0!important;margin-top:0!important}[data-css-starting-fragment]{text-indent:0!important;margin-top:0!important;padding-top:0!important;border-top:none!important;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-css-starting-fragment]::before{content:none!important;display:none!important}[data-css-continued-block-fragment][data-css-continued-fragment]:not(:empty)::after{content:''!important;display:inline-block!important;width:100%!important;height:0!important;font-size:0!important;line-height:0!important;margin:0!important;padding:0!important;border:0!important}",j={layoutContent:function(a,b,c,d){if(!a)return c.ondone(!!b.hasChildNodes());if(!a.length)return c.ondone(!!b.hasChildNodes());d||(d=Date.now());for(var e=a.pop();;){var f=getComputedStyle(e).display;if("none"==f||-1!==f.indexOf("inline")){if(e=a.pop())continue;return c.ondone(!!b.hasChildNodes())}break}if(e.cssRegionsWrapper?(e.cssRegionsWrapper.cssRegionHost=e,e=e.cssRegionsWrapper):e.cssRegionHost=e,e.innerHTML="",!b.hasChildNodes()){e.cssRegionHost.cssRegionsLastOffsetHeight=e.cssRegionHost.offsetHeight,e.cssRegionHost.cssRegionsLastOffsetWidth=e.cssRegionHost.offsetWidth,e.cssRegionHost.regionOverset="empty";var g={ondone:function(){},onprogress:function(a){a()}};return j.layoutContent(a,b,g,d),c.ondone(!1)}return e.appendChild(b),0!==a.length?this.layoutContentInNextRegionsWhenReady(e,a,b,c,d):this.layoutContentInLastRegionWhenReady(e,a,b,c,d)},layoutContentInNextRegionsWhenReady:function(a,b,d,f,g){for(var h=a.getElementsByTagName("img"),i=h.length;i--;)if(!h[i].complete&&!h[i].hasAttribute("height"))return setTimeout(function(){this.layoutContentInNextRegionsWhenReady(a,b,d,f,g+32)}.bind(this),16);var k=a.cssRegionHost.scrollHeight!=a.cssRegionHost.offsetHeight,l=k;if(!l)for(var m=a.firstElementChild,n=a.lastElementChild,o=m;o;){if(o!=m&&/(region|all|always)/i.test(e.getSpecifiedStyle(o,"break-before",void 0,!0).toCSSString())){l=!0;break}if(o!=n&&/(region|all|always)/i.test(e.getSpecifiedStyle(o,"break-after",void 0,!0).toCSSString())){o=o.nextElementSibling,l=!0;break}o=o.nextElementSibling}return d=l?this.extractOverflowingContent(a):c.createDocumentFragment(),d.hasChildNodes()?a.cssRegionHost.regionOverset="overset":a.cssRegionHost.regionOverset="fit",a.cssRegionHost.cssRegionsLastOffsetHeight=a.cssRegionHost.offsetHeight,a.cssRegionHost.cssRegionsLastOffsetWidth=a.cssRegionHost.offsetWidth,g+200>Date.now()?j.layoutContent(b,d,f,g):f.onprogress(function(){j.layoutContent(b,d,f)})},layoutContentInLastRegionWhenReady:function(a,b,c,d,f){for(var g=a.getElementsByTagName("img"),h=g.length;h--;)if(!g[h].complete&&!g[h].hasAttribute("height"))return setTimeout(function(){this.layoutContentInLastRegionWhenReady(a,b,c,d,f+32)}.bind(this),32);if("break"==e.getSpecifiedStyle(a.cssRegionHost,"region-fragment",void 0,!0).toCSSString().trim().toLowerCase()){var i=this.extractOverflowingContent(a).hasChildNodes();return a.cssRegionHost.cssRegionsLastOffsetHeight=a.cssRegionHost.offsetHeight,a.cssRegionHost.cssRegionsLastOffsetWidth=a.cssRegionHost.offsetWidth,d.ondone(i)}return a.cssRegionHost.cssRegionsLastOffsetHeight=a.cssRegionHost.offsetHeight,a.cssRegionHost.cssRegionsLastOffsetWidth=a.cssRegionHost.offsetWidth,d.ondone(a.cssRegionHost.offsetHeight!=a.cssRegionHost.scrollHeight)},extractOverflowingContent:function(a,b){g.embedTrailingWhiteSpaceNodes(a);var d=a.cssRegionHost.offsetHeight,h=a.cssRegionHost.offsetWidth,i=a.cssRegionHost.getBoundingClientRect();i={top:i.top,bottom:i.bottom,left:i.left,right:i.right};var j=parseInt(getComputedStyle(a.cssRegionHost).paddingBottom);j+=parseInt(getComputedStyle(a.cssRegionHost).borderBottomWidth),i.bottom-=j,d-=j;try{var k=b?c.createRange():c.caretRangeFromPoint(i.left+h-1,i.top+d-1)}catch(l){try{cssConsole.error(l.message),cssConsole.dir(l)}catch(l){}}var m=function(){},n=function(){if(0==o.bottom&&0==o.top&&0==o.left&&0==o.right){var a=-(c.documentElement.scrollTop||c.body.scrollTop),b=-(c.documentElement.scrollLeft||c.body.scrollLeft);o={width:0,heigth:0,top:a,bottom:a,left:b,right:b}}};(!k||a!==k.endContainer&&!Node.contains(a,k.endContainer))&&(k&&k.endContainer===a.cssRegionHost&&k.endOffset==k.endContainer.childNodes.length?(k.setStart(a,a.childNodes.length),k.setEnd(a,a.childNodes.length)):(k=k||c.createRange(),k.setStart(a,0),k.setEnd(a,0),b=!0));do{var o=k.myGetExtensionRect();for(n(),m();(k.endContainer!=a||k.endOffset!=k.endContainer.childNodes.length)&&o.bottom<=i.top+d;){m();var p=k.endContainer.childNodes[k.endOffset],q=!p||Node.getBoundingClientRect(p);p&&q.bottom<=i.top+d?(k.setStartAfter(p),k.setEndAfter(p),o=q,n()):(k.myMoveTowardRight(),o=k.myGetExtensionRect(),n())}for(;(k.endContainer!=a||0!=k.endOffset)&&o.bottom>i.top+d;)m(),k.myMoveOneCharLeft(),o=k.myGetExtensionRect(),n();m();var r=!1;if(!b)for(var s=k.endContainer;s=g.getAllLevelPreviousSibling(s,a);)if(Node.getBoundingClientRect(s).bottom>i.top+d){k.setStart(a,0),k.setEnd(a,0),r=!0,b=!0;break}}while(r);for(var s=k.endContainer;s!==a;)f.isMonolithic(s)&&k.setEndBefore(s),s=s.parentNode;(!k||a!==k.endContainer&&!Node.contains(a,k.endContainer))&&(cssConsole.dir(k.cloneRange()),k.setStart(a,a.childNodes.length),k.setEnd(a,a.childNodes.length));var t=k.startContainer.childNodes[k.startOffset],s=t;if(f.hasAnyInlineFlow(k.startContainer))for(;s&&(s=s.previousSibling)&&f.areInSameSingleLine(s,t);)if(t=s,s instanceof Element)k.setEndBefore(s);else{var u=Node.getClientRects(s);if(u.length>1){var v=u[u.length-2].bottom;for(k.setEnd(s,s.nodeValue.length);o.bottom>v;)k.myMoveOneCharLeft(),o=k.myGetExtensionRect(),n();k.endContainer!==s&&k.setEndBefore(s)}else k.setEndBefore(s)}if((!k||a!==k.endContainer&&!Node.contains(a,k.endContainer))&&(cssConsole.dir(k.cloneRange()),k.setStart(a,a.childNodes.length),k.setEnd(a,a.childNodes.length)),k.endContainer===a&&0===k.endOffset&&k.endOffset!==a.childNodes.length)do{k.myMoveTowardRight();for(var s=k.endContainer;s&&s!==a;)f.isMonolithic(s)&&(k.setStartAfter(s),k.setEndAfter(s)),s=s.parentNode}while(!f.isPossibleBreakPoint(k,a)&&(k.endContainer!==a||k.endOffset!==a.childNodes.length));(!k||a!==k.endContainer&&!Node.contains(a,k.endContainer))&&(cssConsole.dir(k.cloneRange()),k.setStart(a,a.childNodes.length),k.setEnd(a,a.childNodes.length));var s=k.endContainer;s.hasChildNodes()&&k.endOffset>0&&(s=s.childNodes[k.endOffset-1]);var t=k.endContainer.firstChild;do s.style&&(s!=t&&/(region|all|always)/i.test(e.getSpecifiedStyle(s,"break-before",void 0,!0).toCSSString())&&(k.setStartBefore(s),k.setEndBefore(s),b=!0),s!==a&&/(region|all|always)/i.test(e.getSpecifiedStyle(s,"break-after",void 0,!0).toCSSString())&&(k.setStartAfter(s),k.setEndAfter(s),b=!0));while(s=g.getAllLevelPreviousSibling(s,a));var s=k.endContainer,w=[];for(s.nodeType!==s.ELEMENT_NODE&&(s=s.parentNode);s!==a;)w.push(s),s=s.parentNode;if(k.endOffset==k.endContainer.childNodes.length&&k.endContainer!==a){var x=k.endContainer.getBoundingClientRect(),y=x.bottom-(i.top+d),z=getComputedStyle(k.endContainer),A=parseFloat(z.borderBottomWidth),B=parseFloat(z.paddingBottom),C=y;if(y>A){C=A,y-=C;var D=y;D>B?(D=B,y-=D):y=0}else y=0;if("number"==typeof C&&0!==C){var E=parseInt(z.borderBottomLeftRadius)>0||parseInt(z.borderBottomRightRadius)>0;E&&(C=A)}}if(0==k.endOffset&&k.endContainer!==a){var x=k.endContainer.getBoundingClientRect(),F=i.top+d-i.top,z=getComputedStyle(k.endContainer),A=parseFloat(z.borderTopWidth),B=parseFloat(z.paddingTop),y=A+B-F;if(y>0){var G=y;if(y>B){G=B,y-=G;var H=y;H>A?(H=A,y-=H):y=0}else y=0}}for(var I=w.length-1;I>=0;I--)w[I].setAttribute("data-css-continued-fragment",!0),getComputedStyle(w[I]).display.indexOf("block")>=0&&w[I].setAttribute("data-css-continued-block-fragment",!0);"number"==typeof C&&(w[0].removeAttribute("data-css-continued-fragment"),w[0].setAttribute("data-css-special-continued-fragment",!0),w[0].style.borderBottomWidth=A-C+"px"),"number"==typeof D&&(w[0].removeAttribute("data-css-continued-fragment"),w[0].setAttribute("data-css-special-continued-fragment",!0),w[0].style.paddingBottom=B-D+"px"),"number"==typeof H&&(w[0].removeAttribute("data-css-continued-fragment"),w[0].setAttribute("data-css-continued-fragment",!0),w[0].style.borderTopWidth=A-H+"px"),"number"==typeof G&&(w[0].removeAttribute("data-css-continued-fragment"),w[0].setAttribute("data-css-special-continued-fragment",!0),w[0].style.paddingTop=B-G+"px"),k.setEnd(a,a.childNodes.length);var J=k.extractContents(),K=w[0];if(K&&(K=K.lastChild)&&!K.tagName&&K.nodeValue){var L=K.nodeValue.replace(/(\s|\r|\n)*$/,"");L?(/\u00AD$/.test(L)&&(L=L.replace(/\u00AD$/,"-")),K.nodeValue=L):K.parentNode.removeChild(K)}for(var M=J.querySelectorAll("[data-css-continued-fragment]"),I=M.length;I--;)M[I].removeAttribute("data-css-continued-fragment"),M[I].setAttribute("data-css-starting-fragment",!0);var N=J.querySelector("[data-css-special-continued-fragment]");if(N)N.removeAttribute("data-css-special-continued-fragment"),N.setAttribute("data-css-starting-fragment",!0),"number"==typeof C&&(N.style.borderBottomWidth=C+"px"),"number"==typeof D?N.style.paddingBottom=D:N.style.paddingBottom="0px","number"==typeof H&&(N.removeAttribute("data-css-starting-fragment"),N.setAttribute("data-css-special-starting-fragment",!0),N.style.borderTopWidth=H+"px"),"number"==typeof G&&(N.removeAttribute("data-css-starting-fragment"),N.setAttribute("data-css-special-starting-fragment",!0),N.style.paddingTop=G+"px",N.style.paddingBottom="0px",N.style.borderBottomWidth="0px");else if("number"==typeof C)try{throw new Error}catch(l){setImmediate(function(){throw l})}else if("number"==typeof G)try{throw new Error}catch(l){setImmediate(function(){throw l})}return g.unembedTrailingWhiteSpaceNodes(a),g.unembedTrailingWhiteSpaceNodes(J),J},enablePolyfill:function(){var b=c.createElement("style");b.setAttribute("data-css-no-polyfill",!0),b.textContent=i;var f=c.head||c.getElementsByTagName("head")[0];f.appendChild(b),e.startMonitoringProperties(["flow-into","flow-from","region-fragment"],{onupdate:function(a,b){if(!a.getAttributeNode("data-css-regions-fragment-of")){cssConsole.dir({message:"onupdate",element:a,selector:b.selector.toCSSString(),rule:b});var c=e.getSpecifiedStyle(a,"flow-into").filter(function(a){return a instanceof d.IdentifierToken}),f=c[0]?c[0].toCSSString().toLowerCase():"";("none"==f||"initial"==f||"inherit"==f||"default"==f)&&(f="");var g=c[1]?c[1].toCSSString().toLowerCase():"";"content"!=g&&(g="element");var c=f?f+" "+g:"",h=e.getSpecifiedStyle(a,"flow-from").filter(function(a){return a instanceof d.IdentifierToken}),i=h[0]?h[0].toCSSString().toLowerCase():"";("none"==i||"initial"==i||"inherit"==i||"default"==i)&&(i="");var h=i;if(a.cssRegionsLastFlowInto!=c||a.cssRegionsLastFlowFrom!=h){var k=a.regionOverset,l=j.flows[a.cssRegionsLastFlowFromName],m=j.flows[a.cssRegionsLastFlowIntoName];if(l&&l.removeFromRegions(a),m&&m.removeFromContent(a),l&&"empty"!=k&&l.relayout(),m&&m.relayout(),a.cssRegionsLastFlowInto=c,a.cssRegionsLastFlowFrom=h,a.cssRegionsLastFlowIntoName=f,a.cssRegionsLastFlowFromName=i,a.cssRegionsLastFlowIntoType=g,i){var l=j.flows[i]=j.flows[i]||new j.Flow(i);l&&l.addToRegions(a),l&&l.relayout()}if(f){var m=j.flows[f]=j.flows[f]||new j.Flow(f);m&&m.addToContent(a),m&&m.relayout()}}}}}),e.startMonitoringProperties(["break-before","break-after"],{onupdate:function(a){if(!a.getAttribute("data-css-regions-fragment-of"))for(;a;){if(a.cssRegionsLastFlowIntoName)return void j.flows[a.cssRegionsLastFlowIntoName].relayout();a=a.parentNode}}}),j.enablePolyfillObjectModel(),a.addEventListener("load",function(){for(var a=c.getNamedFlows(),b=0;bg||(a[b].relayoutInProgress?a[b].relayout():a[b].relayoutIfSizeChanged())},k=function(){for(var a=c.getNamedFlows(),b=0;bg)&&a[b].relayoutInProgress)return!0;return!1},l=function(){for(var a=c.getNamedFlows(),b=0;bg||a[b].relayoutInProgress&&a[b].relayout()};a.addEventListener("resize",function(){g=+new Date,h.timeout||(k()?(setTimeout(l,16),h.timeout=setTimeout(h,500)):h.timeout=setTimeout(h,200))})},flows:Object.create?Object.create(null):{}};return h(a,c,j),j}(window,document),b.define("src/css-regions/polyfill.js"),b("src/css-regions/polyfill.js"),b.define("src/requirements.js"),window.cssPolyfills={require:b}}(); +//# sourceMappingURL=css-regions-polyfill.min.js.map \ No newline at end of file diff --git a/assets/lib/jquery.min.js b/assets/lib/jquery.min.js new file mode 100644 index 0000000..fad9ab1 --- /dev/null +++ b/assets/lib/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("