//>>built
define("dojox/dtl/_Templated","dojo/aspect dojo/_base/declare ./_base dijit/_TemplatedMixin dojo/dom-construct dojo/cache dojo/_base/array dojo/string dojo/parser".split(" "),function(n,p,l,q,k,r,t,u,d){return p("dojox.dtl._Templated",q,{_dijitTemplateCompat:!1,buildRendering:function(){var b;if(!this.domNode||this._template){if(!this._template){var a=this.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);a instanceof l.Template?this._template=a:b=a.cloneNode(!0)}if(!b){a=
new l._Context(this);this._created||delete a._getter;var c=k.toDom(this._template.render(a));if(1!==c.nodeType&&3!==c.nodeType){a=0;for(var f=c.childNodes.length;a<f&&(b=c.childNodes[a],1!=b.nodeType);++a);}else b=c}this._attachTemplateNodes(b);if(this.widgetsInTemplate){if("[dojoType]"!=d._query){var e=d._query;var v=d._attrName;d._query="[dojoType]";d._attrName="dojoType"}c=this._startupWidgets=d.parse(b,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}});e&&(d._query=
e,d._attrName=v);for(a=0;a<c.length;a++)this._processTemplateNode(c[a],function(g,h){return g[h]},function(g,h,m){return h in g?n.after(g,h,m,!0):g.on(h,m,!0)})}this.domNode&&(k.place(b,this.domNode,"before"),this.destroyDescendants(),k.destroy(this.domNode));this.domNode=b;this._fillContent(this.srcNodeRef)}},_processTemplateNode:function(b,a,c){if(this.widgetsInTemplate&&(a(b,"dojoType")||a(b,"data-dojo-type")))return!0;this.inherited(arguments)},_templateCache:{},getCachedTemplate:function(b,a,
c){var f=this._templateCache,e=a||b;if(f[e])return f[e];a=u.trim(a||r(b,{sanitize:!0}));this._dijitTemplateCompat&&(c||a.match(/\$\{([^\}]+)\}/g))&&(a=this._stringRepl(a));return c||!a.match(/\{[{%]([^\}]+)[%}]\}/g)?f[e]=k.toDom(a):f[e]=new l.Template(a)},render:function(){this.buildRendering()},startup:function(){t.forEach(this._startupWidgets,function(b){b&&!b._started&&b.startup&&b.startup()});this.inherited(arguments)}})});