//>>built
define("dojox/mobile/app/_base",["dijit","dojo","dojox","dojo/require!dijit/_base,dijit/_WidgetBase,dojox/mobile,dojox/mobile/parser,dojox/mobile/Button,dojox/mobile/app/_event,dojox/mobile/app/_Widget,dojox/mobile/app/StageController,dojox/mobile/app/SceneController,dojox/mobile/app/SceneAssistant,dojox/mobile/app/AlertDialog,dojox/mobile/app/List,dojox/mobile/app/ListSelector,dojox/mobile/app/TextBox,dojox/mobile/app/ImageView,dojox/mobile/app/ImageThumbView"],function(t,a,g){a.provide("dojox.mobile.app._base");
a.experimental("dojox.mobile.app._base");a.require("dijit._base");a.require("dijit._WidgetBase");a.require("dojox.mobile");a.require("dojox.mobile.parser");a.require("dojox.mobile.Button");a.require("dojox.mobile.app._event");a.require("dojox.mobile.app._Widget");a.require("dojox.mobile.app.StageController");a.require("dojox.mobile.app.SceneController");a.require("dojox.mobile.app.SceneAssistant");a.require("dojox.mobile.app.AlertDialog");a.require("dojox.mobile.app.List");a.require("dojox.mobile.app.ListSelector");
a.require("dojox.mobile.app.TextBox");a.require("dojox.mobile.app.ImageView");a.require("dojox.mobile.app.ImageThumbView");(function(){function h(b,c){do{var e=b.pop();if(e.source)var d=e.source;else if(e.module)d=a.moduleUrl(e.module)+".js";else return}while(0<b.length&&m[d]);1>b.length&&m[d]?c():a.xhrGet({url:d,sync:!1}).addCallbacks(function(q){a.eval(q);m[d]=!0;0<b.length?h(b,c):c()},function(){})}var f,k,m={},p,l=[],n=function(){f=new g.mobile.app.StageController(p);var b={id:"com.test.app",
version:"1.0.0",initialScene:"main"};a.global.appInfo&&a.mixin(b,a.global.appInfo);k=g.mobile.app.info=b;k.title&&(a.query("head title")[0]||a.create("title",{},a.query("head")[0]),document.title=k.title);f.pushScene(k.initialScene)},r=function(){var b=!1;a.global.BackButton&&(BackButton.override(),a.connect(document,"backKeyDown",function(c){a.publish("/dojox/mobile/app/goback")}),b=!0);b&&a.addClass(a.body(),"mblNativeBack")};a.mixin(g.mobile.app,{init:function(b){p=b||a.body();g.mobile.app.STAGE_CONTROLLER_ACTIVE=
!0;a.subscribe("/dojox/mobile/app/goback",function(){f.popScene()});a.subscribe("/dojox/mobile/app/alert",function(c){g.mobile.app.getActiveSceneController().showAlertDialog(c)});a.subscribe("/dojox/mobile/app/pushScene",function(c,e){f.pushScene(c,e||{})});a.xhrGet({url:"view-resources.json",load:function(c){var e=[];if(c){l=c=a.fromJson(c);for(var d=0;d<c.length;d++)c[d].scene||e.push(c[d])}0<e.length?h(e,n):n()},error:n});r()},getActiveSceneController:function(){return f.getActiveSceneController()},
getStageController:function(){return f},loadResources:function(b,c){h(b,c)},loadResourcesForScene:function(b,c){for(var e=[],d=0;d<l.length;d++)l[d].scene==b&&e.push(l[d]);0<e.length?h(e,c):c()},resolveTemplate:function(b){return"app/views/"+b+"/"+b+"-scene.html"},resolveAssistant:function(b){return"app/assistants/"+b+"-assistant.js"}})})()});