From 3832538851e6963f0d8548f58a5f97ab07a719f2 Mon Sep 17 00:00:00 2001 From: PhilippMDoerner Date: Thu, 12 Dec 2024 14:29:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=205a96c?= =?UTF-8?q?1dfc3a0d24f0e13475851b29fa5c44f977e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storybook-0c9aba2732f8798ca2ae104c09855acc | 2 +- .../storybook-21d6f40cfb511982e4424e0e250a9557 | 2 +- ...iframe.bundle.js => 1917.b0e8fafc.iframe.bundle.js | 2 +- ...iframe.bundle.js => 6663.6ad7ade5.iframe.bundle.js | 2 +- .../pages/graph-page/graph-page.component.html | 7 +++++++ .../pages/graph-page/graph-page.component.scss | 11 +++++++++++ app/campaign/pages/graph-page/graph-page.component.ts | 2 ++ custom_bootstrap.scss | 4 ++++ ...-atoms-card-card-stories.6e174882.iframe.bundle.js | 2 +- ...ield-quote-field-stories.5a3b72b8.iframe.bundle.js | 2 +- ...n-campaign-admin-stories.11d92e42.iframe.bundle.js | 2 +- ...racter-character-stories.f4a36a84.iframe.bundle.js | 2 +- ...es-config-tables-stories.15edaa4c.iframe.bundle.js | 2 +- ...-profile-profile-stories.ceffc5ac.iframe.bundle.js | 2 +- ...admin-site-admin-stories.9937a8c9.iframe.bundle.js | 2 +- iframe.html | 4 ++-- ...c16dfb6e5eeb2.css => main.b173dfe05f1024f3f19d.css | 8 ++++++++ project.json | 2 +- ...undle.js => runtime~main.21146119.iframe.bundle.js | 2 +- 19 files changed, 47 insertions(+), 15 deletions(-) rename 1917.52d1f0f7.iframe.bundle.js => 1917.b0e8fafc.iframe.bundle.js (91%) rename 6663.d4189301.iframe.bundle.js => 6663.6ad7ade5.iframe.bundle.js (88%) rename design-atoms-card-card-stories.58fc4628.iframe.bundle.js => design-atoms-card-card-stories.6e174882.iframe.bundle.js (90%) rename design-organisms-quote-field-quote-field-stories.0f655785.iframe.bundle.js => design-organisms-quote-field-quote-field-stories.5a3b72b8.iframe.bundle.js (95%) rename design-templates-campaign-admin-campaign-admin-stories.3a5b374c.iframe.bundle.js => design-templates-campaign-admin-campaign-admin-stories.11d92e42.iframe.bundle.js (92%) rename design-templates-character-character-stories.5679a2fc.iframe.bundle.js => design-templates-character-character-stories.f4a36a84.iframe.bundle.js (92%) rename design-templates-config-tables-config-tables-stories.989d3c1f.iframe.bundle.js => design-templates-config-tables-config-tables-stories.15edaa4c.iframe.bundle.js (93%) rename design-templates-profile-profile-stories.f6e994fd.iframe.bundle.js => design-templates-profile-profile-stories.ceffc5ac.iframe.bundle.js (92%) rename design-templates-site-admin-site-admin-stories.2b613e4d.iframe.bundle.js => design-templates-site-admin-site-admin-stories.9937a8c9.iframe.bundle.js (92%) rename main.c375f40c16dfb6e5eeb2.css => main.b173dfe05f1024f3f19d.css (99%) rename runtime~main.dfad0a1c.iframe.bundle.js => runtime~main.21146119.iframe.bundle.js (95%) diff --git a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc index 0e1cb9468..14b809e2b 100644 --- a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc +++ b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc @@ -1 +1 @@ -{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"UGrvSyNudT1nbkhuEeMMc","sessionId":"6UcvjR3EnVMVxJttP3oF2","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1734010977366}}} \ No newline at end of file +{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"ffl98QdH81MK-flOExVCC","sessionId":"H2rix0cHy7k3NWYSuTh9H","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1734013711085}}} \ No newline at end of file diff --git a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 index 6b65a092f..43f2be985 100644 --- a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 +++ b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 @@ -1 +1 @@ -{"key":"session","content":{"id":"6UcvjR3EnVMVxJttP3oF2","lastUsed":1734010977350}} \ No newline at end of file +{"key":"session","content":{"id":"H2rix0cHy7k3NWYSuTh9H","lastUsed":1734013711065}} \ No newline at end of file diff --git a/1917.52d1f0f7.iframe.bundle.js b/1917.b0e8fafc.iframe.bundle.js similarity index 91% rename from 1917.52d1f0f7.iframe.bundle.js rename to 1917.b0e8fafc.iframe.bundle.js index ae30a439b..12443fee9 100644 --- a/1917.52d1f0f7.iframe.bundle.js +++ b/1917.b0e8fafc.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1917],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/animations/slideDown.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V4:()=>slideOutFromBottom,sb:()=>slideUpFromBottom,st:()=>slideRight});var _angular_animations__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const inactiveStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:.2,transform:"translateY(50%)"}),activeStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:1,transform:"translateY(0%)"}),slideUpFromBottom=((0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideUpFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)])])),slideOutFromBottom=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideOutFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),inactiveSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(100%)"}),activeSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(0%)"}),slideRight=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideRight",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",activeSlideRightStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",inactiveSlideRightStyle)])])},"./src/design/atoms/arrow-button/arrow-button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>ArrowButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var arrow_button_componentngResource=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource"),arrow_button_componentngResource_default=__webpack_require__.n(arrow_button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts");let ArrowButtonComponent=class ArrowButtonComponent{constructor(){this.icon=core.input.required(),this.kind=(0,core.input)("SECONDARY"),this.outline=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.iconName=(0,core.computed)((()=>`arrow-${this.icon()}-long`))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}],kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!1,transform:void 0}]}],outline:[{type:core.Input,args:[{isSignal:!0,alias:"outline",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ArrowButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-arrow-button",template:'\n',standalone:!0,imports:[icon_component.R,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[arrow_button_componentngResource_default()]})],ArrowButtonComponent)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>DiaryentryEncountersComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var diaryentry_encounters_componentngResource=__webpack_require__("./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource"),diaryentry_encounters_componentngResource_default=__webpack_require__.n(diaryentry_encounters_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");const ORDER_INDEX_INCREMENT=10;function hasShiftedOrderIndex(encounter){return encounter.order_index%ORDER_INDEX_INCREMENT>0}function getUnshiftedOrderIndex(encounter){return Math.floor(encounter.order_index/ORDER_INDEX_INCREMENT)*ORDER_INDEX_INCREMENT}function nextOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)+ORDER_INDEX_INCREMENT}var rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngrx_signals=__webpack_require__("./node_modules/@ngrx/signals/fesm2022/ngrx-signals.mjs"),shareReplay=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),switchMap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),clipboard=__webpack_require__("./src/utils/clipboard.ts");function httpErrorToast(err){if(!("number"===err.status?.constructor?.name.toLowerCase()))throw err;const buttons=500===err.status?[{label:"Copy to Clipboard",icon:"clipboard",onClick:()=>(0,clipboard.l)(err.error)}]:[];return{type:"DANGER",body:{text:`\n Please copy the error and send it to the developer:
\n ${error=err,JSON.stringify(error.error)}\n `,buttons},header:{text:getErrorHeading(err)}};var error}function getErrorHeading(error){switch(error.status){case 0:case 504:return"This can't be done without an internet connection";case 200:return"The target URL for the requested action does not seem to exist";case 500:return"The server exploded somehow!";default:return"An error occurred"}}var http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),base_service=__webpack_require__("./src/app/_services/base.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts");let CharacterService=class CharacterService extends base_service.d{constructor(routingService,http){super(http,"character"),this.routingService=routingService}getPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/playercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getNonPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/nonplayercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,characterName=data.name;return()=>this.routingService.getRoutePath("character",{name:characterName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};CharacterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],CharacterService);let DiaryentryService=class DiaryentryService extends base_service.d{constructor(routingService,http){super(http,"diaryentry"),this.routingService=routingService}readByParam(campaign,params){const authorName=params.name,url=`${this.baseUrl}/${campaign}/${params.sessionNumber}/${params.isMainSession}/${authorName}/`;return this.http.get(url).pipe((0,map.T)((diaryEntry=>this.parseDiaryEntry(diaryEntry))))}parseDiaryEntry(entry){return{...entry,author:entry?.author_details?.pk,session:entry?.session_details?.pk}}parseEntity(data){return{...data,author:data?.author_details?.pk,session:data?.session_details?.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,sessionNumber=data.session_details.session_number,isMainSession=data.session_details.is_main_session_int,authorName=data.author_details.name;return()=>this.routingService.getRoutePath("diaryentry",{sessionNumber,isMainSession,authorName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};DiaryentryService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],DiaryentryService);let EncounterConnectionService=class EncounterConnectionService extends base_service.d{constructor(http){super(http,"encounterconnection")}create(data){return super.create({...data,character:`${data.character}`})}parseEntity(data){return data}parseOverviewEntity(data){throw"CharacterPlayerClassConnection does not have an overview endpoint"}static{this.ctorParameters=()=>[{type:http.Qq}]}};EncounterConnectionService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterConnectionService);let EncounterService=class EncounterService extends base_service.d{constructor(routingService,http){super(http,"encounter"),this.routingService=routingService}getDiaryEntryEncounters(session_pk,authorName){const url=`${this.baseUrl}/session/${session_pk}/${authorName}`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}createForDiaryentry(encounter){const url=`${this.baseUrl}/`;return this.http.post(url,encounter).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}swapEncounterOrder(campaign,encounter1_pk,encounter2_pk){const url=`${this.baseUrl}/${campaign}/orderswap/`,requestBody={encounter1:encounter1_pk,encounter2:encounter2_pk};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}cutInsertEncounter(campaign,encounter,newOrderIndex){const url=`${this.baseUrl}/${campaign}/cutinsert/`,requestBody={encounter:encounter.pk,old_order_index:encounter.order_index,new_order_index:newOrderIndex};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}parseEntity(data){return{...data,pk:data.id??data.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details?.name,sessionNumber=data.diaryentry_details?.session_number,isMainSession=data.diaryentry_details?.is_main_session,authorName=data.diaryentry_details?.author_name,encounterTitle=data.title;return campaignName&&sessionNumber&&isMainSession&&authorName&&encounterTitle?()=>this.routingService.getRoutePath("diaryentry-encounter",{sessionNumber,isMainSession,authorName,campaign:campaignName,encounterTitle}):()=>""}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};EncounterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterService);let LocationService=class LocationService extends base_service.d{constructor(routingService,http){super(http,"location"),this.routingService=routingService}readByParam(campaign,params){const locationName=params.name,url=`${this.baseUrl}/${campaign}/${params.parentLocationName}/${locationName}/`;return this.http.get(url).pipe((0,map.T)((data=>this.parseEntity(data))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data),getAbsoluteRouterUrlForParentLocation:this.generateParentLocationUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,locationName=data.name,parentLocationName=data.parent_location_details.name??"NONE";return()=>this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:campaignName})}generateParentLocationUrlCallback(data){if(!(null!=data.parent_location_details))return null;const campaignName=data.campaign_details.name,parentLocationName=data.parent_location_details.name,grandParentLocationName=data.parent_location_details.parent_location??"NONE";return()=>this.routingService.getRoutePath("location",{name:parentLocationName,parent_name:grandParentLocationName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};LocationService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],LocationService);var global_store=__webpack_require__("./src/app/global.store.ts"),toast_overlay_component=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.ts"),array=__webpack_require__("./src/utils/array.ts"),logging=__webpack_require__("./src/utils/logging.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts"),ngrx_operators=__webpack_require__("./node_modules/@ngrx/operators/fesm2022/ngrx-operators.mjs"),Subject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subject.js"),noop=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),isObservable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isObservable.js");function rxMethod(generator,config){config?.injector||(0,core.assertInInjectionContext)(rxMethod);const sourceInjector=config?.injector??(0,core.inject)(core.Injector),source$=new Subject.B,sourceSub=generator(source$).subscribe();sourceInjector.get(core.DestroyRef).onDestroy((()=>sourceSub.unsubscribe()));const rxMethodFn=(input,config)=>{if(function isStatic(value){return!(0,core.isSignal)(value)&&!(0,isObservable.A)(value)}(input))return source$.next(input),{unsubscribe:noop.l};const instanceInjector=config?.injector??function getCallerInjector(){try{return(0,core.inject)(core.Injector)}catch{return null}}()??sourceInjector;if((0,core.isSignal)(input)){const watcher=(0,core.effect)((()=>{const value=input();(0,core.untracked)((()=>source$.next(value)))}),{injector:instanceInjector}),instanceSub={unsubscribe:()=>watcher.destroy()};return sourceSub.add(instanceSub),instanceSub}const instanceSub=input.subscribe((value=>source$.next(value)));return sourceSub.add(instanceSub),instanceInjector!==sourceInjector&&instanceInjector.get(core.DestroyRef).onDestroy((()=>instanceSub.unsubscribe())),instanceSub};return rxMethodFn.unsubscribe=sourceSub.unsubscribe.bind(sourceSub),rxMethodFn}var pipe=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/pipe.js"),tap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),string=__webpack_require__("./src/utils/string.ts");function getKeys(name){return{name,dataField:(0,string.YF)(name),errorField:`${(0,string.YF)(name)}Error`,queryStateField:`${(0,string.YF)(name)}QueryState`,loadMethod:`load${(0,string.ZH)(name)}`}}const initialState={diaryEntryDeleteState:"init",encounterServerModel:void 0,_encountersInUpdateStateIds:new Set,_encountersBeingCreated:[],isUpdatingGlobally:!1},DiaryentryPageStore=(0,ngrx_signals.Eu)({providedIn:"root"},(0,ngrx_signals.Q2)(initialState),function withQueries(queriesFactory){return store=>{const queries=queriesFactory({...store.stateSignals,...store.computedSignals,...store.methods}),storeWithState=function withQueriesState(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.Q2)((()=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.dataField]:void 0,[keys.errorField]:void 0,[keys.queryStateField]:"init"}))).reduce(((acc,RequestState)=>({...acc,...RequestState})),{}))))}(queries)(store);return function withQueryMethods(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.RI)((store=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.loadMethod]:rxMethod((0,pipe.F)((0,tap.M)((()=>(0,ngrx_signals.M8)(store,{[keys.queryStateField]:"loading",[keys.errorField]:void 0}))),(0,switchMap.n)((params=>queries[keys.name](params))),(0,ngrx_operators.Hn)({next:val=>(0,ngrx_signals.M8)(store,{[keys.dataField]:val,[keys.queryStateField]:"success"}),error:err=>{(0,ngrx_signals.M8)(store,{[keys.errorField]:err,[keys.queryStateField]:"error"})}})))}))).reduce(((acc,queryLoadFunction)=>({...acc,...queryLoadFunction})),{}))))}(queries)(storeWithState)}}((()=>{const diaryentryService=(0,core.inject)(DiaryentryService),characterService=(0,core.inject)(CharacterService),locationService=(0,core.inject)(LocationService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1));return{diaryentry:params=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>diaryentryService.readByParam(campaignName,params)))),campaignCharacters:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>characterService.getNonPlayerCharacters(campaignName)))),campaignLocations:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>locationService.campaignList(campaignName))))}})),(0,ngrx_signals.QO)((store=>({hasWritePermission:(0,core.inject)(global_store.v).hasRoleOrBetter("member"),diaryEntryEncounters:(0,core.computed)((()=>{const allEncounters=[...store.diaryentry()?.encounters??[],...store._encountersBeingCreated()];return(0,array.Z)(allEncounters,"order_index").map(((encounter,index)=>({encounter,isUpdating:store._encountersInUpdateStateIds().has(index)})))})),isUpdatingAnyEncounters:(0,core.computed)((()=>store._encountersInUpdateStateIds().size>0)),realEncounters:(0,core.computed)((()=>store.diaryentry()?.encounters??[]))}))),(0,ngrx_signals.RI)((store=>{const toastService=(0,core.inject)(toast_overlay_component.f),diaryentryService=(0,core.inject)(DiaryentryService),encounterConnectionService=(0,core.inject)(EncounterConnectionService),encounterService=(0,core.inject)(EncounterService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1)),updateEncounterList=newEncounterList=>{const newDiaryEntry={...store.diaryentry(),encounters:newEncounterList};(0,ngrx_signals.M8)(store,{diaryentry:newDiaryEntry})},markAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.add(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})},unmarkAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.delete(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})};return{reset:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"init",encounterServerModel:void 0,diaryentryQueryState:"init"}),addEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:[...store._encountersBeingCreated(),encounter]})},removeEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},addEncounter:encounter=>{encounterService.createForDiaryentry(encounter).pipe((0,take.s)(1)).subscribe({next:newEncounterList=>{updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},error:err=>toastService.addToast(httpErrorToast(err))})},removeEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.delete(encounter.pk).pipe((0,take.s)(1)).subscribe({next:()=>{unmarkAsBeingUpdated(encounter.pk);const newEncounterList=store.diaryentry()?.encounters?.filter((listEnc=>listEnc.pk!==encounter.pk))??[];updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},updateEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.update(encounter.pk,encounter).pipe((0,take.s)(1)).subscribe({next:newEncounter=>{unmarkAsBeingUpdated(encounter.pk);const diaryentry=store.diaryentry(),newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},swapEncounters:(encounter1Pk,encounter2Pk)=>{markAsBeingUpdated(encounter1Pk),markAsBeingUpdated(encounter2Pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.swapEncounterOrder(campaignName,encounter1Pk,encounter2Pk)))).subscribe({next:([updatedEnc1,updatedEnc2])=>{unmarkAsBeingUpdated(encounter1Pk),unmarkAsBeingUpdated(encounter2Pk);const newEncounterList1=(0,array.U1)(store.realEncounters(),updatedEnc1,"pk"),newEncounterList2=(0,array.U1)(newEncounterList1,updatedEnc2,"pk");updateEncounterList(newEncounterList2),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},cutInsertEncounter:(encounter,newOrderIndex)=>{markAsBeingUpdated(encounter.pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.cutInsertEncounter(campaignName,encounter,newOrderIndex)))).subscribe({next:newEncounterList=>{unmarkAsBeingUpdated(encounter.pk),updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},addEncounterConnection:connection=>encounterConnectionService.create(connection).pipe((0,take.s)(1)).subscribe({next:newConnection=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===newConnection.encounter)),newEncounter={...encounter,encounterConnections:[...encounter.encounterConnections??[],newConnection]},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))}),removeEncounterConnection:connection=>{encounterConnectionService.delete(connection.pk).pipe((0,take.s)(1)).subscribe((()=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===connection.encounter)),newEncounter={...encounter,encounterConnections:encounter.encounterConnections?.filter((con=>con.pk!==connection.pk))},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)}))},deleteDiaryEntry:()=>{(0,ngrx_signals.M8)(store,{diaryEntryDeleteState:"loading"}),diaryentryService.delete(store.diaryentry()?.pk).pipe((0,take.s)(1)).subscribe({next:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"success"}),error:err=>toastService.addToast(httpErrorToast(err))})}}})),(0,ngrx_signals.TK)((store=>({onInit:()=>{(0,logging.R)("DiaryEntryPageStore",store)}}))));var router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),arrow_button_component=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let DiaryentryEncountersComponent=class DiaryentryEncountersComponent{constructor(){this.store=(0,core.inject)(DiaryentryPageStore),this.route=(0,core.inject)(router.nX),this.diaryEntryPk=(0,core.computed)((()=>this.store.diaryentry()?.pk)),this.campaignCharacters=this.store.campaignCharacters,this.campaignLocations=this.store.campaignLocations,this.encounterServerModel=this.store.encounterServerModel,this.canUpdate=this.store.hasWritePermission,this.canDelete=this.store.hasWritePermission,this.canCreate=this.store.hasWritePermission,this.state=(0,core.input)("READ"),this.encounterElements=(0,core.viewChildren)("encounter"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCutInsert=new core.EventEmitter,this.encounterSwap=new core.EventEmitter,this.addUnfinishedEncounter=(0,core.output)(),this.encountersToAdd=(0,core.signal)([]),this.isUpdatingGlobally=this.store.isUpdatingGlobally,this.isUpdatingAnything=this.store.isUpdatingAnyEncounters,this.cutEncounterIndex=(0,core.signal)(void 0),this.diaryEntryEncounters=this.store.diaryEntryEncounters;const encounterTitle=this.route.snapshot.params.encounterTitle;encounterTitle&&this.scrollToEncounter(encounterTitle)}addEmptyEncounterAtIndex(listIndex){const newOrderIndex=this.getOrderIndexForNewEncounter(listIndex),newEncounter={diaryentry:this.diaryEntryPk(),title:"New Encounter",order_index:newOrderIndex,description:""};this.store.addEmptyEncounterForCreation(newEncounter)}onInsertExcisedEncounter(insertionIndex){const cutEncounterIndex=this.cutEncounterIndex();if(null==cutEncounterIndex)return;if([cutEncounterIndex,cutEncounterIndex-1].includes(insertionIndex))return;let newOrderIndex;if(insertionIndex>this.diaryEntryEncounters().length){newOrderIndex=nextOrderIndex(this.diaryEntryEncounters()[this.diaryEntryEncounters().length-1].encounter)}else{newOrderIndex=this.diaryEntryEncounters()[insertionIndex].encounter.order_index}const encounterToInsert=this.diaryEntryEncounters()[cutEncounterIndex].encounter;this.store.cutInsertEncounter(encounterToInsert,newOrderIndex)}onExcisionClick(encounterIndex){const isAlreadyCuttingEncounter=null!=this.cutEncounterIndex(),isCuttingThisEncounter=this.cutEncounterIndex()===encounterIndex;isAlreadyCuttingEncounter&&isCuttingThisEncounter?this.cutEncounterIndex.set(void 0):isAlreadyCuttingEncounter||this.cutEncounterIndex.set(encounterIndex)}onEncounterOrderIncrease(encounterIndex){if(encounterIndex===this.diaryEntryEncounters().length-1)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,nextEncounter=this.nextRealEncounter(encounterIndex+1);nextEncounter&&this.store.swapEncounters(encounter.pk,nextEncounter.pk)}onEncounterOrderDecrease(encounterIndex){if(0===encounterIndex)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,priorEncounter=this.priorRealEncounter(encounterIndex-1);priorEncounter&&this.store.swapEncounters(encounter.pk,priorEncounter.pk)}onEncounterCreateCancel(encounterIndex){const createEncounterToRemove=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEmptyEncounterForCreation(createEncounterToRemove)}onEncounterDelete(encounterIndex){const encounterToDelete=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEncounter(encounterToDelete)}onEncounterCreate(encounter){const newEncounter={...encounter,order_index:nextOrderIndex(encounter)};this.encounterCreate.emit(newEncounter),this.store.removeEmptyEncounterForCreation(encounter)}scrollToEncounter(encounterTitle){(0,rxjs_interop.br)(this.encounterElements).pipe((0,rxjs_interop.pQ)(),(0,map.T)((elements=>elements.find((el=>el.nativeElement.id===encounterTitle)))),(0,rxjs_operators.u5)(),(0,take.s)(1)).subscribe((encounterElement=>encounterElement.nativeElement.scrollIntoView({behavior:"instant"})))}getOrderIndexForNewEncounter(insertionIndex){const isNewFirstEncounter=insertionIndex<0,isEmptyDiaryEntry=0===this.store.realEncounters().length,isNewFirstEncounterInFullDiaryentry=isNewFirstEncounter&&!isEmptyDiaryEntry,isLastEncounterInFullDiaryentry=insertionIndex>=this.store.realEncounters().length&&!isEmptyDiaryEntry;if(isEmptyDiaryEntry)return 0;if(isNewFirstEncounterInFullDiaryentry){return function priorOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)-ORDER_INDEX_INCREMENT}(this.store.realEncounters()[0])}if(isLastEncounterInFullDiaryentry){return nextOrderIndex(this.store.realEncounters()[this.store.realEncounters().length-1])}return function getShiftedOrderIndex(encounter){return hasShiftedOrderIndex(encounter)?encounter.order_index:encounter.order_index+1}(this.diaryEntryEncounters()[insertionIndex].encounter)}isRealEncounter(encounter){return"pk"in encounter}nextRealEncounter(encounterIndex){const realEncountersAfterIndex=this.diaryEntryEncounters().slice(encounterIndex).filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersAfterIndex[0]?.encounter}priorRealEncounter(encounterIndex){const realEncountersBeforeIndex=this.diaryEntryEncounters().slice(0,encounterIndex+1).reverse().filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersBeforeIndex[0]?.encounter}static{this.ctorParameters=()=>[]}static{this.propDecorators={state:[{type:core.Input,args:[{isSignal:!0,alias:"state",required:!1,transform:void 0}]}],encounterElements:[{type:core.ViewChildren,args:["encounter",{isSignal:!0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCutInsert:[{type:core.Output}],encounterSwap:[{type:core.Output}],addUnfinishedEncounter:[{type:core.Output,args:["addUnfinishedEncounter"]}]}}};DiaryentryEncountersComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-diaryentry-encounters",template:'
\n @if (!isUpdatingGlobally()) {\n \x3c!-- Insert new first Encounter --\x3e\n @if (state() === "EDIT") {\n
\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n
\n }\n\n \x3c!-- Diaryentry - Encounters --\x3e\n
\n @for (entryEncounter of diaryEntryEncounters(); track entryEncounter) {\n \x3c!-- Encounter --\x3e\n \n @switch (state()) {\n @case ("READ") {\n \n }\n @case ("EDIT") {\n \n }\n }\n\n \x3c!-- Insert new Encounter --\x3e\n @if (state() === "EDIT" && (canCreate() || canUpdate())) {\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n }\n
\n }\n
\n } @else {\n \n }\n\n\n\n

\n {{ entryEncounter.encounter?.title }}\n

\n \n
\n\n\n \n @if (!context.entry.isUpdating) {\n \n @if (canUpdate() && context.entry.encounter.pk != null) {\n
\n \n \n
\n }\n } @else {\n \n }\n
\n
\n\n\x3c!-- Loading Spinner --\x3e\n\n\n\n \n \n\n',standalone:!0,imports:[button_component.Q,card_component.i,html_text_component.m,encounter_component.L,arrow_button_component.R,spinner_component.t,common.NgTemplateOutlet],animations:[slideDown.sb],styles:[diaryentry_encounters_componentngResource_default()]})],DiaryentryEncountersComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/toast-overlay/toast-overlay.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ToastOverlayComponent,f:()=>ToastService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var toast_overlay_componentngResource=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource"),toast_overlay_componentngResource_default=__webpack_require__.n(toast_overlay_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),logging=__webpack_require__("./src/utils/logging.ts");let ToastService=class ToastService{constructor(){this.toasts=(0,core.signal)([]),this.currentToast=(0,core.computed)((()=>this.toasts()[0]))}addToast(newToast){(0,logging.R)(this.addToast.name,newToast);const toasts=this.toasts();newToast.important?this.toasts.set([newToast,...toasts]):this.toasts.set([...toasts,newToast])}dismissToast(){const[_,...newToastList]=this.toasts();this.toasts.set(newToastList)}};ToastService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ToastService);let ToastOverlayComponent=class ToastOverlayComponent{constructor(){this.toastService=(0,core.inject)(ToastService),this.currentToast=this.toastService.currentToast,this.icon=(0,core.computed)((()=>{const currentToast=this.currentToast();if(currentToast)return this.toHeaderIcon(currentToast.type,currentToast.header?.icon)}))}dismissCurrentToast(){const currentToast=this.currentToast();if(!currentToast)return;const onHide=currentToast.onHide;onHide&&onHide(),this.toastService.dismissToast()}toHeaderIcon(toastType,icon){if(null!=icon)return icon;switch(toastType){case"DANGER":return"triangle-exclamation";case"WARNING":return"circle-exclamation";case"INFO":return"info-circle";case"SUCCESS":return"check";default:return"info"}}};ToastOverlayComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-toast-overlay",standalone:!0,imports:[ng_bootstrap.VR,button_component.Q,icon_component.R,common.NgTemplateOutlet],animations:[slideDown.st],template:'@let toast = currentToast();\n@let onToastClick = toast?.onToastClick;\n@if (toast && onToastClick) {\n \n \n \n} @else if (toast) {\n \n}\n\n\n @if (toast) {\n @if (toast.header) {\n \n \n \n @let headerIcon = icon();\n @if (headerIcon) {\n \n }\n \n \n \n\n \n \n } @else {\n \n \n \n }\n }\n\n\n\n
\n \n @let bodyIcon = toast?.body?.icon;\n @if (bodyIcon) {\n \n }\n\n @if (toast?.body?.text) {\n
\n }\n
\n\n
\n @let firstButton = toast?.body?.buttons?.[0];\n @if (firstButton) {\n \n }\n @let secondButton = toast?.body?.buttons?.[1];\n @if (secondButton) {\n \n }\n
\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[toast_overlay_componentngResource_default()]})],ToastOverlayComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/clipboard.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function copyToClipboard(text){const windowSelection=window.getSelection(),documentSelection=window.getSelection();var userSelectedTextRange=void 0;(function userHasElementsSelected(){const selection=document.getSelection();if(null==selection)return!1;return selection?.rangeCount>0})()&&(userSelectedTextRange=documentSelection.getRangeAt(0),windowSelection.removeRange(userSelectedTextRange));const textContainerElement=function createTextContainerElement(text){const textContainerElement=document.createElement("div");textContainerElement.innerHTML=text;const strippedText=textContainerElement.textContent;return textContainerElement.innerHTML=strippedText.replaceAll(">","
> ").slice(4),textContainerElement.style.position="absolute",textContainerElement.style.left="-9999px",textContainerElement}(text);document.body.appendChild(textContainerElement);const copyRange=function selectElement(element){const selectedRange=document.createRange();return selectedRange.selectNode(element),window.getSelection()?.addRange(selectedRange),selectedRange}(textContainerElement);!function copyCurrentSelection(){try{document.execCommand("copy")}catch(err){window.alert("Your Browser Doesn't support this! Error : "+err)}}(),windowSelection.removeRange(copyRange),document.body.removeChild(textContainerElement),userSelectedTextRange&&windowSelection.addRange(userSelectedTextRange)}__webpack_require__.d(__webpack_exports__,{l:()=>copyToClipboard})},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".btn {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 2rem;\n padding: var(--spacer-3) var(--spacer-2);\n}\n.btn-disabled {\n cursor: not-allowed;\n}\n.btn-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".list {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}\n.list--loading {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.list__buttons {\n padding: 0;\n margin-bottom: var(--spacer-2);\n}\n\n.buttons {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.buttons__button {\n display: flex;\n}\n.buttons__button--right {\n display: none;\n}\n@media (min-width: 768px) {\n .buttons__button--right {\n display: flex;\n }\n}\n\n.repeated-unit {\n padding: 0;\n scroll-margin-top: var(--spacer-5);\n}\n@media (min-width: 768px) {\n .repeated-unit {\n padding: unset;\n }\n}\n\n.encounter-card {\n display: flex;\n justify-content: center;\n --card-flex-direction: column;\n --card-padding: var(--spacer-3);\n}\n@media (min-width: 768px) {\n .encounter-card {\n --card-flex-direction: row;\n }\n}\n.encounter-card__encounter {\n flex: 1;\n}\n.encounter-card__side-buttons {\n height: 100%;\n}\n\n.side-buttons {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-left: var(--spacer-1);\n}\n@media (min-width: 768px) {\n .side-buttons {\n flex-direction: column;\n justify-content: unset;\n }\n}\n.side-buttons__button--edit {\n display: none;\n margin-bottom: var(--spacer-4);\n}\n@media (min-width: 768px) {\n .side-buttons__button--edit {\n display: unset;\n }\n}\n.side-buttons__button--arrow {\n padding: var(--spacer-1) var(--spacer-0);\n}\n\n.spinner {\n width: 100px;\n height: 100px;\n --thickness: 60px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n position: absolute;\n}\n\n.toast:focus, .toast:focus-within, .toast:hover, .toast:focus-visible {\n outline: var(--focus-outline);\n}\n\n.toast {\n position: fixed;\n bottom: 10%;\n width: 93%;\n right: 3.5%;\n --bs-light-rgb: var(--bs-white);\n --bs-toast-header-color: var(--bs-white);\n --bs-toast-color: var(--bs-white);\n --toast-padding-x: var(--bs-toast-padding-x);\n --toast-padding-y: calc(var(--bs-toast-padding-y) / 2);\n --bs-toast-border-width: 3px;\n}\n.toast--primary {\n --bs-border-color-translucent: var(--bs-primary);\n}\n.toast--secondary {\n --bs-border-color-translucent: var(--bs-secondary);\n}\n.toast--success {\n --bs-border-color-translucent: var(--bs-success);\n}\n.toast--danger {\n --bs-border-color-translucent: var(--bs-danger);\n}\n.toast--warning {\n --bs-border-color-translucent: var(--bs-warning);\n}\n.toast--info {\n --bs-border-color-translucent: var(--bs-info);\n}\n.toast--light {\n --bs-border-color-translucent: var(--bs-light);\n}\n.toast--dark {\n --bs-border-color-translucent: var(--bs-dark);\n}\n@media (min-width: 576px) {\n .toast {\n width: fit-content;\n max-width: 50%;\n bottom: 5%;\n }\n}\n\n.toast-header__text {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-2);\n flex: 1;\n font-weight: bold;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n}\n.body__text {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--spacer-2);\n text-align: start;\n}\n.body__text-container {\n max-height: calc(var(--bs-body-font-size) * 8);\n max-width: 100%;\n overflow: auto;\n}\n.body__button {\n width: fit-content;\n}\n.body__button-container {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1917],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/animations/slideDown.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V4:()=>slideOutFromBottom,sb:()=>slideUpFromBottom,st:()=>slideRight});var _angular_animations__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const inactiveStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:.2,transform:"translateY(50%)"}),activeStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:1,transform:"translateY(0%)"}),slideUpFromBottom=((0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideUpFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)])])),slideOutFromBottom=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideOutFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),inactiveSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(100%)"}),activeSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(0%)"}),slideRight=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideRight",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",activeSlideRightStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",inactiveSlideRightStyle)])])},"./src/design/atoms/arrow-button/arrow-button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>ArrowButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var arrow_button_componentngResource=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource"),arrow_button_componentngResource_default=__webpack_require__.n(arrow_button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts");let ArrowButtonComponent=class ArrowButtonComponent{constructor(){this.icon=core.input.required(),this.kind=(0,core.input)("SECONDARY"),this.outline=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.iconName=(0,core.computed)((()=>`arrow-${this.icon()}-long`))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}],kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!1,transform:void 0}]}],outline:[{type:core.Input,args:[{isSignal:!0,alias:"outline",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ArrowButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-arrow-button",template:'\n',standalone:!0,imports:[icon_component.R,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[arrow_button_componentngResource_default()]})],ArrowButtonComponent)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>DiaryentryEncountersComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var diaryentry_encounters_componentngResource=__webpack_require__("./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource"),diaryentry_encounters_componentngResource_default=__webpack_require__.n(diaryentry_encounters_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");const ORDER_INDEX_INCREMENT=10;function hasShiftedOrderIndex(encounter){return encounter.order_index%ORDER_INDEX_INCREMENT>0}function getUnshiftedOrderIndex(encounter){return Math.floor(encounter.order_index/ORDER_INDEX_INCREMENT)*ORDER_INDEX_INCREMENT}function nextOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)+ORDER_INDEX_INCREMENT}var rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngrx_signals=__webpack_require__("./node_modules/@ngrx/signals/fesm2022/ngrx-signals.mjs"),shareReplay=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),switchMap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),clipboard=__webpack_require__("./src/utils/clipboard.ts");function httpErrorToast(err){if(!("number"===err.status?.constructor?.name.toLowerCase()))throw err;const buttons=500===err.status?[{label:"Copy to Clipboard",icon:"clipboard",onClick:()=>(0,clipboard.l)(err.error)}]:[];return{type:"DANGER",body:{text:`\n Please copy the error and send it to the developer:
\n ${error=err,JSON.stringify(error.error)}\n `,buttons},header:{text:getErrorHeading(err)}};var error}function getErrorHeading(error){switch(error.status){case 0:case 504:return"This can't be done without an internet connection";case 200:return"The target URL for the requested action does not seem to exist";case 500:return"The server exploded somehow!";default:return"An error occurred"}}var http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),base_service=__webpack_require__("./src/app/_services/base.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts");let CharacterService=class CharacterService extends base_service.d{constructor(routingService,http){super(http,"character"),this.routingService=routingService}getPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/playercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getNonPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/nonplayercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,characterName=data.name;return()=>this.routingService.getRoutePath("character",{name:characterName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};CharacterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],CharacterService);let DiaryentryService=class DiaryentryService extends base_service.d{constructor(routingService,http){super(http,"diaryentry"),this.routingService=routingService}readByParam(campaign,params){const authorName=params.name,url=`${this.baseUrl}/${campaign}/${params.sessionNumber}/${params.isMainSession}/${authorName}/`;return this.http.get(url).pipe((0,map.T)((diaryEntry=>this.parseDiaryEntry(diaryEntry))))}parseDiaryEntry(entry){return{...entry,author:entry?.author_details?.pk,session:entry?.session_details?.pk}}parseEntity(data){return{...data,author:data?.author_details?.pk,session:data?.session_details?.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,sessionNumber=data.session_details.session_number,isMainSession=data.session_details.is_main_session_int,authorName=data.author_details.name;return()=>this.routingService.getRoutePath("diaryentry",{sessionNumber,isMainSession,authorName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};DiaryentryService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],DiaryentryService);let EncounterConnectionService=class EncounterConnectionService extends base_service.d{constructor(http){super(http,"encounterconnection")}create(data){return super.create({...data,character:`${data.character}`})}parseEntity(data){return data}parseOverviewEntity(data){throw"CharacterPlayerClassConnection does not have an overview endpoint"}static{this.ctorParameters=()=>[{type:http.Qq}]}};EncounterConnectionService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterConnectionService);let EncounterService=class EncounterService extends base_service.d{constructor(routingService,http){super(http,"encounter"),this.routingService=routingService}getDiaryEntryEncounters(session_pk,authorName){const url=`${this.baseUrl}/session/${session_pk}/${authorName}`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}createForDiaryentry(encounter){const url=`${this.baseUrl}/`;return this.http.post(url,encounter).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}swapEncounterOrder(campaign,encounter1_pk,encounter2_pk){const url=`${this.baseUrl}/${campaign}/orderswap/`,requestBody={encounter1:encounter1_pk,encounter2:encounter2_pk};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}cutInsertEncounter(campaign,encounter,newOrderIndex){const url=`${this.baseUrl}/${campaign}/cutinsert/`,requestBody={encounter:encounter.pk,old_order_index:encounter.order_index,new_order_index:newOrderIndex};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}parseEntity(data){return{...data,pk:data.id??data.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details?.name,sessionNumber=data.diaryentry_details?.session_number,isMainSession=data.diaryentry_details?.is_main_session,authorName=data.diaryentry_details?.author_name,encounterTitle=data.title;return campaignName&&sessionNumber&&isMainSession&&authorName&&encounterTitle?()=>this.routingService.getRoutePath("diaryentry-encounter",{sessionNumber,isMainSession,authorName,campaign:campaignName,encounterTitle}):()=>""}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};EncounterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterService);let LocationService=class LocationService extends base_service.d{constructor(routingService,http){super(http,"location"),this.routingService=routingService}readByParam(campaign,params){const locationName=params.name,url=`${this.baseUrl}/${campaign}/${params.parentLocationName}/${locationName}/`;return this.http.get(url).pipe((0,map.T)((data=>this.parseEntity(data))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data),getAbsoluteRouterUrlForParentLocation:this.generateParentLocationUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,locationName=data.name,parentLocationName=data.parent_location_details.name??"NONE";return()=>this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:campaignName})}generateParentLocationUrlCallback(data){if(!(null!=data.parent_location_details))return null;const campaignName=data.campaign_details.name,parentLocationName=data.parent_location_details.name,grandParentLocationName=data.parent_location_details.parent_location??"NONE";return()=>this.routingService.getRoutePath("location",{name:parentLocationName,parent_name:grandParentLocationName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};LocationService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],LocationService);var global_store=__webpack_require__("./src/app/global.store.ts"),toast_overlay_component=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.ts"),array=__webpack_require__("./src/utils/array.ts"),logging=__webpack_require__("./src/utils/logging.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts"),ngrx_operators=__webpack_require__("./node_modules/@ngrx/operators/fesm2022/ngrx-operators.mjs"),Subject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subject.js"),noop=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),isObservable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isObservable.js");function rxMethod(generator,config){config?.injector||(0,core.assertInInjectionContext)(rxMethod);const sourceInjector=config?.injector??(0,core.inject)(core.Injector),source$=new Subject.B,sourceSub=generator(source$).subscribe();sourceInjector.get(core.DestroyRef).onDestroy((()=>sourceSub.unsubscribe()));const rxMethodFn=(input,config)=>{if(function isStatic(value){return!(0,core.isSignal)(value)&&!(0,isObservable.A)(value)}(input))return source$.next(input),{unsubscribe:noop.l};const instanceInjector=config?.injector??function getCallerInjector(){try{return(0,core.inject)(core.Injector)}catch{return null}}()??sourceInjector;if((0,core.isSignal)(input)){const watcher=(0,core.effect)((()=>{const value=input();(0,core.untracked)((()=>source$.next(value)))}),{injector:instanceInjector}),instanceSub={unsubscribe:()=>watcher.destroy()};return sourceSub.add(instanceSub),instanceSub}const instanceSub=input.subscribe((value=>source$.next(value)));return sourceSub.add(instanceSub),instanceInjector!==sourceInjector&&instanceInjector.get(core.DestroyRef).onDestroy((()=>instanceSub.unsubscribe())),instanceSub};return rxMethodFn.unsubscribe=sourceSub.unsubscribe.bind(sourceSub),rxMethodFn}var pipe=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/pipe.js"),tap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),string=__webpack_require__("./src/utils/string.ts");function getKeys(name){return{name,dataField:(0,string.YF)(name),errorField:`${(0,string.YF)(name)}Error`,queryStateField:`${(0,string.YF)(name)}QueryState`,loadMethod:`load${(0,string.ZH)(name)}`}}const initialState={diaryEntryDeleteState:"init",encounterServerModel:void 0,_encountersInUpdateStateIds:new Set,_encountersBeingCreated:[],isUpdatingGlobally:!1},DiaryentryPageStore=(0,ngrx_signals.Eu)({providedIn:"root"},(0,ngrx_signals.Q2)(initialState),function withQueries(queriesFactory){return store=>{const queries=queriesFactory({...store.stateSignals,...store.computedSignals,...store.methods}),storeWithState=function withQueriesState(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.Q2)((()=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.dataField]:void 0,[keys.errorField]:void 0,[keys.queryStateField]:"init"}))).reduce(((acc,RequestState)=>({...acc,...RequestState})),{}))))}(queries)(store);return function withQueryMethods(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.RI)((store=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.loadMethod]:rxMethod((0,pipe.F)((0,tap.M)((()=>(0,ngrx_signals.M8)(store,{[keys.queryStateField]:"loading",[keys.errorField]:void 0}))),(0,switchMap.n)((params=>queries[keys.name](params))),(0,ngrx_operators.Hn)({next:val=>(0,ngrx_signals.M8)(store,{[keys.dataField]:val,[keys.queryStateField]:"success"}),error:err=>{(0,ngrx_signals.M8)(store,{[keys.errorField]:err,[keys.queryStateField]:"error"})}})))}))).reduce(((acc,queryLoadFunction)=>({...acc,...queryLoadFunction})),{}))))}(queries)(storeWithState)}}((()=>{const diaryentryService=(0,core.inject)(DiaryentryService),characterService=(0,core.inject)(CharacterService),locationService=(0,core.inject)(LocationService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1));return{diaryentry:params=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>diaryentryService.readByParam(campaignName,params)))),campaignCharacters:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>characterService.getNonPlayerCharacters(campaignName)))),campaignLocations:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>locationService.campaignList(campaignName))))}})),(0,ngrx_signals.QO)((store=>({hasWritePermission:(0,core.inject)(global_store.v).hasRoleOrBetter("member"),diaryEntryEncounters:(0,core.computed)((()=>{const allEncounters=[...store.diaryentry()?.encounters??[],...store._encountersBeingCreated()];return(0,array.Z)(allEncounters,"order_index").map(((encounter,index)=>({encounter,isUpdating:store._encountersInUpdateStateIds().has(index)})))})),isUpdatingAnyEncounters:(0,core.computed)((()=>store._encountersInUpdateStateIds().size>0)),realEncounters:(0,core.computed)((()=>store.diaryentry()?.encounters??[]))}))),(0,ngrx_signals.RI)((store=>{const toastService=(0,core.inject)(toast_overlay_component.f),diaryentryService=(0,core.inject)(DiaryentryService),encounterConnectionService=(0,core.inject)(EncounterConnectionService),encounterService=(0,core.inject)(EncounterService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1)),updateEncounterList=newEncounterList=>{const newDiaryEntry={...store.diaryentry(),encounters:newEncounterList};(0,ngrx_signals.M8)(store,{diaryentry:newDiaryEntry})},markAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.add(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})},unmarkAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.delete(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})};return{reset:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"init",encounterServerModel:void 0,diaryentryQueryState:"init"}),addEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:[...store._encountersBeingCreated(),encounter]})},removeEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},addEncounter:encounter=>{encounterService.createForDiaryentry(encounter).pipe((0,take.s)(1)).subscribe({next:newEncounterList=>{updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},error:err=>toastService.addToast(httpErrorToast(err))})},removeEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.delete(encounter.pk).pipe((0,take.s)(1)).subscribe({next:()=>{unmarkAsBeingUpdated(encounter.pk);const newEncounterList=store.diaryentry()?.encounters?.filter((listEnc=>listEnc.pk!==encounter.pk))??[];updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},updateEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.update(encounter.pk,encounter).pipe((0,take.s)(1)).subscribe({next:newEncounter=>{unmarkAsBeingUpdated(encounter.pk);const diaryentry=store.diaryentry(),newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},swapEncounters:(encounter1Pk,encounter2Pk)=>{markAsBeingUpdated(encounter1Pk),markAsBeingUpdated(encounter2Pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.swapEncounterOrder(campaignName,encounter1Pk,encounter2Pk)))).subscribe({next:([updatedEnc1,updatedEnc2])=>{unmarkAsBeingUpdated(encounter1Pk),unmarkAsBeingUpdated(encounter2Pk);const newEncounterList1=(0,array.U1)(store.realEncounters(),updatedEnc1,"pk"),newEncounterList2=(0,array.U1)(newEncounterList1,updatedEnc2,"pk");updateEncounterList(newEncounterList2),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},cutInsertEncounter:(encounter,newOrderIndex)=>{markAsBeingUpdated(encounter.pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.cutInsertEncounter(campaignName,encounter,newOrderIndex)))).subscribe({next:newEncounterList=>{unmarkAsBeingUpdated(encounter.pk),updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},addEncounterConnection:connection=>encounterConnectionService.create(connection).pipe((0,take.s)(1)).subscribe({next:newConnection=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===newConnection.encounter)),newEncounter={...encounter,encounterConnections:[...encounter.encounterConnections??[],newConnection]},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))}),removeEncounterConnection:connection=>{encounterConnectionService.delete(connection.pk).pipe((0,take.s)(1)).subscribe((()=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===connection.encounter)),newEncounter={...encounter,encounterConnections:encounter.encounterConnections?.filter((con=>con.pk!==connection.pk))},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)}))},deleteDiaryEntry:()=>{(0,ngrx_signals.M8)(store,{diaryEntryDeleteState:"loading"}),diaryentryService.delete(store.diaryentry()?.pk).pipe((0,take.s)(1)).subscribe({next:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"success"}),error:err=>toastService.addToast(httpErrorToast(err))})}}})),(0,ngrx_signals.TK)((store=>({onInit:()=>{(0,logging.R)("DiaryEntryPageStore",store)}}))));var router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),arrow_button_component=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let DiaryentryEncountersComponent=class DiaryentryEncountersComponent{constructor(){this.store=(0,core.inject)(DiaryentryPageStore),this.route=(0,core.inject)(router.nX),this.diaryEntryPk=(0,core.computed)((()=>this.store.diaryentry()?.pk)),this.campaignCharacters=this.store.campaignCharacters,this.campaignLocations=this.store.campaignLocations,this.encounterServerModel=this.store.encounterServerModel,this.canUpdate=this.store.hasWritePermission,this.canDelete=this.store.hasWritePermission,this.canCreate=this.store.hasWritePermission,this.state=(0,core.input)("READ"),this.encounterElements=(0,core.viewChildren)("encounter"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCutInsert=new core.EventEmitter,this.encounterSwap=new core.EventEmitter,this.addUnfinishedEncounter=(0,core.output)(),this.encountersToAdd=(0,core.signal)([]),this.isUpdatingGlobally=this.store.isUpdatingGlobally,this.isUpdatingAnything=this.store.isUpdatingAnyEncounters,this.cutEncounterIndex=(0,core.signal)(void 0),this.diaryEntryEncounters=this.store.diaryEntryEncounters;const encounterTitle=this.route.snapshot.params.encounterTitle;encounterTitle&&this.scrollToEncounter(encounterTitle)}addEmptyEncounterAtIndex(listIndex){const newOrderIndex=this.getOrderIndexForNewEncounter(listIndex),newEncounter={diaryentry:this.diaryEntryPk(),title:"New Encounter",order_index:newOrderIndex,description:""};this.store.addEmptyEncounterForCreation(newEncounter)}onInsertExcisedEncounter(insertionIndex){const cutEncounterIndex=this.cutEncounterIndex();if(null==cutEncounterIndex)return;if([cutEncounterIndex,cutEncounterIndex-1].includes(insertionIndex))return;let newOrderIndex;if(insertionIndex>this.diaryEntryEncounters().length){newOrderIndex=nextOrderIndex(this.diaryEntryEncounters()[this.diaryEntryEncounters().length-1].encounter)}else{newOrderIndex=this.diaryEntryEncounters()[insertionIndex].encounter.order_index}const encounterToInsert=this.diaryEntryEncounters()[cutEncounterIndex].encounter;this.store.cutInsertEncounter(encounterToInsert,newOrderIndex)}onExcisionClick(encounterIndex){const isAlreadyCuttingEncounter=null!=this.cutEncounterIndex(),isCuttingThisEncounter=this.cutEncounterIndex()===encounterIndex;isAlreadyCuttingEncounter&&isCuttingThisEncounter?this.cutEncounterIndex.set(void 0):isAlreadyCuttingEncounter||this.cutEncounterIndex.set(encounterIndex)}onEncounterOrderIncrease(encounterIndex){if(encounterIndex===this.diaryEntryEncounters().length-1)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,nextEncounter=this.nextRealEncounter(encounterIndex+1);nextEncounter&&this.store.swapEncounters(encounter.pk,nextEncounter.pk)}onEncounterOrderDecrease(encounterIndex){if(0===encounterIndex)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,priorEncounter=this.priorRealEncounter(encounterIndex-1);priorEncounter&&this.store.swapEncounters(encounter.pk,priorEncounter.pk)}onEncounterCreateCancel(encounterIndex){const createEncounterToRemove=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEmptyEncounterForCreation(createEncounterToRemove)}onEncounterDelete(encounterIndex){const encounterToDelete=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEncounter(encounterToDelete)}onEncounterCreate(encounter){const newEncounter={...encounter,order_index:nextOrderIndex(encounter)};this.encounterCreate.emit(newEncounter),this.store.removeEmptyEncounterForCreation(encounter)}scrollToEncounter(encounterTitle){(0,rxjs_interop.br)(this.encounterElements).pipe((0,rxjs_interop.pQ)(),(0,map.T)((elements=>elements.find((el=>el.nativeElement.id===encounterTitle)))),(0,rxjs_operators.u5)(),(0,take.s)(1)).subscribe((encounterElement=>encounterElement.nativeElement.scrollIntoView({behavior:"instant"})))}getOrderIndexForNewEncounter(insertionIndex){const isNewFirstEncounter=insertionIndex<0,isEmptyDiaryEntry=0===this.store.realEncounters().length,isNewFirstEncounterInFullDiaryentry=isNewFirstEncounter&&!isEmptyDiaryEntry,isLastEncounterInFullDiaryentry=insertionIndex>=this.store.realEncounters().length&&!isEmptyDiaryEntry;if(isEmptyDiaryEntry)return 0;if(isNewFirstEncounterInFullDiaryentry){return function priorOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)-ORDER_INDEX_INCREMENT}(this.store.realEncounters()[0])}if(isLastEncounterInFullDiaryentry){return nextOrderIndex(this.store.realEncounters()[this.store.realEncounters().length-1])}return function getShiftedOrderIndex(encounter){return hasShiftedOrderIndex(encounter)?encounter.order_index:encounter.order_index+1}(this.diaryEntryEncounters()[insertionIndex].encounter)}isRealEncounter(encounter){return"pk"in encounter}nextRealEncounter(encounterIndex){const realEncountersAfterIndex=this.diaryEntryEncounters().slice(encounterIndex).filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersAfterIndex[0]?.encounter}priorRealEncounter(encounterIndex){const realEncountersBeforeIndex=this.diaryEntryEncounters().slice(0,encounterIndex+1).reverse().filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersBeforeIndex[0]?.encounter}static{this.ctorParameters=()=>[]}static{this.propDecorators={state:[{type:core.Input,args:[{isSignal:!0,alias:"state",required:!1,transform:void 0}]}],encounterElements:[{type:core.ViewChildren,args:["encounter",{isSignal:!0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCutInsert:[{type:core.Output}],encounterSwap:[{type:core.Output}],addUnfinishedEncounter:[{type:core.Output,args:["addUnfinishedEncounter"]}]}}};DiaryentryEncountersComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-diaryentry-encounters",template:'
\n @if (!isUpdatingGlobally()) {\n \x3c!-- Insert new first Encounter --\x3e\n @if (state() === "EDIT") {\n
\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n
\n }\n\n \x3c!-- Diaryentry - Encounters --\x3e\n
\n @for (entryEncounter of diaryEntryEncounters(); track entryEncounter) {\n \x3c!-- Encounter --\x3e\n \n @switch (state()) {\n @case ("READ") {\n \n }\n @case ("EDIT") {\n \n }\n }\n\n \x3c!-- Insert new Encounter --\x3e\n @if (state() === "EDIT" && (canCreate() || canUpdate())) {\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n }\n
\n }\n
\n } @else {\n \n }\n\n\n\n

\n {{ entryEncounter.encounter?.title }}\n

\n \n
\n\n\n \n @if (!context.entry.isUpdating) {\n \n @if (canUpdate() && context.entry.encounter.pk != null) {\n
\n \n \n
\n }\n } @else {\n \n }\n
\n
\n\n\x3c!-- Loading Spinner --\x3e\n\n\n\n \n \n\n',standalone:!0,imports:[button_component.Q,card_component.i,html_text_component.m,encounter_component.L,arrow_button_component.R,spinner_component.t,common.NgTemplateOutlet],animations:[slideDown.sb],styles:[diaryentry_encounters_componentngResource_default()]})],DiaryentryEncountersComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/toast-overlay/toast-overlay.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ToastOverlayComponent,f:()=>ToastService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var toast_overlay_componentngResource=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource"),toast_overlay_componentngResource_default=__webpack_require__.n(toast_overlay_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),logging=__webpack_require__("./src/utils/logging.ts");let ToastService=class ToastService{constructor(){this.toasts=(0,core.signal)([]),this.currentToast=(0,core.computed)((()=>this.toasts()[0]))}addToast(newToast){(0,logging.R)(this.addToast.name,newToast);const toasts=this.toasts();newToast.important?this.toasts.set([newToast,...toasts]):this.toasts.set([...toasts,newToast])}dismissToast(){const[_,...newToastList]=this.toasts();this.toasts.set(newToastList)}};ToastService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ToastService);let ToastOverlayComponent=class ToastOverlayComponent{constructor(){this.toastService=(0,core.inject)(ToastService),this.currentToast=this.toastService.currentToast,this.icon=(0,core.computed)((()=>{const currentToast=this.currentToast();if(currentToast)return this.toHeaderIcon(currentToast.type,currentToast.header?.icon)}))}dismissCurrentToast(){const currentToast=this.currentToast();if(!currentToast)return;const onHide=currentToast.onHide;onHide&&onHide(),this.toastService.dismissToast()}toHeaderIcon(toastType,icon){if(null!=icon)return icon;switch(toastType){case"DANGER":return"triangle-exclamation";case"WARNING":return"circle-exclamation";case"INFO":return"info-circle";case"SUCCESS":return"check";default:return"info"}}};ToastOverlayComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-toast-overlay",standalone:!0,imports:[ng_bootstrap.VR,button_component.Q,icon_component.R,common.NgTemplateOutlet],animations:[slideDown.st],template:'@let toast = currentToast();\n@let onToastClick = toast?.onToastClick;\n@if (toast && onToastClick) {\n \n \n \n} @else if (toast) {\n \n}\n\n\n @if (toast) {\n @if (toast.header) {\n \n \n \n @let headerIcon = icon();\n @if (headerIcon) {\n \n }\n \n \n \n\n \n \n } @else {\n \n \n \n }\n }\n\n\n\n
\n \n @let bodyIcon = toast?.body?.icon;\n @if (bodyIcon) {\n \n }\n\n @if (toast?.body?.text) {\n
\n }\n
\n\n
\n @let firstButton = toast?.body?.buttons?.[0];\n @if (firstButton) {\n \n }\n @let secondButton = toast?.body?.buttons?.[1];\n @if (secondButton) {\n \n }\n
\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[toast_overlay_componentngResource_default()]})],ToastOverlayComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/clipboard.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function copyToClipboard(text){const windowSelection=window.getSelection(),documentSelection=window.getSelection();var userSelectedTextRange=void 0;(function userHasElementsSelected(){const selection=document.getSelection();if(null==selection)return!1;return selection?.rangeCount>0})()&&(userSelectedTextRange=documentSelection.getRangeAt(0),windowSelection.removeRange(userSelectedTextRange));const textContainerElement=function createTextContainerElement(text){const textContainerElement=document.createElement("div");textContainerElement.innerHTML=text;const strippedText=textContainerElement.textContent;return textContainerElement.innerHTML=strippedText.replaceAll(">","
> ").slice(4),textContainerElement.style.position="absolute",textContainerElement.style.left="-9999px",textContainerElement}(text);document.body.appendChild(textContainerElement);const copyRange=function selectElement(element){const selectedRange=document.createRange();return selectedRange.selectNode(element),window.getSelection()?.addRange(selectedRange),selectedRange}(textContainerElement);!function copyCurrentSelection(){try{document.execCommand("copy")}catch(err){window.alert("Your Browser Doesn't support this! Error : "+err)}}(),windowSelection.removeRange(copyRange),document.body.removeChild(textContainerElement),userSelectedTextRange&&windowSelection.addRange(userSelectedTextRange)}__webpack_require__.d(__webpack_exports__,{l:()=>copyToClipboard})},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".btn {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 2rem;\n padding: var(--spacer-3) var(--spacer-2);\n}\n.btn-disabled {\n cursor: not-allowed;\n}\n.btn-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".list {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}\n.list--loading {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.list__buttons {\n padding: 0;\n margin-bottom: var(--spacer-2);\n}\n\n.buttons {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.buttons__button {\n display: flex;\n}\n.buttons__button--right {\n display: none;\n}\n@media (min-width: 768px) {\n .buttons__button--right {\n display: flex;\n }\n}\n\n.repeated-unit {\n padding: 0;\n scroll-margin-top: var(--spacer-5);\n}\n@media (min-width: 768px) {\n .repeated-unit {\n padding: unset;\n }\n}\n\n.encounter-card {\n display: flex;\n justify-content: center;\n --card-flex-direction: column;\n --card-padding: var(--spacer-3);\n}\n@media (min-width: 768px) {\n .encounter-card {\n --card-flex-direction: row;\n }\n}\n.encounter-card__encounter {\n flex: 1;\n}\n.encounter-card__side-buttons {\n height: 100%;\n}\n\n.side-buttons {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-left: var(--spacer-1);\n}\n@media (min-width: 768px) {\n .side-buttons {\n flex-direction: column;\n justify-content: unset;\n }\n}\n.side-buttons__button--edit {\n display: none;\n margin-bottom: var(--spacer-4);\n}\n@media (min-width: 768px) {\n .side-buttons__button--edit {\n display: unset;\n }\n}\n.side-buttons__button--arrow {\n padding: var(--spacer-1) var(--spacer-0);\n}\n\n.spinner {\n width: 100px;\n height: 100px;\n --thickness: 60px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n position: absolute;\n}\n\n.toast:focus, .toast:focus-within, .toast:hover, .toast:focus-visible {\n outline: var(--focus-outline);\n}\n\n.toast {\n position: fixed;\n bottom: 10%;\n width: 93%;\n right: 3.5%;\n --bs-light-rgb: var(--bs-white);\n --bs-toast-header-color: var(--bs-white);\n --bs-toast-color: var(--bs-white);\n --toast-padding-x: var(--bs-toast-padding-x);\n --toast-padding-y: calc(var(--bs-toast-padding-y) / 2);\n --bs-toast-border-width: 3px;\n}\n.toast--primary {\n --bs-border-color-translucent: var(--bs-primary);\n}\n.toast--secondary {\n --bs-border-color-translucent: var(--bs-secondary);\n}\n.toast--success {\n --bs-border-color-translucent: var(--bs-success);\n}\n.toast--danger {\n --bs-border-color-translucent: var(--bs-danger);\n}\n.toast--warning {\n --bs-border-color-translucent: var(--bs-warning);\n}\n.toast--info {\n --bs-border-color-translucent: var(--bs-info);\n}\n.toast--light {\n --bs-border-color-translucent: var(--bs-light);\n}\n.toast--dark {\n --bs-border-color-translucent: var(--bs-dark);\n}\n@media (min-width: 576px) {\n .toast {\n width: fit-content;\n max-width: 50%;\n bottom: 5%;\n }\n}\n\n.toast-header__text {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-2);\n flex: 1;\n font-weight: bold;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n}\n.body__text {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--spacer-2);\n text-align: start;\n}\n.body__text-container {\n max-height: calc(var(--bs-body-font-size) * 8);\n max-width: 100%;\n overflow: auto;\n}\n.body__button {\n width: fit-content;\n}\n.body__button-container {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/6663.d4189301.iframe.bundle.js b/6663.6ad7ade5.iframe.bundle.js similarity index 88% rename from 6663.d4189301.iframe.bundle.js rename to 6663.6ad7ade5.iframe.bundle.js index 65c864e85..f091e8a1f 100644 --- a/6663.d4189301.iframe.bundle.js +++ b/6663.6ad7ade5.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6663],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/molecules/link-entry/link-entry.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>LinkEntryComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var link_entry_componentngResource=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.scss?ngResource"),link_entry_componentngResource_default=__webpack_require__.n(link_entry_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let LinkEntryComponent=class LinkEntryComponent{constructor(){this.entry=core.input.required(),this.canDelete=(0,core.input)(!1),this.deleteMessage=(0,core.input)("Delete entry?"),this.delete=new core.EventEmitter,this.linkClick=new core.EventEmitter,this.state=(0,core.signal)("DISPLAY")}changeState(newState){this.state.set(newState)}static{this.propDecorators={entry:[{type:core.Input,args:[{isSignal:!0,alias:"entry",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],deleteMessage:[{type:core.Input,args:[{isSignal:!0,alias:"deleteMessage",required:!1,transform:void 0}]}],delete:[{type:core.Output}],linkClick:[{type:core.Output}]}}};LinkEntryComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-link-entry",template:'
\n \n
\n\n\n \x3c!-- Entry Linktext --\x3e\n \n {{ entry().linkText }}\n \n\n \x3c!-- Entry Name --\x3e\n
\n {{ entry().label }}\n
\n\n \x3c!-- Delete Entry --\x3e\n
\n @if (canDelete()) {\n \n }\n
\n
\n\n\n
\n \n {{ deleteMessage() }}\n \n \n \n
\n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[button_component.Q,common.NgTemplateOutlet],styles:[link_entry_componentngResource_default()]})],LinkEntryComponent)},"./src/design/organisms/player/player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>PlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var player_componentngResource=__webpack_require__("./src/design/organisms/player/player.component.scss?ngResource"),player_componentngResource_default=__webpack_require__.n(player_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),plyr_min=__webpack_require__("./node_modules/plyr/dist/plyr.min.js"),plyr_min_default=__webpack_require__.n(plyr_min);let PlayerComponent=class PlayerComponent{constructor(){this.SEEK_TIME=5,this.VOLUME_STEP=.05,this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.playTime=core.input.required(),this.audioPlayer=(0,core.viewChild)("audioPlayer"),(0,core.effect)((()=>{const playerElement=this.audioPlayer()?.nativeElement;playerElement&&(this.plyr=new(plyr_min_default())(playerElement,{controls:["play","progress","current-time","mute","volume","download","settings"],invertTime:!1,seekTime:this.SEEK_TIME,volume:0}))})),(0,core.effect)((()=>{this.plyr.download=this.downloadSource()})),(0,core.effect)((()=>this.setPlayTime(this.playTime())))}triggerHotkeyAction(keyPressEvent){keyPressEvent.stopPropagation();switch(keyPressEvent.code){case"Space":case"Enter":this.play();break;case"KeyM":this.mute();break;case"ArrowRight":this.seekForward();break;case"ArrowLeft":this.seekBackward()}}setPlayTime(time){null!=time&&(this.plyr.currentTime=time)}play(){this.plyr.togglePlay()}seekBackward(){this.plyr.rewind(this.SEEK_TIME)}seekForward(){this.plyr.forward(this.SEEK_TIME)}increaseVolume(){this.plyr.increaseVolume(this.VOLUME_STEP)}decreaseVolume(){this.plyr.decreaseVolume(this.VOLUME_STEP)}mute(){this.plyr.muted=!this.plyr.muted}static{this.ctorParameters=()=>[]}static{this.propDecorators={serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],playTime:[{type:core.Input,args:[{isSignal:!0,alias:"playTime",required:!0,transform:void 0}]}],audioPlayer:[{type:core.ViewChild,args:["audioPlayer",{isSignal:!0}]}]}}};PlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-player",template:'\n',standalone:!0,imports:[],styles:[player_componentngResource_default()]})],PlayerComponent)},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>SessionaudioPlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var sessionaudio_player_componentngResource=__webpack_require__("./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource"),sessionaudio_player_componentngResource_default=__webpack_require__.n(sessionaudio_player_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),link_entry_component=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.ts"),player_component=__webpack_require__("./src/design/organisms/player/player.component.ts");let SessionaudioPlayerComponent=class SessionaudioPlayerComponent{constructor(formlyService){this.formlyService=formlyService,this.sessionAudioPk=core.input.required(),this.timestamps=core.input.required(),this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.deleteTimestamp=new core.EventEmitter,this.createTimestamp=new core.EventEmitter,this.timestampEntries=(0,core.computed)((()=>this.timestamps()?.map((timestamp=>({value:timestamp,label:timestamp.name,linkText:this.timeToString(timestamp.time)}))))),this.timestampState=(0,core.signal)("DISPLAY"),this.currentTime=(0,core.signal)(0),this.timestampForm=new fesm2022_forms.gE({}),this.timestampFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"time",maxLength:8,minLength:8,placeholder:"hh:mm:ss",className:"timestamp-input black-background px-0 col-lg-2 col-3",validators:["time"],required:!0,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"name",label:"Title",className:"timestamp-input black-background px-0 col-lg-10 col-9",required:!0,inputKind:"STRING"})])),this.timestampModel=(0,core.signal)({})}changeTimestampState(newState){this.timestampState.set(newState)}onLinkClick(timestamp){this.currentTime.set(timestamp.time),setTimeout((()=>this.currentTime.set(void 0)),1)}onSubmit(timestamp){const newTimestamp={name:timestamp.name,time:this.stringToTime(timestamp.time),session_audio:this.sessionAudioPk()};this.createTimestamp.emit(newTimestamp),this.timestampState.set("DISPLAY"),this.timestampModel.set({})}timeToString(seconds){const hours=Math.floor(seconds/3600),minutes=Math.floor((seconds-3600*hours)/60),remainingSeconds=Math.floor(seconds-3600*hours-60*minutes);return`${hours.toString().padStart(2,"0")}:${minutes.toString().padStart(2,"0")}:${remainingSeconds.toString().padStart(2,"0")}`}stringToTime(timeString){const[hours,minutes,seconds]=timeString.split(":").map(Number);return 3600*hours+60*minutes+seconds}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={sessionAudioPk:[{type:core.Input,args:[{isSignal:!0,alias:"sessionAudioPk",required:!0,transform:void 0}]}],timestamps:[{type:core.Input,args:[{isSignal:!0,alias:"timestamps",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],deleteTimestamp:[{type:core.Output}],createTimestamp:[{type:core.Output}]}}};SessionaudioPlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-sessionaudio-player",template:'
\n
\n \n
\n \n\n @if (canCreate()) {\n @switch (timestampState()) {\n @case ("DISPLAY") {\n \n }\n @case ("CREATE") {\n \n }\n }\n }\n\n
\n @for (entry of timestampEntries(); track entry.value.pk) {\n \n }\n
\n
\n\n\n
\n \n
\n
\n\n\n \n
Create Timestamp
\n \n
\n
\n',standalone:!0,imports:[player_component.D,link_entry_component.i,button_component.Q,molecules.s2,card_component.i,common.NgTemplateOutlet],styles:[sessionaudio_player_componentngResource_default()]})],SessionaudioPlayerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/molecules/link-entry/link-entry.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".linkentry {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--spacer-4);\n}\n.linkentry--delete {\n justify-content: center;\n}\n.linkentry__link {\n text-align: end;\n cursor: pointer;\n}\n.linkentry__label {\n flex: 1;\n text-align: start;\n text-overflow: ellipsis;\n}\n.linkentry__box {\n background-color: var(--bs-secondary);\n padding: var(--spacer-2);\n}\n.linkentry__delete {\n display: flex;\n justify-content: flex-end;\n}\n.linkentry__delete-button {\n width: fit-content;\n display: inline-block;\n}\n\n.box {\n display: flex;\n flex-direction: row;\n width: fit-content;\n border-radius: var(--bs-border-radius);\n border-color: var(--bs-danger);\n border-style: solid;\n border-width: 1px;\n}\n.box__message {\n font-weight: bold;\n}\n.box__button {\n width: fit-content;\n margin-left: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/player/player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".timestamp__list {\n margin-top: var(--spacer-3);\n}\n.timestamp__create-button {\n margin-top: var(--spacer-4);\n margin-bottom: var(--spacer-4);\n}\n.timestamp__create-form {\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n\n.list {\n gap: var(--spacer-1);\n display: flex;\n flex-direction: column;\n}\n.list__timestamp {\n padding-bottom: var(--spacer-1);\n display: block;\n}\n\n.container {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6663],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/molecules/link-entry/link-entry.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>LinkEntryComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var link_entry_componentngResource=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.scss?ngResource"),link_entry_componentngResource_default=__webpack_require__.n(link_entry_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let LinkEntryComponent=class LinkEntryComponent{constructor(){this.entry=core.input.required(),this.canDelete=(0,core.input)(!1),this.deleteMessage=(0,core.input)("Delete entry?"),this.delete=new core.EventEmitter,this.linkClick=new core.EventEmitter,this.state=(0,core.signal)("DISPLAY")}changeState(newState){this.state.set(newState)}static{this.propDecorators={entry:[{type:core.Input,args:[{isSignal:!0,alias:"entry",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],deleteMessage:[{type:core.Input,args:[{isSignal:!0,alias:"deleteMessage",required:!1,transform:void 0}]}],delete:[{type:core.Output}],linkClick:[{type:core.Output}]}}};LinkEntryComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-link-entry",template:'
\n \n
\n\n\n \x3c!-- Entry Linktext --\x3e\n \n {{ entry().linkText }}\n \n\n \x3c!-- Entry Name --\x3e\n
\n {{ entry().label }}\n
\n\n \x3c!-- Delete Entry --\x3e\n
\n @if (canDelete()) {\n \n }\n
\n
\n\n\n
\n \n {{ deleteMessage() }}\n \n \n \n
\n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[button_component.Q,common.NgTemplateOutlet],styles:[link_entry_componentngResource_default()]})],LinkEntryComponent)},"./src/design/organisms/player/player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>PlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var player_componentngResource=__webpack_require__("./src/design/organisms/player/player.component.scss?ngResource"),player_componentngResource_default=__webpack_require__.n(player_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),plyr_min=__webpack_require__("./node_modules/plyr/dist/plyr.min.js"),plyr_min_default=__webpack_require__.n(plyr_min);let PlayerComponent=class PlayerComponent{constructor(){this.SEEK_TIME=5,this.VOLUME_STEP=.05,this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.playTime=core.input.required(),this.audioPlayer=(0,core.viewChild)("audioPlayer"),(0,core.effect)((()=>{const playerElement=this.audioPlayer()?.nativeElement;playerElement&&(this.plyr=new(plyr_min_default())(playerElement,{controls:["play","progress","current-time","mute","volume","download","settings"],invertTime:!1,seekTime:this.SEEK_TIME,volume:0}))})),(0,core.effect)((()=>{this.plyr.download=this.downloadSource()})),(0,core.effect)((()=>this.setPlayTime(this.playTime())))}triggerHotkeyAction(keyPressEvent){keyPressEvent.stopPropagation();switch(keyPressEvent.code){case"Space":case"Enter":this.play();break;case"KeyM":this.mute();break;case"ArrowRight":this.seekForward();break;case"ArrowLeft":this.seekBackward()}}setPlayTime(time){null!=time&&(this.plyr.currentTime=time)}play(){this.plyr.togglePlay()}seekBackward(){this.plyr.rewind(this.SEEK_TIME)}seekForward(){this.plyr.forward(this.SEEK_TIME)}increaseVolume(){this.plyr.increaseVolume(this.VOLUME_STEP)}decreaseVolume(){this.plyr.decreaseVolume(this.VOLUME_STEP)}mute(){this.plyr.muted=!this.plyr.muted}static{this.ctorParameters=()=>[]}static{this.propDecorators={serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],playTime:[{type:core.Input,args:[{isSignal:!0,alias:"playTime",required:!0,transform:void 0}]}],audioPlayer:[{type:core.ViewChild,args:["audioPlayer",{isSignal:!0}]}]}}};PlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-player",template:'\n',standalone:!0,imports:[],styles:[player_componentngResource_default()]})],PlayerComponent)},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>SessionaudioPlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var sessionaudio_player_componentngResource=__webpack_require__("./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource"),sessionaudio_player_componentngResource_default=__webpack_require__.n(sessionaudio_player_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),link_entry_component=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.ts"),player_component=__webpack_require__("./src/design/organisms/player/player.component.ts");let SessionaudioPlayerComponent=class SessionaudioPlayerComponent{constructor(formlyService){this.formlyService=formlyService,this.sessionAudioPk=core.input.required(),this.timestamps=core.input.required(),this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.deleteTimestamp=new core.EventEmitter,this.createTimestamp=new core.EventEmitter,this.timestampEntries=(0,core.computed)((()=>this.timestamps()?.map((timestamp=>({value:timestamp,label:timestamp.name,linkText:this.timeToString(timestamp.time)}))))),this.timestampState=(0,core.signal)("DISPLAY"),this.currentTime=(0,core.signal)(0),this.timestampForm=new fesm2022_forms.gE({}),this.timestampFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"time",maxLength:8,minLength:8,placeholder:"hh:mm:ss",className:"timestamp-input black-background px-0 col-lg-2 col-3",validators:["time"],required:!0,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"name",label:"Title",className:"timestamp-input black-background px-0 col-lg-10 col-9",required:!0,inputKind:"STRING"})])),this.timestampModel=(0,core.signal)({})}changeTimestampState(newState){this.timestampState.set(newState)}onLinkClick(timestamp){this.currentTime.set(timestamp.time),setTimeout((()=>this.currentTime.set(void 0)),1)}onSubmit(timestamp){const newTimestamp={name:timestamp.name,time:this.stringToTime(timestamp.time),session_audio:this.sessionAudioPk()};this.createTimestamp.emit(newTimestamp),this.timestampState.set("DISPLAY"),this.timestampModel.set({})}timeToString(seconds){const hours=Math.floor(seconds/3600),minutes=Math.floor((seconds-3600*hours)/60),remainingSeconds=Math.floor(seconds-3600*hours-60*minutes);return`${hours.toString().padStart(2,"0")}:${minutes.toString().padStart(2,"0")}:${remainingSeconds.toString().padStart(2,"0")}`}stringToTime(timeString){const[hours,minutes,seconds]=timeString.split(":").map(Number);return 3600*hours+60*minutes+seconds}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={sessionAudioPk:[{type:core.Input,args:[{isSignal:!0,alias:"sessionAudioPk",required:!0,transform:void 0}]}],timestamps:[{type:core.Input,args:[{isSignal:!0,alias:"timestamps",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],deleteTimestamp:[{type:core.Output}],createTimestamp:[{type:core.Output}]}}};SessionaudioPlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-sessionaudio-player",template:'
\n
\n \n
\n \n\n @if (canCreate()) {\n @switch (timestampState()) {\n @case ("DISPLAY") {\n \n }\n @case ("CREATE") {\n \n }\n }\n }\n\n
\n @for (entry of timestampEntries(); track entry.value.pk) {\n \n }\n
\n
\n\n\n
\n \n
\n
\n\n\n \n
Create Timestamp
\n \n
\n
\n',standalone:!0,imports:[player_component.D,link_entry_component.i,button_component.Q,molecules.s2,card_component.i,common.NgTemplateOutlet],styles:[sessionaudio_player_componentngResource_default()]})],SessionaudioPlayerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/molecules/link-entry/link-entry.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".linkentry {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--spacer-4);\n}\n.linkentry--delete {\n justify-content: center;\n}\n.linkentry__link {\n text-align: end;\n cursor: pointer;\n}\n.linkentry__label {\n flex: 1;\n text-align: start;\n text-overflow: ellipsis;\n}\n.linkentry__box {\n background-color: var(--bs-secondary);\n padding: var(--spacer-2);\n}\n.linkentry__delete {\n display: flex;\n justify-content: flex-end;\n}\n.linkentry__delete-button {\n width: fit-content;\n display: inline-block;\n}\n\n.box {\n display: flex;\n flex-direction: row;\n width: fit-content;\n border-radius: var(--bs-border-radius);\n border-color: var(--bs-danger);\n border-style: solid;\n border-width: 1px;\n}\n.box__message {\n font-weight: bold;\n}\n.box__button {\n width: fit-content;\n margin-left: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/player/player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".timestamp__list {\n margin-top: var(--spacer-3);\n}\n.timestamp__create-button {\n margin-top: var(--spacer-4);\n margin-bottom: var(--spacer-4);\n}\n.timestamp__create-form {\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n\n.list {\n gap: var(--spacer-1);\n display: flex;\n flex-direction: column;\n}\n.list__timestamp {\n padding-bottom: var(--spacer-1);\n display: block;\n}\n\n.container {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/app/campaign/pages/graph-page/graph-page.component.html b/app/campaign/pages/graph-page/graph-page.component.html index e29c26024..b122a42d4 100644 --- a/app/campaign/pages/graph-page/graph-page.component.html +++ b/app/campaign/pages/graph-page/graph-page.component.html @@ -63,6 +63,13 @@

Wiki Overview

} } + } @else { + + + + + + } {"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":module=>{"use strict";module.exports=function(i){return i[1]}},"./src/design/atoms/card/card.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Red:()=>Red,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Atoms/CardComponent",component:__webpack_require__("./src/design/atoms/card/card.component.ts").i,args:{text:"

BadgeText

",bgColor:"var(--bs-card-bg)"}},Template=args=>({props:args,template:'\n \n
\n Written inside of the card, how beautiful\n
\n '}),Default=Template.bind({});Default.args={};const Red=Template.bind({});Red.args={bgColor:"red"};const __namedExportsOrder=["Default","Red"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'(args: CardComponent) => ({\n props: args,\n template: `\n \n
\n Written inside of the card, how beautiful\n
\n `\n})',...Default.parameters?.docs?.source}}},Red.parameters={...Red.parameters,docs:{...Red.parameters?.docs,source:{originalSource:'(args: CardComponent) => ({\n props: args,\n template: `\n \n
\n Written inside of the card, how beautiful\n
\n `\n})',...Red.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[7038],{"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":module=>{"use strict";module.exports=function(i){return i[1]}},"./src/design/atoms/card/card.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Red:()=>Red,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Atoms/CardComponent",component:__webpack_require__("./src/design/atoms/card/card.component.ts").i,args:{text:"

BadgeText

",bgColor:"var(--bs-card-bg)"}},Template=args=>({props:args,template:'\n \n
\n Written inside of the card, how beautiful\n
\n '}),Default=Template.bind({});Default.args={};const Red=Template.bind({});Red.args={bgColor:"red"};const __namedExportsOrder=["Default","Red"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'(args: CardComponent) => ({\n props: args,\n template: `\n \n
\n Written inside of the card, how beautiful\n
\n `\n})',...Default.parameters?.docs?.source}}},Red.parameters={...Red.parameters,docs:{...Red.parameters?.docs,source:{originalSource:'(args: CardComponent) => ({\n props: args,\n template: `\n \n
\n Written inside of the card, how beautiful\n
\n `\n})',...Red.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-organisms-quote-field-quote-field-stories.0f655785.iframe.bundle.js b/design-organisms-quote-field-quote-field-stories.5a3b72b8.iframe.bundle.js similarity index 95% rename from design-organisms-quote-field-quote-field-stories.0f655785.iframe.bundle.js rename to design-organisms-quote-field-quote-field-stories.5a3b72b8.iframe.bundle.js index 954eba4e3..a6ba06847 100644 --- a/design-organisms-quote-field-quote-field-stories.0f655785.iframe.bundle.js +++ b/design-organisms-quote-field-quote-field-stories.5a3b72b8.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5601],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/quote-field/quote-field.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>QuoteFieldComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var quote_field_componentngResource=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.scss?ngResource"),quote_field_componentngResource_default=__webpack_require__.n(quote_field_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),environment=__webpack_require__("./src/environments/environment.ts");let ArticleService=class ArticleService{constructor(routingService,http){this.routingService=routingService,this.http=http,this.apiUrl=environment.c.apiUrl,this.recentlyUpdatedUrl=`${this.apiUrl}/recentupdates`,this.searchUrl=`${this.apiUrl}/search`}getRecentlyUpdatedArticle(campaign,pageNumber){return null==pageNumber&&(pageNumber=0),this.http.get(`${this.recentlyUpdatedUrl}/${campaign}/${pageNumber}`).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getGlobalSearchArticle(searchString){return this.http.get(`${this.searchUrl}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}getCampaignSearchArticle(campaign,searchString){return this.http.get(`${this.searchUrl}/${campaign}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}searchArticlesKind(campaign,searchTerm,articleKind){return this.http.get(`${this.searchUrl}/${campaign}/${articleKind}/${searchTerm}`).pipe((0,map.T)((response=>response.map((item=>this.parseOverviewEntity(item))))))}readArticle(articleId,articleKind){return this.http.get(`${this.searchUrl}/single/${articleKind}/${articleId}`).pipe((0,map.T)((resp=>this.parseOverviewEntity(resp))))}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const articleType=data.article_type,params={campaign:data.campaign_details.name};let routeName="";switch(articleType){case"character":params.name=data.name,routeName="character";break;case"creature":params.name=data.name,routeName="creature";break;case"diaryentry":params.session_number=data.session_details.session_number,params.isMainSession=data.session_details.is_main_session_int,params.authorName=data.author_details.name,routeName="diaryentry";break;case"encounter":params.session_number=data.diaryentry_details.session_number,params.isMainSession=data.diaryentry_details.is_main_session,params.authorName=data.diaryentry_details.author_name,params.encounterTitle=data.title,routeName="diaryentry-encounter";break;case"item":params.name=data.name,routeName="item";break;case"location":params.name=data.name,params.parent_name=data.parent_location_details.name,routeName="location";break;case"organization":params.name=data.name,routeName="organization";break;case"quest":params.name=data.name,routeName="quest";break;case"sessionaudio":params.isMainSession=data.session_details.is_main_session_int,params.sessionNumber=data.session_details.session_number,routeName="sessionaudio";break;case"session":routeName="sessions";break;case"map":case"mapmarker":params.name=data.name,routeName="map";break;case"timestamp":routeName="default-map";break;case"spell":params.name=data.name,routeName="spell";break;case"rules":params.name=data.name,routeName="rule"}return()=>this.routingService.getRoutePath(routeName,params)}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};ArticleService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ArticleService);var button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),quote_component=__webpack_require__("./src/design/organisms/quote/quote.component.ts");let QuoteFieldComponent=class QuoteFieldComponent{constructor(routingService,formlyService,articleService){this.routingService=routingService,this.formlyService=formlyService,this.articleService=articleService,this.quote=core.input.required(),this.character=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=core.input.required(),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.encounters=core.input.required(),this.sessions=core.input.required(),this.quoteControlsBlacklist=(0,core.input)([]),this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.sessions$=(0,rxjs_interop.br)(this.sessions).pipe((0,take.s)(1)),this.encounters$=(0,rxjs_interop.br)(this.encounters).pipe((0,take.s)(1)),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>this.parseConnection(this.quote()?.connections??[]))),this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.isLoadingQuote=(0,core.signal)(!1),this.quoteOverviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("quote-overview",{name:this.character().name,campaign:this.campaignName}))),this.userModel=(0,core.signal)({}),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"description",required:!0,inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"session",required:!0,campaign:this.campaignName(),options$:this.sessions$,labelProp:"name_full",valueProp:"pk"}),this.formlyService.buildAutocompleteConfig({key:"encounter",required:!1,loadOptions:searchTerm=>this.articleService.searchArticlesKind(this.campaignName(),searchTerm,"encounter"),optionKeyProp:"pk",optionLabelProp:"name",optionValueProp:"pk",initialValue$:this.quote()?.encounter?this.articleService.readArticle(this.quote()?.encounter,"encounter"):void 0}),this.formlyService.buildEditorConfig({key:"quote",required:!0})])),(0,rxjs_interop.br)(this.quote).pipe((0,rxjs_interop.pQ)()).subscribe((()=>this.isLoadingQuote.set(!1)))}onSubmit(event){switch(this.state()){case"UPDATE":case"UPDATE_OUTDATED":this.quoteUpdate.emit(event);break;case"CREATE":this.quoteCreate.emit(event);break;default:throw new Error(`QuoteField - Submitted form while in state '${this.state()}', which is not possible.`)}this.changeState("DISPLAY",{})}onDelete(){this.quoteDelete.emit(this.quote()),this.changeState("DISPLAY",{})}onCancel(){this.changeState("DISPLAY",{})}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){if(!this.canCreate()||!this.quote)return;const newConnection={quote:this.quote()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}getNextRandomQuote(){this.isLoadingQuote.set(!0),this.refreshQuote.emit()}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$},{type:ArticleService}]}static{this.propDecorators={quote:[{type:core.Input,args:[{isSignal:!0,alias:"quote",required:!0,transform:void 0}]}],character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],quoteControlsBlacklist:[{type:core.Input,args:[{isSignal:!0,alias:"quoteControlsBlacklist",required:!1,transform:void 0}]}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}]}}};QuoteFieldComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-quote-field",template:'@switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n

Updating Quote {{ quote()?.pk }}

\n\n @if (canUpdate() && state() === "UPDATE") {\n \n }\n\n @if (state() === "UPDATE_OUTDATED") {\n \n }\n
\n
\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n
\n Create Quote for {{ character().name }}\n
\n\n \x3c!-- Form --\x3e\n \n
\n
\n\n\x3c!-- Quote Delete "Form" --\x3e\n\n \n
Delete this quote?
\n\n
\n \n\n
\n @if (quote()?.description) {\n \n }\n\n @if (!quote()?.description) {\n - {{ character().name }}\n }\n
\n
\n\n
\n \n \n
\n
\n
\n',standalone:!0,imports:[common.NgTemplateOutlet,quote_component.w,card_component.i,molecules.s2,molecules.zx,html_text_component.m,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[quote_field_componentngResource_default()]})],QuoteFieldComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/quote-field/quote-field.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoPermission:()=>NoPermission,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_router_testing__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),src_app_modules_formly_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/app/_modules/formly_constants.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Organisms/QuoteFieldComponent",component:__webpack_require__("./src/design/organisms/quote-field/quote-field.component.ts").k,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.moduleMetadata)({imports:[_angular_router_testing__WEBPACK_IMPORTED_MODULE_4__.c,src_app_modules_formly_constants__WEBPACK_IMPORTED_MODULE_2__.d_]})],args:{quote:{quote:"In the darkest of times, the light within us shines the brightest.",description:"Said by a wise old wizard to a young hero about to embark on a perilous quest.",pk:1,session:3,creation_datetime:"2023-04-22T12:00:00.000Z",update_datetime:"2023-04-23T12:00:00.000Z",session_details:{pk:3,is_main_session:!0,is_main_session_int:1,session_number:3,session_date:"2023-04-20",start_day:1,end_day:5,name:"The Quest for the Sacred Amulet",title:"The Quest"},encounter:2,connections:[{character:1,character_details:{pk:1,name:"Gandalf",name_full:"Gandalf the Grey"},quote:2,pk:2},{character:2,character_details:{pk:2,name:"Frodo",name_full:"Frodo Baggins"},quote:3,pk:3}]},character:{getAbsoluteRouterUrl:()=>"/dummy/url",player_character:!1,alive:!0,name:"Gandalf",title:"Gandalf the Grey",gender:"Male",race:"Maia",description:"A wise and powerful wizard, Gandalf the Grey is a member of the Fellowship of the Ring and a key figure in the fight against the Dark Lord Sauron.",organizations:[{pk:1,name:"The White Council",organization_id:1,role:"Member"},{pk:2,name:"The Fellowship of the Ring",organization_id:2,role:"Member"}],current_location:3,current_location_details:{pk:3,name_full:"Moria",parent_location:"Middle-earth"},items:[{pk:1,name:"Glamdring"},{pk:2,name:"Staff"}],encounters:[{name:"The Council of Elrond",creation_datetime:"2023-04-22T12:00:00.000Z",update_datetime:"2023-04-23T12:00:00.000Z",title:"Council of Elrond",diaryentry:50,order_index:20,encounterConnections:[{pk:1,encounter:2,character:3},{pk:2,encounter:3,character:4}],description:"At the Council of Elrond, Gandalf reveals the true nature of the One Ring and urges the Fellowship to destroy it in the fires of Mount Doom.",pk:1,campaign_details:{name:"Aldrune",id:1}},{name:"The Battle of Helm's Deep",title:"The Battle of Helm's Deep",diaryentry:20,order_index:30,creation_datetime:"2023-04-23T12:00:00.000Z",update_datetime:"2023-04-24T12:00:00.000Z",encounterConnections:[{pk:324,encounter:223,encounter_details:{name:"Main Session 6 - A new job",name_full:"Main Session 6 - A new job",pk:223},character:43,character_details:{name:"Aliana Sterent",name_full:"Aliana Sterent",pk:43}},{pk:325,encounter:223,encounter_details:{name:"Main Session 6 - A new job",name_full:"Main Session 6 - A new job",pk:223},character:29,character_details:{name:"Ateula",name_full:"Ateula",pk:29}}],description:"Gandalf arrives at Helm's Deep with reinforcements and turns the tide of the battle against Saruman's forces.",pk:2,campaign_details:{name:"Aldrune",id:1}}],images:[],player_class_connections:[{pk:1,player_class:8,character:5,player_class_details:{update_datetime:"2023-04-24T12:00:00.000Z",name:"Paladin",pk:8}}],campaign:1,campaign_details:{id:1,name:"The War of the Ring"}},canCreate:!0,canUpdate:!0,canDelete:!0,campaignCharacters:[{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gandalf",pk:1,name_full:"Gandalf the Grey",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Frodo",pk:2,name_full:"Frodo Baggins",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gimli",pk:3,name_full:"Gimli son of Glóin",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Legolas",pk:4,name_full:"Legolas Greenleaf",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Bilbo",pk:5,name_full:"Bilbo Baggins",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Aragorn",pk:6,name_full:"Aragorn son of Arathorn",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Saruman",pk:7,name_full:"Saruman the White",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Sif",pk:18,name_full:"Sif the Swift",description:"Sif is a skilled warrior known for her lightning-fast strikes and agility. She is fiercely loyal to her friends and will stop at nothing to protect them.",update_datetime:"2022-03-15T10:30:00.000Z",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gorin",pk:19,name_full:"Gorin Ironfist",description:"Gorin is a dwarf from the Iron Hills, known for his strength and unwavering determination. He has a fondness for ale and a good brawl.",update_datetime:"2022-02-23T14:15:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg","https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Lirien",pk:20,name_full:"Lirien Windrider",description:"Lirien is an elven archer, renowned for her skill with the bow. She is fiercely independent and often clashes with authority figures.",update_datetime:"2022-03-20T08:45:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}}]}},Template=args=>({props:{...args,quoteDelete:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteDelete"),quoteCreate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteCreate"),quoteUpdate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteUpdate"),refreshQuote:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("refreshQuote"),connectionDelete:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("connectionDelete"),connectionCreate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("connectionCreate")}}),Default=Template.bind({});Default.args={};const NoPermission=Template.bind({});NoPermission.args={canCreate:!1,canUpdate:!1,canDelete:!1};const __namedExportsOrder=["Default","NoPermission"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n refreshQuote: action('refreshQuote'),\n connectionDelete: action('connectionDelete'),\n connectionCreate: action('connectionCreate')\n }\n})",...Default.parameters?.docs?.source}}},NoPermission.parameters={...NoPermission.parameters,docs:{...NoPermission.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n refreshQuote: action('refreshQuote'),\n connectionDelete: action('connectionDelete'),\n connectionCreate: action('connectionCreate')\n }\n})",...NoPermission.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/quote-field/quote-field.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n}\n.form-card__quote {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}\n\n.quote__description {\n margin: var(--spacer-3) var(--spacer-0) var(--spacer-3) var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5601],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/quote-field/quote-field.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>QuoteFieldComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var quote_field_componentngResource=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.scss?ngResource"),quote_field_componentngResource_default=__webpack_require__.n(quote_field_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),environment=__webpack_require__("./src/environments/environment.ts");let ArticleService=class ArticleService{constructor(routingService,http){this.routingService=routingService,this.http=http,this.apiUrl=environment.c.apiUrl,this.recentlyUpdatedUrl=`${this.apiUrl}/recentupdates`,this.searchUrl=`${this.apiUrl}/search`}getRecentlyUpdatedArticle(campaign,pageNumber){return null==pageNumber&&(pageNumber=0),this.http.get(`${this.recentlyUpdatedUrl}/${campaign}/${pageNumber}`).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getGlobalSearchArticle(searchString){return this.http.get(`${this.searchUrl}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}getCampaignSearchArticle(campaign,searchString){return this.http.get(`${this.searchUrl}/${campaign}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}searchArticlesKind(campaign,searchTerm,articleKind){return this.http.get(`${this.searchUrl}/${campaign}/${articleKind}/${searchTerm}`).pipe((0,map.T)((response=>response.map((item=>this.parseOverviewEntity(item))))))}readArticle(articleId,articleKind){return this.http.get(`${this.searchUrl}/single/${articleKind}/${articleId}`).pipe((0,map.T)((resp=>this.parseOverviewEntity(resp))))}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const articleType=data.article_type,params={campaign:data.campaign_details.name};let routeName="";switch(articleType){case"character":params.name=data.name,routeName="character";break;case"creature":params.name=data.name,routeName="creature";break;case"diaryentry":params.session_number=data.session_details.session_number,params.isMainSession=data.session_details.is_main_session_int,params.authorName=data.author_details.name,routeName="diaryentry";break;case"encounter":params.session_number=data.diaryentry_details.session_number,params.isMainSession=data.diaryentry_details.is_main_session,params.authorName=data.diaryentry_details.author_name,params.encounterTitle=data.title,routeName="diaryentry-encounter";break;case"item":params.name=data.name,routeName="item";break;case"location":params.name=data.name,params.parent_name=data.parent_location_details.name,routeName="location";break;case"organization":params.name=data.name,routeName="organization";break;case"quest":params.name=data.name,routeName="quest";break;case"sessionaudio":params.isMainSession=data.session_details.is_main_session_int,params.sessionNumber=data.session_details.session_number,routeName="sessionaudio";break;case"session":routeName="sessions";break;case"map":case"mapmarker":params.name=data.name,routeName="map";break;case"timestamp":routeName="default-map";break;case"spell":params.name=data.name,routeName="spell";break;case"rules":params.name=data.name,routeName="rule"}return()=>this.routingService.getRoutePath(routeName,params)}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};ArticleService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ArticleService);var button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),quote_component=__webpack_require__("./src/design/organisms/quote/quote.component.ts");let QuoteFieldComponent=class QuoteFieldComponent{constructor(routingService,formlyService,articleService){this.routingService=routingService,this.formlyService=formlyService,this.articleService=articleService,this.quote=core.input.required(),this.character=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=core.input.required(),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.encounters=core.input.required(),this.sessions=core.input.required(),this.quoteControlsBlacklist=(0,core.input)([]),this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.sessions$=(0,rxjs_interop.br)(this.sessions).pipe((0,take.s)(1)),this.encounters$=(0,rxjs_interop.br)(this.encounters).pipe((0,take.s)(1)),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>this.parseConnection(this.quote()?.connections??[]))),this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.isLoadingQuote=(0,core.signal)(!1),this.quoteOverviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("quote-overview",{name:this.character().name,campaign:this.campaignName}))),this.userModel=(0,core.signal)({}),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"description",required:!0,inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"session",required:!0,campaign:this.campaignName(),options$:this.sessions$,labelProp:"name_full",valueProp:"pk"}),this.formlyService.buildAutocompleteConfig({key:"encounter",required:!1,loadOptions:searchTerm=>this.articleService.searchArticlesKind(this.campaignName(),searchTerm,"encounter"),optionKeyProp:"pk",optionLabelProp:"name",optionValueProp:"pk",initialValue$:this.quote()?.encounter?this.articleService.readArticle(this.quote()?.encounter,"encounter"):void 0}),this.formlyService.buildEditorConfig({key:"quote",required:!0})])),(0,rxjs_interop.br)(this.quote).pipe((0,rxjs_interop.pQ)()).subscribe((()=>this.isLoadingQuote.set(!1)))}onSubmit(event){switch(this.state()){case"UPDATE":case"UPDATE_OUTDATED":this.quoteUpdate.emit(event);break;case"CREATE":this.quoteCreate.emit(event);break;default:throw new Error(`QuoteField - Submitted form while in state '${this.state()}', which is not possible.`)}this.changeState("DISPLAY",{})}onDelete(){this.quoteDelete.emit(this.quote()),this.changeState("DISPLAY",{})}onCancel(){this.changeState("DISPLAY",{})}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){if(!this.canCreate()||!this.quote)return;const newConnection={quote:this.quote()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}getNextRandomQuote(){this.isLoadingQuote.set(!0),this.refreshQuote.emit()}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$},{type:ArticleService}]}static{this.propDecorators={quote:[{type:core.Input,args:[{isSignal:!0,alias:"quote",required:!0,transform:void 0}]}],character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],quoteControlsBlacklist:[{type:core.Input,args:[{isSignal:!0,alias:"quoteControlsBlacklist",required:!1,transform:void 0}]}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}]}}};QuoteFieldComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-quote-field",template:'@switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n

Updating Quote {{ quote()?.pk }}

\n\n @if (canUpdate() && state() === "UPDATE") {\n \n }\n\n @if (state() === "UPDATE_OUTDATED") {\n \n }\n
\n
\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n
\n Create Quote for {{ character().name }}\n
\n\n \x3c!-- Form --\x3e\n \n
\n
\n\n\x3c!-- Quote Delete "Form" --\x3e\n\n \n
Delete this quote?
\n\n
\n \n\n
\n @if (quote()?.description) {\n \n }\n\n @if (!quote()?.description) {\n - {{ character().name }}\n }\n
\n
\n\n
\n \n \n
\n
\n
\n',standalone:!0,imports:[common.NgTemplateOutlet,quote_component.w,card_component.i,molecules.s2,molecules.zx,html_text_component.m,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[quote_field_componentngResource_default()]})],QuoteFieldComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/quote-field/quote-field.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoPermission:()=>NoPermission,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_router_testing__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),src_app_modules_formly_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/app/_modules/formly_constants.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Organisms/QuoteFieldComponent",component:__webpack_require__("./src/design/organisms/quote-field/quote-field.component.ts").k,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.moduleMetadata)({imports:[_angular_router_testing__WEBPACK_IMPORTED_MODULE_4__.c,src_app_modules_formly_constants__WEBPACK_IMPORTED_MODULE_2__.d_]})],args:{quote:{quote:"In the darkest of times, the light within us shines the brightest.",description:"Said by a wise old wizard to a young hero about to embark on a perilous quest.",pk:1,session:3,creation_datetime:"2023-04-22T12:00:00.000Z",update_datetime:"2023-04-23T12:00:00.000Z",session_details:{pk:3,is_main_session:!0,is_main_session_int:1,session_number:3,session_date:"2023-04-20",start_day:1,end_day:5,name:"The Quest for the Sacred Amulet",title:"The Quest"},encounter:2,connections:[{character:1,character_details:{pk:1,name:"Gandalf",name_full:"Gandalf the Grey"},quote:2,pk:2},{character:2,character_details:{pk:2,name:"Frodo",name_full:"Frodo Baggins"},quote:3,pk:3}]},character:{getAbsoluteRouterUrl:()=>"/dummy/url",player_character:!1,alive:!0,name:"Gandalf",title:"Gandalf the Grey",gender:"Male",race:"Maia",description:"A wise and powerful wizard, Gandalf the Grey is a member of the Fellowship of the Ring and a key figure in the fight against the Dark Lord Sauron.",organizations:[{pk:1,name:"The White Council",organization_id:1,role:"Member"},{pk:2,name:"The Fellowship of the Ring",organization_id:2,role:"Member"}],current_location:3,current_location_details:{pk:3,name_full:"Moria",parent_location:"Middle-earth"},items:[{pk:1,name:"Glamdring"},{pk:2,name:"Staff"}],encounters:[{name:"The Council of Elrond",creation_datetime:"2023-04-22T12:00:00.000Z",update_datetime:"2023-04-23T12:00:00.000Z",title:"Council of Elrond",diaryentry:50,order_index:20,encounterConnections:[{pk:1,encounter:2,character:3},{pk:2,encounter:3,character:4}],description:"At the Council of Elrond, Gandalf reveals the true nature of the One Ring and urges the Fellowship to destroy it in the fires of Mount Doom.",pk:1,campaign_details:{name:"Aldrune",id:1}},{name:"The Battle of Helm's Deep",title:"The Battle of Helm's Deep",diaryentry:20,order_index:30,creation_datetime:"2023-04-23T12:00:00.000Z",update_datetime:"2023-04-24T12:00:00.000Z",encounterConnections:[{pk:324,encounter:223,encounter_details:{name:"Main Session 6 - A new job",name_full:"Main Session 6 - A new job",pk:223},character:43,character_details:{name:"Aliana Sterent",name_full:"Aliana Sterent",pk:43}},{pk:325,encounter:223,encounter_details:{name:"Main Session 6 - A new job",name_full:"Main Session 6 - A new job",pk:223},character:29,character_details:{name:"Ateula",name_full:"Ateula",pk:29}}],description:"Gandalf arrives at Helm's Deep with reinforcements and turns the tide of the battle against Saruman's forces.",pk:2,campaign_details:{name:"Aldrune",id:1}}],images:[],player_class_connections:[{pk:1,player_class:8,character:5,player_class_details:{update_datetime:"2023-04-24T12:00:00.000Z",name:"Paladin",pk:8}}],campaign:1,campaign_details:{id:1,name:"The War of the Ring"}},canCreate:!0,canUpdate:!0,canDelete:!0,campaignCharacters:[{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gandalf",pk:1,name_full:"Gandalf the Grey",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Frodo",pk:2,name_full:"Frodo Baggins",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gimli",pk:3,name_full:"Gimli son of Glóin",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Legolas",pk:4,name_full:"Legolas Greenleaf",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Bilbo",pk:5,name_full:"Bilbo Baggins",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Aragorn",pk:6,name_full:"Aragorn son of Arathorn",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Saruman",pk:7,name_full:"Saruman the White",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Sif",pk:18,name_full:"Sif the Swift",description:"Sif is a skilled warrior known for her lightning-fast strikes and agility. She is fiercely loyal to her friends and will stop at nothing to protect them.",update_datetime:"2022-03-15T10:30:00.000Z",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gorin",pk:19,name_full:"Gorin Ironfist",description:"Gorin is a dwarf from the Iron Hills, known for his strength and unwavering determination. He has a fondness for ale and a good brawl.",update_datetime:"2022-02-23T14:15:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg","https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Lirien",pk:20,name_full:"Lirien Windrider",description:"Lirien is an elven archer, renowned for her skill with the bow. She is fiercely independent and often clashes with authority figures.",update_datetime:"2022-03-20T08:45:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}}]}},Template=args=>({props:{...args,quoteDelete:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteDelete"),quoteCreate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteCreate"),quoteUpdate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("quoteUpdate"),refreshQuote:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("refreshQuote"),connectionDelete:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("connectionDelete"),connectionCreate:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("connectionCreate")}}),Default=Template.bind({});Default.args={};const NoPermission=Template.bind({});NoPermission.args={canCreate:!1,canUpdate:!1,canDelete:!1};const __namedExportsOrder=["Default","NoPermission"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n refreshQuote: action('refreshQuote'),\n connectionDelete: action('connectionDelete'),\n connectionCreate: action('connectionCreate')\n }\n})",...Default.parameters?.docs?.source}}},NoPermission.parameters={...NoPermission.parameters,docs:{...NoPermission.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n refreshQuote: action('refreshQuote'),\n connectionDelete: action('connectionDelete'),\n connectionCreate: action('connectionCreate')\n }\n})",...NoPermission.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/quote-field/quote-field.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n}\n.form-card__quote {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}\n\n.quote__description {\n margin: var(--spacer-3) var(--spacer-0) var(--spacer-3) var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-campaign-admin-campaign-admin-stories.3a5b374c.iframe.bundle.js b/design-templates-campaign-admin-campaign-admin-stories.11d92e42.iframe.bundle.js similarity index 92% rename from design-templates-campaign-admin-campaign-admin-stories.3a5b374c.iframe.bundle.js rename to design-templates-campaign-admin-campaign-admin-stories.11d92e42.iframe.bundle.js index 4d3ad18bf..b5ecf0c52 100644 --- a/design-templates-campaign-admin-campaign-admin-stories.3a5b374c.iframe.bundle.js +++ b/design-templates-campaign-admin-campaign-admin-stories.11d92e42.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5829],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/app/_services/utils/campaign.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_B:()=>dummyCampaigns,jr:()=>dummyCampaign,mE:()=>dummyStatistics});const dummyCampaigns=[{pk:1,name:"Aldrune",subtitle:"A campaign made by Samuel Day and recorded by Philipp Dörner
through the eyes of Relentless",background_image:"/media/campaign_backgrounds/bg.jpg",is_deactivated:!1,has_audio_recording_permission:!0,icon:"/media/campaign_icons/favicon-128x128.png",default_map:1,default_map_details:{icon:"map",image:"pic05_sMT2d6M.jpg",name:"Aldrune",id:1},duration:{start_date:"2020-04-07T00:00:00.000000Z",last_date:"2023-04-11T00:00:00.000000Z"}},{pk:2,name:"Jōzai Corp",subtitle:"Welcome to Jōzai Corp, please enjoy your employment.",background_image:"/media/campaign_backgrounds/shanghai_city_snlaYDd.jpg",is_deactivated:!1,has_audio_recording_permission:!1,icon:"/media/campaign_icons/icon.png",default_map:void 0,default_map_details:void 0,duration:{start_date:"2022-01-15T00:00:00.000000Z",last_date:"2022-02-19T00:00:00.000000Z"}}],dummyStatistics={character_count:265,item_count:142,location_count:229,creature_count:42,diaryentry_count:101,encounter_count:954,organization_count:46,quest_count:69,quote_count:203,session_audio_count:69,timestamp_count:1121,map_count:7,marker_count:136,spell_count:22,session_count:90,rule_count:17},dummyCampaign={name:"Aldrune",subtitle:"A campaign for testing",pk:1,background_image:"/assets/default_images/audio_pic_default.webp",icon:"https://www.aldrune.com/media/campaign_icons/favicon-128x128.png",default_map:123,default_map_details:{id:123,name:"Default Map",icon:"plus",image:"blub.jpg"},is_deactivated:!1,has_audio_recording_permission:!0,members:[{username:"isofruit",password:"password1",pk:1,api_permissions:["permission1","permission2"],groups:[1,2],group_details:[{name:"group1",pk:1},{name:"group2",pk:2}],is_staff:!0,is_superuser:!1,email:"user1@example.com",is_active:!0},{username:"user2",password:"password2",pk:2,api_permissions:["permission3","permission4"],groups:[1,3],group_details:[{name:"group1",pk:1},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user2@example.com",is_active:!0}],admins:[{username:"admin",password:"adminpassword",pk:3,api_permissions:["permission1","permission2","permission3","permission4"],groups:[1,2,3],group_details:[{name:"group1",pk:1},{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!0,is_superuser:!0,email:"admin@example.com",is_active:!0},{username:"user3",password:"password3",pk:4,api_permissions:["permission1"],groups:[1],group_details:[{name:"group1",pk:1}],is_staff:!1,is_superuser:!1,email:"user3@example.com",is_active:!0}],guests:[{username:"user4",password:"password4",pk:5,api_permissions:["permission2","permission3"],groups:[2,3],group_details:[{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user4@example.com",is_active:!0},{username:"user5",password:"password5",pk:6,api_permissions:["permission4"],groups:[3],group_details:[{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user5@example.com",is_active:!0}],member_group_name:"Members",admin_group_name:"Admins",guest_group_name:"Guests",emptySearchResponses:[{id:1,text:"Empty response 1",campaign:1},{id:2,text:"Empty response 2",campaign:1}]}},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/campaign-admin/campaign-admin.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>campaign_admin_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),campaign_mock_service=__webpack_require__("./src/app/_services/utils/campaign.mock.service.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var campaign_admin_componentngResource=__webpack_require__("./src/design/templates/campaign-admin/campaign-admin.component.scss?ngResource"),campaign_admin_componentngResource_default=__webpack_require__.n(campaign_admin_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),info_circle_tooltip_component=__webpack_require__("./src/design/atoms/info-circle-tooltip/info-circle-tooltip.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let CampaignAdminComponent=class CampaignAdminComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.users=(0,core.input)(),this.removeMember=new core.EventEmitter,this.removeAdmin=new core.EventEmitter,this.removeGuest=new core.EventEmitter,this.addMember=new core.EventEmitter,this.addAdmin=new core.EventEmitter,this.addGuest=new core.EventEmitter,this.removeEmptySearchResponse=new core.EventEmitter,this.addEmptySearchResponse=new core.EventEmitter,this.deactivateCampaign=new core.EventEmitter,this.users$=(0,rxjs_interop.br)(this.users).pipe((0,map.T)((x=>x??[]))),this.showMemberAddForm=!1,this.memberTooltip='Allows creating, reading, updating and deleting articles in this campaign. Also makes the person a possible "author" for diaryentries.',this.memberFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>this.isInGroup(opt,this.campaign.member_group_name)))))),tooltipMessage:"Members typically represent the individual player characters + the GM(s)",warningMessage:"The user you selected is already member of this campaign"})])),this.showAdminAddForm=!1,this.adminTooltip='Allows adding admins, members and guests to a campaign. Does not add the person to the list of possible "authors" for diaryentries.',this.adminFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>this.isInGroup(opt,this.campaign.admin_group_name)))))),tooltipMessage:"Keep in mind that being an admin only represents being the one administering this campaign, not being a member of it!",warningMessage:"The user you selected is already admin of this campaign"})])),this.showGuestAddForm=!1,this.guestTooltip="Allows only reading articles in this campaign.",this.guestFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>{const isAdmin=this.isInGroup(opt,this.campaign.admin_group_name),isMember=this.isInGroup(opt,this.campaign.member_group_name),isGuest=this.isInGroup(opt,this.campaign.guest_group_name);return isAdmin||isMember||isGuest}))))),tooltipMessage:"Keep in mind that there's no point in being a guest when you're already a member or admin.",warningMessage:"The user you selected is already guest of this campaign"})])),this.showResponseForm=!1,this.responseFormlyFields=[this.formlyService.buildInputConfig({key:"text",placeholder:"Text to show for empty searches",maxLength:400,inputKind:"STRING"})]}ngOnChanges(){this.setUrls()}changeState(role,showForm){switch(role){case"member":case"globalmember":this.showMemberAddForm=showForm,this.memberModel={};break;case"admin":this.showAdminAddForm=showForm,this.adminModel={};break;case"guest":case"globalguest":this.showGuestAddForm=showForm,this.guestModel={}}}onAddUser(role,model){const userPk=model.pk,user=this.users()?.find((usr=>usr.pk===userPk));switch(role){case"member":case"globalmember":this.addMember.emit(user);break;case"admin":this.addAdmin.emit(user);break;case"guest":case"globalguest":this.addGuest.emit(user)}this.changeState(role,!1)}toggleResponseAddForm(){this.showResponseForm=!this.showResponseForm,this.showResponseForm&&(this.responseModel={campaign:this.campaign.pk})}onAddResponse(model){this.addEmptySearchResponse.emit(model),this.toggleResponseAddForm()}setUrls(){this.updateUrl=this.routingService.getRoutePath("campaign-update",{campaign:this.campaign.name}),this.homeUrl=this.routingService.getRoutePath("home",{campaign:this.campaign.name})}isInGroup(selectOption,groupName){const groupsOfUser=selectOption.group_details,isMember=groupsOfUser?.some((group=>group.name.toLowerCase()===groupName));return isMember??!1}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={campaign:[{type:core.Input}],serverUrl:[{type:core.Input}],campaignStatistics:[{type:core.Input}],users:[{type:core.Input,args:[{isSignal:!0,alias:"users",required:!1,transform:void 0}]}],removeMember:[{type:core.Output}],removeAdmin:[{type:core.Output}],removeGuest:[{type:core.Output}],addMember:[{type:core.Output}],addAdmin:[{type:core.Output}],addGuest:[{type:core.Output}],removeEmptySearchResponse:[{type:core.Output}],addEmptySearchResponse:[{type:core.Output}],deactivateCampaign:[{type:core.Output}]}}};CampaignAdminComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-campaign-admin",template:'\n
\n
\n \n \n \n
\n\n \x3c!-- Heading --\x3e\n
\n

{{ campaign.name }}

\n
\n\n \x3c!-- Image Fields of Campaign --\x3e\n

\n \n Campaign Settings\n

\n\n \n
\n
\n

Background

\n \n
\n\n
\n

Icon

\n \n
\n
\n\n
\n Default Map: \n
\n {{ campaign.default_map_details?.name }}\n
\n\n Subtitle: \n \n
\n
\n\n \x3c!-- Members & Admins--\x3e\n

\n \n Campaign Members\n

\n\n
\n \n

\n \n

\n\n @for (user of campaign.admins; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showAdminAddForm) {\n \n } @else {\n \n }\n
\n
\n\n \n

\n \n

\n\n @for (user of campaign.members; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showMemberAddForm) {\n \n } @else {\n \n }\n
\n
\n\n \n

\n \n

\n\n @for (user of campaign.guests; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showGuestAddForm) {\n \n } @else {\n \n }\n
\n
\n
\n\n \x3c!-- Campaign Statistics --\x3e\n

\n \n Campaign Statistics\n

\n\n
\n @for (statistic of campaignStatistics | keyvalue; track $index) {\n
\n
{{ statistic.key }}
\n
{{ statistic.value }}
\n
\n }\n
\n\n \x3c!-- EmptySearchResponses --\x3e\n

\n \n \n

\n\n
\n
\n \n @for (\n emptyResponse of campaign.emptySearchResponses;\n track emptyResponse.id\n ) {\n
\n {{ emptyResponse.text }}\n\n \n
\n }\n\n
\n \x3c!-- Form --\x3e\n\n @if (showResponseForm) {\n \n } @else {\n \n }\n
\n
\n
\n
\n\n \x3c!-- Footer (Move to other Article + Delete Article) --\x3e\n \n
\n
\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n',standalone:!0,imports:[page_container_component.i,button_component.Q,router.Wk,common.KeyValuePipe,icon_component.R,card_component.i,html_text_component.m,info_circle_tooltip_component.$,molecules.Ts,molecules.s2,molecules.D$,common.NgTemplateOutlet],styles:[campaign_admin_componentngResource_default()]})],CampaignAdminComponent);const campaign_admin_stories={title:"DesignSystem/Templates/CampaignAdminComponent",component:CampaignAdminComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_]})],args:{campaign:campaign_mock_service.jr,campaignStatistics:campaign_mock_service.mE,serverUrl:"https://www.aldrune.com"}},Default=(args=>({props:{...args,removeMember:(0,dist.XI)("removeMember"),addMember:(0,dist.XI)("addMember"),removeAdmin:(0,dist.XI)("removeAdmin"),addAdmin:(0,dist.XI)("addAdmin"),removeGuest:(0,dist.XI)("removeGuest"),addGuest:(0,dist.XI)("addGuest"),removeEmptySearchResponse:(0,dist.XI)("removeEmptySearchResponse"),addEmptySearchResponse:(0,dist.XI)("addEmptySearchResponse"),deactivateCampaign:(0,dist.XI)("deactivateCampaign")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n removeMember: action('removeMember'),\n addMember: action('addMember'),\n removeAdmin: action('removeAdmin'),\n addAdmin: action('addAdmin'),\n removeGuest: action('removeGuest'),\n addGuest: action('addGuest'),\n removeEmptySearchResponse: action('removeEmptySearchResponse'),\n addEmptySearchResponse: action('addEmptySearchResponse'),\n deactivateCampaign: action('deactivateCampaign')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/campaign-admin/campaign-admin.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".campaign__edit-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n}\n.campaign__user-group {\n height: fit-content;\n}\n\n.user-group__heading {\n text-align: center;\n}\n.user-group__user {\n display: inline-block;\n}\n.user-group__remove-button {\n --confirmation-bg-color: var(--wiki-bg-solid);\n float: right;\n}\n.user-group__add-user {\n margin-top: var(--spacer-3);\n width: 100%;\n}\n\n.settings__images {\n display: flex;\n flex-direction: column;\n}\n@media (min-width: 768px) {\n .settings__images {\n flex-direction: row;\n }\n}\n.settings__image-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1;\n}\n.settings__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.settings__icon {\n max-height: 128px;\n max-width: 128px;\n object-fit: contain;\n}\n.settings__data {\n margin-top: var(--spacer-4);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5829],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/app/_services/utils/campaign.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_B:()=>dummyCampaigns,jr:()=>dummyCampaign,mE:()=>dummyStatistics});const dummyCampaigns=[{pk:1,name:"Aldrune",subtitle:"A campaign made by Samuel Day and recorded by Philipp Dörner
through the eyes of Relentless",background_image:"/media/campaign_backgrounds/bg.jpg",is_deactivated:!1,has_audio_recording_permission:!0,icon:"/media/campaign_icons/favicon-128x128.png",default_map:1,default_map_details:{icon:"map",image:"pic05_sMT2d6M.jpg",name:"Aldrune",id:1},duration:{start_date:"2020-04-07T00:00:00.000000Z",last_date:"2023-04-11T00:00:00.000000Z"}},{pk:2,name:"Jōzai Corp",subtitle:"Welcome to Jōzai Corp, please enjoy your employment.",background_image:"/media/campaign_backgrounds/shanghai_city_snlaYDd.jpg",is_deactivated:!1,has_audio_recording_permission:!1,icon:"/media/campaign_icons/icon.png",default_map:void 0,default_map_details:void 0,duration:{start_date:"2022-01-15T00:00:00.000000Z",last_date:"2022-02-19T00:00:00.000000Z"}}],dummyStatistics={character_count:265,item_count:142,location_count:229,creature_count:42,diaryentry_count:101,encounter_count:954,organization_count:46,quest_count:69,quote_count:203,session_audio_count:69,timestamp_count:1121,map_count:7,marker_count:136,spell_count:22,session_count:90,rule_count:17},dummyCampaign={name:"Aldrune",subtitle:"A campaign for testing",pk:1,background_image:"/assets/default_images/audio_pic_default.webp",icon:"https://www.aldrune.com/media/campaign_icons/favicon-128x128.png",default_map:123,default_map_details:{id:123,name:"Default Map",icon:"plus",image:"blub.jpg"},is_deactivated:!1,has_audio_recording_permission:!0,members:[{username:"isofruit",password:"password1",pk:1,api_permissions:["permission1","permission2"],groups:[1,2],group_details:[{name:"group1",pk:1},{name:"group2",pk:2}],is_staff:!0,is_superuser:!1,email:"user1@example.com",is_active:!0},{username:"user2",password:"password2",pk:2,api_permissions:["permission3","permission4"],groups:[1,3],group_details:[{name:"group1",pk:1},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user2@example.com",is_active:!0}],admins:[{username:"admin",password:"adminpassword",pk:3,api_permissions:["permission1","permission2","permission3","permission4"],groups:[1,2,3],group_details:[{name:"group1",pk:1},{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!0,is_superuser:!0,email:"admin@example.com",is_active:!0},{username:"user3",password:"password3",pk:4,api_permissions:["permission1"],groups:[1],group_details:[{name:"group1",pk:1}],is_staff:!1,is_superuser:!1,email:"user3@example.com",is_active:!0}],guests:[{username:"user4",password:"password4",pk:5,api_permissions:["permission2","permission3"],groups:[2,3],group_details:[{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user4@example.com",is_active:!0},{username:"user5",password:"password5",pk:6,api_permissions:["permission4"],groups:[3],group_details:[{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user5@example.com",is_active:!0}],member_group_name:"Members",admin_group_name:"Admins",guest_group_name:"Guests",emptySearchResponses:[{id:1,text:"Empty response 1",campaign:1},{id:2,text:"Empty response 2",campaign:1}]}},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/campaign-admin/campaign-admin.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>campaign_admin_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),campaign_mock_service=__webpack_require__("./src/app/_services/utils/campaign.mock.service.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var campaign_admin_componentngResource=__webpack_require__("./src/design/templates/campaign-admin/campaign-admin.component.scss?ngResource"),campaign_admin_componentngResource_default=__webpack_require__.n(campaign_admin_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),info_circle_tooltip_component=__webpack_require__("./src/design/atoms/info-circle-tooltip/info-circle-tooltip.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let CampaignAdminComponent=class CampaignAdminComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.users=(0,core.input)(),this.removeMember=new core.EventEmitter,this.removeAdmin=new core.EventEmitter,this.removeGuest=new core.EventEmitter,this.addMember=new core.EventEmitter,this.addAdmin=new core.EventEmitter,this.addGuest=new core.EventEmitter,this.removeEmptySearchResponse=new core.EventEmitter,this.addEmptySearchResponse=new core.EventEmitter,this.deactivateCampaign=new core.EventEmitter,this.users$=(0,rxjs_interop.br)(this.users).pipe((0,map.T)((x=>x??[]))),this.showMemberAddForm=!1,this.memberTooltip='Allows creating, reading, updating and deleting articles in this campaign. Also makes the person a possible "author" for diaryentries.',this.memberFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>this.isInGroup(opt,this.campaign.member_group_name)))))),tooltipMessage:"Members typically represent the individual player characters + the GM(s)",warningMessage:"The user you selected is already member of this campaign"})])),this.showAdminAddForm=!1,this.adminTooltip='Allows adding admins, members and guests to a campaign. Does not add the person to the list of possible "authors" for diaryentries.',this.adminFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>this.isInGroup(opt,this.campaign.admin_group_name)))))),tooltipMessage:"Keep in mind that being an admin only represents being the one administering this campaign, not being a member of it!",warningMessage:"The user you selected is already admin of this campaign"})])),this.showGuestAddForm=!1,this.guestTooltip="Allows only reading articles in this campaign.",this.guestFormlyFields=(0,core.computed)((()=>[this.formlyService.buildDisableSelectConfig({key:"pk",labelProp:"username",sortProp:"username",label:"User",options$:this.users$,disabledExpression:selectOptions$=>selectOptions$.pipe((0,map.T)((selectOptions=>selectOptions.map((opt=>{const isAdmin=this.isInGroup(opt,this.campaign.admin_group_name),isMember=this.isInGroup(opt,this.campaign.member_group_name),isGuest=this.isInGroup(opt,this.campaign.guest_group_name);return isAdmin||isMember||isGuest}))))),tooltipMessage:"Keep in mind that there's no point in being a guest when you're already a member or admin.",warningMessage:"The user you selected is already guest of this campaign"})])),this.showResponseForm=!1,this.responseFormlyFields=[this.formlyService.buildInputConfig({key:"text",placeholder:"Text to show for empty searches",maxLength:400,inputKind:"STRING"})]}ngOnChanges(){this.setUrls()}changeState(role,showForm){switch(role){case"member":case"globalmember":this.showMemberAddForm=showForm,this.memberModel={};break;case"admin":this.showAdminAddForm=showForm,this.adminModel={};break;case"guest":case"globalguest":this.showGuestAddForm=showForm,this.guestModel={}}}onAddUser(role,model){const userPk=model.pk,user=this.users()?.find((usr=>usr.pk===userPk));switch(role){case"member":case"globalmember":this.addMember.emit(user);break;case"admin":this.addAdmin.emit(user);break;case"guest":case"globalguest":this.addGuest.emit(user)}this.changeState(role,!1)}toggleResponseAddForm(){this.showResponseForm=!this.showResponseForm,this.showResponseForm&&(this.responseModel={campaign:this.campaign.pk})}onAddResponse(model){this.addEmptySearchResponse.emit(model),this.toggleResponseAddForm()}setUrls(){this.updateUrl=this.routingService.getRoutePath("campaign-update",{campaign:this.campaign.name}),this.homeUrl=this.routingService.getRoutePath("home",{campaign:this.campaign.name})}isInGroup(selectOption,groupName){const groupsOfUser=selectOption.group_details,isMember=groupsOfUser?.some((group=>group.name.toLowerCase()===groupName));return isMember??!1}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={campaign:[{type:core.Input}],serverUrl:[{type:core.Input}],campaignStatistics:[{type:core.Input}],users:[{type:core.Input,args:[{isSignal:!0,alias:"users",required:!1,transform:void 0}]}],removeMember:[{type:core.Output}],removeAdmin:[{type:core.Output}],removeGuest:[{type:core.Output}],addMember:[{type:core.Output}],addAdmin:[{type:core.Output}],addGuest:[{type:core.Output}],removeEmptySearchResponse:[{type:core.Output}],addEmptySearchResponse:[{type:core.Output}],deactivateCampaign:[{type:core.Output}]}}};CampaignAdminComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-campaign-admin",template:'\n
\n
\n \n \n \n
\n\n \x3c!-- Heading --\x3e\n
\n

{{ campaign.name }}

\n
\n\n \x3c!-- Image Fields of Campaign --\x3e\n

\n \n Campaign Settings\n

\n\n \n
\n
\n

Background

\n \n
\n\n
\n

Icon

\n \n
\n
\n\n
\n Default Map: \n
\n {{ campaign.default_map_details?.name }}\n
\n\n Subtitle: \n \n
\n
\n\n \x3c!-- Members & Admins--\x3e\n

\n \n Campaign Members\n

\n\n
\n \n

\n \n

\n\n @for (user of campaign.admins; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showAdminAddForm) {\n \n } @else {\n \n }\n
\n
\n\n \n

\n \n

\n\n @for (user of campaign.members; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showMemberAddForm) {\n \n } @else {\n \n }\n
\n
\n\n \n

\n \n

\n\n @for (user of campaign.guests; track user.pk) {\n
\n {{ user.username }}\n\n \n
\n }\n\n \x3c!-- Form --\x3e\n
\n @if (showGuestAddForm) {\n \n } @else {\n \n }\n
\n
\n
\n\n \x3c!-- Campaign Statistics --\x3e\n

\n \n Campaign Statistics\n

\n\n
\n @for (statistic of campaignStatistics | keyvalue; track $index) {\n
\n
{{ statistic.key }}
\n
{{ statistic.value }}
\n
\n }\n
\n\n \x3c!-- EmptySearchResponses --\x3e\n

\n \n \n

\n\n
\n
\n \n @for (\n emptyResponse of campaign.emptySearchResponses;\n track emptyResponse.id\n ) {\n
\n {{ emptyResponse.text }}\n\n \n
\n }\n\n
\n \x3c!-- Form --\x3e\n\n @if (showResponseForm) {\n \n } @else {\n \n }\n
\n
\n
\n
\n\n \x3c!-- Footer (Move to other Article + Delete Article) --\x3e\n \n
\n
\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n',standalone:!0,imports:[page_container_component.i,button_component.Q,router.Wk,common.KeyValuePipe,icon_component.R,card_component.i,html_text_component.m,info_circle_tooltip_component.$,molecules.Ts,molecules.s2,molecules.D$,common.NgTemplateOutlet],styles:[campaign_admin_componentngResource_default()]})],CampaignAdminComponent);const campaign_admin_stories={title:"DesignSystem/Templates/CampaignAdminComponent",component:CampaignAdminComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_]})],args:{campaign:campaign_mock_service.jr,campaignStatistics:campaign_mock_service.mE,serverUrl:"https://www.aldrune.com"}},Default=(args=>({props:{...args,removeMember:(0,dist.XI)("removeMember"),addMember:(0,dist.XI)("addMember"),removeAdmin:(0,dist.XI)("removeAdmin"),addAdmin:(0,dist.XI)("addAdmin"),removeGuest:(0,dist.XI)("removeGuest"),addGuest:(0,dist.XI)("addGuest"),removeEmptySearchResponse:(0,dist.XI)("removeEmptySearchResponse"),addEmptySearchResponse:(0,dist.XI)("addEmptySearchResponse"),deactivateCampaign:(0,dist.XI)("deactivateCampaign")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n removeMember: action('removeMember'),\n addMember: action('addMember'),\n removeAdmin: action('removeAdmin'),\n addAdmin: action('addAdmin'),\n removeGuest: action('removeGuest'),\n addGuest: action('addGuest'),\n removeEmptySearchResponse: action('removeEmptySearchResponse'),\n addEmptySearchResponse: action('addEmptySearchResponse'),\n deactivateCampaign: action('deactivateCampaign')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/campaign-admin/campaign-admin.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".campaign__edit-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n}\n.campaign__user-group {\n height: fit-content;\n}\n\n.user-group__heading {\n text-align: center;\n}\n.user-group__user {\n display: inline-block;\n}\n.user-group__remove-button {\n --confirmation-bg-color: var(--wiki-bg-solid);\n float: right;\n}\n.user-group__add-user {\n margin-top: var(--spacer-3);\n width: 100%;\n}\n\n.settings__images {\n display: flex;\n flex-direction: column;\n}\n@media (min-width: 768px) {\n .settings__images {\n flex-direction: row;\n }\n}\n.settings__image-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1;\n}\n.settings__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.settings__icon {\n max-height: 128px;\n max-width: 128px;\n object-fit: contain;\n}\n.settings__data {\n margin-top: var(--spacer-4);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-character-character-stories.5679a2fc.iframe.bundle.js b/design-templates-character-character-stories.f4a36a84.iframe.bundle.js similarity index 92% rename from design-templates-character-character-stories.5679a2fc.iframe.bundle.js rename to design-templates-character-character-stories.f4a36a84.iframe.bundle.js index a945f6fb0..96042e77e 100644 --- a/design-templates-character-character-stories.5679a2fc.iframe.bundle.js +++ b/design-templates-character-character-stories.f4a36a84.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[9635],{"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/editable-text/editable-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>EditableTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var editable_text_componentngResource=__webpack_require__("./src/design/organisms/editable-text/editable-text.component.scss?ngResource"),editable_text_componentngResource_default=__webpack_require__.n(editable_text_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),tinymce_tinymce_angular=__webpack_require__("./node_modules/@tinymce/tinymce-angular/fesm2020/tinymce-tinymce-angular.mjs"),alert_component=__webpack_require__("./src/design/atoms/alert/alert.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),formly_editor_field_constants=__webpack_require__("./src/design/organisms/formly-editor-field/formly-editor-field.constants.ts");let EditableTextComponent=class EditableTextComponent{constructor(){this.text=core.input.required(),this.placeholder=core.input.required(),this.canUpdate=core.input.required(),this.serverModel=(0,core.input)(),this.heading=(0,core.input)(),this.update=(0,core.output)(),this.settings=formly_editor_field_constants.O,this.state=(0,core.signal)("DISPLAY"),this.textModel="",this.editButtonText=(0,core.computed)((()=>{switch(this.state()){case"DISPLAY":return"edit";case"UPDATE":case"OUTDATED_UPDATE":return"cancel"}})),this.editorField=(0,core.viewChild)("editor"),(0,core.effect)((()=>{null!=this.serverModel()&&this.state.set("OUTDATED_UPDATE")}),{allowSignalWrites:!0})}toggleEdit(){"UPDATE"===this.state()?this.cancelEdit():this.startEdit()}startEdit(){this.state.set("UPDATE"),this.textModel=this.text(),this.focusField()}finishEdit(){this.update.emit(this.textModel),this.state.set("DISPLAY")}cancelEdit(){this.textModel=this.text(),this.state.set("DISPLAY")}focusField(){setTimeout((()=>this.editorField()._editor.focus()),100)}static{this.ctorParameters=()=>[]}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}],placeholder:[{type:core.Input,args:[{isSignal:!0,alias:"placeholder",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],heading:[{type:core.Input,args:[{isSignal:!0,alias:"heading",required:!1,transform:void 0}]}],update:[{type:core.Output,args:["update"]}],editorField:[{type:core.ViewChild,args:["editor",{isSignal:!0}]}]}}};EditableTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-editable-text",standalone:!0,imports:[common.NgTemplateOutlet,html_text_component.m,icon_component.R,tinymce_tinymce_angular.xn,fesm2022_forms.YN,alert_component.C,separator_component.F,button_component.Q],template:'\x3c!-- Heading --\x3e\n@let headingVal = heading();\n@if (headingVal) {\n

\n \n @if (canUpdate()) {\n \n }\n

\n}\n\n\x3c!-- Text Body --\x3e\n@if (canUpdate()) {\n \n \n \n \n \n\n \x3c!-- Form Buttons --\x3e\n \n \n \n \x3c!-- Informating heading --\x3e\n \n \n While you were updating this article, somebody else went ahead and updated\n it as well. Please include their changes in your update before submitting.\n \n\n \x3c!-- Textfield-Form --\x3e\n
\n \x3c!-- Comparison text --\x3e\n
\n

Server Version

\n \n
\n\n \n\n \x3c!-- Actual edit form --\x3e\n
\n

Your Version

\n\n \n\n \x3c!-- Form Buttons --\x3e\n \n \n
\n \n} @else {\n \n}\n\n\n
\n \n \n
\n
\n\n\n \n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[editable_text_componentngResource_default()]})],EditableTextComponent)},"./src/design/organisms/encounter-accordion/encounter-accordion.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>EncounterAccordionComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_accordion_componentngResource=__webpack_require__("./src/design/organisms/encounter-accordion/encounter-accordion.component.scss?ngResource"),encounter_accordion_componentngResource_default=__webpack_require__.n(encounter_accordion_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let EncounterAccordionComponent=class EncounterAccordionComponent{constructor(){this.encounters=core.input.required(),this.campaignLocations=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter}static{this.propDecorators={encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],campaignLocations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignLocations",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}]}}};EncounterAccordionComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter-accordion",template:'
\n
\n @for (encounter of encounters(); track encounter.pk) {\n
\n
\n \n
\n\n
\n
\n \n
\n
\n
\n }\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[ng_bootstrap._f,encounter_component.L],styles:[encounter_accordion_componentngResource_default()]})],EncounterAccordionComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/design/organisms/quote-field/quote-field.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>QuoteFieldComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var quote_field_componentngResource=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.scss?ngResource"),quote_field_componentngResource_default=__webpack_require__.n(quote_field_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),environment=__webpack_require__("./src/environments/environment.ts");let ArticleService=class ArticleService{constructor(routingService,http){this.routingService=routingService,this.http=http,this.apiUrl=environment.c.apiUrl,this.recentlyUpdatedUrl=`${this.apiUrl}/recentupdates`,this.searchUrl=`${this.apiUrl}/search`}getRecentlyUpdatedArticle(campaign,pageNumber){return null==pageNumber&&(pageNumber=0),this.http.get(`${this.recentlyUpdatedUrl}/${campaign}/${pageNumber}`).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getGlobalSearchArticle(searchString){return this.http.get(`${this.searchUrl}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}getCampaignSearchArticle(campaign,searchString){return this.http.get(`${this.searchUrl}/${campaign}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}searchArticlesKind(campaign,searchTerm,articleKind){return this.http.get(`${this.searchUrl}/${campaign}/${articleKind}/${searchTerm}`).pipe((0,map.T)((response=>response.map((item=>this.parseOverviewEntity(item))))))}readArticle(articleId,articleKind){return this.http.get(`${this.searchUrl}/single/${articleKind}/${articleId}`).pipe((0,map.T)((resp=>this.parseOverviewEntity(resp))))}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const articleType=data.article_type,params={campaign:data.campaign_details.name};let routeName="";switch(articleType){case"character":params.name=data.name,routeName="character";break;case"creature":params.name=data.name,routeName="creature";break;case"diaryentry":params.session_number=data.session_details.session_number,params.isMainSession=data.session_details.is_main_session_int,params.authorName=data.author_details.name,routeName="diaryentry";break;case"encounter":params.session_number=data.diaryentry_details.session_number,params.isMainSession=data.diaryentry_details.is_main_session,params.authorName=data.diaryentry_details.author_name,params.encounterTitle=data.title,routeName="diaryentry-encounter";break;case"item":params.name=data.name,routeName="item";break;case"location":params.name=data.name,params.parent_name=data.parent_location_details.name,routeName="location";break;case"organization":params.name=data.name,routeName="organization";break;case"quest":params.name=data.name,routeName="quest";break;case"sessionaudio":params.isMainSession=data.session_details.is_main_session_int,params.sessionNumber=data.session_details.session_number,routeName="sessionaudio";break;case"session":routeName="sessions";break;case"map":case"mapmarker":params.name=data.name,routeName="map";break;case"timestamp":routeName="default-map";break;case"spell":params.name=data.name,routeName="spell";break;case"rules":params.name=data.name,routeName="rule"}return()=>this.routingService.getRoutePath(routeName,params)}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};ArticleService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ArticleService);var button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),quote_component=__webpack_require__("./src/design/organisms/quote/quote.component.ts");let QuoteFieldComponent=class QuoteFieldComponent{constructor(routingService,formlyService,articleService){this.routingService=routingService,this.formlyService=formlyService,this.articleService=articleService,this.quote=core.input.required(),this.character=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=core.input.required(),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.encounters=core.input.required(),this.sessions=core.input.required(),this.quoteControlsBlacklist=(0,core.input)([]),this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.sessions$=(0,rxjs_interop.br)(this.sessions).pipe((0,take.s)(1)),this.encounters$=(0,rxjs_interop.br)(this.encounters).pipe((0,take.s)(1)),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>this.parseConnection(this.quote()?.connections??[]))),this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.isLoadingQuote=(0,core.signal)(!1),this.quoteOverviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("quote-overview",{name:this.character().name,campaign:this.campaignName}))),this.userModel=(0,core.signal)({}),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"description",required:!0,inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"session",required:!0,campaign:this.campaignName(),options$:this.sessions$,labelProp:"name_full",valueProp:"pk"}),this.formlyService.buildAutocompleteConfig({key:"encounter",required:!1,loadOptions:searchTerm=>this.articleService.searchArticlesKind(this.campaignName(),searchTerm,"encounter"),optionKeyProp:"pk",optionLabelProp:"name",optionValueProp:"pk",initialValue$:this.quote()?.encounter?this.articleService.readArticle(this.quote()?.encounter,"encounter"):void 0}),this.formlyService.buildEditorConfig({key:"quote",required:!0})])),(0,rxjs_interop.br)(this.quote).pipe((0,rxjs_interop.pQ)()).subscribe((()=>this.isLoadingQuote.set(!1)))}onSubmit(event){switch(this.state()){case"UPDATE":case"UPDATE_OUTDATED":this.quoteUpdate.emit(event);break;case"CREATE":this.quoteCreate.emit(event);break;default:throw new Error(`QuoteField - Submitted form while in state '${this.state()}', which is not possible.`)}this.changeState("DISPLAY",{})}onDelete(){this.quoteDelete.emit(this.quote()),this.changeState("DISPLAY",{})}onCancel(){this.changeState("DISPLAY",{})}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){if(!this.canCreate()||!this.quote)return;const newConnection={quote:this.quote()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}getNextRandomQuote(){this.isLoadingQuote.set(!0),this.refreshQuote.emit()}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$},{type:ArticleService}]}static{this.propDecorators={quote:[{type:core.Input,args:[{isSignal:!0,alias:"quote",required:!0,transform:void 0}]}],character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],quoteControlsBlacklist:[{type:core.Input,args:[{isSignal:!0,alias:"quoteControlsBlacklist",required:!1,transform:void 0}]}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}]}}};QuoteFieldComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-quote-field",template:'@switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n

Updating Quote {{ quote()?.pk }}

\n\n @if (canUpdate() && state() === "UPDATE") {\n \n }\n\n @if (state() === "UPDATE_OUTDATED") {\n \n }\n
\n
\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n
\n Create Quote for {{ character().name }}\n
\n\n \x3c!-- Form --\x3e\n \n
\n
\n\n\x3c!-- Quote Delete "Form" --\x3e\n\n \n
Delete this quote?
\n\n
\n \n\n
\n @if (quote()?.description) {\n \n }\n\n @if (!quote()?.description) {\n - {{ character().name }}\n }\n
\n
\n\n
\n \n \n
\n
\n
\n',standalone:!0,imports:[common.NgTemplateOutlet,quote_component.w,card_component.i,molecules.s2,molecules.zx,html_text_component.m,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[quote_field_componentngResource_default()]})],QuoteFieldComponent)},"./src/design/templates/character/character.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoItems:()=>NoItems,NoPermission:()=>NoPermission,NoQuote:()=>NoQuote,__namedExportsOrder:()=>__namedExportsOrder,default:()=>character_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var character_componentngResource=__webpack_require__("./src/design/templates/character/character.component.scss?ngResource"),character_componentngResource_default=__webpack_require__.n(character_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),info_circle_tooltip_component=__webpack_require__("./src/design/atoms/info-circle-tooltip/info-circle-tooltip.component.ts"),article_footer_component=__webpack_require__("./src/design/molecules/article-footer/article-footer.component.ts"),badge_list_component=__webpack_require__("./src/design/molecules/badge-list/badge-list.component.ts"),list_component=__webpack_require__("./src/design/molecules/list/list.component.ts"),editable_text_component=__webpack_require__("./src/design/organisms/editable-text/editable-text.component.ts"),encounter_accordion_component=__webpack_require__("./src/design/organisms/encounter-accordion/encounter-accordion.component.ts"),image_carousel_card_component=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts"),quote_field_component=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.ts");let CharacterComponent=class CharacterComponent{constructor(routingService){this.routingService=routingService,this.character=core.input.required(),this.characterServerModel=(0,core.input)(),this.characterQuote=(0,core.input)(),this.campaignNPCCharacters=core.input.required(),this.campaignCharacters=core.input.required(),this.campaignOrganizations=core.input.required(),this.campaignLocations=core.input.required(),this.serverUrl=core.input.required(),this.quoteServerModel=(0,core.input)(),this.imageServerModel=(0,core.input)(),this.sessions=core.input.required(),this.encounters=core.input.required(),this.encounterServerModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.quoteConnectionDelete=new core.EventEmitter,this.quoteConnectionCreate=new core.EventEmitter,this.encounterConnectionDelete=new core.EventEmitter,this.encounterConnectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.characterDelete=new core.EventEmitter,this.characterUpdate=(0,core.output)(),this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.organizationMembershipCreate=new core.EventEmitter,this.organizationMembershipDelete=new core.EventEmitter,this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.createUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-update",{campaign:this.campaignName(),name:this.character().name}))),this.updateUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-update",{campaign:this.campaignName(),name:this.character().name}))),this.overviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-overview",{campaign:this.campaignName()}))),this.locationUrl=(0,core.computed)((()=>{const locationName=this.character().current_location_details?.name,parentLocationName=this.character().current_location_details?.parent_location;return this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:this.campaignName()})})),this.organizationMemberships=(0,core.computed)((()=>this.character().organizations?.map((org=>this.toBadgeListEntry(org)))??[])),this.joinableOrganizations=(0,core.computed)((()=>{const joinedOrgIds=this.organizationMemberships().map((membership=>membership.badgeValue.organization_id));return this.campaignOrganizations().filter((org=>org.pk&&!joinedOrgIds.includes(org.pk)))})),this.characterItems=(0,core.computed)((()=>this.character().items?.map((item=>this.toListEntry(item)))??[])),this.playerClasses=(0,core.computed)((()=>this.character().player_class_connections?.map((con=>con.player_class_details?.name)).join(", ")))}routeToItemCreate(){this.routingService.routeToPath("item-character-create",{character_name:this.character.name,campaign:this.campaignName()})}onMembershipCreate(org){const newMembership={name:org.name,organization_id:org.pk,role:"member"};this.organizationMembershipCreate.emit(newMembership)}onDescriptionUpdate(description){const characterToUpate=void 0!==this.characterServerModel()?this.characterServerModel():this.character();characterToUpate&&this.characterUpdate.emit({...characterToUpate,description})}toBadgeListEntry(org){return{badgeValue:org,text:org.name,link:this.routingService.getRoutePath("organization",{name:org.name,campaign:this.campaignName()})}}toListEntry(item){return{label:item.name,link:this.routingService.getRoutePath("item",{campaign:this.campaignName(),name:item.name})}}static{this.ctorParameters=()=>[{type:routing_service.O}]}static{this.propDecorators={character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],characterServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"characterServerModel",required:!1,transform:void 0}]}],characterQuote:[{type:core.Input,args:[{isSignal:!0,alias:"characterQuote",required:!1,transform:void 0}]}],campaignNPCCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignNPCCharacters",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],campaignOrganizations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignOrganizations",required:!0,transform:void 0}]}],campaignLocations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignLocations",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],quoteServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"quoteServerModel",required:!1,transform:void 0}]}],imageServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"imageServerModel",required:!1,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],encounterServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"encounterServerModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],quoteConnectionDelete:[{type:core.Output}],quoteConnectionCreate:[{type:core.Output}],encounterConnectionDelete:[{type:core.Output}],encounterConnectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}],characterDelete:[{type:core.Output}],characterUpdate:[{type:core.Output,args:["characterUpdate"]}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],organizationMembershipCreate:[{type:core.Output}],organizationMembershipDelete:[{type:core.Output}]}}};CharacterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-character",template:'\n
\n @if (canUpdate()) {\n
\n \n \n \n
\n }\n\n \x3c!-- Heading --\x3e\n
\n

\n @let title = character().title;\n @if (title) {\n {{ title }} -\n }\n {{ character().name }}\n @if (!character().alive) {\n (†)\n }\n

\n\n
\n \x3c!-- Organization --\x3e\n
\n @if (character().gender !== "Other") {\n {{ character().gender }}\n }\n {{ character().race }}\n {{ playerClasses() }}\n
\n\n \x3c!-- Current Location --\x3e\n @let currentLocationDetails = character().current_location_details;\n @if (currentLocationDetails) {\n
\n Last known location:\n \n {{ currentLocationDetails.name }} \n \n
\n }\n
\n
\n\n
\n \x3c!-- Image Gallery --\x3e\n \n
\n\n \x3c!-- Quote --\x3e\n
\n \n
\n\n
\n \n
\n\n \n\n
\n \n
\n\n \x3c!-- PCs don\'t have encounters --\x3e\n @if (!character().player_character) {\n
\n

\n \n

\n \n
\n }\n\n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,image_carousel_card_component.r,quote_field_component.k,badge_list_component.p,editable_text_component.T,list_component.s,info_circle_tooltip_component.$,encounter_accordion_component.x,article_footer_component.D],styles:[character_componentngResource_default()]})],CharacterComponent);const dummyCharacter={getAbsoluteRouterUrl:()=>"character/83",pk:83,player_character:!1,player_class_connections:[{pk:12,player_class:11,character:83,player_class_details:{name:"Sorcerer",pk:11,update_datetime:"2021-04-20T14:32:11.740394Z"}},{pk:13,player_class:12,character:83,player_class_details:{name:"Warlock",pk:12,update_datetime:"2021-04-20T14:32:13.937586Z"}}],alive:!1,name:"Suleman",gender:"Male",race:"Tiefling",title:"Wizard of the past",description:"

A purple-skinned, golden-eyed Tiefling that managed to have many a spirit as his servant and commanded unimaginable power. Tended to wear simple clothing, but a lot of golden jewelry.

\r\n

Among his most powerful servants were the primordial four and the unholy trinity, which he later sealed away.

",current_location:void 0,current_location_details:void 0,creation_datetime:"2020-06-10T12:00:00.000000Z",update_datetime:"2022-02-13T13:37:28.357483Z",campaign_id:1,campaign_details:{name:"Aldrune",id:1},organizations:[{pk:138,organization_id:54,role:"Member",name:"The Party"},{pk:146,organization_id:3,role:"Paladin 3rd class",name:"Church of Morrigan"}],items:[],encounters:[{pk:684,description:"

He appears as majestic as you'd have thought somebody approaching god-like powers would be. He is clad in gold, golden caps on his horns, dangling finery, a beautiful lavender robe that exerts extraordinary magical pressure that is almost uncomfortable, forcing the room to be filled with...something.

\n

We barely have enough time to take all of this in, before Rhiannon's lamp rattles. Barbatos does not just leave, he bursts forth, ready to inflict murder and pain on this copy of Suleman to the very best of his ability.

\n

In the altercation that ensures, given that Fraich and Bedivere are still pretty exhausted and hurt, it is mostly us and Forallian that approach this...altercation between Suleman and Barbatos.

\n

The first and second salvo of hits that is exchanged is already frightening enough, the two trading blows with powerful spells before Barbatos cuts into Suleman with speed and ferocity that I have never seen anyone wield a sword with. Suleman summons several items to himself instead and responds with a gigantic beam of light that cuts straight through Barbatos, nearly severing a wing of his. That likely would have evaporated anyone less powerful.

\n

Outside of that, we do our best to get him to see reason. Fen, shouting with an enhanced voice thanks to me, gets through enough to him to make him falter for a moment. Rhi contemplates for a moment whether she should in, but holds back when Barbatos shouts at her pleadingly to not take this moment of revenge from him. Neither Caitriona's shouting at him, nor my snide remarks picking at his arrogance really have an effect on him. All it does is reveal he's fully aware this is a copy, but wishes to kill it anyway for it is his only chance at some sort of token revenge that he can have. It takes Caitriona stepping in between them, willing to risk her life as he is preparing to use his dark star ability, to finally get him to stop.

\n

Gritting his teeth, still displaying barely restrained fury and range, he disappears. The danger is gone, for the moment.

",encounterConnections:[{pk:729,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:80,character_details:{name:"Barbatos",name_full:"Destroyer of the first gate - Barbatos",pk:80}},{pk:730,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}},{pk:731,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:99,character_details:{name:"Fraich",name_full:"Fraich",pk:99}},{pk:732,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:154,character_details:{name:"Bedivere Whiteridge",name_full:"Dragonknight of hope - Bedivere Whiteridge",pk:154}}],name:"Main Session 53 - A last measure of revenge",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"A last measure of revenge",creation_datetime:"2021-09-18T10:25:53.866269Z",update_datetime:"2021-09-18T10:34:27.917004Z",diaryentry:73,order_index:20,campaign_details:{name:"Aldrune",id:1}},{pk:685,description:"

With that somewhat tense situation over we make our introductions. During this, Caitriona shakes Suleman's hands and proceeds to somehow give him a very weird impression of blushing puppy eyes that I've never seen her do before... ever. Like he's the most amazing person she's ever seen. It's quite unsettling to be honest. 

\n

That is until Suleman points out Rhiannon and launches into a lecture over how it is dangerous and nonsensical to be carrying Barbatos lamp. Which paints him as a bit of a hypocrite given he made it, until he specifies that it is nonsensical for her to be carrying Barbatos' lamp as only he himself has the capacity to do so. Which paints him as a massive arrogant douchenozzle, which isn't much better. 

\n

On my request he confirms that he locked the lamps away because they became too powerful, not believing anyone else ever could be capable enough to properly wield them. 

\n

Some banter between us later, Rhi asks him how he died, which he becomes a smidge cagey about. Questions on if he knows Yaga or Morghana trigger no memories of his. Does trigger a dig at our expense that our clothes are still out of date, roughly 12000 years after his death.

",encounterConnections:[{pk:733,encounter:685,encounter_details:{name:"Main Session 53 - Introductions and Lectures",name_full:"Main Session 53 - Introductions and Lectures",pk:685},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Introductions and Lectures",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Introductions and Lectures",creation_datetime:"2021-09-18T10:35:37.111121Z",update_datetime:"2021-09-19T08:59:03.295660Z",diaryentry:73,order_index:30,campaign_details:{name:"Aldrune",id:1}},{pk:686,description:'

With that out of the way, we get to the heart of the issue that we can debate with him, Morgana and her desire for the temple of time. Talking about it gets Suleman somewhat excited from the start, declaring it his finest work, which intensifies Caitriona\'s puppy stare into one filled with awe and amazement at how somebody so incredible can exist right in front of her.

\n

On my question on what to expect coming out of there, he reveals that the main task of the temple  is to record all knowledge of things that ever happened. It does not house any particular artifacts, just knowledge. Which can be dangerous in itself, but more in what follows after Morgana acquires it, not immediately in something she can destroy with it. It also means that chances are that temple has records of where the lance is... and that we currently own it... and if Morgana finds that one out, well boy are we fucked.

\n

Fen seems to get an epiphany at that, before smugly declaring that "his" is better. Which apparently is his ability to pull knowledge out of nowhere that he should have no way of accessing. His... thumb apparently gives him knowledge of all things past, present and future. A dick measuring contest ensues between him and Suleman on whose ability to acquire knowledge is "actually" better.

',encounterConnections:[{pk:734,encounter:686,encounter_details:{name:"Main Session 53 - Getting to the heart of the issue",name_full:"Main Session 53 - Getting to the heart of the issue",pk:686},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Getting to the heart of the issue",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Getting to the heart of the issue",creation_datetime:"2021-09-19T08:27:32.535679Z",update_datetime:"2021-09-19T08:47:49.405613Z",diaryentry:73,order_index:40,campaign_details:{name:"Aldrune",id:1}},{pk:687,description:"

Once that knowledge-contest is over, Suleman places himself in a freshly summoned comfy chair and I ask him for advice on the Agari situation. That is, after he gives me advice on how to stop the horn fraying which has been a serious pain in the keister since I've been born. Coconut oil is supposed to help there... whatever coconuts are. Useful information though.

\n

Anyway, I inform him of a possible confrontation between Agari and Barbatos, during which he remarks that Agari might have enough power from Barbatos' sins to destroy his lamp. His advice on how to avoid that: Anti Magic zone on whoever's sin Agari wishes to unleash with her \"Cat's call\" ability.

",encounterConnections:[{pk:735,encounter:687,encounter_details:{name:"Main Session 53 - Advice against Agari",name_full:"Main Session 53 - Advice against Agari",pk:687},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Advice against Agari",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Advice against Agari",creation_datetime:"2021-09-19T08:57:41.422952Z",update_datetime:"2021-09-19T08:57:41.423061Z",diaryentry:73,order_index:50,campaign_details:{name:"Aldrune",id:1}},{pk:688,description:"

The Agari question is followed by Rhiannon asking for Suleman's reason to destroy Babylon.

\n

Hesitantly, Suleman says that he was tricked by Barbatos, being made to believe that the people of Babylon were attempting a physical construction of Ptolemy's model of the universe. This could've allowed them to get to a universe not controlled by... \"this\" universe. A way to escape the cycle of rising and falling civilizations, which the universe squashes before the civilization learns \"too much\". He was aware that if that happened, it would likely have lead to the eradication of everything in existence... somehow. Suleman states he believed Barbatos because he had never felt appreciated by this place anyway, only experienced jealousy and more.

\n

It was only when he was walking among the ruins of his people that he realized that Barbatos had only been pushing him to see how far he could take it. Suleman notes he is uncertain as to why Barbatos would do this, but guesses he might've found the resemblance to hell distasteful. He does acknowledge that it could've been an honest mistake of Barbatos', who might've truly believed that this was the case. But even if that were the case, Barbatos' lack of remorse following made it certain to Suleman that Barbatos needed to be sealed away.

\n

He also remarks that he and Barbatos had their disagreements about the temple of time, which those were are unclear.

\n

As to how he was so certain that Barbatos had tricked him, he just denotes that he realized such while walking among the piles of corpses his destruction caused, seeing it was all for naught.

\n

On Fen's question of the purpose of the tower, Suleman elaborates that the tower was a water-reclamation center initially, then became a gathering place for people which lead to the extension of the surrounding hanging gardens, making it a popular place for rich folk to celebrate in. It also doubled as observatory. At that description, Fen asks him for schematics as he wishes to build something similar, which Suleman agrees on doing.

\n

What he does not agree to is tell Rhi where Babylon used to be, as he does not wish for us to disturb the peace of the place or get anywhere even remotely close to where his body might be. As for the temple of time, that temple exists in some kind of border to nothingness, so that's apparently accessible from anywhere you want. 

",encounterConnections:[{pk:736,encounter:688,encounter_details:{name:"Main Session 53 - Why Suleman destroyed Babylon",name_full:"Main Session 53 - Why Suleman destroyed Babylon",pk:688},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Why Suleman destroyed Babylon",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Why Suleman destroyed Babylon",creation_datetime:"2021-09-19T09:35:39.279083Z",update_datetime:"2021-09-19T09:53:49.827757Z",diaryentry:73,order_index:60,campaign_details:{name:"Aldrune",id:1}},{pk:689,description:"

Eager to distract himself from his thoughts of Babylon, he accepts Murtagh's question, who ask him about the squid people we encountered.

\n

Suleman is a bit stumped at first, but does recognize them as a species of parasites that evolved since he last saw them. Seemingly satisfied with that, Murtagh nods to himself.

\n

After that I ask for why Barbatos isn't just being released back into the hells to have him everywhere but here. The reason is quite self evident. The lamp manages to contain some of his power, leaving him still with a considerable amount of it. The issue is, that he's too powerful now, due to the dark star. To elaborate on that, he tells a bit of a story. There used to be originally a group of protectors, divine beings called \"angels\". The one chief among them, Lucifer, wanted to influence the universe more than just protecting it. He became the first devil and was given \"the compulsion\", an innate desire to fight chaos. Suleman, after capturing the Djinn and the Trine captured Lucifer and... turned him into a staff. When Lucifer fell from his position as an angel and became a devil, he left behind \"the dark star\", a relic now in Barbatos' possession. So it is not like releasing him back would get him forced under the rule of a more powerful archdevil. He would likely be more powerful than some, if not most of them. And with that power would come the ability to act, potentially in revenge against Suleman. Not necessarily enough to overcome the compulsion, but there are ways to leave the tree intact and still destroy everything Suleman ever created. This may not be true for Agari and Lairann, but they are dogmatically loyal to Barbatos and thus would likely work to free Barbatos if released themselves. And weakening them isn't really a possibility.

\n

At my loudly contemplating that last bit, Rhi keeps squinting harshly at me, but I just shrug it off. If she actually has a problem she'd speak up.

\n

On Cait's question why one would prefer Ahjuu's lamp over Barbatos', to which Suleman confirms that Barbatos is the most powerful, but they all have their own fields of excellence. He also points out that both a Djin and a Fiend-lamp is needed for access.

",encounterConnections:[{pk:737,encounter:689,encounter_details:{name:"Main Session 53 - Knowledge of Illithids and releasing fiends",name_full:"Main Session 53 - Knowledge of Illithids and releasing fiends",pk:689},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Knowledge of Illithids and releasing fiends",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Knowledge of Illithids and releasing fiends",creation_datetime:"2021-09-19T09:54:02.602675Z",update_datetime:"2021-11-29T18:52:55.892937Z",diaryentry:73,order_index:70,campaign_details:{name:"Aldrune",id:1}},{pk:690,description:"

As we chat about the possibility of releasing Barbatos, Fen tells Suleman of the daggers and how they piggyback off the universe's mechanism to evaluate something  as an incarnation of a concept. More specifically, he asks what knowledge that could do something like this would seek from the temple.

\n

That question, for the first time, is strange enough that not even Suleman has a direct answer to it. Fen goes on to reveal that he is aware somebody tried to make an incarnation of him as a concept to get access to his... knowledge ability. He assumes the temple of time is their backup plan, now that this failed. Suleman muses that they are trying this on people that almost achieved godhood as those that are gods likely wouldn't be available through this mechanism.

\n

At that Caitriona hands him the fire-dagger she took from Fen all those months ago. Suleman looks at it for a couple seconds before noting it to be the flame of a dragon, taken from it and carved with runes to simulate ancestral memory. It effectively reaches back in time to find somebody that best embodies the concept that was ripped from the dragon. As no thing can exist twice at once, this also means that the dragon no longer can breathe fire.

\n

He assumes that if the dragon were exposed to flame it would bring forth a being most aligned with a dragon's fire, aka primordial flame. Which... explains the dead, chained up, adult/ancient dragon Fen mentioned seeing on his trip through Galway, where he also got the daggers from.

\n

As for the daggers themselves, he notes that mixing in a humanoid's blood would dilute this effect and the draconic heritage, which conjures forth images of Astaroth almost immediately. That's about the time he notices Bedivere who was trying his best to fade into the background. He points out that this conjuring up made the person suddenly gain draconic ancestroy, but not turn they themselves draconic. Cleansing water effects like those in the bath would remove this.

\n

Suleman also notes that draconic heritage tends to be able to extract feelings and memories also from blood. So if somebody were to, say, create one of these daggers from a dragon that had a vendetta, and the person transforming the dagger cut themselves with had a similar vendetta, that would have a \"much closer and more profound\" effect... of some sorts. That effect likely being that somebody stronger that embodies the concept better would be summoned. Images of Astaroth don't just come to mind at this point, they start rampaging through the territory of other thoughts and slicing them into pieces.

",encounterConnections:[{pk:738,encounter:690,encounter_details:{name:"Main Session 53 - Questions about daggers",name_full:"Main Session 53 - Questions about daggers",pk:690},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Questions about daggers",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Questions about daggers",creation_datetime:"2021-09-19T14:50:47.493037Z",update_datetime:"2021-09-20T09:39:15.642340Z",diaryentry:73,order_index:80,campaign_details:{name:"Aldrune",id:1}},{pk:691,description:"

At that point Caitriona theorizes about mixing the creature that would be created by blood intermingling and how maybe a blood curse could carry over or not. After exasperating Suleman a bit and him drinking some of her blood he correctly identifies her \"curse\" and identifies her as being horribly irreversibly cursed.

\n

Before they can continue on the dagger matter, Suleman can't help but get into the debate on how permanently Caitriona is intertwined with somebody that is really trying to piss off the universe. Which sounds accurate, so I just nod along. Cait reveals that she swapped Fate's with somebody, which it appears is the thing that is really angering the universe. Not necessarily Caitriona turning into a beast of blackened blood herself, as that appears to be an honest error and shit happens. But her purposeful swapping of fate and thus intentional messing with things is what really grinds the universe's gears. Which never ends well, as Suleman speaks from experience and reveals he was attacked and mashed into paste by a construct made of gears and anti-magic.

\n

Cait then theorizes on what would happen if one of these two fates were to end, aka she killed Fillaih as she'd had on her agenda for ages now. Which turns out to depend on the intent of the person doing the killing, according to Fillaih. If the killer wanted to make sure Fillaih's fate was never fulfilled, that would make things worse. But if the intent was to restore balance/appease, that would improve things. This is utterly insane and arbitrary, which Suleman acknowledges.

",encounterConnections:[{pk:739,encounter:691,encounter_details:{name:"Main Session 53 - Caitriona's Curse",name_full:"Main Session 53 - Caitriona's Curse",pk:691},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Caitriona's Curse",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Caitriona's Curse",creation_datetime:"2021-09-20T09:39:51.274721Z",update_datetime:"2021-09-20T09:48:43.851322Z",diaryentry:73,order_index:90,campaign_details:{name:"Aldrune",id:1}},{pk:693,description:"

Wanting to take another chance, Rhi asks Suleman what Barbatos would want from the temple of time. Sheepishly, Suleman tells her that Barbatos never saw it with his own eyes. He had made Barbatos blind while constructing the temple, as a punishment for tricking him into destroying Babylon. When Rhi complains about that being unfair, Suleman exasperatedly points at the uncountable death the destruction of Babylon caused, stating he only wanted to use Barbatos to do one good thing and then lock him away forever... which failed, given Rhi having the lamp now.

\n

At Fen pointing it out that the lock was flawed, Suleman responds he left Frank with him and that he thought that would be enough. Which it obviously wasn't. This confuses Fen massively, as based on our introductions to Frank he seemed to quickly make his name up on the spot. At our mentioning that Frank feels like he has been downgraded since being turned into a cave, Suleman exasperatedly points out he's the largest thing in the mountain range, how could he be disappointed?! Pointing out his interest in becoming a caterpillar for the metamorphosis Suleman puts his face in his hands, muttering something about addiction to changing.

\n

At Cait pointing out that Rhi promised Frank a new body and how having a wish really would help with that, Suleman vehemently denies our request. With words he may only be declaring us \"fuckwitts\", but the subtext about us being irresponsible idiots with this kind of stuff could be counted in volumes. He does offer another spell instead, to which I ask for teleport, which he empowers by making it subtle, thus making it impossible to counter.

",encounterConnections:[{pk:740,encounter:693,encounter_details:{name:"Main Session 53 - What Barbatos would want",name_full:"Main Session 53 - What Barbatos would want",pk:693},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - What Barbatos would want",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"What Barbatos would want",creation_datetime:"2021-09-20T10:07:13.232541Z",update_datetime:"2021-09-20T10:11:28.467109Z",diaryentry:73,order_index:110,campaign_details:{name:"Aldrune",id:1}},{pk:695,description:"

It's at this point a question goes through my mind regarding my own ancestry. I explain Suleman my own story, how I've been told I was payment for a contract an ancestor of mine made, how my mother made me get a tattoo to protect me and how the influence of a god supposedly saved me.

\n

Suleman points out that what we're talking about, the magnitude of the contract, is on the order of a volcano erupting, a tsunami, something big. A rune, in comparison, might be the purest form of order, a shape now having meaning, and that would indeed protect chaos or things corrupting order. However, it is an umbrella compared to the catastrophe awaiting me. The influence of a god whoever is something else entirely. That could protect, being more of a wall or a conservatory.

\n

When I tell him why I had doubts, given that this was a contract, he notes that it depends on who the contract was with. Since mine was not with a devil but with a hag, things change, particularly since these types of contracts tend to piss off the universe. This contract uses broken down order as fuel, me being infused with pure order thus goes against this.

",encounterConnections:[{pk:741,encounter:695,encounter_details:{name:"Main Session 53 - Rellam's Curse",name_full:"Main Session 53 - Rellam's Curse",pk:695},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Rellam's Curse",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Rellam's Curse",creation_datetime:"2021-09-20T10:25:20.734878Z",update_datetime:"2021-09-20T10:25:20.735002Z",diaryentry:73,order_index:130,campaign_details:{name:"Aldrune",id:1}},{pk:697,description:"

That being said, Rhi's curiosity tickles her once more and she asks Suleman on why he bound 1000 imps when he had the Djinn at his disposal. That just makes the man smile and his eyes shine with excitement. Turns out there's a question with an answer having 1000 words to be able to bind the Djinn. However, the price for that answer was exorbitant. So instead, he bounds these 1000 imps individually to get 1 word from each of them in exchange for a much smaller price each.

\n

With the answer finally complete he created the lamps to bind the Djinn, from whom he could get even more knowledge. With that knowledge he bound Barbatos, Lairan and Agari, whom he extracted even more knowledge from. Finally, with all of this power, he crafted the staff of seven rings which allowed him to enslave Lucifer. Which permanently weakened the fiendish frontlines on our side.

\n

While Rhi is busy trying to wrap her mind around the fact that Suleman is wielding that very staff containing Lucifer right now, I ask my own question on how this has now compromised the security in all of reality. At that he just looks pitifully at me, confirming verbally that I really am a follower of a god and boring.

\n

Just in time for Rhi to finish grappling with the concept of all these artifacts being real and not part of the Ooble...bli... the hotel and wanting to get them from Suleman. A short disagreement follows in which unflattering words such as \"hag\", \"graverobber\" and \"you're dead\" fall before Suleman invites her to try and take it from him, which Rhi didn't want to do in the first place since she'd like to live. Good ol' survival instinct.

\n

Being fully in agreement with him, I strongly reaffirm his decision to not give the staff to anyone. And that he instead should break it, so that nobody could have it. And we'd get a staunch defender of reality back in business. I don't think I've seen any person roll their eyes harder than him at me before shooing me off, pointing out that reality has been fine in the meantime.

\n

In a very transparent attempt of just trying to find another way of stealing these artifacts from his skeletal, dead hands if she can find his body, Rhi asks him where he died. At which he just squints at her, telling her to \"Fuck around and find out\".

\n

A debate about Suleman's death erupts and at Fen's question as to why Suleman didn't just physically try to overcome the Golem that killed Suleman, Suleman just points out his more studious and charming nature. When Rhi tries to draw parallels between the two of them, Suleman just points out how the conversation between the two of them went so far and her thinly veiled interest at the staff.

",encounterConnections:[{pk:742,encounter:697,encounter_details:{name:"Main Session 53 - Why Suleman had 1000 imps",name_full:"Main Session 53 - Why Suleman had 1000 imps",pk:697},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Why Suleman had 1000 imps",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Why Suleman had 1000 imps",creation_datetime:"2021-09-20T10:41:19.315007Z",update_datetime:"2021-09-20T10:47:13.241566Z",diaryentry:73,order_index:150,campaign_details:{name:"Aldrune",id:1}},{pk:700,description:"

All of a sudden Caitriona pulls out her mirror that she received from the hags and still hasn't gotten rid off, lords above help me. Apparently she wants to know what kind of fiend that is.

\n

Suleman licks it, thinks for a second, then announces that this is a mirror demon. He proceeds to demonstrate something with a devil plushie on how mirror demons are made from devils mixed with the concept of \"change\". He points out this demon has then been stuffed inside the mirror. It has the ability to access the watchers memories, thoughts and the appearance you put into the mirror to perform an action or fill a role it's been given.

\n

On Murtagh's question why this would be given to Caitriona, Suleman points out that luck is the concept of changing order/fate in your favor, and that this is likely siphoning off Cait's ability to change fates. Which is the shocking revelation of a century right there, truly. What else, other than the fact it came from hags and is made of energy absorbant material and was getting fatter to the point it cracked could possibly hint at that? Truly, nobody could have known. Suleman proceeds to compare this less to Cait being a battery and more her being an orange pressed out on a juicer.

\n

For some reason Cait then proceeds to, instead of just destroying the mirror, to talk with it, trying to think of ways on freeing it and what it would do if given the choice. Some way too long conversation follows that concludes with Cait deciding to free the mirror demon eventually, convinced it won't come after her as she believes they were both shoved into this situation without their input and thus would want to be friends and meet up later. And because the mirror demon mirrors her, it mirrors that sentiment.

",encounterConnections:[{pk:743,encounter:700,encounter_details:{name:"Main Session 53 - Cait's mirror",name_full:"Main Session 53 - Cait's mirror",pk:700},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Cait's mirror",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Cait's mirror",creation_datetime:"2021-09-20T11:07:05.142658Z",update_datetime:"2021-09-21T15:35:00.353516Z",diaryentry:73,order_index:180,campaign_details:{name:"Aldrune",id:1}}],images:[{pk:570,image:"/media/article_images/suleman.webp",name:void 0,character_article:83,creature_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0}]},dummyQuote={pk:58,quote:"

Rel: \"Rhiannon, can I ask you to stay close to me when we are near Barbatos' cave?\"
Rhi: \"You don't want me to leave you, huh?\" winks
Rel *puts on voice*: \"Yes, I don't want you to my side. I don't know what I'd do without you. Probably lead a less problematic live, but I don't know what I'd do without you.\"

",description:"Rel and Rhi before leaving the woad camp towards Barbato's cave",creation_datetime:"2020-11-23T19:25:25.980375Z",update_datetime:"2020-12-01T17:57:15.652614Z",session:39,session_details:{title:void 0,session_number:26,session_date:"2020-11-10T00:00:00.000000Z",is_main_session:!0,is_main_session_int:1,end_day:198,start_day:196,creation_datetime:"2021-04-30T19:56:29.591276Z",update_datetime:"2021-04-30T19:56:29.605701Z",campaign:1,campaign_details:{name:"Aldrune",pk:1},pk:39,name:"Main Session 26",diaryentries:[{author_name:"Relentless",name:"Diary Entry #26 - Woads with a new tomorrow"}],has_recording:!1},encounter:void 0,connections:[{pk:68,character:3,character_details:{name:"Rhiannon Ó Conaill",name_full:"Champion of Galway - Rhiannon Ó Conaill",pk:3},quote:58},{pk:69,character:77,character_details:{name:"Rellam Serbior",name_full:"Relentless - Rellam Serbior",pk:77},quote:58}]},character_stories={title:"DesignSystem/Templates/CharacterComponent",component:CharacterComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],declarations:[]})],args:{imageServerModel:void 0,quoteServerModel:void 0,encounterServerModel:void 0,serverUrl:"https://www.aldrune.com",canCreate:!0,canUpdate:!0,canDelete:!0,campaignNPCCharacters:[{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gandalf",pk:1,name_full:"Gandalf the Grey",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Frodo",pk:2,name_full:"Frodo Baggins",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gimli",pk:3,name_full:"Gimli son of Glóin",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Legolas",pk:4,name_full:"Legolas Greenleaf",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Bilbo",pk:5,name_full:"Bilbo Baggins",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Aragorn",pk:6,name_full:"Aragorn son of Arathorn",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Saruman",pk:7,name_full:"Saruman the White",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Sif",pk:18,name_full:"Sif the Swift",description:"Sif is a skilled warrior known for her lightning-fast strikes and agility. She is fiercely loyal to her friends and will stop at nothing to protect them.",update_datetime:"2022-03-15T10:30:00.000Z",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gorin",pk:19,name_full:"Gorin Ironfist",description:"Gorin is a dwarf from the Iron Hills, known for his strength and unwavering determination. He has a fondness for ale and a good brawl.",update_datetime:"2022-02-23T14:15:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg","https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Lirien",pk:20,name_full:"Lirien Windrider",description:"Lirien is an elven archer, renowned for her skill with the bow. She is fiercely independent and often clashes with authority figures.",update_datetime:"2022-03-20T08:45:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}}],character:dummyCharacter,characterQuote:dummyQuote}},Template=args=>({props:{...args,createImage:(0,dist.XI)("createImage"),deleteImage:(0,dist.XI)("deleteImage"),updateImage:(0,dist.XI)("updateImage"),quoteDelete:(0,dist.XI)("quoteDelete"),quoteCreate:(0,dist.XI)("quoteCreate"),quoteUpdate:(0,dist.XI)("quoteUpdate"),quoteConnectionDelete:(0,dist.XI)("quoteConnectionDelete"),quoteConnectionCreate:(0,dist.XI)("quoteConnectionCreate"),encounterConnectionDelete:(0,dist.XI)("encounterConnectionDelete"),encounterConnectionCreate:(0,dist.XI)("encounterConnectionCreate"),refreshQuote:(0,dist.XI)("refreshQuote"),characterDelete:(0,dist.XI)("characterDelete"),encounterDelete:(0,dist.XI)("encounterDelete"),encounterUpdate:(0,dist.XI)("encounterUpdate")}}),Default=Template.bind({});Default.args={};const NoPermission=Template.bind({});NoPermission.args={canDelete:!1,canUpdate:!1,canCreate:!1};const NoItems=Template.bind({});NoItems.args={character:{...dummyCharacter,items:[]}};const NoQuote=Template.bind({});NoQuote.args={characterQuote:void 0};const __namedExportsOrder=["Default","NoPermission","NoItems","NoQuote"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...Default.parameters?.docs?.source}}},NoPermission.parameters={...NoPermission.parameters,docs:{...NoPermission.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoPermission.parameters?.docs?.source}}},NoItems.parameters={...NoItems.parameters,docs:{...NoItems.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoItems.parameters?.docs?.source}}},NoQuote.parameters={...NoQuote.parameters,docs:{...NoQuote.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoQuote.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/editable-text/editable-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n display: inline-block;\n}\n\n.heading {\n margin-bottom: var(--spacer-2);\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-3);\n}\n.heading__edit-text {\n margin: var(--spacer-0);\n}\n.heading__edit-button:focus, .heading__edit-button:focus-within, .heading__edit-button:hover {\n border-radius: var(--bs-border-radius);\n outline: var(--focus-outline);\n}\n\n.field {\n text-align: unset;\n border-radius: var(--bs-border-radius);\n}\n.field--display {\n min-height: 1rem;\n width: 100%;\n}\n.field--display:focus, .field--display:hover {\n color: unset;\n background-color: var(--bs-secondary);\n}\n.field--hidden {\n display: none;\n}\n.field__buttons {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter-accordion/encounter-accordion.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --bs-accordion-active-color: var(--bs-accordion);\n}\n\n.panel-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.panel-title .encounter-title,\n.panel-title .icon {\n transition: color 0.2s;\n color: var(--bs-white);\n}\n.panel-title:hover .encounter-title,\n.panel-title:hover .icon {\n color: var(--bs-gray);\n}\n\n.encounter-title {\n color: var(--bs-white);\n width: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/quote-field/quote-field.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n}\n.form-card__quote {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}\n\n.quote__description {\n margin: var(--spacer-3) var(--spacer-0) var(--spacer-3) var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/character/character.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".character__edit-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n}\n.character__heading {\n text-align: center;\n}\n.character__subheading {\n margin-bottom: var(--spacer-3);\n text-align: center;\n}\n.character__images {\n margin-bottom: var(--spacer-3);\n}\n.character__quote {\n margin-bottom: var(--spacer-5);\n}\n.character__organizations {\n margin-bottom: var(--spacer-3);\n}\n.character__description {\n width: 100%;\n margin-bottom: var(--spacer-5);\n}\n.character__items {\n margin-bottom: var(--spacer-5);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[9635],{"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/editable-text/editable-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>EditableTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var editable_text_componentngResource=__webpack_require__("./src/design/organisms/editable-text/editable-text.component.scss?ngResource"),editable_text_componentngResource_default=__webpack_require__.n(editable_text_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),tinymce_tinymce_angular=__webpack_require__("./node_modules/@tinymce/tinymce-angular/fesm2020/tinymce-tinymce-angular.mjs"),alert_component=__webpack_require__("./src/design/atoms/alert/alert.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),formly_editor_field_constants=__webpack_require__("./src/design/organisms/formly-editor-field/formly-editor-field.constants.ts");let EditableTextComponent=class EditableTextComponent{constructor(){this.text=core.input.required(),this.placeholder=core.input.required(),this.canUpdate=core.input.required(),this.serverModel=(0,core.input)(),this.heading=(0,core.input)(),this.update=(0,core.output)(),this.settings=formly_editor_field_constants.O,this.state=(0,core.signal)("DISPLAY"),this.textModel="",this.editButtonText=(0,core.computed)((()=>{switch(this.state()){case"DISPLAY":return"edit";case"UPDATE":case"OUTDATED_UPDATE":return"cancel"}})),this.editorField=(0,core.viewChild)("editor"),(0,core.effect)((()=>{null!=this.serverModel()&&this.state.set("OUTDATED_UPDATE")}),{allowSignalWrites:!0})}toggleEdit(){"UPDATE"===this.state()?this.cancelEdit():this.startEdit()}startEdit(){this.state.set("UPDATE"),this.textModel=this.text(),this.focusField()}finishEdit(){this.update.emit(this.textModel),this.state.set("DISPLAY")}cancelEdit(){this.textModel=this.text(),this.state.set("DISPLAY")}focusField(){setTimeout((()=>this.editorField()._editor.focus()),100)}static{this.ctorParameters=()=>[]}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}],placeholder:[{type:core.Input,args:[{isSignal:!0,alias:"placeholder",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],heading:[{type:core.Input,args:[{isSignal:!0,alias:"heading",required:!1,transform:void 0}]}],update:[{type:core.Output,args:["update"]}],editorField:[{type:core.ViewChild,args:["editor",{isSignal:!0}]}]}}};EditableTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-editable-text",standalone:!0,imports:[common.NgTemplateOutlet,html_text_component.m,icon_component.R,tinymce_tinymce_angular.xn,fesm2022_forms.YN,alert_component.C,separator_component.F,button_component.Q],template:'\x3c!-- Heading --\x3e\n@let headingVal = heading();\n@if (headingVal) {\n

\n \n @if (canUpdate()) {\n \n }\n

\n}\n\n\x3c!-- Text Body --\x3e\n@if (canUpdate()) {\n \n \n \n \n \n\n \x3c!-- Form Buttons --\x3e\n \n \n \n \x3c!-- Informating heading --\x3e\n \n \n While you were updating this article, somebody else went ahead and updated\n it as well. Please include their changes in your update before submitting.\n \n\n \x3c!-- Textfield-Form --\x3e\n
\n \x3c!-- Comparison text --\x3e\n
\n

Server Version

\n \n
\n\n \n\n \x3c!-- Actual edit form --\x3e\n
\n

Your Version

\n\n \n\n \x3c!-- Form Buttons --\x3e\n \n \n
\n \n} @else {\n \n}\n\n\n
\n \n \n
\n
\n\n\n \n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[editable_text_componentngResource_default()]})],EditableTextComponent)},"./src/design/organisms/encounter-accordion/encounter-accordion.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>EncounterAccordionComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_accordion_componentngResource=__webpack_require__("./src/design/organisms/encounter-accordion/encounter-accordion.component.scss?ngResource"),encounter_accordion_componentngResource_default=__webpack_require__.n(encounter_accordion_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let EncounterAccordionComponent=class EncounterAccordionComponent{constructor(){this.encounters=core.input.required(),this.campaignLocations=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter}static{this.propDecorators={encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],campaignLocations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignLocations",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}]}}};EncounterAccordionComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter-accordion",template:'
\n
\n @for (encounter of encounters(); track encounter.pk) {\n
\n
\n \n
\n\n
\n
\n \n
\n
\n
\n }\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[ng_bootstrap._f,encounter_component.L],styles:[encounter_accordion_componentngResource_default()]})],EncounterAccordionComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/design/organisms/quote-field/quote-field.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>QuoteFieldComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var quote_field_componentngResource=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.scss?ngResource"),quote_field_componentngResource_default=__webpack_require__.n(quote_field_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),environment=__webpack_require__("./src/environments/environment.ts");let ArticleService=class ArticleService{constructor(routingService,http){this.routingService=routingService,this.http=http,this.apiUrl=environment.c.apiUrl,this.recentlyUpdatedUrl=`${this.apiUrl}/recentupdates`,this.searchUrl=`${this.apiUrl}/search`}getRecentlyUpdatedArticle(campaign,pageNumber){return null==pageNumber&&(pageNumber=0),this.http.get(`${this.recentlyUpdatedUrl}/${campaign}/${pageNumber}`).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getGlobalSearchArticle(searchString){return this.http.get(`${this.searchUrl}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}getCampaignSearchArticle(campaign,searchString){return this.http.get(`${this.searchUrl}/${campaign}/${searchString}`).pipe((0,map.T)((searchResponse=>{const searchArticleObjects=searchResponse.articles.map((item=>this.parseOverviewEntity(item)));return searchResponse.articles=searchArticleObjects,searchResponse})))}searchArticlesKind(campaign,searchTerm,articleKind){return this.http.get(`${this.searchUrl}/${campaign}/${articleKind}/${searchTerm}`).pipe((0,map.T)((response=>response.map((item=>this.parseOverviewEntity(item))))))}readArticle(articleId,articleKind){return this.http.get(`${this.searchUrl}/single/${articleKind}/${articleId}`).pipe((0,map.T)((resp=>this.parseOverviewEntity(resp))))}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const articleType=data.article_type,params={campaign:data.campaign_details.name};let routeName="";switch(articleType){case"character":params.name=data.name,routeName="character";break;case"creature":params.name=data.name,routeName="creature";break;case"diaryentry":params.session_number=data.session_details.session_number,params.isMainSession=data.session_details.is_main_session_int,params.authorName=data.author_details.name,routeName="diaryentry";break;case"encounter":params.session_number=data.diaryentry_details.session_number,params.isMainSession=data.diaryentry_details.is_main_session,params.authorName=data.diaryentry_details.author_name,params.encounterTitle=data.title,routeName="diaryentry-encounter";break;case"item":params.name=data.name,routeName="item";break;case"location":params.name=data.name,params.parent_name=data.parent_location_details.name,routeName="location";break;case"organization":params.name=data.name,routeName="organization";break;case"quest":params.name=data.name,routeName="quest";break;case"sessionaudio":params.isMainSession=data.session_details.is_main_session_int,params.sessionNumber=data.session_details.session_number,routeName="sessionaudio";break;case"session":routeName="sessions";break;case"map":case"mapmarker":params.name=data.name,routeName="map";break;case"timestamp":routeName="default-map";break;case"spell":params.name=data.name,routeName="spell";break;case"rules":params.name=data.name,routeName="rule"}return()=>this.routingService.getRoutePath(routeName,params)}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};ArticleService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ArticleService);var button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),quote_component=__webpack_require__("./src/design/organisms/quote/quote.component.ts");let QuoteFieldComponent=class QuoteFieldComponent{constructor(routingService,formlyService,articleService){this.routingService=routingService,this.formlyService=formlyService,this.articleService=articleService,this.quote=core.input.required(),this.character=core.input.required(),this.campaignCharacters=core.input.required(),this.serverModel=core.input.required(),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.encounters=core.input.required(),this.sessions=core.input.required(),this.quoteControlsBlacklist=(0,core.input)([]),this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.sessions$=(0,rxjs_interop.br)(this.sessions).pipe((0,take.s)(1)),this.encounters$=(0,rxjs_interop.br)(this.encounters).pipe((0,take.s)(1)),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>this.parseConnection(this.quote()?.connections??[]))),this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.isLoadingQuote=(0,core.signal)(!1),this.quoteOverviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("quote-overview",{name:this.character().name,campaign:this.campaignName}))),this.userModel=(0,core.signal)({}),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"description",required:!0,inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"session",required:!0,campaign:this.campaignName(),options$:this.sessions$,labelProp:"name_full",valueProp:"pk"}),this.formlyService.buildAutocompleteConfig({key:"encounter",required:!1,loadOptions:searchTerm=>this.articleService.searchArticlesKind(this.campaignName(),searchTerm,"encounter"),optionKeyProp:"pk",optionLabelProp:"name",optionValueProp:"pk",initialValue$:this.quote()?.encounter?this.articleService.readArticle(this.quote()?.encounter,"encounter"):void 0}),this.formlyService.buildEditorConfig({key:"quote",required:!0})])),(0,rxjs_interop.br)(this.quote).pipe((0,rxjs_interop.pQ)()).subscribe((()=>this.isLoadingQuote.set(!1)))}onSubmit(event){switch(this.state()){case"UPDATE":case"UPDATE_OUTDATED":this.quoteUpdate.emit(event);break;case"CREATE":this.quoteCreate.emit(event);break;default:throw new Error(`QuoteField - Submitted form while in state '${this.state()}', which is not possible.`)}this.changeState("DISPLAY",{})}onDelete(){this.quoteDelete.emit(this.quote()),this.changeState("DISPLAY",{})}onCancel(){this.changeState("DISPLAY",{})}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){if(!this.canCreate()||!this.quote)return;const newConnection={quote:this.quote()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}getNextRandomQuote(){this.isLoadingQuote.set(!0),this.refreshQuote.emit()}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$},{type:ArticleService}]}static{this.propDecorators={quote:[{type:core.Input,args:[{isSignal:!0,alias:"quote",required:!0,transform:void 0}]}],character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],quoteControlsBlacklist:[{type:core.Input,args:[{isSignal:!0,alias:"quoteControlsBlacklist",required:!1,transform:void 0}]}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}]}}};QuoteFieldComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-quote-field",template:'@switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n

Updating Quote {{ quote()?.pk }}

\n\n @if (canUpdate() && state() === "UPDATE") {\n \n }\n\n @if (state() === "UPDATE_OUTDATED") {\n \n }\n
\n
\n\n\x3c!-- Quote Create/Edit Form --\x3e\n\n \n \x3c!-- Heading --\x3e\n
\n Create Quote for {{ character().name }}\n
\n\n \x3c!-- Form --\x3e\n \n
\n
\n\n\x3c!-- Quote Delete "Form" --\x3e\n\n \n
Delete this quote?
\n\n
\n \n\n
\n @if (quote()?.description) {\n \n }\n\n @if (!quote()?.description) {\n - {{ character().name }}\n }\n
\n
\n\n
\n \n \n
\n
\n
\n',standalone:!0,imports:[common.NgTemplateOutlet,quote_component.w,card_component.i,molecules.s2,molecules.zx,html_text_component.m,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[quote_field_componentngResource_default()]})],QuoteFieldComponent)},"./src/design/templates/character/character.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoItems:()=>NoItems,NoPermission:()=>NoPermission,NoQuote:()=>NoQuote,__namedExportsOrder:()=>__namedExportsOrder,default:()=>character_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var character_componentngResource=__webpack_require__("./src/design/templates/character/character.component.scss?ngResource"),character_componentngResource_default=__webpack_require__.n(character_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),info_circle_tooltip_component=__webpack_require__("./src/design/atoms/info-circle-tooltip/info-circle-tooltip.component.ts"),article_footer_component=__webpack_require__("./src/design/molecules/article-footer/article-footer.component.ts"),badge_list_component=__webpack_require__("./src/design/molecules/badge-list/badge-list.component.ts"),list_component=__webpack_require__("./src/design/molecules/list/list.component.ts"),editable_text_component=__webpack_require__("./src/design/organisms/editable-text/editable-text.component.ts"),encounter_accordion_component=__webpack_require__("./src/design/organisms/encounter-accordion/encounter-accordion.component.ts"),image_carousel_card_component=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts"),quote_field_component=__webpack_require__("./src/design/organisms/quote-field/quote-field.component.ts");let CharacterComponent=class CharacterComponent{constructor(routingService){this.routingService=routingService,this.character=core.input.required(),this.characterServerModel=(0,core.input)(),this.characterQuote=(0,core.input)(),this.campaignNPCCharacters=core.input.required(),this.campaignCharacters=core.input.required(),this.campaignOrganizations=core.input.required(),this.campaignLocations=core.input.required(),this.serverUrl=core.input.required(),this.quoteServerModel=(0,core.input)(),this.imageServerModel=(0,core.input)(),this.sessions=core.input.required(),this.encounters=core.input.required(),this.encounterServerModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.quoteDelete=new core.EventEmitter,this.quoteCreate=new core.EventEmitter,this.quoteUpdate=new core.EventEmitter,this.quoteConnectionDelete=new core.EventEmitter,this.quoteConnectionCreate=new core.EventEmitter,this.encounterConnectionDelete=new core.EventEmitter,this.encounterConnectionCreate=new core.EventEmitter,this.refreshQuote=new core.EventEmitter,this.characterDelete=new core.EventEmitter,this.characterUpdate=(0,core.output)(),this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.organizationMembershipCreate=new core.EventEmitter,this.organizationMembershipDelete=new core.EventEmitter,this.campaignName=(0,core.computed)((()=>this.character().campaign_details?.name)),this.createUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-update",{campaign:this.campaignName(),name:this.character().name}))),this.updateUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-update",{campaign:this.campaignName(),name:this.character().name}))),this.overviewUrl=(0,core.computed)((()=>this.routingService.getRoutePath("character-overview",{campaign:this.campaignName()}))),this.locationUrl=(0,core.computed)((()=>{const locationName=this.character().current_location_details?.name,parentLocationName=this.character().current_location_details?.parent_location;return this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:this.campaignName()})})),this.organizationMemberships=(0,core.computed)((()=>this.character().organizations?.map((org=>this.toBadgeListEntry(org)))??[])),this.joinableOrganizations=(0,core.computed)((()=>{const joinedOrgIds=this.organizationMemberships().map((membership=>membership.badgeValue.organization_id));return this.campaignOrganizations().filter((org=>org.pk&&!joinedOrgIds.includes(org.pk)))})),this.characterItems=(0,core.computed)((()=>this.character().items?.map((item=>this.toListEntry(item)))??[])),this.playerClasses=(0,core.computed)((()=>this.character().player_class_connections?.map((con=>con.player_class_details?.name)).join(", ")))}routeToItemCreate(){this.routingService.routeToPath("item-character-create",{character_name:this.character.name,campaign:this.campaignName()})}onMembershipCreate(org){const newMembership={name:org.name,organization_id:org.pk,role:"member"};this.organizationMembershipCreate.emit(newMembership)}onDescriptionUpdate(description){const characterToUpate=void 0!==this.characterServerModel()?this.characterServerModel():this.character();characterToUpate&&this.characterUpdate.emit({...characterToUpate,description})}toBadgeListEntry(org){return{badgeValue:org,text:org.name,link:this.routingService.getRoutePath("organization",{name:org.name,campaign:this.campaignName()})}}toListEntry(item){return{label:item.name,link:this.routingService.getRoutePath("item",{campaign:this.campaignName(),name:item.name})}}static{this.ctorParameters=()=>[{type:routing_service.O}]}static{this.propDecorators={character:[{type:core.Input,args:[{isSignal:!0,alias:"character",required:!0,transform:void 0}]}],characterServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"characterServerModel",required:!1,transform:void 0}]}],characterQuote:[{type:core.Input,args:[{isSignal:!0,alias:"characterQuote",required:!1,transform:void 0}]}],campaignNPCCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignNPCCharacters",required:!0,transform:void 0}]}],campaignCharacters:[{type:core.Input,args:[{isSignal:!0,alias:"campaignCharacters",required:!0,transform:void 0}]}],campaignOrganizations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignOrganizations",required:!0,transform:void 0}]}],campaignLocations:[{type:core.Input,args:[{isSignal:!0,alias:"campaignLocations",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],quoteServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"quoteServerModel",required:!1,transform:void 0}]}],imageServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"imageServerModel",required:!1,transform:void 0}]}],sessions:[{type:core.Input,args:[{isSignal:!0,alias:"sessions",required:!0,transform:void 0}]}],encounters:[{type:core.Input,args:[{isSignal:!0,alias:"encounters",required:!0,transform:void 0}]}],encounterServerModel:[{type:core.Input,args:[{isSignal:!0,alias:"encounterServerModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}],quoteDelete:[{type:core.Output}],quoteCreate:[{type:core.Output}],quoteUpdate:[{type:core.Output}],quoteConnectionDelete:[{type:core.Output}],quoteConnectionCreate:[{type:core.Output}],encounterConnectionDelete:[{type:core.Output}],encounterConnectionCreate:[{type:core.Output}],refreshQuote:[{type:core.Output}],characterDelete:[{type:core.Output}],characterUpdate:[{type:core.Output,args:["characterUpdate"]}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],organizationMembershipCreate:[{type:core.Output}],organizationMembershipDelete:[{type:core.Output}]}}};CharacterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-character",template:'\n
\n @if (canUpdate()) {\n
\n \n \n \n
\n }\n\n \x3c!-- Heading --\x3e\n
\n

\n @let title = character().title;\n @if (title) {\n {{ title }} -\n }\n {{ character().name }}\n @if (!character().alive) {\n (†)\n }\n

\n\n
\n \x3c!-- Organization --\x3e\n
\n @if (character().gender !== "Other") {\n {{ character().gender }}\n }\n {{ character().race }}\n {{ playerClasses() }}\n
\n\n \x3c!-- Current Location --\x3e\n @let currentLocationDetails = character().current_location_details;\n @if (currentLocationDetails) {\n
\n Last known location:\n \n {{ currentLocationDetails.name }} \n \n
\n }\n
\n
\n\n
\n \x3c!-- Image Gallery --\x3e\n \n
\n\n \x3c!-- Quote --\x3e\n
\n \n
\n\n
\n \n
\n\n \n\n
\n \n
\n\n \x3c!-- PCs don\'t have encounters --\x3e\n @if (!character().player_character) {\n
\n

\n \n

\n \n
\n }\n\n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,image_carousel_card_component.r,quote_field_component.k,badge_list_component.p,editable_text_component.T,list_component.s,info_circle_tooltip_component.$,encounter_accordion_component.x,article_footer_component.D],styles:[character_componentngResource_default()]})],CharacterComponent);const dummyCharacter={getAbsoluteRouterUrl:()=>"character/83",pk:83,player_character:!1,player_class_connections:[{pk:12,player_class:11,character:83,player_class_details:{name:"Sorcerer",pk:11,update_datetime:"2021-04-20T14:32:11.740394Z"}},{pk:13,player_class:12,character:83,player_class_details:{name:"Warlock",pk:12,update_datetime:"2021-04-20T14:32:13.937586Z"}}],alive:!1,name:"Suleman",gender:"Male",race:"Tiefling",title:"Wizard of the past",description:"

A purple-skinned, golden-eyed Tiefling that managed to have many a spirit as his servant and commanded unimaginable power. Tended to wear simple clothing, but a lot of golden jewelry.

\r\n

Among his most powerful servants were the primordial four and the unholy trinity, which he later sealed away.

",current_location:void 0,current_location_details:void 0,creation_datetime:"2020-06-10T12:00:00.000000Z",update_datetime:"2022-02-13T13:37:28.357483Z",campaign_id:1,campaign_details:{name:"Aldrune",id:1},organizations:[{pk:138,organization_id:54,role:"Member",name:"The Party"},{pk:146,organization_id:3,role:"Paladin 3rd class",name:"Church of Morrigan"}],items:[],encounters:[{pk:684,description:"

He appears as majestic as you'd have thought somebody approaching god-like powers would be. He is clad in gold, golden caps on his horns, dangling finery, a beautiful lavender robe that exerts extraordinary magical pressure that is almost uncomfortable, forcing the room to be filled with...something.

\n

We barely have enough time to take all of this in, before Rhiannon's lamp rattles. Barbatos does not just leave, he bursts forth, ready to inflict murder and pain on this copy of Suleman to the very best of his ability.

\n

In the altercation that ensures, given that Fraich and Bedivere are still pretty exhausted and hurt, it is mostly us and Forallian that approach this...altercation between Suleman and Barbatos.

\n

The first and second salvo of hits that is exchanged is already frightening enough, the two trading blows with powerful spells before Barbatos cuts into Suleman with speed and ferocity that I have never seen anyone wield a sword with. Suleman summons several items to himself instead and responds with a gigantic beam of light that cuts straight through Barbatos, nearly severing a wing of his. That likely would have evaporated anyone less powerful.

\n

Outside of that, we do our best to get him to see reason. Fen, shouting with an enhanced voice thanks to me, gets through enough to him to make him falter for a moment. Rhi contemplates for a moment whether she should in, but holds back when Barbatos shouts at her pleadingly to not take this moment of revenge from him. Neither Caitriona's shouting at him, nor my snide remarks picking at his arrogance really have an effect on him. All it does is reveal he's fully aware this is a copy, but wishes to kill it anyway for it is his only chance at some sort of token revenge that he can have. It takes Caitriona stepping in between them, willing to risk her life as he is preparing to use his dark star ability, to finally get him to stop.

\n

Gritting his teeth, still displaying barely restrained fury and range, he disappears. The danger is gone, for the moment.

",encounterConnections:[{pk:729,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:80,character_details:{name:"Barbatos",name_full:"Destroyer of the first gate - Barbatos",pk:80}},{pk:730,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}},{pk:731,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:99,character_details:{name:"Fraich",name_full:"Fraich",pk:99}},{pk:732,encounter:684,encounter_details:{name:"Main Session 53 - A last measure of revenge",name_full:"Main Session 53 - A last measure of revenge",pk:684},character:154,character_details:{name:"Bedivere Whiteridge",name_full:"Dragonknight of hope - Bedivere Whiteridge",pk:154}}],name:"Main Session 53 - A last measure of revenge",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"A last measure of revenge",creation_datetime:"2021-09-18T10:25:53.866269Z",update_datetime:"2021-09-18T10:34:27.917004Z",diaryentry:73,order_index:20,campaign_details:{name:"Aldrune",id:1}},{pk:685,description:"

With that somewhat tense situation over we make our introductions. During this, Caitriona shakes Suleman's hands and proceeds to somehow give him a very weird impression of blushing puppy eyes that I've never seen her do before... ever. Like he's the most amazing person she's ever seen. It's quite unsettling to be honest. 

\n

That is until Suleman points out Rhiannon and launches into a lecture over how it is dangerous and nonsensical to be carrying Barbatos lamp. Which paints him as a bit of a hypocrite given he made it, until he specifies that it is nonsensical for her to be carrying Barbatos' lamp as only he himself has the capacity to do so. Which paints him as a massive arrogant douchenozzle, which isn't much better. 

\n

On my request he confirms that he locked the lamps away because they became too powerful, not believing anyone else ever could be capable enough to properly wield them. 

\n

Some banter between us later, Rhi asks him how he died, which he becomes a smidge cagey about. Questions on if he knows Yaga or Morghana trigger no memories of his. Does trigger a dig at our expense that our clothes are still out of date, roughly 12000 years after his death.

",encounterConnections:[{pk:733,encounter:685,encounter_details:{name:"Main Session 53 - Introductions and Lectures",name_full:"Main Session 53 - Introductions and Lectures",pk:685},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Introductions and Lectures",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Introductions and Lectures",creation_datetime:"2021-09-18T10:35:37.111121Z",update_datetime:"2021-09-19T08:59:03.295660Z",diaryentry:73,order_index:30,campaign_details:{name:"Aldrune",id:1}},{pk:686,description:'

With that out of the way, we get to the heart of the issue that we can debate with him, Morgana and her desire for the temple of time. Talking about it gets Suleman somewhat excited from the start, declaring it his finest work, which intensifies Caitriona\'s puppy stare into one filled with awe and amazement at how somebody so incredible can exist right in front of her.

\n

On my question on what to expect coming out of there, he reveals that the main task of the temple  is to record all knowledge of things that ever happened. It does not house any particular artifacts, just knowledge. Which can be dangerous in itself, but more in what follows after Morgana acquires it, not immediately in something she can destroy with it. It also means that chances are that temple has records of where the lance is... and that we currently own it... and if Morgana finds that one out, well boy are we fucked.

\n

Fen seems to get an epiphany at that, before smugly declaring that "his" is better. Which apparently is his ability to pull knowledge out of nowhere that he should have no way of accessing. His... thumb apparently gives him knowledge of all things past, present and future. A dick measuring contest ensues between him and Suleman on whose ability to acquire knowledge is "actually" better.

',encounterConnections:[{pk:734,encounter:686,encounter_details:{name:"Main Session 53 - Getting to the heart of the issue",name_full:"Main Session 53 - Getting to the heart of the issue",pk:686},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Getting to the heart of the issue",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Getting to the heart of the issue",creation_datetime:"2021-09-19T08:27:32.535679Z",update_datetime:"2021-09-19T08:47:49.405613Z",diaryentry:73,order_index:40,campaign_details:{name:"Aldrune",id:1}},{pk:687,description:"

Once that knowledge-contest is over, Suleman places himself in a freshly summoned comfy chair and I ask him for advice on the Agari situation. That is, after he gives me advice on how to stop the horn fraying which has been a serious pain in the keister since I've been born. Coconut oil is supposed to help there... whatever coconuts are. Useful information though.

\n

Anyway, I inform him of a possible confrontation between Agari and Barbatos, during which he remarks that Agari might have enough power from Barbatos' sins to destroy his lamp. His advice on how to avoid that: Anti Magic zone on whoever's sin Agari wishes to unleash with her \"Cat's call\" ability.

",encounterConnections:[{pk:735,encounter:687,encounter_details:{name:"Main Session 53 - Advice against Agari",name_full:"Main Session 53 - Advice against Agari",pk:687},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Advice against Agari",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Advice against Agari",creation_datetime:"2021-09-19T08:57:41.422952Z",update_datetime:"2021-09-19T08:57:41.423061Z",diaryentry:73,order_index:50,campaign_details:{name:"Aldrune",id:1}},{pk:688,description:"

The Agari question is followed by Rhiannon asking for Suleman's reason to destroy Babylon.

\n

Hesitantly, Suleman says that he was tricked by Barbatos, being made to believe that the people of Babylon were attempting a physical construction of Ptolemy's model of the universe. This could've allowed them to get to a universe not controlled by... \"this\" universe. A way to escape the cycle of rising and falling civilizations, which the universe squashes before the civilization learns \"too much\". He was aware that if that happened, it would likely have lead to the eradication of everything in existence... somehow. Suleman states he believed Barbatos because he had never felt appreciated by this place anyway, only experienced jealousy and more.

\n

It was only when he was walking among the ruins of his people that he realized that Barbatos had only been pushing him to see how far he could take it. Suleman notes he is uncertain as to why Barbatos would do this, but guesses he might've found the resemblance to hell distasteful. He does acknowledge that it could've been an honest mistake of Barbatos', who might've truly believed that this was the case. But even if that were the case, Barbatos' lack of remorse following made it certain to Suleman that Barbatos needed to be sealed away.

\n

He also remarks that he and Barbatos had their disagreements about the temple of time, which those were are unclear.

\n

As to how he was so certain that Barbatos had tricked him, he just denotes that he realized such while walking among the piles of corpses his destruction caused, seeing it was all for naught.

\n

On Fen's question of the purpose of the tower, Suleman elaborates that the tower was a water-reclamation center initially, then became a gathering place for people which lead to the extension of the surrounding hanging gardens, making it a popular place for rich folk to celebrate in. It also doubled as observatory. At that description, Fen asks him for schematics as he wishes to build something similar, which Suleman agrees on doing.

\n

What he does not agree to is tell Rhi where Babylon used to be, as he does not wish for us to disturb the peace of the place or get anywhere even remotely close to where his body might be. As for the temple of time, that temple exists in some kind of border to nothingness, so that's apparently accessible from anywhere you want. 

",encounterConnections:[{pk:736,encounter:688,encounter_details:{name:"Main Session 53 - Why Suleman destroyed Babylon",name_full:"Main Session 53 - Why Suleman destroyed Babylon",pk:688},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Why Suleman destroyed Babylon",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Why Suleman destroyed Babylon",creation_datetime:"2021-09-19T09:35:39.279083Z",update_datetime:"2021-09-19T09:53:49.827757Z",diaryentry:73,order_index:60,campaign_details:{name:"Aldrune",id:1}},{pk:689,description:"

Eager to distract himself from his thoughts of Babylon, he accepts Murtagh's question, who ask him about the squid people we encountered.

\n

Suleman is a bit stumped at first, but does recognize them as a species of parasites that evolved since he last saw them. Seemingly satisfied with that, Murtagh nods to himself.

\n

After that I ask for why Barbatos isn't just being released back into the hells to have him everywhere but here. The reason is quite self evident. The lamp manages to contain some of his power, leaving him still with a considerable amount of it. The issue is, that he's too powerful now, due to the dark star. To elaborate on that, he tells a bit of a story. There used to be originally a group of protectors, divine beings called \"angels\". The one chief among them, Lucifer, wanted to influence the universe more than just protecting it. He became the first devil and was given \"the compulsion\", an innate desire to fight chaos. Suleman, after capturing the Djinn and the Trine captured Lucifer and... turned him into a staff. When Lucifer fell from his position as an angel and became a devil, he left behind \"the dark star\", a relic now in Barbatos' possession. So it is not like releasing him back would get him forced under the rule of a more powerful archdevil. He would likely be more powerful than some, if not most of them. And with that power would come the ability to act, potentially in revenge against Suleman. Not necessarily enough to overcome the compulsion, but there are ways to leave the tree intact and still destroy everything Suleman ever created. This may not be true for Agari and Lairann, but they are dogmatically loyal to Barbatos and thus would likely work to free Barbatos if released themselves. And weakening them isn't really a possibility.

\n

At my loudly contemplating that last bit, Rhi keeps squinting harshly at me, but I just shrug it off. If she actually has a problem she'd speak up.

\n

On Cait's question why one would prefer Ahjuu's lamp over Barbatos', to which Suleman confirms that Barbatos is the most powerful, but they all have their own fields of excellence. He also points out that both a Djin and a Fiend-lamp is needed for access.

",encounterConnections:[{pk:737,encounter:689,encounter_details:{name:"Main Session 53 - Knowledge of Illithids and releasing fiends",name_full:"Main Session 53 - Knowledge of Illithids and releasing fiends",pk:689},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Knowledge of Illithids and releasing fiends",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Knowledge of Illithids and releasing fiends",creation_datetime:"2021-09-19T09:54:02.602675Z",update_datetime:"2021-11-29T18:52:55.892937Z",diaryentry:73,order_index:70,campaign_details:{name:"Aldrune",id:1}},{pk:690,description:"

As we chat about the possibility of releasing Barbatos, Fen tells Suleman of the daggers and how they piggyback off the universe's mechanism to evaluate something  as an incarnation of a concept. More specifically, he asks what knowledge that could do something like this would seek from the temple.

\n

That question, for the first time, is strange enough that not even Suleman has a direct answer to it. Fen goes on to reveal that he is aware somebody tried to make an incarnation of him as a concept to get access to his... knowledge ability. He assumes the temple of time is their backup plan, now that this failed. Suleman muses that they are trying this on people that almost achieved godhood as those that are gods likely wouldn't be available through this mechanism.

\n

At that Caitriona hands him the fire-dagger she took from Fen all those months ago. Suleman looks at it for a couple seconds before noting it to be the flame of a dragon, taken from it and carved with runes to simulate ancestral memory. It effectively reaches back in time to find somebody that best embodies the concept that was ripped from the dragon. As no thing can exist twice at once, this also means that the dragon no longer can breathe fire.

\n

He assumes that if the dragon were exposed to flame it would bring forth a being most aligned with a dragon's fire, aka primordial flame. Which... explains the dead, chained up, adult/ancient dragon Fen mentioned seeing on his trip through Galway, where he also got the daggers from.

\n

As for the daggers themselves, he notes that mixing in a humanoid's blood would dilute this effect and the draconic heritage, which conjures forth images of Astaroth almost immediately. That's about the time he notices Bedivere who was trying his best to fade into the background. He points out that this conjuring up made the person suddenly gain draconic ancestroy, but not turn they themselves draconic. Cleansing water effects like those in the bath would remove this.

\n

Suleman also notes that draconic heritage tends to be able to extract feelings and memories also from blood. So if somebody were to, say, create one of these daggers from a dragon that had a vendetta, and the person transforming the dagger cut themselves with had a similar vendetta, that would have a \"much closer and more profound\" effect... of some sorts. That effect likely being that somebody stronger that embodies the concept better would be summoned. Images of Astaroth don't just come to mind at this point, they start rampaging through the territory of other thoughts and slicing them into pieces.

",encounterConnections:[{pk:738,encounter:690,encounter_details:{name:"Main Session 53 - Questions about daggers",name_full:"Main Session 53 - Questions about daggers",pk:690},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Questions about daggers",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Questions about daggers",creation_datetime:"2021-09-19T14:50:47.493037Z",update_datetime:"2021-09-20T09:39:15.642340Z",diaryentry:73,order_index:80,campaign_details:{name:"Aldrune",id:1}},{pk:691,description:"

At that point Caitriona theorizes about mixing the creature that would be created by blood intermingling and how maybe a blood curse could carry over or not. After exasperating Suleman a bit and him drinking some of her blood he correctly identifies her \"curse\" and identifies her as being horribly irreversibly cursed.

\n

Before they can continue on the dagger matter, Suleman can't help but get into the debate on how permanently Caitriona is intertwined with somebody that is really trying to piss off the universe. Which sounds accurate, so I just nod along. Cait reveals that she swapped Fate's with somebody, which it appears is the thing that is really angering the universe. Not necessarily Caitriona turning into a beast of blackened blood herself, as that appears to be an honest error and shit happens. But her purposeful swapping of fate and thus intentional messing with things is what really grinds the universe's gears. Which never ends well, as Suleman speaks from experience and reveals he was attacked and mashed into paste by a construct made of gears and anti-magic.

\n

Cait then theorizes on what would happen if one of these two fates were to end, aka she killed Fillaih as she'd had on her agenda for ages now. Which turns out to depend on the intent of the person doing the killing, according to Fillaih. If the killer wanted to make sure Fillaih's fate was never fulfilled, that would make things worse. But if the intent was to restore balance/appease, that would improve things. This is utterly insane and arbitrary, which Suleman acknowledges.

",encounterConnections:[{pk:739,encounter:691,encounter_details:{name:"Main Session 53 - Caitriona's Curse",name_full:"Main Session 53 - Caitriona's Curse",pk:691},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Caitriona's Curse",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Caitriona's Curse",creation_datetime:"2021-09-20T09:39:51.274721Z",update_datetime:"2021-09-20T09:48:43.851322Z",diaryentry:73,order_index:90,campaign_details:{name:"Aldrune",id:1}},{pk:693,description:"

Wanting to take another chance, Rhi asks Suleman what Barbatos would want from the temple of time. Sheepishly, Suleman tells her that Barbatos never saw it with his own eyes. He had made Barbatos blind while constructing the temple, as a punishment for tricking him into destroying Babylon. When Rhi complains about that being unfair, Suleman exasperatedly points at the uncountable death the destruction of Babylon caused, stating he only wanted to use Barbatos to do one good thing and then lock him away forever... which failed, given Rhi having the lamp now.

\n

At Fen pointing it out that the lock was flawed, Suleman responds he left Frank with him and that he thought that would be enough. Which it obviously wasn't. This confuses Fen massively, as based on our introductions to Frank he seemed to quickly make his name up on the spot. At our mentioning that Frank feels like he has been downgraded since being turned into a cave, Suleman exasperatedly points out he's the largest thing in the mountain range, how could he be disappointed?! Pointing out his interest in becoming a caterpillar for the metamorphosis Suleman puts his face in his hands, muttering something about addiction to changing.

\n

At Cait pointing out that Rhi promised Frank a new body and how having a wish really would help with that, Suleman vehemently denies our request. With words he may only be declaring us \"fuckwitts\", but the subtext about us being irresponsible idiots with this kind of stuff could be counted in volumes. He does offer another spell instead, to which I ask for teleport, which he empowers by making it subtle, thus making it impossible to counter.

",encounterConnections:[{pk:740,encounter:693,encounter_details:{name:"Main Session 53 - What Barbatos would want",name_full:"Main Session 53 - What Barbatos would want",pk:693},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - What Barbatos would want",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"What Barbatos would want",creation_datetime:"2021-09-20T10:07:13.232541Z",update_datetime:"2021-09-20T10:11:28.467109Z",diaryentry:73,order_index:110,campaign_details:{name:"Aldrune",id:1}},{pk:695,description:"

It's at this point a question goes through my mind regarding my own ancestry. I explain Suleman my own story, how I've been told I was payment for a contract an ancestor of mine made, how my mother made me get a tattoo to protect me and how the influence of a god supposedly saved me.

\n

Suleman points out that what we're talking about, the magnitude of the contract, is on the order of a volcano erupting, a tsunami, something big. A rune, in comparison, might be the purest form of order, a shape now having meaning, and that would indeed protect chaos or things corrupting order. However, it is an umbrella compared to the catastrophe awaiting me. The influence of a god whoever is something else entirely. That could protect, being more of a wall or a conservatory.

\n

When I tell him why I had doubts, given that this was a contract, he notes that it depends on who the contract was with. Since mine was not with a devil but with a hag, things change, particularly since these types of contracts tend to piss off the universe. This contract uses broken down order as fuel, me being infused with pure order thus goes against this.

",encounterConnections:[{pk:741,encounter:695,encounter_details:{name:"Main Session 53 - Rellam's Curse",name_full:"Main Session 53 - Rellam's Curse",pk:695},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Rellam's Curse",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Rellam's Curse",creation_datetime:"2021-09-20T10:25:20.734878Z",update_datetime:"2021-09-20T10:25:20.735002Z",diaryentry:73,order_index:130,campaign_details:{name:"Aldrune",id:1}},{pk:697,description:"

That being said, Rhi's curiosity tickles her once more and she asks Suleman on why he bound 1000 imps when he had the Djinn at his disposal. That just makes the man smile and his eyes shine with excitement. Turns out there's a question with an answer having 1000 words to be able to bind the Djinn. However, the price for that answer was exorbitant. So instead, he bounds these 1000 imps individually to get 1 word from each of them in exchange for a much smaller price each.

\n

With the answer finally complete he created the lamps to bind the Djinn, from whom he could get even more knowledge. With that knowledge he bound Barbatos, Lairan and Agari, whom he extracted even more knowledge from. Finally, with all of this power, he crafted the staff of seven rings which allowed him to enslave Lucifer. Which permanently weakened the fiendish frontlines on our side.

\n

While Rhi is busy trying to wrap her mind around the fact that Suleman is wielding that very staff containing Lucifer right now, I ask my own question on how this has now compromised the security in all of reality. At that he just looks pitifully at me, confirming verbally that I really am a follower of a god and boring.

\n

Just in time for Rhi to finish grappling with the concept of all these artifacts being real and not part of the Ooble...bli... the hotel and wanting to get them from Suleman. A short disagreement follows in which unflattering words such as \"hag\", \"graverobber\" and \"you're dead\" fall before Suleman invites her to try and take it from him, which Rhi didn't want to do in the first place since she'd like to live. Good ol' survival instinct.

\n

Being fully in agreement with him, I strongly reaffirm his decision to not give the staff to anyone. And that he instead should break it, so that nobody could have it. And we'd get a staunch defender of reality back in business. I don't think I've seen any person roll their eyes harder than him at me before shooing me off, pointing out that reality has been fine in the meantime.

\n

In a very transparent attempt of just trying to find another way of stealing these artifacts from his skeletal, dead hands if she can find his body, Rhi asks him where he died. At which he just squints at her, telling her to \"Fuck around and find out\".

\n

A debate about Suleman's death erupts and at Fen's question as to why Suleman didn't just physically try to overcome the Golem that killed Suleman, Suleman just points out his more studious and charming nature. When Rhi tries to draw parallels between the two of them, Suleman just points out how the conversation between the two of them went so far and her thinly veiled interest at the staff.

",encounterConnections:[{pk:742,encounter:697,encounter_details:{name:"Main Session 53 - Why Suleman had 1000 imps",name_full:"Main Session 53 - Why Suleman had 1000 imps",pk:697},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Why Suleman had 1000 imps",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Why Suleman had 1000 imps",creation_datetime:"2021-09-20T10:41:19.315007Z",update_datetime:"2021-09-20T10:47:13.241566Z",diaryentry:73,order_index:150,campaign_details:{name:"Aldrune",id:1}},{pk:700,description:"

All of a sudden Caitriona pulls out her mirror that she received from the hags and still hasn't gotten rid off, lords above help me. Apparently she wants to know what kind of fiend that is.

\n

Suleman licks it, thinks for a second, then announces that this is a mirror demon. He proceeds to demonstrate something with a devil plushie on how mirror demons are made from devils mixed with the concept of \"change\". He points out this demon has then been stuffed inside the mirror. It has the ability to access the watchers memories, thoughts and the appearance you put into the mirror to perform an action or fill a role it's been given.

\n

On Murtagh's question why this would be given to Caitriona, Suleman points out that luck is the concept of changing order/fate in your favor, and that this is likely siphoning off Cait's ability to change fates. Which is the shocking revelation of a century right there, truly. What else, other than the fact it came from hags and is made of energy absorbant material and was getting fatter to the point it cracked could possibly hint at that? Truly, nobody could have known. Suleman proceeds to compare this less to Cait being a battery and more her being an orange pressed out on a juicer.

\n

For some reason Cait then proceeds to, instead of just destroying the mirror, to talk with it, trying to think of ways on freeing it and what it would do if given the choice. Some way too long conversation follows that concludes with Cait deciding to free the mirror demon eventually, convinced it won't come after her as she believes they were both shoved into this situation without their input and thus would want to be friends and meet up later. And because the mirror demon mirrors her, it mirrors that sentiment.

",encounterConnections:[{pk:743,encounter:700,encounter_details:{name:"Main Session 53 - Cait's mirror",name_full:"Main Session 53 - Cait's mirror",pk:700},character:83,character_details:{name:"Suleman",name_full:"Wizard of the past - Suleman (†)",pk:83}}],name:"Main Session 53 - Cait's mirror",location:199,location_details:{name:"Hotel California",name_full:"River Styx",pk:199,parent_location_name:"River Styx"},title:"Cait's mirror",creation_datetime:"2021-09-20T11:07:05.142658Z",update_datetime:"2021-09-21T15:35:00.353516Z",diaryentry:73,order_index:180,campaign_details:{name:"Aldrune",id:1}}],images:[{pk:570,image:"/media/article_images/suleman.webp",name:void 0,character_article:83,creature_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0}]},dummyQuote={pk:58,quote:"

Rel: \"Rhiannon, can I ask you to stay close to me when we are near Barbatos' cave?\"
Rhi: \"You don't want me to leave you, huh?\" winks
Rel *puts on voice*: \"Yes, I don't want you to my side. I don't know what I'd do without you. Probably lead a less problematic live, but I don't know what I'd do without you.\"

",description:"Rel and Rhi before leaving the woad camp towards Barbato's cave",creation_datetime:"2020-11-23T19:25:25.980375Z",update_datetime:"2020-12-01T17:57:15.652614Z",session:39,session_details:{title:void 0,session_number:26,session_date:"2020-11-10T00:00:00.000000Z",is_main_session:!0,is_main_session_int:1,end_day:198,start_day:196,creation_datetime:"2021-04-30T19:56:29.591276Z",update_datetime:"2021-04-30T19:56:29.605701Z",campaign:1,campaign_details:{name:"Aldrune",pk:1},pk:39,name:"Main Session 26",diaryentries:[{author_name:"Relentless",name:"Diary Entry #26 - Woads with a new tomorrow"}],has_recording:!1},encounter:void 0,connections:[{pk:68,character:3,character_details:{name:"Rhiannon Ó Conaill",name_full:"Champion of Galway - Rhiannon Ó Conaill",pk:3},quote:58},{pk:69,character:77,character_details:{name:"Rellam Serbior",name_full:"Relentless - Rellam Serbior",pk:77},quote:58}]},character_stories={title:"DesignSystem/Templates/CharacterComponent",component:CharacterComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],declarations:[]})],args:{imageServerModel:void 0,quoteServerModel:void 0,encounterServerModel:void 0,serverUrl:"https://www.aldrune.com",canCreate:!0,canUpdate:!0,canDelete:!0,campaignNPCCharacters:[{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gandalf",pk:1,name_full:"Gandalf the Grey",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Frodo",pk:2,name_full:"Frodo Baggins",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gimli",pk:3,name_full:"Gimli son of Glóin",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Legolas",pk:4,name_full:"Legolas Greenleaf",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Bilbo",pk:5,name_full:"Bilbo Baggins",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Aragorn",pk:6,name_full:"Aragorn son of Arathorn",player_character:!1,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Saruman",pk:7,name_full:"Saruman the White",player_character:!1,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Sif",pk:18,name_full:"Sif the Swift",description:"Sif is a skilled warrior known for her lightning-fast strikes and agility. She is fiercely loyal to her friends and will stop at nothing to protect them.",update_datetime:"2022-03-15T10:30:00.000Z",player_character:!0,images:[],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Gorin",pk:19,name_full:"Gorin Ironfist",description:"Gorin is a dwarf from the Iron Hills, known for his strength and unwavering determination. He has a fondness for ale and a good brawl.",update_datetime:"2022-02-23T14:15:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg","https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}},{getAbsoluteRouterUrl:()=>"/search/character/123",article_type:"Character",name:"Lirien",pk:20,name_full:"Lirien Windrider",description:"Lirien is an elven archer, renowned for her skill with the bow. She is fiercely independent and often clashes with authority figures.",update_datetime:"2022-03-20T08:45:00.000Z",player_character:!0,images:["https://example.com/images/lirien1.jpg"],campaign_details:{name:"Aldrune",id:1}}],character:dummyCharacter,characterQuote:dummyQuote}},Template=args=>({props:{...args,createImage:(0,dist.XI)("createImage"),deleteImage:(0,dist.XI)("deleteImage"),updateImage:(0,dist.XI)("updateImage"),quoteDelete:(0,dist.XI)("quoteDelete"),quoteCreate:(0,dist.XI)("quoteCreate"),quoteUpdate:(0,dist.XI)("quoteUpdate"),quoteConnectionDelete:(0,dist.XI)("quoteConnectionDelete"),quoteConnectionCreate:(0,dist.XI)("quoteConnectionCreate"),encounterConnectionDelete:(0,dist.XI)("encounterConnectionDelete"),encounterConnectionCreate:(0,dist.XI)("encounterConnectionCreate"),refreshQuote:(0,dist.XI)("refreshQuote"),characterDelete:(0,dist.XI)("characterDelete"),encounterDelete:(0,dist.XI)("encounterDelete"),encounterUpdate:(0,dist.XI)("encounterUpdate")}}),Default=Template.bind({});Default.args={};const NoPermission=Template.bind({});NoPermission.args={canDelete:!1,canUpdate:!1,canCreate:!1};const NoItems=Template.bind({});NoItems.args={character:{...dummyCharacter,items:[]}};const NoQuote=Template.bind({});NoQuote.args={characterQuote:void 0};const __namedExportsOrder=["Default","NoPermission","NoItems","NoQuote"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...Default.parameters?.docs?.source}}},NoPermission.parameters={...NoPermission.parameters,docs:{...NoPermission.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoPermission.parameters?.docs?.source}}},NoItems.parameters={...NoItems.parameters,docs:{...NoItems.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoItems.parameters?.docs?.source}}},NoQuote.parameters={...NoQuote.parameters,docs:{...NoQuote.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createImage: action('createImage'),\n deleteImage: action('deleteImage'),\n updateImage: action('updateImage'),\n quoteDelete: action('quoteDelete'),\n quoteCreate: action('quoteCreate'),\n quoteUpdate: action('quoteUpdate'),\n quoteConnectionDelete: action('quoteConnectionDelete'),\n quoteConnectionCreate: action('quoteConnectionCreate'),\n encounterConnectionDelete: action('encounterConnectionDelete'),\n encounterConnectionCreate: action('encounterConnectionCreate'),\n refreshQuote: action('refreshQuote'),\n characterDelete: action('characterDelete'),\n encounterDelete: action('encounterDelete'),\n encounterUpdate: action('encounterUpdate')\n }\n})",...NoQuote.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/editable-text/editable-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n display: inline-block;\n}\n\n.heading {\n margin-bottom: var(--spacer-2);\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-3);\n}\n.heading__edit-text {\n margin: var(--spacer-0);\n}\n.heading__edit-button:focus, .heading__edit-button:focus-within, .heading__edit-button:hover {\n border-radius: var(--bs-border-radius);\n outline: var(--focus-outline);\n}\n\n.field {\n text-align: unset;\n border-radius: var(--bs-border-radius);\n}\n.field--display {\n min-height: 1rem;\n width: 100%;\n}\n.field--display:focus, .field--display:hover {\n color: unset;\n background-color: var(--bs-secondary);\n}\n.field--hidden {\n display: none;\n}\n.field__buttons {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter-accordion/encounter-accordion.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --bs-accordion-active-color: var(--bs-accordion);\n}\n\n.panel-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.panel-title .encounter-title,\n.panel-title .icon {\n transition: color 0.2s;\n color: var(--bs-white);\n}\n.panel-title:hover .encounter-title,\n.panel-title:hover .icon {\n color: var(--bs-gray);\n}\n\n.encounter-title {\n color: var(--bs-white);\n width: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/quote-field/quote-field.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n}\n.form-card__quote {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}\n\n.quote__description {\n margin: var(--spacer-3) var(--spacer-0) var(--spacer-3) var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/character/character.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".character__edit-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n}\n.character__heading {\n text-align: center;\n}\n.character__subheading {\n margin-bottom: var(--spacer-3);\n text-align: center;\n}\n.character__images {\n margin-bottom: var(--spacer-3);\n}\n.character__quote {\n margin-bottom: var(--spacer-5);\n}\n.character__organizations {\n margin-bottom: var(--spacer-3);\n}\n.character__description {\n width: 100%;\n margin-bottom: var(--spacer-5);\n}\n.character__items {\n margin-bottom: var(--spacer-5);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-config-tables-config-tables-stories.989d3c1f.iframe.bundle.js b/design-templates-config-tables-config-tables-stories.15edaa4c.iframe.bundle.js similarity index 93% rename from design-templates-config-tables-config-tables-stories.989d3c1f.iframe.bundle.js rename to design-templates-config-tables-config-tables-stories.15edaa4c.iframe.bundle.js index e9f65447c..d76cb1664 100644 --- a/design-templates-config-tables-config-tables-stories.989d3c1f.iframe.bundle.js +++ b/design-templates-config-tables-config-tables-stories.15edaa4c.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6119],{"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./src/design/templates/config-tables/config-tables.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithData:()=>WithData,__namedExportsOrder:()=>__namedExportsOrder,default:()=>config_tables_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs");var organization_service_mock=__webpack_require__("./src/app/_services/article/organization.service.mock.ts"),player_class_service_mock=__webpack_require__("./src/app/_services/article/player-class.service.mock.ts"),formly_service_mock=__webpack_require__("./src/app/_services/formly/formly-service.mock.ts"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var config_tables_componentngResource=__webpack_require__("./src/design/templates/config-tables/config-tables.component.scss?ngResource"),config_tables_componentngResource_default=__webpack_require__.n(config_tables_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),confirmation_toggle_button_component=__webpack_require__("./src/design/molecules/confirmation-toggle-button/confirmation-toggle-button.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let ConfigTablesComponent=class ConfigTablesComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.tableData=core.input.required(),this.loadTableEntries=new core.EventEmitter,this.deleteTableEntry=new core.EventEmitter,this.createTableEntry=new core.EventEmitter,this.tables=(0,core.computed)((()=>[{name:"Marker Type",kind:"MARKER_TYPE",icon:"tag",model:{name:null,is_text_marker:!1,icon:null,color:null},formFields:[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildCheckboxConfig({key:"is_text_marker",label:"Show name instead of Icon",defaultValue:!1}),this.formlyService.buildInputConfig({key:"icon",inputKind:"NAME"}),this.formlyService.buildInputConfig({key:"color",inputKind:"STRING"})],showForm:!1,entries:this.tableData().MARKER_TYPE},{name:"Class",kind:"PLAYER_CLASS",icon:"user",model:{name:null},formFields:[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"})],entries:this.tableData().PLAYER_CLASS,showForm:!1}])),this.campaignOverviewUrl=this.routingService.getRoutePath("campaign-overview")}createEntry(kind,entry){this.createTableEntry.emit({table:kind,entry}),this.getTable(kind).showForm=!1}getTable(kind){return this.tables().find((table=>table.kind===kind))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={tableData:[{type:core.Input,args:[{isSignal:!0,alias:"tableData",required:!0,transform:void 0}]}],loadTableEntries:[{type:core.Output}],deleteTableEntry:[{type:core.Output}],createTableEntry:[{type:core.Output}]}}};ConfigTablesComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-config-tables",template:'\n
\n \n \n \n\n \x3c!-- Sections --\x3e\n @for (table of tables(); track table.kind) {\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n {{ table.name }}\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Users --\x3e\n \n\n \n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n\n @if (!table.showForm) {\n @if (table.entries?.length === 0) {\n Load entries to see them\n }\n
\n \x3c!-- Table --\x3e\n @if (table.entries && table.entries.length > 0) {\n \n \x3c!-- Table heading --\x3e\n \n \n \n @for (\n property of table.entries[0] | keyvalue;\n track property.key\n ) {\n \n }\n \n \n \x3c!-- Table body --\x3e\n \n @for (entry of table.entries; track entry.pk) {\n \n \n @for (property of entry | keyvalue; track property.key) {\n \n }\n \n \n }\n \n
#\n {{ property.key }}\n
{{ entry.id }} {{ entry.pk }}\n {{ property.value }}\n \n \n
\n }\n
\n }\n\n @if (table.showForm) {\n \n

Adding new {{ table.name }}

\n \x3c!-- Form --\x3e\n \n
\n }\n
\n }\n\n \n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,icon_component.R,separator_component.F,confirmation_toggle_button_component.T,card_component.i,form_component.s,common.KeyValuePipe],styles:[config_tables_componentngResource_default()]})],ConfigTablesComponent);const config_tables_stories={title:"DesignSystem/Templates/ConfigTablesComponent",component:ConfigTablesComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],declarations:[],providers:[formly_service_mock.p]})],args:{campaignName:"Aldrune",state:"CREATE",userModel:{},serverModel:void 0,classOptions:player_class_service_mock.T,organizations:organization_service_mock.n}},Template=args=>({props:{...args,loadTableEntries:(0,dist.XI)("loadTableEntries"),deleteTableEntry:(0,dist.XI)("deleteTableEntry"),createTableEntry:(0,dist.XI)("createTableEntry")}}),Default=Template.bind({});Default.args={};const WithData=Template.bind({});WithData.args={tableData:{MARKER_TYPE:[{name:"Forest",icon:"tree",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:05.887185Z",fontawesome_type:"fa",color:"darkgreen",id:1},{name:"Capital",icon:"university",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:26.682656Z",fontawesome_type:"fa",color:"purple",id:2},{name:"Cathedral",icon:"place-of-worship",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:51:51.177824Z",fontawesome_type:"fas",color:"orange",id:3},{name:"Cave",icon:"moon",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:07:40.729354Z",fontawesome_type:"fas",color:"gray",id:4},{name:"Event",icon:"exclamation",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:01.355792Z",fontawesome_type:"fa",color:"red",id:5},{name:"Fort",icon:"fort-awesome",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:50:41.269164Z",fontawesome_type:"fa",color:"lightgray",id:6},{name:"Grove",icon:"paw",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:25.319406Z",fontawesome_type:"fa",color:"green",id:7},{name:"Mountain",icon:"mountain",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:52:02.398844Z",fontawesome_type:"fas",color:"beige",id:8},{name:"Ruin",icon:"dungeon",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:46:02.394436Z",fontawesome_type:"fas",color:"lightgray",id:9},{name:"Town",icon:"info",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:29:00.320971Z",fontawesome_type:"fa",color:"blue",id:10},{name:"Settlement",icon:"home",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:55.824551Z",fontawesome_type:"fa",color:"lightgreen",id:11},{name:"Docks",icon:"anchor",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:49.646018Z",fontawesome_type:"fa",color:"blue",id:12},{name:"Building",icon:"home",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:17.955863Z",fontawesome_type:"fa",color:"lightgray",id:13},{name:"Religious Structure",icon:"place-of-worship",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:17:57.221134Z",fontawesome_type:"fas",color:"orange",id:14},{name:"Beach",icon:"umbrella-beach",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:09:38.596422Z",fontawesome_type:"fas",color:"lightblue",id:15},{name:"Canal",icon:"tint",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:22.172661Z",fontawesome_type:"fa",color:"lightblue",id:16},{name:"Cliff",icon:"mountain",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:37.095700Z",fontawesome_type:"fa",color:"beige",id:17},{name:"District",icon:"diamond",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:41.761572Z",fontawesome_type:"fa",color:"black",id:18},{name:"Garden/Park",icon:"tree",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:17.516375Z",fontawesome_type:"fa",color:"lightgreen",id:19},{name:"Estate",icon:"gavel",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:57.200846Z",fontawesome_type:"fa",color:"purple",id:20},{name:"Academy Related",icon:"hat-wizard",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:23:53.376734Z",fontawesome_type:"fas",color:"lightgray",id:21},{name:"Outposts",icon:"chess-rook",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-29T04:51:24.882128Z",fontawesome_type:"fas",color:"lightgray",id:22},{name:"Sea/Ocean",icon:"water",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:51.303357Z",fontawesome_type:"fa",color:"gray",id:23},{name:"Underwater Ruins",icon:"dungeon",is_text_marker:!1,creation_datetime:"2021-07-27T15:59:53.480354Z",update_datetime:"2021-07-27T16:01:53.702694Z",fontawesome_type:"fas",color:"lightblue",id:24},{name:"Palace",icon:"crown",is_text_marker:!1,creation_datetime:"2021-07-27T16:14:14.295182Z",update_datetime:"2021-07-27T16:14:14.295249Z",fontawesome_type:"fas",color:"lightgray",id:25},{name:"Store",icon:"store",is_text_marker:!1,creation_datetime:"2021-07-27T16:18:35.147729Z",update_datetime:"2021-07-27T16:18:35.147809Z",fontawesome_type:"fas",color:"lightgray",id:26},{name:"Inn",icon:"hotel",is_text_marker:!1,creation_datetime:"2021-07-27T16:22:11.783529Z",update_datetime:"2021-07-27T16:22:11.783599Z",fontawesome_type:"fas",color:"lightgray",id:27},{name:"Monument",icon:"monument",is_text_marker:!1,creation_datetime:"2021-07-27T16:22:26.373214Z",update_datetime:"2021-07-27T16:22:26.373289Z",fontawesome_type:"fas",color:"lightgray",id:28}],PLAYER_CLASS:player_class_service_mock.T}};const __namedExportsOrder=["Default","WithData"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n loadTableEntries: action('loadTableEntries'),\n deleteTableEntry: action('deleteTableEntry'),\n createTableEntry: action('createTableEntry')\n }\n})",...Default.parameters?.docs?.source}}},WithData.parameters={...WithData.parameters,docs:{...WithData.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n loadTableEntries: action('loadTableEntries'),\n deleteTableEntry: action('deleteTableEntry'),\n createTableEntry: action('createTableEntry')\n }\n})",...WithData.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/config-tables/config-tables.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".config-tables__section {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-5);\n}\n\n.section__separator {\n --separator-margin-top: var(--spacer-0);\n}\n.section__table-container {\n overflow-x: auto;\n}\n\n.heading {\n display: flex;\n justify-content: space-between;\n}\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__buttons {\n align-self: flex-end;\n position: relative;\n top: 1px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6119],{"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./src/design/templates/config-tables/config-tables.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithData:()=>WithData,__namedExportsOrder:()=>__namedExportsOrder,default:()=>config_tables_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs");var organization_service_mock=__webpack_require__("./src/app/_services/article/organization.service.mock.ts"),player_class_service_mock=__webpack_require__("./src/app/_services/article/player-class.service.mock.ts"),formly_service_mock=__webpack_require__("./src/app/_services/formly/formly-service.mock.ts"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var config_tables_componentngResource=__webpack_require__("./src/design/templates/config-tables/config-tables.component.scss?ngResource"),config_tables_componentngResource_default=__webpack_require__.n(config_tables_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),confirmation_toggle_button_component=__webpack_require__("./src/design/molecules/confirmation-toggle-button/confirmation-toggle-button.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let ConfigTablesComponent=class ConfigTablesComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.tableData=core.input.required(),this.loadTableEntries=new core.EventEmitter,this.deleteTableEntry=new core.EventEmitter,this.createTableEntry=new core.EventEmitter,this.tables=(0,core.computed)((()=>[{name:"Marker Type",kind:"MARKER_TYPE",icon:"tag",model:{name:null,is_text_marker:!1,icon:null,color:null},formFields:[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildCheckboxConfig({key:"is_text_marker",label:"Show name instead of Icon",defaultValue:!1}),this.formlyService.buildInputConfig({key:"icon",inputKind:"NAME"}),this.formlyService.buildInputConfig({key:"color",inputKind:"STRING"})],showForm:!1,entries:this.tableData().MARKER_TYPE},{name:"Class",kind:"PLAYER_CLASS",icon:"user",model:{name:null},formFields:[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"})],entries:this.tableData().PLAYER_CLASS,showForm:!1}])),this.campaignOverviewUrl=this.routingService.getRoutePath("campaign-overview")}createEntry(kind,entry){this.createTableEntry.emit({table:kind,entry}),this.getTable(kind).showForm=!1}getTable(kind){return this.tables().find((table=>table.kind===kind))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={tableData:[{type:core.Input,args:[{isSignal:!0,alias:"tableData",required:!0,transform:void 0}]}],loadTableEntries:[{type:core.Output}],deleteTableEntry:[{type:core.Output}],createTableEntry:[{type:core.Output}]}}};ConfigTablesComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-config-tables",template:'\n
\n \n \n \n\n \x3c!-- Sections --\x3e\n @for (table of tables(); track table.kind) {\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n {{ table.name }}\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Users --\x3e\n \n\n \n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n\n @if (!table.showForm) {\n @if (table.entries?.length === 0) {\n Load entries to see them\n }\n
\n \x3c!-- Table --\x3e\n @if (table.entries && table.entries.length > 0) {\n \n \x3c!-- Table heading --\x3e\n \n \n \n @for (\n property of table.entries[0] | keyvalue;\n track property.key\n ) {\n \n }\n \n \n \x3c!-- Table body --\x3e\n \n @for (entry of table.entries; track entry.pk) {\n \n \n @for (property of entry | keyvalue; track property.key) {\n \n }\n \n \n }\n \n
#\n {{ property.key }}\n
{{ entry.id }} {{ entry.pk }}\n {{ property.value }}\n \n \n
\n }\n
\n }\n\n @if (table.showForm) {\n \n

Adding new {{ table.name }}

\n \x3c!-- Form --\x3e\n \n
\n }\n
\n }\n\n \n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,icon_component.R,separator_component.F,confirmation_toggle_button_component.T,card_component.i,form_component.s,common.KeyValuePipe],styles:[config_tables_componentngResource_default()]})],ConfigTablesComponent);const config_tables_stories={title:"DesignSystem/Templates/ConfigTablesComponent",component:ConfigTablesComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],declarations:[],providers:[formly_service_mock.p]})],args:{campaignName:"Aldrune",state:"CREATE",userModel:{},serverModel:void 0,classOptions:player_class_service_mock.T,organizations:organization_service_mock.n}},Template=args=>({props:{...args,loadTableEntries:(0,dist.XI)("loadTableEntries"),deleteTableEntry:(0,dist.XI)("deleteTableEntry"),createTableEntry:(0,dist.XI)("createTableEntry")}}),Default=Template.bind({});Default.args={};const WithData=Template.bind({});WithData.args={tableData:{MARKER_TYPE:[{name:"Forest",icon:"tree",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:05.887185Z",fontawesome_type:"fa",color:"darkgreen",id:1},{name:"Capital",icon:"university",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:26.682656Z",fontawesome_type:"fa",color:"purple",id:2},{name:"Cathedral",icon:"place-of-worship",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:51:51.177824Z",fontawesome_type:"fas",color:"orange",id:3},{name:"Cave",icon:"moon",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:07:40.729354Z",fontawesome_type:"fas",color:"gray",id:4},{name:"Event",icon:"exclamation",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:01.355792Z",fontawesome_type:"fa",color:"red",id:5},{name:"Fort",icon:"fort-awesome",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:50:41.269164Z",fontawesome_type:"fa",color:"lightgray",id:6},{name:"Grove",icon:"paw",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:25.319406Z",fontawesome_type:"fa",color:"green",id:7},{name:"Mountain",icon:"mountain",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:52:02.398844Z",fontawesome_type:"fas",color:"beige",id:8},{name:"Ruin",icon:"dungeon",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:46:02.394436Z",fontawesome_type:"fas",color:"lightgray",id:9},{name:"Town",icon:"info",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:29:00.320971Z",fontawesome_type:"fa",color:"blue",id:10},{name:"Settlement",icon:"home",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:55.824551Z",fontawesome_type:"fa",color:"lightgreen",id:11},{name:"Docks",icon:"anchor",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:49.646018Z",fontawesome_type:"fa",color:"blue",id:12},{name:"Building",icon:"home",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:17.955863Z",fontawesome_type:"fa",color:"lightgray",id:13},{name:"Religious Structure",icon:"place-of-worship",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:17:57.221134Z",fontawesome_type:"fas",color:"orange",id:14},{name:"Beach",icon:"umbrella-beach",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:09:38.596422Z",fontawesome_type:"fas",color:"lightblue",id:15},{name:"Canal",icon:"tint",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:22.172661Z",fontawesome_type:"fa",color:"lightblue",id:16},{name:"Cliff",icon:"mountain",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:37.095700Z",fontawesome_type:"fa",color:"beige",id:17},{name:"District",icon:"diamond",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:41.761572Z",fontawesome_type:"fa",color:"black",id:18},{name:"Garden/Park",icon:"tree",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:17.516375Z",fontawesome_type:"fa",color:"lightgreen",id:19},{name:"Estate",icon:"gavel",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:27:57.200846Z",fontawesome_type:"fa",color:"purple",id:20},{name:"Academy Related",icon:"hat-wizard",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T16:23:53.376734Z",fontawesome_type:"fas",color:"lightgray",id:21},{name:"Outposts",icon:"chess-rook",is_text_marker:!1,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-29T04:51:24.882128Z",fontawesome_type:"fas",color:"lightgray",id:22},{name:"Sea/Ocean",icon:"water",is_text_marker:!0,creation_datetime:"2021-07-03T17:56:33.339291Z",update_datetime:"2021-07-27T15:28:51.303357Z",fontawesome_type:"fa",color:"gray",id:23},{name:"Underwater Ruins",icon:"dungeon",is_text_marker:!1,creation_datetime:"2021-07-27T15:59:53.480354Z",update_datetime:"2021-07-27T16:01:53.702694Z",fontawesome_type:"fas",color:"lightblue",id:24},{name:"Palace",icon:"crown",is_text_marker:!1,creation_datetime:"2021-07-27T16:14:14.295182Z",update_datetime:"2021-07-27T16:14:14.295249Z",fontawesome_type:"fas",color:"lightgray",id:25},{name:"Store",icon:"store",is_text_marker:!1,creation_datetime:"2021-07-27T16:18:35.147729Z",update_datetime:"2021-07-27T16:18:35.147809Z",fontawesome_type:"fas",color:"lightgray",id:26},{name:"Inn",icon:"hotel",is_text_marker:!1,creation_datetime:"2021-07-27T16:22:11.783529Z",update_datetime:"2021-07-27T16:22:11.783599Z",fontawesome_type:"fas",color:"lightgray",id:27},{name:"Monument",icon:"monument",is_text_marker:!1,creation_datetime:"2021-07-27T16:22:26.373214Z",update_datetime:"2021-07-27T16:22:26.373289Z",fontawesome_type:"fas",color:"lightgray",id:28}],PLAYER_CLASS:player_class_service_mock.T}};const __namedExportsOrder=["Default","WithData"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n loadTableEntries: action('loadTableEntries'),\n deleteTableEntry: action('deleteTableEntry'),\n createTableEntry: action('createTableEntry')\n }\n})",...Default.parameters?.docs?.source}}},WithData.parameters={...WithData.parameters,docs:{...WithData.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n loadTableEntries: action('loadTableEntries'),\n deleteTableEntry: action('deleteTableEntry'),\n createTableEntry: action('createTableEntry')\n }\n})",...WithData.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/config-tables/config-tables.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".config-tables__section {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-5);\n}\n\n.section__separator {\n --separator-margin-top: var(--spacer-0);\n}\n.section__table-container {\n overflow-x: auto;\n}\n\n.heading {\n display: flex;\n justify-content: space-between;\n}\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__buttons {\n align-self: flex-end;\n position: relative;\n top: 1px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-profile-profile-stories.f6e994fd.iframe.bundle.js b/design-templates-profile-profile-stories.ceffc5ac.iframe.bundle.js similarity index 92% rename from design-templates-profile-profile-stories.f6e994fd.iframe.bundle.js rename to design-templates-profile-profile-stories.ceffc5ac.iframe.bundle.js index 8dc2de970..d4916e368 100644 --- a/design-templates-profile-profile-stories.f6e994fd.iframe.bundle.js +++ b/design-templates-profile-profile-stories.ceffc5ac.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[8823],{"./src/app/_models/token.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>CampaignRoles});const CampaignRoles=["member","admin","guest","globalguest","globalmember"]},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/utils/token.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>TokenService});var TokenService_1,tslib__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_common_http__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),src_app_models_token__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/app/_models/token.ts"),src_environments_environment__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/environments/environment.ts"),src_utils_logging__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/logging.ts");let TokenService=class TokenService{static{TokenService_1=this}static{this.USER_DATA_KEY="user_data"}constructor(http){this.http=http,this.apiUrl=src_environments_environment__WEBPACK_IMPORTED_MODULE_0__.c.apiUrl,this.jwtTokenUrl=`${this.apiUrl}/token`,this.refreshTokenUrl=`${this.apiUrl}/token/refresh`,this.ID_IDENTIFIER_PREFIX="id_"}login(loginData){return this.http.post(this.jwtTokenUrl,loginData)}logout(){}refreshUserData(){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_1__.R)(this.refreshUserData.name);const refreshToken=TokenService_1.getRefreshToken()?.token;if(!refreshToken)return;const httpHeaders=(new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__.Lr).set("Authorization",`Bearer ${refreshToken}`);return this.http.post(this.refreshTokenUrl,{refresh:refreshToken},{headers:httpHeaders})}invalidateJWTToken(){}static getUserData(){const rawUserData=localStorage.getItem(TokenService_1.USER_DATA_KEY);return null!=rawUserData&&"undefined"!==rawUserData?JSON.parse(rawUserData):void 0}static getAccessToken(){return this.getUserData()?.accessToken}static getRefreshToken(){return this.getUserData()?.refreshToken}setUserData(data){localStorage.setItem(TokenService_1.USER_DATA_KEY,JSON.stringify(data))}getCampaignRole(data,campaignName){if(null==campaignName)return;const memberships=this.getCampaignMemberships(data);if(null==memberships)return;const role=memberships[campaignName.toLowerCase()];return src_app_models_token__WEBPACK_IMPORTED_MODULE_3__.u.some((roleName=>roleName===role))?role:void 0}getCampaignMemberships(data){if(null==data)return;const campaignMemberships={};for(const campaignIdentifier of Object.keys(data.campaignMemberships)){campaignIdentifier.startsWith(this.ID_IDENTIFIER_PREFIX)||(campaignMemberships[campaignIdentifier.toLowerCase()]=data.campaignMemberships[campaignIdentifier])}return campaignMemberships}isAccessTokenExpired(){return this.isTokenExpired(TokenService_1.getAccessToken())}isRefreshTokenExpired(){return this.isTokenExpired(TokenService_1.getRefreshToken())}isTokenExpired(token){if(null==token)return!0;const expiryTimestamp=token.exp,currentTimestamp=Math.floor((new Date).getTime()/1e3),isExpired=currentTimestamp>=expiryTimestamp;if(isExpired){const currentDate=new Date(1e3*currentTimestamp).toString(),expiryDate=new Date(1e3*expiryTimestamp).toString(),tokenName=token.type.toLocaleUpperCase();console.log(`\n ${tokenName} Token is expired. \n Request timestamp: ${currentDate}. \n Token expiry timestamp: ${expiryDate}\n `)}return isExpired}static{this.ctorParameters=()=>[{type:_angular_common_http__WEBPACK_IMPORTED_MODULE_2__.Qq}]}};TokenService=TokenService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_4__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({providedIn:"root"})],TokenService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/profile/profile.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>profile_stories});var TokenMockService_1,testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),of=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),token=__webpack_require__("./src/app/_models/token.ts");const dummyUserData={accessToken:{token:"abcdef123456",exp:1678923456,type:"access"},refreshToken:{token:"ghijkl789012",exp:1678923456,type:"refresh"},userId:123,userName:"john_doe",isAdmin:!0,isSuperUser:!1,campaignMemberships:{campaign1:"admin",campaign2:"member",campaign3:"guest"}};let TokenMockService=TokenMockService_1=class TokenMockService{constructor(){this.ID_IDENTIFIER_PREFIX="id_"}login(userModel){return(0,of.of)(dummyUserData)}refreshUserData(){return(0,of.of)(dummyUserData)}invalidateJWTToken(){}static getUserData(){return dummyUserData}hasTokens(){return null!=TokenMockService_1.getUserData()&&(!!TokenMockService_1.getAccessToken()&&!!TokenMockService_1.getRefreshToken())}hasValidJWTToken(){return!!this.hasTokens()&&!this.isTokenExpired(TokenMockService_1.getRefreshToken())}static getAccessToken(){return this.getUserData().accessToken}static getRefreshToken(){return this.getUserData().refreshToken}setUserData(data){console.log("set user data: ",data)}removeJWTTokenFromLocalStorage(){console.log("removeJWTTokenFromLocalStorage")}getCurrentUserPk(){return TokenMockService_1.getUserData().userId}isAdmin(){const data=TokenMockService_1.getUserData();return null!=data&&data.isAdmin}isSuperUser(){const data=TokenMockService_1.getUserData();return null!=data&&data.isSuperUser}getCurrentUserName(){return TokenMockService_1.getUserData()?.userName}isCampaignMember(campaignName){const role=this.getCampaignRole(campaignName);return null!=role&&(this.isSuperUser()||this.isAdmin()||"member"===role||"admin"===role)}isCampaignAdmin(campaignName){return this.isSuperUser()||this.isAdmin()||"admin"===this.getCampaignRole(campaignName)}isCampaignGuest(campaignName){return this.isSuperUser()||this.isAdmin()||"guest"===this.getCampaignRole(campaignName)}getCampaignRole(campaignName){if(null==campaignName)return;const memberships=this.getCampaignMemberships();if(null==memberships)return;const role=memberships[campaignName.toLowerCase()];return token.u.some((roleName=>roleName===role))?role:void 0}getCampaignMemberships(){const data=TokenMockService_1.getUserData(),campaignMemberships={};for(const campaignIdentifier of Object.keys(data.campaignMemberships)){campaignIdentifier.startsWith(this.ID_IDENTIFIER_PREFIX)||(campaignMemberships[campaignIdentifier.toLowerCase()]=data.campaignMemberships[campaignIdentifier])}return campaignMemberships}isAccessTokenExpired(){return this.isTokenExpired(TokenMockService_1.getAccessToken())}isRefreshTokenExpired(){return this.isTokenExpired(TokenMockService_1.getRefreshToken())}isTokenExpired(token){const expiryTimestamp=token.exp,currentTimestamp=Math.floor((new Date).getTime()/1e3),isExpired=currentTimestamp>=expiryTimestamp;return isExpired&&console.log(`${token.type} Token is expired. Request timestamp: ${new Date(1e3*currentTimestamp).toString()}. Token expiry timestamp: ${new Date(1e3*expiryTimestamp).toString()}`),isExpired}};TokenMockService=TokenMockService_1=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],TokenMockService);var token_service=__webpack_require__("./src/app/_services/utils/token.service.ts");var profile_componentngResource=__webpack_require__("./src/design/templates/profile/profile.component.scss?ngResource"),profile_componentngResource_default=__webpack_require__.n(profile_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),alert_component=__webpack_require__("./src/design/atoms/alert/alert.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),confirmation_toggle_button_component=__webpack_require__("./src/design/molecules/confirmation-toggle-button/confirmation-toggle-button.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let ProfileComponent=class ProfileComponent{constructor(formlyService){this.formlyService=formlyService,this.canDeleteProfile=!1,this.showProfileEditForm=!1,this.showPasswordEditForm=!1,this.backUrl=core.input.required(),this.profileUpdate=new core.EventEmitter,this.passwordUpdate=new core.EventEmitter,this.campaignLeave=new core.EventEmitter,this.profileDelete=new core.EventEmitter,this.passwordModel={},this.passwordFields=[this.formlyService.buildSinglePasswordConfig({key:"oldPassword",label:"Your old password"}),this.formlyService.buildConfirmedPasswordConfig({label:"New Password"})],this.profileModel={},this.profileFields=[this.formlyService.buildInputConfig({key:"username",inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"email",required:!1,inputKind:"STRING"})]}toggleProfileEditState(){this.showProfileEditForm=!this.showProfileEditForm,this.showProfileEditForm&&(this.profileModel={username:this.user.username,email:this.user.email})}submitProfileUpdate(){this.profileUpdate.emit(this.profileModel),this.showProfileEditForm=!1}togglePasswordEditState(){this.showPasswordEditForm=!this.showPasswordEditForm,this.showPasswordEditForm&&(this.passwordModel={})}updatePassword(){const hasNewPassword=null!=this.passwordModel.password,hasOldPassword=null!=this.passwordModel.oldPassword;hasNewPassword&&hasOldPassword&&(this.passwordUpdate.emit(this.passwordModel),this.showPasswordEditForm=!1)}toggleLeaveCampaignState(membership){membership.isLeaving=!membership.isLeaving}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={user:[{type:core.Input}],memberships:[{type:core.Input}],canDeleteProfile:[{type:core.Input}],showProfileEditForm:[{type:core.Input}],showPasswordEditForm:[{type:core.Input}],campaignName:[{type:core.Input}],backUrl:[{type:core.Input,args:[{isSignal:!0,alias:"backUrl",required:!0,transform:void 0}]}],profileUpdate:[{type:core.Output}],passwordUpdate:[{type:core.Output}],campaignLeave:[{type:core.Output}],profileDelete:[{type:core.Output}]}}};ProfileComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-profile",template:'\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Profile\n

\n\n \x3c!-- Header Buttons --\x3e\n
\n \n\n \n
\n
\n\n \n\n \x3c!-- Profile --\x3e\n @if (!showProfileEditForm) {\n
\n

Profile Data

\n
Username
\n
{{ user.username }}
\n
Email
\n
{{ user.email }}
\n
\n
\n

Campaign Memberships

\n @for (membership of memberships; track membership; let i = $index) {\n
\n \n
\n }\n
\n } @else {\n \n \n \n }\n\n \x3c!-- Password Form --\x3e\n @if (showPasswordEditForm) {\n \n \n \n }\n\n
\n
\n \n \n \n
\n\n @if (canDeleteProfile) {\n
\n \n
\n }\n
\n
\n
\n\n\n
\n
{{ context.membership.campaignName | titlecase }}
\n
{{ context.membership.role | titlecase }}
\n
\n \n
\n
\n
\n\n\n \n
\n Permanently leave \'{{\n context.membership.campaignName | titlecase\n }}\'?\n
\n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,icon_component.R,button_component.Q,separator_component.F,common.NgTemplateOutlet,card_component.i,form_component.s,router.Wk,confirmation_toggle_button_component.T,alert_component.C,common.TitleCasePipe],styles:[profile_componentngResource_default()]})],ProfileComponent);const profile_stories={title:"DesignSystem/Templates/ProfileComponent",component:ProfileComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],providers:[{provide:token_service.B,useClass:TokenMockService}]})],args:{user:{username:"john_doe",password:"password123",pk:1,api_permissions:["read","write"],groups:[1,2],group_details:[{name:"Group A",pk:1},{name:"Group B",pk:2}],is_staff:!1,is_superuser:!1,email:"john_doe@example-long-email-address.com",is_active:!0},campaignName:"Aldrune",memberships:[{campaignName:"Campaign A",role:"admin",isLeaving:!1},{campaignName:"Campaign B",role:"member",isLeaving:!1},{campaignName:"Campaign C",role:"guest",isLeaving:!1}],canDeleteProfile:!0,showProfileEditForm:!1,showPasswordEditForm:!1}},Default=(args=>({props:{...args,profileUpdate:(0,dist.XI)("profileUpdate"),profileDelete:(0,dist.XI)("profileDelete"),campaignLeave:(0,dist.XI)("campaignLeave"),passwordUpdate:(0,dist.XI)("passwordUpdate")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n profileUpdate: action('profileUpdate'),\n profileDelete: action('profileDelete'),\n campaignLeave: action('campaignLeave'),\n passwordUpdate: action('passwordUpdate')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/profile/profile.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".profile__data {\n margin-bottom: var(--spacer-4);\n}\n\n.heading {\n display: flex;\n justify-content: space-between;\n}\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__buttons {\n position: relative;\n display: flex;\n align-self: flex-end;\n justify-content: flex-end;\n top: 1px;\n}\n.heading__button {\n border: var(--bs-white) 1px solid;\n border-radius: var(--bs-border-radius);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[8823],{"./src/app/_models/token.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>CampaignRoles});const CampaignRoles=["member","admin","guest","globalguest","globalmember"]},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/utils/token.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>TokenService});var TokenService_1,tslib__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_common_http__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),src_app_models_token__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/app/_models/token.ts"),src_environments_environment__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/environments/environment.ts"),src_utils_logging__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/logging.ts");let TokenService=class TokenService{static{TokenService_1=this}static{this.USER_DATA_KEY="user_data"}constructor(http){this.http=http,this.apiUrl=src_environments_environment__WEBPACK_IMPORTED_MODULE_0__.c.apiUrl,this.jwtTokenUrl=`${this.apiUrl}/token`,this.refreshTokenUrl=`${this.apiUrl}/token/refresh`,this.ID_IDENTIFIER_PREFIX="id_"}login(loginData){return this.http.post(this.jwtTokenUrl,loginData)}logout(){}refreshUserData(){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_1__.R)(this.refreshUserData.name);const refreshToken=TokenService_1.getRefreshToken()?.token;if(!refreshToken)return;const httpHeaders=(new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__.Lr).set("Authorization",`Bearer ${refreshToken}`);return this.http.post(this.refreshTokenUrl,{refresh:refreshToken},{headers:httpHeaders})}invalidateJWTToken(){}static getUserData(){const rawUserData=localStorage.getItem(TokenService_1.USER_DATA_KEY);return null!=rawUserData&&"undefined"!==rawUserData?JSON.parse(rawUserData):void 0}static getAccessToken(){return this.getUserData()?.accessToken}static getRefreshToken(){return this.getUserData()?.refreshToken}setUserData(data){localStorage.setItem(TokenService_1.USER_DATA_KEY,JSON.stringify(data))}getCampaignRole(data,campaignName){if(null==campaignName)return;const memberships=this.getCampaignMemberships(data);if(null==memberships)return;const role=memberships[campaignName.toLowerCase()];return src_app_models_token__WEBPACK_IMPORTED_MODULE_3__.u.some((roleName=>roleName===role))?role:void 0}getCampaignMemberships(data){if(null==data)return;const campaignMemberships={};for(const campaignIdentifier of Object.keys(data.campaignMemberships)){campaignIdentifier.startsWith(this.ID_IDENTIFIER_PREFIX)||(campaignMemberships[campaignIdentifier.toLowerCase()]=data.campaignMemberships[campaignIdentifier])}return campaignMemberships}isAccessTokenExpired(){return this.isTokenExpired(TokenService_1.getAccessToken())}isRefreshTokenExpired(){return this.isTokenExpired(TokenService_1.getRefreshToken())}isTokenExpired(token){if(null==token)return!0;const expiryTimestamp=token.exp,currentTimestamp=Math.floor((new Date).getTime()/1e3),isExpired=currentTimestamp>=expiryTimestamp;if(isExpired){const currentDate=new Date(1e3*currentTimestamp).toString(),expiryDate=new Date(1e3*expiryTimestamp).toString(),tokenName=token.type.toLocaleUpperCase();console.log(`\n ${tokenName} Token is expired. \n Request timestamp: ${currentDate}. \n Token expiry timestamp: ${expiryDate}\n `)}return isExpired}static{this.ctorParameters=()=>[{type:_angular_common_http__WEBPACK_IMPORTED_MODULE_2__.Qq}]}};TokenService=TokenService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_4__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({providedIn:"root"})],TokenService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/profile/profile.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>profile_stories});var TokenMockService_1,testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),of=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),token=__webpack_require__("./src/app/_models/token.ts");const dummyUserData={accessToken:{token:"abcdef123456",exp:1678923456,type:"access"},refreshToken:{token:"ghijkl789012",exp:1678923456,type:"refresh"},userId:123,userName:"john_doe",isAdmin:!0,isSuperUser:!1,campaignMemberships:{campaign1:"admin",campaign2:"member",campaign3:"guest"}};let TokenMockService=TokenMockService_1=class TokenMockService{constructor(){this.ID_IDENTIFIER_PREFIX="id_"}login(userModel){return(0,of.of)(dummyUserData)}refreshUserData(){return(0,of.of)(dummyUserData)}invalidateJWTToken(){}static getUserData(){return dummyUserData}hasTokens(){return null!=TokenMockService_1.getUserData()&&(!!TokenMockService_1.getAccessToken()&&!!TokenMockService_1.getRefreshToken())}hasValidJWTToken(){return!!this.hasTokens()&&!this.isTokenExpired(TokenMockService_1.getRefreshToken())}static getAccessToken(){return this.getUserData().accessToken}static getRefreshToken(){return this.getUserData().refreshToken}setUserData(data){console.log("set user data: ",data)}removeJWTTokenFromLocalStorage(){console.log("removeJWTTokenFromLocalStorage")}getCurrentUserPk(){return TokenMockService_1.getUserData().userId}isAdmin(){const data=TokenMockService_1.getUserData();return null!=data&&data.isAdmin}isSuperUser(){const data=TokenMockService_1.getUserData();return null!=data&&data.isSuperUser}getCurrentUserName(){return TokenMockService_1.getUserData()?.userName}isCampaignMember(campaignName){const role=this.getCampaignRole(campaignName);return null!=role&&(this.isSuperUser()||this.isAdmin()||"member"===role||"admin"===role)}isCampaignAdmin(campaignName){return this.isSuperUser()||this.isAdmin()||"admin"===this.getCampaignRole(campaignName)}isCampaignGuest(campaignName){return this.isSuperUser()||this.isAdmin()||"guest"===this.getCampaignRole(campaignName)}getCampaignRole(campaignName){if(null==campaignName)return;const memberships=this.getCampaignMemberships();if(null==memberships)return;const role=memberships[campaignName.toLowerCase()];return token.u.some((roleName=>roleName===role))?role:void 0}getCampaignMemberships(){const data=TokenMockService_1.getUserData(),campaignMemberships={};for(const campaignIdentifier of Object.keys(data.campaignMemberships)){campaignIdentifier.startsWith(this.ID_IDENTIFIER_PREFIX)||(campaignMemberships[campaignIdentifier.toLowerCase()]=data.campaignMemberships[campaignIdentifier])}return campaignMemberships}isAccessTokenExpired(){return this.isTokenExpired(TokenMockService_1.getAccessToken())}isRefreshTokenExpired(){return this.isTokenExpired(TokenMockService_1.getRefreshToken())}isTokenExpired(token){const expiryTimestamp=token.exp,currentTimestamp=Math.floor((new Date).getTime()/1e3),isExpired=currentTimestamp>=expiryTimestamp;return isExpired&&console.log(`${token.type} Token is expired. Request timestamp: ${new Date(1e3*currentTimestamp).toString()}. Token expiry timestamp: ${new Date(1e3*expiryTimestamp).toString()}`),isExpired}};TokenMockService=TokenMockService_1=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],TokenMockService);var token_service=__webpack_require__("./src/app/_services/utils/token.service.ts");var profile_componentngResource=__webpack_require__("./src/design/templates/profile/profile.component.scss?ngResource"),profile_componentngResource_default=__webpack_require__.n(profile_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),alert_component=__webpack_require__("./src/design/atoms/alert/alert.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),confirmation_toggle_button_component=__webpack_require__("./src/design/molecules/confirmation-toggle-button/confirmation-toggle-button.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts");let ProfileComponent=class ProfileComponent{constructor(formlyService){this.formlyService=formlyService,this.canDeleteProfile=!1,this.showProfileEditForm=!1,this.showPasswordEditForm=!1,this.backUrl=core.input.required(),this.profileUpdate=new core.EventEmitter,this.passwordUpdate=new core.EventEmitter,this.campaignLeave=new core.EventEmitter,this.profileDelete=new core.EventEmitter,this.passwordModel={},this.passwordFields=[this.formlyService.buildSinglePasswordConfig({key:"oldPassword",label:"Your old password"}),this.formlyService.buildConfirmedPasswordConfig({label:"New Password"})],this.profileModel={},this.profileFields=[this.formlyService.buildInputConfig({key:"username",inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"email",required:!1,inputKind:"STRING"})]}toggleProfileEditState(){this.showProfileEditForm=!this.showProfileEditForm,this.showProfileEditForm&&(this.profileModel={username:this.user.username,email:this.user.email})}submitProfileUpdate(){this.profileUpdate.emit(this.profileModel),this.showProfileEditForm=!1}togglePasswordEditState(){this.showPasswordEditForm=!this.showPasswordEditForm,this.showPasswordEditForm&&(this.passwordModel={})}updatePassword(){const hasNewPassword=null!=this.passwordModel.password,hasOldPassword=null!=this.passwordModel.oldPassword;hasNewPassword&&hasOldPassword&&(this.passwordUpdate.emit(this.passwordModel),this.showPasswordEditForm=!1)}toggleLeaveCampaignState(membership){membership.isLeaving=!membership.isLeaving}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={user:[{type:core.Input}],memberships:[{type:core.Input}],canDeleteProfile:[{type:core.Input}],showProfileEditForm:[{type:core.Input}],showPasswordEditForm:[{type:core.Input}],campaignName:[{type:core.Input}],backUrl:[{type:core.Input,args:[{isSignal:!0,alias:"backUrl",required:!0,transform:void 0}]}],profileUpdate:[{type:core.Output}],passwordUpdate:[{type:core.Output}],campaignLeave:[{type:core.Output}],profileDelete:[{type:core.Output}]}}};ProfileComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-profile",template:'\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Profile\n

\n\n \x3c!-- Header Buttons --\x3e\n
\n \n\n \n
\n
\n\n \n\n \x3c!-- Profile --\x3e\n @if (!showProfileEditForm) {\n
\n

Profile Data

\n
Username
\n
{{ user.username }}
\n
Email
\n
{{ user.email }}
\n
\n
\n

Campaign Memberships

\n @for (membership of memberships; track membership; let i = $index) {\n
\n \n
\n }\n
\n } @else {\n \n \n \n }\n\n \x3c!-- Password Form --\x3e\n @if (showPasswordEditForm) {\n \n \n \n }\n\n
\n
\n \n \n \n
\n\n @if (canDeleteProfile) {\n
\n \n
\n }\n
\n
\n
\n\n\n
\n
{{ context.membership.campaignName | titlecase }}
\n
{{ context.membership.role | titlecase }}
\n
\n \n
\n
\n
\n\n\n \n
\n Permanently leave \'{{\n context.membership.campaignName | titlecase\n }}\'?\n
\n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,icon_component.R,button_component.Q,separator_component.F,common.NgTemplateOutlet,card_component.i,form_component.s,router.Wk,confirmation_toggle_button_component.T,alert_component.C,common.TitleCasePipe],styles:[profile_componentngResource_default()]})],ProfileComponent);const profile_stories={title:"DesignSystem/Templates/ProfileComponent",component:ProfileComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],providers:[{provide:token_service.B,useClass:TokenMockService}]})],args:{user:{username:"john_doe",password:"password123",pk:1,api_permissions:["read","write"],groups:[1,2],group_details:[{name:"Group A",pk:1},{name:"Group B",pk:2}],is_staff:!1,is_superuser:!1,email:"john_doe@example-long-email-address.com",is_active:!0},campaignName:"Aldrune",memberships:[{campaignName:"Campaign A",role:"admin",isLeaving:!1},{campaignName:"Campaign B",role:"member",isLeaving:!1},{campaignName:"Campaign C",role:"guest",isLeaving:!1}],canDeleteProfile:!0,showProfileEditForm:!1,showPasswordEditForm:!1}},Default=(args=>({props:{...args,profileUpdate:(0,dist.XI)("profileUpdate"),profileDelete:(0,dist.XI)("profileDelete"),campaignLeave:(0,dist.XI)("campaignLeave"),passwordUpdate:(0,dist.XI)("passwordUpdate")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n profileUpdate: action('profileUpdate'),\n profileDelete: action('profileDelete'),\n campaignLeave: action('campaignLeave'),\n passwordUpdate: action('passwordUpdate')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/profile/profile.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".profile__data {\n margin-bottom: var(--spacer-4);\n}\n\n.heading {\n display: flex;\n justify-content: space-between;\n}\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__buttons {\n position: relative;\n display: flex;\n align-self: flex-end;\n justify-content: flex-end;\n top: 1px;\n}\n.heading__button {\n border: var(--bs-white) 1px solid;\n border-radius: var(--bs-border-radius);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-site-admin-site-admin-stories.2b613e4d.iframe.bundle.js b/design-templates-site-admin-site-admin-stories.9937a8c9.iframe.bundle.js similarity index 92% rename from design-templates-site-admin-site-admin-stories.2b613e4d.iframe.bundle.js rename to design-templates-site-admin-site-admin-stories.9937a8c9.iframe.bundle.js index b228ff780..57becc205 100644 --- a/design-templates-site-admin-site-admin-stories.2b613e4d.iframe.bundle.js +++ b/design-templates-site-admin-site-admin-stories.9937a8c9.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6719],{"./src/app/_services/article/group.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>dummyGroups});const dummyGroups=[{url:"https://example.com/group1",name:"Group 1",permissions:["read","write"],id:1},{url:"https://example.com/group2",name:"Group 2",permissions:["read","delete"],id:2},{url:"https://example.com/group3",name:"Group 3",permissions:["write","execute"],id:3},{url:"https://example.com/admin",name:"Admin",permissions:["read","write","delete","execute"],id:4},{url:"https://example.com/guest",name:"Guest",permissions:["read"],id:5},{url:"https://example.com/member",name:"Member",permissions:["read","write"],id:6}]},"./src/app/_services/article/user.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>dummyUsers});const dummyUsers=[{username:"isofruit",pk:3,email:"philippmdoerner@web.de",is_staff:!0,is_superuser:!0,is_active:!0,groups:[3,4],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Aldrune_campaign_admin_group",pk:4}]},{username:"Rhiannon",pk:6,email:"dianaday@gmx.net",is_staff:!1,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"SamDay",pk:7,email:void 0,is_staff:!0,is_superuser:!1,is_active:!0,groups:[],group_details:[]},{username:"Murtagh",pk:8,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,6],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_guest_campaign_group",pk:6}]},{username:"Ailis",pk:9,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Caitriona",pk:10,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,7,8],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_campaign_group",pk:7},{name:"Jōzai Corporation_campaign_admin_group",pk:8}]},{username:"Fen",pk:11,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"Bathilde",pk:12,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,7],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Guest",pk:14,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Relentless",pk:15,email:"philipp3000doerner@web.de",is_staff:!0,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"Guest2",pk:16,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Mipp1",pk:17,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Spleeti",pk:18,email:"Laura.spleet@posteo.de",is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Christian",pk:19,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Norbert",pk:20,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Papa",pk:21,email:"Dr.KlemensDoerner@gmx.de",is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Tecatin",pk:22,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[7],group_details:[{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Roach",pk:23,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5,7],group_details:[{name:"Aldrune_guest_campaign_group",pk:5},{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Mav",pk:25,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Sam",pk:28,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[4],group_details:[{name:"Aldrune_campaign_admin_group",pk:4}]}]},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/app/_services/utils/campaign.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_B:()=>dummyCampaigns,jr:()=>dummyCampaign,mE:()=>dummyStatistics});const dummyCampaigns=[{pk:1,name:"Aldrune",subtitle:"A campaign made by Samuel Day and recorded by Philipp Dörner
through the eyes of Relentless",background_image:"/media/campaign_backgrounds/bg.jpg",is_deactivated:!1,has_audio_recording_permission:!0,icon:"/media/campaign_icons/favicon-128x128.png",default_map:1,default_map_details:{icon:"map",image:"pic05_sMT2d6M.jpg",name:"Aldrune",id:1},duration:{start_date:"2020-04-07T00:00:00.000000Z",last_date:"2023-04-11T00:00:00.000000Z"}},{pk:2,name:"Jōzai Corp",subtitle:"Welcome to Jōzai Corp, please enjoy your employment.",background_image:"/media/campaign_backgrounds/shanghai_city_snlaYDd.jpg",is_deactivated:!1,has_audio_recording_permission:!1,icon:"/media/campaign_icons/icon.png",default_map:void 0,default_map_details:void 0,duration:{start_date:"2022-01-15T00:00:00.000000Z",last_date:"2022-02-19T00:00:00.000000Z"}}],dummyStatistics={character_count:265,item_count:142,location_count:229,creature_count:42,diaryentry_count:101,encounter_count:954,organization_count:46,quest_count:69,quote_count:203,session_audio_count:69,timestamp_count:1121,map_count:7,marker_count:136,spell_count:22,session_count:90,rule_count:17},dummyCampaign={name:"Aldrune",subtitle:"A campaign for testing",pk:1,background_image:"/assets/default_images/audio_pic_default.webp",icon:"https://www.aldrune.com/media/campaign_icons/favicon-128x128.png",default_map:123,default_map_details:{id:123,name:"Default Map",icon:"plus",image:"blub.jpg"},is_deactivated:!1,has_audio_recording_permission:!0,members:[{username:"isofruit",password:"password1",pk:1,api_permissions:["permission1","permission2"],groups:[1,2],group_details:[{name:"group1",pk:1},{name:"group2",pk:2}],is_staff:!0,is_superuser:!1,email:"user1@example.com",is_active:!0},{username:"user2",password:"password2",pk:2,api_permissions:["permission3","permission4"],groups:[1,3],group_details:[{name:"group1",pk:1},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user2@example.com",is_active:!0}],admins:[{username:"admin",password:"adminpassword",pk:3,api_permissions:["permission1","permission2","permission3","permission4"],groups:[1,2,3],group_details:[{name:"group1",pk:1},{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!0,is_superuser:!0,email:"admin@example.com",is_active:!0},{username:"user3",password:"password3",pk:4,api_permissions:["permission1"],groups:[1],group_details:[{name:"group1",pk:1}],is_staff:!1,is_superuser:!1,email:"user3@example.com",is_active:!0}],guests:[{username:"user4",password:"password4",pk:5,api_permissions:["permission2","permission3"],groups:[2,3],group_details:[{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user4@example.com",is_active:!0},{username:"user5",password:"password5",pk:6,api_permissions:["permission4"],groups:[3],group_details:[{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user5@example.com",is_active:!0}],member_group_name:"Members",admin_group_name:"Admins",guest_group_name:"Guests",emptySearchResponses:[{id:1,text:"Empty response 1",campaign:1},{id:2,text:"Empty response 2",campaign:1}]}},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/design/organisms/user-row/user-row.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>UserRowComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var user_row_componentngResource=__webpack_require__("./src/design/organisms/user-row/user-row.component.scss?ngResource"),user_row_componentngResource_default=__webpack_require__.n(user_row_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");let UserRowComponent=class UserRowComponent{constructor(){this.user=core.input.required(),this.groups=(0,core.input)(),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.addGroup=new core.EventEmitter,this.removeGroup=new core.EventEmitter,this.deleteUser=new core.EventEmitter,this.userGroupEntries=(0,core.computed)((()=>this.user().group_details?.map((group=>({badgeValue:group.pk,text:group.name})))??[]))}static{this.propDecorators={user:[{type:core.Input,args:[{isSignal:!0,alias:"user",required:!0,transform:void 0}]}],groups:[{type:core.Input,args:[{isSignal:!0,alias:"groups",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],addGroup:[{type:core.Output}],removeGroup:[{type:core.Output}],deleteUser:[{type:core.Output}]}}};UserRowComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-user-row",template:'
\n

\n
\n \n {{ user().username | titlecase }}\n @if (!user().is_active) {\n (†) \n }\n
\n

\n\n
\n \n
\n\n
\n
\n \n Email:\n
\n
{{ user().email ?? "Not Provided" }}
\n
\n\n @if (user().is_active) {\n \n }\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[icon_component.R,molecules.pn,common.TitleCasePipe,molecules.Ts],styles:[user_row_componentngResource_default()]})],UserRowComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/site-admin/site-admin.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>site_admin_stories});var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),group_service_mock=__webpack_require__("./src/app/_services/article/group.service.mock.ts"),user_mock_service=__webpack_require__("./src/app/_services/article/user.mock.service.ts"),campaign_mock_service=__webpack_require__("./src/app/_services/utils/campaign.mock.service.ts"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var site_admin_componentngResource=__webpack_require__("./src/design/templates/site-admin/site-admin.component.scss?ngResource"),site_admin_componentngResource_default=__webpack_require__.n(site_admin_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),collapsible_panel_component=__webpack_require__("./src/design/molecules/collapsible-panel/collapsible-panel.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts"),user_row_component=__webpack_require__("./src/design/organisms/user-row/user-row.component.ts");let SiteAdminComponent=class SiteAdminComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.createCampaign=new core.EventEmitter,this.createUser=new core.EventEmitter,this.addUserGroup=new core.EventEmitter,this.removeUserGroup=new core.EventEmitter,this.downloadDatabase=new core.EventEmitter,this.deleteUser=new core.EventEmitter,this.userState="DISPLAY",this.userFields=[this.formlyService.buildInputConfig({key:"username",inputKind:"NAME",required:!0}),this.formlyService.buildConfirmedPasswordConfig({}),this.formlyService.buildInputConfig({key:"email",inputKind:"NAME",required:!1})],this.campaignState="DISPLAY",this.campaignFields=[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME",required:!0,maxLength:40,placeholder:"Your campaign's name..."}),this.formlyService.buildInputConfig({key:"subtitle",inputKind:"STRING",required:!1,maxLength:400,placeholder:"The subtitle to show on the home page"}),this.formlyService.buildFileFieldConfig({key:"background_image",required:!0,fileButtonType:"DARK"}),this.formlyService.buildFileFieldConfig({key:"icon",required:!0,fileButtonType:"DARK"})]}ngOnInit(){this.setCampaignOverviewUrl()}ngOnChanges(){this.setUserCards()}setUserState(newState){this.userState=newState,"CREATE"===this.userState&&(this.userModel={})}createNewUser(newUser){this.createUser.emit(newUser)}setCampaignState(newState){this.campaignState=newState,"CREATE"===this.campaignState&&(this.campaignModel={})}createNewCampaign(newCampaign){this.createCampaign.emit(newCampaign)}setUserCards(){this.userCards=this.users?.map((user=>({isOpen:!1,user})))?.sort(((entry1,entry2)=>entry1.user.username.toLowerCase()>entry2.user.username.toLowerCase()?1:-1))??[]}setCampaignOverviewUrl(){this.campaignOverviewUrl=this.routingService.getRoutePath("campaign-overview")}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={users:[{type:core.Input}],campaigns:[{type:core.Input}],allGroups:[{type:core.Input}],statistics:[{type:core.Input}],serverUrl:[{type:core.Input}],createCampaign:[{type:core.Output}],createUser:[{type:core.Output}],addUserGroup:[{type:core.Output}],removeUserGroup:[{type:core.Output}],downloadDatabase:[{type:core.Output}],deleteUser:[{type:core.Output}]}}};SiteAdminComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-site-admin",template:'\n
\n \n \n \n\n \x3c!-- Users Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Users\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Users --\x3e\n \n
\n
\n\n \n\n \x3c!-- New Table Entry --\x3e\n @if (userState === "CREATE") {\n \n

Adding new User

\n \x3c!-- Form --\x3e\n \n
\n }\n\n \x3c!-- Table --\x3e\n @if (userState === "DISPLAY") {\n @for (card of userCards; track card.user.pk) {\n \n \n {{ card.user.username | titlecase }}\n \n\n \n \n }\n
(†): Deactivated/Deleted Account
\n }\n
\n\n \x3c!-- Database Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Database\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Download Database --\x3e\n \n\n \x3c!-- Clear Tokens --\x3e\n \x3c!--
\n \n Clear > 7 day old Tokens\n
--\x3e\n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n \x3c!-- Statistics --\x3e\n
\n @for (statistic of statistics | keyvalue; track statistic.key) {\n
\n
{{ statistic.key }}
\n
{{ statistic.value }}
\n
\n }\n
\n
\n\n \x3c!-- Campaign Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Campaigns\n @if (campaignState === "WAIT_WHILE_CREATING") {\n \n }\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Campaign --\x3e\n \n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n @if (campaignState === "DISPLAY") {\n
\n @for (campaign of campaigns; track campaign.pk) {\n
\n
\n \n {{ campaign.name }} \n
\n
\n {{ campaign.admins?.length ?? 0 }} Admins\n
\n
\n {{ campaign.members?.length ?? 0 }} Members\n
\n
\n {{ campaign.guests?.length ?? 0 }} Guests\n
\n
\n }\n
\n }\n\n \x3c!-- New Campaign Entry --\x3e\n @if (campaignState === "CREATE") {\n \n

Adding new Campaign

\n \x3c!-- Form --\x3e\n \n
\n }\n
\n\n \n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,icon_component.R,separator_component.F,card_component.i,form_component.s,collapsible_panel_component.e,user_row_component.D,spinner_component.t,common.TitleCasePipe,common.KeyValuePipe],styles:[site_admin_componentngResource_default()]})],SiteAdminComponent);const site_admin_stories={title:"DesignSystem/Templates/SiteAdminComponent",component:SiteAdminComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[common.CommonModule,ng_bootstrap.UN,testing.c,formly_constants.d_],declarations:[]})],args:{users:user_mock_service.d,campaigns:campaign_mock_service._B,allGroups:group_service_mock.F,statistics:campaign_mock_service.mE,serverUrl:"https://www.aldrune.com"}},Default=(args=>({props:{...args,createCampaign:(0,dist.XI)("createCampaign"),createUser:(0,dist.XI)("createUser"),addUserGroup:(0,dist.XI)("addUserGroup"),removeUserGroup:(0,dist.XI)("removeUserGroup"),downloadDatabase:(0,dist.XI)("downloadDatabase"),deleteUser:(0,dist.XI)("deleteUser")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createCampaign: action('createCampaign'),\n createUser: action('createUser'),\n addUserGroup: action('addUserGroup'),\n removeUserGroup: action('removeUserGroup'),\n downloadDatabase: action('downloadDatabase'),\n deleteUser: action('deleteUser')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/user-row/user-row.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".user-card__row {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n.user-card__row--delete {\n margin-top: var(--spacer-4);\n display: flex;\n justify-content: flex-end;\n}\n.user-card__row--heading {\n margin-top: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/site-admin/site-admin.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".site-admin__user-section {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n.site-admin__campaign-section {\n margin-bottom: var(--spacer-3);\n}\n.site-admin__separator {\n --separator-margin-top: var(--spacer-0);\n}\n\n.user-section__user {\n display: inline-block;\n width: 100%;\n margin-top: var(--spacer-1);\n margin-bottom: var(--spacer-1);\n}\n\n.campaign-section__heading {\n display: flex;\n justify-content: space-between;\n}\n.campaign-section__body {\n margin-bottom: var(--spacer-5);\n}\n\n.body__icon {\n margin-right: var(--spacer-3);\n max-height: 2rem;\n}\n\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__text--loading {\n margin-left: var(--spacer-3);\n}\n.heading__button {\n align-self: flex-end;\n position: relative;\n top: 1px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6719],{"./src/app/_services/article/group.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>dummyGroups});const dummyGroups=[{url:"https://example.com/group1",name:"Group 1",permissions:["read","write"],id:1},{url:"https://example.com/group2",name:"Group 2",permissions:["read","delete"],id:2},{url:"https://example.com/group3",name:"Group 3",permissions:["write","execute"],id:3},{url:"https://example.com/admin",name:"Admin",permissions:["read","write","delete","execute"],id:4},{url:"https://example.com/guest",name:"Guest",permissions:["read"],id:5},{url:"https://example.com/member",name:"Member",permissions:["read","write"],id:6}]},"./src/app/_services/article/user.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>dummyUsers});const dummyUsers=[{username:"isofruit",pk:3,email:"philippmdoerner@web.de",is_staff:!0,is_superuser:!0,is_active:!0,groups:[3,4],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Aldrune_campaign_admin_group",pk:4}]},{username:"Rhiannon",pk:6,email:"dianaday@gmx.net",is_staff:!1,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"SamDay",pk:7,email:void 0,is_staff:!0,is_superuser:!1,is_active:!0,groups:[],group_details:[]},{username:"Murtagh",pk:8,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,6],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_guest_campaign_group",pk:6}]},{username:"Ailis",pk:9,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Caitriona",pk:10,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,7,8],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_campaign_group",pk:7},{name:"Jōzai Corporation_campaign_admin_group",pk:8}]},{username:"Fen",pk:11,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"Bathilde",pk:12,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[3,7],group_details:[{name:"Aldrune_campaign_group",pk:3},{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Guest",pk:14,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Relentless",pk:15,email:"philipp3000doerner@web.de",is_staff:!0,is_superuser:!1,is_active:!0,groups:[3],group_details:[{name:"Aldrune_campaign_group",pk:3}]},{username:"Guest2",pk:16,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Mipp1",pk:17,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Spleeti",pk:18,email:"Laura.spleet@posteo.de",is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Christian",pk:19,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Norbert",pk:20,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Papa",pk:21,email:"Dr.KlemensDoerner@gmx.de",is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Tecatin",pk:22,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[7],group_details:[{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Roach",pk:23,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5,7],group_details:[{name:"Aldrune_guest_campaign_group",pk:5},{name:"Jōzai Corporation_campaign_group",pk:7}]},{username:"Mav",pk:25,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[5],group_details:[{name:"Aldrune_guest_campaign_group",pk:5}]},{username:"Sam",pk:28,email:void 0,is_staff:!1,is_superuser:!1,is_active:!0,groups:[4],group_details:[{name:"Aldrune_campaign_admin_group",pk:4}]}]},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/app/_services/routing.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{O:()=>RoutingService});var RoutingService_1,tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_angular_router__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),src_utils_logging__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/logging.ts"),src_utils_object__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/object.ts");let RoutingService=class RoutingService{static{RoutingService_1=this}constructor(router){this.router=router,this.NONE_STRING="None",this.routeNodes=this.getRouteTree(),(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(`${RoutingService_1.name}-routeNodes`,this.routeNodes)}routeToPath(routeName,params){(0,src_utils_logging__WEBPACK_IMPORTED_MODULE_0__.R)(RoutingService_1.name,`Routing to ${routeName}`);const routePath=this.getRoutePath(routeName,params),cleanedObjectUrl=this.replaceSpecialUnicodeCharacters(routePath);this.router.navigateByUrl(cleanedObjectUrl)}getRoutePath(routeName,params={}){let variableRoutePath=this.getVariableRoutePathByName(routeName);if(this.hasPathVariables(variableRoutePath)){const variableNames=this.getPathVariableNames(variableRoutePath);for(let variableName of variableNames){const propertyKey=(0,src_utils_object__WEBPACK_IMPORTED_MODULE_1__.Ui)(params,variableName);if(null!=propertyKey)null===params[propertyKey]&&(params[propertyKey]=this.NONE_STRING),variableRoutePath=variableRoutePath.replace(`:${variableName}`,params[propertyKey]);else{const e=new Error(`Tried to create path for route '${routeName}' but lacked parameter '${variableName}' `);console.error(e,"Provided Params: ",params)}}}return`/${variableRoutePath}`}routeToErrorPage(error){if("number"!=typeof error&&!error.hasOwnProperty("status"))throw"Incorrect error input. The input does not contain an error status or an object with the error status. Can not route to error page without error status.";"number"!=typeof error&&error.hasOwnProperty("status")&&(error=error.status);const errorStatusParam=`${error}`;this.routeToPath("error",{errorStatus:errorStatusParam})}routeNameMatches(route,routeName){return route.snapshot.data.name===routeName}replaceSpecialUnicodeCharacters(routePath){return routePath.replace("(","%28").replace(")","%29").replace("?","?").replace("†","%E2%80%A0")}getVariableRoutePathByName(routeName){return this.getVariableRouteByName(routeName).fullPath}getVariableRouteByName(routeName){const route=this.routeNodes[routeName];if(null==route)throw`There is no route with the name ${routeName}. Please contact the Developer to use either a different route name or create a route for this name.`;return route}hasPathVariables(routePath){return routePath.includes("/:")}hasRoutePath(routeName){return null!=this.routeNodes[routeName]}getEndRoutes(route,parentPath=""){let path="";parentPath&&route.path?path=`${parentPath}/${route.path}`:parentPath?path=parentPath:route.path&&(path=route.path);return null==route.children?[{route,fullPath:path}]:route.children.map((route=>this.getEndRoutes(route,path))).flat()}getPathVariableNames(routePath){const pathVariables=routePath.split("/").filter((segment=>segment.startsWith(":")));return pathVariables.map((segment=>segment.slice(1)))}getRouteTree(){return this.router.config.map((route=>this.getEndRoutes(route))).flat().reduce(((acc,route)=>{const routeName=route.route?.data?.name;return null!=routeName&&(acc[routeName]=route),acc}),{})}static{this.ctorParameters=()=>[{type:_angular_router__WEBPACK_IMPORTED_MODULE_2__.Ix}]}};RoutingService=RoutingService_1=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable)({providedIn:"root"})],RoutingService)},"./src/app/_services/utils/campaign.mock.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_B:()=>dummyCampaigns,jr:()=>dummyCampaign,mE:()=>dummyStatistics});const dummyCampaigns=[{pk:1,name:"Aldrune",subtitle:"A campaign made by Samuel Day and recorded by Philipp Dörner
through the eyes of Relentless",background_image:"/media/campaign_backgrounds/bg.jpg",is_deactivated:!1,has_audio_recording_permission:!0,icon:"/media/campaign_icons/favicon-128x128.png",default_map:1,default_map_details:{icon:"map",image:"pic05_sMT2d6M.jpg",name:"Aldrune",id:1},duration:{start_date:"2020-04-07T00:00:00.000000Z",last_date:"2023-04-11T00:00:00.000000Z"}},{pk:2,name:"Jōzai Corp",subtitle:"Welcome to Jōzai Corp, please enjoy your employment.",background_image:"/media/campaign_backgrounds/shanghai_city_snlaYDd.jpg",is_deactivated:!1,has_audio_recording_permission:!1,icon:"/media/campaign_icons/icon.png",default_map:void 0,default_map_details:void 0,duration:{start_date:"2022-01-15T00:00:00.000000Z",last_date:"2022-02-19T00:00:00.000000Z"}}],dummyStatistics={character_count:265,item_count:142,location_count:229,creature_count:42,diaryentry_count:101,encounter_count:954,organization_count:46,quest_count:69,quote_count:203,session_audio_count:69,timestamp_count:1121,map_count:7,marker_count:136,spell_count:22,session_count:90,rule_count:17},dummyCampaign={name:"Aldrune",subtitle:"A campaign for testing",pk:1,background_image:"/assets/default_images/audio_pic_default.webp",icon:"https://www.aldrune.com/media/campaign_icons/favicon-128x128.png",default_map:123,default_map_details:{id:123,name:"Default Map",icon:"plus",image:"blub.jpg"},is_deactivated:!1,has_audio_recording_permission:!0,members:[{username:"isofruit",password:"password1",pk:1,api_permissions:["permission1","permission2"],groups:[1,2],group_details:[{name:"group1",pk:1},{name:"group2",pk:2}],is_staff:!0,is_superuser:!1,email:"user1@example.com",is_active:!0},{username:"user2",password:"password2",pk:2,api_permissions:["permission3","permission4"],groups:[1,3],group_details:[{name:"group1",pk:1},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user2@example.com",is_active:!0}],admins:[{username:"admin",password:"adminpassword",pk:3,api_permissions:["permission1","permission2","permission3","permission4"],groups:[1,2,3],group_details:[{name:"group1",pk:1},{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!0,is_superuser:!0,email:"admin@example.com",is_active:!0},{username:"user3",password:"password3",pk:4,api_permissions:["permission1"],groups:[1],group_details:[{name:"group1",pk:1}],is_staff:!1,is_superuser:!1,email:"user3@example.com",is_active:!0}],guests:[{username:"user4",password:"password4",pk:5,api_permissions:["permission2","permission3"],groups:[2,3],group_details:[{name:"group2",pk:2},{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user4@example.com",is_active:!0},{username:"user5",password:"password5",pk:6,api_permissions:["permission4"],groups:[3],group_details:[{name:"group3",pk:3}],is_staff:!1,is_superuser:!1,email:"user5@example.com",is_active:!0}],member_group_name:"Members",admin_group_name:"Admins",guest_group_name:"Guests",emptySearchResponses:[{id:1,text:"Empty response 1",campaign:1},{id:2,text:"Empty response 2",campaign:1}]}},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/design/organisms/user-row/user-row.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>UserRowComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var user_row_componentngResource=__webpack_require__("./src/design/organisms/user-row/user-row.component.scss?ngResource"),user_row_componentngResource_default=__webpack_require__.n(user_row_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");let UserRowComponent=class UserRowComponent{constructor(){this.user=core.input.required(),this.groups=(0,core.input)(),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.addGroup=new core.EventEmitter,this.removeGroup=new core.EventEmitter,this.deleteUser=new core.EventEmitter,this.userGroupEntries=(0,core.computed)((()=>this.user().group_details?.map((group=>({badgeValue:group.pk,text:group.name})))??[]))}static{this.propDecorators={user:[{type:core.Input,args:[{isSignal:!0,alias:"user",required:!0,transform:void 0}]}],groups:[{type:core.Input,args:[{isSignal:!0,alias:"groups",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],addGroup:[{type:core.Output}],removeGroup:[{type:core.Output}],deleteUser:[{type:core.Output}]}}};UserRowComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-user-row",template:'
\n

\n
\n \n {{ user().username | titlecase }}\n @if (!user().is_active) {\n (†) \n }\n
\n

\n\n
\n \n
\n\n
\n
\n \n Email:\n
\n
{{ user().email ?? "Not Provided" }}
\n
\n\n @if (user().is_active) {\n \n }\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[icon_component.R,molecules.pn,common.TitleCasePipe,molecules.Ts],styles:[user_row_componentngResource_default()]})],UserRowComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/object.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ui:()=>getCorrectKey,p:()=>getNestedProperty});var _string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/string.ts");function getCorrectKey(obj,key){if(key in obj)return key;const snakeCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.C8)(key);if(snakeCaseKey in obj)return snakeCaseKey;const camelCaseKey=(0,_string__WEBPACK_IMPORTED_MODULE_0__.sF)(key);return camelCaseKey in obj?camelCaseKey:void 0}function getNestedProperty(item,keyPath){const keys=keyPath.split(".");let currentValue=item;for(let key of keys){if(!(key in currentValue)){throw new Error(`Cannot find nested property '${keyPath}' in '${JSON.stringify(item)}'`)}currentValue=currentValue[key]}return currentValue}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/site-admin/site-admin.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>site_admin_stories});var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),group_service_mock=__webpack_require__("./src/app/_services/article/group.service.mock.ts"),user_mock_service=__webpack_require__("./src/app/_services/article/user.mock.service.ts"),campaign_mock_service=__webpack_require__("./src/app/_services/utils/campaign.mock.service.ts"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var site_admin_componentngResource=__webpack_require__("./src/design/templates/site-admin/site-admin.component.scss?ngResource"),site_admin_componentngResource_default=__webpack_require__.n(site_admin_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),collapsible_panel_component=__webpack_require__("./src/design/molecules/collapsible-panel/collapsible-panel.component.ts"),form_component=__webpack_require__("./src/design/molecules/form/form.component.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts"),user_row_component=__webpack_require__("./src/design/organisms/user-row/user-row.component.ts");let SiteAdminComponent=class SiteAdminComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.createCampaign=new core.EventEmitter,this.createUser=new core.EventEmitter,this.addUserGroup=new core.EventEmitter,this.removeUserGroup=new core.EventEmitter,this.downloadDatabase=new core.EventEmitter,this.deleteUser=new core.EventEmitter,this.userState="DISPLAY",this.userFields=[this.formlyService.buildInputConfig({key:"username",inputKind:"NAME",required:!0}),this.formlyService.buildConfirmedPasswordConfig({}),this.formlyService.buildInputConfig({key:"email",inputKind:"NAME",required:!1})],this.campaignState="DISPLAY",this.campaignFields=[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME",required:!0,maxLength:40,placeholder:"Your campaign's name..."}),this.formlyService.buildInputConfig({key:"subtitle",inputKind:"STRING",required:!1,maxLength:400,placeholder:"The subtitle to show on the home page"}),this.formlyService.buildFileFieldConfig({key:"background_image",required:!0,fileButtonType:"DARK"}),this.formlyService.buildFileFieldConfig({key:"icon",required:!0,fileButtonType:"DARK"})]}ngOnInit(){this.setCampaignOverviewUrl()}ngOnChanges(){this.setUserCards()}setUserState(newState){this.userState=newState,"CREATE"===this.userState&&(this.userModel={})}createNewUser(newUser){this.createUser.emit(newUser)}setCampaignState(newState){this.campaignState=newState,"CREATE"===this.campaignState&&(this.campaignModel={})}createNewCampaign(newCampaign){this.createCampaign.emit(newCampaign)}setUserCards(){this.userCards=this.users?.map((user=>({isOpen:!1,user})))?.sort(((entry1,entry2)=>entry1.user.username.toLowerCase()>entry2.user.username.toLowerCase()?1:-1))??[]}setCampaignOverviewUrl(){this.campaignOverviewUrl=this.routingService.getRoutePath("campaign-overview")}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={users:[{type:core.Input}],campaigns:[{type:core.Input}],allGroups:[{type:core.Input}],statistics:[{type:core.Input}],serverUrl:[{type:core.Input}],createCampaign:[{type:core.Output}],createUser:[{type:core.Output}],addUserGroup:[{type:core.Output}],removeUserGroup:[{type:core.Output}],downloadDatabase:[{type:core.Output}],deleteUser:[{type:core.Output}]}}};SiteAdminComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-site-admin",template:'\n
\n \n \n \n\n \x3c!-- Users Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Users\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Users --\x3e\n \n
\n
\n\n \n\n \x3c!-- New Table Entry --\x3e\n @if (userState === "CREATE") {\n \n

Adding new User

\n \x3c!-- Form --\x3e\n \n
\n }\n\n \x3c!-- Table --\x3e\n @if (userState === "DISPLAY") {\n @for (card of userCards; track card.user.pk) {\n \n \n {{ card.user.username | titlecase }}\n \n\n \n \n }\n
(†): Deactivated/Deleted Account
\n }\n
\n\n \x3c!-- Database Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Database\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Download Database --\x3e\n \n\n \x3c!-- Clear Tokens --\x3e\n \x3c!--
\n \n Clear > 7 day old Tokens\n
--\x3e\n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n \x3c!-- Statistics --\x3e\n
\n @for (statistic of statistics | keyvalue; track statistic.key) {\n
\n
{{ statistic.key }}
\n
{{ statistic.value }}
\n
\n }\n
\n
\n\n \x3c!-- Campaign Section --\x3e\n
\n \x3c!-- Section Heading --\x3e\n
\n

\n \n Campaigns\n @if (campaignState === "WAIT_WHILE_CREATING") {\n \n }\n

\n\n \x3c!-- Heading Buttons --\x3e\n
\n \x3c!-- Add Campaign --\x3e\n \n
\n
\n\n \n\n \x3c!-- Section Body --\x3e\n @if (campaignState === "DISPLAY") {\n
\n @for (campaign of campaigns; track campaign.pk) {\n
\n
\n \n {{ campaign.name }} \n
\n
\n {{ campaign.admins?.length ?? 0 }} Admins\n
\n
\n {{ campaign.members?.length ?? 0 }} Members\n
\n
\n {{ campaign.guests?.length ?? 0 }} Guests\n
\n
\n }\n
\n }\n\n \x3c!-- New Campaign Entry --\x3e\n @if (campaignState === "CREATE") {\n \n

Adding new Campaign

\n \x3c!-- Form --\x3e\n \n
\n }\n
\n\n \n \n \n
\n
\n',standalone:!0,imports:[page_container_component.i,router.Wk,button_component.Q,icon_component.R,separator_component.F,card_component.i,form_component.s,collapsible_panel_component.e,user_row_component.D,spinner_component.t,common.TitleCasePipe,common.KeyValuePipe],styles:[site_admin_componentngResource_default()]})],SiteAdminComponent);const site_admin_stories={title:"DesignSystem/Templates/SiteAdminComponent",component:SiteAdminComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[common.CommonModule,ng_bootstrap.UN,testing.c,formly_constants.d_],declarations:[]})],args:{users:user_mock_service.d,campaigns:campaign_mock_service._B,allGroups:group_service_mock.F,statistics:campaign_mock_service.mE,serverUrl:"https://www.aldrune.com"}},Default=(args=>({props:{...args,createCampaign:(0,dist.XI)("createCampaign"),createUser:(0,dist.XI)("createUser"),addUserGroup:(0,dist.XI)("addUserGroup"),removeUserGroup:(0,dist.XI)("removeUserGroup"),downloadDatabase:(0,dist.XI)("downloadDatabase"),deleteUser:(0,dist.XI)("deleteUser")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n createCampaign: action('createCampaign'),\n createUser: action('createUser'),\n addUserGroup: action('addUserGroup'),\n removeUserGroup: action('removeUserGroup'),\n downloadDatabase: action('downloadDatabase'),\n deleteUser: action('deleteUser')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.vh-50 {\n height: 50vh;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/user-row/user-row.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".user-card__row {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n.user-card__row--delete {\n margin-top: var(--spacer-4);\n display: flex;\n justify-content: flex-end;\n}\n.user-card__row--heading {\n margin-top: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/site-admin/site-admin.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".site-admin__user-section {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n}\n.site-admin__campaign-section {\n margin-bottom: var(--spacer-3);\n}\n.site-admin__separator {\n --separator-margin-top: var(--spacer-0);\n}\n\n.user-section__user {\n display: inline-block;\n width: 100%;\n margin-top: var(--spacer-1);\n margin-bottom: var(--spacer-1);\n}\n\n.campaign-section__heading {\n display: flex;\n justify-content: space-between;\n}\n.campaign-section__body {\n margin-bottom: var(--spacer-5);\n}\n\n.body__icon {\n margin-right: var(--spacer-3);\n max-height: 2rem;\n}\n\n.heading__text {\n margin-bottom: var(--spacer-0);\n}\n.heading__text--loading {\n margin-left: var(--spacer-3);\n}\n.heading__button {\n align-self: flex-end;\n position: relative;\n top: 1px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/iframe.html b/iframe.html index b3a5bf018..fcd5f0387 100644 --- a/iframe.html +++ b/iframe.html @@ -470,7 +470,7 @@ } catch (e) { // eslint-disable-next-line no-console console.warn('unable to connect to top frame for connecting dev tools'); - }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.