jQuery.template("indicator-comment",function(n,t){var $=n,__=[],i=t.data;with(i)__.push('<textarea class="comment-text" rows="4">  <\/textarea>  <div class="error-container"><\/div>  <a href="#" class="ui-button save-comment">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/indicator-comment.htm","OK"))),__.push("<\/a>");return __});jQuery.template("indicators-missed",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="indicators-missed" title="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/indicators-missed.htm","Warning"))),__.push('">  <div>'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/indicators-missed.htm","{singleForm} location(s) is missing for the following indicators:",{singleForm:state.singleForm[0].toUpperCase()+state.singleForm.substring(1)})),__.push("<\/div>    "),typeof indicators!="undefined"&&indicators!=null&&$.each(typeof indicators=="function"?indicators.call($item):indicators,function(n,indicator){with(this)__.push('   <div class="indicator">'),typeof indicator!="undefined"&&indicator!=null&&__.push($.encode(typeof indicator=="function"?indicator.call($item):indicator)),__.push("<\/div>  ")}),__.push("   <div>"),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/indicators-missed.htm","Please specify {pluralForm} for all indicators and try again.",{pluralForm:state.pluralForm})),__.push("<\/div> <\/div>");return __});jQuery.template("locations",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof locations.length!="undefined"&&locations.length!=null&&(typeof locations.length=="function"?locations.length.call($item):locations.length)?(__.push("   <table>   <thead>    <tr>     <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","User"))),__.push("<\/th>     <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Region"))),__.push("<\/th>     <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Schedule"))),__.push("<\/th>     <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Status"))),__.push("<\/th>     <th><\/th>    <\/tr>   <\/thead>  "),typeof locations!="undefined"&&locations!=null&&$.each(typeof locations=="function"?locations.call($item):locations,function(){with(this)__.push('    <tbody>    <tr>     <td><a href="/user/'),typeof userKey!="undefined"&&userKey!=null&&__.push($.encode(typeof userKey=="function"?userKey.call($item):userKey)),__.push('">'),typeof userName!="undefined"&&userName!=null&&__.push($.encode(typeof userName=="function"?userName.call($item):userName)),__.push("<\/a><\/td>     <td>"),typeof regionName!="undefined"&&regionName!=null&&__.push($.encode(typeof regionName=="function"?regionName.call($item):regionName)),__.push("<\/td>     <td>"),typeof schedule!="undefined"&&schedule!=null&&__.push($.encode(typeof schedule=="function"?schedule.call($item):schedule)),__.push("<\/td>      "),typeof(status==0)!="undefined"&&status==0!=null&&(typeof(status==0)=="function"?(status==0).call($item):status==0)?(__.push('      <td class="verified">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Verified"))),__.push("<\/td>     ")):typeof(status==1)!="undefined"&&status==1!=null&&(typeof(status==1)=="function"?(status==1).call($item):status==1)?(__.push('      <td class="not-verified">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Rejected"))),__.push("<\/td>     ")):typeof(status==2)!="undefined"&&status==2!=null&&(typeof(status==2)=="function"?(status==2).call($item):status==2)&&(__.push('      <td class="not-verified">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","Pending verification"))),__.push("<\/td>     ")),__.push('      <td><a target="_blank" href="/network/markets/'),typeof projectId!="undefined"&&projectId!=null&&__.push($.encode(typeof projectId=="function"?projectId.call($item):projectId)),__.push("/"),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('" class="verify">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","View"))),__.push("<\/a><\/td>    <\/tr>      <\/tbody>    ")}),__.push("  <\/table> ")):!0&&(__.push("  "),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/locations.htm","No results found."))),__.push(" ")),__.push("");return __});jQuery.template("market-card",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="market card" data-key="'),typeof market.key!="undefined"&&market.key!=null&&__.push($.encode(typeof market.key=="function"?market.key.call($item):market.key)),__.push('" data-latitude="'),typeof market.latitude!="undefined"&&market.latitude!=null&&__.push($.encode(typeof market.latitude=="function"?market.latitude.call($item):market.latitude)),__.push('" data-longitude="'),typeof market.longitude!="undefined"&&market.longitude!=null&&__.push($.encode(typeof market.longitude=="function"?market.longitude.call($item):market.longitude)),__.push('" data-tempkey="'),typeof tempkey!="undefined"&&tempkey!=null&&__.push($.encode(typeof tempkey=="function"?tempkey.call($item):tempkey)),__.push('" style="border-color: '),typeof color!="undefined"&&color!=null&&__.push($.encode(typeof color=="function"?color.call($item):color)),__.push(';">    <h2 style="background-color: '),typeof color!="undefined"&&color!=null&&__.push($.encode(typeof color=="function"?color.call($item):color)),__.push('">'),typeof market.name!="undefined"&&market.name!=null&&__.push($.encode(typeof market.name=="function"?market.name.call($item):market.name)),__.push('<\/h2>    <div class="type">'),typeof market.type!="undefined"&&market.type!=null&&__.push($.encode(typeof market.type=="function"?market.type.call($item):market.type)),__.push('<\/div>   <div class="indicators" title="'),typeof market.indicatorNames!="undefined"&&market.indicatorNames!=null&&__.push($.encode(typeof market.indicatorNames=="function"?market.indicatorNames.call($item):market.indicatorNames)),__.push('" data-keys="'),typeof market.indicators.join!="undefined"&&market.indicators.join!=null&&__.push($.encode(market.indicators.join(","))),__.push('">'),typeof market.indicatorShortNames!="undefined"&&market.indicatorShortNames!=null&&__.push($.encode(typeof market.indicatorShortNames=="function"?market.indicatorShortNames.call($item):market.indicatorShortNames)),__.push("<\/div>  "),typeof edit!="undefined"&&edit!=null&&(typeof edit=="function"?edit.call($item):edit)&&(__.push('   <div>    <a href="#" class="action edit">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/market-card.htm","Edit"))),__.push('<\/a><a href="#" class="action delete">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/market-card.htm","Delete"))),__.push("<\/a>   <\/div>  ")),__.push(" <\/div>");return __});jQuery.template("market",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="market active" data-key="'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('" data-latitude="'),typeof latitude!="undefined"&&latitude!=null&&__.push($.encode(typeof latitude=="function"?latitude.call($item):latitude)),__.push('" data-longitude="'),typeof longitude!="undefined"&&longitude!=null&&__.push($.encode(typeof longitude=="function"?longitude.call($item):longitude)),__.push('" data-tempkey="'),typeof tempkey!="undefined"&&tempkey!=null&&__.push($.encode(typeof tempkey=="function"?tempkey.call($item):tempkey)),__.push('">   <div class="property">   <label for="name">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/market.htm","{singleForm} name",{singleForm:singleForm[0].toUpperCase()+singleForm.substring(1)})),__.push('<\/label>   <span contenteditable id="title" class="title">'),typeof title!="undefined"&&title!=null&&__.push($.encode(typeof title=="function"?title.call($item):title)),__.push('<\/span>  <\/div>   <div class="property">   <label for="type">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/market.htm","Type"))),__.push('<\/label>   <select id="type" class="type">    <option><\/option>    '),typeof types!="undefined"&&types!=null&&(typeof types=="function"?types.call($item):types)&&(__.push("     "),typeof types!="undefined"&&types!=null&&$.each(typeof types=="function"?types.call($item):types,function(n,t){with(this)__.push("      <option>"),typeof t!="undefined"&&t!=null&&__.push($.encode(typeof t=="function"?t.call($item):t)),__.push("<\/option>     ")}),__.push("    ")),__.push('   <\/select>  <\/div>    <div class="topics">    <label>'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/market.htm","Choose indicators that you want to collect in this {singleForm}",{singleForm:singleForm})),__.push("<\/label>   "),typeof topics!="undefined"&&topics!=null&&(typeof topics=="function"?topics.call($item):topics)&&(__.push("    "),typeof topics!="undefined"&&topics!=null&&$.each(typeof topics=="function"?topics.call($item):topics,function(n,topic){with(this)__.push('     <div class="topic">      <input class="topic" type="checkbox" id="'),typeof topic.name!="undefined"&&topic.name!=null&&__.push($.encode(typeof topic.name=="function"?topic.name.call($item):topic.name)),__.push('" /><label for="'),typeof topic.name!="undefined"&&topic.name!=null&&__.push($.encode(typeof topic.name=="function"?topic.name.call($item):topic.name)),__.push('">'),typeof topic.name!="undefined"&&topic.name!=null&&__.push($.encode(typeof topic.name=="function"?topic.name.call($item):topic.name)),__.push("<\/label>      <ul>       "),typeof topic.indicators!="undefined"&&topic.indicators!=null&&$.each(typeof topic.indicators=="function"?topic.indicators.call($item):topic.indicators,function(){with(this)__.push('            <li>         <input type="checkbox" id="i_'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('" data-name="'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push('" data-key="'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('" /><label title="'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push('" for="i_'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('">'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push("<\/label>        <\/li>       ")}),__.push("      <\/ul>     <\/div>    ")}),__.push("    ")),__.push("   <\/div>   <div>    "),typeof(key||tempkey)!="undefined"&&(key||tempkey)!=null&&(typeof(key||tempkey)=="function"?(key||tempkey).call($item):key||tempkey)?(__.push('    <a href="#" class="add spin-btn">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/market.htm","Save"))),__.push("<\/a>   ")):!0&&(__.push('    <a href="#" class="add spin-btn">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/market.htm","Add {singleForm}",{singleForm:singleForm})),__.push("<\/a>   ")),__.push('      <a href="#" class="action cancel">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/market.htm","Cancel"))),__.push('<\/a>    <div class="market-error"><\/div>  <\/div> <\/div>');return __});jQuery.template("pay",function(n,t){var $=n,__=[],i=t.data;with(i)__.push('<div id="pay-dialog" title="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/pay.htm","Payment confirmation"))),__.push('" warning="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/pay.htm","Warning"))),__.push('">  <div class="status hidden">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","Are you sure you want to ignore the submission? <br/><br/>  Please note as soon as you accept the same submission for the second time, the payment will be done again as well and won't be credited back to your account.")),__.push('<\/div>  <div class="bids hidden">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","Project [href=#|class=market-project] should have at least one accepted bid to accept the submission.")),__.push('<\/div>  <div class="bidder hidden">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","<span><\/span> should be a bidder of project [href=#|class=market-project] to accept the submission.")),__.push('<\/div>  <div class="balance hidden">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","Project owner's balance is less than price specified in market project [href=#|class=market-project]. Please advance project owner's balance.")),__.push('<\/div>  <div class="amount hidden">   '),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","Project owner's account will be debited with <span><\/span> and the same will be credited to <span><\/span>")),__.push('   <div class="edit">    <label>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/pay.htm","Amount:"))),__.push('<\/label>    <input type="text" />   <\/div>  <\/div>  <div class="closed hidden">'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/pay.htm","Submission cannot be accepted because project [href=#|class=market-project] has already been closed.")),__.push("<\/div> <\/div>");return __});jQuery.template("place",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push("<div>  <strong>"),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push("<\/strong>   "),typeof address!="undefined"&&address!=null&&(typeof address=="function"?address.call($item):address)&&(__.push("   <span>"),typeof address!="undefined"&&address!=null&&__.push($.encode(typeof address=="function"?address.call($item):address)),__.push("<\/span>  ")),__.push("   "),typeof url!="undefined"&&url!=null&&(typeof url=="function"?url.call($item):url)&&(__.push('   <a target="_blank" href="'),typeof url!="undefined"&&url!=null&&__.push($.encode(typeof url=="function"?url.call($item):url)),__.push('">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/place.htm","View on Google"))),__.push("<\/a>  ")),__.push("   "),typeof photo!="undefined"&&photo!=null&&(typeof photo=="function"?photo.call($item):photo)&&(__.push('   <img src="'),typeof photo!="undefined"&&photo!=null&&__.push($.encode(typeof photo=="function"?photo.call($item):photo)),__.push('" alt="'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push('" />  ')),__.push("  <\/div>");return __});jQuery.template("popup",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="market-popup">     <h3>'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/popup.htm","Use map to find {singleForm} (click on map or type name)",{singleForm:market.singleForm})),__.push('<\/h3>    <div class="map new">    <input type="text" placeholder="'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/datanetwork/popup.htm","Type {singleForm} name",{singleForm:market.singleForm})),__.push('">    <div class="tyles"><\/div>   <\/div>    '),typeof market!="undefined"&&market!=null&&(__=__.concat($item.nest("market",market,null))),__.push("   <\/div>");return __});jQuery.template("price-tag-popup",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="price-tag-popup">  <div class="name">   '),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push(", "),typeof unit!="undefined"&&unit!=null&&__.push($.encode(typeof unit=="function"?unit.call($item):unit)),__.push('  <\/div>  <div class="markets">   '),typeof markets!="undefined"&&markets!=null&&__.push($.encode(typeof markets=="function"?markets.call($item):markets)),__.push('  <\/div>  <div class="image">   <!-- Image center align http://stackoverflow.com/a/7310398 -->   <span class="helper"><\/span>   <img src="'),typeof url!="undefined"&&url!=null&&__.push($.encode(typeof url=="function"?url.call($item):url)),__.push('" alt="'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push('"/>  <\/div> <\/div>');return __});jQuery.template("review-indicator-comment",function(n,$item){var i=n,__=[],t=$item.data;with(t)__.push('<tr class="indicator-comment">   <td colspan="9">    <div class="project-comments item-comment">     <div class="flat-reply">      '),!0&&(__=__.concat($item.nest("indicator-comment",null))),__.push("     <\/div>    <\/div>   <\/td>  <\/tr>");return __});jQuery.template("scope-indicator",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div id="indicator-dialog" title="'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Indicator"))),__.push('" >  <div class="form">   <div class="validation-message"><\/div>       <div class="setting">    <label for="indicator-topic">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Topic"))),__.push('<\/label>    <select id="indicator-topic">     '),typeof topics!="undefined"&&topics!=null&&$.each(typeof topics=="function"?topics.call($item):topics,function(i,topic){with(this)__.push('      <option value="'),typeof i!="undefined"&&i!=null&&__.push($.encode(typeof i=="function"?i.call($item):i)),__.push('" '),typeof(topicIndex==i?"selected":"")!="undefined"&&(topicIndex==i?"selected":"")!=null&&__.push($.encode(typeof(topicIndex==i?"selected":"")=="function"?(topicIndex==i?"selected":"").call($item):topicIndex==i?"selected":"")),__.push(">"),typeof topic.name!="undefined"&&topic.name!=null&&__.push($.encode(typeof topic.name=="function"?topic.name.call($item):topic.name)),__.push("<\/option>     ")}),__.push('    <\/select>   <\/div>    <div class="setting">    <label for="indicator-name">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Name"))),__.push('<\/label>    <input type="text" id="indicator-name" value="'),typeof indicator.name!="undefined"&&indicator.name!=null&&__.push($.encode(typeof indicator.name=="function"?indicator.name.call($item):indicator.name)),__.push('"/>   <\/div>    <div class="setting">    <label for="indicator-description">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Description"))),__.push('<\/label>    <textarea id="indicator-description">'),typeof indicator.description!="undefined"&&indicator.description!=null&&__.push($.encode(typeof indicator.description=="function"?indicator.description.call($item):indicator.description)),__.push('<\/textarea>   <\/div>    <div class="setting checkbox">    <input type="checkbox" id="allow-zero" '),typeof(indicator.allowZero?"checked":"")!="undefined"&&(indicator.allowZero?"checked":"")!=null&&__.push($.encode(typeof(indicator.allowZero?"checked":"")=="function"?(indicator.allowZero?"checked":"").call($item):indicator.allowZero?"checked":"")),__.push('/>    <label for="allow-zero">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Allow zero value"))),__.push('<\/label>   <\/div>    <div class="setting checkbox">    <input type="checkbox" id="price-tag-not-required" '),typeof(indicator.priceTagNotRequired?"checked":"")!="undefined"&&(indicator.priceTagNotRequired?"checked":"")!=null&&__.push($.encode(typeof(indicator.priceTagNotRequired?"checked":"")=="function"?(indicator.priceTagNotRequired?"checked":"").call($item):indicator.priceTagNotRequired?"checked":"")),__.push('/>    <label for="price-tag-not-required">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Price tag not required"))),__.push('<\/label>   <\/div>    <div class="setting type">    <label for="indicator-type">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Type"))),__.push('<\/label>    <select id="indicator-type">     <option value="0" '),typeof(indicator.type==0?"selected":"")!="undefined"&&(indicator.type==0?"selected":"")!=null&&__.push($.encode(typeof(indicator.type==0?"selected":"")=="function"?(indicator.type==0?"selected":"").call($item):indicator.type==0?"selected":"")),__.push(">"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Currency"))),__.push('<\/option>     <option value="1" '),typeof(indicator.type==1?"selected":"")!="undefined"&&(indicator.type==1?"selected":"")!=null&&__.push($.encode(typeof(indicator.type==1?"selected":"")=="function"?(indicator.type==1?"selected":"").call($item):indicator.type==1?"selected":"")),__.push(">"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Number"))),__.push('<\/option>    <\/select>   <\/div>    <div class="setting regions">    <label>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Regions"))),__.push('<\/label>    <div id="regions">     '),typeof indicator.formattedRegions!="undefined"&&indicator.formattedRegions!=null&&$.each(typeof indicator.formattedRegions=="function"?indicator.formattedRegions.call($item):indicator.formattedRegions,function(i,r){with(this)__.push('      <span id="'),typeof r.id!="undefined"&&r.id!=null&&__.push($.encode(typeof r.id=="function"?r.id.call($item):r.id)),__.push('">'),typeof r.name!="undefined"&&r.name!=null&&__.push($.encode(typeof r.name=="function"?r.name.call($item):r.name)),__.push("<\/span>"),typeof(i<indicator.formattedRegions.length-1?", ":"")!="undefined"&&(i<indicator.formattedRegions.length-1?", ":"")!=null&&__.push($.encode(typeof(i<indicator.formattedRegions.length-1?", ":"")=="function"?(i<indicator.formattedRegions.length-1?", ":"").call($item):i<indicator.formattedRegions.length-1?", ":"")),__.push("     ")}),__.push('      <\/div>    <a href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Select"))),__.push('<\/a>   <\/div>    <div class="setting">    <label>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Units"))),__.push('<\/label>       <div class="units">     <table class="knoema-table">      <thead>       <tr>        <th class="name">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Name"))),__.push('<\/th>        <th class="ratio">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Ratio"))),__.push("<\/th>        <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Regions"))),__.push('<\/th>        <th class="actions"><\/th>       <\/tr>      <\/thead>      <tbody>        '),typeof indicator.units!="undefined"&&indicator.units!=null&&$.each(typeof indicator.units=="function"?indicator.units.call($item):indicator.units,function(i,unit){with(this)__.push("        "),!0&&(__=__.concat($item.nest("scope-unit",{i:i,unit:unit}))),__.push("       ")}),__.push('      <\/tbody>     <\/table>    <\/div>   <\/div>    <a class="ui-button add-unit" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicator.htm","Add Unit"))),__.push("<\/a>  <\/div> <\/div>");return __});jQuery.template("scope-indicators",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof(topics.length>0)!="undefined"&&topics.length>0!=null&&(typeof(topics.length>0)=="function"?(topics.length>0).call($item):topics.length>0)?(__.push("  "),typeof topics!="undefined"&&topics!=null&&$.each(typeof topics=="function"?topics.call($item):topics,function(i,topic){with(this)__.push('   <tr class="topic" data-topic-index="'),typeof i!="undefined"&&i!=null&&__.push($.encode(typeof i=="function"?i.call($item):i)),__.push('">    <td>     '),typeof topic.name!="undefined"&&topic.name!=null&&__.push($.encode(typeof topic.name=="function"?topic.name.call($item):topic.name)),__.push('    <\/td>    <td style="width: 120px;">     <a class="edit-topic" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Edit"))),__.push('<\/a>     <a class="delete-topic" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Delete"))),__.push("<\/a>    <\/td>   <\/tr>   "),typeof topic.indicators!="undefined"&&topic.indicators!=null&&$.each(typeof topic.indicators=="function"?topic.indicators.call($item):topic.indicators,function(j,indicator){with(this)__.push('    <tr class="indicator" data-topic-index="'),typeof i!="undefined"&&i!=null&&__.push($.encode(typeof i=="function"?i.call($item):i)),__.push('" data-indicator-index="'),typeof j!="undefined"&&j!=null&&__.push($.encode(typeof j=="function"?j.call($item):j)),__.push('">     <td>      '),typeof indicator.name!="undefined"&&indicator.name!=null&&__.push($.encode(typeof indicator.name=="function"?indicator.name.call($item):indicator.name)),__.push('     <\/td>     <td>      <a class="edit-indicator" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Edit"))),__.push('<\/a>      <a class="delete-indicator" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Delete"))),__.push("<\/a>     <\/td>    <\/tr>   ")}),__.push("  ")}),__.push(" ")):!0&&(__.push('  <tr>   <td colspan="2">    '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","No topics"))),__.push("   <\/td>  <\/tr> ")),__.push(' <tr class="add-topic-indicator">  <td colspan="2">   <a class="ui-button add-topic" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Add Topic"))),__.push("<\/a>   "),typeof(topics.length>0)!="undefined"&&topics.length>0!=null&&(typeof(topics.length>0)=="function"?(topics.length>0).call($item):topics.length>0)&&(__.push('    &nbsp;<a class="ui-button add-indicator" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Add Indicator"))),__.push('<\/a>    <a class="ui-button translate" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-indicators.htm","Translate"))),__.push('<\/a>    <a id ="translation-status"><\/a>   ')),__.push("  <\/td> <\/tr>");return __});jQuery.template("scope-unit",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<tr class="unit" data-unit-index="'),typeof i!="undefined"&&i!=null&&__.push($.encode(typeof i=="function"?i.call($item):i)),__.push('" data-unit-key="'),typeof unit.key!="undefined"&&unit.key!=null&&__.push($.encode(typeof unit.key=="function"?unit.key.call($item):unit.key)),__.push('">  <td class="name">   <input type="text" class="unit-name" value="'),typeof unit.name!="undefined"&&unit.name!=null&&__.push($.encode(typeof unit.name=="function"?unit.name.call($item):unit.name)),__.push('"/>  <\/td>  <td class="ratio">   <input type="text" class="unit-ratio" value="'),typeof unit.ratio!="undefined"&&unit.ratio!=null&&__.push($.encode(typeof unit.ratio=="function"?unit.ratio.call($item):unit.ratio)),__.push('"/>  <\/td>  <td class="regions">     <div id="regions">    '),typeof unit.formattedRegions!="undefined"&&unit.formattedRegions!=null&&$.each(typeof unit.formattedRegions=="function"?unit.formattedRegions.call($item):unit.formattedRegions,function(i,r){with(this)__.push('      <span id="'),typeof r.id!="undefined"&&r.id!=null&&__.push($.encode(typeof r.id=="function"?r.id.call($item):r.id)),__.push('">'),typeof r.name!="undefined"&&r.name!=null&&__.push($.encode(typeof r.name=="function"?r.name.call($item):r.name)),__.push("<\/span>"),typeof(i<unit.formattedRegions.length-1?", ":"")!="undefined"&&(i<unit.formattedRegions.length-1?", ":"")!=null&&__.push($.encode(typeof(i<unit.formattedRegions.length-1?", ":"")=="function"?(i<unit.formattedRegions.length-1?", ":"").call($item):i<unit.formattedRegions.length-1?", ":"")),__.push("    ")}),__.push('   <\/div>   <a href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-unit.htm","Select"))),__.push('<\/a>  <\/td>  <td class="actions">   <a class="delete-unit" href="#">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/datanetwork/scope-unit.htm","Delete"))),__.push("<\/a>  <\/td> <\/tr>");return __});jQuery.template("submission-view",function(n,t){var r=n,__=[],i=t.data;with(i)__.push('<tr class="submission-view">   <td colspan="7">    <div class="submission-content">    <\/div>   <\/td>  <\/tr>');return __});jQuery.template("submit-indicator-comment",function(n,$item){var i=n,__=[],t=$item.data;with(t)__.push('<tr class="indicator-comment">   <td colspan="4">    <div class="project-comments item-comment">     <div class="flat-reply">      '),!0&&(__=__.concat($item.nest("indicator-comment",null))),__.push("     <\/div>    <\/div>   <\/td>  <\/tr>");return __})