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,CAAC;IAC3D,CAAC;IACH,gBAAC;AAAD,CAAC,AAzBD,CAA+B,KAAK,GAyBnC;AAzBY,iBAAS,YAyBrB,CAAA;AAED,0BAA0B,YAAoB,EAAE,GAAmB;IACjE,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACrB,KAAK,MAAM;YACP,EAAE,CAAC,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC;gBACtB,+DAA+D;gBAC/D,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,YAAY,IAAI,MAAM,CAAC,CAAC;YAClG,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,yCAAyC;gBACzC,gFAAgF;gBAChF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAE,GAAW,CAAC,YAAY,IAAI,MAAM,CAAC,CAAC;YACzD,CAAC;QACH,KAAK,KAAK;YACR,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ;YACI,yCAAyC;YACzC,gFAAgF;YAChF,MAAM,CAAE,CAAC,UAAU,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAI,GAAW,CAAC,YAAY,CAAC;IAC/E,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH;IAAsC,oCAAS;IAC7C,0BAAY,GAAmB,EAAE,OAAoB;QACnD,kBAAM,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IACH,uBAAC;AAAD,CAAC,AAJD,CAAsC,SAAS,GAI9C;AAJY,wBAAgB,mBAI5B,CAAA","sourcesContent":["import { root } from '../../util/root';\nimport { tryCatch } from '../../util/tryCatch';\nimport { errorObject } from '../../util/errorObject';\nimport { Observable } from '../../Observable';\nimport { Subscriber } from '../../Subscriber';\nimport { TeardownLogic } from '../../Subscription';\nimport { map } from '../../operators/map';\n\nexport interface AjaxRequest {\n url?: string;\n body?: any;\n user?: string;\n async?: boolean;\n method?: string;\n headers?: Object;\n timeout?: number;\n password?: string;\n hasContent?: boolean;\n crossDomain?: boolean;\n withCredentials?: boolean;\n createXHR?: () => XMLHttpRequest;\n progressSubscriber?: Subscriber;\n responseType?: string;\n}\n\nfunction getCORSRequest(this: AjaxRequest): XMLHttpRequest {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n } else if (!!root.XDomainRequest) {\n return new root.XDomainRequest();\n } else {\n throw new Error('CORS is not supported by your browser');\n }\n}\n\nfunction getXMLHttpRequest(): XMLHttpRequest {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n } else {\n let progId: string;\n try {\n const progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];\n for (let i = 0; i < 3; i++) {\n try {\n progId = progIds[i];\n if (new root.ActiveXObject(progId)) {\n break;\n }\n } catch (e) {\n //suppress exceptions\n }\n }\n return new root.ActiveXObject(progId);\n } catch (e) {\n throw new Error('XMLHttpRequest is not supported by your browser');\n }\n }\n}\n\nexport interface AjaxCreationMethod {\n (urlOrRequest: string | AjaxRequest): Observable;\n get(url: string, headers?: Object): Observable;\n post(url: string, body?: any, headers?: Object): Observable;\n put(url: string, body?: any, headers?: Object): Observable;\n patch(url: string, body?: any, headers?: Object): Observable;\n delete(url: string, headers?: Object): Observable;\n getJSON(url: string, headers?: Object): Observable;\n}\n\nexport function ajaxGet(url: string, headers: Object = null) {\n return new AjaxObservable({ method: 'GET', url, headers });\n};\n\nexport function ajaxPost(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'POST', url, body, headers });\n};\n\nexport function ajaxDelete(url: string, headers?: Object): Observable {\n return new AjaxObservable({ method: 'DELETE', url, headers });\n};\n\nexport function ajaxPut(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'PUT', url, body, headers });\n};\n\nexport function ajaxPatch(url: string, body?: any, headers?: Object): Observable {\n return new AjaxObservable({ method: 'PATCH', url, body, headers });\n};\n\nconst mapResponse = map((x: AjaxResponse, index: number) => x.response);\n\nexport function ajaxGetJSON(url: string, headers?: Object): Observable {\n return mapResponse(\n new AjaxObservable({\n method: 'GET',\n url,\n responseType: 'json',\n headers\n })\n );\n};\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nexport class AjaxObservable extends Observable {\n /**\n * Creates an observable for an Ajax request with either a request object with\n * url, headers, etc or a string for a URL.\n *\n * @example\n * source = Rx.Observable.ajax('/products');\n * source = Rx.Observable.ajax({ url: 'products', method: 'GET' });\n *\n * @param {string|Object} request Can be one of the following:\n * A string of the URL to make the Ajax call.\n * An object with the following properties\n * - url: URL of the request\n * - body: The body of the request\n * - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE\n * - async: Whether the request is async\n * - headers: Optional headers\n * - crossDomain: true if a cross domain request, else false\n * - createXHR: a function to override if you need to use an alternate\n * XMLHttpRequest implementation.\n * - resultSelector: a function to use to alter the output value type of\n * the Observable. Gets {@link AjaxResponse} as an argument.\n * @return {Observable} An observable sequence containing the XMLHttpRequest.\n * @static true\n * @name ajax\n * @owner Observable\n */\n static create: AjaxCreationMethod = (() => {\n const create: any = (urlOrRequest: string | AjaxRequest) => {\n return new AjaxObservable(urlOrRequest);\n };\n\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n\n return create;\n })();\n\n private request: AjaxRequest;\n\n constructor(urlOrRequest: string | AjaxRequest) {\n super();\n\n const request: AjaxRequest = {\n async: true,\n createXHR: function(this: AjaxRequest) {\n return this.crossDomain ? getCORSRequest.call(this) : getXMLHttpRequest();\n },\n crossDomain: false,\n withCredentials: false,\n headers: {},\n method: 'GET',\n responseType: 'json',\n timeout: 0\n };\n\n if (typeof urlOrRequest === 'string') {\n request.url = urlOrRequest;\n } else {\n for (const prop in urlOrRequest) {\n if (urlOrRequest.hasOwnProperty(prop)) {\n request[prop] = urlOrRequest[prop];\n }\n }\n }\n\n this.request = request;\n }\n\n /** @deprecated internal use only */ _subscribe(subscriber: Subscriber): TeardownLogic {\n return new AjaxSubscriber(subscriber, this.request);\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class AjaxSubscriber extends Subscriber {\n private xhr: XMLHttpRequest;\n private done: boolean = false;\n\n constructor(destination: Subscriber, public request: AjaxRequest) {\n super(destination);\n\n const headers = request.headers = request.headers || {};\n\n // force CORS if requested\n if (!request.crossDomain && !headers['X-Requested-With']) {\n headers['X-Requested-With'] = 'XMLHttpRequest';\n }\n\n // ensure content type is set\n if (!('Content-Type' in headers) && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {\n headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n\n // properly serialize body\n request.body = this.serializeBody(request.body, request.headers['Content-Type']);\n\n this.send();\n }\n\n next(e: Event): void {\n this.done = true;\n const { xhr, request, destination } = this;\n const response = new AjaxResponse(e, xhr, request);\n\n destination.next(response);\n }\n\n private send(): XMLHttpRequest {\n const {\n request,\n request: { user, method, url, async, password, headers, body }\n } = this;\n const createXHR = request.createXHR;\n const xhr: XMLHttpRequest = tryCatch(createXHR).call(request);\n\n if (xhr === errorObject) {\n this.error(errorObject.e);\n } else {\n this.xhr = xhr;\n\n // set up the events before open XHR\n // https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest\n // You need to add the event listeners before calling open() on the request.\n // Otherwise the progress events will not fire.\n this.setupEvents(xhr, request);\n // open XHR\n let result: any;\n if (user) {\n result = tryCatch(xhr.open).call(xhr, method, url, async, user, password);\n } else {\n result = tryCatch(xhr.open).call(xhr, method, url, async);\n }\n\n if (result === errorObject) {\n this.error(errorObject.e);\n return null;\n }\n\n // timeout, responseType and withCredentials can be set once the XHR is open\n if (async) {\n xhr.timeout = request.timeout;\n xhr.responseType = request.responseType as any;\n }\n\n if ('withCredentials' in xhr) {\n xhr.withCredentials = !!request.withCredentials;\n }\n\n // set headers\n this.setHeaders(xhr, headers);\n\n // finally send the request\n result = body ? tryCatch(xhr.send).call(xhr, body) : tryCatch(xhr.send).call(xhr);\n if (result === errorObject) {\n this.error(errorObject.e);\n return null;\n }\n }\n\n return xhr;\n }\n\n private serializeBody(body: any, contentType?: string) {\n if (!body || typeof body === 'string') {\n return body;\n } else if (root.FormData && body instanceof root.FormData) {\n return body;\n }\n\n if (contentType) {\n const splitIndex = contentType.indexOf(';');\n if (splitIndex !== -1) {\n contentType = contentType.substring(0, splitIndex);\n }\n }\n\n switch (contentType) {\n case 'application/x-www-form-urlencoded':\n return Object.keys(body).map(key => `${encodeURI(key)}=${encodeURI(body[key])}`).join('&');\n case 'application/json':\n return JSON.stringify(body);\n default:\n return body;\n }\n }\n\n private setHeaders(xhr: XMLHttpRequest, headers: Object) {\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n private setupEvents(xhr: XMLHttpRequest, request: AjaxRequest) {\n const progressSubscriber = request.progressSubscriber;\n\n function xhrTimeout(this: XMLHttpRequest, e: ProgressEvent) {\n const {subscriber, progressSubscriber, request } = (xhrTimeout);\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxTimeoutError(this, request)); //TODO: Make betterer.\n };\n xhr.ontimeout = xhrTimeout;\n (xhrTimeout).request = request;\n (xhrTimeout).subscriber = this;\n (xhrTimeout).progressSubscriber = progressSubscriber;\n if (xhr.upload && 'withCredentials' in xhr) {\n if (progressSubscriber) {\n let xhrProgress: (e: ProgressEvent) => void;\n xhrProgress = function(e: ProgressEvent) {\n const { progressSubscriber } = (xhrProgress);\n progressSubscriber.next(e);\n };\n if (root.XDomainRequest) {\n xhr.onprogress = xhrProgress;\n } else {\n xhr.upload.onprogress = xhrProgress;\n }\n (xhrProgress).progressSubscriber = progressSubscriber;\n }\n let xhrError: (e: ErrorEvent) => void;\n xhrError = function(this: XMLHttpRequest, e: ErrorEvent) {\n const { progressSubscriber, subscriber, request } = (xhrError);\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxError('ajax error', this, request));\n };\n xhr.onerror = xhrError;\n (xhrError).request = request;\n (xhrError).subscriber = this;\n (xhrError).progressSubscriber = progressSubscriber;\n }\n\n function xhrReadyStateChange(this: XMLHttpRequest, e: ProgressEvent) {\n const { subscriber, progressSubscriber, request } = (xhrReadyStateChange);\n if (this.readyState === 4) {\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n let status: number = this.status === 1223 ? 204 : this.status;\n let response: any = (this.responseType === 'text' ? (\n this.response || this.responseText) : this.response);\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : 0;\n }\n\n if (200 <= status && status < 300) {\n if (progressSubscriber) {\n progressSubscriber.complete();\n }\n subscriber.next(e);\n subscriber.complete();\n } else {\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxError('ajax error ' + status, this, request));\n }\n }\n };\n xhr.onreadystatechange = xhrReadyStateChange;\n (xhrReadyStateChange).subscriber = this;\n (xhrReadyStateChange).progressSubscriber = progressSubscriber;\n (xhrReadyStateChange).request = request;\n }\n\n unsubscribe() {\n const { done, xhr } = this;\n if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {\n xhr.abort();\n }\n super.unsubscribe();\n }\n}\n\n/**\n * A normalized AJAX response.\n *\n * @see {@link ajax}\n *\n * @class AjaxResponse\n */\nexport class AjaxResponse {\n /** @type {number} The HTTP status code */\n status: number;\n\n /** @type {string|ArrayBuffer|Document|object|any} The response data */\n response: any;\n\n /** @type {string} The raw responseText */\n responseText: string;\n\n /** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */\n responseType: string;\n\n constructor(public originalEvent: Event, public xhr: XMLHttpRequest, public request: AjaxRequest) {\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n }\n}\n\n/**\n * A normalized AJAX error.\n *\n * @see {@link ajax}\n *\n * @class AjaxError\n */\nexport class AjaxError extends Error {\n /** @type {XMLHttpRequest} The XHR instance associated with the error */\n xhr: XMLHttpRequest;\n\n /** @type {AjaxRequest} The AjaxRequest associated with the error */\n request: AjaxRequest;\n\n /** @type {number} The HTTP status code */\n status: number;\n\n /** @type {string} The responseType (e.g. 'json', 'arraybuffer', or 'xml') */\n responseType: string;\n\n /** @type {string|ArrayBuffer|Document|object|any} The response data */\n response: any;\n\n constructor(message: string, xhr: XMLHttpRequest, request: AjaxRequest) {\n super(message);\n this.message = message;\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n }\n}\n\nfunction parseXhrResponse(responseType: string, xhr: XMLHttpRequest) {\n switch (responseType) {\n case 'json':\n if ('response' in xhr) {\n //IE does not support json as responseType, parse it internally\n return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');\n } else {\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any latest TS seems to think xhr is \"never\" here.\n return JSON.parse((xhr as any).responseText || 'null');\n }\n case 'xml':\n return xhr.responseXML;\n case 'text':\n default:\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any latest TS seems to think xhr is \"never\" here.\n return ('response' in xhr) ? xhr.response : (xhr as any).responseText;\n }\n}\n\n/**\n * @see {@link ajax}\n *\n * @class AjaxTimeoutError\n */\nexport class AjaxTimeoutError extends AjaxError {\n constructor(xhr: XMLHttpRequest, request: AjaxRequest) {\n super('ajax timeout', xhr, request);\n }\n}\n"]}