//>>built
define("dojox/highlight/widget/Code","dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/query,dojo/dom-class,dojo/dom-attr,dojo/dom-construct,dojo/request/xhr,dijit/_Widget,dijit/_Templated,dojox/highlight".split(","),function(f,c,g,e,h,i,j,k,l,m){return f("dojox.highlight.widget.Code",[l,m],{url:"",range:null,style:"",listType:"1",lang:"",templateString:'<div class="formatted" style="${style}"><div class="titleBar"></div><ol type="${listType}" dojoAttachPoint="codeList" class="numbers"></ol><div style="display:none" dojoAttachPoint="containerNode"></div></div>',
postCreate:function(){this.inherited(arguments);this.url?k(this.url,{}).then(c.hitch(this,"_populate"),c.hitch(this,"_loadError")):this._populate(this.containerNode.innerHTML)},_populate:function(a){this.containerNode.innerHTML="<pre><code class='"+this.lang+"'>"+a.replace(/\</g,"&lt;")+"</code></pre>";e("pre > code",this.containerNode).forEach(dojox.highlight.init);a=this.containerNode.innerHTML.split("\n");g.forEach(a,function(a,b){var d=j.create("li");h.add(d,0!==b%2?"even":"odd");a=("<pre><code>"+
a+"&nbsp;</code></pre>").replace(/\t/g," &nbsp; ");d.innerHTML=a;this.codeList.appendChild(d)},this);this._lines=e("li",this.codeList);this._updateView()},setRange:function(a){if(a instanceof Array)this.range=a,this._updateView()},_updateView:function(){if(this.range){var a=this.range;this._lines.style({display:"none"}).filter(function(c,b){return b+1>=a[0]&&b+1<=a[1]}).style({display:""});i.set(this.codeList,"start",a[0])}},_loadError:function(){}})});