//>>built define(["dijit","dojo","dojox","dojo/require!dojox/storage/Provider,dojox/storage/manager"],function(_1,_2,_3){ _2.provide("dojox.storage.LocalStorageProvider"); _2.require("dojox.storage.Provider"); _2.require("dojox.storage.manager"); _2.declare("dojox.storage.LocalStorageProvider",[_3.storage.Provider],{store:null,initialize:function(){ this.store=localStorage; this.initialized=true; _3.storage.manager.loaded(); },isAvailable:function(){ return typeof localStorage!="undefined"; },put:function(_4,_5,_6,_7){ this._assertIsValidKey(_4); _7=_7||this.DEFAULT_NAMESPACE; this._assertIsValidNamespace(_7); var _8=this.getFullKey(_4,_7); _5=_2.toJson(_5); try{ this.store.setItem(_8,_5); if(_6){ _6(this.SUCCESS,_4,null,_7); } } catch(e){ if(_6){ _6(this.FAILED,_4,e.toString(),_7); } } },get:function(_9,_a){ this._assertIsValidKey(_9); _a=_a||this.DEFAULT_NAMESPACE; this._assertIsValidNamespace(_a); _9=this.getFullKey(_9,_a); return _2.fromJson(this.store.getItem(_9)); },getKeys:function(_b){ _b=_b||this.DEFAULT_NAMESPACE; this._assertIsValidNamespace(_b); _b="__"+_b+"_"; var _c=[]; for(var i=0;i_19.length){ return false; } return _19.substring(0,_1a.length)===_1a; },_assertIsValidNamespace:function(_1b){ if(this.isValidNamespace(_1b)===false){ throw new Error("Invalid namespace given: "+_1b); } },_assertIsValidKey:function(key){ if(this.isValidKey(key)===false){ throw new Error("Invalid key given: "+key); } }}); _3.storage.manager.register("dojox.storage.LocalStorageProvider",new _3.storage.LocalStorageProvider()); });