source: trip-planner-front/node_modules/.cache/babel-webpack/d706a75075c8bdd8debc9bc1e8f1b562.json@ 571e0df

Last change on this file since 571e0df was b738035, checked in by Ema <ema_spirova@…>, 3 years ago

signup/login server errors on front and remove location from planner

  • Property mode set to 100644
File size: 21.5 KB
Line 
1{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nfunction Rating_span_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"span\", 3);\n i0.ɵɵlistener(\"click\", function Rating_span_1_Template_span_click_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r2 = i0.ɵɵnextContext();\n return ctx_r2.clear($event);\n })(\"keydown.enter\", function Rating_span_1_Template_span_keydown_enter_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r4 = i0.ɵɵnextContext();\n return ctx_r4.clear($event);\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", ctx_r0.iconCancelClass)(\"ngStyle\", ctx_r0.iconCancelStyle);\n i0.ɵɵattribute(\"tabindex\", ctx_r0.disabled || ctx_r0.readonly ? null : \"0\");\n }\n}\n\nfunction Rating_span_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"span\", 4);\n i0.ɵɵlistener(\"click\", function Rating_span_2_Template_span_click_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r8);\n const i_r6 = restoredCtx.index;\n const ctx_r7 = i0.ɵɵnextContext();\n return ctx_r7.rate($event, i_r6);\n })(\"keydown.enter\", function Rating_span_2_Template_span_keydown_enter_0_listener($event) {\n const restoredCtx = i0.ɵɵrestoreView(_r8);\n const i_r6 = restoredCtx.index;\n const ctx_r9 = i0.ɵɵnextContext();\n return ctx_r9.rate($event, i_r6);\n });\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const i_r6 = ctx.index;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngClass\", !ctx_r1.value || i_r6 >= ctx_r1.value ? ctx_r1.iconOffClass : ctx_r1.iconOnClass)(\"ngStyle\", !ctx_r1.value || i_r6 >= ctx_r1.value ? ctx_r1.iconOffStyle : ctx_r1.iconOnStyle);\n i0.ɵɵattribute(\"tabindex\", ctx_r1.disabled || ctx_r1.readonly ? null : \"0\");\n }\n}\n\nconst _c0 = function (a0, a1) {\n return {\n \"p-readonly\": a0,\n \"p-disabled\": a1\n };\n};\n\nconst RATING_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Rating),\n multi: true\n};\n\nclass Rating {\n constructor(cd) {\n this.cd = cd;\n this.stars = 5;\n this.cancel = true;\n this.iconOnClass = 'pi pi-star-fill';\n this.iconOffClass = 'pi pi-star';\n this.iconCancelClass = 'pi pi-ban';\n this.onRate = new EventEmitter();\n this.onCancel = new EventEmitter();\n\n this.onModelChange = () => {};\n\n this.onModelTouched = () => {};\n }\n\n ngOnInit() {\n this.starsArray = [];\n\n for (let i = 0; i < this.stars; i++) {\n this.starsArray[i] = i;\n }\n }\n\n rate(event, i) {\n if (!this.readonly && !this.disabled) {\n this.value = i + 1;\n this.onModelChange(this.value);\n this.onModelTouched();\n this.onRate.emit({\n originalEvent: event,\n value: i + 1\n });\n }\n\n event.preventDefault();\n }\n\n clear(event) {\n if (!this.readonly && !this.disabled) {\n this.value = null;\n this.onModelChange(this.value);\n this.onModelTouched();\n this.onCancel.emit(event);\n }\n\n event.preventDefault();\n }\n\n writeValue(value) {\n this.value = value;\n this.cd.detectChanges();\n }\n\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val) {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n}\n\nRating.ɵfac = function Rating_Factory(t) {\n return new (t || Rating)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n\nRating.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: Rating,\n selectors: [[\"p-rating\"]],\n hostAttrs: [1, \"p-element\"],\n inputs: {\n disabled: \"disabled\",\n readonly: \"readonly\",\n stars: \"stars\",\n cancel: \"cancel\",\n iconOnClass: \"iconOnClass\",\n iconOnStyle: \"iconOnStyle\",\n iconOffClass: \"iconOffClass\",\n iconOffStyle: \"iconOffStyle\",\n iconCancelClass: \"iconCancelClass\",\n iconCancelStyle: \"iconCancelStyle\"\n },\n outputs: {\n onRate: \"onRate\",\n onCancel: \"onCancel\"\n },\n features: [i0.ɵɵProvidersFeature([RATING_VALUE_ACCESSOR])],\n decls: 3,\n vars: 6,\n consts: [[1, \"p-rating\", 3, \"ngClass\"], [\"class\", \"p-rating-icon p-rating-cancel\", 3, \"ngClass\", \"ngStyle\", \"click\", \"keydown.enter\", 4, \"ngIf\"], [\"class\", \"p-rating-icon\", 3, \"ngClass\", \"ngStyle\", \"click\", \"keydown.enter\", 4, \"ngFor\", \"ngForOf\"], [1, \"p-rating-icon\", \"p-rating-cancel\", 3, \"ngClass\", \"ngStyle\", \"click\", \"keydown.enter\"], [1, \"p-rating-icon\", 3, \"ngClass\", \"ngStyle\", \"click\", \"keydown.enter\"]],\n template: function Rating_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, Rating_span_1_Template, 1, 3, \"span\", 1);\n i0.ɵɵtemplate(2, Rating_span_2_Template, 1, 3, \"span\", 2);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(3, _c0, ctx.readonly, ctx.disabled));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.cancel);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.starsArray);\n }\n },\n directives: [i1.NgClass, i1.NgIf, i1.NgForOf, i1.NgStyle],\n styles: [\".p-rating-icon{cursor:pointer}.p-rating.p-rating-readonly .p-rating-icon{cursor:default}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Rating, [{\n type: Component,\n args: [{\n selector: 'p-rating',\n template: `\n <div class=\"p-rating\" [ngClass]=\"{'p-readonly': readonly, 'p-disabled': disabled}\">\n <span [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" *ngIf=\"cancel\" (click)=\"clear($event)\" (keydown.enter)=\"clear($event)\" class=\"p-rating-icon p-rating-cancel\" [ngClass]=\"iconCancelClass\" [ngStyle]=\"iconCancelStyle\"></span>\n <span *ngFor=\"let star of starsArray;let i=index\" class=\"p-rating-icon\" [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" (click)=\"rate($event,i)\" (keydown.enter)=\"rate($event,i)\"\n [ngClass]=\"(!value || i >= value) ? iconOffClass : iconOnClass\"\n [ngStyle]=\"(!value || i >= value) ? iconOffStyle : iconOnStyle\"></span>\n </div>\n `,\n providers: [RATING_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n },\n styles: [\".p-rating-icon{cursor:pointer}.p-rating.p-rating-readonly .p-rating-icon{cursor:default}\\n\"]\n }]\n }], function () {\n return [{\n type: i0.ChangeDetectorRef\n }];\n }, {\n disabled: [{\n type: Input\n }],\n readonly: [{\n type: Input\n }],\n stars: [{\n type: Input\n }],\n cancel: [{\n type: Input\n }],\n iconOnClass: [{\n type: Input\n }],\n iconOnStyle: [{\n type: Input\n }],\n iconOffClass: [{\n type: Input\n }],\n iconOffStyle: [{\n type: Input\n }],\n iconCancelClass: [{\n type: Input\n }],\n iconCancelStyle: [{\n type: Input\n }],\n onRate: [{\n type: Output\n }],\n onCancel: [{\n type: Output\n }]\n });\n})();\n\nclass RatingModule {}\n\nRatingModule.ɵfac = function RatingModule_Factory(t) {\n return new (t || RatingModule)();\n};\n\nRatingModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: RatingModule\n});\nRatingModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(RatingModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [Rating],\n declarations: [Rating]\n }]\n }], null, null);\n})();\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { RATING_VALUE_ACCESSOR, Rating, RatingModule };","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/node_modules/primeng/fesm2015/primeng-rating.mjs"],"names":["i0","forwardRef","EventEmitter","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","Output","NgModule","i1","CommonModule","NG_VALUE_ACCESSOR","RATING_VALUE_ACCESSOR","provide","useExisting","Rating","multi","constructor","cd","stars","cancel","iconOnClass","iconOffClass","iconCancelClass","onRate","onCancel","onModelChange","onModelTouched","ngOnInit","starsArray","i","rate","event","readonly","disabled","value","emit","originalEvent","preventDefault","clear","writeValue","detectChanges","registerOnChange","fn","registerOnTouched","setDisabledState","val","markForCheck","ɵfac","ChangeDetectorRef","ɵcmp","NgClass","NgIf","NgForOf","NgStyle","type","args","selector","template","providers","changeDetection","OnPush","encapsulation","None","host","styles","iconOnStyle","iconOffStyle","iconCancelStyle","RatingModule","ɵmod","ɵinj","imports","exports","declarations"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,UAAT,EAAqBC,YAArB,EAAmCC,SAAnC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,KAAD,CAlBqE;AAoBtFkB,IAAAA,MAAM,EAAE,CAAC;AACT+B,MAAAA,IAAI,EAAEhD;AADG,KAAD,CApB8E;AAsBtFkB,IAAAA,QAAQ,EAAE,CAAC;AACX8B,MAAAA,IAAI,EAAEhD;AADK,KAAD;AAtB4E,GAZtG;AAAA;;AAqCA,MAAM8D,YAAN,CAAmB;;AAEnBA,YAAY,CAACrB,IAAb;AAAA,mBAAyGqB,YAAzG;AAAA;;AACAA,YAAY,CAACC,IAAb,kBAjDyFtE,EAiDzF;AAAA,QAA0GqE;AAA1G;AACAA,YAAY,CAACE,IAAb,kBAlDyFvE,EAkDzF;AAAA,YAAkI,CAACU,YAAD,CAAlI;AAAA;;AACA;AAAA,qDAnDyFV,EAmDzF,mBAA2FqE,YAA3F,EAAqH,CAAC;AAC1Gd,IAAAA,IAAI,EAAE/C,QADoG;AAE1GgD,IAAAA,IAAI,EAAE,CAAC;AACCgB,MAAAA,OAAO,EAAE,CAAC9D,YAAD,CADV;AAEC+D,MAAAA,OAAO,EAAE,CAAC1D,MAAD,CAFV;AAGC2D,MAAAA,YAAY,EAAE,CAAC3D,MAAD;AAHf,KAAD;AAFoG,GAAD,CAArH;AAAA;AASA;AACA;AACA;;;AAEA,SAASH,qBAAT,EAAgCG,MAAhC,EAAwCsD,YAAxC","sourcesContent":["import * as i0 from '@angular/core';\nimport { forwardRef, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nconst RATING_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Rating),\n multi: true\n};\nclass Rating {\n constructor(cd) {\n this.cd = cd;\n this.stars = 5;\n this.cancel = true;\n this.iconOnClass = 'pi pi-star-fill';\n this.iconOffClass = 'pi pi-star';\n this.iconCancelClass = 'pi pi-ban';\n this.onRate = new EventEmitter();\n this.onCancel = new EventEmitter();\n this.onModelChange = () => { };\n this.onModelTouched = () => { };\n }\n ngOnInit() {\n this.starsArray = [];\n for (let i = 0; i < this.stars; i++) {\n this.starsArray[i] = i;\n }\n }\n rate(event, i) {\n if (!this.readonly && !this.disabled) {\n this.value = (i + 1);\n this.onModelChange(this.value);\n this.onModelTouched();\n this.onRate.emit({\n originalEvent: event,\n value: (i + 1)\n });\n }\n event.preventDefault();\n }\n clear(event) {\n if (!this.readonly && !this.disabled) {\n this.value = null;\n this.onModelChange(this.value);\n this.onModelTouched();\n this.onCancel.emit(event);\n }\n event.preventDefault();\n }\n writeValue(value) {\n this.value = value;\n this.cd.detectChanges();\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n setDisabledState(val) {\n this.disabled = val;\n this.cd.markForCheck();\n }\n}\nRating.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Rating, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nRating.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"12.0.0\", version: \"13.0.0\", type: Rating, selector: \"p-rating\", inputs: { disabled: \"disabled\", readonly: \"readonly\", stars: \"stars\", cancel: \"cancel\", iconOnClass: \"iconOnClass\", iconOnStyle: \"iconOnStyle\", iconOffClass: \"iconOffClass\", iconOffStyle: \"iconOffStyle\", iconCancelClass: \"iconCancelClass\", iconCancelStyle: \"iconCancelStyle\" }, outputs: { onRate: \"onRate\", onCancel: \"onCancel\" }, host: { classAttribute: \"p-element\" }, providers: [RATING_VALUE_ACCESSOR], ngImport: i0, template: `\n <div class=\"p-rating\" [ngClass]=\"{'p-readonly': readonly, 'p-disabled': disabled}\">\n <span [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" *ngIf=\"cancel\" (click)=\"clear($event)\" (keydown.enter)=\"clear($event)\" class=\"p-rating-icon p-rating-cancel\" [ngClass]=\"iconCancelClass\" [ngStyle]=\"iconCancelStyle\"></span>\n <span *ngFor=\"let star of starsArray;let i=index\" class=\"p-rating-icon\" [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" (click)=\"rate($event,i)\" (keydown.enter)=\"rate($event,i)\"\n [ngClass]=\"(!value || i >= value) ? iconOffClass : iconOnClass\"\n [ngStyle]=\"(!value || i >= value) ? iconOffStyle : iconOnStyle\"></span>\n </div>\n `, isInline: true, styles: [\".p-rating-icon{cursor:pointer}.p-rating.p-rating-readonly .p-rating-icon{cursor:default}\\n\"], directives: [{ type: i1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { type: i1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { type: i1.NgStyle, selector: \"[ngStyle]\", inputs: [\"ngStyle\"] }, { type: i1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Rating, decorators: [{\n type: Component,\n args: [{ selector: 'p-rating', template: `\n <div class=\"p-rating\" [ngClass]=\"{'p-readonly': readonly, 'p-disabled': disabled}\">\n <span [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" *ngIf=\"cancel\" (click)=\"clear($event)\" (keydown.enter)=\"clear($event)\" class=\"p-rating-icon p-rating-cancel\" [ngClass]=\"iconCancelClass\" [ngStyle]=\"iconCancelStyle\"></span>\n <span *ngFor=\"let star of starsArray;let i=index\" class=\"p-rating-icon\" [attr.tabindex]=\"(disabled || readonly) ? null : '0'\" (click)=\"rate($event,i)\" (keydown.enter)=\"rate($event,i)\"\n [ngClass]=\"(!value || i >= value) ? iconOffClass : iconOnClass\"\n [ngStyle]=\"(!value || i >= value) ? iconOffStyle : iconOnStyle\"></span>\n </div>\n `, providers: [RATING_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {\n 'class': 'p-element'\n }, styles: [\".p-rating-icon{cursor:pointer}.p-rating.p-rating-readonly .p-rating-icon{cursor:default}\\n\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{\n type: Input\n }], readonly: [{\n type: Input\n }], stars: [{\n type: Input\n }], cancel: [{\n type: Input\n }], iconOnClass: [{\n type: Input\n }], iconOnStyle: [{\n type: Input\n }], iconOffClass: [{\n type: Input\n }], iconOffStyle: [{\n type: Input\n }], iconCancelClass: [{\n type: Input\n }], iconCancelStyle: [{\n type: Input\n }], onRate: [{\n type: Output\n }], onCancel: [{\n type: Output\n }] } });\nclass RatingModule {\n}\nRatingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RatingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRatingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RatingModule, declarations: [Rating], imports: [CommonModule], exports: [Rating] });\nRatingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RatingModule, imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RatingModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [Rating],\n declarations: [Rating]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { RATING_VALUE_ACCESSOR, Rating, RatingModule };\n"]},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.