text: /*! ramp-theme-canada 21-11-2014 12:57:38 : v. 4.0.0 
   * 
   * RAMP GIS viewer - Dragonfly; Sample of an implementation of RAMP with Canada.ca Theme 
   **/
  require(["dojo/parser","dojo/on","dojo/topic","dojo/request/script","dojo/request/xhr","dojo/_base/array","esri/config","ramp/map","ramp/basemapSelector","ramp/maptips","ramp/datagrid","ramp/navigation","ramp/filterManager","ramp/bookmarkLink","utils/url","ramp/featureHighlighter","ramp/ramp","ramp/globalStorage","ramp/gui","ramp/eventManager","ramp/advancedToolbar","ramp/theme","utils/util","utils/prototype!","utils/functionMangler!"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){"use strict";function x(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.src=dojoConfig.fullPluginPath+a,b.appendChild(c)}function y(){c.subscribe(t.Map.ALL_LAYERS_LOADED,function(){w.subscribeAll([t.BasemapSelector.UI_COMPLETE,t.FilterManager.UI_COMPLETE],function(){n.subscribeAndUpdate()});var a=h.getMap().__LOD.level?h.getMap().__LOD.level:0;l.init(a),p.init(),j.init(),i.init(),m.init(),RAMP.config.advancedToolbar.enabled&&u.init(),k.init(),v.tooltipster()}),h.init(),l.construct(),v.tooltipster()}function z(a){var b,d=$("li.map-toolbar-item #advanced-toggle").parent();r.init(a),g.defaults.io.proxyUrl=RAMP.config.proxyUrl,g.defaults.io.corsDetection=!0,RAMP.config.advancedToolbar.enabled?d.removeClass("wb-invisible"):d.remove(),b=RAMP.config.plugins,b&&f.map(b,function(a){x(a)}),n.updateConfig(window.location.pathname.split("/").last()),c.subscribe(t.GUI.UPDATE_COMPLETE,function(){y()}),s.load(null,null,function(){}),n.createUI(),q.loadStrings()}w.checkConsole(),a.parse();var A,B,C=$("html").attr("lang");"en"!==C&&"fr"!==C&&(C="en"),i18n.init({lng:C+"-CA",load:"current",fallbackLng:!1}),A="fr"===C?"config.fr.json":"config.en.json",B=e(A,{handleAs:"json"}),B.then(function(a){if(RAMP.configServiceURL){var b=new o(require.toUrl(document.location)),c=b.queryObject.keys;if(c&&""!==c){var e=RAMP.configServiceURL+"docs/"+$("html").attr("lang")+"/"+c,g=d.get(e,{jsonp:"callback",timeout:2e3});g.then(function(b){f.forEach(b,function(b){w.mergeRecursive(a,b)}),z(a)},function(a){})}else z(a)}else z(a)},function(a){})});