text: PAPAYA_VERSION_ID="0.7";
  PAPAYA_BUILD_NUM="747";
  
  var papayaLoadableImages=[];(function(a5,aJ){var ak,x,aF=typeof aJ,l=a5.document,aO=a5.location,bl=a5.jQuery,I=a5.$,ac={},a9=[],s="1.9.1",aL=a9.concat,aq=a9.push,a7=a9.slice,aP=a9.indexOf,A=ac.toString,X=ac.hasOwnProperty,aT=s.trim,bM=function(e,b6){return new bM.fn.init(e,b6,x)},bD=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=/\S+/g,D=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,bu=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bk=/^[\],:{}\s]*$/,bn=/(?:^|:|,)(?:\s*\[)+/g,bJ=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,a2=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,bV=/^-ms-/,aY=/-([\da-z])/gi,N=function(e,b6){return b6.toUpperCase()},bZ=function(e){if(l.addEventListener||e.type==="load"||l.readyState==="complete"){bo();bM.ready()}},bo=function(){if(l.addEventListener){l.removeEventListener("DOMContentLoaded",bZ,false);a5.removeEventListener("load",bZ,false)}else{l.detachEvent("onreadystatechange",bZ);a5.detachEvent("onload",bZ)}};bM.fn=bM.prototype={jquery:s,constructor:bM,init:function(e,b8,b7){var b6,b9;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b6=[null,e,null]}else{b6=bu.exec(e)}if(b6&&(b6[1]||!b8)){if(b6[1]){b8=b8 instanceof bM?b8[0]:b8;bM.merge(this,bM.parseHTML(b6[1],b8&&b8.nodeType?b8.ownerDocument||b8:l,true));if(a.test(b6[1])&&bM.isPlainObject(b8)){for(b6 in b8){if(bM.isFunction(this[b6])){this[b6](b8[b6])}else{this.attr(b6,b8[b6])}}}return this}else{b9=l.getElementById(b6[2]);if(b9&&b9.parentNode){if(b9.id!==b6[2]){return b7.find(e)}this.length=1;this[0]=b9}this.context=l;this.selector=e;return this}}else{if(!b8||b8.jquery){return(b8||b7).find(e)}else{return this.constructor(b8).find(e)}}}else{if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else{if(bM.isFunction(e)){return b7.ready(e)}}}if(e.selector!==aJ){this.selector=e.selector;this.context=e.context}return bM.makeArray(e,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return a7.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[this.length+e]:this[e])},pushStack:function(e){var b6=bM.merge(this.constructor(),e);b6.prevObject=this;b6.context=this.context;return b6},each:function(b6,e){return bM.each(this,b6,e)},ready:function(e){bM.ready.promise().done(e);return this},slice:function(){return this.pushStack(a7.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b7){var e=this.length,b6=+b7+(b7<0?e:0);return this.pushStack(b6>=0&&b6<e?[this[b6]]:[])},map:function(e){return this.pushStack(bM.map(this,function(b7,b6){return e.call(b7,b6,b7)}))},end:function(){return this.prevObject||this.constructor(null)},push:aq,sort:[].sort,splice:[].splice};bM.fn.init.prototype=bM.fn;bM.extend=bM.fn.extend=function(){var e,cb,b6,b7,ce,cc,ca=arguments[0]||{},b9=1,b8=arguments.length,cd=false;if(typeof ca==="boolean"){cd=ca;ca=arguments[1]||{};b9=2}if(typeof ca!=="object"&&!bM.isFunction(ca)){ca={}}if(b8===b9){ca=this;--b9}for(;b9<b8;b9++){if((ce=arguments[b9])!=null){for(b7 in ce){e=ca[b7];b6=ce[b7];if(ca===b6){continue}if(cd&&b6&&(bM.isPlainObject(b6)||(cb=bM.isArray(b6)))){if(cb){cb=false;cc=e&&bM.isArray(e)?e:[]}else{cc=e&&bM.isPlainObject(e)?e:{}}ca[b7]=bM.extend(cd,cc,b6)}else{if(b6!==aJ){ca[b7]=b6}}}}}return ca};bM.extend({noConflict:function(e){if(a5.$===bM){a5.$=I}if(e&&a5.jQuery===bM){a5.jQuery=bl}return bM},isReady:false,readyWait:1,holdReady:function(e){if(e){bM.readyWait++}else{bM.ready(true)}},ready:function(e){if(e===true?--bM.readyWait:bM.isReady){return}if(!l.body){return setTimeout(bM.ready)}bM.isReady=true;if(e!==true&&--bM.readyWait>0){return}ak.resolveWith(l,[bM]);if(bM.fn.trigger){bM(l).trigger("ready").off("ready")}},isFunction:function(e){return bM.type(e)==="function"},isArray:Array.isArray||function(e){return bM.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){if(e==null){return String(e)}return typeof e==="object"||typeof e==="function"?ac[A.call(e)]||"object":typeof e},isPlainObject:function(b8){if(!b8||bM.type(b8)!=="object"||b8.nodeType||bM.isWindow(b8)){return false}try{if(b8.constructor&&!X.call(b8,"constructor")&&!X.call(b8.constructor.prototype,"isPrototypeOf")){return false}}catch(b7){return false}var b6;for(b6 in b8){}return b6===aJ||X.call(b8,b6)},isEmptyObject:function(b6){var e;for(e in b6){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b9,b7,b8){if(!b9||typeof b9!=="string"){return null}if(typeof b7==="boolean"){b8=b7;b7=false}b7=b7||l;var b6=a.exec(b9),e=!b8&&[];if(b6){return[b7.createElement(b6[1])]}b6=bM.buildFragment([b9],b7,e);if(e){bM(e).remove()}return bM.merge([],b6.childNodes)},parseJSON:function(e){if(a5.JSON&&a5.JSON.parse){return a5.JSON.parse(e)}if(e===null){return e}if(typeof e==="string"){e=bM.trim(e);if(e){if(bk.test(e.replace(bJ,"@").replace(a2,"]").replace(bn,""))){return(new Function("return "+e))()}}}bM.error("Invalid JSON: "+e)},parseXML:function(b8){var b6,b7;if(!b8||typeof b8!=="string"){return null}try{if(a5.DOMParser){b7=new DOMParser();b6=b7.parseFromString(b8,"text/xml")}else{b6=new ActiveXObject("Microsoft.XMLDOM");b6.async="false";b6.loadXML(b8)}}catch(b9){b6=aJ}if(!b6||!b6.documentElement||b6.getElementsByTagName("parsererror").length){bM.error("Invalid XML: "+b8)}return b6},noop:function(){},globalEval:function(e){if(e&&bM.trim(e)){(a5.execScript||function(b6){a5["eval"].call(a5,b6)})(e)}},camelCase:function(e){return e.replace(bV,"ms-").replace(aY,N)},nodeName:function(b6,e){return b6.nodeName&&b6.nodeName.toLowerCase()===e.toLowerCase()},each:function(ca,cb,b6){var b9,b7=0,b8=ca.length,e=ad(ca);if(b6){if(e){for(;b7<b8;b7++){b9=cb.apply(ca[b7],b6);if(b9===false){break}}}else{for(b7 in ca){b9=cb.apply(ca[b7],b6);if(b9===false){break}}}}else{if(e){for(;b7<b8;b7++){b9=cb.call(ca[b7],b7,ca[b7]);if(b9===false){break}}}else{for(b7 in ca){b9=cb.call(ca[b7],b7,ca[b7]);if(b9===false){break}}}}return ca},trim:aT&&!aT.call("\uFEFF\xA0")?function(e){return e==null?"":aT.call(e)}:function(e){return e==null?"":(e+"").replace(D,"")},makeArray:function(e,b7){var b6=b7||[];if(e!=null){if(ad(Object(e))){bM.merge(b6,typeof e==="string"?[e]:e)}else{aq.call(b6,e)}}return b6},inArray:function(b8,b6,b7){var e;if(b6){if(aP){return aP.call(b6,b8,b7)}e=b6.length;b7=b7?b7<0?Math.max(0,e+b7):b7:0;for(;b7<e;b7++){if(b7 in b6&&b6[b7]===b8){return b7}}}return -1},merge:function(b9,b7){var e=b7.length,b8=b9.length,b6=0;if(typeof e==="number"){for(;b6<e;b6++){b9[b8++]=b7[b6]}}else{while(b7[b6]!==aJ){b9[b8++]=b7[b6++]}}b9.length=b8;return b9},grep:function(b6,cb,e){var ca,b7=[],b8=0,b9=b6.length;e=!!e;for(;b8<b9;b8++){ca=!!cb(b6[b8],b8);if(e!==ca){b7.push(b6[b8])}}return b7},map:function(b7,cc,e){var cb,b9=0,ca=b7.length,b6=ad(b7),b8=[];if(b6){for(;b9<ca;b9++){cb=cc(b7[b9],b9,e);if(cb!=null){b8[b8.length]=cb}}}else{for(b9 in b7){cb=cc(b7[b9],b9,e);if(cb!=null){b8[b8.length]=cb}}}return aL.apply([],b8)},guid:1,proxy:function(b9,b8){var e,b7,b6;if(typeof b8==="string"){b6=b9[b8];b8=b9;b9=b6}if(!bM.isFunction(b9)){return aJ}e=a7.call(arguments,2);b7=function(){return b9.apply(b8||this,e.concat(a7.call(arguments)))};b7.guid=b9.guid=b9.guid||bM.guid++;return b7},access:function(e,ca,cc,cb,b8,ce,cd){var b7=0,b6=e.length,b9=cc==null;if(bM.type(cc)==="object"){b8=true;for(b7 in cc){bM.access(e,ca,b7,cc[b7],true,ce,cd)}}else{if(cb!==aJ){b8=true;if(!bM.isFunction(cb)){cd=true}if(b9){if(cd){ca.call(e,cb);ca=null}else{b9=ca;ca=function(cg,cf,ch){return b9.call(bM(cg),ch)}}}if(ca){for(;b7<b6;b7++){ca(e[b7],cc,cd?cb:cb.call(e[b7],b7,ca(e[b7],cc)))}}}}return b8?e:b9?ca.call(e):b6?ca(e[0],cc):ce},now:function(){return(new Date()).getTime()}});bM.ready.promise=function(b9){if(!ak){ak=bM.Deferred();if(l.readyState==="complete"){setTimeout(bM.ready)}else{if(l.addEventListener){l.addEventListener("DOMContentLoaded",bZ,false);a5.addEventListener("load",bZ,false)}else{l.attachEvent("onreadystatechange",bZ);a5.attachEvent("onload",bZ);var b8=false;try{b8=a5.frameElement==null&&l.documentElement}catch(b7){}if(b8&&b8.doScroll){(function b6(){if(!bM.isReady){try{b8.doScroll("left")}catch(ca){return setTimeout(b6,50)}bo();bM.ready()}})()}}}}return ak.promise(b9)};bM.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(b6,e){ac["[object "+e+"]"]=e.toLowerCase()});function ad(b7){var b6=b7.length,e=bM.type(b7);if(bM.isWindow(b7)){return false}if(b7.nodeType===1&&b6){return true}return e==="array"||e!=="function"&&(b6===0||typeof b6==="number"&&b6>0&&(b6-1) in b7)}x=bM(l);var b1={};function ag(b6){var e=b1[b6]={};bM.each(b6.match(ae)||[],function(b8,b7){e[b7]=true});return e}bM.Callbacks=function(cf){cf=typeof cf==="string"?(b1[cf]||ag(cf)):bM.extend({},cf);var b9,b8,e,ca,cb,b7,cc=[],cd=!cf.once&&[],b6=function(cg){b8=cf.memory&&cg;e=true;cb=b7||0;b7=0;ca=cc.length;b9=true;for(;cc&&cb<ca;cb++){if(cc[cb].apply(cg[0],cg[1])===false&&cf.stopOnFalse){b8=false;break}}b9=false;if(cc){if(cd){if(cd.length){b6(cd.shift())}}else{if(b8){cc=[]}else{ce.disable()}}}},ce={add:function(){if(cc){var ch=cc.length;(function cg(ci){bM.each(ci,function(ck,cj){var cl=bM.type(cj);if(cl==="function"){if(!cf.unique||!ce.has(cj)){cc.push(cj)}}else{if(cj&&cj.length&&cl!=="string"){cg(cj)}}})})(arguments);if(b9){ca=cc.length}else{if(b8){b7=ch;b6(b8)}}}return this},remove:function(){if(cc){bM.each(arguments,function(ci,cg){var ch;while((ch=bM.inArray(cg,cc,ch))>-1){cc.splice(ch,1);if(b9){if(ch<=ca){ca--}if(ch<=cb){cb--}}}})}return this},has:function(cg){return cg?bM.inArray(cg,cc)>-1:!!(cc&&cc.length)},empty:function(){cc=[];return this},disable:function(){cc=cd=b8=aJ;return this},disabled:function(){return !cc},lock:function(){cd=aJ;if(!b8){ce.disable()}return this},locked:function(){return !cd},fireWith:function(ch,cg){cg=cg||[];cg=[ch,cg.slice?cg.slice():cg];if(cc&&(!e||cd)){if(b9){cd.push(cg)}else{b6(cg)}}return this},fire:function(){ce.fireWith(this,arguments);return this},fired:function(){return !!e}};return ce};bM.extend({Deferred:function(b7){var b6=[["resolve","done",bM.Callbacks("once memory"),"resolved"],["reject","fail",bM.Callbacks("once memory"),"rejected"],["notify","progress",bM.Callbacks("memory")]],b8="pending",b9={state:function(){return b8},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var ca=arguments;return bM.Deferred(function(cb){bM.each(b6,function(cd,cc){var cf=cc[0],ce=bM.isFunction(ca[cd])&&ca[cd];e[cc[1]](function(){var cg=ce&&ce.apply(this,arguments);if(cg&&bM.isFunction(cg.promise)){cg.promise().done(cb.resolve).fail(cb.reject).progress(cb.notify)}else{cb[cf+"With"](this===b9?cb.promise():this,ce?[cg]:arguments)}})});ca=null}).promise()},promise:function(ca){return ca!=null?bM.extend(ca,b9):b9}},e={};b9.pipe=b9.then;bM.each(b6,function(cb,ca){var cd=ca[2],cc=ca[3];b9[ca[1]]=cd.add;if(cc){cd.add(function(){b8=cc},b6[cb^1][2].disable,b6[2][2].lock)}e[ca[0]]=function(){e[ca[0]+"With"](this===e?b9:this,arguments);return this};e[ca[0]+"With"]=cd.fireWith});b9.promise(e);if(b7){b7.call(e,e)}return e},when:function(b9){var b7=0,cb=a7.call(arguments),e=cb.length,b6=e!==1||(b9&&bM.isFunction(b9.promise))?e:0,ce=b6===1?b9:bM.Deferred(),b8=function(cg,ch,cf){return function(ci){ch[cg]=this;cf[cg]=arguments.length>1?a7.call(arguments):ci;if(cf===cd){ce.notifyWith(ch,cf)}else{if(!(--b6)){ce.resolveWith(ch,cf)}}}},cd,ca,cc;if(e>1){cd=new Array(e);ca=new Array(e);cc=new Array(e);for(;b7<e;b7++){if(cb[b7]&&bM.isFunction(cb[b7].promise)){cb[b7].promise().done(b8(b7,cc,cb)).fail(ce.reject).progress(b8(b7,ca,cd))}else{--b6}}}if(!b6){ce.resolveWith(cc,cb)}return ce.promise()}});bM.support=(function(){var ch,cg,ce,cd,cf,cc,b8,ca,b7,b9,b6=l.createElement("div");b6.setAttribute("className","t");b6.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";cg=b6.getElementsByTagName("*");ce=b6.getElementsByTagName("a")[0];if(!cg||!ce||!cg.length){return{}}cf=l.createElement("select");b8=cf.appendChild(l.createElement("option"));cd=b6.getElementsByTagName("input")[0];ce.style.cssText="top:1px;float:left;opacity:.5";ch={getSetAttribute:b6.className!=="t",leadingWhitespace:b6.firstChild.nodeType===3,tbody:!b6.getElementsByTagName("tbody").length,htmlSerialize:!!b6.getElementsByTagName("link").length,style:/top/.test(ce.getAttribute("style")),hrefNormalized:ce.getAttribute("href")==="/a",opacity:/^0.5/.test(ce.style.opacity),cssFloat:!!ce.style.cssFloat,checkOn:!!cd.value,optSelected:b8.selected,enctype:!!l.createElement("form").enctype,html5Clone:l.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",boxModel:l.compatMode==="CSS1Compat",deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};cd.checked=true;ch.noCloneChecked=cd.cloneNode(true).checked;cf.disabled=true;ch.optDisabled=!b8.disabled;try{delete b6.test}catch(cb){ch.deleteExpando=false}cd=l.createElement("input");cd.setAttribute("value","");ch.input=cd.getAttribute("value")==="";cd.value="t";cd.setAttribute("type","radio");ch.radioValue=cd.value==="t";cd.setAttribute("checked","t");cd.setAttribute("name","t");cc=l.createDocumentFragment();cc.appendChild(cd);ch.appendChecked=cd.checked;ch.checkClone=cc.cloneNode(true).cloneNode(true).lastChild.checked;if(b6.attachEvent){b6.attachEvent("onclick",function(){ch.noCloneEvent=false});b6.cloneNode(true).click()}for(b9 in {submit:true,change:true,focusin:true}){b6.setAttribute(ca="on"+b9,"t");ch[b9+"Bubbles"]=ca in a5||b6.attributes[ca].expando===false}b6.style.backgroundClip="content-box";b6.cloneNode(true).style.backgroundClip="";ch.clearCloneStyle=b6.style.backgroundClip==="content-box";bM(function(){var ci,cl,ck,cj="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e=l.getElementsByTagName("body")[0];if(!e){return}ci=l.createElement("div");ci.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";e.appendChild(ci).appendChild(b6);b6.innerHTML="<table><tr><td></td><td>t</td></tr></table>";ck=b6.getElementsByTagName("td");ck[0].style.cssText="padding:0;margin:0;border:0;display:none";b7=(ck[0].offsetHeight===0);ck[0].style.display="";ck[1].style.display="none";ch.reliableHiddenOffsets=b7&&(ck[0].offsetHeight===0);b6.innerHTML="";b6.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";ch.boxSizing=(b6.offsetWidth===4);ch.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a5.getComputedStyle){ch.pixelPosition=(a5.getComputedStyle(b6,null)||{}).top!=="1%";ch.boxSizingReliable=(a5.getComputedStyle(b6,null)||{width:"4px"}).width==="4px";cl=b6.appendChild(l.createElement("div"));cl.style.cssText=b6.style.cssText=cj;cl.style.marginRight=cl.style.width="0";b6.style.width="1px";ch.reliableMarginRight=!parseFloat((a5.getComputedStyle(cl,null)||{}).marginRight)}if(typeof b6.style.zoom!==aF){b6.innerHTML="";b6.style.cssText=cj+"width:1px;padding:1px;display:inline;zoom:1";ch.inlineBlockNeedsLayout=(b6.offsetWidth===3);b6.style.display="block";b6.innerHTML="<div></div>";b6.firstChild.style.width="5px";ch.shrinkWrapBlocks=(b6.offsetWidth!==3);if(ch.inlineBlockNeedsLayout){e.style.zoom=1}}e.removeChild(ci);ci=b6=ck=cl=null});cg=cf=cc=b8=ce=cd=null;return ch})();var bz=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aQ=/([A-Z])/g;function bd(b8,b6,ca,b9){if(!bM.acceptData(b8)){return}var cb,cd,ce=bM.expando,cc=typeof b6==="string",cf=b8.nodeType,e=cf?bM.cache:b8,b7=cf?b8[ce]:b8[ce]&&ce;if((!b7||!e[b7]||(!b9&&!e[b7].data))&&cc&&ca===aJ){return}if(!b7){if(cf){b8[ce]=b7=a9.pop()||bM.guid++}else{b7=ce}}if(!e[b7]){e[b7]={};if(!cf){e[b7].toJSON=bM.noop}}if(typeof b6==="object"||typeof b6==="function"){if(b9){e[b7]=bM.extend(e[b7],b6)}else{e[b7].data=bM.extend(e[b7].data,b6)}}cb=e[b7];if(!b9){if(!cb.data){cb.data={}}cb=cb.data}if(ca!==aJ){cb[bM.camelCase(b6)]=ca}if(cc){cd=cb[b6];if(cd==null){cd=cb[bM.camelCase(b6)]}}else{cd=cb}return cd}function ab(b8,b6,b9){if(!bM.acceptData(b8)){return}var cb,ca,cc,cd=b8.nodeType,e=cd?bM.cache:b8,b7=cd?b8[bM.expando]:bM.expando;if(!e[b7]){return}if(b6){cc=b9?e[b7]:e[b7].data;if(cc){if(!bM.isArray(b6)){if(b6 in cc){b6=[b6]}else{b6=bM.camelCase(b6);if(b6 in cc){b6=[b6]}else{b6=b6.split(" ")}}}else{b6=b6.concat(bM.map(b6,bM.camelCase))}for(cb=0,ca=b6.length;cb<ca;cb++){delete cc[b6[cb]]}if(!(b9?O:bM.isEmptyObject)(cc)){return}}}if(!b9){delete e[b7].data;if(!O(e[b7])){return}}if(cd){bM.cleanData([b8],true)}else{if(bM.support.deleteExpando||e!=e.window){delete e[b7]}else{e[b7]=null}}}bM.extend({cache:{},expando:"jQuery"+(s+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?bM.cache[e[bM.expando]]:e[bM.expando];return !!e&&!O(e)},data:function(b6,e,b7){return bd(b6,e,b7)},removeData:function(b6,e){return ab(b6,e)},_data:function(b6,e,b7){return bd(b6,e,b7,true)},_removeData:function(b6,e){return ab(b6,e,true)},acceptData:function(b6){if(b6.nodeType&&b6.nodeType!==1&&b6.nodeType!==9){return false}var e=b6.nodeName&&bM.noData[b6.nodeName.toLowerCase()];return !e||e!==true&&b6.getAttribute("classid")===e}});bM.fn.extend({data:function(b8,cb){var b6,e,b9=this[0],b7=0,ca=null;if(b8===aJ){if(this.length){ca=bM.data(b9);if(b9.nodeType===1&&!bM._data(b9,"parsedAttrs")){b6=b9.attributes;for(;b7<b6.length;b7++){e=b6[b7].name;if(!e.indexOf("data-")){e=bM.camelCase(e.slice(5));bB(b9,e,ca[e])}}bM._data(b9,"parsedAttrs",true)}}return ca}if(typeof b8==="object"){return this.each(function(){bM.data(this,b8)})}return bM.access(this,function(cc){if(cc===aJ){return b9?bB(b9,b8,bM.data(b9,b8)):null}this.each(function(){bM.data(this,b8,cc)})},null,cb,arguments.length>1,null,true)},removeData:function(e){return this.each(function(){bM.removeData(this,e)})}});function bB(b8,b7,b9){if(b9===aJ&&b8.nodeType===1){var b6="data-"+b7.replace(aQ,"-$1").toLowerCase();b9=b8.getAttribute(b6);if(typeof b9==="string"){try{b9=b9==="true"?true:b9==="false"?false:b9==="null"?null:+b9+""===b9?+b9:bz.test(b9)?bM.parseJSON(b9):b9}catch(ca){}bM.data(b8,b7,b9)}else{b9=aJ}}return b9}function O(b6){var e;for(e in b6){if(e==="data"&&bM.isEmptyObject(b6[e])){continue}if(e!=="toJSON"){return false}}return true}bM.extend({queue:function(b7,b6,b8){var e;if(b7){b6=(b6||"fx")+"queue";e=bM._data(b7,b6);if(b8){if(!e||bM.isArray(b8)){e=bM._data(b7,b6,bM.makeArray(b8))}else{e.push(b8)}}return e||[]}},dequeue:function(ca,b9){b9=b9||"fx";var b6=bM.queue(ca,b9),cb=b6.length,b8=b6.shift(),e=bM._queueHooks(ca,b9),b7=function(){bM.dequeue(ca,b9)};if(b8==="inprogress"){b8=b6.shift();cb--}e.cur=b8;if(b8){if(b9==="fx"){b6.unshift("inprogress")}delete e.stop;b8.call(ca,b7,e)}if(!cb&&e){e.empty.fire()}},_queueHooks:function(b7,b6){var e=b6+"queueHooks";return bM._data(b7,e)||bM._data(b7,e,{empty:bM.Callbacks("once memory").add(function(){bM._removeData(b7,b6+"queue");bM._removeData(b7,e)})})}});bM.fn.extend({queue:function(e,b6){var b7=2;if(typeof e!=="string"){b6=e;e="fx";b7--}if(arguments.length<b7){return bM.queue(this[0],e)}return b6===aJ?this:this.each(function(){var b8=bM.queue(this,e,b6);bM._queueHooks(this,e);if(e==="fx"&&b8[0]!=="inprogress"){bM.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){bM.dequeue(this,e)})},delay:function(b6,e){b6=bM.fx?bM.fx.speeds[b6]||b6:b6;e=e||"fx";return this.queue(e,function(b8,b7){var b9=setTimeout(b8,b6);b7.stop=function(){clearTimeout(b9)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(b7,cb){var b6,b8=1,cc=bM.Deferred(),ca=this,e=this.length,b9=function(){if(!(--b8)){cc.resolveWith(ca,[ca])}};if(typeof b7!=="string"){cb=b7;b7=aJ}b7=b7||"fx";while(e--){b6=bM._data(ca[e],b7+"queueHooks");if(b6&&b6.empty){b8++;b6.empty.add(b9)}}b9();return cc.promise(cb)}});var bb,b2,bP=/[\t\r\n]/g,am=/\r/g,aI=/^(?:input|select|textarea|button|object)$/i,E=/^(?:a|area)$/i,M=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,au=/^(?:checked|selected)$/i,bS=bM.support.getSetAttribute,bI=bM.support.input;bM.fn.extend({attr:function(e,b6){return bM.access(this,bM.attr,e,b6,arguments.length>1)},removeAttr:function(e){return this.each(function(){bM.removeAttr(this,e)})},prop:function(e,b6){return bM.access(this,bM.prop,e,b6,arguments.length>1)},removeProp:function(e){e=bM.propFix[e]||e;return this.each(function(){try{this[e]=aJ;delete this[e]}catch(b6){}})},addClass:function(cc){var b6,e,cd,b9,b7,b8=0,ca=this.length,cb=typeof cc==="string"&&cc;if(bM.isFunction(cc)){return this.each(function(ce){bM(this).addClass(cc.call(this,ce,this.className))})}if(cb){b6=(cc||"").match(ae)||[];for(;b8<ca;b8++){e=this[b8];cd=e.nodeType===1&&(e.className?(" "+e.className+" ").replace(bP," "):" ");if(cd){b7=0;while((b9=b6[b7++])){if(cd.indexOf(" "+b9+" ")<0){cd+=b9+" "}}e.className=bM.trim(cd)}}}return this},removeClass:function(cc){var b6,e,cd,b9,b7,b8=0,ca=this.length,cb=arguments.length===0||typeof cc==="string"&&cc;if(bM.isFunction(cc)){return this.each(function(ce){bM(this).removeClass(cc.call(this,ce,this.className))})}if(cb){b6=(cc||"").match(ae)||[];for(;b8<ca;b8++){e=this[b8];cd=e.nodeType===1&&(e.className?(" "+e.className+" ").replace(bP," "):"");if(cd){b7=0;while((b9=b6[b7++])){while(cd.indexOf(" "+b9+" ")>=0){cd=cd.replace(" "+b9+" "," ")}}e.className=cc?bM.trim(cd):""}}}return this},toggleClass:function(b8,b6){var b7=typeof b8,e=typeof b6==="boolean";if(bM.isFunction(b8)){return this.each(function(b9){bM(this).toggleClass(b8.call(this,b9,this.className,b6),b6)})}return this.each(function(){if(b7==="string"){var cb,ca=0,b9=bM(this),cc=b6,cd=b8.match(ae)||[];while((cb=cd[ca++])){cc=e?cc:!b9.hasClass(cb);b9[cc?"addClass":"removeClass"](cb)}}else{if(b7===aF||b7==="boolean"){if(this.className){bM._data(this,"__className__",this.className)}this.className=this.className||b8===false?"":bM._data(this,"__className__")||""}}})},hasClass:function(e){var b8=" "+e+" ",b7=0,b6=this.length;for(;b7<b6;b7++){if(this[b7].nodeType===1&&(" "+this[b7].className+" ").replace(bP," ").indexOf(b8)>=0){return true}}return false},val:function(b8){var b6,e,b9,b7=this[0];if(!arguments.length){if(b7){e=bM.valHooks[b7.type]||bM.valHooks[b7.nodeName.toLowerCase()];if(e&&"get" in e&&(b6=e.get(b7,"value"))!==aJ){return b6}b6=b7.value;return typeof b6==="string"?b6.replace(am,""):b6==null?"":b6}return}b9=bM.isFunction(b8);return this.each(function(cb){var cc,ca=bM(this);if(this.nodeType!==1){return}if(b9){cc=b8.call(this,cb,ca.val())}else{cc=b8}if(cc==null){cc=""}else{if(typeof cc==="number"){cc+=""}else{if(bM.isArray(cc)){cc=bM.map(cc,function(cd){return cd==null?"":cd+""})}}}e=bM.valHooks[this.type]||bM.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,cc,"value")===aJ){this.value=cc}})}});bM.extend({valHooks:{option:{get:function(e){var b6=e.attributes.value;return !b6||b6.specified?e.value:e.text}},select:{get:function(e){var cb,b7,cd=e.options,b9=e.selectedIndex,b8=e.type==="select-one"||b9<0,cc=b8?null:[],ca=b8?b9+1:cd.length,b6=b9<0?ca:b8?b9:0;for(;b6<ca;b6++){b7=cd[b6];if((b7.selected||b6===b9)&&(bM.support.optDisabled?!b7.disabled:b7.getAttribute("disabled")===null)&&(!b7.parentNode.disabled||!bM.nodeName(b7.parentNode,"optgroup"))){cb=bM(b7).val();if(b8){return cb}cc.push(cb)}}return cc},set:function(b6,b7){var e=bM.makeArray(b7);bM(b6).find("option").each(function(){this.selected=bM.inArray(bM(this).val(),e)>=0});if(!e.length){b6.selectedIndex=-1}return e}}},attr:function(ca,b8,cb){var e,b9,b7,b6=ca.nodeType;if(!ca||b6===3||b6===8||b6===2){return}if(typeof ca.getAttribute===aF){return bM.prop(ca,b8,cb)}b9=b6!==1||!bM.isXMLDoc(ca);if(b9){b8=b8.toLowerCase();e=bM.attrHooks[b8]||(M.test(b8)?b2:bb)}if(cb!==aJ){if(cb===null){bM.removeAttr(ca,b8)}else{if(e&&b9&&"set" in e&&(b7=e.set(ca,cb,b8))!==aJ){return b7}else{ca.setAttribute(b8,cb+"");return cb}}}else{if(e&&b9&&"get" in e&&(b7=e.get(ca,b8))!==null){return b7}else{if(typeof ca.getAttribute!==aF){b7=ca.getAttribute(b8)}return b7==null?aJ:b7}}},removeAttr:function(b7,b9){var e,b8,b6=0,ca=b9&&b9.match(ae);if(ca&&b7.nodeType===1){while((e=ca[b6++])){b8=bM.propFix[e]||e;if(M.test(e)){if(!bS&&au.test(e)){b7[bM.camelCase("default-"+e)]=b7[b8]=false}else{b7[b8]=false}}else{bM.attr(b7,e,"")}b7.removeAttribute(bS?e:b8)}}},attrHooks:{type:{set:function(e,b6){if(!bM.support.radioValue&&b6==="radio"&&bM.nodeName(e,"input")){var b7=e.value;e.setAttribute("type",b6);if(b7){e.value=b7}return b6}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(ca,b8,cb){var b7,e,b9,b6=ca.nodeType;if(!ca||b6===3||b6===8||b6===2){return}b9=b6!==1||!bM.isXMLDoc(ca);if(b9){b8=bM.propFix[b8]||b8;e=bM.propHooks[b8]}if(cb!==aJ){if(e&&"set" in e&&(b7=e.set(ca,cb,b8))!==aJ){return b7}else{return(ca[b8]=cb)}}else{if(e&&"get" in e&&(b7=e.get(ca,b8))!==null){return b7}else{return ca[b8]}}},propHooks:{tabIndex:{get:function(b6){var e=b6.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aI.test(b6.nodeName)||E.test(b6.nodeName)&&b6.href?0:aJ}}}});b2={get:function(b8,b6){var b9=bM.prop(b8,b6),e=typeof b9==="boolean"&&b8.getAttribute(b6),b7=typeof b9==="boolean"?bI&&bS?e!=null:au.test(b6)?b8[bM.camelCase("default-"+b6)]:!!e:b8.getAttributeNode(b6);return b7&&b7.value!==false?b6.toLowerCase():aJ},set:function(b6,b7,e){if(b7===false){bM.removeAttr(b6,e)}else{if(bI&&bS||!au.test(e)){b6.setAttribute(!bS&&bM.propFix[e]||e,e)}else{b6[bM.camelCase("default-"+e)]=b6[e]=true}}return e}};if(!bI||!bS){bM.attrHooks.value={get:function(b7,b6){var e=b7.getAttributeNode(b6);return bM.nodeName(b7,"input")?b7.defaultValue:e&&e.specified?e.value:aJ},set:function(b6,b7,e){if(bM.nodeName(b6,"input")){b6.defaultValue=b7}else{return bb&&bb.set(b6,b7,e)}}}}if(!bS){bb=bM.valHooks.button={get:function(b7,b6){var e=b7.getAttributeNode(b6);return e&&(b6==="id"||b6==="name"||b6==="coords"?e.value!=="":e.specified)?e.value:aJ},set:function(b7,b8,b6){var e=b7.getAttributeNode(b6);if(!e){b7.setAttributeNode((e=b7.ownerDocument.createAttribute(b6)))}e.value=b8+="";return b6==="value"||b8===b7.getAttribute(b6)?b8:aJ}};bM.attrHooks.contenteditable={get:bb.get,set:function(b6,b7,e){bb.set(b6,b7===""?false:b7,e)}};bM.each(["width","height"],function(b6,e){bM.attrHooks[e]=bM.extend(bM.attrHooks[e],{set:function(b7,b8){if(b8===""){b7.setAttribute(e,"auto");return b8}}})})}if(!bM.support.hrefNormalized){bM.each(["href","src","width","height"],function(b6,e){bM.attrHooks[e]=bM.extend(bM.attrHooks[e],{get:function(b8){var b7=b8.getAttribute(e,2);return b7==null?aJ:b7}})});bM.each(["href","src"],function(b6,e){bM.propHooks[e]={get:function(b7){return b7.getAttribute(e,4)}}})}if(!bM.support.style){bM.attrHooks.style={get:function(e){return e.style.cssText||aJ},set:function(e,b6){return(e.style.cssText=b6+"")}}}if(!bM.support.optSelected){bM.propHooks.selected=bM.extend(bM.propHooks.selected,{get:function(b6){var e=b6.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!bM.support.enctype){bM.propFix.enctype="encoding"}if(!bM.support.checkOn){bM.each(["radio","checkbox"],function(){bM.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}bM.each(["radio","checkbox"],function(){bM.valHooks[this]=bM.extend(bM.valHooks[this],{set:function(e,b6){if(bM.isArray(b6)){return(e.checked=bM.inArray(bM(e).val(),b6)>=0)}}})});var bK=/^(?:input|select|textarea)$/i,a6=/^key/,bQ=/^(?:mouse|contextmenu)|click/,bE=/^(?:focusinfocus|focusoutblur)$/,bx=/^([^.]*)(?:\.(.+)|)$/;function S(){return true}function Z(){return false}bM.event={global:{},add:function(b9,ce,cj,cb,ca){var cc,ck,cl,b7,cg,cd,ci,b8,ch,e,b6,cf=bM._data(b9);if(!cf){return}if(cj.handler){b7=cj;cj=b7.handler;ca=b7.selector}if(!cj.guid){cj.guid=bM.guid++}if(!(ck=cf.events)){ck=cf.events={}}if(!(cd=cf.handle)){cd=cf.handle=function(cm){return typeof bM!==aF&&(!cm||bM.event.triggered!==cm.type)?bM.event.dispatch.apply(cd.elem,arguments):aJ};cd.elem=b9}ce=(ce||"").match(ae)||[""];cl=ce.length;while(cl--){cc=bx.exec(ce[cl])||[];ch=b6=cc[1];e=(cc[2]||"").split(".").sort();cg=bM.event.special[ch]||{};ch=(ca?cg.delegateType:cg.bindType)||ch;cg=bM.event.special[ch]||{};ci=bM.extend({type:ch,origType:b6,data:cb,handler:cj,guid:cj.guid,selector:ca,needsContext:ca&&bM.expr.match.needsContext.test(ca),namespace:e.join(".")},b7);if(!(b8=ck[ch])){b8=ck[ch]=[];b8.delegateCount=0;if(!cg.setup||cg.setup.call(b9,cb,e,cd)===false){if(b9.addEventListener){b9.addEventListener(ch,cd,false)}else{if(b9.attachEvent){b9.attachEvent("on"+ch,cd)}}}}if(cg.add){cg.add.call(b9,ci);if(!ci.handler.guid){ci.handler.guid=cj.guid}}if(ca){b8.splice(b8.delegateCount++,0,ci)}else{b8.push(ci)}bM.event.global[ch]=true}b9=null},remove:function(b8,ce,cl,b9,cd){var cb,ci,cc,ca,ck,cj,cg,b7,ch,e,b6,cf=bM.hasData(b8)&&bM._data(b8);if(!cf||!(cj=cf.events)){return}ce=(ce||"").match(ae)||[""];ck=ce.length;while(ck--){cc=bx.exec(ce[ck])||[];ch=b6=cc[1];e=(cc[2]||"").split(".").sort();if(!ch){for(ch in cj){bM.event.remove(b8,ch+ce[ck],cl,b9,true)}continue}cg=bM.event.special[ch]||{};ch=(b9?cg.delegateType:cg.bindType)||ch;b7=cj[ch]||[];cc=cc[2]&&new RegExp("(^|\\.)"+e.join("\\.(?:.*\\.|)")+"(\\.|$)");ca=cb=b7.length;while(cb--){ci=b7[cb];if((cd||b6===ci.origType)&&(!cl||cl.guid===ci.guid)&&(!cc||cc.test(ci.namespace))&&(!b9||b9===ci.selector||b9==="**"&&ci.selector)){b7.splice(cb,1);if(ci.selector){b7.delegateCount--}if(cg.remove){cg.remove.call(b8,ci)}}}if(ca&&!b7.length){if(!cg.teardown||cg.teardown.call(b8,e,cf.handle)===false){bM.removeEvent(b8,ch,cf.handle)}delete cj[ch]}}if(bM.isEmptyObject(cj)){delete cf.handle;bM._removeData(b8,"events")}},trigger:function(b6,cd,b9,ck){var ce,b8,ci,cj,cg,cc,cb,ca=[b9||l],ch=X.call(b6,"type")?b6.type:b6,b7=X.call(b6,"namespace")?b6.namespace.split("."):[];ci=cc=b9=b9||l;if(b9.nodeType===3||b9.nodeType===8){return}if(bE.test(ch+bM.event.triggered)){return}if(ch.indexOf(".")>=0){b7=ch.split(".");ch=b7.shift();b7.sort()}b8=ch.indexOf(":")<0&&"on"+ch;b6=b6[bM.expando]?b6:new bM.Event(ch,typeof b6==="object"&&b6);b6.isTrigger=true;b6.namespace=b7.join(".");b6.namespace_re=b6.namespace?new RegExp("(^|\\.)"+b7.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b6.result=aJ;if(!b6.target){b6.target=b9}cd=cd==null?[b6]:bM.makeArray(cd,[b6]);cg=bM.event.special[ch]||{};if(!ck&&cg.trigger&&cg.trigger.apply(b9,cd)===false){return}if(!ck&&!cg.noBubble&&!bM.isWindow(b9)){cj=cg.delegateType||ch;if(!bE.test(cj+ch)){ci=ci.parentNode}for(;ci;ci=ci.parentNode){ca.push(ci);cc=ci}if(cc===(b9.ownerDocument||l)){ca.push(cc.defaultView||cc.parentWindow||a5)}}cb=0;while((ci=ca[cb++])&&!b6.isPropagationStopped()){b6.type=cb>1?cj:cg.bindType||ch;ce=(bM._data(ci,"events")||{})[b6.type]&&bM._data(ci,"handle");if(ce){ce.apply(ci,cd)}ce=b8&&ci[b8];if(ce&&bM.acceptData(ci)&&ce.apply&&ce.apply(ci,cd)===false){b6.preventDefault()}}b6.type=ch;if(!ck&&!b6.isDefaultPrevented()){if((!cg._default||cg._default.apply(b9.ownerDocument,cd)===false)&&!(ch==="click"&&bM.nodeName(b9,"a"))&&bM.acceptData(b9)){if(b8&&b9[ch]&&!bM.isWindow(b9)){cc=b9[b8];if(cc){b9[b8]=null}bM.event.triggered=ch;try{b9[ch]()}catch(cf){}bM.event.triggered=aJ;if(cc){b9[b8]=cc}}}}return b6.result},dispatch:function(e){e=bM.event.fix(e);var b9,ca,ce,b6,b8,cd=[],cc=a7.call(arguments),b7=(bM._data(this,"events")||{})[e.type]||[],cb=bM.event.special[e.type]||{};cc[0]=e;e.delegateTarget=this;if(cb.preDispatch&&cb.preDispatch.call(this,e)===false){return}cd=bM.event.handlers.call(this,e,b7);b9=0;while((b6=cd[b9++])&&!e.isPropagationStopped()){e.currentTarget=b6.elem;b8=0;while((ce=b6.handlers[b8++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(ce.namespace)){e.handleObj=ce;e.data=ce.data;ca=((bM.event.special[ce.origType]||{}).handle||ce.handler).apply(b6.elem,cc);if(ca!==aJ){if((e.result=ca)===false){e.preventDefault();e.stopPropagation()}}}}}if(cb.postDispatch){cb.postDispatch.call(this,e)}return e.result},handlers:function(e,b7){var b6,cc,ca,b9,cb=[],b8=b7.delegateCount,cd=e.target;if(b8&&cd.nodeType&&(!e.button||e.type!=="click")){for(;cd!=this;cd=cd.parentNode||this){if(cd.nodeType===1&&(cd.disabled!==true||e.type!=="click")){ca=[];for(b9=0;b9<b8;b9++){cc=b7[b9];b6=cc.selector+" ";if(ca[b6]===aJ){ca[b6]=cc.needsContext?bM(b6,this).index(cd)>=0:bM.find(b6,this,null,[cd]).length}if(ca[b6]){ca.push(cc)}}if(ca.length){cb.push({elem:cd,handlers:ca})}}}}if(b8<b7.length){cb.push({elem:this,handlers:b7.slice(b8)})}return cb},fix:function(b8){if(b8[bM.expando]){return b8}var b6,cb,ca,b7=b8.type,e=b8,b9=this.fixHooks[b7];if(!b9){this.fixHooks[b7]=b9=bQ.test(b7)?this.mouseHooks:a6.test(b7)?this.keyHooks:{}}ca=b9.props?this.props.concat(b9.props):this.props;b8=new bM.Event(e);b6=ca.length;while(b6--){cb=ca[b6];b8[cb]=e[cb]}if(!b8.target){b8.target=e.srcElement||l}if(b8.target.nodeType===3){b8.target=b8.target.parentNode}b8.metaKey=!!b8.metaKey;return b9.filter?b9.filter(b8,e):b8},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(b6,e){if(b6.which==null){b6.which=e.charCode!=null?e.charCode:e.keyCode}return b6}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(b8,b7){var e,b9,ca,b6=b7.button,cb=b7.fromElement;if(b8.pageX==null&&b7.clientX!=null){b9=b8.target.ownerDocument||l;ca=b9.documentElement;e=b9.body;b8.pageX=b7.clientX+(ca&&ca.scrollLeft||e&&e.scrollLeft||0)-(ca&&ca.clientLeft||e&&e.clientLeft||0);b8.pageY=b7.clientY+(ca&&ca.scrollTop||e&&e.scrollTop||0)-(ca&&ca.clientTop||e&&e.clientTop||0)}if(!b8.relatedTarget&&cb){b8.relatedTarget=cb===b8.target?b7.toElement:cb}if(!b8.which&&b6!==aJ){b8.which=(b6&1?1:(b6&2?3:(b6&4?2:0)))}return b8}},special:{load:{noBubble:true},click:{trigger:function(){if(bM.nodeName(this,"input")&&this.type==="checkbox"&&this.click){this.click();return false}}},focus:{trigger:function(){if(this!==l.activeElement&&this.focus){try{this.focus();return false}catch(b6){}}},delegateType:"focusin"},blur:{trigger:function(){if(this===l.activeElement&&this.blur){this.blur();return false}},delegateType:"focusout"},beforeunload:{postDispatch:function(e){if(e.result!==aJ){e.originalEvent.returnValue=e.result}}}},simulate:function(b7,b9,b8,b6){var ca=bM.extend(new bM.Event(),b8,{type:b7,isSimulated:true,originalEvent:{}});if(b6){bM.event.trigger(ca,null,b9)}else{bM.event.dispatch.call(b9,ca)}if(ca.isDefaultPrevented()){b8.preventDefault()}}};bM.removeEvent=l.removeEventListener?function(b6,e,b7){if(b6.removeEventListener){b6.removeEventListener(e,b7,false)}}:function(b7,b6,b8){var e="on"+b6;if(b7.detachEvent){if(typeof b7[e]===aF){b7[e]=null}b7.detachEvent(e,b8)}};bM.Event=function(b6,e){if(!(this instanceof bM.Event)){return new bM.Event(b6,e)}if(b6&&b6.type){this.originalEvent=b6;this.type=b6.type;this.isDefaultPrevented=(b6.defaultPrevented||b6.returnValue===false||b6.getPreventDefault&&b6.getPreventDefault())?S:Z}else{this.type=b6}if(e){bM.extend(this,e)}this.timeStamp=b6&&b6.timeStamp||bM.now();this[bM.expando]=true};bM.Event.prototype={isDefaultPrevented:Z,isPropagationStopped:Z,isImmediatePropagationStopped:Z,preventDefault:function(){var b6=this.originalEvent;this.isDefaultPrevented=S;if(!b6){return}if(b6.preventDefault){b6.preventDefault()}else{b6.returnValue=false}},stopPropagation:function(){var b6=this.originalEvent;this.isPropagationStopped=S;if(!b6){return}if(b6.stopPropagation){b6.stopPropagation()}b6.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=S;this.stopPropagation()}};bM.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b6,e){bM.event.special[b6]={delegateType:e,bindType:e,handle:function(b9){var b7,cb=this,ca=b9.relatedTarget,b8=b9.handleObj;if(!ca||(ca!==cb&&!bM.contains(cb,ca))){b9.type=b8.origType;b7=b8.handler.apply(this,arguments);b9.type=e}return b7}}});if(!bM.support.submitBubbles){bM.event.special.submit={setup:function(){if(bM.nodeName(this,"form")){return false}bM.event.add(this,"click._submit keypress._submit",function(b8){var b7=b8.target,b6=bM.nodeName(b7,"input")||bM.nodeName(b7,"button")?b7.form:aJ;if(b6&&!bM._data(b6,"submitBubbles")){bM.event.add(b6,"submit._submit",function(e){e._submit_bubble=true});bM._data(b6,"submitBubbles",true)}})},postDispatch:function(e){if(e._submit_bubble){delete e._submit_bubble;if(this.parentNode&&!e.isTrigger){bM.event.simulate("submit",this.parentNode,e,true)}}},teardown:function(){if(bM.nodeName(this,"form")){return false}bM.event.remove(this,"._submit")}}}if(!bM.support.changeBubbles){bM.event.special.change={setup:function(){if(bK.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){bM.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});bM.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false}bM.event.simulate("change",this,e,true)})}return false}bM.event.add(this,"beforeactivate._change",function(b7){var b6=b7.target;if(bK.test(b6.nodeName)&&!bM._data(b6,"changeBubbles")){bM.event.add(b6,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){bM.event.simulate("change",this.parentNode,e,true)}});bM._data(b6,"changeBubbles",true)}})},handle:function(b6){var e=b6.target;if(this!==e||b6.isSimulated||b6.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return b6.handleObj.handler.apply(this,arguments)}},teardown:function(){bM.event.remove(this,"._change");return !bK.test(this.nodeName)}}}if(!bM.support.focusinBubbles){bM.each({focus:"focusin",blur:"focusout"},function(b8,e){var b6=0,b7=function(b9){bM.event.simulate(e,b9.target,bM.event.fix(b9),true)};bM.event.special[e]={setup:function(){if(b6++===0){l.addEventListener(b8,b7,true)}},teardown:function(){if(--b6===0){l.removeEventListener(b8,b7,true)}}}})}bM.fn.extend({on:function(b7,e,ca,b9,b6){var b8,cb;if(typeof b7==="object"){if(typeof e!=="string"){ca=ca||e;e=aJ}for(b8 in b7){this.on(b8,e,ca,b7[b8],b6)}return this}if(ca==null&&b9==null){b9=e;ca=e=aJ}else{if(b9==null){if(typeof e==="string"){b9=ca;ca=aJ}else{b9=ca;ca=e;e=aJ}}}if(b9===false){b9=Z}else{if(!b9){return this}}if(b6===1){cb=b9;b9=function(cc){bM().off(cc);return cb.apply(this,arguments)};b9.guid=cb.guid||(cb.guid=bM.guid++)}return this.each(function(){bM.event.add(this,b7,b9,ca,e)})},one:function(b6,e,b8,b7){return this.on(b6,e,b8,b7,1)},off:function(b7,e,b9){var b6,b8;if(b7&&b7.preventDefault&&b7.handleObj){b6=b7.handleObj;bM(b7.delegateTarget).off(b6.namespace?b6.origType+"."+b6.namespace:b6.origType,b6.selector,b6.handler);return this}if(typeof b7==="object"){for(b8 in b7){this.off(b8,e,b7[b8])}return this}if(e===false||typeof e==="function"){b9=e;e=aJ}if(b9===false){b9=Z}return this.each(function(){bM.event.remove(this,b7,b9,e)})},bind:function(e,b7,b6){return this.on(e,null,b7,b6)},unbind:function(e,b6){return this.off(e,null,b6)},delegate:function(e,b6,b8,b7){return this.on(b6,e,b8,b7)},undelegate:function(e,b6,b7){return arguments.length===1?this.off(e,"**"):this.off(b6,e||"**",b7)},trigger:function(e,b6){return this.each(function(){bM.event.trigger(e,b6,this)})},triggerHandler:function(e,b7){var b6=this[0];if(b6){return bM.event.trigger(e,b7,b6,true)}}});(function(dd,ck){var cA,ce,cq,cK,cM,cV,cW,dj,cY,cE,cr,cg,c2,de,cd,cI,cG,c8="sizzle"+-(new Date()),cL=dd.document,dg={},dh=0,c3=0,b8=cC(),c7=cC(),cJ=cC(),dc=typeof ck,cQ=1<<31,da=[],db=da.pop,b7=da.push,cp=da.slice,cc=da.indexOf||function(dl){var dk=0,e=this.length;for(;dk<e;dk++){if(this[dk]===dl){return dk}}return -1},cs="[\\x20\\t\\r\\n\\f]",b6="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",cN=b6.replace("w","w#"),cl="([*^$|!~]?=)",c5="\\["+cs+"*("+b6+")"+cs+"*(?:"+cl+cs+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+cN+")|)|)"+cs+"*\\]",cn=":("+b6+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+c5.replace(3,8)+")*)|.*)\\)|)",cu=new RegExp("^"+cs+"+|((?:^|[^\\\\])(?:\\\\.)*)"+cs+"+$","g"),cx=new RegExp("^"+cs+"*,"+cs+"*"),cD=new RegExp("^"+cs+"*([\\x20\\t\\r\\n\\f>+~])"+cs+"*"),cS=new RegExp(cn),cT=new RegExp("^"+cN+"$"),c1={ID:new RegExp("^#("+b6+")"),CLASS:new RegExp("^\\.("+b6+")"),NAME:new RegExp("^\\[name=['\"]?("+b6+")['\"]?\\]"),TAG:new RegExp("^("+b6.replace("w","w*")+")"),ATTR:new RegExp("^"+c5),PSEUDO:new RegExp("^"+cn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+cs+"*(even|odd|(([+-]|)(\\d*)n|)"+cs+"*(?:([+-]|)"+cs+"*(\\d+)|))"+cs+"*\\)|)","i"),needsContext:new RegExp("^"+cs+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+cs+"*((?:-\\d)?\\d*)"+cs+"*\\)|)(?=[^-]|$)","i")},cZ=/[\x20\t\r\n\f]*[+~]/,cP=/^[^{]+\{\s*\[native code/,cR=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,cb=/^(?:input|select|textarea|button)$/i,co=/^h\d$/i,cO=/'|\\/g,cw=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cv=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,c4=function(e,dl){var dk="0x"+dl-65536;return dk!==dk?dl:dk<0?String.fromCharCode(dk+65536):String.fromCharCode(dk>>10|55296,dk&1023|56320)};try{cp.call(cL.documentElement.childNodes,0)[0].nodeType}catch(cF){cp=function(dk){var dl,e=[];while((dl=this[dk++])){e.push(dl)}return e}}function cH(e){return cP.test(e+"")}function cC(){var e,dk=[];return(e=function(dl,dm){if(dk.push(dl+=" ")>cq.cacheLength){delete e[dk.shift()]}return(e[dl]=dm)})}function cm(e){e[c8]=true;return e}function cf(dk){var dm=cE.createElement("div");try{return dk(dm)}catch(dl){return false}finally{dm=null}}function cy(ds,dk,dw,dy){var dx,dp,dq,du,dv,dn,dm,e,dl,dt;if((dk?dk.ownerDocument||dk:cL)!==cE){cY(dk)}dk=dk||cE;dw=dw||[];if(!ds||typeof ds!=="string"){return dw}if((du=dk.nodeType)!==1&&du!==9){return[]}if(!cg&&!dy){if((dx=cR.exec(ds))){if((dq=dx[1])){if(du===9){dp=dk.getElementById(dq);if(dp&&dp.parentNode){if(dp.id===dq){dw.push(dp);return dw}}else{return dw}}else{if(dk.ownerDocument&&(dp=dk.ownerDocument.getElementById(dq))&&cI(dk,dp)&&dp.id===dq){dw.push(dp);return dw}}}else{if(dx[2]){b7.apply(dw,cp.call(dk.getElementsByTagName(ds),0));return dw}else{if((dq=dx[3])&&dg.getByClassName&&dk.getElementsByClassName){b7.apply(dw,cp.call(dk.getElementsByClassName(dq),0));return dw}}}}if(dg.qsa&&!c2.test(ds)){dm=true;e=c8;dl=dk;dt=du===9&&ds;if(du===1&&dk.nodeName.toLowerCase()!=="object"){dn=ci(ds);if((dm=dk.getAttribute("id"))){e=dm.replace(cO,"\\$&")}else{dk.setAttribute("id",e)}e="[id='"+e+"'] ";dv=dn.length;while(dv--){dn[dv]=e+cj(dn[dv])}dl=cZ.test(ds)&&dk.parentNode||dk;dt=dn.join(",")}if(dt){try{b7.apply(dw,cp.call(dl.querySelectorAll(dt),0));return dw}catch(dr){}finally{if(!dm){dk.removeAttribute("id")}}}}}return df(ds.replace(cu,"$1"),dk,dw,dy)}cM=cy.isXML=function(e){var dk=e&&(e.ownerDocument||e).documentElement;return dk?dk.nodeName!=="HTML":false};cY=cy.setDocument=function(e){var dk=e?e.ownerDocument||e:cL;if(dk===cE||dk.nodeType!==9||!dk.documentElement){return cE}cE=dk;cr=dk.documentElement;cg=cM(dk);dg.tagNameNoComments=cf(function(dl){dl.appendChild(dk.createComment(""));return !dl.getElementsByTagName("*").length});dg.attributes=cf(function(dm){dm.innerHTML="<select></select>";var dl=typeof dm.lastChild.getAttribute("multiple");return dl!=="boolean"&&dl!=="string"});dg.getByClassName=cf(function(dl){dl.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!dl.getElementsByClassName||!dl.getElementsByClassName("e").length){return false}dl.lastChild.className="e";return dl.getElementsByClassName("e").length===2});dg.getByName=cf(function(dm){dm.id=c8+0;dm.innerHTML="<a name='"+c8+"'></a><div name='"+c8+"'></div>";cr.insertBefore(dm,cr.firstChild);var dl=dk.getElementsByName&&dk.getElementsByName(c8).length===2+dk.getElementsByName(c8+0).length;dg.getIdNotName=!dk.getElementById(c8);cr.removeChild(dm);return dl});cq.attrHandle=cf(function(dl){dl.innerHTML="<a href='#'></a>";return dl.firstChild&&typeof dl.firstChild.getAttribute!==dc&&dl.firstChild.getAttribute("href")==="#"})?{}:{href:function(dl){return dl.getAttribute("href",2)},type:function(dl){return dl.getAttribute("type")}};if(dg.getIdNotName){cq.find.ID=function(dn,dm){if(typeof dm.getElementById!==dc&&!cg){var dl=dm.getElementById(dn);return dl&&dl.parentNode?[dl]:[]}};cq.filter.ID=function(dm){var dl=dm.replace(cv,c4);return function(dn){return dn.getAttribute("id")===dl}}}else{cq.find.ID=function(dn,dm){if(typeof dm.getElementById!==dc&&!cg){var dl=dm.getElementById(dn);return dl?dl.id===dn||typeof dl.getAttributeNode!==dc&&dl.getAttributeNode("id").value===dn?[dl]:ck:[]}};cq.filter.ID=function(dm){var dl=dm.replace(cv,c4);return function(dp){var dn=typeof dp.getAttributeNode!==dc&&dp.getAttributeNode("id");return dn&&dn.value===dl}}}cq.find.TAG=dg.tagNameNoComments?function(dl,dm){if(typeof dm.getElementsByTagName!==dc){return dm.getElementsByTagName(dl)}}:function(dl,dq){var dr,dp=[],dn=0,dm=dq.getElementsByTagName(dl);if(dl==="*"){while((dr=dm[dn++])){if(dr.nodeType===1){dp.push(dr)}}return dp}return dm};cq.find.NAME=dg.getByName&&function(dl,dm){if(typeof dm.getElementsByName!==dc){return dm.getElementsByName(name)}};cq.find.CLASS=dg.getByClassName&&function(dm,dl){if(typeof dl.getElementsByClassName!==dc&&!cg){return dl.getElementsByClassName(dm)}};de=[];c2=[":focus"];if((dg.qsa=cH(dk.querySelectorAll))){cf(function(dl){dl.innerHTML="<select><option selected=''></option></select>";if(!dl.querySelectorAll("[selected]").length){c2.push("\\["+cs+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!dl.querySelectorAll(":checked").length){c2.push(":checked")}});cf(function(dl){dl.innerHTML="<input type='hidden' i=''/>";if(dl.querySelectorAll("[i^='']").length){c2.push("[*^$]="+cs+"*(?:\"\"|'')")}if(!dl.querySelectorAll(":enabled").length){c2.push(":enabled",":disabled")}dl.querySelectorAll("*,:x");c2.push(",.*:")})}if((dg.matchesSelector=cH((cd=cr.matchesSelector||cr.mozMatchesSelector||cr.webkitMatchesSelector||cr.oMatchesSelector||cr.msMatchesSelector)))){cf(function(dl){dg.disconnectedMatch=cd.call(dl,"div");cd.call(dl,"[s!='']:x");de.push("!=",cn)})}c2=new RegExp(c2.join("|"));de=new RegExp(de.join("|"));cI=cH(cr.contains)||cr.compareDocumentPosition?function(dm,dl){var dp=dm.nodeType===9?dm.documentElement:dm,dn=dl&&dl.parentNode;return dm===dn||!!(dn&&dn.nodeType===1&&(dp.contains?dp.contains(dn):dm.compareDocumentPosition&&dm.compareDocumentPosition(dn)&16))}:function(dm,dl){if(dl){while((dl=dl.parentNode)){if(dl===dm){return true}}}return false};cG=cr.compareDocumentPosition?function(dm,dl){var dn;if(dm===dl){cW=true;return 0}if((dn=dl.compareDocumentPosition&&dm.compareDocumentPosition&&dm.compareDocumentPosition(dl))){if(dn&1||dm.parentNode&&dm.parentNode.nodeType===11){if(dm===dk||cI(cL,dm)){return -1}if(dl===dk||cI(cL,dl)){return 1}return 0}return dn&4?-1:1}return dm.compareDocumentPosition?-1:1}:function(dm,dl){var dt,dq=0,ds=dm.parentNode,dp=dl.parentNode,dn=[dm],dr=[dl];if(dm===dl){cW=true;return 0}else{if(!ds||!dp){return dm===dk?-1:dl===dk?1:ds?-1:dp?1:0}else{if(ds===dp){return b9(dm,dl)}}}dt=dm;while((dt=dt.parentNode)){dn.unshift(dt)}dt=dl;while((dt=dt.parentNode)){dr.unshift(dt)}while(dn[dq]===dr[dq]){dq++}return dq?b9(dn[dq],dr[dq]):dn[dq]===cL?-1:dr[dq]===cL?1:0};cW=false;[0,0].sort(cG);dg.detectDuplicates=cW;return cE};cy.matches=function(dk,e){return cy(dk,null,null,e)};cy.matchesSelector=function(dl,dn){if((dl.ownerDocument||dl)!==cE){cY(dl)}dn=dn.replace(cw,"='$1']");if(dg.matchesSelector&&!cg&&(!de||!de.test(dn))&&!c2.test(dn)){try{var dk=cd.call(dl,dn);if(dk||dg.disconnectedMatch||dl.document&&dl.document.nodeType!==11){return dk}}catch(dm){}}return cy(dn,cE,null,[dl]).length>0};cy.contains=function(e,dk){if((e.ownerDocument||e)!==cE){cY(e)}return cI(e,dk)};cy.attr=function(dk,e){var dl;if((dk.ownerDocument||dk)!==cE){cY(dk)}if(!cg){e=e.toLowerCase()}if((dl=cq.attrHandle[e])){return dl(dk)}if(cg||dg.attributes){return dk.getAttribute(e)}return((dl=dk.getAttributeNode(e))||dk.getAttribute(e))&&dk[e]===true?e:dl&&dl.specified?dl.value:null};cy.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};cy.uniqueSort=function(dl){var dm,dn=[],dk=1,e=0;cW=!dg.detectDuplicates;dl.sort(cG);if(cW){for(;(dm=dl[dk]);dk++){if(dm===dl[dk-1]){e=dn.push(dk)}}while(e--){dl.splice(dn[e],1)}}return dl};function b9(dk,e){var dm=e&&dk,dl=dm&&(~e.sourceIndex||cQ)-(~dk.sourceIndex||cQ);if(dl){return dl}if(dm){while((dm=dm.nextSibling)){if(dm===e){return -1}}}return dk?1:-1}function cz(e){return function(dl){var dk=dl.nodeName.toLowerCase();return dk==="input"&&dl.type===e}}function ca(e){return function(dl){var dk=dl.nodeName.toLowerCase();return(dk==="input"||dk==="button")&&dl.type===e}}function c6(e){return cm(function(dk){dk=+dk;return cm(function(dl,dq){var dn,dm=e([],dl.length,dk),dp=dm.length;while(dp--){if(dl[(dn=dm[dp])]){dl[dn]=!(dq[dn]=dl[dn])}}})})}cK=cy.getText=function(dn){var dm,dk="",dl=0,e=dn.nodeType;if(!e){for(;(dm=dn[dl]);dl++){dk+=cK(dm)}}else{if(e===1||e===9||e===11){if(typeof dn.textContent==="string"){return dn.textContent}else{for(dn=dn.firstChild;dn;dn=dn.nextSibling){dk+=cK(dn)}}}else{if(e===3||e===4){return dn.nodeValue}}}return dk};cq=cy.selectors={cacheLength:50,createPseudo:cm,match:c1,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cv,c4);e[3]=(e[4]||e[5]||"").replace(cv,c4);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){cy.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){cy.error(e[0])}}return e},PSEUDO:function(dk){var e,dl=!dk[5]&&dk[2];if(c1.CHILD.test(dk[0])){return null}if(dk[4]){dk[2]=dk[4]}else{if(dl&&cS.test(dl)&&(e=ci(dl,true))&&(e=dl.indexOf(")",dl.length-e)-dl.length)){dk[0]=dk[0].slice(0,e);dk[2]=dl.slice(0,e)}}return dk.slice(0,3)}},filter:{TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(cv,c4).toLowerCase();return function(dk){return dk.nodeName&&dk.nodeName.toLowerCase()===e}},CLASS:function(e){var dk=b8[e+" "];return dk||(dk=new RegExp("(^|"+cs+")"+e+"("+cs+"|$)"))&&b8(e,function(dl){return dk.test(dl.className||(typeof dl.getAttribute!==dc&&dl.getAttribute("class"))||"")})},ATTR:function(dl,dk,e){return function(dn){var dm=cy.attr(dn,dl);if(dm==null){return dk==="!="}if(!dk){return true}dm+="";return dk==="="?dm===e:dk==="!="?dm!==e:dk==="^="?e&&dm.indexOf(e)===0:dk==="*="?e&&dm.indexOf(e)>-1:dk==="$="?e&&dm.slice(-e.length)===e:dk==="~="?(" "+dm+" ").indexOf(e)>-1:dk==="|="?dm===e||dm.slice(0,e.length+1)===e+"-":false}},CHILD:function(dk,dn,dm,dp,dl){var dr=dk.slice(0,3)!=="nth",e=dk.slice(-4)!=="last",dq=dn==="of-type";return dp===1&&dl===0?function(ds){return !!ds.parentNode}:function(dy,dw,dB){var ds,dE,dz,dD,dA,dv,dx=dr!==e?"nextSibling":"previousSibling",dC=dy.parentNode,du=dq&&dy.nodeName.toLowerCase(),dt=!dB&&!dq;if(dC){if(dr){while(dx){dz=dy;while((dz=dz[dx])){if(dq?dz.nodeName.toLowerCase()===du:dz.nodeType===1){return false}}dv=dx=dk==="only"&&!dv&&"nextSibling"}return true}dv=[e?dC.firstChild:dC.lastChild];if(e&&dt){dE=dC[c8]||(dC[c8]={});ds=dE[dk]||[];dA=ds[0]===dh&&ds[1];dD=ds[0]===dh&&ds[2];dz=dA&&dC.childNodes[dA];while((dz=++dA&&dz&&dz[dx]||(dD=dA=0)||dv.pop())){if(dz.nodeType===1&&++dD&&dz===dy){dE[dk]=[dh,dA,dD];break}}}else{if(dt&&(ds=(dy[c8]||(dy[c8]={}))[dk])&&ds[0]===dh){dD=ds[1]}else{while((dz=++dA&&dz&&dz[dx]||(dD=dA=0)||dv.pop())){if((dq?dz.nodeName.toLowerCase()===du:dz.nodeType===1)&&++dD){if(dt){(dz[c8]||(dz[c8]={}))[dk]=[dh,dD]}if(dz===dy){break}}}}}dD-=dl;return dD===dp||(dD%dp===0&&dD/dp>=0)}}},PSEUDO:function(dm,dl){var e,dk=cq.pseudos[dm]||cq.setFilters[dm.toLowerCase()]||cy.error("unsupported pseudo: "+dm);if(dk[c8]){return dk(dl)}if(dk.length>1){e=[dm,dm,"",dl];return cq.setFilters.hasOwnProperty(dm.toLowerCase())?cm(function(dq,ds){var dp,dn=dk(dq,dl),dr=dn.length;while(dr--){dp=cc.call(dq,dn[dr]);dq[dp]=!(ds[dp]=dn[dr])}}):function(dn){return dk(dn,0,e)}}return dk}},pseudos:{not:cm(function(e){var dk=[],dl=[],dm=cV(e.replace(cu,"$1"));return dm[c8]?cm(function(dp,du,ds,dq){var dt,dn=dm(dp,null,dq,[]),dr=dp.length;while(dr--){if((dt=dn[dr])){dp[dr]=!(du[dr]=dt)}}}):function(dq,dp,dn){dk[0]=dq;dm(dk,null,dn,dl);return !dl.pop()}}),has:cm(function(e){return function(dk){return cy(e,dk).length>0}}),contains:cm(function(e){return function(dk){return(dk.textContent||dk.innerText||cK(dk)).indexOf(e)>-1}}),lang:cm(function(e){if(!cT.test(e||"")){cy.error("unsupported lang: "+e)}e=e.replace(cv,c4).toLowerCase();return function(dl){var dk;do{if((dk=cg?dl.getAttribute("xml:lang")||dl.getAttribute("lang"):dl.lang)){dk=dk.toLowerCase();return dk===e||dk.indexOf(e+"-")===0}}while((dl=dl.parentNode)&&dl.nodeType===1);return false}}),target:function(e){var dk=dd.location&&dd.location.hash;return dk&&dk.slice(1)===e.id},root:function(e){return e===cr},focus:function(e){return e===cE.activeElement&&(!cE.hasFocus||cE.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var dk=e.nodeName.toLowerCase();return(dk==="input"&&!!e.checked)||(dk==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},parent:function(e){return !cq.pseudos.empty(e)},header:function(e){return co.test(e.nodeName)},input:function(e){return cb.test(e.nodeName)},button:function(dk){var e=dk.nodeName.toLowerCase();return e==="input"&&dk.type==="button"||e==="button"},text:function(dk){var e;return dk.nodeName.toLowerCase()==="input"&&dk.type==="text"&&((e=dk.getAttribute("type"))==null||e.toLowerCase()===dk.type)},first:c6(function(){return[0]}),last:c6(function(e,dk){return[dk-1]}),eq:c6(function(e,dl,dk){return[dk<0?dk+dl:dk]}),even:c6(function(e,dl){var dk=0;for(;dk<dl;dk+=2){e.push(dk)}return e}),odd:c6(function(e,dl){var dk=1;for(;dk<dl;dk+=2){e.push(dk)}return e}),lt:c6(function(e,dm,dl){var dk=dl<0?dl+dm:dl;for(;--dk>=0;){e.push(dk)}return e}),gt:c6(function(e,dm,dl){var dk=dl<0?dl+dm:dl;for(;++dk<dm;){e.push(dk)}return e})}};for(cA in {radio:true,checkbox:true,file:true,password:true,image:true}){cq.pseudos[cA]=cz(cA)}for(cA in {submit:true,reset:true}){cq.pseudos[cA]=ca(cA)}function ci(dn,dt){var dk,dp,dr,ds,dq,dl,e,dm=c7[dn+" "];if(dm){return dt?0:dm.slice(0)}dq=dn;dl=[];e=cq.preFilter;while(dq){if(!dk||(dp=cx.exec(dq))){if(dp){dq=dq.slice(dp[0].length)||dq}dl.push(dr=[])}dk=false;if((dp=cD.exec(dq))){dk=dp.shift();dr.push({value:dk,type:dp[0].replace(cu," ")});dq=dq.slice(dk.length)}for(ds in cq.filter){if((dp=c1[ds].exec(dq))&&(!e[ds]||(dp=e[ds](dp)))){dk=dp.shift();dr.push({value:dk,type:ds,matches:dp});dq=dq.slice(dk.length)}}if(!dk){break}}return dt?dq.length:dq?cy.error(dn):c7(dn,dl).slice(0)}function cj(dm){var dl=0,dk=dm.length,e="";for(;dl<dk;dl++){e+=dm[dl].value}return e}function ct(dn,dl,dm){var e=dl.dir,dp=dm&&e==="parentNode",dk=c3++;return dl.first?function(ds,dr,dq){while((ds=ds[e])){if(ds.nodeType===1||dp){return dn(ds,dr,dq)}}}:function(du,ds,dr){var dw,dq,dt,dv=dh+" "+dk;if(dr){while((du=du[e])){if(du.nodeType===1||dp){if(dn(du,ds,dr)){return true}}}}else{while((du=du[e])){if(du.nodeType===1||dp){dt=du[c8]||(du[c8]={});if((dq=dt[e])&&dq[0]===dv){if((dw=dq[1])===true||dw===ce){return dw===true}}else{dq=dt[e]=[dv];dq[1]=dn(du,ds,dr)||ce;if(dq[1]===true){return true}}}}}}}function di(e){return e.length>1?function(dn,dm,dk){var dl=e.length;while(dl--){if(!e[dl](dn,dm,dk)){return false}}return true}:e[0]}function c0(e,dk,dl,dm,dq){var dn,dt=[],dp=0,dr=e.length,ds=dk!=null;for(;dp<dr;dp++){if((dn=e[dp])){if(!dl||dl(dn,dm,dq)){dt.push(dn);if(ds){dk.push(dp)}}}}return dt}function ch(dl,dk,dn,dm,dp,e){if(dm&&!dm[c8]){dm=ch(dm)}if(dp&&!dp[c8]){dp=ch(dp,e)}return cm(function(dA,dx,ds,dz){var dC,dy,du,dt=[],dB=[],dr=dx.length,dq=dA||cB(dk||"*",ds.nodeType?[ds]:ds,[]),dv=dl&&(dA||!dk)?c0(dq,dt,dl,ds,dz):dq,dw=dn?dp||(dA?dl:dr||dm)?[]:dx:dv;if(dn){dn(dv,dw,ds,dz)}if(dm){dC=c0(dw,dB);dm(dC,[],ds,dz);dy=dC.length;while(dy--){if((du=dC[dy])){dw[dB[dy]]=!(dv[dB[dy]]=du)}}}if(dA){if(dp||dl){if(dp){dC=[];dy=dw.length;while(dy--){if((du=dw[dy])){dC.push((dv[dy]=du))}}dp(null,(dw=[]),dC,dz)}dy=dw.length;while(dy--){if((du=dw[dy])&&(dC=dp?cc.call(dA,du):dt[dy])>-1){dA[dC]=!(dx[dC]=du)}}}}else{dw=c0(dw===dx?dw.splice(dr,dw.length):dw);if(dp){dp(null,dx,dw,dz)}else{b7.apply(dx,dw)}}})}function c9(dq){var dk,dn,dl,dp=dq.length,dt=cq.relative[dq[0].type],du=dt||cq.relative[" "],dm=dt?1:0,dr=ct(function(dv){return dv===dk},du,true),ds=ct(function(dv){return cc.call(dk,dv)>-1},du,true),e=[function(dx,dw,dv){return(!dt&&(dv||dw!==dj))||((dk=dw).nodeType?dr(dx,dw,dv):ds(dx,dw,dv))}];for(;dm<dp;dm++){if((dn=cq.relative[dq[dm].type])){e=[ct(di(e),dn)]}else{dn=cq.filter[dq[dm].type].apply(null,dq[dm].matches);if(dn[c8]){dl=++dm;for(;dl<dp;dl++){if(cq.relative[dq[dl].type]){break}}return ch(dm>1&&di(e),dm>1&&cj(dq.slice(0,dm-1)).replace(cu,"$1"),dn,dm<dl&&c9(dq.slice(dm,dl)),dl<dp&&c9((dq=dq.slice(dl))),dl<dp&&cj(dq))}e.push(dn)}}return di(e)}function cX(dm,dl){var dp=0,e=dl.length>0,dn=dm.length>0,dk=function(dz,dt,dy,dx,dF){var du,dv,dA,dE=[],dD=0,dw="0",dq=dz&&[],dB=dF!=null,dC=dj,ds=dz||dn&&cq.find.TAG("*",dF&&dt.parentNode||dt),dr=(dh+=dC==null?1:Math.random()||0.1);if(dB){dj=dt!==cE&&dt;ce=dp}for(;(du=ds[dw])!=null;dw++){if(dn&&du){dv=0;while((dA=dm[dv++])){if(dA(du,dt,dy)){dx.push(du);break}}if(dB){dh=dr;ce=++dp}}if(e){if((du=!dA&&du)){dD--}if(dz){dq.push(du)}}}dD+=dw;if(e&&dw!==dD){dv=0;while((dA=dl[dv++])){dA(dq,dE,dt,dy)}if(dz){if(dD>0){while(dw--){if(!(dq[dw]||dE[dw])){dE[dw]=db.call(dx)}}}dE=c0(dE)}b7.apply(dx,dE);if(dB&&!dz&&dE.length>0&&(dD+dl.length)>1){cy.uniqueSort(dx)}}if(dB){dh=dr;dj=dC}return dq};return e?cm(dk):dk}cV=cy.compile=function(e,dp){var dl,dk=[],dn=[],dm=cJ[e+" "];if(!dm){if(!dp){dp=ci(e)}dl=dp.length;while(dl--){dm=c9(dp[dl]);if(dm[c8]){dk.push(dm)}else{dn.push(dm)}}dm=cJ(e,cX(dn,dk))}return dm};function cB(dk,dn,dm){var dl=0,e=dn.length;for(;dl<e;dl++){cy(dk,dn[dl],dm)}return dm}function df(dl,e,dm,dq){var dn,ds,dk,dt,dr,dp=ci(dl);if(!dq){if(dp.length===1){ds=dp[0]=dp[0].slice(0);if(ds.length>2&&(dk=ds[0]).type==="ID"&&e.nodeType===9&&!cg&&cq.relative[ds[1].type]){e=cq.find.ID(dk.matches[0].replace(cv,c4),e)[0];if(!e){return dm}dl=dl.slice(ds.shift().value.length)}dn=c1.needsContext.test(dl)?0:ds.length;while(dn--){dk=ds[dn];if(cq.relative[(dt=dk.type)]){break}if((dr=cq.find[dt])){if((dq=dr(dk.matches[0].replace(cv,c4),cZ.test(ds[0].type)&&e.parentNode||e))){ds.splice(dn,1);dl=dq.length&&cj(ds);if(!dl){b7.apply(dm,cp.call(dq,0));return dm}break}}}}}cV(dl,dp)(dq,e,cg,dm,cZ.test(dl));return dm}cq.pseudos.nth=cq.pseudos.eq;function cU(){}cq.filters=cU.prototype=cq.pseudos;cq.setFilters=new cU();cY();cy.attr=bM.attr;bM.find=cy;bM.expr=cy.selectors;bM.expr[":"]=bM.expr.pseudos;bM.unique=cy.uniqueSort;bM.text=cy.getText;bM.isXMLDoc=cy.isXML;bM.contains=cy.contains})(a5);var al=/Until$/,bw=/^(?:parents|prev(?:Until|All))/,ap=/^.[^:#\[\.,]*$/,z=bM.expr.match.needsContext,bA={children:true,contents:true,next:true,prev:true};bM.fn.extend({find:function(b6){var b9,b8,b7,e=this.length;if(typeof b6!=="string"){b7=this;return this.pushStack(bM(b6).filter(function(){for(b9=0;b9<e;b9++){if(bM.contains(b7[b9],this)){return true}}}))}b8=[];for(b9=0;b9<e;b9++){bM.find(b6,this[b9],b8)}b8=this.pushStack(e>1?bM.unique(b8):b8);b8.selector=(this.selector?this.selector+" ":"")+b6;return b8},has:function(b8){var b7,b6=bM(b8,this),e=b6.length;return this.filter(function(){for(b7=0;b7<e;b7++){if(bM.contains(this,b6[b7])){return true}}})},not:function(e){return this.pushStack(aR(this,e,false))},filter:function(e){return this.pushStack(aR(this,e,true))},is:function(e){return !!e&&(typeof e==="string"?z.test(e)?bM(e,this.context).index(this[0])>=0:bM.filter(e,this).length>0:this.filter(e).length>0)},closest:function(b9,b8){var ca,b7=0,e=this.length,b6=[],cb=z.test(b9)||typeof b9!=="string"?bM(b9,b8||this.context):0;for(;b7<e;b7++){ca=this[b7];while(ca&&ca.ownerDocument&&ca!==b8&&ca.nodeType!==11){if(cb?cb.index(ca)>-1:bM.find.matchesSelector(ca,b9)){b6.push(ca);break}ca=ca.parentNode}}return this.pushStack(b6.length>1?bM.unique(b6):b6)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof e==="string"){return bM.inArray(this[0],bM(e))}return bM.inArray(e.jquery?e[0]:e,this)},add:function(e,b6){var b8=typeof e==="string"?bM(e,b6):bM.makeArray(e&&e.nodeType?[e]:e),b7=bM.merge(this.get(),b8);return this.pushStack(bM.unique(b7))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bM.fn.andSelf=bM.fn.addBack;function a0(b6,e){do{b6=b6[e]}while(b6&&b6.nodeType!==1);return b6}bM.each({parent:function(b6){var e=b6.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bM.dir(e,"parentNode")},parentsUntil:function(b6,e,b7){return bM.dir(b6,"parentNode",b7)},next:function(e){return a0(e,"nextSibling")},prev:function(e){return a0(e,"previousSibling")},nextAll:function(e){return bM.dir(e,"nextSibling")},prevAll:function(e){return bM.dir(e,"previousSibling")},nextUntil:function(b6,e,b7){return bM.dir(b6,"nextSibling",b7)},prevUntil:function(b6,e,b7){return bM.dir(b6,"previousSibling",b7)},siblings:function(e){return bM.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bM.sibling(e.firstChild)},contents:function(e){return bM.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bM.merge([],e.childNodes)}},function(e,b6){bM.fn[e]=function(b9,b7){var b8=bM.map(this,b6,b9);if(!al.test(e)){b7=b9}if(b7&&typeof b7==="string"){b8=bM.filter(b7,b8)}b8=this.length>1&&!bA[e]?bM.unique(b8):b8;if(this.length>1&&bw.test(e)){b8=b8.reverse()}return this.pushStack(b8)}});bM.extend({filter:function(b7,e,b6){if(b6){b7=":not("+b7+")"}return e.length===1?bM.find.matchesSelector(e[0],b7)?[e[0]]:[]:bM.find.matches(b7,e)},dir:function(b7,b6,b9){var e=[],b8=b7[b6];while(b8&&b8.nodeType!==9&&(b9===aJ||b8.nodeType!==1||!bM(b8).is(b9))){if(b8.nodeType===1){e.push(b8)}b8=b8[b6]}return e},sibling:function(b7,b6){var e=[];for(;b7;b7=b7.nextSibling){if(b7.nodeType===1&&b7!==b6){e.push(b7)}}return e}});function aR(b8,b7,e){b7=b7||0;if(bM.isFunction(b7)){return bM.grep(b8,function(ca,b9){var cb=!!b7.call(ca,b9,ca);return cb===e})}else{if(b7.nodeType){return bM.grep(b8,function(b9){return(b9===b7)===e})}else{if(typeof b7==="string"){var b6=bM.grep(b8,function(b9){return b9.nodeType===1});if(ap.test(b7)){return bM.filter(b7,b6,!e)}else{b7=bM.filter(b7,b6)}}}}return bM.grep(b8,function(b9){return(bM.inArray(b9,b7)>=0)===e})}function B(e){var b7=d.split("|"),b6=e.createDocumentFragment();if(b6.createElement){while(b7.length){b6.createElement(b7.pop())}}return b6}var d="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aD=/ jQuery\d+="(?:null|\d+)"/g,K=new RegExp("<(?:"+d+")[\\s/>]","i"),b5=/^\s+/,aG=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/<([\w:]+)/,b0=/<tbody/i,J=/<|&#?\w+;/,an=/<(?:script|style|link)/i,q=/^(?:checkbox|radio)$/i,bX=/checked\s*(?:[^=]|=\s*.checked.)/i,bC=/^$|\/(?:java|ecma)script/i,av=/^true\/(.*)/,aN=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,V={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:bM.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},aV=B(l),j=aV.appendChild(l.createElement("div"));V.optgroup=V.option;V.tbody=V.tfoot=V.colgroup=V.caption=V.thead;V.th=V.td;bM.fn.extend({text:function(e){return bM.access(this,function(b6){return b6===aJ?bM.text(this):this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(b6))},null,e,arguments.length)},wrapAll:function(e){if(bM.isFunction(e)){return this.each(function(b7){bM(this).wrapAll(e.call(this,b7))})}if(this[0]){var b6=bM(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b6.insertBefore(this[0])}b6.map(function(){var b7=this;while(b7.firstChild&&b7.firstChild.nodeType===1){b7=b7.firstChild}return b7}).append(this)}return this},wrapInner:function(e){if(bM.isFunction(e)){return this.each(function(b6){bM(this).wrapInner(e.call(this,b6))})}return this.each(function(){var b6=bM(this),b7=b6.contents();if(b7.length){b7.wrapAll(e)}else{b6.append(e)}})},wrap:function(e){var b6=bM.isFunction(e);return this.each(function(b7){bM(this).wrapAll(b6?e.call(this,b7):e)})},unwrap:function(){return this.parent().each(function(){if(!bM.nodeName(this,"body")){bM(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.insertBefore(e,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},remove:function(e,b8){var b7,b6=0;for(;(b7=this[b6])!=null;b6++){if(!e||bM.filter(e,[b7]).length>0){if(!b8&&b7.nodeType===1){bM.cleanData(k(b7))}if(b7.parentNode){if(b8&&bM.contains(b7.ownerDocument,b7)){bv(k(b7,"script"))}b7.parentNode.removeChild(b7)}}}return this},empty:function(){var b6,e=0;for(;(b6=this[e])!=null;e++){if(b6.nodeType===1){bM.cleanData(k(b6,false))}while(b6.firstChild){b6.removeChild(b6.firstChild)}if(b6.options&&bM.nodeName(b6,"select")){b6.options.length=0}}return this},clone:function(b6,e){b6=b6==null?false:b6;e=e==null?b6:e;return this.map(function(){return bM.clone(this,b6,e)})},html:function(e){return bM.access(this,function(b9){var b8=this[0]||{},b7=0,b6=this.length;if(b9===aJ){return b8.nodeType===1?b8.innerHTML.replace(aD,""):aJ}if(typeof b9==="string"&&!an.test(b9)&&(bM.support.htmlSerialize||!K.test(b9))&&(bM.support.leadingWhitespace||!b5.test(b9))&&!V[(m.exec(b9)||["",""])[1].toLowerCase()]){b9=b9.replace(aG,"<$1></$2>");try{for(;b7<b6;b7++){b8=this[b7]||{};if(b8.nodeType===1){bM.cleanData(k(b8,false));b8.innerHTML=b9}}b8=0}catch(ca){}}if(b8){this.empty().append(b9)}},null,e,arguments.length)},replaceWith:function(b6){var e=bM.isFunction(b6);if(!e&&typeof b6!=="string"){b6=bM(b6).not(this).detach()}return this.domManip([b6],true,function(b9){var b8=this.nextSibling,b7=this.parentNode;if(b7){bM(this).remove();b7.insertBefore(b9,b8)}})},detach:function(e){return this.remove(e,true)},domManip:function(cd,cj,ci){cd=aL.apply([],cd);var cb,b7,e,b9,cg,cc,ca=0,b8=this.length,cf=this,ch=b8-1,ce=cd[0],b6=bM.isFunction(ce);if(b6||!(b8<=1||typeof ce!=="string"||bM.support.checkClone||!bX.test(ce))){return this.each(function(cl){var ck=cf.eq(cl);if(b6){cd[0]=ce.call(this,cl,cj?ck.html():aJ)}ck.domManip(cd,cj,ci)})}if(b8){cc=bM.buildFragment(cd,this[0].ownerDocument,false,this);cb=cc.firstChild;if(cc.childNodes.length===1){cc=cb}if(cb){cj=cj&&bM.nodeName(cb,"tr");b9=bM.map(k(cc,"script"),u);e=b9.length;for(;ca<b8;ca++){b7=cc;if(ca!==ch){b7=bM.clone(b7,true,true);if(e){bM.merge(b9,k(b7,"script"))}}ci.call(cj&&bM.nodeName(this[ca],"table")?y(this[ca],"tbody"):this[ca],b7,ca)}if(e){cg=b9[b9.length-1].ownerDocument;bM.map(b9,bf);for(ca=0;ca<e;ca++){b7=b9[ca];if(bC.test(b7.type||"")&&!bM._data(b7,"globalEval")&&bM.contains(cg,b7)){if(b7.src){bM.ajax({url:b7.src,type:"GET",dataType:"script",async:false,global:false,"throws":true})}else{bM.globalEval((b7.text||b7.textContent||b7.innerHTML||"").replace(aN,""))}}}}cc=cb=null}}return this}});function y(b6,e){return b6.getElementsByTagName(e)[0]||b6.appendChild(b6.ownerDocument.createElement(e))}function u(b6){var e=b6.getAttributeNode("type");b6.type=(e&&e.specified)+"/"+b6.type;return b6}function bf(b6){var e=av.exec(b6.type);if(e){b6.type=e[1]}else{b6.removeAttribute("type")}return b6}function bv(e,b7){var b8,b6=0;for(;(b8=e[b6])!=null;b6++){bM._data(b8,"globalEval",!b7||bM._data(b7[b6],"globalEval"))}}function aw(cc,b6){if(b6.nodeType!==1||!bM.hasData(cc)){return}var b9,b8,e,cb=bM._data(cc),ca=bM._data(b6,cb),b7=cb.events;if(b7){delete ca.handle;ca.events={};for(b9 in b7){for(b8=0,e=b7[b9].length;b8<e;b8++){bM.event.add(b6,b9,b7[b9][b8])}}}if(ca.data){ca.data=bM.extend({},ca.data)}}function R(b9,b6){var ca,b8,b7;if(b6.nodeType!==1){return}ca=b6.nodeName.toLowerCase();if(!bM.support.noCloneEvent&&b6[bM.expando]){b7=bM._data(b6);for(b8 in b7.events){bM.removeEvent(b6,b8,b7.handle)}b6.removeAttribute(bM.expando)}if(ca==="script"&&b6.text!==b9.text){u(b6).text=b9.text;bf(b6)}else{if(ca==="object"){if(b6.parentNode){b6.outerHTML=b9.outerHTML}if(bM.support.html5Clone&&(b9.innerHTML&&!bM.trim(b6.innerHTML))){b6.innerHTML=b9.innerHTML}}else{if(ca==="input"&&q.test(b9.type)){b6.defaultChecked=b6.checked=b9.checked;if(b6.value!==b9.value){b6.value=b9.value}}else{if(ca==="option"){b6.defaultSelected=b6.selected=b9.defaultSelected}else{if(ca==="input"||ca==="textarea"){b6.defaultValue=b9.defaultValue}}}}}}bM.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,b6){bM.fn[e]=function(b7){var b8,ca=0,b9=[],cc=bM(b7),cb=cc.length-1;for(;ca<=cb;ca++){b8=ca===cb?this:this.clone(true);bM(cc[ca])[b6](b8);aq.apply(b9,b8.get())}return this.pushStack(b9)}});function k(b8,e){var b6,b9,b7=0,ca=typeof b8.getElementsByTagName!==aF?b8.getElementsByTagName(e||"*"):typeof b8.querySelectorAll!==aF?b8.querySelectorAll(e||"*"):aJ;if(!ca){for(ca=[],b6=b8.childNodes||b8;(b9=b6[b7])!=null;b7++){if(!e||bM.nodeName(b9,e)){ca.push(b9)}else{bM.merge(ca,k(b9,e))}}}return e===aJ||e&&bM.nodeName(b8,e)?bM.merge([b8],ca):ca}function bY(e){if(q.test(e.type)){e.defaultChecked=e.checked}}bM.extend({clone:function(b6,b8,e){var ca,b7,cd,b9,cb,cc=bM.contains(b6.ownerDocument,b6);if(bM.support.html5Clone||bM.isXMLDoc(b6)||!K.test("<"+b6.nodeName+">")){cd=b6.cloneNode(true)}else{j.innerHTML=b6.outerHTML;j.removeChild(cd=j.firstChild)}if((!bM.support.noCloneEvent||!bM.support.noCloneChecked)&&(b6.nodeType===1||b6.nodeType===11)&&!bM.isXMLDoc(b6)){ca=k(cd);cb=k(b6);for(b9=0;(b7=cb[b9])!=null;++b9){if(ca[b9]){R(b7,ca[b9])}}}if(b8){if(e){cb=cb||k(b6);ca=ca||k(cd);for(b9=0;(b7=cb[b9])!=null;b9++){aw(b7,ca[b9])}}else{aw(b6,cd)}}ca=k(cd,"script");if(ca.length>0){bv(ca,!cc&&k(b6,"script"))}ca=cb=b7=null;return cd},buildFragment:function(b6,b8,cd,ci){var ce,ca,cc,ch,cj,cg,b7,cb=b6.length,b9=B(b8),e=[],cf=0;for(;cf<cb;cf++){ca=b6[cf];if(ca||ca===0){if(bM.type(ca)==="object"){bM.merge(e,ca.nodeType?[ca]:ca)}else{if(!J.test(ca)){e.push(b8.createTextNode(ca))}else{ch=ch||b9.appendChild(b8.createElement("div"));cj=(m.exec(ca)||["",""])[1].toLowerCase();b7=V[cj]||V._default;ch.innerHTML=b7[1]+ca.replace(aG,"<$1></$2>")+b7[2];ce=b7[0];while(ce--){ch=ch.lastChild}if(!bM.support.leadingWhitespace&&b5.test(ca)){e.push(b8.createTextNode(b5.exec(ca)[0]))}if(!bM.support.tbody){ca=cj==="table"&&!b0.test(ca)?ch.firstChild:b7[1]==="<table>"&&!b0.test(ca)?ch:0;ce=ca&&ca.childNodes.length;while(ce--){if(bM.nodeName((cg=ca.childNodes[ce]),"tbody")&&!cg.childNodes.length){ca.removeChild(cg)}}}bM.merge(e,ch.childNodes);ch.textContent="";while(ch.firstChild){ch.removeChild(ch.firstChild)}ch=b9.lastChild}}}}if(ch){b9.removeChild(ch)}if(!bM.support.appendChecked){bM.grep(k(e,"input"),bY)}cf=0;while((ca=e[cf++])){if(ci&&bM.inArray(ca,ci)!==-1){continue}cc=bM.contains(ca.ownerDocument,ca);ch=k(b9.appendChild(ca),"script");if(cc){bv(ch)}if(cd){ce=0;while((ca=ch[ce++])){if(bC.test(ca.type||"")){cd.push(ca)}}}}ch=null;return b9},cleanData:function(b6,ce){var b8,cd,b7,b9,ca=0,cf=bM.expando,e=bM.cache,cb=bM.support.deleteExpando,cc=bM.event.special;for(;(b8=b6[ca])!=null;ca++){if(ce||bM.acceptData(b8)){b7=b8[cf];b9=b7&&e[b7];if(b9){if(b9.events){for(cd in b9.events){if(cc[cd]){bM.event.remove(b8,cd)}else{bM.removeEvent(b8,cd,b9.handle)}}}if(e[b7]){delete e[b7];if(cb){delete b8[cf]}else{if(typeof b8.removeAttribute!==aF){b8.removeAttribute(cf)}else{b8[cf]=null}}a9.push(b7)}}}}}});var aH,br,F,bj=/alpha\([^)]*\)/i,aW=/opacity\s*=\s*([^)]*)/,bq=/^(top|right|bottom|left)$/,G=/^(none|table(?!-c[ea]).+)/,a1=/^margin/,bc=new RegExp("^("+bD+")(.*)$","i"),Y=new RegExp("^("+bD+")(?!px)[a-z%]+$","i"),U=new RegExp("^([+-])=("+bD+")","i"),bm={BODY:"block"},be={position:"absolute",visibility:"hidden",display:"block"},bF={letterSpacing:0,fontWeight:400},bW=["Top","Right","Bottom","Left"],ay=["Webkit","O","Moz","ms"];function b(b8,b6){if(b6 in b8){return b6}var b9=b6.charAt(0).toUpperCase()+b6.slice(1),e=b6,b7=ay.length;while(b7--){b6=ay[b7]+b9;if(b6 in b8){return b6}}return e}function Q(b6,e){b6=e||b6;return bM.css(b6,"display")==="none"||!bM.contains(b6.ownerDocument,b6)}function p(cb,e){var cc,b9,ca,b6=[],b7=0,b8=cb.length;for(;b7<b8;b7++){b9=cb[b7];if(!b9.style){continue}b6[b7]=bM._data(b9,"olddisplay");cc=b9.style.display;if(e){if(!b6[b7]&&cc==="none"){b9.style.display=""}if(b9.style.display===""&&Q(b9)){b6[b7]=bM._data(b9,"olddisplay",bH(b9.nodeName))}}else{if(!b6[b7]){ca=Q(b9);if(cc&&cc!=="none"||!ca){bM._data(b9,"olddisplay",ca?cc:bM.css(b9,"display"))}}}}for(b7=0;b7<b8;b7++){b9=cb[b7];if(!b9.style){continue}if(!e||b9.style.display==="none"||b9.style.display===""){b9.style.display=e?b6[b7]||"":"none"}}return cb}bM.fn.extend({css:function(e,b6){return bM.access(this,function(cb,b8,cc){var b7,ca,cd={},b9=0;if(bM.isArray(b8)){ca=br(cb);b7=b8.length;for(;b9<b7;b9++){cd[b8[b9]]=bM.css(cb,b8[b9],false,ca)}return cd}return cc!==aJ?bM.style(cb,b8,cc):bM.css(cb,b8)},e,b6,arguments.length>1)},show:function(){return p(this,true)},hide:function(){return p(this)},toggle:function(b6){var e=typeof b6==="boolean";return this.each(function(){if(e?b6:Q(this)){bM(this).show()}else{bM(this).hide()}})}});bM.extend({cssHooks:{opacity:{get:function(b7,b6){if(b6){var e=F(b7,"opacity");return e===""?"1":e}}}},cssNumber:{columnCount:true,fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bM.support.cssFloat?"cssFloat":"styleFloat"},style:function(b8,b7,ce,b9){if(!b8||b8.nodeType===3||b8.nodeType===8||!b8.style){return}var cc,cd,cf,ca=bM.camelCase(b7),b6=b8.style;b7=bM.cssProps[ca]||(bM.cssProps[ca]=b(b6,ca));cf=bM.cssHooks[b7]||bM.cssHooks[ca];if(ce!==aJ){cd=typeof ce;if(cd==="string"&&(cc=U.exec(ce))){ce=(cc[1]+1)*cc[2]+parseFloat(bM.css(b8,b7));cd="number"}if(ce==null||cd==="number"&&isNaN(ce)){return}if(cd==="number"&&!bM.cssNumber[ca]){ce+="px"}if(!bM.support.clearCloneStyle&&ce===""&&b7.indexOf("background")===0){b6[b7]="inherit"}if(!cf||!("set" in cf)||(ce=cf.set(b8,ce,b9))!==aJ){try{b6[b7]=ce}catch(cb){}}}else{if(cf&&"get" in cf&&(cc=cf.get(b8,false,b9))!==aJ){return cc}return b6[b7]}},css:function(cb,b9,b6,ca){var b8,cc,e,b7=bM.camelCase(b9);b9=bM.cssProps[b7]||(bM.cssProps[b7]=b(cb.style,b7));e=bM.cssHooks[b9]||bM.cssHooks[b7];if(e&&"get" in e){cc=e.get(cb,true,b6)}if(cc===aJ){cc=F(cb,b9,ca)}if(cc==="normal"&&b9 in bF){cc=bF[b9]}if(b6===""||b6){b8=parseFloat(cc);return b6===true||bM.isNumeric(b8)?b8||0:cc}return cc},swap:function(ca,b9,cb,b8){var b7,b6,e={};for(b6 in b9){e[b6]=ca.style[b6];ca.style[b6]=b9[b6]}b7=cb.apply(ca,b8||[]);for(b6 in b9){ca.style[b6]=e[b6]}return b7}});if(a5.getComputedStyle){br=function(e){return a5.getComputedStyle(e,null)};F=function(b9,b7,cb){var b8,b6,cd,ca=cb||br(b9),cc=ca?ca.getPropertyValue(b7)||ca[b7]:aJ,e=b9.style;if(ca){if(cc===""&&!bM.contains(b9.ownerDocument,b9)){cc=bM.style(b9,b7)}if(Y.test(cc)&&a1.test(b7)){b8=e.width;b6=e.minWidth;cd=e.maxWidth;e.minWidth=e.maxWidth=e.width=cc;cc=ca.width;e.width=b8;e.minWidth=b6;e.maxWidth=cd}}return cc}}else{if(l.documentElement.currentStyle){br=function(e){return e.currentStyle};F=function(b8,b6,cb){var b7,ca,cc,b9=cb||br(b8),cd=b9?b9[b6]:aJ,e=b8.style;if(cd==null&&e&&e[b6]){cd=e[b6]}if(Y.test(cd)&&!bq.test(b6)){b7=e.left;ca=b8.runtimeStyle;cc=ca&&ca.left;if(cc){ca.left=b8.currentStyle.left}e.left=b6==="fontSize"?"1em":cd;cd=e.pixelLeft+"px";e.left=b7;if(cc){ca.left=cc}}return cd===""?"auto":cd}}}function aM(e,b7,b8){var b6=bc.exec(b7);return b6?Math.max(0,b6[1]-(b8||0))+(b6[2]||"px"):b7}function az(b9,b6,e,cb,b8){var b7=e===(cb?"border":"content")?4:b6==="width"?1:0,ca=0;for(;b7<4;b7+=2){if(e==="margin"){ca+=bM.css(b9,e+bW[b7],true,b8)}if(cb){if(e==="content"){ca-=bM.css(b9,"padding"+bW[b7],true,b8)}if(e!=="margin"){ca-=bM.css(b9,"border"+bW[b7]+"Width",true,b8)}}else{ca+=bM.css(b9,"padding"+bW[b7],true,b8);if(e!=="padding"){ca+=bM.css(b9,"border"+bW[b7]+"Width",true,b8)}}}return ca}function v(b9,b6,e){var b8=true,ca=b6==="width"?b9.offsetWidth:b9.offsetHeight,b7=br(b9),cb=bM.support.boxSizing&&bM.css(b9,"boxSizing",false,b7)==="border-box";if(ca<=0||ca==null){ca=F(b9,b6,b7);if(ca<0||ca==null){ca=b9.style[b6]}if(Y.test(ca)){return ca}b8=cb&&(bM.support.boxSizingReliable||ca===b9.style[b6]);ca=parseFloat(ca)||0}return(ca+az(b9,b6,e||(cb?"border":"content"),b8,b7))+"px"}function bH(b7){var b6=l,e=bm[b7];if(!e){e=a4(b7,b6);if(e==="none"||!e){aH=(aH||bM("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b6.documentElement);b6=(aH[0].contentWindow||aH[0].contentDocument).document;b6.write("<!doctype html><html><body>");b6.close();e=a4(b7,b6);aH.detach()}bm[b7]=e}return e}function a4(e,b8){var b6=bM(b8.createElement(e)).appendTo(b8.body),b7=bM.css(b6[0],"display");b6.remove();return b7}bM.each(["height","width"],function(b6,e){bM.cssHooks[e]={get:function(b9,b8,b7){if(b8){return b9.offsetWidth===0&&G.test(bM.css(b9,"display"))?bM.swap(b9,be,function(){return v(b9,e,b7)}):v(b9,e,b7)}},set:function(b9,ca,b7){var b8=b7&&br(b9);return aM(b9,ca,b7?az(b9,e,b7,bM.support.boxSizing&&bM.css(b9,"boxSizing",false,b8)==="border-box",b8):0)}}});if(!bM.support.opacity){bM.cssHooks.opacity={get:function(b6,e){return aW.test((e&&b6.currentStyle?b6.currentStyle.filter:b6.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":e?"1":""},set:function(b9,ca){var b8=b9.style,b6=b9.currentStyle,e=bM.isNumeric(ca)?"alpha(opacity="+ca*100+")":"",b7=b6&&b6.filter||b8.filter||"";b8.zoom=1;if((ca>=1||ca==="")&&bM.trim(b7.replace(bj,""))===""&&b8.removeAttribute){b8.removeAttribute("filter");if(ca===""||b6&&!b6.filter){return}}b8.filter=bj.test(b7)?b7.replace(bj,e):b7+" "+e}}}bM(function(){if(!bM.support.reliableMarginRight){bM.cssHooks.marginRight={get:function(b6,e){if(e){return bM.swap(b6,{display:"inline-block"},F,[b6,"marginRight"])}}}}if(!bM.support.pixelPosition&&bM.fn.position){bM.each(["top","left"],function(e,b6){bM.cssHooks[b6]={get:function(b8,b7){if(b7){b7=F(b8,b6);return Y.test(b7)?bM(b8).position()[b6]+"px":b7}}}})}});if(bM.expr&&bM.expr.filters){bM.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||(!bM.support.reliableHiddenOffsets&&((e.style&&e.style.display)||bM.css(e,"display"))==="none")};bM.expr.filters.visible=function(e){return !bM.expr.filters.hidden(e)}}bM.each({margin:"",padding:"",border:"Width"},function(e,b6){bM.cssHooks[e+b6]={expand:function(b9){var b8=0,b7={},ca=typeof b9==="string"?b9.split(" "):[b9];for(;b8<4;b8++){b7[e+bW[b8]+b6]=ca[b8]||ca[b8-2]||ca[0]}return b7}};if(!a1.test(e)){bM.cssHooks[e+b6].set=aM}});var by=/%20/g,aU=/\[\]$/,W=/\r?\n/g,c=/^(?:submit|button|image|reset|file)$/i,ax=/^(?:input|select|textarea|keygen)/i;bM.fn.extend({serialize:function(){return bM.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=bM.prop(this,"elements");return e?bM.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!bM(this).is(":disabled")&&ax.test(this.nodeName)&&!c.test(e)&&(this.checked||!q.test(e))}).map(function(e,b6){var b7=bM(this).val();return b7==null?null:bM.isArray(b7)?bM.map(b7,function(b8){return{name:b6.name,value:b8.replace(W,"\r\n")}}):{name:b6.name,value:b7.replace(W,"\r\n")}}).get()}});bM.param=function(e,b7){var b8,b6=[],b9=function(ca,cb){cb=bM.isFunction(cb)?cb():(cb==null?"":cb);b6[b6.length]=encodeURIComponent(ca)+"="+encodeURIComponent(cb)};if(b7===aJ){b7=bM.ajaxSettings&&bM.ajaxSettings.traditional}if(bM.isArray(e)||(e.jquery&&!bM.isPlainObject(e))){bM.each(e,function(){b9(this.name,this.value)})}else{for(b8 in e){i(b8,e[b8],b7,b9)}}return b6.join("&").replace(by,"+")};function i(b7,b9,b6,b8){var e;if(bM.isArray(b9)){bM.each(b9,function(cb,ca){if(b6||aU.test(b7)){b8(b7,ca)}else{i(b7+"["+(typeof ca==="object"?cb:"")+"]",ca,b6,b8)}})}else{if(!b6&&bM.type(b9)==="object"){for(e in b9){i(b7+"["+e+"]",b9[e],b6,b8)}}else{b8(b7,b9)}}}bM.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(b6,e){bM.fn[e]=function(b8,b7){return arguments.length>0?this.on(e,null,b8,b7):this.trigger(e)}});bM.fn.hover=function(e,b6){return this.mouseenter(e).mouseleave(b6||e)};var b4,aa,bR=bM.now(),aC=/\?/,ar=/#.*$/,P=/([?&])_=[^&]*/,ai=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,C=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,o=/^(?:GET|HEAD)$/,aK=/^\/\//,aX=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,b3=bM.fn.load,w={},ba={},aZ="*/".concat("*");try{aa=aO.href}catch(bi){aa=l.createElement("a");aa.href="";aa=aa.href}b4=aX.exec(aa.toLowerCase())||[];function bO(e){return function(b9,ca){if(typeof b9!=="string"){ca=b9;b9="*"}var b6,b7=0,b8=b9.toLowerCase().match(ae)||[];if(bM.isFunction(ca)){while((b6=b8[b7++])){if(b6[0]==="+"){b6=b6.slice(1)||"*";(e[b6]=e[b6]||[]).unshift(ca)}else{(e[b6]=e[b6]||[]).push(ca)}}}}}function n(e,b7,cb,b8){var b6={},b9=(e===ba);function ca(cc){var cd;b6[cc]=true;bM.each(e[cc]||[],function(cf,ce){var cg=ce(b7,cb,b8);if(typeof cg==="string"&&!b9&&!b6[cg]){b7.dataTypes.unshift(cg);ca(cg);return false}else{if(b9){return !(cd=cg)}}});return cd}return ca(b7.dataTypes[0])||!b6["*"]&&ca("*")}function r(b7,b8){var e,b6,b9=bM.ajaxSettings.flatOptions||{};for(b6 in b8){if(b8[b6]!==aJ){(b9[b6]?b7:(e||(e={})))[b6]=b8[b6]}}if(e){bM.extend(true,b7,e)}return b7}bM.fn.load=function(b8,cb,cc){if(typeof b8!=="string"&&b3){return b3.apply(this,arguments)}var e,b7,b9,b6=this,ca=b8.indexOf(" ");if(ca>=0){e=b8.slice(ca,b8.length);b8=b8.slice(0,ca)}if(bM.isFunction(cb)){cc=cb;cb=aJ}else{if(cb&&typeof cb==="object"){b9="POST"}}if(b6.length>0){bM.ajax({url:b8,type:b9,dataType:"html",data:cb}).done(function(cd){b7=arguments;b6.html(e?bM("<div>").append(bM.parseHTML(cd)).find(e):cd)}).complete(cc&&function(ce,cd){b6.each(cc,b7||[ce.responseText,cd,ce])})}return this};bM.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,b6){bM.fn[b6]=function(b7){return this.on(b6,b7)}});bM.each(["get","post"],function(e,b6){bM[b6]=function(b7,b9,ca,b8){if(bM.isFunction(b9)){b8=b8||ca;ca=b9;b9=aJ}return bM.ajax({url:b7,type:b6,dataType:b8,data:b9,success:ca})}});bM.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:aa,type:"GET",isLocal:C.test(b4[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":aZ,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a5.String,"text html":true,"text json":bM.parseJSON,"text xml":bM.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(b6,e){return e?r(r(b6,bM.ajaxSettings),e):r(bM.ajaxSettings,b6)},ajaxPrefilter:bO(w),ajaxTransport:bO(ba),ajax:function(ca,b7){if(typeof ca==="object"){b7=ca;ca=aJ}b7=b7||{};var cj,cl,cb,cq,cf,b6,cm,b8,ce=bM.ajaxSetup({},b7),cs=ce.context||ce,ch=ce.context&&(cs.nodeType||cs.jquery)?bM(cs):bM.event,cr=bM.Deferred(),co=bM.Callbacks("once memory"),cc=ce.statusCode||{},ci={},cp={},b9=0,cd="canceled",ck={readyState:0,getResponseHeader:function(ct){var e;if(b9===2){if(!b8){b8={};while((e=ai.exec(cq))){b8[e[1].toLowerCase()]=e[2]}}e=b8[ct.toLowerCase()]}return e==null?null:e},getAllResponseHeaders:function(){return b9===2?cq:null},setRequestHeader:function(ct,cu){var e=ct.toLowerCase();if(!b9){ct=cp[e]=cp[e]||ct;ci[ct]=cu}return this},overrideMimeType:function(e){if(!b9){ce.mimeType=e}return this},statusCode:function(ct){var e;if(ct){if(b9<2){for(e in ct){cc[e]=[cc[e],ct[e]]}}else{ck.always(ct[ck.status])}}return this},abort:function(ct){var e=ct||cd;if(cm){cm.abort(e)}cg(0,e);return this}};cr.promise(ck).complete=co.add;ck.success=ck.done;ck.error=ck.fail;ce.url=((ca||ce.url||aa)+"").replace(ar,"").replace(aK,b4[1]+"//");ce.type=b7.method||b7.type||ce.method||ce.type;ce.dataTypes=bM.trim(ce.dataType||"*").toLowerCase().match(ae)||[""];if(ce.crossDomain==null){cj=aX.exec(ce.url.toLowerCase());ce.crossDomain=!!(cj&&(cj[1]!==b4[1]||cj[2]!==b4[2]||(cj[3]||(cj[1]==="http:"?80:443))!=(b4[3]||(b4[1]==="http:"?80:443))))}if(ce.data&&ce.processData&&typeof ce.data!=="string"){ce.data=bM.param(ce.data,ce.traditional)}n(w,ce,b7,ck);if(b9===2){return ck}b6=ce.global;if(b6&&bM.active++===0){bM.event.trigger("ajaxStart")}ce.type=ce.type.toUpperCase();ce.hasContent=!o.test(ce.type);cb=ce.url;if(!ce.hasContent){if(ce.data){cb=(ce.url+=(aC.test(cb)?"&":"?")+ce.data);delete ce.data}if(ce.cache===false){ce.url=P.test(cb)?cb.replace(P,"$1_="+bR++):cb+(aC.test(cb)?"&":"?")+"_="+bR++}}if(ce.ifModified){if(bM.lastModified[cb]){ck.setRequestHeader("If-Modified-Since",bM.lastModified[cb])}if(bM.etag[cb]){ck.setRequestHeader("If-None-Match",bM.etag[cb])}}if(ce.data&&ce.hasContent&&ce.contentType!==false||b7.contentType){ck.setRequestHeader("Content-Type",ce.contentType)}ck.setRequestHeader("Accept",ce.dataTypes[0]&&ce.accepts[ce.dataTypes[0]]?ce.accepts[ce.dataTypes[0]]+(ce.dataTypes[0]!=="*"?", "+aZ+"; q=0.01":""):ce.accepts["*"]);for(cl in ce.headers){ck.setRequestHeader(cl,ce.headers[cl])}if(ce.beforeSend&&(ce.beforeSend.call(cs,ck,ce)===false||b9===2)){return ck.abort()}cd="abort";for(cl in {success:1,error:1,complete:1}){ck[cl](ce[cl])}cm=n(ba,ce,b7,ck);if(!cm){cg(-1,"No Transport")}else{ck.readyState=1;if(b6){ch.trigger("ajaxSend",[ck,ce])}if(ce.async&&ce.timeout>0){cf=setTimeout(function(){ck.abort("timeout")},ce.timeout)}try{b9=1;cm.send(ci,cg)}catch(cn){if(b9<2){cg(-1,cn)}else{throw cn}}}function cg(cx,ct,cy,cv){var e,cB,cz,cw,cA,cu=ct;if(b9===2){return}b9=2;if(cf){clearTimeout(cf)}cm=aJ;cq=cv||"";ck.readyState=cx>0?4:0;if(cy){cw=g(ce,ck,cy)}if(cx>=200&&cx<300||cx===304){if(ce.ifModified){cA=ck.getResponseHeader("Last-Modified");if(cA){bM.lastModified[cb]=cA}cA=ck.getResponseHeader("etag");if(cA){bM.etag[cb]=cA}}if(cx===204){e=true;cu="nocontent"}else{if(cx===304){e=true;cu="notmodified"}else{e=ah(ce,cw);cu=e.state;cB=e.data;cz=e.error;e=!cz}}}else{cz=cu;if(cx||!cu){cu="error";if(cx<0){cx=0}}}ck.status=cx;ck.statusText=(ct||cu)+"";if(e){cr.resolveWith(cs,[cB,cu,ck])}else{cr.rejectWith(cs,[ck,cu,cz])}ck.statusCode(cc);cc=aJ;if(b6){ch.trigger(e?"ajaxSuccess":"ajaxError",[ck,ce,e?cB:cz])}co.fireWith(cs,[ck,cu]);if(b6){ch.trigger("ajaxComplete",[ck,ce]);if(!(--bM.active)){bM.event.trigger("ajaxStop")}}}return ck},getScript:function(e,b6){return bM.get(e,aJ,b6,"script")},getJSON:function(e,b6,b7){return bM.get(e,b6,b7,"json")}});function g(ce,cd,ca){var e,b9,b8,cb,b6=ce.contents,cc=ce.dataTypes,b7=ce.responseFields;for(cb in b7){if(cb in ca){cd[b7[cb]]=ca[cb]}}while(cc[0]==="*"){cc.shift();if(b9===aJ){b9=ce.mimeType||cd.getResponseHeader("Content-Type")}}if(b9){for(cb in b6){if(b6[cb]&&b6[cb].test(b9)){cc.unshift(cb);break}}}if(cc[0] in ca){b8=cc[0]}else{for(cb in ca){if(!cc[0]||ce.converters[cb+" "+cc[0]]){b8=cb;break}if(!e){e=cb}}b8=b8||e}if(b8){if(b8!==cc[0]){cc.unshift(b8)}return ca[b8]}}function ah(cg,b8){var b6,cc,ce,b9,cf={},ca=0,cd=cg.dataTypes.slice(),b7=cd[0];if(cg.dataFilter){b8=cg.dataFilter(b8,cg.dataType)}if(cd[1]){for(ce in cg.converters){cf[ce.toLowerCase()]=cg.converters[ce]}}for(;(cc=cd[++ca]);){if(cc!=="*"){if(b7!=="*"&&b7!==cc){ce=cf[b7+" "+cc]||cf["* "+cc];if(!ce){for(b6 in cf){b9=b6.split(" ");if(b9[1]===cc){ce=cf[b7+" "+b9[0]]||cf["* "+b9[0]];if(ce){if(ce===true){ce=cf[b6]}else{if(cf[b6]!==true){cc=b9[0];cd.splice(ca--,0,cc)}}break}}}}if(ce!==true){if(ce&&cg["throws"]){b8=ce(b8)}else{try{b8=ce(b8)}catch(cb){return{state:"parsererror",error:ce?cb:"No conversion from "+b7+" to "+cc}}}}}b7=cc}}return{state:"success",data:b8}}bM.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){bM.globalEval(e);return e}}});bM.ajaxPrefilter("script",function(e){if(e.cache===aJ){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});bM.ajaxTransport("script",function(b7){if(b7.crossDomain){var e,b6=l.head||bM("head")[0]||l.documentElement;return{send:function(b8,b9){e=l.createElement("script");e.async=true;if(b7.scriptCharset){e.charset=b7.scriptCharset}e.src=b7.url;e.onload=e.onreadystatechange=function(cb,ca){if(ca||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(e.parentNode){e.parentNode.removeChild(e)}e=null;if(!ca){b9(200,"success")}}};b6.insertBefore(e,b6.firstChild)},abort:function(){if(e){e.onload(aJ,true)}}}}});var bt=[],a8=/(=)\?(?=&|$)|\?\?/;bM.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=bt.pop()||(bM.expando+"_"+(bR++));this[e]=true;return e}});bM.ajaxPrefilter("json jsonp",function(b8,e,b9){var cb,b6,b7,ca=b8.jsonp!==false&&(a8.test(b8.url)?"url":typeof b8.data==="string"&&!(b8.contentType||"").indexOf("application/x-www-form-urlencoded")&&a8.test(b8.data)&&"data");if(ca||b8.dataTypes[0]==="jsonp"){cb=b8.jsonpCallback=bM.isFunction(b8.jsonpCallback)?b8.jsonpCallback():b8.jsonpCallback;if(ca){b8[ca]=b8[ca].replace(a8,"$1"+cb)}else{if(b8.jsonp!==false){b8.url+=(aC.test(b8.url)?"&":"?")+b8.jsonp+"="+cb}}b8.converters["script json"]=function(){if(!b7){bM.error(cb+" was not called")}return b7[0]};b8.dataTypes[0]="json";b6=a5[cb];a5[cb]=function(){b7=arguments};b9.always(function(){a5[cb]=b6;if(b8[cb]){b8.jsonpCallback=e.jsonpCallback;bt.push(cb)}if(b7&&bM.isFunction(b6)){b6(b7[0])}b7=b6=aJ});return"script"}});var aj,aA,aB=0,aS=a5.ActiveXObject&&function(){var e;for(e in aj){aj[e](aJ,true)}};function bG(){try{return new a5.XMLHttpRequest()}catch(b6){}}function bg(){try{return new a5.ActiveXObject("Microsoft.XMLHTTP")}catch(b6){}}bM.ajaxSettings.xhr=a5.ActiveXObject?function(){return !this.isLocal&&bG()||bg()}:bG;aA=bM.ajaxSettings.xhr();bM.support.cors=!!aA&&("withCredentials" in aA);aA=bM.support.ajax=!!aA;if(aA){bM.ajaxTransport(function(e){if(!e.crossDomain||bM.support.cors){var b6;return{send:function(cc,b7){var ca,b8,cb=e.xhr();if(e.username){cb.open(e.type,e.url,e.async,e.username,e.password)}else{cb.open(e.type,e.url,e.async)}if(e.xhrFields){for(b8 in e.xhrFields){cb[b8]=e.xhrFields[b8]}}if(e.mimeType&&cb.overrideMimeType){cb.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!cc["X-Requested-With"]){cc["X-Requested-With"]="XMLHttpRequest"}try{for(b8 in cc){cb.setRequestHeader(b8,cc[b8])}}catch(b9){}cb.send((e.hasContent&&e.data)||null);b6=function(cf,ce){var cd,cg,cj,ch;try{if(b6&&(ce||cb.readyState===4)){b6=aJ;if(ca){cb.onreadystatechange=bM.noop;if(aS){delete aj[ca]}}if(ce){if(cb.readyState!==4){cb.abort()}}else{ch={};cd=cb.status;cg=cb.getAllResponseHeaders();if(typeof cb.responseText==="string"){ch.text=cb.responseText}try{cj=cb.statusText}catch(ci){cj=""}if(!cd&&e.isLocal&&!e.crossDomain){cd=ch.text?200:404}else{if(cd===1223){cd=204}}}}}catch(ck){if(!ce){b7(-1,ck)}}if(ch){b7(cd,cj,ch,cg)}};if(!e.async){b6()}else{if(cb.readyState===4){setTimeout(b6)}else{ca=++aB;if(aS){if(!aj){aj={};bM(a5).unload(aS)}aj[ca]=b6}cb.onreadystatechange=b6}}},abort:function(){if(b6){b6(aJ,true)}}}}})}var L,af,bU=/^(?:toggle|show|hide)$/,bN=new RegExp("^(?:([+-])=|)("+bD+")([a-z%]*)$","i"),bT=/queueHooks$/,aE=[h],a3={"*":[function(e,cc){var b8,cd,ce=this.createTween(e,cc),b9=bN.exec(cc),ca=ce.cur(),b6=+ca||0,b7=1,cb=20;if(b9){b8=+b9[2];cd=b9[3]||(bM.cssNumber[e]?"":"px");if(cd!=="px"&&b6){b6=bM.css(ce.elem,e,true)||b8||1;do{b7=b7||".5";b6=b6/b7;bM.style(ce.elem,e,b6+cd)}while(b7!==(b7=ce.cur()/ca)&&b7!==1&&--cb)}ce.unit=cd;ce.start=b6;ce.end=b9[1]?b6+(b9[1]+1)*b8:b8}return ce}]};function bp(){setTimeout(function(){L=aJ});return(L=bM.now())}function bh(b6,e){bM.each(e,function(cb,b9){var ca=(a3[cb]||[]).concat(a3["*"]),b7=0,b8=ca.length;for(;b7<b8;b7++){if(ca[b7].call(b6,cb,b9)){return}}})}function f(b7,cb,ce){var cf,e,ca=0,b6=aE.length,cd=bM.Deferred().always(function(){delete b9.elem}),b9=function(){if(e){return false}var cl=L||bp(),ci=Math.max(0,b8.startTime+b8.duration-cl),cg=ci/b8.duration||0,ck=1-cg,ch=0,cj=b8.tweens.length;for(;ch<cj;ch++){b8.tweens[ch].run(ck)}cd.notifyWith(b7,[b8,ck,ci]);if(ck<1&&cj){return ci}else{cd.resolveWith(b7,[b8]);return false}},b8=cd.promise({elem:b7,props:bM.extend({},cb),opts:bM.extend(true,{specialEasing:{}},ce),originalProperties:cb,originalOptions:ce,startTime:L||bp(),duration:ce.duration,tweens:[],createTween:function(ci,cg){var ch=bM.Tween(b7,b8.opts,ci,cg,b8.opts.specialEasing[ci]||b8.opts.easing);b8.tweens.push(ch);return ch},stop:function(ch){var cg=0,ci=ch?b8.tweens.length:0;if(e){return this}e=true;for(;cg<ci;cg++){b8.tweens[cg].run(1)}if(ch){cd.resolveWith(b7,[b8,ch])}else{cd.rejectWith(b7,[b8,ch])}return this}}),cc=b8.props;ao(cc,b8.opts.specialEasing);for(;ca<b6;ca++){cf=aE[ca].call(b8,b7,cc,b8.opts);if(cf){return cf}}bh(b8,cc);if(bM.isFunction(b8.opts.start)){b8.opts.start.call(b7,b8)}bM.fx.timer(bM.extend(b9,{elem:b7,anim:b8,queue:b8.opts.queue}));return b8.progress(b8.opts.progress).done(b8.opts.done,b8.opts.complete).fail(b8.opts.fail).always(b8.opts.always)}function ao(b8,ca){var b9,b7,b6,cb,e;for(b6 in b8){b7=bM.camelCase(b6);cb=ca[b7];b9=b8[b6];if(bM.isArray(b9)){cb=b9[1];b9=b8[b6]=b9[0]}if(b6!==b7){b8[b7]=b9;delete b8[b6]}e=bM.cssHooks[b7];if(e&&"expand" in e){b9=e.expand(b9);delete b8[b7];for(b6 in b9){if(!(b6 in b8)){b8[b6]=b9[b6];ca[b6]=cb}}}else{ca[b7]=cb}}}bM.Animation=bM.extend(f,{tweener:function(b6,b9){if(bM.isFunction(b6)){b9=b6;b6=["*"]}else{b6=b6.split(" ")}var b8,e=0,b7=b6.length;for(;e<b7;e++){b8=b6[e];a3[b8]=a3[b8]||[];a3[b8].unshift(b9)}},prefilter:function(b6,e){if(e){aE.unshift(b6)}else{aE.push(b6)}}});function h(b9,cf,e){var b7,ce,b8,ch,cl,cb,ck,cj,ci,ca=this,b6=b9.style,cg={},cd=[],cc=b9.nodeType&&Q(b9);if(!e.queue){cj=bM._queueHooks(b9,"fx");if(cj.unqueued==null){cj.unqueued=0;ci=cj.empty.fire;cj.empty.fire=function(){if(!cj.unqueued){ci()}}}cj.unqueued++;ca.always(function(){ca.always(function(){cj.unqueued--;if(!bM.queue(b9,"fx").length){cj.empty.fire()}})})}if(b9.nodeType===1&&("height" in cf||"width" in cf)){e.overflow=[b6.overflow,b6.overflowX,b6.overflowY];if(bM.css(b9,"display")==="inline"&&bM.css(b9,"float")==="none"){if(!bM.support.inlineBlockNeedsLayout||bH(b9.nodeName)==="inline"){b6.display="inline-block"}else{b6.zoom=1}}}if(e.overflow){b6.overflow="hidden";if(!bM.support.shrinkWrapBlocks){ca.always(function(){b6.overflow=e.overflow[0];b6.overflowX=e.overflow[1];b6.overflowY=e.overflow[2]})}}for(ce in cf){ch=cf[ce];if(bU.exec(ch)){delete cf[ce];cb=cb||ch==="toggle";if(ch===(cc?"hide":"show")){continue}cd.push(ce)}}b8=cd.length;if(b8){cl=bM._data(b9,"fxshow")||bM._data(b9,"fxshow",{});if("hidden" in cl){cc=cl.hidden}if(cb){cl.hidden=!cc}if(cc){bM(b9).show()}else{ca.done(function(){bM(b9).hide()})}ca.done(function(){var cm;bM._removeData(b9,"fxshow");for(cm in cg){bM.style(b9,cm,cg[cm])}});for(ce=0;ce<b8;ce++){b7=cd[ce];ck=ca.createTween(b7,cc?cl[b7]:0);cg[b7]=cl[b7]||bM.style(b9,b7);if(!(b7 in cl)){cl[b7]=ck.start;if(cc){ck.end=ck.start;ck.start=b7==="width"||b7==="height"?1:0}}}}}function H(b7,b6,b9,e,b8){return new H.prototype.init(b7,b6,b9,e,b8)}bM.Tween=H;H.prototype={constructor:H,init:function(b8,b6,ca,e,b9,b7){this.elem=b8;this.prop=ca;this.easing=b9||"swing";this.options=b6;this.start=this.now=this.cur();this.end=e;this.unit=b7||(bM.cssNumber[ca]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(b7){var b6,e=H.propHooks[this.prop];if(this.options.duration){this.pos=b6=bM.easing[this.easing](b7,this.options.duration*b7,0,1,this.options.duration)}else{this.pos=b6=b7}this.now=(this.end-this.start)*b6+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(e&&e.set){e.set(this)}else{H.propHooks._default.set(this)}return this}};H.prototype.init.prototype=H.prototype;H.propHooks={_default:{get:function(b6){var e;if(b6.elem[b6.prop]!=null&&(!b6.elem.style||b6.elem.style[b6.prop]==null)){return b6.elem[b6.prop]}e=bM.css(b6.elem,b6.prop,"");return !e||e==="auto"?0:e},set:function(e){if(bM.fx.step[e.prop]){bM.fx.step[e.prop](e)}else{if(e.elem.style&&(e.elem.style[bM.cssProps[e.prop]]!=null||bM.cssHooks[e.prop])){bM.style(e.elem,e.prop,e.now+e.unit)}else{e.elem[e.prop]=e.now}}}}};H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){if(e.elem.nodeType&&e.elem.parentNode){e.elem[e.prop]=e.now}}};bM.each(["toggle","show","hide"],function(b6,e){var b7=bM.fn[e];bM.fn[e]=function(b8,ca,b9){return b8==null||typeof b8==="boolean"?b7.apply(this,arguments):this.animate(bL(e,true),b8,ca,b9)}});bM.fn.extend({fadeTo:function(e,b8,b7,b6){return this.filter(Q).css("opacity",0).show().end().animate({opacity:b8},e,b7,b6)},animate:function(cb,b8,ca,b9){var b7=bM.isEmptyObject(cb),e=bM.speed(b8,ca,b9),b6=function(){var cc=f(this,bM.extend({},cb),e);b6.finish=function(){cc.stop(true)};if(b7||bM._data(this,"finish")){cc.stop(true)}};b6.finish=b6;return b7||e.queue===false?this.each(b6):this.queue(e.queue,b6)},stop:function(b7,b6,e){var b8=function(b9){var ca=b9.stop;delete b9.stop;ca(e)};if(typeof b7!=="string"){e=b6;b6=b7;b7=aJ}if(b6&&b7!==false){this.queue(b7||"fx",[])}return this.each(function(){var cc=true,b9=b7!=null&&b7+"queueHooks",cb=bM.timers,ca=bM._data(this);if(b9){if(ca[b9]&&ca[b9].stop){b8(ca[b9])}}else{for(b9 in ca){if(ca[b9]&&ca[b9].stop&&bT.test(b9)){b8(ca[b9])}}}for(b9=cb.length;b9--;){if(cb[b9].elem===this&&(b7==null||cb[b9].queue===b7)){cb[b9].anim.stop(e);cc=false;cb.splice(b9,1)}}if(cc||!e){bM.dequeue(this,b7)}})},finish:function(e){if(e!==false){e=e||"fx"}return this.each(function(){var b8,cb=bM._data(this),b7=cb[e+"queue"],b6=cb[e+"queueHooks"],ca=bM.timers,b9=b7?b7.length:0;cb.finish=true;bM.queue(this,e,[]);if(b6&&b6.cur&&b6.cur.finish){b6.cur.finish.call(this)}for(b8=ca.length;b8--;){if(ca[b8].elem===this&&ca[b8].queue===e){ca[b8].anim.stop(true);ca.splice(b8,1)}}for(b8=0;b8<b9;b8++){if(b7[b8]&&b7[b8].finish){b7[b8].finish.call(this)}}delete cb.finish})}});function bL(b7,b9){var b8,e={height:b7},b6=0;b9=b9?1:0;for(;b6<4;b6+=2-b9){b8=bW[b6];e["margin"+b8]=e["padding"+b8]=b7}if(b9){e.opacity=e.width=b7}return e}bM.each({slideDown:bL("show"),slideUp:bL("hide"),slideToggle:bL("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,b6){bM.fn[e]=function(b7,b9,b8){return this.animate(b6,b7,b9,b8)}});bM.speed=function(b7,b8,b6){var e=b7&&typeof b7==="object"?bM.extend({},b7):{complete:b6||!b6&&b8||bM.isFunction(b7)&&b7,duration:b7,easing:b6&&b8||b8&&!bM.isFunction(b8)&&b8};e.duration=bM.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in bM.fx.speeds?bM.fx.speeds[e.duration]:bM.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(){if(bM.isFunction(e.old)){e.old.call(this)}if(e.queue){bM.dequeue(this,e.queue)}};return e};bM.easing={linear:function(e){return e},swing:function(e){return 0.5-Math.cos(e*Math.PI)/2}};bM.timers=[];bM.fx=H.prototype.init;bM.fx.tick=function(){var b7,b6=bM.timers,e=0;L=bM.now();for(;e<b6.length;e++){b7=b6[e];if(!b7()&&b6[e]===b7){b6.splice(e--,1)}}if(!b6.length){bM.fx.stop()}L=aJ};bM.fx.timer=function(e){if(e()&&bM.timers.push(e)){bM.fx.start()}};bM.fx.interval=13;bM.fx.start=function(){if(!af){af=setInterval(bM.fx.tick,bM.fx.interval)}};bM.fx.stop=function(){clearInterval(af);af=null};bM.fx.speeds={slow:600,fast:200,_default:400};bM.fx.step={};if(bM.expr&&bM.expr.filters){bM.expr.filters.animated=function(e){return bM.grep(bM.timers,function(b6){return e===b6.elem}).length}}bM.fn.offset=function(b6){if(arguments.length){return b6===aJ?this:this.each(function(cb){bM.offset.setOffset(this,b6,cb)})}var e,ca,b8={top:0,left:0},b7=this[0],b9=b7&&b7.ownerDocument;if(!b9){return}e=b9.documentElement;if(!bM.contains(e,b7)){return b8}if(typeof b7.getBoundingClientRect!==aF){b8=b7.getBoundingClientRect()}ca=bs(b9);return{top:b8.top+(ca.pageYOffset||e.scrollTop)-(e.clientTop||0),left:b8.left+(ca.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};bM.offset={setOffset:function(b8,ch,cb){var cc=bM.css(b8,"position");if(cc==="static"){b8.style.position="relative"}var ca=bM(b8),b6=ca.offset(),e=bM.css(b8,"top"),cf=bM.css(b8,"left"),cg=(cc==="absolute"||cc==="fixed")&&bM.inArray("auto",[e,cf])>-1,ce={},cd={},b7,b9;if(cg){cd=ca.position();b7=cd.top;b9=cd.left}else{b7=parseFloat(e)||0;b9=parseFloat(cf)||0}if(bM.isFunction(ch)){ch=ch.call(b8,cb,b6)}if(ch.top!=null){ce.top=(ch.top-b6.top)+b7}if(ch.left!=null){ce.left=(ch.left-b6.left)+b9}if("using" in ch){ch.using.call(b8,ce)}else{ca.css(ce)}}};bM.fn.extend({position:function(){if(!this[0]){return}var b7,b8,e={top:0,left:0},b6=this[0];if(bM.css(b6,"position")==="fixed"){b8=b6.getBoundingClientRect()}else{b7=this.offsetParent();b8=this.offset();if(!bM.nodeName(b7[0],"html")){e=b7.offset()}e.top+=bM.css(b7[0],"borderTopWidth",true);e.left+=bM.css(b7[0],"borderLeftWidth",true)}return{top:b8.top-e.top-bM.css(b6,"marginTop",true),left:b8.left-e.left-bM.css(b6,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||l.documentElement;while(e&&(!bM.nodeName(e,"html")&&bM.css(e,"position")==="static")){e=e.offsetParent}return e||l.documentElement})}});bM.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b7,b6){var e=/Y/.test(b6);bM.fn[b7]=function(b8){return bM.access(this,function(b9,cc,cb){var ca=bs(b9);if(cb===aJ){return ca?(b6 in ca)?ca[b6]:ca.document.documentElement[cc]:b9[cc]}if(ca){ca.scrollTo(!e?cb:bM(ca).scrollLeft(),e?cb:bM(ca).scrollTop())}else{b9[cc]=cb}},b7,b8,arguments.length,null)}});function bs(e){return bM.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}bM.each({Height:"height",Width:"width"},function(e,b6){bM.each({padding:"inner"+e,content:b6,"":"outer"+e},function(b7,b8){bM.fn[b8]=function(cc,cb){var ca=arguments.length&&(b7||typeof cc!=="boolean"),b9=b7||(cc===true||cb===true?"margin":"border");return bM.access(this,function(ce,cd,cf){var cg;if(bM.isWindow(ce)){return ce.document.documentElement["client"+e]}if(ce.nodeType===9){cg=ce.documentElement;return Math.max(ce.body["scroll"+e],cg["scroll"+e],ce.body["offset"+e],cg["offset"+e],cg["client"+e])}return cf===aJ?bM.css(ce,cd,b9):bM.style(ce,cd,cf,b9)},b6,ca?cc:aJ,ca,null)}})});a5.jQuery=a5.$=bM;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return bM})}})(window);var Base64Binary={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decodeArrayBuffer:function(b){var d=this._keyStr.indexOf(b.charAt(b.length-1));var c=this._keyStr.indexOf(b.charAt(b.length-2));var a=(b.length/4)*3;if(d==64){a--}if(c==64){a--}var e=new ArrayBuffer(a);this.decode(b,e,a);return e},decode:function(e,d,o){var c;var n,l,h;var m,k,g,f;var b=0;var a=0;if(d){c=new Uint8Array(d)}else{c=new Uint8Array(o)}e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(b=0;b<o;b+=3){m=this._keyStr.indexOf(e.charAt(a++));k=this._keyStr.indexOf(e.charAt(a++));g=this._keyStr.indexOf(e.charAt(a++));f=this._keyStr.indexOf(e.charAt(a++));n=(m<<2)|(k>>4);l=((k&15)<<4)|(g>>2);h=((g&3)<<6)|f;c[b]=n;if(g!=64){c[b+1]=l}if(f!=64){c[b+2]=h}}return c}};!function(a,b){if(typeof module!="undefined"&&module.exports){module.exports.browser=b()}else{if(typeof define=="function"){define(b)}else{this[a]=b()}}}("bowser",function(){var d=true,c;function b(g,h,i){var f=g.match(h);return(f&&f.length>i&&f[i])||0}function a(z){var w=/(msie|trident)/i.test(z),v=/chrome|crios/i.test(z),n=/phantom/i.test(z),h=/iphone/i.test(z),s=/ipad/i.test(z),k=/ipod/i.test(z),u=/touchpad/i.test(z),y=/silk/i.test(z),p=/safari/i.test(z)&&!v&&!n&&!y,C=/android/i.test(z),A=/opera/i.test(z)||/opr/i.test(z),l=/firefox/i.test(z),q=/gecko\//i.test(z),j=/seamonkey\//i.test(z),f=/webos/i.test(z),m=/windows phone/i.test(z),r=/blackberry/i.test(z),B=/version\/(\d+(\.\d+)?)/i,i=/firefox[ \/](\d+(\.\d+)?)/i,x={};if(k){h=false}if(m){x={name:"Windows Phone",windowsphone:d,msie:d,mobile:d,version:b(z,/iemobile\/(\d+(\.\d+)?)/i,1)}}else{if(A){c=b(z,B,1)||b(z,/opr\/(\d+(\.\d+)?)/i,1)||b(z,/opera[ \/](\d+(\.\d+)?)/i,1);x={name:"Opera",opera:d,version:c};if(C){x.android=d;x.mobile=d}if(v){x.webkit=d}}else{if(w){x={name:"Internet Explorer",msie:d,version:b(z,/(msie |rv:)(\d+(\.\d+)?)/i,2)}}else{if(v){x={name:"Chrome",webkit:d,chrome:d,version:b(z,/(?:chrome|crios)\/(\d+(\.\d+)?)/i,1)};if(C){x.android=d}if(s||k||h){x[h?"iphone":s?"ipad":"ipod"]=d;x.ios=d}if(x.android||x.ios){x.mobile=d}}else{if(n){x={name:"PhantomJS",webkit:d,phantom:d,version:b(z,/phantomjs\/(\d+(\.\d+)?)/i,1)}}else{if(u){x={name:"TouchPad",webkit:d,touchpad:d,version:b(z,/touchpad\/(\d+(\.\d+)?)/i,1)}}else{if(y){x={name:"Amazon Silk",webkit:d,android:d,mobile:d,version:b(z,/silk\/(\d+(\.\d+)?)/i,1)}}else{if(h||s||k){x={name:h?"iPhone":s?"iPad":"iPod",webkit:d,mobile:d,ios:d};x[h?"iphone":s?"ipad":"ipod"]=d;if(B.test(z)){x.version=b(z,B,1)}}else{if(r){x={name:"BlackBerry",blackberry:d,mobile:d};if((c=b(z,B,1))){x.version=c;x.webkit=d}else{x.version=b(z,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)}}else{if(f){x={name:"WebOS",mobile:d,webkit:d,webos:d,version:(b(z,B,1)||b(z,/wosbrowser\/(\d+(\.\d+)?)/i,1))}}else{if(q){x={name:"Gecko",gecko:d,mozilla:d,version:b(z,i,1)};if(j){x.name="SeaMonkey";x.seamonkey=d;x.version=b(z,/seamonkey\/(\d+(\.\d+)?)/i,1)}else{if(l){x.name="Firefox";x.firefox=d}}if(C){x.android=d;x.mobile=d}else{if(!C&&l&&/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(z)){x.firefoxos=d;x.mobile=d}}}else{if(C){x={name:"Android",webkit:d,android:d,mobile:d,version:b(z,B,1)}}else{if(p){x={name:"Safari",webkit:d,safari:d,version:b(z,B,1)}}}}}}}}}}}}}}var g;if(C){g=b(z,/android[ \/](\d+(\.\d+)*)/i,1);if(g){x.osversion=g}}else{if(h||s||k){g=b(z,/os (\d+([_\s]\d+)*) like mac os x/i,1);if(g){x.osversion=g.replace(/[_\s]/g,".")}}else{if(m){g=b(z,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,1);if(g){x.osversion=g}}}}if((x.msie&&x.version>=9)||(x.chrome&&x.version>=20)||(x.firefox&&x.version>=10)||(x.safari&&x.version>=5)||(x.opera&&x.version>=10)||(x.ios&&x.osversion&&x.osversion.split(".")[0]>=6)){x.a=d}else{if((x.msie&&x.version<9)||(x.chrome&&x.version<20)||(x.firefox&&x.version<10)||(x.safari&&x.version<5)||(x.opera&&x.version<10)||(x.ios&&x.osversion&&x.osversion.split(".")[0]<6)){x.c=d}else{x.x=d}}return x}var e=a(typeof navigator!=="undefined"?navigator.userAgent:"");e._detect=a;return e});
  /*!
   * Copyright (c) 2012-2013, RII-UTHSCSA
   * All rights reserved.
   *
   * THIS PRODUCT IS NOT FOR CLINICAL USE.
   *
   * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
   * following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following
   *   disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
   *   disclaimer in the documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of the RII-UTHSCSA nor the names of its contributors may be used to endorse or promote products
   *   derived from this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
  "use strict";var daikon=daikon||{};daikon.Dictionary=daikon.Dictionary||{};daikon.Utils=daikon.Utils||((typeof require!=="undefined")?require("./utilities.js"):null);daikon.Dictionary.dictPrivate={"0207":{"101F":["FE","ElscintDataScale"]}};daikon.Dictionary.dict={"0002":{"0000":["UL","Group0002Length"],"0001":["OB","FileMetaInformationVersion"],"0002":["UI","MediaStoredSOPClassUID"],"0003":["UI","MediaStoredSOPInstanceUID"],"0010":["UI","TransferSyntaxUID"],"0012":["UI","ImplementationClassUID"],"0013":["SH","ImplementationVersionName"],"0016":["AE","SourceApplicationEntityTitle"],"0100":["UI","PrivateInformationCreatorUID"],"0102":["OB","PrivateInformation"]},"0004":{"0000":["UL","Group0004Length"],"1130":["CS","FilesetID"],"1141":["CS","FilesetDescriptorFileFileID"],"1142":["CS","FilesetDescriptorFileFormat"],"1200":["UL","RootDirectoryEntitysFirstDirectoryRecordOffset"],"1202":["UL","RootDirectoryEntitysLastDirectoryRecordOffset"],"1212":["US","File-setConsistenceFlag"],"1220":["SQ","DirectoryRecordSequence"],"1400":["UL","NextDirectoryRecordOffset"],"1410":["US","RecordInuseFlag"],"1420":["UL","ReferencedLowerlevelDirectoryEntityOffset"],"1430":["CS","DirectoryRecordType"],"1432":["UI","PrivateRecordUID"],"1500":["CS","ReferencedFileID"],"1510":["UI","ReferencedSOPClassUIDInFile"],"1511":["UI","ReferencedSOPInstanceUIDInFile"],"1600":["UL","NumberOfReferences"]},"0008":{"0001":["UL","LengthToEnd"],"0005":["CS","SpecificCharacterSet"],"0006":["SQ","LanguageCodeSequence"],"0008":["CS","ImageType"],"0010":["SH","RecognitionCode"],"0012":["DA","InstanceCreationDate"],"0013":["TM","InstanceCreationTime"],"0014":["UI","InstanceCreatorUID"],"0016":["UI","SOPClassUID"],"0018":["UI","SOPInstanceUID"],"001A":["UI","RelatedGeneralSOPClassUID"],"001B":["UI","OriginalSpecializedSOPClassUID"],"0020":["DA","StudyDate"],"0021":["DA","SeriesDate"],"0022":["DA","AcquisitionDate"],"0023":["DA","ContentDate"],"0024":["DA","OverlayDate"],"0025":["DA","CurveDate"],"002A":["DT","AcquisitionDateTime"],"0030":["TM","StudyTime"],"0031":["TM","SeriesTime"],"0032":["TM","AcquisitionTime"],"0033":["TM","ContentTime"],"0034":["TM","OverlayTime"],"0035":["TM","CurveTime"],"0040":["US","DataSetType"],"0041":["LO","DataSetSubtype"],"0042":["CS","NuclearMedicineSeriesType"],"0050":["SH","AccessionNumber"],"0051":["SQ","IssuerOfAccessionNumberSequence"],"0052":["CS","QueryRetrieveLevel"],"0054":["AE","RetrieveAETitle"],"0056":["CS","InstanceAvailability"],"0058":["UI","FailedSOPInstanceUIDList"],"0060":["CS","Modality"],"0061":["CS","ModalitiesInStudy"],"0062":["UI","SOPClassesInStudy"],"0064":["CS","ConversionType"],"0068":["CS","PresentationIntentType"],"0070":["LO","Manufacturer"],"0080":["LO","InstitutionName"],"0081":["ST","InstitutionAddress"],"0082":["SQ","InstitutionCodeSequence"],"0090":["PN","ReferringPhysicianName"],"0092":["ST","ReferringPhysicianAddress"],"0094":["SH","ReferringPhysicianTelephoneNumbers"],"0096":["SQ","ReferringPhysicianIdentificationSequence"],"0100":["SH","CodeValue"],"0102":["SH","CodingSchemeDesignator"],"0103":["SH","CodingSchemeVersion"],"0104":["LO","CodeMeaning"],"0105":["CS","MappingResource"],"0106":["DT","ContextGroupVersion"],"0107":["DT","ContextGroupLocalVersion"],"010B":["CS","ContextGroupExtensionFlag"],"010C":["UI","CodingSchemeUID"],"010D":["UI","ContextGroupExtensionCreatorUID"],"010F":["CS","ContextIdentifier"],"0110":["SQ","CodingSchemeIdentificationSequence"],"0112":["LO","CodingSchemeRegistry"],"0114":["ST","CodingSchemeExternalID"],"0115":["ST","CodingSchemeName"],"0116":["ST","CodingSchemeResponsibleOrganization"],"0117":["UI","ContextUID"],"0201":["SH","TimezoneOffsetFromUTC"],"1000":["AE","NetworkID"],"1010":["SH","StationName"],"1030":["LO","StudyDescription"],"1032":["SQ","ProcedureCodeSequence"],"103E":["LO","SeriesDescription"],"103F":["SQ","SeriesDescriptionCodeSequence"],"1040":["LO","InstitutionalDepartmentName"],"1048":["PN","PhysiciansOfRecord"],"1049":["SQ","PhysiciansOfRecordIdentificationSequence"],"1050":["PN","PerformingPhysicianName"],"1052":["SQ","PerformingPhysicianIdentificationSequence"],"1060":["PN","NameOfPhysiciansReadingStudy"],"1062":["SQ","PhysiciansReadingStudyIdentificationSequence"],"1070":["PN","OperatorsName"],"1072":["SQ","OperatorIdentificationSequence"],"1080":["LO","AdmittingDiagnosesDescription"],"1084":["SQ","AdmittingDiagnosesCodeSequence"],"1090":["LO","ManufacturerModelName"],"1100":["SQ","ReferencedResultsSequence"],"1110":["SQ","ReferencedStudySequence"],"1111":["SQ","ReferencedPerformedProcedureStepSequence"],"1115":["SQ","ReferencedSeriesSequence"],"1120":["SQ","ReferencedPatientSequence"],"1125":["SQ","ReferencedVisitSequence"],"1130":["SQ","ReferencedOverlaySequence"],"1134":["SQ","ReferencedStereometricInstanceSequence"],"113A":["SQ","ReferencedWaveformSequence"],"1140":["SQ","ReferencedImageSequence"],"1145":["SQ","ReferencedCurveSequence"],"114A":["SQ","ReferencedInstanceSequence"],"114B":["SQ","ReferencedRealWorldValueMappingInstanceSequence"],"1150":["UI","ReferencedSOPClassUID"],"1155":["UI","ReferencedSOPInstanceUID"],"115A":["UI","SOPClassesSupported"],"1160":["IS","ReferencedFrameNumber"],"1161":["UL","SimpleFrameList"],"1162":["UL","CalculatedFrameList"],"1163":["FD","TimeRange"],"1164":["SQ","FrameExtractionSequence"],"1167":["UI","MultiFrameSourceSOPInstanceUID"],"1195":["UI","TransactionUID"],"1197":["US","FailureReason"],"1198":["SQ","FailedSOPSequence"],"1199":["SQ","ReferencedSOPSequence"],"1200":["SQ","StudiesContainingOtherReferencedInstancesSequence"],"1250":["SQ","RelatedSeriesSequence"],"2110":["CS","LossyImageCompressionRetired"],"2111":["ST","DerivationDescription"],"2112":["SQ","SourceImageSequence"],"2120":["SH","StageName"],"2122":["IS","StageNumber"],"2124":["IS","NumberOfStages"],"2127":["SH","ViewName"],"2128":["IS","ViewNumber"],"2129":["IS","NumberOfEventTimers"],"212A":["IS","NumberOfViewsInStage"],"2130":["DS","EventElapsedTimes"],"2132":["LO","EventTimerNames"],"2133":["SQ","EventTimerSequence"],"2134":["FD","EventTimeOffset"],"2135":["SQ","EventCodeSequence"],"2142":["IS","StartTrim"],"2143":["IS","StopTrim"],"2144":["IS","RecommendedDisplayFrameRate"],"2200":["CS","TransducerPosition"],"2204":["CS","TransducerOrientation"],"2208":["CS","AnatomicStructure"],"2218":["SQ","AnatomicRegionSequence"],"2220":["SQ","AnatomicRegionModifierSequence"],"2228":["SQ","PrimaryAnatomicStructureSequence"],"2229":["SQ","AnatomicStructureSpaceOrRegionSequence"],"2230":["SQ","PrimaryAnatomicStructureModifierSequence"],"2240":["SQ","TransducerPositionSequence"],"2242":["SQ","TransducerPositionModifierSequence"],"2244":["SQ","TransducerOrientationSequence"],"2246":["SQ","TransducerOrientationModifierSequence"],"2251":["SQ","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],"2253":["SQ","AnatomicPortalOfEntranceCodeSequenceTrial"],"2255":["SQ","AnatomicApproachDirectionCodeSequenceTrial"],"2256":["ST","AnatomicPerspectiveDescriptionTrial"],"2257":["SQ","AnatomicPerspectiveCodeSequenceTrial"],"2258":["ST","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],"2259":["SQ","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"225A":["SQ","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"225C":["SQ","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],"3001":["SQ","AlternateRepresentationSequence"],"3010":["UI","IrradiationEventUID"],"4000":["LT","IdentifyingComments"],"9007":["CS","FrameType"],"9092":["SQ","ReferencedImageEvidenceSequence"],"9121":["SQ","ReferencedRawDataSequence"],"9123":["UI","CreatorVersionUID"],"9124":["SQ","DerivationImageSequence"],"9154":["SQ","SourceImageEvidenceSequence"],"9205":["CS","PixelPresentation"],"9206":["CS","VolumetricProperties"],"9207":["CS","VolumeBasedCalculationTechnique"],"9208":["CS","ComplexImageComponent"],"9209":["CS","AcquisitionContrast"],"9215":["SQ","DerivationCodeSequence"],"9237":["SQ","ReferencedPresentationStateSequence"],"9410":["SQ","ReferencedOtherPlaneSequence"],"9458":["SQ","FrameDisplaySequence"],"9459":["FL","RecommendedDisplayFrameRateInFloat"],"9460":["CS","SkipFrameRangeFlag"]},"0010":{"0010":["PN","PatientName"],"0020":["LO","PatientID"],"0021":["LO","IssuerOfPatientID"],"0022":["CS","TypeOfPatientID"],"0024":["SQ","IssuerOfPatientIDQualifiersSequence"],"0030":["DA","PatientBirthDate"],"0032":["TM","PatientBirthTime"],"0040":["CS","PatientSex"],"0050":["SQ","PatientInsurancePlanCodeSequence"],"0101":["SQ","PatientPrimaryLanguageCodeSequence"],"0102":["SQ","PatientPrimaryLanguageModifierCodeSequence"],"1000":["LO","OtherPatientIDs"],"1001":["PN","OtherPatientNames"],"1002":["SQ","OtherPatientIDsSequence"],"1005":["PN","PatientBirthName"],"1010":["AS","PatientAge"],"1020":["DS","PatientSize"],"1021":["SQ","PatientSizeCodeSequence"],"1030":["DS","PatientWeight"],"1040":["LO","PatientAddress"],"1050":["LO","InsurancePlanIdentification"],"1060":["PN","PatientMotherBirthName"],"1080":["LO","MilitaryRank"],"1081":["LO","BranchOfService"],"1090":["LO","MedicalRecordLocator"],"2000":["LO","MedicalAlerts"],"2110":["LO","Allergies"],"2150":["LO","CountryOfResidence"],"2152":["LO","RegionOfResidence"],"2154":["SH","PatientTelephoneNumbers"],"2160":["SH","EthnicGroup"],"2180":["SH","Occupation"],"21A0":["CS","SmokingStatus"],"21B0":["LT","AdditionalPatientHistory"],"21C0":["US","PregnancyStatus"],"21D0":["DA","LastMenstrualDate"],"21F0":["LO","PatientReligiousPreference"],"2201":["LO","PatientSpeciesDescription"],"2202":["SQ","PatientSpeciesCodeSequence"],"2203":["CS","PatientSexNeutered"],"2210":["CS","AnatomicalOrientationType"],"2292":["LO","PatientBreedDescription"],"2293":["SQ","PatientBreedCodeSequence"],"2294":["SQ","BreedRegistrationSequence"],"2295":["LO","BreedRegistrationNumber"],"2296":["SQ","BreedRegistryCodeSequence"],"2297":["PN","ResponsiblePerson"],"2298":["CS","ResponsiblePersonRole"],"2299":["LO","ResponsibleOrganization"],"4000":["LT","PatientComments"],"9431":["FL","ExaminedBodyThickness"]},"0012":{"0010":["LO","ClinicalTrialSponsorName"],"0020":["LO","ClinicalTrialProtocolID"],"0021":["LO","ClinicalTrialProtocolName"],"0030":["LO","ClinicalTrialSiteID"],"0031":["LO","ClinicalTrialSiteName"],"0040":["LO","ClinicalTrialSubjectID"],"0042":["LO","ClinicalTrialSubjectReadingID"],"0050":["LO","ClinicalTrialTimePointID"],"0051":["ST","ClinicalTrialTimePointDescription"],"0060":["LO","ClinicalTrialCoordinatingCenterName"],"0062":["CS","PatientIdentityRemoved"],"0063":["LO","DeidentificationMethod"],"0064":["SQ","DeidentificationMethodCodeSequence"],"0071":["LO","ClinicalTrialSeriesID"],"0072":["LO","ClinicalTrialSeriesDescription"],"0081":["LO","ClinicalTrialProtocolEthicsCommitteeName"],"0082":["LO","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0083":["SQ","ConsentForClinicalTrialUseSequence"],"0084":["CS","DistributionType"],"0085":["CS","ConsentForDistributionFlag"]},"0014":{"0023":["ST","CADFileFormat"],"0024":["ST","ComponentReferenceSystem"],"0025":["ST","ComponentManufacturingProcedure"],"0028":["ST","ComponentManufacturer"],"0030":["DS","MaterialThickness"],"0032":["DS","MaterialPipeDiameter"],"0034":["DS","MaterialIsolationDiameter"],"0042":["ST","MaterialGrade"],"0044":["ST","MaterialPropertiesFileID"],"0045":["ST","MaterialPropertiesFileFormat"],"0046":["LT","MaterialNotes"],"0050":["CS","ComponentShape"],"0052":["CS","CurvatureType"],"0054":["DS","OuterDiameter"],"0056":["DS","InnerDiameter"],"1010":["ST","ActualEnvironmentalConditions"],"1020":["DA","ExpiryDate"],"1040":["ST","EnvironmentalConditions"],"2002":["SQ","EvaluatorSequence"],"2004":["IS","EvaluatorNumber"],"2006":["PN","EvaluatorName"],"2008":["IS","EvaluationAttempt"],"2012":["SQ","IndicationSequence"],"2014":["IS","IndicationNumber "],"2016":["SH","IndicationLabel"],"2018":["ST","IndicationDescription"],"201A":["CS","IndicationType"],"201C":["CS","IndicationDisposition"],"201E":["SQ","IndicationROISequence"],"2030":["SQ","IndicationPhysicalPropertySequence"],"2032":["SH","PropertyLabel"],"2202":["IS","CoordinateSystemNumberOfAxes "],"2204":["SQ","CoordinateSystemAxesSequence"],"2206":["ST","CoordinateSystemAxisDescription"],"2208":["CS","CoordinateSystemDataSetMapping"],"220A":["IS","CoordinateSystemAxisNumber"],"220C":["CS","CoordinateSystemAxisType"],"220E":["CS","CoordinateSystemAxisUnits"],"2210":["OB","CoordinateSystemAxisValues"],"2220":["SQ","CoordinateSystemTransformSequence"],"2222":["ST","TransformDescription"],"2224":["IS","TransformNumberOfAxes"],"2226":["IS","TransformOrderOfAxes"],"2228":["CS","TransformedAxisUnits"],"222A":["DS","CoordinateSystemTransformRotationAndScaleMatrix"],"222C":["DS","CoordinateSystemTransformTranslationMatrix"],"3011":["DS","InternalDetectorFrameTime"],"3012":["DS","NumberOfFramesIntegrated"],"3020":["SQ","DetectorTemperatureSequence"],"3022":["DS","SensorName"],"3024":["DS","HorizontalOffsetOfSensor"],"3026":["DS","VerticalOffsetOfSensor"],"3028":["DS","SensorTemperature"],"3040":["SQ","DarkCurrentSequence"],"3050":["OB","DarkCurrentCounts"],"3060":["SQ","GainCorrectionReferenceSequence"],"3070":["OB","AirCounts"],"3071":["DS","KVUsedInGainCalibration"],"3072":["DS","MAUsedInGainCalibration"],"3073":["DS","NumberOfFramesUsedForIntegration"],"3074":["LO","FilterMaterialUsedInGainCalibration"],"3075":["DS","FilterThicknessUsedInGainCalibration"],"3076":["DA","DateOfGainCalibration"],"3077":["TM","TimeOfGainCalibration"],"3080":["OB","BadPixelImage"],"3099":["LT","CalibrationNotes"],"4002":["SQ","PulserEquipmentSequence"],"4004":["CS","PulserType"],"4006":["LT","PulserNotes"],"4008":["SQ","ReceiverEquipmentSequence"],"400A":["CS","AmplifierType"],"400C":["LT","ReceiverNotes"],"400E":["SQ","PreAmplifierEquipmentSequence"],"400F":["LT","PreAmplifierNotes"],"4010":["SQ","TransmitTransducerSequence"],"4011":["SQ","ReceiveTransducerSequence"],"4012":["US","NumberOfElements"],"4013":["CS","ElementShape"],"4014":["DS","ElementDimensionA"],"4015":["DS","ElementDimensionB"],"4016":["DS","ElementPitch"],"4017":["DS","MeasuredBeamDimensionA"],"4018":["DS","MeasuredBeamDimensionB"],"4019":["DS","LocationOfMeasuredBeamDiameter"],"401A":["DS","NominalFrequency"],"401B":["DS","MeasuredCenterFrequency"],"401C":["DS","MeasuredBandwidth"],"4020":["SQ","PulserSettingsSequence"],"4022":["DS","PulseWidth"],"4024":["DS","ExcitationFrequency"],"4026":["CS","ModulationType"],"4028":["DS","Damping"],"4030":["SQ","ReceiverSettingsSequence"],"4031":["DS","AcquiredSoundpathLength"],"4032":["CS","AcquisitionCompressionType"],"4033":["IS","AcquisitionSampleSize"],"4034":["DS","RectifierSmoothing"],"4035":["SQ","DACSequence"],"4036":["CS","DACType"],"4038":["DS","DACGainPoints"],"403A":["DS","DACTimePoints"],"403C":["DS","DACAmplitude"],"4040":["SQ","PreAmplifierSettingsSequence"],"4050":["SQ","TransmitTransducerSettingsSequence"],"4051":["SQ","ReceiveTransducerSettingsSequence"],"4052":["DS","IncidentAngle"],"4054":["ST","CouplingTechnique"],"4056":["ST","CouplingMedium"],"4057":["DS","CouplingVelocity"],"4058":["DS","CrystalCenterLocationX"],"4059":["DS","CrystalCenterLocationZ"],"405A":["DS","SoundPathLength"],"405C":["ST","DelayLawIdentifier"],"4060":["SQ","GateSettingsSequence"],"4062":["DS","GateThreshold"],"4064":["DS","VelocityOfSound"],"4070":["SQ","CalibrationSettingsSequence"],"4072":["ST","CalibrationProcedure"],"4074":["SH","ProcedureVersion"],"4076":["DA","ProcedureCreationDate"],"4078":["DA","ProcedureExpirationDate"],"407A":["DA","ProcedureLastModifiedDate"],"407C":["TM","CalibrationTime"],"407E":["DA","CalibrationDate"],"5002":["IS","LINACEnergy"],"5004":["IS","LINACOutput"]},"0018":{"0010":["LO","ContrastBolusAgent"],"0012":["SQ","ContrastBolusAgentSequence"],"0014":["SQ","ContrastBolusAdministrationRouteSequence"],"0015":["CS","BodyPartExamined"],"0020":["CS","ScanningSequence"],"0021":["CS","SequenceVariant"],"0022":["CS","ScanOptions"],"0023":["CS","MRAcquisitionType"],"0024":["SH","SequenceName"],"0025":["CS","AngioFlag"],"0026":["SQ","InterventionDrugInformationSequence"],"0027":["TM","InterventionDrugStopTime"],"0028":["DS","InterventionDrugDose"],"0029":["SQ","InterventionDrugCodeSequence"],"002A":["SQ","AdditionalDrugSequence"],"0030":["LO","Radionuclide"],"0031":["LO","Radiopharmaceutical"],"0032":["DS","EnergyWindowCenterline"],"0033":["DS","EnergyWindowTotalWidth"],"0034":["LO","InterventionDrugName"],"0035":["TM","InterventionDrugStartTime"],"0036":["SQ","InterventionSequence"],"0037":["CS","TherapyType"],"0038":["CS","InterventionStatus"],"0039":["CS","TherapyDescription"],"003A":["ST","InterventionDescription"],"0040":["IS","CineRate"],"0042":["CS","InitialCineRunState"],"0050":["DS","SliceThickness"],"0060":["DS","KVP"],"0070":["IS","CountsAccumulated"],"0071":["CS","AcquisitionTerminationCondition"],"0072":["DS","EffectiveDuration"],"0073":["CS","AcquisitionStartCondition"],"0074":["IS","AcquisitionStartConditionData"],"0075":["IS","AcquisitionTerminationConditionData"],"0080":["DS","RepetitionTime"],"0081":["DS","EchoTime"],"0082":["DS","InversionTime"],"0083":["DS","NumberOfAverages"],"0084":["DS","ImagingFrequency"],"0085":["SH","ImagedNucleus"],"0086":["IS","EchoNumbers"],"0087":["DS","MagneticFieldStrength"],"0088":["DS","SpacingBetweenSlices"],"0089":["IS","NumberOfPhaseEncodingSteps"],"0090":["DS","DataCollectionDiameter"],"0091":["IS","EchoTrainLength"],"0093":["DS","PercentSampling"],"0094":["DS","PercentPhaseFieldOfView"],"0095":["DS","PixelBandwidth"],"1000":["LO","DeviceSerialNumber"],"1002":["UI","DeviceUID"],"1003":["LO","DeviceID"],"1004":["LO","PlateID"],"1005":["LO","GeneratorID"],"1006":["LO","GridID"],"1007":["LO","CassetteID"],"1008":["LO","GantryID"],"1010":["LO","SecondaryCaptureDeviceID"],"1011":["LO","HardcopyCreationDeviceID"],"1012":["DA","DateOfSecondaryCapture"],"1014":["TM","TimeOfSecondaryCapture"],"1016":["LO","SecondaryCaptureDeviceManufacturer"],"1017":["LO","HardcopyDeviceManufacturer"],"1018":["LO","SecondaryCaptureDeviceManufacturerModelName"],"1019":["LO","SecondaryCaptureDeviceSoftwareVersions"],"101A":["LO","HardcopyDeviceSoftwareVersion"],"101B":["LO","HardcopyDeviceManufacturerModelName"],"1020":["LO","SoftwareVersions"],"1022":["SH","VideoImageFormatAcquired"],"1023":["LO","DigitalImageFormatAcquired"],"1030":["LO","ProtocolName"],"1040":["LO","ContrastBolusRoute"],"1041":["DS","ContrastBolusVolume"],"1042":["TM","ContrastBolusStartTime"],"1043":["TM","ContrastBolusStopTime"],"1044":["DS","ContrastBolusTotalDose"],"1045":["IS","SyringeCounts"],"1046":["DS","ContrastFlowRate"],"1047":["DS","ContrastFlowDuration"],"1048":["CS","ContrastBolusIngredient"],"1049":["DS","ContrastBolusIngredientConcentration"],"1050":["DS","SpatialResolution"],"1060":["DS","TriggerTime"],"1061":["LO","TriggerSourceOrType"],"1062":["IS","NominalInterval"],"1063":["DS","FrameTime"],"1064":["LO","CardiacFramingType"],"1065":["DS","FrameTimeVector"],"1066":["DS","FrameDelay"],"1067":["DS","ImageTriggerDelay"],"1068":["DS","MultiplexGroupTimeOffset"],"1069":["DS","TriggerTimeOffset"],"106A":["CS","SynchronizationTrigger"],"106C":["US","SynchronizationChannel"],"106E":["UL","TriggerSamplePosition"],"1070":["LO","RadiopharmaceuticalRoute"],"1071":["DS","RadiopharmaceuticalVolume"],"1072":["TM","RadiopharmaceuticalStartTime"],"1073":["TM","RadiopharmaceuticalStopTime"],"1074":["DS","RadionuclideTotalDose"],"1075":["DS","RadionuclideHalfLife"],"1076":["DS","RadionuclidePositronFraction"],"1077":["DS","RadiopharmaceuticalSpecificActivity"],"1078":["DT","RadiopharmaceuticalStartDateTime"],"1079":["DT","RadiopharmaceuticalStopDateTime"],"1080":["CS","BeatRejectionFlag"],"1081":["IS","LowRRValue"],"1082":["IS","HighRRValue"],"1083":["IS","IntervalsAcquired"],"1084":["IS","IntervalsRejected"],"1085":["LO","PVCRejection"],"1086":["IS","SkipBeats"],"1088":["IS","HeartRate"],"1090":["IS","CardiacNumberOfImages"],"1094":["IS","TriggerWindow"],"1100":["DS","ReconstructionDiameter"],"1110":["DS","DistanceSourceToDetector"],"1111":["DS","DistanceSourceToPatient"],"1114":["DS","EstimatedRadiographicMagnificationFactor"],"1120":["DS","GantryDetectorTilt"],"1121":["DS","GantryDetectorSlew"],"1130":["DS","TableHeight"],"1131":["DS","TableTraverse"],"1134":["CS","TableMotion"],"1135":["DS","TableVerticalIncrement"],"1136":["DS","TableLateralIncrement"],"1137":["DS","TableLongitudinalIncrement"],"1138":["DS","TableAngle"],"113A":["CS","TableType"],"1140":["CS","RotationDirection"],"1141":["DS","AngularPosition"],"1142":["DS","RadialPosition"],"1143":["DS","ScanArc"],"1144":["DS","AngularStep"],"1145":["DS","CenterOfRotationOffset"],"1146":["DS","RotationOffset"],"1147":["CS","FieldOfViewShape"],"1149":["IS","FieldOfViewDimensions"],"1150":["IS","ExposureTime"],"1151":["IS","XRayTubeCurrent"],"1152":["IS","Exposure"],"1153":["IS","ExposureInuAs"],"1154":["DS","AveragePulseWidth"],"1155":["CS","RadiationSetting"],"1156":["CS","RectificationType"],"115A":["CS","RadiationMode"],"115E":["DS","ImageAndFluoroscopyAreaDoseProduct"],"1160":["SH","FilterType"],"1161":["LO","TypeOfFilters"],"1162":["DS","IntensifierSize"],"1164":["DS","ImagerPixelSpacing"],"1166":["CS","Grid"],"1170":["IS","GeneratorPower"],"1180":["SH","CollimatorGridName"],"1181":["CS","CollimatorType"],"1182":["IS","FocalDistance"],"1183":["DS","XFocusCenter"],"1184":["DS","YFocusCenter"],"1190":["DS","FocalSpots"],"1191":["CS","AnodeTargetMaterial"],"11A0":["DS","BodyPartThickness"],"11A2":["DS","CompressionForce"],"1200":["DA","DateOfLastCalibration"],"1201":["TM","TimeOfLastCalibration"],"1210":["SH","ConvolutionKernel"],"1240":["IS","UpperLowerPixelValues"],"1242":["IS","ActualFrameDuration"],"1243":["IS","CountRate"],"1244":["US","PreferredPlaybackSequencing"],"1250":["SH","ReceiveCoilName"],"1251":["SH","TransmitCoilName"],"1260":["SH","PlateType"],"1261":["LO","PhosphorType"],"1300":["DS","ScanVelocity"],"1301":["CS","WholeBodyTechnique"],"1302":["IS","ScanLength"],"1310":["US","AcquisitionMatrix"],"1312":["CS","InPlanePhaseEncodingDirection"],"1314":["DS","FlipAngle"],"1315":["CS","VariableFlipAngleFlag"],"1316":["DS","SAR"],"1318":["DS","dBdt"],"1400":["LO","AcquisitionDeviceProcessingDescription"],"1401":["LO","AcquisitionDeviceProcessingCode"],"1402":["CS","CassetteOrientation"],"1403":["CS","CassetteSize"],"1404":["US","ExposuresOnPlate"],"1405":["IS","RelativeXRayExposure"],"1411":["DS","ExposureIndex"],"1412":["DS","TargetExposureIndex"],"1413":["DS","DeviationIndex"],"1450":["DS","ColumnAngulation"],"1460":["DS","TomoLayerHeight"],"1470":["DS","TomoAngle"],"1480":["DS","TomoTime"],"1490":["CS","TomoType"],"1491":["CS","TomoClass"],"1495":["IS","NumberOfTomosynthesisSourceImages"],"1500":["CS","PositionerMotion"],"1508":["CS","PositionerType"],"1510":["DS","PositionerPrimaryAngle"],"1511":["DS","PositionerSecondaryAngle"],"1520":["DS","PositionerPrimaryAngleIncrement"],"1521":["DS","PositionerSecondaryAngleIncrement"],"1530":["DS","DetectorPrimaryAngle"],"1531":["DS","DetectorSecondaryAngle"],"1600":["CS","ShutterShape"],"1602":["IS","ShutterLeftVerticalEdge"],"1604":["IS","ShutterRightVerticalEdge"],"1606":["IS","ShutterUpperHorizontalEdge"],"1608":["IS","ShutterLowerHorizontalEdge"],"1610":["IS","CenterOfCircularShutter"],"1612":["IS","RadiusOfCircularShutter"],"1620":["IS","VerticesOfThePolygonalShutter"],"1622":["US","ShutterPresentationValue"],"1623":["US","ShutterOverlayGroup"],"1624":["US","ShutterPresentationColorCIELabValue"],"1700":["CS","CollimatorShape"],"1702":["IS","CollimatorLeftVerticalEdge"],"1704":["IS","CollimatorRightVerticalEdge"],"1706":["IS","CollimatorUpperHorizontalEdge"],"1708":["IS","CollimatorLowerHorizontalEdge"],"1710":["IS","CenterOfCircularCollimator"],"1712":["IS","RadiusOfCircularCollimator"],"1720":["IS","VerticesOfThePolygonalCollimator"],"1800":["CS","AcquisitionTimeSynchronized"],"1801":["SH","TimeSource"],"1802":["CS","TimeDistributionProtocol"],"1803":["LO","NTPSourceAddress"],"2001":["IS","PageNumberVector"],"2002":["SH","FrameLabelVector"],"2003":["DS","FramePrimaryAngleVector"],"2004":["DS","FrameSecondaryAngleVector"],"2005":["DS","SliceLocationVector"],"2006":["SH","DisplayWindowLabelVector"],"2010":["DS","NominalScannedPixelSpacing"],"2020":["CS","DigitizingDeviceTransportDirection"],"2030":["DS","RotationOfScannedFilm"],"3100":["CS","IVUSAcquisition"],"3101":["DS","IVUSPullbackRate"],"3102":["DS","IVUSGatedRate"],"3103":["IS","IVUSPullbackStartFrameNumber"],"3104":["IS","IVUSPullbackStopFrameNumber"],"3105":["IS","LesionNumber"],"4000":["LT","AcquisitionComments"],"5000":["SH","OutputPower"],"5010":["LO","TransducerData"],"5012":["DS","FocusDepth"],"5020":["LO","ProcessingFunction"],"5021":["LO","PostprocessingFunction"],"5022":["DS","MechanicalIndex"],"5024":["DS","BoneThermalIndex"],"5026":["DS","CranialThermalIndex"],"5027":["DS","SoftTissueThermalIndex"],"5028":["DS","SoftTissueFocusThermalIndex"],"5029":["DS","SoftTissueSurfaceThermalIndex"],"5030":["DS","DynamicRange"],"5040":["DS","TotalGain"],"5050":["IS","DepthOfScanField"],"5100":["CS","PatientPosition"],"5101":["CS","ViewPosition"],"5104":["SQ","ProjectionEponymousNameCodeSequence"],"5210":["DS","ImageTransformationMatrix"],"5212":["DS","ImageTranslationVector"],"6000":["DS","Sensitivity"],"6011":["SQ","SequenceOfUltrasoundRegions"],"6012":["US","RegionSpatialFormat"],"6014":["US","RegionDataType"],"6016":["UL","RegionFlags"],"6018":["UL","RegionLocationMinX0"],"601A":["UL","RegionLocationMinY0"],"601C":["UL","RegionLocationMaxX1"],"601E":["UL","RegionLocationMaxY1"],"6020":["SL","ReferencePixelX0"],"6022":["SL","ReferencePixelY0"],"6024":["US","PhysicalUnitsXDirection"],"6026":["US","PhysicalUnitsYDirection"],"6028":["FD","ReferencePixelPhysicalValueX"],"602A":["FD","ReferencePixelPhysicalValueY"],"602C":["FD","PhysicalDeltaX"],"602E":["FD","PhysicalDeltaY"],"6030":["UL","TransducerFrequency"],"6031":["CS","TransducerType"],"6032":["UL","PulseRepetitionFrequency"],"6034":["FD","DopplerCorrectionAngle"],"6036":["FD","SteeringAngle"],"6038":["UL","DopplerSampleVolumeXPositionRetired"],"6039":["SL","DopplerSampleVolumeXPosition"],"603A":["UL","DopplerSampleVolumeYPositionRetired"],"603B":["SL","DopplerSampleVolumeYPosition"],"603C":["UL","TMLinePositionX0Retired"],"603D":["SL","TMLinePositionX0"],"603E":["UL","TMLinePositionY0Retired"],"603F":["SL","TMLinePositionY0"],"6040":["UL","TMLinePositionX1Retired"],"6041":["SL","TMLinePositionX1"],"6042":["UL","TMLinePositionY1Retired"],"6043":["SL","TMLinePositionY1"],"6044":["US","PixelComponentOrganization"],"6046":["UL","PixelComponentMask"],"6048":["UL","PixelComponentRangeStart"],"604A":["UL","PixelComponentRangeStop"],"604C":["US","PixelComponentPhysicalUnits"],"604E":["US","PixelComponentDataType"],"6050":["UL","NumberOfTableBreakPoints"],"6052":["UL","TableOfXBreakPoints"],"6054":["FD","TableOfYBreakPoints"],"6056":["UL","NumberOfTableEntries"],"6058":["UL","TableOfPixelValues"],"605A":["FL","TableOfParameterValues"],"6060":["FL","RWaveTimeVector"],"7000":["CS","DetectorConditionsNominalFlag"],"7001":["DS","DetectorTemperature"],"7004":["CS","DetectorType"],"7005":["CS","DetectorConfiguration"],"7006":["LT","DetectorDescription"],"7008":["LT","DetectorMode"],"700A":["SH","DetectorID"],"700C":["DA","DateOfLastDetectorCalibration"],"700E":["TM","TimeOfLastDetectorCalibration"],"7010":["IS","ExposuresOnDetectorSinceLastCalibration"],"7011":["IS","ExposuresOnDetectorSinceManufactured"],"7012":["DS","DetectorTimeSinceLastExposure"],"7014":["DS","DetectorActiveTime"],"7016":["DS","DetectorActivationOffsetFromExposure"],"701A":["DS","DetectorBinning"],"7020":["DS","DetectorElementPhysicalSize"],"7022":["DS","DetectorElementSpacing"],"7024":["CS","DetectorActiveShape"],"7026":["DS","DetectorActiveDimensions"],"7028":["DS","DetectorActiveOrigin"],"702A":["LO","DetectorManufacturerName"],"702B":["LO","DetectorManufacturerModelName"],"7030":["DS","FieldOfViewOrigin"],"7032":["DS","FieldOfViewRotation"],"7034":["CS","FieldOfViewHorizontalFlip"],"7036":["FL","PixelDataAreaOriginRelativeToFOV"],"7038":["FL","PixelDataAreaRotationAngleRelativeToFOV"],"7040":["LT","GridAbsorbingMaterial"],"7041":["LT","GridSpacingMaterial"],"7042":["DS","GridThickness"],"7044":["DS","GridPitch"],"7046":["IS","GridAspectRatio"],"7048":["DS","GridPeriod"],"704C":["DS","GridFocalDistance"],"7050":["CS","FilterMaterial"],"7052":["DS","FilterThicknessMinimum"],"7054":["DS","FilterThicknessMaximum"],"7056":["FL","FilterBeamPathLengthMinimum"],"7058":["FL","FilterBeamPathLengthMaximum"],"7060":["CS","ExposureControlMode"],"7062":["LT","ExposureControlModeDescription"],"7064":["CS","ExposureStatus"],"7065":["DS","PhototimerSetting"],"8150":["DS","ExposureTimeInuS"],"8151":["DS","XRayTubeCurrentInuA"],"9004":["CS","ContentQualification"],"9005":["SH","PulseSequenceName"],"9006":["SQ","MRImagingModifierSequence"],"9008":["CS","EchoPulseSequence"],"9009":["CS","InversionRecovery"],"9010":["CS","FlowCompensation"],"9011":["CS","MultipleSpinEcho"],"9012":["CS","MultiPlanarExcitation"],"9014":["CS","PhaseContrast"],"9015":["CS","TimeOfFlightContrast"],"9016":["CS","Spoiling"],"9017":["CS","SteadyStatePulseSequence"],"9018":["CS","EchoPlanarPulseSequence"],"9019":["FD","TagAngleFirstAxis"],"9020":["CS","MagnetizationTransfer"],"9021":["CS","T2Preparation"],"9022":["CS","BloodSignalNulling"],"9024":["CS","SaturationRecovery"],"9025":["CS","SpectrallySelectedSuppression"],"9026":["CS","SpectrallySelectedExcitation"],"9027":["CS","SpatialPresaturation"],"9028":["CS","Tagging"],"9029":["CS","OversamplingPhase"],"9030":["FD","TagSpacingFirstDimension"],"9032":["CS","GeometryOfKSpaceTraversal"],"9033":["CS","SegmentedKSpaceTraversal"],"9034":["CS","RectilinearPhaseEncodeReordering"],"9035":["FD","TagThickness"],"9036":["CS","PartialFourierDirection"],"9037":["CS","CardiacSynchronizationTechnique"],"9041":["LO","ReceiveCoilManufacturerName"],"9042":["SQ","MRReceiveCoilSequence"],"9043":["CS","ReceiveCoilType"],"9044":["CS","QuadratureReceiveCoil"],"9045":["SQ","MultiCoilDefinitionSequence"],"9046":["LO","MultiCoilConfiguration"],"9047":["SH","MultiCoilElementName"],"9048":["CS","MultiCoilElementUsed"],"9049":["SQ","MRTransmitCoilSequence"],"9050":["LO","TransmitCoilManufacturerName"],"9051":["CS","TransmitCoilType"],"9052":["FD","SpectralWidth"],"9053":["FD","ChemicalShiftReference"],"9054":["CS","VolumeLocalizationTechnique"],"9058":["US","MRAcquisitionFrequencyEncodingSteps"],"9059":["CS","Decoupling"],"9060":["CS","DecoupledNucleus"],"9061":["FD","DecouplingFrequency"],"9062":["CS","DecouplingMethod"],"9063":["FD","DecouplingChemicalShiftReference"],"9064":["CS","KSpaceFiltering"],"9065":["CS","TimeDomainFiltering"],"9066":["US","NumberOfZeroFills"],"9067":["CS","BaselineCorrection"],"9069":["FD","ParallelReductionFactorInPlane"],"9070":["FD","CardiacRRIntervalSpecified"],"9073":["FD","AcquisitionDuration"],"9074":["DT","FrameAcquisitionDateTime"],"9075":["CS","DiffusionDirectionality"],"9076":["SQ","DiffusionGradientDirectionSequence"],"9077":["CS","ParallelAcquisition"],"9078":["CS","ParallelAcquisitionTechnique"],"9079":["FD","InversionTimes"],"9080":["ST","MetaboliteMapDescription"],"9081":["CS","PartialFourier"],"9082":["FD","EffectiveEchoTime"],"9083":["SQ","MetaboliteMapCodeSequence"],"9084":["SQ","ChemicalShiftSequence"],"9085":["CS","CardiacSignalSource"],"9087":["FD","DiffusionBValue"],"9089":["FD","DiffusionGradientOrientation"],"9090":["FD","VelocityEncodingDirection"],"9091":["FD","VelocityEncodingMinimumValue"],"9092":["SQ","VelocityEncodingAcquisitionSequence"],"9093":["US","NumberOfKSpaceTrajectories"],"9094":["CS","CoverageOfKSpace"],"9095":["UL","SpectroscopyAcquisitionPhaseRows"],"9096":["FD","ParallelReductionFactorInPlaneRetired"],"9098":["FD","TransmitterFrequency"],"9100":["CS","ResonantNucleus"],"9101":["CS","FrequencyCorrection"],"9103":["SQ","MRSpectroscopyFOVGeometrySequence"],"9104":["FD","SlabThickness"],"9105":["FD","SlabOrientation"],"9106":["FD","MidSlabPosition"],"9107":["SQ","MRSpatialSaturationSequence"],"9112":["SQ","MRTimingAndRelatedParametersSequence"],"9114":["SQ","MREchoSequence"],"9115":["SQ","MRModifierSequence"],"9117":["SQ","MRDiffusionSequence"],"9118":["SQ","CardiacSynchronizationSequence"],"9119":["SQ","MRAveragesSequence"],"9125":["SQ","MRFOVGeometrySequence"],"9126":["SQ","VolumeLocalizationSequence"],"9127":["UL","SpectroscopyAcquisitionDataColumns"],"9147":["CS","DiffusionAnisotropyType"],"9151":["DT","FrameReferenceDateTime"],"9152":["SQ","MRMetaboliteMapSequence"],"9155":["FD","ParallelReductionFactorOutOfPlane"],"9159":["UL","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],"9166":["CS","BulkMotionStatus"],"9168":["FD","ParallelReductionFactorSecondInPlane"],"9169":["CS","CardiacBeatRejectionTechnique"],"9170":["CS","RespiratoryMotionCompensationTechnique"],"9171":["CS","RespiratorySignalSource"],"9172":["CS","BulkMotionCompensationTechnique"],"9173":["CS","BulkMotionSignalSource"],"9174":["CS","ApplicableSafetyStandardAgency"],"9175":["LO","ApplicableSafetyStandardDescription"],"9176":["SQ","OperatingModeSequence"],"9177":["CS","OperatingModeType"],"9178":["CS","OperatingMode"],"9179":["CS","SpecificAbsorptionRateDefinition"],"9180":["CS","GradientOutputType"],"9181":["FD","SpecificAbsorptionRateValue"],"9182":["FD","GradientOutput"],"9183":["CS","FlowCompensationDirection"],"9184":["FD","TaggingDelay"],"9185":["ST","RespiratoryMotionCompensationTechniqueDescription"],"9186":["SH","RespiratorySignalSourceID"],"9195":["FD","ChemicalShiftMinimumIntegrationLimitInHz"],"9196":["FD","ChemicalShiftMaximumIntegrationLimitInHz"],"9197":["SQ","MRVelocityEncodingSequence"],"9198":["CS","FirstOrderPhaseCorrection"],"9199":["CS","WaterReferencedPhaseCorrection"],"9200":["CS","MRSpectroscopyAcquisitionType"],"9214":["CS","RespiratoryCyclePosition"],"9217":["FD","VelocityEncodingMaximumValue"],"9218":["FD","TagSpacingSecondDimension"],"9219":["SS","TagAngleSecondAxis"],"9220":["FD","FrameAcquisitionDuration"],"9226":["SQ","MRImageFrameTypeSequence"],"9227":["SQ","MRSpectroscopyFrameTypeSequence"],"9231":["US","MRAcquisitionPhaseEncodingStepsInPlane"],"9232":["US","MRAcquisitionPhaseEncodingStepsOutOfPlane"],"9234":["UL","SpectroscopyAcquisitionPhaseColumns"],"9236":["CS","CardiacCyclePosition"],"9239":["SQ","SpecificAbsorptionRateSequence"],"9240":["US","RFEchoTrainLength"],"9241":["US","GradientEchoTrainLength"],"9250":["CS","ArterialSpinLabelingContrast"],"9251":["SQ","MRArterialSpinLabelingSequence"],"9252":["LO","ASLTechniqueDescription"],"9253":["US","ASLSlabNumber"],"9254":["FD ","ASLSlabThickness"],"9255":["FD ","ASLSlabOrientation"],"9256":["FD ","ASLMidSlabPosition"],"9257":["CS","ASLContext"],"9258":["UL","ASLPulseTrainDuration"],"9259":["CS","ASLCrusherFlag"],"925A":["FD","ASLCrusherFlow"],"925B":["LO","ASLCrusherDescription"],"925C":["CS","ASLBolusCutoffFlag"],"925D":["SQ","ASLBolusCutoffTimingSequence"],"925E":["LO","ASLBolusCutoffTechnique"],"925F":["UL","ASLBolusCutoffDelayTime"],"9260":["SQ","ASLSlabSequence"],"9295":["FD","ChemicalShiftMinimumIntegrationLimitInppm"],"9296":["FD","ChemicalShiftMaximumIntegrationLimitInppm"],"9301":["SQ","CTAcquisitionTypeSequence"],"9302":["CS","AcquisitionType"],"9303":["FD","TubeAngle"],"9304":["SQ","CTAcquisitionDetailsSequence"],"9305":["FD","RevolutionTime"],"9306":["FD","SingleCollimationWidth"],"9307":["FD","TotalCollimationWidth"],"9308":["SQ","CTTableDynamicsSequence"],"9309":["FD","TableSpeed"],"9310":["FD","TableFeedPerRotation"],"9311":["FD","SpiralPitchFactor"],"9312":["SQ","CTGeometrySequence"],"9313":["FD","DataCollectionCenterPatient"],"9314":["SQ","CTReconstructionSequence"],"9315":["CS","ReconstructionAlgorithm"],"9316":["CS","ConvolutionKernelGroup"],"9317":["FD","ReconstructionFieldOfView"],"9318":["FD","ReconstructionTargetCenterPatient"],"9319":["FD","ReconstructionAngle"],"9320":["SH","ImageFilter"],"9321":["SQ","CTExposureSequence"],"9322":["FD","ReconstructionPixelSpacing"],"9323":["CS","ExposureModulationType"],"9324":["FD","EstimatedDoseSaving"],"9325":["SQ","CTXRayDetailsSequence"],"9326":["SQ","CTPositionSequence"],"9327":["FD","TablePosition"],"9328":["FD","ExposureTimeInms"],"9329":["SQ","CTImageFrameTypeSequence"],"9330":["FD","XRayTubeCurrentInmA"],"9332":["FD","ExposureInmAs"],"9333":["CS","ConstantVolumeFlag"],"9334":["CS","FluoroscopyFlag"],"9335":["FD","DistanceSourceToDataCollectionCenter"],"9337":["US","ContrastBolusAgentNumber"],"9338":["SQ","ContrastBolusIngredientCodeSequence"],"9340":["SQ","ContrastAdministrationProfileSequence"],"9341":["SQ","ContrastBolusUsageSequence"],"9342":["CS","ContrastBolusAgentAdministered"],"9343":["CS","ContrastBolusAgentDetected"],"9344":["CS","ContrastBolusAgentPhase"],"9345":["FD","CTDIvol"],"9346":["SQ","CTDIPhantomTypeCodeSequence"],"9351":["FL","CalciumScoringMassFactorPatient"],"9352":["FL","CalciumScoringMassFactorDevice"],"9353":["FL","EnergyWeightingFactor"],"9360":["SQ","CTAdditionalXRaySourceSequence"],"9401":["SQ","ProjectionPixelCalibrationSequence"],"9402":["FL","DistanceSourceToIsocenter"],"9403":["FL","DistanceObjectToTableTop"],"9404":["FL","ObjectPixelSpacingInCenterOfBeam"],"9405":["SQ","PositionerPositionSequence"],"9406":["SQ","TablePositionSequence"],"9407":["SQ","CollimatorShapeSequence"],"9410":["CS","PlanesInAcquisition"],"9412":["SQ","XAXRFFrameCharacteristicsSequence"],"9417":["SQ","FrameAcquisitionSequence"],"9420":["CS","XRayReceptorType"],"9423":["LO","AcquisitionProtocolName"],"9424":["LT","AcquisitionProtocolDescription"],"9425":["CS","ContrastBolusIngredientOpaque"],"9426":["FL","DistanceReceptorPlaneToDetectorHousing"],"9427":["CS","IntensifierActiveShape"],"9428":["FL","IntensifierActiveDimensions"],"9429":["FL","PhysicalDetectorSize"],"9430":["FL","PositionOfIsocenterProjection"],"9432":["SQ","FieldOfViewSequence"],"9433":["LO","FieldOfViewDescription"],"9434":["SQ","ExposureControlSensingRegionsSequence"],"9435":["CS","ExposureControlSensingRegionShape"],"9436":["SS","ExposureControlSensingRegionLeftVerticalEdge"],"9437":["SS","ExposureControlSensingRegionRightVerticalEdge"],"9438":["SS","ExposureControlSensingRegionUpperHorizontalEdge"],"9439":["SS","ExposureControlSensingRegionLowerHorizontalEdge"],"9440":["SS","CenterOfCircularExposureControlSensingRegion"],"9441":["US","RadiusOfCircularExposureControlSensingRegion"],"9442":["SS","VerticesOfThePolygonalExposureControlSensingRegion"],"9447":["FL","ColumnAngulationPatient"],"9449":["FL","BeamAngle"],"9451":["SQ","FrameDetectorParametersSequence"],"9452":["FL","CalculatedAnatomyThickness"],"9455":["SQ","CalibrationSequence"],"9456":["SQ","ObjectThicknessSequence"],"9457":["CS","PlaneIdentification"],"9461":["FL","FieldOfViewDimensionsInFloat"],"9462":["SQ","IsocenterReferenceSystemSequence"],"9463":["FL","PositionerIsocenterPrimaryAngle"],"9464":["FL","PositionerIsocenterSecondaryAngle"],"9465":["FL","PositionerIsocenterDetectorRotationAngle"],"9466":["FL","TableXPositionToIsocenter"],"9467":["FL","TableYPositionToIsocenter"],"9468":["FL","TableZPositionToIsocenter"],"9469":["FL","TableHorizontalRotationAngle"],"9470":["FL","TableHeadTiltAngle"],"9471":["FL","TableCradleTiltAngle"],"9472":["SQ","FrameDisplayShutterSequence"],"9473":["FL","AcquiredImageAreaDoseProduct"],"9474":["CS","CArmPositionerTabletopRelationship"],"9476":["SQ","XRayGeometrySequence"],"9477":["SQ","IrradiationEventIdentificationSequence"],"9504":["SQ","XRay3DFrameTypeSequence"],"9506":["SQ","ContributingSourcesSequence"],"9507":["SQ","XRay3DAcquisitionSequence"],"9508":["FL","PrimaryPositionerScanArc"],"9509":["FL","SecondaryPositionerScanArc"],"9510":["FL ","PrimaryPositionerScanStartAngle"],"9511":["FL","SecondaryPositionerScanStartAngle"],"9514":["FL","PrimaryPositionerIncrement"],"9515":["FL","SecondaryPositionerIncrement"],"9516":["DT","StartAcquisitionDateTime"],"9517":["DT","EndAcquisitionDateTime"],"9524":["LO","ApplicationName"],"9525":["LO","ApplicationVersion"],"9526":["LO","ApplicationManufacturer"],"9527":["CS","AlgorithmType"],"9528":["LO","AlgorithmDescription"],"9530":["SQ","XRay3DReconstructionSequence"],"9531":["LO","ReconstructionDescription"],"9538":["SQ","PerProjectionAcquisitionSequence"],"9601":["SQ","DiffusionBMatrixSequence"],"9602":["FD","DiffusionBValueXX"],"9603":["FD","DiffusionBValueXY"],"9604":["FD","DiffusionBValueXZ"],"9605":["FD","DiffusionBValueYY"],"9606":["FD","DiffusionBValueYZ"],"9607":["FD","DiffusionBValueZZ"],"9701":["DT","DecayCorrectionDateTime"],"9715":["FD","StartDensityThreshold"],"9716":["FD","StartRelativeDensityDifferenceThreshold"],"9717":["FD","StartCardiacTriggerCountThreshold"],"9718":["FD","StartRespiratoryTriggerCountThreshold"],"9719":["FD","TerminationCountsThreshold"],"9720":["FD","TerminationDensityThreshold"],"9721":["FD","TerminationRelativeDensityThreshold"],"9722":["FD","TerminationTimeThreshold"],"9723":["FD","TerminationCardiacTriggerCountThreshold"],"9724":["FD","TerminationRespiratoryTriggerCountThreshold"],"9725":["CS","DetectorGeometry"],"9726":["FD","TransverseDetectorSeparation"],"9727":["FD","AxialDetectorDimension"],"9729":["US","RadiopharmaceuticalAgentNumber"],"9732":["SQ","PETFrameAcquisitionSequence"],"9733":["SQ","PETDetectorMotionDetailsSequence"],"9734":["SQ","PETTableDynamicsSequence"],"9735":["SQ","PETPositionSequence"],"9736":["SQ","PETFrameCorrectionFactorsSequence"],"9737":["SQ","RadiopharmaceuticalUsageSequence"],"9738":["CS","AttenuationCorrectionSource"],"9739":["US","NumberOfIterations"],"9740":["US","NumberOfSubsets"],"9749":["SQ","PETReconstructionSequence"],"9751":["SQ","PETFrameTypeSequence"],"9755":["CS","TimeOfFlightInformationUsed"],"9756":["CS","ReconstructionType"],"9758":["CS","DecayCorrected"],"9759":["CS","AttenuationCorrected"],"9760":["CS","ScatterCorrected"],"9761":["CS","DeadTimeCorrected"],"9762":["CS","GantryMotionCorrected"],"9763":["CS","PatientMotionCorrected"],"9764":["CS","CountLossNormalizationCorrected"],"9765":["CS","RandomsCorrected"],"9766":["CS","NonUniformRadialSamplingCorrected"],"9767":["CS","SensitivityCalibrated"],"9768":["CS","DetectorNormalizationCorrection"],"9769":["CS","IterativeReconstructionMethod"],"9770":["CS","AttenuationCorrectionTemporalRelationship"],"9771":["SQ","PatientPhysiologicalStateSequence"],"9772":["SQ","PatientPhysiologicalStateCodeSequence"],"9801":["FD","DepthsOfFocus"],"9803":["SQ","ExcludedIntervalsSequence"],"9804":["DT","ExclusionStartDatetime"],"9805":["FD","ExclusionDuration"],"9806":["SQ","USImageDescriptionSequence"],"9807":["SQ","ImageDataTypeSequence"],"9808":["CS","DataType"],"9809":["SQ","TransducerScanPatternCodeSequence"],"980B":["CS","AliasedDataType"],"980C":["CS","PositionMeasuringDeviceUsed"],"980D":["SQ","TransducerGeometryCodeSequence"],"980E":["SQ","TransducerBeamSteeringCodeSequence"],"980F":["SQ","TransducerApplicationCodeSequence"],A001:["SQ","ContributingEquipmentSequence"],A002:["DT","ContributionDateTime"],A003:["ST","ContributionDescription"]},"0020":{"000D":["UI","StudyInstanceUID"],"000E":["UI","SeriesInstanceUID"],"0010":["SH","StudyID"],"0011":["IS","SeriesNumber"],"0012":["IS","AcquisitionNumber"],"0013":["IS","InstanceNumber"],"0014":["IS","IsotopeNumber"],"0015":["IS","PhaseNumber"],"0016":["IS","IntervalNumber"],"0017":["IS","TimeSlotNumber"],"0018":["IS","AngleNumber"],"0019":["IS","ItemNumber"],"0020":["CS","PatientOrientation"],"0022":["IS","OverlayNumber"],"0024":["IS","CurveNumber"],"0026":["IS","LUTNumber"],"0030":["DS","ImagePosition"],"0032":["DS","ImagePositionPatient"],"0035":["DS","ImageOrientation"],"0037":["DS","ImageOrientationPatient"],"0050":["DS","Location"],"0052":["UI","FrameOfReferenceUID"],"0060":["CS","Laterality"],"0062":["CS","ImageLaterality"],"0070":["LO","ImageGeometryType"],"0080":["CS","MaskingImage"],"00AA":["IS","ReportNumber"],"0100":["IS","TemporalPositionIdentifier"],"0105":["IS","NumberOfTemporalPositions"],"0110":["DS","TemporalResolution"],"0200":["UI","SynchronizationFrameOfReferenceUID"],"0242":["UI","SOPInstanceUIDOfConcatenationSource"],"1000":["IS","SeriesInStudy"],"1001":["IS","AcquisitionsInSeries"],"1002":["IS","ImagesInAcquisition"],"1003":["IS","ImagesInSeries"],"1004":["IS","AcquisitionsInStudy"],"1005":["IS","ImagesInStudy"],"1020":["LO","Reference"],"1040":["LO","PositionReferenceIndicator"],"1041":["DS","SliceLocation"],"1070":["IS","OtherStudyNumbers"],"1200":["IS","NumberOfPatientRelatedStudies"],"1202":["IS","NumberOfPatientRelatedSeries"],"1204":["IS","NumberOfPatientRelatedInstances"],"1206":["IS","NumberOfStudyRelatedSeries"],"1208":["IS","NumberOfStudyRelatedInstances"],"1209":["IS","NumberOfSeriesRelatedInstances"],"3401":["CS","ModifyingDeviceID"],"3402":["CS","ModifiedImageID"],"3403":["DA","ModifiedImageDate"],"3404":["LO","ModifyingDeviceManufacturer"],"3405":["TM","ModifiedImageTime"],"3406":["LO","ModifiedImageDescription"],"4000":["LT","ImageComments"],"5000":["AT","OriginalImageIdentification"],"5002":["LO","OriginalImageIdentificationNomenclature"],"9056":["SH","StackID"],"9057":["UL","InStackPositionNumber"],"9071":["SQ","FrameAnatomySequence"],"9072":["CS","FrameLaterality"],"9111":["SQ","FrameContentSequence"],"9113":["SQ","PlanePositionSequence"],"9116":["SQ","PlaneOrientationSequence"],"9128":["UL","TemporalPositionIndex"],"9153":["FD","NominalCardiacTriggerDelayTime"],"9154":["FL","NominalCardiacTriggerTimePriorToRPeak"],"9155":["FL","ActualCardiacTriggerTimePriorToRPeak"],"9156":["US","FrameAcquisitionNumber"],"9157":["UL","DimensionIndexValues"],"9158":["LT","FrameComments"],"9161":["UI","ConcatenationUID"],"9162":["US","InConcatenationNumber"],"9163":["US","InConcatenationTotalNumber"],"9164":["UI","DimensionOrganizationUID"],"9165":["AT","DimensionIndexPointer"],"9167":["AT","FunctionalGroupPointer"],"9213":["LO","DimensionIndexPrivateCreator"],"9221":["SQ","DimensionOrganizationSequence"],"9222":["SQ","DimensionIndexSequence"],"9228":["UL","ConcatenationFrameOffsetNumber"],"9238":["LO","FunctionalGroupPrivateCreator"],"9241":["FL","NominalPercentageOfCardiacPhase"],"9245":["FL","NominalPercentageOfRespiratoryPhase"],"9246":["FL","StartingRespiratoryAmplitude"],"9247":["CS","StartingRespiratoryPhase"],"9248":["FL","EndingRespiratoryAmplitude"],"9249":["CS","EndingRespiratoryPhase"],"9250":["CS","RespiratoryTriggerType"],"9251":["FD","RRIntervalTimeNominal"],"9252":["FD","ActualCardiacTriggerDelayTime"],"9253":["SQ","RespiratorySynchronizationSequence"],"9254":["FD","RespiratoryIntervalTime"],"9255":["FD","NominalRespiratoryTriggerDelayTime"],"9256":["FD","RespiratoryTriggerDelayThreshold"],"9257":["FD","ActualRespiratoryTriggerDelayTime"],"9301":["FD","ImagePositionVolume"],"9302":["FD","ImageOrientationVolume"],"9307":["CS","UltrasoundAcquisitionGeometry"],"9308":["FD","ApexPosition"],"9309":["FD","VolumeToTransducerMappingMatrix"],"930A":["FD","VolumeToTableMappingMatrix"],"930C":["CS","PatientFrameOfReferenceSource"],"930D":["FD","TemporalPositionTimeOffset"],"930E":["SQ","PlanePositionVolumeSequence"],"930F":["SQ","PlaneOrientationVolumeSequence"],"9310":["SQ","TemporalPositionSequence"],"9311":["CS","DimensionOrganizationType"],"9312":["UI","VolumeFrameOfReferenceUID"],"9313":["UI","TableFrameOfReferenceUID"],"9421":["LO","DimensionDescriptionLabel"],"9450":["SQ","PatientOrientationInFrameSequence"],"9453":["LO","FrameLabel"],"9518":["US","AcquisitionIndex"],"9529":["SQ","ContributingSOPInstancesReferenceSequence"],"9536":["US","ReconstructionIndex"]},"0022":{"0001":["US","LightPathFilterPassThroughWavelength"],"0002":["US","LightPathFilterPassBand"],"0003":["US","ImagePathFilterPassThroughWavelength"],"0004":["US","ImagePathFilterPassBand"],"0005":["CS","PatientEyeMovementCommanded"],"0006":["SQ","PatientEyeMovementCommandCodeSequence"],"0007":["FL","SphericalLensPower"],"0008":["FL","CylinderLensPower"],"0009":["FL","CylinderAxis"],"000A":["FL","EmmetropicMagnification"],"000B":["FL","IntraOcularPressure"],"000C":["FL","HorizontalFieldOfView"],"000D":["CS","PupilDilated"],"000E":["FL","DegreeOfDilation"],"0010":["FL","StereoBaselineAngle"],"0011":["FL","StereoBaselineDisplacement"],"0012":["FL","StereoHorizontalPixelOffset"],"0013":["FL","StereoVerticalPixelOffset"],"0014":["FL","StereoRotation"],"0015":["SQ","AcquisitionDeviceTypeCodeSequence"],"0016":["SQ","IlluminationTypeCodeSequence"],"0017":["SQ","LightPathFilterTypeStackCodeSequence"],"0018":["SQ","ImagePathFilterTypeStackCodeSequence"],"0019":["SQ","LensesCodeSequence"],"001A":["SQ","ChannelDescriptionCodeSequence"],"001B":["SQ","RefractiveStateSequence"],"001C":["SQ","MydriaticAgentCodeSequence"],"001D":["SQ","RelativeImagePositionCodeSequence"],"001E":["FL","CameraAngleOfView"],"0020":["SQ","StereoPairsSequence"],"0021":["SQ","LeftImageSequence"],"0022":["SQ","RightImageSequence"],"0030":["FL","AxialLengthOfTheEye"],"0031":["SQ","OphthalmicFrameLocationSequence"],"0032":["FL","ReferenceCoordinates"],"0035":["FL","DepthSpatialResolution"],"0036":["FL","MaximumDepthDistortion"],"0037":["FL","AlongScanSpatialResolution"],"0038":["FL","MaximumAlongScanDistortion"],"0039":["CS","OphthalmicImageOrientation"],"0041":["FL","DepthOfTransverseImage"],"0042":["SQ","MydriaticAgentConcentrationUnitsSequence"],"0048":["FL","AcrossScanSpatialResolution"],"0049":["FL","MaximumAcrossScanDistortion"],"004E":["DS","MydriaticAgentConcentration"],"0055":["FL","IlluminationWaveLength"],"0056":["FL","IlluminationPower"],"0057":["FL","IlluminationBandwidth"],"0058":["SQ","MydriaticAgentSequence"],"1007":["SQ","OphthalmicAxialMeasurementsRightEyeSequence"],"1008":["SQ","OphthalmicAxialMeasurementsLeftEyeSequence"],"1010":["CS","OphthalmicAxialLengthMeasurementsType"],"1019":["FL","OphthalmicAxialLength"],"1024":["SQ","LensStatusCodeSequence"],"1025":["SQ","VitreousStatusCodeSequence"],"1028":["SQ","IOLFormulaCodeSequence"],"1029":["LO","IOLFormulaDetail"],"1033":["FL","KeratometerIndex"],"1035":["SQ","SourceOfOphthalmicAxialLengthCodeSequence"],"1037":["FL","TargetRefraction"],"1039":["CS","RefractiveProcedureOccurred"],"1040":["SQ","RefractiveSurgeryTypeCodeSequence"],"1044":["SQ","OphthalmicUltrasoundAxialMeasurementsTypeCodeSequence"],"1050":["SQ","OphthalmicAxialLengthMeasurementsSequence"],"1053":["FL","IOLPower"],"1054":["FL","PredictedRefractiveError"],"1059":["FL","OphthalmicAxialLengthVelocity"],"1065":["LO","LensStatusDescription"],"1066":["LO","VitreousStatusDescription"],"1090":["SQ","IOLPowerSequence"],"1092":["SQ","LensConstantSequence"],"1093":["LO","IOLManufacturer"],"1094":["LO","LensConstantDescription"],"1096":["SQ","KeratometryMeasurementTypeCodeSequence"],"1100":["SQ","ReferencedOphthalmicAxialMeasurementsSequence"],"1101":["SQ","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],"1103":["SQ","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],"1121":["FL","IOLPowerForExactEmmetropia"],"1122":["FL","IOLPowerForExactTargetRefraction"],"1125":["SQ","AnteriorChamberDepthDefinitionCodeSequence"],"1130":["FL","LensThickness"],"1131":["FL","AnteriorChamberDepth"],"1132":["SQ","SourceOfLensThicknessDataCodeSequence"],"1133":["SQ","SourceOfAnteriorChamberDepthDataCodeSequence"],"1135":["SQ","SourceOfRefractiveErrorDataCodeSequence"],"1140":["CS","OphthalmicAxialLengthMeasurementModified"],"1150":["SQ","OphthalmicAxialLengthDataSourceCodeSequence"],"1153":["SQ","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],"1155":["FL","SignalToNoiseRatio"],"1159":["LO","OphthalmicAxialLengthDataSourceDescription"],"1210":["SQ","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],"1211":["SQ","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],"1212":["SQ","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],"1220":["SQ","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],"1225":["SQ","OpticalOphthalmicAxialLengthMeasurementsSequence"],"1230":["SQ","UltrasoundSelectedOphthalmicAxialLengthSequence"],"1250":["SQ","OphthalmicAxialLengthSelectionMethodCodeSequence"],"1255":["SQ","OpticalSelectedOphthalmicAxialLengthSequence"],"1257":["SQ","SelectedSegmentalOphthalmicAxialLengthSequence"],"1260":["SQ","SelectedTotalOphthalmicAxialLengthSequence"],"1262":["SQ","OphthalmicAxialLengthQualityMetricSequence"],"1273":["LO","OphthalmicAxialLengthQualityMetricTypeDescription"],"1300":["SQ","IntraocularLensCalculationsRightEyeSequence"],"1310":["SQ","IntraocularLensCalculationsLeftEyeSequence"],"1330":["SQ","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"]},"0024":{"0010":["FL","VisualFieldHorizontalExtent"],"0011":["FL","VisualFieldVerticalExtent"],"0012":["CS","VisualFieldShape"],"0016":["SQ","ScreeningTestModeCodeSequence"],"0018":["FL","MaximumStimulusLuminance"],"0020":["FL","BackgroundLuminance"],"0021":["SQ","StimulusColorCodeSequence"],"0024":["SQ","BackgroundIlluminationColorCodeSequence"],"0025":["FL","StimulusArea"],"0028":["FL","StimulusPresentationTime"],"0032":["SQ","FixationSequence"],"0033":["SQ","FixationMonitoringCodeSequence"],"0034":["SQ","VisualFieldCatchTrialSequence"],"0035":["US","FixationCheckedQuantity"],"0036":["US","PatientNotProperlyFixatedQuantity"],"0037":["CS","PresentedVisualStimuliDataFlag"],"0038":["US","NumberOfVisualStimuli"],"0039":["CS","ExcessiveFixationLossesDataFlag"],"0040":["CS","ExcessiveFixationLosses"],"0042":["US","StimuliRetestingQuantity"],"0044":["LT","CommentsOnPatientPerformanceOfVisualField"],"0045":["CS","FalseNegativesEstimateFlag"],"0046":["FL","FalseNegativesEstimate"],"0048":["US","NegativeCatchTrialsQuantity"],"0050":["US","FalseNegativesQuantity"],"0051":["CS","ExcessiveFalseNegativesDataFlag"],"0052":["CS","ExcessiveFalseNegatives"],"0053":["CS","FalsePositivesEstimateFlag"],"0054":["FL","FalsePositivesEstimate"],"0055":["CS","CatchTrialsDataFlag"],"0056":["US","PositiveCatchTrialsQuantity"],"0057":["CS","TestPointNormalsDataFlag"],"0058":["SQ","TestPointNormalsSequence"],"0059":["CS","GlobalDeviationProbabilityNormalsFlag"],"0060":["US","FalsePositivesQuantity"],"0061":["CS","ExcessiveFalsePositivesDataFlag"],"0062":["CS","ExcessiveFalsePositives"],"0063":["CS","VisualFieldTestNormalsFlag"],"0064":["SQ","ResultsNormalsSequence"],"0065":["SQ","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0066":["FL","GlobalDeviationFromNormal"],"0067":["SQ","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0068":["FL","LocalizedDeviationfromNormal"],"0069":["LO","PatientReliabilityIndicator"],"0070":["FL","VisualFieldMeanSensitivity"],"0071":["FL","GlobalDeviationProbability"],"0072":["CS","LocalDeviationProbabilityNormalsFlag"],"0073":["FL","LocalizedDeviationProbability"],"0074":["CS","ShortTermFluctuationCalculated"],"0075":["FL","ShortTermFluctuation"],"0076":["CS","ShortTermFluctuationProbabilityCalculated"],"0077":["FL","ShortTermFluctuationProbability"],"0078":["CS","CorrectedLocalizedDeviationFromNormalCalculated"],"0079":["FL","CorrectedLocalizedDeviationFromNormal"],"0080":["CS","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0081":["FL","CorrectedLocalizedDeviationFromNormalProbability"],"0083":["SQ","GlobalDeviationProbabilitySequence"],"0085":["SQ","LocalizedDeviationProbabilitySequence"],"0086":["CS","FovealSensitivityMeasured"],"0087":["FL","FovealSensitivity"],"0088":["FL","VisualFieldTestDuration"],"0089":["SQ","VisualFieldTestPointSequence"],"0090":["FL","VisualFieldTestPointXCoordinate"],"0091":["FL","VisualFieldTestPointYCoordinate"],"0092":["FL","AgeCorrectedSensitivityDeviationValue"],"0093":["CS","StimulusResults"],"0094":["FL","SensitivityValue"],"0095":["CS","RetestStimulusSeen"],"0096":["FL","RetestSensitivityValue"],"0097":["SQ","VisualFieldTestPointNormalsSequence"],"0098":["FL","QuantifiedDefect"],"0100":["FL","AgeCorrectedSensitivityDeviationProbabilityValue"],"0102":["CS","GeneralizedDefectCorrectedSensitivityDeviationFlag "],"0103":["FL","GeneralizedDefectCorrectedSensitivityDeviationValue "],"0104":["FL","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0105":["FL ","MinimumSensitivityValue"],"0106":["CS","BlindSpotLocalized"],"0107":["FL","BlindSpotXCoordinate"],"0108":["FL","BlindSpotYCoordinate "],"0110":["SQ","VisualAcuityMeasurementSequence"],"0112":["SQ","RefractiveParametersUsedOnPatientSequence"],"0113":["CS","MeasurementLaterality"],"0114":["SQ","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0115":["SQ","OphthalmicPatientClinicalInformationRightEyeSequence"],"0117":["CS","FovealPointNormativeDataFlag"],"0118":["FL","FovealPointProbabilityValue"],"0120":["CS","ScreeningBaselineMeasured"],"0122":["SQ","ScreeningBaselineMeasuredSequence"],"0124":["CS","ScreeningBaselineType"],"0126":["FL","ScreeningBaselineValue"],"0202":["LO","AlgorithmSource"],"0306":["LO","DataSetName"],"0307":["LO","DataSetVersion"],"0308":["LO","DataSetSource"],"0309":["LO","DataSetDescription"],"0317":["SQ","VisualFieldTestReliabilityGlobalIndexSequence"],"0320":["SQ","VisualFieldGlobalResultsIndexSequence"],"0325":["SQ","DataObservationSequence"],"0338":["CS","IndexNormalsFlag"],"0341":["FL","IndexProbability"],"0344":["SQ","IndexProbabilitySequence"]},"0028":{"0002":["US","SamplesPerPixel"],"0003":["US","SamplesPerPixelUsed"],"0004":["CS","PhotometricInterpretation"],"0005":["US","ImageDimensions"],"0006":["US","PlanarConfiguration"],"0008":["IS","NumberOfFrames"],"0009":["AT","FrameIncrementPointer"],"000A":["AT","FrameDimensionPointer"],"0010":["US","Rows"],"0011":["US","Columns"],"0012":["US","Planes"],"0014":["US","UltrasoundColorDataPresent"],"0030":["DS","PixelSpacing"],"0031":["DS","ZoomFactor"],"0032":["DS","ZoomCenter"],"0034":["IS","PixelAspectRatio"],"0040":["CS","ImageFormat"],"0050":["LO","ManipulatedImage"],"0051":["CS","CorrectedImage"],"005F":["LO","CompressionRecognitionCode"],"0060":["CS","CompressionCode"],"0061":["SH","CompressionOriginator"],"0062":["LO","CompressionLabel"],"0063":["SH","CompressionDescription"],"0065":["CS","CompressionSequence"],"0066":["AT","CompressionStepPointers"],"0068":["US","RepeatInterval"],"0069":["US","BitsGrouped"],"0070":["US","PerimeterTable"],"0071":["SS","PerimeterValue"],"0080":["US","PredictorRows"],"0081":["US","PredictorColumns"],"0082":["US","PredictorConstants"],"0090":["CS","BlockedPixels"],"0091":["US","BlockRows"],"0092":["US","BlockColumns"],"0093":["US","RowOverlap"],"0094":["US","ColumnOverlap"],"0100":["US","BitsAllocated"],"0101":["US","BitsStored"],"0102":["US","HighBit"],"0103":["US","PixelRepresentation"],"0104":["SS","SmallestValidPixelValue"],"0105":["SS","LargestValidPixelValue"],"0106":["SS","SmallestImagePixelValue"],"0107":["SS","LargestImagePixelValue"],"0108":["SS","SmallestPixelValueInSeries"],"0109":["SS","LargestPixelValueInSeries"],"0110":["SS","SmallestImagePixelValueInPlane"],"0111":["SS","LargestImagePixelValueInPlane"],"0120":["SS","PixelPaddingValue"],"0121":["SS","PixelPaddingRangeLimit"],"0200":["US","ImageLocation"],"0300":["CS","QualityControlImage"],"0301":["CS","BurnedInAnnotation"],"0302":["CS","RecognizableVisualFeatures"],"0303":["CS","LongitudinalTemporalInformationModified"],"0400":["LO","TransformLabel"],"0401":["LO","TransformVersionNumber"],"0402":["US","NumberOfTransformSteps"],"0403":["LO","SequenceOfCompressedData"],"0404":["AT","DetailsOfCoefficients"],"0700":["LO","DCTLabel"],"0701":["CS","DataBlockDescription"],"0702":["AT","DataBlock"],"0710":["US","NormalizationFactorFormat"],"0720":["US","ZonalMapNumberFormat"],"0721":["AT","ZonalMapLocation"],"0722":["US","ZonalMapFormat"],"0730":["US","AdaptiveMapFormat"],"0740":["US","CodeNumberFormat"],"0A02":["CS","PixelSpacingCalibrationType"],"0A04":["LO","PixelSpacingCalibrationDescription"],"1040":["CS","PixelIntensityRelationship"],"1041":["SS","PixelIntensityRelationshipSign"],"1050":["DS","WindowCenter"],"1051":["DS","WindowWidth"],"1052":["DS","RescaleIntercept"],"1053":["DS","RescaleSlope"],"1054":["LO","RescaleType"],"1055":["LO","WindowCenterWidthExplanation"],"1056":["CS","VOILUTFunction"],"1080":["CS","GrayScale"],"1090":["CS","RecommendedViewingMode"],"1100":["SS","GrayLookupTableDescriptor"],"1101":["SS","RedPaletteColorLookupTableDescriptor"],"1102":["SS","GreenPaletteColorLookupTableDescriptor"],"1103":["SS","BluePaletteColorLookupTableDescriptor"],"1104":["US","AlphaPaletteColorLookupTableDescriptor"],"1111":["SS","LargeRedPaletteColorLookupTableDescriptor"],"1112":["SS","LargeGreenPaletteColorLookupTableDescriptor"],"1113":["SS","LargeBluePaletteColorLookupTableDescriptor"],"1199":["UI","PaletteColorLookupTableUID"],"1200":["OW","GrayLookupTableData"],"1201":["OW","RedPaletteColorLookupTableData"],"1202":["OW","GreenPaletteColorLookupTableData"],"1203":["OW","BluePaletteColorLookupTableData"],"1204":["OW","AlphaPaletteColorLookupTableData"],"1211":["OW","LargeRedPaletteColorLookupTableData"],"1212":["OW","LargeGreenPaletteColorLookupTableData"],"1213":["OW","LargeBluePaletteColorLookupTableData"],"1214":["UI","LargePaletteColorLookupTableUID"],"1221":["OW","SegmentedRedPaletteColorLookupTableData"],"1222":["OW","SegmentedGreenPaletteColorLookupTableData"],"1223":["OW","SegmentedBluePaletteColorLookupTableData"],"1300":["CS","BreastImplantPresent"],"1350":["CS","PartialView"],"1351":["ST","PartialViewDescription"],"1352":["SQ","PartialViewCodeSequence"],"135A":["CS","SpatialLocationsPreserved"],"1401":["SQ","DataFrameAssignmentSequence"],"1402":["CS","DataPathAssignment"],"1403":["US","BitsMappedToColorLookupTable"],"1404":["SQ","BlendingLUT1Sequence"],"1405":["CS","BlendingLUT1TransferFunction"],"1406":["FD","BlendingWeightConstant"],"1407":["US","BlendingLookupTableDescriptor"],"1408":["OW","BlendingLookupTableData"],"140B":["SQ","EnhancedPaletteColorLookupTableSequence"],"140C":["SQ","BlendingLUT2Sequence"],"140D":["CS","BlendingLUT2TransferFunction"],"140E":["CS","DataPathID"],"140F":["CS","RGBLUTTransferFunction"],"1410":["CS","AlphaLUTTransferFunction"],"2000":["OB","ICCProfile"],"2110":["CS","LossyImageCompression"],"2112":["DS","LossyImageCompressionRatio"],"2114":["CS","LossyImageCompressionMethod"],"3000":["SQ","ModalityLUTSequence"],"3002":["SS","LUTDescriptor"],"3003":["LO","LUTExplanation"],"3004":["LO","ModalityLUTType"],"3006":["OW","LUTData"],"3010":["SQ","VOILUTSequence"],"3110":["SQ","SoftcopyVOILUTSequence"],"4000":["LT","ImagePresentationComments"],"5000":["SQ","BiPlaneAcquisitionSequence"],"6010":["US","RepresentativeFrameNumber"],"6020":["US","FrameNumbersOfInterest"],"6022":["LO","FrameOfInterestDescription"],"6023":["CS","FrameOfInterestType"],"6030":["US","MaskPointers"],"6040":["US","RWavePointer"],"6100":["SQ","MaskSubtractionSequence"],"6101":["CS","MaskOperation"],"6102":["US","ApplicableFrameRange"],"6110":["US","MaskFrameNumbers"],"6112":["US","ContrastFrameAveraging"],"6114":["FL","MaskSubPixelShift"],"6120":["SS","TIDOffset"],"6190":["ST","MaskOperationExplanation"],"7FE0":["UT","PixelDataProviderURL"],"9001":["UL","DataPointRows"],"9002":["UL","DataPointColumns"],"9003":["CS","SignalDomainColumns"],"9099":["US","LargestMonochromePixelValue"],"9108":["CS","DataRepresentation"],"9110":["SQ","PixelMeasuresSequence"],"9132":["SQ","FrameVOILUTSequence"],"9145":["SQ","PixelValueTransformationSequence"],"9235":["CS","SignalDomainRows"],"9411":["FL","DisplayFilterPercentage"],"9415":["SQ","FramePixelShiftSequence"],"9416":["US","SubtractionItemID"],"9422":["SQ","PixelIntensityRelationshipLUTSequence"],"9443":["SQ","FramePixelDataPropertiesSequence"],"9444":["CS","GeometricalProperties"],"9445":["FL","GeometricMaximumDistortion"],"9446":["CS","ImageProcessingApplied"],"9454":["CS","MaskSelectionMode"],"9474":["CS","LUTFunction"],"9478":["FL","MaskVisibilityPercentage"],"9501":["SQ","PixelShiftSequence"],"9502":["SQ","RegionPixelShiftSequence"],"9503":["SS","VerticesOfTheRegion"],"9505":["SQ","MultiFramePresentationSequence"],"9506":["US","PixelShiftFrameRange"],"9507":["US","LUTFrameRange"],"9520":["DS","ImageToEquipmentMappingMatrix"],"9537":["CS","EquipmentCoordinateSystemIdentification"]},"0032":{"000A":["CS","StudyStatusID"],"000C":["CS","StudyPriorityID"],"0012":["LO","StudyIDIssuer"],"0032":["DA","StudyVerifiedDate"],"0033":["TM","StudyVerifiedTime"],"0034":["DA","StudyReadDate"],"0035":["TM","StudyReadTime"],"1000":["DA","ScheduledStudyStartDate"],"1001":["TM","ScheduledStudyStartTime"],"1010":["DA","ScheduledStudyStopDate"],"1011":["TM","ScheduledStudyStopTime"],"1020":["LO","ScheduledStudyLocation"],"1021":["AE","ScheduledStudyLocationAETitle"],"1030":["LO","ReasonForStudy"],"1031":["SQ","RequestingPhysicianIdentificationSequence"],"1032":["PN","RequestingPhysician"],"1033":["LO","RequestingService"],"1034":["SQ","RequestingServiceCodeSequence"],"1040":["DA","StudyArrivalDate"],"1041":["TM","StudyArrivalTime"],"1050":["DA","StudyCompletionDate"],"1051":["TM","StudyCompletionTime"],"1055":["CS","StudyComponentStatusID"],"1060":["LO","RequestedProcedureDescription"],"1064":["SQ","RequestedProcedureCodeSequence"],"1070":["LO","RequestedContrastAgent"],"4000":["LT","StudyComments"]},"0038":{"0004":["SQ","ReferencedPatientAliasSequence"],"0008":["CS","VisitStatusID"],"0010":["LO","AdmissionID"],"0011":["LO","IssuerOfAdmissionID"],"0014":["SQ","IssuerOfAdmissionIDSequence"],"0016":["LO","RouteOfAdmissions"],"001A":["DA","ScheduledAdmissionDate"],"001B":["TM","ScheduledAdmissionTime"],"001C":["DA","ScheduledDischargeDate"],"001D":["TM","ScheduledDischargeTime"],"001E":["LO","ScheduledPatientInstitutionResidence"],"0020":["DA","AdmittingDate"],"0021":["TM","AdmittingTime"],"0030":["DA","DischargeDate"],"0032":["TM","DischargeTime"],"0040":["LO","DischargeDiagnosisDescription"],"0044":["SQ","DischargeDiagnosisCodeSequence"],"0050":["LO","SpecialNeeds"],"0060":["LO","ServiceEpisodeID"],"0061":["LO","IssuerOfServiceEpisodeID"],"0062":["LO","ServiceEpisodeDescription"],"0064":["SQ","IssuerOfServiceEpisodeIDSequence"],"0100":["SQ","PertinentDocumentsSequence"],"0300":["LO","CurrentPatientLocation"],"0400":["LO","PatientInstitutionResidence"],"0500":["LO","PatientState"],"0502":["SQ","PatientClinicalTrialParticipationSequence"],"4000":["LT","VisitComments"]},"003A":{"0004":["CS","WaveformOriginality"],"0005":["US","NumberOfWaveformChannels"],"0010":["UL","NumberOfWaveformSamples"],"001A":["DS","SamplingFrequency"],"0020":["SH","MultiplexGroupLabel"],"0200":["SQ","ChannelDefinitionSequence"],"0202":["IS","WaveformChannelNumber"],"0203":["SH","ChannelLabel"],"0205":["CS","ChannelStatus"],"0208":["SQ","ChannelSourceSequence"],"0209":["SQ","ChannelSourceModifiersSequence"],"020A":["SQ","SourceWaveformSequence"],"020C":["LO","ChannelDerivationDescription"],"0210":["DS","ChannelSensitivity"],"0211":["SQ","ChannelSensitivityUnitsSequence"],"0212":["DS","ChannelSensitivityCorrectionFactor"],"0213":["DS","ChannelBaseline"],"0214":["DS","ChannelTimeSkew"],"0215":["DS","ChannelSampleSkew"],"0218":["DS","ChannelOffset"],"021A":["US","WaveformBitsStored"],"0220":["DS","FilterLowFrequency"],"0221":["DS","FilterHighFrequency"],"0222":["DS","NotchFilterFrequency"],"0223":["DS","NotchFilterBandwidth"],"0230":["FL","WaveformDataDisplayScale"],"0231":["US","WaveformDisplayBackgroundCIELabValue"],"0240":["SQ","WaveformPresentationGroupSequence"],"0241":["US","PresentationGroupNumber"],"0242":["SQ","ChannelDisplaySequence"],"0244":["US","ChannelRecommendedDisplayCIELabValue"],"0245":["FL","ChannelPosition"],"0246":["CS","DisplayShadingFlag"],"0247":["FL","FractionalChannelDisplayScale"],"0248":["FL","AbsoluteChannelDisplayScale"],"0300":["SQ","MultiplexedAudioChannelsDescriptionCodeSequence"],"0301":["IS","ChannelIdentificationCode"],"0302":["CS","ChannelMode"]},"0040":{"0001":["AE","ScheduledStationAETitle"],"0002":["DA","ScheduledProcedureStepStartDate"],"0003":["TM","ScheduledProcedureStepStartTime"],"0004":["DA","ScheduledProcedureStepEndDate"],"0005":["TM","ScheduledProcedureStepEndTime"],"0006":["PN","ScheduledPerformingPhysicianName"],"0007":["LO","ScheduledProcedureStepDescription"],"0008":["SQ","ScheduledProtocolCodeSequence"],"0009":["SH","ScheduledProcedureStepID"],"000A":["SQ","StageCodeSequence"],"000B":["SQ","ScheduledPerformingPhysicianIdentificationSequence"],"0010":["SH","ScheduledStationName"],"0011":["SH","ScheduledProcedureStepLocation"],"0012":["LO","PreMedication"],"0020":["CS","ScheduledProcedureStepStatus"],"0026":["SQ","OrderPlacerIdentifierSequence"],"0027":["SQ","OrderFillerIdentifierSequence"],"0031":["UT","LocalNamespaceEntityID"],"0032":["UT","UniversalEntityID"],"0033":["CS","UniversalEntityIDType"],"0035":["CS","IdentifierTypeCode"],"0036":["SQ","AssigningFacilitySequence"],"0039":["SQ","AssigningJurisdictionCodeSequence"],"003A":["SQ","AssigningAgencyOrDepartmentCodeSequence"],"0100":["SQ","ScheduledProcedureStepSequence"],"0220":["SQ","ReferencedNonImageCompositeSOPInstanceSequence"],"0241":["AE","PerformedStationAETitle"],"0242":["SH","PerformedStationName"],"0243":["SH","PerformedLocation"],"0244":["DA","PerformedProcedureStepStartDate"],"0245":["TM","PerformedProcedureStepStartTime"],"0250":["DA","PerformedProcedureStepEndDate"],"0251":["TM","PerformedProcedureStepEndTime"],"0252":["CS","PerformedProcedureStepStatus"],"0253":["SH","PerformedProcedureStepID"],"0254":["LO","PerformedProcedureStepDescription"],"0255":["LO","PerformedProcedureTypeDescription"],"0260":["SQ","PerformedProtocolCodeSequence"],"0261":["CS","PerformedProtocolType"],"0270":["SQ","ScheduledStepAttributesSequence"],"0275":["SQ","RequestAttributesSequence"],"0280":["ST","CommentsOnThePerformedProcedureStep"],"0281":["SQ","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0293":["SQ","QuantitySequence"],"0294":["DS","Quantity"],"0295":["SQ","MeasuringUnitsSequence"],"0296":["SQ","BillingItemSequence"],"0300":["US","TotalTimeOfFluoroscopy"],"0301":["US","TotalNumberOfExposures"],"0302":["US","EntranceDose"],"0303":["US","ExposedArea"],"0306":["DS","DistanceSourceToEntrance"],"0307":["DS","DistanceSourceToSupport"],"030E":["SQ","ExposureDoseSequence"],"0310":["ST","CommentsOnRadiationDose"],"0312":["DS","XRayOutput"],"0314":["DS","HalfValueLayer"],"0316":["DS","OrganDose"],"0318":["CS","OrganExposed"],"0320":["SQ","BillingProcedureStepSequence"],"0321":["SQ","FilmConsumptionSequence"],"0324":["SQ","BillingSuppliesAndDevicesSequence"],"0330":["SQ","ReferencedProcedureStepSequence"],"0340":["SQ","PerformedSeriesSequence"],"0400":["LT","CommentsOnTheScheduledProcedureStep"],"0440":["SQ","ProtocolContextSequence"],"0441":["SQ","ContentItemModifierSequence"],"0500":["SQ","ScheduledSpecimenSequence"],"050A":["LO","SpecimenAccessionNumber"],"0512":["LO","ContainerIdentifier"],"0513":["SQ","IssuerOfTheContainerIdentifierSequence"],"0515":["SQ","AlternateContainerIdentifierSequence"],"0518":["SQ","ContainerTypeCodeSequence"],"051A":["LO","ContainerDescription"],"0520":["SQ","ContainerComponentSequence"],"0550":["SQ","SpecimenSequence"],"0551":["LO","SpecimenIdentifier"],"0552":["SQ","SpecimenDescriptionSequenceTrial"],"0553":["ST","SpecimenDescriptionTrial"],"0554":["UI","SpecimenUID"],"0555":["SQ","AcquisitionContextSequence"],"0556":["ST","AcquisitionContextDescription"],"059A":["SQ","SpecimenTypeCodeSequence"],"0560":["SQ","SpecimenDescriptionSequence"],"0562":["SQ","IssuerOfTheSpecimenIdentifierSequence"],"0600":["LO","SpecimenShortDescription"],"0602":["UT","SpecimenDetailedDescription"],"0610":["SQ","SpecimenPreparationSequence"],"0612":["SQ","SpecimenPreparationStepContentItemSequence"],"0620":["SQ","SpecimenLocalizationContentItemSequence"],"06FA":["LO","SlideIdentifier"],"071A":["SQ","ImageCenterPointCoordinatesSequence"],"072A":["DS","XOffsetInSlideCoordinateSystem"],"073A":["DS","YOffsetInSlideCoordinateSystem"],"074A":["DS","ZOffsetInSlideCoordinateSystem"],"08D8":["SQ","PixelSpacingSequence"],"08DA":["SQ","CoordinateSystemAxisCodeSequence"],"08EA":["SQ","MeasurementUnitsCodeSequence"],"09F8":["SQ","VitalStainCodeSequenceTrial"],"1001":["SH","RequestedProcedureID"],"1002":["LO","ReasonForTheRequestedProcedure"],"1003":["SH","RequestedProcedurePriority"],"1004":["LO","PatientTransportArrangements"],"1005":["LO","RequestedProcedureLocation"],"1006":["SH","PlacerOrderNumberProcedure"],"1007":["SH","FillerOrderNumberProcedure"],"1008":["LO","ConfidentialityCode"],"1009":["SH","ReportingPriority"],"100A":["SQ","ReasonForRequestedProcedureCodeSequence"],"1010":["PN","NamesOfIntendedRecipientsOfResults"],"1011":["SQ","IntendedRecipientsOfResultsIdentificationSequence"],"1012":["SQ","ReasonForPerformedProcedureCodeSequence"],"1060":["LO","RequestedProcedureDescriptionTrial"],"1101":["SQ","PersonIdentificationCodeSequence"],"1102":["ST","PersonAddress"],"1103":["LO","PersonTelephoneNumbers"],"1400":["LT","RequestedProcedureComments"],"2001":["LO","ReasonForTheImagingServiceRequest"],"2004":["DA","IssueDateOfImagingServiceRequest"],"2005":["TM","IssueTimeOfImagingServiceRequest"],"2006":["SH","PlacerOrderNumberImagingServiceRequestRetired"],"2007":["SH","FillerOrderNumberImagingServiceRequestRetired"],"2008":["PN","OrderEnteredBy"],"2009":["SH","OrderEntererLocation"],"2010":["SH","OrderCallbackPhoneNumber"],"2016":["LO","PlacerOrderNumberImagingServiceRequest"],"2017":["LO","FillerOrderNumberImagingServiceRequest"],"2400":["LT","ImagingServiceRequestComments"],"3001":["LO","ConfidentialityConstraintOnPatientDataDescription"],"4001":["CS","GeneralPurposeScheduledProcedureStepStatus"],"4002":["CS","GeneralPurposePerformedProcedureStepStatus"],"4003":["CS","GeneralPurposeScheduledProcedureStepPriority"],"4004":["SQ","ScheduledProcessingApplicationsCodeSequence"],"4005":["DT","ScheduledProcedureStepStartDateTime"],"4006":["CS","MultipleCopiesFlag"],"4007":["SQ","PerformedProcessingApplicationsCodeSequence"],"4009":["SQ","HumanPerformerCodeSequence"],"4010":["DT","ScheduledProcedureStepModificationDateTime"],"4011":["DT","ExpectedCompletionDateTime"],"4015":["SQ","ResultingGeneralPurposePerformedProcedureStepsSequence"],"4016":["SQ","ReferencedGeneralPurposeScheduledProcedureStepSequence"],"4018":["SQ","ScheduledWorkitemCodeSequence"],"4019":["SQ","PerformedWorkitemCodeSequence"],"4020":["CS","InputAvailabilityFlag"],"4021":["SQ","InputInformationSequence"],"4022":["SQ","RelevantInformationSequence"],"4023":["UI","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],"4025":["SQ","ScheduledStationNameCodeSequence"],"4026":["SQ","ScheduledStationClassCodeSequence"],"4027":["SQ","ScheduledStationGeographicLocationCodeSequence"],"4028":["SQ","PerformedStationNameCodeSequence"],"4029":["SQ","PerformedStationClassCodeSequence"],"4030":["SQ","PerformedStationGeographicLocationCodeSequence"],"4031":["SQ","RequestedSubsequentWorkitemCodeSequence"],"4032":["SQ","NonDICOMOutputCodeSequence"],"4033":["SQ","OutputInformationSequence"],"4034":["SQ","ScheduledHumanPerformersSequence"],"4035":["SQ","ActualHumanPerformersSequence"],"4036":["LO","HumanPerformerOrganization"],"4037":["PN","HumanPerformerName"],"4040":["CS","RawDataHandling"],"4041":["CS","InputReadinessState"],"4050":["DT","PerformedProcedureStepStartDateTime"],"4051":["DT","PerformedProcedureStepEndDateTime"],"4052":["DT","ProcedureStepCancellationDateTime"],"8302":["DS","EntranceDoseInmGy"],"9094":["SQ","ReferencedImageRealWorldValueMappingSequence"],"9096":["SQ","RealWorldValueMappingSequence"],"9098":["SQ","PixelValueMappingCodeSequence"],"9210":["SH","LUTLabel"],"9211":["SS","RealWorldValueLastValueMapped"],"9212":["FD","RealWorldValueLUTData"],"9216":["SS","RealWorldValueFirstValueMapped"],"9224":["FD","RealWorldValueIntercept"],"9225":["FD","RealWorldValueSlope"],A007:["CS","FindingsFlagTrial"],A010:["CS","RelationshipType"],A020:["SQ","FindingsSequenceTrial"],A021:["UI","FindingsGroupUIDTrial"],A022:["UI","ReferencedFindingsGroupUIDTrial"],A023:["DA","FindingsGroupRecordingDateTrial"],A024:["TM","FindingsGroupRecordingTimeTrial"],A026:["SQ","FindingsSourceCategoryCodeSequenceTrial"],A027:["LO","VerifyingOrganization"],A028:["SQ","DocumentingOrganizationIdentifierCodeSequenceTrial"],A030:["DT","VerificationDateTime"],A032:["DT","ObservationDateTime"],A040:["CS","ValueType"],A043:["SQ","ConceptNameCodeSequence"],A047:["LO","MeasurementPrecisionDescriptionTrial"],A050:["CS","ContinuityOfContent"],A057:["CS","UrgencyOrPriorityAlertsTrial"],A060:["LO","SequencingIndicatorTrial"],A066:["SQ","DocumentIdentifierCodeSequenceTrial"],A067:["PN","DocumentAuthorTrial"],A068:["SQ","DocumentAuthorIdentifierCodeSequenceTrial"],A070:["SQ","IdentifierCodeSequenceTrial"],A073:["SQ","VerifyingObserverSequence"],A074:["OB","ObjectBinaryIdentifierTrial"],A075:["PN","VerifyingObserverName"],A076:["SQ","DocumentingObserverIdentifierCodeSequenceTrial"],A078:["SQ","AuthorObserverSequence"],A07A:["SQ","ParticipantSequence"],A07C:["SQ","CustodialOrganizationSequence"],A080:["CS","ParticipationType"],A082:["DT","ParticipationDateTime"],A084:["CS","ObserverType"],A085:["SQ","ProcedureIdentifierCodeSequenceTrial"],A088:["SQ","VerifyingObserverIdentificationCodeSequence"],A089:["OB","ObjectDirectoryBinaryIdentifierTrial"],A090:["SQ","EquivalentCDADocumentSequence"],A0B0:["US","ReferencedWaveformChannels"],A110:["DA","DateOfDocumentOrVerbalTransactionTrial"],A112:["TM","TimeOfDocumentCreationOrVerbalTransactionTrial"],A120:["DT","DateTime"],A121:["DA","Date"],A122:["TM","Time"],A123:["PN","PersonName"],A124:["UI","UID"],A125:["CS","ReportStatusIDTrial"],A130:["CS","TemporalRangeType"],A132:["UL","ReferencedSamplePositions"],A136:["US","ReferencedFrameNumbers"],A138:["DS","ReferencedTimeOffsets"],A13A:["DT","ReferencedDateTime"],A160:["UT","TextValue"],A167:["SQ","ObservationCategoryCodeSequenceTrial"],A168:["SQ","ConceptCodeSequence"],A16A:["ST","BibliographicCitationTrial"],A170:["SQ","PurposeOfReferenceCodeSequence"],A171:["UI","ObservationUIDTrial"],A172:["UI","ReferencedObservationUIDTrial"],A173:["CS","ReferencedObservationClassTrial"],A174:["CS","ReferencedObjectObservationClassTrial"],A180:["US","AnnotationGroupNumber"],A192:["DA","ObservationDateTrial"],A193:["TM","ObservationTimeTrial"],A194:["CS","MeasurementAutomationTrial"],A195:["SQ","ModifierCodeSequence"],A224:["ST","IdentificationDescriptionTrial"],A290:["CS","CoordinatesSetGeometricTypeTrial"],A296:["SQ","AlgorithmCodeSequenceTrial"],A297:["ST","AlgorithmDescriptionTrial"],A29A:["SL","PixelCoordinatesSetTrial"],A300:["SQ","MeasuredValueSequence"],A301:["SQ","NumericValueQualifierCodeSequence"],A307:["PN","CurrentObserverTrial"],A30A:["DS","NumericValue"],A313:["SQ","ReferencedAccessionSequenceTrial"],A33A:["ST","ReportStatusCommentTrial"],A340:["SQ","ProcedureContextSequenceTrial"],A352:["PN","VerbalSourceTrial"],A353:["ST","AddressTrial"],A354:["LO","TelephoneNumberTrial"],A358:["SQ","VerbalSourceIdentifierCodeSequenceTrial"],A360:["SQ","PredecessorDocumentsSequence"],A370:["SQ","ReferencedRequestSequence"],A372:["SQ","PerformedProcedureCodeSequence"],A375:["SQ","CurrentRequestedProcedureEvidenceSequence"],A380:["SQ","ReportDetailSequenceTrial"],A385:["SQ","PertinentOtherEvidenceSequence"],A390:["SQ","HL7StructuredDocumentReferenceSequence"],A402:["UI","ObservationSubjectUIDTrial"],A403:["CS","ObservationSubjectClassTrial"],A404:["SQ","ObservationSubjectTypeCodeSequenceTrial"],A491:["CS","CompletionFlag"],A492:["LO","CompletionFlagDescription"],A493:["CS","VerificationFlag"],A494:["CS","ArchiveRequested"],A496:["CS","PreliminaryFlag"],A504:["SQ","ContentTemplateSequence"],A525:["SQ","IdenticalDocumentsSequence"],A600:["CS","ObservationSubjectContextFlagTrial"],A601:["CS","ObserverContextFlagTrial"],A603:["CS","ProcedureContextFlagTrial"],A730:["SQ","ContentSequence"],A731:["SQ","RelationshipSequenceTrial"],A732:["SQ","RelationshipTypeCodeSequenceTrial"],A744:["SQ","LanguageCodeSequenceTrial"],A992:["ST","UniformResourceLocatorTrial"],B020:["SQ","WaveformAnnotationSequence"],DB00:["CS","TemplateIdentifier"],DB06:["DT","TemplateVersion"],DB07:["DT","TemplateLocalVersion"],DB0B:["CS","TemplateExtensionFlag"],DB0C:["UI","TemplateExtensionOrganizationUID"],DB0D:["UI","TemplateExtensionCreatorUID"],DB73:["UL","ReferencedContentItemIdentifier"],E001:["ST","HL7InstanceIdentifier"],E004:["DT","HL7DocumentEffectiveTime"],E006:["SQ","HL7DocumentTypeCodeSequence"],E008:["SQ","DocumentClassCodeSequence"],E010:["UT","RetrieveURI"],E011:["UI","RetrieveLocationUID"],E020:["CS","TypeOfInstances"],E021:["SQ","DICOMRetrievalSequence"],E022:["SQ","DICOMMediaRetrievalSequence"],E023:["SQ","WADORetrievalSequence"],E024:["SQ","XDSRetrievalSequence"],E030:["UI","RepositoryUniqueID"],E031:["UI","HomeCommunityID"]},"0042":{"0010":["ST","DocumentTitle"],"0011":["OB","EncapsulatedDocument"],"0012":["LO","MIMETypeOfEncapsulatedDocument"],"0013":["SQ","SourceInstanceSequence"],"0014":["LO","ListOfMIMETypes"]},"0044":{"0001":["ST","ProductPackageIdentifier"],"0002":["CS","SubstanceAdministrationApproval"],"0003":["LT","ApprovalStatusFurtherDescription"],"0004":["DT","ApprovalStatusDateTime"],"0007":["SQ","ProductTypeCodeSequence"],"0008":["LO","ProductName"],"0009":["LT","ProductDescription"],"000A":["LO","ProductLotIdentifier"],"000B":["DT","ProductExpirationDateTime"],"0010":["DT","SubstanceAdministrationDateTime"],"0011":["LO","SubstanceAdministrationNotes"],"0012":["LO","SubstanceAdministrationDeviceID"],"0013":["SQ","ProductParameterSequence"],"0019":["SQ","SubstanceAdministrationParameterSequence"]},"0046":{"0012":["LO","LensDescription"],"0014":["SQ","RightLensSequence"],"0015":["SQ","LeftLensSequence"],"0016":["SQ","UnspecifiedLateralityLensSequence"],"0018":["SQ","CylinderSequence"],"0028":["SQ","PrismSequence"],"0030":["FD","HorizontalPrismPower"],"0032":["CS","HorizontalPrismBase"],"0034":["FD","VerticalPrismPower"],"0036":["CS","VerticalPrismBase"],"0038":["CS","LensSegmentType"],"0040":["FD","OpticalTransmittance"],"0042":["FD","ChannelWidth"],"0044":["FD","PupilSize"],"0046":["FD","CornealSize"],"0050":["SQ","AutorefractionRightEyeSequence"],"0052":["SQ","AutorefractionLeftEyeSequence"],"0060":["FD","DistancePupillaryDistance"],"0062":["FD","NearPupillaryDistance"],"0063":["FD","IntermediatePupillaryDistance"],"0064":["FD","OtherPupillaryDistance"],"0070":["SQ","KeratometryRightEyeSequence"],"0071":["SQ","KeratometryLeftEyeSequence"],"0074":["SQ","SteepKeratometricAxisSequence"],"0075":["FD","RadiusOfCurvature"],"0076":["FD","KeratometricPower"],"0077":["FD","KeratometricAxis"],"0080":["SQ","FlatKeratometricAxisSequence"],"0092":["CS","BackgroundColor"],"0094":["CS","Optotype"],"0095":["CS","OptotypePresentation"],"0097":["SQ","SubjectiveRefractionRightEyeSequence"],"0098":["SQ","SubjectiveRefractionLeftEyeSequence"],"0100":["SQ","AddNearSequence"],"0101":["SQ","AddIntermediateSequence"],"0102":["SQ","AddOtherSequence"],"0104":["FD","AddPower"],"0106":["FD","ViewingDistance"],"0121":["SQ","VisualAcuityTypeCodeSequence"],"0122":["SQ","VisualAcuityRightEyeSequence"],"0123":["SQ","VisualAcuityLeftEyeSequence"],"0124":["SQ","VisualAcuityBothEyesOpenSequence"],"0125":["CS","ViewingDistanceType"],"0135":["SS","VisualAcuityModifiers"],"0137":["FD","DecimalVisualAcuity"],"0139":["LO","OptotypeDetailedDefinition"],"0145":["SQ","ReferencedRefractiveMeasurementsSequence"],"0146":["FD","SpherePower"],"0147":["FD","CylinderPower"]},"0048":{"0001":["FL","ImagedVolumeWidth"],"0002":["FL","ImagedVolumeHeight"],"0003":["FL","ImagedVolumeDepth"],"0006":["UL","TotalPixelMatrixColumns"],"0007":["UL","TotalPixelMatrixRows"],"0008":["SQ","TotalPixelMatrixOriginSequence"],"0010":["CS","SpecimenLabelInImage"],"0011":["CS","FocusMethod"],"0012":["CS","ExtendedDepthOfField"],"0013":["US","NumberOfFocalPlanes"],"0014":["FL","DistanceBetweenFocalPlanes"],"0015":["US","RecommendedAbsentPixelCIELabValue"],"0100":["SQ","IlluminatorTypeCodeSequence"],"0102":["DS","ImageOrientationSlide"],"0105":["SQ","OpticalPathSequence"],"0106":["SH","OpticalPathIdentifier"],"0107":["ST","OpticalPathDescription"],"0108":["SQ","IlluminationColorCodeSequence"],"0110":["SQ","SpecimenReferenceSequence"],"0111":["DS","CondenserLensPower"],"0112":["DS","ObjectiveLensPower"],"0113":["DS","ObjectiveLensNumericalAperture"],"0120":["SQ","PaletteColorLookupTableSequence"],"0200":["SQ","ReferencedImageNavigationSequence"],"0201":["US","TopLeftHandCornerOfLocalizerArea"],"0202":["US","BottomRightHandCornerOfLocalizerArea"],"0207":["SQ","OpticalPathIdentificationSequence"],"021A":["SQ","PlanePositionSlideSequence"],"021E":["SL","RowPositionInTotalImagePixelMatrix"],"021F":["SL","ColumnPositionInTotalImagePixelMatrix"],"0301":["CS","PixelOriginInterpretation"]},"0050":{"0004":["CS","CalibrationImage"],"0010":["SQ","DeviceSequence"],"0012":["SQ","ContainerComponentTypeCodeSequence"],"0013":["FD","ContainerComponentThickness"],"0014":["DS","DeviceLength"],"0015":["FD","ContainerComponentWidth"],"0016":["DS","DeviceDiameter"],"0017":["CS","DeviceDiameterUnits"],"0018":["DS","DeviceVolume"],"0019":["DS","InterMarkerDistance"],"001A":["CS","ContainerComponentMaterial"],"001B":["LO","ContainerComponentID"],"001C":["FD","ContainerComponentLength"],"001D":["FD","ContainerComponentDiameter"],"001E":["LO","ContainerComponentDescription"],"0020":["LO","DeviceDescription"]},"0052":{"0001":["FL","ContrastBolusIngredientPercentByVolume"],"0002":["FD","OCTFocalDistance"],"0003":["FD","BeamSpotSize"],"0004":["FD","EffectiveRefractiveIndex"],"0006":["CS","OCTAcquisitionDomain"],"0007":["FD","OCTOpticalCenterWavelength"],"0008":["FD","AxialResolution"],"0009":["FD","RangingDepth"],"0011":["FD","ALineRate"],"0012":["US","ALinesPerFrame"],"0013":["FD","CatheterRotationalRate"],"0014":["FD","ALinePixelSpacing"],"0016":["SQ","ModeOfPercutaneousAccessSequence"],"0025":["SQ","IntravascularOCTFrameTypeSequence"],"0026":["CS","OCTZOffsetApplied"],"0027":["SQ","IntravascularFrameContentSequence"],"0028":["FD","IntravascularLongitudinalDistance"],"0029":["SQ","IntravascularOCTFrameContentSequence"],"0030":["SS","OCTZOffsetCorrection"],"0031":["CS","CatheterDirectionOfRotation"],"0033":["FD","SeamLineLocation"],"0034":["FD","FirstALineLocation"],"0036":["US","SeamLineIndex"],"0038":["US","NumberOfPaddedAlines"],"0039":["CS","InterpolationType"],"003A":["CS","RefractiveIndexApplied"]},"0054":{"0010":["US","EnergyWindowVector"],"0011":["US","NumberOfEnergyWindows"],"0012":["SQ","EnergyWindowInformationSequence"],"0013":["SQ","EnergyWindowRangeSequence"],"0014":["DS","EnergyWindowLowerLimit"],"0015":["DS","EnergyWindowUpperLimit"],"0016":["SQ","RadiopharmaceuticalInformationSequence"],"0017":["IS","ResidualSyringeCounts"],"0018":["SH","EnergyWindowName"],"0020":["US","DetectorVector"],"0021":["US","NumberOfDetectors"],"0022":["SQ","DetectorInformationSequence"],"0030":["US","PhaseVector"],"0031":["US","NumberOfPhases"],"0032":["SQ","PhaseInformationSequence"],"0033":["US","NumberOfFramesInPhase"],"0036":["IS","PhaseDelay"],"0038":["IS","PauseBetweenFrames"],"0039":["CS","PhaseDescription"],"0050":["US","RotationVector"],"0051":["US","NumberOfRotations"],"0052":["SQ","RotationInformationSequence"],"0053":["US","NumberOfFramesInRotation"],"0060":["US","RRIntervalVector"],"0061":["US","NumberOfRRIntervals"],"0062":["SQ","GatedInformationSequence"],"0063":["SQ","DataInformationSequence"],"0070":["US","TimeSlotVector"],"0071":["US","NumberOfTimeSlots"],"0072":["SQ","TimeSlotInformationSequence"],"0073":["DS","TimeSlotTime"],"0080":["US","SliceVector"],"0081":["US","NumberOfSlices"],"0090":["US","AngularViewVector"],"0100":["US","TimeSliceVector"],"0101":["US","NumberOfTimeSlices"],"0200":["DS","StartAngle"],"0202":["CS","TypeOfDetectorMotion"],"0210":["IS","TriggerVector"],"0211":["US","NumberOfTriggersInPhase"],"0220":["SQ","ViewCodeSequence"],"0222":["SQ","ViewModifierCodeSequence"],"0300":["SQ","RadionuclideCodeSequence"],"0302":["SQ","AdministrationRouteCodeSequence"],"0304":["SQ","RadiopharmaceuticalCodeSequence"],"0306":["SQ","CalibrationDataSequence"],"0308":["US","EnergyWindowNumber"],"0400":["SH","ImageID"],"0410":["SQ","PatientOrientationCodeSequence"],"0412":["SQ","PatientOrientationModifierCodeSequence"],"0414":["SQ","PatientGantryRelationshipCodeSequence"],"0500":["CS","SliceProgressionDirection"],"1000":["CS","SeriesType"],"1001":["CS","Units"],"1002":["CS","CountsSource"],"1004":["CS","ReprojectionMethod"],"1006":["CS","SUVType"],"1100":["CS","RandomsCorrectionMethod"],"1101":["LO","AttenuationCorrectionMethod"],"1102":["CS","DecayCorrection"],"1103":["LO","ReconstructionMethod"],"1104":["LO","DetectorLinesOfResponseUsed"],"1105":["LO","ScatterCorrectionMethod"],"1200":["DS","AxialAcceptance"],"1201":["IS","AxialMash"],"1202":["IS","TransverseMash"],"1203":["DS","DetectorElementSize"],"1210":["DS","CoincidenceWindowWidth"],"1220":["CS","SecondaryCountsType"],"1300":["DS","FrameReferenceTime"],"1310":["IS","PrimaryPromptsCountsAccumulated"],"1311":["IS","SecondaryCountsAccumulated"],"1320":["DS","SliceSensitivityFactor"],"1321":["DS","DecayFactor"],"1322":["DS","DoseCalibrationFactor"],"1323":["DS","ScatterFractionFactor"],"1324":["DS","DeadTimeFactor"],"1330":["US","ImageIndex"],"1400":["CS","CountsIncluded"],"1401":["CS","DeadTimeCorrectionFlag"]},"0060":{"3000":["SQ","HistogramSequence"],"3002":["US","HistogramNumberOfBins"],"3004":["SS","HistogramFirstBinValue"],"3006":["SS","HistogramLastBinValue"],"3008":["US","HistogramBinWidth"],"3010":["LO","HistogramExplanation"],"3020":["UL","HistogramData"]},"0062":{"0001":["CS","SegmentationType"],"0002":["SQ","SegmentSequence"],"0003":["SQ","SegmentedPropertyCategoryCodeSequence"],"0004":["US","SegmentNumber"],"0005":["LO","SegmentLabel"],"0006":["ST","SegmentDescription"],"0008":["CS","SegmentAlgorithmType"],"0009":["LO","SegmentAlgorithmName"],"000A":["SQ","SegmentIdentificationSequence"],"000B":["US","ReferencedSegmentNumber"],"000C":["US","RecommendedDisplayGrayscaleValue"],"000D":["US","RecommendedDisplayCIELabValue"],"000E":["US","MaximumFractionalValue"],"000F":["SQ","SegmentedPropertyTypeCodeSequence"],"0010":["CS","SegmentationFractionalType"]},"0064":{"0002":["SQ","DeformableRegistrationSequence"],"0003":["UI","SourceFrameOfReferenceUID"],"0005":["SQ","DeformableRegistrationGridSequence"],"0007":["UL","GridDimensions"],"0008":["FD","GridResolution"],"0009":["OF","VectorGridData"],"000F":["SQ","PreDeformationMatrixRegistrationSequence"],"0010":["SQ","PostDeformationMatrixRegistrationSequence"]},"0066":{"0001":["UL","NumberOfSurfaces"],"0002":["SQ","SurfaceSequence"],"0003":["UL","SurfaceNumber"],"0004":["LT","SurfaceComments"],"0009":["CS","SurfaceProcessing"],"000A":["FL","SurfaceProcessingRatio"],"000B":["LO","SurfaceProcessingDescription"],"000C":["FL","RecommendedPresentationOpacity"],"000D":["CS","RecommendedPresentationType"],"000E":["CS","FiniteVolume"],"0010":["CS","Manifold"],"0011":["SQ","SurfacePointsSequence"],"0012":["SQ","SurfacePointsNormalsSequence"],"0013":["SQ","SurfaceMeshPrimitivesSequence"],"0015":["UL","NumberOfSurfacePoints"],"0016":["OF","PointCoordinatesData"],"0017":["FL","PointPositionAccuracy"],"0018":["FL","MeanPointDistance"],"0019":["FL","MaximumPointDistance"],"001A":["FL","PointsBoundingBoxCoordinates"],"001B":["FL","AxisOfRotation"],"001C":["FL","CenterOfRotation"],"001E":["UL","NumberOfVectors"],"001F":["US","VectorDimensionality"],"0020":["FL","VectorAccuracy"],"0021":["OF","VectorCoordinateData"],"0023":["OW","TrianglePointIndexList"],"0024":["OW","EdgePointIndexList"],"0025":["OW","VertexPointIndexList"],"0026":["SQ","TriangleStripSequence"],"0027":["SQ","TriangleFanSequence"],"0028":["SQ","LineSequence"],"0029":["OW","PrimitivePointIndexList"],"002A":["UL","SurfaceCount"],"002B":["SQ","ReferencedSurfaceSequence"],"002C":["UL","ReferencedSurfaceNumber"],"002D":["SQ","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"002E":["SQ","SegmentSurfaceSourceInstanceSequence"],"002F":["SQ","AlgorithmFamilyCodeSequence"],"0030":["SQ","AlgorithmNameCodeSequence"],"0031":["LO","AlgorithmVersion"],"0032":["LT","AlgorithmParameters"],"0034":["SQ","FacetSequence"],"0035":["SQ","SurfaceProcessingAlgorithmIdentificationSequence"],"0036":["LO","AlgorithmName"]},"0068":{"6210":["LO","ImplantSize"],"6221":["LO","ImplantTemplateVersion"],"6222":["SQ","ReplacedImplantTemplateSequence"],"6223":["CS","ImplantType"],"6224":["SQ","DerivationImplantTemplateSequence"],"6225":["SQ","OriginalImplantTemplateSequence"],"6226":["DT","EffectiveDateTime"],"6230":["SQ","ImplantTargetAnatomySequence"],"6260":["SQ","InformationFromManufacturerSequence"],"6265":["SQ","NotificationFromManufacturerSequence"],"6270":["DT","InformationIssueDateTime"],"6280":["ST","InformationSummary"],"62A0":["SQ","ImplantRegulatoryDisapprovalCodeSequence"],"62A5":["FD","OverallTemplateSpatialTolerance"],"62C0":["SQ","HPGLDocumentSequence"],"62D0":["US","HPGLDocumentID"],"62D5":["LO","HPGLDocumentLabel"],"62E0":["SQ","ViewOrientationCodeSequence"],"62F0":["FD","ViewOrientationModifier"],"62F2":["FD","HPGLDocumentScaling"],"6300":["OB","HPGLDocument"],"6310":["US","HPGLContourPenNumber"],"6320":["SQ","HPGLPenSequence"],"6330":["US","HPGLPenNumber"],"6340":["LO","HPGLPenLabel"],"6345":["ST","HPGLPenDescription"],"6346":["FD","RecommendedRotationPoint"],"6347":["FD","BoundingRectangle"],"6350":["US","ImplantTemplate3DModelSurfaceNumber"],"6360":["SQ","SurfaceModelDescriptionSequence"],"6380":["LO","SurfaceModelLabel"],"6390":["FD","SurfaceModelScalingFactor"],"63A0":["SQ","MaterialsCodeSequence"],"63A4":["SQ","CoatingMaterialsCodeSequence"],"63A8":["SQ","ImplantTypeCodeSequence"],"63AC":["SQ","FixationMethodCodeSequence"],"63B0":["SQ","MatingFeatureSetsSequence"],"63C0":["US","MatingFeatureSetID"],"63D0":["LO","MatingFeatureSetLabel"],"63E0":["SQ","MatingFeatureSequence"],"63F0":["US","MatingFeatureID"],"6400":["SQ","MatingFeatureDegreeOfFreedomSequence"],"6410":["US","DegreeOfFreedomID"],"6420":["CS","DegreeOfFreedomType"],"6430":["SQ","TwoDMatingFeatureCoordinatesSequence"],"6440":["US","ReferencedHPGLDocumentID"],"6450":["FD","TwoDMatingPoint"],"6460":["FD","TwoDMatingAxes"],"6470":["SQ","TwoDDegreeOfFreedomSequence"],"6490":["FD","ThreeDDegreeOfFreedomAxis"],"64A0":["FD","RangeOfFreedom"],"64C0":["FD","ThreeDMatingPoint"],"64D0":["FD","ThreeDMatingAxes"],"64F0":["FD","TwoDDegreeOfFreedomAxis"],"6500":["SQ","PlanningLandmarkPointSequence"],"6510":["SQ","PlanningLandmarkLineSequence"],"6520":["SQ","PlanningLandmarkPlaneSequence"],"6530":["US","PlanningLandmarkID"],"6540":["LO","PlanningLandmarkDescription"],"6545":["SQ","PlanningLandmarkIdentificationCodeSequence"],"6550":["SQ","TwoDPointCoordinatesSequence"],"6560":["FD","TwoDPointCoordinates"],"6590":["FD","ThreeDPointCoordinates"],"65A0":["SQ","TwoDLineCoordinatesSequence"],"65B0":["FD","TwoDLineCoordinates"],"65D0":["FD","ThreeDLineCoordinates"],"65E0":["SQ","TwoDPlaneCoordinatesSequence"],"65F0":["FD","TwoDPlaneIntersection"],"6610":["FD","ThreeDPlaneOrigin"],"6620":["FD","ThreeDPlaneNormal"]},"0070":{"0001":["SQ","GraphicAnnotationSequence"],"0002":["CS","GraphicLayer"],"0003":["CS","BoundingBoxAnnotationUnits"],"0004":["CS","AnchorPointAnnotationUnits"],"0005":["CS","GraphicAnnotationUnits"],"0006":["ST","UnformattedTextValue"],"0008":["SQ","TextObjectSequence"],"0009":["SQ","GraphicObjectSequence"],"0010":["FL","BoundingBoxTopLeftHandCorner"],"0011":["FL","BoundingBoxBottomRightHandCorner"],"0012":["CS","BoundingBoxTextHorizontalJustification"],"0014":["FL","AnchorPoint"],"0015":["CS","AnchorPointVisibility"],"0020":["US","GraphicDimensions"],"0021":["US","NumberOfGraphicPoints"],"0022":["FL","GraphicData"],"0023":["CS","GraphicType"],"0024":["CS","GraphicFilled"],"0040":["IS","ImageRotationRetired"],"0041":["CS","ImageHorizontalFlip"],"0042":["US","ImageRotation"],"0050":["US","DisplayedAreaTopLeftHandCornerTrial"],"0051":["US","DisplayedAreaBottomRightHandCornerTrial"],"0052":["SL","DisplayedAreaTopLeftHandCorner"],"0053":["SL","DisplayedAreaBottomRightHandCorner"],"005A":["SQ","DisplayedAreaSelectionSequence"],"0060":["SQ","GraphicLayerSequence"],"0062":["IS","GraphicLayerOrder"],"0066":["US","GraphicLayerRecommendedDisplayGrayscaleValue"],"0067":["US","GraphicLayerRecommendedDisplayRGBValue"],"0068":["LO","GraphicLayerDescription"],"0080":["CS","ContentLabel"],"0081":["LO","ContentDescription"],"0082":["DA","PresentationCreationDate"],"0083":["TM","PresentationCreationTime"],"0084":["PN","ContentCreatorName"],"0086":["SQ","ContentCreatorIdentificationCodeSequence"],"0087":["SQ","AlternateContentDescriptionSequence"],"0100":["CS","PresentationSizeMode"],"0101":["DS","PresentationPixelSpacing"],"0102":["IS","PresentationPixelAspectRatio"],"0103":["FL","PresentationPixelMagnificationRatio"],"0207":["LO","GraphicGroupLabel"],"0208":["ST","GraphicGroupDescription"],"0209":["SQ","CompoundGraphicSequence"],"0226":["UL","CompoundGraphicInstanceID"],"0227":["LO","FontName"],"0228":["CS","FontNameType"],"0229":["LO","CSSFontName"],"0230":["FD","RotationAngle"],"0231":["SQ","TextStyleSequence"],"0232":["SQ","LineStyleSequence"],"0233":["SQ","FillStyleSequence"],"0234":["SQ","GraphicGroupSequence"],"0241":["US","TextColorCIELabValue"],"0242":["CS","HorizontalAlignment"],"0243":["CS","VerticalAlignment"],"0244":["CS","ShadowStyle"],"0245":["FL","ShadowOffsetX"],"0246":["FL","ShadowOffsetY"],"0247":["US","ShadowColorCIELabValue"],"0248":["CS","Underlined"],"0249":["CS","Bold"],"0250":["CS","Italic"],"0251":["US","PatternOnColorCIELabValue"],"0252":["US","PatternOffColorCIELabValue"],"0253":["FL","LineThickness"],"0254":["CS","LineDashingStyle"],"0255":["UL","LinePattern"],"0256":["OB","FillPattern"],"0257":["CS","FillMode"],"0258":["FL","ShadowOpacity"],"0261":["FL","GapLength"],"0262":["FL","DiameterOfVisibility"],"0273":["FL","RotationPoint"],"0274":["CS","TickAlignment"],"0278":["CS","ShowTickLabel"],"0279":["CS","TickLabelAlignment"],"0282":["CS","CompoundGraphicUnits"],"0284":["FL","PatternOnOpacity"],"0285":["FL","PatternOffOpacity"],"0287":["SQ","MajorTicksSequence"],"0288":["FL","TickPosition"],"0289":["SH","TickLabel"],"0294":["CS","CompoundGraphicType"],"0295":["UL","GraphicGroupID"],"0306":["CS","ShapeType"],"0308":["SQ","RegistrationSequence"],"0309":["SQ","MatrixRegistrationSequence"],"030A":["SQ","MatrixSequence"],"030C":["CS","FrameOfReferenceTransformationMatrixType"],"030D":["SQ","RegistrationTypeCodeSequence"],"030F":["ST","FiducialDescription"],"0310":["SH","FiducialIdentifier"],"0311":["SQ","FiducialIdentifierCodeSequence"],"0312":["FD","ContourUncertaintyRadius"],"0314":["SQ","UsedFiducialsSequence"],"0318":["SQ","GraphicCoordinatesDataSequence"],"031A":["UI","FiducialUID"],"031C":["SQ","FiducialSetSequence"],"031E":["SQ","FiducialSequence"],"0401":["US","GraphicLayerRecommendedDisplayCIELabValue"],"0402":["SQ","BlendingSequence"],"0403":["FL","RelativeOpacity"],"0404":["SQ","ReferencedSpatialRegistrationSequence"],"0405":["CS","BlendingPosition"]},"0072":{"0002":["SH","HangingProtocolName"],"0004":["LO","HangingProtocolDescription"],"0006":["CS","HangingProtocolLevel"],"0008":["LO","HangingProtocolCreator"],"000A":["DT","HangingProtocolCreationDateTime"],"000C":["SQ","HangingProtocolDefinitionSequence"],"000E":["SQ","HangingProtocolUserIdentificationCodeSequence"],"0010":["LO","HangingProtocolUserGroupName"],"0012":["SQ","SourceHangingProtocolSequence"],"0014":["US","NumberOfPriorsReferenced"],"0020":["SQ","ImageSetsSequence"],"0022":["SQ","ImageSetSelectorSequence"],"0024":["CS","ImageSetSelectorUsageFlag"],"0026":["AT","SelectorAttribute"],"0028":["US","SelectorValueNumber"],"0030":["SQ","TimeBasedImageSetsSequence"],"0032":["US","ImageSetNumber"],"0034":["CS","ImageSetSelectorCategory"],"0038":["US","RelativeTime"],"003A":["CS","RelativeTimeUnits"],"003C":["SS","AbstractPriorValue"],"003E":["SQ","AbstractPriorCodeSequence"],"0040":["LO","ImageSetLabel"],"0050":["CS","SelectorAttributeVR"],"0052":["AT","SelectorSequencePointer"],"0054":["LO","SelectorSequencePointerPrivateCreator"],"0056":["LO","SelectorAttributePrivateCreator"],"0060":["AT","SelectorATValue"],"0062":["CS","SelectorCSValue"],"0064":["IS","SelectorISValue"],"0066":["LO","SelectorLOValue"],"0068":["LT","SelectorLTValue"],"006A":["PN","SelectorPNValue"],"006C":["SH","SelectorSHValue"],"006E":["ST","SelectorSTValue"],"0070":["UT","SelectorUTValue"],"0072":["DS","SelectorDSValue"],"0074":["FD","SelectorFDValue"],"0076":["FL","SelectorFLValue"],"0078":["UL","SelectorULValue"],"007A":["US","SelectorUSValue"],"007C":["SL","SelectorSLValue"],"007E":["SS","SelectorSSValue"],"0080":["SQ","SelectorCodeSequenceValue"],"0100":["US","NumberOfScreens"],"0102":["SQ","NominalScreenDefinitionSequence"],"0104":["US","NumberOfVerticalPixels"],"0106":["US","NumberOfHorizontalPixels"],"0108":["FD","DisplayEnvironmentSpatialPosition"],"010A":["US","ScreenMinimumGrayscaleBitDepth"],"010C":["US","ScreenMinimumColorBitDepth"],"010E":["US","ApplicationMaximumRepaintTime"],"0200":["SQ","DisplaySetsSequence"],"0202":["US","DisplaySetNumber"],"0203":["LO","DisplaySetLabel"],"0204":["US","DisplaySetPresentationGroup"],"0206":["LO","DisplaySetPresentationGroupDescription"],"0208":["CS","PartialDataDisplayHandling"],"0210":["SQ","SynchronizedScrollingSequence"],"0212":["US","DisplaySetScrollingGroup"],"0214":["SQ","NavigationIndicatorSequence"],"0216":["US","NavigationDisplaySet"],"0218":["US","ReferenceDisplaySets"],"0300":["SQ","ImageBoxesSequence"],"0302":["US","ImageBoxNumber"],"0304":["CS","ImageBoxLayoutType"],"0306":["US","ImageBoxTileHorizontalDimension"],"0308":["US","ImageBoxTileVerticalDimension"],"0310":["CS","ImageBoxScrollDirection"],"0312":["CS","ImageBoxSmallScrollType"],"0314":["US","ImageBoxSmallScrollAmount"],"0316":["CS","ImageBoxLargeScrollType"],"0318":["US","ImageBoxLargeScrollAmount"],"0320":["US","ImageBoxOverlapPriority"],"0330":["FD","CineRelativeToRealTime"],"0400":["SQ","FilterOperationsSequence"],"0402":["CS","FilterByCategory"],"0404":["CS","FilterByAttributePresence"],"0406":["CS","FilterByOperator"],"0420":["US","StructuredDisplayBackgroundCIELabValue"],"0421":["US","EmptyImageBoxCIELabValue"],"0422":["SQ","StructuredDisplayImageBoxSequence"],"0424":["SQ","StructuredDisplayTextBoxSequence"],"0427":["SQ","ReferencedFirstFrameSequence"],"0430":["SQ","ImageBoxSynchronizationSequence"],"0432":["US","SynchronizedImageBoxList"],"0434":["CS","TypeOfSynchronization"],"0500":["CS","BlendingOperationType"],"0510":["CS","ReformattingOperationType"],"0512":["FD","ReformattingThickness"],"0514":["FD","ReformattingInterval"],"0516":["CS","ReformattingOperationInitialViewDirection"],"0520":["CS","ThreeDRenderingType"],"0600":["SQ","SortingOperationsSequence"],"0602":["CS","SortByCategory"],"0604":["CS","SortingDirection"],"0700":["CS","DisplaySetPatientOrientation"],"0702":["CS","VOIType"],"0704":["CS","PseudoColorType"],"0705":["SQ","PseudoColorPaletteInstanceReferenceSequence"],"0706":["CS","ShowGrayscaleInverted"],"0710":["CS","ShowImageTrueSizeFlag"],"0712":["CS","ShowGraphicAnnotationFlag"],"0714":["CS","ShowPatientDemographicsFlag"],"0716":["CS","ShowAcquisitionTechniquesFlag"],"0717":["CS","DisplaySetHorizontalJustification"],"0718":["CS","DisplaySetVerticalJustification"]},"0074":{"0120":["FD","ContinuationStartMeterset"],"0121":["FD","ContinuationEndMeterset"],"1000":["CS","ProcedureStepState"],"1002":["SQ","ProcedureStepProgressInformationSequence"],"1004":["DS","ProcedureStepProgress"],"1006":["ST","ProcedureStepProgressDescription"],"1008":["SQ","ProcedureStepCommunicationsURISequence"],"100A":["ST","ContactURI"],"100C":["LO","ContactDisplayName"],"100E":["SQ","ProcedureStepDiscontinuationReasonCodeSequence"],"1020":["SQ","BeamTaskSequence"],"1022":["CS","BeamTaskType"],"1024":["IS","BeamOrderIndexTrial"],"1026":["FD","TableTopVerticalAdjustedPosition"],"1027":["FD","TableTopLongitudinalAdjustedPosition"],"1028":["FD","TableTopLateralAdjustedPosition"],"102A":["FD","PatientSupportAdjustedAngle"],"102B":["FD","TableTopEccentricAdjustedAngle"],"102C":["FD","TableTopPitchAdjustedAngle"],"102D":["FD","TableTopRollAdjustedAngle"],"1030":["SQ","DeliveryVerificationImageSequence"],"1032":["CS","VerificationImageTiming"],"1034":["CS","DoubleExposureFlag"],"1036":["CS","DoubleExposureOrdering"],"1038":["DS","DoubleExposureMetersetTrial"],"103A":["DS","DoubleExposureFieldDeltaTrial"],"1040":["SQ","RelatedReferenceRTImageSequence"],"1042":["SQ","GeneralMachineVerificationSequence"],"1044":["SQ","ConventionalMachineVerificationSequence"],"1046":["SQ","IonMachineVerificationSequence"],"1048":["SQ","FailedAttributesSequence"],"104A":["SQ","OverriddenAttributesSequence"],"104C":["SQ","ConventionalControlPointVerificationSequence"],"104E":["SQ","IonControlPointVerificationSequence"],"1050":["SQ","AttributeOccurrenceSequence"],"1052":["AT","AttributeOccurrencePointer"],"1054":["UL","AttributeItemSelector"],"1056":["LO","AttributeOccurrencePrivateCreator"],"1057":["IS","SelectorSequencePointerItems"],"1200":["CS","ScheduledProcedureStepPriority"],"1202":["LO","WorklistLabel"],"1204":["LO","ProcedureStepLabel"],"1210":["SQ","ScheduledProcessingParametersSequence"],"1212":["SQ","PerformedProcessingParametersSequence"],"1216":["SQ","UnifiedProcedureStepPerformedProcedureSequence"],"1220":["SQ","RelatedProcedureStepSequence"],"1222":["LO","ProcedureStepRelationshipType"],"1224":["SQ","ReplacedProcedureStepSequence"],"1230":["LO","DeletionLock"],"1234":["AE","ReceivingAE"],"1236":["AE","RequestingAE"],"1238":["LT","ReasonForCancellation"],"1242":["CS","SCPStatus"],"1244":["CS","SubscriptionListStatus"],"1246":["CS","UnifiedProcedureStepListStatus"],"1324":["UL","BeamOrderIndex"],"1338":["FD","DoubleExposureMeterset"],"133A":["FD","DoubleExposureFieldDelta"]},"0076":{"0001":["LO","ImplantAssemblyTemplateName"],"0003":["LO","ImplantAssemblyTemplateIssuer"],"0006":["LO","ImplantAssemblyTemplateVersion"],"0008":["SQ","ReplacedImplantAssemblyTemplateSequence"],"000A":["CS","ImplantAssemblyTemplateType"],"000C":["SQ","OriginalImplantAssemblyTemplateSequence"],"000E":["SQ","DerivationImplantAssemblyTemplateSequence"],"0010":["SQ","ImplantAssemblyTemplateTargetAnatomySequence"],"0020":["SQ","ProcedureTypeCodeSequence"],"0030":["LO","SurgicalTechnique"],"0032":["SQ","ComponentTypesSequence"],"0034":["CS","ComponentTypeCodeSequence"],"0036":["CS","ExclusiveComponentType"],"0038":["CS","MandatoryComponentType"],"0040":["SQ","ComponentSequence"],"0055":["US","ComponentID"],"0060":["SQ","ComponentAssemblySequence"],"0070":["US","Component1ReferencedID"],"0080":["US","Component1ReferencedMatingFeatureSetID"],"0090":["US","Component1ReferencedMatingFeatureID"],"00A0":["US","Component2ReferencedID"],"00B0":["US","Component2ReferencedMatingFeatureSetID"],"00C0":["US","Component2ReferencedMatingFeatureID"]},"0078":{"0001":["LO","ImplantTemplateGroupName"],"0010":["ST","ImplantTemplateGroupDescription"],"0020":["LO","ImplantTemplateGroupIssuer"],"0024":["LO","ImplantTemplateGroupVersion"],"0026":["SQ","ReplacedImplantTemplateGroupSequence"],"0028":["SQ","ImplantTemplateGroupTargetAnatomySequence"],"002A":["SQ","ImplantTemplateGroupMembersSequence"],"002E":["US","ImplantTemplateGroupMemberID"],"0050":["FD","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0060":["FD","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0070":["SQ","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0090":["FD","TwoDImplantTemplateGroupMemberMatchingPoint"],"00A0":["FD","TwoDImplantTemplateGroupMemberMatchingAxes"],"00B0":["SQ","ImplantTemplateGroupVariationDimensionSequence"],"00B2":["LO","ImplantTemplateGroupVariationDimensionName"],"00B4":["SQ","ImplantTemplateGroupVariationDimensionRankSequence"],"00B6":["US","ReferencedImplantTemplateGroupMemberID"],"00B8":["US","ImplantTemplateGroupVariationDimensionRank"]},"0088":{"0130":["SH","StorageMediaFileSetID"],"0140":["UI","StorageMediaFileSetUID"],"0200":["SQ","IconImageSequence"],"0904":["LO","TopicTitle"],"0906":["ST","TopicSubject"],"0910":["LO","TopicAuthor"],"0912":["LO","TopicKeywords"]},"0100":{"0410":["CS","SOPInstanceStatus"],"0420":["DT","SOPAuthorizationDateTime"],"0424":["LT","SOPAuthorizationComment"],"0426":["LO","AuthorizationEquipmentCertificationNumber"]},"0400":{"0005":["US","MACIDNumber"],"0010":["UI","MACCalculationTransferSyntaxUID"],"0015":["CS","MACAlgorithm"],"0020":["AT","DataElementsSigned"],"0100":["UI","DigitalSignatureUID"],"0105":["DT","DigitalSignatureDateTime"],"0110":["CS","CertificateType"],"0115":["OB","CertificateOfSigner"],"0120":["OB","Signature"],"0305":["CS","CertifiedTimestampType"],"0310":["OB","CertifiedTimestamp"],"0401":["SQ","DigitalSignaturePurposeCodeSequence"],"0402":["SQ","ReferencedDigitalSignatureSequence"],"0403":["SQ","ReferencedSOPInstanceMACSequence"],"0404":["OB","MAC"],"0500":["SQ","EncryptedAttributesSequence"],"0510":["UI","EncryptedContentTransferSyntaxUID"],"0520":["OB","EncryptedContent"],"0550":["SQ","ModifiedAttributesSequence"],"0561":["SQ","OriginalAttributesSequence"],"0562":["DT","AttributeModificationDateTime"],"0563":["LO","ModifyingSystem"],"0564":["LO","SourceOfPreviousValues"],"0565":["CS","ReasonForTheAttributeModification"]},"2000":{"0010":["IS","NumberOfCopies"],"001E":["SQ","PrinterConfigurationSequence"],"0020":["CS","PrintPriority"],"0030":["CS","MediumType"],"0040":["CS","FilmDestination"],"0050":["LO","FilmSessionLabel"],"0060":["IS","MemoryAllocation"],"0061":["IS","MaximumMemoryAllocation"],"0062":["CS","ColorImagePrintingFlag"],"0063":["CS","CollationFlag"],"0065":["CS","AnnotationFlag"],"0067":["CS","ImageOverlayFlag"],"0069":["CS","PresentationLUTFlag"],"006A":["CS","ImageBoxPresentationLUTFlag"],"00A0":["US","MemoryBitDepth"],"00A1":["US","PrintingBitDepth"],"00A2":["SQ","MediaInstalledSequence"],"00A4":["SQ","OtherMediaAvailableSequence"],"00A8":["SQ","SupportedImageDisplayFormatsSequence"],"0500":["SQ","ReferencedFilmBoxSequence"],"0510":["SQ","ReferencedStoredPrintSequence"]},"2010":{"0010":["ST","ImageDisplayFormat"],"0030":["CS","AnnotationDisplayFormatID"],"0040":["CS","FilmOrientation"],"0050":["CS","FilmSizeID"],"0052":["CS","PrinterResolutionID"],"0054":["CS","DefaultPrinterResolutionID"],"0060":["CS","MagnificationType"],"0080":["CS","SmoothingType"],"00A6":["CS","DefaultMagnificationType"],"00A7":["CS","OtherMagnificationTypesAvailable"],"00A8":["CS","DefaultSmoothingType"],"00A9":["CS","OtherSmoothingTypesAvailable"],"0100":["CS","BorderDensity"],"0110":["CS","EmptyImageDensity"],"0120":["US","MinDensity"],"0130":["US","MaxDensity"],"0140":["CS","Trim"],"0150":["ST","ConfigurationInformation"],"0152":["LT","ConfigurationInformationDescription"],"0154":["IS","MaximumCollatedFilms"],"015E":["US","Illumination"],"0160":["US","ReflectedAmbientLight"],"0376":["DS","PrinterPixelSpacing"],"0500":["SQ","ReferencedFilmSessionSequence"],"0510":["SQ","ReferencedImageBoxSequence"],"0520":["SQ","ReferencedBasicAnnotationBoxSequence"]},"2020":{"0010":["US","ImageBoxPosition"],"0020":["CS","Polarity"],"0030":["DS","RequestedImageSize"],"0040":["CS","RequestedDecimateCropBehavior"],"0050":["CS","RequestedResolutionID"],"00A0":["CS","RequestedImageSizeFlag"],"00A2":["CS","DecimateCropResult"],"0110":["SQ","BasicGrayscaleImageSequence"],"0111":["SQ","BasicColorImageSequence"],"0130":["SQ","ReferencedImageOverlayBoxSequence"],"0140":["SQ","ReferencedVOILUTBoxSequence"]},"2030":{"0010":["US","AnnotationPosition"],"0020":["LO","TextString"]},"2040":{"0010":["SQ","ReferencedOverlayPlaneSequence"],"0011":["US","ReferencedOverlayPlaneGroups"],"0020":["SQ","OverlayPixelDataSequence"],"0060":["CS","OverlayMagnificationType"],"0070":["CS","OverlaySmoothingType"],"0072":["CS","OverlayOrImageMagnification"],"0074":["US","MagnifyToNumberOfColumns"],"0080":["CS","OverlayForegroundDensity"],"0082":["CS","OverlayBackgroundDensity"],"0090":["CS","OverlayMode"],"0100":["CS","ThresholdDensity"],"0500":["SQ","ReferencedImageBoxSequenceRetired"]},"2050":{"0010":["SQ","PresentationLUTSequence"],"0020":["CS","PresentationLUTShape"],"0500":["SQ","ReferencedPresentationLUTSequence"]},"2100":{"0010":["SH","PrintJobID"],"0020":["CS","ExecutionStatus"],"0030":["CS","ExecutionStatusInfo"],"0040":["DA","CreationDate"],"0050":["TM","CreationTime"],"0070":["AE","Originator"],"0140":["AE","DestinationAE"],"0160":["SH","OwnerID"],"0170":["IS","NumberOfFilms"],"0500":["SQ","ReferencedPrintJobSequencePullStoredPrint"]},"2110":{"0010":["CS","PrinterStatus"],"0020":["CS","PrinterStatusInfo"],"0030":["LO","PrinterName"],"0099":["SH","PrintQueueID"]},"2120":{"0010":["CS","QueueStatus"],"0050":["SQ","PrintJobDescriptionSequence"],"0070":["SQ","ReferencedPrintJobSequence"]},"2130":{"0010":["SQ","PrintManagementCapabilitiesSequence"],"0015":["SQ","PrinterCharacteristicsSequence"],"0030":["SQ","FilmBoxContentSequence"],"0040":["SQ","ImageBoxContentSequence"],"0050":["SQ","AnnotationContentSequence"],"0060":["SQ","ImageOverlayBoxContentSequence"],"0080":["SQ","PresentationLUTContentSequence"],"00A0":["SQ","ProposedStudySequence"],"00C0":["SQ","OriginalImageSequence"]},"2200":{"0001":["CS","LabelUsingInformationExtractedFromInstances"],"0002":["UT","LabelText"],"0003":["CS","LabelStyleSelection"],"0004":["LT","MediaDisposition"],"0005":["LT","BarcodeValue"],"0006":["CS","BarcodeSymbology"],"0007":["CS","AllowMediaSplitting"],"0008":["CS","IncludeNonDICOMObjects"],"0009":["CS","IncludeDisplayApplication"],"000A":["CS","PreserveCompositeInstancesAfterMediaCreation"],"000B":["US","TotalNumberOfPiecesOfMediaCreated"],"000C":["LO","RequestedMediaApplicationProfile"],"000D":["SQ","ReferencedStorageMediaSequence"],"000E":["AT","FailureAttributes"],"000F":["CS","AllowLossyCompression"],"0020":["CS","RequestPriority"]},"3002":{"0002":["SH","RTImageLabel"],"0003":["LO","RTImageName"],"0004":["ST","RTImageDescription"],"000A":["CS","ReportedValuesOrigin"],"000C":["CS","RTImagePlane"],"000D":["DS","XRayImageReceptorTranslation"],"000E":["DS","XRayImageReceptorAngle"],"0010":["DS","RTImageOrientation"],"0011":["DS","ImagePlanePixelSpacing"],"0012":["DS","RTImagePosition"],"0020":["SH","RadiationMachineName"],"0022":["DS","RadiationMachineSAD"],"0024":["DS","RadiationMachineSSD"],"0026":["DS","RTImageSID"],"0028":["DS","SourceToReferenceObjectDistance"],"0029":["IS","FractionNumber"],"0030":["SQ","ExposureSequence"],"0032":["DS","MetersetExposure"],"0034":["DS","DiaphragmPosition"],"0040":["SQ","FluenceMapSequence"],"0041":["CS","FluenceDataSource"],"0042":["DS","FluenceDataScale"],"0050":["SQ","PrimaryFluenceModeSequence"],"0051":["CS","FluenceMode"],"0052":["SH","FluenceModeID"]},"3004":{"0001":["CS","DVHType"],"0002":["CS","DoseUnits"],"0004":["CS","DoseType"],"0006":["LO","DoseComment"],"0008":["DS","NormalizationPoint"],"000A":["CS","DoseSummationType"],"000C":["DS","GridFrameOffsetVector"],"000E":["DS","DoseGridScaling"],"0010":["SQ","RTDoseROISequence"],"0012":["DS","DoseValue"],"0014":["CS","TissueHeterogeneityCorrection"],"0040":["DS","DVHNormalizationPoint"],"0042":["DS","DVHNormalizationDoseValue"],"0050":["SQ","DVHSequence"],"0052":["DS","DVHDoseScaling"],"0054":["CS","DVHVolumeUnits"],"0056":["IS","DVHNumberOfBins"],"0058":["DS","DVHData"],"0060":["SQ","DVHReferencedROISequence"],"0062":["CS","DVHROIContributionType"],"0070":["DS","DVHMinimumDose"],"0072":["DS","DVHMaximumDose"],"0074":["DS","DVHMeanDose"]},"3006":{"0002":["SH","StructureSetLabel"],"0004":["LO","StructureSetName"],"0006":["ST","StructureSetDescription"],"0008":["DA","StructureSetDate"],"0009":["TM","StructureSetTime"],"0010":["SQ","ReferencedFrameOfReferenceSequence"],"0012":["SQ","RTReferencedStudySequence"],"0014":["SQ","RTReferencedSeriesSequence"],"0016":["SQ","ContourImageSequence"],"0020":["SQ","StructureSetROISequence"],"0022":["IS","ROINumber"],"0024":["UI","ReferencedFrameOfReferenceUID"],"0026":["LO","ROIName"],"0028":["ST","ROIDescription"],"002A":["IS","ROIDisplayColor"],"002C":["DS","ROIVolume"],"0030":["SQ","RTRelatedROISequence"],"0033":["CS","RTROIRelationship"],"0036":["CS","ROIGenerationAlgorithm"],"0038":["LO","ROIGenerationDescription"],"0039":["SQ","ROIContourSequence"],"0040":["SQ","ContourSequence"],"0042":["CS","ContourGeometricType"],"0044":["DS","ContourSlabThickness"],"0045":["DS","ContourOffsetVector"],"0046":["IS","NumberOfContourPoints"],"0048":["IS","ContourNumber"],"0049":["IS","AttachedContours"],"0050":["DS","ContourData"],"0080":["SQ","RTROIObservationsSequence"],"0082":["IS","ObservationNumber"],"0084":["IS","ReferencedROINumber"],"0085":["SH","ROIObservationLabel"],"0086":["SQ","RTROIIdentificationCodeSequence"],"0088":["ST","ROIObservationDescription"],"00A0":["SQ","RelatedRTROIObservationsSequence"],"00A4":["CS","RTROIInterpretedType"],"00A6":["PN","ROIInterpreter"],"00B0":["SQ","ROIPhysicalPropertiesSequence"],"00B2":["CS","ROIPhysicalProperty"],"00B4":["DS","ROIPhysicalPropertyValue"],"00B6":["SQ","ROIElementalCompositionSequence"],"00B7":["US","ROIElementalCompositionAtomicNumber"],"00B8":["FL","ROIElementalCompositionAtomicMassFraction"],"00C0":["SQ","FrameOfReferenceRelationshipSequence"],"00C2":["UI","RelatedFrameOfReferenceUID"],"00C4":["CS","FrameOfReferenceTransformationType"],"00C6":["DS","FrameOfReferenceTransformationMatrix"],"00C8":["LO","FrameOfReferenceTransformationComment"]},"3008":{"0010":["SQ","MeasuredDoseReferenceSequence"],"0012":["ST","MeasuredDoseDescription"],"0014":["CS","MeasuredDoseType"],"0016":["DS","MeasuredDoseValue"],"0020":["SQ","TreatmentSessionBeamSequence"],"0021":["SQ","TreatmentSessionIonBeamSequence"],"0022":["IS","CurrentFractionNumber"],"0024":["DA","TreatmentControlPointDate"],"0025":["TM","TreatmentControlPointTime"],"002A":["CS","TreatmentTerminationStatus"],"002B":["SH","TreatmentTerminationCode"],"002C":["CS","TreatmentVerificationStatus"],"0030":["SQ","ReferencedTreatmentRecordSequence"],"0032":["DS","SpecifiedPrimaryMeterset"],"0033":["DS","SpecifiedSecondaryMeterset"],"0036":["DS","DeliveredPrimaryMeterset"],"0037":["DS","DeliveredSecondaryMeterset"],"003A":["DS","SpecifiedTreatmentTime"],"003B":["DS","DeliveredTreatmentTime"],"0040":["SQ","ControlPointDeliverySequence"],"0041":["SQ","IonControlPointDeliverySequence"],"0042":["DS","SpecifiedMeterset"],"0044":["DS","DeliveredMeterset"],"0045":["FL","MetersetRateSet"],"0046":["FL","MetersetRateDelivered"],"0047":["FL","ScanSpotMetersetsDelivered"],"0048":["DS","DoseRateDelivered"],"0050":["SQ","TreatmentSummaryCalculatedDoseReferenceSequence"],"0052":["DS","CumulativeDoseToDoseReference"],"0054":["DA","FirstTreatmentDate"],"0056":["DA","MostRecentTreatmentDate"],"005A":["IS","NumberOfFractionsDelivered"],"0060":["SQ","OverrideSequence"],"0061":["AT","ParameterSequencePointer"],"0062":["AT","OverrideParameterPointer"],"0063":["IS","ParameterItemIndex"],"0064":["IS","MeasuredDoseReferenceNumber"],"0065":["AT","ParameterPointer"],"0066":["ST","OverrideReason"],"0068":["SQ","CorrectedParameterSequence"],"006A":["FL","CorrectionValue"],"0070":["SQ","CalculatedDoseReferenceSequence"],"0072":["IS","CalculatedDoseReferenceNumber"],"0074":["ST","CalculatedDoseReferenceDescription"],"0076":["DS","CalculatedDoseReferenceDoseValue"],"0078":["DS","StartMeterset"],"007A":["DS","EndMeterset"],"0080":["SQ","ReferencedMeasuredDoseReferenceSequence"],"0082":["IS","ReferencedMeasuredDoseReferenceNumber"],"0090":["SQ","ReferencedCalculatedDoseReferenceSequence"],"0092":["IS","ReferencedCalculatedDoseReferenceNumber"],"00A0":["SQ","BeamLimitingDeviceLeafPairsSequence"],"00B0":["SQ","RecordedWedgeSequence"],"00C0":["SQ","RecordedCompensatorSequence"],"00D0":["SQ","RecordedBlockSequence"],"00E0":["SQ","TreatmentSummaryMeasuredDoseReferenceSequence"],"00F0":["SQ","RecordedSnoutSequence"],"00F2":["SQ","RecordedRangeShifterSequence"],"00F4":["SQ","RecordedLateralSpreadingDeviceSequence"],"00F6":["SQ","RecordedRangeModulatorSequence"],"0100":["SQ","RecordedSourceSequence"],"0105":["LO","SourceSerialNumber"],"0110":["SQ","TreatmentSessionApplicationSetupSequence"],"0116":["CS","ApplicationSetupCheck"],"0120":["SQ","RecordedBrachyAccessoryDeviceSequence"],"0122":["IS","ReferencedBrachyAccessoryDeviceNumber"],"0130":["SQ","RecordedChannelSequence"],"0132":["DS","SpecifiedChannelTotalTime"],"0134":["DS","DeliveredChannelTotalTime"],"0136":["IS","SpecifiedNumberOfPulses"],"0138":["IS","DeliveredNumberOfPulses"],"013A":["DS","SpecifiedPulseRepetitionInterval"],"013C":["DS","DeliveredPulseRepetitionInterval"],"0140":["SQ","RecordedSourceApplicatorSequence"],"0142":["IS","ReferencedSourceApplicatorNumber"],"0150":["SQ","RecordedChannelShieldSequence"],"0152":["IS","ReferencedChannelShieldNumber"],"0160":["SQ","BrachyControlPointDeliveredSequence"],"0162":["DA","SafePositionExitDate"],"0164":["TM","SafePositionExitTime"],"0166":["DA","SafePositionReturnDate"],"0168":["TM","SafePositionReturnTime"],"0200":["CS","CurrentTreatmentStatus"],"0202":["ST","TreatmentStatusComment"],"0220":["SQ","FractionGroupSummarySequence"],"0223":["IS","ReferencedFractionNumber"],"0224":["CS","FractionGroupType"],"0230":["CS","BeamStopperPosition"],"0240":["SQ","FractionStatusSummarySequence"],"0250":["DA","TreatmentDate"],"0251":["TM","TreatmentTime"]},"300A":{"0002":["SH","RTPlanLabel"],"0003":["LO","RTPlanName"],"0004":["ST","RTPlanDescription"],"0006":["DA","RTPlanDate"],"0007":["TM","RTPlanTime"],"0009":["LO","TreatmentProtocols"],"000A":["CS","PlanIntent"],"000B":["LO","TreatmentSites"],"000C":["CS","RTPlanGeometry"],"000E":["ST","PrescriptionDescription"],"0010":["SQ","DoseReferenceSequence"],"0012":["IS","DoseReferenceNumber"],"0013":["UI","DoseReferenceUID"],"0014":["CS","DoseReferenceStructureType"],"0015":["CS","NominalBeamEnergyUnit"],"0016":["LO","DoseReferenceDescription"],"0018":["DS","DoseReferencePointCoordinates"],"001A":["DS","NominalPriorDose"],"0020":["CS","DoseReferenceType"],"0021":["DS","ConstraintWeight"],"0022":["DS","DeliveryWarningDose"],"0023":["DS","DeliveryMaximumDose"],"0025":["DS","TargetMinimumDose"],"0026":["DS","TargetPrescriptionDose"],"0027":["DS","TargetMaximumDose"],"0028":["DS","TargetUnderdoseVolumeFraction"],"002A":["DS","OrganAtRiskFullVolumeDose"],"002B":["DS","OrganAtRiskLimitDose"],"002C":["DS","OrganAtRiskMaximumDose"],"002D":["DS","OrganAtRiskOverdoseVolumeFraction"],"0040":["SQ","ToleranceTableSequence"],"0042":["IS","ToleranceTableNumber"],"0043":["SH","ToleranceTableLabel"],"0044":["DS","GantryAngleTolerance"],"0046":["DS","BeamLimitingDeviceAngleTolerance"],"0048":["SQ","BeamLimitingDeviceToleranceSequence"],"004A":["DS","BeamLimitingDevicePositionTolerance"],"004B":["FL","SnoutPositionTolerance"],"004C":["DS","PatientSupportAngleTolerance"],"004E":["DS","TableTopEccentricAngleTolerance"],"004F":["FL","TableTopPitchAngleTolerance"],"0050":["FL","TableTopRollAngleTolerance"],"0051":["DS","TableTopVerticalPositionTolerance"],"0052":["DS","TableTopLongitudinalPositionTolerance"],"0053":["DS","TableTopLateralPositionTolerance"],"0055":["CS","RTPlanRelationship"],"0070":["SQ","FractionGroupSequence"],"0071":["IS","FractionGroupNumber"],"0072":["LO","FractionGroupDescription"],"0078":["IS","NumberOfFractionsPlanned"],"0079":["IS","NumberOfFractionPatternDigitsPerDay"],"007A":["IS","RepeatFractionCycleLength"],"007B":["LT","FractionPattern"],"0080":["IS","NumberOfBeams"],"0082":["DS","BeamDoseSpecificationPoint"],"0084":["DS","BeamDose"],"0086":["DS","BeamMeterset"],"0088":["FL","BeamDosePointDepth"],"0089":["FL","BeamDosePointEquivalentDepth"],"008A":["FL","BeamDosePointSSD"],"00A0":["IS","NumberOfBrachyApplicationSetups"],"00A2":["DS","BrachyApplicationSetupDoseSpecificationPoint"],"00A4":["DS","BrachyApplicationSetupDose"],"00B0":["SQ","BeamSequence"],"00B2":["SH","TreatmentMachineName"],"00B3":["CS","PrimaryDosimeterUnit"],"00B4":["DS","SourceAxisDistance"],"00B6":["SQ","BeamLimitingDeviceSequence"],"00B8":["CS","RTBeamLimitingDeviceType"],"00BA":["DS","SourceToBeamLimitingDeviceDistance"],"00BB":["FL","IsocenterToBeamLimitingDeviceDistance"],"00BC":["IS","NumberOfLeafJawPairs"],"00BE":["DS","LeafPositionBoundaries"],"00C0":["IS","BeamNumber"],"00C2":["LO","BeamName"],"00C3":["ST","BeamDescription"],"00C4":["CS","BeamType"],"00C6":["CS","RadiationType"],"00C7":["CS","HighDoseTechniqueType"],"00C8":["IS","ReferenceImageNumber"],"00CA":["SQ","PlannedVerificationImageSequence"],"00CC":["LO","ImagingDeviceSpecificAcquisitionParameters"],"00CE":["CS","TreatmentDeliveryType"],"00D0":["IS","NumberOfWedges"],"00D1":["SQ","WedgeSequence"],"00D2":["IS","WedgeNumber"],"00D3":["CS","WedgeType"],"00D4":["SH","WedgeID"],"00D5":["IS","WedgeAngle"],"00D6":["DS","WedgeFactor"],"00D7":["FL","TotalWedgeTrayWaterEquivalentThickness"],"00D8":["DS","WedgeOrientation"],"00D9":["FL","IsocenterToWedgeTrayDistance"],"00DA":["DS","SourceToWedgeTrayDistance"],"00DB":["FL","WedgeThinEdgePosition"],"00DC":["SH","BolusID"],"00DD":["ST","BolusDescription"],"00E0":["IS","NumberOfCompensators"],"00E1":["SH","MaterialID"],"00E2":["DS","TotalCompensatorTrayFactor"],"00E3":["SQ","CompensatorSequence"],"00E4":["IS","CompensatorNumber"],"00E5":["SH","CompensatorID"],"00E6":["DS","SourceToCompensatorTrayDistance"],"00E7":["IS","CompensatorRows"],"00E8":["IS","CompensatorColumns"],"00E9":["DS","CompensatorPixelSpacing"],"00EA":["DS","CompensatorPosition"],"00EB":["DS","CompensatorTransmissionData"],"00EC":["DS","CompensatorThicknessData"],"00ED":["IS","NumberOfBoli"],"00EE":["CS","CompensatorType"],"00F0":["IS","NumberOfBlocks"],"00F2":["DS","TotalBlockTrayFactor"],"00F3":["FL","TotalBlockTrayWaterEquivalentThickness"],"00F4":["SQ","BlockSequence"],"00F5":["SH","BlockTrayID"],"00F6":["DS","SourceToBlockTrayDistance"],"00F7":["FL","IsocenterToBlockTrayDistance"],"00F8":["CS","BlockType"],"00F9":["LO","AccessoryCode"],"00FA":["CS","BlockDivergence"],"00FB":["CS","BlockMountingPosition"],"00FC":["IS","BlockNumber"],"00FE":["LO","BlockName"],"0100":["DS","BlockThickness"],"0102":["DS","BlockTransmission"],"0104":["IS","BlockNumberOfPoints"],"0106":["DS","BlockData"],"0107":["SQ","ApplicatorSequence"],"0108":["SH","ApplicatorID"],"0109":["CS","ApplicatorType"],"010A":["LO","ApplicatorDescription"],"010C":["DS","CumulativeDoseReferenceCoefficient"],"010E":["DS","FinalCumulativeMetersetWeight"],"0110":["IS","NumberOfControlPoints"],"0111":["SQ","ControlPointSequence"],"0112":["IS","ControlPointIndex"],"0114":["DS","NominalBeamEnergy"],"0115":["DS","DoseRateSet"],"0116":["SQ","WedgePositionSequence"],"0118":["CS","WedgePosition"],"011A":["SQ","BeamLimitingDevicePositionSequence"],"011C":["DS","LeafJawPositions"],"011E":["DS","GantryAngle"],"011F":["CS","GantryRotationDirection"],"0120":["DS","BeamLimitingDeviceAngle"],"0121":["CS","BeamLimitingDeviceRotationDirection"],"0122":["DS","PatientSupportAngle"],"0123":["CS","PatientSupportRotationDirection"],"0124":["DS","TableTopEccentricAxisDistance"],"0125":["DS","TableTopEccentricAngle"],"0126":["CS","TableTopEccentricRotationDirection"],"0128":["DS","TableTopVerticalPosition"],"0129":["DS","TableTopLongitudinalPosition"],"012A":["DS","TableTopLateralPosition"],"012C":["DS","IsocenterPosition"],"012E":["DS","SurfaceEntryPoint"],"0130":["DS","SourceToSurfaceDistance"],"0134":["DS","CumulativeMetersetWeight"],"0140":["FL","TableTopPitchAngle"],"0142":["CS","TableTopPitchRotationDirection"],"0144":["FL","TableTopRollAngle"],"0146":["CS","TableTopRollRotationDirection"],"0148":["FL","HeadFixationAngle"],"014A":["FL","GantryPitchAngle"],"014C":["CS","GantryPitchRotationDirection"],"014E":["FL","GantryPitchAngleTolerance"],"0180":["SQ","PatientSetupSequence"],"0182":["IS","PatientSetupNumber"],"0183":["LO","PatientSetupLabel"],"0184":["LO","PatientAdditionalPosition"],"0190":["SQ","FixationDeviceSequence"],"0192":["CS","FixationDeviceType"],"0194":["SH","FixationDeviceLabel"],"0196":["ST","FixationDeviceDescription"],"0198":["SH","FixationDevicePosition"],"0199":["FL","FixationDevicePitchAngle"],"019A":["FL","FixationDeviceRollAngle"],"01A0":["SQ","ShieldingDeviceSequence"],"01A2":["CS","ShieldingDeviceType"],"01A4":["SH","ShieldingDeviceLabel"],"01A6":["ST","ShieldingDeviceDescription"],"01A8":["SH","ShieldingDevicePosition"],"01B0":["CS","SetupTechnique"],"01B2":["ST","SetupTechniqueDescription"],"01B4":["SQ","SetupDeviceSequence"],"01B6":["CS","SetupDeviceType"],"01B8":["SH","SetupDeviceLabel"],"01BA":["ST","SetupDeviceDescription"],"01BC":["DS","SetupDeviceParameter"],"01D0":["ST","SetupReferenceDescription"],"01D2":["DS","TableTopVerticalSetupDisplacement"],"01D4":["DS","TableTopLongitudinalSetupDisplacement"],"01D6":["DS","TableTopLateralSetupDisplacement"],"0200":["CS","BrachyTreatmentTechnique"],"0202":["CS","BrachyTreatmentType"],"0206":["SQ","TreatmentMachineSequence"],"0210":["SQ","SourceSequence"],"0212":["IS","SourceNumber"],"0214":["CS","SourceType"],"0216":["LO","SourceManufacturer"],"0218":["DS","ActiveSourceDiameter"],"021A":["DS","ActiveSourceLength"],"0222":["DS","SourceEncapsulationNominalThickness"],"0224":["DS","SourceEncapsulationNominalTransmission"],"0226":["LO","SourceIsotopeName"],"0228":["DS","SourceIsotopeHalfLife"],"0229":["CS","SourceStrengthUnits"],"022A":["DS","ReferenceAirKermaRate"],"022B":["DS","SourceStrength"],"022C":["DA","SourceStrengthReferenceDate"],"022E":["TM","SourceStrengthReferenceTime"],"0230":["SQ","ApplicationSetupSequence"],"0232":["CS","ApplicationSetupType"],"0234":["IS","ApplicationSetupNumber"],"0236":["LO","ApplicationSetupName"],"0238":["LO","ApplicationSetupManufacturer"],"0240":["IS","TemplateNumber"],"0242":["SH","TemplateType"],"0244":["LO","TemplateName"],"0250":["DS","TotalReferenceAirKerma"],"0260":["SQ","BrachyAccessoryDeviceSequence"],"0262":["IS","BrachyAccessoryDeviceNumber"],"0263":["SH","BrachyAccessoryDeviceID"],"0264":["CS","BrachyAccessoryDeviceType"],"0266":["LO","BrachyAccessoryDeviceName"],"026A":["DS","BrachyAccessoryDeviceNominalThickness"],"026C":["DS","BrachyAccessoryDeviceNominalTransmission"],"0280":["SQ","ChannelSequence"],"0282":["IS","ChannelNumber"],"0284":["DS","ChannelLength"],"0286":["DS","ChannelTotalTime"],"0288":["CS","SourceMovementType"],"028A":["IS","NumberOfPulses"],"028C":["DS","PulseRepetitionInterval"],"0290":["IS","SourceApplicatorNumber"],"0291":["SH","SourceApplicatorID"],"0292":["CS","SourceApplicatorType"],"0294":["LO","SourceApplicatorName"],"0296":["DS","SourceApplicatorLength"],"0298":["LO","SourceApplicatorManufacturer"],"029C":["DS","SourceApplicatorWallNominalThickness"],"029E":["DS","SourceApplicatorWallNominalTransmission"],"02A0":["DS","SourceApplicatorStepSize"],"02A2":["IS","TransferTubeNumber"],"02A4":["DS","TransferTubeLength"],"02B0":["SQ","ChannelShieldSequence"],"02B2":["IS","ChannelShieldNumber"],"02B3":["SH","ChannelShieldID"],"02B4":["LO","ChannelShieldName"],"02B8":["DS","ChannelShieldNominalThickness"],"02BA":["DS","ChannelShieldNominalTransmission"],"02C8":["DS","FinalCumulativeTimeWeight"],"02D0":["SQ","BrachyControlPointSequence"],"02D2":["DS","ControlPointRelativePosition"],"02D4":["DS","ControlPoint3DPosition"],"02D6":["DS","CumulativeTimeWeight"],"02E0":["CS","CompensatorDivergence"],"02E1":["CS","CompensatorMountingPosition"],"02E2":["DS","SourceToCompensatorDistance"],"02E3":["FL","TotalCompensatorTrayWaterEquivalentThickness"],"02E4":["FL","IsocenterToCompensatorTrayDistance"],"02E5":["FL","CompensatorColumnOffset"],"02E6":["FL","IsocenterToCompensatorDistances"],"02E7":["FL","CompensatorRelativeStoppingPowerRatio"],"02E8":["FL","CompensatorMillingToolDiameter"],"02EA":["SQ","IonRangeCompensatorSequence"],"02EB":["LT","CompensatorDescription"],"0302":["IS","RadiationMassNumber"],"0304":["IS","RadiationAtomicNumber"],"0306":["SS","RadiationChargeState"],"0308":["CS","ScanMode"],"030A":["FL","VirtualSourceAxisDistances"],"030C":["SQ","SnoutSequence"],"030D":["FL","SnoutPosition"],"030F":["SH","SnoutID"],"0312":["IS","NumberOfRangeShifters"],"0314":["SQ","RangeShifterSequence"],"0316":["IS","RangeShifterNumber"],"0318":["SH","RangeShifterID"],"0320":["CS","RangeShifterType"],"0322":["LO","RangeShifterDescription"],"0330":["IS","NumberOfLateralSpreadingDevices"],"0332":["SQ","LateralSpreadingDeviceSequence"],"0334":["IS","LateralSpreadingDeviceNumber"],"0336":["SH","LateralSpreadingDeviceID"],"0338":["CS","LateralSpreadingDeviceType"],"033A":["LO","LateralSpreadingDeviceDescription"],"033C":["FL","LateralSpreadingDeviceWaterEquivalentThickness"],"0340":["IS","NumberOfRangeModulators"],"0342":["SQ","RangeModulatorSequence"],"0344":["IS","RangeModulatorNumber"],"0346":["SH","RangeModulatorID"],"0348":["CS","RangeModulatorType"],"034A":["LO","RangeModulatorDescription"],"034C":["SH","BeamCurrentModulationID"],"0350":["CS","PatientSupportType"],"0352":["SH","PatientSupportID"],"0354":["LO","PatientSupportAccessoryCode"],"0356":["FL","FixationLightAzimuthalAngle"],"0358":["FL","FixationLightPolarAngle"],"035A":["FL","MetersetRate"],"0360":["SQ","RangeShifterSettingsSequence"],"0362":["LO","RangeShifterSetting"],"0364":["FL","IsocenterToRangeShifterDistance"],"0366":["FL","RangeShifterWaterEquivalentThickness"],"0370":["SQ","LateralSpreadingDeviceSettingsSequence"],"0372":["LO","LateralSpreadingDeviceSetting"],"0374":["FL","IsocenterToLateralSpreadingDeviceDistance"],"0380":["SQ","RangeModulatorSettingsSequence"],"0382":["FL","RangeModulatorGatingStartValue"],"0384":["FL","RangeModulatorGatingStopValue"],"0386":["FL","RangeModulatorGatingStartWaterEquivalentThickness"],"0388":["FL","RangeModulatorGatingStopWaterEquivalentThickness"],"038A":["FL","IsocenterToRangeModulatorDistance"],"0390":["SH","ScanSpotTuneID"],"0392":["IS","NumberOfScanSpotPositions"],"0394":["FL","ScanSpotPositionMap"],"0396":["FL","ScanSpotMetersetWeights"],"0398":["FL","ScanningSpotSize"],"039A":["IS","NumberOfPaintings"],"03A0":["SQ","IonToleranceTableSequence"],"03A2":["SQ","IonBeamSequence"],"03A4":["SQ","IonBeamLimitingDeviceSequence"],"03A6":["SQ","IonBlockSequence"],"03A8":["SQ","IonControlPointSequence"],"03AA":["SQ","IonWedgeSequence"],"03AC":["SQ","IonWedgePositionSequence"],"0401":["SQ","ReferencedSetupImageSequence"],"0402":["ST","SetupImageComment"],"0410":["SQ","MotionSynchronizationSequence"],"0412":["FL","ControlPointOrientation"],"0420":["SQ","GeneralAccessorySequence"],"0421":["SH","GeneralAccessoryID"],"0422":["ST","GeneralAccessoryDescription"],"0423":["CS","GeneralAccessoryType"],"0424":["IS","GeneralAccessoryNumber"],"0431":["SQ","ApplicatorGeometrySequence"],"0432":["CS","ApplicatorApertureShape"],"0433":["FL","ApplicatorOpening"],"0434":["FL","ApplicatorOpeningX"],"0435":["FL","ApplicatorOpeningY"],"0436":["FL","SourceToApplicatorMountingPositionDistance"]},"300C":{"0002":["SQ","ReferencedRTPlanSequence"],"0004":["SQ","ReferencedBeamSequence"],"0006":["IS","ReferencedBeamNumber"],"0007":["IS","ReferencedReferenceImageNumber"],"0008":["DS","StartCumulativeMetersetWeight"],"0009":["DS","EndCumulativeMetersetWeight"],"000A":["SQ","ReferencedBrachyApplicationSetupSequence"],"000C":["IS","ReferencedBrachyApplicationSetupNumber"],"000E":["IS","ReferencedSourceNumber"],"0020":["SQ","ReferencedFractionGroupSequence"],"0022":["IS","ReferencedFractionGroupNumber"],"0040":["SQ","ReferencedVerificationImageSequence"],"0042":["SQ","ReferencedReferenceImageSequence"],"0050":["SQ","ReferencedDoseReferenceSequence"],"0051":["IS","ReferencedDoseReferenceNumber"],"0055":["SQ","BrachyReferencedDoseReferenceSequence"],"0060":["SQ","ReferencedStructureSetSequence"],"006A":["IS","ReferencedPatientSetupNumber"],"0080":["SQ","ReferencedDoseSequence"],"00A0":["IS","ReferencedToleranceTableNumber"],"00B0":["SQ","ReferencedBolusSequence"],"00C0":["IS","ReferencedWedgeNumber"],"00D0":["IS","ReferencedCompensatorNumber"],"00E0":["IS","ReferencedBlockNumber"],"00F0":["IS","ReferencedControlPointIndex"],"00F2":["SQ","ReferencedControlPointSequence"],"00F4":["IS","ReferencedStartControlPointIndex"],"00F6":["IS","ReferencedStopControlPointIndex"],"0100":["IS","ReferencedRangeShifterNumber"],"0102":["IS","ReferencedLateralSpreadingDeviceNumber"],"0104":["IS","ReferencedRangeModulatorNumber"]},"300E":{"0002":["CS","ApprovalStatus"],"0004":["DA","ReviewDate"],"0005":["TM","ReviewTime"],"0008":["PN","ReviewerName"]},"4000":{"0010":["LT","Arbitrary"],"4000":["LT","TextComments"]},"4008":{"0040":["SH","ResultsID"],"0042":["LO","ResultsIDIssuer"],"0050":["SQ","ReferencedInterpretationSequence"],"00FF":["CS","ReportProductionStatusTrial"],"0100":["DA","InterpretationRecordedDate"],"0101":["TM","InterpretationRecordedTime"],"0102":["PN","InterpretationRecorder"],"0103":["LO","ReferenceToRecordedSound"],"0108":["DA","InterpretationTranscriptionDate"],"0109":["TM","InterpretationTranscriptionTime"],"010A":["PN","InterpretationTranscriber"],"010B":["ST","InterpretationText"],"010C":["PN","InterpretationAuthor"],"0111":["SQ","InterpretationApproverSequence"],"0112":["DA","InterpretationApprovalDate"],"0113":["TM","InterpretationApprovalTime"],"0114":["PN","PhysicianApprovingInterpretation"],"0115":["LT","InterpretationDiagnosisDescription"],"0117":["SQ","InterpretationDiagnosisCodeSequence"],"0118":["SQ","ResultsDistributionListSequence"],"0119":["PN","DistributionName"],"011A":["LO","DistributionAddress"],"0200":["SH","InterpretationID"],"0202":["LO","InterpretationIDIssuer"],"0210":["CS","InterpretationTypeID"],"0212":["CS","InterpretationStatusID"],"0300":["ST","Impressions"],"4000":["ST","ResultsComments"]},"4010":{"0001":["CS","LowEnergyDetectors"],"0002":["CS","HighEnergyDetectors"],"0004":["SQ","DetectorGeometrySequence"],"1001":["SQ","ThreatROIVoxelSequence"],"1004":["FL","ThreatROIBase"],"1005":["FL","ThreatROIExtents"],"1006":["OB","ThreatROIBitmap"],"1007":["SH","RouteSegmentID"],"1008":["CS","GantryType"],"1009":["CS","OOIOwnerType"],"100A":["SQ","RouteSegmentSequence"],"1010":["US","PotentialThreatObjectID"],"1011":["SQ","ThreatSequence"],"1012":["CS","ThreatCategory"],"1013":["LT","ThreatCategoryDescription"],"1014":["CS","ATDAbilityAssessment"],"1015":["CS","ATDAssessmentFlag"],"1016":["FL","ATDAssessmentProbability"],"1017":["FL","Mass"],"1018":["FL","Density"],"1019":["FL","ZEffective"],"101A":["SH","BoardingPassID"],"101B":["FL","CenterOfMass"],"101C":["FL","CenterOfPTO"],"101D":["FL","BoundingPolygon"],"101E":["SH","RouteSegmentStartLocationID"],"101F":["SH","RouteSegmentEndLocationID"],"1020":["CS","RouteSegmentLocationIDType"],"1021":["CS","AbortReason"],"1023":["FL","VolumeOfPTO"],"1024":["CS","AbortFlag"],"1025":["DT","RouteSegmentStartTime"],"1026":["DT","RouteSegmentEndTime"],"1027":["CS","TDRType"],"1028":["CS","InternationalRouteSegment"],"1029":["LO","ThreatDetectionAlgorithmandVersion"],"102A":["SH","AssignedLocation"],"102B":["DT","AlarmDecisionTime"],"1031":["CS","AlarmDecision"],"1033":["US","NumberOfTotalObjects"],"1034":["US","NumberOfAlarmObjects"],"1037":["SQ","PTORepresentationSequence"],"1038":["SQ","ATDAssessmentSequence"],"1039":["CS","TIPType"],"103A":["CS","DICOSVersion"],"1041":["DT","OOIOwnerCreationTime"],"1042":["CS","OOIType"],"1043":["FL","OOISize"],"1044":["CS","AcquisitionStatus"],"1045":["SQ","BasisMaterialsCodeSequence"],"1046":["CS","PhantomType"],"1047":["SQ","OOIOwnerSequence"],"1048":["CS","ScanType"],"1051":["LO","ItineraryID"],"1052":["SH","ItineraryIDType"],"1053":["LO","ItineraryIDAssigningAuthority"],"1054":["SH","RouteID"],"1055":["SH","RouteIDAssigningAuthority"],"1056":["CS","InboundArrivalType"],"1058":["SH","CarrierID"],"1059":["CS","CarrierIDAssigningAuthority"],"1060":["FL","SourceOrientation"],"1061":["FL","SourcePosition"],"1062":["FL","BeltHeight"],"1064":["SQ","AlgorithmRoutingCodeSequence"],"1067":["CS","TransportClassification"],"1068":["LT","OOITypeDescriptor"],"1069":["FL","TotalProcessingTime"],"106C":["OB","DetectorCalibrationData"]}};daikon.Dictionary.getVR=function(e,d){var a,c,b;b=daikon.Dictionary.dict[daikon.Utils.dec2hex(e)];if(b){c=b[daikon.Utils.dec2hex(d)];if(c){a=c[0]}}if(!a){b=daikon.Dictionary.dictPrivate[daikon.Utils.dec2hex(e)];if(b){c=b[daikon.Utils.dec2hex(d)];if(c){a=c[0]}}}if(!a){a="OB"}return a};daikon.Dictionary.getDescription=function(e,c){var d,b,a;a=daikon.Dictionary.dict[daikon.Utils.dec2hex(e)];if(a){b=a[daikon.Utils.dec2hex(c)];if(b){d=b[1]}}if(!d){a=daikon.Dictionary.dictPrivate[daikon.Utils.dec2hex(e)];if(a){b=a[daikon.Utils.dec2hex(c)];if(b){d=b[1]}}}if(!d){d="PrivateData"}return d};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Dictionary}"use strict";var daikon=daikon||{};daikon.Tag=daikon.Tag||((typeof require!=="undefined")?require("./tag.js"):null);daikon.Parser=daikon.Parser||((typeof require!=="undefined")?require("./parser.js"):null);daikon.Image=daikon.Image||function(){this.tags={};this.littleEndian=false;this.index=-1};daikon.Image.SLICE_DIRECTION_UNKNOWN=-1;daikon.Image.SLICE_DIRECTION_AXIAL=2;daikon.Image.SLICE_DIRECTION_CORONAL=1;daikon.Image.SLICE_DIRECTION_SAGITTAL=0;daikon.Image.SLICE_DIRECTION_OBLIQUE=3;daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE=0.8;daikon.Image.BYTE_TYPE_UNKNOWN=0;daikon.Image.BYTE_TYPE_BINARY=1;daikon.Image.BYTE_TYPE_INTEGER=2;daikon.Image.BYTE_TYPE_INTEGER_UNSIGNED=3;daikon.Image.BYTE_TYPE_FLOAT=4;daikon.Image.BYTE_TYPE_COMPLEX=5;daikon.Image.BYTE_TYPE_RGB=6;daikon.Image.getSingleValueSafely=function(a,b){if(a&&a.value){return a.value[b]}return null};daikon.Image.getValueSafely=function(a){if(a){return a.value}return null};daikon.Image.getMajorAxisFromPatientRelativeDirectionCosine=function(i,f,e){var d,j,h,g,c,b,a;j=(i<0)?"R":"L";h=(f<0)?"A":"P";g=(e<0)?"F":"H";c=Math.abs(i);b=Math.abs(f);a=Math.abs(e);if((c>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE)&&(c>b)&&(c>a)){d=j}else{if((b>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE)&&(b>c)&&(b>a)){d=h}else{if((a>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE)&&(a>c)&&(a>b)){d=g}else{d=null}}}return d};daikon.Image.prototype.getCols=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_COLS[0],daikon.Tag.TAG_COLS[1]),0)};daikon.Image.prototype.getRows=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ROWS[0],daikon.Tag.TAG_ROWS[1]),0)};daikon.Image.prototype.getSeriesDescription=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_DESCRIPTION[0],daikon.Tag.TAG_SERIES_DESCRIPTION[1]),0)};daikon.Image.prototype.getSeriesInstanceUID=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_INSTANCE_UID[0],daikon.Tag.TAG_SERIES_INSTANCE_UID[1]),0)};daikon.Image.prototype.getSeriesNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_NUMBER[0],daikon.Tag.TAG_SERIES_NUMBER[1]),0)};daikon.Image.prototype.getEchoNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ECHO_NUMBER[0],daikon.Tag.TAG_ECHO_NUMBER[1]),0)};daikon.Image.prototype.getImagePosition=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]))};daikon.Image.prototype.getImagePositionSliceDir=function(a){var b=daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]));if(b){if(a>=0){return b[a]}}return 0};daikon.Image.prototype.getSliceLocation=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION[0],daikon.Tag.TAG_SLICE_LOCATION[1]),0)};daikon.Image.prototype.getSliceLocationVector=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION_VECTOR[0],daikon.Tag.TAG_SLICE_LOCATION_VECTOR[1]))};daikon.Image.prototype.getImageNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_NUM[0],daikon.Tag.TAG_IMAGE_NUM[1]),0)};daikon.Image.prototype.getTemporalPosition=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TEMPORAL_POSITION[0],daikon.Tag.TAG_TEMPORAL_POSITION[1]),0)};daikon.Image.prototype.getTemporalNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)};daikon.Image.prototype.getSliceGap=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_GAP[0],daikon.Tag.TAG_SLICE_GAP[1]),0)};daikon.Image.prototype.getSliceThickness=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_THICKNESS[0],daikon.Tag.TAG_SLICE_THICKNESS[1]),0)};daikon.Image.prototype.getImageMax=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MAX[0],daikon.Tag.TAG_IMAGE_MAX[1]),0)};daikon.Image.prototype.getImageMin=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MIN[0],daikon.Tag.TAG_IMAGE_MIN[1]),0)};daikon.Image.prototype.getDataScaleSlope=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_SLOPE[0],daikon.Tag.TAG_DATA_SCALE_SLOPE[1]),0)};daikon.Image.prototype.getDataScaleIntercept=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_INTERCEPT[0],daikon.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)};daikon.Image.prototype.getDataScaleElscint=function(){var b=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_ELSCINT[0],daikon.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);if(!b){b=1}var a=this.getPixelBandwidth();b=Math.sqrt(a)/(10*b);if(b<=0){b=1}return b};daikon.Image.prototype.getWindowWidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_WIDTH[0],daikon.Tag.TAG_WINDOW_WIDTH[1]),0)};daikon.Image.prototype.getWindowCenter=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_CENTER[0],daikon.Tag.TAG_WINDOW_CENTER[1]),0)};daikon.Image.prototype.getPixelBandwidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_BANDWIDTH[0],daikon.Tag.TAG_PIXEL_BANDWIDTH[1]),0)};daikon.Image.prototype.getSeriesId=function(){var e=this.getSeriesDescription();var d=this.getSeriesInstanceUID();var c=this.getSeriesNumber();var b=this.getEchoNumber();var a=this.getOrientation();var f="";if(e!==null){f+=(" "+e)}if(d!==null){f+=(" "+d)}if(c!==null){f+=(" "+c)}if(b!==null){f+=(" "+b)}if(a!==null){f+=(" "+a)}return f};daikon.Image.prototype.getPixelSpacing=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_SPACING[0],daikon.Tag.TAG_PIXEL_SPACING[1]))};daikon.Image.prototype.getImageType=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_TYPE[0],daikon.Tag.TAG_IMAGE_TYPE[1]))};daikon.Image.prototype.getBitsStored=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_STORED[0],daikon.Tag.TAG_BITS_STORED[1]),0)};daikon.Image.prototype.getBitsAllocated=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_ALLOCATED[0],daikon.Tag.TAG_BITS_ALLOCATED[1]),0)};daikon.Image.prototype.getFrameTime=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_FRAME_TIME[0],daikon.Tag.TAG_FRAME_TIME[1]),0)};daikon.Image.prototype.getAcquisitionMatrix=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ACQUISITION_MATRIX[0],daikon.Tag.TAG_ACQUISITION_MATRIX[1]),0)};daikon.Image.prototype.getTR=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TR,daikon.Tag.TAG_TR[1]),0)};daikon.Image.prototype.putTag=function(a){this.tags[a.id]=a};daikon.Image.prototype.getTag=function(b,a){return this.tags[daikon.Tag.createId(b,a)]};daikon.Image.prototype.getPixelData=function(){return this.tags[daikon.Tag.createId(daikon.Tag.TAG_PIXEL_DATA[0],daikon.Tag.TAG_PIXEL_DATA[1])]};daikon.Image.prototype.hasPixelData=function(){return(this.tags[daikon.Tag.createId(daikon.Tag.TAG_PIXEL_DATA[0],daikon.Tag.TAG_PIXEL_DATA[1])]!==undefined)};daikon.Image.prototype.clearPixelData=function(){this.tags[daikon.Tag.createId(daikon.Tag.TAG_PIXEL_DATA[0],daikon.Tag.TAG_PIXEL_DATA[1])].value=null};daikon.Image.prototype.getOrientation=function(){var b=null,j=daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_ORIENTATION[0],daikon.Tag.TAG_IMAGE_ORIENTATION[1])),d,h,i,c,a=0,f=0,e=0,g="";if(!j||(j.length!==6)){return null}h=this.getPixelSpacing();if(!h){return null}i=h[0];c=true;for(d=0;d<3;d+=1){if(Math.abs(j[d])>e){e=Math.abs(j[d]);a=d}}e=0;for(;d<6;d+=1){if(Math.abs(j[d])>e){e=Math.abs(j[d]);f=d}}switch(a){case 0:g+=("X");if(f===4){g+=("YZ")}else{g+=("ZY")}break;case 1:g+=("Y");if(f===3){g+=("XZ")}else{g+=("ZX")}break;case 2:g+=("Z");if(f===3){g+=("XY")}else{g+=("YX")}break;default:break}switch(a){case 0:if(j[a]>0){g+=("-")}else{g+=("+")}if(f===4){if(j[f]>0){g+=("-")}else{g+=("+")}}else{if(j[f]>0){g+=("+")}else{g+=("-")}}break;case 1:if(j[a]>0){g+=("-")}else{g+=("+")}if(f===3){if(j[f]>0){g+=("-")}else{g+=("+")}}else{if(j[f]>0){g+=("+")}else{g+=("-")}}break;case 2:if(j[a]>0){g+=("+")}else{g+=("-")}if(j[f]>0){g+=("-")}else{g+=("+")}break;default:break}if(i===0){g+=("+");b=g}else{if(c){switch(g.charAt(2)){case"X":if(i>0){g+=("-")}else{g+=("+")}break;case"Y":case"Z":if(i>0){g+=("+")}else{g+=("-")}break;default:break}}else{switch(g.charAt(2)){case"X":if(i>0){g+=("+")}else{g+=("-")}break;case"Y":case"Z":if(i>0){g+=("-")}else{g+=("+")}break;default:break}}b=g}return b};daikon.Image.prototype.isMosaic=function(){var e,c=false,a,b,d;e=this.getImageType();if(e!==null){for(b=0;b<e.length;b+=1){if(e[b].toUpperCase().indexOf("MOSAIC")!==-1){c=true;break}}}d=this.getAcquisitionMatrix();a=(d>0)&&((d<this.getRows())||(d<this.getCols()));return c&&a};daikon.Image.prototype.getMosaicCols=function(){return this.getCols()/this.getAcquisitionMatrix()};daikon.Image.prototype.getMosaicRows=function(){return this.getRows()/this.getAcquisitionMatrix()};daikon.Image.prototype.isElscint=function(){var a=this.getDataScaleElscint();return((a!==null)&&(a!==0))};daikon.Image.prototype.isCompressed=function(){var a=this.getTransferSyntax();if(a){if(a.indexOf(daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG)!==-1){return true}else{if(a.indexOf(daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE)!==-1){return true}}}return false};daikon.Image.prototype.getNumberOfFrames=function(){var a=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_NUMBER_OF_FRAMES[0],daikon.Tag.TAG_NUMBER_OF_FRAMES[1]),0);if(a!==null){return a}return 1};daikon.Image.prototype.getNumberOfImplicitFrames=function(){var b,c,a;b=this.getPixelData();c=b.offsetEnd-b.offsetValue;a=this.getCols()*this.getRows()*(parseInt(this.getBitsAllocated()/8));return parseInt(c/a)};daikon.Image.prototype.getPixelRepresentation=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_REPRESENTATION[0],daikon.Tag.TAG_PIXEL_REPRESENTATION[1]),0)};daikon.Image.prototype.getPhotometricInterpretation=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PHOTOMETRIC_INTERPRETATION[0],daikon.Tag.TAG_PHOTOMETRIC_INTERPRETATION[1]),0)};daikon.Image.prototype.getPatientName=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PATIENT_NAME[0],daikon.Tag.TAG_PATIENT_NAME[1]),0)};daikon.Image.prototype.getPatientID=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PATIENT_ID[0],daikon.Tag.TAG_PATIENT_ID[1]),0)};daikon.Image.prototype.getStudyTime=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_STUDY_TIME[0],daikon.Tag.TAG_STUDY_TIME[1]),0)};daikon.Image.prototype.getTransferSyntax=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TRANSFER_SYNTAX[0],daikon.Tag.TAG_TRANSFER_SYNTAX[1]),0)};daikon.Image.prototype.getStudyDate=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_STUDY_DATE[0],daikon.Tag.TAG_STUDY_DATE[1]),0)};daikon.Image.prototype.getImageDescription=function(){var b,a="";b=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_STUDY_DES[0],daikon.Tag.TAG_STUDY_DES[1]),0);if(b!==null){a+=(" "+b)}b=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_DESCRIPTION[0],daikon.Tag.TAG_SERIES_DESCRIPTION[1]),0);if(b!==null){a+=(" "+b)}b=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_COMMENTS[0],daikon.Tag.TAG_IMAGE_COMMENTS[1]),0);if(b!==null){a+=(" "+b)}return a.trim()};daikon.Image.prototype.getDataType=function(){var b,a;a=this.getPixelRepresentation();if(a===null){return daikon.Image.BYTE_TYPE_UNKNOWN}b=this.getPhotometricInterpretation();if(b!==null){if(b.trim()==="RGB"){return daikon.Image.BYTE_TYPE_RGB}}if(a===0){return daikon.Image.BYTE_TYPE_INTEGER_UNSIGNED}else{if(a===1){return daikon.Image.BYTE_TYPE_INTEGER}else{return daikon.Image.BYTE_TYPE_UNKNOWN}}};daikon.Image.prototype.getAcquiredSliceDirection=function(){var c,b,d,a;c=daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_ORIENTATION[0],daikon.Tag.TAG_IMAGE_ORIENTATION[1]));if(!c||(c.length!==6)){return daikon.Image.SLICE_DIRECTION_UNKNOWN}b=daikon.Image.getMajorAxisFromPatientRelativeDirectionCosine(c[0],c[1],c[2]);d=daikon.Image.getMajorAxisFromPatientRelativeDirectionCosine(c[3],c[4],c[5]);if((b!==null)&&(d!==null)){if(((b==="R")||(b==="L"))&&((d==="A")||(d==="P"))){a=daikon.Image.SLICE_DIRECTION_AXIAL}else{if(((d==="R")||(d==="L"))&&((b==="A")||(b==="P"))){a=daikon.Image.SLICE_DIRECTION_AXIAL}else{if(((b==="R")||(b==="L"))&&((d==="H")||(d==="F"))){a=daikon.Image.SLICE_DIRECTION_CORONAL}else{if(((d==="R")||(d==="L"))&&((b==="H")||(b==="F"))){a=daikon.Image.SLICE_DIRECTION_CORONAL}else{if(((b==="A")||(b==="P"))&&((d==="H")||(d==="F"))){a=daikon.Image.SLICE_DIRECTION_SAGITTAL}else{if(((d==="A")||(d==="P"))&&((b==="H")||(b==="F"))){a=daikon.Image.SLICE_DIRECTION_SAGITTAL}}}}}}}else{a=daikon.Image.SLICE_DIRECTION_OBLIQUE}return a};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Image}"use strict";var daikon=daikon||{};daikon.OrderedMap=daikon.OrderedMap||((typeof require!=="undefined")?require("./orderedmap.js"):null);daikon.OrderedMapIterator=daikon.OrderedMapIterator||function(a){this.orderedMap=a;this.index=0};daikon.OrderedMapIterator.prototype.hasNext=function(){return(this.index<this.orderedMap.orderedKeys.length)};daikon.OrderedMapIterator.prototype.next=function(){var a=this.orderedMap.get(this.orderedMap.orderedKeys[this.index]);this.index+=1;return a};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.OrderedMapIterator}"use strict";var daikon=daikon||{};daikon.OrderedMapIterator=daikon.OrderedMapIterator||((typeof require!=="undefined")?require("./iterator.js"):null);daikon.OrderedMap=daikon.OrderedMap||function(){this.map={};this.orderedKeys=[]};daikon.OrderedMap.prototype.put=function(a,b){if(a in this.map){this.map[a]=b}else{this.orderedKeys.push(a);this.orderedKeys.sort(function(d,c){return parseFloat(d)-parseFloat(c)});this.map[a]=b}};daikon.OrderedMap.prototype.remove=function(b){var a=this.orderedKeys.indexOf(b);if(a===-1){throw new Error("key does not exist")}this.orderedKeys.splice(a,1);delete this.map[b]};daikon.OrderedMap.prototype.get=function(a){if(a in this.map){return this.map[a]}return null};daikon.OrderedMap.prototype.iterator=function(){return new daikon.OrderedMapIterator(this)};daikon.OrderedMap.prototype.getOrderedValues=function(){var b=[],a=this.iterator();while(a.hasNext()){b.push(a.next())}return b};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.OrderedMap}"use strict";var daikon=daikon||{};daikon.Tag=daikon.Tag||((typeof require!=="undefined")?require("./tag.js"):null);daikon.Utils=daikon.Utils||((typeof require!=="undefined")?require("./utilities.js"):null);daikon.Dictionary=daikon.Dictionary||((typeof require!=="undefined")?require("./dictionary.js"):null);daikon.Image=daikon.Image||((typeof require!=="undefined")?require("./image.js"):null);daikon.Parser=daikon.Parser||function(){this.littleEndian=true;this.explicit=true;this.metaFound=false;this.metaFinished=false;this.metaFinishedOffset=-1;this.error=null};daikon.Parser.verbose=false;daikon.Parser.MAGIC_COOKIE_OFFSET=128;daikon.Parser.MAGIC_COOKIE=[68,73,67,77];daikon.Parser.VRS=["AE","AS","AT","CS","DA","DS","DT","FL","FD","IS","LO","LT","OB","OD","OF","OW","PN","SH","SL","SS","ST","TM","UI","UL","UN","US","UT"];daikon.Parser.DATA_VRS=["OB","OW","OF","SQ","UT","UN"];daikon.Parser.RAW_DATA_VRS=["OB","OD","OF","OW","UN"];daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE="1.2.840.10008.1.2";daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE="1.2.840.10008.1.2.1";daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG="1.2.840.10008.1.2.2";daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG="1.2.840.10008.1.2.4";daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE="1.2.840.10008.1.2.5";daikon.Parser.UNDEFINED_LENGTH=4294967295;daikon.Parser.isMagicCookieFound=function(c){var d=daikon.Parser.MAGIC_COOKIE_OFFSET,a=daikon.Parser.MAGIC_COOKIE.length,b;for(b=0;b<a;b+=1){if(c.getUint8(d+b)!==daikon.Parser.MAGIC_COOKIE[b]){return false}}return true};daikon.Parser.prototype.parse=function(c){var d=null,e,a;try{d=new daikon.Image();e=this.findFirstTagOffset(c);a=this.getNextTag(c,e);while(a!==null){if(daikon.Parser.verbose){console.log(a.toString())}d.putTag(a);if(a.isPixelData()){break}a=this.getNextTag(c,a.offsetEnd)}}catch(b){this.error=b}if(d!==null){d.littleEndian=this.littleEndian}return d};daikon.Parser.prototype.testForValidTag=function(c){var d,a=null;try{d=this.findFirstTagOffset(c);a=this.getNextTag(c,d,true)}catch(b){this.error=b}return a};daikon.Parser.prototype.getNextTag=function(d,c,g){var i=0,e,h=null,f=c,b,a=0,l=true,k=null,j;if(c>=d.byteLength){return null}if(this.metaFinished){l=this.littleEndian;i=d.getUint16(c,l)}else{i=d.getUint16(c,true);if(((this.metaFinishedOffset!==-1)&&(c>=this.metaFinishedOffset))||(i!==2)){this.metaFinished=true;l=this.littleEndian;i=d.getUint16(c,l)}else{l=true}}if(!this.metaFound&&(i===2)){this.metaFound=true}c+=2;e=d.getUint16(c,true);c+=2;if(this.explicit||!this.metaFinished){k=daikon.Utils.getStringAt(d,c,2);if(!this.metaFound&&this.metaFinished&&(daikon.Parser.VRS.indexOf(k)===-1)){k=daikon.Dictionary.getVR(i,e);a=d.getUint32(c,l);c+=4;this.explicit=false}else{c+=2;if(daikon.Parser.DATA_VRS.indexOf(k)!==-1){c+=2;a=d.getUint32(c,l);c+=4}else{a=d.getUint16(c,l);c+=2}}}else{k=daikon.Dictionary.getVR(i,e);a=d.getUint32(c,l);if(a===daikon.Parser.UNDEFINED_LENGTH){k="SQ"}c+=4}b=c;if(k==="SQ"){h=this.parseSublist(d,c,a);if(a===daikon.Parser.UNDEFINED_LENGTH){a=h[h.length-1].offsetEnd-c}}else{if((a>0)&&!g){h=d.buffer.slice(c,c+a)}}c+=a;j=new daikon.Tag(i,e,k,h,f,b,c,this.littleEndian);if(j.isTransformSyntax()){if(j.value[0]===daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE){this.explicit=false;this.littleEndian=true}else{if(j.value[0]===daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE){this.explicit=true;this.littleEndian=true}else{if(j.value[0]===daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG){this.explicit=true;this.littleEndian=false}}}}else{if(j.isMetaLength()){this.metaFinishedOffset=j.value[0]+c}}return j};daikon.Parser.prototype.parseSublist=function(d,f,c){var a,e=f+c,b=[];if(c===daikon.Parser.UNDEFINED_LENGTH){a=this.parseSublistItem(d,f);while(!a.isSequenceDelim()){b.push(a);f=a.offsetEnd;a=this.parseSublistItem(d,f)}b.push(a)}else{while(f<e){a=this.parseSublistItem(d,f);b.push(a);f=a.offsetEnd}}return b};daikon.Parser.prototype.parseSublistItem=function(e,d){var i,f,b,h,k,g=d,c,a,j=[];i=e.getUint16(d,this.littleEndian);d+=2;f=e.getUint16(d,this.littleEndian);d+=2;b=e.getUint32(d,this.littleEndian);d+=4;c=d;if(b===daikon.Parser.UNDEFINED_LENGTH){k=this.getNextTag(e,d);while(!k.isSublistItemDelim()){j.push(k);d=k.offsetEnd;k=this.getNextTag(e,d)}j.push(k);d=k.offsetEnd}else{h=d+b;while(d<h){k=this.getNextTag(e,d);j.push(k);d=k.offsetEnd}}a=new daikon.Tag(i,f,null,j,g,c,d,this.littleEndian);return a};daikon.Parser.prototype.findFirstTagOffset=function(g){var h=0,b=daikon.Parser.MAGIC_COOKIE.length,d=daikon.Parser.MAGIC_COOKIE_OFFSET*2,f=false,e=0,a=0,c=0;if(daikon.Parser.isMagicCookieFound(g)){h=daikon.Parser.MAGIC_COOKIE_OFFSET+b}else{for(e=0;e<d;e+=1){c=g.getUint8(h);if(c===daikon.Parser.MAGIC_COOKIE[0]){f=true;for(a=1;a<b;a+=1){if(g.getUint8(e+a)!==daikon.Parser.MAGIC_COOKIE[a]){f=false}}if(f){h=e;break}}}}return h};daikon.Parser.prototype.hasError=function(){return(this.error!==null)};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Parser}"use strict";var daikon=daikon||{};daikon.Parser=daikon.Parser||((typeof require!=="undefined")?require("./parser.js"):null);daikon.Image=daikon.Image||((typeof require!=="undefined")?require("./image.js"):null);daikon.OrderedMap=daikon.OrderedMap||((typeof require!=="undefined")?require("./orderedmap.js"):null);daikon.OrderedMapIterator=daikon.OrderedMapIterator||((typeof require!=="undefined")?require("./iterator.js"):null);daikon.Utils=daikon.Utils||((typeof require!=="undefined")?require("./utilities.js"):null);daikon.Series=daikon.Series||function(){this.images=[];this.imagesOriginalOrder=null;this.isMosaic=false;this.isElscint=false;this.isCompressed=false;this.numberOfFrames=0;this.numberOfFramesInFile=0;this.isMultiFrame=false;this.isMultiFrameVolume=false;this.isMultiFrameTimeseries=false;this.isImplicitTimeseries=false;this.sliceSense=false;this.sliceDir=daikon.Image.SLICE_DIRECTION_UNKNOWN;this.error=null};daikon.Series.parserError=null;daikon.Series.parseImage=function(a){var c,b;c=new daikon.Parser();b=c.parse(a);if(c.hasError()){daikon.Series.parserError=c.error;return null}return b};daikon.Series.getMosaicOffset=function(f,d,j,g,b,i,c){var e,a,h;e=b;a=i;h=c;e=((h%f)*d)+e;a=(((parseInt(h/f))*j)+a)*g;return(e+a)};daikon.Series.orderDicoms=function(k,g,h){var c,j,a,e,i,b,m,l,d,f;c=(k[0].getImagePosition()!==null);j=(k[0].getSliceLocation()!==null);a=(k[0].getImageNumber()!==null);e=daikon.Series.orderByTime(k,g,h,c,j);i=e.orderedKeys;f=[];for(b=0;b<i.length;b+=1){l=e.get(i[b]);if(c){d=daikon.Series.orderByImagePosition(l,h)}else{if(j){d=daikon.Series.orderBySliceLocation(l)}else{if(a){d=daikon.Series.orderByImageNumber(l)}else{d=l}}}for(m=0;m<d.length;m+=1){f.push(d[m])}}for(m=0;m<f.length;m+=1){f[m].index=m}return f};daikon.Series.orderByImagePosition=function(a,d){var c,b;c=new daikon.OrderedMap();for(b=0;b<a.length;b+=1){c.put(a[b].getImagePositionSliceDir(d),a[b])}return c.getOrderedValues()};daikon.Series.orderBySliceLocation=function(a){var c,b;c=new daikon.OrderedMap();for(b=0;b<a.length;b+=1){c.put(a[b].getSliceLocation(),a[b])}return c.getOrderedValues()};daikon.Series.orderByImageNumber=function(a){var c,b;c=new daikon.OrderedMap();for(b=0;b<a.length;b+=1){c.put(a[b].getImageNumber(),a[b])}return c.getOrderedValues()};daikon.Series.hasMatchingSlice=function(j,c,f,e,g){var h=0,b,i,d,k,a;if(e){h=c.getImagePositionSliceDir(f)}else{if(g){h=c.getSliceLocation()}else{h=c.getImageNumber()}}for(b=0;b<j.length;b+=1){i=j[b];if(e){d=i.getImagePositionSliceDir(f);if(d===h){return true}}else{if(g){k=i.getSliceLocation();if(k===h){return true}}else{a=i.getImageNumber();if(a===h){return true}}}}return false};daikon.Series.orderByTime=function(h,n,q,d,b){var a,u,v,o,l,e,p,s,w,r,m,g,i,k,j,f,c;a=new daikon.OrderedMap();u=(n>1)&&(h[0].getTemporalPosition()!==null);v=(n>1)&&(h[0].getTemporalNumber()!==null)&&(h[0].getTemporalNumber()===n);if(u&&v){for(o=0;o<h.length;o+=1){l=h[o];e=l.getTemporalPosition();p=a.get(e);if(!p){p=[];a.put(e,p)}p.push(l)}}else{s=new daikon.OrderedMap();for(o=0;o<h.length;o+=1){if(h[o]!==null){w=h[o].getImageNumber();r=o;if(d){r=h[o].getImagePositionSliceDir(q)}else{if(b){r=h[o].getSliceLocation()}}m=s.get(r);if(m===null){m=new daikon.OrderedMap();s.put(r,m)}m.put(w,h[o])}}g=[];i=0;k=s.iterator();while(k.hasNext()){m=k.next();j=m.iterator();while(j.hasNext()){g[i]=j.next();i+=1}}for(o=0;o<g.length;o+=1){if(g[o]!==null){f=null;c=a.iterator();while(c.hasNext()){p=c.next();if(!daikon.Series.hasMatchingSlice(p,g[o],q,d,b)){f=p;break}}if(f===null){f=[];a.put(a.orderedKeys.length,f)}f.push(g[o])}}}return a};daikon.Series.prototype.getOrder=function(){var b,a=[];for(b=0;b<this.imagesOriginalOrder.length;b+=1){a[b]=this.imagesOriginalOrder[b].index}return a};daikon.Series.prototype.toString=function(){return this.images[0].getSeriesId()};daikon.Series.prototype.getName=function(){var b=this.images[0].getSeriesDescription();var a=this.images[0].getSeriesInstanceUID();if(b!==null){return b}if(a!==null){return a}return null};daikon.Series.prototype.addImage=function(a){this.images.push(a)};daikon.Series.prototype.matchesSeries=function(a){if(this.images.length===0){return true}return(this.images[0].getSeriesId()===a.getSeriesId())};daikon.Series.prototype.buildSeries=function(){var e,b,i,g,h,f,c,j,a,d;this.isMosaic=this.images[0].isMosaic();this.isElscint=this.images[0].isElscint();this.isCompressed=this.images[0].isCompressed();this.numberOfFrames=this.images[0].getNumberOfFrames();this.numberOfFramesInFile=this.images[0].getNumberOfImplicitFrames();this.isMultiFrame=(this.numberOfFrames>1)||(this.isMosaic&&(this.images[0].length>1));this.isMultiFrameVolume=false;this.isMultiFrameTimeseries=false;this.isImplicitTimeseries=false;if(this.isMultiFrame){e=(this.images[0].getFrameTime()>0);if(this.isMosaic){this.isMultiFrameTimeseries=true}else{if(e){this.isMultiFrameTimeseries=true}else{if(this.numberOfFramesInFile>1){this.isMultiFrameTimeseries=true;this.numberOfFrames=this.images.length}else{this.isMultiFrameVolume=true}}}}if(!this.isMosaic&&(this.numberOfFrames<=1)){d=(this.images[0].getImagePosition()||[]);i=d.toString();this.numberOfFrames=0;for(b=0;b<this.images.length;b+=1){d=(this.images[b].getImagePosition()||[]);if(d.toString()===i){this.numberOfFrames+=1}}if(this.numberOfFrames>1){this.isImplicitTimeseries=true}}this.sliceDir=this.images[0].getAcquiredSliceDirection();g=daikon.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir);h=g[0].getImagePositionSliceDir(this.sliceDir);f=g[g.length-1].getImagePositionSliceDir(this.sliceDir);c=f-h;if(this.isMosaic){this.sliceSense=true}else{if(this.isMultiFrame){j=g[0].getSliceLocationVector();if(j!==null){a=g[0].getOrientation();if(a.charAt(2)==="Z"){this.sliceSense=(j[0]-j[j.length-1])<0}else{this.sliceSense=(j[0]-j[j.length-1])>0}}else{this.sliceSense=h<0?false:true}}else{if((this.sliceDir===daikon.Image.SLICE_DIRECTION_SAGITTAL)||(this.sliceDir===daikon.Image.SLICE_DIRECTION_CORONAL)){if(c>0){this.sliceSense=false}else{this.sliceSense=true}}else{if(c>0){this.sliceSense=true}else{this.sliceSense=false}}}}this.imagesOriginalOrder=this.images;this.images=g};daikon.Series.prototype.concatenateImageData=function(b,c){var a;if(this.isMosaic){a=this.getMosaicData(this.images[0],this.images[0].getPixelData().value.buffer);this.images[0].clearPixelData()}else{a=this.images[0].getPixelData().value.buffer;this.images[0].clearPixelData()}setTimeout(this.concatenateNextImageData(a,b,1,c),0)};daikon.Series.prototype.concatenateNextImageData=function(a,c,b,d){if(b>=this.images.length){if(c){c.drawProgress(1,"Reading DICOM Images")}d(a)}else{if(c){c.drawProgress(b/this.images.length,"Reading DICOM Images")}if(this.isMosaic){a=daikon.Utils.concatArrayBuffers(a,this.getMosaicData(this.images[b],this.images[b].getPixelData().value.buffer));this.images[b].clearPixelData()}else{a=daikon.Utils.concatArrayBuffers(a,this.images[b].getPixelData().value.buffer);this.images[b].clearPixelData()}setTimeout(daikon.Utils.bind(this,function(){this.concatenateNextImageData(a,c,b+1,d)}),0)}};daikon.Series.prototype.getMosaicData=function(j,s){var o,m,l,n,a,q,i,r,u,e,g,b,c,k,h,d,p,f=0;i=parseInt(this.images[0].getBitsAllocated()/8);g=this.images[0].getMosaicCols()*this.images[0].getMosaicRows();b=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows());c=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols());o=this.images[0].getCols();m=this.images[0].getRows();l=this.images[0].getMosaicRows();n=this.images[0].getMosaicCols();a=parseInt(m/l);q=parseInt(o/n);k=new Uint8Array(new ArrayBuffer(g*b*c*i));h=new Uint8Array(s);for(r=0;r<g;r+=1){for(u=0;u<b;u+=1){for(e=0;e<c;e+=1){d=daikon.Series.getMosaicOffset(n,q,a,o,e,u,r);for(p=0;p<i;p+=1){k[f]=h[(d*i)+p];f+=1}}}}return k.buffer};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Series}"use strict";var daikon=daikon||{};daikon.Utils=daikon.Utils||((typeof require!=="undefined")?require("./utilities.js"):null);daikon.Dictionary=daikon.Dictionary||((typeof require!=="undefined")?require("./dictionary.js"):null);daikon.Tag=daikon.Tag||function(f,b,a,d,h,c,g,e){this.group=f;this.element=b;this.vr=a;this.offsetStart=h;this.offsetValue=c;this.offsetEnd=g;this.sublist=false;this.id=daikon.Tag.createId(f,b);if(d instanceof Array){this.value=d;this.sublist=true}else{if(d!==null){this.value=daikon.Tag.convertValue(a,new DataView(d),e)}else{this.value=null}}};daikon.Tag.VR_AE_MAX_LENGTH=16;daikon.Tag.VR_AS_MAX_LENGTH=4;daikon.Tag.VR_AT_MAX_LENGTH=4;daikon.Tag.VR_CS_MAX_LENGTH=16;daikon.Tag.VR_DA_MAX_LENGTH=8;daikon.Tag.VR_DS_MAX_LENGTH=16;daikon.Tag.VR_DT_MAX_LENGTH=26;daikon.Tag.VR_FL_MAX_LENGTH=4;daikon.Tag.VR_FD_MAX_LENGTH=8;daikon.Tag.VR_IS_MAX_LENGTH=12;daikon.Tag.VR_LO_MAX_LENGTH=64;daikon.Tag.VR_LT_MAX_LENGTH=10240;daikon.Tag.VR_OB_MAX_LENGTH=-1;daikon.Tag.VR_OD_MAX_LENGTH=-1;daikon.Tag.VR_OF_MAX_LENGTH=-1;daikon.Tag.VR_OW_MAX_LENGTH=-1;daikon.Tag.VR_PN_MAX_LENGTH=64*5;daikon.Tag.VR_SH_MAX_LENGTH=16;daikon.Tag.VR_SL_MAX_LENGTH=4;daikon.Tag.VR_SS_MAX_LENGTH=2;daikon.Tag.VR_ST_MAX_LENGTH=1024;daikon.Tag.VR_TM_MAX_LENGTH=16;daikon.Tag.VR_UI_MAX_LENGTH=64;daikon.Tag.VR_UL_MAX_LENGTH=4;daikon.Tag.VR_UN_MAX_LENGTH=-1;daikon.Tag.VR_US_MAX_LENGTH=2;daikon.Tag.VR_UT_MAX_LENGTH=-1;daikon.Tag.TAG_TRANSFER_SYNTAX=[2,16];daikon.Tag.TAG_META_LENGTH=[2,0];daikon.Tag.TAG_SUBLIST_ITEM=[65534,57344];daikon.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357];daikon.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565];daikon.Tag.TAG_ROWS=[40,16];daikon.Tag.TAG_COLS=[40,17];daikon.Tag.TAG_ACQUISITION_MATRIX=[24,4880];daikon.Tag.TAG_NUMBER_OF_FRAMES=[40,8];daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261];daikon.Tag.TAG_PIXEL_SPACING=[40,48];daikon.Tag.TAG_SLICE_THICKNESS=[24,80];daikon.Tag.TAG_SLICE_GAP=[24,136];daikon.Tag.TAG_TR=[24,128];daikon.Tag.TAG_FRAME_TIME=[24,4195];daikon.Tag.TAG_BITS_ALLOCATED=[40,256];daikon.Tag.TAG_BITS_STORED=[40,257];daikon.Tag.TAG_PIXEL_REPRESENTATION=[40,259];daikon.Tag.TAG_HIGH_BIT=[40,258];daikon.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4];daikon.Tag.TAG_SAMPLES_PER_PIXEL=[40,2];daikon.Tag.TAG_DATA_SCALE_SLOPE=[40,4179];daikon.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178];daikon.Tag.TAG_DATA_SCALE_ELSCINT=[519,4127];daikon.Tag.TAG_PIXEL_BANDWIDTH=[24,149];daikon.Tag.TAG_IMAGE_MIN=[40,262];daikon.Tag.TAG_IMAGE_MAX=[40,263];daikon.Tag.TAG_WINDOW_CENTER=[40,4176];daikon.Tag.TAG_WINDOW_WIDTH=[40,4177];daikon.Tag.TAG_PATIENT_NAME=[16,16];daikon.Tag.TAG_PATIENT_ID=[16,32];daikon.Tag.TAG_STUDY_DATE=[8,32];daikon.Tag.TAG_STUDY_TIME=[8,48];daikon.Tag.TAG_STUDY_DES=[8,4144];daikon.Tag.TAG_IMAGE_TYPE=[8,8];daikon.Tag.TAG_IMAGE_COMMENTS=[32,16384];daikon.Tag.TAG_SEQUENCE_NAME=[24,36];daikon.Tag.TAG_MODALITY=[8,96];daikon.Tag.TAG_FRAME_OF_REF_UID=[32,82];daikon.Tag.TAG_STUDY_UID=[32,13];daikon.Tag.TAG_SERIES_DESCRIPTION=[8,4158];daikon.Tag.TAG_SERIES_INSTANCE_UID=[32,14];daikon.Tag.TAG_SERIES_NUMBER=[32,17];daikon.Tag.TAG_ECHO_NUMBER=[24,134];daikon.Tag.TAG_TEMPORAL_POSITION=[32,256];daikon.Tag.TAG_IMAGE_NUM=[32,19];daikon.Tag.TAG_SLICE_LOCATION=[32,4161];daikon.Tag.TAG_IMAGE_ORIENTATION=[32,55];daikon.Tag.TAG_IMAGE_POSITION=[32,50];daikon.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197];daikon.Tag.TAG_PIXEL_DATA=[32736,16];daikon.Tag.createId=function(d,b){var c=daikon.Utils.dec2hex(d),a=daikon.Utils.dec2hex(b);return c+a};daikon.Tag.getUnsignedInteger16=function(e,d){var b,c,a;c=e.byteLength/2;b=[];for(a=0;a<c;a+=1){b[a]=e.getUint16(a*2,d)}return b};daikon.Tag.getSignedInteger16=function(e,d){var b,c,a;c=e.byteLength/2;b=[];for(a=0;a<c;a+=1){b[a]=e.getInt16(a*2,d)}return b};daikon.Tag.getFloat32=function(e,d){var b,c,a;c=e.byteLength/4;b=[];for(a=0;a<c;a+=1){b[a]=e.getFloat32(a*4,d)}return b};daikon.Tag.getSignedInteger32=function(e,d){var b,c,a;c=e.byteLength/4;b=[];for(a=0;a<c;a+=1){b[a]=e.getInt32(a*4,d)}return b};daikon.Tag.getUnsignedInteger32=function(e,d){var b,c,a;c=e.byteLength/4;b=[];for(a=0;a<c;a+=1){b[a]=e.getUint32(a*4,d)}return b};daikon.Tag.getFloat64=function(e,d){var b,c,a;c=e.byteLength/8;b=[];for(a=0;a<c;a+=1){b[a]=e.getFloat64(a*8,d)}return b};daikon.Tag.getDoubleElscint=function(d){var c=[],a=[],b;for(b=0;b<8;b+=1){c[b]=d.getUint8(b)}a[0]=c[3];a[1]=c[2];a[2]=c[1];a[3]=c[0];a[4]=c[7];a[5]=c[6];a[6]=c[5];a[7]=c[4];c=[daikon.Utils.bytesToDouble(a)];return c};daikon.Tag.getFixedLengthStringValue=function(e,a){var c,d,b;d=Math.floor(e.byteLength/a);c=[];for(b=0;b<d;b+=1){c[b]=daikon.Utils.getStringAt(e,b*a,a)}return c};daikon.Tag.getStringValue=function(c){var b=daikon.Utils.getStringAt(c,0,c.byteLength).split("\\"),a;for(a=0;a<b.length;a+=1){b[a]=daikon.Utils.trim(b[a])}return b};daikon.Tag.getDateStringValue=function(f){var b=(daikon.Tag.getSingleStringValue(f)[0].indexOf(".")!==-1),a=daikon.Tag.getFixedLengthStringValue(f,b?10:daikon.Tag.VR_DA_MAX_LENGTH),e=null,d=[],c;for(c=0;c<a.length;c+=1){if(b){e=a[c].split(".");d[c]=new Date(daikon.Utils.safeParseInt(e[0]),daikon.Utils.safeParseInt(e[1])-1,daikon.Utils.safeParseInt(e[2]))}else{if(a[c].length===8){d[c]=new Date(daikon.Utils.safeParseInt(a[c].substring(0,4)),daikon.Utils.safeParseInt(a[c].substring(4,6))-1,daikon.Utils.safeParseInt(a[c].substring(6,8)))}else{d[c]=Date.parse(a[c])}}}return d};daikon.Tag.getDateTimeStringValue=function(a){var f=daikon.Tag.getStringValue(a),e=[],b,h=null,g=null,c=null,i=null,d=null,j=null;for(b=0;b<f.length;b+=1){if(f[b].length>=4){h=parseInt(f[b].substring(0,4),10);if(f[b].length>=6){g=daikon.Utils.safeParseInt(f[b].substring(4,6))-1}if(f[b].length>=8){c=daikon.Utils.safeParseInt(f[b].substring(6,8))}if(f[b].length>=10){i=daikon.Utils.safeParseInt(f[b].substring(8,10))}if(f[b].length>=12){d=daikon.Utils.safeParseInt(f[b].substring(10,12))}if(f[b].length>=14){j=daikon.Utils.safeParseInt(f[b].substring(12,14))}e[b]=new Date(h,g,c,i,d,j)}else{e[b]=Date.parse(f[b])}}return e};daikon.Tag.getTimeStringValue=function(h){var b=daikon.Tag.getStringValue(h),e=[],f=null,d,a=0,c=0,g=0;for(d=0;d<b.length;d+=1){if(b[d].indexOf(":")!==-1){f=b[d].split(":");a=daikon.Utils.safeParseInt(f[0]);if(f.length>1){c=daikon.Utils.safeParseInt(f[1])}if(f.length>2){g=daikon.Utils.safeParseFloat(f[2])}}else{if(b[d].length>=2){a=daikon.Utils.safeParseInt(b[d].substring(0,2))}if(b[d].length>=4){c=daikon.Utils.safeParseInt(b[d].substring(2,4))}if(b[d].length>=6){g=daikon.Utils.safeParseFloat(b[d].substring(4))}}e[d]=Math.round((a*60*60*1000)+(c*60*1000)+(g*1000))}return e};daikon.Tag.getDoubleStringValue=function(d){var a=daikon.Tag.getStringValue(d),c=[],b;for(b=0;b<a.length;b+=1){c[b]=parseFloat(a[b])}return c};daikon.Tag.getIntegerStringValue=function(d){var a=daikon.Tag.getStringValue(d),c=[],b;for(b=0;b<a.length;b+=1){c[b]=parseInt(a[b],10)}return c};daikon.Tag.getSingleStringValue=function(a){return[daikon.Utils.trim(daikon.Utils.getStringAt(a,0,a.byteLength))]};daikon.Tag.getPersonNameStringValue=function(d){var a=daikon.Tag.getStringValue(d),c=[],b;for(b=0;b<a.length;b+=1){c[b]=a[b].replace("^"," ")}return c};daikon.Tag.convertValue=function(a,d,c){var b=null;if(a==="AE"){b=daikon.Tag.getSingleStringValue(d,daikon.Tag.VR_AE_MAX_LENGTH)}else{if(a==="AS"){b=daikon.Tag.getFixedLengthStringValue(d,daikon.Tag.VR_AS_MAX_LENGTH)}else{if(a==="AT"){b=daikon.Tag.getUnsignedInteger16(d,c)}else{if(a==="CS"){b=daikon.Tag.getStringValue(d)}else{if(a==="DA"){b=daikon.Tag.getDateStringValue(d)}else{if(a==="DS"){b=daikon.Tag.getDoubleStringValue(d)}else{if(a==="DT"){b=daikon.Tag.getDateTimeStringValue(d)}else{if(a==="FL"){b=daikon.Tag.getFloat32(d,c)}else{if(a==="FD"){b=daikon.Tag.getFloat64(d,c)}else{if(a==="FE"){b=daikon.Tag.getDoubleElscint(d,c)}else{if(a==="IS"){b=daikon.Tag.getIntegerStringValue(d)}else{if(a==="LO"){b=daikon.Tag.getStringValue(d)}else{if(a==="LT"){b=daikon.Tag.getSingleStringValue(d)}else{if(a==="OB"){b=d}else{if(a==="OD"){b=d}else{if(a==="OF"){b=d}else{if(a==="OW"){b=d}else{if(a==="PN"){b=daikon.Tag.getPersonNameStringValue(d)}else{if(a==="SH"){b=daikon.Tag.getStringValue(d)}else{if(a==="SL"){b=daikon.Tag.getSignedInteger32(d,c)}else{if(a==="SQ"){b=null}else{if(a==="SS"){b=daikon.Tag.getSignedInteger16(d,c)}else{if(a==="ST"){b=daikon.Tag.getSingleStringValue(d)}else{if(a==="TM"){b=daikon.Tag.getTimeStringValue(d)}else{if(a==="UI"){b=daikon.Tag.getStringValue(d)}else{if(a==="UL"){b=daikon.Tag.getUnsignedInteger32(d,c)}else{if(a==="UN"){b=d}else{if(a==="US"){b=daikon.Tag.getUnsignedInteger16(d,c)}else{if(a==="UT"){b=daikon.Tag.getSingleStringValue(d)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return b};daikon.Tag.prototype.toString=function(h){var a="",e,d=daikon.Utils.dec2hex(this.group),b=daikon.Utils.dec2hex(this.element),g="("+d+","+b+")",c="",f;if(h===undefined){h=0}f="";for(e=0;e<h;e+=1){f+="  "}if(this.sublist){for(e=0;e<this.value.length;e+=1){a+=("\n"+(this.value[e].toString(h+1)))}}else{if(this.vr==="SQ"){a=""}else{if(this.isPixelData()){a=""}else{if(!this.value){a=""}else{a="["+this.value+"]"}}}}if(this.isSublistItem()){g="Sequence Item"}else{if(this.isSublistItemDelim()){g="Sequence Item Delimiter"}else{if(this.isSequenceDelim()){g="Sequence Delimiter"}else{if(this.isPixelData()){g="Pixel Data"}else{c=daikon.Utils.convertCamcelCaseToTitleCase(daikon.Dictionary.getDescription(this.group,this.element))}}}}return f+g+" "+c+" "+a};daikon.Tag.prototype.isTransformSyntax=function(){return(this.group===daikon.Tag.TAG_TRANSFER_SYNTAX[0])&&(this.element===daikon.Tag.TAG_TRANSFER_SYNTAX[1])};daikon.Tag.prototype.isPixelData=function(){return(this.group===daikon.Tag.TAG_PIXEL_DATA[0])&&(this.element===daikon.Tag.TAG_PIXEL_DATA[1])};daikon.Tag.prototype.isSublistItem=function(){return(this.group===daikon.Tag.TAG_SUBLIST_ITEM[0])&&(this.element===daikon.Tag.TAG_SUBLIST_ITEM[1])};daikon.Tag.prototype.isSublistItemDelim=function(){return(this.group===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[0])&&(this.element===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[1])};daikon.Tag.prototype.isSequenceDelim=function(){return(this.group===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[0])&&(this.element===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[1])};daikon.Tag.prototype.isMetaLength=function(){return(this.group===daikon.Tag.TAG_META_LENGTH[0])&&(this.element===daikon.Tag.TAG_META_LENGTH[1])};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Tag}"use strict";var daikon=daikon||{};daikon.Utils=daikon.Utils||{};daikon.Utils.dec2hex=function(a){return(a+65536).toString(16).substr(-4).toUpperCase()};daikon.Utils.getStringAt=function(a,f,c){var e="",d,b;for(d=0;d<c;d+=1){b=a.getUint8(f+d);if(b!==0){e+=String.fromCharCode(b)}}return e};daikon.Utils.trim=function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};daikon.Utils.stripLeadingZeros=function(a){return a.replace(/^[0]+/g,"")};daikon.Utils.safeParseInt=function(a){a=daikon.Utils.stripLeadingZeros(a);if(a.length>0){return parseInt(a,10)}return 0};daikon.Utils.convertCamcelCaseToTitleCase=function(b){var a=b.replace(/([A-Z][a-z])/g," $1");return daikon.Utils.trim(a.charAt(0).toUpperCase()+a.slice(1))};daikon.Utils.safeParseFloat=function(a){a=daikon.Utils.stripLeadingZeros(a);if(a.length>0){return parseFloat(a)}return 0};daikon.Utils.bytesToDouble=function(d){var a=(d[0]&1<<7)>>7;var c=(((d[0]&127)<<4)|(d[1]&(15<<4))>>4);if(c==0){return 0}if(c==2047){return(a)?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}var e=Math.pow(2,c-1023-52);var b=d[7]+d[6]*Math.pow(2,8*1)+d[5]*Math.pow(2,8*2)+d[4]*Math.pow(2,8*3)+d[3]*Math.pow(2,8*4)+d[2]*Math.pow(2,8*5)+(d[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,a)*b*e};daikon.Utils.concatArrayBuffers=function(b,a){var c=new Uint8Array(b.byteLength+a.byteLength);c.set(new Uint8Array(b),0);c.set(new Uint8Array(a),b.byteLength);return c.buffer};daikon.Utils.bind=function(d,c,b,a){if(arguments.length===2){return function(){return c.apply(d,arguments)}}var f=c,e=Array.prototype.slice;return function(){var g=b||arguments;if(a===true){g=e.call(arguments,0);g=g.concat(b)}else{if(typeof a==="number"){g=e.call(arguments,0);Ext.Array.insert(g,a,b)}}return f.apply(d||window,g)}};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports=daikon.Utils}"use strict";var numeric=(typeof exports==="undefined")?(function numeric(){}):(exports);if(typeof global!=="undefined"){global.numeric=numeric}numeric.version="1.2.6";numeric.bench=function bench(e,a){var d,c,g,b;if(typeof a==="undefined"){a=15}g=0.5;d=new Date();while(1){g*=2;for(b=g;b>3;b-=4){e();e();e();e()}while(b>0){e();b--}c=new Date();if(c-d>a){break}}for(b=g;b>3;b-=4){e();e();e();e()}while(b>0){e();b--}c=new Date();return 1000*(3*g-1)/(c-d)};numeric._myIndexOf=(function _myIndexOf(a){var c=this.length,b;for(b=0;b<c;++b){if(this[b]===a){return b}}return -1});numeric.myIndexOf=(Array.prototype.indexOf)?Array.prototype.indexOf:numeric._myIndexOf;numeric.Function=Function;numeric.precision=4;numeric.largeArray=50;numeric.prettyPrint=function prettyPrint(b){function a(e){if(e===0){return"0"}if(isNaN(e)){return"NaN"}if(e<0){return"-"+a(-e)}if(isFinite(e)){var h=Math.floor(Math.log(e)/Math.log(10));var g=e/Math.pow(10,h);var f=g.toPrecision(numeric.precision);if(parseFloat(f)===10){h++;g=1;f=g.toPrecision(numeric.precision)}return parseFloat(f).toString()+"e"+h.toString()}return"Infinity"}var c=[];function d(f){var i;if(typeof f==="undefined"){c.push(Array(numeric.precision+8).join(" "));return false}if(typeof f==="string"){c.push('"'+f+'"');return false}if(typeof f==="boolean"){c.push(f.toString());return false}if(typeof f==="number"){var h=a(f);var e=f.toPrecision(numeric.precision);var l=parseFloat(f.toString()).toString();var j=[h,e,l,parseFloat(e).toString(),parseFloat(l).toString()];for(i=1;i<j.length;i++){if(j[i].length<h.length){h=j[i]}}c.push(Array(numeric.precision+8-h.length).join(" ")+h);return false}if(f===null){c.push("null");return false}if(typeof f==="function"){c.push(f.toString());var g=false;for(i in f){if(f.hasOwnProperty(i)){if(g){c.push(",\n")}else{c.push("\n{")}g=true;c.push(i);c.push(": \n");d(f[i])}}if(g){c.push("}\n")}return true}if(f instanceof Array){if(f.length>numeric.largeArray){c.push("...Large Array...");return true}var g=false;c.push("[");for(i=0;i<f.length;i++){if(i>0){c.push(",");if(g){c.push("\n ")}}g=d(f[i])}c.push("]");return true}c.push("{");var g=false;for(i in f){if(f.hasOwnProperty(i)){if(g){c.push(",\n")}g=true;c.push(i);c.push(": \n");d(f[i])}}c.push("}");return true}d(b);return c.join("")};numeric.parseDate=function parseDate(a){function b(f){if(typeof f==="string"){return Date.parse(f.replace(/-/g,"/"))}if(!(f instanceof Array)){throw new Error("parseDate: parameter must be arrays of strings")}var e=[],c;for(c=0;c<f.length;c++){e[c]=b(f[c])}return e}return b(a)};numeric.parseFloat=function parseFloat_(a){function b(f){if(typeof f==="string"){return parseFloat(f)}if(!(f instanceof Array)){throw new Error("parseFloat: parameter must be arrays of strings")}var e=[],c;for(c=0;c<f.length;c++){e[c]=b(f[c])}return e}return b(a)};numeric.parseCSV=function parseCSV(m){var l=m.split("\n");var e,d;var i=[];var g=/(([^'",]*)|('[^']*')|("[^"]*")),/g;var b=/^\s*(([+-]?[0-9]+(\.[0-9]*)?(e[+-]?[0-9]+)?)|([+-]?[0-9]*(\.[0-9]+)?(e[+-]?[0-9]+)?))\s*$/;var a=function(j){return j.substr(0,j.length-1)};var f=0;for(d=0;d<l.length;d++){var h=(l[d]+",").match(g),c;if(h.length>0){i[f]=[];for(e=0;e<h.length;e++){c=a(h[e]);if(b.test(c)){i[f][e]=parseFloat(c)}else{i[f][e]=c}}f++}}return i};numeric.toCSV=function toCSV(b){var f=numeric.dim(b);var e,d,a,h,g,c;a=f[0];h=f[1];c=[];for(e=0;e<a;e++){g=[];for(d=0;d<a;d++){g[d]=b[e][d].toString()}c[e]=g.join(", ")}return c.join("\n")+"\n"};numeric.getURL=function getURL(b){var a=new XMLHttpRequest();a.open("GET",b,false);a.send();return a};numeric.imageURL=function imageURL(m){function p(j){var k=j.length,w,E,D,C,h,b,a,G;var F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var B="";for(w=0;w<k;w+=3){E=j[w];D=j[w+1];C=j[w+2];h=E>>2;b=((E&3)<<4)+(D>>4);a=((D&15)<<2)+(C>>6);G=C&63;if(w+1>=k){a=G=64}else{if(w+2>=k){G=64}}B+=F.charAt(h)+F.charAt(b)+F.charAt(a)+F.charAt(G)}return B}function q(b,B,A){if(typeof B==="undefined"){B=0}if(typeof A==="undefined"){A=b.length}var j=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];var k=-1,z=0,w=b.length,h;for(h=B;h<A;h++){z=(k^b[h])&255;k=(k>>>8)^j[z]}return k^(-1)}var n=m[0].length,v=m[0][0].length,x,u,o,e,c,s,r,l,f,g,d;var y=[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,(v>>24)&255,(v>>16)&255,(v>>8)&255,v&255,(n>>24)&255,(n>>16)&255,(n>>8)&255,n&255,8,2,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,73,68,65,84,8,29];d=q(y,12,29);y[29]=(d>>24)&255;y[30]=(d>>16)&255;y[31]=(d>>8)&255;y[32]=(d)&255;x=1;u=0;for(l=0;l<n;l++){if(l<n-1){y.push(0)}else{y.push(1)}s=(3*v+1+(l===0))&255;r=((3*v+1+(l===0))>>8)&255;y.push(s);y.push(r);y.push((~s)&255);y.push((~r)&255);if(l===0){y.push(0)}for(f=0;f<v;f++){for(e=0;e<3;e++){s=m[e][l][f];if(s>255){s=255}else{if(s<0){s=0}else{s=Math.round(s)}}x=(x+s)%65521;u=(u+x)%65521;y.push(s)}}y.push(0)}g=(u<<16)+x;y.push((g>>24)&255);y.push((g>>16)&255);y.push((g>>8)&255);y.push((g)&255);c=y.length-41;y[33]=(c>>24)&255;y[34]=(c>>16)&255;y[35]=(c>>8)&255;y[36]=(c)&255;d=q(y,37);y.push((d>>24)&255);y.push((d>>16)&255);y.push((d>>8)&255);y.push((d)&255);y.push(0);y.push(0);y.push(0);y.push(0);y.push(73);y.push(69);y.push(78);y.push(68);y.push(174);y.push(66);y.push(96);y.push(130);return"data:image/png;base64,"+p(y)};numeric._dim=function _dim(a){var b=[];while(typeof a==="object"){b.push(a.length);a=a[0]}return b};numeric.dim=function dim(a){var c,b;if(typeof a==="object"){c=a[0];if(typeof c==="object"){b=c[0];if(typeof b==="object"){return numeric._dim(a)}return[a.length,c.length]}return[a.length]}return[]};numeric.mapreduce=function mapreduce(a,b){return Function("x","accum","_s","_k",'if(typeof accum === "undefined") accum = '+b+';\nif(typeof x === "number") { var xi = x; '+a+'; return accum; }\nif(typeof _s === "undefined") _s = numeric.dim(x);\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i,xi;\nif(_k < _s.length-1) {\n    for(i=_n-1;i>=0;i--) {\n        accum = arguments.callee(x[i],accum,_s,_k+1);\n    }    return accum;\n}\nfor(i=_n-1;i>=1;i-=2) { \n    xi = x[i];\n    '+a+";\n    xi = x[i-1];\n    "+a+";\n}\nif(i === 0) {\n    xi = x[i];\n    "+a+"\n}\nreturn accum;")};numeric.mapreduce2=function mapreduce2(b,a){return Function("x","var n = x.length;\nvar i,xi;\n"+a+";\nfor(i=n-1;i!==-1;--i) { \n    xi = x[i];\n    "+b+";\n}\nreturn accum;")};numeric.same=function same(a,d){var b,c;if(!(a instanceof Array)||!(d instanceof Array)){return false}c=a.length;if(c!==d.length){return false}for(b=0;b<c;b++){if(a[b]===d[b]){continue}if(typeof a[b]==="object"){if(!same(a[b],d[b])){return false}}else{return false}}return true};numeric.rep=function rep(e,b,a){if(typeof a==="undefined"){a=0}var f=e[a],c=Array(f),d;if(a===e.length-1){for(d=f-2;d>=0;d-=2){c[d+1]=b;c[d]=b}if(d===-1){c[0]=b}return c}for(d=f-1;d>=0;d--){c[d]=numeric.rep(e,b,a+1)}return c};numeric.dotMMsmall=function dotMMsmall(v,u){var l,g,e,c,b,a,n,s,m,h,f,o,w,d;c=v.length;b=u.length;a=u[0].length;n=Array(c);for(l=c-1;l>=0;l--){s=Array(a);m=v[l];for(e=a-1;e>=0;e--){h=m[b-1]*u[b-1][e];for(g=b-2;g>=1;g-=2){f=g-1;h+=m[g]*u[g][e]+m[f]*u[f][e]}if(g===0){h+=m[0]*u[0][e]}s[e]=h}n[l]=s}return n};numeric._getCol=function _getCol(b,c,a){var e=b.length,d;for(d=e-1;d>0;--d){a[d]=b[d][c];--d;a[d]=b[d][c]}if(d===0){a[0]=b[0][c]}};numeric.dotMMbig=function dotMMbig(r,q){var s=numeric._getCol,a=q.length,u=Array(a);var d=r.length,c=q[0].length,b=new Array(d),l;var f=numeric.dotVV;var h,g,e,o;--a;--d;for(h=d;h!==-1;--h){b[h]=Array(c)}--c;for(h=c;h!==-1;--h){s(q,h,u);for(g=d;g!==-1;--g){o=0;l=r[g];b[g][h]=f(l,u)}}return b};numeric.dotMV=function dotMV(a,g){var e=a.length,d=g.length,c;var b=Array(e),f=numeric.dotVV;for(c=e-1;c>=0;c--){b[c]=f(a[c],g)}return b};numeric.dotVM=function dotVM(h,g){var w,v,u,n,m,l,D,B,A,e,s,f,c,z,d,b,a,o,C;n=h.length;m=g[0].length;D=Array(m);for(u=m-1;u>=0;u--){e=h[n-1]*g[n-1][u];for(v=n-2;v>=1;v-=2){s=v-1;e+=h[v]*g[v][u]+h[s]*g[s][u]}if(v===0){e+=h[0]*g[0][u]}D[u]=e}return D};numeric.dotVV=function dotVV(a,f){var c,e=a.length,d,b=a[e-1]*f[e-1];for(c=e-2;c>=1;c-=2){d=c-1;b+=a[c]*f[c]+a[d]*f[d]}if(c===0){b+=a[0]*f[0]}return b};numeric.dot=function dot(a,c){var b=numeric.dim;switch(b(a).length*1000+b(c).length){case 2002:if(c.length<10){return numeric.dotMMsmall(a,c)}else{return numeric.dotMMbig(a,c)}case 2001:return numeric.dotMV(a,c);case 1002:return numeric.dotVM(a,c);case 1001:return numeric.dotVV(a,c);case 1000:return numeric.mulVS(a,c);case 1:return numeric.mulSV(a,c);case 0:return a*c;default:throw new Error("numeric.dot only works on vectors and matrices")}};numeric.diag=function diag(g){var e,f,c,h=g.length,a=Array(h),b;for(e=h-1;e>=0;e--){b=Array(h);f=e+2;for(c=h-1;c>=f;c-=2){b[c]=0;b[c-1]=0}if(c>e){b[c]=0}b[e]=g[e];for(c=e-1;c>=1;c-=2){b[c]=0;b[c-1]=0}if(c===0){b[0]=0}a[e]=b}return a};numeric.getDiag=function(a){var d=Math.min(a.length,a[0].length),c,b=Array(d);for(c=d-1;c>=1;--c){b[c]=a[c][c];--c;b[c]=a[c][c]}if(c===0){b[0]=a[0][0]}return b};numeric.identity=function identity(a){return numeric.diag(numeric.rep([a],1))};numeric.pointwise=function pointwise(d,g,c){if(typeof c==="undefined"){c=""}var h=[];var e;var i=/\[i\]$/,a,f="";var b=false;for(e=0;e<d.length;e++){if(i.test(d[e])){a=d[e].substring(0,d[e].length-3);f=a}else{a=d[e]}if(a==="ret"){b=true}h.push(a)}h[d.length]="_s";h[d.length+1]="_k";h[d.length+2]=('if(typeof _s === "undefined") _s = numeric.dim('+f+');\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i'+(b?"":", ret = Array(_n)")+";\nif(_k < _s.length-1) {\n    for(i=_n-1;i>=0;i--) ret[i] = arguments.callee("+d.join(",")+",_s,_k+1);\n    return ret;\n}\n"+c+"\nfor(i=_n-1;i!==-1;--i) {\n    "+g+"\n}\nreturn ret;");return Function.apply(null,h)};numeric.pointwise2=function pointwise2(d,g,c){if(typeof c==="undefined"){c=""}var h=[];var e;var i=/\[i\]$/,a,f="";var b=false;for(e=0;e<d.length;e++){if(i.test(d[e])){a=d[e].substring(0,d[e].length-3);f=a}else{a=d[e]}if(a==="ret"){b=true}h.push(a)}h[d.length]=("var _n = "+f+".length;\nvar i"+(b?"":", ret = Array(_n)")+";\n"+c+"\nfor(i=_n-1;i!==-1;--i) {\n"+g+"\n}\nreturn ret;");return Function.apply(null,h)};numeric._biforeach=(function _biforeach(a,h,d,b,e){if(b===d.length-1){e(a,h);return}var c,g=d[b];for(c=g-1;c>=0;c--){_biforeach(typeof a==="object"?a[c]:a,typeof h==="object"?h[c]:h,d,b+1,e)}});numeric._biforeach2=(function _biforeach2(a,j,e,b,g){if(b===e.length-1){return g(a,j)}var d,h=e[b],c=Array(h);for(d=h-1;d>=0;--d){c[d]=_biforeach2(typeof a==="object"?a[d]:a,typeof j==="object"?j[d]:j,e,b+1,g)}return c});numeric._foreach=(function _foreach(a,d,b,e){if(b===d.length-1){e(a);return}var c,g=d[b];for(c=g-1;c>=0;c--){_foreach(a[c],d,b+1,e)}});numeric._foreach2=(function _foreach2(a,e,b,g){if(b===e.length-1){return g(a)}var d,h=e[b],c=Array(h);for(d=h-1;d>=0;d--){c[d]=_foreach2(a[d],e,b+1,g)}return c});numeric.ops2={add:"+",sub:"-",mul:"*",div:"/",mod:"%",and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">=",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};numeric.opseq={addeq:"+=",subeq:"-=",muleq:"*=",diveq:"/=",modeq:"%=",lshifteq:"<<=",rshifteq:">>=",rrshifteq:">>>=",bandeq:"&=",boreq:"|=",bxoreq:"^="};numeric.mathfuns=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","isNaN","isFinite"];numeric.mathfuns2=["atan2","pow","max","min"];numeric.ops1={neg:"-",not:"!",bnot:"~",clone:""};numeric.mapreducers={any:["if(xi) return true;","var accum = false;"],all:["if(!xi) return false;","var accum = true;"],sum:["accum += xi;","var accum = 0;"],prod:["accum *= xi;","var accum = 1;"],norm2Squared:["accum += xi*xi;","var accum = 0;"],norminf:["accum = max(accum,abs(xi));","var accum = 0, max = Math.max, abs = Math.abs;"],norm1:["accum += abs(xi)","var accum = 0, abs = Math.abs;"],sup:["accum = max(accum,xi);","var accum = -Infinity, max = Math.max;"],inf:["accum = min(accum,xi);","var accum = Infinity, min = Math.min;"]};(function(){var b,e;for(b=0;b<numeric.mathfuns2.length;++b){e=numeric.mathfuns2[b];numeric.ops2[e]=e}for(b in numeric.ops2){if(numeric.ops2.hasOwnProperty(b)){e=numeric.ops2[b];var c,d,a="";if(numeric.myIndexOf.call(numeric.mathfuns2,b)!==-1){a="var "+e+" = Math."+e+";\n";c=function(g,f,h){return g+" = "+e+"("+f+","+h+")"};d=function(f,g){return f+" = "+e+"("+f+","+g+")"}}else{c=function(g,f,h){return g+" = "+f+" "+e+" "+h};if(numeric.opseq.hasOwnProperty(b+"eq")){d=function(f,g){return f+" "+e+"= "+g}}else{d=function(f,g){return f+" = "+f+" "+e+" "+g}}}numeric[b+"VV"]=numeric.pointwise2(["x[i]","y[i]"],c("ret[i]","x[i]","y[i]"),a);numeric[b+"SV"]=numeric.pointwise2(["x","y[i]"],c("ret[i]","x","y[i]"),a);numeric[b+"VS"]=numeric.pointwise2(["x[i]","y"],c("ret[i]","x[i]","y"),a);numeric[b]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar VV = numeric."+b+"VV, VS = numeric."+b+"VS, SV = numeric."+b+'SV;\nvar dim = numeric.dim;\nfor(i=1;i!==n;++i) { \n  y = arguments[i];\n  if(typeof x === "object") {\n      if(typeof y === "object") x = numeric._biforeach2(x,y,dim(x),0,VV);\n      else x = numeric._biforeach2(x,y,dim(x),0,VS);\n  } else if(typeof y === "object") x = numeric._biforeach2(x,y,dim(y),0,SV);\n  else '+d("x","y")+"\n}\nreturn x;\n");numeric[e]=numeric[b];numeric[b+"eqV"]=numeric.pointwise2(["ret[i]","x[i]"],d("ret[i]","x[i]"),a);numeric[b+"eqS"]=numeric.pointwise2(["ret[i]","x"],d("ret[i]","x"),a);numeric[b+"eq"]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar V = numeric."+b+"eqV, S = numeric."+b+'eqS\nvar s = numeric.dim(x);\nfor(i=1;i!==n;++i) { \n  y = arguments[i];\n  if(typeof y === "object") numeric._biforeach(x,y,s,0,V);\n  else numeric._biforeach(x,y,s,0,S);\n}\nreturn x;\n')}}for(b=0;b<numeric.mathfuns2.length;++b){e=numeric.mathfuns2[b];delete numeric.ops2[e]}for(b=0;b<numeric.mathfuns.length;++b){e=numeric.mathfuns[b];numeric.ops1[e]=e}for(b in numeric.ops1){if(numeric.ops1.hasOwnProperty(b)){a="";e=numeric.ops1[b];if(numeric.myIndexOf.call(numeric.mathfuns,b)!==-1){if(Math.hasOwnProperty(e)){a="var "+e+" = Math."+e+";\n"}}numeric[b+"eqV"]=numeric.pointwise2(["ret[i]"],"ret[i] = "+e+"(ret[i]);",a);numeric[b+"eq"]=Function("x",'if(typeof x !== "object") return '+e+"x\nvar i;\nvar V = numeric."+b+"eqV;\nvar s = numeric.dim(x);\nnumeric._foreach(x,s,0,V);\nreturn x;\n");numeric[b+"V"]=numeric.pointwise2(["x[i]"],"ret[i] = "+e+"(x[i]);",a);numeric[b]=Function("x",'if(typeof x !== "object") return '+e+"(x)\nvar i;\nvar V = numeric."+b+"V;\nvar s = numeric.dim(x);\nreturn numeric._foreach2(x,s,0,V);\n")}}for(b=0;b<numeric.mathfuns.length;++b){e=numeric.mathfuns[b];delete numeric.ops1[e]}for(b in numeric.mapreducers){if(numeric.mapreducers.hasOwnProperty(b)){e=numeric.mapreducers[b];numeric[b+"V"]=numeric.mapreduce2(e[0],e[1]);numeric[b]=Function("x","s","k",e[1]+'if(typeof x !== "object") {    xi = x;\n'+e[0]+';\n    return accum;\n}if(typeof s === "undefined") s = numeric.dim(x);\nif(typeof k === "undefined") k = 0;\nif(k === s.length-1) return numeric.'+b+"V(x);\nvar xi;\nvar n = x.length, i;\nfor(i=n-1;i!==-1;--i) {\n   xi = arguments.callee(x[i]);\n"+e[0]+";\n}\nreturn accum;\n")}}}());numeric.truncVV=numeric.pointwise(["x[i]","y[i]"],"ret[i] = round(x[i]/y[i])*y[i];","var round = Math.round;");numeric.truncVS=numeric.pointwise(["x[i]","y"],"ret[i] = round(x[i]/y)*y;","var round = Math.round;");numeric.truncSV=numeric.pointwise(["x","y[i]"],"ret[i] = round(x/y[i])*y[i];","var round = Math.round;");numeric.trunc=function trunc(a,b){if(typeof a==="object"){if(typeof b==="object"){return numeric.truncVV(a,b)}return numeric.truncVS(a,b)}if(typeof b==="object"){return numeric.truncSV(a,b)}return Math.round(a/b)*b};numeric.inv=function inv(o){var v=numeric.dim(o),w=Math.abs,d=v[0],c=v[1];var b=numeric.clone(o),q,l;var p=numeric.identity(d),a,u;var h,g,e,o;for(g=0;g<c;++g){var f=-1;var r=-1;for(h=g;h!==d;++h){e=w(b[h][g]);if(e>r){f=h;r=e}}l=b[f];b[f]=b[g];b[g]=l;u=p[f];p[f]=p[g];p[g]=u;o=l[g];for(e=g;e!==c;++e){l[e]/=o}for(e=c-1;e!==-1;--e){u[e]/=o}for(h=d-1;h!==-1;--h){if(h!==g){q=b[h];a=p[h];o=q[g];for(e=g+1;e!==c;++e){q[e]-=l[e]*o}for(e=c-1;e>0;--e){a[e]-=u[e]*o;--e;a[e]-=u[e]*o}if(e===0){a[0]-=u[0]*o}}}}return p};numeric.det=function det(p){var u=numeric.dim(p);if(u.length!==2||u[0]!==u[1]){throw new Error("numeric: det() only works on square matrices")}var b=u[0],l=1,f,e,d,a=numeric.clone(p),o,q,c,r,m,h,g;for(e=0;e<b-1;e++){d=e;for(f=e+1;f<b;f++){if(Math.abs(a[f][e])>Math.abs(a[d][e])){d=f}}if(d!==e){r=a[d];a[d]=a[e];a[e]=r;l*=-1}o=a[e];for(f=e+1;f<b;f++){q=a[f];c=q[e]/o[e];for(d=e+1;d<b-1;d+=2){m=d+1;q[d]-=o[d]*c;q[m]-=o[m]*c}if(d!==b){q[d]-=o[d]*c}}if(o[e]===0){return 0}l*=o[e]}return l*a[e][e]};numeric.transpose=function transpose(k){var g,e,c=k.length,a=k[0].length,h=Array(a),d,b,f;for(e=0;e<a;e++){h[e]=Array(c)}for(g=c-1;g>=1;g-=2){b=k[g];d=k[g-1];for(e=a-1;e>=1;--e){f=h[e];f[g]=b[e];f[g-1]=d[e];--e;f=h[e];f[g]=b[e];f[g-1]=d[e]}if(e===0){f=h[0];f[g]=b[0];f[g-1]=d[0]}}if(g===0){d=k[0];for(e=a-1;e>=1;--e){h[e][0]=d[e];--e;h[e][0]=d[e]}if(e===0){h[0][0]=d[0]}}return h};numeric.negtranspose=function negtranspose(k){var g,e,c=k.length,a=k[0].length,h=Array(a),d,b,f;for(e=0;e<a;e++){h[e]=Array(c)}for(g=c-1;g>=1;g-=2){b=k[g];d=k[g-1];for(e=a-1;e>=1;--e){f=h[e];f[g]=-b[e];f[g-1]=-d[e];--e;f=h[e];f[g]=-b[e];f[g-1]=-d[e]}if(e===0){f=h[0];f[g]=-b[0];f[g-1]=-d[0]}}if(g===0){d=k[0];for(e=a-1;e>=1;--e){h[e][0]=-d[e];--e;h[e][0]=-d[e]}if(e===0){h[0][0]=-d[0]}}return h};numeric._random=function _random(e,a){var d,f=e[a],b=Array(f),c;if(a===e.length-1){c=Math.random;for(d=f-1;d>=1;d-=2){b[d]=c();b[d-1]=c()}if(d===0){b[0]=c()}return b}for(d=f-1;d>=0;d--){b[d]=_random(e,a+1)}return b};numeric.random=function random(a){return numeric._random(a,0)};numeric.norm2=function norm2(a){return Math.sqrt(numeric.norm2Squared(a))};numeric.linspace=function linspace(d,c,g){if(typeof g==="undefined"){g=Math.max(Math.round(c-d)+1,1)}if(g<2){return g===1?[d]:[]}var f,e=Array(g);g--;for(f=g;f>=0;f--){e[f]=(f*c+(g-f)*d)/g}return e};numeric.getBlock=function getBlock(a,e,d){var b=numeric.dim(a);function c(f,h){var l,g=e[h],m=d[h]-g,j=Array(m);if(h===b.length-1){for(l=m;l>=0;l--){j[l]=f[l+g]}return j}for(l=m;l>=0;l--){j[l]=c(f[l+g],h+1)}return j}return c(a,0)};numeric.setBlock=function setBlock(a,f,e,d){var b=numeric.dim(a);function c(g,o,j){var l,h=f[j],m=e[j]-h;if(j===b.length-1){for(l=m;l>=0;l--){g[l+h]=o[l]}}for(l=m;l>=0;l--){c(g[l+h],o[l],j+1)}}c(a,d,0);return a};numeric.getRange=function getRange(b,l,k){var e=l.length,d=k.length;var g,f;var a=Array(e),h,c;for(g=e-1;g!==-1;--g){a[g]=Array(d);h=a[g];c=b[l[g]];for(f=d-1;f!==-1;--f){h[f]=c[k[f]]}}return a};numeric.blockMatrix=function blockMatrix(b){var x=numeric.dim(b);if(x.length<4){return numeric.blockMatrix([b])}var d=x[0],c=x[1],r,q,o,h,w;r=0;q=0;for(o=0;o<d;++o){r+=b[o][0].length}for(h=0;h<c;++h){q+=b[0][h][0].length}var a=Array(r);for(o=0;o<r;++o){a[o]=Array(q)}var v=0,u,p,g,e,f;for(o=0;o<d;++o){u=q;for(h=c-1;h!==-1;--h){w=b[o][h];u-=w[0].length;for(g=w.length-1;g!==-1;--g){f=w[g];p=a[v+g];for(e=f.length-1;e!==-1;--e){p[u+e]=f[e]}}}v+=b[o][0].length}return a};numeric.tensor=function tensor(h,g){if(typeof h==="number"||typeof g==="number"){return numeric.mul(h,g)}var o=numeric.dim(h),k=numeric.dim(g);if(o.length!==1||k.length!==1){throw new Error("numeric: tensor product is only defined for vectors")}var c=o[0],b=k[0],a=Array(c),l,e,d,f;for(e=c-1;e>=0;e--){l=Array(b);f=h[e];for(d=b-1;d>=3;--d){l[d]=f*g[d];--d;l[d]=f*g[d];--d;l[d]=f*g[d];--d;l[d]=f*g[d]}while(d>=0){l[d]=f*g[d];--d}a[e]=l}return a};numeric.T=function T(a,b){this.x=a;this.y=b};numeric.t=function t(a,b){return new numeric.T(a,b)};numeric.Tbinop=function Tbinop(c,e,d,g,a){var f=numeric.indexOf;if(typeof a!=="string"){var b;a="";for(b in numeric){if(numeric.hasOwnProperty(b)&&(c.indexOf(b)>=0||e.indexOf(b)>=0||d.indexOf(b)>=0||g.indexOf(b)>=0)&&b.length>1){a+="var "+b+" = numeric."+b+";\n"}}}return Function(["y"],"var x = this;\nif(!(y instanceof numeric.T)) { y = new numeric.T(y); }\n"+a+"\nif(x.y) {  if(y.y) {    return new numeric.T("+g+");\n  }\n  return new numeric.T("+d+");\n}\nif(y.y) {\n  return new numeric.T("+e+");\n}\nreturn new numeric.T("+c+");\n")};numeric.T.prototype.add=numeric.Tbinop("add(x.x,y.x)","add(x.x,y.x),y.y","add(x.x,y.x),x.y","add(x.x,y.x),add(x.y,y.y)");numeric.T.prototype.sub=numeric.Tbinop("sub(x.x,y.x)","sub(x.x,y.x),neg(y.y)","sub(x.x,y.x),x.y","sub(x.x,y.x),sub(x.y,y.y)");numeric.T.prototype.mul=numeric.Tbinop("mul(x.x,y.x)","mul(x.x,y.x),mul(x.x,y.y)","mul(x.x,y.x),mul(x.y,y.x)","sub(mul(x.x,y.x),mul(x.y,y.y)),add(mul(x.x,y.y),mul(x.y,y.x))");numeric.T.prototype.reciprocal=function reciprocal(){var a=numeric.mul,c=numeric.div;if(this.y){var b=numeric.add(a(this.x,this.x),a(this.y,this.y));return new numeric.T(c(this.x,b),c(numeric.neg(this.y),b))}return new T(c(1,this.x))};numeric.T.prototype.div=function div(b){if(!(b instanceof numeric.T)){b=new numeric.T(b)}if(b.y){return this.mul(b.reciprocal())}var a=numeric.div;if(this.y){return new numeric.T(a(this.x,b.x),a(this.y,b.x))}return new numeric.T(a(this.x,b.x))};numeric.T.prototype.dot=numeric.Tbinop("dot(x.x,y.x)","dot(x.x,y.x),dot(x.x,y.y)","dot(x.x,y.x),dot(x.y,y.x)","sub(dot(x.x,y.x),dot(x.y,y.y)),add(dot(x.x,y.y),dot(x.y,y.x))");numeric.T.prototype.transpose=function transpose(){var b=numeric.transpose,a=this.x,c=this.y;if(c){return new numeric.T(b(a),b(c))}return new numeric.T(b(a))};numeric.T.prototype.transjugate=function transjugate(){var b=numeric.transpose,a=this.x,c=this.y;if(c){return new numeric.T(b(a),numeric.negtranspose(c))}return new numeric.T(b(a))};numeric.Tunop=function Tunop(b,d,a){if(typeof a!=="string"){a=""}return Function("var x = this;\n"+a+"\nif(x.y) {  "+d+";\n}\n"+b+";\n")};numeric.T.prototype.exp=numeric.Tunop("return new numeric.T(ex)","return new numeric.T(mul(cos(x.y),ex),mul(sin(x.y),ex))","var ex = numeric.exp(x.x), cos = numeric.cos, sin = numeric.sin, mul = numeric.mul;");numeric.T.prototype.conj=numeric.Tunop("return new numeric.T(x.x);","return new numeric.T(x.x,numeric.neg(x.y));");numeric.T.prototype.neg=numeric.Tunop("return new numeric.T(neg(x.x));","return new numeric.T(neg(x.x),neg(x.y));","var neg = numeric.neg;");numeric.T.prototype.sin=numeric.Tunop("return new numeric.T(numeric.sin(x.x))","return x.exp().sub(x.neg().exp()).div(new numeric.T(0,2));");numeric.T.prototype.cos=numeric.Tunop("return new numeric.T(numeric.cos(x.x))","return x.exp().add(x.neg().exp()).div(2);");numeric.T.prototype.abs=numeric.Tunop("return new numeric.T(numeric.abs(x.x));","return new numeric.T(numeric.sqrt(numeric.add(mul(x.x,x.x),mul(x.y,x.y))));","var mul = numeric.mul;");numeric.T.prototype.log=numeric.Tunop("return new numeric.T(numeric.log(x.x));","var theta = new numeric.T(numeric.atan2(x.y,x.x)), r = x.abs();\nreturn new numeric.T(numeric.log(r.x),theta.x);");numeric.T.prototype.norm2=numeric.Tunop("return numeric.norm2(x.x);","var f = numeric.norm2Squared;\nreturn Math.sqrt(f(x.x)+f(x.y));");numeric.T.prototype.inv=function inv(){var r=this;if(typeof r.y==="undefined"){return new numeric.T(numeric.inv(r.x))}var s=r.x.length,w,v,u;var e=numeric.identity(s),c=numeric.rep([s,s],0);var q=numeric.clone(r.x),o=numeric.clone(r.y);var b,a,l,h,p,m,D,C;var w,v,u,B,E,g,f,y,x,z;for(w=0;w<s;w++){g=q[w][w];f=o[w][w];B=g*g+f*f;u=w;for(v=w+1;v<s;v++){g=q[v][w];f=o[v][w];E=g*g+f*f;if(E>B){u=v;B=E}}if(u!==w){z=q[w];q[w]=q[u];q[u]=z;z=o[w];o[w]=o[u];o[u]=z;z=e[w];e[w]=e[u];e[u]=z;z=c[w];c[w]=c[u];c[u]=z}b=q[w];a=o[w];p=e[w];m=c[w];g=b[w];f=a[w];for(v=w+1;v<s;v++){y=b[v];x=a[v];b[v]=(y*g+x*f)/B;a[v]=(x*g-y*f)/B}for(v=0;v<s;v++){y=p[v];x=m[v];p[v]=(y*g+x*f)/B;m[v]=(x*g-y*f)/B}for(v=w+1;v<s;v++){l=q[v];h=o[v];D=e[v];C=c[v];g=l[w];f=h[w];for(u=w+1;u<s;u++){y=b[u];x=a[u];l[u]-=y*g-x*f;h[u]-=x*g+y*f}for(u=0;u<s;u++){y=p[u];x=m[u];D[u]-=y*g-x*f;C[u]-=x*g+y*f}}}for(w=s-1;w>0;w--){p=e[w];m=c[w];for(v=w-1;v>=0;v--){D=e[v];C=c[v];g=q[v][w];f=o[v][w];for(u=s-1;u>=0;u--){y=p[u];x=m[u];D[u]-=g*y-f*x;C[u]-=g*x+f*y}}}return new numeric.T(e,c)};numeric.T.prototype.get=function get(d){var a=this.x,f=this.y,b=0,c,e=d.length;if(f){while(b<e){c=d[b];a=a[c];f=f[c];b++}return new numeric.T(a,f)}while(b<e){c=d[b];a=a[c];b++}return new numeric.T(a)};numeric.T.prototype.set=function set(c,j){var g=this.x,e=this.y,b=0,h,a=c.length,f=j.x,d=j.y;if(a===0){if(d){this.y=d}else{if(e){this.y=undefined}}this.x=g;return this}if(d){if(e){}else{e=numeric.rep(numeric.dim(g),0);this.y=e}while(b<a-1){h=c[b];g=g[h];e=e[h];b++}h=c[b];g[h]=f;e[h]=d;return this}if(e){while(b<a-1){h=c[b];g=g[h];e=e[h];b++}h=c[b];g[h]=f;if(f instanceof Array){e[h]=numeric.rep(numeric.dim(f),0)}else{e[h]=0}return this}while(b<a-1){h=c[b];g=g[h];b++}h=c[b];g[h]=f;return this};numeric.T.prototype.getRows=function getRows(e,c){var h=c-e+1,b;var f=Array(h),d,a=this.x,g=this.y;for(b=e;b<=c;b++){f[b-e]=a[b]}if(g){d=Array(h);for(b=e;b<=c;b++){d[b-e]=g[b]}return new numeric.T(f,d)}return new numeric.T(f)};numeric.T.prototype.setRows=function setRows(f,d,b){var c;var g=this.x,e=this.y,a=b.x,h=b.y;for(c=f;c<=d;c++){g[c]=a[c-f]}if(h){if(!e){e=numeric.rep(numeric.dim(g),0);this.y=e}for(c=f;c<=d;c++){e[c]=h[c-f]}}else{if(e){for(c=f;c<=d;c++){e[c]=numeric.rep([a[c-f].length],0)}}}return this};numeric.T.prototype.getRow=function getRow(b){var a=this.x,c=this.y;if(c){return new numeric.T(a[b],c[b])}return new numeric.T(a[b])};numeric.T.prototype.setRow=function setRow(c,b){var e=this.x,d=this.y,a=b.x,f=b.y;e[c]=a;if(f){if(!d){d=numeric.rep(numeric.dim(e),0);this.y=d}d[c]=f}else{if(d){d=numeric.rep([a.length],0)}}return this};numeric.T.prototype.getBlock=function getBlock(f,e){var c=this.x,d=this.y,a=numeric.getBlock;if(d){return new numeric.T(a(c,f,e),a(d,f,e))}return new numeric.T(a(c,f,e))};numeric.T.prototype.setBlock=function setBlock(i,h,d){if(!(d instanceof numeric.T)){d=new numeric.T(d)}var c=this.x,g=this.y,a=numeric.setBlock,f=d.x,e=d.y;if(e){if(!g){this.y=numeric.rep(numeric.dim(this),0);g=this.y}a(c,i,h,f);a(g,i,h,e);return this}a(c,i,h,f);if(g){a(g,i,h,numeric.rep(numeric.dim(f),0))}};numeric.T.rep=function rep(d,b){var c=numeric.T;if(!(b instanceof c)){b=new c(b)}var a=b.x,f=b.y,e=numeric.rep;if(f){return new c(e(d,a),e(d,f))}return new c(e(d,a))};numeric.T.diag=function diag(c){if(!(c instanceof numeric.T)){c=new numeric.T(c)}var a=c.x,e=c.y,b=numeric.diag;if(e){return new numeric.T(b(a),b(e))}return new numeric.T(b(a))};numeric.T.eig=function eig(){if(this.y){throw new Error("eig: not implemented for complex matrices.")}return numeric.eig(this.x)};numeric.T.identity=function identity(a){return new numeric.T(numeric.identity(a))};numeric.T.prototype.getDiag=function getDiag(){var c=numeric;var a=this.x,b=this.y;if(b){return new c.T(c.getDiag(a),c.getDiag(b))}return new c.T(c.getDiag(a))};numeric.house=function house(a){var b=numeric.clone(a);var c=a[0]>=0?1:-1;var d=c*numeric.norm2(a);b[0]+=d;var e=numeric.norm2(b);if(e===0){throw new Error("eig: internal error")}return numeric.div(b,e)};numeric.toUpperHessenberg=function toUpperHessenberg(o){var u=numeric.dim(o);if(u.length!==2||u[0]!==u[1]){throw new Error("numeric: toUpperHessenberg() only works on square matrices")}var f=u[0],l,h,g,p,r,d=numeric.clone(o),c,a,q,b,n=numeric.identity(f),e;for(h=0;h<f-2;h++){p=Array(f-h-1);for(l=h+1;l<f;l++){p[l-h-1]=d[l][h]}if(numeric.norm2(p)>0){r=numeric.house(p);c=numeric.getBlock(d,[h+1,h],[f-1,f-1]);a=numeric.tensor(r,numeric.dot(r,c));for(l=h+1;l<f;l++){q=d[l];b=a[l-h-1];for(g=h;g<f;g++){q[g]-=2*b[g-h]}}c=numeric.getBlock(d,[0,h+1],[f-1,f-1]);a=numeric.tensor(numeric.dot(c,r),r);for(l=0;l<f;l++){q=d[l];b=a[l];for(g=h+1;g<f;g++){q[g]-=2*b[g-h-1]}}c=Array(f-h-1);for(l=h+1;l<f;l++){c[l-h-1]=n[l]}a=numeric.tensor(r,numeric.dot(r,c));for(l=h+1;l<f;l++){e=n[l];b=a[l-h-1];for(g=0;g<f;g++){e[g]-=2*b[g]}}}}return{H:d,Q:n}};numeric.epsilon=2.220446049250313e-16;numeric.QRFrancis=function(z,h){if(typeof h==="undefined"){h=10000}z=numeric.clone(z);var D=numeric.clone(z);var E=numeric.dim(z),K=E[0],y,A,U,S,R,P,n,e,l,q=numeric.identity(K),u,r,I,G,F,O,M,L,N;if(K<3){return{Q:q,B:[[0,K-1]]}}var V=numeric.epsilon;for(N=0;N<h;N++){for(M=0;M<K-1;M++){if(Math.abs(z[M+1][M])<V*(Math.abs(z[M][M])+Math.abs(z[M+1][M+1]))){var p=numeric.QRFrancis(numeric.getBlock(z,[0,0],[M,M]),h);var o=numeric.QRFrancis(numeric.getBlock(z,[M+1,M+1],[K-1,K-1]),h);I=Array(M+1);for(O=0;O<=M;O++){I[O]=q[O]}G=numeric.dot(p.Q,I);for(O=0;O<=M;O++){q[O]=G[O]}I=Array(K-M-1);for(O=M+1;O<K;O++){I[O-M-1]=q[O]}G=numeric.dot(o.Q,I);for(O=M+1;O<K;O++){q[O]=G[O-M-1]}return{Q:q,B:p.B.concat(numeric.add(o.B,M+1))}}}U=z[K-2][K-2];S=z[K-2][K-1];R=z[K-1][K-2];P=z[K-1][K-1];e=U+P;n=(U*P-S*R);l=numeric.getBlock(z,[0,0],[2,2]);if(e*e>=4*n){var g,f;g=0.5*(e+Math.sqrt(e*e-4*n));f=0.5*(e-Math.sqrt(e*e-4*n));l=numeric.add(numeric.sub(numeric.dot(l,l),numeric.mul(l,g+f)),numeric.diag(numeric.rep([3],g*f)))}else{l=numeric.add(numeric.sub(numeric.dot(l,l),numeric.mul(l,e)),numeric.diag(numeric.rep([3],n)))}y=[l[0][0],l[1][0],l[2][0]];A=numeric.house(y);I=[z[0],z[1],z[2]];G=numeric.tensor(A,numeric.dot(A,I));for(O=0;O<3;O++){r=z[O];F=G[O];for(L=0;L<K;L++){r[L]-=2*F[L]}}I=numeric.getBlock(z,[0,0],[K-1,2]);G=numeric.tensor(numeric.dot(I,A),A);for(O=0;O<K;O++){r=z[O];F=G[O];for(L=0;L<3;L++){r[L]-=2*F[L]}}I=[q[0],q[1],q[2]];G=numeric.tensor(A,numeric.dot(A,I));for(O=0;O<3;O++){u=q[O];F=G[O];for(L=0;L<K;L++){u[L]-=2*F[L]}}var w;for(M=0;M<K-2;M++){for(L=M;L<=M+1;L++){if(Math.abs(z[L+1][L])<V*(Math.abs(z[L][L])+Math.abs(z[L+1][L+1]))){var p=numeric.QRFrancis(numeric.getBlock(z,[0,0],[L,L]),h);var o=numeric.QRFrancis(numeric.getBlock(z,[L+1,L+1],[K-1,K-1]),h);I=Array(L+1);for(O=0;O<=L;O++){I[O]=q[O]}G=numeric.dot(p.Q,I);for(O=0;O<=L;O++){q[O]=G[O]}I=Array(K-L-1);for(O=L+1;O<K;O++){I[O-L-1]=q[O]}G=numeric.dot(o.Q,I);for(O=L+1;O<K;O++){q[O]=G[O-L-1]}return{Q:q,B:p.B.concat(numeric.add(o.B,L+1))}}}w=Math.min(K-1,M+3);y=Array(w-M);for(O=M+1;O<=w;O++){y[O-M-1]=z[O][M]}A=numeric.house(y);I=numeric.getBlock(z,[M+1,M],[w,K-1]);G=numeric.tensor(A,numeric.dot(A,I));for(O=M+1;O<=w;O++){r=z[O];F=G[O-M-1];for(L=M;L<K;L++){r[L]-=2*F[L-M]}}I=numeric.getBlock(z,[0,M+1],[K-1,w]);G=numeric.tensor(numeric.dot(I,A),A);for(O=0;O<K;O++){r=z[O];F=G[O];for(L=M+1;L<=w;L++){r[L]-=2*F[L-M-1]}}I=Array(w-M);for(O=M+1;O<=w;O++){I[O-M-1]=q[O]}G=numeric.tensor(A,numeric.dot(A,I));for(O=M+1;O<=w;O++){u=q[O];F=G[O-M-1];for(L=0;L<K;L++){u[L]-=2*F[L]}}}}throw new Error("numeric: eigenvalue iteration does not converge -- increase maxiter?")};numeric.eig=function eig(L,l){var f=numeric.toUpperHessenberg(L);var o=numeric.QRFrancis(f.H,l);var r=numeric.T;var O=L.length,W,S,V=false,J=o.B,D=numeric.dot(o.Q,numeric.dot(f.H,numeric.transpose(o.Q)));var u=new r(numeric.dot(o.Q,f.Q)),G;var P=J.length,U;var aa,Z,Y,X,h,g,e,C,z,K,I,w,v;var ab=Math.sqrt;for(S=0;S<P;S++){W=J[S][0];if(W===J[S][1]){}else{U=W+1;aa=D[W][W];Z=D[W][U];Y=D[U][W];X=D[U][U];if(Z===0&&Y===0){continue}h=-aa-X;g=aa*X-Z*Y;e=h*h-4*g;if(e>=0){if(h<0){C=-0.5*(h-ab(e))}else{C=-0.5*(h+ab(e))}w=(aa-C)*(aa-C)+Z*Z;v=Y*Y+(X-C)*(X-C);if(w>v){w=ab(w);K=(aa-C)/w;I=Z/w}else{v=ab(v);K=Y/v;I=(X-C)/v}G=new r([[I,-K],[K,I]]);u.setRows(W,U,G.dot(u.getRows(W,U)))}else{C=-0.5*h;z=0.5*ab(-e);w=(aa-C)*(aa-C)+Z*Z;v=Y*Y+(X-C)*(X-C);if(w>v){w=ab(w+z*z);K=(aa-C)/w;I=Z/w;C=0;z/=w}else{v=ab(v+z*z);K=Y/v;I=(X-C)/v;C=z/v;z=0}G=new r([[I,-K],[K,I]],[[C,z],[z,-C]]);u.setRows(W,U,G.dot(u.getRows(W,U)))}}}var s=u.dot(L).dot(u.transjugate()),O=L.length,F=numeric.T.identity(O);for(U=0;U<O;U++){if(U>0){for(S=U-1;S>=0;S--){var M=s.get([S,S]),N=s.get([U,U]);if(numeric.neq(M.x,N.x)||numeric.neq(M.y,N.y)){C=s.getRow(S).getBlock([S],[U-1]);z=F.getRow(U).getBlock([S],[U-1]);F.set([U,S],(s.get([S,U]).neg().sub(C.dot(z))).div(M.sub(N)))}else{F.setRow(U,F.getRow(S));continue}}}}for(U=0;U<O;U++){C=F.getRow(U);F.setRow(U,C.div(C.norm2()))}F=F.transpose();F=u.transjugate().dot(F);return{lambda:s.getDiag(),E:F}};numeric.ccsSparse=function ccsSparse(a){var d=a.length,b,g,f,e,k=[];for(f=d-1;f!==-1;--f){g=a[f];for(e in g){e=parseInt(e);while(e>=k.length){k[k.length]=0}if(g[e]!==0){k[e]++}}}var b=k.length;var l=Array(b+1);l[0]=0;for(f=0;f<b;++f){l[f+1]=l[f]+k[f]}var h=Array(l[b]),c=Array(l[b]);for(f=d-1;f!==-1;--f){g=a[f];for(e in g){if(g[e]!==0){k[e]--;h[l[e]+k[e]]=f;c[l[e]+k[e]]=g[e]}}}return[l,h,c]};numeric.ccsFull=function ccsFull(c){var p=c[0],o=c[1],e=c[2],r=numeric.ccsDim(c),f=r[0],d=r[1],l,h,a,q,g;var b=numeric.rep([f,d],0);for(l=0;l<d;l++){a=p[l];q=p[l+1];for(h=a;h<q;++h){b[o[h]][l]=e[h]}}return b};numeric.ccsTSolve=function ccsTSolve(p,E,f,e,g){var D=p[0],C=p[1],o=p[2],r=D.length-1,z=Math.max,q=0;if(typeof e==="undefined"){f=numeric.rep([r],0)}if(typeof e==="undefined"){e=numeric.linspace(0,f.length-1)}if(typeof g==="undefined"){g=[]}function h(b){var a;if(f[b]!==0){return}f[b]=1;for(a=D[b];a<D[b+1];++a){h(C[a])}g[q]=b;++q}var B,y,d,c,v,s,w,u,F;for(B=e.length-1;B!==-1;--B){h(e[B])}g.length=q;for(B=g.length-1;B!==-1;--B){f[g[B]]=0}for(B=e.length-1;B!==-1;--B){y=e[B];f[y]=E[y]}for(B=g.length-1;B!==-1;--B){y=g[B];d=D[y];c=z(D[y+1],d);for(v=d;v!==c;++v){if(C[v]===y){f[y]/=o[v];break}}F=f[y];for(v=d;v!==c;++v){s=C[v];if(s!==y){f[s]-=F*o[v]}}}return f};numeric.ccsDFS=function ccsDFS(a){this.k=Array(a);this.k1=Array(a);this.j=Array(a)};numeric.ccsDFS.prototype.dfs=function dfs(o,r,p,q,i,g){var d=0,l,c=i.length;var e=this.k,h=this.k1,f=this.j,a,b;if(q[o]!==0){return}q[o]=1;f[0]=o;e[0]=a=r[o];h[0]=b=r[o+1];while(1){if(a>=b){i[c]=f[d];if(d===0){return}++c;--d;a=e[d];b=h[d]}else{l=g[p[a]];if(q[l]===0){q[l]=1;e[d]=a;++d;f[d]=l;a=r[l];h[d]=b=r[l+1]}else{++a}}}};numeric.ccsLPSolve=function ccsLPSolve(s,q,h,o,g,M,p){var K=s[0],H=s[1],r=s[2],v=K.length-1,u=0;var e=q[0],d=q[1],N=q[2];var G,D,y,F,f,c,b,C,w,E,z,L;D=e[g];y=e[g+1];o.length=0;for(G=D;G<y;++G){p.dfs(M[d[G]],K,H,h,o,M)}for(G=o.length-1;G!==-1;--G){h[o[G]]=0}for(G=D;G!==y;++G){F=M[d[G]];h[F]=N[G]}for(G=o.length-1;G!==-1;--G){F=o[G];c=K[F];b=K[F+1];for(C=c;C<b;++C){if(M[H[C]]===F){h[F]/=r[C];break}}L=h[F];for(C=c;C<b;++C){w=M[H[C]];if(w!==F){h[w]-=L*r[C]}}}return h};numeric.ccsLUP1=function ccsLUP1(z,h){var D=z[0].length-1;var p=[numeric.rep([D+1],0),[],[]],l=[numeric.rep([D+1],0),[],[]];var B=p[0],y=p[1],o=p[2],E=l[0],C=l[1],r=l[2];var s=numeric.rep([D],0),w=numeric.rep([D],0);var I,G,F,f,b,Q,J,N,M,q;var g=numeric.ccsLPSolve,H=Math.max,u=Math.abs;var n=numeric.linspace(0,D-1),O=numeric.linspace(0,D-1);var v=new numeric.ccsDFS(D);if(typeof h==="undefined"){h=1}for(I=0;I<D;++I){g(p,z,s,w,I,O,v);Q=-1;J=-1;for(G=w.length-1;G!==-1;--G){F=w[G];if(F<=I){continue}N=u(s[F]);if(N>Q){J=F;Q=N}}if(u(s[I])<h*Q){G=n[I];Q=n[J];n[I]=Q;O[Q]=I;n[J]=G;O[G]=J;Q=s[I];s[I]=s[J];s[J]=Q}Q=B[I];J=E[I];M=s[I];y[Q]=n[I];o[Q]=1;++Q;for(G=w.length-1;G!==-1;--G){F=w[G];N=s[F];w[G]=0;s[F]=0;if(F<=I){C[J]=F;r[J]=N;++J}else{y[Q]=n[F];o[Q]=N/M;++Q}}B[I+1]=Q;E[I+1]=J}for(G=y.length-1;G!==-1;--G){y[G]=O[y[G]]}return{L:p,U:l,P:n,Pinv:O}};numeric.ccsDFS0=function ccsDFS0(a){this.k=Array(a);this.k1=Array(a);this.j=Array(a)};numeric.ccsDFS0.prototype.dfs=function dfs(p,s,q,r,l,h,g){var d=0,o,c=l.length;var e=this.k,i=this.k1,f=this.j,a,b;if(r[p]!==0){return}r[p]=1;f[0]=p;e[0]=a=s[h[p]];i[0]=b=s[h[p]+1];while(1){if(isNaN(a)){throw new Error("Ow!")}if(a>=b){l[c]=h[f[d]];if(d===0){return}++c;--d;a=e[d];b=i[d]}else{o=q[a];if(r[o]===0){r[o]=1;e[d]=a;++d;f[d]=o;o=h[o];a=s[o];i[d]=b=s[o+1]}else{++a}}}};numeric.ccsLPSolve0=function ccsLPSolve0(u,r,h,p,o,N,f,q){var L=u[0],K=u[1],s=u[2],w=L.length-1,v=0;var e=r[0],d=r[1],O=r[2];var H,E,z,G,g,c,b,D,x,F,C,M;E=e[o];z=e[o+1];p.length=0;for(H=E;H<z;++H){q.dfs(d[H],L,K,h,p,N,f)}for(H=p.length-1;H!==-1;--H){G=p[H];h[f[G]]=0}for(H=E;H!==z;++H){G=d[H];h[G]=O[H]}for(H=p.length-1;H!==-1;--H){G=p[H];x=f[G];c=L[G];b=L[G+1];for(D=c;D<b;++D){if(K[D]===x){h[x]/=s[D];break}}M=h[x];for(D=c;D<b;++D){h[K[D]]-=M*s[D]}h[x]=M}};numeric.ccsLUP0=function ccsLUP0(z,h){var D=z[0].length-1;var p=[numeric.rep([D+1],0),[],[]],l=[numeric.rep([D+1],0),[],[]];var B=p[0],x=p[1],o=p[2],E=l[0],C=l[1],s=l[2];var r=numeric.rep([D],0),w=numeric.rep([D],0);var I,G,F,f,b,Q,J,N,M,q;var g=numeric.ccsLPSolve0,H=Math.max,u=Math.abs;var n=numeric.linspace(0,D-1),O=numeric.linspace(0,D-1);var v=new numeric.ccsDFS0(D);if(typeof h==="undefined"){h=1}for(I=0;I<D;++I){g(p,z,r,w,I,O,n,v);Q=-1;J=-1;for(G=w.length-1;G!==-1;--G){F=w[G];if(F<=I){continue}N=u(r[n[F]]);if(N>Q){J=F;Q=N}}if(u(r[n[I]])<h*Q){G=n[I];Q=n[J];n[I]=Q;O[Q]=I;n[J]=G;O[G]=J}Q=B[I];J=E[I];M=r[n[I]];x[Q]=n[I];o[Q]=1;++Q;for(G=w.length-1;G!==-1;--G){F=w[G];N=r[n[F]];w[G]=0;r[n[F]]=0;if(F<=I){C[J]=F;s[J]=N;++J}else{x[Q]=n[F];o[Q]=N/M;++Q}}B[I+1]=Q;E[I+1]=J}for(G=x.length-1;G!==-1;--G){x[G]=O[x[G]]}return{L:p,U:l,P:n,Pinv:O}};numeric.ccsLUP=numeric.ccsLUP0;numeric.ccsDim=function ccsDim(a){return[numeric.sup(a[1])+1,a[0].length-1]};numeric.ccsGetBlock=function ccsGetBlock(D,J,I){var v=numeric.ccsDim(D),G=v[0],F=v[1];if(typeof J==="undefined"){J=numeric.linspace(0,G-1)}else{if(typeof J==="number"){J=[J]}}if(typeof I==="undefined"){I=numeric.linspace(0,F-1)}else{if(typeof I==="number"){I=[I]}}var E,b,a,g=J.length,z,e=I.length,w,H,k;var d=numeric.rep([F],0),c=[],M=[],y=[d,c,M];var L=D[0],K=D[1],C=D[2];var u=numeric.rep([G],0),h=0,f=numeric.rep([G],0);for(z=0;z<e;++z){H=I[z];var o=L[H];var l=L[H+1];for(E=o;E<l;++E){w=K[E];f[w]=1;u[w]=C[E]}for(E=0;E<g;++E){k=J[E];if(f[k]){c[h]=E;M[h]=u[J[E]];++h}}for(E=o;E<l;++E){w=K[E];f[w]=0}d[z+1]=h}return y};numeric.ccsDot=function ccsDot(D,w){var Q=D[0],P=D[1],z=D[2];var f=w[0],e=w[1],U=w[2];var O=numeric.ccsDim(D),M=numeric.ccsDim(w);var G=O[0],F=O[1],E=M[1];var q=numeric.rep([G],0),h=numeric.rep([G],0),v=Array(G);var u=numeric.rep([E],0),r=[],g=[],s=[u,r,g];var N,L,K,d,c,J,I,H,y,S,R;for(K=0;K!==E;++K){d=f[K];c=f[K+1];y=0;for(L=d;L<c;++L){S=e[L];R=U[L];J=Q[S];I=Q[S+1];for(N=J;N<I;++N){H=P[N];if(h[H]===0){v[y]=H;h[H]=1;y=y+1}q[H]=q[H]+z[N]*R}}d=u[K];c=d+y;u[K+1]=c;for(L=y-1;L!==-1;--L){R=d+L;N=v[L];r[R]=N;g[R]=q[N];h[N]=0;q[N]=0}u[K+1]=u[K]+y}return s};numeric.ccsLUPSolve=function ccsLUPSolve(l,w){var q=l.L,f=l.U,o=l.P;var h=w[0];var G=false;if(typeof h!=="object"){w=[[0,w.length],numeric.linspace(0,w.length-1),w];h=w[0];G=true}var g=w[1],I=w[2];var y=q[0].length-1,z=h.length-1;var u=numeric.rep([y],0),v=Array(y);var H=numeric.rep([y],0),e=Array(y);var D=numeric.rep([z+1],0),A=[],s=[];var d=numeric.ccsTSolve;var F,E,c,a,C,r,p=0;for(F=0;F<z;++F){C=0;c=h[F];a=h[F+1];for(E=c;E<a;++E){r=l.Pinv[g[E]];e[C]=r;H[r]=I[E];++C}e.length=C;d(q,H,u,e,v);for(E=e.length-1;E!==-1;--E){H[e[E]]=0}d(f,u,H,v,e);if(G){return H}for(E=v.length-1;E!==-1;--E){u[v[E]]=0}for(E=e.length-1;E!==-1;--E){r=e[E];A[p]=r;s[p]=H[r];H[r]=0;++p}D[F+1]=p}return[D,A,s]};numeric.ccsbinop=function ccsbinop(b,a){if(typeof a==="undefined"){a=""}return Function("X","Y","var Xi = X[0], Xj = X[1], Xv = X[2];\nvar Yi = Y[0], Yj = Y[1], Yv = Y[2];\nvar n = Xi.length-1,m = Math.max(numeric.sup(Xj),numeric.sup(Yj))+1;\nvar Zi = numeric.rep([n+1],0), Zj = [], Zv = [];\nvar x = numeric.rep([m],0),y = numeric.rep([m],0);\nvar xk,yk,zk;\nvar i,j,j0,j1,k,p=0;\n"+a+"for(i=0;i<n;++i) {\n  j0 = Xi[i]; j1 = Xi[i+1];\n  for(j=j0;j!==j1;++j) {\n    k = Xj[j];\n    x[k] = 1;\n    Zj[p] = k;\n    ++p;\n  }\n  j0 = Yi[i]; j1 = Yi[i+1];\n  for(j=j0;j!==j1;++j) {\n    k = Yj[j];\n    y[k] = Yv[j];\n    if(x[k] === 0) {\n      Zj[p] = k;\n      ++p;\n    }\n  }\n  Zi[i+1] = p;\n  j0 = Xi[i]; j1 = Xi[i+1];\n  for(j=j0;j!==j1;++j) x[Xj[j]] = Xv[j];\n  j0 = Zi[i]; j1 = Zi[i+1];\n  for(j=j0;j!==j1;++j) {\n    k = Zj[j];\n    xk = x[k];\n    yk = y[k];\n"+b+"\n    Zv[j] = zk;\n  }\n  j0 = Xi[i]; j1 = Xi[i+1];\n  for(j=j0;j!==j1;++j) x[Xj[j]] = 0;\n  j0 = Yi[i]; j1 = Yi[i+1];\n  for(j=j0;j!==j1;++j) y[Yj[j]] = 0;\n}\nreturn [Zi,Zj,Zv];")};(function(){var k,A,B,C;for(k in numeric.ops2){if(isFinite(eval("1"+numeric.ops2[k]+"0"))){A="[Y[0],Y[1],numeric."+k+"(X,Y[2])]"}else{A="NaN"}if(isFinite(eval("0"+numeric.ops2[k]+"1"))){B="[X[0],X[1],numeric."+k+"(X[2],Y)]"}else{B="NaN"}if(isFinite(eval("1"+numeric.ops2[k]+"0"))&&isFinite(eval("0"+numeric.ops2[k]+"1"))){C="numeric.ccs"+k+"MM(X,Y)"}else{C="NaN"}numeric["ccs"+k+"MM"]=numeric.ccsbinop("zk = xk "+numeric.ops2[k]+"yk;");numeric["ccs"+k]=Function("X","Y",'if(typeof X === "number") return '+A+';\nif(typeof Y === "number") return '+B+";\nreturn "+C+";\n")}}());numeric.ccsScatter=function ccsScatter(c){var p=c[0],o=c[1],e=c[2];var d=numeric.sup(o)+1,f=p.length;var r=numeric.rep([d],0),q=Array(f),h=Array(f);var l=numeric.rep([d],0),j;for(j=0;j<f;++j){l[o[j]]++}for(j=0;j<d;++j){r[j+1]=r[j]+l[j]}var b=r.slice(0),g,a;for(j=0;j<f;++j){a=o[j];g=b[a];q[g]=p[j];h[g]=e[j];b[a]=b[a]+1}return[r,q,h]};numeric.ccsGather=function ccsGather(c){var o=c[0],l=c[1],e=c[2];var d=o.length-1,f=l.length;var r=Array(f),q=Array(f),g=Array(f);var k,h,a,s,b;b=0;for(k=0;k<d;++k){a=o[k];s=o[k+1];for(h=a;h!==s;++h){q[b]=k;r[b]=l[h];g[b]=e[h];++b}}return[r,q,g]};numeric.sdim=function dim(a,c,b){if(typeof c==="undefined"){c=[]}if(typeof a!=="object"){return c}if(typeof b==="undefined"){b=0}if(!(b in c)){c[b]=0}if(a.length>c[b]){c[b]=a.length}var d;for(d in a){if(a.hasOwnProperty(d)){dim(a[d],c,b+1)}}return c};numeric.sclone=function clone(a,b,e){if(typeof b==="undefined"){b=0}if(typeof e==="undefined"){e=numeric.sdim(a).length}var d,c=Array(a.length);if(b===e-1){for(d in a){if(a.hasOwnProperty(d)){c[d]=a[d]}}return c}for(d in a){if(a.hasOwnProperty(d)){c[d]=clone(a[d],b+1,e)}}return c};numeric.sdiag=function diag(g){var h=g.length,c,a=Array(h),f,e,b;for(c=h-1;c>=1;c-=2){f=c-1;a[c]=[];a[c][c]=g[c];a[f]=[];a[f][f]=g[f]}if(c===0){a[0]=[];a[0][0]=g[c]}return a};numeric.sidentity=function identity(a){return numeric.sdiag(numeric.rep([a],1))};numeric.stranspose=function transpose(a){var d=[],f=a.length,e,c,b;for(e in a){if(!(a.hasOwnProperty(e))){continue}b=a[e];for(c in b){if(!(b.hasOwnProperty(c))){continue}if(typeof d[c]!=="object"){d[c]=[]}d[c][e]=b[c]}}return d};numeric.sLUP=function LUP(a,b){throw new Error("The function numeric.sLUP had a bug in it and has been removed. Please use the new numeric.ccsLUP function instead.")};numeric.sdotMM=function dotMM(e,c){var d=e.length,b=c.length,l=numeric.stranspose(c),a=l.length,u,n;var m,h,g,s;var o=Array(d),f;for(m=d-1;m>=0;m--){f=[];u=e[m];for(g=a-1;g>=0;g--){s=0;n=l[g];for(h in u){if(!(u.hasOwnProperty(h))){continue}if(h in n){s+=u[h]*n[h]}}if(s){f[g]=s}}o[m]=f}return o};numeric.sdotMV=function dotMV(b,a){var h=b.length,d,g,f;var e=Array(h),c;for(g=h-1;g>=0;g--){d=b[g];c=0;for(f in d){if(!(d.hasOwnProperty(f))){continue}if(a[f]){c+=d[f]*a[f]}}if(c){e[g]=c}}return e};numeric.sdotVM=function dotMV(b,a){var g,f,d,h;var e=[],c;for(g in b){if(!b.hasOwnProperty(g)){continue}d=a[g];h=b[g];for(f in d){if(!d.hasOwnProperty(f)){continue}if(!e[f]){e[f]=0}e[f]+=h*d[f]}}return e};numeric.sdotVV=function dotVV(a,d){var c,b=0;for(c in a){if(a[c]&&d[c]){b+=a[c]*d[c]}}return b};numeric.sdot=function dot(b,e){var a=numeric.sdim(b).length,d=numeric.sdim(e).length;var c=a*1000+d;switch(c){case 0:return b*e;case 1001:return numeric.sdotVV(b,e);case 2001:return numeric.sdotMV(b,e);case 1002:return numeric.sdotVM(b,e);case 2002:return numeric.sdotMM(b,e);default:throw new Error("numeric.sdot not implemented for tensors of order "+a+" and "+d)}};numeric.sscatter=function scatter(e){var h=e[0].length,d,g,f,b=e.length,a=[],c;for(g=h-1;g>=0;--g){if(!e[b-1][g]){continue}c=a;for(f=0;f<b-2;f++){d=e[f][g];if(!c[d]){c[d]=[]}c=c[d]}c[e[f][g]]=e[f+1][g]}return a};numeric.sgather=function gather(a,d,c){if(typeof d==="undefined"){d=[]}if(typeof c==="undefined"){c=[]}var f,e,b;f=c.length;for(e in a){if(a.hasOwnProperty(e)){c[f]=parseInt(e);b=a[e];if(typeof b==="number"){if(b){if(d.length===0){for(e=f+1;e>=0;--e){d[e]=[]}}for(e=f;e>=0;--e){d[e].push(c[e])}d[f+1].push(b)}}else{gather(b,d,c)}}}if(c.length>f){c.pop()}return d};numeric.cLU=function LU(w){var r=w[0],o=w[1],d=w[2];var x=r.length,B=0,G,F,E,O,N,M;for(G=0;G<x;G++){if(r[G]>B){B=r[G]}}B++;var l=Array(B),e=Array(B),f=numeric.rep([B],Infinity),K=numeric.rep([B],-Infinity);var C,z,g;for(E=0;E<x;E++){G=r[E];F=o[E];if(F<f[G]){f[G]=F}if(F>K[G]){K[G]=F}}for(G=0;G<B-1;G++){if(K[G]>K[G+1]){K[G+1]=K[G]}}for(G=B-1;G>=1;G--){if(f[G]<f[G-1]){f[G-1]=f[G]}}var D=0,s=0;for(G=0;G<B;G++){e[G]=numeric.rep([K[G]-f[G]+1],0);l[G]=numeric.rep([G-f[G]],0);D+=G-f[G]+1;s+=K[G]-G+1}for(E=0;E<x;E++){G=r[E];e[G][o[E]-f[G]]=d[E]}for(G=0;G<B-1;G++){O=G-f[G];C=e[G];for(F=G+1;f[F]<=G&&F<B;F++){N=G-f[F];M=K[G]-G;z=e[F];g=z[N]/C[O];if(g){for(E=1;E<=M;E++){z[E+N]-=g*C[E+O]}l[F][G-f[F]]=g}}}var C=[],z=[],n=[],y=[],v=[],h=[];var x,u,H;x=0;u=0;for(G=0;G<B;G++){O=f[G];N=K[G];H=e[G];for(F=G;F<=N;F++){if(H[F-O]){C[x]=G;z[x]=F;n[x]=H[F-O];x++}}H=l[G];for(F=O;F<G;F++){if(H[F-O]){y[u]=G;v[u]=F;h[u]=H[F-O];u++}}y[u]=G;v[u]=G;h[u]=1;u++}return{U:[C,z,n],L:[y,v,h]}};numeric.cLUsolve=function LUsolve(h,u){var s=h.L,f=h.U,r=numeric.clone(u);var y=s[0],x=s[1],o=s[2];var w=f[0],v=f[1],e=f[2];var c=w.length,a=y.length;var d=r.length,n,l,g;g=0;for(n=0;n<d;n++){while(x[g]<n){r[n]-=o[g]*r[x[g]];g++}g++}g=c-1;for(n=d-1;n>=0;n--){while(v[g]>n){r[n]-=e[g]*r[v[g]];g--}r[n]/=e[g];g--}return r};numeric.cgrid=function grid(f,a){if(typeof f==="number"){f=[f,f]}var c=numeric.rep(f,-1);var d,b,e;if(typeof a!=="function"){switch(a){case"L":a=function(h,g){return(h>=f[0]/2||g<f[1]/2)};break;default:a=function(h,g){return true};break}}e=0;for(d=1;d<f[0]-1;d++){for(b=1;b<f[1]-1;b++){if(a(d,b)){c[d][b]=e;e++}}}return c};numeric.cdelsq=function delsq(r){var d=[[-1,0],[0,-1],[0,1],[1,0]];var w=numeric.dim(r),e=w[0],c=w[1],o,h,f,b,a;var v=[],u=[],l=[];for(o=1;o<e-1;o++){for(h=1;h<c-1;h++){if(r[o][h]<0){continue}for(f=0;f<4;f++){b=o+d[f][0];a=h+d[f][1];if(r[b][a]<0){continue}v.push(r[o][h]);u.push(r[b][a]);l.push(-1)}v.push(r[o][h]);u.push(r[o][h]);l.push(4)}}return[v,u,l]};numeric.cdotMV=function dotMV(b,h){var f,i=b[0],g=b[1],c=b[2],d,a=i.length,e;e=0;for(d=0;d<a;d++){if(i[d]>e){e=i[d]}}e++;f=numeric.rep([e],0);for(d=0;d<a;d++){f[i[d]]+=c[d]*h[g[d]]}return f};numeric.Spline=function Spline(b,c,e,d,a){this.x=b;this.yl=c;this.yr=e;this.kl=d;this.kr=a};numeric.Spline.prototype._at=function _at(f,e){var k=this.x;var g=this.yl;var o=this.yr;var d=this.kl;var l=this.kr;var f,j,i,n;var m=numeric.add,c=numeric.sub,h=numeric.mul;j=c(h(d[e],k[e+1]-k[e]),c(o[e+1],g[e]));i=m(h(l[e+1],k[e]-k[e+1]),c(o[e+1],g[e]));n=(f-k[e])/(k[e+1]-k[e]);var q=n*(1-n);return m(m(m(h(1-n,g[e]),h(n,o[e+1])),h(j,q*(1-n))),h(i,q*n))};numeric.Spline.prototype.at=function at(e){if(typeof e==="number"){var m=this.x;var f=m.length;var d,c,o,h=Math.floor,l,k,r;d=0;c=f-1;while(c-d>1){o=h((d+c)/2);if(m[o]<=e){d=o}else{c=o}}return this._at(e,d)}var f=e.length,g,j=Array(f);for(g=f-1;g!==-1;--g){j[g]=this.at(e[g])}return j};numeric.Spline.prototype.diff=function diff(){var l=this.x;var f=this.yl;var r=this.yr;var d=this.kl;var m=this.kr;var e=f.length;var j,s,q;var o=d,k=m,h=Array(e),c=Array(e);var p=numeric.add,g=numeric.mul,b=numeric.div,a=numeric.sub;for(j=e-1;j!==-1;--j){s=l[j+1]-l[j];q=a(r[j+1],f[j]);h[j]=b(p(g(q,6),g(d[j],-4*s),g(m[j+1],-2*s)),s*s);c[j+1]=b(p(g(q,-6),g(d[j],2*s),g(m[j+1],4*s)),s*s)}return new numeric.Spline(l,o,k,h,c)};numeric.Spline.prototype.roots=function roots(){function C(i){return i*i}function u(D,n,m,k,y){var j=m*2-(n-D);var i=-k*2+(n-D);var aa=(y+1)*0.5;var ab=aa*(1-aa);return(1-aa)*D+aa*n+j*ab*(1-aa)+i*ab*aa}var E=[];var M=this.x,p=this.yl,h=this.yr,X=this.kl,S=this.kr;if(typeof p[0]==="number"){p=[p];h=[h];X=[X];S=[S]}var Q=p.length,P=M.length-1,V,U,R,L,O,N;var d,W,z,e,E=Array(Q),J,w,v,a,Z,l,g,f,c,q,r,I,H,b,G,F,Y;var K=Math.sqrt;for(V=0;V!==Q;++V){d=p[V];W=h[V];z=X[V];e=S[V];J=[];for(U=0;U!==P;U++){if(U>0&&W[U]*d[U]<0){J.push(M[U])}c=(M[U+1]-M[U]);q=M[U];a=d[U];Z=W[U+1];w=z[U]/c;v=e[U+1]/c;f=C(w-v+3*(a-Z))+12*v*a;l=v+3*a+2*w-3*Z;g=3*(v+w+2*(a-Z));if(f<=0){I=l/g;if(I>M[U]&&I<M[U+1]){r=[M[U],I,M[U+1]]}else{r=[M[U],M[U+1]]}}else{I=(l-K(f))/g;H=(l+K(f))/g;r=[M[U]];if(I>M[U]&&I<M[U+1]){r.push(I)}if(H>M[U]&&H<M[U+1]){r.push(H)}r.push(M[U+1])}G=r[0];I=this._at(G,U);for(R=0;R<r.length-1;R++){F=r[R+1];H=this._at(F,U);if(I===0){J.push(G);G=F;I=H;continue}if(H===0||I*H>0){G=F;I=H;continue}var o=0;while(1){Y=(I*F-H*G)/(I-H);if(Y<=G||Y>=F){break}b=this._at(Y,U);if(b*H>0){F=Y;H=b;if(o===-1){I*=0.5}o=-1}else{if(b*I>0){G=Y;I=b;if(o===1){H*=0.5}o=1}else{break}}}J.push(Y);G=r[R+1];I=this._at(G,U)}if(H===0){J.push(F)}}E[V]=J}if(typeof this.yl[0]==="number"){return E[0]}return E};numeric.spline=function spline(m,j,h,q){var c=m.length,l=[],r=[],p=[];var g;var a=numeric.sub,d=numeric.mul,o=numeric.add;for(g=c-2;g>=0;g--){r[g]=m[g+1]-m[g];p[g]=a(j[g+1],j[g])}if(typeof h==="string"||typeof q==="string"){h=q="periodic"}var f=[[],[],[]];switch(typeof h){case"undefined":l[0]=d(3/(r[0]*r[0]),p[0]);f[0].push(0,0);f[1].push(0,1);f[2].push(2/r[0],1/r[0]);break;case"string":l[0]=o(d(3/(r[c-2]*r[c-2]),p[c-2]),d(3/(r[0]*r[0]),p[0]));f[0].push(0,0,0);f[1].push(c-2,0,1);f[2].push(1/r[c-2],2/r[c-2]+2/r[0],1/r[0]);break;default:l[0]=h;f[0].push(0);f[1].push(0);f[2].push(1);break}for(g=1;g<c-1;g++){l[g]=o(d(3/(r[g-1]*r[g-1]),p[g-1]),d(3/(r[g]*r[g]),p[g]));f[0].push(g,g,g);f[1].push(g-1,g,g+1);f[2].push(1/r[g-1],2/r[g-1]+2/r[g],1/r[g])}switch(typeof q){case"undefined":l[c-1]=d(3/(r[c-2]*r[c-2]),p[c-2]);f[0].push(c-1,c-1);f[1].push(c-2,c-1);f[2].push(1/r[c-2],2/r[c-2]);break;case"string":f[1][f[1].length-1]=0;break;default:l[c-1]=q;f[0].push(c-1);f[1].push(c-1);f[2].push(1);break}if(typeof l[0]!=="number"){l=numeric.transpose(l)}else{l=[l]}var e=Array(l.length);if(typeof h==="string"){for(g=e.length-1;g!==-1;--g){e[g]=numeric.ccsLUPSolve(numeric.ccsLUP(numeric.ccsScatter(f)),l[g]);e[g][c-1]=e[g][0]}}else{for(g=e.length-1;g!==-1;--g){e[g]=numeric.cLUsolve(numeric.cLU(f),l[g])}}if(typeof j[0]==="number"){e=e[0]}else{e=numeric.transpose(e)}return new numeric.Spline(m,j,j,e,e)};numeric.fftpow2=function fftpow2(o,m){var b=o.length;if(b===1){return}var q=Math.cos,l=Math.sin,g,d;var p=Array(b/2),h=Array(b/2),f=Array(b/2),a=Array(b/2);d=b/2;for(g=b-1;g!==-1;--g){--d;f[d]=o[g];a[d]=m[g];--g;p[d]=o[g];h[d]=m[g]}fftpow2(p,h);fftpow2(f,a);d=b/2;var r,c=(-6.283185307179586/b),s,e;for(g=b-1;g!==-1;--g){--d;if(d===-1){d=b/2-1}r=c*g;s=q(r);e=l(r);o[g]=p[d]+s*f[d]-e*a[d];m[g]=h[d]+s*a[d]+e*f[d]}};numeric._ifftpow2=function _ifftpow2(o,m){var b=o.length;if(b===1){return}var q=Math.cos,l=Math.sin,g,d;var p=Array(b/2),h=Array(b/2),f=Array(b/2),a=Array(b/2);d=b/2;for(g=b-1;g!==-1;--g){--d;f[d]=o[g];a[d]=m[g];--g;p[d]=o[g];h[d]=m[g]}_ifftpow2(p,h);_ifftpow2(f,a);d=b/2;var r,c=(6.283185307179586/b),s,e;for(g=b-1;g!==-1;--g){--d;if(d===-1){d=b/2-1}r=c*g;s=q(r);e=l(r);o[g]=p[d]+s*f[d]-e*a[d];m[g]=h[d]+s*a[d]+e*f[d]}};numeric.ifftpow2=function ifftpow2(a,b){numeric._ifftpow2(a,b);numeric.diveq(a,a.length);numeric.diveq(b,b.length)};numeric.convpow2=function convpow2(a,j,g,f){numeric.fftpow2(a,j);numeric.fftpow2(g,f);var d,b=a.length,h,k,c,e;for(d=b-1;d!==-1;--d){h=a[d];c=j[d];k=g[d];e=f[d];a[d]=h*k-c*e;j[d]=h*e+c*k}numeric.ifftpow2(a,j)};numeric.T.prototype.fft=function fft(){var o=this.x,l=this.y;var v=o.length,j=Math.log,q=j(2),u=Math.ceil(j(2*v-1)/q),w=Math.pow(2,u);var i=numeric.rep([w],0),h=numeric.rep([w],0),f=Math.cos,d=Math.sin;var z,A=(-3.141592653589793/v),r;var C=numeric.rep([w],0),B=numeric.rep([w],0),s=Math.floor(v/2);for(z=0;z<v;z++){C[z]=o[z]}if(typeof l!=="undefined"){for(z=0;z<v;z++){B[z]=l[z]}}i[0]=1;for(z=1;z<=w/2;z++){r=A*z*z;i[z]=f(r);h[z]=d(r);i[w-z]=f(r);h[w-z]=d(r)}var g=new numeric.T(C,B),e=new numeric.T(i,h);g=g.mul(e);numeric.convpow2(g.x,g.y,numeric.clone(e.x),numeric.neg(e.y));g=g.mul(e);g.x.length=v;g.y.length=v;return g};numeric.T.prototype.ifft=function ifft(){var o=this.x,l=this.y;var v=o.length,j=Math.log,q=j(2),u=Math.ceil(j(2*v-1)/q),w=Math.pow(2,u);var i=numeric.rep([w],0),h=numeric.rep([w],0),f=Math.cos,d=Math.sin;var z,A=(3.141592653589793/v),r;var C=numeric.rep([w],0),B=numeric.rep([w],0),s=Math.floor(v/2);for(z=0;z<v;z++){C[z]=o[z]}if(typeof l!=="undefined"){for(z=0;z<v;z++){B[z]=l[z]}}i[0]=1;for(z=1;z<=w/2;z++){r=A*z*z;i[z]=f(r);h[z]=d(r);i[w-z]=f(r);h[w-z]=d(r)}var g=new numeric.T(C,B),e=new numeric.T(i,h);g=g.mul(e);numeric.convpow2(g.x,g.y,numeric.clone(e.x),numeric.neg(e.y));g=g.mul(e);g.x.length=v;g.y.length=v;return g.div(v)};numeric.gradient=function gradient(A,k){var r=k.length;var u=A(k);if(isNaN(u)){throw new Error("gradient: f(x) is a NaN!")}var w=Math.max;var y,B=numeric.clone(k),s,q,g=Array(r);var o=numeric.div,d=numeric.sub,a,C,w=Math.max,m=0.001,p=Math.abs,v=Math.min;var l,j,e,b=0,E,D,c;for(y=0;y<r;y++){var z=w(0.000001*u,1e-8);while(1){++b;if(b>20){throw new Error("Numerical gradient fails")}B[y]=k[y]+z;s=A(B);B[y]=k[y]-z;q=A(B);B[y]=k[y];if(isNaN(s)||isNaN(q)){z/=16;continue}g[y]=(s-q)/(2*z);l=k[y]-z;j=k[y];e=k[y]+z;E=(s-u)/z;D=(u-q)/z;c=w(p(g[y]),p(u),p(s),p(q),p(l),p(j),p(e),1e-8);a=v(w(p(E-g[y]),p(D-g[y]),p(E-D))/c,z/c);if(a>m){z/=16}else{break}}}return g};numeric.uncmin=function uncmin(U,p,g,q,D,K,z){var r=numeric.gradient;if(typeof z==="undefined"){z={}}if(typeof g==="undefined"){g=1e-8}if(typeof q==="undefined"){q=function(f){return r(U,f)}}if(typeof D==="undefined"){D=1000}p=numeric.clone(p);var O=p.length;var e=U(p),d,G;if(isNaN(e)){throw new Error("uncmin: f(x0) is a NaN!")}var w=Math.max,c=numeric.norm2;g=w(g,numeric.epsilon);var H,Q,P,W=z.Hinv||numeric.identity(O);var V=numeric.dot,I=numeric.inv,x=numeric.sub,b=numeric.add,v=numeric.tensor,S=numeric.div,a=numeric.mul;var u=numeric.all,A=numeric.isFinite,h=numeric.neg;var B=0,R,N,o,J,k,l,m,j,M,C,F,E;var L="";Q=q(p);while(B<D){if(typeof K==="function"){if(K(B,p,e,Q,W)){L="Callback returned true";break}}if(!u(A(Q))){L="Gradient has Infinity or NaN";break}H=h(V(W,Q));if(!u(A(H))){L="Search direction has Infinity or NaN";break}C=c(H);if(C<g){L="Newton step smaller than tol";break}M=1;G=V(Q,H);o=p;while(B<D){if(M*C<g){break}N=a(H,M);o=b(p,N);d=U(o);if(d-e>=0.1*M*G||isNaN(d)){M*=0.5;++B;continue}break}if(M*C<g){L="Line search step size smaller than tol";break}if(B===D){L="maxit reached during line search";break}P=q(o);J=x(P,Q);m=V(J,N);k=V(W,J);W=x(b(W,a((m+V(J,k))/(m*m),v(N,N))),S(b(v(k,N),v(N,k)),m));p=o;e=d;Q=P;++B}return{solution:p,f:e,gradient:Q,invHessian:W,iterations:B,message:L}};numeric.Dopri=function Dopri(a,h,e,b,d,g,c){this.x=a;this.y=h;this.f=e;this.ymid=b;this.iterations=d;this.events=c;this.message=g};numeric.Dopri.prototype._at=function _at(o,x){function s(c){return c*c}var a=this;var g=a.x;var v=a.y;var f=a.f;var E=a.ymid;var u=g.length;var C,A,r,d,b,F,o;var y=Math.floor,z;var D=0.5;var k=numeric.add,B=numeric.mul,e=numeric.sub,m,l,i;C=g[x];A=g[x+1];d=v[x];b=v[x+1];z=A-C;r=C+D*z;F=E[x];m=e(f[x],B(d,1/(C-r)+2/(C-A)));l=e(f[x+1],B(b,1/(A-r)+2/(A-C)));i=[s(o-A)*(o-r)/s(C-A)/(C-r),s(o-C)*s(o-A)/s(C-r)/s(A-r),s(o-C)*(o-r)/s(A-C)/(A-r),(o-C)*s(o-A)*(o-r)/s(C-A)/(C-r),(o-A)*s(o-C)*(o-r)/s(C-A)/(A-r)];return k(k(k(k(B(d,i[0]),B(F,i[1])),B(b,i[2])),B(m,i[3])),B(l,i[4]))};numeric.Dopri.prototype.at=function at(a){var f,d,b,g=Math.floor;if(typeof a!=="number"){var h=a.length,c=Array(h);for(f=h-1;f!==-1;--f){c[f]=this.at(a[f])}return c}var e=this.x;f=0;d=e.length-1;while(d-f>1){b=g(0.5*(f+d));if(e[b]<=a){f=b}else{d=b}}return this._at(a,f)};numeric.dopri=function dopri(w,u,a,ah,l,Q,ao){if(typeof l==="undefined"){l=0.000001}if(typeof Q==="undefined"){Q=1000}var S=[w],s=[a],N=[ah(w,a)],M,K,J,G,D,C,X=[];var q=1/5;var p=[3/40,9/40];var o=[44/45,-56/15,32/9];var n=[19372/6561,-25360/2187,64448/6561,-212/729];var m=[9017/3168,-355/33,46732/5247,49/176,-5103/18656];var an=[35/384,0,500/1113,125/192,-2187/6784,11/84];var ac=[0.5*6025192743/30085553152,0,0.5*51252292925/65400821598,0.5*-2691868925/45128329728,0.5*187940372067/1594534317056,0.5*-1776094331/19743644256,0.5*11237099/235043384];var al=[1/5,3/10,4/5,8/9,1,1];var aj=[-71/57600,0,71/16695,-71/1920,17253/339200,-22/525,1/40];var af=0,ab,ae;var ag=(u-w)/10;var E=0;var k=numeric.add,g=numeric.mul,ap,d;var z=Math.max,ak=Math.min,O=Math.abs,am=numeric.norminf,L=Math.pow;var P=numeric.any,I=numeric.lt,aa=numeric.and,B=numeric.sub;var H,F,Z;var R=new numeric.Dopri(S,s,N,X,-1,"");if(typeof ao==="function"){H=ao(w,a)}while(w<u&&E<Q){++E;if(w+ag>u){ag=u-w}M=ah(w+al[0]*ag,k(a,g(q*ag,N[af])));K=ah(w+al[1]*ag,k(k(a,g(p[0]*ag,N[af])),g(p[1]*ag,M)));J=ah(w+al[2]*ag,k(k(k(a,g(o[0]*ag,N[af])),g(o[1]*ag,M)),g(o[2]*ag,K)));G=ah(w+al[3]*ag,k(k(k(k(a,g(n[0]*ag,N[af])),g(n[1]*ag,M)),g(n[2]*ag,K)),g(n[3]*ag,J)));D=ah(w+al[4]*ag,k(k(k(k(k(a,g(m[0]*ag,N[af])),g(m[1]*ag,M)),g(m[2]*ag,K)),g(m[3]*ag,J)),g(m[4]*ag,G)));ap=k(k(k(k(k(a,g(N[af],ag*an[0])),g(K,ag*an[2])),g(J,ag*an[3])),g(G,ag*an[4])),g(D,ag*an[5]));C=ah(w+ag,ap);ab=k(k(k(k(k(g(N[af],ag*aj[0]),g(K,ag*aj[2])),g(J,ag*aj[3])),g(G,ag*aj[4])),g(D,ag*aj[5])),g(C,ag*aj[6]));if(typeof ab==="number"){d=O(ab)}else{d=am(ab)}if(d>l){ag=0.2*ag*L(l/d,0.25);if(w+ag===w){R.msg="Step size became too small";break}continue}X[af]=k(k(k(k(k(k(a,g(N[af],ag*ac[0])),g(K,ag*ac[2])),g(J,ag*ac[3])),g(G,ag*ac[4])),g(D,ag*ac[5])),g(C,ag*ac[6]));++af;S[af]=w+ag;s[af]=ap;N[af]=C;if(typeof ao==="function"){var y,V=w,U=w+0.5*ag,W;F=ao(U,X[af-1]);Z=aa(I(H,0),I(0,F));if(!P(Z)){V=U;U=w+ag;H=F;F=ao(U,ap);Z=aa(I(H,0),I(0,F))}if(P(Z)){var Y,A,ad,ai;var x=0,v=1,r=1;while(1){if(typeof H==="number"){W=(r*F*V-v*H*U)/(r*F-v*H)}else{W=U;for(ae=H.length-1;ae!==-1;--ae){if(H[ae]<0&&F[ae]>0){W=ak(W,(r*F[ae]*V-v*H[ae]*U)/(r*F[ae]-v*H[ae]))}}}if(W<=V||W>=U){break}y=R._at(W,af-1);ai=ao(W,y);ad=aa(I(H,0),I(0,ai));if(P(ad)){U=W;F=ai;Z=ad;r=1;if(x===-1){v*=0.5}else{v=1}x=-1}else{V=W;H=ai;v=1;if(x===1){r*=0.5}else{r=1}x=1}}ap=R._at(0.5*(w+W),af-1);R.f[af]=ah(W,y);R.x[af]=W;R.y[af]=y;R.ymid[af-1]=ap;R.events=Z;R.iterations=E;return R}}w+=ag;a=ap;H=F;ag=ak(0.8*ag*L(l/d,0.25),4*ag)}R.iterations=E;return R};numeric.LU=function(a,g){g=g||false;var s=Math.abs;var f,e,d,r,c,p,l,q;var o;var b=a.length,m=b-1;var h=new Array(b);if(!g){a=numeric.clone(a)}for(d=0;d<b;++d){l=d;p=a[d];o=s(p[d]);for(e=d+1;e<b;++e){r=s(a[e][d]);if(o<r){o=r;l=e}}h[d]=l;if(l!=d){a[d]=a[l];a[l]=p;p=a[d]}c=p[d];for(f=d+1;f<b;++f){a[f][d]/=c}for(f=d+1;f<b;++f){q=a[f];for(e=d+1;e<m;++e){q[e]-=q[d]*p[e];++e;q[e]-=q[d]*p[e]}if(e===m){q[e]-=q[d]*p[e]}}}return{LU:a,P:h}};numeric.LUsolve=function LUsolve(g,m){var f,d;var p=g.LU;var a=p.length;var o=numeric.clone(m);var h=g.P;var l,c,k,e;for(f=a-1;f!==-1;--f){o[f]=m[f]}for(f=0;f<a;++f){l=h[f];if(h[f]!==f){e=o[f];o[f]=o[l];o[l]=e}c=p[f];for(d=0;d<f;++d){o[f]-=o[d]*c[d]}}for(f=a-1;f>=0;--f){c=p[f];for(d=f+1;d<a;++d){o[f]-=o[d]*c[d]}o[f]/=c[f]}return o};numeric.solve=function solve(c,a,d){return numeric.LUsolve(numeric.LU(c,d),a)};numeric.echelonize=function echelonize(d){var y=numeric.dim(d),f=y[0],e=y[1];var w=numeric.identity(f);var r=Array(f);var p,o,h,g,v,b,c,u;var x=Math.abs;var q=numeric.diveq;d=numeric.clone(d);for(p=0;p<f;++p){h=0;v=d[p];b=w[p];for(o=1;o<e;++o){if(x(v[h])<x(v[o])){h=o}}r[p]=h;q(b,v[h]);q(v,v[h]);for(o=0;o<f;++o){if(o!==p){c=d[o];u=c[h];for(g=e-1;g!==-1;--g){c[g]-=v[g]*u}c=w[o];for(g=f-1;g!==-1;--g){c[g]-=b[g]*u}}}}return{I:w,A:d,P:r}};numeric.__solveLP=function __solveLP(ao,C,ar,r,O,Y,P){var E=numeric.sum,o=numeric.log,f=numeric.mul,J=numeric.sub,au=numeric.dot,al=numeric.div,h=numeric.add;var af=ao.length,ae=ar.length,X;var K=false,S,u=0;var ag=1;var q,Q,aj=numeric.transpose(C),k=numeric.svd,I=numeric.transpose,D=numeric.leq,V=Math.sqrt,M=Math.abs;var L=numeric.muleq;var aq=numeric.norminf,N=numeric.any,ap=Math.min;var F=numeric.all,l=numeric.gt;var ac=Array(af),B=Array(ae),am=numeric.rep([ae],1),v;var a=numeric.solve,W=J(ar,au(C,Y)),ab;var G=au(ao,ao);var ak;for(ab=u;ab<O;++ab){var ai,ah,an;for(ai=ae-1;ai!==-1;--ai){B[ai]=al(C[ai],W[ai])}var w=I(B);for(ai=af-1;ai!==-1;--ai){ac[ai]=(E(w[ai]))}ag=0.25*M(G/au(ao,ac));var ad=100*V(G/au(ac,ac));if(!isFinite(ag)||ag>ad){ag=ad}ak=h(ao,f(ag,ac));v=au(w,B);for(ai=af-1;ai!==-1;--ai){v[ai][ai]+=1}an=a(v,al(ak,ag),true);var R=al(W,au(C,an));var Z=1;for(ai=ae-1;ai!==-1;--ai){if(R[ai]<0){Z=ap(Z,-0.999*R[ai])}}X=J(Y,f(an,Z));W=J(ar,au(C,X));if(!F(l(W,0))){return{solution:Y,message:"",iterations:ab}}Y=X;if(ag<r){return{solution:X,message:"",iterations:ab}}if(P){var aa=au(ao,ak),U=au(C,ak);K=true;for(ai=ae-1;ai!==-1;--ai){if(aa*U[ai]<0){K=false;break}}}else{if(Y[af-1]>=0){K=false}else{K=true}}if(K){return{solution:X,message:"Unbounded",iterations:ab}}}return{solution:Y,message:"maximum iteration count exceeded",iterations:ab}};numeric._solveLP=function _solveLP(C,p,D,r,g){var v=C.length,s=D.length,j;var d=numeric.sum,f=numeric.log,z=numeric.mul,h=numeric.sub,q=numeric.dot,l=numeric.div,o=numeric.add;var u=numeric.rep([v],0).concat([1]);var i=numeric.rep([s,1],-1);var a=numeric.blockMatrix([[p,i]]);var e=D;var j=numeric.rep([v],0).concat(Math.max(0,numeric.sup(numeric.neg(D)))+1);var w=numeric.__solveLP(u,a,e,r,g,j,false);var k=numeric.clone(w.solution);k.length=v;var B=numeric.inf(h(D,q(p,k)));if(B<0){return{solution:NaN,message:"Infeasible",iterations:w.iterations}}var E=numeric.__solveLP(C,p,D,r,g-w.iterations,k,true);E.iterations+=w.iterations;return E};numeric.solveLP=function solveLP(U,C,V,W,h,H,s){if(typeof s==="undefined"){s=1000}if(typeof H==="undefined"){H=numeric.epsilon}if(typeof W==="undefined"){return numeric._solveLP(U,C,V,H,s)}var L=W.length,K=W[0].length,F=C.length;var z=numeric.echelonize(W);var q=numeric.rep([K],0);var p=z.P;var l=[];var M;for(M=p.length-1;M!==-1;--M){q[p[M]]=1}for(M=K-1;M!==-1;--M){if(q[M]===0){l.push(M)}}var R=numeric.getRange;var w=numeric.linspace(0,L-1),u=numeric.linspace(0,F-1);var X=R(W,w,l),f=R(C,u,p),e=R(C,u,l),E=numeric.dot,r=numeric.sub;var d=E(f,z.I);var a=r(e,E(d,X)),k=r(V,E(d,h));var G=Array(p.length),D=Array(l.length);for(M=p.length-1;M!==-1;--M){G[M]=U[p[M]]}for(M=l.length-1;M!==-1;--M){D[M]=U[l[M]]}var y=r(D,E(G,E(z.I,X)));var j=numeric._solveLP(y,a,k,H,s);var N=j.solution;if(N!==N){return j}var O=E(z.I,r(h,E(X,N)));var v=Array(U.length);for(M=p.length-1;M!==-1;--M){v[p[M]]=O[M]}for(M=l.length-1;M!==-1;--M){v[l[M]]=N[M]}return{solution:v,message:j.message,iterations:j.iterations}};numeric.MPStoLP=function MPStoLP(a){if(a instanceof String){a.split("\n")}var d=0;var f=["Initial state","NAME","ROWS","COLUMNS","RHS","BOUNDS","ENDATA"];var x=a.length;var B,y,h,g=0,k={},F=[],o=0,s={},E=0;var G;var C=[],v=[],D=[];function e(b){throw new Error("MPStoLP: "+b+"\nLine "+B+": "+a[B]+"\nCurrent state: "+f[d]+"\n")}for(B=0;B<x;++B){h=a[B];var m=h.match(/\S*/g);var l=[];for(y=0;y<m.length;++y){if(m[y]!==""){l.push(m[y])}}if(l.length===0){continue}for(y=0;y<f.length;++y){if(h.substr(0,f[y].length)===f[y]){break}}if(y<f.length){d=y;if(y===1){G=l[1]}if(y===6){return{name:G,c:C,A:numeric.transpose(v),b:D,rows:k,vars:s}}continue}switch(d){case 0:case 1:e("Unexpected line");case 2:switch(l[0]){case"N":if(g===0){g=l[1]}else{e("Two or more N rows")}break;case"L":k[l[1]]=o;F[o]=1;D[o]=0;++o;break;case"G":k[l[1]]=o;F[o]=-1;D[o]=0;++o;break;case"E":k[l[1]]=o;F[o]=0;D[o]=0;++o;break;default:e("Parse error "+numeric.prettyPrint(l))}break;case 3:if(!s.hasOwnProperty(l[0])){s[l[0]]=E;C[E]=0;v[E]=numeric.rep([o],0);++E}var u=s[l[0]];for(y=1;y<l.length;y+=2){if(l[y]===g){C[u]=parseFloat(l[y+1]);continue}var r=k[l[y]];v[u][r]=(F[r]<0?-1:1)*parseFloat(l[y+1])}break;case 4:for(y=1;y<l.length;y+=2){D[k[l[y]]]=(F[k[l[y]]]<0?-1:1)*parseFloat(l[y+1])}break;case 5:break;case 6:e("Internal error")}}e("Reached end of file without ENDATA")};numeric.seedrandom={pow:Math.pow,random:Math.random};(function(i,j,c,h,l,f,b){j.seedrandom=function g(m,q){var o=[];var n;m=k(a(q?[m,i]:arguments.length?m:[new Date().getTime(),i,window],3),o);n=new e(o);k(n.S,i);j.random=function p(){var u=n.g(h);var s=b;var r=0;while(u<l){u=(u+r)*c;s*=c;r=n.g(1)}while(u>=f){u/=2;s/=2;r>>>=1}return(u+r)/s};return m};function e(r){var q,o,v=this,s=r.length;var p=0,n=v.i=v.j=v.m=0;v.S=[];v.c=[];if(!s){r=[s++]}while(p<c){v.S[p]=p++}for(p=0;p<c;p++){q=v.S[p];n=d(n+q+r[p%s]);o=v.S[n];v.S[p]=o;v.S[n]=q}v.g=function m(C){var A=v.S;var z=d(v.i+1);var y=A[z];var x=d(v.j+y);var w=A[x];A[z]=w;A[x]=y;var B=A[d(y+w)];while(--C){z=d(z+1);y=A[z];x=d(x+y);w=A[x];A[z]=w;A[x]=y;B=B*c+A[d(y+w)]}v.i=z;v.j=x;return B};v.g(c)}function a(p,q,m,r,n){m=[];n=typeof(p);if(q&&n=="object"){for(r in p){if(r.indexOf("S")<5){try{m.push(a(p[r],q-1))}catch(o){}}}}return(m.length?m:p+(n!="string"?"\0":""))}function k(m,o,p,n){m+="";p=0;for(n=0;n<m.length;n++){o[d(n)]=d((p^=o[d(n)]*19)+m.charCodeAt(n))}m="";for(n in o){m+=String.fromCharCode(o[n])}return m}function d(m){return m&(c-1)}b=j.pow(c,h);l=j.pow(2,l);f=l*2;k(j.random(),i)}([],numeric.seedrandom,256,6,52));(function(b){function h(j){if(typeof j!=="object"){return j}var k=[],l,m=j.length;for(l=0;l<m;l++){k[l+1]=h(j[l])}return k}function f(j){if(typeof j!=="object"){return j}var k=[],l,m=j.length;for(l=1;l<m;l++){k[l-1]=f(j[l])}return k}function g(m,l,u){var r,p,o,s,q;for(o=1;o<=u;o=o+1){m[o][o]=1/m[o][o];q=-m[o][o];for(r=1;r<o;r=r+1){m[r][o]=q*m[r][o]}s=o+1;if(u<s){break}for(p=s;p<=u;p=p+1){q=m[o][p];m[o][p]=0;for(r=1;r<=o;r=r+1){m[r][p]=m[r][p]+(q*m[r][o])}}}}function e(m,l,s,j){var q,o,r,p;for(o=1;o<=s;o=o+1){p=0;for(q=1;q<o;q=q+1){p=p+(m[q][o]*j[q])}j[o]=(j[o]-p)/m[o][o]}for(r=1;r<=s;r=r+1){o=s+1-r;j[o]=j[o]/m[o][o];p=-j[o];for(q=1;q<o;q=q+1){j[q]=j[q]+(p*m[q][o])}}}function c(u,r,l,m){var q,p,x,o,v,w;for(p=1;p<=l;p=p+1){m[1]=p;w=0;x=p-1;if(x<1){w=u[p][p]-w;if(w<=0){break}u[p][p]=Math.sqrt(w)}else{for(o=1;o<=x;o=o+1){v=u[o][p];for(q=1;q<o;q=q+1){v=v-(u[q][p]*u[q][o])}v=v/u[o][o];u[o][p]=v;w=w+v*v}w=u[p][p]-w;if(w<=0){break}u[p][p]=Math.sqrt(w)}m[1]=0}}function d(P,I,aa,ab,E,B,D,R,S,Z,y,G,J,N,W,k){var ag,af,ac,A,ai,M,C,ae,ak,Q,ah,U,Y,u,w,H,V,aj,F,v,ad,z,X,O,L,K,x;Y=Math.min(ab,Z);ac=2*ab+(Y*(Y+5))/2+2*Z+1;O=1e-60;do{O=O+O;L=1+0.1*O;K=1+0.2*O}while(L<=1||K<=1);for(ag=1;ag<=ab;ag=ag+1){W[ag]=I[ag]}for(ag=ab+1;ag<=ac;ag=ag+1){W[ag]=0}for(ag=1;ag<=Z;ag=ag+1){G[ag]=0}ai=[];if(k[1]===0){c(P,aa,ab,ai);if(ai[1]!==0){k[1]=2;return}e(P,aa,ab,I);g(P,aa,ab)}else{for(af=1;af<=ab;af=af+1){E[af]=0;for(ag=1;ag<=af;ag=ag+1){E[af]=E[af]+P[ag][af]*I[ag]}}for(af=1;af<=ab;af=af+1){I[af]=0;for(ag=af;ag<=ab;ag=ag+1){I[af]=I[af]+P[af][ag]*E[ag]}}}B[1]=0;for(af=1;af<=ab;af=af+1){E[af]=I[af];B[1]=B[1]+W[af]*E[af];W[af]=0;for(ag=af+1;ag<=ab;ag=ag+1){P[ag][af]=0}}B[1]=-B[1]/2;k[1]=0;C=ab;ae=C+ab;ah=ae+Y;ak=ah+Y+1;Q=ak+(Y*(Y+1))/2;u=Q+Z;for(ag=1;ag<=Z;ag=ag+1){H=0;for(af=1;af<=ab;af=af+1){H=H+D[af][ag]*D[af][ag]}W[u+ag]=Math.sqrt(H)}J=0;N[1]=0;N[2]=0;function m(){N[1]=N[1]+1;ac=Q;for(ag=1;ag<=Z;ag=ag+1){ac=ac+1;H=-R[ag];for(af=1;af<=ab;af=af+1){H=H+D[af][ag]*E[af]}if(Math.abs(H)<O){H=0}if(ag>y){W[ac]=H}else{W[ac]=-Math.abs(H);if(H>0){for(af=1;af<=ab;af=af+1){D[af][ag]=-D[af][ag]}R[ag]=-R[ag]}}}for(ag=1;ag<=J;ag=ag+1){W[Q+G[ag]]=0}U=0;w=0;for(ag=1;ag<=Z;ag=ag+1){if(W[Q+ag]<w*W[u+ag]){U=ag;w=W[Q+ag]/W[u+ag]}}if(U===0){return 999}return 0}function al(){for(ag=1;ag<=ab;ag=ag+1){H=0;for(af=1;af<=ab;af=af+1){H=H+P[af][ag]*D[af][U]}W[ag]=H}A=C;for(ag=1;ag<=ab;ag=ag+1){W[A+ag]=0}for(af=J+1;af<=ab;af=af+1){for(ag=1;ag<=ab;ag=ag+1){W[A+ag]=W[A+ag]+P[ag][af]*W[af]}}z=true;for(ag=J;ag>=1;ag=ag-1){H=W[ag];ac=ak+(ag*(ag+3))/2;A=ac-ag;for(af=ag+1;af<=J;af=af+1){H=H-W[ac]*W[ae+af];ac=ac+af}H=H/W[A];W[ae+ag]=H;if(G[ag]<y){break}if(H<0){break}z=false;M=ag}if(!z){V=W[ah+M]/W[ae+M];for(ag=1;ag<=J;ag=ag+1){if(G[ag]<y){break}if(W[ae+ag]<0){break}w=W[ah+ag]/W[ae+ag];if(w<V){V=w;M=ag}}}H=0;for(ag=C+1;ag<=C+ab;ag=ag+1){H=H+W[ag]*W[ag]}if(Math.abs(H)<=O){if(z){k[1]=1;return 999}else{for(ag=1;ag<=J;ag=ag+1){W[ah+ag]=W[ah+ag]-V*W[ae+ag]}W[ah+J+1]=W[ah+J+1]+V;return 700}}else{H=0;for(ag=1;ag<=ab;ag=ag+1){H=H+W[C+ag]*D[ag][U]}aj=-W[Q+U]/H;X=true;if(!z){if(V<aj){aj=V;X=false}}for(ag=1;ag<=ab;ag=ag+1){E[ag]=E[ag]+aj*W[C+ag];if(Math.abs(E[ag])<O){E[ag]=0}}B[1]=B[1]+aj*H*(aj/2+W[ah+J+1]);for(ag=1;ag<=J;ag=ag+1){W[ah+ag]=W[ah+ag]-aj*W[ae+ag]}W[ah+J+1]=W[ah+J+1]+aj;if(X){J=J+1;G[J]=U;ac=ak+((J-1)*J)/2+1;for(ag=1;ag<=J-1;ag=ag+1){W[ac]=W[ag];ac=ac+1}if(J===ab){W[ac]=W[ab]}else{for(ag=ab;ag>=J+1;ag=ag-1){if(W[ag]===0){break}F=Math.max(Math.abs(W[ag-1]),Math.abs(W[ag]));v=Math.min(Math.abs(W[ag-1]),Math.abs(W[ag]));if(W[ag-1]>=0){w=Math.abs(F*Math.sqrt(1+v*v/(F*F)))}else{w=-Math.abs(F*Math.sqrt(1+v*v/(F*F)))}F=W[ag-1]/w;v=W[ag]/w;if(F===1){break}if(F===0){W[ag-1]=v*w;for(af=1;af<=ab;af=af+1){w=P[af][ag-1];P[af][ag-1]=P[af][ag];P[af][ag]=w}}else{W[ag-1]=w;ad=v/(1+F);for(af=1;af<=ab;af=af+1){w=F*P[af][ag-1]+v*P[af][ag];P[af][ag]=ad*(P[af][ag-1]+w)-P[af][ag];P[af][ag-1]=w}}}W[ac]=W[J]}}else{H=-R[U];for(af=1;af<=ab;af=af+1){H=H+E[af]*D[af][U]}if(U>y){W[Q+U]=H}else{W[Q+U]=-Math.abs(H);if(H>0){for(af=1;af<=ab;af=af+1){D[af][U]=-D[af][U]}R[U]=-R[U]}}return 700}}return 0}function s(){ac=ak+(M*(M+1))/2+1;A=ac+M;if(W[A]===0){return 798}F=Math.max(Math.abs(W[A-1]),Math.abs(W[A]));v=Math.min(Math.abs(W[A-1]),Math.abs(W[A]));if(W[A-1]>=0){w=Math.abs(F*Math.sqrt(1+v*v/(F*F)))}else{w=-Math.abs(F*Math.sqrt(1+v*v/(F*F)))}F=W[A-1]/w;v=W[A]/w;if(F===1){return 798}if(F===0){for(ag=M+1;ag<=J;ag=ag+1){w=W[A-1];W[A-1]=W[A];W[A]=w;A=A+ag}for(ag=1;ag<=ab;ag=ag+1){w=P[ag][M];P[ag][M]=P[ag][M+1];P[ag][M+1]=w}}else{ad=v/(1+F);for(ag=M+1;ag<=J;ag=ag+1){w=F*W[A-1]+v*W[A];W[A]=ad*(W[A-1]+w)-W[A];W[A-1]=w;A=A+ag}for(ag=1;ag<=ab;ag=ag+1){w=F*P[ag][M]+v*P[ag][M+1];P[ag][M+1]=ad*(P[ag][M]+w)-P[ag][M+1];P[ag][M]=w}}return 0}function p(){A=ac-M;for(ag=1;ag<=M;ag=ag+1){W[A]=W[ac];ac=ac+1;A=A+1}W[ah+M]=W[ah+M+1];G[M]=G[M+1];M=M+1;if(M<J){return 797}return 0}function o(){W[ah+J]=W[ah+J+1];W[ah+J+1]=0;G[J]=0;J=J-1;N[2]=N[2]+1;return 0}x=0;while(true){x=m();if(x===999){return}while(true){x=al();if(x===0){break}if(x===999){return}if(x===700){if(M===J){o()}else{while(true){s();x=p();if(x!==797){break}}o()}}}}}function a(m,l,C,u,v,y){m=h(m);l=h(l);C=h(C);var s,p,k,B,j,A=[],o=[],w=[],z=[],x=[],D;v=v||0;y=y?h(y):[undefined,0];u=u?h(u):[];p=m.length-1;k=C[1].length-1;if(!u){for(s=1;s<=k;s=s+1){u[s]=0}}for(s=1;s<=k;s=s+1){o[s]=0}B=0;j=Math.min(p,k);for(s=1;s<=p;s=s+1){w[s]=0}A[1]=0;for(s=1;s<=(2*p+(j*(j+5))/2+2*k+1);s=s+1){z[s]=0}for(s=1;s<=2;s=s+1){x[s]=0}d(m,l,p,p,w,A,C,u,p,k,v,o,B,x,z,y);D="";if(y[1]===1){D="constraints are inconsistent, no solution!"}if(y[1]===2){D="matrix D in quadratic function is not positive definite!"}return{solution:f(w),value:f(A),unconstrained_solution:f(l),iterations:f(x),iact:f(o),message:D}}b.solveQP=a}(numeric));numeric.svd=function svd(E){var S;var a=numeric.epsilon;var N=1e-64/a;var Q=50;var U=0;var L=0;var K=0;var J=0;var H=0;var B=numeric.clone(E);var G=B.length;var F=B[0].length;if(G<F){throw"Need more rows than columns"}var R=new Array(F);var D=new Array(F);for(L=0;L<F;L++){R[L]=D[L]=0}var w=numeric.rep([F,F],0);function d(e,c){e=Math.abs(e);c=Math.abs(c);if(e>c){return e*Math.sqrt(1+(c*c/e/e))}else{if(c==0){return e}}return c*Math.sqrt(1+(e*e/c/c))}var P=0;var O=0;var M=0;var r=0;var p=0;var o=0;var C=0;for(L=0;L<F;L++){R[L]=O;C=0;H=L+1;for(K=L;K<G;K++){C+=(B[K][L]*B[K][L])}if(C<=N){O=0}else{P=B[L][L];O=Math.sqrt(C);if(P>=0){O=-O}M=P*O-C;B[L][L]=P-O;for(K=H;K<F;K++){C=0;for(J=L;J<G;J++){C+=B[J][L]*B[J][K]}P=C/M;for(J=L;J<G;J++){B[J][K]+=P*B[J][L]}}}D[L]=O;C=0;for(K=H;K<F;K++){C=C+B[L][K]*B[L][K]}if(C<=N){O=0}else{P=B[L][L+1];O=Math.sqrt(C);if(P>=0){O=-O}M=P*O-C;B[L][L+1]=P-O;for(K=H;K<F;K++){R[K]=B[L][K]/M}for(K=H;K<G;K++){C=0;for(J=H;J<F;J++){C+=(B[K][J]*B[L][J])}for(J=H;J<F;J++){B[K][J]+=C*R[J]}}}p=Math.abs(D[L])+Math.abs(R[L]);if(p>r){r=p}}for(L=F-1;L!=-1;L+=-1){if(O!=0){M=O*B[L][L+1];for(K=H;K<F;K++){w[K][L]=B[L][K]/M}for(K=H;K<F;K++){C=0;for(J=H;J<F;J++){C+=B[L][J]*w[J][K]}for(J=H;J<F;J++){w[J][K]+=(C*w[J][L])}}}for(K=H;K<F;K++){w[L][K]=0;w[K][L]=0}w[L][L]=1;O=R[L];H=L}for(L=F-1;L!=-1;L+=-1){H=L+1;O=D[L];for(K=H;K<F;K++){B[L][K]=0}if(O!=0){M=B[L][L]*O;for(K=H;K<F;K++){C=0;for(J=H;J<G;J++){C+=B[J][L]*B[J][K]}P=C/M;for(J=L;J<G;J++){B[J][K]+=P*B[J][L]}}for(K=L;K<G;K++){B[K][L]=B[K][L]/O}}else{for(K=L;K<G;K++){B[K][L]=0}}B[L][L]+=1}a=a*r;for(J=F-1;J!=-1;J+=-1){for(var b=0;b<Q;b++){var V=false;for(H=J;H!=-1;H+=-1){if(Math.abs(R[H])<=a){V=true;break}if(Math.abs(D[H-1])<=a){break}}if(!V){U=0;C=1;var I=H-1;for(L=H;L<J+1;L++){P=C*R[L];R[L]=U*R[L];if(Math.abs(P)<=a){break}O=D[L];M=d(P,O);D[L]=M;U=O/M;C=-P/M;for(K=0;K<G;K++){p=B[K][I];o=B[K][L];B[K][I]=p*U+(o*C);B[K][L]=-p*C+(o*U)}}}o=D[J];if(H==J){if(o<0){D[J]=-o;for(K=0;K<F;K++){w[K][J]=-w[K][J]}}break}if(b>=Q-1){throw"Error: no convergence."}r=D[H];p=D[J-1];O=R[J-1];M=R[J];P=((p-o)*(p+o)+(O-M)*(O+M))/(2*M*p);O=d(P,1);if(P<0){P=((r-o)*(r+o)+M*(p/(P-O)-M))/r}else{P=((r-o)*(r+o)+M*(p/(P+O)-M))/r}U=1;C=1;for(L=H+1;L<J+1;L++){O=R[L];p=D[L];M=C*O;O=U*O;o=d(P,M);R[L-1]=o;U=P/o;C=M/o;P=r*U+O*C;O=-r*C+O*U;M=p*C;p=p*U;for(K=0;K<F;K++){r=w[K][L-1];o=w[K][L];w[K][L-1]=r*U+o*C;w[K][L]=-r*C+o*U}o=d(P,M);D[L-1]=o;U=P/o;C=M/o;P=U*O+C*p;r=-C*O+U*p;for(K=0;K<G;K++){p=B[K][L-1];o=B[K][L];B[K][L-1]=p*U+o*C;B[K][L]=-p*C+o*U}}R[H]=0;R[J]=P;D[J]=r}}for(L=0;L<D.length;L++){if(D[L]<a){D[L]=0}}for(L=0;L<F;L++){for(K=L-1;K>=0;K--){if(D[K]<D[L]){U=D[K];D[K]=D[L];D[L]=U;for(J=0;J<B.length;J++){S=B[J][L];B[J][L]=B[J][K];B[J][K]=S}for(J=0;J<w.length;J++){S=w[J][L];w[J][L]=w[J][K];w[J][K]=S}L=K}}}return{U:B,S:D,V:w}};!function(b){if("object"==typeof exports&&"undefined"!=typeof module){module.exports=b()}else{if("function"==typeof define&&define.amd){define([],b)}else{var a;"undefined"!=typeof window?a=window:"undefined"!=typeof global?a=global:"undefined"!=typeof self&&(a=self),a.pako=b()}}}(function(){var d,b,a;return(function c(f,k,h){function g(n,l){if(!k[n]){if(!f[n]){var i=typeof require=="function"&&require;if(!l&&i){return i(n,!0)}if(e){return e(n,!0)}throw new Error("Cannot find module '"+n+"'")}var m=k[n]={exports:{}};f[n][0].call(m.exports,function(o){var p=f[n][1][o];return g(p?p:o)},m,m.exports,c,f,k,h)}return k[n].exports}var e=typeof require=="function"&&require;for(var j=0;j<h.length;j++){g(h[j])}return g})({1:[function(g,h,l){var e=g("./zlib/inflate.js");var p=g("./utils/common");var q=g("./utils/strings");var o=g("./zlib/constants");var j=g("./zlib/messages");var k=g("./zlib/zstream");var f=g("./zlib/gzheader");var m="Unpacking";var n=function(u){this.options=p.assign({chunkSize:16384,windowBits:0,to:""},u||{});var v=this.options;if(v.raw&&(v.windowBits>=0)&&(v.windowBits<16)){v.windowBits=-v.windowBits;if(v.windowBits===0){v.windowBits=-15}}if((v.windowBits>=0)&&(v.windowBits<16)&&!(u&&u.windowBits)){v.windowBits+=32}if((v.windowBits>15)&&(v.windowBits<48)){if((v.windowBits&15)===0){v.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new k();this.strm.avail_out=0;var s=e.inflateInit2(this.strm,v.windowBits);if(s!==o.Z_OK){throw new Error(j[s])}this.header=new f();e.inflateGetHeader(this.strm,this.header)};n.prototype.push=function(x,y,A){var B=this.strm;var v=this.options.chunkSize;var w,u;if(this.ended){return false}u=(y===~~y)?y:((y===true)?o.Z_FINISH:o.Z_NO_FLUSH);if(typeof x==="string"){B.input=q.binstring2buf(x)}else{B.input=x}B.next_in=0;B.avail_in=B.input.length;var z=new DataView(x.buffer);var s=z.getUint32(x.byteLength-4,true);this.progressMeter=A;this.progressIterations=(s/v);this.progressIndex=0;this.progressNextGoal=0.25;if(this.progressMeter){this.progressMeter.drawProgress(0.1,m)}setTimeout(this.pushProcess.bind(this),0)};n.prototype.pushProcess=function(){var u=this.strm;var x=this.options.chunkSize;var s,w,v;do{if(u.avail_out===0){u.output=new p.Buf8(x);u.next_out=0;u.avail_out=x}var s=e.inflate(u,o.Z_NO_FLUSH);if(s!==o.Z_STREAM_END&&s!==o.Z_OK){this.onEnd(s);this.ended=true;return false}if(u.next_out){if(u.avail_out===0||s===o.Z_STREAM_END||(u.avail_in===0&&w===o.Z_FINISH)){this.onData(p.shrinkBuf(u.output,u.next_out))}}this.progressIndex+=1;v=this.progressIndex/this.progressIterations;if(this.progressMeter){this.progressMeter.drawProgress(v,m)}}while((v<this.progressNextGoal)&&(((u.avail_in>0||u.avail_out===0)&&s!==o.Z_STREAM_END)));if((u.avail_in>0||u.avail_out===0)&&s!==o.Z_STREAM_END){this.progressNextGoal+=0.1;setTimeout(this.pushProcess.bind(this),0)}else{if(s===o.Z_STREAM_END){w=o.Z_FINISH}if(w===o.Z_FINISH){s=e.inflateEnd(this.strm);this.onEnd(s);this.ended=true}this.onFinish(this.result)}};n.prototype.onData=function(s){this.chunks.push(s)};n.prototype.onEnd=function(s){if(s===o.Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=p.flattenChunks(this.chunks)}}this.chunks=[];this.err=s;this.msg=this.strm.msg};function r(s,u,v,x){var w=new n(u);w.onFinish=x;w.push(s,true,v)}function i(s,u){u=u||{};u.raw=true;return r(s,u)}l.Inflate=n;l.inflate=r;l.inflateRaw=i;l.ungzip=r},{"./utils/common":2,"./utils/strings":3,"./zlib/constants":5,"./zlib/gzheader":7,"./zlib/inflate.js":9,"./zlib/messages":11,"./zlib/zstream":12}],2:[function(g,f,e){var j=(typeof Uint8Array!=="undefined")&&(typeof Uint16Array!=="undefined")&&(typeof Int32Array!=="undefined");e.assign=function(n){var k=Array.prototype.slice.call(arguments,1);while(k.length){var l=k.shift();if(!l){continue}if(typeof(l)!=="object"){throw new TypeError(l+"must be non-object")}for(var m in l){if(l.hasOwnProperty(m)){n[m]=l[m]}}}return n};e.shrinkBuf=function(k,l){if(k.length===l){return k}if(k.subarray){return k.subarray(0,l)}k.length=l;return k};var h={arraySet:function(l,n,p,k,o){if(n.subarray&&l.subarray){l.set(n.subarray(p,p+k),o);return}for(var m=0;m<k;m++){l[o+m]=n[p+m]}},flattenChunks:function(r){var p,n,m,q,o,k;m=0;for(p=0,n=r.length;p<n;p++){m+=r[p].length}k=new Uint8Array(m);q=0;for(p=0,n=r.length;p<n;p++){o=r[p];k.set(o,q);q+=o.length}return k}};var i={arraySet:function(l,n,p,k,o){for(var m=0;m<k;m++){l[o+m]=n[p+m]}},flattenChunks:function(k){return[].concat.apply([],k)}};e.setTyped=function(k){if(k){e.Buf8=Uint8Array;e.Buf16=Uint16Array;e.Buf32=Int32Array;e.assign(e,h)}else{e.Buf8=Array;e.Buf16=Array;e.Buf32=Array;e.assign(e,i)}};e.setTyped(j)},{}],3:[function(e,f,h){var o=e("./common");var m=true;var k=true;try{String.fromCharCode.apply(null,[0])}catch(n){m=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){k=false}var g=new o.Buf8(256);for(var j=0;j<256;j++){g[j]=(j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1)}g[254]=g[254]=1;h.string2buf=function(w){var p,x,r,s,q,v=w.length,u=0;for(s=0;s<v;s++){x=w.charCodeAt(s);if((x&64512)===55296&&(s+1<v)){r=w.charCodeAt(s+1);if((r&64512)===56320){x=65536+((x-55296)<<10)+(r-56320);s++}}u+=x<128?1:x<2048?2:x<65536?3:4}p=new o.Buf8(u);for(q=0,s=0;q<u;s++){x=w.charCodeAt(s);if((x&64512)===55296&&(s+1<v)){r=w.charCodeAt(s+1);if((r&64512)===56320){x=65536+((x-55296)<<10)+(r-56320);s++}}if(x<128){p[q++]=x}else{if(x<2048){p[q++]=192|(x>>>6);p[q++]=128|(x&63)}else{if(x<65536){p[q++]=224|(x>>>12);p[q++]=128|(x>>>6&63);p[q++]=128|(x&63)}else{p[q++]=240|(x>>>18);p[q++]=128|(x>>>12&63);p[q++]=128|(x>>>6&63);p[q++]=128|(x&63)}}}}return p};function l(r,q){if(q<65537){if((r.subarray&&k)||(!r.subarray&&m)){return String.fromCharCode.apply(null,o.shrinkBuf(r,q))}}var p="";for(var s=0;s<q;s++){p+=String.fromCharCode(r[s])}return p}h.buf2binstring=function(i){return l(i,i.length)};h.binstring2buf=function(s){var q=new o.Buf8(s.length);for(var r=0,p=q.length;r<p;r++){q[r]=s.charCodeAt(r)}return q};h.buf2string=function(v,r){var w,u,x,s;var q=r||v.length;var p=new Array(q*2);for(u=0,w=0;w<q;){x=v[w++];if(x<128){p[u++]=x;continue}s=g[x];if(s>4){p[u++]=65533;w+=s-1;continue}x&=s===2?31:s===3?15:7;while(s>1&&w<q){x=(x<<6)|(v[w++]&63);s--}if(s>1){p[u++]=65533;continue}if(x<65536){p[u++]=x}else{x-=65536;p[u++]=55296|((x>>10)&1023);p[u++]=56320|(x&1023)}}return l(p,u)};h.utf8border=function(p,i){var q;i=i||p.length;if(i>p.length){i=p.length}q=i-1;while(q>=0&&(p[q]&192)===128){q--}if(q<0){return i}if(q===0){return i}return(q+g[p[q]]>i)?q:i}},{"./common":2}],4:[function(h,f,e){function g(l,k,i,p){var m=(l&65535)|0,j=((l>>>16)&65535)|0,o=0;while(i!==0){o=i>2000?2000:i;i-=o;do{m=(m+k[p++])|0;j=(j+m)|0}while(--o);m%=65521;j%=65521}return(m|(j<<16))|0}f.exports=g},{}],5:[function(g,f,e){f.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],6:[function(j,g,f){function h(){var p,m=[];for(var o=0;o<256;o++){p=o;for(var l=0;l<8;l++){p=((p&1)?(3988292384^(p>>>1)):(p>>>1))}m[o]=p}return m}var e=h();function i(p,m,k,q){var o=e,l=q+k;p=p^(-1);for(var n=q;n<l;n++){p=(p>>>8)^o[(p^m[n])&255]}return(p^(-1))}g.exports=i},{}],7:[function(g,f,e){function h(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=false}f.exports=h},{}],8:[function(i,g,f){var h=30;var j=12;g.exports=function e(J,p){var q;var L;var x;var K;var w;var o;var D;var l;var B;var m;var r;var A;var G;var E;var H;var v;var y;var k;var u;var I;var C;var F;var n;var z,s;q=J.state;L=J.next_in;z=J.input;x=L+(J.avail_in-5);K=J.next_out;s=J.output;w=K-(p-J.avail_out);o=K+(J.avail_out-257);D=q.dmax;l=q.wsize;B=q.whave;m=q.wnext;r=q.window;A=q.hold;G=q.bits;E=q.lencode;H=q.distcode;v=(1<<q.lenbits)-1;y=(1<<q.distbits)-1;top:do{if(G<15){A+=z[L++]<<G;G+=8;A+=z[L++]<<G;G+=8}k=E[A&v];dolen:for(;;){u=k>>>24;A>>>=u;G-=u;u=(k>>>16)&255;if(u===0){s[K++]=k&65535}else{if(u&16){I=k&65535;u&=15;if(u){if(G<u){A+=z[L++]<<G;G+=8}I+=A&((1<<u)-1);A>>>=u;G-=u}if(G<15){A+=z[L++]<<G;G+=8;A+=z[L++]<<G;G+=8}k=H[A&y];dodist:for(;;){u=k>>>24;A>>>=u;G-=u;u=(k>>>16)&255;if(u&16){C=k&65535;u&=15;if(G<u){A+=z[L++]<<G;G+=8;if(G<u){A+=z[L++]<<G;G+=8}}C+=A&((1<<u)-1);if(C>D){J.msg="invalid distance too far back";q.mode=h;break top}A>>>=u;G-=u;u=K-w;if(C>u){u=C-u;if(u>B){if(q.sane){J.msg="invalid distance too far back";q.mode=h;break top}}F=0;n=r;if(m===0){F+=l-u;if(u<I){I-=u;do{s[K++]=r[F++]}while(--u);F=K-C;n=s}}else{if(m<u){F+=l+m-u;u-=m;if(u<I){I-=u;do{s[K++]=r[F++]}while(--u);F=0;if(m<I){u=m;I-=u;do{s[K++]=r[F++]}while(--u);F=K-C;n=s}}}else{F+=m-u;if(u<I){I-=u;do{s[K++]=r[F++]}while(--u);F=K-C;n=s}}}while(I>2){s[K++]=n[F++];s[K++]=n[F++];s[K++]=n[F++];I-=3}if(I){s[K++]=n[F++];if(I>1){s[K++]=n[F++]}}}else{F=K-C;do{s[K++]=s[F++];s[K++]=s[F++];s[K++]=s[F++];I-=3}while(I>2);if(I){s[K++]=s[F++];if(I>1){s[K++]=s[F++]}}}}else{if((u&64)===0){k=H[(k&65535)+(A&((1<<u)-1))];continue dodist}else{J.msg="invalid distance code";q.mode=h;break top}}break}}else{if((u&64)===0){k=E[(k&65535)+(A&((1<<u)-1))];continue dolen}else{if(u&32){q.mode=j;break top}else{J.msg="invalid literal/length code";q.mode=h;break top}}}}break}}while(L<x&&K<o);I=G>>3;L-=I;G-=I<<3;A&=(1<<G)-1;J.next_in=L;J.next_out=K;J.avail_in=(L<x?5+(x-L):5-(L-x));J.avail_out=(K<o?257+(o-K):257-(K-o));q.hold=A;q.bits=G;return}},{}],9:[function(Y,aA,O){var U=Y("../utils/common");var N=Y("./adler32");var ag=Y("./crc32");var au=Y("./inffast");var n=Y("./inftrees");var af=0;var ah=1;var K=2;var p=4;var V=5;var D=6;var w=0;var A=1;var v=2;var aw=-2;var y=-3;var M=-4;var j=-5;var ad=8;var ao=1;var an=2;var k=3;var aj=4;var F=5;var f=6;var u=7;var ab=8;var r=9;var av=10;var x=11;var m=12;var al=13;var h=14;var aC=15;var ar=16;var o=17;var B=18;var W=19;var ac=20;var e=21;var az=22;var X=23;var ax=24;var E=25;var G=26;var aq=27;var Z=28;var C=29;var g=30;var aB=31;var H=32;var aa=852;var Q=592;var R=15;var L=R;function s(aD){return(((aD>>>24)&255)+((aD>>>8)&65280)+((aD&65280)<<8)+((aD&255)<<24))}function ai(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new U.Buf16(320);this.work=new U.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function S(aD){var aE;if(!aD||!aD.state){return aw}aE=aD.state;aD.total_in=aD.total_out=aE.total=0;aD.msg="";if(aE.wrap){aD.adler=aE.wrap&1}aE.mode=ao;aE.last=0;aE.havedict=0;aE.dmax=32768;aE.head=null;aE.hold=0;aE.bits=0;aE.lencode=aE.lendyn=new U.Buf32(aa);aE.distcode=aE.distdyn=new U.Buf32(Q);aE.sane=1;aE.back=-1;return w}function ay(aD){var aE;if(!aD||!aD.state){return aw}aE=aD.state;aE.wsize=0;aE.whave=0;aE.wnext=0;return S(aD)}function z(aD,aF){var aE;var aG;if(!aD||!aD.state){return aw}aG=aD.state;if(aF<0){aE=0;aF=-aF}else{aE=(aF>>4)+1;if(aF<48){aF&=15}}if(aF&&(aF<8||aF>15)){return aw}if(aG.window!==null&&aG.wbits!==aF){aG.window=null}aG.wrap=aE;aG.wbits=aF;return ay(aD)}function q(aD,aF){var aE;var aG;if(!aD){return aw}aG=new ai();aD.state=aG;aG.window=null;aE=z(aD,aF);if(aE!==w){aD.state=null}return aE}function J(aD){return q(aD,L)}var ak=true;var ap,l;function I(aE){if(ak){var aD;ap=new U.Buf32(512);l=new U.Buf32(32);aD=0;while(aD<144){aE.lens[aD++]=8}while(aD<256){aE.lens[aD++]=9}while(aD<280){aE.lens[aD++]=7}while(aD<288){aE.lens[aD++]=8}n(ah,aE.lens,0,288,ap,0,aE.work,{bits:9});aD=0;while(aD<32){aE.lens[aD++]=5}n(K,aE.lens,0,32,l,0,aE.work,{bits:5});ak=false}aE.lencode=ap;aE.lenbits=9;aE.distcode=l;aE.distbits=5}function P(aE,aH,aD,aI){var aG;var aF=aE.state;if(aF.window===null){aF.wsize=1<<aF.wbits;aF.wnext=0;aF.whave=0;aF.window=new U.Buf8(aF.wsize)}if(aI>=aF.wsize){U.arraySet(aF.window,aH,aD-aF.wsize,aF.wsize,0);aF.wnext=0;aF.whave=aF.wsize}else{aG=aF.wsize-aF.wnext;if(aG>aI){aG=aI}U.arraySet(aF.window,aH,aD-aI,aG,aF.wnext);aI-=aG;if(aI){U.arraySet(aF.window,aH,aD-aI,aI,0);aF.wnext=aI;aF.whave=aF.wsize}else{aF.wnext+=aG;if(aF.wnext===aF.wsize){aF.wnext=0}if(aF.whave<aF.wsize){aF.whave+=aG}}}return 0}function ae(a0,aU){var aI;var aN,aL;var aS;var aJ;var aG,aH;var aQ;var aW;var a4,a3;var aV;var aX;var aF;var aD=0;var a1,aM,a2;var aR,aE,aO;var aZ;var a5;var aK=new U.Buf8(4);var aP;var aT;var aY=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a0||!a0.state||!a0.output||(!a0.input&&a0.avail_in!==0)){return aw}aI=a0.state;if(aI.mode===m){aI.mode=al}aJ=a0.next_out;aL=a0.output;aH=a0.avail_out;aS=a0.next_in;aN=a0.input;aG=a0.avail_in;aQ=aI.hold;aW=aI.bits;a4=aG;a3=aH;a5=w;inf_leave:for(;;){switch(aI.mode){case ao:if(aI.wrap===0){aI.mode=al;break}while(aW<16){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if((aI.wrap&2)&&aQ===35615){aI.check=0;aK[0]=aQ&255;aK[1]=(aQ>>>8)&255;aI.check=ag(aI.check,aK,2,0);aQ=0;aW=0;aI.mode=an;break}aI.flags=0;if(aI.head){aI.head.done=false}if(!(aI.wrap&1)||(((aQ&255)<<8)+(aQ>>8))%31){a0.msg="incorrect header check";aI.mode=g;break}if((aQ&15)!==ad){a0.msg="unknown compression method";aI.mode=g;break}aQ>>>=4;aW-=4;aZ=(aQ&15)+8;if(aI.wbits===0){aI.wbits=aZ}else{if(aZ>aI.wbits){a0.msg="invalid window size";aI.mode=g;break}}aI.dmax=1<<aZ;a0.adler=aI.check=1;aI.mode=aQ&512?av:m;aQ=0;aW=0;break;case an:while(aW<16){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.flags=aQ;if((aI.flags&255)!==ad){a0.msg="unknown compression method";aI.mode=g;break}if(aI.flags&57344){a0.msg="unknown header flags set";aI.mode=g;break}if(aI.head){aI.head.text=((aQ>>8)&1)}if(aI.flags&512){aK[0]=aQ&255;aK[1]=(aQ>>>8)&255;aI.check=ag(aI.check,aK,2,0)}aQ=0;aW=0;aI.mode=k;case k:while(aW<32){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(aI.head){aI.head.time=aQ}if(aI.flags&512){aK[0]=aQ&255;aK[1]=(aQ>>>8)&255;aK[2]=(aQ>>>16)&255;aK[3]=(aQ>>>24)&255;aI.check=ag(aI.check,aK,4,0)}aQ=0;aW=0;aI.mode=aj;case aj:while(aW<16){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(aI.head){aI.head.xflags=(aQ&255);aI.head.os=(aQ>>8)}if(aI.flags&512){aK[0]=aQ&255;aK[1]=(aQ>>>8)&255;aI.check=ag(aI.check,aK,2,0)}aQ=0;aW=0;aI.mode=F;case F:if(aI.flags&1024){while(aW<16){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.length=aQ;if(aI.head){aI.head.extra_len=aQ}if(aI.flags&512){aK[0]=aQ&255;aK[1]=(aQ>>>8)&255;aI.check=ag(aI.check,aK,2,0)}aQ=0;aW=0}else{if(aI.head){aI.head.extra=null}}aI.mode=f;case f:if(aI.flags&1024){aV=aI.length;if(aV>aG){aV=aG}if(aV){if(aI.head){aZ=aI.head.extra_len-aI.length;if(!aI.head.extra){aI.head.extra=new Array(aI.head.extra_len)}U.arraySet(aI.head.extra,aN,aS,aV,aZ)}if(aI.flags&512){aI.check=ag(aI.check,aN,aV,aS)}aG-=aV;aS+=aV;aI.length-=aV}if(aI.length){break inf_leave}}aI.length=0;aI.mode=u;case u:if(aI.flags&2048){if(aG===0){break inf_leave}aV=0;do{aZ=aN[aS+aV++];if(aI.head&&aZ&&(aI.length<65536)){aI.head.name+=String.fromCharCode(aZ)}}while(aZ&&aV<aG);if(aI.flags&512){aI.check=ag(aI.check,aN,aV,aS)}aG-=aV;aS+=aV;if(aZ){break inf_leave}}else{if(aI.head){aI.head.name=null}}aI.length=0;aI.mode=ab;case ab:if(aI.flags&4096){if(aG===0){break inf_leave}aV=0;do{aZ=aN[aS+aV++];if(aI.head&&aZ&&(aI.length<65536)){aI.head.comment+=String.fromCharCode(aZ)}}while(aZ&&aV<aG);if(aI.flags&512){aI.check=ag(aI.check,aN,aV,aS)}aG-=aV;aS+=aV;if(aZ){break inf_leave}}else{if(aI.head){aI.head.comment=null}}aI.mode=r;case r:if(aI.flags&512){while(aW<16){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(aQ!==(aI.check&65535)){a0.msg="header crc mismatch";aI.mode=g;break}aQ=0;aW=0}if(aI.head){aI.head.hcrc=((aI.flags>>9)&1);aI.head.done=true}a0.adler=aI.check=0;aI.mode=m;break;case av:while(aW<32){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}a0.adler=aI.check=s(aQ);aQ=0;aW=0;aI.mode=x;case x:if(aI.havedict===0){a0.next_out=aJ;a0.avail_out=aH;a0.next_in=aS;a0.avail_in=aG;aI.hold=aQ;aI.bits=aW;return v}a0.adler=aI.check=1;aI.mode=m;case m:if(aU===V||aU===D){break inf_leave}case al:if(aI.last){aQ>>>=aW&7;aW-=aW&7;aI.mode=aq;break}while(aW<3){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.last=(aQ&1);aQ>>>=1;aW-=1;switch((aQ&3)){case 0:aI.mode=h;break;case 1:I(aI);aI.mode=ac;if(aU===D){aQ>>>=2;aW-=2;break inf_leave}break;case 2:aI.mode=o;break;case 3:a0.msg="invalid block type";aI.mode=g}aQ>>>=2;aW-=2;break;case h:aQ>>>=aW&7;aW-=aW&7;while(aW<32){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if((aQ&65535)!==((aQ>>>16)^65535)){a0.msg="invalid stored block lengths";aI.mode=g;break}aI.length=aQ&65535;aQ=0;aW=0;aI.mode=aC;if(aU===D){break inf_leave}case aC:aI.mode=ar;case ar:aV=aI.length;if(aV){if(aV>aG){aV=aG}if(aV>aH){aV=aH}if(aV===0){break inf_leave}U.arraySet(aL,aN,aS,aV,aJ);aG-=aV;aS+=aV;aH-=aV;aJ+=aV;aI.length-=aV;break}aI.mode=m;break;case o:while(aW<14){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.nlen=(aQ&31)+257;aQ>>>=5;aW-=5;aI.ndist=(aQ&31)+1;aQ>>>=5;aW-=5;aI.ncode=(aQ&15)+4;aQ>>>=4;aW-=4;if(aI.nlen>286||aI.ndist>30){a0.msg="too many length or distance symbols";aI.mode=g;break}aI.have=0;aI.mode=B;case B:while(aI.have<aI.ncode){while(aW<3){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.lens[aY[aI.have++]]=(aQ&7);aQ>>>=3;aW-=3}while(aI.have<19){aI.lens[aY[aI.have++]]=0}aI.lencode=aI.lendyn;aI.lenbits=7;aP={bits:aI.lenbits};a5=n(af,aI.lens,0,19,aI.lencode,0,aI.work,aP);aI.lenbits=aP.bits;if(a5){a0.msg="invalid code lengths set";aI.mode=g;break}aI.have=0;aI.mode=W;case W:while(aI.have<aI.nlen+aI.ndist){for(;;){aD=aI.lencode[aQ&((1<<aI.lenbits)-1)];a1=aD>>>24;aM=(aD>>>16)&255;a2=aD&65535;if((a1)<=aW){break}if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(a2<16){aQ>>>=a1;aW-=a1;aI.lens[aI.have++]=a2}else{if(a2===16){aT=a1+2;while(aW<aT){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aQ>>>=a1;aW-=a1;if(aI.have===0){a0.msg="invalid bit length repeat";aI.mode=g;break}aZ=aI.lens[aI.have-1];aV=3+(aQ&3);aQ>>>=2;aW-=2}else{if(a2===17){aT=a1+3;while(aW<aT){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aQ>>>=a1;aW-=a1;aZ=0;aV=3+(aQ&7);aQ>>>=3;aW-=3}else{aT=a1+7;while(aW<aT){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aQ>>>=a1;aW-=a1;aZ=0;aV=11+(aQ&127);aQ>>>=7;aW-=7}}if(aI.have+aV>aI.nlen+aI.ndist){a0.msg="invalid bit length repeat";aI.mode=g;break}while(aV--){aI.lens[aI.have++]=aZ}}}if(aI.mode===g){break}if(aI.lens[256]===0){a0.msg="invalid code -- missing end-of-block";aI.mode=g;break}aI.lenbits=9;aP={bits:aI.lenbits};a5=n(ah,aI.lens,0,aI.nlen,aI.lencode,0,aI.work,aP);aI.lenbits=aP.bits;if(a5){a0.msg="invalid literal/lengths set";aI.mode=g;break}aI.distbits=6;aI.distcode=aI.distdyn;aP={bits:aI.distbits};a5=n(K,aI.lens,aI.nlen,aI.ndist,aI.distcode,0,aI.work,aP);aI.distbits=aP.bits;if(a5){a0.msg="invalid distances set";aI.mode=g;break}aI.mode=ac;if(aU===D){break inf_leave}case ac:aI.mode=e;case e:if(aG>=6&&aH>=258){a0.next_out=aJ;a0.avail_out=aH;a0.next_in=aS;a0.avail_in=aG;aI.hold=aQ;aI.bits=aW;au(a0,a3);aJ=a0.next_out;aL=a0.output;aH=a0.avail_out;aS=a0.next_in;aN=a0.input;aG=a0.avail_in;aQ=aI.hold;aW=aI.bits;if(aI.mode===m){aI.back=-1}break}aI.back=0;for(;;){aD=aI.lencode[aQ&((1<<aI.lenbits)-1)];a1=aD>>>24;aM=(aD>>>16)&255;a2=aD&65535;if(a1<=aW){break}if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(aM&&(aM&240)===0){aR=a1;aE=aM;aO=a2;for(;;){aD=aI.lencode[aO+((aQ&((1<<(aR+aE))-1))>>aR)];a1=aD>>>24;aM=(aD>>>16)&255;a2=aD&65535;if((aR+a1)<=aW){break}if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aQ>>>=aR;aW-=aR;aI.back+=aR}aQ>>>=a1;aW-=a1;aI.back+=a1;aI.length=a2;if(aM===0){aI.mode=G;break}if(aM&32){aI.back=-1;aI.mode=m;break}if(aM&64){a0.msg="invalid literal/length code";aI.mode=g;break}aI.extra=aM&15;aI.mode=az;case az:if(aI.extra){aT=aI.extra;while(aW<aT){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.length+=aQ&((1<<aI.extra)-1);aQ>>>=aI.extra;aW-=aI.extra;aI.back+=aI.extra}aI.was=aI.length;aI.mode=X;case X:for(;;){aD=aI.distcode[aQ&((1<<aI.distbits)-1)];a1=aD>>>24;aM=(aD>>>16)&255;a2=aD&65535;if((a1)<=aW){break}if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if((aM&240)===0){aR=a1;aE=aM;aO=a2;for(;;){aD=aI.distcode[aO+((aQ&((1<<(aR+aE))-1))>>aR)];a1=aD>>>24;aM=(aD>>>16)&255;a2=aD&65535;if((aR+a1)<=aW){break}if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aQ>>>=aR;aW-=aR;aI.back+=aR}aQ>>>=a1;aW-=a1;aI.back+=a1;if(aM&64){a0.msg="invalid distance code";aI.mode=g;break}aI.offset=a2;aI.extra=(aM)&15;aI.mode=ax;case ax:if(aI.extra){aT=aI.extra;while(aW<aT){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}aI.offset+=aQ&((1<<aI.extra)-1);aQ>>>=aI.extra;aW-=aI.extra;aI.back+=aI.extra}if(aI.offset>aI.dmax){a0.msg="invalid distance too far back";aI.mode=g;break}aI.mode=E;case E:if(aH===0){break inf_leave}aV=a3-aH;if(aI.offset>aV){aV=aI.offset-aV;if(aV>aI.whave){if(aI.sane){a0.msg="invalid distance too far back";aI.mode=g;break}}if(aV>aI.wnext){aV-=aI.wnext;aX=aI.wsize-aV}else{aX=aI.wnext-aV}if(aV>aI.length){aV=aI.length}aF=aI.window}else{aF=aL;aX=aJ-aI.offset;aV=aI.length}if(aV>aH){aV=aH}aH-=aV;aI.length-=aV;do{aL[aJ++]=aF[aX++]}while(--aV);if(aI.length===0){aI.mode=e}break;case G:if(aH===0){break inf_leave}aL[aJ++]=aI.length;aH--;aI.mode=e;break;case aq:if(aI.wrap){while(aW<32){if(aG===0){break inf_leave}aG--;aQ|=aN[aS++]<<aW;aW+=8}a3-=aH;a0.total_out+=a3;aI.total+=a3;if(a3){a0.adler=aI.check=(aI.flags?ag(aI.check,aL,a3,aJ-a3):N(aI.check,aL,a3,aJ-a3))}a3=aH;if((aI.flags?aQ:s(aQ))!==aI.check){a0.msg="incorrect data check";aI.mode=g;break}aQ=0;aW=0}aI.mode=Z;case Z:if(aI.wrap&&aI.flags){while(aW<32){if(aG===0){break inf_leave}aG--;aQ+=aN[aS++]<<aW;aW+=8}if(aQ!==(aI.total&4294967295)){a0.msg="incorrect length check";aI.mode=g;break}aQ=0;aW=0}aI.mode=C;case C:a5=A;break inf_leave;case g:a5=y;break inf_leave;case aB:return M;case H:default:return aw}}a0.next_out=aJ;a0.avail_out=aH;a0.next_in=aS;a0.avail_in=aG;aI.hold=aQ;aI.bits=aW;if(aI.wsize||(a3!==a0.avail_out&&aI.mode<g&&(aI.mode<aq||aU!==p))){if(P(a0,a0.output,a0.next_out,a3-a0.avail_out)){aI.mode=aB;return M}}a4-=a0.avail_in;a3-=a0.avail_out;a0.total_in+=a4;a0.total_out+=a3;aI.total+=a3;if(aI.wrap&&a3){a0.adler=aI.check=(aI.flags?ag(aI.check,aL,a3,a0.next_out-a3):N(aI.check,aL,a3,a0.next_out-a3))}a0.data_type=aI.bits+(aI.last?64:0)+(aI.mode===m?128:0)+(aI.mode===ac||aI.mode===aC?256:0);if(((a4===0&&a3===0)||aU===p)&&a5===w){a5=j}return a5}function am(aD){if(!aD||!aD.state){return aw}var aE=aD.state;if(aE.window){aE.window=null}aD.state=null;return w}function i(aD,aE){var aF;if(!aD||!aD.state){return aw}aF=aD.state;if((aF.wrap&2)===0){return aw}aF.head=aE;aE.done=false;return w}O.inflateReset=ay;O.inflateReset2=z;O.inflateResetKeep=S;O.inflateInit=J;O.inflateInit2=q;O.inflate=ae;O.inflateEnd=am;O.inflateGetHeader=i;O.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":2,"./adler32":4,"./crc32":6,"./inffast":8,"./inftrees":10}],10:[function(f,g,i){var r=f("../utils/common");var q=15;var n=852;var m=592;var p=0;var k=1;var h=2;var o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var j=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var e=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g.exports=function l(w,ac,J,Z,Y,W,I,F){var M=F.bits;var U=0;var E=0;var L=0,S=0;var K=0;var X=0;var C=0;var x=0;var A=0;var R=0;var Q;var N;var ad;var P;var H;var z=null;var G=0;var v;var B=new r.Buf16(q+1);var y=new r.Buf16(q+1);var u=null;var ab=0;var V,D,aa;for(U=0;U<=q;U++){B[U]=0}for(E=0;E<Z;E++){B[ac[J+E]]++}K=M;for(S=q;S>=1;S--){if(B[S]!==0){break}}if(K>S){K=S}if(S===0){Y[W++]=(1<<24)|(64<<16)|0;Y[W++]=(1<<24)|(64<<16)|0;F.bits=1;return 0}for(L=1;L<S;L++){if(B[L]!==0){break}}if(K<L){K=L}x=1;for(U=1;U<=q;U++){x<<=1;x-=B[U];if(x<0){return -1}}if(x>0&&(w===p||S!==1)){return -1}y[1]=0;for(U=1;U<q;U++){y[U+1]=y[U]+B[U]}for(E=0;E<Z;E++){if(ac[J+E]!==0){I[y[ac[J+E]]++]=E}}switch(w){case p:z=u=I;v=19;break;case k:z=o;G-=257;u=s;ab-=257;v=256;break;default:z=j;u=e;v=-1}R=0;E=0;U=L;H=W;X=K;C=0;ad=-1;A=1<<K;P=A-1;if((w===k&&A>n)||(w===h&&A>m)){return 1}var O=0;for(;;){O++;V=U-C;if(I[E]<v){D=0;aa=I[E]}else{if(I[E]>v){D=u[ab+I[E]];aa=z[G+I[E]]}else{D=32+64;aa=0}}Q=1<<(U-C);N=1<<X;L=N;do{N-=Q;Y[H+(R>>C)+N]=(V<<24)|(D<<16)|aa|0}while(N!==0);Q=1<<(U-1);while(R&Q){Q>>=1}if(Q!==0){R&=Q-1;R+=Q}else{R=0}E++;if(--(B[U])===0){if(U===S){break}U=ac[J+I[E]]}if(U>K&&(R&P)!==ad){if(C===0){C=K}H+=L;X=U-C;x=1<<X;while(X+C<S){x-=B[X+C];if(x<=0){break}X++;x<<=1}A+=1<<X;if((w===k&&A>n)||(w===h&&A>m)){return 1}ad=R&P;Y[ad]=(K<<24)|(X<<16)|(H-W)|0}}if(R!==0){Y[H+R]=((U-C)<<24)|(64<<16)|0}F.bits=K;return 0}},{"../utils/common":2}],11:[function(g,f,e){f.exports={"2":"need dictionary","1":"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],12:[function(g,f,e){function h(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}f.exports=h},{}]},{},[1])(1)});var PAPAYA_BROWSER_MIN_FIREFOX=7,PAPAYA_BROWSER_MIN_CHROME=7,PAPAYA_BROWSER_MIN_SAFARI=6,PAPAYA_BROWSER_MIN_IE=10,PAPAYA_BROWSER_MIN_OPERA=12;var PAPAYA_CONTAINER_CLASS_NAME="papaya",PAPAYA_CONTAINER_COLLAPSABLE="papaya-collapsable",PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT="papaya-collapsable-exempt",PAPAYA_CONTAINER_FULLSCREEN="papaya-fullscreen";var PAPAYA_VIEWER_CSS="papaya-viewer";var PAPAYA_TOOLBAR_CSS="papaya-toolbar",PAPAYA_TITLEBAR_CSS="papaya-titlebar",PAPAYA_SLIDER_CSS="papaya-slider-slice";var PAPAYA_DISPLAY_CSS="papaya-display";var PAPAYA_DIALOG_CSS="papaya-dialog",PAPAYA_DIALOG_CONTENT_CSS="papaya-dialog-content",PAPAYA_DIALOG_CONTENT_LABEL_CSS="papaya-dialog-content-label",PAPAYA_DIALOG_CONTENT_CONTROL_CSS="papaya-dialog-content-control",PAPAYA_DIALOG_TITLE_CSS="papaya-dialog-title",PAPAYA_DIALOG_BUTTON_CSS="papaya-dialog-button",PAPAYA_DIALOG_BACKGROUND="papaya-dialog-background",PAPAYA_DIALOG_STOPSCROLL="papaya-dialog-stopscroll";var PAPAYA_MENU_CSS="papaya-menu",PAPAYA_MENU_LABEL_CSS="papaya-menu-label",PAPAYA_MENU_TITLEBAR_CSS="papaya-menu-titlebar",PAPAYA_MENU_ICON_CSS="papaya-menu-icon",PAPAYA_MENU_HOVERING_CSS="papaya-menu-hovering",PAPAYA_MENU_SPACER_CSS="papaya-menu-spacer",PAPAYA_MENU_UNSELECTABLE="papaya-menu-unselectable",PAPAYA_MENU_FILECHOOSER="papaya-menu-filechooser",PAPAYA_MENU_BUTTON_CSS="papaya-menu-button",PAPAYA_MENU_BUTTON_HOVERING_CSS="papaya-menu-button-hovering",PAPAYA_MENU_COLORTABLE_CSS="papaya-menu-colortable",PAPAYA_MENU_INPUT_FIELD="papaya-menu-input",PAPAYA_MENU_SLIDER="papaya-menu-slider";var PAPAYA_UTILS_CHECKFORJS_CSS="checkForJS",PAPAYA_UTILS_UNSUPPORTED_CSS="papaya-utils-unsupported",PAPAYA_UTILS_UNSUPPORTED_MESSAGE_CSS="papaya-utils-unsupported-message";var PAPAYA_DEFAULT_VIEWER_ID="papayaViewer",PAPAYA_DEFAULT_DISPLAY_ID="papayaDisplay",PAPAYA_DEFAULT_TOOLBAR_ID="papayaToolbar",PAPAYA_DEFAULT_CONTAINER_ID="papayaContainer",PAPAYA_DEFAULT_SLIDER_ID="papayaSliceSlider";var PAPAYA_SPACING=3,PAPAYA_PADDING=8,PAPAYA_CONTAINER_PADDING=20,PAPAYA_CONTAINER_PADDING_TOP=PAPAYA_CONTAINER_PADDING,PAPAYA_MANGO_INSTALLED="mangoinstalled",PAPAYA_CUSTOM_PROTOCOL="mango";var GUNZIP_MAGIC_COOKIE1=31,GUNZIP_MAGIC_COOKIE2=139;"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.ArrayUtils=papaya.utilities.ArrayUtils||{};papaya.utilities.ArrayUtils.createArray=function(c){var a=new Array(c||0),d;if(arguments.length>1){var b=Array.prototype.slice.call(arguments,1);for(d=0;d<c;d+=1){a[d]=papaya.utilities.ArrayUtils.createArray.apply(this,b)}}return a};Array.prototype.clone=function(){var a,b;a=this.slice(0);for(b=0;b<this.length;b+=1){if(this[b].clone){a[b]=this[b].clone()}}return a};"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.MathUtils=papaya.utilities.MathUtils||{};papaya.utilities.MathUtils.signum=function(a){return a?a<0?-1:1:0};function papayaRoundFast(a){return(0.5+a)|0}function papayaFloorFast(a){return a|0}"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.ObjectUtils=papaya.utilities.ObjectUtils||{};papaya.utilities.ObjectUtils.bind=function(d,c,b,a){if(arguments.length===2){return function(){return c.apply(d,arguments)}}var f=c,e=Array.prototype.slice;return function(){var g=b||arguments;if(a===true){g=e.call(arguments,0);g=g.concat(b)}else{if(typeof a==="number"){g=e.call(arguments,0);Ext.Array.insert(g,a,b)}}return f.apply(d||window,g)}};papaya.utilities.ObjectUtils.isString=function(a){return(typeof a==="string"||a instanceof String)};papaya.utilities.ObjectUtils.dereference=function(a){return papaya.utilities.ObjectUtils.dereferenceIn(window,a)};papaya.utilities.ObjectUtils.dereferenceIn=function(b,a){var c,d;if(!papaya.utilities.ObjectUtils.isString(a)){return null}d=a.replace(/(^[' "]+|[" ']+$)/g,"").match(/(^[\w\$]+(\.[\w\$]+)*)/);if(d){d=d[1].split(".");c=b[d.shift()];while(c&&d.length){c=c[d.shift()]}}return c||null};"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.PlatformUtils=papaya.utilities.PlatformUtils||{};var console=console||{};console.log=console.log||function(){};console.warn=console.warn||function(){};console.error=console.error||function(){};console.info=console.info||function(){};papaya.utilities.PlatformUtils.os=null;papaya.utilities.PlatformUtils.browser=bowser.name;papaya.utilities.PlatformUtils.browserVersion=bowser.version;papaya.utilities.PlatformUtils.ios=bowser.ios;papaya.utilities.PlatformUtils.lastScrollEventTimestamp=0;papaya.utilities.PlatformUtils.detectOs=function(){if(navigator.appVersion.indexOf("Win")!==-1){return"Windows"}else{if(navigator.appVersion.indexOf("Mac")!==-1){return"MacOS"}else{if((navigator.appVersion.indexOf("X11")!==-1)||(navigator.appVersion.indexOf("Linux")!==-1)){return"Linux"}else{return"Unknown"}}}};papaya.utilities.PlatformUtils.os=papaya.utilities.PlatformUtils.detectOs();papaya.utilities.PlatformUtils.checkForBrowserCompatibility=function(){if(papaya.utilities.PlatformUtils.browser==="Firefox"){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_FIREFOX){return("Papaya requires Firefox version "+PAPAYA_BROWSER_MIN_FIREFOX+" or higher.")}}else{if(papaya.utilities.PlatformUtils.browser==="Chrome"){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_CHROME){return("Papaya requires Chrome version "+PAPAYA_BROWSER_MIN_CHROME+" or higher.")}}else{if(papaya.utilities.PlatformUtils.browser==="Internet Explorer"){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_IE){return("Papaya requires Internet Explorer version "+PAPAYA_BROWSER_MIN_IE+" or higher.")}}else{if(papaya.utilities.PlatformUtils.browser==="Safari"){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_SAFARI){return("Papaya requires Safari version "+PAPAYA_BROWSER_MIN_SAFARI+" or higher.")}}else{if(papaya.utilities.PlatformUtils.browser==="Opera"){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_OPERA){return("Papaya requires Opera version "+PAPAYA_BROWSER_MIN_OPERA+" or higher.")}}}}}}return null};papaya.utilities.PlatformUtils.getMousePositionX=function(a){var b;if(a.originalEvent){a=a.originalEvent}if(a.targetTouches){if(a.targetTouches.length===1){b=a.targetTouches[0];if(b){return b.pageX}}}else{if(a.changedTouches){if(a.changedTouches.length===1){b=a.changedTouches[0];if(b){return b.pageX}}}}return a.pageX};papaya.utilities.PlatformUtils.getMousePositionY=function(a){var b;if(a.targetTouches){if(a.targetTouches.length===1){b=a.targetTouches[0];if(b){return b.pageY}}}else{if(a.changedTouches){if(a.changedTouches.length===1){b=a.changedTouches[0];if(b){return b.pageY}}}}return a.pageY};papaya.utilities.PlatformUtils.getScrollSign=function(b){var a=Date.now();if((a-papaya.utilities.PlatformUtils.lastScrollEventTimestamp)>50){papaya.utilities.PlatformUtils.lastScrollEventTimestamp=a;if(b.wheelDelta){return b.wheelDelta>0?1:-1}if(b.detail){return b.detail<0?1:-1}}return 0};papaya.utilities.PlatformUtils.makeSlice=function(b,d,c){var a=(typeof File);if(a==="undefined"){return function(){}}if(File.prototype.slice){return b.slice(d,d+c)}if(File.prototype.mozSlice){return b.mozSlice(d,c)}if(File.prototype.webkitSlice){return b.webkitSlice(d,c)}return null};papaya.utilities.PlatformUtils.isPlatformLittleEndian=function(){var a=new ArrayBuffer(2);new DataView(a).setInt16(0,256,true);return new Int16Array(a)[0]===256};papaya.utilities.PlatformUtils.isInputRangeSupported=function(){var a=document.createElement("input");a.setAttribute("type","range");return(a.type==="range")};papaya.utilities.PlatformUtils.launchCustomProtocol=function(a,b,h){var e,f,d,g=false;console.log(b);if(papaya.utilities.PlatformUtils.browser==="Internet Explorer"){f=window.open("","","width=0,height=0");f.document.write("<iframe src='"+b+"'></iframe>");setTimeout(function(){try{f.location.href;g=true}catch(i){console.log(i)}if(g){f.setTimeout("window.close()",100)}else{f.close()}h(g)},100)}else{if(papaya.utilities.PlatformUtils.browser==="Firefox"){try{e=$("<iframe />");e.css({display:"none"});e.appendTo("body");e[0].contentWindow.location.href=b;g=true}catch(c){g=false}e.remove();h(g)}else{if(papaya.utilities.PlatformUtils.browser==="Chrome"){a.viewerHtml.css({outline:0});a.viewerHtml.attr("tabindex","1");a.viewerHtml.focus();a.viewerHtml.blur(function(){g=true;h(true)});location.href=b;setTimeout(function(){a.viewerHtml.off("blur");a.viewerHtml.removeAttr("tabindex");if(!g){h(false)}},2000)}else{d=papaya.utilities.UrlUtils.readCookie(papaya.viewer.Preferences.COOKIE_PREFIX+PAPAYA_MANGO_INSTALLED);if(d||papaya.mangoinstalled){g=true}else{if(confirm("This feature requires that "+(papaya.utilities.PlatformUtils.ios?"iMango":"Mango")+" is installed.  Continue?")){papaya.utilities.UrlUtils.createCookie(papaya.viewer.Preferences.COOKIE_PREFIX+PAPAYA_MANGO_INSTALLED,true,papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS);g=true}}if(g){location.href=b}h(g)}}}};"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.StringUtils=papaya.utilities.StringUtils||{};papaya.utilities.StringUtils.isStringBlank=function(a){if(a){return(a.trim().length===0)}return true};papaya.utilities.StringUtils.formatNumber=function(b,a){var c=0;if(papaya.utilities.ObjectUtils.isString(b)){c=parseFloat(b)}else{c=b}if(a){c=c.toPrecision(5)}else{c=c.toPrecision(7)}return parseFloat(c)};papaya.utilities.StringUtils.getSizeString=function(b){var a=null;if(b>1048576){a=papaya.utilities.StringUtils.formatNumber(b/1048576,true)+" Mb"}else{if(b>1024){a=papaya.utilities.StringUtils.formatNumber(b/1024,true)+" Kb"}else{a=b+" Bytes"}}return a};papaya.utilities.StringUtils.wordwrap=function(e,b,a,d){a=a||"\n";b=b||75;d=d||false;if(!e){return e}var c=".{1,"+b+"}(\\s|$)"+(d?"|.{"+b+"}|.+$":"|\\S+?(\\s|$)");return e.match(new RegExp(c,"g")).join(a)};papaya.utilities.StringUtils.truncateMiddleString=function(e,c){if(e.length<=c){return e}var f="...",g=f.length,a=c-g,d=Math.ceil(a/2),b=Math.floor(a/2);return e.substr(0,d)+f+e.substr(e.length-b)};if(typeof String.prototype.startsWith!=="function"){String.prototype.startsWith=function(a){return this.indexOf(a)===0}}if(typeof String.prototype.trim!=="function"){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.UrlUtils=papaya.utilities.UrlUtils||{};papaya.utilities.UrlUtils.createCookie=function(c,d,e){var b,a;if(e){b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));a="; expires="+b.toGMTString()}else{a=""}document.cookie=c+"="+d+a+"; path=/"};papaya.utilities.UrlUtils.readCookie=function(b){var e,a,d,f;e=b+"=";a=document.cookie.split(";");for(d=0;d<a.length;d+=1){f=a[d];while(f.charAt(0)===" "){f=f.substring(1,f.length)}if(f.indexOf(e)===0){return f.substring(e.length,f.length)}}return null};papaya.utilities.UrlUtils.eraseCookie=function(a){papaya.utilities.UrlUtils.createCookie(a,"",-1)};papaya.utilities.UrlUtils.getQueryParams=function(d){var c,a,b=/[?&]?([^=]+)=([^&]*)/g;if(document.location.href.indexOf("?")!==-1){a=document.location.href.substring(document.location.href.indexOf("?")+1);a=a.split("+").join(" ");c=b.exec(a);while(c){d[decodeURIComponent(c[1])]=decodeURIComponent(c[2]);c=b.exec(a)}}};papaya.utilities.UrlUtils.getAbsoluteUrl=function(f,d){var c,b,a,e;c=window.location.href;c=c.substring(0,c.lastIndexOf("/"));b=document.createElement("a");b.href=c+"/"+d;a=b.host;e=b.pathname;if(e.charAt(0)!=="/"){e="/"+e}return(f+"://"+a+e)};"use strict";var papaya=papaya||{};papaya.core=papaya.core||{};papaya.core.Coordinate=papaya.core.Coordinate||function(c,b,a){this.x=c;this.y=b;this.z=a};papaya.core.Coordinate.prototype.setCoordinate=function(d,c,b,a){if(a){this.x=Math.round(d);this.y=Math.round(c);this.z=Math.round(b)}else{this.x=d;this.y=c;this.z=b}};papaya.core.Coordinate.prototype.isAllZeros=function(){return((this.x===0)&&(this.y===0)&&(this.z===0))};"use strict";var papaya=papaya||{};papaya.core=papaya.core||{};papaya.core.Point=papaya.core.Point||function(b,a){this.x=b;this.y=a};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Header=papaya.volume.Header||function(){this.fileFormat=null;this.imageDimensions=null;this.voxelDimensions=null;this.imageDescription=null;this.imageType=null;this.orientation=null;this.imageRange=null;this.error=null;this.origin=null;this.orientationCertainty=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN;this.onFinishedFileFormatRead=null};papaya.volume.Header.HEADER_TYPE_UNKNOWN=0;papaya.volume.Header.HEADER_TYPE_NIFTI=1;papaya.volume.Header.HEADER_TYPE_DICOM=2;papaya.volume.Header.ERROR_UNRECOGNIZED_FORMAT="This format is not recognized!";papaya.volume.Header.INVALID_IMAGE_DIMENSIONS="Image dimensions are not valid!";papaya.volume.Header.INVALID_VOXEL_DIMENSIONS="Voxel dimensions are not valid!";papaya.volume.Header.INVALID_DATATYPE="Datatype is not valid or not supported!";papaya.volume.Header.INVALID_IMAGE_RANGE="Image range is not valid!";papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN=0;papaya.volume.Header.ORIENTATION_CERTAINTY_LOW=1;papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH=2;papaya.volume.Header.prototype.findHeaderType=function(a,b){if(papaya.volume.nifti.HeaderNIFTI.isThisFormat(a,b)){return papaya.volume.Header.HEADER_TYPE_NIFTI}else{if(papaya.volume.dicom.HeaderDICOM.isThisFormat(a,b)){return papaya.volume.Header.HEADER_TYPE_DICOM}}return papaya.volume.Header.HEADER_TYPE_UNKNOWN};papaya.volume.Header.prototype.readHeaderData=function(b,e,c,d,f){var a=this.findHeaderType(b,e);this.onFinishedFileFormatRead=f;if(a===papaya.volume.Header.HEADER_TYPE_NIFTI){this.fileFormat=new papaya.volume.nifti.HeaderNIFTI();this.fileFormat.readHeaderData(e,c,d,papaya.utilities.ObjectUtils.bind(this,this.onFinishedHeaderRead))}else{if(a===papaya.volume.Header.HEADER_TYPE_DICOM){this.fileFormat=new papaya.volume.dicom.HeaderDICOM();this.fileFormat.readHeaderData(e,c,d,papaya.utilities.ObjectUtils.bind(this,this.onFinishedHeaderRead))}else{this.error=new Error(papaya.volume.Header.ERROR_UNRECOGNIZED_FORMAT);this.onFinishedFileFormatRead()}}};papaya.volume.Header.prototype.onFinishedHeaderRead=function(){if(this.fileFormat.hasError()){this.error=this.fileFormat.error}else{this.imageType=this.fileFormat.getImageType();if(!this.imageType.isValid()){this.error=new Error(papaya.volume.Header.INVALID_DATATYPE)}this.imageDimensions=this.fileFormat.getImageDimensions();if(!this.imageDimensions.isValid()){this.error=new Error(papaya.volume.Header.INVALID_IMAGE_DIMENSIONS)}this.voxelDimensions=this.fileFormat.getVoxelDimensions();if(!this.voxelDimensions.isValid()){this.error=new Error(papaya.volume.Header.INVALID_VOXEL_DIMENSIONS)}this.orientation=this.fileFormat.getOrientation();if(!this.orientation.isValid()){this.orientation=new papaya.volume.Orientation(papaya.volume.Orientation.DEFAULT);this.orientationCertainty=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN}else{this.orientationCertainty=this.fileFormat.getOrientationCertainty()}this.orientation.createInfo(this.imageDimensions,this.voxelDimensions);this.origin=this.orientation.convertCoordinate(this.fileFormat.getOrigin(),new papaya.core.Coordinate(0,0,0));this.imageRange=this.fileFormat.getImageRange();if(!this.imageRange.isValid()){this.error=new Error(papaya.volume.Header.INVALID_IMAGE_RANGE)}this.imageDescription=this.fileFormat.getImageDescription()}this.onFinishedFileFormatRead()};papaya.volume.Header.prototype.getName=function(){return this.fileFormat.getName()};papaya.volume.Header.prototype.readImageData=function(a,b){this.fileFormat.readImageData(a,b)};papaya.volume.Header.prototype.hasError=function(){return(this.error!==null)};papaya.volume.Header.prototype.getBestTransform=function(){return this.fileFormat.getBestTransform()};papaya.volume.Header.prototype.getBestTransformOrigin=function(){return this.fileFormat.getBestTransformOrigin()};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageData=papaya.volume.ImageData||function(){this.data=null};papaya.volume.ImageData.prototype.readFileData=function(f,a,b){var e,c,d;if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED)&&(f.imageType.numBytes===1)){this.data=new Int8Array(a,0,a.byteLength)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED)&&(f.imageType.numBytes===1)){this.data=new Uint8Array(a,0,a.byteLength)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED)&&(f.imageType.numBytes===2)){this.data=new Int16Array(a,0,a.byteLength/2)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED)&&(f.imageType.numBytes===2)){this.data=new Uint16Array(a,0,a.byteLength/2)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED)&&(f.imageType.numBytes===4)){this.data=new Int32Array(a,0,a.byteLength/4)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED)&&(f.imageType.numBytes===4)){this.data=new Uint32Array(a,0,a.byteLength/4)}else{if((f.imageType.datatype===papaya.volume.ImageType.DATATYPE_FLOAT)&&(f.imageType.numBytes===4)){if(f.imageType.swapped){e=a.byteLength/4;c=new DataView(a,0);this.data=new Float32Array(e);for(d=0;d<e;d+=1){this.data[d]=c.getFloat32(d*Float32Array.BYTES_PER_ELEMENT)}}else{this.data=new Float32Array(a,0,a.byteLength/4)}}}}}}}}b()};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageDescription=papaya.volume.ImageDescription||function(a){this.notes="(none)";if(!papaya.utilities.StringUtils.isStringBlank(a)){this.notes=a}};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageDimensions=papaya.volume.ImageDimensions||function(c,a,d,b){this.cols=c;this.rows=a;this.slices=d;this.xDim=-1;this.yDim=-1;this.zDim=-1;this.timepoints=b||1;this.dataOffsets=[];this.dataLengths=[]};papaya.volume.ImageDimensions.prototype.getNumVoxelsSeries=function(){return this.cols*this.rows*this.slices*this.timepoints};papaya.volume.ImageDimensions.prototype.getNumVoxelsSlice=function(){return this.rows*this.cols};papaya.volume.ImageDimensions.prototype.getNumVoxelsVolume=function(){return this.rows*this.cols*this.slices};papaya.volume.ImageDimensions.prototype.isValid=function(){return((this.cols>0)&&(this.rows>0)&&(this.slices>0)&&(this.timepoints>0)&&(this.dataOffsets[0]>=0)&&(this.dataLengths[0]>=0))};var moduleType=typeof module;if((moduleType!=="undefined")&&module.exports){module.exports.ImageDimensions=papaya.volume.ImageDimensions}"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageRange=papaya.volume.ImageRange||function(b,a){this.displayMin=b;this.displayMax=a;this.imageMin=0;this.imageMax=0;this.dataScaleSlopes=[];this.dataScaleIntercepts=[];this.globalDataScaleSlope=1;this.globalDataScaleIntercept=0;this.usesGlobalDataScale=false};papaya.volume.ImageRange.DEFAULT_SCALE=1;papaya.volume.ImageRange.DEFAULT_INTERCEPT=0;papaya.volume.ImageRange.prototype.isValid=function(){return true};papaya.volume.ImageRange.prototype.setGlobalDataScale=function(b,a){this.globalDataScaleSlope=b;this.globalDataScaleIntercept=a;this.usesGlobalDataScale=true;this.dataScaleSlopes=[];this.dataScaleIntercepts=[]};papaya.volume.ImageRange.prototype.validateDataScale=function(){var b,a,c=false;if((this.globalDataScaleSlope!==1)&&(this.globalDataScaleIntercept!==0)){this.dataScaleSlopes=[];this.dataScaleIntercepts=[]}else{if((this.dataScaleSlopes.length>0)&&(this.dataScaleIntercepts.length>0)){a=this.dataScaleSlopes[0];for(b=1;b<this.dataScaleSlopes.length;b+=1){if(a!==this.dataScaleSlopes[b]){c=true;break}}a=this.dataScaleIntercepts[0];for(b=1;b<this.dataScaleIntercepts.length;b+=1){if(a!==this.dataScaleIntercepts[b]){c=true;break}}if(c){this.usesGlobalDataScale=false}else{this.setGlobalDataScale(this.dataScaleSlopes[0],this.dataScaleIntercepts[0])}}else{this.setGlobalDataScale(1,0)}}};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageType=papaya.volume.ImageType||function(c,a,d,b){this.datatype=c;this.numBytes=a;this.littleEndian=d;this.swapped=false;this.compressed=b};papaya.volume.ImageType.DATATYPE_UNKNOWN=0;papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED=1;papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED=2;papaya.volume.ImageType.DATATYPE_FLOAT=3;papaya.volume.ImageType.MAX_NUM_BYTES_SUPPORTED=4;papaya.volume.ImageType.prototype.isValid=function(){return((this.datatype<=papaya.volume.ImageType.DATATYPE_FLOAT)&&(this.datatype>papaya.volume.ImageType.DATATYPE_UNKNOWN)&&(this.numBytes>0)&&(this.numBytes<=papaya.volume.ImageType.MAX_NUM_BYTES_SUPPORTED))};papaya.volume.ImageType.prototype.getTypeDescription=function(){if(this.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED){return"Signed Integer"}if(this.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED){return"Unsigned Integer"}if(this.datatype===papaya.volume.ImageType.DATATYPE_FLOAT){return"Float"}return"Unknown"};papaya.volume.ImageType.prototype.getOrderDescription=function(){if(this.numBytes>1){if(this.littleEndian){return"Little Endian"}return"Big Endian"}return null};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.nifti=papaya.volume.nifti||{};papaya.volume.nifti.HeaderNIFTI=papaya.volume.nifti.HeaderNIFTI||function(){this.nifti=null;this.compressed=false;this.imageData=null};papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT="XYZ-++";papaya.volume.nifti.HeaderNIFTI.SPATIAL_UNITS_MASK=7;papaya.volume.nifti.HeaderNIFTI.TEMPORAL_UNITS_MASK=56;papaya.volume.nifti.HeaderNIFTI.isThisFormat=function(d,f){var e,c,b,a;if(d.indexOf(".nii")!==-1){return true}e=new DataView(f[0]);c=e.getUint8(papaya.volume.nifti.MAGIC_NUMBER_LOCATION);b=e.getUint8(papaya.volume.nifti.MAGIC_NUMBER_LOCATION+1);a=e.getUint8(papaya.volume.nifti.MAGIC_NUMBER_LOCATION+2);return !!((c===papaya.volume.nifti.MAGIC_NUMBER[0])&&(b===papaya.volume.nifti.MAGIC_NUMBER[1])&&(a===papaya.volume.nifti.MAGIC_NUMBER[2]))};papaya.volume.nifti.HeaderNIFTI.prototype.readHeaderData=function(d,a,c,e){var b;this.nifti=new papaya.volume.nifti.NIFTI();this.nifti.readFileData(d[0]);b=this.getImageDimensions();this.imageData=d[0].slice(b.dataOffsets[0],b.dataOffsets[0]+b.dataLengths[0]);e()};papaya.volume.nifti.HeaderNIFTI.prototype.readImageData=function(a,b){b(this.imageData);this.imageData=null};papaya.volume.nifti.HeaderNIFTI.prototype.getImageDimensions=function(){var a=new papaya.volume.ImageDimensions(this.nifti.dims[1],this.nifti.dims[2],this.nifti.dims[3],this.nifti.dims[4]);a.dataOffsets[0]=this.nifti.vox_offset;a.dataLengths[0]=(a.getNumVoxelsSeries()*(this.nifti.numBitsPerVoxel/8));return a};papaya.volume.nifti.HeaderNIFTI.prototype.getName=function(){return null};papaya.volume.nifti.HeaderNIFTI.prototype.getVoxelDimensions=function(){var a;a=new papaya.volume.VoxelDimensions(this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[4]);a.spatialUnit=(this.nifti.xyzt_units&papaya.volume.nifti.HeaderNIFTI.SPATIAL_UNITS_MASK);a.temporalUnit=(this.nifti.xyzt_units&papaya.volume.nifti.HeaderNIFTI.TEMPORAL_UNITS_MASK);return a};papaya.volume.nifti.HeaderNIFTI.prototype.getImageType=function(){var a=papaya.volume.ImageType.DATATYPE_UNKNOWN;if((this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_UINT8)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_UINT16)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_UINT32)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_UINT64)){a=papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED}else{if((this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_INT8)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_INT16)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_INT32)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_INT64)){a=papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED}else{if((this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_FLOAT32)||(this.nifti.datatypeCode===papaya.volume.nifti.NIFTI_TYPE_FLOAT64)){a=papaya.volume.ImageType.DATATYPE_FLOAT}}}return new papaya.volume.ImageType(a,this.nifti.numBitsPerVoxel/8,this.nifti.littleEndian,this.compressed)};papaya.volume.nifti.HeaderNIFTI.prototype.getOrientation=function(){var a=null;if((this.nifti.qform_code>0)&&!this.qFormHasRotations()){a=this.getOrientationQform()}if((this.nifti.sform_code>this.nifti.qform_code)&&!this.sFormHasRotations()){a=this.getOrientationSform()}if(a===null){a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}return new papaya.volume.Orientation(a)};papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationQform=function(){var a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT,b=this.nifti.convertNiftiQFormToNiftiSForm(this.nifti.quatern_b,this.nifti.quatern_c,this.nifti.quatern_d,this.nifti.qoffset_x,this.nifti.qoffset_y,this.nifti.qoffset_z,this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[0]);if(this.nifti.qform_code>0){a=this.nifti.convertNiftiSFormToNEMA(b);if(!papaya.volume.Orientation.isValidOrientationString(a)){a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}}else{a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}return a};papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationSform=function(){var a=this.nifti.convertNiftiSFormToNEMA(this.nifti.affine);if(!papaya.volume.Orientation.isValidOrientationString(a)){a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}return a};papaya.volume.nifti.HeaderNIFTI.prototype.getQformMatCopy=function(){return this.nifti.getQformMat().clone()};papaya.volume.nifti.HeaderNIFTI.prototype.getSformMatCopy=function(){return this.nifti.affine.clone()};papaya.volume.nifti.HeaderNIFTI.prototype.getOrigin=function(o,m){var p=new papaya.core.Coordinate(0,0,0),b,j,q,k,c,g,l,d,a,i,n,h,f,e;if((this.nifti.qform_code>0)&&!m){if(this.qFormHasRotations()){j=this.nifti.getQformMat();q=numeric.inv(j);p.setCoordinate(q[0][3],q[1][3],q[2][3])}else{b=this.nifti.convertNiftiQFormToNiftiSForm(this.nifti.quatern_b,this.nifti.quatern_c,this.nifti.quatern_d,this.nifti.qoffset_x,this.nifti.qoffset_y,this.nifti.qoffset_z,this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[0]);c=this.nifti.convertNiftiSFormToNEMA(b);if(!papaya.volume.Orientation.isValidOrientationString(c)){c=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}l=c.substring(0,3).toUpperCase();d=c.substring(3);a=l.indexOf("X");i=l.indexOf("Y");n=l.indexOf("Z");h=(d.charAt(a)==="+");f=(d.charAt(i)==="+");e=(d.charAt(n)==="+");g=new Array(3);g[0]=((this.nifti.qoffset_x/this.nifti.pixDims[a+1]))*(h?-1:1);g[1]=((this.nifti.qoffset_y/this.nifti.pixDims[i+1]))*(f?-1:1);g[2]=((this.nifti.qoffset_z/this.nifti.pixDims[n+1]))*(e?-1:1);p.setCoordinate(g[0],g[1],g[2],true)}}else{if((this.nifti.sform_code>0)&&!o){if(this.sFormHasRotations()){k=numeric.inv(this.nifti.affine);p.setCoordinate(k[0][3],k[1][3],k[2][3])}else{c=this.nifti.convertNiftiSFormToNEMA(this.nifti.affine);if(!papaya.volume.Orientation.isValidOrientationString(c)){c=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT}l=c.substring(0,3).toUpperCase();d=c.substring(3);a=l.indexOf("X");i=l.indexOf("Y");n=l.indexOf("Z");h=(d.charAt(a)==="+");f=(d.charAt(i)==="+");e=(d.charAt(n)==="+");g=new Array(3);g[0]=((this.nifti.affine[0][3]/this.nifti.pixDims[a+1]))*(h?-1:1);g[1]=((this.nifti.affine[1][3]/this.nifti.pixDims[i+1]))*(f?-1:1);g[2]=((this.nifti.affine[2][3]/this.nifti.pixDims[n+1]))*(e?-1:1);p.setCoordinate(g[0],g[1],g[2],true)}}}if(p.isAllZeros()){p.setCoordinate(this.nifti.dims[1]/2,this.nifti.dims[2]/2,this.nifti.dims[3]/2)}return p};papaya.volume.nifti.HeaderNIFTI.prototype.qFormHasRotations=function(){return papaya.volume.Transform.hasRotations(this.getQformMatCopy())};papaya.volume.nifti.HeaderNIFTI.prototype.sFormHasRotations=function(){return papaya.volume.Transform.hasRotations(this.getSformMatCopy())};papaya.volume.nifti.HeaderNIFTI.prototype.getImageRange=function(){var c=new papaya.volume.ImageRange(this.nifti.cal_min,this.nifti.cal_max),a=this.nifti.scl_slope,b=this.getImageDimensions();if(a===0){a=1}c.setGlobalDataScale(a,this.nifti.scl_inter,b.slices*b.timepoints);c.validateDataScale();return c};papaya.volume.nifti.HeaderNIFTI.prototype.hasError=function(){return this.nifti.hasError()};papaya.volume.nifti.HeaderNIFTI.prototype.getImageDescription=function(){return new papaya.volume.ImageDescription(this.nifti.description)};papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationCertainty=function(){var b,a;b=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN;if((this.nifti.qform_code>0)||(this.nifti.sform_code>0)){b=papaya.volume.Header.ORIENTATION_CERTAINTY_LOW;a=this.getOrigin();if((a!==null)&&!a.isAllZeros()){b=papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH}}return b};papaya.volume.nifti.HeaderNIFTI.prototype.getBestTransform=function(){if((this.nifti.qform_code>0)&&(this.nifti.qform_code>this.nifti.sform_code)&&this.qFormHasRotations()){return this.getQformMatCopy()}if((this.nifti.sform_code>0)&&(this.nifti.sform_code>=this.nifti.qform_code)&&this.sFormHasRotations()){return this.getSformMatCopy()}return null};papaya.volume.nifti.HeaderNIFTI.prototype.getBestTransformOrigin=function(){if((this.nifti.qform_code>0)&&(this.nifti.qform_code>this.nifti.sform_code)&&this.qFormHasRotations()){return this.getOrigin(true,false)}if((this.nifti.sform_code>0)&&(this.nifti.sform_code>=this.nifti.qform_code)&&this.sFormHasRotations()){return this.getOrigin(false,true)}return null};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.nifti=papaya.volume.nifti||{};papaya.volume.nifti.NIFTI=papaya.volume.nifti.NIFTI||function(){this.error=null;this.littleEndian=false;this.dim_info=0;this.dims=[];this.intent_p1=0;this.intent_p2=0;this.intent_p3=0;this.intent_code=0;this.datatypeCode=0;this.numBitsPerVoxel=0;this.slice_start=0;this.slice_end=0;this.slice_code=0;this.pixDims=[];this.vox_offset=0;this.scl_slope=1;this.scl_inter=0;this.xyzt_units=0;this.cal_max=0;this.cal_min=0;this.slice_duration=0;this.toffset=0;this.description="";this.aux_file="";this.intent_name="";this.qform_code=0;this.sform_code=0;this.quatern_b=0;this.quatern_c=0;this.quatern_d=0;this.qoffset_x=0;this.qoffset_y=0;this.qoffset_z=0;this.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];this.magic=0};papaya.volume.nifti.MAGIC_COOKIE=348;papaya.volume.nifti.NII_HDR_SIZE=352;papaya.volume.nifti.DT_NONE=0;papaya.volume.nifti.DT_BINARY=1;papaya.volume.nifti.NIFTI_TYPE_UINT8=2;papaya.volume.nifti.NIFTI_TYPE_INT16=4;papaya.volume.nifti.NIFTI_TYPE_INT32=8;papaya.volume.nifti.NIFTI_TYPE_FLOAT32=16;papaya.volume.nifti.NIFTI_TYPE_COMPLEX64=32;papaya.volume.nifti.NIFTI_TYPE_FLOAT64=64;papaya.volume.nifti.NIFTI_TYPE_RGB24=128;papaya.volume.nifti.DT_ALL=255;papaya.volume.nifti.NIFTI_TYPE_INT8=256;papaya.volume.nifti.NIFTI_TYPE_UINT16=512;papaya.volume.nifti.NIFTI_TYPE_UINT32=768;papaya.volume.nifti.NIFTI_TYPE_INT64=1024;papaya.volume.nifti.NIFTI_TYPE_UINT64=1280;papaya.volume.nifti.NIFTI_TYPE_FLOAT128=1536;papaya.volume.nifti.NIFTI_TYPE_COMPLEX128=1792;papaya.volume.nifti.NIFTI_TYPE_COMPLEX256=2048;papaya.volume.nifti.MAGIC_NUMBER_LOCATION=344;papaya.volume.nifti.MAGIC_NUMBER=[110,43,49];papaya.volume.nifti.NIFTI.prototype.readFileData=function(f){var g=new DataView(f),d=this.getIntAt(g,0,this.littleEndian),e,c,a,b;if(d!==papaya.volume.nifti.MAGIC_COOKIE){this.littleEndian=true;d=this.getIntAt(g,0,this.littleEndian)}if(d!==papaya.volume.nifti.MAGIC_COOKIE){this.error=new Error("This does not appear to be a NIFTI file!");return}this.dim_info=this.getByteAt(g,39);for(e=0;e<8;e+=1){b=40+(e*2);this.dims[e]=this.getShortAt(g,b,this.littleEndian)}this.intent_p1=this.getFloatAt(g,56,this.littleEndian);this.intent_p2=this.getFloatAt(g,60,this.littleEndian);this.intent_p3=this.getFloatAt(g,64,this.littleEndian);this.intent_code=this.getFloatAt(g,68,this.littleEndian);this.datatypeCode=this.getShortAt(g,70,this.littleEndian);this.numBitsPerVoxel=this.getShortAt(g,72,this.littleEndian);this.slice_start=this.getShortAt(g,74,this.littleEndian);for(e=0;e<8;e+=1){b=76+(e*4);this.pixDims[e]=this.getFloatAt(g,b,this.littleEndian)}this.vox_offset=this.getFloatAt(g,108,this.littleEndian);this.scl_slope=this.getFloatAt(g,112,this.littleEndian);this.scl_inter=this.getFloatAt(g,116,this.littleEndian);this.slice_end=this.getShortAt(g,120,this.littleEndian);this.slice_code=this.getByteAt(g,122);this.xyzt_units=this.getByteAt(g,123);this.cal_max=this.getFloatAt(g,124,this.littleEndian);this.cal_min=this.getFloatAt(g,128,this.littleEndian);this.slice_duration=this.getFloatAt(g,132,this.littleEndian);this.toffset=this.getFloatAt(g,136,this.littleEndian);this.description=this.getStringAt(g,148,228);this.qform_code=this.getShortAt(g,252,this.littleEndian);this.sform_code=this.getShortAt(g,254,this.littleEndian);this.quatern_b=this.getFloatAt(g,256,this.littleEndian);this.quatern_c=this.getFloatAt(g,260,this.littleEndian);this.quatern_d=this.getFloatAt(g,264,this.littleEndian);this.qoffset_x=this.getFloatAt(g,268,this.littleEndian);this.qoffset_y=this.getFloatAt(g,272,this.littleEndian);this.qoffset_z=this.getFloatAt(g,276,this.littleEndian);for(c=0;c<3;c+=1){for(a=0;a<4;a+=1){b=280+(((c*4)+a)*4);this.affine[c][a]=this.getFloatAt(g,b,this.littleEndian)}}this.affine[3][0]=0;this.affine[3][1]=0;this.affine[3][2]=0;this.affine[3][3]=1;this.intent_name=this.getStringAt(g,328,344);this.magic=this.getStringAt(g,344,348)};papaya.volume.nifti.NIFTI.prototype.convertNiftiQFormToNiftiSForm=function(j,i,h,v,s,q,n,m,l,f){var g=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],w,u=j,r=i,p=h,o,e,k;g[3][0]=g[3][1]=g[3][2]=0;g[3][3]=1;w=1-(u*u+r*r+p*p);if(w<1e-7){w=1/Math.sqrt(u*u+r*r+p*p);u*=w;r*=w;p*=w;w=0}else{w=Math.sqrt(w)}o=(n>0)?n:1;e=(m>0)?m:1;k=(l>0)?l:1;if(f<0){k=-k}g[0][0]=(w*w+u*u-r*r-p*p)*o;g[0][1]=2*(u*r-w*p)*e;g[0][2]=2*(u*p+w*r)*k;g[1][0]=2*(u*r+w*p)*o;g[1][1]=(w*w+r*r-u*u-p*p)*e;g[1][2]=2*(r*p-w*u)*k;g[2][0]=2*(u*p-w*r)*o;g[2][1]=2*(r*p+w*u)*e;g[2][2]=(w*w+p*p-r*r-u*u)*k;g[0][3]=v;g[1][3]=s;g[2][3]=q;return g};papaya.volume.nifti.NIFTI.prototype.convertNiftiSFormToNEMA=function(g){var C,B,z,S,L,J,n,l,f,U,v,x,G,F,E,D,A,y,K,w,c,e,H,s,o,O,h,m,I,u,b,N,a,d;E=0;h=[[0,0,0],[0,0,0],[0,0,0]];m=[[0,0,0],[0,0,0],[0,0,0]];C=g[0][0];B=g[0][1];z=g[0][2];S=g[1][0];L=g[1][1];J=g[1][2];n=g[2][0];l=g[2][1];f=g[2][2];U=Math.sqrt(C*C+S*S+n*n);if(U===0){return null}C/=U;S/=U;n/=U;U=Math.sqrt(B*B+L*L+l*l);if(U===0){return null}B/=U;L/=U;l/=U;U=C*B+S*L+n*l;if(Math.abs(U)>0.0001){B-=U*C;L-=U*S;l-=U*n;U=Math.sqrt(B*B+L*L+l*l);if(U===0){return null}B/=U;L/=U;l/=U}U=Math.sqrt(z*z+J*J+f*f);if(U===0){z=S*l-n*L;J=n*B-l*C;f=C*L-S*B}else{z/=U;J/=U;f/=U}U=C*z+S*J+n*f;if(Math.abs(U)>0.0001){z-=U*C;J-=U*S;f-=U*n;U=Math.sqrt(z*z+J*J+f*f);if(U===0){return null}z/=U;J/=U;f/=U}U=B*z+L*J+l*f;if(Math.abs(U)>0.0001){z-=U*B;J-=U*L;f-=U*l;U=Math.sqrt(z*z+J*J+f*f);if(U===0){return null}z/=U;J/=U;f/=U}h[0][0]=C;h[0][1]=B;h[0][2]=z;h[1][0]=S;h[1][1]=L;h[1][2]=J;h[2][0]=n;h[2][1]=l;h[2][2]=f;v=this.nifti_mat33_determ(h);if(v===0){return null}O=-666;K=e=H=s=1;w=2;c=3;for(G=1;G<=3;G+=1){for(F=1;F<=3;F+=1){if(G!==F){for(E=1;E<=3;E+=1){if(!(G===E||F===E)){m[0][0]=m[0][1]=m[0][2]=m[1][0]=m[1][1]=m[1][2]=m[2][0]=m[2][1]=m[2][2]=0;for(D=-1;D<=1;D+=2){for(A=-1;A<=1;A+=2){for(y=-1;y<=1;y+=2){m[0][G-1]=D;m[1][F-1]=A;m[2][E-1]=y;x=this.nifti_mat33_determ(m);if((x*v)>0){o=this.nifti_mat33_mul(m,h);U=o[0][0]+o[1][1]+o[2][2];if(U>O){O=U;K=G;w=F;c=E;e=D;H=A;s=y}}}}}}}}}}I=u=b=N=a=d=0;switch(K*e){case 1:I="X";N="+";break;case -1:I="X";N="-";break;case 2:I="Y";N="+";break;case -2:I="Y";N="-";break;case 3:I="Z";N="+";break;case -3:I="Z";N="-";break}switch(w*H){case 1:u="X";a="+";break;case -1:u="X";a="-";break;case 2:u="Y";a="+";break;case -2:u="Y";a="-";break;case 3:u="Z";a="+";break;case -3:u="Z";a="-";break}switch(c*s){case 1:b="X";d="+";break;case -1:b="X";d="-";break;case 2:b="Y";d="+";break;case -2:b="Y";d="-";break;case 3:b="Z";d="+";break;case -3:b="Z";d="-";break}return(I+u+b+N+a+d)};papaya.volume.nifti.NIFTI.prototype.nifti_mat33_mul=function(a,e){var d=[[0,0,0],[0,0,0],[0,0,0]],c,b;for(c=0;c<3;c+=1){for(b=0;b<3;b+=1){d[c][b]=a[c][0]*e[0][b]+a[c][1]*e[1][b]+a[c][2]*e[2][b]}}return d};papaya.volume.nifti.NIFTI.prototype.nifti_mat33_determ=function(d){var g,f,e,c,b,a,j,i,h;g=d[0][0];f=d[0][1];e=d[0][2];c=d[1][0];b=d[1][1];a=d[1][2];j=d[2][0];i=d[2][1];h=d[2][2];return(g*b*h-g*i*a-c*f*h+c*i*e+j*f*a-j*b*e)};papaya.volume.nifti.NIFTI.prototype.getStringAt=function(d,f,a){var e="",c,b;for(c=f;c<a;c+=1){b=d.getUint8(c);if(b!==0){e+=String.fromCharCode(b)}}return e};papaya.volume.nifti.NIFTI.prototype.getByteAt=function(a,b){return a.getInt8(b)};papaya.volume.nifti.NIFTI.prototype.getShortAt=function(a,c,b){return a.getInt16(c,b)};papaya.volume.nifti.NIFTI.prototype.getIntAt=function(a,c,b){return a.getInt32(c,b)};papaya.volume.nifti.NIFTI.prototype.getFloatAt=function(a,c,b){return a.getFloat32(c,b)};papaya.volume.nifti.NIFTI.prototype.hasError=function(){return(this.error!==null)};papaya.volume.nifti.NIFTI.prototype.getQformMat=function(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.dicom=papaya.volume.dicom||{};papaya.volume.dicom.HeaderDICOM=papaya.volume.dicom.HeaderDICOM||function(){this.series=null;this.seriesMap=[];this.error=null;this.onFinishedHeaderRead=null;this.dialogHandler=null};papaya.volume.dicom.HeaderDICOM.ORIENTATION_DEFAULT="XYZ+--";papaya.volume.dicom.HeaderDICOM.isThisFormat=function(a,f){var c,e,g,d,h=0,b,i;if(a.indexOf(".dcm")!==-1){return true}c=new DataView(f[0]);e=daikon.Parser.MAGIC_COOKIE_OFFSET;g=daikon.Parser.MAGIC_COOKIE.length;for(d=0;d<g;d+=1){if(c.getUint8(e+d)===daikon.Parser.MAGIC_COOKIE[d]){h+=1}}if(h===4){return true}b=new daikon.Parser();i=b.testForValidTag(c);return((i!==null)&&(i.group<=8)&&!b.hasError())};papaya.volume.dicom.HeaderDICOM.prototype.setSeries=function(a,c){var b;for(b=0;b<Object.keys(this.seriesMap).length;b+=1){if(Object.keys(this.seriesMap)[b].indexOf(c)!==-1){this.series=this.seriesMap[Object.keys(this.seriesMap)[b]];break}}};papaya.volume.dicom.HeaderDICOM.prototype.getDataScaleSlope=function(a,b){if(a){return(b.getDataScaleElscint()||1)}return(b.getDataScaleSlope()||1)};papaya.volume.dicom.HeaderDICOM.prototype.getDataScaleIntercept=function(a,b){if(a){return 0}return(b.getDataScaleIntercept()||0)};papaya.volume.dicom.HeaderDICOM.prototype.finishedHeaderRead=function(){var a,b,c;if(Object.keys(this.seriesMap).length>1){this.series=this.seriesMap[Object.keys(this.seriesMap)[0]];b=[];for(c=0;c<Object.keys(this.seriesMap).length;c+=1){b.push(this.seriesMap[Object.keys(this.seriesMap)[c]])}a={items:[{label:"Select:",field:"series",options:b}]};this.dialogHandler.showDialog("Select DICOM Series",a,this,papaya.utilities.ObjectUtils.bind(this,this.setSeries),papaya.utilities.ObjectUtils.bind(this,this.finishedSeriesSelection))}else{this.series=this.seriesMap[Object.keys(this.seriesMap)[0]];if(this.series.images.length>0){this.series.buildSeries();if(this.series.isCompressed){this.error=new Error("Compressed data is not currently supported!")}}else{this.error=new Error("No images found!")}this.onFinishedHeaderRead()}};papaya.volume.dicom.HeaderDICOM.prototype.finishedSeriesSelection=function(){if(this.series.images.length>0){this.series.buildSeries();if(this.series.isCompressed){this.error=new Error("Compressed data is not currently supported!")}}else{this.error=new Error("No images found!")}this.seriesMap=null;this.onFinishedHeaderRead()};papaya.volume.dicom.HeaderDICOM.prototype.readHeaderData=function(c,a,b,d){this.onFinishedHeaderRead=d;this.dialogHandler=b;this.readNextHeaderData(c,0,a,papaya.utilities.ObjectUtils.bind(this,this.finishedHeaderRead))};papaya.volume.dicom.HeaderDICOM.prototype.readNextHeaderData=function(d,a,c,f){var e,b;if(a>=d.length){c.drawProgress(1,"Reading DICOM Headers");f()}else{e=daikon.Series.parseImage(new DataView(d[a]));if(e===null){this.error=daikon.Series.parserError}else{if(e.hasPixelData()){b=this.findSeries(e.getSeriesId());if(!b){b=new daikon.Series();this.seriesMap[e.getSeriesId()]=b}b.addImage(e)}}if(this.error){f()}else{c.drawProgress(a/d.length,"Reading DICOM Headers");setTimeout(function(){this.readNextHeaderData(d,a+1,c,f)}.bind(this),0)}}};papaya.volume.dicom.HeaderDICOM.prototype.getName=function(){var a=this.series.getName();if(a){return a}else{return null}};papaya.volume.dicom.HeaderDICOM.prototype.findSeries=function(a){if(Object.keys(this.seriesMap).length===0){return null}else{return this.seriesMap[a]}};papaya.volume.dicom.HeaderDICOM.prototype.readImageData=function(a,b){this.series.concatenateImageData(a,b)};papaya.volume.dicom.HeaderDICOM.prototype.getImageDimensions=function(){var b,d,c,a;if(this.series.isMosaic){d=this.series.images[0].getMosaicCols()*this.series.images[0].getMosaicRows();b=new papaya.volume.ImageDimensions(parseInt(this.series.images[0].getCols()/this.series.images[0].getMosaicCols()),parseInt(this.series.images[0].getRows()/this.series.images[0].getMosaicRows()),d,this.series.images.length)}else{if(this.series.isMultiFrameVolume){b=new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),this.series.numberOfFrames,1)}else{if(this.series.isMultiFrameTimeseries){b=new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),this.series.numberOfFramesInFile,this.series.numberOfFrames)}else{if(this.series.isImplicitTimeseries){b=new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),parseInt(this.series.images.length/this.series.numberOfFrames),this.series.numberOfFrames)}else{b=new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),this.series.images.length,1)}}}}a=parseInt((b.getNumVoxelsSeries()*parseInt(this.series.images[0].getBitsAllocated()/8))/this.series.images.length);for(c=0;c<this.series.images.length;c+=1){b.dataOffsets[c]=this.series.images[c].getPixelData().offsetValue;b.dataLengths[c]=a}return b};papaya.volume.dicom.HeaderDICOM.prototype.getVoxelDimensions=function(){var d,b,c,a;a=(this.series.images[0].getPixelSpacing()||[0,0]);b=Math.max(this.series.images[0].getSliceGap(),this.series.images[0].getSliceThickness());if(this.series.isMosaic||this.series.isMultiFrame){d=new papaya.volume.VoxelDimensions(a[1],a[0],b,this.series.images[0].getTR()/1000)}else{if(this.series.images.length===1){d=new papaya.volume.VoxelDimensions(a[1],a[0],b,this.series.images[0].getTR()/1000)}else{c=Math.abs(this.series.images[0].getSliceLocation()-this.series.images[1].getSliceLocation());if(c===0){c=this.series.images[0].getSliceThickness()}d=new papaya.volume.VoxelDimensions(a[1],a[0],c,this.series.images[0].getTR()/1000)}}if(!d.isValid()){if(d.rowSize===0){d.rowSize=1}if(d.colSize===0){d.colSize=1}if(d.sliceSize===0){d.sliceSize=1}}d.spatialUnit=papaya.volume.VoxelDimensions.UNITS_MM;d.temporalUnit=papaya.volume.VoxelDimensions.UNITS_SEC;return d};papaya.volume.dicom.HeaderDICOM.prototype.getImageType=function(){var b,a;b=this.series.images[0].getDataType();if(b===daikon.Image.BYTE_TYPE_INTEGER){a=papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED}else{if(b===daikon.Image.BYTE_TYPE_INTEGER_UNSIGNED){a=papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED}else{if(b===daikon.Image.BYTE_TYPE_FLOAT){a=papaya.volume.ImageType.DATATYPE_FLOAT}else{a=papaya.volume.ImageType.DATATYPE_UNKNOWN}}}return new papaya.volume.ImageType(a,parseInt(this.series.images[0].getBitsAllocated()/8),this.series.images[0].littleEndian,false)};papaya.volume.dicom.HeaderDICOM.prototype.getImageRange=function(){var f,m,j,r,s,v,o,y,u,w,p,n,q,d,e,l=[],c=[],i,x,a,h,g,b=[],k=[];m=0;j=0;for(v=0;v<this.series.images.length;v+=1){o=this.series.images[v];s=(o.getImageMax()*this.getDataScaleSlope(this.series.isElscint,o))+(o.getDataScaleIntercept()||0);r=(o.getImageMin()*this.getDataScaleSlope(this.series.isElscint,o))+(o.getDataScaleIntercept()||0);if(v===0){m=s;j=r}else{if(s>m){m=s}if(r<j){j=r}}}y=0;u=0;if(this.series.isElscint){for(v=0;v<this.series.images.length;v+=1){o=this.series.images[v];p=o.getWindowWidth()*o.getDataScaleElscint();w=o.getWindowCenter()*o.getDataScaleElscint();if(v===0){y=p;u=w}else{if(u<w){y=p;u=w}}}}else{for(v=0;v<this.series.images.length;v+=1){o=this.series.images[v];p=o.getWindowWidth();w=o.getWindowCenter();if(v===0){y=p;u=w}else{if(u<w){y=p;u=w}}}}f=new papaya.volume.ImageRange(j,m);f.displayMin=(u-(y/2));f.displayMax=(u+(y/2));n=this.getImageDimensions();if(this.series.isMosaic){d=n.slices;e=d*this.series.images.length;for(v=0;v<e;v+=1){o=this.series.images[parseInt(v/d)];l[v]=this.getDataScaleSlope(this.series.isElscint,o);c[v]=this.getDataScaleIntercept(this.series.isElscint,o)}f.dataScaleSlopes=l;f.dataScaleIntercepts=c}else{if(this.series.isMultiFrame){i=n.slices*n.timepoints;x=[];a=[];h=parseInt(i/this.series.images.length);for(v=0;v<this.series.images.length;v+=1){for(q=0;q<h;q+=1){o=this.series.images[v];x[(v*h)+q]=this.getDataScaleSlope(this.series.isElscint,o);a[(v*h)+q]=this.getDataScaleIntercept(this.series.isElscint,o)}}f.dataScaleSlopes=x;f.dataScaleIntercepts=a}else{if(this.series.isImplicitTimeseries){g=n.slices*n.timepoints;if(this.series.images.length!==g){f.setGlobalDataScale(this.getDataScaleSlope(this.series.isElscint,this.series.images[0]),this.getDataScaleIntercept(this.series.isElscint,this.series.images[0]),this.series.numberOfFrames)}else{for(v=0;v<this.series.images.length;v+=1){o=this.series.images[v];b[v]=this.getDataScaleSlope(this.series.isElscint,o);k[v]=this.getDataScaleIntercept(this.series.isElscint,o)}f.dataScaleSlopes=b;f.dataScaleIntercepts=k}}else{for(v=0;v<this.series.images.length;v+=1){o=this.series.images[v];b[v]=this.getDataScaleSlope(this.series.isElscint,o);k[v]=this.getDataScaleIntercept(this.series.isElscint,o)}f.dataScaleSlopes=b;f.dataScaleIntercepts=k}}}f.validateDataScale();return f};papaya.volume.dicom.HeaderDICOM.prototype.getOrientation=function(){var a=this.series.images[0].getOrientation();if(a===null){a=papaya.volume.dicom.HeaderDICOM.ORIENTATION_DEFAULT}a=a.substring(0,5)+(this.series.sliceSense?"+":"-");return new papaya.volume.Orientation(a)};papaya.volume.dicom.HeaderDICOM.prototype.getOrientationCertainty=function(){var a=this.series.images[0].getOrientation();if(a===null){return papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN}else{if(this.series.isMosaic||this.series.isMultiFrameVolume){return papaya.volume.Header.ORIENTATION_CERTAINTY_LOW}else{return papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH}}};papaya.volume.dicom.HeaderDICOM.prototype.getOrigin=function(){return new papaya.core.Coordinate(0,0,0)};papaya.volume.dicom.HeaderDICOM.prototype.hasError=function(){return(this.error!==null)};papaya.volume.dicom.HeaderDICOM.prototype.getImageDescription=function(){var f,a,e,b,d,c="";f=this.series.images[0].getPatientName();a=this.series.images[0].getPatientID();e=this.series.images[0].getStudyTime();b=this.series.images[0].getStudyDate();d=this.series.images[0].getImageDescription();if(f){c+=(" "+f)}if(a){c+=(" "+a)}if(e){c+=(" "+e)}if(b){c+=(" "+b)}if(d){c+=(" "+d)}return new papaya.volume.ImageDescription(c.trim())};papaya.volume.dicom.HeaderDICOM.prototype.getBestTransform=function(){return null};papaya.volume.dicom.HeaderDICOM.prototype.getBestTransformOrigin=function(){return null};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Orientation=papaya.volume.Orientation||function(a){this.orientation=a;this.orientMat=null;this.xIncrement=-1;this.yIncrement=-1;this.zIncrement=-1};papaya.volume.Orientation.DEFAULT="XYZ+--";papaya.volume.Orientation.isValidOrientationString=function(c){var a,b=true;if(c===null||(c.length!==6)){b=false}a=c.toUpperCase().indexOf("X");if(a===-1||a>2||(c.toUpperCase().lastIndexOf("X")!==a)){b=false}a=c.toUpperCase().indexOf("Y");if(a===-1||a>2||(c.toUpperCase().lastIndexOf("Y")!==a)){b=false}a=c.toUpperCase().indexOf("Z");if(a===-1||a>2||(c.toUpperCase().lastIndexOf("Z")!==a)){b=false}if((c.charAt(3)!=="+")&&(c.charAt(3)!=="-")){b=false}if((c.charAt(4)!=="+")&&(c.charAt(4)!=="-")){b=false}if((c.charAt(5)!=="+")&&(c.charAt(5)!=="-")){b=false}return b};papaya.volume.Orientation.prototype.convertIndexToOffset2=function(c,b,a){return(c*this.xIncrement)+(b*this.yIncrement)+(a*this.zIncrement)};papaya.volume.Orientation.prototype.convertCoordinate=function(b,a){a.x=papayaRoundFast((b.x*this.orientMat[0][0])+(b.y*this.orientMat[0][1])+(b.z*this.orientMat[0][2])+(this.orientMat[0][3]));a.y=papayaRoundFast((b.x*this.orientMat[1][0])+(b.y*this.orientMat[1][1])+(b.z*this.orientMat[1][2])+(this.orientMat[1][3]));a.z=papayaRoundFast((b.x*this.orientMat[2][0])+(b.y*this.orientMat[2][1])+(b.z*this.orientMat[2][2])+(this.orientMat[2][3]));return a};papaya.volume.Orientation.prototype.createInfo=function(k,g){var n,e,m,r,l,q,i,b,p,h,d,j,o,c,a,f;h=k.cols;d=k.rows;j=k.slices;o=k.getNumVoxelsSlice();c=g.colSize;a=g.rowSize;f=g.sliceSize;i=(this.orientation.charAt(3)==="+");b=(this.orientation.charAt(4)==="+");p=(this.orientation.charAt(5)==="+");if(this.orientation.toUpperCase().indexOf("XYZ")!==-1){k.xDim=h;k.yDim=d;k.zDim=j;g.xSize=c;g.ySize=a;g.zSize=f;this.xIncrement=1;this.yIncrement=h;this.zIncrement=o;if(i){n=1;r=0}else{n=-1;r=h-1}if(b){e=-1;l=d-1}else{e=1;l=0}if(p){m=-1;q=j-1}else{m=1;q=0}}else{if(this.orientation.toUpperCase().indexOf("XZY")!==-1){k.xDim=h;k.yDim=j;k.zDim=d;g.xSize=c;g.ySize=f;g.zSize=a;this.xIncrement=1;this.yIncrement=o;this.zIncrement=h;if(i){n=1;r=0}else{n=-1;r=h-1}if(b){m=-1;q=d-1}else{m=1;q=0}if(p){e=-1;l=j-1}else{e=1;l=0}}else{if(this.orientation.toUpperCase().indexOf("YXZ")!==-1){k.xDim=d;k.yDim=h;k.zDim=j;g.xSize=a;g.ySize=c;g.zSize=f;this.xIncrement=h;this.yIncrement=1;this.zIncrement=o;if(i){e=-1;l=h-1}else{e=1;l=0}if(b){n=1;r=0}else{n=-1;r=d-1}if(p){m=-1;q=j-1}else{m=1;q=0}}else{if(this.orientation.toUpperCase().indexOf("YZX")!==-1){k.xDim=j;k.yDim=h;k.zDim=d;g.xSize=f;g.ySize=c;g.zSize=a;this.xIncrement=o;this.yIncrement=1;this.zIncrement=h;if(i){e=-1;l=h-1}else{e=1;l=0}if(b){m=-1;q=d-1}else{m=1;q=0}if(p){n=1;r=0}else{n=-1;r=j-1}}else{if(this.orientation.toUpperCase().indexOf("ZXY")!==-1){k.xDim=d;k.yDim=j;k.zDim=h;g.xSize=a;g.ySize=f;g.zSize=c;this.xIncrement=h;this.yIncrement=o;this.zIncrement=1;if(i){m=-1;q=h-1}else{m=1;q=0}if(b){n=1;r=0}else{n=-1;r=d-1}if(p){e=-1;l=j-1}else{e=1;l=0}}else{if(this.orientation.toUpperCase().indexOf("ZYX")!==-1){k.xDim=j;k.yDim=d;k.zDim=h;g.xSize=f;g.ySize=a;g.zSize=c;this.xIncrement=o;this.yIncrement=h;this.zIncrement=1;if(i){m=-1;q=h-1}else{m=1;q=0}if(b){e=-1;l=d-1}else{e=1;l=0}if(p){n=1;r=0}else{n=-1;r=j-1}}}}}}}this.orientMat=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];this.orientMat[0][0]=n;this.orientMat[0][1]=0;this.orientMat[0][2]=0;this.orientMat[0][3]=r;this.orientMat[1][0]=0;this.orientMat[1][1]=e;this.orientMat[1][2]=0;this.orientMat[1][3]=l;this.orientMat[2][0]=0;this.orientMat[2][1]=0;this.orientMat[2][2]=m;this.orientMat[2][3]=q;this.orientMat[3][0]=0;this.orientMat[3][1]=0;this.orientMat[3][2]=0;this.orientMat[3][3]=1};papaya.volume.Orientation.prototype.isValid=function(){return papaya.volume.Orientation.isValidOrientationString(this.orientation)};papaya.volume.Orientation.prototype.getOrientationDescription=function(){var a=this.orientation;return("Cols ("+a.charAt(0)+a.charAt(3)+"), Rows ("+a.charAt(1)+a.charAt(4)+"), Slices ("+a.charAt(2)+a.charAt(5)+")")};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Transform=papaya.volume.Transform||function(a,b){this.voxelValue=new papaya.volume.VoxelValue(b.imageData,b.header.imageType,b.header.imageDimensions,b.header.imageRange,b.header.orientation);this.voxelDimensions=b.header.voxelDimensions;this.imageDimensions=b.header.imageDimensions;this.volume=b;this.mat=papaya.volume.Transform.IDENTITY.clone();this.indexMat=papaya.volume.Transform.IDENTITY.clone();this.sizeMat=papaya.volume.Transform.IDENTITY.clone();this.sizeMatInverse=papaya.volume.Transform.IDENTITY.clone();this.mmMat=papaya.volume.Transform.IDENTITY.clone();this.worldMat=papaya.volume.Transform.IDENTITY.clone();this.worldMatNifti=null;this.originMat=papaya.volume.Transform.IDENTITY.clone();this.tempMat=papaya.volume.Transform.IDENTITY.clone();this.tempMat2=papaya.volume.Transform.IDENTITY.clone();this.orientMat=papaya.volume.Transform.IDENTITY.clone();this.updateTransforms(a)};papaya.volume.Transform.IDENTITY=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];papaya.volume.Transform.EPSILON=0.00001;papaya.volume.Transform.printTransform=function(a){console.log(a[0][0]+" "+a[0][1]+" "+a[0][2]+" "+a[0][3]);console.log(a[1][0]+" "+a[1][1]+" "+a[1][2]+" "+a[1][3]);console.log(a[2][0]+" "+a[2][1]+" "+a[2][2]+" "+a[2][3]);console.log(a[3][0]+" "+a[3][1]+" "+a[3][2]+" "+a[3][3])};papaya.volume.Transform.decompose=function(D){var k,q,s,u,x,E,J,b,n,o,l,i,g,e,c,I,H,G,F,C,B,A,z,y,p,m,j,h,f,d,r,a,w,v;v=[];k=papaya.volume.Transform.validateNum(D[0][3]);q=papaya.volume.Transform.validateNum(D[1][3]);s=papaya.volume.Transform.validateNum(D[2][3]);u=papaya.volume.Transform.validateNum(Math.atan(D[2][1]/D[2][2]));x=0;if(u===0){x=papaya.volume.Transform.validateNum(Math.atan(-1*Math.cos(u)*(D[2][0]/D[2][2])))}else{x=papaya.volume.Transform.validateNum(Math.atan(-1*Math.sin(u)*(D[2][0]/D[2][1])))}if(x===0){x=papaya.volume.Transform.EPSILON}n=papaya.volume.Transform.validateScale(D[2][2]/(Math.cos(x)*Math.cos(u)));o=Math.cos(u);l=(Math.sin(u)*Math.sin(x))+(Math.sin(u)*(Math.cos(x)/Math.tan(x)));i=(D[1][0]*(Math.sin(u)/Math.tan(x)))+D[1][1];g=-1*Math.sin(u);e=(Math.cos(u)*Math.sin(x))+(Math.cos(u)*(Math.cos(x)/Math.tan(x)));c=(D[1][0]*(Math.cos(u)/Math.tan(x)))+D[1][2];E=papaya.volume.Transform.validateNum(Math.atan((((o*c)-(i*g))/((i*e)-(l*c)))));b=papaya.volume.Transform.validateScale((i/((Math.cos(E)*o)+(Math.sin(E)*l))));r=papaya.volume.Transform.validateNum((((b*Math.sin(E)*Math.cos(x))-D[1][0])/(n*Math.sin(x))));I=Math.cos(x)*Math.cos(E);H=b*Math.cos(x)*Math.sin(E);G=-1*n*Math.sin(x);F=(Math.sin(u)*Math.sin(x)*Math.cos(E))-(Math.cos(u)*Math.sin(E));C=(Math.sin(u)*Math.sin(x)*Math.sin(E))+(Math.cos(u)*Math.cos(E));B=n*Math.sin(u)*Math.cos(x);A=(Math.cos(u)*Math.sin(x)*Math.cos(E))+(Math.sin(u)*Math.sin(E));z=(Math.cos(u)*Math.sin(x)*Math.sin(E))-(Math.sin(u)*Math.cos(E));y=n*Math.cos(u)*Math.cos(x);p=(H*F)-(I*C);m=(G*F)-(I*B);j=(F*D[0][0])-(I*D[0][1]);h=(H*A)-(I*z);f=(G*A)-(I*y);d=(A*D[0][0])-(I*D[0][2]);a=papaya.volume.Transform.validateNum((((h*j)-(d*p))/((m*h)-(p*f))));w=papaya.volume.Transform.validateNum((((j*f)-(m*d))/((p*f)-(m*h))));J=papaya.volume.Transform.validateScale(((D[0][0]-(w*H)-(a*G))/I));if(x===papaya.volume.Transform.EPSILON){x=0}u*=(180/Math.PI);x*=(180/Math.PI);E*=(180/Math.PI);v[0]=papaya.volume.Transform.validateZero(k);v[1]=papaya.volume.Transform.validateZero(q);v[2]=papaya.volume.Transform.validateZero(s);v[3]=papaya.volume.Transform.validateZero(u);v[4]=papaya.volume.Transform.validateZero(x);v[5]=papaya.volume.Transform.validateZero(E);v[6]=J;v[7]=b;v[8]=n;v[9]=papaya.volume.Transform.validateZero(r);v[10]=papaya.volume.Transform.validateZero(a);v[11]=papaya.volume.Transform.validateZero(w);return v};papaya.volume.Transform.hasRotations=function(c){var b,f,e,d,a;if(c!==null){b=papaya.volume.Transform.decompose(c);f=0.01;e=(Math.abs(1-(Math.abs(b[3])/90))%1);d=(Math.abs(1-(Math.abs(b[4])/90))%1);a=(Math.abs(1-(Math.abs(b[5])/90))%1);return((e>f)||(d>f)||(a>f))}return false};papaya.volume.Transform.validateNum=function(a){if((a===Number.POSITIVE_INFINITY)||(a===Number.NEGATIVE_INFINITY)){return 0}if(isNaN(a)){return 0}if(a===0){return 0}return a};papaya.volume.Transform.validateScale=function(a){if((a===Number.POSITIVE_INFINITY)||(a===Number.NEGATIVE_INFINITY)){return 1}if(isNaN(a)){return 1}return a};papaya.volume.Transform.validateZero=function(a){if(Math.abs(a)<papaya.volume.Transform.EPSILON){return 0}return a};papaya.volume.Transform.prototype.updateSizeMat=function(){this.sizeMat[0][0]=this.voxelDimensions.xSize;this.sizeMat[1][1]=this.voxelDimensions.ySize;this.sizeMat[2][2]=this.voxelDimensions.zSize;this.sizeMat[3][3]=1;this.sizeMatInverse[0][0]=1/this.voxelDimensions.xSize;this.sizeMatInverse[1][1]=1/this.voxelDimensions.ySize;this.sizeMatInverse[2][2]=1/this.voxelDimensions.zSize;this.sizeMatInverse[3][3]=1};papaya.volume.Transform.prototype.updateOrientMat=function(){this.orientMat=this.volume.header.orientation.orientMat};papaya.volume.Transform.prototype.updateIndexTransform=function(){var b,a;for(b=0;b<4;b+=1){for(a=0;a<4;a+=1){this.indexMat[b][a]=(this.orientMat[b][0]*this.mat[0][a])+(this.orientMat[b][1]*this.mat[1][a])+(this.orientMat[b][2]*this.mat[2][a])+(this.orientMat[b][3]*this.mat[3][a])}}};papaya.volume.Transform.prototype.updateMmTransform=function(){var b,a;for(b=0;b<4;b+=1){for(a=0;a<4;a+=1){this.mmMat[b][a]=(this.indexMat[b][0]*this.sizeMatInverse[0][a])+(this.indexMat[b][1]*this.sizeMatInverse[1][a])+(this.indexMat[b][2]*this.sizeMatInverse[2][a])+(this.indexMat[b][3]*this.sizeMatInverse[3][a])}}};papaya.volume.Transform.prototype.updateOriginMat=function(){this.originMat[0][0]=1;this.originMat[1][1]=-1;this.originMat[2][2]=-1;this.originMat[3][3]=1;this.originMat[0][3]=this.volume.header.origin.x;this.originMat[1][3]=this.volume.header.origin.y;this.originMat[2][3]=this.volume.header.origin.z};papaya.volume.Transform.prototype.updateWorldMat=function(){var d,a,c,b;if(this.worldMatNifti){c=[[-1,0,0,this.imageDimensions.xDim-1],[0,1,0,0],[0,0,1,0],[0,0,0,1]];b=papaya.volume.Transform.IDENTITY.clone();b[0][0]=-1;b[1][1]=-1;b[2][2]=-1;b[3][3]=1;b[0][3]=this.volume.header.origin.x;b[1][3]=this.volume.header.origin.y;b[2][3]=this.volume.header.origin.z;for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat[d][a]=(this.sizeMat[d][0]*b[0][a])+(this.sizeMat[d][1]*b[1][a])+(this.sizeMat[d][2]*b[2][a])+(this.sizeMat[d][3]*b[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat2[d][a]=(this.tempMat[d][0]*c[0][a])+(this.tempMat[d][1]*c[1][a])+(this.tempMat[d][2]*c[2][a])+(this.tempMat[d][3]*c[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat[d][a]=(this.tempMat2[d][0]*this.mat[0][a])+(this.tempMat2[d][1]*this.mat[1][a])+(this.tempMat2[d][2]*this.mat[2][a])+(this.tempMat2[d][3]*this.mat[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat2[d][a]=(this.tempMat[d][0]*c[0][a])+(this.tempMat[d][1]*c[1][a])+(this.tempMat[d][2]*c[2][a])+(this.tempMat[d][3]*c[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat[d][a]=(this.tempMat2[d][0]*b[0][a])+(this.tempMat2[d][1]*b[1][a])+(this.tempMat2[d][2]*b[2][a])+(this.tempMat2[d][3]*b[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat2[d][a]=(this.tempMat[d][0]*this.sizeMatInverse[0][a])+(this.tempMat[d][1]*this.sizeMatInverse[1][a])+(this.tempMat[d][2]*this.sizeMatInverse[2][a])+(this.tempMat[d][3]*this.sizeMatInverse[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.worldMat[d][a]=(this.worldMatNifti[d][0]*this.tempMat2[0][a])+(this.worldMatNifti[d][1]*this.tempMat2[1][a])+(this.worldMatNifti[d][2]*this.tempMat2[2][a])+(this.worldMatNifti[d][3]*this.tempMat2[3][a])}}}else{for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.tempMat[d][a]=(this.indexMat[d][0]*this.originMat[0][a])+(this.indexMat[d][1]*this.originMat[1][a])+(this.indexMat[d][2]*this.originMat[2][a])+(this.indexMat[d][3]*this.originMat[3][a])}}for(d=0;d<4;d+=1){for(a=0;a<4;a+=1){this.worldMat[d][a]=(this.tempMat[d][0]*this.sizeMatInverse[0][a])+(this.tempMat[d][1]*this.sizeMatInverse[1][a])+(this.tempMat[d][2]*this.sizeMatInverse[2][a])+(this.tempMat[d][3]*this.sizeMatInverse[3][a])}}}};papaya.volume.Transform.prototype.updateTransforms=function(a){this.mat=a;this.updateSizeMat();this.updateOrientMat();this.updateOriginMat();this.updateIndexTransform();this.updateMmTransform();this.updateWorldMat()};papaya.volume.Transform.prototype.getVoxelAtIndex=function(d,c,b,a,e){return this.voxelValue.getVoxelAtIndex(d,c,b,a,e)};papaya.volume.Transform.prototype.getVoxelAtCoordinate=function(h,f,d,e,g){var c,b,a;c=((h*this.worldMat[0][0])+(f*this.worldMat[0][1])+(d*this.worldMat[0][2])+(this.worldMat[0][3]));b=((h*this.worldMat[1][0])+(f*this.worldMat[1][1])+(d*this.worldMat[1][2])+(this.worldMat[1][3]));a=((h*this.worldMat[2][0])+(f*this.worldMat[2][1])+(d*this.worldMat[2][2])+(this.worldMat[2][3]));if((c<0)||(c>=this.imageDimensions.xDim)||(b<0)||(b>=this.imageDimensions.yDim)||(a<0)||(a>=this.imageDimensions.zDim)){return 0}return this.voxelValue.getVoxelAtIndex(c,b,a,e,g)};papaya.volume.Transform.prototype.getVoxelAtMM=function(h,f,d,e,g){var c,b,a;c=((h*this.mmMat[0][0])+(f*this.mmMat[0][1])+(d*this.mmMat[0][2])+(this.mmMat[0][3]));b=((h*this.mmMat[1][0])+(f*this.mmMat[1][1])+(d*this.mmMat[1][2])+(this.mmMat[1][3]));a=((h*this.mmMat[2][0])+(f*this.mmMat[2][1])+(d*this.mmMat[2][2])+(this.mmMat[2][3]));if((c<0)||(c>=this.imageDimensions.xDim)||(b<0)||(b>=this.imageDimensions.yDim)||(a<0)||(a>=this.imageDimensions.zDim)){return 0}return this.voxelValue.getVoxelAtIndex(c,b,a,e,g)};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Volume=papaya.volume.Volume||function(a,b){this.progressMeter=a;this.dialogHandler=b;this.files=[];this.rawData=[];this.fileLength=0;this.urls=null;this.fileName=null;this.compressed=false;this.header=new papaya.volume.Header();this.imageData=new papaya.volume.ImageData();this.transform=null;this.numTimepoints=0;this.onFinishedRead=null;this.error=null;this.transform=null;this.isLoaded=false;this.numTimepoints=1;this.loaded=false};papaya.volume.Volume.PROGRESS_LABEL_LOADING="Loading";papaya.volume.Volume.prototype.fileIsCompressed=function(b,e){var d,c,a;if(b.indexOf(".gz")!==-1){return true}if(e){d=new DataView(e);c=d.getUint8(0);a=d.getUint8(1);if(c===GUNZIP_MAGIC_COOKIE1){return true}if(a===GUNZIP_MAGIC_COOKIE2){return true}}return false};papaya.volume.Volume.prototype.readFiles=function(a,b){this.files=a;this.fileName=a[0].name;this.onFinishedRead=b;this.compressed=this.fileIsCompressed(this.fileName);this.fileLength=this.files[0].size;this.readNextFile(this,0)};papaya.volume.Volume.prototype.readNextFile=function(d,c){var b;if(c<this.files.length){b=papaya.utilities.PlatformUtils.makeSlice(this.files[c],0,this.files[c].size);try{var a=new FileReader();a.onloadend=papaya.utilities.ObjectUtils.bind(d,function(f){if(f.target.readyState===FileReader.DONE){d.rawData[c]=f.target.result;setTimeout(function(){d.readNextFile(d,c+1)},0)}});a.onerror=papaya.utilities.ObjectUtils.bind(d,function(f){d.error=new Error("There was a problem reading that file:\n\n"+f.getMessage());d.finishedLoad()});a.readAsArrayBuffer(b)}catch(e){d.error=new Error("There was a problem reading that file:\n\n"+e.message);d.finishedLoad()}}else{setTimeout(function(){d.decompress(d)},0)}};papaya.volume.Volume.prototype.readURLs=function(a,b){this.urls=a;this.fileName=a[0].substr(a[0].lastIndexOf("/")+1,a[0].length);this.onFinishedRead=b;this.compressed=this.fileIsCompressed(this.fileName);this.readNextURL(this,0)};papaya.volume.Volume.prototype.readNextURL=function(c,b){var a,e;if(b<c.urls.length){try{a=typeof new XMLHttpRequest().responseType==="string";if(a){e=new XMLHttpRequest();e.open("GET",c.urls[b],true);e.responseType="arraybuffer";e.onreadystatechange=function(){if(e.readyState===4){if(e.status===200){c.rawData[b]=e.response;c.fileLength=c.rawData.byteLength;c.readNextURL(c,b+1)}else{c.error=new Error("There was a problem reading that file ("+c.fileName+"):\n\nResponse status = "+e.status);c.finishedLoad()}}};e.onprogress=function(f){c.progressMeter.drawProgress(f.loaded/f.total,papaya.volume.Volume.PROGRESS_LABEL_LOADING)};e.send(null)}else{c.error=new Error("There was a problem reading that file ("+c.fileName+"):\n\nResponse type is not supported.");c.finishedLoad()}}catch(d){if(c!==null){c.error=new Error("There was a problem reading that file ("+c.fileName+"):\n\n"+d.message);c.finishedLoad()}}}else{setTimeout(function(){c.decompress(c)},0)}};papaya.volume.Volume.prototype.readEncodedData=function(c,d){var a=null;try{this.fileName=c[0];this.onFinishedRead=d;a=this;this.fileLength=0;a.readNextEncodedData(a,0,c)}catch(b){if(a){a.error=new Error("There was a problem reading that file:\n\n"+b.message);a.finishedLoad()}}};papaya.volume.Volume.prototype.readNextEncodedData=function(b,a,d){if(a<d.length){try{b.rawData[a]=Base64Binary.decodeArrayBuffer(papaya.utilities.ObjectUtils.dereference(d[a]));b.compressed=this.fileIsCompressed(this.fileName,b.rawData[a]);setTimeout(function(){b.readNextEncodedData(b,a+1,d)},0)}catch(c){if(b){b.error=new Error("There was a problem reading that file:\n\n"+c.message);b.finishedLoad()}}}else{b.decompress(b)}};papaya.volume.Volume.prototype.getVoxelAtIndex=function(d,c,b,a,e){return this.transform.getVoxelAtIndex(d,c,b,a,e)};papaya.volume.Volume.prototype.getVoxelAtCoordinate=function(e,c,a,b,d){return this.transform.getVoxelAtCoordinate(e,c,a,b,d)};papaya.volume.Volume.prototype.getVoxelAtMM=function(e,c,a,b,d){return this.transform.getVoxelAtMM(e,c,a,b,d)};papaya.volume.Volume.prototype.hasError=function(){return(this.error!==null)};papaya.volume.Volume.prototype.getXDim=function(){return this.header.imageDimensions.xDim};papaya.volume.Volume.prototype.getYDim=function(){return this.header.imageDimensions.yDim};papaya.volume.Volume.prototype.getZDim=function(){return this.header.imageDimensions.zDim};papaya.volume.Volume.prototype.getXSize=function(){return this.header.voxelDimensions.xSize};papaya.volume.Volume.prototype.getYSize=function(){return this.header.voxelDimensions.ySize};papaya.volume.Volume.prototype.getZSize=function(){return this.header.voxelDimensions.zSize};papaya.volume.Volume.prototype.decompress=function(a){if(a.compressed){try{pako.inflate(new Uint8Array(a.rawData[0]),null,this.progressMeter,function(c){a.finishedDecompress(a,c.buffer)})}catch(b){console.log(b)}}else{setTimeout(function(){a.finishedReadData(a)},0)}};papaya.volume.Volume.prototype.finishedDecompress=function(a,b){a.rawData[0]=b;setTimeout(function(){a.finishedReadData(a)},0)};papaya.volume.Volume.prototype.finishedReadData=function(a){a.header.readHeaderData(a.fileName,a.rawData,this.progressMeter,this.dialogHandler,papaya.utilities.ObjectUtils.bind(this,this.finishedReadHeaderData))};papaya.volume.Volume.prototype.finishedReadHeaderData=function(){this.rawData=null;if(this.header.hasError()){this.error=this.header.error;console.error(this.error);this.onFinishedRead(this);return}this.header.imageType.swapped=(this.header.imageType.littleEndian!==papaya.utilities.PlatformUtils.isPlatformLittleEndian());var a=this.header.getName();if(a){this.fileName=this.header.getName()}this.header.readImageData(this.progressMeter,papaya.utilities.ObjectUtils.bind(this,this.finishedReadImageData))};papaya.volume.Volume.prototype.finishedReadImageData=function(a){this.imageData.readFileData(this.header,a,papaya.utilities.ObjectUtils.bind(this,this.finishedLoad))};papaya.volume.Volume.prototype.finishedLoad=function(){if(!this.loaded){this.loaded=true;if(this.onFinishedRead){if(!this.hasError()){this.transform=new papaya.volume.Transform(papaya.volume.Transform.IDENTITY.clone(),this);this.numTimepoints=this.header.imageDimensions.timepoints||1;this.applyBestTransform()}else{console.log(this.error)}this.isLoaded=true;this.rawData=null;this.onFinishedRead(this)}}};papaya.volume.Volume.prototype.setOrigin=function(b){var a=this.header.orientation.convertCoordinate(b,new papaya.core.Coordinate(0,0,0));this.header.origin.setCoordinate(a.x,a.y,a.z)};papaya.volume.Volume.prototype.getOrigin=function(){return this.header.orientation.convertCoordinate(this.header.origin,new papaya.core.Coordinate(0,0,0))};papaya.volume.Volume.prototype.applyBestTransform=function(){var a=this.header.getBestTransform();if(a!==null){this.transform.worldMatNifti=numeric.inv(a);this.setOrigin(this.header.getBestTransformOrigin());this.transform.updateWorldMat()}};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.VoxelDimensions=papaya.volume.VoxelDimensions||function(d,a,b,c){this.colSize=Math.abs(d);this.rowSize=Math.abs(a);this.sliceSize=Math.abs(b);this.xSize=0;this.ySize=0;this.zSize=0;this.timeSize=c;this.spatialUnit=papaya.volume.VoxelDimensions.UNITS_UNKNOWN;this.temporalUnit=papaya.volume.VoxelDimensions.UNITS_UNKNOWN};papaya.volume.VoxelDimensions.UNITS_UNKNOWN=0;papaya.volume.VoxelDimensions.UNITS_METER=1;papaya.volume.VoxelDimensions.UNITS_MM=2;papaya.volume.VoxelDimensions.UNITS_MICRON=3;papaya.volume.VoxelDimensions.UNITS_SEC=8;papaya.volume.VoxelDimensions.UNITS_MSEC=16;papaya.volume.VoxelDimensions.UNITS_USEC=24;papaya.volume.VoxelDimensions.UNITS_HZ=32;papaya.volume.VoxelDimensions.UNITS_PPM=40;papaya.volume.VoxelDimensions.UNITS_RADS=48;papaya.volume.VoxelDimensions.UNIT_STRINGS=[];papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_UNKNOWN]="Unknown Unit";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_METER]="Meters";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MM]="Millimeters";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MICRON]="Microns";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_SEC]="Seconds";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MSEC]="Milliseconds";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_USEC]="Microseconds";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_HZ]="Hertz";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_PPM]="Parts-per-million";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_RADS]="Radians-per-second";papaya.volume.VoxelDimensions.prototype.isValid=function(){return((this.colSize>0)&&(this.rowSize>0)&&(this.sliceSize>0)&&(this.timeSize>=0))};papaya.volume.VoxelDimensions.prototype.getSpatialUnitString=function(){return papaya.volume.VoxelDimensions.UNIT_STRINGS[this.spatialUnit]};papaya.volume.VoxelDimensions.prototype.getTemporalUnitString=function(){return papaya.volume.VoxelDimensions.UNIT_STRINGS[this.temporalUnit]};papaya.volume.VoxelDimensions.prototype.getTemporalUnitMultiplier=function(){if(this.temporalUnit===papaya.volume.VoxelDimensions.UNITS_MSEC){return 0.001}if(this.temporalUnit===papaya.volume.VoxelDimensions.UNITS_USEC){return 0.000001}return 1};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.VoxelValue=papaya.volume.VoxelValue||function(e,c,b,d,a){this.imageData=e;this.imageType=c;this.imageRange=d;this.orientation=a;this.swap16=((this.imageType.numBytes===2)&&this.imageType.swapped)&&(this.imageType.datatype!==papaya.volume.ImageType.DATATYPE_FLOAT);this.swap32=((this.imageType.numBytes===4)&&this.imageType.swapped)&&(this.imageType.datatype!==papaya.volume.ImageType.DATATYPE_FLOAT);this.xIncrement=a.xIncrement;this.yIncrement=a.yIncrement;this.zIncrement=a.zIncrement;this.xDim=b.xDim;this.yDim=b.yDim;this.zDim=b.zDim;this.sliceSize=b.getNumVoxelsSlice();this.volSize=b.getNumVoxelsVolume();this.dataScaleSlopes=d.dataScaleSlopes;this.dataScaleIntercepts=d.dataScaleIntercepts;this.globalDataScaleSlope=d.globalDataScaleSlope;this.globalDataScaleIntercept=d.globalDataScaleIntercept;this.usesGlobalDataScale=d.usesGlobalDataScale;this.interpFirstPass=[[0,0],[0,0]];this.interpSecondPass=[0,0]};papaya.volume.VoxelValue.prototype.getVoxelAtIndex=function(d,c,b,a,e){if(e){d=papayaRoundFast(d);c=papayaRoundFast(c);b=papayaRoundFast(b);return this.getVoxelAtOffset(this.orientation.convertIndexToOffset2(d,c,b),a)}return this.getVoxelAtIndexLinear(d,c,b,a)};papaya.volume.VoxelValue.prototype.getVoxelAtOffset=function(c,b){var a,d=c+(this.volSize*b);if(this.usesGlobalDataScale){return(this.checkSwap(this.imageData.data[d])*this.globalDataScaleSlope)+this.globalDataScaleIntercept}else{a=parseInt(d/this.sliceSize);return(this.checkSwap(this.imageData.data[d])*this.dataScaleSlopes[a])+this.dataScaleIntercepts[a]}};papaya.volume.VoxelValue.prototype.getVoxelAtIndexLinear=function(k,n,s,c){var l,i,h,f,b,a,e,d,g,j,p,o,m,r,q;l=b=a=0;d=Math.floor(k);g=Math.floor(n);j=Math.floor(s);i=k-d;h=n-g;f=s-j;p=(i!==0);o=(h!==0);m=(f!==0);if(p&&o&&m){for(r=0;r<2;r+=1){for(q=0;q<2;q+=1){if(((r===1)&&(d===(this.xDim-1)))||((q===1)&&(g===(this.yDim-1)))){e=-1}else{e=this.orientation.convertIndexToOffset2(d+r,g+q,j)}if(e!==-1){b=this.getVoxelAtOffset(e,c)*(1-f);if(j===(this.zDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d+r,g+q,j+1);a=this.getVoxelAtOffset(e,c)*f}this.interpFirstPass[r][q]=b+a}else{this.interpFirstPass[r][q]=0}}}this.interpSecondPass[0]=(this.interpFirstPass[0][0]*(1-h))+(this.interpFirstPass[0][1]*h);this.interpSecondPass[1]=(this.interpFirstPass[1][0]*(1-h))+(this.interpFirstPass[1][1]*h);l=(this.interpSecondPass[0]*(1-i))+(this.interpSecondPass[1]*i)}else{if(p&&o&&!m){for(r=0;r<2;r+=1){if((r===1)&&(d===(this.xDim-1))){e=-1}else{e=this.orientation.convertIndexToOffset2(d+r,g,j)}if(e!==-1){b=this.getVoxelAtOffset(e,c)*(1-h);if(g===(this.yDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d+r,g+1,j);a=this.getVoxelAtOffset(e,c)*h}this.interpSecondPass[r]=b+a}else{this.interpSecondPass[r]=0}}l=(this.interpSecondPass[0]*(1-i))+(this.interpSecondPass[1]*i)}else{if(p&&!o&&m){for(r=0;r<2;r+=1){if((r===1)&&(d===(this.xDim-1))){e=-1}else{e=this.orientation.convertIndexToOffset2(d+r,g,j)}if(e!==-1){b=this.getVoxelAtOffset(e,c)*(1-f);if(j===(this.zDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d+r,g,j+1);a=this.getVoxelAtOffset(e,c)*f}this.interpSecondPass[r]=b+a}else{this.interpSecondPass[r]=0}}l=(this.interpSecondPass[0]*(1-i))+(this.interpSecondPass[1]*i)}else{if(!p&&o&&m){for(q=0;q<2;q+=1){if((q===1)&&(g===(this.yDim-1))){e=-1}else{e=this.orientation.convertIndexToOffset2(d,g+q,j)}if(e!==-1){b=this.getVoxelAtOffset(e,c)*(1-f);if(j===(this.zDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d,g+q,j+1);a=this.getVoxelAtOffset(e,c)*f}this.interpSecondPass[q]=b+a}else{this.interpSecondPass[q]=0}}l=(this.interpSecondPass[0]*(1-h))+(this.interpSecondPass[1]*h)}else{if(!p&&!o&&m){e=this.orientation.convertIndexToOffset2(d,g,j);b=this.getVoxelAtOffset(e,c)*(1-f);if(j===(this.zDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d,g,j+1);a=this.getVoxelAtOffset(e,c)*f}l=b+a}else{if(!p&&o&&!m){e=this.orientation.convertIndexToOffset2(d,g,j);b=this.getVoxelAtOffset(e,c)*(1-h);if(g===(this.yDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d,g+1,j);a=this.getVoxelAtOffset(e,c)*h}l=b+a}else{if(p&&!o&&!m){e=this.orientation.convertIndexToOffset2(d,g,j);b=this.getVoxelAtOffset(e,c)*(1-i);if(d===(this.xDim-1)){a=0}else{e=this.orientation.convertIndexToOffset2(d+1,g,j);a=this.getVoxelAtOffset(e,c)*i}l=b+a}else{l=this.getVoxelAtOffset(this.orientation.convertIndexToOffset2(k,n,s),c)}}}}}}}return l};papaya.volume.VoxelValue.prototype.checkSwap=function(a){if(this.swap16){return((((a&255)<<8)|((a>>8)&255))<<16)>>16}if(this.swap32){return((a&255)<<24)|((a&65280)<<8)|((a>>8)&65280)|((a>>24)&255)}return a};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.Dialog=papaya.ui.Dialog||function(c,f,d,e,g,b,a){this.container=c;this.viewer=c.viewer;this.title=f;this.modifier="";if(!papaya.utilities.StringUtils.isStringBlank(a)){this.modifier=a}this.id=this.title.replace(/ /g,"_");this.content=d;this.dataSource=e;this.callback=g;this.callbackOk=b};papaya.ui.Dialog.showModalDialog=function(f,h){var c,g,e,j,d,i;var b=document.documentElement;var a=window.pageYOffset||b.scrollTop;c=$(window).outerWidth();g=$(window).outerHeight();e=$(h).outerWidth();j=$(h).outerHeight();d=(c/2)-(e/2)+"px";i=a+(g/2)-(j/2)+"px";$(h).css({position:"absolute",zIndex:100,left:d,top:i});$(h).hide().fadeIn(200)};papaya.ui.Dialog.prototype.showDialog=function(){var b,h,e,a,i,g,d,c,f;d="#"+this.id;g=$(d);g.remove();f=$("body");e="<div id='"+this.id+"' class='"+PAPAYA_DIALOG_CSS+"'><span class='"+PAPAYA_DIALOG_TITLE_CSS+"'>"+this.title+"</span>";if(this.content){e+="<div class='"+PAPAYA_DIALOG_CONTENT_CSS+"'><table>";for(b=0;b<this.content.items.length;b+=1){if(this.content.items[b].spacer){e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>&nbsp;</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"'>&nbsp;</td></tr>"}else{if(this.content.items[b].readonly){e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>"+this.content.items[b].label+"</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"' id='"+this.content.items[b].field+"'></td></tr>"}else{if(this.content.items[b].disabled&&(papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this,this.content.items[b].disabled)))()===true){c="disabled='disabled'"}else{c=""}e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>"+this.content.items[b].label+"</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"'><select "+c+" id='"+this.content.items[b].field+"'>";for(h=0;h<this.content.items[b].options.length;h+=1){e+="<option value='"+this.content.items[b].options[h]+"'>"+papaya.utilities.StringUtils.truncateMiddleString(this.content.items[b].options[h].toString(),40)+"</option>"}e+="</select></td></tr>"}}}e+="</table></div>"}e+="<div class='"+PAPAYA_DIALOG_BUTTON_CSS+"'><button type='button' id='"+this.id+"-Ok'>Ok</button></div></div>";f.append('<div class="'+PAPAYA_DIALOG_BACKGROUND+'"></div>');f.append(e);for(b=0;b<this.content.items.length;b+=1){if(this.content.items[b].readonly){a=this.dataSource[this.content.items[b].field](this.modifier);if(a!==null){$("#"+this.content.items[b].field).html(a)}else{$("#"+this.content.items[b].field).parent().remove()}}else{if(!this.content.items[b].spacer){i=$("#"+this.content.items[b].field);i.val(this.dataSource[this.content.items[b].field]);i.change(papaya.utilities.ObjectUtils.bind(this,this.doAction,[this.content.items[b].field]))}}}$("#"+this.id+"-Ok").click(papaya.utilities.ObjectUtils.bind(this,this.doOk));g=$(d);papaya.ui.Dialog.showModalDialog(this.viewer,g[0]);f.addClass(PAPAYA_DIALOG_STOPSCROLL)};papaya.ui.Dialog.prototype.doOk=function(){var a,b;a=$("."+PAPAYA_DIALOG_CSS);b=$("."+PAPAYA_DIALOG_BACKGROUND);a.hide(100);b.hide(100);a.remove();b.remove();if(this.callbackOk){this.callbackOk()}$("body").removeClass(PAPAYA_DIALOG_STOPSCROLL)};papaya.ui.Dialog.prototype.doAction=function(a){this.callback(a,$("#"+a).val())};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.Menu=papaya.ui.Menu||function(d,b,e,c,a){this.viewer=d;this.method=b.method;this.isTitleBar=b.titleBar;this.label=b.label;this.icons=b.icons;this.callback=e;this.dataSource=c;this.items=[];this.rangeItem=null;this.menuOnHover=b.menuOnHover;if((a===undefined)||(a===null)){this.imageIndex=-1;this.modifier=this.viewer.container.containerIndex}else{this.imageIndex=a;this.modifier=a+this.viewer.container.containerIndex}this.buttonId=this.label.replace(/ /g,"_").replace("...","_")+(this.modifier||"");this.menuId=(this.label+"Menu").replace(/ /g,"_").replace("...","_")+(this.modifier||"");this.isRight=(b.icons!==null);this.isImageButton=b.imageButton};papaya.ui.Menu.doShowMenu=function(f,b,a,i){var c,h,j,e,d,g;c=$(f.canvas).offset();h=$(b).offset();j=$(b).outerWidth();e=$(a).outerWidth();d=h.left+(i?((-1*e)+j):5)+"px";g=(c.top)+"px";$(a).css({position:"absolute",zIndex:100,left:d,top:g});$(a).hide().fadeIn(200)};papaya.ui.Menu.getColorComponents=function(a){if(a){return a.match(/\d+/g)}return[0,0,0,255]};papaya.ui.Menu.getNiceForegroundColor=function(c){var a=papaya.ui.Menu.getColorComponents(c);var b=(parseInt(a[0])+parseInt(a[1])+parseInt(a[2]))/3;if(b>127){a[0]=a[1]=a[2]=0}else{a[0]=a[1]=a[2]=255}return("rgb("+a[0]+", "+a[1]+", "+a[2]+")")};papaya.ui.Menu.prototype.buildMenuButton=function(){var d,f,b,g,a,c,e;g="#"+this.buttonId;b=$(g);b.remove();e=this.viewer.container.toolbarHtml;d=null;if(this.icons){d="<span id='"+this.buttonId+"' class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_ICON_CSS+" "+(this.isImageButton?PAPAYA_MENU_BUTTON_CSS:"")+"'"+(this.isRight?" style='float:right'":"")+"><img class='"+PAPAYA_MENU_UNSELECTABLE+"' style='width:"+papaya.viewer.ColorTable.ICON_SIZE+"px; height:"+papaya.viewer.ColorTable.ICON_SIZE+"px; vertical-align:bottom; ";if(this.dataSource.isSelected(parseInt(this.imageIndex,10))){d+="border:2px solid #FF5A3D;background-color:#eeeeee;padding:1px;"}else{d+="border:2px outset lightgray;background-color:#eeeeee;padding:1px;"}if(this.method){d+=("' src='"+this.icons[papaya.utilities.ObjectUtils.bind(this.viewer,papaya.utilities.ObjectUtils.dereferenceIn(this.viewer,this.method))()?1:0]+"' /></span>")}else{d+=("' src='"+this.icons[0]+"' /></span>")}}else{if(this.isTitleBar){d="<div class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_TITLEBAR_CSS+" "+PAPAYA_TITLEBAR_CSS+"' style='z-index:-1;position:absolute;top:"+(this.viewer.container.viewerHtml.position().top-1.25*papaya.ui.Toolbar.SIZE)+"px;width:"+e.width()+"px;text-align:center;color:"+papaya.ui.Menu.getNiceForegroundColor(this.viewer.bgColor)+"'>"+this.label+"</div>"}else{d="<span id='"+this.buttonId+"' class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_LABEL_CSS+"'>"+this.label+"</span>"}}e.append(d);if(!this.isTitleBar){b=$(g);c="#"+this.buttonId+" > img";a=$(c);f=this;if(this.menuOnHover){a.mouseenter(function(){f.showHoverMenuTimeout=setTimeout(papaya.utilities.ObjectUtils.bind(f,f.showMenu),500)});a.mouseleave(function(){clearTimeout(f.showHoverMenuTimeout);f.showHoverMenuTimeout=null})}b.click(papaya.utilities.ObjectUtils.bind(this,this.doClick));if(this.icons){a.hover(function(){if(f.icons.length>1){$(this).css({"border-color":"gray"})}else{$(this).css({"border-color":"#FF5A3D"})}},papaya.utilities.ObjectUtils.bind(f,function(){if(f.dataSource.isSelected(parseInt(f.imageIndex,10))&&f.dataSource.isSelectable()){$("#"+f.buttonId+" > img").css({border:"2px solid #FF5A3D"})}else{$("#"+f.buttonId+" > img").css({border:"2px outset lightgray"})}}));a.mousedown(function(){$(this).css({border:"2px inset lightgray"})});a.mouseup(function(){$(this).css({border:"2px outset lightgray"})})}else{if(!this.isTitleBar){b.hover(function(){$(this).toggleClass(PAPAYA_MENU_BUTTON_HOVERING_CSS)})}}}return this.buttonId};papaya.ui.Menu.prototype.setMenuButton=function(a){this.buttonId=a};papaya.ui.Menu.prototype.buildMenu=function(){var c,b,a;b="<ul id='"+this.menuId+"' class='"+PAPAYA_MENU_CSS+"'></ul>";this.viewer.container.toolbarHtml.append(b);for(c=0;c<this.items.length;c+=1){a=this.items[c].buildHTML(this.menuId)}};papaya.ui.Menu.prototype.addMenuItem=function(a){if(a instanceof papaya.ui.MenuItemRange){this.rangeItem=a}this.items.push(a)};papaya.ui.Menu.prototype.showMenu=function(){var b,d,c,a;if(this.items.length>0){a="#"+this.menuId;c=$(a);b=c.is(":visible");c.remove();if(!b){d=$("#"+this.buttonId);this.buildMenu();c=$(a);c.hide();papaya.ui.Menu.doShowMenu(this.viewer,d[0],c[0],this.isRight)}}};papaya.ui.Menu.prototype.doClick=function(){var b,c,a;a="#"+this.menuId;c=$(a);b=c.is(":visible");this.callback(this.buttonId);if(this.icons){if(this.method){$("#"+this.buttonId+" > img").attr("src",this.icons[papaya.utilities.ObjectUtils.bind(this.viewer,papaya.utilities.ObjectUtils.dereferenceIn(this.viewer,this.method))()?1:0])}else{$("#"+this.buttonId+" > img").attr("src",this.icons[0])}}if(!this.menuOnHover&&!b){this.showMenu()}};papaya.ui.Menu.prototype.updateRangeItem=function(b,a){if(this.rangeItem){$("#"+this.rangeItem.minId).val(b);$("#"+this.rangeItem.maxId).val(a)}};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItem=papaya.ui.MenuItem||function(d,b,c,e,a){this.viewer=d;this.label=b;this.modifier="";if(!papaya.utilities.StringUtils.isStringBlank(a)){this.modifier="-"+a}this.action=c+this.modifier;this.id=this.action.replace(/ /g,"_")+this.viewer.container.containerIndex;this.callback=e};papaya.ui.MenuItem.prototype.buildHTML=function(c){var b,a;b="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"'>"+this.label+"</span></li>";$("#"+c).append(b);a=$("#"+this.id);a.click(papaya.utilities.ObjectUtils.bind(this,function(){this.doAction()}));a.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};papaya.ui.MenuItem.prototype.doAction=function(){this.callback(this.action)};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemCheckBox=papaya.ui.MenuItemCheckBox||function(e,b,c,g,d,f,a){this.viewer=e;this.label=b;this.modifier="";if((a!==undefined)&&(a!==null)){this.modifier="-"+a}this.action=c+this.modifier;this.method=f;this.id=this.action.replace(/ /g,"_").replace(/\(/g,"").replace(/\)/g,"")+this.viewer.container.containerIndex;this.callback=g;this.dataSource=d};papaya.ui.MenuItemCheckBox.CHECKBOX_UNSELECTED_CODE="&#9744;";papaya.ui.MenuItemCheckBox.CHECKBOX_SELECTED_CODE="&#9745;";papaya.ui.MenuItemCheckBox.prototype.buildHTML=function(e){var c,d,b,a;c=this.dataSource[this.method](this.label);d="";if(c){d="checked='checked'"}b="<li id='"+this.id+"'><input type='radio' class='"+PAPAYA_MENU_COLORTABLE_CSS+"' name='"+PAPAYA_MENU_COLORTABLE_CSS+"' id='"+this.id+"' value='"+this.id+"' "+d+"><span class='"+PAPAYA_MENU_UNSELECTABLE+"'>&nbsp;"+this.label+"</span></li>";$("#"+e).append(b);a=$("#"+this.id);a.click(papaya.utilities.ObjectUtils.bind(this,this.doAction));a.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};papaya.ui.MenuItemCheckBox.prototype.doAction=function(){$("."+PAPAYA_MENU_COLORTABLE_CSS).removeAttr("checked");$("#"+this.id+" > input")[0].checked=true;this.callback(this.action,null,true)};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemFileChooser=papaya.ui.MenuItemFileChooser||function(d,a,c,e,b){this.viewer=d;this.label=a;this.action=c;this.id=this.action.replace(/ /g,"_")+this.viewer.container.containerIndex;this.fileChooserId="fileChooser"+this.viewer.container.containerIndex+(b?"folder":"");this.callback=e;this.folder=b};papaya.ui.MenuItemFileChooser.prototype.buildHTML=function(c){var a,b;a=this;b="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"'><label class='"+PAPAYA_MENU_FILECHOOSER+"' for='"+this.fileChooserId+"'>"+this.label;if(this.folder){b+="</label><input type='file' id='"+this.fileChooserId+"' multiple='multiple' webkitdirectory directory name='files' /></span></li>"}else{b+="</label><input type='file' id='"+this.fileChooserId+"' multiple='multiple' name='files' /></span></li>"}$("#"+c).append(b);$("#"+this.fileChooserId)[0].onchange=papaya.utilities.ObjectUtils.bind(a,function(){a.callback(a.action,document.getElementById(a.fileChooserId).files)});$("#"+this.id).hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemRange=papaya.ui.MenuItemRange||function(e,b,c,g,d,f,a){this.viewer=e;this.label=b;this.index=a;this.modifier="";if(a!==undefined){this.modifier="-"+a}this.action=c+this.modifier;this.minId=this.action.replace(/ /g,"_")+"Min"+this.viewer.container.containerIndex;this.maxId=this.action.replace(/ /g,"_")+"Max"+this.viewer.container.containerIndex;this.callback=g;this.dataSource=d;this.method=f;this.id=b+this.modifier+this.viewer.container.containerIndex;this.grabOffset=0;this.screenVol=this.viewer.screenVolumes[this.index]};papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX=function(c,b){var a=c.parent().offset();return papaya.utilities.PlatformUtils.getMousePositionX(b)-a.left};papaya.ui.MenuItemRange.getRelativeMousePositionX=function(c,b){var a=c.offset();return papaya.utilities.PlatformUtils.getMousePositionX(b)-a.left};papaya.ui.MenuItemRange.prototype.buildHTML=function(h){var j,i,c,k,f,d,g,b,l,a,e;d=this.id+"SliderMin";b=this.id+"SliderMax";a=this.id+"Slider";j=this.dataSource[this.method]();c=this;i="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"' style=''><input class='"+PAPAYA_MENU_INPUT_FIELD+"' type='text' size='4' id='"+this.minId+"' value='"+j[0]+"' /><div style='display:inline-block;position:relative;width:"+(papaya.viewer.ColorTable.COLOR_BAR_WIDTH+papaya.viewer.ColorTable.ARROW_ICON_WIDTH)+"px;top:-12px;'><img id='"+d+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:5px;left:"+(c.screenVol.colorTable.minLUT/papaya.viewer.ColorTable.LUT_MAX)*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)+"px;z-index:99' src='"+papaya.viewer.ColorTable.ARROW_ICON+"' /><img id='"+b+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:5px;left:"+(c.screenVol.colorTable.maxLUT/papaya.viewer.ColorTable.LUT_MAX)*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)+"px;z-index:99' src='"+papaya.viewer.ColorTable.ARROW_ICON+"' /><img id='"+a+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:0;left:"+(parseInt(papaya.viewer.ColorTable.ARROW_ICON_WIDTH/2,10))+"px;' src='"+this.viewer.screenVolumes[parseInt(this.index,10)].colorTable.colorBar+"' /></div><input class='"+PAPAYA_MENU_INPUT_FIELD+"' type='text' size='4' id='"+this.maxId+"' value='"+j[1]+"' /></span></li>";$("#"+h).append(i);k=$("#"+this.minId);f=$("#"+this.maxId);g=$("#"+d);l=$("#"+b);e=$("#"+a);g.bind(papaya.utilities.PlatformUtils.ios?"touchstart":"mousedown",function(m){c.grabOffset=papaya.ui.MenuItemRange.getRelativeMousePositionX(g,m);$(window).bind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove",function(n){var o,p;p=(c.screenVol.colorTable.maxLUT/papaya.viewer.ColorTable.LUT_MAX)*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1);o=(papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX(g,n)-c.grabOffset);if(o<0){o=0}else{if(o>=papaya.viewer.ColorTable.COLOR_BAR_WIDTH){o=(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)}else{if(o>p){o=p}}}c.screenVol.updateMinLUT(Math.round((o/(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1))*papaya.viewer.ColorTable.LUT_MAX));g.css({left:o+"px"});c.viewer.drawViewer(false,true);k.val(c.dataSource[c.method]()[0]);c.screenVol.colorTable.updateColorBar();e.attr("src",c.screenVol.colorTable.colorBar)});return false});l.bind(papaya.utilities.PlatformUtils.ios?"touchstart":"mousedown",function(m){c.grabOffset=papaya.ui.MenuItemRange.getRelativeMousePositionX(l,m);$(window).bind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove",function(o){var p,n;n=(c.screenVol.colorTable.minLUT/papaya.viewer.ColorTable.LUT_MAX)*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1);p=(papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX(l,o)-c.grabOffset);if(p<0){p=0}else{if(p>=papaya.viewer.ColorTable.COLOR_BAR_WIDTH){p=(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)}else{if(p<n){p=n}}}c.screenVol.updateMaxLUT(Math.round((p/(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1))*papaya.viewer.ColorTable.LUT_MAX));l.css({left:p+"px"});c.viewer.drawViewer(false,true);f.val(c.dataSource[c.method]()[1]);c.screenVol.colorTable.updateColorBar();e.attr("src",c.screenVol.colorTable.colorBar)});return false});$(window).bind(papaya.utilities.PlatformUtils.ios?"touchend":"mouseup",function(){$(window).unbind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove")});$("#"+this.id).hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)});k.change(papaya.utilities.ObjectUtils.bind(this,function(){c.rangeChanged(true)}));f.change(papaya.utilities.ObjectUtils.bind(this,function(){c.rangeChanged(false)}));k.keyup(papaya.utilities.ObjectUtils.bind(this,function(m){if(m.keyCode===13){c.rangeChanged(false);c.viewer.container.toolbar.closeAllMenus()}}));f.keyup(papaya.utilities.ObjectUtils.bind(this,function(m){if(m.keyCode===13){c.rangeChanged(false);c.viewer.container.toolbar.closeAllMenus()}}));if(!papaya.utilities.PlatformUtils.ios){setTimeout(function(){k.focus();k.select()},10)}};papaya.ui.MenuItemRange.prototype.rangeChanged=function(a){this.updateDataSource(a);this.viewer.drawViewer(true);this.resetSlider()};papaya.ui.MenuItemRange.prototype.updateDataSource=function(c){var a,b,e,d;d=$("#"+this.minId);e=$("#"+this.maxId);b=parseFloat(d.val());if(isNaN(b)){b=this.dataSource.screenMin}a=parseFloat(e.val());if(isNaN(a)){a=this.dataSource.screenMax}d.val(b);e.val(a);this.dataSource.setScreenRange(b,a);if(c){e.focus();e.select()}};papaya.ui.MenuItemRange.prototype.resetSlider=function(){var e,b,f,a,c,d;e=this.id+"SliderMin";f=this.id+"SliderMax";c=this.id+"Slider";b=$("#"+e);a=$("#"+f);d=$("#"+c);b.css({left:0});a.css({left:(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)+"px"});this.screenVol.resetDynamicRange();d.attr("src",this.screenVol.colorTable.colorBar)};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemSlider=papaya.ui.MenuItemSlider||function(e,b,c,g,d,f,a){this.viewer=e;this.label=b;this.index=a;this.modifier="";if(!papaya.utilities.StringUtils.isStringBlank(a)){this.modifier="-"+a}this.dataSource=d;this.method=f;this.action=c+this.modifier;this.id=this.action.replace(/ /g,"_")+this.viewer.container.containerIndex;this.callback=g;this.screenVol=this.viewer.screenVolumes[this.index]};papaya.ui.MenuItemSlider.prototype.buildHTML=function(f){var d,c,a,b,e;a=this.id+"Slider";d="<li id='"+this.id+"'><span style='padding-right:5px;' class='"+PAPAYA_MENU_UNSELECTABLE+"'>"+this.label+":</span><input min='0' max='100' value='"+parseInt((1-this.screenVol.alpha)*100,10)+"' id='"+a+"' class='"+PAPAYA_MENU_SLIDER+"' type='range' /></li>";$("#"+f).append(d);c=$("#"+this.id);c.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)});b=$("#"+a);e=this;$("#"+this.id+"Slider").change(function(){e.screenVol.alpha=1-(b.val()/100);e.viewer.drawViewer(false,true)})};papaya.ui.MenuItemSlider.prototype.doAction=function(){this.callback(this.action)};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemSpacer=papaya.ui.MenuItemSpacer||function(){};papaya.ui.MenuItemSpacer.prototype.buildHTML=function(b){var a;a="<div class='"+PAPAYA_MENU_SPACER_CSS+" "+PAPAYA_MENU_UNSELECTABLE+"'></div>";$("#"+b).append(a)};"use strict";var papaya=papaya||{};papaya.ui=papaya.ui||{};var papayaLoadableImages=papayaLoadableImages||[];papaya.ui.Toolbar=papaya.ui.Toolbar||function(a){this.container=a;this.viewer=a.viewer;this.imageMenus=null;this.spaceMenu=null};papaya.ui.Toolbar.SIZE=22;papaya.ui.Toolbar.ICON_IMAGESPACE="data:image/gif;base64,R0lGODlhFAAUAPcAMf//////GP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2f/ZNbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1qWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpVpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAUABQAAAipAFUIHEiwoMB/A1coXLiwisOHVf4hVLFCosWLGC9SzMgR48Z/VEJSUVjFj0mTESdWBCmS5EmU/6oIXCly5IqSLx/OlFjT5Us/DneybIkzp8yPDElChCjwj8Q/UKOqmkqVatOnUaGqmsaVq1UVTv+lGjv2z9SuXlVdFUs2ldmtaKeubev2bFy1YCXSfYt2mty8/6CS5XtXRcasVRMftJj1beK/hicanKwiIAA7";papaya.ui.Toolbar.ICON_WORLDSPACE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAplJREFUeNqM1H1ozVEcx/Hr3p+7O08jQzbzMErznEItK0+Fv0Ye/tki20ia//wn+YMSaXkoEiKkkCVKZhOipsnDstnFagzlrmGMNfeO6/Nd71unu2s59bq7O517ft/z/X7Pz+dLPUbLJrkqX+SbdEubfJZK2cC6PiOQYm61HJcpkintEpcmCcpryZV5spaHhvvbdJ9slsPyU67wgPlEli0X5aiMkMeyXSbKnVRRVxDRRtkm5czbZrv5vkgu8z1P9stWfleRHGkhT3xCLu1YzZIjpfKWnA6VEn43mwcWEaWlo1Ve2YZj5Jms53iP5BjFsFz9lg/yDj0U7JbslFpZQyBP2a83khoiLiWPA/h/OVGOk+GwnJ5y1iyRS5Im1VLm18cKOc+CYrlGjnxUuZPIOlAn0yWdNXdlrMyRE7LM00eBjBT7niFVTvHsKJ8k6sw1yC4ZIl0EUMOcRT/X44v14xEZSBWfk+d8NpzKujgPGiYrOXI+XTGeGtjpewtjm16Qh3JT3sgvickfNo4yF6V4PVyE2wQUZvP7FmmIa/iDIpwkHRPkrC2iEIlhEZ2mtarIsz3sOoX0PPrP7nAWPRYjj51E85JiJEYO0VsfR5hL5wZal3T7aZl10kLiEyNEHtOSbt4g/gaduRjzC+S9RwtZ332XBxQpzGZ+p72SR5BumUYHLaaDSiySUXKPig6Wj+SmjX5s4BQB0pFBQVo4dhenspfKC1kaYLKVa9pOAW5Q2Ww2qeU92kHbzZRDvK2sBSfLDLtNUp/82rOj7nDm9tJi7lhoeWNzG7Pkqxz8R5p8ByhcGVd0CzkOOWv28KBJvNGa+V2/Y5U08vQm8mgvmTNyjpxHSFUj6/9rZPKerGSTuCPCi7qIdX3GXwEGAPFYt+/OgAXDAAAAAElFTkSuQmCC";papaya.ui.Toolbar.ICON_EXPAND="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAE00lEQVR42u2djW3UQBCFJx3QAemAdJBQAVABTgekAqCC0EGOCoAKWDqADkIHKQGPfKdEh3Nr7493Z977pJWQwtk7+77ETs6zdyYEmrPWEyBtoQDgUABwKAA4FAAcCgAOBQCHAoBDAcChAOBQAHAoADgUABwKAE6uALfjuGg094dx7Mbxo9H5D7wZxzCOF43O/3scN6kvzhXg5ziuGhV+4K20k0DD/964/jCO16kv9iCABvCu0bm/ySRgS4KAC7Abx3Wjc9/J9OO/JUGABXjYn/9Po/O/kimAVtd/EQMC6E1Krevkbhx/Kx17KSpBrcuAHjd2kx2kcwGUYRxfy60LBO9lEjxGEAMCKINQgqUsDV8JYkQAZRBKEGNN+EqQzgTQa/6p69YglOA5YuHPrW2QzgT4NI77SCGDUIJjYuEP4ziXaX2fEqRDAT4vLIgSTCxdq49iSIA1hSGzZo3MCbC2QDTWro1JAVIKRSBlTcwKkFqwV1LXwrQAOYV7ImcNzAuQuwDWya3dhQAlFsIiJWp2I0CpBbFCqVpdCVByYXqmZI3uBCi9QL1RujaXAigeJahRk1sBFE8S1KrFtQCKBwlq1uBeAMWyBLXnDiGAYlGCLeYMI4BiSYKt5golgGJBgi3nCCeA0rMEW88NUgClRwlazKk7AeaaI3WCpQVQepKg1VzmBMhqjs0V4Lg9unavXg8StJzDS5keDX/ai5jVHl9ih5DDBgka/hep36jZMoAeBNRexA8ySaBzydobweoWMS2C6CH84lgVQNkyEJfhK5YFULYIxm34inUBlFhA55K+h8DcTddTBjEcvuJBAOWUBIOkh3Qp0+/ZpY/bDV4EUJ6T4GocvxKP+ZwAgzgIX/EkgKIS6K+ihx/ZQTL+Srbn+K+dgzgJX/EmgKLX7fP9v1O/84+53B8zSPs9iYriUQCyAgoADgUAhwKAQwHAoQDgUABwKAA4FAAcCgAOBQCHAoBDAcChAOB4FEDfDr6Sacfykm8Hy/6YfDu4Y46fCgpS9oEQ7X3QZ/L5QEiH8JGwBLwIcOqh0CtJF6DWw6bd4EGAUyHpj2z9iJWcx8LvT3x9EOMSWBeAjSGZWBaArWEFsCoAm0MLwfZwO+c+0FV7+NwGETk3XTF6CKDlHOY+rLrpBhHcImbbuXS3RQw3idp2Tt1tEsVt4rhNHDeK3HCOUAJYCH/rucIIYCn8LecMIYDF8Leau3sBLIe/RQ2uBfAQfu1a3ArgKfyaNbkUwGP4tWpzJ4Dn8GvU6EoAhPBL1+pGAKTwS9bsQgDE8EvVbl4A5PBLrIFpARj+I6lrYVYAhv8/KWtiUgCG/zxr18acAAw/zpo1MiUAw1/O0rUyI8D9woLII0skOBcDAuhHrFxECmH488QkmFvbIJ0JcIpBGH6MmATHBDEiwCAMfylrJAhiQIBBGP5alkoQpHMB9Lr1PX6oJPS4tXsRY+geAkOlY2vX1UXk/wTpXICa1P6w6hhzvXpbo+eHFUDZjeO60bnvpN53/1KCgAuQ1RyZyVxz7NYEARcgqz06k+P2+BYEaSjArcRvUmqh1/+dtAv/wGGDjFb3AXqTfZP6YqtbxJBCUABwKAA4FAAcCgAOBQCHAoBDAcChAOBQAHAoADgUABwKAA4FAIcCgPMPvdAfn3qMP2kAAAAASUVORK5CYII=";papaya.ui.Toolbar.ICON_COLLAPSE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6pQdqumllRC/0ymTtej8gpbbuVwpQfyw66dqEZyxZKxtHpJn+tZnpnEdrYBbueF9qQn93S7HQGGHnYP7w6L+YGHNtd1FJitqPAR+hERCNOFi1i1alKO6RQnjKUxL1GNjwlMsiEhcPLYTEiT9ISbN15OY/jx4SMshe9LaJRpTvHr3C/ybFYP1PZAfwfYrPsMBtnE6SwN9ib7AhLwTrBDgUKcm06FSrTfSj187xPdVQWOk5Q8vxAfSiIUc7Z7xr6zY/+hpqwSyv0I0/QMTRb7RMgBxNodTfSPqdraz/sDjzKBrv4zu2+a2t0/HHzjd2Lbcc2sG7GtsL42K+xLfxtUgI7YHqKlqHK8HbCCXgjHT1cAdMlDetv4FnQ2lLasaOl6vmB0CMmwT/IPszSueHQqv6i/qluqF+oF9TfO2qEGTumJH0qfSv9KH0nfS/9TIp0Wboi/SRdlb6RLgU5u++9nyXYe69fYRPdil1o1WufNSdTTsp75BfllPy8/LI8G7AUuV8ek6fkvfDsCfbNDP0dvRh0CrNqTbV7LfEEGDQPJQadBtfGVMWEq3QWWdufk6ZSNsjG2PQjp3ZcnOWWing6noonSInvi0/Ex+IzAreevPhe+CawpgP1/pMTMDo64G0sTCXIM+KdOnFWRfQKdJvQzV1+Bt8OokmrdtY2yhVX2a+qrykJfMq4Ml3VR4cVzTQVz+UoNne4vcKLoyS+gyKO6EHe+75Fdt0Mbe5bRIf/wjvrVmhbqBN97RD1vxrahvBOfOYzoosH9bq94uejSOQGkVM6sN/7HelL4t10t9F4gPdVzydEOx83Gv+uNxo7XyL/FtFl8z9ZAHF4bBsrEwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAeJJREFUOBG1lU1KA0EQhTP5c5MggkvFvQfQjS4iIcled3qBrDyCHsFsvEBcegBBkEBA0VuIW0UFBX8w4/c6VUMbAhoYG16qquvVm05Nd0+SpmlBI0mSogzxV5iY8Yf6EiWUp6NQasJFWfPL7lucQIzzvoDAn6xxrsRDEXYVrE0S44dM86kJC1GtNKxeDy+ULFDiAbQsrpqtMFeXb3GNuDLBaVmtL6zkZH+qCPegGQm1iftR3CduR3HTanxBY62I4OIiPoGOcoxdMIh4A81ZroMvblgINmiEnBcY0f++Cl6B2rMBzp0n3+aUE8cXEGqdVyaRDSY/FGDP2D4N3B64Bs/Ah/wdsA4acG+U8Fr5GuHtIaItpb1cAW2gv18FEt0HC8CHfM0pVxXXavSSpRG0fMUK1NA5sAeWwSfQ6i7AEPhwf4mJAyDBO3AJVBO0dNLw8x+hFfnLsj0kSlt0+kbYOuExiFuhng7JH2LFld0Ej2AeeCu6cF5cy3vs/XiDeAIWwS3Q298G8ZDoFuiBI7ACdKjegcZYSz2eBgjap1dAxafOkW9zyoUj7LnY/hCFmNsByYQRzf9IR6L5XUKI/uXarHn/4Gvn/H5tQvqfi14rcXHzs6vPYh3RmT9N2ZHWxkYgt4/pN/LAOfka/AG9AAAAAElFTkSuQmCC";papaya.ui.Toolbar.MENU_DATA={menus:[{label:"File",icons:null,items:[{label:"Add Image...",action:"OpenImage",type:"file"},{label:"Add DICOM Folder...",action:"OpenFolder",type:"folder",hide:(papaya.utilities.PlatformUtils.browser!=="Chrome")},{type:"spacer"},{type:"spacer"},{label:"Close All",action:"CloseAllImages"}]},{label:"Options",icons:null,items:[{label:"Preferences",action:"Preferences"}]},{label:"",icons:null,titleBar:"true"},{label:"EXPAND",icons:[papaya.ui.Toolbar.ICON_EXPAND,papaya.ui.Toolbar.ICON_COLLAPSE],items:[],method:"isCollapsable",required:"isExpandable"},{label:"SPACE",icons:[papaya.ui.Toolbar.ICON_IMAGESPACE,papaya.ui.Toolbar.ICON_WORLDSPACE],items:[],method:"isWorldMode",menuOnHover:true}]};papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA={items:[{label:"Image Info",action:"ImageInfo"},{label:"DisplayRange",action:"ChangeRange",type:"displayrange",method:"getRange"},{label:"Transparency",action:"ChangeAlpha",type:"range",method:"getAlpha"},{label:"Color Table...",action:"ColorTable",items:[]},{label:"Close Overlay",action:"CloseOverlay"},{label:"Open in Mango",action:"OpenInMango",required:"canOpenInMango"}]};papaya.ui.Toolbar.BASE_IMAGE_MENU_DATA={items:[{label:"Image Info",action:"ImageInfo"},{label:"DisplayRange",action:"ChangeRange",type:"displayrange",method:"getRange"},papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items[3],{label:"Open in Mango",action:"OpenInMango",required:"canOpenInMango"}]};papaya.ui.Toolbar.PREFERENCES_DATA={items:[{label:"Coordinate display of:",field:"atlasLocks",options:["Mouse","Crosshairs"]},{label:"Show crosshairs:",field:"showCrosshairs",options:["All","Main","Lower","None"]},{label:"Show orientation:",field:"showOrientation",options:["Yes","No"]},{label:"Scroll wheel behavior:",field:"scrollBehavior",options:["Zoom","Increment Slice"],disabled:"container.disableScrollWheel"},{label:"Smooth display:",field:"smoothDisplay",options:["Yes","No"]}]};papaya.ui.Toolbar.IMAGE_INFO_DATA={items:[{label:"Filename:",field:"getFilename",readonly:"true"},{spacer:"true"},{label:"Image Dims:",field:"getImageDimensionsDescription",readonly:"true"},{label:"Voxel Dims:",field:"getVoxelDimensionsDescription",readonly:"true"},{spacer:"true"},{label:"Byte Type:",field:"getByteTypeDescription",readonly:"true"},{label:"Byte Order:",field:"getByteOrderDescription",readonly:"true"},{spacer:"true"},{label:"Orientation:",field:"getOrientationDescription",readonly:"true"},{spacer:"true"},{label:"Notes:",field:"getImageDescription",readonly:"true"}]};papaya.ui.Toolbar.SERIES_INFO_DATA={items:[{label:"Filename:",field:"getFilename",readonly:"true"},{label:"File Length:",field:"getFileLength",readonly:"true"},{spacer:"true"},{label:"Image Dims:",field:"getImageDimensionsDescription",readonly:"true"},{label:"Voxel Dims:",field:"getVoxelDimensionsDescription",readonly:"true"},{label:"Series Points:",field:"getSeriesDimensionsDescription",readonly:"true"},{label:"Series Point Size:",field:"getSeriesSizeDescription",readonly:"true"},{spacer:"true"},{label:"Byte Type:",field:"getByteTypeDescription",readonly:"true"},{label:"Byte Order:",field:"getByteOrderDescription",readonly:"true"},{label:"Compressed:",field:"getCompressedDescription",readonly:"true"},{spacer:"true"},{label:"Orientation:",field:"getOrientationDescription",readonly:"true"},{label:"Notes:",field:"getImageDescription",readonly:"true"}]};papaya.ui.Toolbar.prototype.buildToolbar=function(){var a;this.imageMenus=null;this.spaceMenu=null;this.container.toolbarHtml.find("."+PAPAYA_MENU_ICON_CSS).remove();this.container.toolbarHtml.find("."+PAPAYA_MENU_LABEL_CSS).remove();this.container.toolbarHtml.find("."+PAPAYA_TITLEBAR_CSS).remove();this.buildOpenMenuItems();for(a=0;a<papaya.ui.Toolbar.MENU_DATA.menus.length;a+=1){this.buildMenu(papaya.ui.Toolbar.MENU_DATA.menus[a],null,this.viewer,null)}this.buildAtlasMenu();this.buildColorMenuItems();this.container.titlebarHtml=this.container.containerHtml.find("."+PAPAYA_TITLEBAR_CSS)};papaya.ui.Toolbar.prototype.buildAtlasMenu=function(){if(papaya.data){if(papaya.data.Atlas){var a=this.spaceMenu.items;a[0]={label:papaya.data.Atlas.labels.atlas.header.name,action:"AtlasChanged-"+papaya.data.Atlas.labels.atlas.header.name,type:"checkbox",method:"isUsingAtlas"};if(papaya.data.Atlas.labels.atlas.header.transformedname){a[1]={label:papaya.data.Atlas.labels.atlas.header.transformedname,action:"AtlasChanged-"+papaya.data.Atlas.labels.atlas.header.transformedname,type:"checkbox",method:"isUsingAtlas"}}}}};papaya.ui.Toolbar.prototype.buildColorMenuItems=function(){var a,c,e,b,d;d=this.container.params.luts;if(d){for(c=0;c<d.length;c+=1){papaya.viewer.ColorTable.addCustomLUT(d[c])}}e=papaya.viewer.ColorTable.TABLE_ALL;a=papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items;for(c=0;c<a.length;c+=1){if(a[c].label==="Color Table..."){a=a[c].items;break}}for(c=0;c<e.length;c+=1){b={label:e[c].name,action:"ColorTable-"+e[c].name,type:"checkbox",method:"isUsingColorTable"};a[c]=b}};papaya.ui.Toolbar.prototype.buildOpenMenuItems=function(){var c,b,a;for(c=0;c<papaya.ui.Toolbar.MENU_DATA.menus.length;c+=1){if(papaya.ui.Toolbar.MENU_DATA.menus[c].label==="File"){b=papaya.ui.Toolbar.MENU_DATA.menus[c].items;break}}for(c=0;c<papayaLoadableImages.length;c+=1){if(!papayaLoadableImages[c].hide){a="Add "+papayaLoadableImages[c].nicename;if(!this.menuContains(b,a)){b.splice(2,0,{label:a,action:"Open-"+papayaLoadableImages[c].name})}}}};papaya.ui.Toolbar.prototype.menuContains=function(b,a){var c;for(c=0;c<b.length;c+=1){if(b[c].label===a){return true}}return false};papaya.ui.Toolbar.prototype.buildMenu=function(c,d,f,a){var e=null,b;if(!c.required||((papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,c.required)))()===true)){e=new papaya.ui.Menu(this.viewer,c,papaya.utilities.ObjectUtils.bind(this,this.doAction),this.viewer,a);if(c.label==="SPACE"){this.spaceMenu=c}if(d){e.setMenuButton(d)}else{d=e.buildMenuButton()}b=c.items;if(b){this.buildMenuItems(e,b,d,f,a)}}return e};papaya.ui.Toolbar.prototype.buildMenuItems=function(g,b,e,f,a){var h,d,c;if(a===undefined){a=""}for(h=0;h<b.length;h+=1){if(!b[h].required||((papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,b[h].required)))()===true)){if(b[h].type==="spacer"){d=new papaya.ui.MenuItemSpacer()}else{if(b[h].type==="checkbox"){d=new papaya.ui.MenuItemCheckBox(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),f,b[h].method,a)}else{if(b[h].type==="file"){d=new papaya.ui.MenuItemFileChooser(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),false)}else{if(b[h].type==="folder"){if(!b[h].hide){d=new papaya.ui.MenuItemFileChooser(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),true)}}else{if(b[h].type==="displayrange"){d=new papaya.ui.MenuItemRange(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),f,b[h].method,a)}else{if(b[h].type==="range"){if(papaya.utilities.PlatformUtils.isInputRangeSupported()){d=new papaya.ui.MenuItemSlider(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),f,b[h].method,a)}}else{d=new papaya.ui.MenuItem(this.viewer,b[h].label,b[h].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),a)}}}}}}}else{d=null}if(d){g.addMenuItem(d);if(b[h].items){c=this.buildMenu(b[h],e,f,a);d.callback=papaya.utilities.ObjectUtils.bind(c,c.showMenu)}}}};papaya.ui.Toolbar.prototype.updateImageButtons=function(){var b,d,c,a;this.container.toolbarHtml.find("."+PAPAYA_MENU_BUTTON_CSS).remove();this.imageMenus=[];for(b=this.viewer.screenVolumes.length-1;b>=0;b-=1){d=this.viewer.screenVolumes[b];c=d.colorTable.icon;a={menus:[{label:"ImageButton",icons:[c],items:null,imageButton:true}]};if(b===0){a.menus[0].items=papaya.ui.Toolbar.BASE_IMAGE_MENU_DATA.items}else{a.menus[0].items=papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items}this.imageMenus[b]=(this.buildMenu(a.menus[0],null,d,b.toString()))}};papaya.ui.Toolbar.prototype.closeAllMenus=function(){var b,a,c;b=this.container.toolbarHtml.find("."+PAPAYA_MENU_CSS);b.hide(100);b.remove();a=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_CSS);a.hide(100);a.remove();c=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_BACKGROUND);c.hide(100);c.remove()};papaya.ui.Toolbar.prototype.isShowingMenus=function(){var a,b;a=this.container.toolbarHtml.find("."+PAPAYA_MENU_CSS).is(":visible");b=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_CSS).is(":visible");return(a||b)};papaya.ui.Toolbar.prototype.doAction=function(g,d,f){var a,b,c,h,e;if(!f){this.closeAllMenus()}if(g){if(g.startsWith("ImageButton")){a=parseInt(g.substr(g.length-2,1),10);this.viewer.setCurrentScreenVol(a);this.updateImageButtons()}else{if(g.startsWith("Open-")){e=g.substring(g.indexOf("-")+1);this.viewer.loadImage(e)}else{if(g==="OpenImage"){this.container.display.drawProgress(0.1,"Loading");this.viewer.loadImage(d)}else{if(g==="OpenFolder"){this.container.display.drawProgress(0.1,"Loading");this.viewer.loadImage(d)}else{if(g.startsWith("ColorTable")){b=g.substring(g.indexOf("-")+1,g.lastIndexOf("-"));a=g.substring(g.lastIndexOf("-")+1);this.viewer.screenVolumes[a].changeColorTable(this.viewer,b);this.updateImageButtons()}else{if(g.startsWith("CloseAllImages")){this.viewer.resetViewer();this.updateImageButtons()}else{if(g==="Preferences"){c=new papaya.ui.Dialog(this.container,"Preferences",papaya.ui.Toolbar.PREFERENCES_DATA,this.container.preferences,papaya.utilities.ObjectUtils.bind(this.container.preferences,this.container.preferences.updatePreference));c.showDialog()}else{if(g.startsWith("ImageInfo")){a=g.substring(g.lastIndexOf("-")+1);if(this.viewer.screenVolumes[a].volume.numTimepoints>1){c=new papaya.ui.Dialog(this.container,"Image Info",papaya.ui.Toolbar.SERIES_INFO_DATA,this.viewer,null,null,a.toString())}else{c=new papaya.ui.Dialog(this.container,"Image Info",papaya.ui.Toolbar.IMAGE_INFO_DATA,this.viewer,null,null,a.toString())}c.showDialog()}else{if(g.startsWith("SPACE")){this.viewer.toggleWorldSpace();this.viewer.drawViewer(true)}else{if(g.startsWith("AtlasChanged")){h=g.substring(g.lastIndexOf("-")+1);this.viewer.atlas.currentAtlas=h;this.viewer.drawViewer(true)}else{if(g.startsWith("EXPAND")){if(this.container.collapsable){this.container.collapseViewer()}else{this.container.expandViewer()}}else{if(g.startsWith("OpenInMango")){a=parseInt(g.substring(g.lastIndexOf("-")+1),10);if(a===0){if(this.container.viewer.volume.urls[0]){papaya.utilities.PlatformUtils.launchCustomProtocol(this.container,papaya.utilities.UrlUtils.getAbsoluteUrl(PAPAYA_CUSTOM_PROTOCOL,this.container.viewer.volume.urls[0]),this.customProtocolResult)}}else{if(this.container.viewer.screenVolumes[a].volume.urls[0]){papaya.utilities.PlatformUtils.launchCustomProtocol(this.container,papaya.utilities.UrlUtils.getAbsoluteUrl(PAPAYA_CUSTOM_PROTOCOL,this.container.viewer.screenVolumes[a].volume.urls[0])+"?"+encodeURIComponent("baseimage="+this.container.viewer.volume.fileName+"&params=o"),this.customProtocolResult)}}}else{if(g.startsWith("CloseOverlay")){a=parseInt(g.substring(g.lastIndexOf("-")+1),10);this.viewer.closeOverlay(a)}}}}}}}}}}}}}}};papaya.ui.Toolbar.prototype.customProtocolResult=function(a){if(a===false){if((papaya.utilities.PlatformUtils.browser==="Chrome")||(papaya.utilities.PlatformUtils.browser==="Internet Explorer")){alert("Mango does not appear to be installed.  You can download Mango at:\n\nhttp://ric.uthscsa.edu/mango")}else{if(papaya.utilities.PlatformUtils.ios){if(confirm("iMango does not appear to be installed.  Would you like to download it now?")){window.open("http://itunes.apple.com/us/app/imango/id423626092")}}else{if(confirm("Mango does not appear to be installed.  Would you like to download it now?")){window.open("http://ric.uthscsa.edu/mango/mango.html")}}}}};papaya.ui.Toolbar.prototype.updateTitleBar=function(b){var a=this.container.titlebarHtml[0];if(a){a.innerHTML=b}this.container.titlebarHtml.css({top:(this.container.viewerHtml.position().top-1.25*papaya.ui.Toolbar.SIZE)})};papaya.ui.Toolbar.prototype.showImageMenu=function(a){this.viewer.screenVolumes[a].resetDynamicRange();this.imageMenus[a].showMenu()};papaya.ui.Toolbar.prototype.updateImageMenuRange=function(b,c,a){this.imageMenus[b].updateRangeItem(c,a)};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};papaya.viewer.Atlas=papaya.viewer.Atlas||function(c,b,d){this.container=b;this.callback=d;this.name=null;this.transformedname=null;this.labels=[];this.atlasLabelData=c.labels;this.volume=new papaya.volume.Volume(b.display,b.viewer);this.displayColumns=null;this.returnLabels=null;this.transform=null;this.currentAtlas=null;this.maxLabels=0;this.probabilistic=false;var a=b.findLoadableImage(c.labels.atlas.header.images.summaryimagefile);if((a!==null)&&(a.encode!==undefined)){this.volume.readEncodedData([a.encode],papaya.utilities.ObjectUtils.bind(this,this.readFinished))}else{if((a!==null)&&(a.url!==undefined)){this.volume.readURLs([a.url],papaya.utilities.ObjectUtils.bind(this,this.readFinished))}}};papaya.viewer.Atlas.MAX_LABELS=4;papaya.viewer.Atlas.PROBABILISTIC=["probabalistic","probabilistic","statistic"];papaya.viewer.Atlas.LABEL_SPLIT_REGEX=/\.|:|,|\//;papaya.viewer.Atlas.prototype.getLabelAtCoordinate=function(f,e,d){var c,b,a,g;if(this.transform&&(this.currentAtlas===this.transformedname)){c=((f*this.transform[0][0])+(e*this.transform[0][1])+(d*this.transform[0][2])+(this.transform[0][3]));b=((f*this.transform[1][0])+(e*this.transform[1][1])+(d*this.transform[1][2])+(this.transform[1][3]));a=((f*this.transform[2][0])+(e*this.transform[2][1])+(d*this.transform[2][2])+(this.transform[2][3]))}else{c=f;b=e;a=d}g=(this.volume.getVoxelAtCoordinate(c,b,a,0,true));if(this.probabilistic){g-=1}return this.formatLabels(this.labels[g],this.returnLabels)};papaya.viewer.Atlas.prototype.readFinished=function(){this.parseTransform();this.parseLabels();this.parseDisplayColumns();this.maxLabels=this.findMaxLabelParts();this.probabilistic=this.atlasLabelData.atlas.header.type&&((this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[0])||(this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[1])||(this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[2]));this.returnLabels=[];this.returnLabels.length=this.maxLabels;if(this.atlasLabelData.atlas.header.transformedname){this.transformedname=this.atlasLabelData.atlas.header.transformedname}this.name=this.atlasLabelData.atlas.header.name;this.currentAtlas=this.name;var a=this.container.params.atlas;if(a){if(a===this.transformedname){this.currentAtlas=this.transformedname}}this.callback()};papaya.viewer.Atlas.prototype.parseDisplayColumns=function(){var a,b,c;if(this.atlasLabelData.atlas.header.display){this.displayColumns=[];a=0;b=this.atlasLabelData.atlas.header.display.split(papaya.viewer.Atlas.LABEL_SPLIT_REGEX);for(c=0;c<b.length;c+=1){if(b[c]==="*"){this.displayColumns[a]=c;a+=1}}}};papaya.viewer.Atlas.prototype.parseTransform=function(){var c,b,a;if(this.atlasLabelData.atlas.header.transform){c=this.atlasLabelData.atlas.header.transform.split(" ");this.transform=papaya.volume.Transform.IDENTITY.clone();if(c.length===16){for(b=0;b<4;b+=1){for(a=0;a<4;a+=1){this.transform[b][a]=parseFloat(c[(b*4)+a])}}}}};papaya.viewer.Atlas.prototype.parseLabels=function(){var c,b,a;for(c=0;c<this.atlasLabelData.atlas.data.label.length;c+=1){a=this.atlasLabelData.atlas.data.label[c];if(a.index){b=parseInt(a.index,10)}else{b=c}if(a.content){this.labels[b]=a.content}else{this.labels[b]=a}}};papaya.viewer.Atlas.prototype.formatLabels=function(b,c){var d,f,a,e;if(b){a=b.split(papaya.viewer.Atlas.LABEL_SPLIT_REGEX);if(this.displayColumns){for(d=0;d<a.length;d+=1){if(d<this.displayColumns.length){c[d]=a[this.displayColumns[d]]}}}else{e=a.length;f=0;if(e>papaya.viewer.Atlas.MAX_LABELS){f=(e-papaya.viewer.Atlas.MAX_LABELS)}for(d=f;d<a.length;d+=1){c[d]=a[d].trim()}}}else{for(d=0;d<c.length;d+=1){c[d]=""}}return c};papaya.viewer.Atlas.prototype.findMaxLabelParts=function(){var a,b;if(this.displayColumns){return this.displayColumns.length}b=[];for(a=0;a<this.labels.length;a+=1){this.formatLabels(this.labels[a],b)}return b.length};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};papaya.viewer.ColorTable=papaya.viewer.ColorTable||function(b,a,c){this.lut=papaya.viewer.ColorTable.findLUT(b);this.maxLUT=0;this.minLUT=0;this.knotThresholds=[];this.knotRangeRatios=[];this.LUTarrayG=new Array(256);this.LUTarrayR=new Array(256);this.LUTarrayB=new Array(256);this.isBaseImage=a;this.knotMin=this.lut[0];this.knotMax=this.lut[this.lut.length-1];this.useGradation=c;this.canvasIcon=document.createElement("canvas");this.canvasIcon.width=papaya.viewer.ColorTable.ICON_SIZE;this.canvasIcon.height=papaya.viewer.ColorTable.ICON_SIZE;this.contextIcon=this.canvasIcon.getContext("2d");this.imageDataIcon=this.contextIcon.createImageData(papaya.viewer.ColorTable.ICON_SIZE,papaya.viewer.ColorTable.ICON_SIZE);this.icon=null;this.canvasBar=document.createElement("canvas");this.canvasBar.width=papaya.viewer.ColorTable.COLOR_BAR_WIDTH;this.canvasBar.height=papaya.viewer.ColorTable.COLOR_BAR_HEIGHT;this.contextBar=this.canvasBar.getContext("2d");this.imageDataBar=this.contextBar.createImageData(papaya.viewer.ColorTable.COLOR_BAR_WIDTH,papaya.viewer.ColorTable.COLOR_BAR_HEIGHT);this.colorBar=null;this.updateLUT(papaya.viewer.ColorTable.LUT_MIN,papaya.viewer.ColorTable.LUT_MAX);this.updateIcon();this.updateColorBar()};papaya.viewer.ColorTable.TABLE_GRAYSCALE={name:"Grayscale",data:[[0,0,0,0],[1,1,1,1]]};papaya.viewer.ColorTable.TABLE_SPECTRUM={name:"Spectrum",data:[[0,0,0,0],[0.1,0,0,1],[0.33,0,1,1],[0.5,0,1,0],[0.66,1,1,0],[0.9,1,0,0],[1,1,1,1]]};papaya.viewer.ColorTable.TABLE_RED2YELLOW={name:"Overlay (Positives)",data:[[0,1,0,0],[1,1,1,0]]};papaya.viewer.ColorTable.TABLE_BLUE2GREEN={name:"Overlay (Negatives)",data:[[0,0,0,1],[1,0,1,0]]};papaya.viewer.ColorTable.TABLE_HOTANDCOLD={name:"Hot-and-Cold",data:[[0,0,0,1],[0.15,0,1,1],[0.3,0,1,0],[0.45,0,0,0],[0.5,0,0,0],[0.55,0,0,0],[0.7,1,1,0],[0.85,1,0,0],[1,1,1,1]]};papaya.viewer.ColorTable.TABLE_GOLD={name:"Gold",data:[[0,0,0,0],[0.13,0.19,0.03,0],[0.25,0.39,0.12,0],[0.38,0.59,0.26,0],[0.5,0.8,0.46,0.08],[0.63,0.99,0.71,0.21],[0.75,0.99,0.88,0.34],[0.88,0.99,0.99,0.48],[1,0.9,0.95,0.61]]};papaya.viewer.ColorTable.TABLE_RED2WHITE={name:"Red Overlay",data:[[0,0.75,0,0],[0.5,1,0.5,0],[0.95,1,1,0],[1,1,1,1]]};papaya.viewer.ColorTable.TABLE_GREEN2WHITE={name:"Green Overlay",data:[[0,0,0.75,0],[0.5,0.5,1,0],[0.95,1,1,0],[1,1,1,1]]};papaya.viewer.ColorTable.TABLE_BLUE2WHITE={name:"Blue Overlay",data:[[0,0,0,1],[0.5,0,0.5,1],[0.95,0,1,1],[1,1,1,1]]};papaya.viewer.ColorTable.ARROW_ICON="data:image/gif;base64,R0lGODlhCwARAPfGMf//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACIAAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH5BAEAAMYALAAAAAALABEAAAg/AI0JFGhvoEGC+vodRKgv4UF7DSMqZBixoUKIFSv2w5jRIseOGztK/JgxpMiEJDWmHHkSZUuTIvvt60ezps2AADs=";papaya.viewer.ColorTable.ARROW_ICON_WIDTH=11;papaya.viewer.ColorTable.DEFAULT_COLOR_TABLE=papaya.viewer.ColorTable.TABLE_GRAYSCALE;papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES=[papaya.viewer.ColorTable.TABLE_RED2YELLOW,papaya.viewer.ColorTable.TABLE_BLUE2GREEN];papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES=[papaya.viewer.ColorTable.TABLE_RED2WHITE,papaya.viewer.ColorTable.TABLE_GREEN2WHITE,papaya.viewer.ColorTable.TABLE_BLUE2WHITE];papaya.viewer.ColorTable.TABLE_ALL=[papaya.viewer.ColorTable.TABLE_GRAYSCALE,papaya.viewer.ColorTable.TABLE_SPECTRUM,papaya.viewer.ColorTable.TABLE_RED2YELLOW,papaya.viewer.ColorTable.TABLE_BLUE2GREEN,papaya.viewer.ColorTable.TABLE_HOTANDCOLD,papaya.viewer.ColorTable.TABLE_GOLD,papaya.viewer.ColorTable.TABLE_RED2WHITE,papaya.viewer.ColorTable.TABLE_GREEN2WHITE,papaya.viewer.ColorTable.TABLE_BLUE2WHITE];papaya.viewer.ColorTable.LUT_MIN=0;papaya.viewer.ColorTable.LUT_MAX=255;papaya.viewer.ColorTable.ICON_SIZE=18;papaya.viewer.ColorTable.COLOR_BAR_WIDTH=100;papaya.viewer.ColorTable.COLOR_BAR_HEIGHT=15;papaya.viewer.ColorTable.findLUT=function(a){var b;for(b=0;b<papaya.viewer.ColorTable.TABLE_ALL.length;b+=1){if(papaya.viewer.ColorTable.TABLE_ALL[b].name===a){return papaya.viewer.ColorTable.TABLE_ALL[b].data}}return papaya.viewer.ColorTable.TABLE_GRAYSCALE.data};papaya.viewer.ColorTable.addCustomLUT=function(a){if(papaya.viewer.ColorTable.findLUT(a.name)===papaya.viewer.ColorTable.TABLE_GRAYSCALE.data){papaya.viewer.ColorTable.TABLE_ALL.push(a)}};papaya.viewer.ColorTable.prototype.updateMinLUT=function(a){this.updateLUT(a,this.maxLUT)};papaya.viewer.ColorTable.prototype.updateMaxLUT=function(a){this.updateLUT(this.minLUT,a)};papaya.viewer.ColorTable.prototype.updateLUT=function(f,e){var a,d,b,c;this.maxLUT=e;this.minLUT=f;a=this.maxLUT-this.minLUT;for(d=0;d<this.lut.length;d+=1){this.knotThresholds[d]=(this.lut[d][0]*a)+this.minLUT}for(d=0;d<(this.lut.length-1);d+=1){this.knotRangeRatios[d]=papaya.viewer.ColorTable.LUT_MAX/(this.knotThresholds[d+1]-this.knotThresholds[d])}for(d=0;d<256;d+=1){if(d<=this.minLUT){this.LUTarrayR[d]=this.knotMin[1]*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayG[d]=this.knotMin[2]*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayB[d]=this.knotMin[3]*papaya.viewer.ColorTable.LUT_MAX}else{if(d>this.maxLUT){this.LUTarrayR[d]=this.knotMax[1]*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayG[d]=this.knotMax[2]*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayB[d]=this.knotMax[3]*papaya.viewer.ColorTable.LUT_MAX}else{for(b=0;b<(this.lut.length-1);b+=1){if((d>this.knotThresholds[b])&&(d<=this.knotThresholds[b+1])){if(this.useGradation){c=(((d-this.knotThresholds[b])*this.knotRangeRatios[b])+0.5)/papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayR[d]=(((1-c)*this.lut[b][1])+(c*this.lut[b+1][1]))*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayG[d]=(((1-c)*this.lut[b][2])+(c*this.lut[b+1][2]))*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayB[d]=(((1-c)*this.lut[b][3])+(c*this.lut[b+1][3]))*papaya.viewer.ColorTable.LUT_MAX}else{this.LUTarrayR[d]=(this.lut[b][1])*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayG[d]=(this.lut[b][2])*papaya.viewer.ColorTable.LUT_MAX;this.LUTarrayB[d]=(this.lut[b][3])*papaya.viewer.ColorTable.LUT_MAX}}}}}}};papaya.viewer.ColorTable.prototype.lookupRed=function(a){if((a>=0)&&(a<256)){return(this.LUTarrayR[a]&255)}return 0};papaya.viewer.ColorTable.prototype.lookupGreen=function(a){if((a>=0)&&(a<256)){return(this.LUTarrayG[a]&255)}return 0};papaya.viewer.ColorTable.prototype.lookupBlue=function(a){if((a>=0)&&(a<256)){return(this.LUTarrayB[a]&255)}return 0};papaya.viewer.ColorTable.prototype.updateIcon=function(){var d,b,c,a,e;d=papaya.viewer.ColorTable.LUT_MAX/papaya.viewer.ColorTable.ICON_SIZE;for(b=0;b<papaya.viewer.ColorTable.ICON_SIZE;b+=1){for(c=0;c<papaya.viewer.ColorTable.ICON_SIZE;c+=1){a=((b*papaya.viewer.ColorTable.ICON_SIZE)+c)*4;e=Math.round(c*d);this.imageDataIcon.data[a]=this.lookupRed(e);this.imageDataIcon.data[a+1]=this.lookupGreen(e);this.imageDataIcon.data[a+2]=this.lookupBlue(e);this.imageDataIcon.data[a+3]=255}}this.contextIcon.putImageData(this.imageDataIcon,0,0);this.icon=this.canvasIcon.toDataURL()};papaya.viewer.ColorTable.prototype.updateColorBar=function(){var d,b,c,a,e;d=papaya.viewer.ColorTable.LUT_MAX/papaya.viewer.ColorTable.COLOR_BAR_WIDTH;for(b=0;b<papaya.viewer.ColorTable.COLOR_BAR_HEIGHT;b+=1){for(c=0;c<papaya.viewer.ColorTable.COLOR_BAR_WIDTH;c+=1){a=((b*papaya.viewer.ColorTable.COLOR_BAR_WIDTH)+c)*4;e=Math.round(c*d);this.imageDataBar.data[a]=this.lookupRed(e);this.imageDataBar.data[a+1]=this.lookupGreen(e);this.imageDataBar.data[a+2]=this.lookupBlue(e);this.imageDataBar.data[a+3]=255}}this.contextBar.putImageData(this.imageDataBar,0,0);this.colorBar=this.canvasBar.toDataURL()};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};papaya.viewer.Display=papaya.viewer.Display||function(a,b){this.container=a;this.viewer=a.viewer;this.canvas=document.createElement("canvas");this.canvas.width=b;this.canvas.height=papaya.viewer.Display.SIZE;this.context=this.canvas.getContext("2d");this.canvas.style.padding=0;this.canvas.style.margin=0;this.canvas.style.border="none";this.canvas.style.cursor="default";this.tempCoord=new papaya.core.Coordinate(0,0,0);this.drawingError=false;this.progress=0;this.progressStartTime=0;this.progressTimeout=null;this.drawingProgress=false;this.errorMessage="";this.drawUninitializedDisplay()};papaya.viewer.Display.SIZE=50;papaya.viewer.Display.MINI_LABELS_THRESH=700;papaya.viewer.Display.PADDING=8;papaya.viewer.Display.FONT_COLOR_WHITE="white";papaya.viewer.Display.FONT_COLOR_ORANGE="rgb(182, 59, 0)";papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL=12;papaya.viewer.Display.FONT_COLOR_COORDINATE_LABEL=papaya.viewer.Display.FONT_COLOR_WHITE;papaya.viewer.Display.FONT_TYPE_COORDINATE_LABEL="Arial";papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE=18;papaya.viewer.Display.FONT_COLOR_COORDINATE_VALUE=papaya.viewer.Display.FONT_COLOR_ORANGE;papaya.viewer.Display.FONT_TYPE_COORDINATE_VALUE="Arial";papaya.viewer.Display.PRECISION_COORDINATE_VALUE=5;papaya.viewer.Display.PRECISION_COORDINATE_MAX=12;papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE=20;papaya.viewer.Display.FONT_COLOR_IMAGE_VALUE=papaya.viewer.Display.FONT_COLOR_WHITE;papaya.viewer.Display.FONT_TYPE_IMAGE_VALUE="Arial";papaya.viewer.Display.PRECISION_IMAGE_VALUE=9;papaya.viewer.Display.PRECISION_IMAGE_MAX=14;papaya.viewer.Display.FONT_SIZE_ATLAS_MINI=14;papaya.viewer.Display.FONT_SIZE_ATLAS=20;papaya.viewer.Display.FONT_TYPE_ATLAS="Arial";papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE=20;papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE="Arial";papaya.viewer.Display.FONT_COLOR_MESSAGE="rgb(200, 75, 25)";papaya.viewer.Display.PROGRESS_LABEL_SUFFIX=["...","",".",".."];papaya.viewer.Display.PROGRESS_LABEL_DEFAULT="Loading";papaya.viewer.Display.prototype.drawUninitializedDisplay=function(){this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height)};papaya.viewer.Display.prototype.canDraw=function(){return !(this.drawingError||this.drawingProgress)};papaya.viewer.Display.prototype.drawEmptyDisplay=function(){if(this.canDraw()){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height)}else{if(this.drawError){this.drawError(this.errorMessage)}}};papaya.viewer.Display.prototype.drawDisplay=function(j,l,r){var c,s,g,i,n,a,h,p,o,d,f,k,e,q,b,m;if(this.canDraw()){d=this.viewer.canvas.width/600;e=this.viewer.canvas.width/2;q=e/5;i=this.canvas.height;b=(e<300);if(this.container.preferences.atlasLocks!=="Mouse"){j=this.viewer.currentCoord.x;l=this.viewer.currentCoord.y;r=this.viewer.currentCoord.z}this.context.clearRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_COORDINATE_LABEL;this.context.font=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+"px "+papaya.viewer.Display.FONT_TYPE_COORDINATE_LABEL;c=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+papaya.viewer.Display.PADDING*0.75;this.context.fillText("x",1.5*papaya.viewer.Display.PADDING,c);this.context.fillText("y",1.5*papaya.viewer.Display.PADDING+q,c);this.context.fillText("z",1.5*papaya.viewer.Display.PADDING+(2*q),c);c+=papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE+papaya.viewer.Display.PADDING/2;this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_COORDINATE_VALUE;this.context.font=(papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE-(b?2:0))+"px "+papaya.viewer.Display.FONT_TYPE_COORDINATE_VALUE;if(this.viewer.worldSpace){g=this.viewer.screenVolumes[0].volume.header.origin;f=this.viewer.screenVolumes[0].volume.header.voxelDimensions;m=Math.min(papaya.viewer.Display.PRECISION_COORDINATE_MAX,(Math.round(papaya.viewer.Display.PRECISION_COORDINATE_VALUE*d)));this.context.fillText(parseFloat(((j-g.x)*f.xSize).toString().substr(0,m)),1.5*papaya.viewer.Display.PADDING,c);this.context.fillText(parseFloat(((g.y-l)*f.ySize).toString().substr(0,m)),1.5*papaya.viewer.Display.PADDING+q,c);this.context.fillText(parseFloat(((g.z-r)*f.zSize).toString().substr(0,m)),1.5*papaya.viewer.Display.PADDING+(2*q),c)}else{this.context.fillText(Math.round(j).toString(),1.5*papaya.viewer.Display.PADDING,c);this.context.fillText(Math.round(l).toString(),1.5*papaya.viewer.Display.PADDING+q,c);this.context.fillText(Math.round(r).toString(),1.5*papaya.viewer.Display.PADDING+(2*q),c)}s=this.viewer.getCurrentValueAt(j,l,r);this.canvas.currentval=s.toString();c=(i/2)+(papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE/2)-(papaya.viewer.Display.PADDING/2);this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_IMAGE_VALUE;this.context.font=(papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE-(b?2:0))+"px "+papaya.viewer.Display.FONT_TYPE_IMAGE_VALUE;m=Math.min(papaya.viewer.Display.PRECISION_IMAGE_MAX,Math.round(papaya.viewer.Display.PRECISION_IMAGE_VALUE*d));this.context.fillText(parseFloat(s.toString().substr(0,m)),(2*papaya.viewer.Display.PADDING)+(3*q),c);if(this.viewer.atlas&&this.viewer.atlas.volume.isLoaded){this.viewer.getWorldCoordinateAtIndex(j,l,r,this.tempCoord);h=this.viewer.atlas.getLabelAtCoordinate(this.tempCoord.x,this.tempCoord.y,this.tempCoord.z);n=h.length;k=Math.ceil(this.viewer.atlas.maxLabels/2);if((e<300)&&(n>=2)){a=e*0.75;for(p=n-1;p>=0;p-=1){if(p===(n-2)){this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_ORANGE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}else{this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_WHITE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}o=this.context.measureText(h[p]);if(o.width>(a-2*papaya.viewer.Display.PADDING)){h[p]=(h[p].substr(0,Math.round(h[p].length/3))+" ... "+h[p].substr(h[p].length-3,3))}if(p===(n-2)){this.context.fillText(h[p],e+(e*0.25),papaya.viewer.Display.PADDING*1.5+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===(n-1)){this.context.fillText(h[p],e+(e*0.25),papaya.viewer.Display.PADDING+(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}}}}else{if((e<600)&&(n>2)){a=e/2;for(p=n-1;p>=0;p-=1){if(p<k){this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_ORANGE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}else{this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_WHITE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}o=this.context.measureText(h[p]);if(o.width>(a-papaya.viewer.Display.PADDING*6)){h[p]=(h[p].substr(0,Math.round(h[p].length/3))+" ... "+h[p].substr(h[p].length-3,3))}if(p===0){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING*1.5+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===1){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING+(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===2){this.context.fillText(h[p],e*1.5+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING*1.5+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===3){this.context.fillText(h[p],e*1.5+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING+(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}}}}}}else{if((e<800)&&(n>3)){a=e/3;for(p=0;p<4;p+=1){if(p<2){if(p<k){this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_ORANGE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}else{this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_WHITE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}o=this.context.measureText(h[p]);if(o.width>(a-papaya.viewer.Display.PADDING*6)){h[p]=(h[p].substr(0,Math.round(h[p].length/3))+" ... "+h[p].substr(h[p].length-3,3))}if(p===0){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING*1.5+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===1){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING+(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===2){this.context.fillText(h[p],e*1.5+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING*1.5+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}else{if(p===3){this.context.fillText(h[p],e*1.5+papaya.viewer.Display.PADDING*5,papaya.viewer.Display.PADDING+(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2))}}}}}else{c=(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS/2)-(papaya.viewer.Display.PADDING/2);if(p<k){this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_ORANGE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}else{this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_WHITE;this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}o=this.context.measureText(h[p]);if(o.width>(a-(2*papaya.viewer.Display.PADDING))){h[p]=(h[p].substr(0,Math.round(h[p].length/3))+" ... "+h[p].substr(h[p].length-3,3))}if(p===2){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING+a,c)}else{if(p===3){this.context.fillText(h[p],e+papaya.viewer.Display.PADDING+(2*a),c)}}}}}else{a=e/n;c=(i/2)+(papaya.viewer.Display.FONT_SIZE_ATLAS/2)-(papaya.viewer.Display.PADDING/2);for(p=0;p<n;p+=1){if(p<k){this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_ORANGE;this.context.font=(papaya.viewer.Display.FONT_SIZE_ATLAS-(b?4:0))+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}else{this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_WHITE;this.context.font=(papaya.viewer.Display.FONT_SIZE_ATLAS-(b?4:0))+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS}o=this.context.measureText(h[p]);if(o.width>(a-(2*papaya.viewer.Display.PADDING))-(e*0.05*Math.max(0,3-n))){h[p]=(h[p].substr(0,Math.round(h[p].length/3))+" ... "+h[p].substr(h[p].length-3,3))}this.context.fillText(h[p],e+papaya.viewer.Display.PADDING+(e*0.05*Math.max(0,3-n))+(p*a),c)}}}}}}else{if(this.drawError){this.drawError(this.errorMessage)}}};papaya.viewer.Display.prototype.drawError=function(b){var a,c;this.errorMessage=b;this.drawingError=true;c=this;window.setTimeout(papaya.utilities.ObjectUtils.bind(c,function(){c.drawingError=false}),3000);this.context.clearRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="red";this.context.font=papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE+"px "+papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE;a=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+papaya.viewer.Display.PADDING+1.5*papaya.viewer.Display.PADDING;this.context.fillText(b,papaya.viewer.Display.PADDING,a)};papaya.viewer.Display.prototype.drawProgress=function(e,d){var h,g,c,b,f,a;h=Math.round(e*1000);if(h>this.progress){this.progress=h;if(d!==undefined){a=d}else{a=papaya.viewer.Display.PROGRESS_LABEL_DEFAULT}if(this.progressStartTime===0){this.progressStartTime=new Date().getTime();c=this.progressStartTime}else{c=new Date().getTime()}b=parseInt((c-this.progressStartTime)/500,10)%4;if(this.progress>=990){if(this.progressTimeout){window.clearTimeout(this.progressTimeout);this.progressTimeout=null}this.drawingProgress=false;this.progress=0;this.progressStartTime=0;this.drawEmptyDisplay()}else{if(this.progressTimeout){window.clearTimeout(this.progressTimeout)}g=this;this.progressTimeout=window.setTimeout(papaya.utilities.ObjectUtils.bind(g,function(){g.drawingProgress=false}),3000);this.context.clearRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#fff";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#000";this.context.fillRect(0,0,this.canvas.width*e,this.canvas.height);this.context.font=papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE+"px "+papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE;this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_MESSAGE;f=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+papaya.viewer.Display.PADDING+1.5*papaya.viewer.Display.PADDING;this.context.fillText(a+papaya.viewer.Display.PROGRESS_LABEL_SUFFIX[b],papaya.viewer.Display.PADDING*2,f)}}};"use strict";var papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.viewer.Preferences=papaya.viewer.Preferences||function(){this.viewer=null;this.showCrosshairs=papaya.viewer.Preferences.DEFAULT_SHOW_CROSSHAIRS;this.atlasLocks=papaya.viewer.Preferences.DEFAULT_ATLAS_LOCKS;this.showOrientation=papaya.viewer.Preferences.DEFAULT_SHOW_ORIENTATION;this.scrollBehavior=papaya.viewer.Preferences.DEFAULT_SCROLL;this.smoothDisplay=papaya.viewer.Preferences.DEFAULT_SMOOTH_DISPLAY;this.readPreferences()};papaya.viewer.Preferences.COOKIE_PREFIX="papaya-";papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS=365;papaya.viewer.Preferences.DEFAULT_SHOW_CROSSHAIRS="All";papaya.viewer.Preferences.DEFAULT_ATLAS_LOCKS="Mouse";papaya.viewer.Preferences.DEFAULT_SHOW_ORIENTATION="Yes";papaya.viewer.Preferences.DEFAULT_SCROLL="Increment Slice";papaya.viewer.Preferences.DEFAULT_SMOOTH_DISPLAY="Yes";papaya.viewer.Preferences.prototype.updatePreference=function(b,a){this[b]=a;this.viewer.drawViewer(true);papaya.utilities.UrlUtils.createCookie(papaya.viewer.Preferences.COOKIE_PREFIX+b,a,papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS)};papaya.viewer.Preferences.prototype.readPreferences=function(){var b,a;for(b=0;b<papaya.ui.Toolbar.PREFERENCES_DATA.items.length;b+=1){a=papaya.utilities.UrlUtils.readCookie(papaya.viewer.Preferences.COOKIE_PREFIX+papaya.ui.Toolbar.PREFERENCES_DATA.items[b].field);if(a){this[papaya.ui.Toolbar.PREFERENCES_DATA.items[b].field]=a}}};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};papaya.viewer.ScreenSlice=papaya.viewer.ScreenSlice||function(e,c,f,a,b,d,g){this.screenVolumes=g;this.sliceDirection=c;this.currentSlice=-1;this.xDim=f;this.yDim=a;this.xSize=b;this.ySize=d;this.canvasMain=document.createElement("canvas");this.canvasMain.width=this.xDim;this.canvasMain.height=this.yDim;this.contextMain=this.canvasMain.getContext("2d");this.imageDataDraw=this.contextMain.createImageData(this.xDim,this.yDim);this.screenOffsetX=0;this.screenOffsetY=0;this.screenDim=0;this.screenTransform=[[1,0,0],[0,1,0],[0,0,1]];this.zoomTransform=[[1,0,0],[0,1,0],[0,0,1]];this.finalTransform=[[1,0,0],[0,1,0],[0,0,1]];this.imageData=[]};papaya.viewer.ScreenSlice.DIRECTION_UNKNOWN=0;papaya.viewer.ScreenSlice.DIRECTION_AXIAL=1;papaya.viewer.ScreenSlice.DIRECTION_CORONAL=2;papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL=3;papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX=255;papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN=0;papaya.viewer.ScreenSlice.prototype.updateSlice=function(i,a,f){var j,m,b,k,l,h,g,e,d,c;i=Math.round(i);if(a||(this.currentSlice!==i)){this.currentSlice=i;j=this.screenVolumes[0].volume.header.origin;m=this.screenVolumes[0].volume.header.voxelDimensions;this.contextMain.clearRect(0,0,this.canvasMain.width,this.canvasMain.height);if(this.imageData.length<this.screenVolumes.length){this.imageData=papaya.utilities.ArrayUtils.createArray(this.screenVolumes.length,this.xDim*this.yDim)}for(b=0;b<this.screenVolumes.length;b+=1){c=this.screenVolumes[b].currentTimepoint;for(k=0;k<this.yDim;k+=1){for(l=0;l<this.xDim;l+=1){h=0;g=255;d=this.screenVolumes[b].alpha;if(f){if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){h=this.screenVolumes[b].volume.getVoxelAtCoordinate((l-j.x)*m.xSize,(j.y-k)*m.ySize,(j.z-i)*m.zSize,c,false)}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){h=this.screenVolumes[b].volume.getVoxelAtCoordinate((l-j.x)*m.xSize,(j.y-i)*m.ySize,(j.z-k)*m.zSize,c,false)}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){h=this.screenVolumes[b].volume.getVoxelAtCoordinate((i-j.x)*m.xSize,(j.y-l)*m.ySize,(j.z-k)*m.zSize,c,false)}}}}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){h=this.screenVolumes[b].volume.getVoxelAtMM(l*m.xSize,k*m.ySize,i*m.zSize,c,false)}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){h=this.screenVolumes[b].volume.getVoxelAtMM(l*m.xSize,i*m.ySize,k*m.zSize,c,false)}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){h=this.screenVolumes[b].volume.getVoxelAtMM(i*m.xSize,l*m.ySize,k*m.zSize,c,false)}}}}e=((k*this.xDim)+l)*4;this.imageData[b][e]=h;if((!this.screenVolumes[b].negative&&(h<=this.screenVolumes[b].screenMin))||(this.screenVolumes[b].negative&&(h>=this.screenVolumes[b].screenMin))||isNaN(h)){h=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN;g=this.screenVolumes[b].isOverlay()?0:255}else{if((!this.screenVolumes[b].negative&&(h>=this.screenVolumes[b].screenMax))||(this.screenVolumes[b].negative&&(h<=this.screenVolumes[b].screenMax))){h=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX}else{h=papayaRoundFast(((h-this.screenVolumes[b].screenMin)*this.screenVolumes[b].screenRatio)+0.5)}}if((g>0)||(b===0)){this.imageDataDraw.data[e]=(this.imageDataDraw.data[e]*(1-d)+this.screenVolumes[b].colorTable.lookupRed(h)*d);this.imageDataDraw.data[e+1]=(this.imageDataDraw.data[e+1]*(1-d)+this.screenVolumes[b].colorTable.lookupGreen(h)*d);this.imageDataDraw.data[e+2]=(this.imageDataDraw.data[e+2]*(1-d)+this.screenVolumes[b].colorTable.lookupBlue(h)*d);this.imageDataDraw.data[e+3]=g}}}}this.contextMain.putImageData(this.imageDataDraw,0,0)}};papaya.viewer.ScreenSlice.prototype.repaint=function(g,a,e){var b,i,j,h,f,d,c;g=Math.round(g);this.currentSlice=g;this.contextMain.clearRect(0,0,this.canvasMain.width,this.canvasMain.height);if(this.imageData.length===this.screenVolumes.length){for(b=0;b<this.screenVolumes.length;b+=1){for(i=0;i<this.yDim;i+=1){for(j=0;j<this.xDim;j+=1){h=0;f=255;c=this.screenVolumes[b].alpha;d=((i*this.xDim)+j)*4;h=this.imageData[b][d];if((!this.screenVolumes[b].negative&&(h<=this.screenVolumes[b].screenMin))||(this.screenVolumes[b].negative&&(h>=this.screenVolumes[b].screenMin))||isNaN(h)){h=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN;f=this.screenVolumes[b].isOverlay()?0:255}else{if((!this.screenVolumes[b].negative&&(h>=this.screenVolumes[b].screenMax))||(this.screenVolumes[b].negative&&(h<=this.screenVolumes[b].screenMax))){h=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX}else{h=papayaRoundFast(((h-this.screenVolumes[b].screenMin)*this.screenVolumes[b].screenRatio)+0.5)}}if((f>0)||(b===0)){this.imageDataDraw.data[d]=(this.imageDataDraw.data[d]*(1-c)+this.screenVolumes[b].colorTable.lookupRed(h)*c);this.imageDataDraw.data[d+1]=(this.imageDataDraw.data[d+1]*(1-c)+this.screenVolumes[b].colorTable.lookupGreen(h)*c);this.imageDataDraw.data[d+2]=(this.imageDataDraw.data[d+2]*(1-c)+this.screenVolumes[b].colorTable.lookupBlue(h)*c);this.imageDataDraw.data[d+3]=f}}}this.contextMain.putImageData(this.imageDataDraw,0,0)}}else{this.updateSlice(g,a,e)}};papaya.viewer.ScreenSlice.prototype.getRealWidth=function(){return this.xDim*this.xSize};papaya.viewer.ScreenSlice.prototype.getRealHeight=function(){return this.yDim*this.ySize};papaya.viewer.ScreenSlice.prototype.getXYratio=function(){return this.xSize/this.ySize};papaya.viewer.ScreenSlice.prototype.getYXratio=function(){return this.ySize/this.xSize};papaya.viewer.ScreenSlice.prototype.getXSize=function(){return this.xSize};papaya.viewer.ScreenSlice.prototype.getYSize=function(){return this.ySize};papaya.viewer.ScreenSlice.prototype.getXDim=function(){return this.xDim};papaya.viewer.ScreenSlice.prototype.getYDim=function(){return this.yDim};papaya.viewer.ScreenSlice.prototype.updateZoomTransform=function(c,i,b,h,a,d){var f,j,g,e;i=(i+0.5)*(c-1)*-1;b=(b+0.5)*(c-1)*-1;h=h*(c-1);a=a*(c-1);f=i+h;g=-1*(c-1)*this.xDim;if(f>0){f=0}else{if(f<g){f=g}}j=b+a;e=-1*(c-1)*this.yDim;if(j>0){j=0}else{if(j<e){j=e}}if(c>1){if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){d.panAmountX=(Math.round((f-i)/(c-1)));d.panAmountY=(Math.round((j-b)/(c-1)))}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){d.panAmountX=(Math.round((f-i)/(c-1)));d.panAmountZ=(Math.round((j-b)/(c-1)))}else{if(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){d.panAmountY=(Math.round((f-i)/(c-1)));d.panAmountZ=(Math.round((j-b)/(c-1)))}}}}this.zoomTransform[0][0]=c;this.zoomTransform[0][1]=0;this.zoomTransform[0][2]=f;this.zoomTransform[1][0]=0;this.zoomTransform[1][1]=c;this.zoomTransform[1][2]=j;this.updateFinalTransform()};papaya.viewer.ScreenSlice.prototype.updateFinalTransform=function(){var b,a;for(b=0;b<3;b+=1){for(a=0;a<3;a+=1){this.finalTransform[b][a]=(this.screenTransform[b][0]*this.zoomTransform[0][a])+(this.screenTransform[b][1]*this.zoomTransform[1][a])+(this.screenTransform[b][2]*this.zoomTransform[2][a])}}};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};papaya.viewer.ScreenVolume=papaya.viewer.ScreenVolume||function(a,f,d,b,c){this.volume=a;this.lutName=d;this.colorTable=new papaya.viewer.ColorTable(this.lutName,b,true);this.screenMin=this.volume.header.imageRange.displayMin;this.screenMax=this.volume.header.imageRange.displayMax;this.imageMin=this.volume.header.imageRange.imageMin;this.imageMax=this.volume.header.imageRange.imageMax;this.alpha=1;this.currentTimepoint=0;var e=f[this.volume.fileName];if(e){if((e.min!==undefined)&&(e.max!==undefined)){if(c){this.screenMin=-1*Math.abs(e.min);this.screenMax=-1*Math.abs(e.max)}else{this.screenMin=e.min;this.screenMax=e.max}}else{this.findDisplayRange(c,e.symmetric)}if(c){if(e.negative_lut!==undefined){this.lutName=e.negative_lut;this.colorTable=new papaya.viewer.ColorTable(this.lutName,b,true)}}else{if(e.lut!==undefined){this.lutName=e.lut;this.colorTable=new papaya.viewer.ColorTable(this.lutName,b,true)}}if((e.alpha!==undefined)&&!b){this.alpha=e.alpha}}else{this.findDisplayRange(c,false)}this.negative=(this.screenMax<this.screenMin);this.updateScreenRange()};papaya.viewer.ScreenVolume.prototype.setScreenRange=function(b,a){this.screenMin=b;this.screenMax=a;this.updateScreenRange()};papaya.viewer.ScreenVolume.prototype.updateScreenRange=function(){this.screenRatio=(papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX/(this.screenMax-this.screenMin))};papaya.viewer.ScreenVolume.prototype.isOverlay=function(){return !this.colorTable.isBaseImage};papaya.viewer.ScreenVolume.prototype.findImageRange=function(){var c,b,e,a,j,d,g,h,i,f;c=(this.volume.header.imageRange.imageMin!==this.volume.header.imageRange.imageMax);if(!c){console.log("scanning image range of "+this.volume.fileName+"...");b=Number.MAX_VALUE;e=Number.MIN_VALUE;a=this.volume.header.imageDimensions.xDim;j=this.volume.header.imageDimensions.yDim;d=this.volume.header.imageDimensions.zDim;for(g=0;g<d;g+=1){for(h=0;h<j;h+=1){for(i=0;i<a;i+=1){f=this.volume.getVoxelAtIndex(i,h,g,0,true);if(f>e){e=f}if(f<b){b=f}}}}this.volume.header.imageRange.imageMin=this.imageMin=b;this.volume.header.imageRange.imageMax=this.imageMax=e}};papaya.viewer.ScreenVolume.prototype.findDisplayRange=function(e,f){var c,d,a,b;c=(this.volume.header.imageRange.imageMin!==this.volume.header.imageRange.imageMax);d=this.screenMin;a=this.screenMax;if(e){if(Math.abs(d)>Math.abs(a)){b=a;a=d;d=b}}if(this.isOverlay()){if((d===a)||((d<0)&&(a>0))||((d>0)&&(a<0))||(e&&((d>0)||(a>0)))||f){this.findImageRange();if(e){if(f||(this.imageMin===0)){d=-1*(this.imageMax-(this.imageMax*0.75));a=-1*(this.imageMax-(this.imageMax*0.25))}else{d=this.imageMin-(this.imageMin*0.75);a=this.imageMin-(this.imageMin*0.25)}}else{d=this.imageMax-(this.imageMax*0.75);a=this.imageMax-(this.imageMax*0.25)}}if(!((d<1)&&(d>-1)&&(a<1)&&(a>-1))){d=Math.round(d);a=Math.round(a)}}else{if(!((d<1)&&(d>-1)&&(a<1)&&(a>-1))){d=Math.round(d);a=Math.round(a)}if((d===0)&&(a===0)){this.findImageRange();d=this.imageMin;a=this.imageMax}if(a<=d){this.findImageRange();d=this.imageMin;a=this.imageMax}if(c&&(d<this.imageMin)){this.findImageRange();d=this.imageMin}if(c&&(a>this.imageMax)){this.findImageRange();a=this.imageMax}}this.screenMin=d;this.screenMax=a};papaya.viewer.ScreenVolume.prototype.isUsingColorTable=function(a){return(this.lutName===a)};papaya.viewer.ScreenVolume.prototype.changeColorTable=function(b,a){this.colorTable=new papaya.viewer.ColorTable(a,!this.isOverlay(),true);this.lutName=a;b.drawViewer(true)};papaya.viewer.ScreenVolume.prototype.getRange=function(){var a=new Array(2);a[0]=((this.colorTable.minLUT/(255/(this.screenMax-this.screenMin)))+this.screenMin);a[1]=((this.colorTable.maxLUT/(255/(this.screenMax-this.screenMin)))+this.screenMin);return a};papaya.viewer.ScreenVolume.prototype.incrementTimepoint=function(){var a=this.volume.numTimepoints;this.currentTimepoint+=1;if(this.currentTimepoint>=a){this.currentTimepoint=a-1}};papaya.viewer.ScreenVolume.prototype.decrementTimepoint=function(){this.currentTimepoint-=1;if(this.currentTimepoint<0){this.currentTimepoint=0}};papaya.viewer.ScreenVolume.prototype.setTimepoint=function(a){if(a<0){this.currentTimepoint=0}else{if(a>=this.volume.numTimepoints){this.currentTimepoint=(this.volume.numTimepoints-1)}else{this.currentTimepoint=a}}};papaya.viewer.ScreenVolume.prototype.updateMinLUT=function(a){this.colorTable.updateMinLUT(a)};papaya.viewer.ScreenVolume.prototype.updateMaxLUT=function(a){this.colorTable.updateMaxLUT(a)};papaya.viewer.ScreenVolume.prototype.updateLUT=function(b,a){this.colorTable.updateLUT(b,a)};papaya.viewer.ScreenVolume.prototype.resetDynamicRange=function(){this.colorTable.minLUT=0;this.colorTable.maxLUT=papaya.viewer.ColorTable.LUT_MAX;this.updateLUT(this.colorTable.minLUT,this.colorTable.maxLUT);this.colorTable.updateColorBar()};papaya.viewer.ScreenVolume.prototype.getCurrentTime=function(){return(this.currentTimepoint*(this.volume.header.voxelDimensions.timeSize*this.volume.header.voxelDimensions.getTemporalUnitMultiplier()))};papaya.viewer.ScreenVolume.prototype.setCurrentTime=function(b){var a=(this.volume.header.voxelDimensions.timeSize*this.volume.header.voxelDimensions.getTemporalUnitMultiplier());if(a===0){this.setTimepoint(0)}else{this.setTimepoint(parseInt(Math.round(b/a),10))}};"use strict";var papaya=papaya||{};papaya.viewer=papaya.viewer||{};var PAPAYA_VERSION_ID=PAPAYA_VERSION_ID||"0.0";var PAPAYA_BUILD_NUM=PAPAYA_BUILD_NUM||"0";papaya.viewer.Viewer=papaya.viewer.Viewer||function(b,c,a,d){this.container=b;this.canvas=document.createElement("canvas");this.canvas.width=c;this.canvas.height=a;this.context=this.canvas.getContext("2d");this.canvas.style.padding=0;this.canvas.style.margin=0;this.canvas.style.border="none";this.atlas=null;this.initialized=false;this.pageLoaded=false;this.loadingVolume=null;this.volume=new papaya.volume.Volume(this.container.display,this);this.screenVolumes=[];this.currentScreenVolume=null;this.axialSlice=null;this.coronalSlice=null;this.sagittalSlice=null;this.selectedSlice=null;this.mainImage=null;this.lowerImageBot=null;this.lowerImageTop=null;this.viewerDim=0;this.worldSpace=false;this.currentCoord=new papaya.core.Coordinate(0,0,0);this.longestDim=0;this.longestDimSize=0;this.draggingSliceDir=0;this.isDragging=false;this.isWindowControl=false;this.isZoomMode=false;this.isPanning=false;this.zoomFactor=papaya.viewer.Viewer.ZOOM_FACTOR_MIN;this.zoomFactorPrevious=papaya.viewer.Viewer.ZOOM_FACTOR_MIN;this.zoomLocX=0;this.zoomLocY=0;this.zoomLocZ=0;this.panLocX=0;this.panLocY=0;this.panLocZ=0;this.panAmountX=0;this.panAmountY=0;this.panAmountZ=0;this.keyPressIgnored=false;this.previousMousePosition=new papaya.core.Point();this.isControlKeyDown=false;this.isAltKeyDown=false;this.isShiftKeyDown=false;this.toggleMainCrosshairs=true;this.sliceSliderControl=null;this.bgColor=null;this.listenerMouseMove=papaya.utilities.ObjectUtils.bind(this,this.mouseMoveEvent);this.listenerMouseDown=papaya.utilities.ObjectUtils.bind(this,this.mouseDownEvent);this.listenerMouseOut=papaya.utilities.ObjectUtils.bind(this,this.mouseOutEvent);this.listenerMouseUp=papaya.utilities.ObjectUtils.bind(this,this.mouseUpEvent);this.listenerMouseDoubleClick=papaya.utilities.ObjectUtils.bind(this,this.mouseDoubleClickEvent);this.listenerKeyDown=papaya.utilities.ObjectUtils.bind(this,this.keyDownEvent);this.listenerKeyUp=papaya.utilities.ObjectUtils.bind(this,this.keyUpEvent);this.listenerTouchMove=papaya.utilities.ObjectUtils.bind(this,this.touchMoveEvent);this.initialCoordinate=null;this.listenerScroll=papaya.utilities.ObjectUtils.bind(this,this.scrolled);this.updateTimer=null;this.updateTimerEvent=null;this.listenerContextMenu=function(f){f.preventDefault();return false};this.drawEmptyViewer();this.processParams(d)};papaya.viewer.Viewer.GAP=PAPAYA_SPACING;papaya.viewer.Viewer.BACKGROUND_COLOR="rgba(0, 0, 0, 255)";papaya.viewer.Viewer.CROSSHAIRS_COLOR="rgba(28, 134, 238, 255)";papaya.viewer.Viewer.KEYCODE_ROTATE_VIEWS=32;papaya.viewer.Viewer.KEYCODE_CENTER=67;papaya.viewer.Viewer.KEYCODE_ORIGIN=79;papaya.viewer.Viewer.KEYCODE_ARROW_UP=38;papaya.viewer.Viewer.KEYCODE_ARROW_DOWN=40;papaya.viewer.Viewer.KEYCODE_ARROW_RIGHT=39;papaya.viewer.Viewer.KEYCODE_ARROW_LEFT=37;papaya.viewer.Viewer.KEYCODE_PAGE_UP=33;papaya.viewer.Viewer.KEYCODE_PAGE_DOWN=34;papaya.viewer.Viewer.KEYCODE_SINGLE_QUOTE=222;papaya.viewer.Viewer.KEYCODE_FORWARD_SLASH=191;papaya.viewer.Viewer.KEYCODE_INCREMENT_MAIN=71;papaya.viewer.Viewer.KEYCODE_DECREMENT_MAIN=86;papaya.viewer.Viewer.KEYCODE_TOGGLE_CROSSHAIRS=65;papaya.viewer.Viewer.KEYCODE_SERIES_BACK=188;papaya.viewer.Viewer.KEYCODE_SERIES_FORWARD=190;papaya.viewer.Viewer.MAX_OVERLAYS=8;papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR="S";papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR="I";papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR="A";papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR="P";papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT="L";papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT="R";papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE=16;papaya.viewer.Viewer.ORIENTATION_CERTAINTY_UNKNOWN_COLOR="red";papaya.viewer.Viewer.ORIENTATION_CERTAINTY_LOW_COLOR="yellow";papaya.viewer.Viewer.ORIENTATION_CERTAINTY_HIGH_COLOR="white";papaya.viewer.Viewer.UPDATE_TIMER_INTERVAL=250;papaya.viewer.Viewer.ZOOM_FACTOR_MAX=10;papaya.viewer.Viewer.ZOOM_FACTOR_MIN=1;papaya.viewer.Viewer.MOUSE_SCROLL_THRESHLD=0.25;papaya.viewer.Viewer.TITLE_MAX_LENGTH=30;papaya.viewer.Viewer.validDimBounds=function(a,b){return(a<b)?a:b-1};papaya.viewer.Viewer.getKeyCode=function(a){return(a.keyCode||a.charCode)};papaya.viewer.Viewer.isControlKey=function(a){var b=papaya.viewer.Viewer.getKeyCode(a);if((papaya.utilities.PlatformUtils.os==="MacOS")&&((b===91)||(b===93)||(b===224))){return true}return((papaya.utilities.PlatformUtils.os!=="MacOS")&&(b===17))};papaya.viewer.Viewer.isAltKey=function(a){var b=papaya.viewer.Viewer.getKeyCode(a);return(b===18)};papaya.viewer.Viewer.isShiftKey=function(a){var b=!!a.shiftKey;if(!b&&window.event){b=!!window.event.shiftKey}return b};papaya.viewer.Viewer.getOffsetRect=function(d){var g=d.getBoundingClientRect();var h=document.body;var b=document.documentElement;var a=window.pageYOffset||b.scrollTop;var e=window.pageXOffset||b.scrollLeft;var f=b.clientTop||h.clientTop||0;var i=b.clientLeft||h.clientLeft||0;var j=g.top+a-f;var c=g.left+e-i;return{top:Math.round(j),left:Math.round(c)}};papaya.viewer.Viewer.prototype.loadImage=function(b,a,c){if(this.screenVolumes.length===0){this.loadBaseImage(b,a,c)}else{this.loadOverlay(b,a,c)}};papaya.viewer.Viewer.prototype.showDialog=function(g,f,b,h,a){var e,c=-1;for(e=0;e<papayaContainers.length;e+=1){if(papayaContainers[e]===this.container){c=e;break}}var d=new papaya.ui.Dialog(this.container,g,f,b,h,a,c);d.showDialog()};papaya.viewer.Viewer.prototype.loadBaseImage=function(c,b,e){var d,a=this.container.findLoadableImage(c,b,e);this.volume=new papaya.volume.Volume(this.container.display,this);if(e){d=a.encode;if(!(d instanceof Array)){d=[];d[0]=a.encode}this.volume.readEncodedData(d,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else{if((a!==null)&&(a.encode!==undefined)){d=a.encode;if(!(d instanceof Array)){d=[];d[0]=a.encode}this.volume.readEncodedData(d,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else{if(b){this.volume.readURLs(c,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else{if((a!==null)&&(a.url!==undefined)){this.volume.readURLs([a.url],papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else{this.volume.readFiles(c,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}}}}};papaya.viewer.Viewer.prototype.loadOverlay=function(c,b,e){var d,a=this.container.findLoadableImage(c);this.loadingVolume=new papaya.volume.Volume(this.container.display,this);if(this.screenVolumes.length>papaya.viewer.Viewer.MAX_OVERLAYS){this.loadingVolume.error=new Error("Maximum number of overlays ("+papaya.viewer.Viewer.MAX_OVERLAYS+") has been reached!");this.initializeOverlay()}else{if(e){d=a.encode;if(!(d instanceof Array)){d=[];d[0]=a.encode}this.loadingVolume.readEncodedData(d,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))}else{if((a!==null)&&(a.encode!==undefined)){d=a.encode;if(!(d instanceof Array)){d=[];d[0]=a.encode}this.loadingVolume.readEncodedData(d,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))}else{if(b){this.loadingVolume.readURLs(c,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))}else{if((a!==null)&&(a.url!==undefined)){this.loadingVolume.readURLs([a.url],papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))}else{this.loadingVolume.readFiles(c,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))}}}}}};papaya.viewer.Viewer.prototype.atlasLoaded=function(){this.finishedLoading()};papaya.viewer.Viewer.prototype.initializeViewer=function(){var a,b;b=this;if(this.volume.hasError()){a=this.volume.error.message;this.resetViewer();this.container.clearParams();this.container.display.drawError(a)}else{this.screenVolumes[0]=new papaya.viewer.ScreenVolume(this.volume,this.container.params,papaya.viewer.ColorTable.DEFAULT_COLOR_TABLE.name,true);this.setCurrentScreenVol(0);this.axialSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_AXIAL,this.volume.getXDim(),this.volume.getYDim(),this.volume.getXSize(),this.volume.getYSize(),this.screenVolumes);this.coronalSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_CORONAL,this.volume.getXDim(),this.volume.getZDim(),this.volume.getXSize(),this.volume.getZSize(),this.screenVolumes);this.sagittalSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL,this.volume.getYDim(),this.volume.getZDim(),this.volume.getYSize(),this.volume.getZSize(),this.screenVolumes);if((this.container.params.mainView===undefined)||(this.container.params.mainView.toLowerCase()==="axial")){this.mainImage=this.axialSlice;this.lowerImageTop=this.sagittalSlice;this.lowerImageBot=this.coronalSlice}else{if(this.container.params.mainView.toLowerCase()==="coronal"){this.mainImage=this.coronalSlice;this.lowerImageTop=this.axialSlice;this.lowerImageBot=this.sagittalSlice}else{if(this.container.params.mainView.toLowerCase()==="sagittal"){this.mainImage=this.sagittalSlice;this.lowerImageTop=this.coronalSlice;this.lowerImageBot=this.axialSlice}else{this.mainImage=this.axialSlice;this.lowerImageTop=this.sagittalSlice;this.lowerImageBot=this.coronalSlice}}}this.canvas.addEventListener("mousemove",this.listenerMouseMove,false);this.canvas.addEventListener("mousedown",this.listenerMouseDown,false);this.canvas.addEventListener("mouseout",this.listenerMouseOut,false);this.canvas.addEventListener("mouseup",this.listenerMouseUp,false);document.addEventListener("keydown",this.listenerKeyDown,true);document.addEventListener("keyup",this.listenerKeyUp,true);this.canvas.addEventListener("contextmenu",this.listenerContextMenu,false);this.canvas.addEventListener("touchmove",this.listenerTouchMove,false);this.canvas.addEventListener("touchstart",this.listenerMouseDown,false);this.canvas.addEventListener("touchend",this.listenerMouseUp,false);this.canvas.addEventListener("dblclick",this.listenerMouseDoubleClick,false);if(!this.container.orthogonal){this.sliceSliderControl=$(this.container.sliderControlHtml.find("input"));this.sliceSliderControl.on("input change",function(){b.sliceSliderControlChanged()})}this.addScroll();this.setLongestDim(this.volume);this.calculateScreenSliceTransforms(this);this.currentCoord.setCoordinate(papayaFloorFast(this.volume.getXDim()/2),papayaFloorFast(this.volume.getYDim()/2),papayaFloorFast(this.volume.getZDim()/2));this.updateOffsetRect();this.bgColor=$("body").css("background-color");if((this.bgColor==="rgba(0, 0, 0, 0)")||((this.bgColor==="transparent"))){this.bgColor="rgba(255, 255, 255, 255)"}this.context.fillStyle=this.bgColor;this.context.fillRect(0,0,this.canvas.offsetWidth,this.canvas.offsetHeight);this.initialized=true;this.drawViewer();this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.updateWindowTitle();if(!this.container.loadNext()){if(this.hasDefinedAtlas()){this.loadAtlas()}else{this.finishedLoading()}}}};papaya.viewer.Viewer.prototype.finishedLoading=function(){if(!this.pageLoaded){this.goToInitialCoordinate();this.updateSliceSliderControl();this.pageLoaded=true}};papaya.viewer.Viewer.prototype.addScroll=function(){if(!this.container.nestedViewer){if(window.addEventListener){window.addEventListener("DOMMouseScroll",this.listenerScroll,false)}window.onmousewheel=document.onmousewheel=this.listenerScroll}};papaya.viewer.Viewer.prototype.removeScroll=function(){window.removeEventListener("DOMMouseScroll",this.listenerScroll,false);window.onmousewheel=document.onmousewheel=null};papaya.viewer.Viewer.prototype.updateOffsetRect=function(){this.canvasRect=papaya.viewer.Viewer.getOffsetRect(this.canvas)};papaya.viewer.Viewer.prototype.initializeOverlay=function(){var b,a;if(this.loadingVolume.hasError()){this.container.display.drawError(this.loadingVolume.error.message);this.container.clearParams();this.loadingVolume=null}else{b=this.container.params[this.loadingVolume.fileName];a=(b&&b.parametric);this.screenVolumes[this.screenVolumes.length]=new papaya.viewer.ScreenVolume(this.loadingVolume,this.container.params,(a?papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES[0].name:this.getNextColorTable()),false);this.setCurrentScreenVol(this.screenVolumes.length-1);this.drawViewer(true);this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();if(a){this.screenVolumes[this.screenVolumes.length-1].findImageRange();if(this.screenVolumes[this.screenVolumes.length-1].volume.header.imageRange.imageMin<0){this.screenVolumes[this.screenVolumes.length]=new papaya.viewer.ScreenVolume(this.loadingVolume,this.container.params,papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES[1].name,false,true);this.setCurrentScreenVol(this.screenVolumes.length-1);this.drawViewer(true);this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons()}}this.updateWindowTitle();this.loadingVolume=null;if(!this.container.loadNext()){if(this.hasDefinedAtlas()){this.loadAtlas()}else{this.finishedLoading()}}}};papaya.viewer.Viewer.prototype.closeOverlay=function(a){this.screenVolumes.splice(a,1);this.setCurrentScreenVol(this.screenVolumes.length-1);this.drawViewer(true);this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.updateWindowTitle()};papaya.viewer.Viewer.prototype.hasDefinedAtlas=function(){var a,b;a=(typeof papaya.data);if(a!=="undefined"){b=(typeof papaya.data.Atlas);if(b!=="undefined"){return true}}return false};papaya.viewer.Viewer.prototype.loadAtlas=function(){if(this.atlas===null){this.atlas=new papaya.viewer.Atlas(papaya.data.Atlas,this.container,papaya.utilities.ObjectUtils.bind(this,papaya.viewer.Viewer.prototype.atlasLoaded))}};papaya.viewer.Viewer.prototype.updatePosition=function(g,f,e,b){var d,c,a;g.updateOffsetRect();f=f-this.canvasRect.left;e=e-this.canvasRect.top;if(this.insideScreenSlice(g.axialSlice,f,e,g.volume.getXDim(),g.volume.getYDim())){if(!this.isDragging||(this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_AXIAL)){d=this.convertScreenToImageCoordinateX(f,g.axialSlice);c=this.convertScreenToImageCoordinateY(e,g.axialSlice);if((d!==g.currentCoord.x)||(c!==g.currentCoord.y)){g.currentCoord.x=d;g.currentCoord.y=c;this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_AXIAL}}}else{if(this.insideScreenSlice(g.coronalSlice,f,e,g.volume.getXDim(),g.volume.getZDim())){if(!this.isDragging||(this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_CORONAL)){d=this.convertScreenToImageCoordinateX(f,g.coronalSlice);c=this.convertScreenToImageCoordinateY(e,g.coronalSlice);if((d!==g.currentCoord.x)||(c!==g.currentCoord.y)){g.currentCoord.x=d;g.currentCoord.z=c;this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_CORONAL}}}else{if(this.insideScreenSlice(g.sagittalSlice,f,e,g.volume.getYDim(),g.volume.getZDim())){if(!this.isDragging||(this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL)){d=this.convertScreenToImageCoordinateX(f,g.sagittalSlice);c=this.convertScreenToImageCoordinateY(e,g.sagittalSlice);if((d!==g.currentCoord.x)||(c!==g.currentCoord.y)){a=d;g.currentCoord.y=a;g.currentCoord.z=c;this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL}}}}}g.drawViewer(false,b)};papaya.viewer.Viewer.prototype.convertScreenToImageCoordinateX=function(b,a){return papaya.viewer.Viewer.validDimBounds(papayaFloorFast((b-a.finalTransform[0][2])/a.finalTransform[0][0]),a.xDim)};papaya.viewer.Viewer.prototype.convertScreenToImageCoordinateY=function(b,a){return papaya.viewer.Viewer.validDimBounds(papayaFloorFast((b-a.finalTransform[1][2])/a.finalTransform[1][1]),a.yDim)};papaya.viewer.Viewer.prototype.updateCursorPosition=function(g,f,d){var c,b,a,e;if(this.container.display){f=f-this.canvasRect.left;d=d-this.canvasRect.top;if(this.insideScreenSlice(g.axialSlice,f,d,g.volume.getXDim(),g.volume.getYDim())){c=this.convertScreenToImageCoordinateX(f,g.axialSlice);b=this.convertScreenToImageCoordinateY(d,g.axialSlice);a=g.axialSlice.currentSlice;e=true}else{if(this.insideScreenSlice(g.coronalSlice,f,d,g.volume.getXDim(),g.volume.getZDim())){c=this.convertScreenToImageCoordinateX(f,g.coronalSlice);a=this.convertScreenToImageCoordinateY(d,g.coronalSlice);b=g.coronalSlice.currentSlice;e=true}else{if(this.insideScreenSlice(g.sagittalSlice,f,d,g.volume.getYDim(),g.volume.getZDim())){b=this.convertScreenToImageCoordinateX(f,g.sagittalSlice);a=this.convertScreenToImageCoordinateY(d,g.sagittalSlice);c=g.sagittalSlice.currentSlice;e=true}}}if(e){this.container.display.drawDisplay(c,b,a)}else{this.container.display.drawEmptyDisplay()}}};papaya.viewer.Viewer.prototype.insideScreenSlice=function(f,d,a,h,c){var e,b,i,g;e=papayaRoundFast(f.screenTransform[0][2]);b=papayaRoundFast(f.screenTransform[0][2]+h*f.screenTransform[0][0]);i=papayaRoundFast(f.screenTransform[1][2]);g=papayaRoundFast(f.screenTransform[1][2]+c*f.screenTransform[1][1]);return((d>=e)&&(d<b)&&(a>=i)&&(a<g))};papaya.viewer.Viewer.prototype.drawEmptyViewer=function(){var a,c,e,b,d;this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#AAAAAA";if(this.container.readyForDnD()){c=18;this.context.font=c+"px Arial";a=this.canvas.height-22;e="Drop here or click the File menu";b=this.context.measureText(e);d=b.width;this.context.fillText(e,(this.canvas.width/2)-(d/2),a)}if(this.canvas.width>900){c=14;this.context.font=c+"px Arial";a=this.canvas.height-20;e="Supported formats: NIFTI, DICOM";this.context.fillText(e,20,a);c=14;this.context.font=c+"px Arial";a=this.canvas.height-20;e="Papaya v"+(PAPAYA_VERSION_ID||"Dev")+" (build "+(PAPAYA_BUILD_NUM!==undefined?PAPAYA_BUILD_NUM:"Dev")+")";b=this.context.measureText(e);d=b.width;this.context.fillText(e,this.canvas.width-d-20,a)}};papaya.viewer.Viewer.prototype.drawViewer=function(c,b){var e,n,j,d,l,h,i,g,k,a,f,m;if(!this.initialized){this.drawEmptyViewer();return}this.context.save();if(b){this.axialSlice.repaint(this.currentCoord.z,c,this.worldSpace);this.coronalSlice.repaint(this.currentCoord.y,c,this.worldSpace);this.sagittalSlice.repaint(this.currentCoord.x,c,this.worldSpace)}else{if(c||(this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_AXIAL)){this.axialSlice.updateSlice(this.currentCoord.z,c,this.worldSpace)}if(c||(this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_CORONAL)){this.coronalSlice.updateSlice(this.currentCoord.y,c,this.worldSpace)}if(c||(this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL)){this.sagittalSlice.updateSlice(this.currentCoord.x,c,this.worldSpace)}}this.context.fillStyle=papaya.viewer.Viewer.BACKGROUND_COLOR;if(this.container.preferences.smoothDisplay==="No"){this.context.imageSmoothingEnabled=false;this.context.webkitImageSmoothingEnabled=false;this.context.mozImageSmoothingEnabled=false;this.context.msImageSmoothingEnabled=false}else{this.context.imageSmoothingEnabled=true;this.context.webkitImageSmoothingEnabled=true;this.context.mozImageSmoothingEnabled=true;this.context.msImageSmoothingEnabled=true}this.context.setTransform(1,0,0,1,0,0);this.context.fillRect(this.mainImage.screenOffsetX,this.mainImage.screenOffsetY,this.mainImage.screenDim,this.mainImage.screenDim);this.context.save();this.context.beginPath();this.context.rect(this.mainImage.screenOffsetX,this.mainImage.screenOffsetY,this.mainImage.screenDim,this.mainImage.screenDim);this.context.clip();this.context.setTransform(this.mainImage.finalTransform[0][0],0,0,this.mainImage.finalTransform[1][1],this.mainImage.finalTransform[0][2],this.mainImage.finalTransform[1][2]);this.context.drawImage(this.mainImage.canvasMain,0,0);this.context.restore();if(this.container.orthogonal){this.context.setTransform(1,0,0,1,0,0);this.context.fillRect(this.lowerImageBot.screenOffsetX,this.lowerImageBot.screenOffsetY,this.lowerImageBot.screenDim,this.lowerImageBot.screenDim);this.context.save();this.context.beginPath();this.context.rect(this.lowerImageBot.screenOffsetX,this.lowerImageBot.screenOffsetY,this.lowerImageBot.screenDim,this.lowerImageBot.screenDim);this.context.clip();this.context.setTransform(this.lowerImageBot.finalTransform[0][0],0,0,this.lowerImageBot.finalTransform[1][1],this.lowerImageBot.finalTransform[0][2],this.lowerImageBot.finalTransform[1][2]);this.context.drawImage(this.lowerImageBot.canvasMain,0,0);this.context.restore();this.context.setTransform(1,0,0,1,0,0);this.context.fillRect(this.lowerImageTop.screenOffsetX,this.lowerImageTop.screenOffsetY,this.lowerImageTop.screenDim,this.lowerImageTop.screenDim);this.context.save();this.context.beginPath();this.context.rect(this.lowerImageTop.screenOffsetX,this.lowerImageTop.screenOffsetY,this.lowerImageTop.screenDim,this.lowerImageTop.screenDim);this.context.clip();this.context.setTransform(this.lowerImageTop.finalTransform[0][0],0,0,this.lowerImageTop.finalTransform[1][1],this.lowerImageTop.finalTransform[0][2],this.lowerImageTop.finalTransform[1][2]);this.context.drawImage(this.lowerImageTop.canvasMain,0,0);this.context.restore()}if(this.container.preferences.showOrientation==="Yes"){this.context.setTransform(1,0,0,1,0,0);this.context.fillStyle=this.getOrientationCertaintyColor();this.context.font=papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+"px Arial";i=this.context.measureText("X");g=i.width;if(this.mainImage===this.axialSlice){k=papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR;a=papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR;f=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT;m=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT}else{if(this.mainImage===this.coronalSlice){k=papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR;a=papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR;f=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT;m=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT}else{if(this.mainImage===this.sagittalSlice){k=papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR;a=papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR;f=papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR;m=papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR}}}e=this.mainImage.screenOffsetX;n=this.mainImage.screenOffsetX+this.mainImage.screenDim;j=Math.round(n/2);d=this.mainImage.screenOffsetY;l=this.mainImage.screenOffsetY+this.mainImage.screenDim;h=Math.round(l/2);this.context.fillText(k,j-(g/2),d+papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE*1.5);this.context.fillText(a,j-(g/2),l-papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE);this.context.fillText(f,e+papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE,h+(papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE*0.5));this.context.fillText(m,n-1.5*papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE,h+(papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE*0.5))}if(this.container.preferences.showCrosshairs!=="None"){this.drawCrosshairs()}if(this.container.display){this.container.display.drawDisplay(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z,this.getCurrentValueAt(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z))}};papaya.viewer.Viewer.prototype.drawCrosshairs=function(){var f,c,e,b,d,a;this.context.setTransform(1,0,0,1,0,0);this.context.strokeStyle=papaya.viewer.Viewer.CROSSHAIRS_COLOR;this.context.lineWidth=1;if((((this.mainImage!==this.axialSlice)&&(this.container.preferences.showCrosshairs!=="Main"))||((this.mainImage===this.axialSlice)&&(this.container.preferences.showCrosshairs!=="Lower")&&this.toggleMainCrosshairs))&&(this.container.orthogonal||(this.axialSlice===this.mainImage))){this.context.save();this.context.beginPath();this.context.rect(this.axialSlice.screenOffsetX,this.axialSlice.screenOffsetY,this.axialSlice.screenDim,this.axialSlice.screenDim);this.context.closePath();this.context.clip();this.context.beginPath();f=(this.axialSlice.finalTransform[0][2]+(this.currentCoord.x+0.5)*this.axialSlice.finalTransform[0][0]);c=(this.axialSlice.finalTransform[1][2]);e=(this.axialSlice.finalTransform[1][2]+this.axialSlice.yDim*this.axialSlice.finalTransform[1][1]);this.context.moveTo(f,c);this.context.lineTo(f,e);b=(this.axialSlice.finalTransform[1][2]+(this.currentCoord.y+0.5)*this.axialSlice.finalTransform[1][1]);d=(this.axialSlice.finalTransform[0][2]);a=(this.axialSlice.finalTransform[0][2]+this.axialSlice.xDim*this.axialSlice.finalTransform[0][0]);this.context.moveTo(d,b);this.context.lineTo(a,b);this.context.closePath();this.context.stroke();this.context.restore()}if((((this.mainImage!==this.coronalSlice)&&(this.container.preferences.showCrosshairs!=="Main"))||((this.mainImage===this.coronalSlice)&&(this.container.preferences.showCrosshairs!=="Lower")&&this.toggleMainCrosshairs))&&(this.container.orthogonal||(this.coronalSlice===this.mainImage))){this.context.save();this.context.beginPath();this.context.rect(this.coronalSlice.screenOffsetX,this.coronalSlice.screenOffsetY,this.coronalSlice.screenDim,this.coronalSlice.screenDim);this.context.closePath();this.context.clip();this.context.beginPath();f=(this.coronalSlice.finalTransform[0][2]+(this.currentCoord.x+0.5)*this.coronalSlice.finalTransform[0][0]);c=(this.coronalSlice.finalTransform[1][2]);e=(this.coronalSlice.finalTransform[1][2]+this.coronalSlice.yDim*this.coronalSlice.finalTransform[1][1]);this.context.moveTo(f,c);this.context.lineTo(f,e);b=(this.coronalSlice.finalTransform[1][2]+(this.currentCoord.z+0.5)*this.coronalSlice.finalTransform[1][1]);d=(this.coronalSlice.finalTransform[0][2]);a=(this.coronalSlice.finalTransform[0][2]+this.coronalSlice.xDim*this.coronalSlice.finalTransform[0][0]);this.context.moveTo(d,b);this.context.lineTo(a,b);this.context.closePath();this.context.stroke();this.context.restore()}if((((this.mainImage!==this.sagittalSlice)&&(this.container.preferences.showCrosshairs!=="Main"))||((this.mainImage===this.sagittalSlice)&&(this.container.preferences.showCrosshairs!=="Lower")&&this.toggleMainCrosshairs))&&(this.container.orthogonal||(this.sagittalSlice===this.mainImage))){this.context.save();this.context.beginPath();this.context.rect(this.sagittalSlice.screenOffsetX,this.sagittalSlice.screenOffsetY,this.sagittalSlice.screenDim,this.sagittalSlice.screenDim);this.context.closePath();this.context.clip();this.context.beginPath();f=(this.sagittalSlice.finalTransform[0][2]+(this.currentCoord.y+0.5)*this.sagittalSlice.finalTransform[0][0]);c=(this.sagittalSlice.finalTransform[1][2]);e=(this.sagittalSlice.finalTransform[1][2]+this.sagittalSlice.yDim*this.sagittalSlice.finalTransform[1][1]);this.context.moveTo(f,c);this.context.lineTo(f,e);b=(this.sagittalSlice.finalTransform[1][2]+(this.currentCoord.z+0.5)*this.sagittalSlice.finalTransform[1][1]);d=(this.sagittalSlice.finalTransform[0][2]);a=(this.sagittalSlice.finalTransform[0][2]+this.sagittalSlice.xDim*this.sagittalSlice.finalTransform[0][0]);this.context.moveTo(d,b);this.context.lineTo(a,b);this.context.closePath();this.context.stroke();this.context.restore()}};papaya.viewer.Viewer.prototype.calculateScreenSliceTransforms=function(){this.viewerDim=this.canvas.height;this.getTransformParameters(this.mainImage,this.viewerDim,false);this.mainImage.screenTransform[0][2]+=this.mainImage.screenOffsetX=0;this.mainImage.screenTransform[1][2]+=this.mainImage.screenOffsetY=0;this.getTransformParameters(this.lowerImageBot,this.viewerDim,true);this.lowerImageBot.screenTransform[0][2]+=this.lowerImageBot.screenOffsetX=(this.viewerDim+(papaya.viewer.Viewer.GAP));this.lowerImageBot.screenTransform[1][2]+=this.lowerImageBot.screenOffsetY=(((this.viewerDim-papaya.viewer.Viewer.GAP)/2)+(papaya.viewer.Viewer.GAP));this.getTransformParameters(this.lowerImageTop,this.viewerDim,true);this.lowerImageTop.screenTransform[0][2]+=this.lowerImageTop.screenOffsetX=(this.viewerDim+(papaya.viewer.Viewer.GAP));this.lowerImageTop.screenTransform[1][2]+=this.lowerImageTop.screenOffsetY=0;this.axialSlice.updateFinalTransform();this.coronalSlice.updateFinalTransform();this.sagittalSlice.updateFinalTransform()};papaya.viewer.Viewer.prototype.getTransformParameters=function(g,a,f){var h,e,d,c,b;h=f?2:1;if(g.getRealWidth()>g.getRealHeight()){e=(((f?a-papaya.viewer.Viewer.GAP:a)/this.longestDim)/h)*(g.getXSize()/this.longestDimSize);d=((((f?a-papaya.viewer.Viewer.GAP:a)/this.longestDim)*g.getYXratio())/h)*(g.getXSize()/this.longestDimSize)}else{e=((((f?a-papaya.viewer.Viewer.GAP:a)/this.longestDim)*g.getXYratio())/h)*(g.getYSize()/this.longestDimSize);d=(((f?a-papaya.viewer.Viewer.GAP:a)/this.longestDim)/h)*(g.getYSize()/this.longestDimSize)}c=(((f?a-papaya.viewer.Viewer.GAP:a)/h)-(g.getXDim()*e))/2;b=(((f?a-papaya.viewer.Viewer.GAP:a)/h)-(g.getYDim()*d))/2;g.screenDim=(f?(a-papaya.viewer.Viewer.GAP)/2:a);g.screenTransform[0][0]=e;g.screenTransform[1][1]=d;g.screenTransform[0][2]=c;g.screenTransform[1][2]=b};papaya.viewer.Viewer.prototype.setLongestDim=function(a){this.longestDim=a.getXDim();this.longestDimSize=a.getXSize();if((a.getYDim()*a.getYSize())>(this.longestDim*this.longestDimSize)){this.longestDim=a.getYDim();this.longestDimSize=a.getYSize()}if((a.getZDim()*a.getZSize())>(this.longestDim*this.longestDimSize)){this.longestDim=a.getZDim();this.longestDimSize=a.getZSize()}};papaya.viewer.Viewer.prototype.keyDownEvent=function(b){var c,a;this.keyPressIgnored=false;if(this.container.toolbar.isShowingMenus()){return}if(((papayaContainers.length>1)||papayaContainers[0].nestedViewer)&&(papaya.Container.papayaLastHoveredViewer!==this)){return}c=papaya.viewer.Viewer.getKeyCode(b);if(papaya.viewer.Viewer.isControlKey(b)){this.isControlKeyDown=true}else{if(papaya.viewer.Viewer.isAltKey(b)){this.isAltKeyDown=true}else{if(papaya.viewer.Viewer.isShiftKey(b)){this.isShiftKeyDown=true}else{if(c===papaya.viewer.Viewer.KEYCODE_ROTATE_VIEWS){this.rotateViews()}else{if(c===papaya.viewer.Viewer.KEYCODE_CENTER){a=new papaya.core.Coordinate(Math.floor(this.volume.header.imageDimensions.xDim/2),Math.floor(this.volume.header.imageDimensions.yDim/2),Math.floor(this.volume.header.imageDimensions.zDim/2));this.gotoCoordinate(a)}else{if(c===papaya.viewer.Viewer.KEYCODE_ORIGIN){this.gotoCoordinate(this.volume.header.origin)}else{if(c===papaya.viewer.Viewer.KEYCODE_ARROW_UP){this.incrementCoronal(false)}else{if(c===papaya.viewer.Viewer.KEYCODE_ARROW_DOWN){this.incrementCoronal(true)}else{if(c===papaya.viewer.Viewer.KEYCODE_ARROW_LEFT){this.incrementSagittal(true)}else{if(c===papaya.viewer.Viewer.KEYCODE_ARROW_RIGHT){this.incrementSagittal(false)}else{if((c===papaya.viewer.Viewer.KEYCODE_PAGE_DOWN)||(c===papaya.viewer.Viewer.KEYCODE_FORWARD_SLASH)){this.incrementAxial(true)}else{if((c===papaya.viewer.Viewer.KEYCODE_PAGE_UP)||(c===papaya.viewer.Viewer.KEYCODE_SINGLE_QUOTE)){this.incrementAxial(false)}else{if(c===papaya.viewer.Viewer.KEYCODE_INCREMENT_MAIN){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.incrementAxial(false)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.incrementCoronal(false)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.incrementSagittal(true)}}}}else{if(c===papaya.viewer.Viewer.KEYCODE_DECREMENT_MAIN){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.incrementAxial(true)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.incrementCoronal(true)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.incrementSagittal(false)}}}}else{if(c===papaya.viewer.Viewer.KEYCODE_TOGGLE_CROSSHAIRS){if((this.container.preferences.showCrosshairs==="All")||(this.container.preferences.showCrosshairs==="Main")){this.toggleMainCrosshairs=!this.toggleMainCrosshairs;this.drawViewer(true)}}else{if(c===papaya.viewer.Viewer.KEYCODE_SERIES_FORWARD){this.incrementSeriesPoint()}else{if(c===papaya.viewer.Viewer.KEYCODE_SERIES_BACK){this.decrementSeriesPoint()}else{this.keyPressIgnored=true}}}}}}}}}}}}}}}}}if(!this.keyPressIgnored){b.handled=true;b.preventDefault()}};papaya.viewer.Viewer.prototype.keyUpEvent=function(a){if((papayaContainers.length>1)&&(papaya.Container.papayaLastHoveredViewer!==this)){return}this.isControlKeyDown=false;this.isAltKeyDown=false;this.isShiftKeyDown=false;if(!this.keyPressIgnored){a.handled=true;a.preventDefault()}};papaya.viewer.Viewer.prototype.rotateViews=function(){var a;a=this.lowerImageBot;this.lowerImageBot=this.lowerImageTop;this.lowerImageTop=this.mainImage;this.mainImage=a;this.calculateScreenSliceTransforms();this.drawViewer();this.updateSliceSliderControl()};papaya.viewer.Viewer.prototype.timepointChanged=function(){this.drawViewer(true);this.updateWindowTitle()};papaya.viewer.Viewer.prototype.resetUpdateTimer=function(a){var b=this;if(this.updateTimer!==null){window.clearTimeout(this.updateTimer);this.updateTimer=null;this.updateTimerEvent=null}if(a!==null){this.updateTimerEvent=a;this.updateTimer=window.setTimeout(papaya.utilities.ObjectUtils.bind(b,function(){b.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(b.updateTimerEvent),papaya.utilities.PlatformUtils.getMousePositionY(b.updateTimerEvent))}),papaya.viewer.Viewer.UPDATE_TIMER_INTERVAL)}};papaya.viewer.Viewer.prototype.mouseDownEvent=function(a){a.stopPropagation();a.preventDefault();if((a.target.nodeName==="IMG")||(a.target.nodeName==="CANVAS")){if(a.handled!==true){this.container.toolbar.closeAllMenus();this.previousMousePosition.x=papaya.utilities.PlatformUtils.getMousePositionX(a);this.previousMousePosition.y=papaya.utilities.PlatformUtils.getMousePositionY(a);this.findClickedSlice(this,this.previousMousePosition.x,this.previousMousePosition.y);if((a.which===3)||this.isControlKeyDown){this.isWindowControl=true;this.container.toolbar.showImageMenu(this.getCurrentScreenVolIndex())}else{if(this.isAltKeyDown&&this.selectedSlice){this.isZoomMode=true;if(this.isZooming()&&this.isShiftKeyDown){this.isPanning=true;this.setStartPanLocation(this.convertScreenToImageCoordinateX(this.previousMousePosition.x,this.selectedSlice),this.convertScreenToImageCoordinateY(this.previousMousePosition.y,this.selectedSlice),this.selectedSlice.sliceDirection)}else{this.setZoomLocation()}}else{this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a),false);this.resetUpdateTimer(a)}}this.isDragging=true;a.handled=true}}};papaya.viewer.Viewer.prototype.mouseUpEvent=function(a){a.stopPropagation();a.preventDefault();if((a.target.nodeName==="IMG")||(a.target.nodeName==="CANVAS")){if(a.handled!==true){if(!this.isWindowControl&&!this.isZoomMode){this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a))}this.zoomFactorPrevious=this.zoomFactor;this.isDragging=false;this.isWindowControl=false;this.isZoomMode=false;this.isPanning=false;this.selectedSlice=null;a.handled=true}}this.updateWindowTitle();this.container.toolbar.closeAllMenus()};papaya.viewer.Viewer.prototype.findClickedSlice=function(c,b,a){b=b-this.canvasRect.left;a=a-this.canvasRect.top;if(this.insideScreenSlice(c.axialSlice,b,a,c.volume.getXDim(),c.volume.getYDim())){this.selectedSlice=this.axialSlice}else{if(this.insideScreenSlice(c.coronalSlice,b,a,c.volume.getXDim(),c.volume.getZDim())){this.selectedSlice=this.coronalSlice}else{if(this.insideScreenSlice(c.sagittalSlice,b,a,c.volume.getYDim(),c.volume.getZDim())){this.selectedSlice=this.sagittalSlice}else{this.selectedSlice=null}}}};papaya.viewer.Viewer.prototype.mouseMoveEvent=function(d){d.preventDefault();var c,a,b;papaya.Container.papayaLastHoveredViewer=this;c=papaya.utilities.PlatformUtils.getMousePositionX(d);a=papaya.utilities.PlatformUtils.getMousePositionY(d);if(this.isDragging){if(this.isWindowControl){this.windowLevelChanged(this.previousMousePosition.x-c,this.previousMousePosition.y-a);this.previousMousePosition.x=c;this.previousMousePosition.y=a}else{if(this.isPanning){this.setCurrentPanLocation(this.convertScreenToImageCoordinateX(c,this.selectedSlice),this.convertScreenToImageCoordinateY(a,this.selectedSlice),this.selectedSlice.sliceDirection)}else{if(this.isZoomMode){b=((this.previousMousePosition.y-a)*0.05);this.setZoomFactor(this.zoomFactorPrevious-b);this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this);this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this);this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this);this.drawViewer(true)}else{this.resetUpdateTimer(null);this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(d),papaya.utilities.PlatformUtils.getMousePositionY(d))}}}}else{this.updateCursorPosition(this,papaya.utilities.PlatformUtils.getMousePositionX(d),papaya.utilities.PlatformUtils.getMousePositionY(d));this.isZoomMode=false}};papaya.viewer.Viewer.prototype.mouseDoubleClickEvent=function(){if(this.isAltKeyDown){this.zoomFactorPrevious=1;this.setZoomFactor(1)}};papaya.viewer.Viewer.prototype.mouseOutEvent=function(){papaya.Container.papayaLastHoveredViewer=null;if(this.container.display){this.container.display.drawEmptyDisplay()}};papaya.viewer.Viewer.prototype.touchMoveEvent=function(a){this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a),true);this.resetUpdateTimer(a);a.preventDefault()};papaya.viewer.Viewer.prototype.windowLevelChanged=function(a,c){var b,d,e,f;b=this.currentScreenVolume.screenMax-this.currentScreenVolume.screenMin;d=b*0.025;if(Math.abs(a)>Math.abs(c)){e=this.currentScreenVolume.screenMin+(d*papaya.utilities.MathUtils.signum(a));f=this.currentScreenVolume.screenMax+(-1*d*papaya.utilities.MathUtils.signum(a));if(f<=e){e=this.currentScreenVolume.screenMin;f=this.currentScreenVolume.screenMin}}else{e=this.currentScreenVolume.screenMin+(d*papaya.utilities.MathUtils.signum(c));f=this.currentScreenVolume.screenMax+(d*papaya.utilities.MathUtils.signum(c))}this.currentScreenVolume.setScreenRange(e,f);this.container.toolbar.updateImageMenuRange(this.getCurrentScreenVolIndex(),parseFloat(e.toPrecision(7)),parseFloat(f.toPrecision(7)));this.drawViewer(true)};papaya.viewer.Viewer.prototype.gotoCoordinate=function(a){this.currentCoord.x=a.x;this.currentCoord.y=a.y;this.currentCoord.z=a.z;this.drawViewer(true);this.updateSliceSliderControl()};papaya.viewer.Viewer.prototype.resizeViewer=function(a){this.canvas.width=a[0];this.canvas.height=a[1];if(this.initialized){this.calculateScreenSliceTransforms();this.canvasRect=this.canvas.getBoundingClientRect();this.drawViewer(true)}};papaya.viewer.Viewer.prototype.getWorldCoordinateAtIndex=function(c,b,a,d){d.setCoordinate((c-this.volume.header.origin.x)*this.volume.header.voxelDimensions.xSize,(this.volume.header.origin.y-b)*this.volume.header.voxelDimensions.ySize,(this.volume.header.origin.z-a)*this.volume.header.voxelDimensions.zSize);return d};papaya.viewer.Viewer.prototype.getIndexCoordinateAtWorld=function(c,b,a,d){d.setCoordinate((c/this.volume.header.voxelDimensions.xSize)+this.volume.header.origin.x,-1*((b/this.volume.header.voxelDimensions.ySize)-this.volume.header.origin.y),-1*((a/this.volume.header.voxelDimensions.zSize)-this.volume.header.origin.z),true);return d};papaya.viewer.Viewer.prototype.getNextColorTable=function(){var a=(this.screenVolumes.length-1)%papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES.length;return papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES[a].name};papaya.viewer.Viewer.prototype.getCurrentValueAt=function(c,b,a){return this.currentScreenVolume.volume.getVoxelAtCoordinate((c-this.volume.header.origin.x)*this.volume.header.voxelDimensions.xSize,(this.volume.header.origin.y-b)*this.volume.header.voxelDimensions.ySize,(this.volume.header.origin.z-a)*this.volume.header.voxelDimensions.zSize,this.currentScreenVolume.currentTimepoint,false)};papaya.viewer.Viewer.prototype.resetViewer=function(){this.initialized=false;this.loadingVolume=null;this.volume=new papaya.volume.Volume(this.container.display,this);this.screenVolumes=[];this.currentScreenVolume=null;this.axialSlice=null;this.coronalSlice=null;this.sagittalSlice=null;this.mainImage=null;this.lowerImageBot=null;this.lowerImageTop=null;this.viewerDim=0;this.currentCoord=new papaya.core.Coordinate(0,0,0);this.longestDim=0;this.longestDimSize=0;this.draggingSliceDir=0;this.isDragging=false;this.isWindowControl=false;this.previousMousePosition=new papaya.core.Point();this.canvas.removeEventListener("mousemove",this.listenerMouseMove,false);this.canvas.removeEventListener("mousedown",this.listenerMouseDown,false);this.canvas.removeEventListener("mouseout",this.listenerMouseOut,false);this.canvas.removeEventListener("mouseup",this.listenerMouseUp,false);document.removeEventListener("keydown",this.listenerKeyDown,true);document.removeEventListener("keyup",this.listenerKeyUp,true);this.canvas.removeEventListener("contextmenu",this.listenerContextMenu,false);this.canvas.removeEventListener("touchmove",this.listenerTouchMove,false);this.canvas.removeEventListener("touchstart",this.listenerMouseDown,false);this.canvas.removeEventListener("touchend",this.listenerMouseUp,false);this.canvas.removeEventListener("dblclick",this.listenerMouseDoubleClick,false);this.removeScroll();this.updateTimer=null;this.updateTimerEvent=null;this.drawEmptyViewer();if(this.container.display){this.container.display.drawEmptyDisplay()}this.updateSliceSliderControl();this.container.toolbar.buildToolbar()};papaya.viewer.Viewer.prototype.getImageDimensionsDescription=function(b){var c,a;c=this.screenVolumes[b].volume.header.orientation.orientation;a=this.screenVolumes[b].volume.header.imageDimensions;return("("+c.charAt(0)+", "+c.charAt(1)+", "+c.charAt(2)+") "+a.cols+" x "+a.rows+" x "+a.slices)};papaya.viewer.Viewer.prototype.getVoxelDimensionsDescription=function(b){var c,a;c=this.screenVolumes[b].volume.header.orientation.orientation;a=this.screenVolumes[b].volume.header.voxelDimensions;return("("+c.charAt(0)+", "+c.charAt(1)+", "+c.charAt(2)+") "+papaya.utilities.StringUtils.formatNumber(a.colSize,true)+" x "+papaya.utilities.StringUtils.formatNumber(a.rowSize,true)+" x "+papaya.utilities.StringUtils.formatNumber(a.sliceSize,true)+" "+a.getSpatialUnitString())};papaya.viewer.Viewer.prototype.getSeriesDimensionsDescription=function(b){var a=this.screenVolumes[b].volume.header.imageDimensions;return(a.timepoints.toString())};papaya.viewer.Viewer.prototype.getSeriesSizeDescription=function(b){var a=this.screenVolumes[b].volume.header.voxelDimensions;return(a.timeSize.toString()+" "+a.getTemporalUnitString())};papaya.viewer.Viewer.prototype.getFilename=function(a){return papaya.utilities.StringUtils.wordwrap(this.screenVolumes[a].volume.fileName,25,"<br />",true)};papaya.viewer.Viewer.prototype.getNiceFilename=function(b){var c,a;c="...";a=this.screenVolumes[b].volume.fileName.replace(".nii","").replace(".gz","");if(a.length>papaya.viewer.Viewer.TITLE_MAX_LENGTH){a=a.substr(0,papaya.viewer.Viewer.TITLE_MAX_LENGTH-c.length)+c}return a};papaya.viewer.Viewer.prototype.getFileLength=function(a){return papaya.utilities.StringUtils.getSizeString(this.screenVolumes[a].volume.fileLength)};papaya.viewer.Viewer.prototype.getByteTypeDescription=function(a){return(this.screenVolumes[a].volume.header.imageType.numBytes+"-Byte "+this.screenVolumes[a].volume.header.imageType.getTypeDescription())};papaya.viewer.Viewer.prototype.getByteOrderDescription=function(a){return this.screenVolumes[a].volume.header.imageType.getOrderDescription()};papaya.viewer.Viewer.prototype.getCompressedDescription=function(a){if(this.screenVolumes[a].volume.header.imageType.compressed){return"Yes"}return"No"};papaya.viewer.Viewer.prototype.getOrientationDescription=function(a){return this.screenVolumes[a].volume.header.orientation.getOrientationDescription()};papaya.viewer.Viewer.prototype.getImageDescription=function(a){return papaya.utilities.StringUtils.wordwrap(this.screenVolumes[a].volume.header.imageDescription.notes,25,"<br />",true)};papaya.viewer.Viewer.prototype.setCurrentScreenVol=function(a){this.currentScreenVolume=this.screenVolumes[a];this.updateWindowTitle()};papaya.viewer.Viewer.prototype.updateWindowTitle=function(){var a;a=this.getNiceFilename(this.getCurrentScreenVolIndex());if(this.currentScreenVolume.volume.numTimepoints>1){a=(a+" ("+(this.currentScreenVolume.currentTimepoint+1)+" of "+this.currentScreenVolume.volume.numTimepoints+")")}if(this.isZooming()){a=(a+" "+this.getZoomString())}this.container.toolbar.updateTitleBar(a)};papaya.viewer.Viewer.prototype.getCurrentScreenVolIndex=function(){var a;for(a=0;a<this.screenVolumes.length;a+=1){if(this.screenVolumes[a]===this.currentScreenVolume){return a}}return -1};papaya.viewer.Viewer.prototype.toggleWorldSpace=function(){this.worldSpace=!this.worldSpace;this.reconcileOverlaySeriesPoint(this.currentScreenVolume)};papaya.viewer.Viewer.prototype.isSelected=function(a){return(this.isSelectable()&&(a===this.getCurrentScreenVolIndex()))};papaya.viewer.Viewer.prototype.isSelectable=function(){return(this.screenVolumes.length>1)};papaya.viewer.Viewer.prototype.processParams=function(a){if(a.worldSpace){this.worldSpace=true}if(a.showOrientation!==undefined){this.container.preferences.showOrientation=(a.showOrientation?"Yes":"No")}if(a.coordinate){this.initialCoordinate=a.coordinate}if(a.smoothDisplay!==undefined){this.container.preferences.smoothDisplay=(a.smoothDisplay?"Yes":"No")}};papaya.viewer.Viewer.prototype.goToInitialCoordinate=function(){var a=new papaya.core.Coordinate();if(this.initialCoordinate===null){a.setCoordinate(papayaFloorFast(this.volume.header.imageDimensions.xDim/2),papayaFloorFast(this.volume.header.imageDimensions.yDim/2),papayaFloorFast(this.volume.header.imageDimensions.zDim/2),true)}else{if(this.worldSpace){this.getIndexCoordinateAtWorld(this.initialCoordinate[0],this.initialCoordinate[1],this.initialCoordinate[2],a)}else{a.setCoordinate(this.initialCoordinate[0],this.initialCoordinate[1],this.initialCoordinate[2],true)}this.initialCoordinate=null}this.gotoCoordinate(a);if(this.container.display){this.container.display.drawDisplay(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z,this.getCurrentValueAt(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z))}};papaya.viewer.Viewer.prototype.getOrientationCertaintyColor=function(){var a=this.screenVolumes[0].volume.header.orientationCertainty;if(a===papaya.volume.Header.ORIENTATION_CERTAINTY_LOW){return papaya.viewer.Viewer.ORIENTATION_CERTAINTY_LOW_COLOR}if(a===papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH){return papaya.viewer.Viewer.ORIENTATION_CERTAINTY_HIGH_COLOR}return papaya.viewer.Viewer.ORIENTATION_CERTAINTY_UNKNOWN_COLOR};papaya.viewer.Viewer.prototype.isUsingAtlas=function(a){return(a===this.atlas.currentAtlas)};papaya.viewer.Viewer.prototype.scrolled=function(b){var a;if(!this.nestedViewer){b=b||window.event;if(b.preventDefault){b.preventDefault()}b.returnValue=false;a=papaya.utilities.PlatformUtils.getScrollSign(b);if(this.container.preferences.scrollBehavior==="Increment Slice"){if(a<0){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.incrementAxial(false)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.incrementCoronal(false)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.incrementSagittal(false)}}}this.gotoCoordinate(this.currentCoord)}else{if(a>0){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.incrementAxial(true)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.incrementCoronal(true)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.incrementSagittal(true)}}}this.gotoCoordinate(this.currentCoord)}}}else{if(a!==0){this.isZoomMode=true;if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.setZoomLocation(this.currentCoord.x,this.currentCoord.y,this.mainImage.sliceDirection)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.setZoomLocation(this.currentCoord.x,this.currentCoord.z,this.mainImage.sliceDirection)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.setZoomLocation(this.currentCoord.y,this.currentCoord.z,this.mainImage.sliceDirection)}}}this.setZoomFactor(this.zoomFactorPrevious+(a*0.1*this.zoomFactorPrevious));this.zoomFactorPrevious=this.zoomFactor}}}};papaya.viewer.Viewer.prototype.incrementAxial=function(b){var a=this.volume.header.imageDimensions.zDim;if(b){this.currentCoord.z+=1;if(this.currentCoord.z>=a){this.currentCoord.z=a-1}}else{this.currentCoord.z-=1;if(this.currentCoord.z<0){this.currentCoord.z=0}}this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.incrementCoronal=function(b){var a=this.volume.header.imageDimensions.yDim;if(b){this.currentCoord.y+=1;if(this.currentCoord.y>=a){this.currentCoord.y=a-1}}else{this.currentCoord.y-=1;if(this.currentCoord.y<0){this.currentCoord.y=0}}this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.incrementSagittal=function(b){var a=this.volume.header.imageDimensions.xDim;if(b){this.currentCoord.x-=1;if(this.currentCoord.x<0){this.currentCoord.x=0}}else{this.currentCoord.x+=1;if(this.currentCoord.x>=a){this.currentCoord.x=a-1}}this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.setZoomFactor=function(a){if(a>papaya.viewer.Viewer.ZOOM_FACTOR_MAX){a=papaya.viewer.Viewer.ZOOM_FACTOR_MAX}else{if(a<papaya.viewer.Viewer.ZOOM_FACTOR_MIN){a=papaya.viewer.Viewer.ZOOM_FACTOR_MIN}}this.zoomFactor=a;if(this.zoomFactor===1){this.panAmountX=this.panAmountY=this.panAmountZ=0}this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this);this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this);this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this);this.drawViewer(false,true);this.updateWindowTitle()};papaya.viewer.Viewer.prototype.getZoomString=function(){return(parseInt(this.zoomFactor*100,10)+"%")};papaya.viewer.Viewer.prototype.isZooming=function(){return(this.zoomFactor>1)};papaya.viewer.Viewer.prototype.setZoomLocation=function(){if(this.zoomFactor===1){this.zoomLocX=this.currentCoord.x;this.zoomLocY=this.currentCoord.y;this.zoomLocZ=this.currentCoord.z;this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this);this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this);this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this);this.drawViewer(false,true)}};papaya.viewer.Viewer.prototype.setStartPanLocation=function(d,b,c){var a;if(this.zoomFactor>1){if(c===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.panLocX=d;this.panLocY=b;this.panLocZ=this.axialSlice.currentSlice}else{if(c===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.panLocX=d;this.panLocY=this.coronalSlice.currentSlice;this.panLocZ=b}else{if(c===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.panLocX=this.sagittalSlice.currentSlice;a=d;this.panLocY=a;this.panLocZ=b}}}}};papaya.viewer.Viewer.prototype.setCurrentPanLocation=function(c,a,b){if(this.zoomFactor>1){if(b===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.panAmountX+=(c-this.panLocX);this.panAmountY+=(a-this.panLocY);this.panAmountZ=0}else{if(b===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.panAmountX+=(c-this.panLocX);this.panAmountY=0;this.panAmountZ+=(a-this.panLocZ)}else{if(b===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.panAmountX=0;this.panAmountY+=(c-this.panLocY);this.panAmountZ+=(a-this.panLocZ)}}}this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this);this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this);this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this);this.drawViewer(false,true)}};papaya.viewer.Viewer.prototype.isWorldMode=function(){return this.worldSpace};papaya.viewer.Viewer.prototype.isCollapsable=function(){return this.container.collapsable};papaya.viewer.Viewer.prototype.sliceSliderControlChanged=function(){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.currentCoord.z=parseInt(this.sliceSliderControl.val(),10)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.currentCoord.y=parseInt(this.sliceSliderControl.val(),10)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.currentCoord.x=parseInt(this.sliceSliderControl.val(),10)}}}this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.updateSliceSliderControl=function(){if(this.sliceSliderControl){if(this.initialized){this.sliceSliderControl.prop("disabled",false);this.sliceSliderControl.prop("min","0");this.sliceSliderControl.prop("step","1");if(this.sliceSliderControl){if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL){this.sliceSliderControl.prop("max",(this.volume.header.imageDimensions.zDim-1).toString());this.sliceSliderControl.val(this.currentCoord.z)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL){this.sliceSliderControl.prop("max",(this.volume.header.imageDimensions.yDim-1).toString());this.sliceSliderControl.val(this.currentCoord.y)}else{if(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL){this.sliceSliderControl.prop("max",(this.volume.header.imageDimensions.xDim-1).toString());this.sliceSliderControl.val(this.currentCoord.x)}}}}}else{this.sliceSliderControl.prop("disabled",true);this.sliceSliderControl.prop("min","0");this.sliceSliderControl.prop("step","1");this.sliceSliderControl.prop("max","1");this.sliceSliderControl.val(0)}}};papaya.viewer.Viewer.prototype.incrementSeriesPoint=function(){this.currentScreenVolume.incrementTimepoint();if(this.currentScreenVolume.isOverlay()){this.reconcileOverlaySeriesPoint(this.currentScreenVolume)}this.timepointChanged()};papaya.viewer.Viewer.prototype.decrementSeriesPoint=function(){this.currentScreenVolume.decrementTimepoint();if(this.currentScreenVolume.isOverlay()){this.reconcileOverlaySeriesPoint(this.currentScreenVolume)}this.timepointChanged()};papaya.viewer.Viewer.prototype.reconcileOverlaySeriesPoint=function(a){var b,d,c;if(this.worldSpace){c=a.getCurrentTime();for(b=1;b<this.screenVolumes.length;b+=1){if(this.screenVolumes[b]!==a){this.screenVolumes[b].setCurrentTime(c)}}}else{d=a.currentTimepoint;for(b=1;b<this.screenVolumes.length;b+=1){if(this.screenVolumes[b]!==a){this.screenVolumes[b].setTimepoint(d)}}}};"use strict";var papaya=papaya||{};var papayaContainers=[];var papayaLoadableImages=papayaLoadableImages||[];var papayaDroppedFiles=[];papaya.Container=papaya.Container||function(a){this.containerHtml=a;this.containerIndex=null;this.toolbarHtml=null;this.viewerHtml=null;this.displayHtml=null;this.titlebarHtml=null;this.sliderControlHtml=null;this.viewer=null;this.display=null;this.toolbar=null;this.preferences=null;this.params=[];this.loadingImageIndex=0;this.nestedViewer=false;this.collapsable=false;this.orthogonal=true;this.kioskMode=false;this.fullScreenPadding=true;this.dropTimeout=null;this.resetComponents()};papaya.Container.papayaLastHoveredViewer=null;papaya.Container.findParameters=function(c){var b,a,d=null;a=c.data("params");if(!a){b=c.find("."+PAPAYA_VIEWER_CSS);if(b){a=b.data("params")}}if(a){d=window[a]}papaya.utilities.UrlUtils.getQueryParams(d);return d};papaya.Container.fillContainerHTML=function(c,d,e){var a,b,f;if(d){a=c.find("#"+PAPAYA_DEFAULT_TOOLBAR_ID);b=c.find("#"+PAPAYA_DEFAULT_VIEWER_ID);f=c.find("#"+PAPAYA_DEFAULT_DISPLAY_ID);if(a){a.addClass(PAPAYA_TOOLBAR_CSS)}else{c.prepend("<div class='"+PAPAYA_TOOLBAR_CSS+"' id='"+PAPAYA_DEFAULT_TOOLBAR_ID+"'></div>")}if(b){b.addClass(PAPAYA_VIEWER_CSS)}else{$("<div class='"+PAPAYA_VIEWER_CSS+"' id='"+PAPAYA_DEFAULT_VIEWER_ID+"'></div>").insertAfter($("#"+PAPAYA_DEFAULT_TOOLBAR_ID))}if(f){f.addClass(PAPAYA_DISPLAY_CSS)}else{$("<div class='"+PAPAYA_DISPLAY_CSS+"' id='"+PAPAYA_DEFAULT_DISPLAY_ID+"'></div>").insertAfter($("#"+PAPAYA_DEFAULT_VIEWER_ID))}console.log("This method of adding a Papaya container is deprecated.  Try simply <div class='papaya' data-params='params'></div> instead...")}else{c.attr("id",PAPAYA_DEFAULT_CONTAINER_ID+papayaContainers.length);if(!e||(e.kioskMode===undefined)||!e.kioskMode){c.append("<div id='"+(PAPAYA_DEFAULT_TOOLBAR_ID+papayaContainers.length)+"' class='"+PAPAYA_TOOLBAR_CSS+"'></div>")}c.append("<div id='"+(PAPAYA_DEFAULT_VIEWER_ID+papayaContainers.length)+"' class='"+PAPAYA_VIEWER_CSS+"'></div>");c.append("<div id='"+(PAPAYA_DEFAULT_DISPLAY_ID+papayaContainers.length)+"' class='"+PAPAYA_DISPLAY_CSS+"'></div>");if(e&&(e.orthogonal!==undefined)&&!e.orthogonal){if(papaya.utilities.PlatformUtils.isInputRangeSupported()){c.append("<div id='"+(PAPAYA_DEFAULT_SLIDER_ID+papayaContainers.length)+"' class='"+PAPAYA_SLIDER_CSS+"'><input type='range' /></div>")}}}return b};papaya.Container.buildContainer=function(e,g){var a,d,f,c,b=null;d=papaya.utilities.PlatformUtils.checkForBrowserCompatibility();f=e.find("."+PAPAYA_VIEWER_CSS);if(d!==null){papaya.Container.removeCheckForJSClasses(e,f);e.addClass(PAPAYA_UTILS_UNSUPPORTED_CSS);f.addClass(PAPAYA_UTILS_UNSUPPORTED_MESSAGE_CSS);f.html(d)}else{a=new papaya.Container(e);a.containerIndex=papayaContainers.length;a.preferences=new papaya.viewer.Preferences();papaya.Container.removeCheckForJSClasses(e,f);if(g){a.params=$.extend(a.params,g)}a.nestedViewer=(e.parent()[0].tagName.toUpperCase()!=="BODY");a.kioskMode=(a.params.kioskMode===true);if(a.params.fullScreenPadding!==undefined){a.fullScreenPadding=a.params.fullScreenPadding}if(a.params.orthogonal!==undefined){a.orthogonal=a.params.orthogonal}a.buildViewer(a.params);a.buildDisplay();a.buildToolbar();if(!a.orthogonal){a.buildSliderControl()}a.setUpDnD();c=f.data("load-url");if(c){b=c;if(!(b instanceof Array)){b=[];b[0]=c}a.viewer.loadImage(b,true,false)}else{if(a.params.images){b=a.params.images[0];if(!(b instanceof Array)){b=[];b[0]=a.params.images[0]}a.viewer.loadImage(b,true,false)}else{if(a.params.encodedImages){b=a.params.encodedImages[0];if(!(b instanceof Array)){b=[];b[0]=a.params.encodedImages[0]}a.viewer.loadImage(a.params.encodedImages[0],false,true)}}}a.resizeViewerComponents(false);if(!a.nestedViewer){e.parent().height("100%");e.parent().width("100%")}papayaContainers.push(a)}};papaya.Container.buildAllContainers=function(){var a,b;a=$("#"+PAPAYA_DEFAULT_CONTAINER_ID);if(a.length>0){papaya.Container.fillContainerHTML(a,true);b=papaya.Container.findParameters(a);papaya.Container.buildContainer(a,b)}else{$("."+PAPAYA_CONTAINER_CLASS_NAME).each(function(){b=papaya.Container.findParameters($(this));papaya.Container.fillContainerHTML($(this),false,b);papaya.Container.buildContainer($(this),b)})}if((papayaContainers.length===1)&&!papayaContainers[0].nestedViewer){$("html").addClass(PAPAYA_CONTAINER_FULLSCREEN);$("body").addClass(PAPAYA_CONTAINER_FULLSCREEN);papaya.Container.setToFullPage();papayaContainers[0].resizeViewerComponents(true)}};papaya.Container.startPapaya=function(){setTimeout(function(){window.scrollTo(0,0)},0);papaya.Container.buildAllContainers()};papaya.Container.resizePapaya=function(){var a;if((papayaContainers.length===1)&&!papayaContainers[0].nestedViewer){papayaContainers[0].resizeViewerComponents(true)}else{for(a=0;a<papayaContainers.length;a+=1){papayaContainers[a].resizeViewerComponents(true)}}setTimeout(function(){window.scrollTo(0,0)},0)};papaya.Container.addViewer=function(c,d,e){var a,b;b=$("#"+c);a=$('<div class="papaya"></div>');b.html(a);b[0].onclick="";b.off("click");papaya.Container.fillContainerHTML(a,false,d);papaya.Container.buildContainer(a,d);if(e){e()}};papaya.Container.removeCheckForJSClasses=function(b,a){a.removeClass(PAPAYA_CONTAINER_CLASS_NAME);a.removeClass(PAPAYA_UTILS_CHECKFORJS_CSS);b.removeClass(PAPAYA_CONTAINER_CLASS_NAME);b.removeClass(PAPAYA_UTILS_CHECKFORJS_CSS)};papaya.Container.setToFullPage=function(){document.body.style.marginTop=0;document.body.style.marginBottom=0;document.body.style.marginLeft="auto";document.body.style.marginRight="auto";document.body.style.padding=0;document.body.style.overflow="hidden";document.body.style.width="100%";document.body.style.height="100%"};papaya.Container.prototype.resetComponents=function(){this.containerHtml.css({height:"auto"});this.containerHtml.css({width:"auto"});this.containerHtml.css({margin:"auto"});$("head").append("<style>div#papayaViewer:before{ content:'' }</style>")};papaya.Container.prototype.getViewerDimensions=function(){var d,a,c,b,e;d=this.containerHtml.parent().width()-(this.fullScreenPadding?(2*PAPAYA_PADDING):0);b=(this.orthogonal?1.5:1);c=d;a=papayaRoundFast(c/b);if(!this.nestedViewer||this.collapsable){e=window.innerHeight-(papaya.viewer.Display.SIZE+(this.kioskMode?0:(papaya.ui.Toolbar.SIZE+PAPAYA_SPACING))+PAPAYA_SPACING+(this.fullScreenPadding?(2*PAPAYA_CONTAINER_PADDING_TOP):0));if(a>e){a=e;c=papayaRoundFast(a*b)}}return[c,a]};papaya.Container.prototype.getViewerPadding=function(){var b,a,c;b=this.containerHtml.parent().width()-(this.fullScreenPadding?(2*PAPAYA_PADDING):0);a=this.getViewerDimensions();c=((b-a[0])/2);return c};papaya.Container.prototype.resizeViewerComponents=function(a){var c,b;this.toolbar.closeAllMenus();c=this.getViewerDimensions();b=this.getViewerPadding();this.toolbarHtml.css({width:c[0]+"px"});this.toolbarHtml.css({height:papaya.ui.Toolbar.SIZE+"px"});this.toolbarHtml.css({paddingLeft:b+"px"});this.toolbarHtml.css({paddingBottom:PAPAYA_SPACING+"px"});this.viewerHtml.css({width:c[0]+"px"});this.viewerHtml.css({height:c[1]+"px"});this.viewerHtml.css({paddingLeft:b+"px"});if(a){this.viewer.resizeViewer(c)}this.displayHtml.css({height:papaya.viewer.Display.SIZE+"px"});this.displayHtml.css({paddingLeft:b+"px"});this.displayHtml.css({paddingTop:PAPAYA_SPACING+"px"});this.display.canvas.width=c[0];if(this.sliderControlHtml){this.sliderControlHtml.css({width:c[0]+"px"})}if((!this.nestedViewer||this.collapsable)&&this.fullScreenPadding){this.containerHtml.css({paddingTop:PAPAYA_CONTAINER_PADDING_TOP+"px"})}else{this.containerHtml.css({paddingTop:"0"})}if(this.fullScreenPadding){this.containerHtml.css({paddingLeft:PAPAYA_PADDING+"px"});this.containerHtml.css({paddingRight:PAPAYA_PADDING+"px"})}if(this.viewer.initialized){this.viewer.drawViewer(false,true)}else{this.viewer.drawEmptyViewer();this.display.drawEmptyDisplay()}this.titlebarHtml.css({width:c[0]+"px",top:(this.viewerHtml.position().top-1.25*papaya.ui.Toolbar.SIZE)})};papaya.Container.prototype.updateViewerSize=function(){this.toolbar.closeAllMenus();this.viewer.resizeViewer(this.getViewerDimensions());this.viewer.updateOffsetRect()};papaya.Container.prototype.buildViewer=function(b){var a;this.viewerHtml=this.containerHtml.find("."+PAPAYA_VIEWER_CSS);papaya.Container.removeCheckForJSClasses(this.containerHtml,this.viewerHtml);this.viewerHtml.html("");a=this.getViewerDimensions();this.viewer=new papaya.viewer.Viewer(this,a[0],a[1],b);this.viewerHtml.append($(this.viewer.canvas));this.preferences.viewer=this.viewer};papaya.Container.prototype.buildDisplay=function(){var a;this.displayHtml=this.containerHtml.find("."+PAPAYA_DISPLAY_CSS);a=this.getViewerDimensions();this.display=new papaya.viewer.Display(this,a[0]);this.displayHtml.append($(this.display.canvas))};papaya.Container.prototype.buildSliderControl=function(){this.sliderControlHtml=this.containerHtml.find("."+PAPAYA_SLIDER_CSS)};papaya.Container.prototype.buildToolbar=function(){this.toolbarHtml=this.containerHtml.find("."+PAPAYA_TOOLBAR_CSS);this.toolbar=new papaya.ui.Toolbar(this);this.toolbar.buildToolbar();this.toolbar.updateImageButtons()};papaya.Container.prototype.readFile=function(b,a){b.file(function(d,c){if(d){if(c.name.charAt(0)!=="."){d(c)}}}.bind(this,a))};papaya.Container.prototype.readDir=function(a){this.readDirNextEntries(a.createReader())};papaya.Container.prototype.readDirNextEntries=function(b){var a=this;b.readEntries(function(d){var c=d.length,f,e;if(c>0){for(f=0;f<c;f+=1){e=d[f];if(e.isFile){a.readFile(e,papaya.utilities.ObjectUtils.bind(a,a.addDroppedFile))}}a.readDirNextEntries(b)}})};papaya.Container.prototype.setUpDnD=function(){var a=this;this.containerHtml[0].ondragover=function(){a.viewer.draggingOver=true;if(!a.viewer.initialized){a.viewer.drawEmptyViewer()}return false};this.containerHtml[0].ondragleave=function(){a.viewer.draggingOver=false;if(!a.viewer.initialized){a.viewer.drawEmptyViewer()}return false};this.containerHtml[0].ondragend=function(){a.viewer.draggingOver=false;if(!a.viewer.initialized){a.viewer.drawEmptyViewer()}return false};this.containerHtml[0].ondrop=function(c){c.preventDefault();var g=c.dataTransfer;a.display.drawProgress(0.1,"Loading");if(g){if(g.items&&(g.items.length>0)){var d=g.items,b=d.length,f,e;for(f=0;f<b;f+=1){e=d[f];if(e.getAsEntry){e=e.getAsEntry()}else{if(e.webkitGetAsEntry){e=e.webkitGetAsEntry()}}if(e.isFile){a.readFile(e,papaya.utilities.ObjectUtils.bind(a,a.addDroppedFile))}else{if(e.isDirectory){a.readDir(e)}}}}else{if(g.files&&(g.files.length>0)){a.viewer.loadImage(c.dataTransfer.files)}}}return false}};papaya.Container.prototype.addDroppedFile=function(a){clearTimeout(this.dropTimeout);papayaDroppedFiles.push(a);this.dropTimeout=setTimeout(papaya.utilities.ObjectUtils.bind(this,this.droppedFilesFinishedLoading),100)};papaya.Container.prototype.droppedFilesFinishedLoading=function(){this.viewer.loadImage(papayaDroppedFiles);papayaDroppedFiles=null};papaya.Container.prototype.clearParams=function(){this.params=[]};papaya.Container.prototype.loadNext=function(){var b=false,a;this.loadingImageIndex+=1;if(this.params.images){if(this.loadingImageIndex<this.params.images.length){b=true;a=this.params.images[this.loadingImageIndex];if(!(a instanceof Array)){a=[];a[0]=this.params.images[this.loadingImageIndex]}this.viewer.loadImage(a,true,false)}}else{if(this.params.encodedImages){if(this.loadingImageIndex<this.params.encodedImages.length){b=true;a=this.params.encodedImages[this.loadingImageIndex];if(!(a instanceof Array)){a=[];a[0]=this.params.encodedImages[this.loadingImageIndex]}this.viewer.loadImage(this.params.encodedImages[this.loadingImageIndex],false,true)}}}return b};papaya.Container.prototype.readyForDnD=function(){return !this.kioskMode&&((this.params.images===undefined)||(this.params.images.length===this.loadingImageIndex))&&((this.params.encodedImages===undefined)||(this.params.encodedImages.length===this.loadingImageIndex))};papaya.Container.prototype.findLoadableImage=function(a){var b;for(b=0;b<papayaLoadableImages.length;b+=1){if(papayaLoadableImages[b].name===a){return papayaLoadableImages[b]}}return null};papaya.Container.prototype.expandViewer=function(){var a=this;if(this.nestedViewer){this.nestedViewer=false;this.collapsable=true;this.tempScrollTop=$(window).scrollTop();$(":hidden").addClass(PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT);$(document.body).children().hide();this.containerHtml.show();this.originalStyle={};this.originalStyle.width=document.body.style.width;this.originalStyle.height=document.body.style.height;this.originalStyle.marginTop=document.body.style.marginTop;this.originalStyle.marginRight=document.body.style.marginRight;this.originalStyle.marginBottom=document.body.style.marginBottom;this.originalStyle.marginLeft=document.body.style.marginLeft;this.originalStyle.paddingTop=document.body.style.paddingTop;this.originalStyle.paddingRight=document.body.style.paddingRight;this.originalStyle.paddingBottom=document.body.style.paddingBottom;this.originalStyle.paddingLeft=document.body.style.paddingLeft;this.originalStyle.overflow=document.body.style.overflow;papaya.Container.setToFullPage();this.containerHtml.after('<div style="display:none" class="'+PAPAYA_CONTAINER_COLLAPSABLE+'"></div>');$(document.body).prepend(this.containerHtml);this.resizeViewerComponents(true);this.viewer.updateOffsetRect();setTimeout(function(){window.scrollTo(0,0);a.viewer.addScroll()},0)}};papaya.Container.prototype.collapseViewer=function(){var b,a;a=this;if(this.collapsable){this.nestedViewer=true;this.collapsable=false;document.body.style.width=this.originalStyle.width;document.body.style.height=this.originalStyle.height;document.body.style.marginTop=this.originalStyle.marginTop;document.body.style.marginRight=this.originalStyle.marginRight;document.body.style.marginBottom=this.originalStyle.marginBottom;document.body.style.marginLeft=this.originalStyle.marginLeft;document.body.style.paddingTop=this.originalStyle.paddingTop;document.body.style.paddingRight=this.originalStyle.paddingRight;document.body.style.paddingBottom=this.originalStyle.paddingBottom;document.body.style.paddingLeft=this.originalStyle.paddingLeft;document.body.style.overflow=this.originalStyle.overflow;$("."+PAPAYA_CONTAINER_COLLAPSABLE).replaceWith(this.containerHtml);$(document.body).children(":not(."+PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT+")").show();$("."+PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT).removeClass(PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT);this.resizeViewerComponents(true);for(b=0;b<papayaContainers.length;b+=1){papayaContainers[b].updateViewerSize();papayaContainers[b].viewer.drawViewer(true)}setTimeout(function(){$(window).scrollTop(a.tempScrollTop);a.viewer.removeScroll()},0)}};papaya.Container.prototype.isNestedViewer=function(){return(this.nestedViewer||this.collapsable)};papaya.Container.prototype.disableScrollWheel=function(){return(this.isNestedViewer()||papaya.utilities.PlatformUtils.ios)};papaya.Container.prototype.canOpenInMango=function(){return this.params.canOpenInMango};papaya.Container.prototype.isExpandable=function(){return this.params.expandable&&this.isNestedViewer()};window.onload=papaya.Container.startPapaya;window.onresize=papaya.Container.resizePapaya;window.onorientationchange=function(){var a;for(a=0;a<papayaContainers.length;a+=1){papayaContainers[a].toolbar.closeAllMenus()}papaya.Container.resizePapaya()};window.addEventListener("message",function(a){if(a.data===PAPAYA_MANGO_INSTALLED){papaya.mangoinstalled=true}},false);
  /*! jquery.js
   * jQuery JavaScript Library v1.9.1
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2013-2-4
   *
   * Sizzle CSS Selector Engine
   * Copyright 2012 jQuery Foundation and other contributors
   * Released under the MIT license
   * http://sizzlejs.com/
   */
  /*! bowser.js
   * Bowser - a browser detector
   * https://github.com/ded/bowser
   * MIT License | (c) Dustin Diaz 2014
   */
  /*! base64-binary.js
   * Sept 12 2013 (M. Martinez): Slight modification to better handle padding.
  
   Copyright (c) 2011, Daniel Guerrero
   All rights reserved.
  
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:
   * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
  
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   DISCLAIMED. IN NO EVENT SHALL DANIEL GUERRERO BE LIABLE FOR ANY
   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
  /*! pako-inflate.js
   (The MIT License)
  
   Copyright (C) 2014 by Vitaly Puzrin
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
  
   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.
  
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
   */
  /*! numerics.js
   Numeric Javascript
   Copyright (C) 2011 by Sébastien Loisel
  
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
  
   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.
  
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
   */
  /*! papaya.js
  Copyright (c) 2012-2013, RII-UTHSCSA
  All rights reserved.
  
      THIS PRODUCT IS NOT FOR CLINICAL USE.
  
      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
  following conditions are met:
  
      - Redistributions of source code must retain the above copyright notice, this list of conditions and the following
  disclaimer.
  
      - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
  disclaimer in the documentation and/or other materials provided with the distribution.
  
  - Neither the name of the RII-UTHSCSA nor the names of its contributors may be used to endorse or promote products
  derived from this software without specific prior written permission.
  
      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  