//>>built
define("dojox/mobile/bookmarkable","dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/_base/window dojo/hash dijit/registry ./TransitionEvent ./View ./viewRegistry".split(" "),function(h,r,t,u,v,m,w,x,k){var c={settingHash:!1,transitionInfo:[],getTransitionInfo:function(a,b){return this.transitionInfo[a.replace(/^#/,"")+":"+b.replace(/^#/,"")]},addTransitionInfo:function(a,b,d){this.transitionInfo[a.replace(/^#/,"")+":"+b.replace(/^#/,"")]=d},findTransitionViews:function(a){if(!a)return[];
a=m.byId(a.replace(/^#/,""));if(!a)return[];for(var b=a.getParent();b;b=b.getParent())b.isVisible&&!b.isVisible()&&(a=b);return[a.getShowingView(),a]},onHashChange:function(a){this.settingHash?this.settingHash=!1:(a=this.handleFragIds(a),a.hashchange=!0,a.moveTo&&(new w(u.body(),a)).dispatch())},handleFragIds:function(a){var b;if(a){a=a.replace(/^#/,"").split(/,/);for(var d=0;d<a.length;d++){var g=m.byId(a[d]);if(g&&!g.isVisible()){for(var n=!0,l=k.getParentView(g);l;l=k.getParentView(l))if(-1===
h.indexOf(a,l.id)){n=!1;break}if(n){var e=this.findTransitionViews(a[d]);2===e.length&&(b=a[d])}else h.forEach(g.getSiblingViews(),function(p){p.domNode.style.display=p===g?"":"none"})}}}else b=k.initialView.id,e=this.findTransitionViews(b);if(e){var f=this.getTransitionInfo(e[0].id,e[1].id);var q=1;f||(f=this.getTransitionInfo(e[1].id,e[0].id),q=-1)}return{moveTo:b?"#"+b:null,transitionDir:f?f.transitionDir*q:1,transition:f?f.transition:"none"}},setFragIds:function(a){a=h.filter(k.getViews(),function(b){return b.isVisible()});
this.settingHash=!0;v(h.map(a,function(b){return b.id}).join(","))}};r.subscribe("/dojo/hashchange",null,function(){c.onHashChange.apply(c,arguments)});t.extend(x,{getTransitionInfo:function(){c.getTransitionInfo.apply(c,arguments)},addTransitionInfo:function(){c.addTransitionInfo.apply(c,arguments)},handleFragIds:function(){c.handleFragIds.apply(c,arguments)},setFragIds:function(){c.setFragIds.apply(c,arguments)}});return c});