define(function(require,exports,module){var _=require("thirdparty/lodash");function UrlParams(){this._store={}}UrlParams.prototype.parse=function(url){var queryString="",urlParams,p,self=this;self._store={},url?-1!==url.indexOf("?")&&(queryString=url.substring(url.indexOf("?")+1)):queryString=window.document.location.search.substring(1),(queryString=queryString.trimRight())&&(urlParams=queryString.split("&")).forEach(function(param){(p=param.split("="))[1]=p[1]||"",self._store[decodeURIComponent(p[0])]=decodeURIComponent(p[1])})},UrlParams.prototype.put=function(name,value){this._store[name]=value},UrlParams.prototype.get=function(name){return this._store[name]},UrlParams.prototype.remove=function(name){delete this._store[name]},UrlParams.prototype.isEmpty=function(name){return _.isEmpty(this._store)},UrlParams.prototype.toString=function(){var strs=[],self=this;return _.forEach(this._store,function(value,key){strs.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}),strs.join("&")},exports.UrlParams=UrlParams});