//>>built
define("dijit/layout/ContentPane","dojo/_base/kernel,dojo/_base/lang,../_Widget,../_Container,./_ContentPaneResizeMixin,dojo/string,dojo/html,dojo/i18n!../nls/loading,dojo/_base/array,dojo/_base/declare,dojo/_base/Deferred,dojo/dom,dojo/dom-attr,dojo/dom-construct,dojo/_base/xhr,dojo/i18n,dojo/when".split(","),function(g,d,k,l,m,i,j,t,e,n,h,o,u,p,q,r,s){return n("dijit.layout.ContentPane",[k,l,m],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:g._scopeName,preventCache:!1,preload:!1,
refreshOnShow:!1,loadingMessage:"<span class='dijitContentPaneLoading'><span class='dijitInline dijitIconLoading'></span>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'><span class='dijitInline dijitIconError'></span>${errorState}</span>",isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,create:function(a,c){if((!a||!a.template)&&c&&!("href"in a)&&!("content"in a)){for(var c=o.byId(c),b=c.ownerDocument.createDocumentFragment();c.firstChild;)b.appendChild(c.firstChild);
a=d.delegate(a,{content:b})}this.inherited(arguments,[a,c])},postMixInProperties:function(){this.inherited(arguments);var a=r.getLocalization("dijit","loading",this.lang);this.loadingMessage=i.substitute(this.loadingMessage,a);this.errorMessage=i.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&e.forEach(this._contentSetter.parseResults,
function(a){if(!a._started&&!a._destroyed&&d.isFunction(a.startup))a.startup(),a._started=!0},this)},_startChildren:function(){e.forEach(this.getChildren(),function(a){if(!a._started&&!a._destroyed&&d.isFunction(a.startup))a.startup(),a._started=!0});this._contentSetter&&e.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&d.isFunction(a.startup))a.startup(),a._started=!0},this)},setHref:function(a){g.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
"","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new h(d.hitch(this,"cancel"));this.onLoadDeferred.then(d.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){g.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href",
"");this.cancel();this.onLoadDeferred=new h(d.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(d.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||
this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new h(d.hitch(this,"cancel"));this.onLoadDeferred.then(d.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,c={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
d.isObject(this.ioArgs)&&d.mixin(c,this.ioArgs);var b=this._xhrDfd=(this.ioMethod||q.get)(c),f;b.then(function(b){f=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(c){a._onError("Content",c)}},function(c){b.canceled||a._onError("Download",c);delete a._xhrDfd;return c}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return f});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(c){}},_onUnloadHandler:function(){this._set("isLoaded",
!1);try{this.onUnload()}catch(a){}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var c=this._contentSetter;e.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});c&&(e.forEach(c.parseResults,function(b){if(!b._destroyed)b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0}),delete c.parseResults);a||p.empty(this.containerNode);delete this._singleChild},_setContent:function(a,c){this.destroyDescendants();
var b=this._contentSetter;if(!(b&&b instanceof j._ContentSetter))b=this._contentSetter=new j._ContentSetter({node:this.containerNode,_onError:d.hitch(this,this._onError),onContentError:d.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(b){}})});var f=d.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||
{}),f=b.set(d.isObject(a)&&a.domNode?a.domNode:a,f),e=this;return s(f&&f.then?f:b.parseDeferred,function(){delete e._contentSetterParams;c||(e._started&&(e._startChildren(),e._scheduleLayout()),e._onLoadHandler(a))})},_onError:function(a,c,b){this.onLoadDeferred.reject(c);a=this["on"+a+"Error"].call(this,c);b||a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},
onDownloadEnd:function(){}})});