@angular/http
Advanced tools
Comparing version 2.0.0-rc.3 to 2.0.0-rc.4
@@ -1,2 +0,2 @@ | ||
var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("rxjs/Observable"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/Observable","@angular/platform-browser"],factory):factory((global.ng=global.ng||{},global.ng.http=global.ng.http||{}),global.ng.core,global.Rx,global.ng.platformBrowser)}(this,function(exports,_angular_core,rxjs_Observable,_angular_platformBrowser){"use strict";function isPresent(obj){return void 0!==obj&&null!==obj}function isBlank(obj){return void 0===obj||null===obj}function isString(obj){return"string"==typeof obj}function isArray(obj){return Array.isArray(obj)}function isJsObject(o){return null!==o&&("function"==typeof o||"object"==typeof o)}function getSymbolIterator(){if(isBlank(_symbolIterator))if(isPresent(globalScope.Symbol)&&isPresent(Symbol.iterator))_symbolIterator=Symbol.iterator;else for(var keys=Object.getOwnPropertyNames(Map.prototype),i=0;i<keys.length;++i){var key=keys[i];"entries"!==key&&"size"!==key&&Map.prototype[key]===Map.prototype.entries&&(_symbolIterator=key)}return _symbolIterator}function _getJsonpConnections(){return null===_jsonpConnections&&(_jsonpConnections=global$1[JSONP_HOME]={}),_jsonpConnections}function _flattenArray(source,target){if(isPresent(source))for(var i=0;i<source.length;i++){var item=source[i];isArray(item)?_flattenArray(item,target):target.push(item)}return target}function isListLikeIterable(obj){return isJsObject(obj)?isArray(obj)||!(obj instanceof Map$1)&&getSymbolIterator()in obj:!1}function iterateListLike(obj,fn){if(isArray(obj))for(var i=0;i<obj.length;i++)fn(obj[i]);else for(var item,iterator=obj[getSymbolIterator()]();!(item=iterator.next()).done;)fn(item.value)}function makeTypeError(message){return new TypeError(message)}function normalizeMethodName(method){if(isString(method)){var originalMethod=method;if(method=method.replace(/(\w)(\w*)/g,function(g0,g1,g2){return g1.toUpperCase()+g2.toLowerCase()}),method=exports.RequestMethod[method],"number"!=typeof method)throw makeTypeError('Invalid request method. The method "'+originalMethod+'" is not supported.')}return method}function getResponseURL(xhr){return"responseURL"in xhr?xhr.responseURL:/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())?xhr.getResponseHeader("X-Request-URL"):void 0}function paramParser(rawParams){void 0===rawParams&&(rawParams="");var map=new Map$1;if(rawParams.length>0){var params=rawParams.split("&");params.forEach(function(param){var split=param.split("="),key=split[0],val=split[1],list=isPresent(map.get(key))?map.get(key):[];list.push(val),map.set(key,list)})}return map}function httpRequest(backend,request){return backend.createConnection(request).response}function mergeOptions(defaultOpts,providedOpts,method,url){var newOptions=defaultOpts;return isPresent(providedOpts)?newOptions.merge(new RequestOptions({method:providedOpts.method||method,url:providedOpts.url||url,search:providedOpts.search,headers:providedOpts.headers,body:providedOpts.body,withCredentials:providedOpts.withCredentials})):isPresent(method)?newOptions.merge(new RequestOptions({method:method,url:url})):newOptions.merge(new RequestOptions({url:url}))}function httpFactory(xhrBackend,requestOptions){return new Http(xhrBackend,requestOptions)}function jsonpFactory(jsonpBackend,requestOptions){return new Jsonp(jsonpBackend,requestOptions)}var globalScope;globalScope="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:global:window;var global$1=globalScope;global$1.assert=function(){};var StringWrapper=function(){function StringWrapper(){}return StringWrapper.fromCharCode=function(code){return String.fromCharCode(code)},StringWrapper.charCodeAt=function(s,index){return s.charCodeAt(index)},StringWrapper.split=function(s,regExp){return s.split(regExp)},StringWrapper.equals=function(s,s2){return s===s2},StringWrapper.stripLeft=function(s,charVal){if(s&&s.length){for(var pos=0,i=0;i<s.length&&s[i]==charVal;i++)pos++;s=s.substring(pos)}return s},StringWrapper.stripRight=function(s,charVal){if(s&&s.length){for(var pos=s.length,i=s.length-1;i>=0&&s[i]==charVal;i--)pos--;s=s.substring(0,pos)}return s},StringWrapper.replace=function(s,from,replace){return s.replace(from,replace)},StringWrapper.replaceAll=function(s,from,replace){return s.replace(from,replace)},StringWrapper.slice=function(s,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),s.slice(from,null===to?void 0:to)},StringWrapper.replaceAllMapped=function(s,from,cb){return s.replace(from,function(){for(var matches=[],_i=0;_i<arguments.length;_i++)matches[_i-0]=arguments[_i];return matches.splice(-2,2),cb(matches)})},StringWrapper.contains=function(s,substr){return-1!=s.indexOf(substr)},StringWrapper.compare=function(a,b){return b>a?-1:a>b?1:0},StringWrapper}(),Json=function(){function Json(){}return Json.parse=function(s){return global$1.JSON.parse(s)},Json.stringify=function(data){return global$1.JSON.stringify(data,null,2)},Json}(),_symbolIterator=null,_nextRequestId=0,JSONP_HOME="__ng_jsonp__",_jsonpConnections=null,BrowserJsonp=function(){function BrowserJsonp(){}return BrowserJsonp.prototype.build=function(url){var node=document.createElement("script");return node.src=url,node},BrowserJsonp.prototype.nextRequestID=function(){return"__req"+_nextRequestId++},BrowserJsonp.prototype.requestCallback=function(id){return JSONP_HOME+"."+id+".finished"},BrowserJsonp.prototype.exposeConnection=function(id,connection){var connections=_getJsonpConnections();connections[id]=connection},BrowserJsonp.prototype.removeConnection=function(id){var connections=_getJsonpConnections();connections[id]=null},BrowserJsonp.prototype.send=function(node){document.body.appendChild(node)},BrowserJsonp.prototype.cleanup=function(node){node.parentNode&&node.parentNode.removeChild(node)},BrowserJsonp}();BrowserJsonp.decorators=[{type:_angular_core.Injectable}];var BrowserXhr=function(){function BrowserXhr(){}return BrowserXhr.prototype.build=function(){return new XMLHttpRequest},BrowserXhr}();BrowserXhr.decorators=[{type:_angular_core.Injectable}],BrowserXhr.ctorParameters=[],exports.RequestMethod,function(RequestMethod){RequestMethod[RequestMethod.Get=0]="Get",RequestMethod[RequestMethod.Post=1]="Post",RequestMethod[RequestMethod.Put=2]="Put",RequestMethod[RequestMethod.Delete=3]="Delete",RequestMethod[RequestMethod.Options=4]="Options",RequestMethod[RequestMethod.Head=5]="Head",RequestMethod[RequestMethod.Patch=6]="Patch"}(exports.RequestMethod||(exports.RequestMethod={})),exports.ReadyState,function(ReadyState){ReadyState[ReadyState.Unsent=0]="Unsent",ReadyState[ReadyState.Open=1]="Open",ReadyState[ReadyState.HeadersReceived=2]="HeadersReceived",ReadyState[ReadyState.Loading=3]="Loading",ReadyState[ReadyState.Done=4]="Done",ReadyState[ReadyState.Cancelled=5]="Cancelled"}(exports.ReadyState||(exports.ReadyState={})),exports.ResponseType,function(ResponseType){ResponseType[ResponseType.Basic=0]="Basic",ResponseType[ResponseType.Cors=1]="Cors",ResponseType[ResponseType.Default=2]="Default",ResponseType[ResponseType.Error=3]="Error",ResponseType[ResponseType.Opaque=4]="Opaque"}(exports.ResponseType||(exports.ResponseType={}));var ContentType;!function(ContentType){ContentType[ContentType.NONE=0]="NONE",ContentType[ContentType.JSON=1]="JSON",ContentType[ContentType.FORM=2]="FORM",ContentType[ContentType.FORM_DATA=3]="FORM_DATA",ContentType[ContentType.TEXT=4]="TEXT",ContentType[ContentType.BLOB=5]="BLOB",ContentType[ContentType.ARRAY_BUFFER=6]="ARRAY_BUFFER"}(ContentType||(ContentType={}));var Map$1=global$1.Map,Set=global$1.Set,createMapFromPairs=function(){try{if(1===new Map$1([[1,2]]).size)return function(pairs){return new Map$1(pairs)}}catch(e){}return function(pairs){for(var map=new Map$1,i=0;i<pairs.length;i++){var pair=pairs[i];map.set(pair[0],pair[1])}return map}}(),createMapFromMap=function(){try{if(new Map$1(new Map$1))return function(m){return new Map$1(m)}}catch(e){}return function(m){var map=new Map$1;return m.forEach(function(v,k){map.set(k,v)}),map}}(),_clearValues=function(){return(new Map$1).keys().next?function(m){for(var k,keyIterator=m.keys();!(k=keyIterator.next()).done;)m.set(k.value,null)}:function(m){m.forEach(function(v,k){m.set(k,null)})}}(),_arrayFromMap=function(){try{if((new Map$1).values().next)return function(m,getValues){return getValues?Array.from(m.values()):Array.from(m.keys())}}catch(e){}return function(m,getValues){var res=ListWrapper.createFixedSize(m.size),i=0;return m.forEach(function(v,k){res[i]=getValues?v:k,i++}),res}}(),MapWrapper=function(){function MapWrapper(){}return MapWrapper.clone=function(m){return createMapFromMap(m)},MapWrapper.createFromStringMap=function(stringMap){var result=new Map$1;for(var prop in stringMap)result.set(prop,stringMap[prop]);return result},MapWrapper.toStringMap=function(m){var r={};return m.forEach(function(v,k){return r[k]=v}),r},MapWrapper.createFromPairs=function(pairs){return createMapFromPairs(pairs)},MapWrapper.clearValues=function(m){_clearValues(m)},MapWrapper.iterable=function(m){return m},MapWrapper.keys=function(m){return _arrayFromMap(m,!1)},MapWrapper.values=function(m){return _arrayFromMap(m,!0)},MapWrapper}(),StringMapWrapper=function(){function StringMapWrapper(){}return StringMapWrapper.create=function(){return{}},StringMapWrapper.contains=function(map,key){return map.hasOwnProperty(key)},StringMapWrapper.get=function(map,key){return map.hasOwnProperty(key)?map[key]:void 0},StringMapWrapper.set=function(map,key,value){map[key]=value},StringMapWrapper.keys=function(map){return Object.keys(map)},StringMapWrapper.values=function(map){return Object.keys(map).reduce(function(r,a){return r.push(map[a]),r},[])},StringMapWrapper.isEmpty=function(map){for(var prop in map)return!1;return!0},StringMapWrapper.delete=function(map,key){delete map[key]},StringMapWrapper.forEach=function(map,callback){for(var prop in map)map.hasOwnProperty(prop)&&callback(map[prop],prop)},StringMapWrapper.merge=function(m1,m2){var m={};for(var attr in m1)m1.hasOwnProperty(attr)&&(m[attr]=m1[attr]);for(var attr in m2)m2.hasOwnProperty(attr)&&(m[attr]=m2[attr]);return m},StringMapWrapper.equals=function(m1,m2){var k1=Object.keys(m1),k2=Object.keys(m2);if(k1.length!=k2.length)return!1;for(var key,i=0;i<k1.length;i++)if(key=k1[i],m1[key]!==m2[key])return!1;return!0},StringMapWrapper}(),ListWrapper=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(size){return new Array(size)},ListWrapper.createGrowableSize=function(size){return new Array(size)},ListWrapper.clone=function(array){return array.slice(0)},ListWrapper.forEachWithIndex=function(array,fn){for(var i=0;i<array.length;i++)fn(array[i],i)},ListWrapper.first=function(array){return array?array[0]:null},ListWrapper.last=function(array){return array&&0!=array.length?array[array.length-1]:null},ListWrapper.indexOf=function(array,value,startIndex){return void 0===startIndex&&(startIndex=0),array.indexOf(value,startIndex)},ListWrapper.contains=function(list,el){return-1!==list.indexOf(el)},ListWrapper.reversed=function(array){var a=ListWrapper.clone(array);return a.reverse()},ListWrapper.concat=function(a,b){return a.concat(b)},ListWrapper.insert=function(list,index,value){list.splice(index,0,value)},ListWrapper.removeAt=function(list,index){var res=list[index];return list.splice(index,1),res},ListWrapper.removeAll=function(list,items){for(var i=0;i<items.length;++i){var index=list.indexOf(items[i]);list.splice(index,1)}},ListWrapper.remove=function(list,el){var index=list.indexOf(el);return index>-1?(list.splice(index,1),!0):!1},ListWrapper.clear=function(list){list.length=0},ListWrapper.isEmpty=function(list){return 0==list.length},ListWrapper.fill=function(list,value,start,end){void 0===start&&(start=0),void 0===end&&(end=null),list.fill(value,start,null===end?list.length:end)},ListWrapper.equals=function(a,b){if(a.length!=b.length)return!1;for(var i=0;i<a.length;++i)if(a[i]!==b[i])return!1;return!0},ListWrapper.slice=function(l,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),l.slice(from,null===to?void 0:to)},ListWrapper.splice=function(l,from,length){return l.splice(from,length)},ListWrapper.sort=function(l,compareFn){isPresent(compareFn)?l.sort(compareFn):l.sort()},ListWrapper.toString=function(l){return l.toString()},ListWrapper.toJSON=function(l){return JSON.stringify(l)},ListWrapper.maximum=function(list,predicate){if(0==list.length)return null;for(var solution=null,maxValue=-1/0,index=0;index<list.length;index++){var candidate=list[index];if(!isBlank(candidate)){var candidateValue=predicate(candidate);candidateValue>maxValue&&(solution=candidate,maxValue=candidateValue)}}return solution},ListWrapper.flatten=function(list){var target=[];return _flattenArray(list,target),target},ListWrapper.addAll=function(list,source){for(var i=0;i<source.length;i++)list.push(source[i])},ListWrapper}();!function(){var test=new Set([1,2,3]);return 3===test.size?function(lst){return new Set(lst)}:function(lst){var res=new Set(lst);if(res.size!==lst.length)for(var i=0;i<lst.length;i++)res.add(lst[i]);return res}}();var BaseException=function(_super){function BaseException(message){void 0===message&&(message="--"),_super.call(this,message),this.message=message,this.stack=new Error(message).stack}return __extends(BaseException,_super),BaseException.prototype.toString=function(){return this.message},BaseException}(Error),Headers=function(){function Headers(headers){var _this=this;return headers instanceof Headers?(this._headersMap=headers._headersMap,void 0):(this._headersMap=new Map$1,isBlank(headers)||StringMapWrapper.forEach(headers,function(v,k){_this._headersMap.set(k,isListLikeIterable(v)?v:[v])}),void 0)}return Headers.fromResponseHeaderString=function(headersString){return headersString.trim().split("\n").map(function(val){return val.split(":")}).map(function(_a){var key=_a[0],parts=_a.slice(1);return[key.trim(),parts.join(":").trim()]}).reduce(function(headers,_a){var key=_a[0],value=_a[1];return!headers.set(key,value)&&headers},new Headers)},Headers.prototype.append=function(name,value){var mapName=this._headersMap.get(name),list=isListLikeIterable(mapName)?mapName:[];list.push(value),this._headersMap.set(name,list)},Headers.prototype.delete=function(name){this._headersMap.delete(name)},Headers.prototype.forEach=function(fn){this._headersMap.forEach(fn)},Headers.prototype.get=function(header){return ListWrapper.first(this._headersMap.get(header))},Headers.prototype.has=function(header){return this._headersMap.has(header)},Headers.prototype.keys=function(){return MapWrapper.keys(this._headersMap)},Headers.prototype.set=function(header,value){var list=[];if(isListLikeIterable(value)){var pushValue=value.join(",");list.push(pushValue)}else list.push(value);this._headersMap.set(header,list)},Headers.prototype.values=function(){return MapWrapper.values(this._headersMap)},Headers.prototype.toJSON=function(){var serializableHeaders={};return this._headersMap.forEach(function(values,name){var list=[];iterateListLike(values,function(val){return list=ListWrapper.concat(list,val.split(","))}),serializableHeaders[name]=list}),serializableHeaders},Headers.prototype.getAll=function(header){var headers=this._headersMap.get(header);return isListLikeIterable(headers)?headers:[]},Headers.prototype.entries=function(){throw new BaseException('"entries" method is not implemented on Headers class')},Headers}(),ResponseOptions=function(){function ResponseOptions(_a){var _b=void 0===_a?{}:_a,body=_b.body,status=_b.status,headers=_b.headers,statusText=_b.statusText,type=_b.type,url=_b.url;this.body=isPresent(body)?body:null,this.status=isPresent(status)?status:null,this.headers=isPresent(headers)?headers:null,this.statusText=isPresent(statusText)?statusText:null,this.type=isPresent(type)?type:null,this.url=isPresent(url)?url:null}return ResponseOptions.prototype.merge=function(options){return new ResponseOptions({body:isPresent(options)&&isPresent(options.body)?options.body:this.body,status:isPresent(options)&&isPresent(options.status)?options.status:this.status,headers:isPresent(options)&&isPresent(options.headers)?options.headers:this.headers,statusText:isPresent(options)&&isPresent(options.statusText)?options.statusText:this.statusText,type:isPresent(options)&&isPresent(options.type)?options.type:this.type,url:isPresent(options)&&isPresent(options.url)?options.url:this.url})},ResponseOptions}(),BaseResponseOptions=function(_super){function BaseResponseOptions(){_super.call(this,{status:200,statusText:"Ok",type:exports.ResponseType.Default,headers:new Headers})}return __extends(BaseResponseOptions,_super),BaseResponseOptions}(ResponseOptions);BaseResponseOptions.decorators=[{type:_angular_core.Injectable}],BaseResponseOptions.ctorParameters=[];var ConnectionBackend=function(){function ConnectionBackend(){}return ConnectionBackend}(),Connection=function(){function Connection(){}return Connection}(),XSRFStrategy=function(){function XSRFStrategy(){}return XSRFStrategy}(),isSuccess=function(status){return status>=200&&300>status},Response=function(){function Response(responseOptions){this._body=responseOptions.body,this.status=responseOptions.status,this.ok=this.status>=200&&this.status<=299,this.statusText=responseOptions.statusText,this.headers=responseOptions.headers,this.type=responseOptions.type,this.url=responseOptions.url}return Response.prototype.blob=function(){throw new BaseException('"blob()" method not implemented on Response superclass')},Response.prototype.json=function(){var jsonResponse;return isJsObject(this._body)?jsonResponse=this._body:isString(this._body)&&(jsonResponse=Json.parse(this._body)),jsonResponse},Response.prototype.text=function(){return this._body.toString()},Response.prototype.arrayBuffer=function(){throw new BaseException('"arrayBuffer()" method not implemented on Response superclass')},Response.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},Response}(),JSONP_ERR_NO_CALLBACK="JSONP injected script did not invoke callback.",JSONP_ERR_WRONG_METHOD="JSONP requests must use GET request method.",JSONPConnection=function(){function JSONPConnection(){}return JSONPConnection}(),JSONPConnection_=function(_super){function JSONPConnection_(req,_dom,baseResponseOptions){var _this=this;if(_super.call(this),this._dom=_dom,this.baseResponseOptions=baseResponseOptions,this._finished=!1,req.method!==exports.RequestMethod.Get)throw makeTypeError(JSONP_ERR_WRONG_METHOD);this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){_this.readyState=exports.ReadyState.Loading;var id=_this._id=_dom.nextRequestID();_dom.exposeConnection(id,_this);var callback=_dom.requestCallback(_this._id),url=req.url;url.indexOf("=JSONP_CALLBACK&")>-1?url=StringWrapper.replace(url,"=JSONP_CALLBACK&","="+callback+"&"):url.lastIndexOf("=JSONP_CALLBACK")===url.length-"=JSONP_CALLBACK".length&&(url=url.substring(0,url.length-"=JSONP_CALLBACK".length)+("="+callback));var script=_this._script=_dom.build(url),onLoad=function(){if(_this.readyState!==exports.ReadyState.Cancelled){if(_this.readyState=exports.ReadyState.Done,_dom.cleanup(script),!_this._finished){var responseOptions_1=new ResponseOptions({body:JSONP_ERR_NO_CALLBACK,type:exports.ResponseType.Error,url:url});return isPresent(baseResponseOptions)&&(responseOptions_1=baseResponseOptions.merge(responseOptions_1)),responseObserver.error(new Response(responseOptions_1)),void 0}var responseOptions=new ResponseOptions({body:_this._responseData,url:url});isPresent(_this.baseResponseOptions)&&(responseOptions=_this.baseResponseOptions.merge(responseOptions)),responseObserver.next(new Response(responseOptions)),responseObserver.complete()}},onError=function(error){if(_this.readyState!==exports.ReadyState.Cancelled){_this.readyState=exports.ReadyState.Done,_dom.cleanup(script);var responseOptions=new ResponseOptions({body:error.message,type:exports.ResponseType.Error});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))}};return script.addEventListener("load",onLoad),script.addEventListener("error",onError),_dom.send(script),function(){_this.readyState=exports.ReadyState.Cancelled,script.removeEventListener("load",onLoad),script.removeEventListener("error",onError),isPresent(script)&&_this._dom.cleanup(script)}})}return __extends(JSONPConnection_,_super),JSONPConnection_.prototype.finished=function(data){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==exports.ReadyState.Cancelled&&(this._responseData=data)},JSONPConnection_}(JSONPConnection),JSONPBackend=function(_super){function JSONPBackend(){_super.apply(this,arguments)}return __extends(JSONPBackend,_super),JSONPBackend}(ConnectionBackend),JSONPBackend_=function(_super){function JSONPBackend_(_browserJSONP,_baseResponseOptions){_super.call(this),this._browserJSONP=_browserJSONP,this._baseResponseOptions=_baseResponseOptions}return __extends(JSONPBackend_,_super),JSONPBackend_.prototype.createConnection=function(request){return new JSONPConnection_(request,this._browserJSONP,this._baseResponseOptions)},JSONPBackend_}(JSONPBackend);JSONPBackend_.decorators=[{type:_angular_core.Injectable}],JSONPBackend_.ctorParameters=[{type:BrowserJsonp},{type:ResponseOptions}];var XSSI_PREFIX=/^\)\]\}',?\n/,XHRConnection=function(){function XHRConnection(req,browserXHR,baseResponseOptions){var _this=this;this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){var _xhr=browserXHR.build();_xhr.open(exports.RequestMethod[req.method].toUpperCase(),req.url),isPresent(req.withCredentials)&&(_xhr.withCredentials=req.withCredentials);var onLoad=function(){var body=isPresent(_xhr.response)?_xhr.response:_xhr.responseText;isString(body)&&(body=body.replace(XSSI_PREFIX,""));var headers=Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders()),url=getResponseURL(_xhr),status=1223===_xhr.status?204:_xhr.status;0===status&&(status=body?200:0);var statusText=_xhr.statusText||"OK",responseOptions=new ResponseOptions({body:body,status:status,headers:headers,statusText:statusText,url:url});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions));var response=new Response(responseOptions);return response.ok=isSuccess(status),response.ok?(responseObserver.next(response),responseObserver.complete(),void 0):(responseObserver.error(response),void 0)},onError=function(err){var responseOptions=new ResponseOptions({body:err,type:exports.ResponseType.Error,status:_xhr.status,statusText:_xhr.statusText});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))};return _this.setDetectedContentType(req,_xhr),isPresent(req.headers)&&req.headers.forEach(function(values,name){return _xhr.setRequestHeader(name,values.join(","))}),_xhr.addEventListener("load",onLoad),_xhr.addEventListener("error",onError),_xhr.send(_this.request.getBody()),function(){_xhr.removeEventListener("load",onLoad),_xhr.removeEventListener("error",onError),_xhr.abort()}})}return XHRConnection.prototype.setDetectedContentType=function(req,_xhr){if(!isPresent(req.headers)||!isPresent(req.headers.get("Content-Type")))switch(req.contentType){case ContentType.NONE:break;case ContentType.JSON:_xhr.setRequestHeader("Content-Type","application/json");break;case ContentType.FORM:_xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");break;case ContentType.TEXT:_xhr.setRequestHeader("Content-Type","text/plain");break;case ContentType.BLOB:var blob=req.blob();blob.type&&_xhr.setRequestHeader("Content-Type",blob.type)}},XHRConnection}(),CookieXSRFStrategy=function(){function CookieXSRFStrategy(_cookieName,_headerName){void 0===_cookieName&&(_cookieName="XSRF-TOKEN"),void 0===_headerName&&(_headerName="X-XSRF-TOKEN"),this._cookieName=_cookieName,this._headerName=_headerName}return CookieXSRFStrategy.prototype.configureRequest=function(req){var xsrfToken=_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie(this._cookieName);xsrfToken&&!req.headers.has(this._headerName)&&req.headers.set(this._headerName,xsrfToken)},CookieXSRFStrategy}(),XHRBackend=function(){function XHRBackend(_browserXHR,_baseResponseOptions,_xsrfStrategy){this._browserXHR=_browserXHR,this._baseResponseOptions=_baseResponseOptions,this._xsrfStrategy=_xsrfStrategy}return XHRBackend.prototype.createConnection=function(request){return this._xsrfStrategy.configureRequest(request),new XHRConnection(request,this._browserXHR,this._baseResponseOptions)},XHRBackend}();XHRBackend.decorators=[{type:_angular_core.Injectable}],XHRBackend.ctorParameters=[{type:BrowserXhr},{type:ResponseOptions},{type:XSRFStrategy}];var URLSearchParams=function(){function URLSearchParams(rawParams){void 0===rawParams&&(rawParams=""),this.rawParams=rawParams,this.paramsMap=paramParser(rawParams)}return URLSearchParams.prototype.clone=function(){var clone=new URLSearchParams;return clone.appendAll(this),clone},URLSearchParams.prototype.has=function(param){return this.paramsMap.has(param)},URLSearchParams.prototype.get=function(param){var storedParam=this.paramsMap.get(param);return isListLikeIterable(storedParam)?ListWrapper.first(storedParam):null},URLSearchParams.prototype.getAll=function(param){var mapParam=this.paramsMap.get(param);return isPresent(mapParam)?mapParam:[]},URLSearchParams.prototype.set=function(param,val){var mapParam=this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list),list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.setAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list),list.push(value[0]),_this.paramsMap.set(param,list)})},URLSearchParams.prototype.append=function(param,val){var mapParam=this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.appendAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){for(var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[],i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.replaceAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list);for(var i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.toString=function(){var paramsList=[];return this.paramsMap.forEach(function(values,k){values.forEach(function(v){return paramsList.push(k+"="+encodeURIComponent(v))})}),paramsList.join("&")},URLSearchParams.prototype.delete=function(param){this.paramsMap.delete(param)},URLSearchParams}(),RequestOptions=function(){function RequestOptions(_a){var _b=void 0===_a?{}:_a,method=_b.method,headers=_b.headers,body=_b.body,url=_b.url,search=_b.search,withCredentials=_b.withCredentials;this.method=isPresent(method)?normalizeMethodName(method):null,this.headers=isPresent(headers)?headers:null,this.body=isPresent(body)?body:null,this.url=isPresent(url)?url:null,this.search=isPresent(search)?isString(search)?new URLSearchParams(search):search:null,this.withCredentials=isPresent(withCredentials)?withCredentials:null}return RequestOptions.prototype.merge=function(options){return new RequestOptions({method:isPresent(options)&&isPresent(options.method)?options.method:this.method,headers:isPresent(options)&&isPresent(options.headers)?options.headers:this.headers,body:isPresent(options)&&isPresent(options.body)?options.body:this.body,url:isPresent(options)&&isPresent(options.url)?options.url:this.url,search:isPresent(options)&&isPresent(options.search)?isString(options.search)?new URLSearchParams(options.search):options.search.clone():this.search,withCredentials:isPresent(options)&&isPresent(options.withCredentials)?options.withCredentials:this.withCredentials})},RequestOptions}(),BaseRequestOptions=function(_super){function BaseRequestOptions(){_super.call(this,{method:exports.RequestMethod.Get,headers:new Headers})}return __extends(BaseRequestOptions,_super),BaseRequestOptions}(RequestOptions);BaseRequestOptions.decorators=[{type:_angular_core.Injectable}],BaseRequestOptions.ctorParameters=[];var Request=function(){function Request(requestOptions){var url=requestOptions.url;if(this.url=requestOptions.url,isPresent(requestOptions.search)){var search=requestOptions.search.toString();if(search.length>0){var prefix="?";StringWrapper.contains(this.url,"?")&&(prefix="&"==this.url[this.url.length-1]?"":"&"),this.url=url+prefix+search}}this._body=requestOptions.body,this.contentType=this.detectContentType(),this.method=normalizeMethodName(requestOptions.method),this.headers=new Headers(requestOptions.headers),this.withCredentials=requestOptions.withCredentials}return Request.prototype.text=function(){return isPresent(this._body)?this._body.toString():""},Request.prototype.json=function(){return isPresent(this._body)?JSON.stringify(this._body):""},Request.prototype.arrayBuffer=function(){if(this._body instanceof ArrayBuffer)return this._body;throw"The request body isn't an array buffer"},Request.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw"The request body isn't either a blob or an array buffer"},Request.prototype.detectContentType=function(){return null==this._body?ContentType.NONE:this._body instanceof URLSearchParams?ContentType.FORM:this._body instanceof FormData?ContentType.FORM_DATA:this._body instanceof Blob?ContentType.BLOB:this._body instanceof ArrayBuffer?ContentType.ARRAY_BUFFER:this._body&&"object"==typeof this._body?ContentType.JSON:ContentType.TEXT},Request.prototype.getBody=function(){switch(this.contentType){case ContentType.JSON:return this.json();case ContentType.FORM:return this.text();case ContentType.FORM_DATA:return this._body;case ContentType.TEXT:return this.text();case ContentType.BLOB:return this.blob();case ContentType.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},Request}(),noop$1=function(){},w="object"==typeof window?window:noop$1,FormData=w.FormData||noop$1,Blob=w.Blob||noop$1,ArrayBuffer=w.ArrayBuffer||noop$1,Http=function(){function Http(_backend,_defaultOptions){this._backend=_backend,this._defaultOptions=_defaultOptions}return Http.prototype.request=function(url,options){var responseObservable;if(isString(url))responseObservable=httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url)));else{if(!(url instanceof Request))throw makeTypeError("First argument must be a url string or Request instance.");responseObservable=httpRequest(this._backend,url)}return responseObservable},Http.prototype.get=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url)))},Http.prototype.post=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Post,url)))},Http.prototype.put=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Put,url))) | ||
},Http.prototype.delete=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Delete,url)))},Http.prototype.patch=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Patch,url)))},Http.prototype.head=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Head,url)))},Http}();Http.decorators=[{type:_angular_core.Injectable}],Http.ctorParameters=[{type:ConnectionBackend},{type:RequestOptions}];var Jsonp=function(_super){function Jsonp(backend,defaultOptions){_super.call(this,backend,defaultOptions)}return __extends(Jsonp,_super),Jsonp.prototype.request=function(url,options){var responseObservable;if(isString(url)&&(url=new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url))),!(url instanceof Request))throw makeTypeError("First argument must be a url string or Request instance.");return url.method!==exports.RequestMethod.Get&&makeTypeError("JSONP requests must use GET request method."),responseObservable=httpRequest(this._backend,url)},Jsonp}(Http);Jsonp.decorators=[{type:_angular_core.Injectable}],Jsonp.ctorParameters=[{type:ConnectionBackend},{type:RequestOptions}];var HTTP_PROVIDERS=[{provide:Http,useFactory:httpFactory,deps:[XHRBackend,RequestOptions]},BrowserXhr,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},XHRBackend,{provide:XSRFStrategy,useValue:new CookieXSRFStrategy}],HTTP_BINDINGS=HTTP_PROVIDERS,JSONP_PROVIDERS=[{provide:Jsonp,useFactory:jsonpFactory,deps:[JSONPBackend,RequestOptions]},BrowserJsonp,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},{provide:JSONPBackend,useClass:JSONPBackend_}],JSON_BINDINGS=JSONP_PROVIDERS;exports.HTTP_PROVIDERS=HTTP_PROVIDERS,exports.httpFactory=httpFactory,exports.HTTP_BINDINGS=HTTP_BINDINGS,exports.JSONP_PROVIDERS=JSONP_PROVIDERS,exports.JSON_BINDINGS=JSON_BINDINGS,exports.BrowserXhr=BrowserXhr,exports.JSONPBackend=JSONPBackend,exports.JSONPConnection=JSONPConnection,exports.CookieXSRFStrategy=CookieXSRFStrategy,exports.XHRBackend=XHRBackend,exports.XHRConnection=XHRConnection,exports.BaseRequestOptions=BaseRequestOptions,exports.RequestOptions=RequestOptions,exports.BaseResponseOptions=BaseResponseOptions,exports.ResponseOptions=ResponseOptions,exports.Headers=Headers,exports.Http=Http,exports.Jsonp=Jsonp,exports.Connection=Connection,exports.ConnectionBackend=ConnectionBackend,exports.XSRFStrategy=XSRFStrategy,exports.Request=Request,exports.Response=Response,exports.URLSearchParams=URLSearchParams}); | ||
var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("rxjs/Observable"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define(["exports","@angular/core","rxjs/Observable","@angular/platform-browser"],factory):factory((global.ng=global.ng||{},global.ng.http=global.ng.http||{}),global.ng.core,global.Rx,global.ng.platformBrowser)}(this,function(exports,_angular_core,rxjs_Observable,_angular_platformBrowser){"use strict";function isPresent(obj){return void 0!==obj&&null!==obj}function isBlank(obj){return void 0===obj||null===obj}function isString(obj){return"string"==typeof obj}function isArray(obj){return Array.isArray(obj)}function isJsObject(o){return null!==o&&("function"==typeof o||"object"==typeof o)}function getSymbolIterator(){if(isBlank(_symbolIterator))if(isPresent(globalScope.Symbol)&&isPresent(Symbol.iterator))_symbolIterator=Symbol.iterator;else for(var keys=Object.getOwnPropertyNames(Map.prototype),i=0;i<keys.length;++i){var key=keys[i];"entries"!==key&&"size"!==key&&Map.prototype[key]===Map.prototype.entries&&(_symbolIterator=key)}return _symbolIterator}function _getJsonpConnections(){return null===_jsonpConnections&&(_jsonpConnections=global$1[JSONP_HOME]={}),_jsonpConnections}function _flattenArray(source,target){if(isPresent(source))for(var i=0;i<source.length;i++){var item=source[i];isArray(item)?_flattenArray(item,target):target.push(item)}return target}function isListLikeIterable(obj){return!!isJsObject(obj)&&(isArray(obj)||!(obj instanceof Map$1)&&getSymbolIterator()in obj)}function iterateListLike(obj,fn){if(isArray(obj))for(var i=0;i<obj.length;i++)fn(obj[i]);else for(var item,iterator=obj[getSymbolIterator()]();!(item=iterator.next()).done;)fn(item.value)}function makeTypeError(message){return new TypeError(message)}function normalizeMethodName(method){if(isString(method)){var originalMethod=method;if(method=method.replace(/(\w)(\w*)/g,function(g0,g1,g2){return g1.toUpperCase()+g2.toLowerCase()}),method=exports.RequestMethod[method],"number"!=typeof method)throw makeTypeError('Invalid request method. The method "'+originalMethod+'" is not supported.')}return method}function getResponseURL(xhr){return"responseURL"in xhr?xhr.responseURL:/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())?xhr.getResponseHeader("X-Request-URL"):void 0}function paramParser(rawParams){void 0===rawParams&&(rawParams="");var map=new Map$1;if(rawParams.length>0){var params=rawParams.split("&");params.forEach(function(param){var split=param.split("=",2),key=split[0],val=split[1],list=isPresent(map.get(key))?map.get(key):[];list.push(val),map.set(key,list)})}return map}function standardEncoding(v){return encodeURIComponent(v).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,";").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function httpRequest(backend,request){return backend.createConnection(request).response}function mergeOptions(defaultOpts,providedOpts,method,url){var newOptions=defaultOpts;return isPresent(providedOpts)?newOptions.merge(new RequestOptions({method:providedOpts.method||method,url:providedOpts.url||url,search:providedOpts.search,headers:providedOpts.headers,body:providedOpts.body,withCredentials:providedOpts.withCredentials})):isPresent(method)?newOptions.merge(new RequestOptions({method:method,url:url})):newOptions.merge(new RequestOptions({url:url}))}function httpFactory(xhrBackend,requestOptions){return new Http(xhrBackend,requestOptions)}function jsonpFactory(jsonpBackend,requestOptions){return new Jsonp(jsonpBackend,requestOptions)}var globalScope;globalScope="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:global:window;var global$1=globalScope;global$1.assert=function(condition){};var StringWrapper=function(){function StringWrapper(){}return StringWrapper.fromCharCode=function(code){return String.fromCharCode(code)},StringWrapper.charCodeAt=function(s,index){return s.charCodeAt(index)},StringWrapper.split=function(s,regExp){return s.split(regExp)},StringWrapper.equals=function(s,s2){return s===s2},StringWrapper.stripLeft=function(s,charVal){if(s&&s.length){for(var pos=0,i=0;i<s.length&&s[i]==charVal;i++)pos++;s=s.substring(pos)}return s},StringWrapper.stripRight=function(s,charVal){if(s&&s.length){for(var pos=s.length,i=s.length-1;i>=0&&s[i]==charVal;i--)pos--;s=s.substring(0,pos)}return s},StringWrapper.replace=function(s,from,replace){return s.replace(from,replace)},StringWrapper.replaceAll=function(s,from,replace){return s.replace(from,replace)},StringWrapper.slice=function(s,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),s.slice(from,null===to?void 0:to)},StringWrapper.replaceAllMapped=function(s,from,cb){return s.replace(from,function(){for(var matches=[],_i=0;_i<arguments.length;_i++)matches[_i-0]=arguments[_i];return matches.splice(-2,2),cb(matches)})},StringWrapper.contains=function(s,substr){return s.indexOf(substr)!=-1},StringWrapper.compare=function(a,b){return a<b?-1:a>b?1:0},StringWrapper}(),Json=function(){function Json(){}return Json.parse=function(s){return global$1.JSON.parse(s)},Json.stringify=function(data){return global$1.JSON.stringify(data,null,2)},Json}(),_symbolIterator=null,_nextRequestId=0,JSONP_HOME="__ng_jsonp__",_jsonpConnections=null,BrowserJsonp=function(){function BrowserJsonp(){}return BrowserJsonp.prototype.build=function(url){var node=document.createElement("script");return node.src=url,node},BrowserJsonp.prototype.nextRequestID=function(){return"__req"+_nextRequestId++},BrowserJsonp.prototype.requestCallback=function(id){return JSONP_HOME+"."+id+".finished"},BrowserJsonp.prototype.exposeConnection=function(id,connection){var connections=_getJsonpConnections();connections[id]=connection},BrowserJsonp.prototype.removeConnection=function(id){var connections=_getJsonpConnections();connections[id]=null},BrowserJsonp.prototype.send=function(node){document.body.appendChild(node)},BrowserJsonp.prototype.cleanup=function(node){node.parentNode&&node.parentNode.removeChild(node)},BrowserJsonp}();BrowserJsonp.decorators=[{type:_angular_core.Injectable}];var BrowserXhr=function(){function BrowserXhr(){}return BrowserXhr.prototype.build=function(){return new XMLHttpRequest},BrowserXhr}();BrowserXhr.decorators=[{type:_angular_core.Injectable}],BrowserXhr.ctorParameters=[],exports.RequestMethod,function(RequestMethod){RequestMethod[RequestMethod.Get=0]="Get",RequestMethod[RequestMethod.Post=1]="Post",RequestMethod[RequestMethod.Put=2]="Put",RequestMethod[RequestMethod.Delete=3]="Delete",RequestMethod[RequestMethod.Options=4]="Options",RequestMethod[RequestMethod.Head=5]="Head",RequestMethod[RequestMethod.Patch=6]="Patch"}(exports.RequestMethod||(exports.RequestMethod={})),exports.ReadyState,function(ReadyState){ReadyState[ReadyState.Unsent=0]="Unsent",ReadyState[ReadyState.Open=1]="Open",ReadyState[ReadyState.HeadersReceived=2]="HeadersReceived",ReadyState[ReadyState.Loading=3]="Loading",ReadyState[ReadyState.Done=4]="Done",ReadyState[ReadyState.Cancelled=5]="Cancelled"}(exports.ReadyState||(exports.ReadyState={})),exports.ResponseType,function(ResponseType){ResponseType[ResponseType.Basic=0]="Basic",ResponseType[ResponseType.Cors=1]="Cors",ResponseType[ResponseType.Default=2]="Default",ResponseType[ResponseType.Error=3]="Error",ResponseType[ResponseType.Opaque=4]="Opaque"}(exports.ResponseType||(exports.ResponseType={}));var ContentType;!function(ContentType){ContentType[ContentType.NONE=0]="NONE",ContentType[ContentType.JSON=1]="JSON",ContentType[ContentType.FORM=2]="FORM",ContentType[ContentType.FORM_DATA=3]="FORM_DATA",ContentType[ContentType.TEXT=4]="TEXT",ContentType[ContentType.BLOB=5]="BLOB",ContentType[ContentType.ARRAY_BUFFER=6]="ARRAY_BUFFER"}(ContentType||(ContentType={}));var Map$1=global$1.Map,Set=global$1.Set,createMapFromPairs=function(){try{if(1===new Map$1([[1,2]]).size)return function(pairs){return new Map$1(pairs)}}catch(e){}return function(pairs){for(var map=new Map$1,i=0;i<pairs.length;i++){var pair=pairs[i];map.set(pair[0],pair[1])}return map}}(),createMapFromMap=function(){try{if(new Map$1(new Map$1))return function(m){return new Map$1(m)}}catch(e){}return function(m){var map=new Map$1;return m.forEach(function(v,k){map.set(k,v)}),map}}(),_clearValues=function(){return(new Map$1).keys().next?function(m){for(var k,keyIterator=m.keys();!(k=keyIterator.next()).done;)m.set(k.value,null)}:function(m){m.forEach(function(v,k){m.set(k,null)})}}(),_arrayFromMap=function(){try{if((new Map$1).values().next)return function(m,getValues){return getValues?Array.from(m.values()):Array.from(m.keys())}}catch(e){}return function(m,getValues){var res=ListWrapper.createFixedSize(m.size),i=0;return m.forEach(function(v,k){res[i]=getValues?v:k,i++}),res}}(),MapWrapper=function(){function MapWrapper(){}return MapWrapper.clone=function(m){return createMapFromMap(m)},MapWrapper.createFromStringMap=function(stringMap){var result=new Map$1;for(var prop in stringMap)result.set(prop,stringMap[prop]);return result},MapWrapper.toStringMap=function(m){var r={};return m.forEach(function(v,k){return r[k]=v}),r},MapWrapper.createFromPairs=function(pairs){return createMapFromPairs(pairs)},MapWrapper.clearValues=function(m){_clearValues(m)},MapWrapper.iterable=function(m){return m},MapWrapper.keys=function(m){return _arrayFromMap(m,!1)},MapWrapper.values=function(m){return _arrayFromMap(m,!0)},MapWrapper}(),StringMapWrapper=function(){function StringMapWrapper(){}return StringMapWrapper.create=function(){return{}},StringMapWrapper.contains=function(map,key){return map.hasOwnProperty(key)},StringMapWrapper.get=function(map,key){return map.hasOwnProperty(key)?map[key]:void 0},StringMapWrapper.set=function(map,key,value){map[key]=value},StringMapWrapper.keys=function(map){return Object.keys(map)},StringMapWrapper.values=function(map){return Object.keys(map).reduce(function(r,a){return r.push(map[a]),r},[])},StringMapWrapper.isEmpty=function(map){for(var prop in map)return!1;return!0},StringMapWrapper.delete=function(map,key){delete map[key]},StringMapWrapper.forEach=function(map,callback){for(var prop in map)map.hasOwnProperty(prop)&&callback(map[prop],prop)},StringMapWrapper.merge=function(m1,m2){var m={};for(var attr in m1)m1.hasOwnProperty(attr)&&(m[attr]=m1[attr]);for(var attr in m2)m2.hasOwnProperty(attr)&&(m[attr]=m2[attr]);return m},StringMapWrapper.equals=function(m1,m2){var k1=Object.keys(m1),k2=Object.keys(m2);if(k1.length!=k2.length)return!1;for(var key,i=0;i<k1.length;i++)if(key=k1[i],m1[key]!==m2[key])return!1;return!0},StringMapWrapper}(),ListWrapper=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(size){return new Array(size)},ListWrapper.createGrowableSize=function(size){return new Array(size)},ListWrapper.clone=function(array){return array.slice(0)},ListWrapper.forEachWithIndex=function(array,fn){for(var i=0;i<array.length;i++)fn(array[i],i)},ListWrapper.first=function(array){return array?array[0]:null},ListWrapper.last=function(array){return array&&0!=array.length?array[array.length-1]:null},ListWrapper.indexOf=function(array,value,startIndex){return void 0===startIndex&&(startIndex=0),array.indexOf(value,startIndex)},ListWrapper.contains=function(list,el){return list.indexOf(el)!==-1},ListWrapper.reversed=function(array){var a=ListWrapper.clone(array);return a.reverse()},ListWrapper.concat=function(a,b){return a.concat(b)},ListWrapper.insert=function(list,index,value){list.splice(index,0,value)},ListWrapper.removeAt=function(list,index){var res=list[index];return list.splice(index,1),res},ListWrapper.removeAll=function(list,items){for(var i=0;i<items.length;++i){var index=list.indexOf(items[i]);list.splice(index,1)}},ListWrapper.remove=function(list,el){var index=list.indexOf(el);return index>-1&&(list.splice(index,1),!0)},ListWrapper.clear=function(list){list.length=0},ListWrapper.isEmpty=function(list){return 0==list.length},ListWrapper.fill=function(list,value,start,end){void 0===start&&(start=0),void 0===end&&(end=null),list.fill(value,start,null===end?list.length:end)},ListWrapper.equals=function(a,b){if(a.length!=b.length)return!1;for(var i=0;i<a.length;++i)if(a[i]!==b[i])return!1;return!0},ListWrapper.slice=function(l,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),l.slice(from,null===to?void 0:to)},ListWrapper.splice=function(l,from,length){return l.splice(from,length)},ListWrapper.sort=function(l,compareFn){isPresent(compareFn)?l.sort(compareFn):l.sort()},ListWrapper.toString=function(l){return l.toString()},ListWrapper.toJSON=function(l){return JSON.stringify(l)},ListWrapper.maximum=function(list,predicate){if(0==list.length)return null;for(var solution=null,maxValue=-(1/0),index=0;index<list.length;index++){var candidate=list[index];if(!isBlank(candidate)){var candidateValue=predicate(candidate);candidateValue>maxValue&&(solution=candidate,maxValue=candidateValue)}}return solution},ListWrapper.flatten=function(list){var target=[];return _flattenArray(list,target),target},ListWrapper.addAll=function(list,source){for(var i=0;i<source.length;i++)list.push(source[i])},ListWrapper}(),BaseException=(function(){var test=new Set([1,2,3]);return 3===test.size?function(lst){return new Set(lst)}:function(lst){var res=new Set(lst);if(res.size!==lst.length)for(var i=0;i<lst.length;i++)res.add(lst[i]);return res}}(),function(_super){function BaseException(message){void 0===message&&(message="--"),_super.call(this,message),this.message=message,this.stack=new Error(message).stack}return __extends(BaseException,_super),BaseException.prototype.toString=function(){return this.message},BaseException}(Error)),Headers=function(){function Headers(headers){var _this=this;return headers instanceof Headers?void(this._headersMap=headers._headersMap):(this._headersMap=new Map$1,void(isBlank(headers)||StringMapWrapper.forEach(headers,function(v,k){_this._headersMap.set(k,isListLikeIterable(v)?v:[v])})))}return Headers.fromResponseHeaderString=function(headersString){return headersString.trim().split("\n").map(function(val){return val.split(":")}).map(function(_a){var key=_a[0],parts=_a.slice(1);return[key.trim(),parts.join(":").trim()]}).reduce(function(headers,_a){var key=_a[0],value=_a[1];return!headers.set(key,value)&&headers},new Headers)},Headers.prototype.append=function(name,value){var mapName=this._headersMap.get(name),list=isListLikeIterable(mapName)?mapName:[];list.push(value),this._headersMap.set(name,list)},Headers.prototype.delete=function(name){this._headersMap.delete(name)},Headers.prototype.forEach=function(fn){this._headersMap.forEach(fn)},Headers.prototype.get=function(header){return ListWrapper.first(this._headersMap.get(header))},Headers.prototype.has=function(header){return this._headersMap.has(header)},Headers.prototype.keys=function(){return MapWrapper.keys(this._headersMap)},Headers.prototype.set=function(header,value){var list=[];if(isListLikeIterable(value)){var pushValue=value.join(",");list.push(pushValue)}else list.push(value);this._headersMap.set(header,list)},Headers.prototype.values=function(){return MapWrapper.values(this._headersMap)},Headers.prototype.toJSON=function(){var serializableHeaders={};return this._headersMap.forEach(function(values,name){var list=[];iterateListLike(values,function(val){return list=ListWrapper.concat(list,val.split(","))}),serializableHeaders[name]=list}),serializableHeaders},Headers.prototype.getAll=function(header){var headers=this._headersMap.get(header);return isListLikeIterable(headers)?headers:[]},Headers.prototype.entries=function(){throw new BaseException('"entries" method is not implemented on Headers class')},Headers}(),ResponseOptions=function(){function ResponseOptions(_a){var _b=void 0===_a?{}:_a,body=_b.body,status=_b.status,headers=_b.headers,statusText=_b.statusText,type=_b.type,url=_b.url;this.body=isPresent(body)?body:null,this.status=isPresent(status)?status:null,this.headers=isPresent(headers)?headers:null,this.statusText=isPresent(statusText)?statusText:null,this.type=isPresent(type)?type:null,this.url=isPresent(url)?url:null}return ResponseOptions.prototype.merge=function(options){return new ResponseOptions({body:isPresent(options)&&isPresent(options.body)?options.body:this.body,status:isPresent(options)&&isPresent(options.status)?options.status:this.status,headers:isPresent(options)&&isPresent(options.headers)?options.headers:this.headers,statusText:isPresent(options)&&isPresent(options.statusText)?options.statusText:this.statusText,type:isPresent(options)&&isPresent(options.type)?options.type:this.type,url:isPresent(options)&&isPresent(options.url)?options.url:this.url})},ResponseOptions}(),BaseResponseOptions=function(_super){function BaseResponseOptions(){_super.call(this,{status:200,statusText:"Ok",type:exports.ResponseType.Default,headers:new Headers})}return __extends(BaseResponseOptions,_super),BaseResponseOptions}(ResponseOptions);BaseResponseOptions.decorators=[{type:_angular_core.Injectable}],BaseResponseOptions.ctorParameters=[];var ConnectionBackend=function(){function ConnectionBackend(){}return ConnectionBackend}(),Connection=function(){function Connection(){}return Connection}(),XSRFStrategy=function(){function XSRFStrategy(){}return XSRFStrategy}(),isSuccess=function(status){return status>=200&&status<300},Response=function(){function Response(responseOptions){this._body=responseOptions.body,this.status=responseOptions.status,this.ok=this.status>=200&&this.status<=299,this.statusText=responseOptions.statusText,this.headers=responseOptions.headers,this.type=responseOptions.type,this.url=responseOptions.url}return Response.prototype.blob=function(){throw new BaseException('"blob()" method not implemented on Response superclass')},Response.prototype.json=function(){var jsonResponse;return isJsObject(this._body)?jsonResponse=this._body:isString(this._body)&&(jsonResponse=Json.parse(this._body)),jsonResponse},Response.prototype.text=function(){return this._body.toString()},Response.prototype.arrayBuffer=function(){throw new BaseException('"arrayBuffer()" method not implemented on Response superclass')},Response.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},Response}(),JSONP_ERR_NO_CALLBACK="JSONP injected script did not invoke callback.",JSONP_ERR_WRONG_METHOD="JSONP requests must use GET request method.",JSONPConnection=function(){function JSONPConnection(){}return JSONPConnection}(),JSONPConnection_=function(_super){function JSONPConnection_(req,_dom,baseResponseOptions){var _this=this;if(_super.call(this),this._dom=_dom,this.baseResponseOptions=baseResponseOptions,this._finished=!1,req.method!==exports.RequestMethod.Get)throw makeTypeError(JSONP_ERR_WRONG_METHOD);this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){_this.readyState=exports.ReadyState.Loading;var id=_this._id=_dom.nextRequestID();_dom.exposeConnection(id,_this);var callback=_dom.requestCallback(_this._id),url=req.url;url.indexOf("=JSONP_CALLBACK&")>-1?url=StringWrapper.replace(url,"=JSONP_CALLBACK&","="+callback+"&"):url.lastIndexOf("=JSONP_CALLBACK")===url.length-"=JSONP_CALLBACK".length&&(url=url.substring(0,url.length-"=JSONP_CALLBACK".length)+("="+callback));var script=_this._script=_dom.build(url),onLoad=function(event){if(_this.readyState!==exports.ReadyState.Cancelled){if(_this.readyState=exports.ReadyState.Done,_dom.cleanup(script),!_this._finished){var responseOptions_1=new ResponseOptions({body:JSONP_ERR_NO_CALLBACK,type:exports.ResponseType.Error,url:url});return isPresent(baseResponseOptions)&&(responseOptions_1=baseResponseOptions.merge(responseOptions_1)),void responseObserver.error(new Response(responseOptions_1))}var responseOptions=new ResponseOptions({body:_this._responseData,url:url});isPresent(_this.baseResponseOptions)&&(responseOptions=_this.baseResponseOptions.merge(responseOptions)),responseObserver.next(new Response(responseOptions)),responseObserver.complete()}},onError=function(error){if(_this.readyState!==exports.ReadyState.Cancelled){_this.readyState=exports.ReadyState.Done,_dom.cleanup(script);var responseOptions=new ResponseOptions({body:error.message,type:exports.ResponseType.Error});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))}};return script.addEventListener("load",onLoad),script.addEventListener("error",onError),_dom.send(script),function(){_this.readyState=exports.ReadyState.Cancelled,script.removeEventListener("load",onLoad),script.removeEventListener("error",onError),isPresent(script)&&_this._dom.cleanup(script)}})}return __extends(JSONPConnection_,_super),JSONPConnection_.prototype.finished=function(data){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==exports.ReadyState.Cancelled&&(this._responseData=data)},JSONPConnection_}(JSONPConnection),JSONPBackend=function(_super){function JSONPBackend(){_super.apply(this,arguments)}return __extends(JSONPBackend,_super),JSONPBackend}(ConnectionBackend),JSONPBackend_=function(_super){function JSONPBackend_(_browserJSONP,_baseResponseOptions){_super.call(this),this._browserJSONP=_browserJSONP,this._baseResponseOptions=_baseResponseOptions}return __extends(JSONPBackend_,_super),JSONPBackend_.prototype.createConnection=function(request){return new JSONPConnection_(request,this._browserJSONP,this._baseResponseOptions)},JSONPBackend_}(JSONPBackend);JSONPBackend_.decorators=[{type:_angular_core.Injectable}],JSONPBackend_.ctorParameters=[{type:BrowserJsonp},{type:ResponseOptions}];var XSSI_PREFIX=/^\)\]\}',?\n/,XHRConnection=function(){function XHRConnection(req,browserXHR,baseResponseOptions){var _this=this;this.request=req,this.response=new rxjs_Observable.Observable(function(responseObserver){var _xhr=browserXHR.build();_xhr.open(exports.RequestMethod[req.method].toUpperCase(),req.url),isPresent(req.withCredentials)&&(_xhr.withCredentials=req.withCredentials);var onLoad=function(){var body=isPresent(_xhr.response)?_xhr.response:_xhr.responseText;isString(body)&&(body=body.replace(XSSI_PREFIX,""));var headers=Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders()),url=getResponseURL(_xhr),status=1223===_xhr.status?204:_xhr.status;0===status&&(status=body?200:0);var statusText=_xhr.statusText||"OK",responseOptions=new ResponseOptions({body:body,status:status,headers:headers,statusText:statusText,url:url});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions));var response=new Response(responseOptions);return response.ok=isSuccess(status),response.ok?(responseObserver.next(response),void responseObserver.complete()):void responseObserver.error(response)},onError=function(err){var responseOptions=new ResponseOptions({body:err,type:exports.ResponseType.Error,status:_xhr.status,statusText:_xhr.statusText});isPresent(baseResponseOptions)&&(responseOptions=baseResponseOptions.merge(responseOptions)),responseObserver.error(new Response(responseOptions))};return _this.setDetectedContentType(req,_xhr),isPresent(req.headers)&&req.headers.forEach(function(values,name){return _xhr.setRequestHeader(name,values.join(","))}),_xhr.addEventListener("load",onLoad),_xhr.addEventListener("error",onError),_xhr.send(_this.request.getBody()),function(){_xhr.removeEventListener("load",onLoad),_xhr.removeEventListener("error",onError),_xhr.abort()}})}return XHRConnection.prototype.setDetectedContentType=function(req,_xhr){if(!isPresent(req.headers)||!isPresent(req.headers.get("Content-Type")))switch(req.contentType){case ContentType.NONE:break;case ContentType.JSON:_xhr.setRequestHeader("Content-Type","application/json");break;case ContentType.FORM:_xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");break;case ContentType.TEXT:_xhr.setRequestHeader("Content-Type","text/plain");break;case ContentType.BLOB:var blob=req.blob();blob.type&&_xhr.setRequestHeader("Content-Type",blob.type)}},XHRConnection}(),CookieXSRFStrategy=function(){function CookieXSRFStrategy(_cookieName,_headerName){void 0===_cookieName&&(_cookieName="XSRF-TOKEN"),void 0===_headerName&&(_headerName="X-XSRF-TOKEN"),this._cookieName=_cookieName,this._headerName=_headerName}return CookieXSRFStrategy.prototype.configureRequest=function(req){var xsrfToken=_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie(this._cookieName);xsrfToken&&!req.headers.has(this._headerName)&&req.headers.set(this._headerName,xsrfToken)},CookieXSRFStrategy}(),XHRBackend=function(){function XHRBackend(_browserXHR,_baseResponseOptions,_xsrfStrategy){this._browserXHR=_browserXHR,this._baseResponseOptions=_baseResponseOptions,this._xsrfStrategy=_xsrfStrategy}return XHRBackend.prototype.createConnection=function(request){return this._xsrfStrategy.configureRequest(request),new XHRConnection(request,this._browserXHR,this._baseResponseOptions)},XHRBackend}();XHRBackend.decorators=[{type:_angular_core.Injectable}],XHRBackend.ctorParameters=[{type:BrowserXhr},{type:ResponseOptions},{type:XSRFStrategy}];var QueryEncoder=function(){function QueryEncoder(){}return QueryEncoder.prototype.encodeKey=function(k){return standardEncoding(k)},QueryEncoder.prototype.encodeValue=function(v){return standardEncoding(v)},QueryEncoder}(),URLSearchParams=function(){function URLSearchParams(rawParams,queryEncoder){void 0===rawParams&&(rawParams=""),void 0===queryEncoder&&(queryEncoder=new QueryEncoder),this.rawParams=rawParams,this.queryEncoder=queryEncoder,this.paramsMap=paramParser(rawParams)}return URLSearchParams.prototype.clone=function(){var clone=new URLSearchParams;return clone.appendAll(this),clone},URLSearchParams.prototype.has=function(param){return this.paramsMap.has(param)},URLSearchParams.prototype.get=function(param){var storedParam=this.paramsMap.get(param);return isListLikeIterable(storedParam)?ListWrapper.first(storedParam):null},URLSearchParams.prototype.getAll=function(param){var mapParam=this.paramsMap.get(param);return isPresent(mapParam)?mapParam:[]},URLSearchParams.prototype.set=function(param,val){var mapParam=this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list),list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.setAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list),list.push(value[0]),_this.paramsMap.set(param,list)})},URLSearchParams.prototype.append=function(param,val){var mapParam=this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];list.push(val),this.paramsMap.set(param,list)},URLSearchParams.prototype.appendAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){for(var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[],i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.replaceAll=function(searchParams){var _this=this;searchParams.paramsMap.forEach(function(value,param){var mapParam=_this.paramsMap.get(param),list=isPresent(mapParam)?mapParam:[];ListWrapper.clear(list);for(var i=0;i<value.length;++i)list.push(value[i]);_this.paramsMap.set(param,list)})},URLSearchParams.prototype.toString=function(){var _this=this,paramsList=[];return this.paramsMap.forEach(function(values,k){values.forEach(function(v){return paramsList.push(_this.queryEncoder.encodeKey(k)+"="+_this.queryEncoder.encodeValue(v))})}),paramsList.join("&")},URLSearchParams.prototype.delete=function(param){this.paramsMap.delete(param)},URLSearchParams}(),RequestOptions=function(){function RequestOptions(_a){var _b=void 0===_a?{}:_a,method=_b.method,headers=_b.headers,body=_b.body,url=_b.url,search=_b.search,withCredentials=_b.withCredentials;this.method=isPresent(method)?normalizeMethodName(method):null,this.headers=isPresent(headers)?headers:null,this.body=isPresent(body)?body:null,this.url=isPresent(url)?url:null,this.search=isPresent(search)?isString(search)?new URLSearchParams(search):search:null,this.withCredentials=isPresent(withCredentials)?withCredentials:null}return RequestOptions.prototype.merge=function(options){return new RequestOptions({method:isPresent(options)&&isPresent(options.method)?options.method:this.method,headers:isPresent(options)&&isPresent(options.headers)?options.headers:this.headers,body:isPresent(options)&&isPresent(options.body)?options.body:this.body,url:isPresent(options)&&isPresent(options.url)?options.url:this.url,search:isPresent(options)&&isPresent(options.search)?isString(options.search)?new URLSearchParams(options.search):options.search.clone():this.search,withCredentials:isPresent(options)&&isPresent(options.withCredentials)?options.withCredentials:this.withCredentials})},RequestOptions}(),BaseRequestOptions=function(_super){function BaseRequestOptions(){_super.call(this,{method:exports.RequestMethod.Get,headers:new Headers})}return __extends(BaseRequestOptions,_super),BaseRequestOptions}(RequestOptions);BaseRequestOptions.decorators=[{type:_angular_core.Injectable}],BaseRequestOptions.ctorParameters=[];var Request=function(){function Request(requestOptions){var url=requestOptions.url;if(this.url=requestOptions.url,isPresent(requestOptions.search)){var search=requestOptions.search.toString();if(search.length>0){var prefix="?";StringWrapper.contains(this.url,"?")&&(prefix="&"==this.url[this.url.length-1]?"":"&"),this.url=url+prefix+search}}this._body=requestOptions.body,this.contentType=this.detectContentType(),this.method=normalizeMethodName(requestOptions.method),this.headers=new Headers(requestOptions.headers),this.withCredentials=requestOptions.withCredentials}return Request.prototype.text=function(){return isPresent(this._body)?this._body.toString():""},Request.prototype.json=function(){return isPresent(this._body)?JSON.stringify(this._body):""},Request.prototype.arrayBuffer=function(){if(this._body instanceof ArrayBuffer)return this._body;throw"The request body isn't an array buffer"},Request.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw"The request body isn't either a blob or an array buffer"},Request.prototype.detectContentType=function(){return null==this._body?ContentType.NONE:this._body instanceof URLSearchParams?ContentType.FORM:this._body instanceof FormData?ContentType.FORM_DATA:this._body instanceof Blob?ContentType.BLOB:this._body instanceof ArrayBuffer?ContentType.ARRAY_BUFFER:this._body&&"object"==typeof this._body?ContentType.JSON:ContentType.TEXT},Request.prototype.getBody=function(){switch(this.contentType){case ContentType.JSON:return this.json();case ContentType.FORM:return this.text();case ContentType.FORM_DATA:return this._body;case ContentType.TEXT:return this.text();case ContentType.BLOB:return this.blob();case ContentType.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},Request}(),noop$1=function(){},w="object"==typeof window?window:noop$1,FormData=w.FormData||noop$1,Blob=w.Blob||noop$1,ArrayBuffer=w.ArrayBuffer||noop$1,Http=function(){function Http(_backend,_defaultOptions){this._backend=_backend,this._defaultOptions=_defaultOptions}return Http.prototype.request=function(url,options){var responseObservable;if(isString(url))responseObservable=httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url)));else{if(!(url instanceof Request))throw makeTypeError("First argument must be a url string or Request instance."); | ||
responseObservable=httpRequest(this._backend,url)}return responseObservable},Http.prototype.get=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url)))},Http.prototype.post=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Post,url)))},Http.prototype.put=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Put,url)))},Http.prototype.delete=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Delete,url)))},Http.prototype.patch=function(url,body,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({body:body})),options,exports.RequestMethod.Patch,url)))},Http.prototype.head=function(url,options){return httpRequest(this._backend,new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Head,url)))},Http}();Http.decorators=[{type:_angular_core.Injectable}],Http.ctorParameters=[{type:ConnectionBackend},{type:RequestOptions}];var Jsonp=function(_super){function Jsonp(backend,defaultOptions){_super.call(this,backend,defaultOptions)}return __extends(Jsonp,_super),Jsonp.prototype.request=function(url,options){var responseObservable;if(isString(url)&&(url=new Request(mergeOptions(this._defaultOptions,options,exports.RequestMethod.Get,url))),!(url instanceof Request))throw makeTypeError("First argument must be a url string or Request instance.");return url.method!==exports.RequestMethod.Get&&makeTypeError("JSONP requests must use GET request method."),responseObservable=httpRequest(this._backend,url)},Jsonp}(Http);Jsonp.decorators=[{type:_angular_core.Injectable}],Jsonp.ctorParameters=[{type:ConnectionBackend},{type:RequestOptions}];var HTTP_PROVIDERS=[{provide:Http,useFactory:httpFactory,deps:[XHRBackend,RequestOptions]},BrowserXhr,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},XHRBackend,{provide:XSRFStrategy,useValue:new CookieXSRFStrategy}],HTTP_BINDINGS=HTTP_PROVIDERS,JSONP_PROVIDERS=[{provide:Jsonp,useFactory:jsonpFactory,deps:[JSONPBackend,RequestOptions]},BrowserJsonp,{provide:RequestOptions,useClass:BaseRequestOptions},{provide:ResponseOptions,useClass:BaseResponseOptions},{provide:JSONPBackend,useClass:JSONPBackend_}],JSON_BINDINGS=JSONP_PROVIDERS;exports.HTTP_PROVIDERS=HTTP_PROVIDERS,exports.httpFactory=httpFactory,exports.HTTP_BINDINGS=HTTP_BINDINGS,exports.JSONP_PROVIDERS=JSONP_PROVIDERS,exports.JSON_BINDINGS=JSON_BINDINGS,exports.BrowserXhr=BrowserXhr,exports.JSONPBackend=JSONPBackend,exports.JSONPConnection=JSONPConnection,exports.CookieXSRFStrategy=CookieXSRFStrategy,exports.XHRBackend=XHRBackend,exports.XHRConnection=XHRConnection,exports.BaseRequestOptions=BaseRequestOptions,exports.RequestOptions=RequestOptions,exports.BaseResponseOptions=BaseResponseOptions,exports.ResponseOptions=ResponseOptions,exports.Headers=Headers,exports.Http=Http,exports.Jsonp=Jsonp,exports.Connection=Connection,exports.ConnectionBackend=ConnectionBackend,exports.XSRFStrategy=XSRFStrategy,exports.Request=Request,exports.Response=Response,exports.QueryEncoder=QueryEncoder,exports.URLSearchParams=URLSearchParams}); |
@@ -15,3 +15,3 @@ import { XHRBackend } from './src/backends/xhr_backend'; | ||
export { Response } from './src/static_response'; | ||
export { URLSearchParams } from './src/url_search_params'; | ||
export { QueryEncoder, URLSearchParams } from './src/url_search_params'; | ||
/** | ||
@@ -159,4 +159,9 @@ * Provides a basic set of injectables to use the {@link Http} service in any application. | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
export declare const HTTP_PROVIDERS: any[]; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http; | ||
@@ -275,2 +280,4 @@ /** | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -277,0 +284,0 @@ export declare const JSONP_PROVIDERS: any[]; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BrowserJsonp } from './src/backends/browser_jsonp'; | ||
@@ -20,3 +27,3 @@ import { BrowserXhr } from './src/backends/browser_xhr'; | ||
export { Response } from './src/static_response'; | ||
export { URLSearchParams } from './src/url_search_params'; | ||
export { QueryEncoder, URLSearchParams } from './src/url_search_params'; | ||
/** | ||
@@ -164,2 +171,4 @@ * Provides a basic set of injectables to use the {@link Http} service in any application. | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -176,2 +185,5 @@ export const HTTP_PROVIDERS = [ | ||
]; | ||
/** | ||
* @experimental | ||
*/ | ||
export function httpFactory(xhrBackend, requestOptions) { | ||
@@ -292,2 +304,4 @@ return new Http(xhrBackend, requestOptions); | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -294,0 +308,0 @@ export const JSONP_PROVIDERS = [ |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './http'; |
@@ -0,2 +1,9 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './http'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -2,0 +9,0 @@ import { global } from '../facade/lang'; |
@@ -5,2 +5,4 @@ /** | ||
* Take care not to evaluate this in non-browser contexts. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare class BrowserXhr { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -2,0 +9,0 @@ export class BrowserXhr { |
@@ -10,2 +10,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* Abstract base class for an in-flight JSONP request. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -43,2 +45,4 @@ export declare abstract class JSONPConnection implements Connection { | ||
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -45,0 +49,0 @@ export declare abstract class JSONPBackend extends ConnectionBackend { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -14,2 +21,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* Abstract base class for an in-flight JSONP request. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -98,2 +107,4 @@ export class JSONPConnection { | ||
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -100,0 +111,0 @@ export class JSONPBackend extends ConnectionBackend { |
@@ -15,2 +15,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* the {@link MockConnection} may be interacted with in tests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -36,2 +38,4 @@ export declare class XHRConnection implements Connection { | ||
* details. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -68,3 +72,4 @@ export declare class CookieXSRFStrategy implements XSRFStrategy { | ||
* ``` | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class XHRBackend implements ConnectionBackend { | ||
@@ -71,0 +76,0 @@ private _browserXHR; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -20,2 +27,4 @@ import { __platform_browser_private__ } from '@angular/platform-browser'; | ||
* the {@link MockConnection} may be interacted with in tests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -127,2 +136,4 @@ export class XHRConnection { | ||
* details. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -129,0 +140,0 @@ export class CookieXSRFStrategy { |
@@ -28,2 +28,4 @@ import { RequestMethod } from './enums'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -127,2 +129,4 @@ export declare class RequestOptions { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -129,0 +133,0 @@ export declare class BaseRequestOptions extends RequestOptions { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -30,2 +37,4 @@ import { isPresent, isString } from '../src/facade/lang'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -32,0 +41,0 @@ export class RequestOptions { |
@@ -28,2 +28,4 @@ import { Headers } from './headers'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -116,2 +118,4 @@ export declare class ResponseOptions { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -118,0 +122,0 @@ export declare class BaseResponseOptions extends ResponseOptions { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -30,2 +37,4 @@ import { isPresent } from '../src/facade/lang'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -32,0 +41,0 @@ export class ResponseOptions { |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* Supported http methods. | ||
* @experimental | ||
*/ | ||
@@ -17,2 +25,3 @@ export declare enum RequestMethod { | ||
* additional "CANCELLED" state. | ||
* @experimental | ||
*/ | ||
@@ -30,2 +39,3 @@ export declare enum ReadyState { | ||
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. | ||
* @experimental | ||
*/ | ||
@@ -41,2 +51,3 @@ export declare enum ResponseType { | ||
* Supported content type to be automatically associated with a {@link Request}. | ||
* @experimental | ||
*/ | ||
@@ -43,0 +54,0 @@ export declare enum ContentType { |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* Supported http methods. | ||
* @experimental | ||
*/ | ||
@@ -18,2 +26,3 @@ export var RequestMethod; | ||
* additional "CANCELLED" state. | ||
* @experimental | ||
*/ | ||
@@ -32,2 +41,3 @@ export var ReadyState; | ||
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. | ||
* @experimental | ||
*/ | ||
@@ -44,2 +54,3 @@ export var ResponseType; | ||
* Supported content type to be automatically associated with a {@link Request}. | ||
* @experimental | ||
*/ | ||
@@ -46,0 +57,0 @@ export var ContentType; |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* A base class for the WrappedException that can be used to identify | ||
@@ -3,0 +10,0 @@ * a WrappedException from ExceptionHandler without adding circular |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* A base class for the WrappedException that can be used to identify | ||
@@ -3,0 +10,0 @@ * a WrappedException from ExceptionHandler without adding circular |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { getSymbolIterator, global, isArray, isBlank, isJsObject, isPresent } from './lang'; | ||
@@ -2,0 +9,0 @@ export var Map = global.Map; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseWrappedException } from './base_wrapped_exception'; | ||
@@ -2,0 +9,0 @@ import { isListLikeIterable } from './collection'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseWrappedException } from './base_wrapped_exception'; | ||
@@ -2,0 +9,0 @@ export { ExceptionHandler } from './exception_handler'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseWrappedException } from './base_wrapped_exception'; | ||
@@ -2,0 +9,0 @@ import { ExceptionHandler } from './exception_handler'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export interface BrowserNodeGlobal { | ||
@@ -26,3 +33,2 @@ Object: typeof Object; | ||
export { _global as global }; | ||
export declare var Type: FunctionConstructor; | ||
/** | ||
@@ -33,3 +39,6 @@ * Runtime representation a type that a Component or other object is instances of. | ||
* the `MyCustomComponent` constructor function. | ||
* | ||
* @stable | ||
*/ | ||
export declare var Type: FunctionConstructor; | ||
export interface Type extends Function { | ||
@@ -40,4 +49,4 @@ } | ||
*/ | ||
export interface ConcreteType extends Type { | ||
new (...args: any[]): any; | ||
export interface ConcreteType<T> extends Type { | ||
new (...args: any[]): T; | ||
} | ||
@@ -54,3 +63,3 @@ export declare function getTypeNameForDebugging(type: Type): string; | ||
export declare function isType(obj: any): boolean; | ||
export declare function isStringMap(obj: any): boolean; | ||
export declare function isStringMap(obj: any): obj is Object; | ||
export declare function isStrictStringMap(obj: any): boolean; | ||
@@ -57,0 +66,0 @@ export declare function isPromise(obj: any): boolean; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
var globalScope; | ||
@@ -22,2 +29,10 @@ if (typeof window === 'undefined') { | ||
export { _global as global }; | ||
/** | ||
* Runtime representation a type that a Component or other object is instances of. | ||
* | ||
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by | ||
* the `MyCustomComponent` constructor function. | ||
* | ||
* @stable | ||
*/ | ||
export var Type = Function; | ||
@@ -24,0 +39,0 @@ export function getTypeNameForDebugging(type) { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":103,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":107,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":115,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":355,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":355,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":365,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":369,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":373,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":373,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":470,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":106,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":110,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":114,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":118,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":126,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":376,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":380,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":481,"character":19}}}} |
@@ -26,2 +26,4 @@ /** | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -28,0 +30,0 @@ export declare class Headers { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseException } from '../src/facade/exceptions'; | ||
@@ -29,2 +36,4 @@ import { isBlank } from '../src/facade/lang'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -31,0 +40,0 @@ export class Headers { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { makeTypeError } from '../src/facade/exceptions'; | ||
@@ -2,0 +9,0 @@ import { isString } from '../src/facade/lang'; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"isSuccess":{"__symbolic":"error","message":"Function call not supported","line":20,"character":24}}} | ||
{"__symbolic":"module","version":1,"metadata":{"isSuccess":{"__symbolic":"error","message":"Function call not supported","line":28,"character":24}}} |
@@ -64,3 +64,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class Http { | ||
@@ -102,2 +103,5 @@ protected _backend: ConnectionBackend; | ||
} | ||
/** | ||
* @experimental | ||
*/ | ||
export declare class Jsonp extends Http { | ||
@@ -110,4 +114,12 @@ constructor(backend: ConnectionBackend, defaultOptions: RequestOptions); | ||
* of {@link BaseRequestOptions} before performing the request. | ||
* | ||
* @security Regular XHR is the safest alternative to JSONP for most applications, and is | ||
* supported by all current browsers. Because JSONP creates a `<script>` element with | ||
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted | ||
* source could expose your application to XSS risks. Data exposed by JSONP may also be | ||
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for | ||
* future security issues (e.g. content sniffing). For more detail, see the | ||
* [Security Guide](http://g.co/ng/security). | ||
*/ | ||
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>; | ||
} |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -110,2 +117,10 @@ import { makeTypeError } from '../src/facade/exceptions'; | ||
* of {@link BaseRequestOptions} before performing the request. | ||
* | ||
* @security Regular XHR is the safest alternative to JSONP for most applications, and is | ||
* supported by all current browsers. Because JSONP creates a `<script>` element with | ||
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted | ||
* source could expose your application to XSS risks. Data exposed by JSONP may also be | ||
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for | ||
* future security issues (e.g. content sniffing). For more detail, see the | ||
* [Security Guide](http://g.co/ng/security). | ||
*/ | ||
@@ -112,0 +127,0 @@ request(url, options) { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { ReadyState, RequestMethod, ResponseType } from './enums'; | ||
@@ -10,2 +17,4 @@ import { Headers } from './headers'; | ||
* {@link Request}. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -17,2 +26,4 @@ export declare abstract class ConnectionBackend { | ||
* Abstract class from which real connections are derived. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -24,3 +35,7 @@ export declare abstract class Connection { | ||
} | ||
/** An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. */ | ||
/** | ||
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. | ||
* | ||
* @experimental | ||
*/ | ||
export declare abstract class XSRFStrategy { | ||
@@ -32,2 +47,4 @@ abstract configureRequest(req: Request): void; | ||
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -51,2 +68,4 @@ export interface RequestOptionsArgs { | ||
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -53,0 +72,0 @@ export declare type ResponseOptionsArgs = { |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* Abstract class from which real backends are derived. | ||
@@ -6,2 +13,4 @@ * | ||
* {@link Request}. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -12,8 +21,14 @@ export class ConnectionBackend { | ||
* Abstract class from which real connections are derived. | ||
* | ||
* @experimental | ||
*/ | ||
export class Connection { | ||
} | ||
/** An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. */ | ||
/** | ||
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. | ||
* | ||
* @experimental | ||
*/ | ||
export class XSRFStrategy { | ||
} | ||
//# sourceMappingURL=interfaces.js.map |
@@ -40,2 +40,4 @@ import { ContentType, RequestMethod } from './enums'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -42,0 +44,0 @@ export declare class Request { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { StringWrapper, isPresent } from '../src/facade/lang'; | ||
@@ -43,2 +50,4 @@ import { ContentType } from './enums'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -45,0 +54,0 @@ export class Request { |
@@ -21,2 +21,4 @@ import { ResponseOptions } from './base_response_options'; | ||
* most significant. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -23,0 +25,0 @@ export declare class Response { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseException } from '../src/facade/exceptions'; | ||
@@ -21,2 +28,4 @@ import { Json, isString } from '../src/facade/lang'; | ||
* most significant. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -23,0 +32,0 @@ export class Response { |
/** | ||
* @experimental | ||
**/ | ||
export declare class QueryEncoder { | ||
encodeKey(k: string): string; | ||
encodeValue(v: string): string; | ||
} | ||
/** | ||
* Map-like representation of url search parameters, based on | ||
@@ -8,7 +15,35 @@ * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard, | ||
* - replaceAll() | ||
* | ||
* This class accepts an optional second parameter of ${@link QueryEncoder}, | ||
* which is used to serialize parameters before making a request. By default, | ||
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`, | ||
* and then un-encodes certain characters that are allowed to be part of the query | ||
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986. | ||
* | ||
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /` | ||
* | ||
* If the set of allowed query characters is not acceptable for a particular backend, | ||
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams. | ||
* | ||
* ``` | ||
* import {URLSearchParams, QueryEncoder} from '@angular/http'; | ||
* class MyQueryEncoder extends QueryEncoder { | ||
* encodeKey(k: string): string { | ||
* return myEncodingFunction(k); | ||
* } | ||
* | ||
* encodeValue(v: string): string { | ||
* return myEncodingFunction(v); | ||
* } | ||
* } | ||
* | ||
* let params = new URLSearchParams('', new MyQueryEncoder()); | ||
* ``` | ||
* @experimental | ||
*/ | ||
export declare class URLSearchParams { | ||
rawParams: string; | ||
private queryEncoder; | ||
paramsMap: Map<string, string[]>; | ||
constructor(rawParams?: string); | ||
constructor(rawParams?: string, queryEncoder?: QueryEncoder); | ||
clone(): URLSearchParams; | ||
@@ -15,0 +50,0 @@ has(param: string): boolean; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { ListWrapper, Map, isListLikeIterable } from '../src/facade/collection'; | ||
@@ -8,3 +15,3 @@ import { isPresent } from '../src/facade/lang'; | ||
params.forEach((param) => { | ||
var split = param.split('='); | ||
var split = param.split('=', 2); | ||
var key = split[0]; | ||
@@ -20,2 +27,21 @@ var val = split[1]; | ||
/** | ||
* @experimental | ||
**/ | ||
export class QueryEncoder { | ||
encodeKey(k) { return standardEncoding(k); } | ||
encodeValue(v) { return standardEncoding(v); } | ||
} | ||
function standardEncoding(v) { | ||
return encodeURIComponent(v) | ||
.replace(/%40/gi, '@') | ||
.replace(/%3A/gi, ':') | ||
.replace(/%24/gi, '$') | ||
.replace(/%2C/gi, ',') | ||
.replace(/%3B/gi, ';') | ||
.replace(/%2B/gi, '+') | ||
.replace(/%3D/gi, ';') | ||
.replace(/%3F/gi, '?') | ||
.replace(/%2F/gi, '/'); | ||
} | ||
/** | ||
* Map-like representation of url search parameters, based on | ||
@@ -27,6 +53,34 @@ * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard, | ||
* - replaceAll() | ||
* | ||
* This class accepts an optional second parameter of ${@link QueryEncoder}, | ||
* which is used to serialize parameters before making a request. By default, | ||
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`, | ||
* and then un-encodes certain characters that are allowed to be part of the query | ||
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986. | ||
* | ||
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /` | ||
* | ||
* If the set of allowed query characters is not acceptable for a particular backend, | ||
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams. | ||
* | ||
* ``` | ||
* import {URLSearchParams, QueryEncoder} from '@angular/http'; | ||
* class MyQueryEncoder extends QueryEncoder { | ||
* encodeKey(k: string): string { | ||
* return myEncodingFunction(k); | ||
* } | ||
* | ||
* encodeValue(v: string): string { | ||
* return myEncodingFunction(v); | ||
* } | ||
* } | ||
* | ||
* let params = new URLSearchParams('', new MyQueryEncoder()); | ||
* ``` | ||
* @experimental | ||
*/ | ||
export class URLSearchParams { | ||
constructor(rawParams = '') { | ||
constructor(rawParams = '', queryEncoder = new QueryEncoder()) { | ||
this.rawParams = rawParams; | ||
this.queryEncoder = queryEncoder; | ||
this.paramsMap = paramParser(rawParams); | ||
@@ -118,3 +172,5 @@ } | ||
var paramsList = []; | ||
this.paramsMap.forEach((values, k) => { values.forEach(v => paramsList.push(k + '=' + encodeURIComponent(v))); }); | ||
this.paramsMap.forEach((values, k) => { | ||
values.forEach(v => paramsList.push(this.queryEncoder.encodeKey(k) + '=' + this.queryEncoder.encodeValue(v))); | ||
}); | ||
return paramsList.join('&'); | ||
@@ -121,0 +177,0 @@ } |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './testing/mock_backend'; |
@@ -0,2 +1,9 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './testing/mock_backend'; | ||
//# sourceMappingURL=testing.js.map |
@@ -10,3 +10,4 @@ import { ReplaySubject } from 'rxjs/ReplaySubject'; | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class MockConnection implements Connection { | ||
@@ -99,3 +100,5 @@ /** | ||
* This method only exists in the mock implementation, not in real Backends. | ||
**/ | ||
* | ||
* @experimental | ||
*/ | ||
export declare class MockBackend implements ConnectionBackend { | ||
@@ -102,0 +105,0 @@ /** |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { Injectable } from '@angular/core'; | ||
@@ -13,3 +20,4 @@ import { ReplaySubject } from 'rxjs/ReplaySubject'; | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
export class MockConnection { | ||
@@ -16,0 +24,0 @@ constructor(req) { |
@@ -15,3 +15,3 @@ import { XHRBackend } from './src/backends/xhr_backend'; | ||
export { Response } from './src/static_response'; | ||
export { URLSearchParams } from './src/url_search_params'; | ||
export { QueryEncoder, URLSearchParams } from './src/url_search_params'; | ||
/** | ||
@@ -159,4 +159,9 @@ * Provides a basic set of injectables to use the {@link Http} service in any application. | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
export declare const HTTP_PROVIDERS: any[]; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http; | ||
@@ -275,2 +280,4 @@ /** | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -277,0 +284,0 @@ export declare const JSONP_PROVIDERS: any[]; |
15
http.js
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -43,2 +50,3 @@ var browser_jsonp_1 = require('./src/backends/browser_jsonp'); | ||
var url_search_params_1 = require('./src/url_search_params'); | ||
exports.QueryEncoder = url_search_params_1.QueryEncoder; | ||
exports.URLSearchParams = url_search_params_1.URLSearchParams; | ||
@@ -187,2 +195,4 @@ /** | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -199,2 +209,5 @@ exports.HTTP_PROVIDERS = [ | ||
]; | ||
/** | ||
* @experimental | ||
*/ | ||
function httpFactory(xhrBackend, requestOptions) { | ||
@@ -316,2 +329,4 @@ return new http_1.Http(xhrBackend, requestOptions); | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -318,0 +333,0 @@ exports.JSONP_PROVIDERS = [ |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './http'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ function __export(m) { |
{ | ||
"name": "@angular/http", | ||
"version": "2.0.0-rc.3", | ||
"version": "2.0.0-rc.4", | ||
"description": "", | ||
@@ -12,4 +12,4 @@ "main": "index.js", | ||
"rxjs": "5.0.0-beta.6", | ||
"@angular/core": "2.0.0-rc.3", | ||
"@angular/platform-browser": "2.0.0-rc.3" | ||
"@angular/core": "^2.0.0-rc.4", | ||
"@angular/platform-browser": "^2.0.0-rc.4" | ||
}, | ||
@@ -16,0 +16,0 @@ "repository": { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var core_1 = require('@angular/core'); |
@@ -5,2 +5,4 @@ /** | ||
* Take care not to evaluate this in non-browser contexts. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare class BrowserXhr { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var core_1 = require('@angular/core'); |
@@ -10,2 +10,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* Abstract base class for an in-flight JSONP request. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -43,2 +45,4 @@ export declare abstract class JSONPConnection implements Connection { | ||
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -45,0 +49,0 @@ export declare abstract class JSONPBackend extends ConnectionBackend { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -20,2 +27,4 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
* Abstract base class for an in-flight JSONP request. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -112,2 +121,4 @@ var JSONPConnection = (function () { | ||
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -114,0 +125,0 @@ var JSONPBackend = (function (_super) { |
@@ -15,2 +15,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* the {@link MockConnection} may be interacted with in tests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -36,2 +38,4 @@ export declare class XHRConnection implements Connection { | ||
* details. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -68,3 +72,4 @@ export declare class CookieXSRFStrategy implements XSRFStrategy { | ||
* ``` | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class XHRBackend implements ConnectionBackend { | ||
@@ -71,0 +76,0 @@ private _browserXHR; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -21,2 +28,4 @@ var core_1 = require('@angular/core'); | ||
* the {@link MockConnection} may be interacted with in tests. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -131,2 +140,4 @@ var XHRConnection = (function () { | ||
* details. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -133,0 +144,0 @@ var CookieXSRFStrategy = (function () { |
@@ -28,2 +28,4 @@ import { RequestMethod } from './enums'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -127,2 +129,4 @@ export declare class RequestOptions { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -129,0 +133,0 @@ export declare class BaseRequestOptions extends RequestOptions { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -36,2 +43,4 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -38,0 +47,0 @@ var RequestOptions = (function () { |
@@ -28,2 +28,4 @@ import { Headers } from './headers'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -116,2 +118,4 @@ export declare class ResponseOptions { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -118,0 +122,0 @@ export declare class BaseResponseOptions extends ResponseOptions { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -36,2 +43,4 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -38,0 +47,0 @@ var ResponseOptions = (function () { |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* Supported http methods. | ||
* @experimental | ||
*/ | ||
@@ -17,2 +25,3 @@ export declare enum RequestMethod { | ||
* additional "CANCELLED" state. | ||
* @experimental | ||
*/ | ||
@@ -30,2 +39,3 @@ export declare enum ReadyState { | ||
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. | ||
* @experimental | ||
*/ | ||
@@ -41,2 +51,3 @@ export declare enum ResponseType { | ||
* Supported content type to be automatically associated with a {@link Request}. | ||
* @experimental | ||
*/ | ||
@@ -43,0 +54,0 @@ export declare enum ContentType { |
@@ -0,4 +1,12 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
/** | ||
* Supported http methods. | ||
* @experimental | ||
*/ | ||
@@ -19,2 +27,3 @@ (function (RequestMethod) { | ||
* additional "CANCELLED" state. | ||
* @experimental | ||
*/ | ||
@@ -33,2 +42,3 @@ (function (ReadyState) { | ||
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. | ||
* @experimental | ||
*/ | ||
@@ -45,2 +55,3 @@ (function (ResponseType) { | ||
* Supported content type to be automatically associated with a {@link Request}. | ||
* @experimental | ||
*/ | ||
@@ -47,0 +58,0 @@ (function (ContentType) { |
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
/** | ||
* A base class for the WrappedException that can be used to identify | ||
@@ -3,0 +10,0 @@ * a WrappedException from ExceptionHandler without adding circular |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var __extends = (this && this.__extends) || function (d, b) { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var lang_1 = require('./lang'); |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var base_wrapped_exception_1 = require('./base_wrapped_exception'); |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { BaseWrappedException } from './base_wrapped_exception'; | ||
@@ -2,0 +9,0 @@ export { ExceptionHandler } from './exception_handler'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var __extends = (this && this.__extends) || function (d, b) { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export interface BrowserNodeGlobal { | ||
@@ -26,3 +33,2 @@ Object: typeof Object; | ||
export { _global as global }; | ||
export declare var Type: FunctionConstructor; | ||
/** | ||
@@ -33,3 +39,6 @@ * Runtime representation a type that a Component or other object is instances of. | ||
* the `MyCustomComponent` constructor function. | ||
* | ||
* @stable | ||
*/ | ||
export declare var Type: FunctionConstructor; | ||
export interface Type extends Function { | ||
@@ -40,4 +49,4 @@ } | ||
*/ | ||
export interface ConcreteType extends Type { | ||
new (...args: any[]): any; | ||
export interface ConcreteType<T> extends Type { | ||
new (...args: any[]): T; | ||
} | ||
@@ -54,3 +63,3 @@ export declare function getTypeNameForDebugging(type: Type): string; | ||
export declare function isType(obj: any): boolean; | ||
export declare function isStringMap(obj: any): boolean; | ||
export declare function isStringMap(obj: any): obj is Object; | ||
export declare function isStrictStringMap(obj: any): boolean; | ||
@@ -57,0 +66,0 @@ export declare function isPromise(obj: any): boolean; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -29,2 +36,10 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
exports.global = _global; | ||
/** | ||
* Runtime representation a type that a Component or other object is instances of. | ||
* | ||
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by | ||
* the `MyCustomComponent` constructor function. | ||
* | ||
* @stable | ||
*/ | ||
exports.Type = Function; | ||
@@ -31,0 +46,0 @@ function getTypeNameForDebugging(type) { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":103,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":107,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":115,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":355,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":355,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":365,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":369,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":373,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":373,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":470,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":106,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":110,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":114,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":118,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":126,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":376,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":380,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":481,"character":19}}}} |
@@ -26,2 +26,4 @@ /** | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -28,0 +30,0 @@ export declare class Headers { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -30,2 +37,4 @@ var exceptions_1 = require('../src/facade/exceptions'); | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -32,0 +41,0 @@ var Headers = (function () { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ var exceptions_1 = require('../src/facade/exceptions'); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"isSuccess":{"__symbolic":"error","message":"Function call not supported","line":20,"character":24}}} | ||
{"__symbolic":"module","version":1,"metadata":{"isSuccess":{"__symbolic":"error","message":"Function call not supported","line":28,"character":24}}} |
@@ -64,3 +64,4 @@ import { Observable } from 'rxjs/Observable'; | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class Http { | ||
@@ -102,2 +103,5 @@ protected _backend: ConnectionBackend; | ||
} | ||
/** | ||
* @experimental | ||
*/ | ||
export declare class Jsonp extends Http { | ||
@@ -110,4 +114,12 @@ constructor(backend: ConnectionBackend, defaultOptions: RequestOptions); | ||
* of {@link BaseRequestOptions} before performing the request. | ||
* | ||
* @security Regular XHR is the safest alternative to JSONP for most applications, and is | ||
* supported by all current browsers. Because JSONP creates a `<script>` element with | ||
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted | ||
* source could expose your application to XSS risks. Data exposed by JSONP may also be | ||
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for | ||
* future security issues (e.g. content sniffing). For more detail, see the | ||
* [Security Guide](http://g.co/ng/security). | ||
*/ | ||
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>; | ||
} |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -119,2 +126,10 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
* of {@link BaseRequestOptions} before performing the request. | ||
* | ||
* @security Regular XHR is the safest alternative to JSONP for most applications, and is | ||
* supported by all current browsers. Because JSONP creates a `<script>` element with | ||
* contents retrieved from a remote source, attacker-controlled data introduced by an untrusted | ||
* source could expose your application to XSS risks. Data exposed by JSONP may also be | ||
* readable by malicious third-party websites. In addition, JSONP introduces potential risk for | ||
* future security issues (e.g. content sniffing). For more detail, see the | ||
* [Security Guide](http://g.co/ng/security). | ||
*/ | ||
@@ -121,0 +136,0 @@ Jsonp.prototype.request = function (url, options) { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { ReadyState, RequestMethod, ResponseType } from './enums'; | ||
@@ -10,2 +17,4 @@ import { Headers } from './headers'; | ||
* {@link Request}. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -17,2 +26,4 @@ export declare abstract class ConnectionBackend { | ||
* Abstract class from which real connections are derived. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -24,3 +35,7 @@ export declare abstract class Connection { | ||
} | ||
/** An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. */ | ||
/** | ||
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. | ||
* | ||
* @experimental | ||
*/ | ||
export declare abstract class XSRFStrategy { | ||
@@ -32,2 +47,4 @@ abstract configureRequest(req: Request): void; | ||
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -51,2 +68,4 @@ export interface RequestOptionsArgs { | ||
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -53,0 +72,0 @@ export declare type ResponseOptionsArgs = { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -7,2 +14,4 @@ /** | ||
* {@link Request}. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -17,2 +26,4 @@ var ConnectionBackend = (function () { | ||
* Abstract class from which real connections are derived. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -25,3 +36,7 @@ var Connection = (function () { | ||
exports.Connection = Connection; | ||
/** An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. */ | ||
/** | ||
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. | ||
* | ||
* @experimental | ||
*/ | ||
var XSRFStrategy = (function () { | ||
@@ -28,0 +43,0 @@ function XSRFStrategy() { |
@@ -40,2 +40,4 @@ import { ContentType, RequestMethod } from './enums'; | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -42,0 +44,0 @@ export declare class Request { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -44,2 +51,4 @@ var lang_1 = require('../src/facade/lang'); | ||
* ``` | ||
* | ||
* @experimental | ||
*/ | ||
@@ -46,0 +55,0 @@ var Request = (function () { |
@@ -21,2 +21,4 @@ import { ResponseOptions } from './base_response_options'; | ||
* most significant. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -23,0 +25,0 @@ export declare class Response { |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -22,2 +29,4 @@ var exceptions_1 = require('../src/facade/exceptions'); | ||
* most significant. | ||
* | ||
* @experimental | ||
*/ | ||
@@ -24,0 +33,0 @@ var Response = (function () { |
/** | ||
* @experimental | ||
**/ | ||
export declare class QueryEncoder { | ||
encodeKey(k: string): string; | ||
encodeValue(v: string): string; | ||
} | ||
/** | ||
* Map-like representation of url search parameters, based on | ||
@@ -8,7 +15,35 @@ * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard, | ||
* - replaceAll() | ||
* | ||
* This class accepts an optional second parameter of ${@link QueryEncoder}, | ||
* which is used to serialize parameters before making a request. By default, | ||
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`, | ||
* and then un-encodes certain characters that are allowed to be part of the query | ||
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986. | ||
* | ||
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /` | ||
* | ||
* If the set of allowed query characters is not acceptable for a particular backend, | ||
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams. | ||
* | ||
* ``` | ||
* import {URLSearchParams, QueryEncoder} from '@angular/http'; | ||
* class MyQueryEncoder extends QueryEncoder { | ||
* encodeKey(k: string): string { | ||
* return myEncodingFunction(k); | ||
* } | ||
* | ||
* encodeValue(v: string): string { | ||
* return myEncodingFunction(v); | ||
* } | ||
* } | ||
* | ||
* let params = new URLSearchParams('', new MyQueryEncoder()); | ||
* ``` | ||
* @experimental | ||
*/ | ||
export declare class URLSearchParams { | ||
rawParams: string; | ||
private queryEncoder; | ||
paramsMap: Map<string, string[]>; | ||
constructor(rawParams?: string); | ||
constructor(rawParams?: string, queryEncoder?: QueryEncoder); | ||
clone(): URLSearchParams; | ||
@@ -15,0 +50,0 @@ has(param: string): boolean; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -10,3 +17,3 @@ var collection_1 = require('../src/facade/collection'); | ||
params.forEach(function (param) { | ||
var split = param.split('='); | ||
var split = param.split('=', 2); | ||
var key = split[0]; | ||
@@ -22,2 +29,25 @@ var val = split[1]; | ||
/** | ||
* @experimental | ||
**/ | ||
var QueryEncoder = (function () { | ||
function QueryEncoder() { | ||
} | ||
QueryEncoder.prototype.encodeKey = function (k) { return standardEncoding(k); }; | ||
QueryEncoder.prototype.encodeValue = function (v) { return standardEncoding(v); }; | ||
return QueryEncoder; | ||
}()); | ||
exports.QueryEncoder = QueryEncoder; | ||
function standardEncoding(v) { | ||
return encodeURIComponent(v) | ||
.replace(/%40/gi, '@') | ||
.replace(/%3A/gi, ':') | ||
.replace(/%24/gi, '$') | ||
.replace(/%2C/gi, ',') | ||
.replace(/%3B/gi, ';') | ||
.replace(/%2B/gi, '+') | ||
.replace(/%3D/gi, ';') | ||
.replace(/%3F/gi, '?') | ||
.replace(/%2F/gi, '/'); | ||
} | ||
/** | ||
* Map-like representation of url search parameters, based on | ||
@@ -29,7 +59,36 @@ * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard, | ||
* - replaceAll() | ||
* | ||
* This class accepts an optional second parameter of ${@link QueryEncoder}, | ||
* which is used to serialize parameters before making a request. By default, | ||
* `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`, | ||
* and then un-encodes certain characters that are allowed to be part of the query | ||
* according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986. | ||
* | ||
* These are the characters that are not encoded: `! $ \' ( ) * + , ; A 9 - . _ ~ ? /` | ||
* | ||
* If the set of allowed query characters is not acceptable for a particular backend, | ||
* `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams. | ||
* | ||
* ``` | ||
* import {URLSearchParams, QueryEncoder} from '@angular/http'; | ||
* class MyQueryEncoder extends QueryEncoder { | ||
* encodeKey(k: string): string { | ||
* return myEncodingFunction(k); | ||
* } | ||
* | ||
* encodeValue(v: string): string { | ||
* return myEncodingFunction(v); | ||
* } | ||
* } | ||
* | ||
* let params = new URLSearchParams('', new MyQueryEncoder()); | ||
* ``` | ||
* @experimental | ||
*/ | ||
var URLSearchParams = (function () { | ||
function URLSearchParams(rawParams) { | ||
function URLSearchParams(rawParams, queryEncoder) { | ||
if (rawParams === void 0) { rawParams = ''; } | ||
if (queryEncoder === void 0) { queryEncoder = new QueryEncoder(); } | ||
this.rawParams = rawParams; | ||
this.queryEncoder = queryEncoder; | ||
this.paramsMap = paramParser(rawParams); | ||
@@ -123,4 +182,7 @@ } | ||
URLSearchParams.prototype.toString = function () { | ||
var _this = this; | ||
var paramsList = []; | ||
this.paramsMap.forEach(function (values, k) { values.forEach(function (v) { return paramsList.push(k + '=' + encodeURIComponent(v)); }); }); | ||
this.paramsMap.forEach(function (values, k) { | ||
values.forEach(function (v) { return paramsList.push(_this.queryEncoder.encodeKey(k) + '=' + _this.queryEncoder.encodeValue(v)); }); | ||
}); | ||
return paramsList.join('&'); | ||
@@ -127,0 +189,0 @@ }; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
export * from './testing/mock_backend'; |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -2,0 +9,0 @@ function __export(m) { |
@@ -10,3 +10,4 @@ import { ReplaySubject } from 'rxjs/ReplaySubject'; | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
export declare class MockConnection implements Connection { | ||
@@ -99,3 +100,5 @@ /** | ||
* This method only exists in the mock implementation, not in real Backends. | ||
**/ | ||
* | ||
* @experimental | ||
*/ | ||
export declare class MockBackend implements ConnectionBackend { | ||
@@ -102,0 +105,0 @@ /** |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
"use strict"; | ||
@@ -14,3 +21,4 @@ var core_1 = require('@angular/core'); | ||
* | ||
**/ | ||
* @experimental | ||
*/ | ||
var MockConnection = (function () { | ||
@@ -17,0 +25,0 @@ function MockConnection(req) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
866461
11812
1