text: webpackJsonp([0],[function(e,t,r){"use strict";r(1);var o=r(2),n=r(24);o.platformBrowserDynamic().bootstrapModule(n.AppModule)},function(e,t){e.exports="// removed by extract-text-webpack-plugin"},,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=r(4),i=r(22),c=r(25),a=r(26),p=r(36),d=r(42),h=r(53),l=function(){function AppModule(){}return AppModule}();l=o([s.NgModule({imports:[i.BrowserModule,c.HttpModule,a.InMemoryWebApiModule.forRoot(h.InMemoryEntryService)],providers:[d.EntryService],declarations:[p.AppComponent,d.EntryComponent,d.EntryListComponent],bootstrap:[p.AppComponent]}),n("design:paramtypes",[])],l),t.AppModule=l},,function(e,t,r){!function(e,o){o(t,r(4),r(25),r(6),r(27))}(this,function(e,t,r,o,n){"use strict";function createErrorResponse(e,t,o){return new r.ResponseOptions({body:{error:""+o},url:e.url,headers:new r.Headers({"Content-Type":"application/json"}),status:t})}function createObservableResponse(e,t){return new o.Observable(function(r){return emitResponse(r,e,t),function(){}})}function emitResponse(e,t,o){o.url=o.url||t.url,o=setStatusText(o);var n=new r.Response(o);isSuccess(n.status)?(e.next(n),e.complete()):e.error(n)}function removeTrailingSlash(e){return e.replace(/\/$/,"")}function isSuccess(e){return e>=200&&e<300}function setStatusText(e){try{var t=i[e.status];return e.statusText=t?t.text:"Unknown Status",e}catch(e){return new r.ResponseOptions({status:s.INTERNAL_SERVER_ERROR,statusText:"Invalid Server Operation"})}}function inMemoryBackendServiceFactory(e,t,r){var o=new d(e,t,r);return o}var s={CONTINUE:100,SWITCHING_PROTOCOLS:101,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTIPLE_CHOICES:300,MOVED_PERMANTENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,UPGRADE_REQUIRED:426,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,PROCESSING:102,MULTI_STATUS:207,IM_USED:226,PERMANENT_REDIRECT:308,UNPROCESSABLE_ENTRY:422,LOCKED:423,FAILED_DEPENDENCY:424,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,NETWORK_AUTHENTICATION_REQUIRED:511},i={100:{code:100,text:"Continue",description:'"The initial part of a request has been received and has not yet been rejected by the server."',spec_title:"RFC7231#6.2.1",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.2.1"},101:{code:101,text:"Switching Protocols",description:'"The server understands and is willing to comply with the client\'s request, via the Upgrade header field, for a change in the application protocol being used on this connection."',spec_title:"RFC7231#6.2.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.2.2"},200:{code:200,text:"OK",description:'"The request has succeeded."',spec_title:"RFC7231#6.3.1",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.1"},201:{code:201,text:"Created",description:'"The request has been fulfilled and has resulted in one or more new resources being created."',spec_title:"RFC7231#6.3.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.2"},202:{code:202,text:"Accepted",description:'"The request has been accepted for processing, but the processing has not been completed."',spec_title:"RFC7231#6.3.3",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.3"},203:{code:203,text:"Non-Authoritative Information",description:'"The request was successful but the enclosed payload has been modified from that of the origin server\'s 200 (OK) response by a transforming proxy."',spec_title:"RFC7231#6.3.4",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.4"},204:{code:204,text:"No Content",description:'"The server has successfully fulfilled the request and that there is no additional content to send in the response payload body."',spec_title:"RFC7231#6.3.5",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.5"},205:{code:205,text:"Reset Content",description:'"The server has fulfilled the request and desires that the user agent reset the "document view", which caused the request to be sent, to its original state as received from the origin server."',spec_title:"RFC7231#6.3.6",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.6"},206:{code:206,text:"Partial Content",description:'"The server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests\'s Range header field."',spec_title:"RFC7233#4.1",spec_href:"http://tools.ietf.org/html/rfc7233#section-4.1"},300:{code:300,text:"Multiple Choices",description:'"The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers."',spec_title:"RFC7231#6.4.1",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.1"},301:{code:301,text:"Moved Permanently",description:'"The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs."',spec_title:"RFC7231#6.4.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.2"},302:{code:302,text:"Found",description:'"The target resource resides temporarily under a different URI."',spec_title:"RFC7231#6.4.3",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.3"},303:{code:303,text:"See Other",description:'"The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request."',spec_title:"RFC7231#6.4.4",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.4"},304:{code:304,text:"Not Modified",description:'"A conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false."',spec_title:"RFC7232#4.1",spec_href:"http://tools.ietf.org/html/rfc7232#section-4.1"},305:{code:305,text:"Use Proxy",description:"*deprecated*",spec_title:"RFC7231#6.4.5",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.5"},307:{code:307,text:"Temporary Redirect",description:'"The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI."',spec_title:"RFC7231#6.4.7",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.4.7"},400:{code:400,text:"Bad Request",description:'"The server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process."',spec_title:"RFC7231#6.5.1",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.1"},401:{code:401,text:"Unauthorized",description:'"The request has not been applied because it lacks valid authentication credentials for the target resource."',spec_title:"RFC7235#6.3.1",spec_href:"http://tools.ietf.org/html/rfc7235#section-3.1"},402:{code:402,text:"Payment Required",description:"*reserved*",spec_title:"RFC7231#6.5.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.2"},403:{code:403,text:"Forbidden",description:'"The server understood the request but refuses to authorize it."',spec_title:"RFC7231#6.5.3",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.3"},404:{code:404,text:"Not Found",description:'"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."',spec_title:"RFC7231#6.5.4",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.4"},405:{code:405,text:"Method Not Allowed",description:'"The method specified in the request-line is known by the origin server but not supported by the target resource."',spec_title:"RFC7231#6.5.5",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.5"},406:{code:406,text:"Not Acceptable",description:'"The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation."',spec_title:"RFC7231#6.5.6",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.6"},407:{code:407,text:"Proxy Authentication Required",description:'"The client needs to authenticate itself in order to use a proxy."',spec_title:"RFC7231#6.3.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.3.2"},408:{code:408,text:"Request Timeout",description:'"The server did not receive a complete request message within the time that it was prepared to wait."',spec_title:"RFC7231#6.5.7",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.7"},409:{code:409,text:"Conflict",description:'"The request could not be completed due to a conflict with the current state of the resource."',spec_title:"RFC7231#6.5.8",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.8"},410:{code:410,text:"Gone",description:'"Access to the target resource is no longer available at the origin server and that this condition is likely to be permanent."',spec_title:"RFC7231#6.5.9",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.9"},411:{code:411,text:"Length Required",description:'"The server refuses to accept the request without a defined Content-Length."',spec_title:"RFC7231#6.5.10",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.10"},412:{code:412,text:"Precondition Failed",description:'"One or more preconditions given in the request header fields evaluated to false when tested on the server."',spec_title:"RFC7232#4.2",spec_href:"http://tools.ietf.org/html/rfc7232#section-4.2"},413:{code:413,text:"Payload Too Large",description:'"The server is refusing to process a request because the request payload is larger than the server is willing or able to process."',spec_title:"RFC7231#6.5.11",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.11"},414:{code:414,text:"URI Too Long",description:'"The server is refusing to service the request because the request-target is longer than the server is willing to interpret."',spec_title:"RFC7231#6.5.12",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.12"},415:{code:415,text:"Unsupported Media Type",description:'"The origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method."',spec_title:"RFC7231#6.5.13",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.13"},416:{code:416,text:"Range Not Satisfiable",description:'"None of the ranges in the request\'s Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges."',spec_title:"RFC7233#4.4",spec_href:"http://tools.ietf.org/html/rfc7233#section-4.4"},417:{code:417,text:"Expectation Failed",description:'"The expectation given in the request\'s Expect header field could not be met by at least one of the inbound servers."',spec_title:"RFC7231#6.5.14",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.14"},418:{code:418,text:"I'm a teapot",description:'"1988 April Fools Joke. Returned by tea pots requested to brew coffee."',spec_title:"RFC 2324",spec_href:"https://tools.ietf.org/html/rfc2324"},426:{code:426,text:"Upgrade Required",description:'"The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol."',spec_title:"RFC7231#6.5.15",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.5.15"},500:{code:500,text:"Internal Server Error",description:'"The server encountered an unexpected condition that prevented it from fulfilling the request."',spec_title:"RFC7231#6.6.1",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.1"},501:{code:501,text:"Not Implemented",description:'"The server does not support the functionality required to fulfill the request."',spec_title:"RFC7231#6.6.2",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.2"},502:{code:502,text:"Bad Gateway",description:'"The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request."',spec_title:"RFC7231#6.6.3",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.3"},503:{code:503,text:"Service Unavailable",description:'"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."',spec_title:"RFC7231#6.6.4",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.4"},504:{code:504,text:"Gateway Time-out",description:'"The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request."',spec_title:"RFC7231#6.6.5",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.5"},505:{code:505,text:"HTTP Version Not Supported",description:'"The server does not support, or refuses to support, the protocol version that was used in the request message."',spec_title:"RFC7231#6.6.6",spec_href:"http://tools.ietf.org/html/rfc7231#section-6.6.6"},102:{code:102,text:"Processing",description:'"An interim response to inform the client that the server has accepted the complete request, but has not yet completed it."',spec_title:"RFC5218#10.1",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.1"},207:{code:207,text:"Multi-Status",description:'"Status for multiple independent operations."',spec_title:"RFC5218#10.2",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.2"},226:{code:226,text:"IM Used",description:'"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance."',spec_title:"RFC3229#10.4.1",spec_href:"http://tools.ietf.org/html/rfc3229#section-10.4.1"},308:{code:308,text:"Permanent Redirect",description:'"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET."',spec_title:"RFC7238",spec_href:"http://tools.ietf.org/html/rfc7238"},422:{code:422,text:"Unprocessable Entity",description:'"The server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions."',spec_title:"RFC5218#10.3",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.3"},423:{code:423,text:"Locked",description:'"The source or destination resource of a method is locked."',spec_title:"RFC5218#10.4",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.4"},424:{code:424,text:"Failed Dependency",description:'"The method could not be performed on the resource because the requested action depended on another action and that action failed."',spec_title:"RFC5218#10.5",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.5"},428:{code:428,text:"Precondition Required",description:'"The origin server requires the request to be conditional."',spec_title:"RFC6585#3",spec_href:"http://tools.ietf.org/html/rfc6585#section-3"},429:{code:429,text:"Too Many Requests",description:'"The user has sent too many requests in a given amount of time ("rate limiting")."',spec_title:"RFC6585#4",spec_href:"http://tools.ietf.org/html/rfc6585#section-4"},431:{code:431,text:"Request Header Fields Too Large",description:'"The server is unwilling to process the request because its header fields are too large."',spec_title:"RFC6585#5",spec_href:"http://tools.ietf.org/html/rfc6585#section-5"},451:{code:451,text:"Unavailable For Legal Reasons",description:'"The server is denying access to the resource in response to a legal demand."',spec_title:"draft-ietf-httpbis-legally-restricted-status",spec_href:"http://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status"},506:{code:506,text:"Variant Also Negotiates",description:'"The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process."',spec_title:"RFC2295#8.1",spec_href:"http://tools.ietf.org/html/rfc2295#section-8.1"},507:{code:507,text:"Insufficient Storage",description:'The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request."',spec_title:"RFC5218#10.6",spec_href:"http://tools.ietf.org/html/rfc2518#section-10.6"},511:{code:511,text:"Network Authentication Required",description:'"The client needs to authenticate to gain network access."',spec_title:"RFC6585#6",spec_href:"http://tools.ietf.org/html/rfc6585#section-6"}},c=function(){function InMemoryDbService(){}return InMemoryDbService}(),a=function(){function InMemoryBackendConfigArgs(){}return InMemoryBackendConfigArgs}(),p=function(){function InMemoryBackendConfig(e){void 0===e&&(e={}),Object.assign(this,{caseSensitiveSearch:!1,defaultResponseOptions:new r.BaseResponseOptions,delay:500,delete404:!1,passThruUnknownUrl:!1,post204:!0,put204:!0,apiBase:void 0,host:void 0,rootPath:void 0},e)}return InMemoryBackendConfig.decorators=[{type:t.Injectable}],InMemoryBackendConfig.ctorParameters=function(){return[{type:a}]},InMemoryBackendConfig}(),d=function(){function InMemoryBackendService(e,t,r){this.injector=e,this.inMemDbService=t,this.config=new p,this.resetDb();var o=this.getLocation("./");this.config.host=o.host,this.config.rootPath=o.pathname,Object.assign(this.config,r||{}),this.setPassThruBackend()}return InMemoryBackendService.prototype.createConnection=function(e){var t;try{t=this.handleRequest(e)}catch(r){var o=r.message||r,n=createErrorResponse(e,s.INTERNAL_SERVER_ERROR,""+o);t=this.addDelay(createObservableResponse(e,n))}return{readyState:r.ReadyState.Done,request:e,response:t}},InMemoryBackendService.prototype.handleRequest=function(e){var t,o=this.inMemDbService.parseUrl?this.inMemDbService.parseUrl(e.url):this.parseUrl(e.url),n=o.base,i=o.collectionName,c=o.id,a=o.query,p=o.resourceUrl,d=this.db[i],h={req:e,base:n,collection:d,collectionName:i,headers:new r.Headers({"Content-Type":"application/json"}),id:this.parseId(d,c),query:a,resourceUrl:p},l=r.RequestMethod[e.method||0].toLowerCase();if(/commands\/$/i.test(h.base))return this.commands(h);if(this.inMemDbService[l]){var f={requestInfo:h,db:this.db,config:this.config,passThruBackend:this.passThruBackend},u=this.inMemDbService[l](f);return this.addDelay(u)}return h.collection?this.addDelay(this.collectionHandler(h)):this.passThruBackend?this.passThruBackend.createConnection(e).response:(t=createErrorResponse(e,s.NOT_FOUND,"Collection '"+i+"' not found"),this.addDelay(createObservableResponse(e,t)))},InMemoryBackendService.prototype.addDelay=function(e){var t=this.config.delay;return 0===t?e:e.delay(t||500)},InMemoryBackendService.prototype.applyQuery=function(e,t){var r=[],o=this.config.caseSensitiveSearch?void 0:"i";t.paramsMap.forEach(function(e,t){e.forEach(function(e){return r.push({name:t,rx:new RegExp(decodeURI(e),o)})})});var n=r.length;return n?e.filter(function(e){for(var t=!0,o=n;t&&o;){o-=1;var s=r[o];t=s.rx.test(e[s.name])}return t}):e},InMemoryBackendService.prototype.clone=function(e){return JSON.parse(JSON.stringify(e))},InMemoryBackendService.prototype.collectionHandler=function(e){var t=this,n=e.req;return new o.Observable(function(o){var i;switch(n.method){case r.RequestMethod.Get:i=t.get(e);break;case r.RequestMethod.Post:i=t.post(e);break;case r.RequestMethod.Put:i=t.put(e);break;case r.RequestMethod.Delete:i=t.delete(e);break;default:i=createErrorResponse(n,s.METHOD_NOT_ALLOWED,"Method not allowed")}return t.inMemDbService.responseInterceptor&&(i=t.inMemDbService.responseInterceptor(i,e)),emitResponse(o,e.req,i),function(){}})},InMemoryBackendService.prototype.commands=function(e){var t,o=e.collectionName.toLowerCase(),n=e.req.method;switch(o){case"resetdb":this.resetDb(),t=new r.ResponseOptions({status:s.OK});break;case"config":if(n===r.RequestMethod.Get)t=new r.ResponseOptions({body:this.clone(this.config),status:s.OK});else{var i=JSON.parse(e.req.text()||"{}");Object.assign(this.config,i),this.setPassThruBackend(),t=new r.ResponseOptions({status:s.NO_CONTENT})}break;default:t=createErrorResponse(e.req,s.INTERNAL_SERVER_ERROR,'Unknown command "'+o+'"')}return createObservableResponse(e.req,t)},InMemoryBackendService.prototype.delete=function(e){var t=e.id,o=e.collection,n=e.collectionName,i=e.headers,c=e.req;if(!t)return createErrorResponse(c,s.NOT_FOUND,'Missing "'+n+'" id');var a=this.removeById(o,t);return new r.ResponseOptions({headers:i,status:a||!this.config.delete404?s.NO_CONTENT:s.NOT_FOUND})},InMemoryBackendService.prototype.findById=function(e,t){return e.find(function(e){return e.id===t})},InMemoryBackendService.prototype.genId=function(e){var t=0;return e.reduce(function(e,r){t=Math.max(t,"number"==typeof r.id?r.id:t)},void 0),t+1},InMemoryBackendService.prototype.get=function(e){var t=e.id,o=e.query,n=e.collection,i=e.collectionName,c=e.headers,a=e.req,p=n;return t?p=this.findById(n,t):o&&(p=this.applyQuery(n,o)),p?new r.ResponseOptions({body:{data:this.clone(p)},headers:c,status:s.OK}):createErrorResponse(a,s.NOT_FOUND,"'"+i+"' with id='"+t+"' not found")},InMemoryBackendService.prototype.getLocation=function(e){var t=document.createElement("a");return t.href=e,t},InMemoryBackendService.prototype.indexOf=function(e,t){return e.findIndex(function(e){return e.id===t})},InMemoryBackendService.prototype.parseId=function(e,t){if(e&&void 0!=t){var r=e[0]&&"number"==typeof e[0].id;if(r){var o=parseFloat(t);return isNaN(o)?t:o}return t}},InMemoryBackendService.prototype.parseUrl=function(e){try{var t=this.getLocation(e),o=this.config.rootPath.length,n="";t.host!==this.config.host&&(o=1,n=t.protocol+"//"+t.host+"/");var s=t.pathname.substring(o),i=s.split("/"),c=0,a=void 0;void 0==this.config.apiBase?a=i[c++]:(a=removeTrailingSlash(this.config.apiBase.trim()),c=a?a.split("/").length:0),a+="/";var p=i[c++];p=p&&p.split(".")[0];var d=i[c++],h=t.search&&new r.URLSearchParams(t.search.substr(1)),l=n+a+p+"/";return{base:a,collectionName:p,id:d,query:h,resourceUrl:l}}catch(t){var f="unable to parse url '"+e+"'; original error: "+t.message;throw new Error(f)}},InMemoryBackendService.prototype.post=function(e){var t=e.collection,o=e.headers,n=e.id,i=e.req,c=e.resourceUrl,a=JSON.parse(i.text());void 0==a.id&&(a.id=n||this.genId(t)),n=a.id;var p=this.indexOf(t,n),d={data:this.clone(a)};if(p>-1){t[p]=a;var h=this.config.post204?{headers:o,status:s.NO_CONTENT}:{headers:o,body:d,status:s.OK};return new r.ResponseOptions(h)}return t.push(a),o.set("Location",c+"/"+n),new r.ResponseOptions({headers:o,body:d,status:s.CREATED})},InMemoryBackendService.prototype.put=function(e){var t=e.id,o=e.collection,n=e.collectionName,i=e.headers,c=e.req,a=JSON.parse(c.text());if(void 0==a.id)return createErrorResponse(c,s.NOT_FOUND,"Missing '"+n+"' id");if(t!==a.id)return createErrorResponse(c,s.BAD_REQUEST,'"'+n+'" id does not match item.id');var p=this.indexOf(o,t),d={data:this.clone(a)};if(p>-1){o[p]=a;var h=this.config.put204?{headers:i,status:s.NO_CONTENT}:{headers:i,body:d,status:s.OK};return new r.ResponseOptions(h)}return o.push(a),new r.ResponseOptions({headers:i,body:d,status:s.CREATED})},InMemoryBackendService.prototype.removeById=function(e,t){var r=this.indexOf(e,t);return r>-1&&(e.splice(r,1),!0)},InMemoryBackendService.prototype.resetDb=function(){this.db=this.inMemDbService.createDb()},InMemoryBackendService.prototype.setPassThruBackend=function(){if(this.passThruBackend=void 0,this.config.passThruUnknownUrl)try{var e=this.injector.get(r.BrowserXhr),t=this.injector.get(r.ResponseOptions),o=this.injector.get(r.XSRFStrategy);this.passThruBackend=new r.XHRBackend(e,t,o)}catch(e){throw e.message="Cannot create passThru404 backend; "+(e.message||""),e}},InMemoryBackendService.decorators=[{type:t.Injectable}],InMemoryBackendService.ctorParameters=function(){return[{type:t.Injector},{type:c},{type:a,decorators:[{type:t.Inject,args:[p]},{type:t.Optional}]}]},InMemoryBackendService}(),h=function(){function InMemoryWebApiModule(){}return InMemoryWebApiModule.forRoot=function(e,t){return{ngModule:InMemoryWebApiModule,providers:[{provide:c,useClass:e},{provide:p,useValue:t}]}},InMemoryWebApiModule.decorators=[{type:t.NgModule,args:[{providers:[{provide:r.XHRBackend,useFactory:inMemoryBackendServiceFactory,deps:[t.Injector,c,p]}]}]}],InMemoryWebApiModule.ctorParameters=function(){return[]},InMemoryWebApiModule}();e.STATUS=s,e.STATUS_CODE_INFO=i,e.createErrorResponse=createErrorResponse,e.createObservableResponse=createObservableResponse,e.emitResponse=emitResponse,e.InMemoryDbService=c,e.InMemoryBackendConfigArgs=a,e.removeTrailingSlash=removeTrailingSlash,e.InMemoryBackendConfig=p,e.isSuccess=isSuccess,e.setStatusText=setStatusText,e.InMemoryBackendService=d,e.inMemoryBackendServiceFactory=inMemoryBackendServiceFactory,e.InMemoryWebApiModule=h,Object.defineProperty(e,"__esModule",{value:!0})})},,,,,,,,,,function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=r(4);r(37);var i=function(){function AppComponent(){this.emoji=["🎉","😍","😜","👍"]}return AppComponent.prototype.changeEmoji=function(){this.activeEmoji=this.emoji[Math.floor(Math.random()*this.emoji.length)]},AppComponent}();i=o([s.Component({selector:"app-root",template:r(41)}),n("design:paramtypes",[])],i),t.AppComponent=i},function(e,t){},,,,function(e,t){e.exports="<h1 (click)=changeEmoji()>Hello Angular {{activeEmoji}}</h1>\r\n\r\n<app-entry-list></app-entry-list>\r\n"},function(e,t,r){"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}__export(r(43)),__export(r(44)),__export(r(48))},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=r(4),i=r(25),c=function(){function EntryService(e){this.http=e}return EntryService.prototype.getEntries=function(){return this.http.get("/app/entries").toPromise().then(function(e){return e.json().data})},EntryService}();c=o([s.Injectable(),n("design:paramtypes",[i.Http])],c),t.EntryService=c},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};r(45);var s=r(4),i=r(43),c=function(){function EntryListComponent(e){this.entryService=e}return EntryListComponent.prototype.ngOnInit=function(){var e=this;this.entryService.getEntries().then(function(t){return e.entries=t})},EntryListComponent}();c=o([s.Component({selector:"app-entry-list",template:r(47)}),n("design:paramtypes",[i.EntryService])],c),t.EntryListComponent=c},37,,function(e,t){e.exports='<app-entry *ngFor="let entry of entries" [entry]="entry">\r\n\r\n</app-entry>\r\n'},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};r(49);var s=r(4),i=r(51),c=function(){function EntryComponent(){}return EntryComponent}();o([s.Input(),n("design:type",i.Entry)],c.prototype,"entry",void 0),c=o([s.Component({selector:"app-entry",template:r(52)}),n("design:paramtypes",[])],c),t.EntryComponent=c},37,,function(e,t){"use strict";var r=function(){function Entry(){}return Entry}();t.Entry=r},function(e,t){e.exports='\r\n<figure>\r\n\r\n  <h2>{{entry.title}}</h2>\r\n\r\n  <img src="{{entry.photo}}">\r\n\r\n  <figcaption>{{entry.description}}</figcaption>\r\n\r\n</figure>\r\n\r\n<div class="actions">\r\n\r\n  <button type=\'button\' (click)=\'isLiked = !isLiked\' [ngClass]="{liked: isLiked}">♥</button>\r\n\r\n  <button type=\'button\' (click)=\'showComments = !showComments\' >Comments: {{entry.comments.length}}</button>\r\n\r\n</div>\r\n\r\n<div class="comments" *ngIf="showComments">\r\n\r\n  <div class="comment" *ngFor="let comment of entry.comments">\r\n\r\n    <p><strong>{{comment.name}}:</strong> {{comment.comment}}</p>\r\n\r\n  </div>\r\n\r\n</div>\r\n'},function(e,t,r){"use strict";var o=function(){function InMemoryEntryService(){}return InMemoryEntryService.prototype.createDb=function(){var e=[{id:1,title:"Burning Sundown Behind Trees",description:"A view of the setting sun through trees",photo:r(54),comments:[{id:1,name:"Jane Smith",comment:"This is my favorite! I love it!"}]},{id:2,title:"Water Lilies and Algas",description:"Still water with floating lilies",photo:r(55),comments:[{id:2,name:"Kyle Jones",comment:"Nice!"},{id:3,name:"Alecia Clark",comment:"All the greens make this amazing."}]},{id:3,title:"German Steam Engine",description:"Trains at the station",photo:r(56),comments:[]},{id:4,title:"Red Sun Stripe at Horizon",description:"Green fields and a glimpse of sunlight",photo:r(57),comments:[{id:4,name:"Steve Johnson",comment:"It looks like trouble is on the way."
  },{id:5,name:"Becky M",comment:"I imagine this was a shot of a storm that just passed."}]},{id:5,title:"Sundown Behind Fields",description:"Clouds taking form at sun set",photo:r(58),comments:[{id:6,name:"Lisa Frank",comment:"Beautiful!"}]}];return{entries:e}},InMemoryEntryService}();t.InMemoryEntryService=o},function(e,t,r){e.exports=r.p+"/assets/Burning-sundown-behind-trees.e021ce0bd0c4b835a803b1cb84bd654d.jpg"},function(e,t,r){e.exports=r.p+"/assets/Water-lilies-and-algas.be15b89f33e23be6195a8a39d59856ce.jpg"},function(e,t,r){e.exports=r.p+"/assets/German-steam-engine-No.4.f732e5a9a9942cfc6a3592f6df31835a.jpg"},function(e,t,r){e.exports=r.p+"/assets/Red-sun-stripe-at-horizon.0335b6c2e00bde48d380c5fc0f783210.jpg"},function(e,t,r){e.exports=r.p+"/assets/Sundown-behind-fields.519215051a43091704d1ad35184811ef.jpg"}]);
  //# sourceMappingURL=app.61ee373360722f5e4219.js.map