scribble-mathjax/MathJax.js
2010-11-13 12:38:42 -06:00

44 lines
32 KiB
JavaScript

/*************************************************************
*
* MathJax.js
*
* The main code for the MathJax math-typesetting library. See
* http://www.mathjax.org/ for details.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2010 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
if (!window.MathJax) {window.MathJax = {}}
MathJax.Unpack = function (data) {
var k, d, n, m, i;
for (k = 0, m = data.length; k < m; k++) {
d = data[k];
for (i = 0, n = d.length; i < n; i++)
{if (typeof(d[i]) == 'number') {d[i] = d[d[i]]}}
data[k] = d.join('');
}
eval(data.join(''));
};
MathJax.isPacked = true;
MathJax.Unpack([
['if(','document.','getElementById','&&',1,'childNodes&&',1,'createElement','){','if(!','window.MathJax','){',10,'={}}',9,'MathJax.Hub','){MathJax.version="1.0.7";(','function(','d){','var b=','window[d];if(!','b){b','=window[d]={}}var ','f','=[];','var c=',17,'g','){var h=','g.','constructor',';if(!','h){h=','new Function','("")}','for(var ','i in g){if(i!=="',30,'"&&g','.hasOwnProperty','(i)){h[i]=g[i]}}','return ','h};var a=','function(){',41,33,'("',41,'arguments','.callee','.Init','.call(this,',48,')")};var e=a();e','.prototype','={bug_test:1};',9,'e',54,'.bug_test){a=',43,41,43,41,48,49,50,51,48,')}}}b.','Object','=c({',30,':a(),Subclass:',17,'g,i',28,'a();h.SUPER=this;h',50,'=this',50,';h','.Subclass','=this',82,';h.Augment=this.Augment;h.','protoFunction','=this.',86,';h.can=this.can;h.has=this.has;h.isa=this.isa;h',54,'=new this(f);h',54,'.',30,'=h;h.Augment(g,i);',41,'h},Init:',17,'g',28,'this;if(g','.length===','1&&g[0]===f','){return ','h}if(!(h ','instanceof ','g',49,')){h=new g',49,'(f)}',41,'h',50,'.apply(','h,g)||h},Augment:',17,'g,h){var i;if(g','!=null){for(i in ','g){if(g',39,'(i)){this','.',86,'(i,g[i','])}}if(g.toString!==this.prototype.toString&&g.toString!=={}.toString){this.protoFunction("toString",g.toString)}}','if(h',119,'h){if(','h',39,122,'[i]=h[i]}}}',41,'this},',86,':',17,'h,g){this',54,'[h]=g;','if(typeof',' g','==="function"){','g.SUPER=this.SUPER',54,'}},prototype:{Init',':function(){},','SUPER:',17,'g',104,'g',49,'.SUPER},can:',17,'g',104,'typeof(this[g','])==="function"},has:',17,'g',104,159,'])!=="undefined','"},isa:',17,'g){return(g ',106,70,')&&(this ',106,'g)}},can:',17,'g',104,'this',54,'.can',51,'g)},has:',17,'g',104,'this',54,'.has',51,'g)},isa:',17,'h){var g=this;while(',120,'===h',104,'true}else{g=g.SUPER}}',41,'false},SimpleSUPER:c({',30,':',17,'g',104,'this.SimpleSUPER.define(g)},define:',17,'g){var i={};if(g!=null){',35,'h in ',120,39,'(h)){this.',86,'(h,g[h',126,41,'i},wrap:',17,'i,h){',142,'(h',')==="function"&&','h','.toString','().match(/\\.\\s*SUPER\\s*\\(/)){var g=',33,'(this.wrapper);g.label=i;g','.original','=h;h=g;g',222,'=this.stringify}',41,'h},wrapper:',43,'var h=',48,49,';this.SUPER=h.SUPER[h.label];try{var g=h',226,'.apply(this',',',48,')}catch(i){','delete this.','SUPER;','throw i}',242,243,41,'g}.','toString().replace','(/^\\s*function \\(\\)\\s*\\{\\s*/i,"").replace(/\\s*\\}\\s*$/i,""),toString:',43,41,'this',226,222,238,226,',',48,')}})})})("MathJax");(',17,'BASENAME){var ','BASE=window[BASENAME','];',9,'BASE){',263,']={}}var ','CALLBACK','=',17,'data){var cb=',33,'("',41,48,49,'.execute',115,48,49,',',48,')");',35,'id in ','CALLBACK.prototype','){if(',287,39,'(id)){',142,'(data[id',165,'"){cb[id]=data[id]}else{cb[id]=',287,'[id]}}}cb',222,'=',287,222,';',41,'cb};',287,'={isCallback:true,hook',148,'data:[],object:window,execute:',43,9,'this.called||this.autoReset){this.called=!this.autoReset;',41,'this.hook',238,'.object,this','.data.concat([].slice.call(',48,',0)))}},reset:',43,242,'called},toString:',43,41,313,222,238,'.hook,',48,')}};var ISCALLBACK=',17,'f){return(typeof(f',220,'f.isCallback)};var EVAL=',17,'code',104,'eval.call(window,code)};EVAL("var __TeSt_VaR__ = 1','");if(','window.__TeSt_VaR__','){try{delete ',339,'}catch(error){',339,'=null}}else{if(','window.execScript','){EVAL=',17,'code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";',345,'(code',');var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result','}}else{EVAL=',17,348,'var head=(',1,'getElementsByTagName("head"))[0];if(!','head){head=',1,'body}var script=',1,7,'("script");','script','.appendChild(',1,'createTextNode','(code));head',365,'script);','head.removeChild(','script',351,'}}}var USING=',17,'args,i','){if(',48,'.length','>1){if(',48,102,'2&&!(typeof ',48,'[0]==="function")&&',48,'[0] ',106,'Object&&typeof ',48,'[1]==="number"){','args=[].slice.call(',376,')}else{',392,48,',0)}}if(args ',106,'Array&&args',102,'1){args=args[0]}',142,' args',144,'if(args',278,'===',287,278,104,'args}',41,269,'({hook:args})}else{if(args ',106,'Array){',142,'(args[0])==="string"&&args[1] ',106,389,'args[1][args[0]]==="','function"){return CALLBACK({hook:args[','1][args[0]],object:args[1','],data:args.slice(','2)})}else{',142,' args[0]==="',422,'0',424,'1)})}else{',142,' args[1]==="',422,'1],object:args[0',424,'2)})}}}}else{',142,'(args)==="','string"){',41,269,'({hook:EVAL,data:[args]})}else{if(args ',106,70,104,269,'(args',394,142,439,'undefined"){',41,269,'({})}}}}}','throw Error("Can\'t ','make ','callback',' from given data")};var DELAY=',17,'time,',458,'){callback=USING(callback);',458,'.timeout=','setTimeout(',458,',time);','return callback','};var WAITFOR=',17,458,',signal',463,9,458,'.called){','WAITSIGNAL(',458,473,');signal.pending++}};var WAITEXECUTE=',43,'var signals=this','.signal',';',242,'signal;this',278,'=this.','oldExecute;',242,490,'var result=','this',278,238,',',48,');','if(ISCALLBACK(result)&&!result.called){',478,'result,signals',394,'for(var i=0,m=','signals','.length;i<m;i++){','signals[i].pending','--;if(',507,'<=0){signals[i].call()}}}};var WAITSIGNAL=',17,458,',signals){if(!(signals ',106,'Array)){','signals=[signals]}',9,458,484,'){',458,'.oldExecute=',458,278,';',458,278,'=WAITEXECUTE;',458,484,'=signals}else{if(signals',102,'1){',458,484,'.push(signals[0','])}else{',458,484,'=',458,484,'.concat(signals)}}};var AFTER=',17,458,463,458,'.pending=0;',35,'i=1,m=',48,506,'if(',48,'[i]){WAITFOR(',48,'[i],',458,')}}if(',458,'.pending===0){',493,458,'();','if(ISCALLBACK(result',')){',458,'=result}}',469,'};var HOOKS=',17,'hooks,data,reset){',9,'hooks',104,'null}if(!(hooks ',106,515,'hooks=[hooks]}if(!(data ',106,515,'data=(data==null?[]:[data])}var ','callbacks','=[{}];',504,'hooks',506,'if(reset){hooks[i].reset()}',493,'hooks[i].apply(window,data);',500,583,'.push(result)}}if(',583,102,'1',104,'null}if(',583,102,'2',104,583,'[1]}',41,'AFTER.apply({},',583,')};var QUEUE=BASE.',70,82,'({Init:',43,'this.pending','=0;','this.running','=0;','this.queue',24,'this.Push',238,',',48,')},Push:',43,'var ',458,';',504,48,506,458,'=USING(',48,'[i]);if(',458,'===',48,'[i]&&!',458,477,458,'=USING(["wait",this,',458,'])}',617,'.push(',458,')}',9,615,'&&!',613,'){','this.Process','()}',469,'},Process:',17,'queue){while(!',615,'&&!',613,'&&',617,379,'){var ',458,'=',617,'[0];queue=',617,'.slice(1);',617,24,'this.Suspend();',493,458,'();','this.Resume();','if(queue',379,'){',617,'=queue.concat(',617,')}',500,'WAITFOR(result,this',')}}},Suspend:',43,615,'++},Resume:',43,'if(',615,'){',615,'--}},call:',43,654,238,',',48,')},wait:',17,458,'){',469,'}});var SIGNAL=QUEUE',82,'({Init:',17,'name){','QUEUE',54,50,'.call(this',');this.name=name;','this.posted',24,'this.listeners','=[]},Post:',17,'message,',458,',forget',463,'if(this.posting||this.pending){',619,'(["Post",this,message,',458,726,537,'this.',458,'=',458,';',458,'.reset();',9,'forget){',719,'.push(message)}',675,'this.posting=1;',504,721,506,721,'[i].reset();var result=(',721,'[i])(','message);',500,688,')}}',679,242,'posting',31,613,'){this.call()}}',469,'},Clear:',17,458,463,728,458,'=',619,'(["Clear",this,',458,537,719,24,458,'()}',469,'},call:',43,'this.',458,'(this);',654,'()},Interest:',17,458,',ignorePast',463,721,'[',721,379,']=',458,31,'ignorePast){',504,719,506,458,740,493,458,'(',719,'[i]);',565,')&&i===',719,379,'-1){',688,')}}}',469,'},NoInterest:',17,458,'){',504,721,506,'if(',721,'[i]===',458,'){',721,'.splice(i,1);return}}},MessageHook:',17,'msg,',458,463,9,'this.hooks','){',837,'={};this.Interest(["','ExecuteHooks','",this])}',9,'this.hooks[msg',']){',844,']=[]}',844,'].push(',458,');',504,719,506,'if(',719,'[i]==msg){',458,740,458,'(',719,'[i])}}',469,'},',841,':',17,'msg,more){var type=((msg ',106,'Array)?msg[0]:msg);',41,'HOOKS(',837,'[type],[msg],true)}},{signals:{},find:',17,713,9,'SIGNAL.signals[name',']){',879,']=new SIGNAL(name)}',41,879,']}});BASE.Callback=BASE.CallBack=USING',';BASE.Callback.','Delay=DELAY',886,'After=AFTER',886,'Queue=QUEUE',886,'Signal=SIGNAL.find',886,841,'=HOOKS})("MathJax");(',17,'d','){var a=',20,'a){a',22,'c=(','navigator.vendor==="Apple Computer, Inc."&&typeof navigator.vendorSub==="undefined','");var f=0;var g=',17,129,1,'styleSheets','&&',1,909,379,'>f){f=',1,909,379,'}',9,'h){h=(',1,357,32,1,'body}}',41,'h};var e',24,19,43,35,'j=0,h=e',379,';j<h;j++){','a.Ajax.',371,'e[j])}e=[]};a.Ajax={loaded:{},loading:{},loadHooks:{},timeout:15*1000,styleDelay:1,config:{root:""},STATUS:{OK:1,ERROR:-1},rootPattern:new RegExp("^\\\\["+d+"\\\\]"),fileURL:',17,'h',104,'h.replace(this.rootPattern,this.config.root)},Require:',17,'j,m){m','=a.Callback(','m',');var k;if(j instanceof Object){for(var h in j){}k=h.toUpperCase();j=j[h]}else{k=j.split(/\\./).pop().toUpperCase()}j=this.fileURL(j);if(this.','loaded[j]){m(','this.loaded[','j',537,'var l={};l[k]=j;this.Load(l,m)}',41,'m},Load:',17,'j,l){l',944,'l',946,'loading[j]){',9,'this.loadHooks[','j]){',961,'j]=[]}',961,'j].push(l',394,'this.head=g(this.head);','if(this.loader[k]){this.loader[k].call(this,j,l',394,456,'load files of type "+k)}}',41,'l},LoadHook:',17,'j,k){k',944,'k);if(j ',106,70,'){',35,207,'j){j=j[h]}}j=','this.fileURL(','j);if(',948,'j]){k(',948,'j',537,9,961,'j]){',961,'j]=[]}',961,'j].push(k)}',41,'k},loader:{JS:',17,'i,k',28,1,7,363,'var j=','a.Callback','(["','loadTimeout','",this,i]);','this.loading','[i]={',458,':k',',message:a.Message.File(','i),timeout:',466,'j,this.timeout),status:','this.STATUS.OK',',script:h};h.onerror=j;h.type="text/javascript";h.src=i;','this.head',365,'h)},CSS:',17,'h,j){var i=',1,7,'("link");i.rel="stylesheet";','i.type="text/css";','i.href=h;',1012,'[h]={',458,':j',1016,'h),status:',1020,'};',1022,365,'i);','this.timer','.create',717,',[',1043,'.file,h],i)}},timer:{create:',17,217,'i',944,'i);if(','h.nodeName==="STYLE','"&&h','.styleSheet&&typeof(','h','.styleSheet.cssText)!=="undefined"){i','(',1020,394,'if(window.chrome&&typeof(window.sessionStorage)!=="undefined"&&',1054,'"){i(',1020,394,'if(c){','this.timer.start(this,[this.timer.','checkSafari2',',f++,','i],this.styleDelay',394,1068,'checkLength,h,',1071,')}}}',41,'i},start:',17,'i,h,j,k){h',944,'h);h',278,'=this',278,';h.time=this.time;h.STATUS=i.STATUS;h',465,'k||i.timeout;h.delay=h.total=0;',466,'h,j)},time:',17,'h){this.total+=this.delay;this.delay=Math.floor(this.delay*1.05+5);if(this.total>=this.timeout){h(','this.STATUS.ERROR',');',41,'1}',41,'0},file:',17,'i,',129,'h<0){',935,1010,'(i',394,935,'loadComplete','(i)}},execute:',43,313,717,315,',this.data[0],this.data[1])},',1069,':',17,'h,i,j){if(h.time(j)){return}if(',1,909,379,'>i&&',1,909,'[i].cssRules','&&',1,909,1125,379,'){j(h.STATUS.OK',394,466,'h,h.delay',')}},checkLength:',17,'h,k,m){if(h.time(m)){return}var l=0;var i=(k.sheet||k.styleSheet);try{if((i.cssRules||i.rules||[]).length>0){l=1}}catch(j){','if(j.message.match(/','protected variable|restricted URI/)){l=1}else{',1138,'Security error/)){l=1}}}if(l){',466,1008,'([m,h.STATUS.OK]),0',394,466,1134,')}}},',1108,':',17,32,985,'h);var i=',1012,'[h];if(i){a.Message.Clear(i.',754,'clearTimeout(','i.timeout);if(i.script){if(e',102,'0){',466,'b,0)}e.push(i.script)}',948,'h]=i.status;delete ',1012,'[h];',9,961,'h]){',961,'h]=[]}',961,'h].push(i.',458,394,948,'h]=',1020,';i={status:',1020,'}}',1008,'.',841,'(',961,'h],i.status)},',1010,':',17,129,1012,'[h].timeout','){',1158,1012,1194,')}',1012,'[h].status=',1093,';this.loadError(h);this.',1108,'(h)},loadError:',17,'h){a.Message.Set("File failed to load: "+h,null,2000)},Styles:',17,'j,k',28,'this.StyleString(',986,'h===""){k',944,'k);k()}else{var i=',1,7,'("style");',1030,968,1022,365,1053,'i',1056,'i',1058,'.styleSheet.cssText=h}else{i',365,1,367,'(h))}k=',1043,'.create',51,'k,i)}',41,'k},StyleString:',17,'m){',142,'(m)==="',440,41,'m}var j="",n,l;for(n in m){if(m',39,'(n)){',142,' m[n]==="',440,'j+=n+" {"+','m[n]+"}\\n"}else{if(m[n] ',106,416,35,'k=0;k<m[n].length;k++){l={};l[n]=m[n][k];j+=',1211,'l)}}else{if(n.substr(0,6)==="@media"){',1251,1211,'m[n])+"}\\n"}else{if(m[n]!=null){l',24,35,207,'m[n]){if(m[n][h]!=null){l[l',379,']=h+": "+m[n][h]}}',1251,'l.join("; ")+"}\\n"}}}}}}',41,'j}}})("MathJax");MathJax.HTML={Element:',17,'c,e,d){var f=',1,7,'(c);if(e){if(e.style){',19,'e.style;e.style={};',35,'g in b){if(b',39,'(g)){e.style[g.replace(/-([a-z])/g,this.ucMatch)]=b[g]}}}',15,'.Insert(f,e)}if(d){',35,'a=0;a<d',379,';a++){if(d[a] ',106,416,'f',365,'this.Element(','d[a][0],d[a][1],d[a][2]))}else{f',365,1,367,'(d[a]))}}}',41,'f},ucMatch:',17,'a,b',104,'b.toUpperCase()},addElement:',17,'b,a,d,c',104,'b',365,1293,'a,d,c))},TextNode:',17,'a',104,1,367,'(a)},addText:',17,'a,b',104,'a',365,'this.TextNode(b))},Cookie:{prefix:"mjx",expires:365,Set:',17,'a,d){var c',24,'if(d){',35,'f in d){if(d',39,'(f)){c.push(f+":"+d[f].',249,'(/&/g,"&&"))}}}',19,'this.prefix+"."+a+"="+escape(c.join("&;"));if(this.expires){var e=new Date();e.setDate(e.getDate()+this.expires);b+="; expires="+e.toGMTString()}',1,'cookie=b+"; path=/"},Get:',17,'c,h){',9,'h){h={}}var g=new RegExp("(?:^|;\\\\s*)"+this.prefix+"\\\\."+c+"=([^;]*)(?:;|$)");',19,'g.exec(',1,'cookie);if(b&&b[1]!==""){var e=unescape(b[1]).split("&;");',35,'d=0,a=e',379,';d<a;d++){b=e[d].match(/([^:]+):(.*)/);var f=b[2].replace(/&&/g,"&");if(f==="true"){f=true}else{if(f==="false"){f=false}else{if(f.match(/^-?(\\d+(\\.\\d+)?|\\.\\d+)$/)){f=parseFloat(f)}}}h[b[1]]=f}}',41,'h}}};','MathJax.Message','={log:[{}],current:null,textNodeBug:(',904,'")||(window',39,'&&window',39,'("konqueror")),styles:{"#','MathJax_Message','":{position:"','fixed",left:"1px",bottom:"2px","background-color":"#E6E6E6",border:"1px solid #959595','",margin:"0px",padding:"','2px 8px","z-index":"102",color:"black","font-size":"80%",width:"auto","white-space":"nowrap"},"#','MathJax_MSIE_Frame',1361,'absolute",top:0,left:0,width:"0px","z-index":101,border:"0px',1363,'0px"}},browsers:{MSIE:',17,'a){','MathJax.Hub.config.styles["#MathJax_Message"].','position="absolute";',1352,'.quirks=(',1,'compatMode==="BackCompat")},Chrome:',17,'a){',1372,'bottom="1.5em";',1372,'left="1em"}},Init:',43,9,1,'body',104,'false}if(','this.div','&&',1390,'.parentNode==null){',1390,'=',1,2,'("',1360,338,1390,'){this.text=',1390,'.firstChild','}}',9,1390,899,1,'body;if(',15,'.Browser.isMSIE){a=this.frame','=this.addDiv(',1,'body);a.style.',1373,'a.style.border=a.style.margin=a.style.padding="0px";a.style.zIndex="101";a.style.height="0px";a',1413,'a);a.id="',1365,'";','window.attachEvent("','onscroll",','this.MoveFrame',');',1422,'onresize",',1424,');',1424,'()}',1390,1413,'a);',1390,'.style.display="none";this.text=',1390,365,1,367,'(""))}',41,'true},addDiv:',17,'a){',19,1,7,'("div");b.id="',1360,'";if(a',1404,'){a.insertBefore(b,a',1404,394,'a',365,'b)}',41,'b},MoveFrame:',43,'var a=(',1352,'.quirks?',1,'body:',1,'documentElement);',19,1352,'.frame;b.style.left=a.scrollLeft+"px";b.style.top=a.scrollTop+"px";b.style.width=a.clientWidth+"px";b=b',1404,';b.style.height=a.clientHeight+"px"},filterText:',17,'a,b){if(',15,'.config.messageStyle==="simple"){if(a.match(/^Loading /)){',9,1012,'){',1012,'="Loading "}a=',1012,';',1012,'+="."}else{if(a.match(/^Processing /)){',9,'this.processing','){',1488,'="Processing "}a=',1488,';',1488,'+="."}}}',41,'a},Set:',17,'b,c,a){if(',1043,'){',1158,1043,');',242,'timeout}if(c==null){c=this.log',379,';this.log[c]={}}this.log[c].text=b;b=this.'],
['filterText(','b,c);','if(typeof','(','this.log[','c].next',')==="undefined"){',4,5,'=','this.current',';if(',10,'!=null){',4,10,'].prev=','c}',10,'=c}if(',10,'===c&&','MathJax.','Hub.config.','messageStyle','!=="none"){','if(this.','Init()){','if(this.textNodeBug){this.div.innerHTML=','b}','else{','this.text','.nodeValue','=b}','this.div.style.display','="";','if(this.status){window.status="";delete this.status}}else{','window.status','=b;this.status=true}}if(a){setTimeout(',22,'Callback','(["Clear','",this,','c]),a)}','return ','c},Clear',':function(','b,a){if(',4,'b].prev',13,4,4,49,'].next=',4,'b].next','}if(',4,56,13,4,4,56,16,4,49,'}if(',10,'===b){',10,'=',4,56,11,31,'){',26,'div','.parentNode','==null','){this.','Init()}if(',10,80,'){',26,'timer){clearTimeout(this.timer)}this.timer=setTimeout(',22,40,'(["Remove",this]),(a||600))}',30,28,4,10,'].text}',30,31,32,'=',4,10,'].text}}',36,26,'status){',37,'=(',10,80,'?"":',4,10,'].text)}}}delete ',4,56,';delete ',4,49,'},Remove:','function(){',31,32,35,34,'="none"},File',46,'b){var a=',22,'Ajax','.config.','root',11,'b','.substr(0,','a.length)===a){b="[MathJax]"+b.substr(a.length)}',44,'this.Set("Loading "+b)},Log:',120,'var b=[];','for(var ','c=1,a=this.log','.length;c<a;c++){','b[c]=',4,'c',95,44,'b.join("\\n")}};',22,'Hub={config:{root:"",config',':[],','styleSheets',151,'styles',':{},jax',151,'extensions',151,'preJax',':null,','postJax',160,'displayAlign:"center",displayIndent:"0",','preRemoveClass',':"MathJax_Preview",','showProcessingMessages',':true,',24,':"normal",','delayStartupUntil',':"none",','skipStartupTypeset',':false,','preProcessors',151,'inputJax',':{},','outputJax',':{},','menuSettings',':{zoom:"None",CTRL:false,ALT:false,CMD:false,Shift:false,zscale:"200%",renderer:"",font:"Auto",context:"MathJax"},','errorSettings',':{message:["[Math Processing Error]"],style:{color:"#CC0000","font-style":"italic"}}},','processUpdateTime',':250,signal:',22,40,'.Signal("','Hub"),Config',46,'a){this','.Insert(','this.config',',a);if(','this.config.','Augment',81,196,'(',195,196,')}},','Register',':{PreProcessor',46,'a){',22,23,174,'.push(',22,40,'(a))},','MessageHook',':function(){return ',22,'Hub.signal','.',214,'.apply(',22,217,',arguments',')},StartupHook',215,22,'Hub.Startup.signal','.',214,220,22,227,223,')},','LoadHook',215,22,'Ajax.',235,220,22,'Ajax',223,')}},getAllJax',46,'e){var c=[],b=this.elementScripts(e);for(var d=0,a=b.length;d<a;d++){if(b[d].MathJax&&b[d].MathJax.elementJax','){c.push(b[d].',22,'elementJax',')}}',44,'c},getJaxByType',46,'f,',246,'&&b[d].',22,249,'.mimeType','===f){c.push(b[d].',22,249,')}}',44,'c},getJaxByInputType',46,'f,',246,256,'type',256,'type.replace(/ *;(.|\\','s)*/,"")===f){c.push(b[d].',22,249,')}}',44,'c},getJaxFor',46,'a){','if(typeof(a)==="string"){a=document.getElementById(a',')}','if(a.MathJax){',44,'a.',22,249,'}',44,'null},isJax',46,'a){',281,')}','if(a.tagName!=null&&a.tagName.toLowerCase()==="script"){',283,'return(a.',22,'state===',22,'ElementJax.STATE','.PROCESSED','?1:-1)}if(a.type&&',195,176,'[a.',272,'s)*/,"")]){return -1}}',44,'0},Queue',215,'this.queue.Push',220,'this.queue',223,')},','Typeset',46,'b,c){if(!',22,'isReady){',44,'null}var ','a','=this.elementCallback(',1,44,22,40,'.Queue(["','PreProcess',42,'a.element','],["','Process',42,333,']).','Push(a.callback)},',331,46,'b,c){var a',325,1,44,22,40,330,'Post",this.signal',',"Begin ',331,'"],["ExecuteHooks",',22,40,',(','arguments.callee.disabled','?[]:',195,174,'),',333,',true','],["Post",this.signal,"End ',331,'"]).',339,335,46,'a,b){return this.takeAction("',335,'",a,b)},','Update',46,369,372,371,'Reprocess',46,369,377,371,'takeAction',46,'d,c,e){var b',325,'c,e);var a=[];',44,22,40,330,'Clear",this.signal],["',349,',["Begin "+','d,b.element',']],["','prepareScripts',42,394,',a],["','processScripts',42,'a],["',349,',["End "+',394,']]).Push(b.callback)},','scriptAction',':{',335,46,'a){},',372,46,127,'b.',22,249,11,'a&&a.','originalText','===(b.text==""?b.','innerHTML',':b.text)){b.',22,'state=a.STATE.','PROCESSED}',30,'a','.outputJax.Remove(','a);b.',22,425,'UPDATE}},',377,46,127,'b.',22,249,11,'a){a',429,'a);b.',22,425,'UPDATE}}},',396,46,'h,e,f){if(',356,'){return}var b=this.','elementScripts','(e);var g=',22,301,';',140,'d=0,a=b.length;d<a;d++){var c=b[d];if(c.type&&',195,176,'[c.',272,'n)*/,"")]){if(c.MathJax&&c.',22,'state!==g.PENDING',81,407,'[h](c)}if(!c.MathJax){c.MathJax={state:g.PENDING}}if(c.',22,'state!==g',302,'){f.push(c)}}}},','checkScriptSiblings',46,'a){if(a.MathJax&&a.',22,'checked',451,'config;var g=a','.previousSibling',11,'g&&g.nodeName=="#text"){var d,f;var c=a.nextSibling',11,'c&&c.nodeName!="#text"){c=null}if','(b.preJax','){',2,485,')==="string"){b.',159,'=new RegExp',485,'+"$")}d=g',32,'.match',485,')}if','(b.postJax','&&c){',2,498,489,161,491,'("^"+b.',161,')}f=c',32,'.match',498,')}if(d&&(!b.',161,'||f)){g',32,'=g',32,'.replace',485,',(d.length>1?d[1]:""));g=null}if(f&&(!b.',159,'||d)){c',32,'=c',32,517,498,',(f.length>1?f[1]:""))}if(g&&!g',32,'.match(/\\S/)){','g=g',480,'}}if(b.',164,'&&g&&g.className==b.',164,'){try{g.',422,'=""}catch(e){}g.style.display="none"}',283,'a.',22,477,'=1}},',400,46,'h,b,d){if(',356,'){',44,323,'q,o=',22,301,';var p=',195,176,',c=',195,178,';try{if(!b){b=','new Date().getTime','()}var j=0,l,f;while(j<h.length){l=h[j];if(!l){','continue}','f=l',480,11,'f&&f.className==="','MathJax_Error','"){f',79,'.removeChild(f)}var k=l.',272,'s)*/,"");if(!l.MathJax||l.',22,299,'o',302,'){',563,'if(!l.',22,249,'||l.',22,299,'o.UPDATE',81,473,'(l);q=p[k].','Translate(l);if(typeof q==="function"){','if(q.called){continue}this.RestartAfter(q)}','q.Attach(l,p[k])}var a=l.',22,249,';if(!c[a',259,']){l.',22,'state=o.UPDATE;','throw Error("No ','output jax registered for "+a',259,')}a.',178,'=c[a',259,'][0];q=a.',178,'.',590,'l.',22,599,591,'l.',22,'state=o',302,';this','.signal.Post(["','New Math",a.inputID]);j++;if(',561,'()-b>this.',184,'&&j<h.length){b=0;this.','RestartAfter','(',22,40,'.Delay(1))}}}catch(g){if(!g.restart){if(!',195,182,'.message){throw g}this.formatError(l,g);j++}if(!d){d=0}var e=Math.floor((d+j)/(d+h.length)*100);d+=j',11,195,166,'){',22,'Message.Set("Processing ','math: "+e+"%",0)}',44,22,40,'.After(["',400,42,'h.slice(j),b,d],g.restart)}if((d||h.length)&&',195,166,'){',22,639,'Math: 100%",0);',22,'Message.','Clear(0)}',44,'null},formatError',46,'a,c){var b=',22,'HTML.Element("span",{className:"',568,'"},',195,182,'.message);a',79,'.insertBefore(b,a);this.lastError=c},',626,46,'a){throw this',192,'Error("restart"),{restart:',22,40,'(a)})},elementCallback',46,'a,b){if(','b',80,'&&(a ','instanceof Array','||typeof a==="','function','")){b=a;a=','document.','body}',30,'if(a==null){a=document.body}',30,281,')}}}if(!a){',600,'such element")}if(!b){b={}}return{element:a,callback:b}},',452,46,'a){',281,')}',690,295,'return[a]}',44,'a.','getElementsByTagName("','script")},Insert',46,'c,a){',140,'b in a){if(a','.hasOwnProperty','(b)){',2,' a[b]==="object"&&!(a[b] ',683,')&&(','typeof c[b]==="','object"||',718,685,'")){this',192,'c[b],a[b])}',30,'c[b]=a[b]}}}',44,'c}};',22,'Hub',192,22,23,154,',',22,655,154,');',22,'Hub',192,22,23,154,',{".',568,'":',22,23,182,'.style});',22,'Extension={};',22,'Hub.Startup','={script:"",queue:',22,40,'.Queue(),','signal:',22,40,188,'Startup"),Config:',120,'this.queue.Push(["Post",this.signal,"Begin ','Config"]);','var b=',22,'HTML.Cookie','.Get("user");if(b.URL||b.Config){if(confirm("MathJax has found a user-configuration cookie that includes code to be run. Do you want to run it?\\n\\n(You should press Cancel unless you set up the cookie yourself.)")){if(b.URL){',312,'(["Require",',22,'Ajax,b.URL])}if(b.Config){',22,'userConfig=new Function(b.Config)}}',30,22,771,'.Set("user",{})}}',26,'script',529,312,'(this.script+";\\n1;")}',30,26,'params&&this.params.config){var d=this.params',130,'split(/,/);',140,'c=0,a=d',142,'if(!d[c].match(/\\.js$/)){d[c]+=".js"}',312,'(["Require",',22,'Ajax,this.URL("config','",d[c])])}}',30,312,'(["Require",',22,800,'","',22,'js")])}}',44,312,'([',685,'(e,f){if(e.',170,'.isCallback){',44,'e.',170,'}if(e.',170,'==="onload"){',44,'f}',44,685,'(){}},',22,'Hub.config,this.onload','],[function(','e){',44,'e.','loadArray','(',22,23,'config,"config",null,true)},this',363,'Config"])},Cookie',215,767,'Cookie"],["Get",',22,771,',"menu",',22,23,180,830,'f,c){if(f','.renderer','){var d="output/"+f',852,';',140,'e=0,b=c.length,a=0;e<b;e++){if(c[e]===d){c.splice(e,1);a=0;break}if(c[e].substr(0,7)==="output/"){a=(a?0:e+1)}}c.unshift(d);if(a){c.splice(a,1)}}},',22,23,180,',',22,23,'jax',363,'Cookie"])},Styles',215,767,'Styles"],["',834,42,22,23,152,',"config"],["Styles",',22,'Ajax,',22,23,154,363,'Styles"])},Jax',215,767,'Jax"],["',834,42,22,23,'jax,"jax","config.js",true',363,'Jax"])},','Extensions',215,767,893,'"],["',834,42,22,23,157,',"',157,'"],["',349,',"End ',893,'"])},onLoad',46,'a){var b=this.onload=',22,40,'(',120,22,227,'.Post("onLoad")});if(','window.addEventListener','){',919,'("load",b,false)}',30,'if(','window.attachEvent','){',925,'("onload",b)}',30,'window.onload=b}}',44,'b},',317,46,679,22,23,172,'){',44,685,'(){}}',44,767,317,'"],["',317,'",',22,'Hub,a,b',363,317,'"])},URL',46,'b,a){if(!a.match(/^([a-z]+:\\/\\/|\\[|\\/)/)){a="[MathJax]/"+b+"/"+a}',44,'a},',834,46,'b,f,c,a){if(b){if(!(b ',683,')){b=[b]}if(b.length){var h=',22,40,760,'j={},e;',140,'g=0,d=b.length;g<d;g++){e=this.URL(f,b[g]);if(c){e+="/"+c}if(a){h.Push(["Require",',22,'Ajax,e,j])}',30,'h.Push(',22,'Ajax.Require(e,j))}}',44,'h.Push({})}}',44,'null}};(',685,'(d){var b=window[d],e="["+d+"]";var c=b.Hub,a=b.Ajax,f=b.',40,';var g=',22,'Object','.Subclass','({require',160,'config:{},Init',46,'i,h){if(arguments.length===0){',44,'this}return(','this.constructor',985,'(i,h))()},',196,46,'k,','j){var i=',993,',h={};if(k',13,140,'l in k){if(k',712,'(l)){',2,' k[l]==="',685,'"){','i.protoFunction','(l,k[l])}',30,'h[l]=k[l]}}}if(k.toString!==i','.prototype.','toString&&k.toString!=={}.toString){',1011,'("toString",k.toString)}}c',192,'i.prototype,h);i.',196,'(null,j);',44,'this},','Translate',46,'h){',993,1015,1025,'=this.noTranslate;',44,'a.Require(','this.directory','+"/jax.js','")},noTranslate',46,'h){throw Error(',1034,1035,' failed to redefine the ',1025,'() method")},',203,46,'h){},Config:',120,'c',192,193,',(c.config[this.id]||{}));if(',195,196,81,196,'(',195,196,')}},Startup:',685,'(){},','loadComplete',46,'n){if(n==="jax.js"){var j=f','.Queue();','j.Push(["Post",c.Startup.signal,this.id+" Jax ',768,'j.Push(["','Config",this]);',1066,'Require"]);',26,'require){var k=this.require;if(!(k ',683,')){k=[k]}',140,'l=0,h=k.length;l<h;l++){j.Push(',1033,'k[l]))}',1068,834,'",',22,756,',',195,'require,"config"])}',1066,'Startup"]);',1068,'Startup",this]);',1066,'Ready"]);',44,1068,1062,'",a,',1034,'+"/"+n])}',30,44,'a.',1062,'(',1034,'+"/"+n)}}},{id:"unknown",version:"1.0.1",directory:e+"/jax",extensionDir:e+"/',157,'"});b.InputJax=g',985,'({',203,46,'h){if(!','b.',23,176,'){c',130,176,'={}}c',130,176,'[h]=this}},{','version:"1.0",directory:g.directory+"/','input','",extensionDir:g.extensionDir','});b.OutputJax=g',985,'({',203,46,1113,'c.config.outputJax','){',1133,'={}}if(!',1133,'[h]){',1133,'[h]=[];if(!c',130,180,852,'){c',130,180,852,'=this.id}}',1133,'[h].push(this)},Remove',46,'h){}},{',1124,'output',1126,',fontDir:e+(b.isPacked?"":"/..")+"/fonts"});','b.ElementJax','=g',985,'({Init',46,'i,h){',44,993,985,'(i,h)},',176,160,178,160,'inputID',160,420,':"",mimeType:"",Text',46,'j,k){','var h=this.SourceElement();','if(','h.firstChild','){if(',1179,'.nodeName!=="#text"){h.text=j}',30,1179,32,'=j}}',30,'try{h.',422,'=j}catch(i){h.text=j}}h.',22,'state=this.STATE.UPDATE;return c.',372,'(h,k)},',377,46,'i){',1177,'h.',22,1192,377,'(h,i)},Remove:',120,'this',429,'this);c',620,'Remove Math",','this.inputID',']);this.Detach()},SourceElement',215,687,'getElementById(',1210,')},Attach',46,'i,j){var h=i.',22,249,11,'i.',22,299,'this.STATE.UPDATE){h.Clone(this)}',30,'h=i.',22,249,'=this',11,'i.id',81,'inputID=i.id}',30,'i.id=',1210,'=',1157,'.GetID();this.newID=1}}h.',420,'=(i.text==""?i.',422,':i.text);h.',176,'=j},Detach:',120,1177,'if(!h){return}try{delete h.MathJax}catch(i){h.MathJax=null}',26,'newID){h.id=""}},Clone',46,'h){var i;for(i in this){if(!this',712,'(i)){',563,2,'(h','[i])==="undefined','"&&i!=="newID"){delete this[i]}}for(i in ',1113,'this',712,'(i)){',563,2,'(this',1259,'"||(this[i]!==h[i]&&i!=="inputID")){this[i]=h[i]}}}},{',1124,'element',1126,',ID:0,STATE:{PENDING:1,PROCESSED:2,UPDATE:3},GetID:',120,'this.ID++;return"MathJax-Element-"+this.ID},Subclass:',120,'var h=g',985,220,'this',223,');h.',1062,'=this',1015,1062,';',44,'h}});',1157,1015,'STATE=b.',301,'})("MathJax");(',685,'(l){var f=window[l];if(!f){f=window[l]={}}var c=f.Hub;var q=c.Startup;var u=c.config;var e=',687,706,'head")[0];if(!e){e=',687,'childNodes[0]}var b=(',687,'documentElement||document).',706,'script");var d',491,'("(^|/)"+l+"\\\\.js(\\\\?.*)?$");',140,'o=b.length-1;o>=0;o--){if(b[o].src.match(d)){q.script=b[o].',422,11,'RegExp.$2){q.params={};var r=RegExp.$2.substr(1).split(/\\&/);',140,'n=0,h=r.length;n<h;n++){var k=r[n].match(/(.*)=(.*)/);if(k){q.params[unescape(k[1])]=unescape(k[2])}}}u.root=b[o].src',517,'(/(^|\\/)[^\\/]*$/,"");break}}f.Ajax.config=u;var a={isMac',':(navigator.platform.substr(0,3)==="','Mac"),isPC',1317,'Win"),isMSIE:(window.ActiveXObject','!=null&&window.','clipboardData!=null),isFirefox:(window.netscape!=null&&',687,'ATTRIBUTE_NODE',1321,'opera',80,'),isSafari:(','navigator.userAgent.','match(/ (Apple)?WebKit\\//)!=null&&','window.chrome',80,'),isChrome:(',1331,1321,'chrome.loadTimes!=null),isOpera:(window.opera',1321,'opera.version','!=null),isKonqueror:(window',712,'&&window',712,'("konqueror")&&navigator.vendor=="KDE"),versionAtLeast',46,'x){var w=(this','.version).split','(".");x=(','new String','(x)).split(".");',140,'y=0,j=x.length;y<j;y++){if(w[y]!=x[y]){',44,'parseInt(w[y]||"0")>=parseInt(x[y])}}',44,'true},Select',46,999,'j[','c.Browser','];if(i){',44,'i(',1359,')}',44,'null}};var g=',1329,'replace(/^Mozilla\\/(\\d+\\.)+\\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\\/\\d+[^ ]*-[^ ]*\\.([a-z][a-z])?\\d+ /i,"").replace(/Gentoo |Ubuntu\\/(\\d+\\.)*\\d+ (\\([^)]*\\) )?/,"");',1359,'=c',192,'c',192,1348,'("Unknown"),{version:"0.0"}),a);',140,'t in a){if(a',712,'(t)){if(a[t]&&t',134,'2)==="is"){t=t.slice(2);if(t==="Mac"||t==="PC"){',563,1359,'=c',192,1348,'(t),a);var p',491,'(".*(Version',')/((?:\\\\d+\\\\.)+\\\\d','+)|.*("+t+")"+(t=="MSIE"?" ":"/")+"((?:\\\\d+\\\\.)*\\\\d+)|(?:^|\\\\(| )([a-z][-a-z0-9._: ]+|WebKit',1390,'+)");var s=p.exec(g)||["","","","unknown","0.0"];',1359,'.name=(s[1]=="Version"?t:(s[3]||s[5]));',1359,'.version=','s[2]||s[4]||s[6];break}}}',1359,'.Select({Safari',46,999,'parseInt((String(j',1346,'("."))[0]);if(i>=526){','j.version="','4.0','"}else{if(i','>=525){',1406,'3.1',1408,'>500){',1406,'3.0',1408,'>400){',1406,'2.0',1408,'>85){',1406,'1.0"}}}}}},Firefox',46,'j){if(j.version==="0.0"&&navigator.product==="Gecko"&&','navigator.productSub','){var i=',1426,134,'8);if(i>="20090630"){',1406,'3.5',1408,'>="20080617"){',1406,'3.0',1408,'>="20061024"){',1406,'2.0"}}}}},Opera',46,'i){i',1397,1338,'()}});',1359,'.Select(',22,655,'browsers);c.queue=f.',40,1065,'c.queue.Push(["','Post",q.signal,"','Begin"],["Config",q],["Cookie",q],["Styles",q],["Jax",q],["',893,'",q],q.onLoad(),',120,22,'isReady=true},["',317,'",q],["',1454,'End"])})("MathJax")}};']
]);