function unformatNumber(n){if(typeof n=="number")return n;var i=new RegExp("[^0-9-.]",["g"]),t=parseFloat((""+n).replace(/\((.*)\)/,"-$1").replace(i,""));return isNaN(t)?0:t}var util,ui,__extends,Tram;(function(){function n(n){return function(){return n}}(function(t){var u=this||eval("this"),r=u.document,e=u.navigator,i=u.jQuery,f=u.JSON;(function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],n):n(u.ko={})})(function(o){function c(n,t,i,r){s.d[n]={init:function(n){return s.a.f.set(n,a,{}),{controlsDescendantBindings:!0}},update:function(n,u,f,e,o){f=s.a.f.get(n,a),u=s.a.c(u()),e=!i!=!u;var h=!f.fb;(h||t||e!==f.vb)&&(h&&(f.fb=s.a.Oa(s.e.childNodes(n),!0)),e?(h||s.e.P(n,s.a.Oa(f.fb)),s.Ja(r?r(o,u):o,n)):s.e.ba(n),f.vb=e)}},s.g.S[n]=!1,s.e.L[n]=!0}function v(n,t,i){i&&t!==s.h.n(n)&&s.h.W(n,t),t!==s.h.n(n)&&s.q.I(s.a.Ga,null,[n,"change"])}var s="undefined"!=typeof o?o:{},y,h,l,a;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<\/i>",u[0];);return 4s.a.k(i,n[t])&&i.push(n[t]);return i},Z:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;ir?i&&n.push(t):i||n.splice(r,1)},extend:function(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},w:o,oa:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},Mb:function(n){n=s.a.N(n);for(var i=r.createElement("div"),t=0,u=n.length;tn?t.setAttribute("selected",i):t.selected=i},F:function(n){return null===n||n===t?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Wb:function(n,t){for(var r,u=[],f=(n||"").split(t),i=0,e=f.length;in.length?!1:n.substring(0,t.length)===t},yb:function(n,t){if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},aa:function(n){return s.a.yb(n,n.ownerDocument)},pb:function(n){return!!s.a.La(n,s.a.aa)},u:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},o:function(t,r,u){var o=n&&a[r],f,e,c;if(o||"undefined"==typeof i)if(o||"function"!=typeof t.addEventListener)if("undefined"!=typeof t.attachEvent)f=function(n){u.call(t,n)},e="on"+r,t.attachEvent(e,f),s.a.C.ia(t,function(){t.detachEvent(e,f)});else throw Error("Browser doesn't support addEventListener or attachEvent");else t.addEventListener(r,u,!1);else h(t,r)&&(c=u,u=function(n,t){var i=this.checked;t&&(this.checked=!0!==t.sb),c.call(this,n),this.checked=i}),i(t).bind(r,u)},Ga:function(n,t){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");if("undefined"!=typeof i){var f=[];h(n,t)&&f.push({sb:n.checked}),i(n).trigger(t,f)}else if("function"==typeof r.createEvent)if("function"==typeof n.dispatchEvent)f=r.createEvent(l[t]||"HTMLEvents"),f.initEvent(t,!0,!0,u,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(f);else throw Error("The supplied element doesn't support dispatchEvent");else if("undefined"!=typeof n.fireEvent)h(n,t)&&(n.checked=!0!==n.checked),n.fireEvent("on"+t);else throw Error("Browser doesn't support triggering events");},c:function(n){return s.T(n)?n():n},ya:function(n){return s.T(n)?n.t():n},ga:function(n,t,i){if(t){var r=/\S+/g,u=n.className.match(r)||[];s.a.p(t.match(r),function(n){s.a.ja(u,n,i)}),n.className=u.join(" ")}},ib:function(n,i){var u=s.a.c(i),f;(null===u||u===t)&&(u=""),f=s.e.firstChild(n),!f||3!=f.nodeType||s.e.nextSibling(f)?s.e.P(n,[r.createTextNode(u)]):f.data=u,s.a.Bb(n)},gb:function(t,i){if(t.name=i,7>=n)try{t.mergeAttributes(r.createElement(""),!1)}catch(u){}},Bb:function(t){9<=n&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},zb:function(t){if(n){var i=t.style.width;t.style.width=0,t.style.width=i}},Qb:function(n,t){n=s.a.c(n),t=s.a.c(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},N:function(n){for(var i=[],t=0,r=n.length;t","<\/table>"]||!f.indexOf("","<\/tbody><\/table>"]||(!f.indexOf("","<\/tr><\/tbody><\/table>"]||[0,"",""],n="ignored
"+f[1]+n+f[2]+"<\/div>","function"==typeof u.innerShiv?t.appendChild(u.innerShiv(n)):t.innerHTML=n;f[0]--;)t=t.lastChild;t=s.a.N(t.lastChild.childNodes)}return t},s.a.fa=function(n,r){if(s.a.oa(n),r=s.a.c(r),null!==r&&r!==t)if("string"!=typeof r&&(r=r.toString()),"undefined"!=typeof i)i(n).html(r);else for(var f=s.a.xa(r),u=0;u"},mb:function(i,r){var u=n[i];if(u===t)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return u.apply(null,r||[]),!0}finally{delete n[i]}},nb:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;ut;t++)n=n();return n})},s.toJSON=function(n,t,i){return n=s.lb(n),s.a.Ca(n,t,i)},i.prototype={save:function(n,t){var i=s.a.k(this.keys,n);0<=i?this.Ha[i]=t:(this.keys.push(n),this.Ha.push(t))},get:function(n){return n=s.a.k(this.keys,n),0<=n?this.Ha[n]:t}}}(),s.b("toJS",s.lb),s.b("toJSON",s.toJSON),function(){s.h={n:function(n){switch(s.a.u(n)){case"option":return!0===n.__ko__hasDomDataOptionValue__?s.a.f.get(n,s.d.options.wa):7>=s.a.ca?n.getAttributeNode("value")&&n.getAttributeNode("value").specified?n.value:n.text:n.value;case"select":return 0<=n.selectedIndex?s.h.n(n.options[n.selectedIndex]):t;default:return n.value}},W:function(n,i){switch(s.a.u(n)){case"option":switch(typeof i){case"string":s.a.f.set(n,s.d.options.wa,t),"__ko__hasDomDataOptionValue__"in n&&delete n.__ko__hasDomDataOptionValue__,n.value=i;break;default:s.a.f.set(n,s.d.options.wa,i),n.__ko__hasDomDataOptionValue__=!0,n.value="number"==typeof i?i:""}break;case"select":""===i&&(i=t),(null===i||i===t)&&(n.selectedIndex=-1);for(var r=n.options.length-1;0<=r;r--)if(s.h.n(n.options[r])==i){n.selectedIndex=r;break}1i.length)return[];for("{"===i.charAt(0)&&(i=i.substring(1,i.length-1)),t=[],f=null,r=0;r"===r.createComment("test").text,e=i?/^\x3c!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\x3e$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,o=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,h={ul:!0,ol:!0};s.e={L:{},childNodes:function(t){return n(t)?u(t):t.childNodes},ba:function(t){if(n(t)){t=s.e.childNodes(t);for(var i=0,r=t.length;i=s.a.ca&&i in l?(i=l[i],u?n.removeAttribute(i):n[i]=r):u||n.setAttribute(i,r.toString()),"name"===i&&s.a.gb(n,u?"":r.toString())})}},s.d.checked={init:function(t,i,r){s.a.o(t,"click",function(){var u,n,f;if("checkbox"==t.type)u=t.checked;else if("radio"==t.type&&t.checked)u=t.value;else return;n=i(),f=s.a.c(n),"checkbox"==t.type&&f instanceof Array?s.a.ja(n,t.value,t.checked):s.g.ha(n,r,"checked",u,!0)}),"radio"!=t.type||t.name||s.d.uniqueName.init(t,n(!0))},update:function(n,t){var i=s.a.c(t());"checkbox"==n.type?n.checked=i instanceof Array?0<=s.a.k(i,n.value):i:"radio"==n.type&&(n.checked=n.value==i)}},s.d.css={update:function(n,t){var i=s.a.c(t());"object"==typeof i?s.a.w(i,function(t,i){i=s.a.c(i),s.a.ga(n,t,i)}):(i=String(i||""),s.a.ga(n,n.__ko__cssValue,!1),n.__ko__cssValue=i,s.a.ga(n,i,!0))}},s.d.enable={update:function(n,t){var i=s.a.c(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}},s.d.disable={update:function(n,t){s.d.enable.update(n,function(){return!s.a.c(t())})}},s.d.event={init:function(n,t,i,r){var u=t()||{};s.a.w(u,function(u){"string"==typeof u&&s.a.o(n,u,function(n){var e,o=t()[u],h,f;if(o){h=i();try{f=s.a.N(arguments),f.unshift(r),e=o.apply(r,f)}finally{!0!==e&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===h[u+"Bubble"]&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}},s.d.foreach={Ya:function(n){return function(){var i=n(),t=s.a.ya(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.D.sa}:(s.a.c(i),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.D.sa})}},init:function(n,t){return s.d.template.init(n,s.d.foreach.Ya(t))},update:function(n,t,i,r,u){return s.d.template.update(n,s.d.foreach.Ya(t),i,r,u)}},s.g.S.foreach=!1,s.e.L.foreach=!0,s.d.hasfocus={init:function(n,t,i){function r(r){var u,f;if(n.__ko_hasfocusUpdating=!0,u=n.ownerDocument,"activeElement"in u){try{f=u.activeElement}catch(e){f=u.body}r=f===n}u=t(),s.g.ha(u,i,"hasfocus",r,!0),n.__ko_hasfocusLastValue=r,n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.o(n,"focus",u),s.a.o(n,"focusin",u),s.a.o(n,"blur",f),s.a.o(n,"focusout",f)},update:function(n,t){var i=!!s.a.c(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),s.q.I(s.a.Ga,null,[n,i?"focusin":"focusout"]))}},s.d.hasFocus=s.d.hasfocus,s.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.fa(n,t())}},a="__ko_withIfBindingData",c("if"),c("ifnot",!1,!0),c("with",!0,!1,function(n,t){return n.createChildContext(t)}),s.d.options={init:function(n){if("select"!==s.a.u(n))throw Error("options binding applies only to SELECT elements");for(;0","#comment",u)})},qb:function(n,t){return s.s.va(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.Ka(u,n,r)})}}}(),s.b("__tr_ambtns",s.Ea.qb),function(){s.l={},s.l.i=function(n){this.i=n},s.l.i.prototype.text=function(){var n=s.a.u(this.i),n="script"===n?"text":"textarea"===n?"value":"innerHTML",t;if(0==arguments.length)return this.i[n];t=arguments[0],"innerHTML"===n?s.a.fa(this.i,t):this.i[n]=t},s.l.i.prototype.data=function(n){if(1===arguments.length)return s.a.f.get(this.i,"templateSourceData_"+n);s.a.f.set(this.i,"templateSourceData_"+n,arguments[1])},s.l.Q=function(n){this.i=n},s.l.Q.prototype=new s.l.i,s.l.Q.prototype.text=function(){if(0==arguments.length){var n=s.a.f.get(this.i,"__ko_anon_template__")||{};return n.Fa===t&&n.ma&&(n.Fa=n.ma.innerHTML),n.Fa}s.a.f.set(this.i,"__ko_anon_template__",{Fa:arguments[0]})},s.l.i.prototype.nodes=function(){if(0==arguments.length)return(s.a.f.get(this.i,"__ko_anon_template__")||{}).ma;s.a.f.set(this.i,"__ko_anon_template__",{ma:arguments[0]})},s.b("templateSources",s.l),s.b("templateSources.domElement",s.l.i),s.b("templateSources.anonymousTemplate",s.l.Q)}(),function(){function r(n,t,i){var r;for(t=s.e.nextSibling(t);n&&(r=n)!==t;)n=s.e.nextSibling(r),1!==r.nodeType&&8!==r.nodeType||i(r)}function u(n,t){if(n.length){var i=n[0],u=n[n.length-1];r(i,u,function(n){s.Ia(t,n)}),r(i,u,function(n){s.s.nb(n,[t])})}}function n(n){return n.nodeType?n:0s.a.ca?0:n.nodes)?n.nodes():null;return t?s.a.N(t.cloneNode(!0).childNodes):(n=n.text(),s.a.xa(n))},s.D.sa=new s.D,s.Ba(s.D.sa),s.b("nativeTemplateEngine",s.D),function(){s.ua=function(){var n=this.Ib=function(){if("undefined"==typeof i||!i.tmpl)return 0;try{if(0<=i.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(t,u,f){if(f=f||{},2>n)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var e=t.data("precompiled");return e||(e=t.text()||"",e=i.template(null,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),t.data("precompiled",e)),t=[u.$data],u=i.extend({koBindingContext:u},f.templateOptions),u=i.tmpl(e,t,u),u.appendTo(r.createElement("div")),i.fragments={},u},this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"},this.addTemplate=function(n,t){r.write("